aboutsummaryrefslogtreecommitdiffstats
path: root/samsung-ipc/ipc_private.h
diff options
context:
space:
mode:
authorPaulK <contact@paulk.fr>2011-10-25 21:10:59 +0200
committerJoerie de Gram <j.de.gram@gmail.com>2011-10-28 13:53:28 +0200
commit8b39af23371a7b2f0e8dc3640377a2d84ba4cfce (patch)
treecacec76a6deb14bfddddd05a3c347be8fcf288a7 /samsung-ipc/ipc_private.h
parentaeb7a4c4069cfbbf4f177a038e8379ef7341bd02 (diff)
downloadexternal_libsamsung-ipc-8b39af23371a7b2f0e8dc3640377a2d84ba4cfce.zip
external_libsamsung-ipc-8b39af23371a7b2f0e8dc3640377a2d84ba4cfce.tar.gz
external_libsamsung-ipc-8b39af23371a7b2f0e8dc3640377a2d84ba4cfce.tar.bz2
added handlers support and default handlers for crespo.
Diffstat (limited to 'samsung-ipc/ipc_private.h')
-rw-r--r--samsung-ipc/ipc_private.h25
1 files changed, 17 insertions, 8 deletions
diff --git a/samsung-ipc/ipc_private.h b/samsung-ipc/ipc_private.h
index d724781..be74c74 100644
--- a/samsung-ipc/ipc_private.h
+++ b/samsung-ipc/ipc_private.h
@@ -27,25 +27,34 @@ 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*);
};
+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;
};