From e3ca83a775284c1deca4244418d0487e7a13b1ce Mon Sep 17 00:00:00 2001 From: youngman Date: Tue, 3 Nov 2015 17:27:15 +0900 Subject: [PATCH] Add resource type rule Change-Id: I9ace391b36e8b75ab46ffba1779f8516d496fd40 Signed-off-by: youngman --- daemon/icd-ioty.h | 4 ++-- lib/include/iotcon-client.h | 8 ++++++++ lib/include/iotcon-resource-types.h | 4 +++- lib/include/iotcon-resource.h | 4 ++++ 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/daemon/icd-ioty.h b/daemon/icd-ioty.h index 0422544..adf4e8b 100644 --- a/daemon/icd-ioty.h +++ b/daemon/icd-ioty.h @@ -30,8 +30,8 @@ #define ICD_IOTY_COAPS "coaps://" /* TODO Define Tizen Information Resource(uri, resource type) */ -#define ICD_IOTY_TIZEN_INFO_URI "/org/tizen/iot/devInfo" -#define ICD_IOTY_TIZEN_INFO_TYPE "org.tizen.iot.devInfo" +#define ICD_IOTY_TIZEN_INFO_URI "/org/tizen/iot/d" +#define ICD_IOTY_TIZEN_INFO_TYPE "org.tizen.iot.d" #define ICD_IOTY_TIZEN_INFO_DEVICE_NAME "device_name" #define ICD_IOTY_TIZEN_INFO_TIZEN_DEVICE_ID "tizen_device_id" diff --git a/lib/include/iotcon-client.h b/lib/include/iotcon-client.h index 4402be1..4c75664 100644 --- a/lib/include/iotcon-client.h +++ b/lib/include/iotcon-client.h @@ -66,6 +66,10 @@ typedef void (*iotcon_presence_cb)(int result, unsigned int nonce, * @privlevel public * @privilege %http://tizen.org/privilege/internet * + * @remarks The length of @a resource_type should be less than or equal to 61.\n + * The @a resource_type must start with a lowercase alphabetic character, followed by a sequence + * of lowercase alphabetic, numeric, ".", or "-" characters, and contains no white space.\n + * * @param[in] host_address The address or addressable name of the server * @param[in] connectivity_type The connectivity type * @param[in] resource_type A resource type that a client has interested in @@ -146,6 +150,10 @@ typedef void (*iotcon_found_resource_cb)(iotcon_remote_resource_h resource, int * @privlevel public * @privilege %http://tizen.org/privilege/internet * + * @remarks The length of @a resource_type should be less than or equal to 61.\n + * The @a resource_type must start with a lowercase alphabetic character, followed by a sequence + * of lowercase alphabetic, numeric, ".", or "-" characters, and contains no white space.\n + * * @param[in] host_address The address or addressable name of server * @param[in] connectivity_type The connectivity type * @param[in] resource_type The resource type specified as a filter for the resource diff --git a/lib/include/iotcon-resource-types.h b/lib/include/iotcon-resource-types.h index dd5bdf3..02be010 100644 --- a/lib/include/iotcon-resource-types.h +++ b/lib/include/iotcon-resource-types.h @@ -73,7 +73,9 @@ void iotcon_resource_types_destroy(iotcon_resource_types_h types); * @brief Inserts a resource type into the list. * * @since_tizen 3.0 - * @remarks The length of resource type should be less than or equal to 61. \n + * @remarks The length of @a type should be less than or equal to 61.\n + * The @a type must start with a lowercase alphabetic character, followed by a sequence + * of lowercase alphabetic, numeric, ".", or "-" characters, and contains no white space.\n * Duplicate strings are not allowed. * * @param[in] types The handle of the resource types diff --git a/lib/include/iotcon-resource.h b/lib/include/iotcon-resource.h index e36f199..1047b3e 100644 --- a/lib/include/iotcon-resource.h +++ b/lib/include/iotcon-resource.h @@ -177,6 +177,10 @@ int iotcon_resource_bind_interface(iotcon_resource_h resource, iotcon_interface_ * @privlevel public * @privilege %http://tizen.org/privilege/internet * + * @remarks The length of @a resource_type should be less than or equal to 61.\n + * The @a resource_type must start with a lowercase alphabetic character, followed by a sequence + * of lowercase alphabetic, numeric, ".", or "-" characters, and contains no white space.\n + * * @param[in] resource_handle The handle of the resource * @param[in] resource_type The type to be bound to the resource * -- 2.7.4