* favor of destination.)
* @param destination Complete description of destination.
* @param payload Encoded request payload,
- OCDoResource will free given payload when return OC_STATUS_OK.
+ * OCDoResource will free given payload.
* @param connectivityType Modifier flags when destination is not given.
* @param qos Quality of service. Note that if this API is called on a uri with the
* well-known multicast IP address, the qos will be forced to ::OC_LOW_QOS
* favor of destination.)
* @param destination Complete description of destination.
* @param payload Encoded request payload.
- OCDoRequest does not free given payload.
+ * OCDoRequest does not free given payload.
* @param connectivityType Modifier flags when destination is not given.
* @param qos Quality of service. Note that if this API is called on a uri with the
* well-known multicast IP address, the qos will be forced to ::OC_LOW_QOS
*/
OCStackResult OCRegisterPersistentStorageHandler(OCPersistentStorage* persistentStorageHandler);
-#ifdef WITH_PRESENCE
/**
* When operating in OCServer or OCClientServer mode,
* this API will start sending out presence notifications to clients via multicast.
*/
OCStackResult OCStopPresence();
-#endif // WITH_PRESENCE
-
/**
* This function sets default device entity handler.
*/
OCStackResult OCBindResourceTypeToResource(OCResourceHandle handle,
const char *resourceTypeName);
+
+/**
+ * This function clears all bound resource types and bind newly passing
+ * resource type to resource.
+ *
+ * @param handle Handle to the resource.
+ * @param newResourceType Name of resource type. Example: "core.led".
+ *
+ * @return ::OC_STACK_OK on success, some other value upon failure.
+ */
+OCStackResult OCResetResourceTypes(OCResourceHandle handle,
+ const char *newResourceType);
+
/**
* This function binds a resource interface to a resource.
*
const char *resourceInterfaceName);
/**
+ * This function clears all bound interfaces and bind newly passing
+ * interface to resource.
+ *
+ * @param handle Handle to the resource.
+ * @param newResourceInterface Name of resource interface. Example: "core.rw".
+ *
+ * @return ::OC_STACK_OK on success, some other value upon failure.
+ */
+OCStackResult OCResetResourceInterfaces(OCResourceHandle handle,
+ const char *newResourceInterface);
+
+/**
* This function binds an entity handler to the resource.
*
* @param handle Handle to the resource that the contained resource is to be bound.
OCSetHeaderOption(OCHeaderOption* ocHdrOpt,
size_t* numOptions,
uint16_t optionID,
- void* optionData,
+ const void* optionData,
size_t optionDataLength);
/**
*/
OCStackResult OCSetOtmEventHandler(void *ctx, OCOtmEventHandler cb);
+ /**
+ * Gets the bool state of "isOp" property on the pstat resource
+ * @param isOp a pointer to be assigned to isop property
+ * @return Returns ::OC_STACK_OK.
+ */
+
+OCStackResult OCGetDeviceOperationalState(bool* isOp);
+
#ifdef __cplusplus
}
#endif // __cplusplus