/foundation/resourceschedule/device_standby/services/test/unittest/ |
H A D | standby_utils_unit_test.cpp | 63 bool ret = JsonUtils::GetInt32FromJsonValue(jsonValue, "", value); in HWTEST_F() 66 JsonUtils::GetInt32FromJsonValue(jsonValue, "", value); in HWTEST_F() 67 JsonUtils::GetInt32FromJsonValue(jsonValue, JSON_KEY, value); in HWTEST_F() 68 JsonUtils::GetInt32FromJsonValue(jsonValue, JSON_ERROR_KEY, value); in HWTEST_F() 70 ret = JsonUtils::GetInt32FromJsonValue(jsonValue, JSON_ERROR_KEY, value); in HWTEST_F() 72 JsonUtils::GetInt32FromJsonValue(jsonValue, JSON_KEY, value); in HWTEST_F() 85 bool ret = JsonUtils::GetBoolFromJsonValue(jsonValue, "", value); in HWTEST_F() 88 JsonUtils::GetBoolFromJsonValue(jsonValue, "", value); in HWTEST_F() 89 JsonUtils::GetBoolFromJsonValue(jsonValue, JSON_KEY, value); in HWTEST_F() 90 JsonUtils in HWTEST_F() [all...] |
/foundation/multimedia/av_session/services/session/server/test/ |
H A D | json_utils_test.cpp | 54 bool ret = JsonUtils::IsInt32(jsonTest, "test"); in HWTEST() 69 bool ret = JsonUtils::IsInt32(jsonTest, "test"); in HWTEST() 84 bool ret = JsonUtils::IsString(jsonTest, "test"); in HWTEST() 99 bool ret = JsonUtils::IsString(jsonTest, "test"); in HWTEST() 114 bool ret = JsonUtils::IsBool(jsonTest, "test"); in HWTEST() 129 bool ret = JsonUtils::IsBool(jsonTest, "test"); in HWTEST() 147 int32_t ret = JsonUtils::SetSessionBasicInfo(jsonStr, basicInfo); in HWTEST() 163 int32_t ret = JsonUtils::SetSessionDescriptors(jsonStr, descriptors); in HWTEST() 181 int32_t ret = JsonUtils::SetSessionDescriptors(jsonStr, descriptors); in HWTEST() 199 int32_t ret = JsonUtils in HWTEST() [all...] |
H A D | remote_utils_test.cpp | 64 EXPECT_EQ(JsonUtils::SetSessionBasicInfo(sessionInfo, basicInfo), AVSESSION_SUCCESS); in HWTEST_F() 65 EXPECT_EQ(JsonUtils::SetSessionDescriptor(sessionInfo, descriptor), AVSESSION_SUCCESS); in HWTEST_F() 66 EXPECT_EQ(JsonUtils::GetSessionDescriptor(sessionInfo, descriptorOut), AVSESSION_SUCCESS); in HWTEST_F() 89 EXPECT_EQ(JsonUtils::SetSessionBasicInfo(sessionInfo, basicInfo), AVSESSION_SUCCESS); in HWTEST_F() 90 EXPECT_EQ(JsonUtils::SetSessionDescriptor(sessionInfo, descriptor), AVSESSION_SUCCESS); in HWTEST_F() 91 EXPECT_EQ(JsonUtils::GetSessionDescriptor(sessionInfo, descriptorOut), AVSESSION_SUCCESS); in HWTEST_F() 114 EXPECT_EQ(JsonUtils::SetSessionBasicInfo(sessionInfo, basicInfo), AVSESSION_SUCCESS); in HWTEST_F() 115 EXPECT_EQ(JsonUtils::SetSessionDescriptor(sessionInfo, descriptor), AVSESSION_SUCCESS); in HWTEST_F() 116 EXPECT_EQ(JsonUtils::GetSessionDescriptor(sessionInfo, descriptorOut), AVSESSION_SUCCESS); in HWTEST_F() 134 EXPECT_EQ(JsonUtils in HWTEST_F() [all...] |
/foundation/ability/ability_runtime/services/common/include/ |
H A D | json_utils.h | 27 class JsonUtils { class 29 static JsonUtils &GetInstance() in GetInstance() 31 static JsonUtils instance; in GetInstance() 34 ~JsonUtils() = default; 40 JsonUtils() = default; 41 DISALLOW_COPY_AND_MOVE(JsonUtils);
|
/foundation/resourceschedule/device_standby/utils/policy/src/ |
H A D | json_utils.cpp | 33 bool JsonUtils::LoadJsonValueFromContent(nlohmann::json& jsonValue, const std::string& content) in LoadJsonValueFromContent() 51 bool JsonUtils::LoadJsonValueFromFile(nlohmann::json& jsonValue, const std::string& filePath) in LoadJsonValueFromFile() 74 bool JsonUtils::DumpJsonValueToFile(const nlohmann::json& jsonValue, const std::string& filePath) in DumpJsonValueToFile() 96 bool JsonUtils::CreateNodeFile(const std::string &filePath) in CreateNodeFile() 116 bool JsonUtils::GetInt32FromJsonValue(const nlohmann::json& jsonValue, const std::string& key, int32_t& value) in GetInt32FromJsonValue() 128 bool JsonUtils::GetBoolFromJsonValue(const nlohmann::json& jsonValue, const std::string& key, bool& value) in GetBoolFromJsonValue() 140 bool JsonUtils::GetStringFromJsonValue(const nlohmann::json& jsonValue, const std::string& key, std::string& value) in GetStringFromJsonValue() 152 bool JsonUtils::GetObjFromJsonValue(const nlohmann::json& jsonValue, const std::string& key, nlohmann::json& value) in GetObjFromJsonValue() 164 bool JsonUtils::GetArrayFromJsonValue(const nlohmann::json& jsonValue, const std::string& key, nlohmann::json& value) in GetArrayFromJsonValue() 176 bool JsonUtils [all...] |
H A D | standby_config_manager.cpp | 106 if (!JsonUtils::LoadJsonValueFromContent(devStandbyConfigRoot, content)) { in GetAndParseStandbyConfig() 119 if (!JsonUtils::LoadJsonValueFromFile(devStandbyConfigRoot, configFile)) { in GetAndParseStandbyConfig() 137 if (!JsonUtils::LoadJsonValueFromContent(resCtrlConfigRoot, content)) { in GetAndParseStrategyConfig() 149 if (!JsonUtils::LoadJsonValueFromFile(resCtrlConfigRoot, configFile)) { in GetAndParseStrategyConfig() 169 JsonUtils::LoadJsonValueFromContent(ConfigRoot, configCloud); in GetCloudConfig() 182 if (JsonUtils::GetObjFromJsonValue(devConfigRoot, TAG_SETTING_LIST, settingConfig) && in ParseCloudConfig() 186 if (JsonUtils::GetObjFromJsonValue(devConfigRoot, TAG_STRATEGY_LIST, listConfig) && in ParseCloudConfig() 252 std::vector<std::string> segA = JsonUtils::SplitVersion(configVerA, VERSION_DELIM); in CompareVersion() 257 std::vector<std::string> segB = JsonUtils::SplitVersion(configVerB, VERSION_DELIM); in CompareVersion() 293 if (!JsonUtils in GetParamVersion() [all...] |
/foundation/multimedia/av_session/services/session/server/remote/ |
H A D | json_utils.cpp | 21 int32_t JsonUtils::ConvertSessionType(const std::string& typeString) in ConvertSessionType() 32 std::string JsonUtils::ConvertSessionType(int32_t type) in ConvertSessionType() 43 int32_t JsonUtils::JsonToVector(json object, std::vector<int32_t>& out) in JsonToVector() 53 int32_t JsonUtils::GetJsonCapability(const std::vector<std::vector<int32_t>>& capability, std::string& jsonCapability) in GetJsonCapability() 74 bool JsonUtils::IsInt32(const json& jsonObj, const std::string& key) in IsInt32() 84 bool JsonUtils::IsString(const json& jsonObj, const std::string& key) in IsString() 93 bool JsonUtils::IsBool(const json& jsonObj, const std::string& key) in IsBool() 102 int32_t JsonUtils::GetVectorCapability(const std::string& jsonCapability, in GetVectorCapability() 117 int32_t JsonUtils::GetAllCapability(const std::string& sessionInfo, std::string& jsonCapability) in GetAllCapability() 135 int32_t JsonUtils [all...] |
H A D | remote_session_capability_set.cpp | 37 int32_t ret = JsonUtils::GetJsonCapability(localCapability, jsonSinkCap); in GetLocalCapability() 47 int32_t ret = JsonUtils::GetVectorCapability(sinkCapability, value); in AddRemoteCapability()
|
H A D | json_utils.h | 30 class JsonUtils { class
|
/foundation/ability/ability_runtime/services/common/src/ |
H A D | json_utils.cpp | 27 bool JsonUtils::LoadConfiguration(const std::string& path, nlohmann::json& jsonBuf, in LoadConfiguration() 38 std::string JsonUtils::GetConfigPath(const std::string& path, const std::string& defaultPath) in GetConfigPath() 48 bool JsonUtils::ReadFileInfoJson(const std::string &filePath, nlohmann::json &jsonBuf) in ReadFileInfoJson()
|
H A D | app_utils.cpp | 269 if (!JsonUtils::GetInstance().LoadConfiguration(CONFIG_PATH, object)) { in LoadResidentProcessInExtremeMemory() 309 if (!JsonUtils::GetInstance().LoadConfiguration(ALLOW_NATIVE_CHILD_PROCESS_APPS_CONFIG_PATH, object)) { in LoadAllowNativeChildProcessApps() 378 if (!JsonUtils::GetInstance().LoadConfiguration( in LoadStartAbilityWithoutCallerToken()
|
/foundation/filemanagement/app_file_service/interfaces/common/src/ |
H A D | json_utils.cpp | 25 int32_t JsonUtils::GetJsonObjFromPath(nlohmann::json& jsonObj, const std::string& jsonPath) in GetJsonObjFromPath() 48 int32_t JsonUtils::GetKVFromJson(const nlohmann::json &json, const std::string &key, in GetKVFromJson()
|
/foundation/resourceschedule/device_standby/utils/policy/include/ |
H A D | json_utils.h | 26 class JsonUtils { class 28 JsonUtils() = delete;
|
/foundation/barrierfree/accessibility/services/aams/src/ |
H A D | utils.cpp | 58 class JsonUtils { class 195 if (!JsonUtils::GetStringVecFromJson(sourceJson, KEY_ACCESSIBILITY_CAPABILITIES, capabilities)) { in Parse() 203 if (!JsonUtils::GetStringVecFromJson(sourceJson, KEY_ACCESSIBILITY_ABILITY_TYPES, abilityTypes)) { in Parse() 210 if (!JsonUtils::GetStringFromJson(sourceJson, KEY_ACCESSIBILITY_CAPABILITIES_RATIONALE, initParams.rationale)) { in Parse() 216 if (!JsonUtils::GetStringFromJson(sourceJson, KEY_SETTINGS_ABILITY, initParams.settingsAbility)) { in Parse() 222 if (!JsonUtils::GetBoolFromJson(sourceJson, KEY_IS_IMPORTANT, initParams.isImportant)) { in Parse() 228 if (!JsonUtils::GetBoolFromJson(sourceJson, KEY_NEED_HIDE, initParams.needHide)) { in Parse()
|
/foundation/filemanagement/app_file_service/interfaces/common/include/ |
H A D | json_utils.h | 27 class JsonUtils { class
|
/foundation/multimedia/av_session/services/session/server/ |
H A D | avsession_service.cpp | 2205 ret = JsonUtils::SetSessionBasicInfo(sessionInfo, basicInfo); in SetBasicInfo() 2300 ret = JsonUtils::SetSessionDescriptor(sourceSessionInfo, session->GetDescriptor()); in CastAudio() 2359 ret = JsonUtils::GetAllCapability(sinkSessionInfo, sinkCapability); in CastAudioInner() 2482 int32_t ret = JsonUtils::GetSessionDescriptor(sourceSessionInfo, sourceDescriptor); in RemoteCastAudioInner() 2488 ret = JsonUtils::GetSessionBasicInfo(sinkSessionInfo, sinkDeviceInfo); in RemoteCastAudioInner() 2502 ret = JsonUtils::GetSessionBasicInfo(sourceSessionInfo, sourceDeviceInfo); in RemoteCastAudioInner() 2505 ret = JsonUtils::GetAllCapability(sourceSessionInfo, sourceCapability); in RemoteCastAudioInner() 2510 JsonUtils::SetSessionDescriptor(sinkSessionInfo, session->GetDescriptor()); in RemoteCastAudioInner() 2518 int32_t ret = JsonUtils::GetSessionBasicInfo(sessionInfo, sourceDeviceInfo); in RemoteCancelCastAudioInner() 2521 ret = JsonUtils in RemoteCancelCastAudioInner() [all...] |
H A D | avsession_item.cpp | 1960 ret = JsonUtils::GetVectorCapability(sourceCapability, value);
|
/foundation/resourceschedule/device_standby/services/core/src/ |
H A D | standby_service_impl.cpp | 341 if (!JsonUtils::LoadJsonValueFromFile(root, ALLOW_RECORD_FILE_PATH)) { in ParsePersistentData() 416 JsonUtils::DumpJsonValueToFile(root, ALLOW_RECORD_FILE_PATH); in DumpPersistantData()
|