aboutsummaryrefslogtreecommitdiffstats
path: root/include/radio.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 /include/radio.h
parentaeb7a4c4069cfbbf4f177a038e8379ef7341bd02 (diff)
downloadhardware_replicant_libsamsung-ipc-8b39af23371a7b2f0e8dc3640377a2d84ba4cfce.tar.gz
hardware_replicant_libsamsung-ipc-8b39af23371a7b2f0e8dc3640377a2d84ba4cfce.tar.bz2
hardware_replicant_libsamsung-ipc-8b39af23371a7b2f0e8dc3640377a2d84ba4cfce.zip
added handlers support and default handlers for crespo.
Diffstat (limited to 'include/radio.h')
-rw-r--r--include/radio.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/include/radio.h b/include/radio.h
index 193a324..ec903df 100644
--- a/include/radio.h
+++ b/include/radio.h
@@ -59,19 +59,31 @@ struct ipc_response {
};
struct ipc_client;
+struct ipc_handlers;
-typedef int (*ipc_client_transport_cb)(uint8_t *data, unsigned int size, void *user_data);
typedef void (*ipc_client_log_handler_cb)(const char *message, void *user_data);
+typedef void *(*ipc_handler_data_cb)(void);
+typedef int (*ipc_io_handler_cb)(void *data, unsigned int size, void *io_data);
+typedef int (*ipc_handler_cb)(void *data);
+
struct ipc_client *ipc_client_new(int client_type);
-int ipc_client_set_log_handler(struct ipc_client *client, ipc_client_log_handler_cb log_handler_cb, void *user_data);
-int ipc_client_set_delegates(struct ipc_client *client, ipc_client_transport_cb write, void *write_data,
- ipc_client_transport_cb read, void *read_data);
int ipc_client_free(struct ipc_client *client);
+int ipc_client_set_log_handler(struct ipc_client *client, ipc_client_log_handler_cb log_handler_cb, void *user_data);
+
+int ipc_client_set_handlers(struct ipc_client *client, struct ipc_handlers *handlers);
+int ipc_client_set_io_handlers(struct ipc_client *client, void *io_data,
+ ipc_io_handler_cb read, ipc_io_handler_cb write,
+ ipc_io_handler_cb open, ipc_io_handler_cb close);
+void *ipc_client_get_handlers_io_data(struct ipc_client *client);
+int ipc_client_set_handlers_io_data(struct ipc_client *client, void *io_data);
+
int ipc_client_bootstrap_modem(struct ipc_client *client);
int ipc_client_open(struct ipc_client *client);
int ipc_client_close(struct ipc_client *client);
+int ipc_client_power_on(struct ipc_client *client);
+int ipc_client_power_off(struct ipc_client *client);
int ipc_client_recv(struct ipc_client *client, struct ipc_response *response);