revise header hierarchy
authorYoungjae Shin <yj99.shin@samsung.com>
Mon, 16 Nov 2015 05:00:28 +0000 (14:00 +0900)
committerYoungjae Shin <yj99.shin@samsung.com>
Thu, 19 Nov 2015 05:54:46 +0000 (14:54 +0900)
Change-Id: I7f49958ec6eb09d8c6cd6edc66b0cccd6efa7082

49 files changed:
common/ic-utils.c
common/ic-utils.h
daemon/icd-ioty-type.c
daemon/icd-ioty-type.h
lib/icl-device.h
lib/icl-list.c
lib/icl-list.h
lib/icl-lite-resource.c
lib/icl-observation.c
lib/icl-observation.h
lib/icl-options.c
lib/icl-options.h
lib/icl-presence.c
lib/icl-query.c
lib/icl-query.h
lib/icl-remote-resource.c
lib/icl-remote-resource.h
lib/icl-representation.c
lib/icl-representation.h
lib/icl-request.c
lib/icl-request.h
lib/icl-resource-types.c
lib/icl-resource-types.h
lib/icl-resource.h
lib/icl-response.h
lib/icl-state.c
lib/icl-state.h
lib/icl-value.c
lib/icl-value.h
lib/include/iotcon-client.h
lib/include/iotcon-constant.h
lib/include/iotcon-list.h
lib/include/iotcon-lite-resource.h
lib/include/iotcon-observers.h
lib/include/iotcon-options.h
lib/include/iotcon-query.h
lib/include/iotcon-remote-resource.h
lib/include/iotcon-representation.h
lib/include/iotcon-request.h
lib/include/iotcon-resource-types.h
lib/include/iotcon-resource.h
lib/include/iotcon-response.h
lib/include/iotcon-state.h
lib/include/iotcon-struct.h [deleted file]
lib/include/iotcon-types.h [new file with mode: 0644]
lib/include/iotcon.h
test/iotcon-test-basic-server.c
test/iotcon-test-encap-server.c
test/iotcon-test-repr-server.c

index 18f154d..425cfda 100644 (file)
@@ -18,7 +18,7 @@
 #include <errno.h>
 #include <glib.h>
 
-#include "iotcon-constant.h"
+#include "iotcon-types.h"
 #include "ic-common.h"
 #include "ic-log.h"
 #include "ic-utils.h"
index 3b5cb8c..18e0986 100644 (file)
@@ -18,7 +18,7 @@
 
 #include <glib.h>
 
-#include "iotcon-constant.h"
+#include "iotcon-types.h"
 
 #define IC_EQUAL 0
 #define IC_STR_EQUAL 0
index 5def41a..8eef6f9 100644 (file)
@@ -20,7 +20,7 @@
 
 #include <octypes.h>
 
-#include "iotcon-constant.h"
+#include "iotcon-types.h"
 #include "ic-utils.h"
 #include "icd.h"
 #include "icd-ioty-type.h"
index fb3daf9..fa04cf7 100644 (file)
@@ -18,8 +18,6 @@
 
 #include <octypes.h>
 
