/** Resource Type.*/
#define OC_RSRVD_RESOURCE_TYPES_URI "/oic/res/types/d"
-#if defined (ROUTING_GATEWAY) || defined (ROUTING_EP)
+
/** Gateway URI.*/
#define OC_RSRVD_GATEWAY_URI "/oic/gateway"
-#endif
-#ifdef WITH_MQ
/** MQ Broker URI.*/
-#define OC_RSRVD_WELL_KNOWN_MQ_URI "/.well-known/ocf/ps"
-#endif
+#define OC_RSRVD_WELL_KNOWN_MQ_URI "/oic/ps"
-#ifdef WITH_PRESENCE
+
+/** Presence */
/** Presence URI through which the OIC devices advertise their presence.*/
#define OC_RSRVD_PRESENCE_URI "/oic/ad"
-#ifdef WITH_CLOUD
-/** Presence URI through which the OCF devices advertise their device presence.*/
-#define OCF_RSRVD_DEVICE_PRESENCE_URI "/.well-known/ocf/prs"
-#endif
+/** Presence URI through which the OIC devices advertise their device presence.*/
+#define OC_RSRVD_DEVICE_PRESENCE_URI "/oic/prs"
/** Sets the default time to live (TTL) for presence.*/
-#define OC_DEFAULT_PRESENCE_TTL_SECONDS (60)
+#define OC_DEFAULT_PRESENCE_TTL_SECONDS (60)
/** For multicast Discovery mechanism.*/
-#define OC_MULTICAST_DISCOVERY_URI "/oic/res"
+#define OC_MULTICAST_DISCOVERY_URI "/oic/res"
/** Separator for multiple query string.*/
-#define OC_QUERY_SEPARATOR "&;"
+#define OC_QUERY_SEPARATOR "&;"
/**
* OC_DEFAULT_PRESENCE_TTL_SECONDS sets the default time to live (TTL) for presence.
* 60 sec/min * 60 min/hr * 24 hr/day
*/
#define OC_MAX_PRESENCE_TTL_SECONDS (60 * 60 * 24)
-#endif
+
/**
* Presence "Announcement Triggers".
#define OC_RSRVD_OC "oic"
+
/** For payload. */
#define OC_RSRVD_PAYLOAD "payload"
#define OC_RSRVD_RESOURCE_TYPE_PLATFORM "oic.wk.p"
/** To represent resource type with RES.*/
-#define OC_RSRVD_RESOURCE_TYPE_RES "oic.wk.res"
+#define OC_RSRVD_RESOURCE_TYPE_RES "oic.wk.res"
-#ifdef WITH_MQ
/** To represent content type with MQ Broker.*/
-#define OC_RSRVD_RESOURCE_TYPE_MQ_BROKER "ocf.wk.ps"
+#define OC_RSRVD_RESOURCE_TYPE_MQ_BROKER "oic.wk.ps"
/** To represent content type with MQ Topic.*/
-#define OC_RSRVD_RESOURCE_TYPE_MQ_TOPIC "ocf.wk.ps.topic"
-#endif
+#define OC_RSRVD_RESOURCE_TYPE_MQ_TOPIC "oic.wk.ps.topic"
+
/** To represent interface.*/
#define OC_RSRVD_INTERFACE "if"
#define OC_RSRVD_SUPPORT_URL "mnsl"
/** System time for the platform. */
-#define OC_RSRVD_SYSTEM_TIME "st"
+#define OC_RSRVD_SYSTEM_TIME "st"
/**
* Device.
#define OC_RSRVD_DATA_MODEL_VERSION "dmv"
/** Device specification version.*/
-#define OC_SPEC_VERSION "core.1.0.0"
+#define OC_SPEC_VERSION "core.1.0.0"
/** Device Data Model version.*/
-#define OC_DATA_MODEL_VERSION "res.1.0.0"
+#define OC_DATA_MODEL_VERSION "res.1.0.0"
/**
* These provide backward compatibility - their use is deprecated.
#ifndef GOING_AWAY
/** Multicast Prefix.*/
-#define OC_MULTICAST_PREFIX "224.0.1.187:5683"
+#define OC_MULTICAST_PREFIX "224.0.1.187:5683"
/** Multicast IP address.*/
-#define OC_MULTICAST_IP "224.0.1.187"
+#define OC_MULTICAST_IP "224.0.1.187"
/** Multicast Port.*/
-#define OC_MULTICAST_PORT 5683
+#define OC_MULTICAST_PORT (5683)
#endif // GOING_AWAY
/** Max Device address size. */
/** Cloud Account */
/** Account URI.*/
-#define OC_RSRVD_ACCOUNT_URI "/.well-known/ocf/account"
+#define OC_RSRVD_ACCOUNT_URI "/oic/account"
/** Account session URI.*/
-#define OC_RSRVD_ACCOUNT_SESSION_URI "/.well-known/ocf/account/session"
+#define OC_RSRVD_ACCOUNT_SESSION_URI "/oic/account/session"
/** Account token refresh URI.*/
-#define OC_RSRVD_ACCOUNT_TOKEN_REFRESH_URI "/.well-known/ocf/account/tokenrefresh"
+#define OC_RSRVD_ACCOUNT_TOKEN_REFRESH_URI "/oic/account/tokenrefresh"
+
+/** ACL group URI.*/
+#define OC_RSRVD_ACL_GROUP_URI "/oic/acl/group"
+
+/** ACL invite URI.*/
+#define OC_RSRVD_ACL_INVITE_URI "/oic/acl/invite"
/** Defines auth provider. */
#define OC_RSRVD_AUTHPROVIDER "authprovider"
/** Defines user UUID. */
#define OC_RSRVD_USER_UUID "uid"
+/** Defines user ID. */
+#define OC_RSRVD_USER_ID "userid"
+
+/** Defines group ID. */
+#define OC_RSRVD_GROUP_ID "gid"
+
+/** Defines group Master ID. */
+#define OC_RSRVD_GROUP_MASTER_ID "gmid"
+
+/** Defines group type. */
+#define OC_RSRVD_GROUP_TYPE "gtype"
+
+/** Defines member of group ID. */
+#define OC_RSRVD_MEMBER_ID "mid"
+
+/** Defines device ID list. */
+#define OC_RSRVD_DEVICE_ID_LIST "dilist"
+
+/** Defines public. */
+#define OC_RSRVD_PUBLIC "Public"
+
+/** Defines private. */
+#define OC_RSRVD_PRIVATE "Private"
+
+/** Defines options. */
+#define OC_RSRVD_INVITE "invite"
+
/** Defines options. */
#define OC_RSRVD_OPTIONS "options"
/** Others. */
OC_OBSERVE_NO_OPTION = 2,
-//#ifdef WITH_MQ
- OC_MQ_SUBSCRIBER = 3,
-
- OC_MQ_UNSUBSCRIBER = 4,
-//#endif
-
} OCObserveAction;
/**
* Application server implementations must implement this callback to consume requests OTA.
* Entity handler callback needs to fill the resPayload of the entityHandlerRequest.
+ *
+ * When you set specific return value like OC_EH_CHANGED, OC_EH_CONTENT,
+ * OC_EH_SLOW and etc in entity handler callback,
+ * ocstack will be not send response automatically to client
+ * except for error return value like OC_EH_ERROR.
+ *
+ * If you want to send response to client with specific result,
+ * OCDoResponse API should be called with the result value.
+ *
+ * e.g)
+ *
+ * OCEntityHandlerResponse response;
+ *
+ * ..
+ *
+ * response.ehResult = OC_EH_CHANGED;
+ *
+ * ..
+ *
+ * OCDoResponse(&response)
+ *
+ * ..
+ *
+ * return OC_EH_OK;
*/
typedef OCEntityHandlerResult (*OCEntityHandler)
(OCEntityHandlerFlag flag, OCEntityHandlerRequest * entityHandlerRequest, void* callbackParam);
/**
* Device Entity handler need to use this call back instead of OCEntityHandler.
+ *
+ * When you set specific return value like OC_EH_CHANGED, OC_EH_CONTENT,
+ * OC_EH_SLOW and etc in entity handler callback,
+ * ocstack will be not send response automatically to client
+ * except for error return value like OC_EH_ERROR.
+ *
+ * If you want to send response to client with specific result,
+ * OCDoResponse API should be called with the result value.
+ *
+ * e.g)
+ *
+ * OCEntityHandlerResponse response;
+ *
+ * ..
+ *
+ * response.ehResult = OC_EH_CHANGED;
+ *
+ * ..
+ *
+ * OCDoResponse(&response)
+ *
+ * ..
+ *
+ * return OC_EH_OK;
*/
typedef OCEntityHandlerResult (*OCDeviceEntityHandler)
(OCEntityHandlerFlag flag, OCEntityHandlerRequest * entityHandlerRequest, char* uri, void* callbackParam);