2023-04-07 03:31:46 +00:00
|
|
|
#ifndef GSR_KMS_CLIENT_H
|
|
|
|
#define GSR_KMS_CLIENT_H
|
|
|
|
|
2023-04-09 13:54:29 +00:00
|
|
|
#include "../kms_shared.h"
|
2023-04-07 03:31:46 +00:00
|
|
|
#include <sys/types.h>
|
2023-04-16 20:05:09 +00:00
|
|
|
#include <limits.h>
|
2023-04-07 03:31:46 +00:00
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
pid_t kms_server_pid;
|
2023-11-12 09:55:02 +00:00
|
|
|
int initial_socket_fd;
|
|
|
|
int initial_client_fd;
|
|
|
|
char initial_socket_path[PATH_MAX];
|
|
|
|
int socket_pair[2];
|
2023-04-07 03:31:46 +00:00
|
|
|
} gsr_kms_client;
|
|
|
|
|
|
|
|
/* |card_path| should be a path to card, for example /dev/dri/card0 */
|
2023-04-09 14:06:39 +00:00
|
|
|
int gsr_kms_client_init(gsr_kms_client *self, const char *card_path);
|
2023-04-07 03:31:46 +00:00
|
|
|
void gsr_kms_client_deinit(gsr_kms_client *self);
|
|
|
|
|
|
|
|
int gsr_kms_client_get_kms(gsr_kms_client *self, gsr_kms_response *response);
|
|
|
|
|
|
|
|
#endif /* #define GSR_KMS_CLIENT_H */
|