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);
}
-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;
}
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.
*
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.
*
* 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 :
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);
/**
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
* @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.
* @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()
* @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()
* @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()
* @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()
* @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()
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;
}