diff options
-rw-r--r-- | doc/iotcon_doc.h | 2 | ||||
-rw-r--r-- | lib/icl-client.c | 12 | ||||
-rw-r--r-- | lib/icl-client.h | 2 | ||||
-rw-r--r-- | lib/include/iotcon-struct.h | 16 | ||||
-rw-r--r-- | test/crud-test-client.c | 4 | ||||
-rw-r--r-- | test/repr-test-client.c | 4 |
6 files changed, 20 insertions, 20 deletions
diff --git a/doc/iotcon_doc.h b/doc/iotcon_doc.h index 348618e..4bac0fd 100644 --- a/doc/iotcon_doc.h +++ b/doc/iotcon_doc.h @@ -170,7 +170,7 @@ static void _found_resource(iotcon_client_h resource, void *user_data) return; } - ret = iotcon_client_get_server_id(resource, &resource_sid); + ret = iotcon_client_get_device_id(resource, &resource_sid); if (IOTCON_ERROR_NONE != ret) { return; } diff --git a/lib/icl-client.c b/lib/icl-client.c index 816ba26..9e0c8dd 100644 --- a/lib/icl-client.c +++ b/lib/icl-client.c @@ -181,7 +181,7 @@ API void iotcon_client_destroy(iotcon_client_h resource) free(resource->uri_path); free(resource->host); - free(resource->sid); + free(resource->device_id); iotcon_resource_types_destroy(resource->types); /* null COULD be allowed */ @@ -230,12 +230,12 @@ API int iotcon_client_get_host(iotcon_client_h resource, char **host) /* The content of the resource should not be freed by user. */ -API int iotcon_client_get_server_id(iotcon_client_h resource, char **sid) +API int iotcon_client_get_device_id(iotcon_client_h resource, char **device_id) { RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER); - RETV_IF(NULL == sid, IOTCON_ERROR_INVALID_PARAMETER); + RETV_IF(NULL == device_id, IOTCON_ERROR_INVALID_PARAMETER); - *sid = resource->sid; + *device_id = resource->device_id; return IOTCON_ERROR_NONE; } @@ -335,8 +335,8 @@ static iotcon_client_h _icl_client_from_gvariant(GVariant *payload, } client->ref_count = 1; - client->sid = strdup(sid); - if (NULL == client->sid) { + client->device_id = strdup(sid); + if (NULL == client->device_id) { ERR("strdup(sid) Fail(%d)", errno); iotcon_client_destroy(client); return NULL; diff --git a/lib/icl-client.h b/lib/icl-client.h index 16a5cab..f9b1507 100644 --- a/lib/icl-client.h +++ b/lib/icl-client.h @@ -24,7 +24,7 @@ struct icl_remote_resource { int ref_count; char *uri_path; char *host; - char *sid; + char *device_id; bool is_secure; bool is_observable; iotcon_options_h header_options; diff --git a/lib/include/iotcon-struct.h b/lib/include/iotcon-struct.h index c0ce269..904dca7 100644 --- a/lib/include/iotcon-struct.h +++ b/lib/include/iotcon-struct.h @@ -803,7 +803,7 @@ typedef struct icl_remote_resource* iotcon_client_h; * @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter * * @see iotcon_client_get_host() - * @see iotcon_client_get_server_id() + * @see iotcon_client_get_device_id() * @see iotcon_client_get_types() * @see iotcon_client_get_interfaces() * @see iotcon_client_is_observable() @@ -825,7 +825,7 @@ int iotcon_client_get_uri_path(iotcon_client_h resource, char **uri_path); * @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter * * @see iotcon_client_get_uri_path() - * @see iotcon_client_get_server_id() + * @see iotcon_client_get_device_id() * @see iotcon_client_get_types() * @see iotcon_client_get_interfaces() * @see iotcon_client_is_observable() @@ -840,7 +840,7 @@ int iotcon_client_get_host(iotcon_client_h resource, char **host); * @remarks @a sid must not be released using free(). * * @param[in] resource The handle of the client - * @param[out] sid The server id of the client + * @param[out] device_id The device id of the client * * @return 0 on success, otherwise a negative error value. * @retval #IOTCON_ERROR_NONE Successful @@ -853,7 +853,7 @@ int iotcon_client_get_host(iotcon_client_h resource, char **host); * @see iotcon_client_is_observable() * @see iotcon_client_set_options() */ -int iotcon_client_get_server_id(iotcon_client_h resource, char **sid); +int iotcon_client_get_device_id(iotcon_client_h resource, char **device_id); /** * @brief Gets resource types of the client @@ -869,7 +869,7 @@ int iotcon_client_get_server_id(iotcon_client_h resource, char **sid); * * @see iotcon_client_get_uri_path() * @see iotcon_client_get_host() - * @see iotcon_client_get_server_id() + * @see iotcon_client_get_device_id() * @see iotcon_client_get_interfaces() * @see iotcon_client_is_observable() * @see iotcon_client_set_options() @@ -890,7 +890,7 @@ int iotcon_client_get_types(iotcon_client_h resource, iotcon_resource_types_h *t * * @see iotcon_client_get_uri_path() * @see iotcon_client_get_host() - * @see iotcon_client_get_server_id() + * @see iotcon_client_get_device_id() * @see iotcon_client_get_types() * @see iotcon_client_is_observable() * @see iotcon_client_set_options() @@ -911,7 +911,7 @@ int iotcon_client_get_interfaces(iotcon_client_h resource, int *ifaces); * * @see iotcon_client_get_uri_path() * @see iotcon_client_get_host() - * @see iotcon_client_get_server_id() + * @see iotcon_client_get_device_id() * @see iotcon_client_get_types() * @see iotcon_client_get_interfaces() * @see iotcon_client_set_options() @@ -932,7 +932,7 @@ int iotcon_client_is_observable(iotcon_client_h resource, bool *observable); * * @see iotcon_client_get_uri_path() * @see iotcon_client_get_host() - * @see iotcon_client_get_server_id() + * @see iotcon_client_get_device_id() * @see iotcon_client_get_types() * @see iotcon_client_get_interfaces() * @see iotcon_client_is_observable() diff --git a/test/crud-test-client.c b/test/crud-test-client.c index 3c7b4c1..bab0a08 100644 --- a/test/crud-test-client.c +++ b/test/crud-test-client.c @@ -268,9 +268,9 @@ static void _found_resource(iotcon_client_h resource, void *user_data) /* get the resource unique id. * this is unique per-server independent on how it was discovered. */ - ret = iotcon_client_get_server_id(resource, &resource_sid); + ret = iotcon_client_get_device_id(resource, &resource_sid); if (IOTCON_ERROR_NONE != ret) { - ERR("iotcon_client_get_server_id() Fail(%d)", ret); + ERR("iotcon_client_get_device_id() Fail(%d)", ret); return; } DBG("[%s] resource server id : %s", resource_uri_path, resource_sid); diff --git a/test/repr-test-client.c b/test/repr-test-client.c index 81d6a1c..198894a 100644 --- a/test/repr-test-client.c +++ b/test/repr-test-client.c @@ -232,9 +232,9 @@ static void _found_resource(iotcon_client_h resource, void *user_data) } /* get the resource server id */ - ret = iotcon_client_get_server_id(resource, &resource_sid); + ret = iotcon_client_get_device_id(resource, &resource_sid); if (IOTCON_ERROR_NONE != ret) { - ERR("iotcon_client_get_server_id() Fail(%d)", ret); + ERR("iotcon_client_get_device_id() Fail(%d)", ret); return; } DBG("[%s] resource server id : %s", resource_uri_path, resource_sid); |