*/
OCStackResult AclToCBORPayload(const OicSecAcl_t * acl, uint8_t **outPayload, size_t *size);
+#ifdef MULTIPLE_OWNER
+/**
+ * Function to check the ACL access of SubOwner
+ *
+ * @param[in] uuid SubOwner's UUID
+ * @param[in] cborPayload CBOR payload of ACL
+ * @param[in] size Byte length of cborPayload
+ *
+ * @return ::true for valid access, otherwise invalid access
+ */
+bool IsValidAclAccessForSubOwner(const OicUuid_t* uuid, const uint8_t *cborPayload, const size_t size);
+#endif //MULTIPLE_OWNER
+
+
/**
* This method removes ACE for the subject and resource from the ACL
*
void DeleteACLList(OicSecAcl_t* acl);
/**
+ * This function frees OicSecRsrc_t object's fields and object itself.
+ *
+ * @param rsrc instance of @ref OicSecRsrc_t structure to be deleted.
+ */
+void FreeRsrc(OicSecRsrc_t *rsrc);
+
+/**
* Internal function to duplicate the ACE instance.
*
* @param ace instance of @ref OicSecAce_t structure to be duplicated.
*/
OicSecAce_t* DuplicateACE(const OicSecAce_t* ace);
+
/**
- * This function installs a new ACL.
+ * This function check the duplication with pre-installed ACL and installs only new ACEs.
+ *
+ * @param acl acl to install.
+ *
+ * @return ::OC_STACK_OK for Success, otherwise some error value
+ */
+OCStackResult InstallACL(const OicSecAcl_t* acl);
+
+/**
+ * This function appends 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
*/
-OCStackResult InstallNewACL(const uint8_t* payload, const size_t size);
+OCStackResult AppendACL(const uint8_t* payload, const size_t size);
/**
- * This function installs a new ACL.
+ * This function appends a new ACL.
*
- * @param acl new acl to install.
+ * @param acl new acl to append.
*
* @return ::OC_STACK_OK for Success, otherwise some error value
*/
-OCStackResult InstallNewACL2(const OicSecAcl_t* acl);
+OCStackResult AppendACL2(const OicSecAcl_t* acl);
+
/**
* This function updates default ACE which is required for ownership transfer.
* This function should be invoked after OTM is complete to prevent anonymous user access.
*/
OicSecAcl_t* CBORPayloadToAcl2(const uint8_t *cborPayload, const size_t size);
+/**
+ * This function prints ACL to stdin
+ * For debug purposes only
+ *
+ * @param acl acl to print
+ */
+void printACL(const OicSecAcl_t* acl);
+
#ifdef __cplusplus
}
#endif