diff options
-rw-r--r-- | include/radio.h | 1 | ||||
-rw-r--r-- | samsung-ipc/ipc.c | 15 |
2 files changed, 15 insertions, 1 deletions
diff --git a/include/radio.h b/include/radio.h index 12b7aa0..7a18096 100644 --- a/include/radio.h +++ b/include/radio.h @@ -79,6 +79,7 @@ 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_gprs_handlers_available(struct ipc_client *client); int ipc_client_gprs_activate(struct ipc_client *client); int ipc_client_gprs_deactivate(struct ipc_client *client); int ipc_client_gprs_get_iface(struct ipc_client *client, char **iface); 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 || |