diff options
author | Joerie de Gram <j.de.gram@gmail.com> | 2011-10-28 13:38:23 +0200 |
---|---|---|
committer | Joerie de Gram <j.de.gram@gmail.com> | 2011-10-28 13:53:28 +0200 |
commit | 2b9aa23db0b9c0f395abca551414a3c3ecb6d63d (patch) | |
tree | 4a3c066a2f21692cde8f5ce70ef0cc88801a7d72 /samsung-ipc/ipc.c | |
parent | 90b3b7de324debfec19829bcd77df5d8b8fba381 (diff) | |
download | external_libsamsung-ipc-2b9aa23db0b9c0f395abca551414a3c3ecb6d63d.zip external_libsamsung-ipc-2b9aa23db0b9c0f395abca551414a3c3ecb6d63d.tar.gz external_libsamsung-ipc-2b9aa23db0b9c0f395abca551414a3c3ecb6d63d.tar.bz2 |
split devices, require compile-time device selection
Diffstat (limited to 'samsung-ipc/ipc.c')
-rw-r--r-- | samsung-ipc/ipc.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/samsung-ipc/ipc.c b/samsung-ipc/ipc.c index b539d6d..15335a2 100644 --- a/samsung-ipc/ipc.c +++ b/samsung-ipc/ipc.c @@ -29,9 +29,8 @@ #include "ipc_private.h" -extern struct ipc_ops crespo_ipc_ops; -// extern struct ipc_ops h1_ipc_ops; - +extern struct ipc_ops ipc_ops; +extern struct ipc_handlers ipc_default_handlers; void log_handler_default(const char *message, void *user_data) { @@ -58,15 +57,12 @@ struct ipc_client* ipc_client_new(int client_type) switch (client_type) { - case IPC_CLIENT_TYPE_CRESPO_FMT: - case IPC_CLIENT_TYPE_CRESPO_RFS: - ops = &crespo_ipc_ops; - break; - case IPC_CLIENT_TYPE_H1: - // ops = &h1_ipc_ops; + case IPC_CLIENT_TYPE_FMT: + case IPC_CLIENT_TYPE_RFS: + ops = &ipc_ops; break; default: - break; + return NULL; } client = (struct ipc_client*) malloc(sizeof(struct ipc_client)); @@ -75,6 +71,9 @@ struct ipc_client* ipc_client_new(int client_type) client->handlers = (struct ipc_handlers *) malloc(sizeof(struct ipc_handlers)); client->log_handler = log_handler_default; + /* Set default handlers */ + ipc_client_set_handlers(client, &ipc_default_handlers); + return client; } |