Tizen Native API  6.5

IoTCon Common API provides the set of definitions to use server and client API.

Header

#include <iotcon.h>

Overview

This API set consists of data structures for Resource Types, Query, Options, Representation, State, List, Response.

Typedefs

typedef struct icl_resource * iotcon_resource_h
 The resource handle.
typedef struct icl_lite_resource * iotcon_lite_resource_h
 The lite resource handle.
typedef struct
icl_resource_response * 
iotcon_response_h
 The response handle.
typedef struct icl_observers * iotcon_observers_h
 The observers handle.
typedef struct
icl_resource_request * 
iotcon_request_h
 The request handle.
typedef struct
icl_remote_resource * 
iotcon_remote_resource_h
 The remote resource handle.
typedef struct icl_presence * iotcon_presence_h
 The presence handle.
typedef struct
icl_presence_response * 
iotcon_presence_response_h
 The presence response handle.
typedef struct icl_device_info * iotcon_device_info_h
 The device information handle.
typedef struct icl_platform_info * iotcon_platform_info_h
 The platform information handle.
typedef struct
icl_resource_ifaces * 
iotcon_resource_interfaces_h
 The resource interface handle.
typedef struct icl_resource_types * iotcon_resource_types_h
 The resource types handle.
typedef struct icl_options * iotcon_options_h
 The options handle.
typedef struct icl_query * iotcon_query_h
 The query handle.
typedef struct
icl_representation_s * 
iotcon_representation_h
 The representation handle.
typedef struct icl_list_s * iotcon_list_h
 The iotcon_value_h type values list handle.
typedef struct icl_attributes_s * iotcon_attributes_h
 The attributes handle.

Defines

#define IOTCON_MULTICAST_ADDRESS   NULL
 Definition for the IP Address for multicast.
#define IOTCON_FUNC_STOP   false
 Definition for using this value as the return value to stop foreach function.
#define IOTCON_FUNC_CONTINUE   true
 Definition for using this value as the return value to continue foreach function.
#define IOTCON_INTERFACE_DEFAULT   "oic.if.baseline"
 Definition for the default Interface.
#define IOTCON_INTERFACE_LINK   "oic.if.ll"
 Definition for using List Links Interface which is used to list the references to other resources contained in a resource.
#define IOTCON_INTERFACE_BATCH   "oic.if.b"
 Definition for the Batch Interface which is used to manipulate (GET, PUT, POST, DELETE) on other resource contained in a resource.
#define IOTCON_INTERFACE_GROUP   "oic.mi.grp"
 Definition for the Group Interface which is used to manipulate (GET, PUT, POST) a group of remote resources.
#define IOTCON_INTERFACE_READONLY   "oic.if.r"
 Definition for the Read-Only Interface which is used to limit the methods that can be applied to a resource to GET only.

Define Documentation

#define IOTCON_FUNC_CONTINUE   true

Definition for using this value as the return value to continue foreach function.

Since :
3.0
#define IOTCON_FUNC_STOP   false

Definition for using this value as the return value to stop foreach function.

Since :
3.0
#define IOTCON_INTERFACE_BATCH   "oic.if.b"

Definition for the Batch Interface which is used to manipulate (GET, PUT, POST, DELETE) on other resource contained in a resource.

Since :
3.0
#define IOTCON_INTERFACE_DEFAULT   "oic.if.baseline"

Definition for the default Interface.

Since :
3.0
#define IOTCON_INTERFACE_GROUP   "oic.mi.grp"

Definition for the Group Interface which is used to manipulate (GET, PUT, POST) a group of remote resources.

Since :
3.0
#define IOTCON_INTERFACE_LINK   "oic.if.ll"

Definition for using List Links Interface which is used to list the references to other resources contained in a resource.

Since :
3.0
#define IOTCON_INTERFACE_READONLY   "oic.if.r"

Definition for the Read-Only Interface which is used to limit the methods that can be applied to a resource to GET only.

Since :
3.0
#define IOTCON_MULTICAST_ADDRESS   NULL

Definition for the IP Address for multicast.

Since :
3.0

Typedef Documentation

typedef struct icl_attributes_s* iotcon_attributes_h

The attributes handle.

iotcon_attributes_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_ATTRIBUTES.

Since :
3.0
typedef struct icl_device_info* iotcon_device_info_h

The device information handle.

iotcon_device_info_h is a handle of device information.

Since :
3.0
typedef struct icl_list_s* iotcon_list_h

The iotcon_value_h type values list handle.

iotcon_list_h is an opaque data structure.

Since :
3.0
typedef struct icl_lite_resource* iotcon_lite_resource_h

