/base/security/access_token/services/accesstokenmanager/main/cpp/src/database/ |
D | data_translator.cpp | 49 int DataTranslator::TranslationIntoPermissionDef(const GenericValues& inGenericValues, PermissionDe… in TranslationIntoPermissionDef() argument 51 …outPermissionDef.permissionName = inGenericValues.GetString(TokenFiledConst::FIELD_PERMISSION_NAME… in TranslationIntoPermissionDef() 52 outPermissionDef.bundleName = inGenericValues.GetString(TokenFiledConst::FIELD_BUNDLE_NAME); in TranslationIntoPermissionDef() 53 outPermissionDef.grantMode = inGenericValues.GetInt(TokenFiledConst::FIELD_GRANT_MODE); in TranslationIntoPermissionDef() 54 int aplNum = inGenericValues.GetInt(TokenFiledConst::FIELD_AVAILABLE_LEVEL); in TranslationIntoPermissionDef() 60 …outPermissionDef.provisionEnable = (inGenericValues.GetInt(TokenFiledConst::FIELD_PROVISION_ENABLE… in TranslationIntoPermissionDef() 62 (inGenericValues.GetInt(TokenFiledConst::FIELD_DISTRIBUTED_SCENE_ENABLE) == 1); in TranslationIntoPermissionDef() 63 outPermissionDef.label = inGenericValues.GetString(TokenFiledConst::FIELD_LABEL); in TranslationIntoPermissionDef() 64 outPermissionDef.labelId = inGenericValues.GetInt(TokenFiledConst::FIELD_LABEL_ID); in TranslationIntoPermissionDef() 65 outPermissionDef.description = inGenericValues.GetString(TokenFiledConst::FIELD_DESCRIPTION); in TranslationIntoPermissionDef() [all …]
|
/base/security/access_token/services/privacymanager/src/database/ |
D | data_translator.cpp | 62 …aTranslator::TranslationGenericValuesIntoPermissionUsedRecord(const GenericValues& inGenericValues, in TranslationGenericValuesIntoPermissionUsedRecord() argument 66 int32_t opCode = inGenericValues.GetInt(PrivacyFiledConst::FIELD_OP_CODE); in TranslationGenericValuesIntoPermissionUsedRecord() 71 int64_t timestamp = inGenericValues.GetInt64(PrivacyFiledConst::FIELD_TIMESTAMP); in TranslationGenericValuesIntoPermissionUsedRecord() 74 if (inGenericValues.GetInt(PrivacyFiledConst::FIELD_ACCESS_COUNT) != 0) { in TranslationGenericValuesIntoPermissionUsedRecord() 75 … permissionRecord.accessCount = inGenericValues.GetInt(PrivacyFiledConst::FIELD_ACCESS_COUNT); in TranslationGenericValuesIntoPermissionUsedRecord() 77 …permissionRecord.lastAccessDuration = inGenericValues.GetInt64(PrivacyFiledConst::FIELD_ACCESS_DUR… in TranslationGenericValuesIntoPermissionUsedRecord() 80 if (inGenericValues.GetInt(PrivacyFiledConst::FIELD_REJECT_COUNT) != 0) { in TranslationGenericValuesIntoPermissionUsedRecord() 81 … permissionRecord.rejectCount = inGenericValues.GetInt(PrivacyFiledConst::FIELD_REJECT_COUNT); in TranslationGenericValuesIntoPermissionUsedRecord() 85 if (inGenericValues.GetInt(PrivacyFiledConst::FIELD_FLAG) == 0) { in TranslationGenericValuesIntoPermissionUsedRecord() 90 detail.status = inGenericValues.GetInt(PrivacyFiledConst::FIELD_STATUS); in TranslationGenericValuesIntoPermissionUsedRecord() [all …]
|
/base/security/access_token/services/common/database/test/unittest/ |
D | database_test.cpp | 584 GenericValues inGenericValues; variable 585 inGenericValues.Put(TokenFiledConst::FIELD_GRANT_IS_GENERAL, 1); 586 inGenericValues.Put(TokenFiledConst::FIELD_PERMISSION_NAME, ""); 589 …ASSERT_EQ(RET_FAILED, DataTranslator::TranslationIntoPermissionStateFull(inGenericValues, outPermi… 605 GenericValues inGenericValues; variable 606 inGenericValues.Put(TokenFiledConst::FIELD_GRANT_IS_GENERAL, 1); 607 inGenericValues.Put(TokenFiledConst::FIELD_PERMISSION_NAME, "test_permission_name"); 608 inGenericValues.Put(TokenFiledConst::FIELD_DEVICE_ID, ""); 611 …ASSERT_EQ(RET_FAILED, DataTranslator::TranslationIntoPermissionStateFull(inGenericValues, outPermi… 627 GenericValues inGenericValues; variable [all …]
|
/base/security/access_token/services/accesstokenmanager/main/cpp/src/token/ |
D | hap_token_info_inner.cpp | 111 int HapTokenInfoInner::RestoreHapTokenBasicInfo(const GenericValues& inGenericValues) in RestoreHapTokenBasicInfo() argument 113 tokenInfoBasic_.userID = inGenericValues.GetInt(TokenFiledConst::FIELD_USER_ID); in RestoreHapTokenBasicInfo() 114 tokenInfoBasic_.bundleName = inGenericValues.GetString(TokenFiledConst::FIELD_BUNDLE_NAME); in RestoreHapTokenBasicInfo() 122 tokenInfoBasic_.apiVersion = inGenericValues.GetInt(TokenFiledConst::FIELD_API_VERSION); in RestoreHapTokenBasicInfo() 123 tokenInfoBasic_.instIndex = inGenericValues.GetInt(TokenFiledConst::FIELD_INST_INDEX); in RestoreHapTokenBasicInfo() 124 tokenInfoBasic_.dlpType = inGenericValues.GetInt(TokenFiledConst::FIELD_DLP_TYPE); in RestoreHapTokenBasicInfo() 125 tokenInfoBasic_.appID = inGenericValues.GetString(TokenFiledConst::FIELD_APP_ID); in RestoreHapTokenBasicInfo() 133 tokenInfoBasic_.deviceID = inGenericValues.GetString(TokenFiledConst::FIELD_DEVICE_ID); in RestoreHapTokenBasicInfo() 141 int aplNum = inGenericValues.GetInt(TokenFiledConst::FIELD_APL); in RestoreHapTokenBasicInfo() 151 tokenInfoBasic_.ver = (char)inGenericValues.GetInt(TokenFiledConst::FIELD_TOKEN_VERSION); in RestoreHapTokenBasicInfo() [all …]
|
D | native_token_info_inner.cpp | 118 …TokenInfoInner::RestoreNativeTokenInfo(AccessTokenID tokenId, const GenericValues& inGenericValues, in RestoreNativeTokenInfo() argument 122 tokenInfoBasic_.processName = inGenericValues.GetString(TokenFiledConst::FIELD_PROCESS_NAME); in RestoreNativeTokenInfo() 131 int aplNum = inGenericValues.GetInt(TokenFiledConst::FIELD_APL); in RestoreNativeTokenInfo() 142 tokenInfoBasic_.ver = (char)inGenericValues.GetInt(TokenFiledConst::FIELD_TOKEN_VERSION); in RestoreNativeTokenInfo() 153 SetDcaps(inGenericValues.GetString(TokenFiledConst::FIELD_DCAP)); in RestoreNativeTokenInfo() 154 SetNativeAcls(inGenericValues.GetString(TokenFiledConst::FIELD_NATIVE_ACLS)); in RestoreNativeTokenInfo() 155 tokenInfoBasic_.tokenAttr = (uint32_t)inGenericValues.GetInt(TokenFiledConst::FIELD_TOKEN_ATTR); in RestoreNativeTokenInfo()
|
/base/security/access_token/services/accesstokenmanager/main/cpp/include/database/ |
D | data_translator.h | 31 …static int TranslationIntoPermissionDef(const GenericValues& inGenericValues, PermissionDef& outPe… 34 static int TranslationIntoPermissionStateFull(const GenericValues& inGenericValues,
|
/base/security/access_token/services/privacymanager/include/database/ |
D | data_translator.h | 33 const GenericValues& inGenericValues, PermissionUsedRecord& permissionRecord);
|
/base/security/access_token/services/privacymanager/test/unittest/ |
D | permission_record_db_test.cpp | 343 GenericValues inGenericValues; variable 347 inGenericValues.Put(PrivacyFiledConst::FIELD_OP_CODE, opCode); 350 …DataTranslator::TranslationGenericValuesIntoPermissionUsedRecord(inGenericValues, permissionRecord… 351 inGenericValues.Remove(PrivacyFiledConst::FIELD_OP_CODE); 354 inGenericValues.Put(PrivacyFiledConst::FIELD_OP_CODE, opCode); 355 inGenericValues.Put(PrivacyFiledConst::FIELD_TIMESTAMP, 10); 356 inGenericValues.Put(PrivacyFiledConst::FIELD_REJECT_COUNT, 1); 357 inGenericValues.Put(PrivacyFiledConst::FIELD_FLAG, 1); 360 …DataTranslator::TranslationGenericValuesIntoPermissionUsedRecord(inGenericValues, permissionRecord…
|
/base/security/access_token/services/accesstokenmanager/main/cpp/include/token/ |
D | hap_token_info_inner.h | 65 int RestoreHapTokenBasicInfo(const GenericValues& inGenericValues);
|
D | native_token_info_inner.h | 50 int RestoreNativeTokenInfo(AccessTokenID tokenId, const GenericValues& inGenericValues,
|
/base/security/access_token/services/accesstokenmanager/test/unittest/cpp/src/ |
D | accesstoken_info_manager_test.cpp | 2752 GenericValues inGenericValues; variable 2758 inGenericValues.Put(TokenFiledConst::FIELD_PROCESS_NAME, processName); 2760 ASSERT_EQ(RET_FAILED, native->RestoreNativeTokenInfo(tokenId, inGenericValues, permStateRes)); 2761 inGenericValues.Remove(TokenFiledConst::FIELD_PROCESS_NAME); 2767 inGenericValues.Put(TokenFiledConst::FIELD_PROCESS_NAME, processName); 2768 inGenericValues.Put(TokenFiledConst::FIELD_APL, apl); 2770 ASSERT_EQ(RET_FAILED, native->RestoreNativeTokenInfo(tokenId, inGenericValues, permStateRes)); 2771 inGenericValues.Remove(TokenFiledConst::FIELD_APL); 2774 inGenericValues.Put(TokenFiledConst::FIELD_APL, apl); 2775 inGenericValues.Put(TokenFiledConst::FIELD_TOKEN_VERSION, version); [all …]
|