X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=resource%2Fcsdk%2Fsecurity%2Finclude%2Fsecurevirtualresourcetypes.h;h=7b167395941383bc72d641b998479b8ac6c22456;hb=1cee1631595cac6a6394ac2e0b365c6dd5a42c68;hp=786658e03cee703b2f939a1b948da2e497943b9d;hpb=390866079e285d2c74918432c0d597d5da52f8a0;p=platform%2Fupstream%2Fiotivity.git diff --git a/resource/csdk/security/include/securevirtualresourcetypes.h b/resource/csdk/security/include/securevirtualresourcetypes.h index 786658e..7b16739 100644 --- a/resource/csdk/security/include/securevirtualresourcetypes.h +++ b/resource/csdk/security/include/securevirtualresourcetypes.h @@ -162,6 +162,12 @@ static inline bool IsAccessGranted(SRMAccessResponse_t response) } } +typedef struct OicSecRsrc OicSecRsrc_t; + +typedef struct OicSecValidity OicSecValidity_t; + +typedef struct OicSecAce OicSecAce_t; + typedef struct OicSecAcl OicSecAcl_t; typedef struct OicSecAmacl OicSecAmacl_t; @@ -261,6 +267,13 @@ typedef enum OIC_OXM_COUNT }OicSecOxm_t; +typedef enum +{ + OIC_ENCODING_UNKNOW = 0, + OIC_ENCODING_RAW = 1, + OIC_ENCODING_BASE64 = 2 +}OicEncodingType_t; + typedef struct OicSecKey OicSecKey_t; typedef struct OicSecPstat OicSecPstat_t; @@ -308,6 +321,39 @@ struct OicSecKey { uint8_t *data; size_t len; + + // TODO: This field added as workaround. Will be replaced soon. + OicEncodingType_t encoding; + +}; + +struct OicSecRsrc +{ + char *href; // 0:R:S:Y:String + char *rel; // 1:R:S:N:String + char** types; // 2:R:S:N:String Array + size_t typeLen; // the number of elts in types + char** interfaces; // 3:R:S:N:String Array + size_t interfaceLen; // the number of elts in interfaces + OicSecRsrc_t *next; +}; + +struct OicSecValidity +{ + char* period; // 0:R:S:Y:String + char** recurrences; // 1:R:M:Y:Array of String + size_t recurrenceLen; // the number of elts in recurrence + OicSecValidity_t *next; +}; + +struct OicSecAce +{ + // :::: + OicUuid_t subjectuuid; // 0:R:S:Y:uuid + OicSecRsrc_t *resources; // 1:R:M:Y:Resource + uint16_t permission; // 2:R:S:Y:UINT16 + OicSecValidity_t *validities; // 3:R:M:N:Time-interval + OicSecAce_t *next; }; /** @@ -317,17 +363,8 @@ struct OicSecKey struct OicSecAcl { // :::: - OicUuid_t subject; // 0:R:S:Y:uuid TODO: this deviates - // from spec and needs to be updated - // in spec (where it's a String). - size_t resourcesLen; // the number of elts in Resources - char **resources; // 1:R:M:Y:String - uint16_t permission; // 2:R:S:Y:UINT16 - size_t prdRecrLen; // the number of elts in Periods - char **periods; // 3:R:M*:N:String (<--M*; see Spec) - char **recurrences; // 5:R:M:N:String - OicUuid_t rownerID; // 8:R:S:Y:oic.uuid - OicSecAcl_t *next; + OicUuid_t rownerID; // 0:R:S:Y:oic.uuid + OicSecAce_t *aces; // 1:R:M:N:ACE }; /**