diff options
author | PaulK <contact@paulk.fr> | 2012-06-07 22:22:23 +0200 |
---|---|---|
committer | PaulK <contact@paulk.fr> | 2012-06-07 22:22:23 +0200 |
commit | 67bb78c3e7d0991d1f1bbd7fccf2f9986cb34c7c (patch) | |
tree | d5001837414fe2cfe8b1423687d97b50c2fc0029 /samsung-ipc/ipc.c | |
parent | 63a3609348e04a1899b69a4f95e626408497f230 (diff) | |
download | external_libsamsung-ipc-67bb78c3e7d0991d1f1bbd7fccf2f9986cb34c7c.zip external_libsamsung-ipc-67bb78c3e7d0991d1f1bbd7fccf2f9986cb34c7c.tar.gz external_libsamsung-ipc-67bb78c3e7d0991d1f1bbd7fccf2f9986cb34c7c.tar.bz2 |
Function to check if GPRS activation/deactivation functions are available
Signed-off-by: PaulK <contact@paulk.fr>
Diffstat (limited to 'samsung-ipc/ipc.c')
-rw-r--r-- | samsung-ipc/ipc.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/samsung-ipc/ipc.c b/samsung-ipc/ipc.c index a43cde2..301f452 100644 --- a/samsung-ipc/ipc.c +++ b/samsung-ipc/ipc.c @@ -361,7 +361,20 @@ int ipc_client_power_off(struct ipc_client *client) return client->handlers->power_off(client->handlers->power_off_data); } -// README: This will return -1 whenever such setup isn't needed, though it works +int ipc_client_gprs_handlers_available(struct ipc_client *client) +{ + if (client == NULL || + client->handlers == NULL) + return -1; + + if(client->handlers->gprs_activate != NULL && + client->handlers->gprs_deactivate != NULL && + client->handlers->gprs_get_iface != NULL) + return 1; + else + return 0; +} + int ipc_client_gprs_activate(struct ipc_client *client) { if (client == NULL || |