The lite resource handle.

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 :
3.0
typedef struct icl_observers* iotcon_observers_h

The observers handle.

The list of observer IDs.

Since :
3.0
typedef struct icl_options* iotcon_options_h

The options handle.

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 an integer and value is string.

Since :
3.0
typedef struct icl_platform_info* iotcon_platform_info_h

The platform information handle.

iotcon_platform_info_h is a handle of platform information.

Since :
3.0
typedef struct icl_presence* iotcon_presence_h

The presence handle.

iotcon_presence_h is a handle of presence subscription. It is used to cancel presence.

Since :
3.0
typedef struct icl_presence_response* iotcon_presence_response_h

The presence response handle.

iotcon_presence_response_h is a handle of presence response subscription.
It is used to get the information of presence response from server.

Since :
3.0
typedef struct icl_query* iotcon_query_h

The query handle.

iotcon_query_h is an opaque data structure to have attribute value map which consists of key and value. Datatype of both key and value are string. 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 :
3.0
typedef struct icl_remote_resource* iotcon_remote_resource_h

The remote resource handle.

When Client is successful to find out resource from remote server, server's resource information is reorganized as iotcon_remote_resource_h by IoTCon. Client can request CRUD to server by using this. 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 :
3.0
typedef struct icl_representation_s* iotcon_representation_h

The representation handle.

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 :
3.0
typedef struct icl_resource_request* iotcon_request_h

The request handle.

iotcon_request_h is an opaque data structure to request to a particular resource. iotcon_request_h is a data type of client's request which consists of header options, query, representation.

Since :
3.0
typedef struct icl_resource* iotcon_resource_h

The resource handle.

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 requests by CRUD functions, handler will be invoked if registered. It could contain other resource as children.

Since :
3.0
typedef struct icl_resource_ifaces* iotcon_resource_interfaces_h

The resource interface handle.

iotcon_resource_interfaces_h is an opaque data structure to have list of resource interfaces. A resource interface is datatype of string.

Since :
3.0
typedef struct icl_resource_types* iotcon_resource_types_h

The resource types handle.

iotcon_resource_types_h is an opaque data structure to have list of resource types. A resource type is datatype of string.

Since :
3.0
typedef struct icl_resource_response* iotcon_response_h

The response handle.

iotcon_response_h is an opaque data structure to respond to client. iotcon_response_h is a data type of server's response which consists of result, header options, query, representation.

Since :
3.0

Enumeration Type Documentation

Enumeration for connectivities which can be held in a resource.

Remarks:
IOTCON_CONNECTIVITY_PREFER_UDP and IOTCON_CONNECTIVITY_PREFER_TCP should be mutually exclusive.
IOTCON_CONNECTIVITY_IPV4_ONLY and IOTCON_CONNECTIVITY_IPV6_ONLY should be mutually exclusive.
Since :
3.0
Enumerator:
IOTCON_CONNECTIVITY_ALL 

Indicates all connectivities

IOTCON_CONNECTIVITY_IP 

Indicates Internet Protocol connectivity

IOTCON_CONNECTIVITY_PREFER_UDP 

It is related to IOTCON_CONNECTIVITY_IP, and it indicates UDP is preferred

IOTCON_CONNECTIVITY_PREFER_TCP 

It is related to IOTCON_CONNECTIVITY_IP, and it indicates TCP is preferred

IOTCON_CONNECTIVITY_IPV4_ONLY 

When this bit is set with IOTCON_CONNECTIVITY_IP, resources are discovered for IPv4

IOTCON_CONNECTIVITY_IPV6_ONLY 

When this bit is set with IOTCON_CONNECTIVITY_IP, resources are discovered for IPv6

Enumeration for properties of device information.

Since :
3.0
Enumerator:
IOTCON_DEVICE_INFO_NAME 

Indicates human friendly name for device

IOTCON_DEVICE_INFO_SPEC_VER 

Indicates spec version of the core specification

IOTCON_DEVICE_INFO_ID 

Indicates unique identifier for OCF device

IOTCON_DEVICE_INFO_DATA_MODEL_VER 

Indicates version of the specs this device data model is implemented to

Enumeration for policy of observation.

Since :
3.0
Enumerator:
IOTCON_OBSERVE_IGNORE_OUT_OF_ORDER 

Indicates observation request for most up-to-date notifications only

IOTCON_OBSERVE_ACCEPT_OUT_OF_ORDER 

Indicates observation request for all notifications including state notifications

Enumeration for type of observation.

Since :
3.0
Enumerator:
IOTCON_OBSERVE_NO_TYPE 

Indicates no option

