/base/global/resource_management/frameworks/resmgr/test/unittest/common/ |
D | resource_manager_test_common.cpp | 69 std::string outValue; in TestStringByName() local 70 RState rState = rm->GetStringByName(name, outValue); in TestStringByName() 72 HILOG_DEBUG("%s : %s", name, outValue.c_str()); in TestStringByName() 73 ASSERT_EQ(std::string(cmp), outValue); in TestStringByName() 78 std::string outValue; in TestStringById() local 81 RState rState = rm->GetStringById(id, outValue); in TestStringById() 83 ASSERT_EQ(std::string(cmp), outValue); in TestStringById() 139 std::string outValue; in TestPluralStringById() local 143 ret = rm->GetPluralStringByIdFormat(outValue, id, quantity, quantity); in TestPluralStringById() 145 ret = rm->GetPluralStringById(id, quantity, outValue); in TestPluralStringById() [all …]
|
D | resource_manager_test.cpp | 363 std::map<std::string, std::string> outValue; variable 367 state = rm->GetPatternById(id, outValue); 369 ASSERT_EQ(static_cast<size_t>(4), outValue.size()); 370 PrintMapString(outValue); 383 std::map<std::string, std::string> outValue; variable 387 state = rm->GetPatternById(id, outValue); 389 ASSERT_EQ(static_cast<size_t>(5), outValue.size()); 390 PrintMapString(outValue); 402 std::map<std::string, std::string> outValue; variable 406 state = rm->GetPatternById(NON_EXIST_ID, outValue); [all …]
|
D | resource_manager_test_string.cpp | 111 std::string outValue; variable 112 RState state = rm->GetStringById(NON_EXIST_ID, outValue); 193 std::string outValue; variable 194 RState state = rm->GetStringByName(g_nonExistName, outValue); 218 std::string outValue; variable 219 ((ResourceManagerImpl *)rm)->GetStringByName("ohos_desc_camera", outValue); 220 ASSERT_EQ(outValue, "允许应用拍摄照片和视频。"); 235 std::string outValue; variable 236 ((ResourceManagerImpl *)rm)->GetStringByName("hello", outValue); 237 ASSERT_EQ(outValue, "Helloooo"); [all …]
|
D | resource_manager_test_media.cpp | 89 std::string outValue; variable 91 state = rm->GetMediaById(NON_EXIST_ID, outValue); 135 std::string outValue; variable 139 state = rm->GetMediaById(id, outValue, density); 141 EXPECT_EQ(res, outValue); 171 std::string outValue; variable 175 state = rm->GetMediaById(id, outValue, density); 177 EXPECT_EQ(res, outValue); 207 std::string outValue; variable 211 state = rm->GetMediaById(id, outValue, density); [all …]
|
D | locale_info_test.cpp | 65 std::vector<std::string> outValue; variable 72 FindAndSort(current, request, outValue); 73 EXPECT_TRUE(outValue.at(0) == "en-US"); 74 EXPECT_TRUE(outValue.at(1) == "en"); 75 EXPECT_TRUE(outValue.at(2) == ""); 76 EXPECT_TRUE(outValue.at(3) == "en-CN"); 77 EXPECT_TRUE(outValue.at(4) == "en-GB"); 88 std::vector<std::string> outValue; variable 95 FindAndSort(current, request, outValue); 96 EXPECT_TRUE(outValue.at(0) == "zh-CN"); [all …]
|
D | resource_manager_performance_test.cpp | 306 std::string outValue; variable 310 rm->GetStringById(ids[i], outValue); 336 std::string outValue; variable 340 rm->GetStringByName(name[i].c_str(), outValue); 366 std::string outValue; variable 370 rm->GetStringByName(name[i].c_str(), outValue); 403 std::string outValue; variable 407 rm->GetStringFormatById(outValue, ids[i], 12); 433 std::string outValue; variable 437 rm->GetStringFormatByName(outValue, name[i].c_str(), 123); [all …]
|
D | theme_manager_test.cpp | 83 uint32_t outValue; variable 89 rm->GetColorById(id, outValue); 90 ASSERT_EQ(0, outValue); // base_only APP value is #000000 104 uint32_t outValue; variable 105 rm->GetColorById(id, outValue); 106 ASSERT_EQ(0, outValue); // base_only APP value is #000000 113 rm->GetColorById(id, outValue); 114 ASSERT_EQ(4294967295, outValue); // base_only theme value is #ffffff(4294967295)
|
D | resource_manager_test_hap.cpp | 561 std::unique_ptr<uint8_t[]> outValue; variable 565 RState state = rm->GetProfileDataById(id, len, outValue); 579 std::unique_ptr<uint8_t[]> outValue; variable 581 RState state = rm->GetProfileDataByName("test_profile", len, outValue); 595 std::unique_ptr<uint8_t[]> outValue; variable 598 state = rm->GetMediaDataByName("icon1", len, outValue); 613 std::unique_ptr<uint8_t[]> outValue; variable 618 state = rm->GetMediaDataById(id, len, outValue); 633 std::string outValue; variable 635 state = rm->GetMediaBase64DataByName("icon1", outValue); [all …]
|
/base/global/resource_management_lite/frameworks/resmgr_lite/include/ |
D | resource_manager_impl.h | 61 virtual RState GetStringById(uint32_t id, std::string &outValue); 69 virtual RState GetStringByName(const char *name, std::string &outValue); 77 virtual RState GetStringFormatById(std::string &outValue, uint32_t id, ...); 85 virtual RState GetStringFormatByName(std::string &outValue, const char *name, ...); 93 virtual RState GetStringArrayById(uint32_t id, std::vector<std::string> &outValue); 101 virtual RState GetStringArrayByName(const char *name, std::vector<std::string> &outValue); 109 virtual RState GetPatternById(uint32_t id, std::map<std::string, std::string> &outValue); 117 virtual RState GetPatternByName(const char *name, std::map<std::string, std::string> &outValue); 126 virtual RState GetPluralStringById(uint32_t id, int quantity, std::string &outValue); 135 virtual RState GetPluralStringByName(const char *name, int quantity, std::string &outValue); [all …]
|
D | resource_manager.h | 37 virtual RState GetStringById(uint32_t id, std::string &outValue) = 0; 39 virtual RState GetStringByName(const char *name, std::string &outValue) = 0; 41 virtual RState GetStringFormatById(std::string &outValue, uint32_t id, ...) = 0; 43 virtual RState GetStringFormatByName(std::string &outValue, const char *name, ...) = 0; 45 virtual RState GetStringArrayById(uint32_t id, std::vector<std::string> &outValue) = 0; 47 virtual RState GetStringArrayByName(const char *name, std::vector<std::string> &outValue) = 0; 49 virtual RState GetPatternById(uint32_t id, std::map<std::string, std::string> &outValue) = 0; 51 …virtual RState GetPatternByName(const char *name, std::map<std::string, std::string> &outValue) = … 53 virtual RState GetPluralStringById(uint32_t id, int quantity, std::string &outValue) = 0; 55 virtual RState GetPluralStringByName(const char *name, int quantity, std::string &outValue) = 0; [all …]
|
/base/global/resource_management_lite/frameworks/resmgr_lite/test/unittest/lite/common/ |
D | resource_manager_test.cpp | 85 std::string outValue; in TestStringByName() local 86 rState = rm->GetStringByName(name, outValue); in TestStringByName() 88 HILOG_DEBUG("%s : %s", name, outValue.c_str()); in TestStringByName() 89 ASSERT_EQ(std::string(cmp), outValue); in TestStringByName() 95 std::string outValue; in TestStringById() local 98 rState = rm->GetStringById(id, outValue); in TestStringById() 100 ASSERT_EQ(std::string(cmp), outValue); in TestStringById() 122 std::string outValue; in TestPluralStringById() local 125 ret = rm->GetPluralStringByIdFormat(outValue, id, quantity, quantity); in TestPluralStringById() 127 ret = rm->GetPluralStringById(id, quantity, outValue); in TestPluralStringById() [all …]
|
D | locale_info_test.cpp | 66 std::vector<std::string> outValue; variable 73 FindAndSort(current, request, outValue); 74 EXPECT_TRUE(outValue.at(0) == "en-US"); 75 EXPECT_TRUE(outValue.at(1) == "en"); 76 EXPECT_TRUE(outValue.at(2) == ""); 77 EXPECT_TRUE(outValue.at(3) == "en-CN"); 78 EXPECT_TRUE(outValue.at(4) == "en-GB"); 89 std::vector<std::string> outValue; variable 96 FindAndSort(current, request, outValue); 97 EXPECT_TRUE(outValue.at(0) == "zh-CN"); [all …]
|
D | resource_manager_performance_test.cpp | 294 std::string outValue; variable 298 rm->GetStringById(ids[i], outValue); 324 std::string outValue; variable 328 rm->GetStringByName(name[i].c_str(), outValue); 354 std::string outValue; variable 358 rm->GetStringByName(name[i].c_str(), outValue); 391 std::string outValue; variable 395 rm->GetStringFormatById(outValue, ids[i], 12); 421 std::string outValue; variable 425 rm->GetStringFormatByName(outValue, name[i].c_str(), 123); [all …]
|
/base/global/resource_management/frameworks/resmgr/include/ |
D | resource_manager_impl.h | 108 virtual RState GetStringById(uint32_t id, std::string &outValue); 116 virtual RState GetStringByName(const char *name, std::string &outValue); 124 virtual RState GetStringFormatById(std::string &outValue, uint32_t id, ...); 132 virtual RState GetStringFormatByName(std::string &outValue, const char *name, ...); 140 virtual RState GetStringArrayById(uint32_t id, std::vector<std::string> &outValue); 148 virtual RState GetStringArrayByName(const char *name, std::vector<std::string> &outValue); 156 virtual RState GetPatternById(uint32_t id, std::map<std::string, std::string> &outValue); 164 virtual RState GetPatternByName(const char *name, std::map<std::string, std::string> &outValue); 173 virtual RState GetPluralStringById(uint32_t id, int quantity, std::string &outValue); 182 virtual RState GetPluralStringByName(const char *name, int quantity, std::string &outValue); [all …]
|
D | hap_manager.h | 145 RState FindRawFile(const std::string &name, std::string &outValue); 167 std::unique_ptr<uint8_t[]> &outValue); 175 RState GetMediaBase64Data(const HapResource::ValueUnderQualifierDir *qd, std::string &outValue); 185 std::unique_ptr<uint8_t[]> &outValue); 195 std::unique_ptr<uint8_t[]> &outValue); 242 std::string &outValue); 252 std::unique_ptr<uint8_t[]> &outValue); 262 std::unique_ptr<uint8_t[]> &outValue); 270 …te GetMediaBase64DataFromHap(const HapResource::ValueUnderQualifierDir *qd, std::string &outValue); 278 … GetMediaBase64DataFromIndex(const HapResource::ValueUnderQualifierDir *qd, std::string &outValue); [all …]
|
/base/global/resource_management_lite/frameworks/resmgr_lite/src/ |
D | resource_manager_impl.cpp | 71 RState ResourceManagerImpl::GetStringById(uint32_t id, std::string &outValue) in GetStringById() argument 74 return GetString(idItem, outValue); in GetStringById() 77 RState ResourceManagerImpl::GetStringByName(const char *name, std::string &outValue) in GetStringByName() argument 80 return GetString(idItem, outValue); in GetStringByName() 83 RState ResourceManagerImpl::GetStringFormatById(std::string &outValue, uint32_t id, ...) in GetStringFormatById() argument 93 outValue = FormatString(temp.c_str(), args); in GetStringFormatById() 98 RState ResourceManagerImpl::GetStringFormatByName(std::string &outValue, const char *name, ...) in GetStringFormatByName() argument 108 outValue = FormatString(temp.c_str(), args); in GetStringFormatByName() 113 RState ResourceManagerImpl::GetString(const IdItem *idItem, std::string &outValue) in GetString() argument 119 RState ret = ResolveReference(idItem->value_, outValue); in GetString() [all …]
|
/base/global/resource_management/interfaces/inner_api/include/ |
D | resource_manager.h | 71 virtual RState GetStringById(uint32_t id, std::string &outValue) = 0; 73 virtual RState GetStringByName(const char *name, std::string &outValue) = 0; 75 virtual RState GetStringFormatById(std::string &outValue, uint32_t id, ...) = 0; 77 virtual RState GetStringFormatByName(std::string &outValue, const char *name, ...) = 0; 79 virtual RState GetStringArrayById(uint32_t id, std::vector<std::string> &outValue) = 0; 81 virtual RState GetStringArrayByName(const char *name, std::vector<std::string> &outValue) = 0; 83 virtual RState GetPatternById(uint32_t id, std::map<std::string, std::string> &outValue) = 0; 85 …virtual RState GetPatternByName(const char *name, std::map<std::string, std::string> &outValue) = … 87 virtual RState GetPluralStringById(uint32_t id, int quantity, std::string &outValue) = 0; 89 virtual RState GetPluralStringByName(const char *name, int quantity, std::string &outValue) = 0; [all …]
|
/base/global/resource_management/frameworks/resmgr/src/ |
D | resource_manager_impl.cpp | 83 RState ResourceManagerImpl::GetStringById(uint32_t id, std::string &outValue) in GetStringById() argument 90 RState state = GetString(idItem, outValue); in GetStringById() 97 RState ResourceManagerImpl::GetStringByName(const char *name, std::string &outValue) in GetStringByName() argument 104 RState state = GetString(idItem, outValue); in GetStringByName() 111 RState ResourceManagerImpl::GetStringFormatById(std::string &outValue, uint32_t id, ...) in GetStringFormatById() argument 121 outValue = FormatString(temp.c_str(), args); in GetStringFormatById() 126 RState ResourceManagerImpl::GetStringFormatByName(std::string &outValue, const char *name, ...) in GetStringFormatByName() argument 136 outValue = FormatString(temp.c_str(), args); in GetStringFormatByName() 141 RState ResourceManagerImpl::GetString(const IdItem *idItem, std::string &outValue) in GetString() argument 147 RState ret = ResolveReference(idItem->value_, outValue); in GetString() [all …]
|
D | hap_manager.cpp | 243 RState HapManager::FindRawFile(const std::string &name, std::string &outValue) in FindRawFile() argument 279 outValue = realPath; in FindRawFile() 554 std::unique_ptr<uint8_t[]> &outValue) in GetProfileData() argument 567 bool ret = extractor->ExtractToBufByName(filePath, outValue, len); in GetProfileData() 577 std::unique_ptr<uint8_t[]> &outValue) in GetMediaData() argument 582 state = HapManager::GetMediaDataFromHap(qd, len, outValue); in GetMediaData() 584 state = HapManager::GetMediaDataFromIndex(qd, len, outValue); in GetMediaData() 590 std::unique_ptr<uint8_t[]> &outValue) in GetMediaDataFromHap() argument 604 bool ret = extractor->ExtractToBufByName(filePath, outValue, len); in GetMediaDataFromHap() 614 std::unique_ptr<uint8_t[]> &outValue) in GetMediaDataFromIndex() argument [all …]
|
/base/web/webview/interfaces/kits/napi/common/ |
D | napi_parse_utils.h | 41 static bool ParseUint32(napi_env env, napi_value argv, uint32_t& outValue); 42 static bool ParseInt32(napi_env env, napi_value argv, int32_t& outValue); 43 static bool ParseUint64(napi_env env, napi_value argv, uint64_t& outValue, bool *lossless); 44 static bool ParseInt64(napi_env env, napi_value argv, int64_t& outValue); 45 static bool ParseDouble(napi_env env, napi_value argv, double& outValue); 46 static bool ParseString(napi_env env, napi_value argv, std::string& outValue); 47 static bool ParseBoolean(napi_env env, napi_value argv, bool& outValue); 48 static bool ParseStringArray(napi_env env, napi_value argv, std::vector<std::string>& outValue); 49 static bool ParseBooleanArray(napi_env env, napi_value argv, std::vector<bool>& outValue); 50 static bool ParseDoubleArray(napi_env env, napi_value argv, std::vector<double>& outValue); [all …]
|
D | napi_parse_utils.cpp | 169 bool NapiParseUtils::ParseInt32(napi_env env, napi_value argv, int32_t& outValue) in ParseInt32() argument 180 outValue = number; in ParseInt32() 185 bool NapiParseUtils::ParseUint32(napi_env env, napi_value argv, uint32_t& outValue) in ParseUint32() argument 196 outValue = number; in ParseUint32() 201 bool NapiParseUtils::ParseUint64(napi_env env, napi_value argv, uint64_t& outValue, bool *lossless) in ParseUint64() argument 212 outValue = number; in ParseUint64() 217 bool NapiParseUtils::ParseInt64(napi_env env, napi_value argv, int64_t& outValue) in ParseInt64() argument 228 outValue = number; in ParseInt64() 233 bool NapiParseUtils::ParseString(napi_env env, napi_value argv, std::string& outValue) in ParseString() argument 262 outValue = message; in ParseString() [all …]
|
/base/global/resource_management/test/fuzztest/resmgr_fuzzer/ |
D | resmgr_fuzzer.cpp | 45 std::vector<std::string> outValue; in GetStringArrayByIdFuzzTest() local 46 result = rm->GetStringArrayById(testId, outValue); in GetStringArrayByIdFuzzTest() 56 int outValue; in GetIntegerByIdFuzzTest() local 57 result = rm->GetIntegerById(testId, outValue); in GetIntegerByIdFuzzTest() 67 int outValue; in GetIntegerByNameFuzzTest() local 68 result = rm->GetIntegerByName(testName, outValue); in GetIntegerByNameFuzzTest() 78 bool outValue; in GetBooleanByIdFuzzTest() local 79 result = rm->GetBooleanById(testId, outValue); in GetBooleanByIdFuzzTest() 89 float outValue; in GetFloatByIdFuzzTest() local 90 result = rm->GetFloatById(testId, outValue); in GetFloatByIdFuzzTest() [all …]
|
/base/security/device_security_level/oem_property/common/ |
D | dslm_credential.c | 105 uint8_t *outValue = (uint8_t *)MALLOC(len); in CreateDslmCred() local 106 if (outValue == NULL) { in CreateDslmCred() 110 (void)memset_s(outValue, len, 0, len); in CreateDslmCred() 111 if (memcpy_s(outValue, len, value, len) != EOK) { in CreateDslmCred() 113 FREE(outValue); in CreateDslmCred() 116 outBuff->credVal = outValue; in CreateDslmCred()
|
/base/global/resource_management_lite/frameworks/resmgr_lite/src/utils/ |
D | utils.cpp | 67 void Utils::DecodeScript(uint32_t encodeScript, char *outValue) in DecodeScript() argument 69 if (outValue == nullptr) { in DecodeScript() 72 outValue[0] = (encodeScript & 0xFF000000) >> 24; in DecodeScript() 73 outValue[1] = (encodeScript & 0x00FF0000) >> 16; in DecodeScript() 74 outValue[2] = (encodeScript & 0x0000FF00) >> 8; in DecodeScript() 75 outValue[3] = (encodeScript & 0x000000FF); in DecodeScript() 274 RState Utils::ConvertColorToUInt32(const char *s, uint32_t &outValue) in ConvertColorToUInt32() argument 323 outValue = color; in ConvertColorToUInt32()
|
/base/global/resource_management/frameworks/resmgr/include/utils/ |
D | utils.h | 46 static void DecodeScript(uint32_t encodeScript, char *outValue); 56 static RState ConvertColorToUInt32(const char *s, uint32_t &outValue); 61 const std::string &imgType, std::string &outValue);
|