#define IC_OBSERVE_ID_MAX_LEN 256
-#define IC_FEATURE_OIC "http://tizen.org/feature/iot.oic"
-
#define IC_IOTY_COAP "coap://"
#define IC_IOTY_COAPS "coaps://"
#define IC_IOTY_MULTICAST_ADDRESS "224.0.1.187:5683"
if (IOTCON_RESOURCE_EXPLICIT_DISCOVERABLE & properties)
prop |= OC_EXPLICIT_DISCOVERABLE;
- // TODO: Secure option is not supported yet.
- properties = (properties & OC_SECURE) ? (properties ^ OC_SECURE) : properties;
-
return prop;
}
#ifdef TZ_VER_3
-static int _ic_oic_feature_supported = -1;
+static int _ic_oic_feature = -1;
+static const char *IC_FEATURE_OIC = "http://tizen.org/feature/iot.oic";
+
+static int _ic_oic_security_feature = -1;
+static const char *IC_FEATURE_OIC_SECURITY = "http://tizen.org/feature/iot.oic.security";
#endif
// TODO: Can't access in user side daemon
return true;
}
-bool ic_utils_check_oic_feature_supported()
+bool ic_utils_check_oic_feature()
{
#ifdef TZ_VER_3
- if (_ic_oic_feature_supported < 0) {
+ if (_ic_oic_feature < 0) {
bool feature_supported = false;
system_info_get_platform_bool(IC_FEATURE_OIC, &feature_supported);
- _ic_oic_feature_supported = feature_supported ? 1 : 0;
+ _ic_oic_feature = feature_supported ? 1 : 0;
+ }
+ return _ic_oic_feature;
+#else
+ return true;
+#endif
+}
+
+bool ic_utils_check_oic_security_feature()
+{
+#ifdef TZ_VER_3
+ if (_ic_oic_security_feature < 0) {
+ bool feature_supported = false;
+ system_info_get_platform_bool(IC_FEATURE_OIC_SECURITY, &feature_supported);
+ _ic_oic_security_feature = feature_supported ? 1 : 0;
}
- return _ic_oic_feature_supported;
+ return _ic_oic_security_feature;
#else
return true;
#endif
char* ic_utils_strdup(const char *src);
bool ic_utils_check_permission(int permssion);
-bool ic_utils_check_oic_feature_supported();
+bool ic_utils_check_oic_feature();
+bool ic_utils_check_oic_security_feature();
int ic_utils_get_platform_info(OCPlatformInfo *platform_info);
void ic_utils_free_platform_info(OCPlatformInfo *platform_info);
API int iotcon_device_info_get_property(iotcon_device_info_h device_info,
iotcon_device_info_e property, char **value)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == device_info, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == value, IOTCON_ERROR_INVALID_PARAMETER);
{
int ret;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(false == ic_utils_check_permission(IC_PERMISSION_INTERNET),
IOTCON_ERROR_PERMISSION_DENIED);
RETV_IF(NULL == cb, IOTCON_ERROR_INVALID_PARAMETER);
API int iotcon_platform_info_get_property(iotcon_platform_info_h platform_info,
iotcon_platform_info_e property, char **value)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == platform_info, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == value, IOTCON_ERROR_INVALID_PARAMETER);
{
int ret;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(false == ic_utils_check_permission(IC_PERMISSION_INTERNET),
IOTCON_ERROR_PERMISSION_DENIED);
RETV_IF(NULL == cb, IOTCON_ERROR_INVALID_PARAMETER);
API int iotcon_polling_get_interval(int *interval)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == interval, IOTCON_ERROR_INVALID_PARAMETER);
*interval = icl_ioty_polling_interval;
API int iotcon_polling_set_interval(int interval)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(interval <= ICL_IOTY_TIME_INTERVAL_MIN, IOTCON_ERROR_INVALID_PARAMETER);
icl_ioty_polling_interval = interval;
API int iotcon_polling_invoke(void)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
ic_utils_mutex_lock(IC_UTILS_MUTEX_POLLING);
ic_utils_cond_signal(IC_UTILS_COND_POLLING);
RETV_IF(NULL == ctx, OC_STACK_KEEP_TRANSACTION);
RETV_IF(NULL == resp, OC_STACK_KEEP_TRANSACTION);
+ RETVM_IF(OC_STACK_UNAUTHORIZED_REQ == resp->result, OC_STACK_KEEP_TRANSACTION,
+ "No Authorization");
RETV_IF(NULL == resp->payload, OC_STACK_KEEP_TRANSACTION);
if (PAYLOAD_TYPE_DEVICE != resp->payload->type) {
RETV_IF(NULL == ctx, OC_STACK_KEEP_TRANSACTION);
RETV_IF(NULL == resp, OC_STACK_KEEP_TRANSACTION);
+ RETVM_IF(OC_STACK_UNAUTHORIZED_REQ == resp->result, OC_STACK_KEEP_TRANSACTION,
+ "No Authorization");
RETV_IF(NULL == resp->payload, OC_STACK_KEEP_TRANSACTION);
if (PAYLOAD_TYPE_PLATFORM != resp->payload->type) {
RETV_IF(NULL == ctx, OC_STACK_KEEP_TRANSACTION);
RETV_IF(NULL == resp, OC_STACK_KEEP_TRANSACTION);
+ if (OC_STACK_UNAUTHORIZED_REQ == resp->result) {
+ ERR("No Authorization");
+ return OC_STACK_KEEP_TRANSACTION;
+ }
+
cb_result = (OC_OBSERVE_DEREGISTER == resp->sequenceNumber) ?
OC_STACK_DELETE_TRANSACTION : OC_STACK_KEEP_TRANSACTION;
cb_container->timeout = 0;
}
+ if (OC_STACK_UNAUTHORIZED_REQ == resp->result) {
+ ERR("No Authorization");
+ if (cb_container->cb) {
+ cb_container->cb(cb_container->resource, IOTCON_ERROR_IOTIVITY,
+ cb_container->req_type, NULL, cb_container->user_data);
+ }
+ return OC_STACK_DELETE_TRANSACTION;
+ }
+
if (NULL == resp->payload) {
ERR("payload is empty(%d)", resp->result);
if (cb_container->cb) {
#include <stdlib.h>
#include <errno.h>
#include <pthread.h>
+#include <errno.h>
#include <glib.h>
#include <octypes.h>
#include <ocstack.h>
static int icl_remote_resource_time_interval = IC_REMOTE_RESOURCE_DEFAULT_TIME_INTERVAL;
static GHashTable *icl_monitoring_table;
static GHashTable *icl_caching_table;
+static char icl_svr_db_file[PATH_MAX];
+static OCPersistentStorage icl_ioty_ps;
void icl_ioty_deinit(pthread_t thread)
ERR("OCStop() Fail(%d)", result);
}
+static FILE* _icl_ioty_ps_fopen(const char *path, const char *mode)
+{
+ return fopen(icl_svr_db_file, mode);
+}
+
+int icl_ioty_set_persistent_storage(const char *file_path)
+{
+ FN_CALL;
+ OCStackResult result;
+
+ if (-1 == access(file_path, R_OK | W_OK)) {
+ ERR("access() Fail(%d)", errno);
+ return IOTCON_ERROR_PERMISSION_DENIED;
+ }
+
+ snprintf(icl_svr_db_file, sizeof(icl_svr_db_file), "%s", file_path);
+ SECURE_DBG("icl_svr_db_file : %s", icl_svr_db_file);
+
+ icl_ioty_ps.open = _icl_ioty_ps_fopen;
+ icl_ioty_ps.read = fread;
+ icl_ioty_ps.write = fwrite;
+ icl_ioty_ps.close = fclose;
+ icl_ioty_ps.unlink = unlink;
+
+ result = OCRegisterPersistentStorageHandler(&icl_ioty_ps);
+ if (OC_STACK_OK != result) {
+ ERR("OCRegisterPersistentStorageHandler() Fail(%d)", result);
+ return IOTCON_ERROR_IOTIVITY;
+ }
+
+ return IOTCON_ERROR_NONE;
+}
+
int icl_ioty_init(pthread_t *out_thread)
{
FN_CALL;
return ret;
}
+ if (IOTCON_RESOURCE_SECURE & resource->properties)
+ dev_addr.flags |= OC_FLAG_SECURE;
+
/* options */
if (resource->header_options && resource->header_options->hash) {
ret = icl_ioty_convert_header_options(resource->header_options, oic_options,
return ret;
}
+ if (IOTCON_RESOURCE_SECURE & resource->properties)
+ dev_addr.flags |= OC_FLAG_SECURE;
+
/* representation */
if (repr) {
ret = icl_ioty_convert_representation(repr, &payload);
void icl_ioty_deinit(pthread_t thread);
int icl_ioty_init(pthread_t *out_thread);
+int icl_ioty_set_persistent_storage(const char *file_path);
+
int icl_ioty_set_device_info(const char *device_name);
int icl_ioty_set_platform_info();
{
iotcon_list_h list;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == ret_list, IOTCON_ERROR_INVALID_PARAMETER);
if (type < IOTCON_TYPE_INT || IOTCON_TYPE_STATE < type) {
{
iotcon_value_h value;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == list, IOTCON_ERROR_INVALID_PARAMETER);
RETVM_IF(IOTCON_TYPE_INT != list->type, IOTCON_ERROR_INVALID_TYPE, "Invalid Type(%d)",
list->type);
{
iotcon_value_h value;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == list, IOTCON_ERROR_INVALID_PARAMETER);
RETVM_IF(IOTCON_TYPE_BOOL != list->type, IOTCON_ERROR_INVALID_TYPE,
"Invalid Type(%d)", list->type);
{
iotcon_value_h value;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == list, IOTCON_ERROR_INVALID_PARAMETER);
RETVM_IF(IOTCON_TYPE_DOUBLE != list->type, IOTCON_ERROR_INVALID_TYPE,
"Invalid Type(%d)", list->type);
{
iotcon_value_h value;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == list, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == val, IOTCON_ERROR_INVALID_PARAMETER);
RETVM_IF(IOTCON_TYPE_STR != list->type, IOTCON_ERROR_INVALID_TYPE,
{
iotcon_value_h value;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == list, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == val, IOTCON_ERROR_INVALID_PARAMETER);
RETVM_IF(IOTCON_TYPE_BYTE_STR != list->type, IOTCON_ERROR_INVALID_TYPE,
{
iotcon_value_h value;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == list, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == val, IOTCON_ERROR_INVALID_PARAMETER);
RETVM_IF(IOTCON_TYPE_LIST != list->type, IOTCON_ERROR_INVALID_TYPE,
{
iotcon_value_h value;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == list, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == val, IOTCON_ERROR_INVALID_PARAMETER);
RETVM_IF(IOTCON_TYPE_STATE != list->type, IOTCON_ERROR_INVALID_TYPE,
int ival, ret;
iotcon_value_h value;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == list, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == list->list, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == val, IOTCON_ERROR_INVALID_PARAMETER);
bool bval;
iotcon_value_h value;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == list, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == list->list, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == val, IOTCON_ERROR_INVALID_PARAMETER);
double dbval;
iotcon_value_h value;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == list, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == list->list, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == val, IOTCON_ERROR_INVALID_PARAMETER);
char *strval;
iotcon_value_h value;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == list, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == list->list, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == val, IOTCON_ERROR_INVALID_PARAMETER);
int ret, byte_len;
iotcon_value_h value;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == list, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == list->list, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == val, IOTCON_ERROR_INVALID_PARAMETER);
iotcon_value_h value;
iotcon_list_h list_val;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == src, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == src->list, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == dest, IOTCON_ERROR_INVALID_PARAMETER);
iotcon_value_h value;
iotcon_state_h state_val;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == list, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == list->list, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == state, IOTCON_ERROR_INVALID_PARAMETER);
{
iotcon_value_h value;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == list, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == list->list, IOTCON_ERROR_INVALID_PARAMETER);
API int iotcon_list_get_type(iotcon_list_h list, iotcon_type_e *type)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == list, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == type, IOTCON_ERROR_INVALID_PARAMETER);
API int iotcon_list_get_length(iotcon_list_h list, unsigned int *length)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == list, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == length, IOTCON_ERROR_INVALID_PARAMETER);
int index = 0;
icl_basic_s *real = NULL;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == list, IOTCON_ERROR_INVALID_PARAMETER);
RETVM_IF(IOTCON_TYPE_INT != list->type, IOTCON_ERROR_INVALID_TYPE, "Invalid Type(%d)",
list->type);
int index = 0;
icl_basic_s *real = NULL;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == list, IOTCON_ERROR_INVALID_PARAMETER);
RETVM_IF(IOTCON_TYPE_BOOL != list->type, IOTCON_ERROR_INVALID_TYPE,
"Invalid Type(%d)", list->type);
int index = 0;
icl_basic_s *real = NULL;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == list, IOTCON_ERROR_INVALID_PARAMETER);
RETVM_IF(IOTCON_TYPE_DOUBLE != list->type, IOTCON_ERROR_INVALID_TYPE,
"Invalid Type(%d)", list->type);
int index = 0;
icl_basic_s *real = NULL;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == list, IOTCON_ERROR_INVALID_PARAMETER);
RETVM_IF(IOTCON_TYPE_STR != list->type, IOTCON_ERROR_INVALID_TYPE, "Invalid Type(%d)",
list->type);
int index = 0;
icl_val_byte_str_s *real = NULL;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == list, IOTCON_ERROR_INVALID_PARAMETER);
RETVM_IF(IOTCON_TYPE_BYTE_STR != list->type, IOTCON_ERROR_INVALID_TYPE,
"Invalid Type(%d)", list->type);
GList *cur = NULL;
icl_val_list_s *real = NULL;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == list, IOTCON_ERROR_INVALID_PARAMETER);
RETVM_IF(IOTCON_TYPE_LIST != list->type, IOTCON_ERROR_INVALID_TYPE,
"Invalid Type(%d)", list->type);
GList *cur = NULL;
icl_val_state_s *real = NULL;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == list, IOTCON_ERROR_INVALID_PARAMETER);
RETVM_IF(IOTCON_TYPE_STATE != list->type, IOTCON_ERROR_INVALID_TYPE,
"Invalid Type(%d)", list->type);
{
int ret;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(false == ic_utils_check_permission(IC_PERMISSION_INTERNET),
IOTCON_ERROR_PERMISSION_DENIED);
RETV_IF(NULL == uri_path, IOTCON_ERROR_INVALID_PARAMETER);
{
int ret, connectivity_type;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(false == ic_utils_check_permission(IC_PERMISSION_INTERNET),
IOTCON_ERROR_PERMISSION_DENIED);
RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER);
{
int ret, connectivity_type;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(false == ic_utils_check_permission(IC_PERMISSION_INTERNET),
IOTCON_ERROR_PERMISSION_DENIED);
RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER);
API int iotcon_lite_resource_get_state(iotcon_lite_resource_h resource,
iotcon_state_h *state)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == state, IOTCON_ERROR_INVALID_PARAMETER);
API int iotcon_observers_create(iotcon_observers_h *ret_observers)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == ret_observers, IOTCON_ERROR_INVALID_PARAMETER);
iotcon_observers_h observers = calloc(1, sizeof(struct icl_observers));
API int iotcon_observers_add(iotcon_observers_h observers, int obs_id)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == observers, IOTCON_ERROR_INVALID_PARAMETER);
observers->observers_list = g_list_append(observers->observers_list,
API int iotcon_observers_remove(iotcon_observers_h observers, int obs_id)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == observers, IOTCON_ERROR_INVALID_PARAMETER);
observers->observers_list = g_list_remove(observers->observers_list,
{
iotcon_options_h options;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == ret_options, IOTCON_ERROR_INVALID_PARAMETER);
options = calloc(1, sizeof(struct icl_options));
API int iotcon_options_add(iotcon_options_h options, unsigned short id,
const char *data)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == options, IOTCON_ERROR_INVALID_PARAMETER);
RETVM_IF(1 < options->ref_count, IOTCON_ERROR_INVALID_PARAMETER,
"Don't modify it. It is already set.");
{
gboolean is_removed;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == options, IOTCON_ERROR_INVALID_PARAMETER);
RETVM_IF(1 < options->ref_count, IOTCON_ERROR_INVALID_PARAMETER,
"Don't modify it. It is already set.");
{
char *value;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == options, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == data, IOTCON_ERROR_INVALID_PARAMETER);
GHashTableIter iter;
gpointer key, value;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == options, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == cb, IOTCON_ERROR_INVALID_PARAMETER);
FN_CALL;
int ret;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(false == ic_utils_check_permission(IC_PERMISSION_INTERNET),
IOTCON_ERROR_PERMISSION_DENIED);
FN_CALL;
int ret;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(false == ic_utils_check_permission(IC_PERMISSION_INTERNET),
IOTCON_ERROR_PERMISSION_DENIED);
FN_CALL;
int ret;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(false == ic_utils_check_permission(IC_PERMISSION_INTERNET),
IOTCON_ERROR_PERMISSION_DENIED);
RETV_IF(NULL == cb, IOTCON_ERROR_INVALID_PARAMETER);
FN_CALL;
int ret, connectivity_type;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(false == ic_utils_check_permission(IC_PERMISSION_INTERNET),
IOTCON_ERROR_PERMISSION_DENIED);
RETV_IF(NULL == presence, IOTCON_ERROR_INVALID_PARAMETER);
API int iotcon_presence_get_host_address(iotcon_presence_h presence,
char **host_address)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == presence, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == host_address, IOTCON_ERROR_INVALID_PARAMETER);
API int iotcon_presence_get_connectivity_type(iotcon_presence_h presence,
iotcon_connectivity_type_e *connectivity_type)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == presence, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == connectivity_type, IOTCON_ERROR_INVALID_PARAMETER);
API int iotcon_presence_get_resource_type(iotcon_presence_h presence,
char **resource_type)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == presence, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == resource_type, IOTCON_ERROR_INVALID_PARAMETER);
API int iotcon_presence_response_get_host_address(
iotcon_presence_response_h response, char **host_address)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == response, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == host_address, IOTCON_ERROR_INVALID_PARAMETER);
API int iotcon_presence_response_get_connectivity_type(
iotcon_presence_response_h response, iotcon_connectivity_type_e *connectivity_type)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == response, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == connectivity_type, IOTCON_ERROR_INVALID_PARAMETER);
API int iotcon_presence_response_get_resource_type(
iotcon_presence_response_h response, char **resource_type)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == response, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == resource_type, IOTCON_ERROR_INVALID_PARAMETER);
API int iotcon_presence_response_get_result(iotcon_presence_response_h response,
iotcon_presence_result_e *result)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == response, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == result, IOTCON_ERROR_INVALID_PARAMETER);
API int iotcon_presence_response_get_trigger(iotcon_presence_response_h response,
iotcon_presence_trigger_e *trigger)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == response, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == trigger, IOTCON_ERROR_INVALID_PARAMETER);
{
iotcon_query_h query;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == ret_query, IOTCON_ERROR_INVALID_PARAMETER);
query = calloc(1, sizeof(struct icl_query));
{
char *type;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == query, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == resource_type, IOTCON_ERROR_INVALID_PARAMETER);
{
char *iface = NULL;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == query, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == resource_iface, IOTCON_ERROR_INVALID_PARAMETER);
int length_new = 0;
char *value = NULL;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == query, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(resource_type && (false == icl_resource_check_type(resource_type)),
IOTCON_ERROR_INVALID_PARAMETER);
int length_new = 0;
char *value = NULL;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == query, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(resource_iface && (false == icl_resource_check_interface(resource_iface)),
IOTCON_ERROR_INVALID_PARAMETER);
{
int query_len;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == query, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == key, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == value, IOTCON_ERROR_INVALID_PARAMETER);
int query_len;
char *value;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == query, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == key, IOTCON_ERROR_INVALID_PARAMETER);
{
char *value = NULL;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == query, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == key, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == data, IOTCON_ERROR_INVALID_PARAMETER);
GHashTableIter iter;
gpointer key, value;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == query, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == cb, IOTCON_ERROR_INVALID_PARAMETER);
{
int ret, connectivity_type;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(false == ic_utils_check_permission(IC_PERMISSION_INTERNET),
IOTCON_ERROR_PERMISSION_DENIED);
RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER);
{
int ret, connectivity_type;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(false == ic_utils_check_permission(IC_PERMISSION_INTERNET),
IOTCON_ERROR_PERMISSION_DENIED);
RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER);
iotcon_remote_resource_h resource,
iotcon_representation_h *representation)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == representation, IOTCON_ERROR_INVALID_PARAMETER);
WARN_IF(NULL == resource->cached_repr, "No Cached Representation");
{
int ret, connectivity_type;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(false == ic_utils_check_permission(IC_PERMISSION_INTERNET),
IOTCON_ERROR_PERMISSION_DENIED);
RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER);
{
int ret, connectivity_type;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(false == ic_utils_check_permission(IC_PERMISSION_INTERNET),
IOTCON_ERROR_PERMISSION_DENIED);
RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER);
int ret, connectivity_type;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(false == ic_utils_check_permission(IC_PERMISSION_INTERNET),
IOTCON_ERROR_PERMISSION_DENIED);
RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER);
{
int ret, connectivity_type;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(false == ic_utils_check_permission(IC_PERMISSION_INTERNET),
IOTCON_ERROR_PERMISSION_DENIED);
RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER);
{
int ret, connectivity_type;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(false == ic_utils_check_permission(IC_PERMISSION_INTERNET),
IOTCON_ERROR_PERMISSION_DENIED);
RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER);
{
int ret, connectivity_type;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(false == ic_utils_check_permission(IC_PERMISSION_INTERNET),
IOTCON_ERROR_PERMISSION_DENIED);
RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER);
{
int ret, connectivity_type;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(false == ic_utils_check_permission(IC_PERMISSION_INTERNET),
IOTCON_ERROR_PERMISSION_DENIED);
RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER);
{
int ret, connectivity_type;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(false == ic_utils_check_permission(IC_PERMISSION_INTERNET),
IOTCON_ERROR_PERMISSION_DENIED);
RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER);
{
int ret;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(false == ic_utils_check_permission(IC_PERMISSION_INTERNET),
IOTCON_ERROR_PERMISSION_DENIED);
RETV_IF(NULL == cb, IOTCON_ERROR_INVALID_PARAMETER);
FN_CALL;
iotcon_remote_resource_h resource = NULL;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == host_address, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == uri_path, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(false == icl_resource_check_uri_path(uri_path),
int ret;
iotcon_remote_resource_h resource = NULL;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == src, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == dest, IOTCON_ERROR_INVALID_PARAMETER);
API int iotcon_remote_resource_get_uri_path(iotcon_remote_resource_h resource,
char **uri_path)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == uri_path, IOTCON_ERROR_INVALID_PARAMETER);
API int iotcon_remote_resource_get_host_address(
iotcon_remote_resource_h resource, char **host_address)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == host_address, IOTCON_ERROR_INVALID_PARAMETER);
API int iotcon_remote_resource_get_connectivity_type(
iotcon_remote_resource_h resource, iotcon_connectivity_type_e *connectivity_type)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == connectivity_type, IOTCON_ERROR_INVALID_PARAMETER);
API int iotcon_remote_resource_get_device_id(iotcon_remote_resource_h resource,
char **device_id)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == device_id, IOTCON_ERROR_INVALID_PARAMETER);
RETVM_IF(NULL == resource->device_id, IOTCON_ERROR_NO_DATA,
API int iotcon_remote_resource_get_types(iotcon_remote_resource_h resource,
iotcon_resource_types_h *types)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == types, IOTCON_ERROR_INVALID_PARAMETER);
API int iotcon_remote_resource_get_interfaces(iotcon_remote_resource_h resource,
iotcon_resource_interfaces_h *ifaces)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == ifaces, IOTCON_ERROR_INVALID_PARAMETER);
API int iotcon_remote_resource_get_properties(iotcon_remote_resource_h resource,
int *properties)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == properties, IOTCON_ERROR_INVALID_PARAMETER);
API int iotcon_remote_resource_get_options(iotcon_remote_resource_h resource,
iotcon_options_h *options)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == options, IOTCON_ERROR_INVALID_PARAMETER);
WARN_IF(NULL == resource->header_options, "Not Set header options");
API int iotcon_remote_resource_set_options(iotcon_remote_resource_h resource,
iotcon_options_h options)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER);
if (options)
{
int ret, arg_time_interval;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == time_interval, IOTCON_ERROR_INVALID_PARAMETER);
ret = icl_ioty_remote_resource_get_time_interval(&arg_time_interval);
{
int ret;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(ICL_REMOTE_RESOURCE_MAX_TIME_INTERVAL < time_interval || time_interval <= 0,
IOTCON_ERROR_INVALID_PARAMETER);
{
iotcon_representation_h repr;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == ret_repr, IOTCON_ERROR_INVALID_PARAMETER);
repr = calloc(1, sizeof(struct icl_representation_s));
API int iotcon_representation_get_uri_path(iotcon_representation_h repr,
char **uri_path)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == repr, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == uri_path, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == repr->uri_path, IOTCON_ERROR_NO_DATA);
API int iotcon_representation_set_uri_path(iotcon_representation_h repr,
const char *uri_path)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == repr, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == uri_path, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(false == icl_resource_check_uri_path(uri_path),
API int iotcon_representation_get_resource_types(iotcon_representation_h repr,
iotcon_resource_types_h *types)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == repr, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == types, IOTCON_ERROR_INVALID_PARAMETER);
WARN_IF(NULL == repr->res_types, "Not Set Resource Types");
API int iotcon_representation_set_resource_types(iotcon_representation_h repr,
iotcon_resource_types_h types)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == repr, IOTCON_ERROR_INVALID_PARAMETER);
if (types)
API int iotcon_representation_get_resource_interfaces(iotcon_representation_h repr,
iotcon_resource_interfaces_h *ifaces)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == repr, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == ifaces, IOTCON_ERROR_INVALID_PARAMETER);
WARN_IF(NULL == repr->interfaces, "Not Set Resource Interfaces");
API int iotcon_representation_set_resource_interfaces(
iotcon_representation_h repr, iotcon_resource_interfaces_h ifaces)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == repr, IOTCON_ERROR_INVALID_PARAMETER);
if (ifaces)
API int iotcon_representation_set_state(iotcon_representation_h repr,
iotcon_state_h state)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == repr, IOTCON_ERROR_INVALID_PARAMETER);
if (state)
API int iotcon_representation_get_state(iotcon_representation_h repr,
iotcon_state_h *state)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == repr, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == state, IOTCON_ERROR_INVALID_PARAMETER);
{
iotcon_representation_h repr;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == parent, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == child, IOTCON_ERROR_INVALID_PARAMETER);
API int iotcon_representation_remove_child(iotcon_representation_h parent,
iotcon_representation_h child)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == parent, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == child, IOTCON_ERROR_INVALID_PARAMETER);
{
GList *list, *next;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == parent, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == cb, IOTCON_ERROR_INVALID_PARAMETER);
API int iotcon_representation_get_child_count(iotcon_representation_h parent,
unsigned int *count)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == parent, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == count, IOTCON_ERROR_INVALID_PARAMETER);
{
iotcon_representation_h repr;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == parent, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == child, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(pos < 0, IOTCON_ERROR_INVALID_PARAMETER);
iotcon_resource_interfaces_h ifaces;
iotcon_representation_h cloned_repr, copied_repr;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == src, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == dest, IOTCON_ERROR_INVALID_PARAMETER);
API int iotcon_request_get_host_address(iotcon_request_h request,
char **host_address)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == request, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == host_address, IOTCON_ERROR_INVALID_PARAMETER);
API int iotcon_request_get_connectivity_type(iotcon_request_h request,
iotcon_connectivity_type_e *connectivity_type)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == request, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == connectivity_type, IOTCON_ERROR_INVALID_PARAMETER);
API int iotcon_request_get_representation(iotcon_request_h request,
iotcon_representation_h *repr)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == request, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == repr, IOTCON_ERROR_INVALID_PARAMETER);
API int iotcon_request_get_request_type(iotcon_request_h request,
iotcon_request_type_e *type)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == request, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == type, IOTCON_ERROR_INVALID_PARAMETER);
API int iotcon_request_get_options(iotcon_request_h request,
iotcon_options_h *options)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == request, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == options, IOTCON_ERROR_INVALID_PARAMETER);
WARN_IF(NULL == request->header_options, "Not Set header options");
/* The content of the request should not be freed by user. */
API int iotcon_request_get_query(iotcon_request_h request, iotcon_query_h *query)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == request, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == query, IOTCON_ERROR_INVALID_PARAMETER);
WARN_IF(NULL == request->query, "Not Set query");
API int iotcon_request_get_observe_type(iotcon_request_h request,
iotcon_observe_type_e *observe_type)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == request, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == observe_type, IOTCON_ERROR_INVALID_PARAMETER);
API int iotcon_request_get_observe_id(iotcon_request_h request, int *observe_id)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == request, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == observe_id, IOTCON_ERROR_INVALID_PARAMETER);
{
iotcon_resource_interfaces_h ifaces;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == ret_ifaces, IOTCON_ERROR_INVALID_PARAMETER);
ifaces = calloc(1, sizeof(struct icl_resource_ifaces));
{
char *resource_iface;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == ifaces, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == iface, IOTCON_ERROR_INVALID_PARAMETER);
RETVM_IF(1 < ifaces->ref_count, IOTCON_ERROR_INVALID_PARAMETER,
GList *node;
char *node_data;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == ifaces, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == iface, IOTCON_ERROR_INVALID_PARAMETER);
RETVM_IF(1 < ifaces->ref_count, IOTCON_ERROR_INVALID_PARAMETER,
{
GList *node;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == ifaces, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == cb, IOTCON_ERROR_INVALID_PARAMETER);
char *resource_iface;
iotcon_resource_interfaces_h resource_ifaces;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == src, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == dest, IOTCON_ERROR_INVALID_PARAMETER);
{
iotcon_resource_types_h types;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == ret_types, IOTCON_ERROR_INVALID_PARAMETER);
types = calloc(1, sizeof(struct icl_resource_types));
{
char *resource_type;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == types, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == type, IOTCON_ERROR_INVALID_PARAMETER);
RETVM_IF(1 < types->ref_count, IOTCON_ERROR_INVALID_PARAMETER,
GList *found_node;
char *node_data;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == types, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == type, IOTCON_ERROR_INVALID_PARAMETER);
RETVM_IF(1 < types->ref_count, IOTCON_ERROR_INVALID_PARAMETER,
{
GList *node;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == types, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == cb, IOTCON_ERROR_INVALID_PARAMETER);
char *resource_type;
iotcon_resource_types_h resource_types;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == src, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == dest, IOTCON_ERROR_INVALID_PARAMETER);
{
int ret;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(false == ic_utils_check_permission(IC_PERMISSION_INTERNET),
IOTCON_ERROR_PERMISSION_DENIED);
RETV_IF(NULL == uri_path, IOTCON_ERROR_INVALID_PARAMETER);
FN_CALL;
int ret, connectivity_type;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(false == ic_utils_check_permission(IC_PERMISSION_INTERNET),
IOTCON_ERROR_PERMISSION_DENIED);
RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER);
FN_CALL;
int ret, connectivity_type;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(false == ic_utils_check_permission(IC_PERMISSION_INTERNET),
IOTCON_ERROR_PERMISSION_DENIED);
RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER);
FN_CALL;
int ret, connectivity_type;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(false == ic_utils_check_permission(IC_PERMISSION_INTERNET),
IOTCON_ERROR_PERMISSION_DENIED);
RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER);
API int iotcon_resource_set_request_handler(iotcon_resource_h resource,
iotcon_request_handler_cb cb, void *user_data)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == cb, IOTCON_ERROR_INVALID_PARAMETER);
{
int ret;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(false == ic_utils_check_permission(IC_PERMISSION_INTERNET),
IOTCON_ERROR_PERMISSION_DENIED);
RETV_IF(NULL == parent, IOTCON_ERROR_INVALID_PARAMETER);
{
int ret;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(false == ic_utils_check_permission(IC_PERMISSION_INTERNET),
IOTCON_ERROR_PERMISSION_DENIED);
RETV_IF(NULL == parent, IOTCON_ERROR_INVALID_PARAMETER);
API int iotcon_resource_get_child_count(iotcon_resource_h resource,
unsigned int *count)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == count, IOTCON_ERROR_INVALID_PARAMETER);
{
iotcon_resource_h resource;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == parent, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == child, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(index < 0, IOTCON_ERROR_INVALID_PARAMETER);
/* The content of the resource should not be freed by user. */
API int iotcon_resource_get_uri_path(iotcon_resource_h resource, char **uri_path)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == uri_path, IOTCON_ERROR_INVALID_PARAMETER);
API int iotcon_resource_get_types(iotcon_resource_h resource,
iotcon_resource_types_h *types)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == types, IOTCON_ERROR_INVALID_PARAMETER);
API int iotcon_resource_get_interfaces(iotcon_resource_h resource,
iotcon_resource_interfaces_h *ifaces)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == ifaces, IOTCON_ERROR_INVALID_PARAMETER);
API int iotcon_resource_get_properties(iotcon_resource_h resource, int *properties)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == properties, IOTCON_ERROR_INVALID_PARAMETER);
{
int ret, connectivity_type;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(false == ic_utils_check_permission(IC_PERMISSION_INTERNET),
IOTCON_ERROR_PERMISSION_DENIED);
RETV_IF(NULL == resource, IOTCON_ERROR_INVALID_PARAMETER);
{
FN_CALL;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == request, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == response, IOTCON_ERROR_INVALID_PARAMETER);
API int iotcon_response_get_options(iotcon_response_h resp,
iotcon_options_h *options)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == resp, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == options, IOTCON_ERROR_INVALID_PARAMETER);
WARN_IF(NULL == resp->header_options, "Not Set header options");
API int iotcon_response_get_representation(iotcon_response_h resp,
iotcon_representation_h *repr)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == resp, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == repr, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == resp->repr, IOTCON_ERROR_NO_DATA);
API int iotcon_response_get_result(iotcon_response_h resp,
iotcon_response_result_e *result)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == resp, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == result, IOTCON_ERROR_INVALID_PARAMETER);
API int iotcon_response_set_result(iotcon_response_h resp,
iotcon_response_result_e result)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == resp, IOTCON_ERROR_INVALID_PARAMETER);
if (result < IOTCON_RESPONSE_OK || ICL_RESPONSE_RESULT_MAX <= result) {
API int iotcon_response_set_representation(iotcon_response_h resp,
const char *iface, iotcon_representation_h repr)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == resp, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == iface, IOTCON_ERROR_INVALID_PARAMETER);
API int iotcon_response_set_options(iotcon_response_h resp,
iotcon_options_h options)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == resp, IOTCON_ERROR_INVALID_PARAMETER);
if (options)
FN_CALL;
int ret, connectivity_type;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(false == ic_utils_check_permission(IC_PERMISSION_INTERNET),
IOTCON_ERROR_PERMISSION_DENIED);
RETV_IF(NULL == resp, IOTCON_ERROR_INVALID_PARAMETER);
{
iotcon_state_h state;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == ret_state, IOTCON_ERROR_INVALID_PARAMETER);
state = calloc(1, sizeof(struct icl_state_s));
gboolean ret = FALSE;
iotcon_value_h value = NULL;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == state, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == key, IOTCON_ERROR_INVALID_PARAMETER);
{
iotcon_value_h value;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == state, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == key, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == val, IOTCON_ERROR_INVALID_PARAMETER);
{
iotcon_value_h value;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == state, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == key, IOTCON_ERROR_INVALID_PARAMETER);
icl_basic_s *real = NULL;
iotcon_value_h value = NULL;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == state, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == key, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == val, IOTCON_ERROR_INVALID_PARAMETER);
{
iotcon_value_h value = NULL;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == state, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == key, IOTCON_ERROR_INVALID_PARAMETER);
icl_basic_s *real = NULL;
iotcon_value_h value = NULL;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == state, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == key, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == val, IOTCON_ERROR_INVALID_PARAMETER);
{
iotcon_value_h value = NULL;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == state, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == key, IOTCON_ERROR_INVALID_PARAMETER);
icl_basic_s *real = NULL;
iotcon_value_h value = NULL;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == state, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == key, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == val, IOTCON_ERROR_INVALID_PARAMETER);
{
iotcon_value_h value = NULL;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == state, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == key, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == val, IOTCON_ERROR_INVALID_PARAMETER);
iotcon_value_h value = NULL;
icl_val_byte_str_s *real = NULL;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == state, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == key, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == val, IOTCON_ERROR_INVALID_PARAMETER);
{
iotcon_value_h value = NULL;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == state, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == key, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == val, IOTCON_ERROR_INVALID_PARAMETER);
icl_basic_s *real = NULL;
iotcon_value_h value = NULL;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == state, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == key, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == is_null, IOTCON_ERROR_INVALID_PARAMETER);
{
iotcon_value_h value = NULL;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == state, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == key, IOTCON_ERROR_INVALID_PARAMETER);
iotcon_value_h value = NULL;
icl_val_list_s *real = NULL;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == state, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == key, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == list, IOTCON_ERROR_INVALID_PARAMETER);
{
iotcon_value_h value = NULL;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == state, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == key, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == list, IOTCON_ERROR_INVALID_PARAMETER);
icl_val_state_s *real = NULL;
iotcon_value_h value = NULL;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == src, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == key, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == dest, IOTCON_ERROR_INVALID_PARAMETER);
{
iotcon_value_h value = NULL;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == state, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == key, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == val, IOTCON_ERROR_INVALID_PARAMETER);
{
iotcon_value_h value = NULL;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == state, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == key, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == type, IOTCON_ERROR_INVALID_PARAMETER);
API int iotcon_state_get_keys_count(iotcon_state_h state, unsigned int *count)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == state, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == count, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == state->hash_table, IOTCON_ERROR_INVALID_PARAMETER);
iotcon_state_h temp = NULL;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == state, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == state_clone, IOTCON_ERROR_INVALID_PARAMETER);
GHashTableIter iter;
gpointer key;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == state, IOTCON_ERROR_INVALID_PARAMETER);
RETV_IF(NULL == cb, IOTCON_ERROR_INVALID_PARAMETER);
static int icl_timeout_seconds = ICL_TIMEOUT_DEFAULT;
static int icl_init_count;
+API int iotcon_secure_initialize(const char *file_path)
+{
+ int ret;
+
+ RETV_IF(false == ic_utils_check_oic_security_feature(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_permission((IC_PERMISSION_INTERNET|IC_PERMISSION_NETWORK_GET)),
+ IOTCON_ERROR_PERMISSION_DENIED);
+ // TODO: Consider (NULL == Path)
+ RETV_IF(NULL == file_path, IOTCON_ERROR_INVALID_PARAMETER);
+
+ ret = icl_ioty_set_persistent_storage(file_path);
+ if (IOTCON_ERROR_NONE != ret) {
+ ERR("icl_set_persistent_storage() Fail(%d)", ret);
+ return ret;
+ }
+
+ ret = iotcon_initialize();
+ if (IOTCON_ERROR_NONE != ret) {
+ ERR("iotcon_initialize() Fail(%d)", ret);
+ return ret;
+ }
+
+ return IOTCON_ERROR_NONE;
+}
+
API int iotcon_initialize(void)
{
int ret;
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(false == ic_utils_check_permission((IC_PERMISSION_INTERNET|IC_PERMISSION_NETWORK_GET)),
IOTCON_ERROR_PERMISSION_DENIED);
API int iotcon_get_timeout(int *timeout_seconds)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == timeout_seconds, IOTCON_ERROR_INVALID_PARAMETER);
*timeout_seconds = icl_timeout_seconds;
API int iotcon_set_timeout(int timeout_seconds)
{
- RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
+ RETV_IF(false == ic_utils_check_oic_feature(), IOTCON_ERROR_NOT_SUPPORTED);
if (ICL_TIMEOUT_MAX < timeout_seconds || timeout_seconds <= 0) {
ERR("timeout_seconds(%d) must be in range from 1 to 3600", timeout_seconds);
return IOTCON_ERROR_INVALID_PARAMETER;
* @section CAPI_IOT_CONNECTIVITY_MODULE_FEATURE Related Features
* This API is related with the following features:\n
* - http://tizen.org/feature/iot.oic\n
+ * - http://tizen.org/feature/iot.oic.security\n
*
* It is recommended to design feature related codes in your application for reliability.\n
*
+ * If the feature(http://tizen.org/feature/iot.oic.security) for OIC security architecture
+ * is applied, you MUST call iotcon_secure_initialize() instead of iotcon_initialize().
+ * Then applications communicate with each other based on OIC security architecture.
+ *
* You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.\n
*
* To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n
*/
/**
- * @brief Initializes to the iotcon service.
+ * @brief Initializes IoTCon with secure mode.
+ * @details Call this function to start IoTCon above OIC security architecture.
+ *
+ * @since_tizen 3.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/network.get
+ * @privilege %http://tizen.org/privilege/internet
+ *
+ * @remarks If the device has the feature("http://tizen.org/feature/iot.oic.security"),
+ * you must call this function instead of iotcon_initialize().\n
+ * @a file_path point to a file for handling secure virtual resources.
+ * The file that is CBOR(Concise Binary Object Representation)-format must already exist
+ * in @a file_path. We recommend to use application-local file for @a file_path.\n
+ * You must call iotcon_deinitialize() if IoTCon API is no longer needed.
+ *
+ * @param[in] file_path The file path to point to storage for handling secure virtual resources.
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE Successful
+ * @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #IOTCON_ERROR_IOTIVITY Iotivity errors
+ *
+ * @see iotcon_deinitialize()
+ * @see system_info_get_platform_bool()
+ */
+int iotcon_secure_initialize(const char *file_path);
+
+/**
+ * @brief Initializes IoTCon.
* @details Call this function to start IoTCon.
*
* @since_tizen 3.0
* @privilege %http://tizen.org/privilege/network.get
* @privilege %http://tizen.org/privilege/internet
*
- * @remarks You must free all resources of the IoTCon by calling iotcon_deinitialize()
- * if IoTCon API is no longer needed.
+ * @remarks You must call iotcon_deinitialize() if IoTCon API is no longer needed.
*
* @return 0 on success, otherwise a negative error value.
* @retval #IOTCON_ERROR_NONE Successful
+ * @retval #IOTCON_ERROR_NOT_SUPPORTED Not supported
* @retval #IOTCON_ERROR_PERMISSION_DENIED Permission denied
*
* @see iotcon_deinitialize()
int iotcon_initialize(void);
/**
- * @brief Deinitializes from the iotcon service.
+ * @brief Deinitializes IoTCon.
* @details Frees the resources allocated to IoTCon.
*
* @since_tizen 3.0
* @return void
*
* @see iotcon_initialize()
+ * @see iotcon_secure_initialize()
*/
void iotcon_deinitialize(void);