/**
* 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.
* @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.
#endif
#endif //IOTVT_SRM_ACLR_H
+
+