Revert back cbor related patches.
[platform/upstream/iotivity.git] / resource / csdk / security / include / internal / aclresource.h
index 97c6716..ccd97ef 100644 (file)
@@ -28,15 +28,16 @@ extern "C" {
 /**
  * Initialize ACL resource by loading data from persistent storage.
  *
- * @return ::OC_STACK_OK for Success, otherwise some error value.
+ * @retval  OC_STACK_OK for Success, otherwise some error value
  */
 OCStackResult InitACLResource();
 
 /**
  * Perform cleanup for ACL resources.
  *
+ * @retval  none
  */
-OCStackResult DeInitACLResource();
+void DeInitACLResource();
 
 /**
  * This method is used by PolicyEngine to retrieve ACL for a Subject.
@@ -45,39 +46,38 @@ OCStackResult DeInitACLResource();
  * @param savePtr is used internally by @ref GetACLResourceData to maintain index between
  *                successive calls for same subjectId.
  *
- * @note On the first call to @ref GetACLResourceData, savePtr should point to NULL.
+ * @retval  reference to @ref OicSecAcl_t if ACL is found, else NULL
  *
- * @return reference to @ref OicSecAcl_t if ACL is found, else NULL.
+ * @note On the first call to @ref GetACLResourceData, savePtr should point to NULL
  */
 const OicSecAcl_t* GetACLResourceData(const OicUuid_t* subjectId, OicSecAcl_t **savePtr);
 
 /**
- * This function converts ACL data into CBOR format.
+ * This function converts ACL data into JSON format.
+ * Caller needs to invoke 'free' when done using
+ * returned string.
+ * @param acl  instance of OicSecAcl_t structure.
  *
- * @param acl instance of @ref OicSecAcl_t structure.
- * @param outPayload is the pointer to allocated memory for cbor payload.
- * @param size of the cbor payload.
- *
- * @return ::OC_STACK_OK for Success, otherwise some error value.
+ * @retval  pointer to ACL in json format.
  */
-OCStackResult AclToCBORPayload(const OicSecAcl_t * acl, uint8_t **outPayload, size_t *size);
+char* BinToAclJSON(const OicSecAcl_t * acl);
+
 
 /**
  * This function deletes ACL data.
  *
- * @param acl instance of @ref OicSecAcl_t structure to be deleted.
+ * @param acl  instance of OicSecAcl_t structure.
  */
 void DeleteACLList(OicSecAcl_t* acl);
 
+
 /**
  * This function installs a new ACL.
+ * @param newJsonStr JSON string representing a new ACL.
  *
- * @param payload cbor value representing a new ACL.
- * @param size of the cbor payload.
- *
- * @return ::OC_STACK_OK for Success, otherwise some error value
+ * @retval  OC_STACK_OK for Success, otherwise some error value
  */
-OCStackResult InstallNewACL(const uint8_t* payload, const size_t size);
+OCStackResult InstallNewACL(const char* newJsonStr);
 
 /**
  * This function updates default ACL which is required for ownership transfer.
@@ -92,3 +92,5 @@ OCStackResult UpdateDefaultSecProvACL();
 #endif
 
 #endif //IOTVT_SRM_ACLR_H
+
+