Iotcon documentation
authorSangkwan Lee <skgood.lee@samsung.com>
Fri, 28 Aug 2015 09:06:05 +0000 (18:06 +0900)
committeryoungman <yman.jung@samsung.com>
Tue, 3 Nov 2015 11:08:20 +0000 (20:08 +0900)
Change-Id: I771f3e0e035f759342666529d4cffb677b9df607
Signed-off-by: Sangkwan Lee <skgood.lee@samsung.com>
13 files changed:
doc/iotcon_doc.h [new file with mode: 0644]
lib/icl-device.c
lib/icl-options.c
lib/icl-presence.c
lib/icl-query.h
lib/icl-resource-types.h
lib/icl-resource.c
lib/icl-resource.h
lib/include/iotcon-constant.h
lib/include/iotcon-errors.h
lib/include/iotcon-representation.h
lib/include/iotcon-struct.h
lib/include/iotcon.h

diff --git a/doc/iotcon_doc.h b/doc/iotcon_doc.h
new file mode 100644 (file)
index 0000000..1e822fd
--- /dev/null
@@ -0,0 +1,554 @@
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TIZEN_NETWORK_IOTCON_DOC_H__
+#define __TIZEN_NETWORK_IOTCON_DOC_H__
+
+/**
+ * @ingroup CAPI_NETWORK_FRAMEWORK
+ * @defgroup CAPI_IOT_CONNECTIVITY_MODULE Iotcon
+ *
+ * @brief The Iotcon API provides functions for IoT connectivity
+ *
+ * @section CAPI_IOT_CONNECTIVITY_MODULE_HEADER Required Header
+ * \#include <iotcon.h>
+ *
+ * @section CAPI_IOT_CONNECTIVITY_MODULE_OVERVIEW Overview
+ * The Iotcon API provides to register resources, discover resources and access them via
+ * RESTful API.\n\n
+ *
+ * @subsection CAPI_IOT_CONNECTIVITY_MODULE_RESOURCE Resource
+ * A Resrouce is a component in a server that can be viewed and conrolled by another client.\n
+ * There are different resource types, for example a temperature sensor, a light controller etc.\n\n
+ *
+ * @subsection CAPI_IOT_CONNECTIVITY_MODULE_RESOURCE_REGISTRATION Resource registration
+ * Registering a resource requires a URI and handler to process requests.\n
+ * The URI path should be rooted. Iotcon will construct the fully qualified URI by adding
+ * the URI authority to the provided URI path.\n
+ * For example, given a service running on port 54321 in a device at IP address 192.168.1.1,
+ * if the application registers a resource with a URI path "/light/1",\n
+ * the resulting fully qualified URI is "oic://192.168.1.1:54321/light/1",
+ * which uniquely identifies the resource's location.\n
+ * Note : Only one resource can be registered at a given URI.
+ *
+ * Example :
+ * @code
+#include <iotcon.h>
+...
+static void _request_handler(iotcon_request_h request, void *user_data)
+{
+       int ret;
+       int types;
+       iotcon_response_h response;
+       iotcon_repr_h resp_repr;
+
+       ret = iotcon_request_get_types(request, &types);
+       if (IOTCON_ERROR_NONE != ret)
+               return;
+
+       if (IOTCON_REQUEST_GET & types) {
+               response = iotcon_response_new(request);
+               if (NULL == response)
+                       return;
+
+               resp_repr = iotcon_repr_new();
+               if (NULL == resp_repr) {
+                       iotcon_response_free(response);
+                       return;
+               }
+
+               ret = iotcon_repr_set_uri_path(resp_repr, "core.door");
+               if (IOTCON_ERROR_NONE != ret) {
+                       iotcon_repr_free(resp_repr);
+                       iotcon_response_free(response);
+                       return;
+               }
+
+               ret = iotcon_repr_set_bool(resp_repr, "opened", true);
+               if (IOTCON_ERROR_NONE != ret) {
+                       iotcon_repr_free(resp_repr);
+                       iotcon_response_free(response);
+                       return;
+               }
+
+               ret = iotcon_response_set(response, IOTCON_RESPONSE_RESULT, IOTCON_RESPONSE_RESULT_OK);
+               if (IOTCON_ERROR_NONE != ret) {
+                       iotcon_repr_free(resp_repr);
+                       iotcon_response_free(response);
+                       return;
+               }
+
+               ret = iotcon_response_set(response, IOTCON_RESPONSE_REPRESENTATION, resp_repr);
+               if (IOTCON_ERROR_NONE != ret) {
+                       iotcon_repr_free(resp_repr);
+                       iotcon_response_free(response);
+                       return;
+               }
+
+               ret = iotcon_response_send(response);
+               if (IOTCON_ERROR_NONE != ret) {
+                       iotcon_repr_free(resp_repr);
+                       iotcon_response_free(response);
+                       return;
+               }
+
+               iotcon_repr_free(resp_repr);
+               iotcon_response_free(response);
+       }
+}
+...
+{
+       int ret;
+       int interfaces = IOTCON_INTERFACE_DEFAULT;
+       int properties = (IOTCON_DISCOVERABLE | IOTCON_OBSERVABLE);
+       const char *uri_path = "/a/door1";
+       const char *type = "core.door";
+
+       iotcon_resource_types_h resource_types = iotcon_resource_types_new();
+       if (NULL == resource_types) {
+               return;
+       }
+
+       ret = iotcon_resource_types_insert(resource_types, type);
+       if (IOTCON_ERROR_NONE != ret) {
+               iotcon_resource_types_free(resource_types);
+               return;
+       }
+
+       iotcon_resource_h handle = iotcon_register_resource(uri_path, resource_types,
+                       interfaces, properties, _request_handler, NULL);
+       if (NULL == handle) {
+               iotcon_resource_types_free(resource_types);
+               return;
+       }
+
+       iotcon_resource_types_free(resource_types);
+}
+ * @endcode
+ *
+ * @subsection CAPI_IOT_CONNECTIVITY_MODULE_FINDING_RESOURCE Finding a resource.
+ * This operation returns all resources of given type on the network service.\n
+ * This operation is sent via multicast to all services.\n
+ * If you specify filter resource type in the query, only exact matches will be responded.
+ *
+ * Example :
+ * @code
+#include <iotcon.h>
+static void _on_get(iotcon_options_h header_options, iotcon_repr_h recv_repr,
+               int response_result, void *user_data)
+{
+       // handle get from response
+}
+...
+static void _found_resource(iotcon_client_h resource, void *user_data)
+{
+       int ret;
+       int resource_interfaces;
+       char *resource_uri_path;
+       char *resource_host;
+       char *resource_sid;
+       iotcon_query_h query;
+       iotcon_resource_types_h resource_types;
+
+       ret = iotcon_client_get_uri_path(resource, &resource_uri_path);
+       if (IOTCON_ERROR_NONE != ret) {
+               return;
+       }
+
+       ret = iotcon_client_get_server_id(resource, &resource_sid);
+       if (IOTCON_ERROR_NONE != ret) {
+               return;
+       }
+
+       ret = iotcon_client_get_host(resource, &resource_host);
+       if (IOTCON_ERROR_NONE != ret) {
+               return;
+       }
+
+       ret = iotcon_client_get_interfaces(resource, &resource_interfaces);
+       if (IOTCON_ERROR_NONE != ret) {
+               return;
+       }
+
+       ret = iotcon_client_get_types(resource, &resource_types);
+       if (IOTCON_ERROR_NONE != ret) {
+               return;
+       }
+
+       query = iotcon_query_new();
+       iotcon_query_insert(query, "key", "value");
+
+       iotcon_get(resource, query, &_on_get, NULL);
+       iotcon_query_free(query);
+}
+...
+{
+       int ret;
+       const char *type = "core.door";
+
+       ret = iotcon_find_resource(IOTCON_MULTICAST_ADDRESS, type, &_found_resource, NULL);
+       if (IOTCON_ERROR_NONE != ret) {
+               return;
+       }
+}
+ * @endcode
+ *
+ * @subsection CAPI_IOT_CONNECTIVITY_MODULE_OBSERVING_RESOURCE Observing resource
+ * This operation fetches and registers as an observer for the value of simple specific resource.\n
+ * An observable resource can handle any number of observers.\n
+ * If the server responds with a success code, the registration is considered successful.\n
+ * Notifications from the server to the client may be confirmable or non-confirmable.\n
+ * If the client returns a RST message, the observation registration should be dropped immediately.\n
+ * If the client fails to acknowledge a number of confirmable requests,
+ * the server should assume that the client has abandoned the observation and drop the registration.\n
+ * If the observed resource is removed, the server sends a NOTFOUND status to all observers.\n
+ * If an observed resource fails to notify a client before the max-age of a resource value update,
+ * the client should attempt to re-register the observation.\n
+ *
+ * Example : Server side
+ * @code
+#include <iotcon.h>
+...
+static iotcon_resource_h door_handle;
+static iotcon_observers_h observers;
+...
+static void _request_handler(iotcon_request_h request, void *user_data)
+{
+       int ret;
+       int types;
+       int observer_id;
+       iotcon_observe_action_e observer_action;
+
+       ret = iotcon_request_get_types(request, &types);
+       if (IOTCON_ERROR_NONE != ret) {
+               return;
+       }
+
+       if (IOTCON_REQUEST_OBSERVE & types) {
+               ret = iotcon_request_get_observer_action(request, &observer_action);
+               if (IOTCON_ERROR_NONE != ret) {
+                       return;
+               }
+
+               if (IOTCON_OBSERVE_REGISTER == observer_action) {
+                       ret = iotcon_request_get_observer_id(request, &observer_id);
+                       if (IOTCON_ERROR_NONE != ret) {
+                               return;
+                       }
+                       observers = iotcon_observers_append(observers, observer_id);
+               } else if (IOTCON_OBSERVE_DEREGISTER == observer_action) {
+                       ret = iotcon_request_get_observer_id(request, &observer_id);
+                       if (IOTCON_ERROR_NONE != ret) {
+                               return;
+                       }
+                       observers = iotcon_observers_remove(observers, observer_id);
+               }
+       }
+}
+...
+{
+       int ret;
+       int interfaces = IOTCON_INTERFACE_DEFAULT;
+       int properties = (IOTCON_DISCOVERABLE | IOTCON_OBSERVABLE);
+       const char *uri_path = "/a/door1";
+       const char *type = "core.door";
+
+       iotcon_resource_types_h resource_types = iotcon_resource_types_new();
+       if (NULL == resource_types) {
+               return;
+       }
+
+       ret = iotcon_resource_types_insert(resource_types, type);
+       if (IOTCON_ERROR_NONE != ret) {
+               iotcon_resource_types_free(resource_types);
+               return;
+       }
+
+       iotcon_resource_h door_handle = iotcon_register_resource(uri_path, resource_types,
+                       interfaces, properties, _request_handler, NULL);
+       if (NULL == door_handle) {
+               iotcon_resource_types_free(resource_types);
+               return;
+       }
+
+       iotcon_resource_types_free(resource_types);
+}
+...
+{
+       iotcon_repr_h repr = iotcon_repr_new();
+       iotcon_notimsg_h msg = iotcon_notimsg_new(repr, IOTCON_INTERFACE_DEFAULT);
+
+       ret = iotcon_notify_list_of_observers(door_handle, msg, observers);
+       if (IOTCON_ERROR_NONE != ret) {
+               iotcon_notimsg_free(msg);
+               iotcon_repr_free(repr);
+               return;
+       }
+
+       iotcon_notimsg_free(msg);
+       iotcon_repr_free(repr);
+}
+ * @endcode
+ *
+ * Example : Client side
+ * @code
+#include <iotcon.h>
+...
+static iotcon_client_h door_resource;
+...
+static void _on_observe(iotcon_options_h header_options, iotcon_repr_h recv_repr,
+               int response_result, int sequence_number, void *user_data)
+{
+}
+...
+{
+       int ret;
+       ret = iotcon_observer_start(door_resource, IOTCON_OBSERVE_ALL, NULL, &_on_observe, NULL);
+
+       if (IOTCON_ERROR_NONE != ret)
+               return;
+}
+ * @endcode
+ *
+ * @subsection CAPI_IOT_CONNECTIVITY_MODULE_SERVER_CLIENT_OPERATIONS Server / client operations
+ * Server operations should be called in server mode.\n
+ * Client operations should be called in client mode.\n
+ * Both mode can call both operations.
+ * <div><table class="doxtable">
+ *     <tr>
+ *         <td><b>Server</b></td>
+ *         <td><b>Client</b></td>
+ *     </tr>
+ *     <tr>
+ *         <td>iotcon_register_resource</td>
+ *         <td>iotcon_get_device_info</td>
+ *     </tr>
+ *     <tr>
+ *         <td>iotcon_unregister_resource</td>
+ *         <td>iotcon_subscribe_presence</td>
+ *     </tr>
+ *     <tr>
+ *         <td>iotcon_bind_interface</td>
+ *         <td>iotcon_unsubscribe_presence</td>
+ *     </tr>
+ *     <tr>
+ *         <td>iotcon_bind_type</td>
+ *         <td>iotcon_find_resource</td>
+ *     </tr>
+ *     <tr>
+ *         <td>iotcon_bind_request_handler</td>
+ *         <td>iotcon_observer_start</td>
+ *     </tr>
+ *     <tr>
+ *         <td>iotcon_bind_resource</td>
+ *         <td>iotcon_observer_stop</td>
+ *     </tr>
+ *     <tr>
+ *         <td>iotcon_unbind_resource</td>
+ *         <td>iotcon_get</td>
+ *     </tr>
+ *     <tr>
+ *         <td>iotcon_register_device_info</td>
+ *         <td>iotcon_put</td>
+ *     </tr>
+ *     <tr>
+ *         <td>iotcon_start_presence</td>
+ *         <td>iotcon_post</td>
+ *     </tr>
+ *     <tr>
+ *         <td>iotcon_stop_presence</td>
+ *         <td>iotcon_delete</td>
+ *     </tr>
+ *     <tr>
+ *         <td>iotcon_response_send</td>
+ *         <td></td>
+ *     </tr>
+ *     <tr>
+ *         <td>iotcon_notify_list_of_observers</td>
+ *         <td></td>
+ *     </tr>
+ *     <tr>
+ *         <td>iotcon_notify_all</td>
+ *         <td></td>
+ *     </tr>
+ *     <tr>
+ *         <td>iotcon_register_device_info</td>
+ *         <td></td>
+ *     </tr>
+ * </table></div>
+ *
+ */
+
+/**
+ * @ingroup CAPI_IOT_CONNECTIVITY_MODULE
+ * @defgroup CAPI_IOT_CONNECTIVITY_REPRESENTATION_MODULE Iotcon Representation
+ *
+ * @section CAPI_IOT_CONNECTIVITY_REPRESENTATION_MODULE_HEADER Required Header
+ * \#include <iotcon-representation.h>
+ *
+ * @section CAPI_IOT_CONNECTIVITY_REPRESENTATION_MODULE_OVERVIEW Overview
+ * The Iotcon Representation API provides data type of representation handling.\n
+ * A representation is a payload of a request or a response.\n
+ * It has uri_path, interface, list of resource types and its attributes.\n
+ * Attributes have capabilties to store and retrieve integer, boolean, double, string, list, null,
+ * representation.\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, list, null, representation.
+ *
+ *@code
+#include <iotcon.h>
+...
+{
+       int ret;
+       iotcon_repr_h repr;
+       iotcon_resource_types_h types;
+       iotcon_list_h bright_step_list;
+
+       repr = iotcon_repr_new();
+       if (NULL == repr)
+               return;
+
+       ret = iotcon_repr_set_uri_path(repr, "/a/light");
+       if (IOTCON_ERROR_NONE != ret) {
+               iotcon_repr_free(repr);
+               return;
+       }
+
+       types = iotcon_resource_types_new();
+       if (NULL == types) {
+               iotcon_repr_free(repr);
+               return;
+       }
+
+       ret = iotcon_resource_types_insert(types, "core.light");
+       if (IOTCON_ERROR_NONE != ret) {
+               iotcon_resource_types_free(types);
+               iotcon_repr_free(repr);
+               return;
+       }
+
+       ret = iotcon_repr_set_resource_types(repr, types);
+       if (IOTCON_ERROR_NONE != ret) {
+               iotcon_resource_types_free(types);
+               iotcon_repr_free(repr);
+               return;
+       }
+
+       ret = iotcon_repr_set_resource_interfaces(repr, IOTCON_INTERFACE_LINK);
+       if (IOTCON_ERROR_NONE != ret) {
+               iotcon_resource_types_free(types);
+               iotcon_repr_free(repr);
+               return;
+       }
+
+       ret = iotcon_repr_set_str(repr, "type", "lamp");
+       if (IOTCON_ERROR_NONE != ret) {
+               iotcon_resource_types_free(types);
+               iotcon_repr_free(repr);
+               return;
+       }
+
+       ret = iotcon_repr_set_str(repr, "where", "desk");
+       if (IOTCON_ERROR_NONE != ret) {
+               iotcon_resource_types_free(types);
+               iotcon_repr_free(repr);
+               return;
+       }
+
+       ret = iotcon_repr_set_double(repr, "default_bright", 200.0);
+       if (IOTCON_ERROR_NONE != ret) {
+               iotcon_resource_types_free(types);
+               iotcon_repr_free(repr);
+               return;
+       }
+
+       ret = iotcon_repr_set_str(repr, "unit", "lux");
+       if (IOTCON_ERROR_NONE != ret) {
+               iotcon_resource_types_free(types);
+               iotcon_repr_free(repr);
+               return;
+       }
+
+       ret = iotcon_repr_set_bool(repr, "bright_step", true);
+       if (IOTCON_ERROR_NONE != ret) {
+               iotcon_resource_types_free(types);
+               iotcon_repr_free(repr);
+               return;
+       }
+
+       bright_step_list = iotcon_list_new(IOTCON_TYPE_DOUBLE);
+       if (NULL == bright_step_list) {
+               iotcon_resource_types_free(types);
+               iotcon_repr_free(repr);
+               return;
+       }
+
+       ret = iotcon_list_insert_double(bright_step_list, 100.0, -1);
+       if (IOTCON_ERROR_NONE != ret) {
+               iotcon_list_free(bright_step_list);
+               iotcon_resource_types_free(types);
+               iotcon_repr_free(repr);
+               return;
+       }
+
+       ret = iotcon_list_insert_double(bright_step_list, 200.0, -1);
+       if (IOTCON_ERROR_NONE != ret) {
+               iotcon_list_free(bright_step_list);
+               iotcon_resource_types_free(types);
+               iotcon_repr_free(repr);
+               return;
+       }
+
+       ret = iotcon_list_insert_double(bright_step_list, 300.0, -1);
+       if (IOTCON_ERROR_NONE != ret) {
+               iotcon_list_free(bright_step_list);
+               iotcon_resource_types_free(types);
+               iotcon_repr_free(repr);
+               return;
+       }
+
+       ret = iotcon_list_insert_double(bright_step_list, 400.0, -1);
+       if (IOTCON_ERROR_NONE != ret) {
+               iotcon_list_free(bright_step_list);
+               iotcon_resource_types_free(types);
+               iotcon_repr_free(repr);
+               return;
+       }
+
+       ret = iotcon_list_insert_double(bright_step_list, 500.0, -1);
+       if (IOTCON_ERROR_NONE != ret) {
+               iotcon_list_free(bright_step_list);
+               iotcon_resource_types_free(types);
+               iotcon_repr_free(repr);
+               return;
+       }
+
+       ret = iotcon_repr_set_list(repr, "bright_step_list", bright_step_list);
+       if (IOTCON_ERROR_NONE != ret) {
+               iotcon_list_free(bright_step_list);
+               iotcon_resource_types_free(types);
+               iotcon_repr_free(repr);
+               return;
+       }
+
+       iotcon_list_free(bright_step_list);
+       iotcon_resource_types_free(types);
+       iotcon_repr_free(repr);
+}
+ * @endcode
+ */
+
+#endif /* __TIZEN_NETWORK_IOTCON_DOC_H__ */
index 3c1697d..3028be3 100644 (file)
 #include "icl-dbus.h"
 #include "icl-dbus-type.h"
 