IOTCON_OBSERVE_REGISTER 

Indicates action of registering observation

IOTCON_OBSERVE_DEREGISTER 

Indicates action of unregistering observation

Enumeration for properties of platform information.

Since :
3.0
Enumerator:
IOTCON_PLATFORM_INFO_ID 

Indicates platform identifier

IOTCON_PLATFORM_INFO_MANUF_NAME 

Indicates name of manufacturer

IOTCON_PLATFORM_INFO_MANUF_URL 

Indicates URL to manufacturer

IOTCON_PLATFORM_INFO_MODEL_NUMBER 

Indicates model number as designated by manufacturer

IOTCON_PLATFORM_INFO_DATE_OF_MANUF 

Indicates manufacturing date of device

IOTCON_PLATFORM_INFO_PLATFORM_VER 

Indicates version of platform defined by manufacturer

IOTCON_PLATFORM_INFO_OS_VER 

Indicates version of platform resident OS

IOTCON_PLATFORM_INFO_HARDWARE_VER 

Indicates version of platform hardware

IOTCON_PLATFORM_INFO_FIRMWARE_VER 

Indicates version of device firmware

IOTCON_PLATFORM_INFO_SUPPORT_URL 

Indicates URL that points to support information from manufacturer

IOTCON_PLATFORM_INFO_SYSTEM_TIME 

Indicates reference time for the device

Enumeration for result of presence.

Since :
3.0
Enumerator:
IOTCON_PRESENCE_OK 

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

Enumeration for operation of presence response.

Since :
3.0
Enumerator:
IOTCON_PRESENCE_RESOURCE_CREATED 

Indicates for resource creation operation of server

IOTCON_PRESENCE_RESOURCE_UPDATED 

Indicates for resource update operation of server

IOTCON_PRESENCE_RESOURCE_DESTROYED 

Indicates for resource destruction operation of server

Enumeration for quality of service.

Since :
3.0
Enumerator:
IOTCON_QOS_LOW 

Indicates low quality of service

IOTCON_QOS_HIGH 

Indicates high quality of service

Enumeration for states of remote resource.

Since :
3.0
Enumerator:
IOTCON_REMOTE_RESOURCE_ALIVE 

Indicates remote resource is alive

IOTCON_REMOTE_RESOURCE_LOST_SIGNAL 

Indicates remote resource is lost

Enumeration for type of request.

Since :
3.0
Enumerator:
IOTCON_REQUEST_UNKNOWN 

Indicates none

IOTCON_REQUEST_GET 

Indicates get method of request

IOTCON_REQUEST_PUT 

Indicates put method of request

IOTCON_REQUEST_POST 

Indicates post method of request

IOTCON_REQUEST_DELETE 

Indicates delete method of request

Enumeration for policy which can be held in a resource.

Since :
3.0
Enumerator:
IOTCON_RESOURCE_NO_POLICY 

Indicates resource uninitialized

IOTCON_RESOURCE_DISCOVERABLE 

Indicates resource that is allowed to be discovered

IOTCON_RESOURCE_OBSERVABLE 

Indicates resource that is allowed to be observed

IOTCON_RESOURCE_ACTIVE 

Indicates resource initialized and activated

IOTCON_RESOURCE_SLOW 

Indicates resource which takes some delay to respond

IOTCON_RESOURCE_SECURE 

Indicates secure resource

IOTCON_RESOURCE_EXPLICIT_DISCOVERABLE 

When this bit is set, the resource is allowed to be discovered only if discovery request contains an explicit querystring.

Enumeration for result of response.

Since :
3.0
Enumerator:
IOTCON_RESPONSE_OK 

Indicates result of response for success

IOTCON_RESPONSE_ERROR 

Indicates result of response for error

IOTCON_RESPONSE_RESOURCE_CREATED 

Indicates result of response for resource creation

IOTCON_RESPONSE_RESOURCE_DELETED 

Indicates result of response for resource deletion

IOTCON_RESPONSE_RESOURCE_CHANGED 

Indicates result of response for resource change

IOTCON_RESPONSE_SLOW 

Indicates result of response for slow resource

IOTCON_RESPONSE_FORBIDDEN 

Indicates result of response for accessing unauthorized resource

Enumeration for types of representation that is possible to have.

Since :
3.0
Enumerator:
IOTCON_TYPE_NONE 

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_BYTE_STR 

Indicates for representation that have byte string type

IOTCON_TYPE_NULL 

Indicates for representation that have null type

IOTCON_TYPE_LIST 

Indicates for representation that have list type

IOTCON_TYPE_ATTRIBUTES 

Indicates for representation that have another representation type