Rename API (get_number_of_children,get_children_count -> get_child_count) 73/67473/6
authorsung.goo.kim <sung.goo.kim@samsung.com>
Wed, 27 Apr 2016 00:20:26 +0000 (09:20 +0900)
committerYoungjae Shin <yj99.shin@samsung.com>
Fri, 29 Apr 2016 06:41:38 +0000 (23:41 -0700)
Change-Id: I064b83c5d30587fe0e32f50081b29aa598e8a254

lib/icl-representation.c
lib/icl-resource.c
lib/include/iotcon-options.h
lib/include/iotcon-query.h
lib/include/iotcon-representation.h
lib/include/iotcon-resource.h
test/iotcon-test-iface-client.c

index a3f75105e39ce193aeb48047236326cda0fbf5fa..be1627ba64ac764e8f67120673a160f177b4199c 100644 (file)
@@ -275,7 +275,7 @@ API int iotcon_representation_foreach_children(iotcon_representation_h parent,
        return IOTCON_ERROR_NONE;
 }
 
-API int iotcon_representation_get_children_count(iotcon_representation_h parent,
+API int iotcon_representation_get_child_count(iotcon_representation_h parent,
                unsigned int *count)
 {
        RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
index 11dcfaf8db1821da1bc84602177233ff72abaac4..3c960869ccb7d3699ad4ae7138786a734c3120e8 100644 (file)
@@ -299,14 +299,14 @@ API int iotcon_resource_unbind_child_resource(iotcon_resource_h parent,
 }
 
 
-API int iotcon_resource_get_number_of_children(iotcon_resource_h resource,
-               int *number)
+API int iotcon_resource_get_child_count(iotcon_resource_h resource,
+               unsigned int *count)
 {
        RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
        RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == number, IOTCON_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == count, IOTCON_ERROR_INVALID_PARAMETER);
 
-       *number = g_list_length(resource->children);
+       *count = g_list_length(resource->children);
 
        return IOTCON_ERROR_NONE;
 }
index 1be446402b81324dd8e6b09e00a645c0550ac67a..6998a04fd9b26bf0db8f921b9d703fcca5fff05e 100644 (file)
@@ -246,7 +246,7 @@ typedef bool (*iotcon_options_foreach_cb)(unsigned short id, const char *data,
                void *user_data);
 
 /**
- * @brief Gets all datas of the options by invoking the callback function.
+ * @brief Gets all data of the options by invoking the callback function.
  * @details iotcon_options_foreach_cb() will be called for each option.\n
  * If iotcon_options_foreach_cb() returns false, iteration will be stop.
  *
index 83e3156efc6b91cefc58639516898ad411acf161..d63b5a2cf8d1a299e1a6aa51089a33acdbf1264c 100644 (file)
@@ -331,7 +331,7 @@ typedef bool (*iotcon_query_foreach_cb)(const char *key, const char *value,
                void *user_data);
 
 /**
- * @brief Gets all datas of the query by invoking the callback function.
+ * @brief Gets all data of the query by invoking the callback function.
  * @details iotcon_query_foreach_cb() will be called for each query.\n
  * If iotcon_query_foreach_cb() returns false, iteration will be stop.
  *
index 4eb182f123dfd3cd64dc7ac3d525b48af33e1405..a84c12da64c51a9e2cb3d0f14a9d199be17e7b20 100644 (file)
  * The Iotcon Representation API provides data type of resp_repr handling.\n
  * A resp_repr is a payload of a request or a response.\n
  * It has uri_path, list of resource interfaces, list of resource types and its attributes.\n
- * Attributes have capabilties to store and retrieve integer, boolean, double, string,
+ * Attributes have capabilities to store and retrieve integer, boolean, double, string,
  * byte string, list, null, resp_repr.\n
- * A list is a container that includes number of datas of same type.\n
- * It has capabilties to store and retrieve integer, boolean, double, string, byte string,
+ * A list is a container that includes number of data of same type.\n
+ * It has capabilities to store and retrieve integer, boolean, double, string, byte string,
  * list, null, resp_repr.
  *
  * Example :
@@ -470,19 +470,19 @@ int iotcon_representation_foreach_children(iotcon_representation_h parent,
                iotcon_children_cb cb, void *user_data);
 
 /**
- * @brief Gets the number of children representation in the parent representation.
+ * @brief Gets the number of child representations in the parent representation.
  *
  * @since_tizen 3.0
  *
  * @param[in] parent The parent representation handle
- * @param[out] count The number of children representation
+ * @param[out] count The number of child representations
  *
  * @return 0 on success, otherwise a negative error value.
  * @retval #IOTCON_ERROR_NONE  Successful
  * @retval #IOTCON_ERROR_NOT_SUPPORTED  Not supported
  * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
  */
-int iotcon_representation_get_children_count(iotcon_representation_h parent,
+int iotcon_representation_get_child_count(iotcon_representation_h parent,
                unsigned int *count);
 
 /**
index ba572f5f32a5612763dab8b6e7c48086e3f7b543..616e3436ee0b687c6dfd083641fb193d25c61748 100644 (file)
@@ -471,12 +471,12 @@ int iotcon_resource_notify(iotcon_resource_h resource, iotcon_representation_h r
                iotcon_observers_h observers, iotcon_qos_e qos);
 
 /**
- * @brief Gets the number of children resources of the resource.
+ * @brief Gets the number of child resources of the resource.
  *
  * @since_tizen 3.0
  *
  * @param[in] resource The handle of the resource
- * @param[out] number The number of children resources
+ * @param[out] count The number of child resources
  *
  * @return 0 on success, otherwise a negative error value.
  * @retval #IOTCON_ERROR_NONE  Successful
@@ -489,7 +489,8 @@ int iotcon_resource_notify(iotcon_resource_h resource, iotcon_representation_h r
  * @see iotcon_resource_get_interfaces()
  * @see iotcon_resource_get_properties()
  */
-int iotcon_resource_get_number_of_children(iotcon_resource_h resource, int *number);
+int iotcon_resource_get_child_count(iotcon_resource_h resource,
+               unsigned int *count);
 
 /**
  * @brief Gets the child resource at the given index in the parent resource.
@@ -508,7 +509,7 @@ int iotcon_resource_get_number_of_children(iotcon_resource_h resource, int *numb
  * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
  * @retval #IOTCON_ERROR_NO_DATA No data available
  *
- * @see iotcon_resource_get_number_of_children()
+ * @see iotcon_resource_get_child_count()
  * @see iotcon_resource_get_uri_path()
  * @see iotcon_resource_get_types()
  * @see iotcon_resource_get_interfaces()
@@ -532,7 +533,7 @@ int iotcon_resource_get_nth_child(iotcon_resource_h parent, int index,
  * @retval #IOTCON_ERROR_NOT_SUPPORTED  Not supported
  * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
  *
- * @see iotcon_resource_get_number_of_children()
+ * @see iotcon_resource_get_child_count()
  * @see iotcon_resource_get_nth_child()
  * @see iotcon_resource_get_types()
  * @see iotcon_resource_get_interfaces()
@@ -555,7 +556,7 @@ int iotcon_resource_get_uri_path(iotcon_resource_h resource, char **uri_path);
  * @retval #IOTCON_ERROR_NOT_SUPPORTED  Not supported
  * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
  *
- * @see iotcon_resource_get_number_of_children()
+ * @see iotcon_resource_get_child_count()
  * @see iotcon_resource_get_nth_child()
  * @see iotcon_resource_get_uri_path()
  * @see iotcon_resource_get_interfaces()
@@ -578,7 +579,7 @@ int iotcon_resource_get_types(iotcon_resource_h resource, iotcon_resource_types_
  * @retval #IOTCON_ERROR_NOT_SUPPORTED  Not supported
  * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
  *
- * @see iotcon_resource_get_number_of_children()
+ * @see iotcon_resource_get_child_count()
  * @see iotcon_resource_get_nth_child()
  * @see iotcon_resource_get_uri_path()
  * @see iotcon_resource_get_types()
@@ -602,7 +603,7 @@ int iotcon_resource_get_interfaces(iotcon_resource_h resource,
  * @retval #IOTCON_ERROR_NOT_SUPPORTED  Not supported
  * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
  *
- * @see iotcon_resource_get_number_of_children()
+ * @see iotcon_resource_get_child_count()
  * @see iotcon_resource_get_nth_child()
  * @see iotcon_resource_get_uri_path()
  * @see iotcon_resource_get_types()
index b9dc4b5cb4ad42d612b1906bad935f8cc92bd71c..25e5c6e6c28b9d2f0aa0782db6104fdd0314f07c 100644 (file)
@@ -98,9 +98,9 @@ static void _print_repr(iotcon_representation_h recv_repr)
                        DBG("null value is null");
        }
 
-       ret = iotcon_representation_get_children_count(recv_repr, &children_count);
+       ret = iotcon_representation_get_child_count(recv_repr, &children_count);
        if (IOTCON_ERROR_NONE != ret) {
-               ERR("iotcon_representation_get_children_count() Fail(%d)", ret);
+               ERR("iotcon_representation_get_child_count() Fail(%d)", ret);
                return;
        }