Imported Upstream version 1.1.1
[platform/upstream/iotivity.git] / resource / csdk / security / provisioning / include / ocprovisioningmanager.h
index f5a057e..a2c1f2a 100644 (file)
@@ -47,7 +47,7 @@ OCStackResult OCInitPM(const char* dbPath);
  * OCMode.\r
  *\r
  * @param[in] timeout Timeout in seconds, value till which function will listen to responses from\r
- *                    client before returning the list of devices.\r
+ *                    server before returning the list of devices.\r
  * @param[out] ppList List of candidate devices to be provisioned\r
  * @return OTM_SUCCESS in case of success and other value otherwise.\r
  */\r
@@ -79,7 +79,7 @@ OCStackResult OCSetOwnerTransferCallbackData(OicSecOxm_t oxm, OTMCallbackData_t*
  * all the device in subnet which are owned by calling provisioning client.\r
  *\r
  * @param[in] timeout Timeout in seconds, value till which function will listen to responses from\r
- *                    client before returning the list of devices.\r
+ *                    server before returning the list of devices.\r
  * @param[out] ppList List of device owned by provisioning tool.\r
  * @return OTM_SUCCESS in case of success and other value otherwise.\r
  */\r
@@ -117,6 +117,43 @@ OCStackResult OCProvisionACL(void *ctx, const OCProvisionDev_t *selectedDeviceIn
                              OCProvisionResultCB resultCallback);\r
 \r
 /**\r
+ * this function requests CRED information to resource.\r
+ *
+ * @param[in] ctx Application context would be returned in result callback.
+ * @param[in] selectedDeviceInfo Selected target device.\r
+ * @param[in] resultCallback callback provided by API user, callback will be called when provisioning
+              request recieves a response from resource server.
+ * @return  OC_STACK_OK in case of success and other value otherwise.
+ */
+OCStackResult OCGetCredResource(void* ctx, const OCProvisionDev_t *selectedDeviceInfo,\r
+                             OCProvisionResultCB resultCallback);\r
+/**
+ * this function requests ACL information to resource.
+ *
+ * @param[in] ctx Application context would be returned in result callback.
+ * @param[in] selectedDeviceInfo Selected target device.
+ * @param[in] resultCallback callback provided by API user, callback will be called when provisioning
+              request recieves a response from resource server.
+ * @return  OC_STACK_OK in case of success and other value otherwise.
+ */
+OCStackResult OCGetACLResource(void* ctx, const OCProvisionDev_t *selectedDeviceInfo,
+                             OCProvisionResultCB resultCallback);
+
+\r
+/**\r
+ * this function sends Direct-Pairing Configuration to a device.\r
+ *\r
+ * @param[in] ctx Application context would be returned in result callback.\r
+ * @param[in] selectedDeviceInfo Selected target device.\r
+ * @param[in] pconf PCONF pointer.\r
+ * @param[in] resultCallback callback provided by API user, callback will be called when provisioning\r
+              request recieves a response from resource server.\r
+ * @return  OC_STACK_OK in case of success and other value otherwise.\r
+ */\r
+OCStackResult OCProvisionDirectPairing(void* ctx, const OCProvisionDev_t *selectedDeviceInfo, OicSecPconf_t *pconf,\r
+                             OCProvisionResultCB resultCallback);\r
+\r
+/**\r
  * API to provision credential to devices.\r
  *\r
  * @param[in] ctx Application context would be returned in result callback.\r
@@ -165,7 +202,24 @@ OCStackResult OCRemoveDevice(void* ctx,
                              unsigned short waitTimeForOwnedDeviceDiscovery,\r
                              const OCProvisionDev_t* pTargetDev,\r
                              OCProvisionResultCB resultCallback);\r
-/**
+\r
+/*\r
+* Function to device revocation\r
+* This function will remove credential of target device from all devices in subnet.\r
+*\r
+* @param[in] ctx Application context would be returned in result callback\r
+* @param[in] waitTimeForOwnedDeviceDiscovery Maximum wait time for owned device discovery.(seconds)\r
+* @param[in] pTargetDev Device information to be revoked.\r
+* @param[in] resultCallback callback provided by API user, callback will be called when\r
+*            credential revocation is finished.\r
+ * @return  OC_STACK_OK in case of success and other value otherwise.\r
+*/\r
+OCStackResult OCRemoveDeviceWithUuid(void* ctx,\r
+                                     unsigned short waitTimeForOwnedDeviceDiscovery,\r
+                                     const OicUuid_t* pTargetUuid,\r
+                                     OCProvisionResultCB resultCallback);\r
+\r
+/**\r
  * API to get status of all the devices in current subnet. The status include endpoint information\r
  * and doxm information which can be extracted duing owned and unowned discovery. Along with this\r
  * information. The API will provide information about devices' status\r
@@ -176,7 +230,8 @@ OCStackResult OCRemoveDevice(void* ctx,
  * variables pOwnedDevList and pUnownedDevList.\r
  *\r
  * @param[in] waitime Wait time for the API. The wait time will be divided by 2, and half of wait time\r
- * will be used for unowned discovery and remaining half for owned discovery.\r
+ * will be used for unowned discovery and remaining half for owned discovery. So the wait time should be
+ * equal to or more than 2.
  * @param[out] pOwnedDevList  list of owned devices.\r
  * @param[out] pUnownedDevList  list of unowned devices.\r
  * @return OC_STACK_OK in case of success and other value otherwise.\r
@@ -216,6 +271,13 @@ void OCDeleteUuidList(OCUuidList_t* pList);
  * @param pAcl Pointer to OicSecAcl_t structure.\r
  */\r
 void OCDeleteACLList(OicSecAcl_t* pAcl);
+\r
+/**\r
+ * This function deletes PDACL data.\r
+ *\r
+ * @param pPdAcl Pointer to OicSecPdAcl_t structure.\r
+ */\r
+void OCDeletePdAclList(OicSecPdAcl_t* pPdAcl);\r
 
 #ifdef __WITH_X509__
 /**