/** 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
/** MQ Broker URI.*/
#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"
#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 "oic.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 "oic.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. */
#define OC_RSRVD_ACCOUNT_TOKEN_REFRESH_URI "/oic/account/tokenrefresh"
/** ACL group URI.*/
-#define OC_RSRVD_ACL_GROUP_URI "/ocf/acl/group"
+#define OC_RSRVD_ACL_GROUP_URI "/oic/acl/group"
/** ACL invite URI.*/
-#define OC_RSRVD_ACL_INVITE_URI "/ocf/acl/invite"
+#define OC_RSRVD_ACL_INVITE_URI "/oic/acl/invite"
/** Defines auth provider. */
#define OC_RSRVD_AUTHPROVIDER "authprovider"
/** Others. */
OC_OBSERVE_NO_OPTION = 2,
-//#ifdef WITH_MQ
- OC_MQ_SUBSCRIBER = 3,
-
- OC_MQ_UNSUBSCRIBER = 4,
-//#endif
-
} OCObserveAction;
} OCDPDev_t;
//#endif // DIRECT_PAIRING
-/**
- * Type of Group for ACL.
- */
-typedef enum
-{
- GT_PUBLIC = 0,
- GT_PRIVATE,
-} OCAclGroupType;
-
/*
* -------------------------------------------------------------------------------------------
* Callback function definitions
/**
* 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);