diff options
Diffstat (limited to 'samsung-ipc/ipc_private.h')
-rw-r--r-- | samsung-ipc/ipc_private.h | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/samsung-ipc/ipc_private.h b/samsung-ipc/ipc_private.h index d724781..4e05119 100644 --- a/samsung-ipc/ipc_private.h +++ b/samsung-ipc/ipc_private.h @@ -21,31 +21,42 @@ #ifndef __IPC_PRIVATE_H__ #define __IPC_PRIVATE_H__ +#include <radio.h> + struct ipc_client; void ipc_client_log(struct ipc_client *client, const char *message, ...); struct ipc_ops { int (*bootstrap)(struct ipc_client *client); - int (*open)(struct ipc_client *client); - int (*close)(struct ipc_client *client); - int (*send)(struct ipc_client *client, struct ipc_request*); - int (*recv)(struct ipc_client *client, struct ipc_response*); + int (*send)(struct ipc_client *client, struct ipc_message_info *); + int (*recv)(struct ipc_client *client, struct ipc_message_info *); +}; + +struct ipc_handlers { + /* Transport handlers/data */ + ipc_io_handler_cb read; + ipc_io_handler_cb write; + ipc_io_handler_cb open; + ipc_io_handler_cb close; + + ipc_handler_data_cb io_data_reg; + ipc_handler_cb io_data_unreg; + void *io_data; + + /* Power handlers */ + ipc_handler_cb power_on; + ipc_handler_cb power_off; }; struct ipc_client { int type; - /* callbacks for transport handling */ - ipc_client_transport_cb read; - void *read_data; - ipc_client_transport_cb write; - void *write_data; - ipc_client_log_handler_cb log_handler; void *log_data; struct ipc_ops *ops; + struct ipc_handlers *handlers; }; |