2018-10-10 23:08:58 +02:00
|
|
|
#ifndef __IPC_CLIENT_H__
|
|
|
|
#define __IPC_CLIENT_H__
|
2018-10-04 01:22:50 +02:00
|
|
|
|
2018-11-02 21:03:54 +01:00
|
|
|
#include <stdint.h>
|
|
|
|
|
2018-10-04 01:22:50 +02:00
|
|
|
struct ipc_client {
|
2018-11-02 21:03:54 +01:00
|
|
|
uint32_t version;
|
|
|
|
uint32_t index;
|
|
|
|
int32_t proc_fd;
|
2018-10-04 01:22:50 +02:00
|
|
|
};
|
|
|
|
|
2018-10-04 22:51:31 +02:00
|
|
|
struct ipc_clients {
|
2018-10-04 01:54:12 +02:00
|
|
|
struct ipc_client **clients;
|
2018-11-02 21:03:54 +01:00
|
|
|
int32_t size;
|
2018-10-04 01:22:50 +02:00
|
|
|
};
|
|
|
|
|
2018-10-08 16:15:35 +02:00
|
|
|
// store and remove only pointers on allocated structures
|
2018-11-02 21:03:54 +01:00
|
|
|
int32_t ipc_client_add (struct ipc_clients *, struct ipc_client *);
|
|
|
|
int32_t ipc_client_del (struct ipc_clients *, struct ipc_client *);
|
2018-10-04 01:22:50 +02:00
|
|
|
|
2018-10-08 16:15:35 +02:00
|
|
|
void ipc_clients_print (struct ipc_clients *);
|
|
|
|
void ipc_clients_free (struct ipc_clients *);
|
2018-10-04 01:22:50 +02:00
|
|
|
|
|
|
|
struct ipc_client * ipc_server_client_copy (const struct ipc_client *p);
|
2018-11-02 21:03:54 +01:00
|
|
|
int32_t ipc_server_client_eq (const struct ipc_client *p1, const struct ipc_client *p2);
|
2018-10-04 01:22:50 +02:00
|
|
|
// create the service client structure
|
|
|
|
void ipc_server_client_gen (struct ipc_client *p
|
2018-11-02 21:03:54 +01:00
|
|
|
, uint32_t index, uint32_t version);
|
2018-10-04 01:22:50 +02:00
|
|
|
|
|
|
|
void client_print (struct ipc_client *);
|
|
|
|
#endif
|