Home
last modified time | relevance | path

Searched refs:JsonUtils (Results 1 - 18 of 18) sorted by relevance

/foundation/resourceschedule/device_standby/services/test/unittest/
H A Dstandby_utils_unit_test.cpp63 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 Djson_utils_test.cpp54 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 Dremote_utils_test.cpp64 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 Djson_utils.h27 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 Djson_utils.cpp33 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 Dstandby_config_manager.cpp106 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 Djson_utils.cpp21 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 Dremote_session_capability_set.cpp37 int32_t ret = JsonUtils::GetJsonCapability(localCapability, jsonSinkCap); in GetLocalCapability()
47 int32_t ret = JsonUtils::GetVectorCapability(sinkCapability, value); in AddRemoteCapability()
H A Djson_utils.h30 class JsonUtils { class
/foundation/ability/ability_runtime/services/common/src/
H A Djson_utils.cpp27 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 Dapp_utils.cpp269 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 Djson_utils.cpp25 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 Djson_utils.h26 class JsonUtils { class
28 JsonUtils() = delete;
/foundation/barrierfree/accessibility/services/aams/src/
H A Dutils.cpp58 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 Djson_utils.h27 class JsonUtils { class
/foundation/multimedia/av_session/services/session/server/
H A Davsession_service.cpp2205 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 Davsession_item.cpp1960 ret = JsonUtils::GetVectorCapability(sourceCapability, value);
/foundation/resourceschedule/device_standby/services/core/src/
H A Dstandby_service_impl.cpp341 if (!JsonUtils::LoadJsonValueFromFile(root, ALLOW_RECORD_FILE_PATH)) { in ParsePersistentData()
416 JsonUtils::DumpJsonValueToFile(root, ALLOW_RECORD_FILE_PATH); in DumpPersistantData()

Completed in 15 milliseconds