New APIs for editing resource and interfaces types
[platform/upstream/iotivity.git] / resource / csdk / stack / include / ocstack.h
index 3ee7ec3..897d770 100644 (file)
@@ -379,6 +379,19 @@ OCStackResult OCUnBindResource(OCResourceHandle collectionHandle, OCResourceHand
  */
 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.
  *
@@ -391,6 +404,18 @@ OCStackResult OCBindResourceInterfaceToResource(OCResourceHandle handle,
                                                 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.