-#include "iotcon-constant.h"
-
 OCConnectivityType icd_ioty_conn_type_to_oic_conn_type(int conn_type);
 
 int icd_ioty_transport_flag_to_conn_type(OCTransportAdapter adapter,
index 5686638..2f6c0ec 100644 (file)
@@ -16,6 +16,8 @@
 #ifndef __IOT_CONNECTIVITY_MANAGER_LIBRARY_DEVICE_H__
 #define __IOT_CONNECTIVITY_MANAGER_LIBRARY_DEVICE_H__
 
+#include "iotcon-types.h"
+
 struct icl_device_info {
        char *device_name;
        char *spec_ver;
index 2c05ff5..78631f5 100644 (file)
@@ -17,9 +17,7 @@
 #include <stdlib.h>
 #include <errno.h>
 
-#include "iotcon-struct.h"
-#include "iotcon-constant.h"
-#include "iotcon-representation.h"
+#include "iotcon-types.h"
 #include "icl.h"
 #include "icl-state.h"
 #include "icl-representation.h"
index 24f1fe0..573c39c 100644 (file)
@@ -18,7 +18,7 @@
 
 #include <glib.h>
 
-#include "iotcon-struct.h"
+#include "iotcon-types.h"
 #include "icl-value.h"
 
 struct icl_list_s {
index b494af0..54f6f13 100644 (file)
@@ -20,7 +20,7 @@
 #include <errno.h>
 #include <glib.h>
 
-#include "iotcon.h"
+#include "iotcon-types.h"
 #include "ic-utils.h"
 #include "icl.h"
 #include "icl-dbus.h"
index 7a59d4f..162d6c7 100644 (file)
@@ -17,7 +17,7 @@
 #include <errno.h>
 #include <glib.h>
 
-#include "iotcon-struct.h"
+#include "iotcon-types.h"
 #include "icl.h"
 #include "icl-observation.h"
 
index d9ec2e8..da808a2 100644 (file)
@@ -17,6 +17,7 @@
 #define __IOT_CONNECTIVITY_MANAGER_LIBRARY_OBSERVATION_H__
 
 #include <glib.h>
+#include "iotcon-types.h"
 
 struct icl_observers {
        GList *observers_list;
index 1a569d1..00fa3c2 100644 (file)
@@ -16,9 +16,8 @@
 #include <stdlib.h>
 #include <errno.h>
 #include <glib.h>
-#include <tizen_type.h>
 
-#include "iotcon-struct.h"
+#include "iotcon-types.h"
 #include "ic-utils.h"
 #include "icl.h"
 #include "icl-options.h"
index 4dbf3b9..f755f87 100644 (file)
@@ -17,7 +17,7 @@
 #define __IOT_CONNECTIVITY_MANAGER_LIBRARY_OPTIONS_H__
 
 #include <glib.h>
-#include "iotcon-struct.h"
+#include "iotcon-types.h"
 
 struct icl_options {
        int ref_count;
index f4132fd..4fb8e51 100644 (file)
@@ -20,7 +20,7 @@
 #include <errno.h>
 #include <glib.h>
 
-#include "iotcon.h"
+#include "iotcon-types.h"
 #include "iotcon-internal.h"
 #include "ic-utils.h"
 #include "icl.h"
index 709a2ab..3041511 100644 (file)
@@ -19,9 +19,8 @@
 #include <string.h>
 #include <errno.h>
 #include <glib.h>
-#include <tizen_type.h>
 
-#include "iotcon-struct.h"
+#include "iotcon-types.h"
 #include "ic-utils.h"
 #include "icl.h"
 #include "icl-resource-types.h"
index fd3e9f8..da43699 100644 (file)
@@ -17,6 +17,7 @@
 #define __IOT_CONNECTIVITY_MANAGER_LIBRARY_QUERY_H__
 
 #include <glib.h>
+#include "iotcon-types.h"
 
 /**
  * @brief The maximum length which can be held in a query.
index 7325587..238e4bb 100644 (file)
@@ -18,9 +18,8 @@
 #include <string.h>
 #include <errno.h>
 #include <glib.h>
-#include <tizen_type.h>
 
-#include "iotcon.h"
+#include "iotcon-types.h"
 #include "ic-utils.h"
 #include "icl.h"
 #include "icl-options.h"
index 8f9b4af..514c86e 100644 (file)
 #define __IOT_CONNECTIVITY_MANAGER_LIBRARY_CLIENT_H__
 
 #include <stdint.h>
-#include <glib.h>
 #include <gio/gio.h>
-#include "iotcon.h"
+
+#include "iotcon-types.h"
+#include "iotcon-remote-resource.h"
+
 #include "icl-options.h"
 
 #define ICL_REMOTE_RESOURCE_DEFAULT_TIME_INTERVAL 10 /* 10 sec */
index d5b20ee..a3c0d8d 100644 (file)
 #include <errno.h>
 #include <limits.h>
 #include <glib.h>
-#include <tizen_type.h>
 
-#include "iotcon-struct.h"
-#include "iotcon-representation.h"
+#include "iotcon-types.h"
 #include "ic-utils.h"
 #include "icl.h"
 #include "icl-resource.h"
index 85f3283..71e5381 100644 (file)
 #define __IOT_CONNECTIVITY_MANAGER_LIBRARY_REPRESENTATION_H__
 
 #include <glib.h>
-#include <tizen_type.h>
 
-#include "iotcon-struct.h"
+#include "iotcon-types.h"
 #include "icl-value.h"
 
+struct icl_state_s {
+       int ref_count;
+       GHashTable *hash_table;
+};
+
 struct icl_representation_s {
        char *uri_path;
        int ref_count;
@@ -32,11 +36,6 @@ struct icl_representation_s {
        struct icl_state_s *state;
 };
 
-struct icl_state_s {
-       int ref_count;
-       GHashTable *hash_table;
-};
-
 void icl_representation_inc_ref_count(iotcon_representation_h val);
 
 void icl_state_clone_foreach(char *key, iotcon_value_h src_val, iotcon_state_h dest_state);
index da1794d..64d62a2 100644 (file)
@@ -13,8 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#include "iotcon-struct.h"
-#include "iotcon-constant.h"
+#include "iotcon-types.h"
 #include "icl.h"
 #include "icl-request.h"
 
index c2cba92..997e263 100644 (file)
@@ -17,8 +17,7 @@
 #define __IOT_CONNECTIVITY_MANAGER_LIBRARY_REQUEST_H__
 
 #include <stdint.h>
-#include "iotcon-struct.h"
-#include "iotcon-constant.h"
+#include "iotcon-types.h"
 
 struct icl_observe_info {
        iotcon_observe_type_e action;
index 01209c8..e78306b 100644 (file)
@@ -18,8 +18,7 @@
 #include <errno.h>
 #include <glib.h>
 
-#include "iotcon-struct.h"
-#include "iotcon-constant.h"
+#include "iotcon-types.h"
 #include "ic-utils.h"
 #include "icl.h"
 #include "icl-resource-types.h"
index 11050e3..c493a24 100644 (file)
@@ -17,7 +17,7 @@
 #define __IOT_CONNECTIVITY_MANAGER_LIBRARY_RESOURCE_TYPES_H__
 
 #include <glib.h>
-#include "iotcon-struct.h"
+#include "iotcon-types.h"
 #include "icl-query.h"
 
 /**
index 11ec1f3..a9aac20 100644 (file)
@@ -17,7 +17,9 @@
 #define __IOT_CONNECTIVITY_MANAGER_LIBRARY_RESOURCE_H__
 
 #include <stdint.h>
-#include "iotcon.h"
+
+#include "iotcon-types.h"
+
 #include "icl-dbus.h"
 
 /**
index 6a67c9b..403db65 100644 (file)
@@ -17,8 +17,7 @@
 #define __IOT_CONNECTIVITY_MANAGER_LIBRARY_RESPONSE_H__
 
 #include <stdint.h>
-#include "iotcon-struct.h"
-#include "iotcon-constant.h"
+#include "iotcon-types.h"
 
 typedef enum {
        ICL_VISIBILITY_NONE = 0,
index dec8867..3ff2a00 100644 (file)
@@ -16,9 +16,7 @@
 #include <stdlib.h>
 #include <glib.h>
 
-#include "iotcon-struct.h"
-#include "iotcon-constant.h"
-#include "iotcon-representation.h"
+#include "iotcon-types.h"
 #include "ic-utils.h"
 #include "icl.h"
 #include "icl-list.h"
index 93ba958..0cfa0c1 100644 (file)
@@ -16,9 +16,8 @@
 #ifndef __IOT_CONNECTIVITY_MANAGER_LIBRARY_STATE_H__
 #define __IOT_CONNECTIVITY_MANAGER_LIBRARY_STATE_H__
 
-#include "iotcon-struct.h"
-#include "iotcon-constant.h"
 #include "icl-value.h"
+#include "icl-representation.h"
 
 void icl_state_inc_ref_count(iotcon_state_h val);
 int icl_state_dec_ref_count(iotcon_state_h val);
index c4dd78e..aa7a1c4 100644 (file)
@@ -17,7 +17,7 @@
 #include <stdlib.h>
 #include <errno.h>
 
-#include "iotcon-struct.h"
+#include "iotcon-types.h"
 #include "iotcon-representation.h"
 #include "ic-utils.h"
 #include "icl.h"
index 870e7df..79085b8 100644 (file)
@@ -17,9 +17,8 @@
 #define __IOT_CONNECTIVITY_MANAGER_LIBRARY_VALUE_H__
 
 #include <glib.h>
-#include <tizen_type.h>
 
-#include "iotcon-struct.h"
+#include "iotcon-types.h"
 
 struct icl_value_s {
        int type;
index 0a169a8..8a071bb 100644 (file)
@@ -16,7 +16,7 @@
 #ifndef __IOT_CONNECTIVITY_MANAGER_CLIENT_H__
 #define __IOT_CONNECTIVITY_MANAGER_CLIENT_H__
 
-#include <iotcon-constant.h>
+#include <iotcon-types.h>
 #include <iotcon-remote-resource.h>
 
 /**
index 0489f5a..055bd07 100644 (file)
 #ifndef __IOT_CONNECTIVITY_MANAGER_CONSTANT_H__
 #define __IOT_CONNECTIVITY_MANAGER_CONSTANT_H__
 
-#include <tizen_type.h>
+#include <iotcon-types.h>
 
 /**
  * @file iotcon-constant.h
  */
 
 /**
- * @ingroup CAPI_IOT_CONNECTIVITY_MODULE
- * @defgroup CAPI_IOT_CONNECTIVITY_COMMON_MODULE Common
- *
- * @brief Iotcon Common API provides the set of definitions to use server and client API.
- *
- * @section CAPI_IOT_CONNECTIVITY_COMMON_MODULE_HEADER Header
- *  \#include <iotcon.h>
- *
- * @section CAPI_IOT_CONNECTIVITY_COMMON_MODULE_OVERVIEW Overview
- * This API set consists of data structures for
- * @ref CAPI_IOT_CONNECTIVITY_COMMON_RESOURCE_TYPES_MODULE,
- * @ref CAPI_IOT_CONNECTIVITY_COMMON_QUERY_MODULE,
- * @ref CAPI_IOT_CONNECTIVITY_COMMON_OPTIONS_MODULE,
- * @ref CAPI_IOT_CONNECTIVITY_COMMON_REPRESENTATION_MODULE,
- * @ref CAPI_IOT_CONNECTIVITY_COMMON_REPRESENTATION_STATE_MODULE,
- * @ref CAPI_IOT_CONNECTIVITY_COMMON_REPRESENTATION_STATE_LIST_MODULE,
- * @ref CAPI_IOT_CONNECTIVITY_COMMON_RESPONSE_MODULE.
+ * @addtogroup CAPI_IOT_CONNECTIVITY_COMMON_MODULE
  *
  * @{
  */
 
 /**
- * @brief The handle of resource.
- * @details @a iotcon_resource_h is an opaque data structure to represent registered
- * resource by server. A resource has host_address, uri_path, resource types, interfaces
- * and internal handle. If observable attribute of resource is true, client can observe
- * this resource. When client request by CRUD functions, handler will be invoked
- * if registered. It could contain other resource as children.
- *
- * @since_tizen 3.0
- */
-typedef struct icl_resource* iotcon_resource_h;
-
-/**
- * @brief The handle of lite resource.
- * @details @a iotcon_lite_resource_h is an opaque data structure to represent registered
- * resource by server. A resource has host_address, uri_path, resource types, and internal
- * handle. If observable attribute of resource is true, client can observe
- * this resource.
- *
- * @since_tizen 3.0
- */
-typedef struct icl_lite_resource* iotcon_lite_resource_h;
-
-/**
-* @brief The handle of response
-* @details @a iotcon_response_h is an opaque data structure to respond to client.
-* @a 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 The handle of observers.
- * @details The list of observer ids.
- *
- * @since_tizen 3.0
- */
-typedef struct icl_observers* iotcon_observers_h;
-
-/**
-* @brief The handle of request
-* @details @a iotcon_request_h is an opaque data structure to request to a particular resource.
-* @a 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 The handle of remote resource
- * @details When Client success to find out resource from remote server,
- * server's resource information is reorganized as @a iotcon_remote_resource_h by Iotcon.
- * Client can request CRUD to server by using this.
- * @a iotcon_remote_resource_h is an opaque data structure to have host_address, uri_path,
- * resource types, interfaces, options and device id.
- * If observable attribute is true, remote resource is observable.
- * When you observe remote resource, observe_handle will be set.
- *
- * @since_tizen 3.0
- */
-typedef struct icl_remote_resource* iotcon_remote_resource_h;
-
-/**
- * @brief The handle of presence.
- * @details @a iotcon_presence_h is a handle of presence subscription.
- * It is used to cancel presence.
- *
- * @since_tizen 3.0
- */
-typedef struct icl_presence* iotcon_presence_h;
-
-/**
- * @brief The handle of presence response.
- * @details @a iotcon_presence_response_h is a handle of presence response subscription.\n
- * It is used to get the information of presence response from server.
- *
- * @since_tizen 3.0
- */
-typedef struct icl_presence_response* iotcon_presence_response_h;
-
-/**
- * @brief The handle of device information.
- * @details @a iotcon_device_info_h is a handle of device information.
- *
- * @since_tizen 3.0
- */
-typedef struct icl_device_info* iotcon_device_info_h;
-
-/**
- * @brief The handle of platform information.
- * @details @a iotcon_platform_info_h is a handle of platform information.
- *
- * @since_tizen 3.0
- */
-typedef struct icl_platform_info* iotcon_platform_info_h;
-
-/**
- * @brief The handle of tizen device information.
- * @details @a iotcon_tizen_info_h is a handle of tizen device information.
- *
- * @since_tizen 3.0
- */
-typedef struct icl_tizen_info* iotcon_tizen_info_h;
-
-/**
- * @brief The handle of resource types
- * @details @a iotcon_resource_types_h is an opaque data structure to have list
- * of resource types. A resource type is datatype of string.
- *
- * @since_tizen 3.0
- */
-typedef struct icl_resource_types* iotcon_resource_types_h;
-
-/**
- * @brief The handle of options
- * @details @a iotcon_options_h is an opaque data structure to have attribute value map
- * which consists of a key and a value.
- * Datatype of key is integer and value is string.
- *
- * @since_tizen 3.0
- */
-typedef struct icl_options* iotcon_options_h;
-
-/**
- * @brief The handle of query
- * @details @a iotcon_query_h is an opaque data structure to have attribute value map
- * which consists of key and value.
- * Data ype of both key and value are string.
- * @a iotcon_query_h also have length.
- * The length is total length of all keys and values of map.
- * The length should be less than or equal to 64.
- *
- * @since_tizen 3.0
- */
-typedef struct icl_query* iotcon_query_h;
-
-/**
- * @brief The handle of representation.
- * @details @a iotcon_representation_h is an opaque data structure to have uri_path,
- * list of resource types and interfaces.
- * It could contain other representation as children.
- *
- * @since_tizen 3.0
- */
-typedef struct icl_representation_s* iotcon_representation_h;
-
-/**
- * @brief The handle of list which is consist of iotcon_value_h type values.
- * @details @a iotcon_list_h is an opaque data structure.
- *
- * @since_tizen 3.0
- */
-typedef struct icl_list_s* iotcon_list_h;
-
-/**
- * @brief The handle of state.
- * @details @a iotcon_state_h is an opaque data structure to have attribute value map.
- * Attribute value map consists of a key and a value.
- * Datatype of the key is string and the value should be one of them #IOTCON_TYPE_INT,
- * #IOTCON_TYPE_BOOL, #IOTCON_TYPE_DOUBLE, #IOTCON_TYPE_STR, #IOTCON_TYPE_NULL,
- * #IOTCON_TYPE_LIST and #IOTCON_TYPE_STATE
- *
- * @since_tizen 3.0
- */
-typedef struct icl_state_s* iotcon_state_h;
-
-/**
  * @brief The IP Address for multicast.
  *
  * @since_tizen 3.0
index a4b7bb4..9d3061e 100644 (file)
@@ -16,8 +16,7 @@
 #ifndef __IOT_CONNECTIVITY_MANAGER_STRUCT_LIST_H__
 #define __IOT_CONNECTIVITY_MANAGER_STRUCT_LIST_H__
 
-#include <tizen_type.h>
-#include <iotcon-constant.h>
+#include <iotcon-types.h>
 
 /**
  * @file iotcon-list.h
index a7b4cf0..6267778 100644 (file)
@@ -16,7 +16,7 @@
 #ifndef __IOT_CONNECTIVITY_MANAGER_SERVER_LITE_RESOURCE_H__
 #define __IOT_CONNECTIVITY_MANAGER_SERVER_LITE_RESOURCE_H__
 
-#include <iotcon-constant.h>
+#include <iotcon-types.h>
 
 /**
  * @file iotcon-lite-resource.h
index ff1507d..4cc1e90 100644 (file)
@@ -16,7 +16,7 @@
 #ifndef __IOT_CONNECTIVITY_MANAGER_SERVER_OBSERVERS_H__
 #define __IOT_CONNECTIVITY_MANAGER_SERVER_OBSERVERS_H__
 
-#include <iotcon-constant.h>
+#include <iotcon-types.h>
 
 /**
  * @file iotcon-observers.h
index e69eda4..d69b297 100644 (file)
@@ -16,8 +16,7 @@
 #ifndef __IOT_CONNECTIVITY_MANAGER_STRUCT_OPTIONS_H__
 #define __IOT_CONNECTIVITY_MANAGER_STRUCT_OPTIONS_H__
 
-#include <stdbool.h>
-#include <iotcon-constant.h>
+#include <iotcon-types.h>
 
 /**
  * @file iotcon-options.h
index a242ae8..a62a36e 100644 (file)
@@ -16,8 +16,7 @@
 #ifndef __IOT_CONNECTIVITY_MANAGER_STRUCT_QUERY_H__
 #define __IOT_CONNECTIVITY_MANAGER_STRUCT_QUERY_H__
 
-#include <stdbool.h>
-#include <iotcon-constant.h>
+#include <iotcon-types.h>
 
 /**
  * @file iotcon-query.h
index 8c47ece..81bcbbf 100644 (file)
@@ -16,8 +16,7 @@
 #ifndef __IOT_CONNECTIVITY_MANAGER_CLIENT_REMOTE_RESOURCE_H__
 #define __IOT_CONNECTIVITY_MANAGER_CLIENT_REMOTE_RESOURCE_H__
 
-#include <tizen_type.h>
-#include <iotcon-constant.h>
+#include <iotcon-types.h>
 
 /**
  * @file iotcon-remote-resource.h
index 5167799..ac9942b 100644 (file)
@@ -16,7 +16,7 @@
 #ifndef __IOT_CONNECTIVITY_MANAGER_STRUCT_REPRESENTATION_H__
 #define __IOT_CONNECTIVITY_MANAGER_STRUCT_REPRESENTATION_H__
 
-#include <iotcon-constant.h>
+#include <iotcon-types.h>
 
 /**
  * @file iotcon-representation.h
index 24fd208..8a53b4b 100644 (file)
@@ -16,7 +16,7 @@
 #ifndef __IOT_CONNECTIVITY_MANAGER_SERVER_REQUEST_H__
 #define __IOT_CONNECTIVITY_MANAGER_SERVER_REQUEST_H__
 
-#include <iotcon-constant.h>
+#include <iotcon-types.h>
 
 /**
  * @file iotcon-request.h
index 6b156bd..785046b 100644 (file)
@@ -16,8 +16,7 @@
 #ifndef __IOT_CONNECTIVITY_MANAGER_STRUCT_RESOURCE_TYPES_H__
 #define __IOT_CONNECTIVITY_MANAGER_STRUCT_RESOURCE_TYPES_H__
 
-#include <stdbool.h>
-#include <iotcon-constant.h>
+#include <iotcon-types.h>
 
 /**
  * @file iotcon-resource-types.h
index 7f43359..ab0ce45 100644 (file)
@@ -16,8 +16,7 @@
 #ifndef __IOT_CONNECTIVITY_MANAGER_SERVER_RESOURCE_H__
 #define __IOT_CONNECTIVITY_MANAGER_SERVER_RESOURCE_H__
 
-#include <tizen_type.h>
-#include <iotcon-constant.h>
+#include <iotcon-types.h>
 
 /**
  * @file iotcon-resource.h
index 03c960b..6dc5bb1 100644 (file)
@@ -16,7 +16,7 @@
 #ifndef __IOT_CONNECTIVITY_MANAGER_COMMON_RESPONSE_H__
 #define __IOT_CONNECTIVITY_MANAGER_COMMON_RESPONSE_H__
 
-#include <iotcon-constant.h>
+#include <iotcon-types.h>
 
 /**
  * @file iotcon-response.h
index 87bca68..7e8fc2a 100644 (file)
@@ -16,8 +16,7 @@
 #ifndef __IOT_CONNECTIVITY_MANAGER_STRUCT_STATE_H__
 #define __IOT_CONNECTIVITY_MANAGER_STRUCT_STATE_H__
 
-#include <tizen_type.h>
-#include <iotcon-constant.h>
+#include <iotcon-types.h>
 
 /**
  * @file iotcon-state.h
diff --git a/lib/include/iotcon-struct.h b/lib/include/iotcon-struct.h
deleted file mode 100644 (file)
index 1729c8c..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * 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 __IOT_CONNECTIVITY_MANAGER_STRUCT_H__
-#define __IOT_CONNECTIVITY_MANAGER_STRUCT_H__
-
-#include <iotcon-resource-types.h>
-#include <iotcon-options.h>
-#include <iotcon-query.h>
-#include <iotcon-list.h>
-#include <iotcon-state.h>
-#include <iotcon-representation.h>
-
-/**
- * @file iotcon-struct.h
- */
-
-#endif /* __IOT_CONNECTIVITY_MANAGER_STRUCT_H__ */
diff --git a/lib/include/iotcon-types.h b/lib/include/iotcon-types.h
new file mode 100644 (file)
index 0000000..e3bb8ec
--- /dev/null
@@ -0,0 +1,231 @@
+/*
+ * 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 __IOT_CONNECTIVITY_MANAGER_TYPES_H__
+#define __IOT_CONNECTIVITY_MANAGER_TYPES_H__
+
+#include <tizen_type.h>
+
+#include <iotcon-constant.h>
+
+/**
+ * @file iotcon-types.h
+ */
+
+
+/**
+ * @ingroup CAPI_IOT_CONNECTIVITY_MODULE
+ * @defgroup CAPI_IOT_CONNECTIVITY_COMMON_MODULE Common
+ *
+ * @brief Iotcon Common API provides the set of definitions to use server and client API.
+ *
+ * @section CAPI_IOT_CONNECTIVITY_COMMON_MODULE_HEADER Header
+ *  \#include <iotcon.h>
+ *
+ * @section CAPI_IOT_CONNECTIVITY_COMMON_MODULE_OVERVIEW Overview
+ * This API set consists of data structures for
+ * @ref CAPI_IOT_CONNECTIVITY_COMMON_RESOURCE_TYPES_MODULE,
+ * @ref CAPI_IOT_CONNECTIVITY_COMMON_QUERY_MODULE,
+ * @ref CAPI_IOT_CONNECTIVITY_COMMON_OPTIONS_MODULE,
+ * @ref CAPI_IOT_CONNECTIVITY_COMMON_REPRESENTATION_MODULE,
+ * @ref CAPI_IOT_CONNECTIVITY_COMMON_REPRESENTATION_STATE_MODULE,
+ * @ref CAPI_IOT_CONNECTIVITY_COMMON_REPRESENTATION_STATE_LIST_MODULE,
+ * @ref CAPI_IOT_CONNECTIVITY_COMMON_RESPONSE_MODULE.
+ *
+ * @{
+ */
+
+/**
+ * @brief The handle of resource.
+ * @details @a iotcon_resource_h is an opaque data structure to represent registered
+ * resource by server. A resource has host_address, uri_path, resource types, interfaces
+ * and internal handle. If observable attribute of resource is true, client can observe
+ * this resource. When client request by CRUD functions, handler will be invoked
+ * if registered. It could contain other resource as children.
+ *
+ * @since_tizen 3.0
+ */
+typedef struct icl_resource* iotcon_resource_h;
+
+/**
+ * @brief The handle of lite resource.
+ * @details @a iotcon_lite_resource_h is an opaque data structure to represent registered
+ * resource by server. A resource has host_address, uri_path, resource types, and internal
+ * handle. If observable attribute of resource is true, client can observe
+ * this resource.
+ *
+ * @since_tizen 3.0
+ */
+typedef struct icl_lite_resource* iotcon_lite_resource_h;
+
+/**
+* @brief The handle of response
+* @details @a iotcon_response_h is an opaque data structure to respond to client.
+* @a 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 The handle of observers.
+ * @details The list of observer ids.
+ *
+ * @since_tizen 3.0
+ */
+typedef struct icl_observers* iotcon_observers_h;
+
+/**
+* @brief The handle of request
+* @details @a iotcon_request_h is an opaque data structure to request to a particular resource.
+* @a 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 The handle of remote resource
+ * @details When Client success to find out resource from remote server,
+ * server's resource information is reorganized as @a iotcon_remote_resource_h by Iotcon.
+ * Client can request CRUD to server by using this.
+ * @a iotcon_remote_resource_h is an opaque data structure to have host_address, uri_path,
+ * resource types, interfaces, options and device id.
+ * If observable attribute is true, remote resource is observable.
+ * When you observe remote resource, observe_handle will be set.
+ *
+ * @since_tizen 3.0
+ */
+typedef struct icl_remote_resource* iotcon_remote_resource_h;
+
+/**
+ * @brief The handle of presence.
+ * @details @a iotcon_presence_h is a handle of presence subscription.
+ * It is used to cancel presence.
+ *
+ * @since_tizen 3.0
+ */
+typedef struct icl_presence* iotcon_presence_h;
+
+/**
+ * @brief The handle of presence response.
+ * @details @a iotcon_presence_response_h is a handle of presence response subscription.\n
+ * It is used to get the information of presence response from server.
+ *
+ * @since_tizen 3.0
+ */
+typedef struct icl_presence_response* iotcon_presence_response_h;
+
+/**
+ * @brief The handle of device information.
+ * @details @a iotcon_device_info_h is a handle of device information.
+ *
+ * @since_tizen 3.0
+ */
+typedef struct icl_device_info* iotcon_device_info_h;
+
+/**
+ * @brief The handle of platform information.
+ * @details @a iotcon_platform_info_h is a handle of platform information.
+ *
+ * @since_tizen 3.0
+ */
+typedef struct icl_platform_info* iotcon_platform_info_h;
+
+/**
+ * @brief The handle of tizen device information.
+ * @details @a iotcon_tizen_info_h is a handle of tizen device information.
+ *
+ * @since_tizen 3.0
+ */
+typedef struct icl_tizen_info* iotcon_tizen_info_h;
+
+/**
+ * @brief The handle of resource types
+ * @details @a iotcon_resource_types_h is an opaque data structure to have list
+ * of resource types. A resource type is datatype of string.
+ *
+ * @since_tizen 3.0
+ */
+typedef struct icl_resource_types* iotcon_resource_types_h;
+
+/**
+ * @brief The handle of options
+ * @details @a iotcon_options_h is an opaque data structure to have attribute value map
+ * which consists of a key and a value.
+ * Datatype of key is integer and value is string.
+ *
+ * @since_tizen 3.0
+ */
+typedef struct icl_options* iotcon_options_h;
+
+/**
+ * @brief The handle of query
+ * @details @a iotcon_query_h is an opaque data structure to have attribute value map
+ * which consists of key and value.
+ * Data ype of both key and value are string.
+ * @a iotcon_query_h also have length.
+ * The length is total length of all keys and values of map.
+ * The length should be less than or equal to 64.
+ *
+ * @since_tizen 3.0
+ */
+typedef struct icl_query* iotcon_query_h;
+
+/**
+ * @brief The handle of representation.
+ * @details @a iotcon_representation_h is an opaque data structure to have uri_path,
+ * list of resource types and interfaces.
+ * It could contain other representation as children.
+ *
+ * @since_tizen 3.0
+ */
+typedef struct icl_representation_s* iotcon_representation_h;
+
+/**
+ * @brief The handle of list which is consist of iotcon_value_h type values.
+ * @details @a iotcon_list_h is an opaque data structure.
+ *
+ * @since_tizen 3.0
+ */
+typedef struct icl_list_s* iotcon_list_h;
+
+/**
+ * @brief The handle of state.
+ * @details @a iotcon_state_h is an opaque data structure to have attribute value map.
+ * Attribute value map consists of a key and a value.
+ * Datatype of the key is string and the value should be one of them #IOTCON_TYPE_INT,
+ * #IOTCON_TYPE_BOOL, #IOTCON_TYPE_DOUBLE, #IOTCON_TYPE_STR, #IOTCON_TYPE_NULL,
+ * #IOTCON_TYPE_LIST and #IOTCON_TYPE_STATE
+ *
+ * @since_tizen 3.0
+ */
+typedef struct icl_state_s* iotcon_state_h;
+
+/**
+ * @}
+ */
+
+#include <iotcon-list.h>
+#include <iotcon-query.h>
+#include <iotcon-state.h>
+#include <iotcon-options.h>
+#include <iotcon-representation.h>
+#include <iotcon-resource-types.h>
+
+#endif /* __IOT_CONNECTIVITY_MANAGER_TYPES_H__ */
index 6985fd5..b3e37a2 100644 (file)
 extern "C" {
 #endif
 
-#include <tizen_type.h>
-
-#include <iotcon-constant.h>
+#include <iotcon-types.h>
 #include <iotcon-errors.h>
-#include <iotcon-struct.h>
 #include <iotcon-server.h>
 #include <iotcon-client.h>
 
index b8c59b0..0baf4ea 100644 (file)
@@ -16,7 +16,6 @@
 
 #include <stdlib.h>
 #include <glib.h>
-#include <tizen_type.h>
 
 #include <iotcon.h>
 #include <iotcon-internal.h>
index 7c3868b..c43237a 100644 (file)
@@ -16,7 +16,6 @@
 
 #include <stdlib.h>
 #include <glib.h>
-#include <tizen_type.h>
 
 #include <iotcon.h>
 #include <iotcon-internal.h>
index 049b30b..404b7b3 100644 (file)
@@ -16,7 +16,7 @@
 
 #include <stdlib.h>
 #include <glib.h>
-#include <tizen_type.h>
+
 #include <iotcon.h>
 #include "test.h"