X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=resource%2Fcsdk%2Fsecurity%2Finclude%2Finternal%2Faclresource.h;h=7daf51ff47508b65d9c70f1fab86e8d800c9e724;hb=1cee1631595cac6a6394ac2e0b365c6dd5a42c68;hp=5f1ac9de3148bead40aa2af7226edbac1dba5347;hpb=390866079e285d2c74918432c0d597d5da52f8a0;p=platform%2Fupstream%2Fiotivity.git diff --git a/resource/csdk/security/include/internal/aclresource.h b/resource/csdk/security/include/internal/aclresource.h index 5f1ac9d..7daf51f 100644 --- a/resource/csdk/security/include/internal/aclresource.h +++ b/resource/csdk/security/include/internal/aclresource.h @@ -47,9 +47,9 @@ OCStackResult DeInitACLResource(); * * @note On the first call to @ref GetACLResourceData, savePtr should point to NULL. * - * @return reference to @ref OicSecAcl_t if ACL is found, else NULL. + * @return reference to @ref OicSecAce_t if ACE is found, else NULL. */ -const OicSecAcl_t* GetACLResourceData(const OicUuid_t* subjectId, OicSecAcl_t **savePtr); +const OicSecAce_t* GetACLResourceData(const OicUuid_t* subjectId, OicSecAce_t **savePtr); /** * This function converts ACL data into CBOR format. @@ -63,6 +63,19 @@ const OicSecAcl_t* GetACLResourceData(const OicUuid_t* subjectId, OicSecAcl_t ** OCStackResult AclToCBORPayload(const OicSecAcl_t * acl, uint8_t **outPayload, size_t *size); /** + * This method removes ACE for the subject and resource from the ACL + * + * @param subject of the ACE + * @param resource of the ACE + * + * @return + * ::OC_STACK_RESOURCE_DELETED on success + * ::OC_STACK_NO_RESOURCE on failure to find the appropriate ACE + * ::OC_STACK_INVALID_PARAM on invalid parameter + */ +OCStackResult RemoveACE(const OicUuid_t * subject, const char * resource); + +/** * This function deletes ACL data. * * @param acl instance of @ref OicSecAcl_t structure to be deleted. @@ -70,6 +83,14 @@ OCStackResult AclToCBORPayload(const OicSecAcl_t * acl, uint8_t **outPayload, si void DeleteACLList(OicSecAcl_t* acl); /** + * Internal function to duplicate the ACE instance. + * + * @param ace instance of @ref OicSecAce_t structure to be duplicated. + * @return reference to @ref OicSecAce_t if ACE was successfully duplicated. + */ +OicSecAce_t* DuplicateACE(const OicSecAce_t* ace); + +/** * This function installs a new ACL. * * @param payload cbor value representing a new ACL. @@ -80,12 +101,12 @@ void DeleteACLList(OicSecAcl_t* acl); OCStackResult InstallNewACL(const uint8_t* payload, const size_t size); /** - * This function updates default ACL which is required for ownership transfer. + * 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. * * @retval OC_STACK_OK for Success, otherwise some error value */ -OCStackResult UpdateDefaultSecProvACL(); +OCStackResult UpdateDefaultSecProvACE(); /** * Internal function to update resource owner