+/**
+ * @brief The maximum length which can be held in a manufacturer name.
+ *
+ * @since_tizen 3.0
+ */
+#define IOTCON_MANUFACTURER_NAME_LENGTH_MAX 15
+
+/**
+ * @brief The maximum length which can be held in a manufacturer url.
+ *
+ * @since_tizen 3.0
+ */
+#define IOTCON_MANUFACTURER_URL_LENGTH_MAX 32
+
+
 typedef struct {
        iotcon_device_info_cb cb;
        void *user_data;
index 64ea20f..19044ba 100644 (file)
 #include "icl.h"
 #include "icl-options.h"
 
+/**
+ * @brief HeaderOption range from 2048 to 3000
+ * NOTE: HeaderOptionID  is an unsigned integer value which MUST be within
+ * range of 2048 to 3000 inclusive of lower and upper bound.
+ * HeaderOptions instance creation fails if above condition is not satisfied.
+ *
+ * @since_tizen 3.0
+ */
+#define IOTCON_OPTIONID_MIN 2048
+
+/**
+ * @brief The maximum value of option id which can be held in a resource.
+ *
+ * @since_tizen 3.0
+ */
+#define IOTCON_OPTIONID_MAX 3000
+
+/**
+ * @brief The maximum number of option which can be held in a resource.
+ *
+ * @since_tizen 3.0
+ */
+#define IOTCON_OPTIONS_MAX 2
+
+/**
+ * @brief The maximum length of option data which can be held in a resource.
+ *
+ * @since_tizen 3.0
+ */
+#define IOTCON_OPTION_DATA_LENGTH_MAX 16
+
+
 iotcon_options_h icl_options_ref(iotcon_options_h options)
 {
        RETV_IF(NULL == options, NULL);
index 22d70c8..ffa2565 100644 (file)
@@ -23,6 +23,7 @@
 #include "iotcon.h"
 #include "ic-utils.h"
 #include "icl.h"
+#include "icl-resource-types.h"
 #include "icl-dbus.h"
 
 typedef struct icl_presence {
index 09324d8..a2d0481 100644 (file)
 
 #include "iotcon-struct.h"
 
+/**
+ * @brief The maximum length which can be held in a query.
+ *
+ * @since_tizen 3.0
+ */
+#define IOTCON_QUERY_LENGTH_MAX 64
+
+
 struct icl_query {
        int len;
        GHashTable *hash;
index 80b59f2..2ee7777 100644 (file)
 #define __IOT_CONNECTIVITY_MANAGER_LIBRARY_RESOURCE_TYPES_H__
 
 #include "iotcon-struct.h"
+#include "icl-query.h"
+
+/**
+ * @brief The maximum length which can be held in a resource type.
+ *
+ * @since_tizen 3.0
+ */
+#define IOTCON_RESOURCE_TYPE_LENGTH_MAX (IOTCON_QUERY_LENGTH_MAX - 3)
+
 
 struct icl_resource_types {
        int ref_count;
index 416fff5..27843a6 100644 (file)
 #include "icl.h"
 #include "icl-payload.h"
 
+/**
+ * @brief The maximum length of uri_path path which can be held in a resource.
+ *
+ * @since_tizen 3.0
+ */
+#define IOTCON_URI_PATH_LENGTH_MAX 36
+
+
 static void _icl_request_handler(GDBusConnection *connection,
                const gchar *sender_name,
                const gchar *object_path,
index 149ed6e..432bc89 100644 (file)
 #include "iotcon.h"
 #include "icl-dbus.h"
 
+/**
+ * @brief The maximum number of children resources which can be held in a parent resource.
+ *
+ * @since_tizen 3.0
+ */
+#define IOTCON_CONTAINED_RESOURCES_MAX 5
+
+
 struct icl_notify_msg {
        int error_code;
        iotcon_interface_e iface;
index dc949ba..ad5c052 100644 (file)
 #ifndef __IOT_CONNECTIVITY_MANAGER_CONSTANT_H__
 #define __IOT_CONNECTIVITY_MANAGER_CONSTANT_H__
 
-#define IOTCON_MULTICAST_ADDRESS "224.0.1.187" /**< Multicast IP Address */
-
 /**
- * @brief HeaderOption range from 2048 to 3000
- * NOTE: HeaderOptionID  is an unsigned integer value which MUST be within
- * range of 2048 to 3000 inclusive of lower and upper bound.
- * HeaderOptions instance creation fails if above condition is not satisfied.
+ * @addtogroup CAPI_IOT_CONNECTIVITY_MODULE
+ *
+ * @{
  */
-#define IOTCON_OPTIONID_MIN 2048
-#define IOTCON_OPTIONID_MAX 3000
-
-#define IOTCON_OPTIONS_MAX 2
-#define IOTCON_OPTION_DATA_LENGTH_MAX 16
-
-#define IOTCON_URI_PATH_LENGTH_MAX 36
-
-#define IOTCON_QUERY_LENGTH_MAX 64
-
-/* IOTCON_QUERY_LENGTH_MAX - LENGTH("rt=") */
-#define IOTCON_RESOURCE_TYPE_LENGTH_MAX (IOTCON_QUERY_LENGTH_MAX - 3)
-
-#define IOTCON_MANUFACTURER_NAME_LENGTH_MAX 15
-#define IOTCON_MANUFACTURER_URL_LENGTH_MAX 32
 
-#define IOTCON_CONTAINED_RESOURCES_MAX 5
+/**
+ * @brief The IP Address for multicast.
+ *
+ * @since_tizen 3.0
+ */
+#define IOTCON_MULTICAST_ADDRESS "224.0.1.187" /**< Multicast IP Address */
 
+/**
+ * @brief Use this value as the return value to stop foreach function.
+ *
+ * @since_tizen 3.0
+ */
 #define IOTCON_FUNC_STOP 0
-#define IOTCON_FUNC_CONTINUE 1
-
-#define IOTCON_PLATFORM_PLATFORM_ID "pi"
-#define IOTCON_PLATFORM_MFG_NAME "mnmn"
-#define IOTCON_PLATFORM_MFG_URL "mnml"
-#define IOTCON_PLATFORM_MODEL_NUM "mnmo"
-#define IOTCON_PLATFORM_MFG_DATE "mndt"
-#define IOTCON_PLATFORM_PLATFORM_VERSION "mnpv"
-#define IOTCON_PLATFORM_OS_VERSION "mnos"
-#define IOTCON_PLATFORM_HARDWARE_VERSION "mnhw"
-#define IOTCON_PLATFORM_FIRMWARE_VERSION "mnfv"
-#define IOTCON_PLATFORM_SUPPORT_URL "mnsl"
-#define IOTCON_PLATFORM_SYSTEM_TIME "st"
 
+/**
+ * @brief Use this value as the return value to continue foreach function.
+ *
+ * @since_tizen 3.0
+ */
+#define IOTCON_FUNC_CONTINUE 1
 
 /**
- * @brief Action associated with observation
+ * @brief Enumeration for action of observation.
+ *
+ * @since_tizen 3.0
  */
 typedef enum {
-       IOTCON_OBSERVE_REGISTER = 0,
-       IOTCON_OBSERVE_DEREGISTER = 1,
-       IOTCON_OBSERVE_NO_OPTION = 2
+       IOTCON_OBSERVE_REGISTER = 0, /**< Indicates action of registering observation*/
+       IOTCON_OBSERVE_DEREGISTER = 1, /**< Indicates action of unregistering observation */
+       IOTCON_OBSERVE_NO_OPTION = 2 /**< Indicates no option */
 } iotcon_observe_action_e;
 
+/**
+ * @brief Enumeration for type of observation.
+ *
+ * @since_tizen 3.0
+ */
 typedef enum {
-       IOTCON_OBSERVE = 0,
-       IOTCON_OBSERVE_ALL = 1
+       IOTCON_OBSERVE = 0, /**< Indicates observation request for most up-to-date notifications only */
+       IOTCON_OBSERVE_ALL = 1 /**< Indicates observation request for all notifications including stale notifications */
 } iotcon_observe_type_e;
 
 /**
- * @ingroup CAPI_IOT_CONNECTIVITY_MODULE
- * @brief Enumerations of Iotcon interface types.
+ * @brief Enumeration for type of interfaces which can be held in a resource.
+ *
  * @since_tizen 3.0
  */
 typedef enum {
-       IOTCON_INTERFACE_NONE = 0,
-       IOTCON_INTERFACE_DEFAULT = (1 << 0), /* default interface */
-       IOTCON_INTERFACE_LINK = (1 << 1), /* discovers children of the parent resource */
-       IOTCON_INTERFACE_BATCH = (1 << 2), /* requests CRUD to children of the parent resource */
-       IOTCON_INTERFACE_GROUP = (1 << 3), /* requests CRUD to remote resources of a group */
+       IOTCON_INTERFACE_NONE = 0, /**< Indicates interface not specified or uninitialized */
+       IOTCON_INTERFACE_DEFAULT = (1 << 0), /**< Indicates interface for default */
+       IOTCON_INTERFACE_LINK = (1 << 1), /**< Indicates interface which is used to retrieve (GET) a list of resources on a server */
+       IOTCON_INTERFACE_BATCH = (1 << 2), /**< Indicates interface which is used to to manipulate (GET, PUT, POST, DELETE) a collection of sub-resources at the same time */
+       IOTCON_INTERFACE_GROUP = (1 << 3), /**< Indicates interface which is used to to manipulate (GET, PUT, POST) a group of remote resources */
 } iotcon_interface_e;
 
 /**
- * @ingroup CAPI_IOT_CONNECTIVITY_MODULE
- * @brief Enumerations of Iotcon connectivity types.
+ * @brief Enumeration for of connectivities which can be held in a resource.
+ *
  * @since_tizen 3.0
  */
 typedef enum {
-       IOTCON_CONNECTIVITY_IPV4 = 0,
-       IOTCON_CONNECTIVITY_IPV6,
-       IOTCON_CONNECTIVITY_EDR,
-       IOTCON_CONNECTIVITY_LE,
-       IOTCON_CONNECTIVITY_ALL, /* sends over all the interfaces */
+       IOTCON_CONNECTIVITY_IPV4 = 0, /**< Indicates Internet Protocol version 4 connectivity */
+       IOTCON_CONNECTIVITY_IPV6, /**< Indicates Internet Protocol version 6 connectivity */
+       IOTCON_CONNECTIVITY_EDR, /**< Indicates Bluetooth Enhanced Data Rate connectivity */
+       IOTCON_CONNECTIVITY_LE, /**< Indicates Bluetooth Low Energy connectivity */
+       IOTCON_CONNECTIVITY_ALL, /**< Indicates all (IPV4 + IPV6 + EDR + LE) connectivities */
 } iotcon_connectivity_type_e;
 
+/**
+ * @brief Enumeration for property which can be held in a resource.
+ *
+ * @since_tizen 3.0
+ */
 typedef enum {
-       IOTCON_HIDDEN = 0,
-       IOTCON_DISCOVERABLE = (1 << 0),
-       IOTCON_OBSERVABLE = (1 << 1),
-       IOTCON_ACTIVE = (1 << 2),
-       IOTCON_SLOW = (1 << 3),
-       IOTCON_SECURE = (1 << 4),
+       IOTCON_HIDDEN = 0, /**< Indicates resource uninitialized */
+       IOTCON_DISCOVERABLE = (1 << 0), /**< Indicates resource that is allowed to be discovered */
+       IOTCON_OBSERVABLE = (1 << 1), /**< Indicates resource that is allowed to be observed */
+       IOTCON_ACTIVE = (1 << 2), /**< Indicates resource initialized and activated */
+       IOTCON_SLOW = (1 << 3), /**< Indicates resource which takes some delay to respond */
+       IOTCON_SECURE = (1 << 4), /**< Indicates secure resource */
 } iotcon_resource_property_e;
 
+/**
+ * @brief Enumeration for property which can be held in a response.
+ *
+ * @since_tizen 3.0
+ */
 typedef enum {
-       IOTCON_RESPONSE_NEW_URI_PATH = 1,
-       IOTCON_RESPONSE_RESULT = 2,
-       IOTCON_RESPONSE_REPRESENTATION = 3,
-       IOTCON_RESPONSE_HEADER_OPTIONS = 4,
-       IOTCON_RESPONSE_INTERFACE = 5,
+       IOTCON_RESPONSE_NEW_URI_PATH = 1, /**< Indicates uri_path which can be held in a response */
+       IOTCON_RESPONSE_RESULT = 2, /**< Indicates result which can be held in a response */
+       IOTCON_RESPONSE_REPRESENTATION = 3, /**< Indicates representation which can be held in a response */
+       IOTCON_RESPONSE_HEADER_OPTIONS = 4, /**< Indicates header options which can be held in a response */
+       IOTCON_RESPONSE_INTERFACE = 5, /**< Indicates interface which can be held in a response */
 } iotcon_response_property_e;
 
+/**
+ * @brief Enumeration for type of request.
+ *
+ * @since_tizen 3.0
+ */
 typedef enum {
-       IOTCON_REQUEST_GET = (1 << 0),
-       IOTCON_REQUEST_PUT = (1 << 1),
-       IOTCON_REQUEST_POST = (1 << 2),
-       IOTCON_REQUEST_DELETE = (1 << 3),
-       IOTCON_REQUEST_OBSERVE = (1 << 4),
+       IOTCON_REQUEST_GET = (1 << 0), /**< Indicates get method of request */
+       IOTCON_REQUEST_PUT = (1 << 1), /**< Indicates put method of request */
+       IOTCON_REQUEST_POST = (1 << 2), /**< Indicates post method of request */
+       IOTCON_REQUEST_DELETE = (1 << 3), /**< Indicates delete method of request */
+       IOTCON_REQUEST_OBSERVE = (1 << 4), /**< Indicates observe method of request */
 } iotcon_request_type_e;
 
+/**
+ * @brief Enumeration for result of response.
+ *
+ * @since_tizen 3.0
+ */
 typedef enum {
-       IOTCON_RESPONSE_RESULT_OK = 0,
-       IOTCON_RESPONSE_RESULT_ERROR,
-       IOTCON_RESPONSE_RESULT_RESOURCE_CREATED,
-       IOTCON_RESPONSE_RESULT_RESOURCE_DELETED,
-       IOTCON_RESPONSE_RESULT_SLOW,
-       IOTCON_RESPONSE_RESULT_FORBIDDEN,
+       IOTCON_RESPONSE_RESULT_OK = 0, /**< Indicates result of response for success */
+       IOTCON_RESPONSE_RESULT_ERROR, /**< Indicates result of response for something error */
+       IOTCON_RESPONSE_RESULT_RESOURCE_CREATED, /**< Indicates result of response for resource has created */
+       IOTCON_RESPONSE_RESULT_RESOURCE_DELETED, /**< Indicates result of response for resource has deleted */
+       IOTCON_RESPONSE_RESULT_SLOW, /**< Indicates result of response for slow resource */
+       IOTCON_RESPONSE_RESULT_FORBIDDEN, /**< Indicates result of response for accessing unauthorized resource */
        IOTCON_RESPONSE_RESULT_MAX
 } iotcon_response_result_e;
 
+/**
+ * @brief Enumeration for result of presence.
+ *
+ * @since_tizen 3.0
+ */
 typedef enum {
-       IOTCON_PRESENCE_OK = 0,
-       IOTCON_PRESENCE_STOPPED,
-       IOTCON_PRESENCE_TIMEOUT,
-       IOTCON_PRESENCE_ERROR
+       IOTCON_PRESENCE_OK = 0, /**< Indicates for successful action of presence */
+       IOTCON_PRESENCE_STOPPED, /**< Indicates for stopped action of presence */
+       IOTCON_PRESENCE_TIMEOUT, /**< Indicates for no response of presence for some time */
+       IOTCON_PRESENCE_ERROR /**< Indicates for some errors of presence */
 } iotcon_presence_result_e;
 
+/**
+ * @brief Enumeration for types of representation that is able to have.
+ *
+ * @since_tizen 3.0
+ */
 typedef enum {
-       IOTCON_TYPE_NONE = 0,
-       IOTCON_TYPE_INT,
-       IOTCON_TYPE_BOOL,
-       IOTCON_TYPE_DOUBLE,
-       IOTCON_TYPE_STR,
-       IOTCON_TYPE_NULL,
-       IOTCON_TYPE_LIST,
-       IOTCON_TYPE_REPR,
+       IOTCON_TYPE_NONE = 0, /**< Indicates for representation that have no type */
+       IOTCON_TYPE_INT, /**< Indicates for representation that have int type */
+       IOTCON_TYPE_BOOL, /**< Indicates for representation that have bool type */
+       IOTCON_TYPE_DOUBLE, /**< Indicates for representation that have double type */
+       IOTCON_TYPE_STR, /**< Indicates for representation that have string type */
+       IOTCON_TYPE_NULL, /**< Indicates for representation that have null type */
+       IOTCON_TYPE_LIST, /**< Indicates for representation that have list type */
+       IOTCON_TYPE_REPR, /**< Indicates for representation that have another representation type */
 } iotcon_types_e;
 
+/**
+ * @}
+ */
+
 #endif /* __IOT_CONNECTIVITY_MANAGER_CONSTANT_H__ */
index e1446d8..2591b8e 100644 (file)
 
 #include <tizen.h>
 
-/**
- * @ingroup CAPI_IOT_CONNECTIVITY_MODULE
- * @brief Enumerations of Iotcon error codes.
- * @since_tizen 3.0
- */
-
 #ifndef TIZEN_ERROR_IOTCON
 #define TIZEN_ERROR_IOTCON -0x09000000
 #endif
 
+/**
+ * @ingroup CAPI_IOT_CONNECTIVITY_MODULE
+ * @brief Enumeration for Iotcon error code.
+ * @since_tizen 3.0
+ */
 typedef enum
 {
        IOTCON_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful*/
index f999c92..bf04000 100644 (file)
 #include <iotcon-constant.h>
 #include <iotcon-struct.h>
 
+/**
+ *
+ * @addtogroup CAPI_IOT_CONNECTIVITY_REPRESENTATION_MODULE
+ *
+ * @{
+ */
+
+/**
+ * @brief Creates a new representation handle.
+ *
+ * @since_tizen 3.0
+ *
+ * @return A newly allocated representation handle, otherwise NULL on failure.
+ * @retval iotcon_repr_h Success
+ * @retval NULL Failure
+ *
+ * @see iotcon_repr_free()
+ */
 iotcon_repr_h iotcon_repr_new();
+
+/**
+ * @brief Frees a representation.
+ * @details Releases a @a repr and its internal data.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] repr The representation handle to free
+ *
+ * @return void
+ *
+ * @see iotcon_repr_new()
+ */
 void iotcon_repr_free(iotcon_repr_h repr);
+
+/**
+ * @brief Clones from the source representation.
+ * @details Makes a deep copy of a source representation.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] src Source of representation to be copied
+ *
+ * @return Clone of a source representation, otherwise NULL on failure
+ * @retval iotcon_repr_h Success
+ * @retval NULL Failure
+ */
 iotcon_repr_h iotcon_repr_clone(const iotcon_repr_h src);
 
 /**
  * @ingroup CAPI_IOT_CONNECTIVITY_MODULE
  * @brief Appends resource type name.
+ *
  * @since_tizen 3.0
- * @remarks Stored string is replaced with @a uri_path. If @a uri_path is NULL, stored string is set
- * by NULL.
+ * @remarks Stored string is replaced with @a uri_path. If @a uri_path is NULL, stored string
+ * is set by NULL.
  *
  * @param[in] repr The handle to the Representation
  * @param[in] uri_path The URI of resource
@@ -40,11 +85,25 @@ iotcon_repr_h iotcon_repr_clone(const iotcon_repr_h src);
  * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
  */
 int iotcon_repr_set_uri_path(iotcon_repr_h repr, const char *uri_path);
+
+/**
+ * @brief Gets an URI path from the representation.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] repr The representation handle
+ * @param[out] uri_path The URI path to get
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ */
 int iotcon_repr_get_uri_path(iotcon_repr_h repr, const char **uri_path);
 
 /**
  * @ingroup CAPI_IOT_CONNECTIVITY_MODULE
  * @brief Sets resource type list to the Representation.
+ *
  * @since_tizen 3.0
  * @remarks Stored list is replaced with @a types. If @a types is NULL, stored list is set
  * by NULL.
@@ -56,19 +115,60 @@ int iotcon_repr_get_uri_path(iotcon_repr_h repr, const char **uri_path);
  * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
  */
 int iotcon_repr_set_resource_types(iotcon_repr_h repr, iotcon_resource_types_h types);
+
+/**
+ * @brief Gets list of resource type from the representation.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] repr The representation handle
+ * @param[out] types The list of resource types to get
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ */
 int iotcon_repr_get_resource_types(iotcon_repr_h repr, iotcon_resource_types_h *types);
 
+/**
+ * @brief Sets interfaces to the representation.
+ * @details If you set new interfaces, current interfaces value will be replaced with @a ifaces.\n
+ * @a ifaces can be consist of multiple interface like
+ * IOTCON_INTERFACE_LINK | IOTCON_INTERFACE_BATCH.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] repr The representation handle
+ * @param[in] ifaces The interfaces to set
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ */
 int iotcon_repr_set_resource_interfaces(iotcon_repr_h repr, int ifaces);
+
+/**
+ * @brief Gets resource interfaces from the representation.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] repr The representation handle
+ *
+ * @return Interfaces to get. Interfaces may contain multiple interfaces.
+ * @retval #IOTCON_INTERFACE_NONE  Not set
+ * @retval Bitwise OR value which consists of iotcon_interface_e items
+ */
 int iotcon_repr_get_resource_interfaces(iotcon_repr_h repr);
 
 /**
- * @ingroup CAPI_IOT_CONNECTIVITY_MODULE
- * @brief Sets int value.
+ * @brief Sets a new key and integer value into the representation.
+ * @details If @a key is already exists, current value will be replaced with new @a val.
+ *
  * @since_tizen 3.0
- * @remarks Stored value is replaced with @a val.
  *
- * @param[in] repr The handle to the Representation
- * @param[in] type The resource type
+ * @param[in] repr The representation handle
+ * @param[in] key The key
+ * @param[in] val The value
  *
  * @return 0 on success, otherwise a negative error value.
  * @retval #IOTCON_ERROR_NONE  Successful
@@ -76,94 +176,1100 @@ int iotcon_repr_get_resource_interfaces(iotcon_repr_h repr);
  * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
  */
 int iotcon_repr_set_int(iotcon_repr_h repr, const char *key, int val);
+
+/**
+ * @brief Sets a new key and boolean value into the representation.
+ * @details If @a key is already exists, current value will be replaced with new @a val.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] repr The representation handle
+ * @param[in] key The key
+ * @param[in] val The value
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_OUT_OF_MEMORY  Out of memory
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ */
 int iotcon_repr_set_bool(iotcon_repr_h repr, const char *key, bool val);
+
+/**
+ * @brief Sets a new key and double value into the representation.
+ * @details If @a key is already exists, current value will be replaced with new @a val.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] repr The representation handle
+ * @param[in] key The key
+ * @param[in] val The value
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_OUT_OF_MEMORY  Out of memory
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ */
 int iotcon_repr_set_double(iotcon_repr_h repr, const char *key, double val);
+
+/**
+ * @brief Sets a new key and string value into the representation.
+ * @details If @a key is already exists, current value will be replaced with new @a val.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] repr The representation handle
+ * @param[in] key The key
+ * @param[in] val The value
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_OUT_OF_MEMORY  Out of memory
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ */
 int iotcon_repr_set_str(iotcon_repr_h repr, const char *key, char *val);
+
+/**
+ * @brief Sets a new key and iotcon_list_h into the representation.
+ * @details If @a key is already exists, current list will be replaced with new @a list.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] repr The representation handle
+ * @param[in] key The key
+ * @param[in] list The value
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_OUT_OF_MEMORY  Out of memory
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ */
 int iotcon_repr_set_list(iotcon_repr_h repr, const char *key, iotcon_list_h list);
+
+/**
+ * @brief Sets a new key and iotcon_repr_h into the representation.
+ * @details If @a key is already exists, current reprsentation will be replaced with new @a src.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] dest The representation handle
+ * @param[in] key The key
+ * @param[in] src The representation handle to set newly
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_OUT_OF_MEMORY  Out of memory
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ */
 int iotcon_repr_set_repr(iotcon_repr_h dest, const char *key, iotcon_repr_h src);
+
+/**
+ * @brief Sets a new key with NULL value into the representation.
+ * @details If @a key is already exists, current value will be replaced with NULL
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] repr The representation handle
+ * @param[in] key The key to be set NULL
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_OUT_OF_MEMORY  Out of memory
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ */
 int iotcon_repr_set_null(iotcon_repr_h repr, const char *key);
 
+/**
+ * @brief Gets the integer value from the given key.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] repr The representation handle
+ * @param[in] key The key
+ * @param[out] val The integer value
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_NO_DATA  No data available
+ * @retval #IOTCON_ERROR_INVALID_TYPE  Invalid type
+ */
 int iotcon_repr_get_int(iotcon_repr_h repr, const char *key, int *val);
+
+/**
+ * @brief Gets the boolean value from the given key.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] repr The representation handle
+ * @param[in] key The key
+ * @param[out] val The boolean value
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_NO_DATA  No data available
+ * @retval #IOTCON_ERROR_INVALID_TYPE  Invalid type
+ */
 int iotcon_repr_get_bool(iotcon_repr_h repr, const char *key, bool *val);
+
+/**
+ * @brief Gets the double value from the given key.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] repr The representation handle
+ * @param[in] key The key
+ * @param[out] val The double value
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_NO_DATA  No data available
+ * @retval #IOTCON_ERROR_INVALID_TYPE  Invalid type
+ */
 int iotcon_repr_get_double(iotcon_repr_h repr, const char *key, double *val);
+
+/**
+ * @brief Gets the string value from the given key.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] repr The representation handle
+ * @param[in] key The key
+ * @param[out] val The string value
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_NO_DATA  No data available
+ * @retval #IOTCON_ERROR_INVALID_TYPE  Invalid type
+ */
 int iotcon_repr_get_str(iotcon_repr_h repr, const char *key, char **val);
+
+/**
+ * @brief Gets the list value from the given key.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] repr The representation handle
+ * @param[in] key The key
+ * @param[out] list The list value
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_NO_DATA  No data available
+ * @retval #IOTCON_ERROR_INVALID_TYPE  Invalid type
+ */
 int iotcon_repr_get_list(iotcon_repr_h repr, const char *key, iotcon_list_h *list);
+
+/**
+ * @brief Gets the representation value from the given key.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] src The representation handle
+ * @param[in] key The key
+ * @param[out] dest The representation value at the key
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_NO_DATA  No data available
+ * @retval #IOTCON_ERROR_INVALID_TYPE  Invalid type
+ */
 int iotcon_repr_get_repr(iotcon_repr_h src, const char *key, iotcon_repr_h *dest);
+
+/**
+ * @brief Checks whether the value of given key is NULL or not.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] repr The representation handle
+ * @param[in] key The key
+ *
+ * @return true if the type of the given key is null, otherwise false.
+ */
 bool iotcon_repr_is_null(iotcon_repr_h repr, const char *key);
 
+/**
+ * @brief Deletes the key and its associated integer value from the representation.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] repr The representation handle
+ * @param[in] key The key
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_NO_DATA  No data available
+ * @retval #IOTCON_ERROR_INVALID_TYPE  Invalid type
+ */
 int iotcon_repr_del_int(iotcon_repr_h repr, const char *key);
-int iotcon_repr_del_bool(iotcon_repr_h repr, const char *key);
-int iotcon_repr_del_double(iotcon_repr_h repr, const char *key);
-int iotcon_repr_del_str(iotcon_repr_h repr, const char *key);
-int iotcon_repr_del_list(iotcon_repr_h repr, const char *key);
-int iotcon_repr_del_repr(iotcon_repr_h repr, const char *key);
-int iotcon_repr_del_null(iotcon_repr_h repr, const char *key);
-
-int iotcon_repr_get_type(iotcon_repr_h repr, const char *key, int *type);
-
-int iotcon_repr_append_child(iotcon_repr_h parent, iotcon_repr_h child);
-typedef bool (*iotcon_children_fn)(iotcon_repr_h child, void *user_data);
-int iotcon_repr_foreach_children(iotcon_repr_h parent, iotcon_children_fn fn,
-               void *user_data);
-unsigned int iotcon_repr_get_children_count(iotcon_repr_h parent);
-int iotcon_repr_get_nth_child(iotcon_repr_h parent, int pos, iotcon_repr_h *child);
 
-typedef int (*iotcon_repr_fn)(iotcon_repr_h repr, const char *key, void *user_data);
-int iotcon_repr_foreach(iotcon_repr_h repr, iotcon_repr_fn fn, void *user_data);
-unsigned int iotcon_repr_get_keys_count(iotcon_repr_h repr);
-
-iotcon_list_h iotcon_list_new(iotcon_types_e type);
-void iotcon_list_free(iotcon_list_h list);
+/**
+ * @brief Deletes the key and its associated boolean value from the representation.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] repr The representation handle
+ * @param[in] key The key
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_NO_DATA  No data available
+ * @retval #IOTCON_ERROR_INVALID_TYPE  Invalid type
+ */
+int iotcon_repr_del_bool(iotcon_repr_h repr, const char *key);
 
 /**
- * @ingroup CAPI_IOT_CONNECTIVITY_MODULE
- * @brief Inserts integer value to list.
+ * @brief Deletes the key and its associated double value from the representation.
+ *
  * @since_tizen 3.0
- * @remarks If @a pos is negative, or is larger than the number of value in the list,
- * the new value is added on to the end of the list.
  *
- * @param[in] list The handle to the list
- * @param[in] val The integer
- * @param[in] pos The position to insert integer
+ * @param[in] repr The representation handle
+ * @param[in] key The key
  *
- * @return the (possibly changed) start of the list, otherwise a null pointer on failure
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_NO_DATA  No data available
+ * @retval #IOTCON_ERROR_INVALID_TYPE  Invalid type
  */
-int iotcon_list_insert_int(iotcon_list_h list, int val, int pos);
-int iotcon_list_insert_bool(iotcon_list_h list, bool val, int pos);
-int iotcon_list_insert_double(iotcon_list_h list, double val, int pos);
-int iotcon_list_insert_str(iotcon_list_h list, char *val, int pos);
-int iotcon_list_insert_list(iotcon_list_h list, iotcon_list_h val, int pos);
-int iotcon_list_insert_repr(iotcon_list_h list, iotcon_repr_h val, int pos);
+int iotcon_repr_del_double(iotcon_repr_h repr, const char *key);
 
-int iotcon_list_get_nth_int(iotcon_list_h list, int pos, int *val);
-int iotcon_list_get_nth_bool(iotcon_list_h list, int pos, bool *val);
+/**
+ * @brief Deletes the key and its associated string value from the representation.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] repr The representation handle
+ * @param[in] key The key
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_NO_DATA  No data available
+ * @retval #IOTCON_ERROR_INVALID_TYPE  Invalid type
+ */
+int iotcon_repr_del_str(iotcon_repr_h repr, const char *key);
+
+/**
+ * @brief Deletes the key and its associated list value from the representation.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] repr The representation handle
+ * @param[in] key The key
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_NO_DATA  No data available
+ * @retval #IOTCON_ERROR_INVALID_TYPE  Invalid type
+ */
+int iotcon_repr_del_list(iotcon_repr_h repr, const char *key);
+
+/**
+ * @brief Deletes the key and its associated representation value from the representation.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] repr The representation handle
+ * @param[in] key The key
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_NO_DATA  No data available
+ * @retval #IOTCON_ERROR_INVALID_TYPE  Invalid type
+ */
+int iotcon_repr_del_repr(iotcon_repr_h repr, const char *key);
+
+/**
+ * @brief Deletes the key from the representation.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] repr The representation handle
+ * @param[in] key The key
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_NO_DATA  No data available
+ * @retval #IOTCON_ERROR_INVALID_TYPE  Invalid type
+ */
+int iotcon_repr_del_null(iotcon_repr_h repr, const char *key);
+
+/**
+ * @brief Gets the type of a value at the given key.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] repr The representation handle
+ * @param[in] key The key
+ * @param[out] type The type
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_NO_DATA  No data available
+ */
+int iotcon_repr_get_type(iotcon_repr_h repr, const char *key, int *type);
+
+/**
+ * @brief Appends a new child representation on to the end of the parent representation
+ * @details Duplicated child representation is allowed to append.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] parent The parent representation handle
+ * @param[in] child The child representation handle
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ */
+int iotcon_repr_append_child(iotcon_repr_h parent, iotcon_repr_h child);
+
+/**
+ * @brief Specifies the type of function passed to iotcon_repr_foreach_children()
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] child The child representation handle
+ * @param[in] user_data The user data to pass to the function
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_FUNC_CONTINUE  Continue to iterate next child representation
+ * @retval #IOTCON_FUNC_STOP  Stop to iterate children representation
+ *
+ * @pre iotcon_repr_foreach_children() will invoke this callback function.
+ *
+ * @see iotcon_repr_foreach_children()
+ *
+ */
+typedef bool (*iotcon_children_fn)(iotcon_repr_h child, void *user_data);
+
+/**
+ * @brief Call a function for each children representation of parent.
+ * @details iotcon_children_fn() will be called for each child.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] parent The parent representation handle
+ * @param[in] fn The callback function to invoke
+ * @param[in] user_data The user data to pass to the function
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ *
+ * @post iotcon_children_fn() will be called for each child.
+ *
+ * @see iotcon_children_fn()
+ */
+int iotcon_repr_foreach_children(iotcon_repr_h parent, iotcon_children_fn fn,
+               void *user_data);
+
+/**
+ * @brief Gets the number of children representation in the parent representation
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] parent The parent representation handle
+ *
+ * @return the number of children representation, otherwise 0 on failure
+ */
+unsigned int iotcon_repr_get_children_count(iotcon_repr_h parent);
+
+/**
+ * @brief Gets the child representation at the given position.
+ * @details Iterates over the parent until it reaches the @a pos-1 position.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] parent The parent representation handle
+ * @param[in] pos The position of the child representation
+ * @param[out] child The handle to the child representation
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_NO_DATA  No data available
+ */
+int iotcon_repr_get_nth_child(iotcon_repr_h parent, int pos, iotcon_repr_h *child);
+
+/**
+ * @brief Specifies the type of function passed to iotcon_repr_foreach()
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] repr The representation handle
+ * @param[in] key The key
+ * @param[in] user_data The user data to pass to the function
+ *
+ * @return #IOTCON_FUNC_CONTINUE to continue with the next function of the loop,
+ * otherwise #IOTCON_FUNC_STOP to break out of the loop
+ * @retval #IOTCON_FUNC_CONTINUE  Continue to iterate next key
+ * @retval #IOTCON_FUNC_STOP  Stop to iterate key
+ *
+ * @pre iotcon_repr_foreach() will invoke this callback function.
+ *
+ * @see iotcon_repr_foreach_keys()
+ */
+typedef int (*iotcon_repr_fn)(iotcon_repr_h repr, const char *key, void *user_data);
+
+/**
+ * @brief Call a function for each element of representation.
+ * @details iotcon_repr_fn() will be called for each child.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] repr The representation handle
+ * @param[in] fn The callback function to invoke
+ * @param[in] user_data The user data to pass to the function
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ *
+ * @post iotcon_repr_fn() will be called for each child.
+ *
+ * @see iotcon_repr_fn()
+ */
+int iotcon_repr_foreach(iotcon_repr_h repr, iotcon_repr_fn fn, void *user_data);
+
+/**
+ * @brief  Gets the number of keys in the parent representation.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] repr The representation handle
+ *
+ * @return the number of keys, otherwise 0 on failure.
+ */
+unsigned int iotcon_repr_get_keys_count(iotcon_repr_h repr);
+
+/**
+ * @brief Creates a new list handle.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] type The type of list
+ *
+ * @return A newly allocated list handle, otherwise NULL on failure.
+ * @retval iotcon_list_h Success
+ * @retval NULL Failure
+ */
+iotcon_list_h iotcon_list_new(iotcon_types_e type);
+
+/**
+ * @brief Frees a list handle.
+ * @details Releases a @a list and its internal data.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] list The handle to the list
+ *
+ * @return void
+ */
+void iotcon_list_free(iotcon_list_h list);
+
+/**
+ * @brief Inserts a new element integer value into the list at the given position.
+ * @details If @a pos is negative, or is larger than the number of elements in the list,
+ * the new value is added on to the end of the list.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] list The list handle
+ * @param[in] val The new value
+ * @param[in] pos The position to insert value
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_OUT_OF_MEMORY  Out of memory
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_INVALID_TYPE  Invalid type
+ */
+int iotcon_list_insert_int(iotcon_list_h list, int val, int pos);
+
+/**
+ * @brief Inserts a new element boolean value into the list at the given position.
+ * @details If @a pos is negative, or is larger than the number of elements in the list,
+ * the new value is added on to the end of the list.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] list The list handle
+ * @param[in] val The new value
+ * @param[in] pos The position to insert value
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_OUT_OF_MEMORY  Out of memory
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_INVALID_TYPE  Invalid type
+ */
+int iotcon_list_insert_bool(iotcon_list_h list, bool val, int pos);
+
+/**
+ * @brief Inserts a new element double value into the list at the given position.
+ * @details If @a pos is negative, or is larger than the number of elements in the list,
+ * the new value is added on to the end of the list.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] list The list handle
+ * @param[in] val The new value
+ * @param[in] pos The position to insert value
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_OUT_OF_MEMORY  Out of memory
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_INVALID_TYPE  Invalid type
+ */
+int iotcon_list_insert_double(iotcon_list_h list, double val, int pos);
+
+/**
+ * @brief Inserts a new element string value into the list at the given position.
+ * @details If @a pos is negative, or is larger than the number of elements in the list,
+ * the new value is added on to the end of the list.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] list The list handle
+ * @param[in] val The new value
+ * @param[in] pos The position to insert value
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_OUT_OF_MEMORY  Out of memory
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_INVALID_TYPE  Invalid type
+ */
+int iotcon_list_insert_str(iotcon_list_h list, char *val, int pos);
+
+/**
+ * @brief Inserts a new element list into the list at the given position.
+ * @details If @a pos is negative, or is larger than the number of elements in the list,
+ * the new value is added on to the end of the list.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] list The list handle
+ * @param[in] val The new value
+ * @param[in] pos The position to insert value
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_OUT_OF_MEMORY  Out of memory
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_INVALID_TYPE  Invalid type
+ */
+int iotcon_list_insert_list(iotcon_list_h list, iotcon_list_h val, int pos);
+
+/**
+ * @brief Inserts a new element representation value into the list at the given position.
+ * @details If @a pos is negative, or is larger than the number of elements in the list,
+ * the new value is added on to the end of the list.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] list The list handle
+ * @param[in] val The new value
+ * @param[in] pos The position to insert value
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_OUT_OF_MEMORY  Out of memory
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_INVALID_TYPE  Invalid type
+ */
+int iotcon_list_insert_repr(iotcon_list_h list, iotcon_repr_h val, int pos);
+
+/**
+ * @brief Gets the integer value at the given position.
+ * @details Iterates over the list until it reaches the @a pos-1 position.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] list The list handle
+ * @param[in] pos The position
+ * @param[out] val The integer value to get
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_NO_DATA  No data available
+ * @retval #IOTCON_ERROR_REPRESENTATION  Representation errors
+ */
+int iotcon_list_get_nth_int(iotcon_list_h list, int pos, int *val);
+
+/**
+ * @brief Gets the boolean value at the given position.
+ * @details Iterates over the list until it reaches the @a pos-1 position.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] list The list handle
+ * @param[in] pos The position
+ * @param[out] val The boolean value to get
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_NO_DATA  No data available
+ * @retval #IOTCON_ERROR_REPRESENTATION  Representation errors
+ */
+int iotcon_list_get_nth_bool(iotcon_list_h list, int pos, bool *val);
+
+/**
+ * @brief Gets the double value at the given position.
+ * @details Iterates over the list until it reaches the @a pos-1 position.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] list The list handle
+ * @param[in] pos The position
+ * @param[out] val The double value to get
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_NO_DATA  No data available
+ * @retval #IOTCON_ERROR_REPRESENTATION  Representation errors
+ */
 int iotcon_list_get_nth_double(iotcon_list_h list, int pos, double *val);
+
+/**
+ * @brief Gets the string value at the given position.
+ * @details Iterates over the list until it reaches the @a pos-1 position.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] list The list handle
+ * @param[in] pos The position
+ * @param[out] val The string value to get
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_NO_DATA  No data available
+ * @retval #IOTCON_ERROR_REPRESENTATION  Representation errors
+ */
 int iotcon_list_get_nth_str(iotcon_list_h list, int pos, const char **val);
+
+/**
+ * @brief Gets the list value at the given position.
+ * @details Iterates over the list until it reaches the @a pos-1 position.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] src The list handle
+ * @param[in] pos The position
+ * @param[out] dest The list value to get
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_NO_DATA  No data available
+ * @retval #IOTCON_ERROR_REPRESENTATION  Representation errors
+ */
 int iotcon_list_get_nth_list(iotcon_list_h src, int pos, iotcon_list_h *dest);
+
+/**
+ * @brief Gets the representation value at the given position.
+ * @details Iterates over the list until it reaches the @a pos-1 position.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] list The list handle
+ * @param[in] pos The position
+ * @param[out] repr The representation value to get
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_NO_DATA  No data available
+ * @retval #IOTCON_ERROR_REPRESENTATION  Representation errors
+ */
 int iotcon_list_get_nth_repr(iotcon_list_h list, int pos, iotcon_repr_h *repr);
 
+/**
+ * @brief Deletes the integer value at the given position.
+ * @details Iterates over the list until it reaches the @a pos-1 position.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] list The list handle
+ * @param[in] pos The position to delete
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_NO_DATA  No data available
+ * @retval #IOTCON_ERROR_INVALID_TYPE  Invalid type
+ */
 int iotcon_list_del_nth_int(iotcon_list_h list, int pos);
+
+/**
+ * @brief Deletes the boolean value at the given position.
+ * @details Iterates over the list until it reaches the @a pos-1 position.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] list The list handle
+ * @param[in] pos The position to delete
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_NO_DATA  No data available
+ * @retval #IOTCON_ERROR_INVALID_TYPE  Invalid type
+ */
 int iotcon_list_del_nth_bool(iotcon_list_h list, int pos);
+
+/**
+ * @brief Deletes the double value at the given position.
+ * @details Iterates over the list until it reaches the @a pos-1 position.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] list The list handle
+ * @param[in] pos The position to delete
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_NO_DATA  No data available
+ * @retval #IOTCON_ERROR_INVALID_TYPE  Invalid type
+ */
 int iotcon_list_del_nth_double(iotcon_list_h list, int pos);
+
+/**
+ * @brief Deletes the string value at the given position.
+ * @details Iterates over the list until it reaches the @a pos-1 position.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] list The list handle
+ * @param[in] pos The position to delete
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_NO_DATA  No data available
+ * @retval #IOTCON_ERROR_INVALID_TYPE  Invalid type
+ */
 int iotcon_list_del_nth_str(iotcon_list_h list, int pos);
+
+/**
+ * @brief Deletes the list value at the given position.
+ * @details Iterates over the list until it reaches the @a pos-1 position.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] list The list handle
+ * @param[in] pos The position to delete
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_NO_DATA  No data available
+ * @retval #IOTCON_ERROR_INVALID_TYPE  Invalid type
+ */
 int iotcon_list_del_nth_list(iotcon_list_h list, int pos);
+
+/**
+ * @brief Deletes the representation value at the given position.
+ * @details Iterates over the list until it reaches the @a pos-1 position.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] list The list handle
+ * @param[in] pos The position to delete
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_NO_DATA  No data available
+ * @retval #IOTCON_ERROR_INVALID_TYPE  Invalid type
+ */
 int iotcon_list_del_nth_repr(iotcon_list_h list, int pos);
 
+/**
+ * @brief Gets the type of the list.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] list The list handle
+ * @param[out] type The type
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ */
 int iotcon_list_get_type(iotcon_list_h list, int *type);
+
+/**
+ * @brief Gets the number of elements in a list.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] list The handle to the list
+ *
+ * @return the length of list, otherwise 0 on failure
+ */
 unsigned int iotcon_list_get_length(iotcon_list_h list);
 
+/**
+ * @brief Specifies the type of function passed to iotcon_list_foreach_int()
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] pos The number of the integer value (0 being the first)
+ * @param[in] value The integer value
+ * @param[in] user_data The user data to pass to the function
+ *
+ * @return #IOTCON_FUNC_CONTINUE to continue with the next function of the loop,
+ * otherwise #IOTCON_FUNC_STOP to break out of the loop
+ * @retval #IOTCON_FUNC_STOP  stop to call next function
+ * @retval #IOTCON_FUNC_CONTINUE  continue to call next function
+ *
+ * @pre iotcon_list_foreach_int() will invoke this callback function.
+ *
+ * @see iotcon_list_foreach_int()
+ */
 typedef int (*iotcon_list_int_fn)(int pos, const int value, void *user_data);
+
+/**
+ * @brief Gets all integer values of the given list by invoking the callback function.
+ * @details iotcon_list_int_fn() will be called for each child.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] list The handle to the list
+ * @param[in] fn The callback function to get each integer value
+ * @param[in] user_data The user data to be passed to the callback function
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ *
+ * @post iotcon_list_int_fn() will be called for each item.
+ *
+ * @see iotcon_list_int_fn()
+ */
 int iotcon_list_foreach_int(iotcon_list_h list, iotcon_list_int_fn fn, void *user_data);
+
+/**
+ * @brief Specifies the type of function passed to iotcon_list_foreach_bool()
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] pos The number of the boolean value (0 being the first)
+ * @param[in] value The boolean value
+ * @param[in] user_data The user data to pass to the function
+ *
+ * @return #IOTCON_FUNC_CONTINUE to continue with the next function of the loop,
+ * otherwise #IOTCON_FUNC_STOP to break out of the loop
+ * @retval #IOTCON_FUNC_STOP  stop to call next function
+ * @retval #IOTCON_FUNC_CONTINUE  continue to call next function
+ *
+ * @pre iotcon_list_foreach_bool() will invoke this callback function.
+ *
+ * @see iotcon_list_foreach_bool()
+ */
 typedef int (*iotcon_list_bool_fn)(int pos, const bool value, void *user_data);
+
+/**
+ * @brief Gets all boolean values of the given list by invoking the callback function.
+ * @details iotcon_list_bool_fn() will be called for each child.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] list The handle to the list
+ * @param[in] fn The callback function to get each boolean value
+ * @param[in] user_data The user data to be passed to the callback function
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ *
+ * @post iotcon_list_bool_fn() will be called for each item.
+ *
+ * @see iotcon_list_bool_fn()
+ */
 int iotcon_list_foreach_bool(iotcon_list_h list, iotcon_list_bool_fn fn, void *user_data);
+
+/**
+ * @brief Specifies the type of function passed to iotcon_list_foreach_double()
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] pos The number of the double value (0 being the first)
+ * @param[in] value The double value
+ * @param[in] user_data The user data to pass to the function
+ *
+ * @return #IOTCON_FUNC_CONTINUE to continue with the next function of the loop,
+ * otherwise #IOTCON_FUNC_STOP to break out of the loop
+ * @retval #IOTCON_FUNC_STOP  stop to call next function
+ * @retval #IOTCON_FUNC_CONTINUE  continue to call next function
+ *
+ * @pre iotcon_list_foreach_double() will invoke this callback function.
+ *
+ * @see iotcon_list_foreach_double()
+ */
 typedef int (*iotcon_list_double_fn)(int pos, const double value, void *user_data);
+
+/**
+ * @brief Gets all double values of the given list by invoking the callback function.
+ * @details iotcon_list_double_fn() will be called for each child.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] list The handle to the list
+ * @param[in] fn The callback function to get each double value
+ * @param[in] user_data The user data to be passed to the callback function
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ *
+ * @post iotcon_list_double_fn() will be called for each item.
+ *
+ * @see iotcon_list_double_fn()
+ */
 int iotcon_list_foreach_double(iotcon_list_h list, iotcon_list_double_fn fn,
                void *user_data);
+
+/**
+ * @brief Specifies the type of function passed to iotcon_list_foreach_str()
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] pos The number of the string value (0 being the first)
+ * @param[in] value The string value
+ * @param[in] user_data The user data to pass to the function
+ *
+ * @return #IOTCON_FUNC_CONTINUE to continue with the next function of the loop,
+ * otherwise #IOTCON_FUNC_STOP to break out of the loop
+ * @retval #IOTCON_FUNC_STOP  stop to call next function
+ * @retval #IOTCON_FUNC_CONTINUE  continue to call next function
+ *
+ * @pre iotcon_list_foreach_str() will invoke this callback function.
+ *
+ * @see iotcon_list_foreach_str()
+ */
 typedef int (*iotcon_list_str_fn)(int pos, const char *value, void *user_data);
+
+/**
+ * @brief Gets all string values of the given list by invoking the callback function.
+ * @details iotcon_list_str_fn() will be called for each child.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] list The handle to the list
+ * @param[in] fn The callback function to get each string value
+ * @param[in] user_data The user data to be passed to the callback function
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ *
+ * @post iotcon_list_str_fn() will be called for each item.
+ *
+ * @see iotcon_list_str_fn()
+ */
 int iotcon_list_foreach_str(iotcon_list_h list, iotcon_list_str_fn fn, void *user_data);
+
+/**
+ * @brief Specifies the type of function passed to iotcon_list_foreach_list()
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] pos The number of the list value (0 being the first)
+ * @param[in] value The list value
+ * @param[in] user_data The user data to pass to the function
+ *
+ * @return #IOTCON_FUNC_CONTINUE to continue with the next function of the loop,
+ * otherwise #IOTCON_FUNC_STOP to break out of the loop
+ * @retval #IOTCON_FUNC_STOP  stop to call next function
+ * @retval #IOTCON_FUNC_CONTINUE  continue to call next function
+ *
+ * @pre iotcon_list_foreach_list() will invoke this callback function.
+ *
+ * @see iotcon_list_foreach_list()
+ */
 typedef int (*iotcon_list_list_fn)(int pos, iotcon_list_h value, void *user_data);
+
+/**
+ * @brief Gets all sub lists of the given list by invoking the callback function.
+ * @details iotcon_list_list_fn() will be called for each child.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] list The handle to the origin list
+ * @param[in] fn The callback function to get each sub list
+ * @param[in] user_data The user data to be passed to the callback function
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ *
+ * @post iotcon_list_list_fn() will be called for each item.
+ *
+ * @see iotcon_list_list_fn()
+ */
 int iotcon_list_foreach_list(iotcon_list_h list, iotcon_list_list_fn fn, void *user_data);
+
+/**
+ * @brief Specifies the type of function passed to iotcon_list_foreach_repr()
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] pos The number of the representation value (0 being the first)
+ * @param[in] value The representation value
+ * @param[in] user_data The user data to pass to the function
+ *
+ * @return #IOTCON_FUNC_CONTINUE to continue with the next function of the loop,
+ * otherwise #IOTCON_FUNC_STOP to break out of the loop
+ * @retval #IOTCON_FUNC_STOP  stop to call next function
+ * @retval #IOTCON_FUNC_CONTINUE  continue to call next function
+ *
+ * @pre iotcon_list_foreach_repr() will invoke this callback function.
+ *
+ * @see iotcon_list_foreach_repr()
+ */
 typedef int (*iotcon_list_repr_fn)(int pos, iotcon_repr_h value, void *user_data);
+
+/**
+ * @brief Gets all representations of the given list by invoking the callback function.
+ * @details iotcon_list_repr_fn() will be called for each child.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] list The handle to the list
+ * @param[in] fn The callback function to get each representation
+ * @param[in] user_data The user data to be passed to the callback function
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ *
+ * @post iotcon_list_repr_fn() will be called for each item.
+ *
+ * @see iotcon_list_repr_fn()
+ */
 int iotcon_list_foreach_repr(iotcon_list_h list, iotcon_list_repr_fn fn, void *user_data);
 
+/**
+ * @}
+ */
 #endif /* __IOT_CONNECTIVITY_MANAGER_REPRESENTATION_H__ */
index e04a5d3..c0ac864 100644 (file)
 
 #include "iotcon-constant.h"
 
+/**
+ *
+ * @addtogroup CAPI_IOT_CONNECTIVITY_MODULE
+ *
+ * @{
+ */
+
+/**
+ * @ingroup CAPI_IOT_CONNECTIVITY_REPRESENTATION_MODULE
+ * @brief The handle of representation value.
+ * @details iotcon_value_h is an opaque data structure to have variant datatype and
+ * store values along with information about the type of that value.\n
+ * The range of possible values is determined by the type.\n
+ * The type of iotcon_value_h should be one of them\n
+ * #IOTCON_TYPE_INT\n
+ * #IOTCON_TYPE_BOOL\n
+ * #IOTCON_TYPE_DOUBLE\n
+ * #IOTCON_TYPE_STR\n
+ * #IOTCON_TYPE_NULL\n
+ * #IOTCON_TYPE_LIST\n
+ * #IOTCON_TYPE_REPR
+ *
+ * @since_tizen 3.0
+ */
 typedef struct icl_value_s* iotcon_value_h;
+
+/**
+ * @ingroup CAPI_IOT_CONNECTIVITY_REPRESENTATION_MODULE
+ * @brief The handle of list which is consist of iotcon_value_h type values.
+ * @details iotcon_list_h is an opaque data structure to have iotcon_value_h type values.
+ *
+ * @since_tizen 3.0
+ */
 typedef struct icl_list_s* iotcon_list_h;
+
+/**
+ * @ingroup CAPI_IOT_CONNECTIVITY_REPRESENTATION_MODULE
+ * @brief The handle of representation.
+ * @details iotcon_repr_h is an opaque data structure to have uri_path, list of resource types,
+ * interfaces and attribute value map.\n
+ * It could contain other representation as children.\n
+ * Attribute value map consists of a key and a value.\n
+ * Datatype of the key is string and the value should be one of them\n
+ * #IOTCON_TYPE_INT\n
+ * #IOTCON_TYPE_BOOL\n
+ * #IOTCON_TYPE_DOUBLE\n
+ * #IOTCON_TYPE_STR\n
+ * #IOTCON_TYPE_NULL\n
+ * #IOTCON_TYPE_LIST\n
+ * #IOTCON_TYPE_REPR
+ *
+ * @since_tizen 3.0
+ */
 typedef struct icl_repr_s* iotcon_repr_h;
 
+/**
+ * @brief The handle of notifications message.
+ * @details iotcon_notimsg_h is an opaque data structure to notify message to observers.
+ *
+ * @since_tizen 3.0
+ */
 typedef struct icl_notify_msg* iotcon_notimsg_h;
 
+/**
+ * @brief The handle of presence handle
+ * @details iotcon_presence_h is a handle of presence subscription.\n
+ * It is used to cancel presence.
+ *
+ * @since_tizen 3.0
+ */
 typedef struct icl_presence* iotcon_presence_h;
 
+/**
+ * @brief The structure of device information
+ *
+ * @since_tizen 3.0
+ */
 typedef struct _device_info {
-       char *device_name;
+       char *device_name; /**< Name of the device */
 } iotcon_device_info_s;
 
+/**
+ * @brief The structure of platform information
+ *
+ * @since_tizen 3.0
+ */
 typedef struct _platform_info {
-       char *platform_id;
-       char *manuf_name;
-       char *manuf_url;
-       char *model_number;
-       char *date_of_manufacture;
-       char *platform_ver;
-       char *os_ver;
-       char *hardware_ver;
-       char *firmware_ver;
-       char *support_url;
-       char *system_time;
+       char *platform_id; /**< ID of the platform */
+       char *manuf_name; /**< Manufacurer name of the platform */
+       char *manuf_url; /**< Manufacurer url of the platform */
+       char *model_number; /**< Model number of the platform */
+       char *date_of_manufacture; /**< Date of manufacture of the platform */
+       char *platform_ver; /**< Platform version of the platform */
+       char *os_ver; /**< OS version of the platform */
+       char *hardware_ver; /**< Hardware version of the platform */
+       char *firmware_ver; /**< Firmware version of the platform */
+       char *support_url; /**< Support url of the platform */
+       char *system_time; /**< System time of the platform */
 } iotcon_platform_info_s;
 
-
+/**
+ * @brief The handle of options
+ * @details iotcon_options_h is an opaque data structure to have attribute value map
+ * which consists of a key and a value.\n
+ * Datatype of key is integer and value is string.\n
+ *
+ * @since_tizen 3.0
+ */
 typedef struct icl_options* iotcon_options_h;
+
+/**
+ * @brief Creates a new option handle.
+ *
+ * @since_tizen 3.0
+ *
+ * @return A newly allocated option handle, otherwise NULL on failure.
+ * @retval iotcon_options_h Success
+ * @retval NULL Failure
+ *
+ * @see iotcon_options_free()
+ * @see iotcon_options_insert()
+ * @see iotcon_options_delete()
+ * @see iotcon_options_lookup()
+ */
 iotcon_options_h iotcon_options_new();
+
+/**
+ * @brief Free an option handle.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] options The handle of the options
+ *
+ * @return void
+ *
+ * @see iotcon_options_new()
+ * @see iotcon_options_insert()
+ * @see iotcon_options_delete()
+ * @see iotcon_options_lookup()
+ */
 void iotcon_options_free(iotcon_options_h options);
+
+/**
+ * @brief Inserts a new id and a correspoding data into the options.
+ *
+ * @since_tizen 3.0
+ * @remarks iotcon_options_h can have up to 2 options. \n
+ * option id is always situated between 2048 and 3000. \n
+ * Length of option data is less than or equal to 15.
+ *
+ * @param[in] options The handle of the options
+ * @param[in] id The id of the option to insert
+ * @param[in] data The string data to insert into the options
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_OUT_OF_MEMORY  Out of memory
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ *
+ * @see iotcon_options_new()
+ * @see iotcon_options_free()
+ * @see iotcon_options_delete()
+ * @see iotcon_options_lookup()
+ */
 int iotcon_options_insert(iotcon_options_h options, unsigned short id,
                const char *data);
+
+/**
+ * @brief Deletes the id and its associated data from the options.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] options The handle of the options
+ * @param[in] id The id of the option to delete
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ *
+ * @see iotcon_options_new()
+ * @see iotcon_options_free()
+ * @see iotcon_options_insert()
+ * @see iotcon_options_lookup()
+ */
 int iotcon_options_delete(iotcon_options_h options, unsigned short id);
+
+/**
+ * @brief Looks up data at the given id from the options.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] options The handle of the options
+ * @param[in] id The id of the option to lookup
+ *
+ * @return Found data from options on success, otherwise NULL on failure
+ *
+ * @see iotcon_options_new()
+ * @see iotcon_options_free()
+ * @see iotcon_options_insert()
+ * @see iotcon_options_delete()
+ */
 const char* iotcon_options_lookup(iotcon_options_h options, unsigned short id);
+
+/**
+ * @brief Specifies the type of function passed to iotcon_options_foreach()
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] id The information of the option
+ * @param[in] data The data of the option
+ * @param[in] user_data The user data to pass to the function
+ *
+ * @return #IOTCON_FUNC_CONTINUE to continue with the next function of the loop,
+ * otherwise #IOTCON_FUNC_STOP to break out of the loop
+ * @retval #IOTCON_FUNC_STOP  stop to call next function
+ * @retval #IOTCON_FUNC_CONTINUE  continue to call next function
+ *
+ * @pre iotcon_options_foreach() will invoke this callback function.
+ *
+ * @see iotcon_options_foreach()
+ */
 typedef int (*iotcon_options_foreach_fn)(unsigned short id, const char *data,
                void *user_data);
+
+/**
+ * @brief Gets all datas of the options by invoking the callback function.
+ * @details iotcon_options_foreach_fn() will be called for each option.\n
+ * If iotcon_options_foreach_fn() returns #IOTCON_FUNC_STOP, iteration will be stop.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] options The handle of the options
+ * @param[in] fn The callback function to get data
+ * @param[in] user_data The user data to pass to the function
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ *
+ * @post iotcon_options_foreach_fn() will be called for each option.
+ *
+ * @see iotcon_options_foreach_fn()
+ */
 int iotcon_options_foreach(iotcon_options_h options, iotcon_options_foreach_fn fn,
                void *user_data);
 
-
+/**
+ * @brief The handle of query
+ * @details iotcon_query_h is an opaque data structure to have attribute value map
+ * which consists of key and value.\n
+ * Data ype of both key and value are string.\n
+ * iotcon_query_h also have length.\n
+ * The length is total length of all keys and values of map.\n
+ * The length should be less than or equal to 64.
+ *
+ * @since_tizen 3.0
+ */
 typedef struct icl_query* iotcon_query_h;
+
+/**
+ * @brief Creates a new query handle.
+ *
+ * @since_tizen 3.0
+ *
+ * @return A newly allocated query handle, otherwise NULL on failure.
+ * @retval iotcon_query_h Success
+ * @retval NULL Failure
+ *
+ * @see iotcon_query_free()
+ * @see iotcon_query_insert()
+ * @see iotcon_query_delete()
+ * @see iotcon_query_lookup()
+ */
 iotcon_query_h iotcon_query_new();
+
+/**
+ * @brief Free a query handle.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] query The handle of the query
+ *
+ * @return void
+ *
+ * @see iotcon_query_new()
+ * @see iotcon_query_insert()
+ * @see iotcon_query_delete()
+ * @see iotcon_query_lookup()
+ */
 void iotcon_query_free(iotcon_query_h query);
+
+/**
+ * @brief Inserts a new key and correspoding value into the query.
+ *
+ * @since_tizen 3.0
+ * @remarks The full length of query should be less than or equal to 64.
+ *
+ * @param[in] query The handle of the query
+ * @param[in] key The key of the query to insert
+ * @param[in] value The string data to insert into the query
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_OUT_OF_MEMORY  Out of memory
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ *
+ * @see iotcon_query_new()
+ * @see iotcon_query_free()
+ * @see iotcon_query_delete()
+ * @see iotcon_query_lookup()
+ */
 int iotcon_query_insert(iotcon_query_h query, const char *key, const char *value);
+
+/**
+ * @brief Deletes the key and its associated value from the query.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] query The handle of the query
+ * @param[in] key The key of the option to delete
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ *
+ * @see iotcon_query_new()
+ * @see iotcon_query_free()
+ * @see iotcon_query_insert()
+ * @see iotcon_query_lookup()
+ */
 int iotcon_query_delete(iotcon_query_h query, const char *key);
+
+/**
+ * @brief Lookup data at the given key from the query.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] query The handle of the query
+ * @param[in] key The key of the query to lookup
+ *
+ * @return Found data from query on success, otherwise a null pointer if fail to lookup
+ *
+ * @see iotcon_query_new()
+ * @see iotcon_query_free()
+ * @see iotcon_query_insert()
+ * @see iotcon_query_delete()
+ */
 const char* iotcon_query_lookup(iotcon_query_h query, const char *key);
+
+/**
+ * @brief Specifies the type of function passed to iotcon_query_foreach()
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] key The key of the query
+ * @param[in] value The value of the query
+ * @param[in] user_data The user data to pass to the function
+ *
+ * @return #IOTCON_FUNC_CONTINUE to continue with the next function of the loop,
+ * otherwise #IOTCON_FUNC_STOP to break out of the loop
+ * @retval #IOTCON_FUNC_STOP  stop to call next function
+ * @retval #IOTCON_FUNC_CONTINUE  continue to call next function
+ *
+ * @pre iotcon_query_foreach() will invoke this callback function.
+ *
+ * @see iotcon_query_foreach()
+ */
 typedef int (*iotcon_query_foreach_fn)(const char *key, const char *value,
                void *user_data);
+
+/**
+ * @brief Gets all datas of the query by invoking the callback function.
+ * @details iotcon_query_foreach_fn() will be called for each query.\n
+ * If iotcon_query_foreach_fn() returns #IOTCON_FUNC_STOP, iteration will be stop.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] query The handle of the query
+ * @param[in] fn The callback function to get data
+ * @param[in] user_data The user data to be passed to the callback function
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ *
+ * @post iotcon_query_foreach_fn() will be called for each query.
+ *
+ * @see iotcon_query_foreach_fn()
+ */
 int iotcon_query_foreach(iotcon_query_h query, iotcon_query_foreach_fn fn,
                void *user_data);
 
+/**
+ * @brief The handle of resource types
+ * @details iotcon_resource_types_h is an opaque data structure to have list of resource types.\n
+ * A resource type is datatype of string.
+ *
+ * @since_tizen 3.0
+ */
+typedef struct icl_resource_types* iotcon_resource_types_h;
 
 /**
- * @ingroup CAPI_IOT_CONNECTIVITY_MODULE
- * @brief Appends resource type to list.
+ * @brief Creates a new resource types handle.
+ *
  * @since_tizen 3.0
- * @remarks  Duplicate resource types are not allowed.
  *
- * @param[in] res_types The handle to the list
- * @param[in] type The resource type
+ * @return A newly allocated list of resource types handle, otherwise NULL on failure.
+ * @retval iotcon_resource_types_h Success
+ * @retval NULL Failure
  *
- * @return the (possibly changed) start of the list, otherwise a null pointer on failure
+ * @see iotcon_resource_types_free()
+ * @see iotcon_resource_types_insert()
+ * @see iotcon_resource_types_delete()
+ * @see iotcon_resource_types_clone()
  */
-typedef struct icl_resource_types* iotcon_resource_types_h;
 iotcon_resource_types_h iotcon_resource_types_new();
+
+/**
+ * @brief Free a resource types handle.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] types The handle of the resource types
+ *
+ * @return void
+ *
+ * @see iotcon_resource_types_new()
+ * @see iotcon_resource_types_insert()
+ * @see iotcon_resource_types_delete()
+ * @see iotcon_resource_types_clone()
+ */
 void iotcon_resource_types_free(iotcon_resource_types_h types);
+
+/**
+ * @brief Inserts a resource type into the list.
+ *
+ * @since_tizen 3.0
+ * @remarks The length of resource type should be less than or equal to 61. \n
+ * Duplicate strings are not allowed.
+ *
+ * @param[in] types The handle of the resource types
+ * @param[in] type The string data to insert into the resource types
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ *
+ * @see iotcon_resource_types_new()
+ * @see iotcon_resource_types_free()
+ * @see iotcon_resource_types_delete()
+ * @see iotcon_resource_types_clone()
+ */
 int iotcon_resource_types_insert(iotcon_resource_types_h types, const char *type);
+
+/**
+ * @brief Delete a resource type form the list.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] types The handle of the resource types
+ * @param[in] type The string data to delete from the resource types
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_NO_DATA  No data available
+ *
+ * @see iotcon_resource_types_new()
+ * @see iotcon_resource_types_free()
+ * @see iotcon_resource_types_insert()
+ * @see iotcon_resource_types_clone()
+ */
 int iotcon_resource_types_delete(iotcon_resource_types_h types, const char *type);
+
+/**
+ * @brief Specifies the type of function passed to iotcon_resource_types_foreach()
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] type The value of the resource types
+ * @param[in] user_data The user data to pass to the function
+ *
+ * @return #IOTCON_FUNC_CONTINUE to continue with the next function of the loop,
+ * otherwise #IOTCON_FUNC_STOP to break out of the loop
+ * @retval #IOTCON_FUNC_STOP  stop to call next function
+ * @retval #IOTCON_FUNC_CONTINUE  continue to call next function
+ *
+ * @pre iotcon_resource_types_foreach() will invoke this callback function.
+ *
+ * @see iotcon_resource_types_foreach()
+ */
 typedef int (*iotcon_resource_types_foreach_fn)(const char *type, void *user_data);
+
+/**
+ * @brief Gets all of the resource types of the list by invoking the callback function.
+ * @details iotcon_resource_types_foreach_fn() will be called for each type.\n
+ * If iotcon_resource_types_foreach_fn() returns #IOTCON_FUNC_STOP, iteration will be stop.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] types The handle of resource types
+ * @param[in] fn The callback function to get data
+ * @param[in] user_data The user data to pass to the function
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ *
+ * @post iotcon_resource_types_foreach() will be called for each type.
+ *
+ * @see iotcon_resource_types_foreach_fn()
+ */
 int iotcon_resource_types_foreach(iotcon_resource_types_h types,
                iotcon_resource_types_foreach_fn fn, void *user_data);
-iotcon_resource_types_h iotcon_resource_types_clone(iotcon_resource_types_h types);
 
+/**
+ * @brief Clones the resource types handle.
+ * @details Makes a deep copy of a source list of resource types.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] types The origin handle of the resource types
+ *
+ * @return Clone of a source list of resource types., otherwise NULL on failure
+ * @retval iotcon_resource_types_h Success
+ * @retval NULL Failure
+ *
+ * @see iotcon_resource_types_new()
+ * @see iotcon_resource_types_free()
+ * @see iotcon_resource_types_insert()
+ * @see iotcon_resource_types_delete()
+ */
+iotcon_resource_types_h iotcon_resource_types_clone(iotcon_resource_types_h types);
 
+/**
+ * @brief The handle of observers.
+ * @details The list of observer ids.
+ *
+ * @since_tizen 3.0
+ */
 typedef void* iotcon_observers_h;
+
+/**
+ * @brief Free a observers handle.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] observers The handle of the observers
+ *
+ * @return void
+ *
+ * @see iotcon_observers_append()
+ * @see iotcon_observers_remove()
+ */
 void iotcon_observers_free(iotcon_observers_h observers);
+
+/**
+ * @brief Sets a observer id into the observers handle
+ *
+ * @since_tizen 3.0
+ * @remarks  If you want to make a new list, then you should set NULL to @a observers.
+ *
+ * @param[in] observers The handle of the observers
+ * @param[in] obs_id The id to be appended to observers
+ *
+ * @return New appended observers handle, otherwise a null pointer if error
+ *
+ * @see iotcon_observers_free()
+ * @see iotcon_observers_remove()
+ */
 iotcon_observers_h iotcon_observers_append(iotcon_observers_h observers, int obs_id);
+
+/**
+ * @brief Remove id from the observers.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] observers observers The handle of the observers
+ * @param[in] obs_id The id to be removed from observers
+ *
+ * @return New deleted observers handle, otherwise a null pointer if error
+ *
+ * @see iotcon_observers_free()
+ * @see iotcon_observers_append()
+ */
 iotcon_observers_h iotcon_observers_remove(iotcon_observers_h observers, int obs_id);
 
+/**
+ * @brief The handle of resource.
+ * @details iotcon_resource_h is an opaque data structure to represent registered resource by server.
+ * A resource has host, uri_path, resource types, interfaces and internal handle.\n
+ * If observable attribute of resource is true, client can observe this resource.\n
+ * When client request by CRUD functions, handler will be invoked if registered.
+ * It could contain other resource as children.\n
+ *
+ * @since_tizen 3.0
+ */
 typedef struct icl_resource* iotcon_resource_h;
+
+/**
+ * @brief Gets the number of children resources of the resource
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] resource The handle of the resource
+ * @param[out] number The number of children resources
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ *
+ * @see iotcon_resource_get_nth_child()
+ * @see iotcon_resource_get_uri_path()
+ * @see iotcon_resource_get_types()
+ * @see iotcon_resource_get_interfaces()
+ * @see iotcon_resource_is_observable()
+ */
 int iotcon_resource_get_number_of_children(iotcon_resource_h resource, int *number);
+
+/**
+ * @brief Gets the child resource at the given index in the parent resource
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] parent The handle of the parent resource
+ * @param[in] index The index of the child resource
+ * @param[out] child The child resource at the index
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ *
+ * @see iotcon_resource_get_number_of_children()
+ * @see iotcon_resource_get_uri_path()
+ * @see iotcon_resource_get_types()
+ * @see iotcon_resource_get_interfaces()
+ * @see iotcon_resource_is_observable()
+ */
 int iotcon_resource_get_nth_child(iotcon_resource_h parent, int index,
                iotcon_resource_h *child);
+
+/**
+ * @brief Gets an URI path of the resource
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] resource The handle of the resource
+ * @param[out] uri_path The URI path of the resource
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ *
+ * @see iotcon_resource_get_number_of_children()
+ * @see iotcon_resource_get_nth_child()
+ * @see iotcon_resource_get_types()
+ * @see iotcon_resource_get_interfaces()
+ * @see iotcon_resource_is_observable()
+ */
 int iotcon_resource_get_uri_path(iotcon_resource_h resource, char **uri_path);
+
+/**
+ * @brief Get the list of types in the resource
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] resource The handle of the resource
+ * @param[out] types The types of the resource
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ *
+ * @see iotcon_resource_get_number_of_children()
+ * @see iotcon_resource_get_nth_child()
+ * @see iotcon_resource_get_uri_path()
+ * @see iotcon_resource_get_interfaces()
+ * @see iotcon_resource_is_observable()
+ */
 int iotcon_resource_get_types(iotcon_resource_h resource, iotcon_resource_types_h *types);
+
+/**
+ * @brief Get the interfaces of the resource
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] resource The handle of the resource
+ * @param[out] ifaces The interfaces of the resource
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ *
+ * @see iotcon_resource_get_number_of_children()
+ * @see iotcon_resource_get_nth_child()
+ * @see iotcon_resource_get_uri_path()
+ * @see iotcon_resource_get_types()
+ * @see iotcon_resource_is_observable()
+ */
 int iotcon_resource_get_interfaces(iotcon_resource_h resource, int *ifaces);
+
+/**
+ * @brief Checks whether the resource is observable or not.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] resource The handle of the resource
+ * @param[out] observable The value of observable
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ *
+ * @see iotcon_resource_get_number_of_children()
+ * @see iotcon_resource_get_nth_child()
+ * @see iotcon_resource_get_uri_path()
+ * @see iotcon_resource_get_types()
+ * @see iotcon_resource_get_interfaces()
+ */
 int iotcon_resource_is_observable(iotcon_resource_h resource, bool *observable);
 
+/**
+ * @brief The handle of client
+ * @details When Client success to find out resource from remote server,
+ * server's resource information is reorganized as iotcon_client_h by Iotcon.
+ * Client can request CRUD to server by using this.\n
+ * iotcon_client_h is an opaque data structure to have host, uri_path, resource types, interfaces,
+ * options and server id.\n
+ * If observable attribute is true, remote resource is observable.\n
+ * When you observe remote resource, observe_handle will be set.
+ *
+ * @since_tizen 3.0
+ */
 typedef struct icl_remote_resource* iotcon_client_h;
+
+/**
+ * @brief Gets an URI path of the client
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] resource The handle of the client
+ * @param[out] uri_path The URI path of the client
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ *
+ * @see iotcon_client_get_host()
+ * @see iotcon_client_get_server_id()
+ * @see iotcon_client_get_types()
+ * @see iotcon_client_get_interfaces()
+ * @see iotcon_client_is_observable()
+ * @see iotcon_client_set_options()
+ */
 int iotcon_client_get_uri_path(iotcon_client_h resource, char **uri_path);
+
+/**
+ * @brief Gets an host address of the client
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] resource The handle of the client
+ * @param[out] host The host address of the client
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ *
+ * @see iotcon_client_get_uri_path()
+ * @see iotcon_client_get_server_id()
+ * @see iotcon_client_get_types()
+ * @see iotcon_client_get_interfaces()
+ * @see iotcon_client_is_observable()
+ * @see iotcon_client_set_options()
+ */
 int iotcon_client_get_host(iotcon_client_h resource, char **host);
+
+/**
+ * @brief Gets an server id of the client
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] resource The handle of the client
+ * @param[out] sid The server id of the client
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ *
+ * @see iotcon_client_get_uri_path()
+ * @see iotcon_client_get_host()
+ * @see iotcon_client_get_types()
+ * @see iotcon_client_get_interfaces()
+ * @see iotcon_client_is_observable()
+ * @see iotcon_client_set_options()
+ */
 int iotcon_client_get_server_id(iotcon_client_h resource, char **sid);
+
+/**
+ * @brief Gets resource types of the client
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] resource The handle of the client
+ * @param[out] types The resource types of the client
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ *
+ * @see iotcon_client_get_uri_path()
+ * @see iotcon_client_get_host()
+ * @see iotcon_client_get_server_id()
+ * @see iotcon_client_get_interfaces()
+ * @see iotcon_client_is_observable()
+ * @see iotcon_client_set_options()
+ */
 int iotcon_client_get_types(iotcon_client_h resource, iotcon_resource_types_h *types);
+
+/**
+ * @brief Gets resource interfaces of the client
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] resource The handle of the client
+ * @param[out] ifaces The resource interfaces of the client
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ *
+ * @see iotcon_client_get_uri_path()
+ * @see iotcon_client_get_host()
+ * @see iotcon_client_get_server_id()
+ * @see iotcon_client_get_types()
+ * @see iotcon_client_is_observable()
+ * @see iotcon_client_set_options()
+ */
 int iotcon_client_get_interfaces(iotcon_client_h resource, int *ifaces);
+
+/**
+ * @brief Checks whether the client is observable or not.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] resource The handle of the resource
+ * @param[out] observable The value of observable
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ *
+ * @see iotcon_client_get_uri_path()
+ * @see iotcon_client_get_host()
+ * @see iotcon_client_get_server_id()
+ * @see iotcon_client_get_types()
+ * @see iotcon_client_get_interfaces()
+ * @see iotcon_client_set_options()
+ */
 int iotcon_client_is_observable(iotcon_client_h resource, bool *observable);
-int iotcon_client_set_options(iotcon_client_h resource, iotcon_options_h header_options);
 
+/**
+ * @brief Sets options into the client
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] resource The handle of the client
+ * @param[in] options The handle of the header options
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ *
+ * @see iotcon_client_get_uri_path()
+ * @see iotcon_client_get_host()
+ * @see iotcon_client_get_server_id()
+ * @see iotcon_client_get_types()
+ * @see iotcon_client_get_interfaces()
+ * @see iotcon_client_is_observable()
+ */
+int iotcon_client_set_options(iotcon_client_h resource, iotcon_options_h options);
+
+/**
+* @brief The handle of request
+* @details iotcon_request_h is an opaque data structure to request to a particular resource.\n
+* iotcon_request_h is a data type of client's request which consists of header options,
+* query, representation.
+*
+* @since_tizen 3.0
+*/
 typedef struct icl_resource_request* iotcon_request_h;
+
+/**
+ * @brief Gets an URI path of the request
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] request The handle of the request
+ * @param[out] uri_path The URI path of the request
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ *
+ * @see iotcon_request_get_representation()
+ * @see iotcon_request_get_types()
+ * @see iotcon_request_get_options()
+ * @see iotcon_request_get_query()
+ * @see iotcon_request_get_observer_action()
+ * @see iotcon_request_get_observer_id()
+ */
 int iotcon_request_get_uri_path(iotcon_request_h request, char **uri_path);
+
+/**
+ * @brief Gets an representation of the request
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] request The handle of the request
+ * @param[out] repr The representation of the request
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ *
+ * @see iotcon_request_get_uri_path()
+ * @see iotcon_request_get_types()
+ * @see iotcon_request_get_options()
+ * @see iotcon_request_get_query()
+ * @see iotcon_request_get_observer_action()
+ * @see iotcon_request_get_observer_id()
+ */
 int iotcon_request_get_representation(iotcon_request_h request, iotcon_repr_h *repr);
+
+/**
+ * @brief Get types of the request
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] request The handle of the request
+ * @param[out] types The types of the request
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ *
+ * @see iotcon_request_get_uri_path()
+ * @see iotcon_request_get_representation()
+ * @see iotcon_request_get_options()
+ * @see iotcon_request_get_query()
+ * @see iotcon_request_get_observer_action()
+ * @see iotcon_request_get_observer_id()
+ */
 int iotcon_request_get_types(iotcon_request_h request, int *types);
+
+/**
+ * @brief Get options of the request
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] request The handle of the request
+ * @param[out] options The options of the request
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ *
+ * @see iotcon_request_get_uri_path()
+ * @see iotcon_request_get_representation()
+ * @see iotcon_request_get_types()
+ * @see iotcon_request_get_query()
+ * @see iotcon_request_get_observer_action()
+ * @see iotcon_request_get_observer_id()
+ */
 int iotcon_request_get_options(iotcon_request_h request, iotcon_options_h *options);
+
+/**
+ * @brief Get query of the request
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] request The handle of the request
+ * @param[out] query The query of the request
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ *
+ * @see iotcon_request_get_uri_path()
+ * @see iotcon_request_get_representation()
+ * @see iotcon_request_get_types()
+ * @see iotcon_request_get_options()
+ * @see iotcon_request_get_observer_action()
+ * @see iotcon_request_get_observer_id()
+ */
 int iotcon_request_get_query(iotcon_request_h request, iotcon_query_h *query);
+
+/**
+ * @brief Get observation action of the request
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] request The handle of the request
+ * @param[out] action The observation action of the request
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ *
+ * @see iotcon_request_get_uri_path()
+ * @see iotcon_request_get_representation()
+ * @see iotcon_request_get_types()
+ * @see iotcon_request_get_options()
+ * @see iotcon_request_get_query()
+ * @see iotcon_request_get_observer_id()
+ */
 int iotcon_request_get_observer_action(iotcon_request_h request,
                iotcon_observe_action_e *action);
+
+/**
+ * @brief Get observation id of the request
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] request The handle of the request
+ * @param[out] observer_id The id of the observer
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ *
+ * @see iotcon_request_get_uri_path()
+ * @see iotcon_request_get_representation()
+ * @see iotcon_request_get_types()
+ * @see iotcon_request_get_options()
+ * @see iotcon_request_get_query()
+ * @see iotcon_request_get_observer_action()
+ */
 int iotcon_request_get_observer_id(iotcon_request_h request, int *observer_id);
 
+/**
+* @brief The handle of response
+* @details iotcon_response_h is an opaque data structure to respond to client.\n
+* iotcon_response_h is a data type of server's response which consists of result,
+* header options, query, representation.
+*
+*
+* @since_tizen 3.0
+*/
 typedef struct icl_resource_response* iotcon_response_h;
+
+/**
+ * @brief Creates a response handle.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] request_h The handle of received request handle
+ *
+ * @return Generated response handle, otherwise a null pointer if a allocation error
+ * @retval iotcon_response_h Success
+ * @retval NULL Failure
+ *
+ * @see iotcon_response_free()
+ * @see iotcon_response_set()
+ */
 iotcon_response_h iotcon_response_new(iotcon_request_h request_h);
+
+/**
+ * @brief Free a response handle.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] resp The handle of the response
+ *
+ * @see iotcon_response_new()
+ * @see iotcon_response_set()
+ */
 void iotcon_response_free(iotcon_response_h resp);
+
+/**
+ * @brief Sets values into the response
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] resp The handle of the response
+ * @param[in] prop The property of the response to set
+ * @param[in] ... arguments, as per format_string
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_OUT_OF_MEMORY  Out of memory
+ *
+ * @see iotcon_response_new()
+ * @see iotcon_response_free()
+ */
 int iotcon_response_set(iotcon_response_h resp, iotcon_response_property_e prop, ...);
 
-typedef struct icl_device_info* iotcon_device_h;
-int iotcon_device_get_name(iotcon_device_h device, char **name);
-
-typedef struct icl_platform_info* iotcon_platform_h;
-int iotcon_platform_get_id(iotcon_device_h device, char **id);
-int iotcon_platform_get_manuf_name(iotcon_device_h device, char **manuf_name);
-int iotcon_platform_get_manuf_url(iotcon_device_h device, char **manuf_url);
-int iotcon_platform_get_model_number(iotcon_device_h device, char **model_number);
-int iotcon_platform_get_date_of_maunfacture(iotcon_device_h device, char **date);
-int iotcon_platform_get_platform_ver(iotcon_device_h device, char **platform_ver);
-int iotcon_platform_get_os_ver(iotcon_device_h device, char **os_ver);
-int iotcon_platform_get_hardware_ver(iotcon_device_h device, char **hardware_ver);
-int iotcon_platform_get_firmware_ver(iotcon_device_h device, char **firmware_ver);
-int iotcon_platform_get_support_url(iotcon_device_h device, char **support_url);
-int iotcon_platform_get_system_time(iotcon_device_h device, char **system_time);
+
+/**
+ * @}
+ */
 
 #endif /* __IOT_CONNECTIVITY_MANAGER_STRUCT_H__ */
index 54e9623..8c46b45 100644 (file)
@@ -27,112 +27,997 @@ extern "C" {
 #include <iotcon-constant.h>
 #include <iotcon-representation.h>
 
+/**
+ * @file iotcon.h
+ */
+
+/**
+ *
+ * @addtogroup CAPI_IOT_CONNECTIVITY_MODULE
+ *
+ * @{
+ */
+
+/**
+ * @brief Opens Iotcon.
+ * @details Call this function to start Iotcon.
+ *
+ * @since_tizen 3.0
+ *
+ * @remarks You must free all resources of the Iotcon by calling iotcon_close()
+ * if Iotcon API is no longer needed.
+ *
+ * @return  0 on success, otherwise a negative error value.
+ * @retval  #IOTCON_ERROR_NONE Successful
+ * @retval  #IOTCON_ERROR_DBUS Dbus error
+ *
+ * @see iotcon_close()
+ */
 int iotcon_open();
+
+/**
+ * @brief Closes Iotcon.
+ * @details Frees the resources allocated to Iotcon.
+ *
+ * @since_tizen 3.0
+ *
+ * @remarks This function must be called if Iotcon API is no longer needed.
+ *
+ * @return void
+ *
+ * @see iotcon_open()
+ */
 void iotcon_close();
 
 /**
- * @brief Callback when iotcon connection is changed
+ * @brief Specifies the type of function passed to iotcon_add_connection_changed_cb() and
+ * iotcon_remove_connection_changed_cb().
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] is_connected The status of connection
+ * @param[in] user_data The user data to pass to the function
  *
- * If iotcon connection is changed, registered callbacks are called in registration order.
- * Most handles contain elements related to the handles.
- * Even if iotcon is disconnected, it is allowed to derive elements from handles.
- * On the other hand, using the functions related to connection are not allowed.
- * For example, when iotcon is disconnected, it is possible to use
- * "iotcon_resource_get_uri_path()", but it is impossible to use "iotcon_notify_all()".
- * Thus, if you want to use functions related to connection, above all, you should free
- * handles, and you should make new handles.
- * In case of "iotcon_client_h", if the information of the resource owner are unchanged
- * when iotcon reconnected, then it is possible to reuse handles.
+ * @pre The callback must be registered using iotcon_add_connection_changed_cb()\n
+ * The callback must be unregistered using iotcon_remove_connection_changed_cb()\n
+ *
+ * @see iotcon_add_connection_changed_cb()
+ * @see iotcon_remove_connection_changed_cb()
  */
 typedef void (*iotcon_connection_changed_cb)(bool is_connected, void *user_data);
+
+/**
+ * @brief Adds a callback to Iotcon
+ * @details When Iotcon connection status is changed, registered callbacks will be called in turn.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] cb The callback function to add into callback list
+ * @param[in] user_data The user data to pass to the callback function
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_ALREADY  Already done
+ * @retval #IOTCON_ERROR_OUT_OF_MEMORY  Out of memory
+ * @retval #IOTCON_ERROR_DBUS  Dbus error
+ *
+ * @see iotcon_remove_connection_changed_cb()
+ * @see iotcon_connection_changed_cb()
+ */
 int iotcon_add_connection_changed_cb(iotcon_connection_changed_cb cb, void *user_data);
-int iotcon_remove_connection_changed_cb(iotcon_connection_changed_cb cb,
-               void *user_data);
 
+/**
+ * @brief Removes the callback from the callback list.
+ * @details Finds out the callback passing to parameter from registered callbacks, then remove it.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] cb The callback function to remove from callback list
+ * @param[in] user_data The user data to pass to the callback function
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ *
+ * @see iotcon_add_connection_changed_cb()
+ * @see iotcon_connection_changed_cb()
+ */
+int iotcon_remove_connection_changed_cb(iotcon_connection_changed_cb cb, void *user_data);
+
+/**
+ * @brief Specifies the type of function passed to iotcon_register_resource() and
+ * iotcon_bind_request_handler()
+ * @details Called when server receive request from the client.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] resource The resource requested
+ * @param[in] request The request from client
+ * @param[in] user_data The user data to pass to the function
+ *
+ * @pre The callback must be registered using iotcon_register_resource()
+ *
+ * @see iotcon_register_resource()
+ * @see iotcon_bind_request_handler()
+ */
 typedef void (*iotcon_request_handler_cb)(iotcon_resource_h resource,
                iotcon_request_h request, void *user_data);
+
+/**
+ * @brief Registers a resource in server
+ * @details Registers a resource specified by @a uri_path, @a res_types, @a ifaces which have
+ * @a properties in Iotcon server.\n
+ * When client find the registered resource, iotcon_request_handler_cb() will be called automatically.\n
+ * @a uri_path format would be relative URI path like '/a/light'\n
+ * @a res_types is a list of resource types. Create a iotcon_resource_types_h handle and
+ * add types string to it.\n
+ * @a ifaces can contain multiple interfaces like
+ * IOTCON_INTERFACE_LINK | IOTCON_INTERFACE_BATCH.\n
+ * @a properties also can contain multiple properties like
+ * IOTCON_ACTIVE | IOTCON_DISCOVERABLE.\n
+ * iotcon_request_handler_cb() will be called when receive CRUD request to the registered
+ * resource.
+ *
+ * @since_tizen 3.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/internet
+ *
+ * @remarks @a uri_path length must be less than or equal 36.\n
+ * You must unregister resource by calling iotcon_unregister_resource()
+ * if resource is no longer needed.
+ *
+ * @param[in] uri_path The URI path of the resource.
+ * @param[in] res_types The list of type of the resource.
+ * @param[in] ifaces The interfaces of the resource.
+ * @param[in] properties The property of the resource.
+ * @param[in] cb The request handler callback function
+ * @param[in] user_data The user data to pass to the callback function
+ *
+ * @return resource handle of the registered resource, otherwise a null pointer if registering
+ * has an error
+ * @retval iotcon_resource_h Success
+ * @retval NULL Failure
+ *
+ * @post When the resource receive CRUD request, iotcon_request_handler_cb() will be called.
+ *
+ * @see iotcon_unregister_resource()
+ * @see iotcon_bind_interface()
+ * @see iotcon_bind_type()
+ * @see iotcon_bind_request_handler()
+ * @see iotcon_bind_resource()
+ * @see iotcon_unbind_resource()
+ * @see iotcon_request_handler_cb()
+ */
 iotcon_resource_h iotcon_register_resource(const char *uri_path,
                iotcon_resource_types_h res_types,
                int ifaces,
                uint8_t properties,
                iotcon_request_handler_cb cb,
                void *user_data);
+
+/**
+ * @brief Unregisters a resource and releases its data.
+ *
+ * @since_tizen 3.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/internet
+ *
+ * @param[in] resource_handle The handle of the resource to be unregistered
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_DBUS  Dbus error
+ *
+ * @see iotcon_register_resource()
+ * @see iotcon_bind_interface()
+ * @see iotcon_bind_type()
+ * @see iotcon_bind_request_handler()
+ * @see iotcon_bind_resource()
+ * @see iotcon_unbind_resource()
+ * @see iotcon_request_handler_cb()
+ */
 int iotcon_unregister_resource(iotcon_resource_h resource_handle);
 
-int iotcon_bind_interface(iotcon_resource_h resource,
-               iotcon_interface_e iface);
-int iotcon_bind_type(iotcon_resource_h resource_handle,
-               const char *resource_type);
+/**
+ * @brief Binds an interface to the resource
+ *
+ * @since_tizen 3.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/internet
+ *
+ * @remarks Set only one interface to @a iface. If not, @a iface will be ignored.
+ *
+ * @param[in] resource The handle of the resource
+ * @param[in] iface The interface to be bound to the resource
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_DBUS  Dbus error
+ * @retval #IOTCON_ERROR_SYSTEM System error
+ *
+ * @see iotcon_register_resource()
+ * @see iotcon_unregister_resource()
+ * @see iotcon_bind_type()
+ * @see iotcon_bind_request_handler()
+ * @see iotcon_bind_resource()
+ * @see iotcon_unbind_resource()
+ * @see iotcon_request_handler_cb()
+ */
+int iotcon_bind_interface(iotcon_resource_h resource, iotcon_interface_e iface);
+
+/**
+ * @brief Binds a type to the resource
+ *
+ * @since_tizen 3.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/internet
+ *
+ * @param[in] resource_handle The handle of the resource
+ * @param[in] resource_type The type to be bound to the resource
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_DBUS  Dbus error
+ * @retval #IOTCON_ERROR_SYSTEM System error
+ *
+ * @see iotcon_register_resource()
+ * @see iotcon_unregister_resource()
+ * @see iotcon_bind_interface()
+ * @see iotcon_bind_request_handler()
+ * @see iotcon_bind_resource()
+ * @see iotcon_unbind_resource()
+ * @see iotcon_request_handler_cb()
+ */
+int iotcon_bind_type(iotcon_resource_h resource_handle, const char *resource_type);
+
+/**
+ * @brief Binds a request handler to the resource
+ * @details When the resource receive CRUD request, iotcon_request_handler_cb() will be
+ * called.
+ *
+ * @since_tizen 3.0
+ *
+ * @remarks Registered callback function will be replaced with the new @a cb.\n
+ *
+ * @param[in] resource The handle of the resource
+ * @param[in] cb The request handler to be bound to the resource
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ *
+ * @see iotcon_register_resource()
+ * @see iotcon_unregister_resource()
+ * @see iotcon_bind_interface()
+ * @see iotcon_bind_type()
+ * @see iotcon_bind_resource()
+ * @see iotcon_unbind_resource()
+ * @see iotcon_request_handler_cb()
+ */
 int iotcon_bind_request_handler(iotcon_resource_h resource, iotcon_request_handler_cb cb);
+
+/**
+ * @brief Binds a child resource into the parent resource.
+ *
+ * @since_tizen 3.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/internet
+ *
+ * @param[in] parent The handle of the parent resource
+ * @param[in] child The handle of the child resource to be added to the parent resource
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_ALREADY  Already done
+ * @retval #IOTCON_ERROR_DBUS  Dbus error
+ * @retval #IOTCON_ERROR_SYSTEM System error
+ *
+ * @see iotcon_register_resource()
+ * @see iotcon_unregister_resource()
+ * @see iotcon_bind_interface()
+ * @see iotcon_bind_type()
+ * @see iotcon_bind_request_handler()
+ * @see iotcon_unbind_resource()
+ * @see iotcon_request_handler_cb()
+ */
 int iotcon_bind_resource(iotcon_resource_h parent, iotcon_resource_h child);
-int iotcon_unbind_resource(iotcon_resource_h parent, iotcon_resource_h child);
 
+/**
+ * @brief Unbinds a child resource from the parent resource.
+ *
+ * @since_tizen 3.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/internet
+ *
+ * @param[in] parent The handle of the parent resource
+ * @param[in] child The handle of the child resource to be unbound from the parent resource
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_DBUS  Dbus error
+ * @retval #IOTCON_ERROR_SYSTEM System error
+ *
+ * @see iotcon_register_resource()
+ * @see iotcon_unregister_resource()
+ * @see iotcon_bind_interface()
+ * @see iotcon_bind_type()
+ * @see iotcon_bind_request_handler()
+ * @see iotcon_bind_resource()
+ * @see iotcon_request_handler_cb()
+ */
+int iotcon_unbind_resource(iotcon_resource_h parent, iotcon_resource_h child);
 
+/**
+ * @brief Register device information in a server.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] device_name The device information to register
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_DBUS  Dbus error
+ * @retval #IOTCON_ERROR_SYSTEM System error
+ */
 int iotcon_register_device_info(const char *device_name);
+
+/**
+ * @brief Specifies the type of function passed to iotcon_get_device_info().
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] info The information of device from remote server.
+ * @param[in] user_data The user data to pass to the function
+ *
+ * @pre iotcon_get_device_info() will invoke this callback function.
+ *
+ * @see iotcon_get_device_info()
+ */
 typedef void (*iotcon_device_info_cb)(const char *device_name, const char *sid,
                const char *spec_version, const char *data_model_version, void *user_data);
+
+/**
+ * @brief Calls a function for device information of remote server.
+ * @details Request device information to server and pass the information by calling
+ * iotcon_device_info_cb().\n
+ * iotcon_device_info_cb() will be called when success on getting device information.
+ *
+ * @since_tizen 3.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/internet
+ *
+ * @param[in] host_address The host address of remote server
+ * @param[in] cb The callback function to invoke
+ * @param[in] user_data The user data to pass to the function
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_DBUS  Dbus error
+ * @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory
+ *
+ * @post iotcon_device_info_cb() will be called when success on getting device information.
+ *
+ * @see iotcon_device_info_cb()
+ */
 int iotcon_get_device_info(const char *host_address, iotcon_device_info_cb cb,
                void *user_data);
 
+/**
+ * @brief Register platform information in a server.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] platform_info The platform information to register
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE Successful
+ * @retval #IOTCON_ERROR_DBUS  Dbus error
+ * @retval #IOTCON_ERROR_SYSTEM System error
+ */
 int iotcon_register_platform_info(iotcon_platform_info_s platform_info);
+
+/**
+ * @brief Specifies the type of function passed to iotcon_get_platform_info().
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] info The information of platform from remote server.
+ * @param[in] user_data The user data to pass to the function
+ *
+ * @pre iotcon_get_platform_info() will invoke this callback function.
+ *
+ * @see iotcon_get_platform_info()
+ */
 typedef void (*iotcon_platform_info_cb)(iotcon_platform_info_s info, void *user_data);
+
+/**
+ * @brief Calls a function for platform information of remote server.
+ * @details Request platform information to server and pass the information by calling
+ * iotcon_platform_info_cb().\n
+ * iotcon_platform_info_cb() will be called when success on getting device information.
+ *
+ * @since_tizen 3.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/internet
+ *
+ * @param[in] host_address The host address of remote server
+ * @param[in] cb The callback function to invoke
+ * @param[in] user_data The user data to pass to the function
+ *
+ * @return  0 on success, otherwise a negative error value.
+ *
+ * @retval #IOTCON_ERROR_NONE Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_DBUS  Dbus error
+ * @retval #IOTCON_ERROR_SYSTEM System error
+ * @retval #IOTCON_ERROR_OUT_OF_MEMORY Out of memory
+ *
+ * @post iotcon_platform_info_cb() will be called when success on getting device information.
+ *
+ * @see iotcon_platform_info_cb()
+ */
 int iotcon_get_platform_info(const char *host_address, iotcon_platform_info_cb cb,
                void *user_data);
 
+/**
+ * @brief Starts presence of a server.
+ * @details Use this function to send server's announcements to clients.\n
+ * Server can call this function when online for the first time or come back from offline to online.
+ *
+ * @since_tizen 3.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/internet
+ *
+ * @remarks If @a time_to_live is 0, server will set default value as 60 seconds.\n
+ * If @a time_to_live is very big, server will set maximum value as (60 * 60 * 24) seconds.
+ * (24 hours)
+ *
+ * @param[in] time_to_live The interval of announcing presence in seconds.
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_DBUS  Dbus error
+ * @retval #IOTCON_ERROR_SYSTEM System error
+ *
+ * @see iotcon_stop_presence()
+ * @see iotcon_subscribe_presence()
+ * @see iotcon_unsubscribe_presence()
+ */
 int iotcon_start_presence(unsigned int time_to_live);
+
+/**
+ * @brief Stop presence of a server.
+ * @details Use this function to stop sending server's announcements to clients.
+ * Server can call this function when terminating, entering to offline or out of network.
+ *
+ * @since_tizen 3.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/internet
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_DBUS  Dbus error
+ * @retval #IOTCON_ERROR_SYSTEM System error
+ *
+ * @see iotcon_start_presence()
+ * @see iotcon_subscribe_presence()
+ * @see iotcon_unsubscribe_presence()
+ */
 int iotcon_stop_presence();
+
+/**
+ * @brief Specifies the type of function passed to iotcon_subscribe_presence().
+ * @details Called when client receive presence events from the server.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] result The result code of server's presence
+ * @param[in] nonce Current nonce of server's presence
+ * @param[in] host_address The address or addressable name of server
+ * @param[in] user_data The user data to pass to the function
+ *
+ * @pre The callback must be registered using iotcon_subscribe_presence()
+ *
+ * @see iotcon_subscribe_presence()
+ */
 typedef void (*iotcon_presence_cb)(int result, unsigned int nonce,
                const char *host_address, void *user_data);
+
+/**
+ * @brief Subscribes to a server to receive presence events.
+ * @details Request to receive presence to an interested server's resource with @a resource_type.\n
+ * If succeed to subscribe, iotcon_presence_cb() will be invoked when the server sends presence\n
+ * A server sends presence events when adds/removes/alters a resource or start/stop presence.
+ *
+ * @since_tizen 3.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/internet
+ *
+ * @param[in] host_address The address or addressable name of the server
+ * @param[in] resource_type A resource type that a client has interested in
+ * @param[in] cb The callback function to invoke
+ * @param[in] user_data The user data to pass to the function
+ *
+ * @return Generated presence handle, otherwise a null pointer if fail to subscribe
+ * @retval iotcon_presence_h Success
+ * @retval NULL Failure
+ *
+ * @post When the resource receive presence, iotcon_presence_cb() will be called.
+ *
+ * @see iotcon_start_presence()
+ * @see iotcon_stop_presence()
+ * @see iotcon_unsubscribe_presence()
+ * @see iotcon_presence_cb()
+ */
 iotcon_presence_h iotcon_subscribe_presence(const char *host_address,
-               const char *resource_type,
-               iotcon_presence_cb cb,
-               void *user_data);
+               const char *resource_type, iotcon_presence_cb cb, void *user_data);
+
+/**
+ * @brief Unsubscribes to a server's presence events.
+ * @details Request not to receive server's presence any more.
+ *
+ * @since_tizen 3.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/internet
+ *
+ * @param[in] presence_handle The presence handle to be unsubscribed
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_DBUS  Dbus error
+ * @retval #IOTCON_ERROR_SYSTEM System error
+ *
+ * @see iotcon_start_presence()
+ * @see iotcon_stop_presence()
+ * @see iotcon_subscribe_presence()
+ * @see iotcon_presence_cb()
+ */
 int iotcon_unsubscribe_presence(iotcon_presence_h presence_handle);
 
+/**
+ * @brief Specifies the type of function passed to iotcon_find_resource().
+ * @details Called when a resource is found from the remote server.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] resource The handle of resource which is found
+ * @param[in] user_data The user data to pass to the function
+ *
+ * @pre The callback must be registered using iotcon_find_resource()
+ *
+ * @see iotcon_find_resource()
+ */
 typedef void (*iotcon_found_resource_cb)(iotcon_client_h resource, void *user_data);
+
+/**
+ * @brief Finds resources.
+ * @details Request to find a resource of @a host_address server with @a resource_type.\n
+ * If succeed to find the resource, iotcon_found_resource_cb() will be invoked with
+ * information of the resource.
+ *
+ * @since_tizen 3.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/internet
+ *
+ * @param[in] host_address The address or addressable name of server
+ * @param[in] resource_type The resource type specified as a filter for the resource
+ * @param[in] cb The callback function to invoke
+ * @param[in] user_data The user data to pass to the function
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_DBUS  Dbus error
+ * @retval #IOTCON_ERROR_SYSTEM System error
+ *
+ * @post When the resource is found, iotcon_found_resource_cb() will be called.
+ *
+ * @see iotcon_found_resource_cb()
+ */
 int iotcon_find_resource(const char *host_address, const char *resource_type,
                iotcon_found_resource_cb cb, void *user_data);
-iotcon_client_h iotcon_client_new(const char *host, const char *uri_path, bool is_observable,
-               iotcon_resource_types_h resource_types, int resource_interfaces);
+
+/**
+ * @brief Creates a new resource handle.
+ * @details Creates a resource proxy object so that get/put/observe functionality can be used
+ * without discovering the object in advance.\n
+ * To use this API, you should provide all of the details required to correctly contact and
+ * observe the object.\n
+ * If not, you should discover the resource object manually.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] host The host address of the resource
+ * @param[in] uri_path The URI path of the resource.
+ * @param[in] is_observable Allow observation
+ * @param[in] resource_types The resource type of the resource. For example, "core.light"
+ * @param[in] resource_interfaces The resource interfaces (whether it is collection etc)
+ *
+ * @return Generated resource handle, otherwise a null pointer if a allocation error
+ * @retval iotcon_client_h Success
+ * @retval NULL Failure
+ *
+ * @see iotcon_client_free()
+ * @see iotcon_client_ref()
+ */
+iotcon_client_h iotcon_client_new(const char *host,
+               const char *uri_path,
+               bool is_observable,
+               iotcon_resource_types_h resource_types,
+               int resource_interfaces);
+
+/**
+ * @brief Releases a resource handle.
+ * @details Decrements reference count of the source resource.\n
+ * If the reference count drops to 0, releases a resource handle.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] resource The handle of the resource
+ *
+ * @return void
+ *
+ * @see iotcon_client_new()
+ * @see iotcon_client_ref()
+ */
 void iotcon_client_free(iotcon_client_h resource);
+
+/**
+ * @brief Increments reference count of the source resource.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] resource The Source of resource
+ *
+ * @return Referenced resource handle, otherwise a null pointer if the operation has an error
+ * @retval iotcon_client_h Success
+ * @retval NULL Failure
+ *
+ * @see iotcon_client_new()
+ * @see iotcon_client_free()
+ */
 iotcon_client_h iotcon_client_ref(iotcon_client_h resource);
 
+/**
+ * @brief Specifies the type of function passed to iotcon_observer_start().
+ * @details Called when a client receive notifications from a server.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] resource The handle of the resource
+ * @param[in] repr The handle of the representation
+ * @param[in] options The handle of the header options
+ * @param[in] response_result The response result code
+ * @param[in] sequence_number The sequence of notifications from server.
+ * @param[in] user_data The user data passed from the callback registration function
+ *
+ * @pre The callback must be registered using iotcon_observer_start()
+ *
+ * @see iotcon_observer_start()
+ */
 typedef void (*iotcon_on_observe_cb)(iotcon_client_h resource,
                iotcon_repr_h repr,
-               iotcon_options_h header_options,
+               iotcon_options_h options,
                int response_result,
                int sequence_number,
                void *user_data);
+
+/**
+ * @brief Sets observation on the resource
+ * @details When server sends notification message, iotcon_on_observe_cb() will be called.
+ *
+ * @since_tizen 3.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/internet
+ *
+ * @param[in] resource The handle of the resource
+ * @param[in] observe_type The type to specify how client wants to observe.
+ * @param[in] query The query to send to server
+ * @param[in] cb The callback function to get notifications from server
+ * @param[in] user_data The user data to pass to the function
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_IOTIVITY  Iotivity errors
+ * @retval #IOTCON_ERROR_DBUS  Dbus errors
+ * @retval #IOTCON_ERROR_OUT_OF_MEMORY  Out of memory
+ *
+ * @post When the @a resource receive notification message, iotcon_on_observe_cb() will be called.
+ *
+ * @see iotcon_on_observe_cb()
+ * @see iotcon_observer_stop()
+ * @see iotcon_notimsg_new()
+ * @see iotcon_notify_list_of_observers()
+ * @see iotcon_notify_all()
+ */
 int iotcon_observer_start(iotcon_client_h resource,
                iotcon_observe_type_e observe_type,
                iotcon_query_h query,
                iotcon_on_observe_cb cb,
                void *user_data);
+
+/**
+ * @brief Cancels the observation on the resource
+ *
+ * @since_tizen 3.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/internet
+ *
+ * @param[in] resource The handle of the resource
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_DBUS  Dbus error
+ * @retval #IOTCON_ERROR_SYSTEM System error
+ *
+ * @see iotcon_on_observe_cb()
+ * @see iotcon_observer_start()
+ * @see iotcon_notimsg_new()
+ * @see iotcon_notify_list_of_observers()
+ * @see iotcon_notify_all()
+ */
 int iotcon_observer_stop(iotcon_client_h resource);
 
+/**
+ * @brief Send response for incoming request.
+ *
+ * @since_tizen 3.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/internet
+ *
+ * @param[in] resp The handle of the response to send
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_DBUS  Dbus error
+ * @retval #IOTCON_ERROR_SYSTEM System error
+ */
 int iotcon_response_send(iotcon_response_h resp);
 
+/**
+ * @brief Creates a new notifications message handle.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] repr The handle of the representation
+ * @param[in] iface The resource interface
+ *
+ * @return Generated notifications message handle, otherwise a null pointer if a allocation error.
+ *
+ * @see iotcon_on_observe_cb()
+ * @see iotcon_observer_start()
+ * @see iotcon_observer_stop()
+ * @see iotcon_notify_list_of_observers()
+ * @see iotcon_notify_all()
+ */
 iotcon_notimsg_h iotcon_notimsg_new(iotcon_repr_h repr, iotcon_interface_e iface);
+
+/**
+ * @brief Releases a notifications message handle.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] msg The handle of the notifications message
+ *
+ * @return void
+ *
+ * @see iotcon_notimsg_new()
+ */
 void iotcon_notimsg_free(iotcon_notimsg_h msg);
+
+/**
+ * @brief Notifies only specific clients that resource's attributes have changed.
+ *
+ * @since_tizen 3.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/internet
+ *
+ * @param[in] resource The handle of the resource
+ * @param[in] msg The handle of the notifications message
+ * @param[in] observers The handle of the observers
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_DBUS  Dbus error
+ * @retval #IOTCON_ERROR_REPRESENTATION  Representation error
+ * @retval #IOTCON_ERROR_SYSTEM  System error
+ *
+ * @see iotcon_on_observe_cb()
+ * @see iotcon_observer_start()
+ * @see iotcon_observer_stop()
+ * @see iotcon_notimsg_new()
+ * @see iotcon_notify_all()
+ */
 int iotcon_notify_list_of_observers(iotcon_resource_h resource, iotcon_notimsg_h msg,
                iotcon_observers_h observers);
+
+/**
+ * @brief Notifies all that attributes of the resource have changed.
+ *
+ * @since_tizen 3.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/internet
+ *
+ * @param[in] resource The handle of the resource
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_DBUS  Dbus error
+ * @retval #IOTCON_ERROR_SYSTEM  System error
+ *
+ * @see iotcon_on_observe_cb()
+ * @see iotcon_observer_start()
+ * @see iotcon_observer_stop()
+ * @see iotcon_notimsg_new()
+ * @see iotcon_notify_list_of_observers()
+ */
 int iotcon_notify_all(iotcon_resource_h resource);
 
+/**
+ * @brief Specifies the type of function passed to iotcon_get(), iotcon_put(), iotcon_post()
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] resource The handle of the resource
+ * @param[in] repr The handle of the representation
+ * @param[in] options The handle of the header options
+ * @param[in] response_result The response result code
+ * @param[in] user_data The user data to pass to the function
+ *
+ * @pre The callback must be registered using iotcon_get(), iotcon_put(), iotcon_post()
+ *
+ * @see iotcon_get()
+ * @see iotcon_put()
+ * @see iotcon_post()
+ */
 typedef void (*iotcon_on_cru_cb)(iotcon_client_h resource, iotcon_repr_h repr,
                iotcon_options_h options, int response_result, void *user_data);
+
+/**
+ * @brief Gets the attributes of a resource.
+ * @details When server sends response on get request, iotcon_on_cru_cb() will be called.
+ *
+ * @since_tizen 3.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/internet
+ *
+ * @param[in] resource The handle of the resource
+ * @param[in] query The query to send to server
+ * @param[in] cb The callback function
+ * @param[in] user_data The user data to pass to the function
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_DBUS  Dbus errors
+ * @retval #IOTCON_ERROR_OUT_OF_MEMORY  Out of memory
+ *
+ * @post When the client receive get response, iotcon_on_cru_cb() will be called.
+ *
+ * @see iotcon_on_cru_cb()
+ * @see iotcon_put()
+ * @see iotcon_post()
+ */
 int iotcon_get(iotcon_client_h resource, iotcon_query_h query,
                iotcon_on_cru_cb cb, void *user_data);
 
+/**
+ * @brief Sets the representation of a resource (via PUT)
+ * @details When server sends response on put request, iotcon_on_cru_cb() will be called.
+ *
+ * @since_tizen 3.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/internet
+ *
+ * @param[in] resource The handle of the resource
+ * @param[in] repr The handle of the representation
+ * @param[in] query The query to send to server
+ * @param[in] cb The callback function
+ * @param[in] user_data The user data to pass to the function
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_DBUS  Dbus errors
+ * @retval #IOTCON_ERROR_OUT_OF_MEMORY  Out of memory
+ *
+ * @post When the client receive put response, iotcon_on_cru_cb() will be called.
+ *
+ * @see iotcon_on_cru_cb()
+ * @see iotcon_get()
+ * @see iotcon_post()
+ */
 int iotcon_put(iotcon_client_h resource, iotcon_repr_h repr, iotcon_query_h query,
                iotcon_on_cru_cb cb, void *user_data);
 
+/**
+ * @brief Posts on a resource
+ * @details When server sends response on post request, iotcon_on_cru_cb() will be called.
+ *
+ * @since_tizen 3.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/internet
+ *
+ * @param[in] resource The handle of the resource
+ * @param[in] repr The handle of the representation
+ * @param[in] query The query to send to server
+ * @param[in] cb The callback function
+ * @param[in] user_data The user data to pass to the function
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_DBUS  Dbus errors
+ * @retval #IOTCON_ERROR_OUT_OF_MEMORY  Out of memory
+ *
+ * @post When the client receive post response, iotcon_on_cru_cb() will be called.
+ *
+ * @see iotcon_on_cru_cb()
+ * @see iotcon_get()
+ * @see iotcon_put()
+ */
 int iotcon_post(iotcon_client_h resource, iotcon_repr_h repr, iotcon_query_h query,
                iotcon_on_cru_cb cb, void *user_data);
 
+/**
+ * @brief Specifies the type of function passed to iotcon_delete()
+ *
+ * @since_tizen 3.0
+ *
+ * @param[in] resource The handle of the resource
+ * @param[in] options The handle of the header options
+ * @param[in] response_result The response result code
+ * @param[in] user_data The user data to pass to the function
+ *
+ * @pre The callback must be registered using iotcon_delete()
+ *
+ * @see iotcon_delete()
+ */
 typedef void (*iotcon_on_delete_cb)(iotcon_client_h resource, iotcon_options_h options,
                int response_result, void *user_data);
-int iotcon_delete(iotcon_client_h resource, iotcon_on_delete_cb cb,
-               void *user_data);
+
+/**
+ * @brief Deletes a resource.
+ * @details When server sends response on delete request, iotcon_on_delete_cb() will be called.
+ *
+ * @since_tizen 3.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/internet
+ *
+ * @param[in] resource The handle of the resource
+ * @param[in] cb The callback function
+ * @param[in] user_data The user data to pass to the function
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE  Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #IOTCON_ERROR_DBUS  Dbus errors
+ * @retval #IOTCON_ERROR_OUT_OF_MEMORY  Out of memory
+ *
+ * @post When the client receive delete response, iotcon_on_delete_cb() will be called.
+ *
+ * @see iotcon_on_delete_cb()
+ */
+int iotcon_delete(iotcon_client_h resource, iotcon_on_delete_cb cb, void *user_data);
+
+
+/**
+ * @}
+ */
 
 #ifdef __cplusplus
 }