/foundation/communication/netmanager_ext/services/ethernetmanager/src/ |
H A D | ethernet_configuration.cpp | 201 std::string fileContent; in ReadUserConfiguration() local 202 if (!ReadFile(filePath, fileContent)) { in ReadUserConfiguration() 211 ParserFileConfig(fileContent, iface, cfg); in ReadUserConfiguration() 238 std::string fileContent; in WriteUserConfiguration() local 239 GenCfgContent(iface, cfg, fileContent); in WriteUserConfiguration() 242 return WriteFile(filePath, fileContent); in WriteUserConfiguration() 435 bool EthernetConfiguration::ReadFile(const std::string &filePath, std::string &fileContent) in ReadFile() argument 454 fileContent = buffer.str(); in ReadFile() 459 bool EthernetConfiguration::WriteFile(const std::string &filePath, const std::string &fileContent) in WriteFile() argument 467 file << fileContent in WriteFile() 473 ParserFileConfig(const std::string &fileContent, std::string &iface, sptr<InterfaceConfiguration> cfg) ParserFileConfig() argument 482 ParseDevice(const std::string &fileContent, std::string &iface) ParseDevice() argument 493 ParseBootProto(const std::string &fileContent, sptr<InterfaceConfiguration> cfg) ParseBootProto() argument 512 ParseStaticConfig(const std::string &fileContent, sptr<InterfaceConfiguration> cfg) ParseStaticConfig() argument 562 ParserFileHttpProxy(const std::string &fileContent, const sptr<InterfaceConfiguration> &cfg) ParserFileHttpProxy() argument 637 GenCfgContent(const std::string &iface, sptr<InterfaceConfiguration> cfg, std::string &fileContent) GenCfgContent() argument 672 GenHttpProxyContent(const sptr<InterfaceConfiguration> &cfg, std::string &fileContent) GenHttpProxyContent() argument [all...] |
/foundation/communication/netmanager_ext/services/ethernetmanager/include/ |
H A D | ethernet_configuration.h | 50 void ParseDevice(const std::string &fileContent, std::string &iface); 51 void ParseBootProto(const std::string &fileContent, sptr<InterfaceConfiguration> cfg); 52 void ParseStaticConfig(const std::string &fileContent, sptr<InterfaceConfiguration> cfg); 63 bool ReadFile(const std::string &filePath, std::string &fileContent); 64 bool WriteFile(const std::string &filePath, const std::string &fileContent); 65 void ParserFileConfig(const std::string &fileContent, std::string &iface, sptr<InterfaceConfiguration> cfg); 66 void ParserFileHttpProxy(const std::string &fileContent, const sptr<InterfaceConfiguration> &cfg); 68 void GenCfgContent(const std::string &iface, sptr<InterfaceConfiguration> cfg, std::string &fileContent); 69 void GenHttpProxyContent(const sptr<InterfaceConfiguration> &cfg, std::string &fileContent);
|
/foundation/communication/netmanager_base/test/netconnmanager/unittest/net_conn_add_test/ |
H A D | ethernet_configuration_test.cpp | 103 std::string fileContent = ""; in HWTEST_F() local 108 ethernetConfiguration.GenCfgContent(iface, nullptr, fileContent); in HWTEST_F() 119 ret = ethernetConfiguration.ReadFile(filePath, fileContent); in HWTEST_F() 122 ret = ethernetConfiguration.WriteFile(filePath, fileContent); in HWTEST_F() 154 std::string fileContent = ""; in HWTEST_F() local 157 fileContent); in HWTEST_F() 170 std::string fileContent = ""; in HWTEST_F() local 171 ret = ethernetConfiguration.WriteFile(path + "ethernet_user_interfaces.json", fileContent); in HWTEST_F() 182 std::string fileContent = "DEVICE=eth0\nBOOTPROTO=LAN_STATIC\n"; in HWTEST_F() local 185 fileContent); in HWTEST_F() 208 std::string fileContent = HWTEST_F() local [all...] |
/foundation/communication/netmanager_ext/test/ethernetmanager/unittest/ethernet_manager_test/ |
H A D | ethernet_configuration_test.cpp | 103 std::string fileContent = ""; in HWTEST_F() local 108 ethernetConfiguration.GenCfgContent(iface, nullptr, fileContent); in HWTEST_F() 119 ret = ethernetConfiguration.ReadFile(filePath, fileContent); in HWTEST_F() 122 ret = ethernetConfiguration.WriteFile(filePath, fileContent); in HWTEST_F() 154 std::string fileContent = ""; in HWTEST_F() local 157 fileContent); in HWTEST_F() 170 std::string fileContent = ""; in HWTEST_F() local 171 ret = ethernetConfiguration.WriteFile(path + "ethernet_user_interfaces.json", fileContent); in HWTEST_F() 182 std::string fileContent = "DEVICE=eth0\nBOOTPROTO=LAN_STATIC\n"; in HWTEST_F() local 185 fileContent); in HWTEST_F() 208 std::string fileContent = HWTEST_F() local [all...] |
/foundation/deviceprofile/device_info_manager/services/core/src/staticcapabilityloader/ |
H A D | static_capability_loader.cpp | 52 std::string fileContent = ""; in LoadStaticCapability() local 53 int32_t loadJsonResult = LoadJsonFile(STATIC_CAPABILITY_PATH, fileContent); in LoadStaticCapability() 58 cJSON* staticCapabilityJson = cJSON_Parse(fileContent.c_str()); in LoadStaticCapability() 75 int32_t StaticCapabilityLoader::LoadJsonFile(const std::string& filePath, std::string& fileContent) in LoadJsonFile() argument 98 fileContent = std::string(std::istreambuf_iterator<char>{ifs}, std::istreambuf_iterator<char>{}); in LoadJsonFile() 311 std::string fileContent = ""; in LoadStaticInfo() local 312 int32_t loadJsonResult = LoadJsonFile(STATIC_INFO_PATH, fileContent); in LoadStaticInfo() 317 cJSON* staticInfoJson = cJSON_Parse(fileContent.c_str()); in LoadStaticInfo() 350 std::string fileContent = ""; in LoadStaticProfiles() local 351 int32_t loadJsonResult = LoadJsonFile(STATIC_INFO_PATH, fileContent); in LoadStaticProfiles() [all...] |
/foundation/deviceprofile/device_info_manager/services/core/src/contentsensormanager/ |
H A D | switch_status_collector.cpp | 38 std::string fileContent = ""; in ConvertToProfile() local 39 int32_t loadJsonResult = LoadJsonFile(SWITCH_CAPABILITY_PATH, fileContent); in ConvertToProfile() 44 cJSON* switchCapabilityJson = cJSON_Parse(fileContent.c_str()); in ConvertToProfile() 65 int32_t SwitchStatusCollector::LoadJsonFile(const std::string& filePath, std::string& fileContent) in LoadJsonFile() argument 88 fileContent = std::string(std::istreambuf_iterator<char>{ifs}, std::istreambuf_iterator<char>{}); in LoadJsonFile()
|
/foundation/ability/idl_tool/test/unittest/cacheable_test/ |
H A D | cacheable_common.h | 69 int PrepareIdlFile(const std::string &fileName, const std::string &fileContent)
in PrepareIdlFile() argument 79 stringBuilder.Append(fileContent.c_str());
in PrepareIdlFile()
|
/foundation/deviceprofile/device_info_manager/services/core/test/unittest/ |
H A D | static_capability_loader_test.cpp | 96 std::string fileContent; in HWTEST_F() local 98 StaticCapabilityLoader::GetInstance().LoadJsonFile(filePath, fileContent); in HWTEST_F() 110 std::string fileContent; in HWTEST_F() local 112 StaticCapabilityLoader::GetInstance().LoadJsonFile(filePath, fileContent); in HWTEST_F() 124 std::string fileContent; in HWTEST_F() local 126 StaticCapabilityLoader::GetInstance().LoadJsonFile(filePath, fileContent); in HWTEST_F() 138 std::string fileContent; in HWTEST_F() local 140 StaticCapabilityLoader::GetInstance().LoadJsonFile(filePath, fileContent); in HWTEST_F() 152 std::string fileContent; in HWTEST_F() local 154 StaticCapabilityLoader::GetInstance().LoadJsonFile(filePath, fileContent); in HWTEST_F() 166 std::string fileContent; HWTEST_F() local [all...] |
/foundation/deviceprofile/device_info_manager/services/core/include/contentsensormanager/ |
H A D | switch_status_collector.h | 29 int32_t LoadJsonFile(const std::string& filePath, std::string& fileContent);
|
/foundation/ability/idl_tool/test/ts/common/ |
H A D | idl_common.h | 109 const std::string &fileName, const std::string &fileContent, const std::string &fileLicense = LICENSE_CONTENT) in PrepareIdlFile() 120 stringBuilder.Append(fileContent.c_str()); in PrepareIdlFile() 108 PrepareIdlFile( const std::string &fileName, const std::string &fileContent, const std::string &fileLicense = LICENSE_CONTENT) PrepareIdlFile() argument
|
/foundation/ability/idl_tool/test/rust/common/ |
H A D | idl_common.h | 109 const std::string &fileName, const std::string &fileContent, const std::string &fileLicense = LICENSE_CONTENT) in PrepareIdlFile() 120 stringBuilder.Append(fileContent.c_str()); in PrepareIdlFile() 108 PrepareIdlFile( const std::string &fileName, const std::string &fileContent, const std::string &fileLicense = LICENSE_CONTENT) PrepareIdlFile() argument
|
/foundation/bundlemanager/distributed_bundle_framework/services/dbms/src/ |
H A D | image_compress.cpp | 111 std::unique_ptr<uint8_t[]> &fileContent, int64_t &fileLength) in GetImageFileInfo() 128 fileContent = std::make_unique<uint8_t[]>(fileLength); in GetImageFileInfo() 129 if (!fread(fileContent.get(), sizeof(uint8_t), fileLength, file)) { in GetImageFileInfo() 110 GetImageFileInfo(const std::string &srcFile, std::unique_ptr<uint8_t[]> &fileContent, int64_t &fileLength) GetImageFileInfo() argument
|
/foundation/resourceschedule/resource_schedule_service/ressched/plugins/cgroup_sched_plugin/framework/sched_controller/ |
H A D | cgroup_adjuster.cpp | 70 char fileContent[MAX_SIZE] = {0}; in AdjustForkProcessGroup() local 71 int rd = read(fd, fileContent, sizeof(fileContent)); in AdjustForkProcessGroup() 77 char *line = strtok(fileContent, flag); in AdjustForkProcessGroup()
|
/foundation/ai/intelligent_voice_framework/interfaces/inner_api/native/ |
H A D | intell_voice_info.h | 153 std::vector<uint8_t> fileContent; member
|
/foundation/bundlemanager/distributed_bundle_framework/services/dbms/include/ |
H A D | image_compress.h | 39 bool GetImageFileInfo(const std::string &srcFile, std::unique_ptr<uint8_t[]> &fileContent, int64_t &fileLength);
|
/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/service/data_share/ |
H A D | data_share_profile_config.cpp | 184 std::unique_ptr<uint8_t[]> fileContent = nullptr; in GetResFromResMgr() local 186 RState ret = resMgr.GetProfileDataByName(profileName.c_str(), len, fileContent); in GetResFromResMgr() 187 if (ret != SUCCESS || fileContent == nullptr) { in GetResFromResMgr() 192 ZLOGE("fileContent is empty, profileName is %{public}s", profileName.c_str()); in GetResFromResMgr() 195 std::string rawData(fileContent.get(), fileContent.get() + len); in GetResFromResMgr()
|
/foundation/ai/intelligent_voice_framework/frameworks/native/ |
H A D | intell_voice_manager.cpp | 169 INTELL_VOICE_LOG_ERROR("fileContent is nullptr"); in GetUploadFiles() 266 ret = g_sProxy->GetWakeupSourceFile(cloneFiles[index], fileInfo.fileContent); in GetWakeupSourceFiles() 289 int ret = g_sProxy->SendWakeupFile(cloneFileInfo[index].filePath, cloneFileInfo[index].fileContent); in EnrollWithWakeupFilesForResult()
|
/foundation/deviceprofile/device_info_manager/services/core/include/staticcapabilityloader/ |
H A D | static_capability_loader.h | 41 int32_t LoadJsonFile(const std::string& filePath, std::string& fileContent);
|
/foundation/deviceprofile/device_info_manager/services/core/src/permissionmanager/ |
H A D | permission_manager.cpp | 83 std::string fileContent(std::istreambuf_iterator<char>{ifs}, std::istreambuf_iterator<char>{}); in LoadPermissionCfg() 86 cJSON* permissionJson = cJSON_Parse(fileContent.c_str()); in LoadPermissionCfg()
|
/foundation/communication/netmanager_base/utils/common_utils/include/ |
H A D | netmanager_base_common_utils.h | 101 bool WriteFile(const std::string &filePath, const std::string &fileContent);
|
/foundation/multimedia/media_library/frameworks/innerkitsimpl/test/unittest/medialibrary_helper_test/src/ |
H A D | media_file_utils_test.cpp | 803 std::string fileContent; in HWTEST_F() local 804 auto res = MediaFileUtils::ReadStrFromFile(filePath, fileContent); in HWTEST_F() 807 auto res2 = MediaFileUtils::ReadStrFromFile(filePath2, fileContent); in HWTEST_F()
|
/foundation/multimedia/image_framework/frameworks/innerkitsimpl/test/unittest/ |
H A D | plugin_texture_encode_test.cpp | 555 std::string fileContent{std::istreambuf_iterator<char>{contents}, {}};
in ReadFileExtern() 556 if (fileContent.length() < bytesPerFile) {
in ReadFileExtern() 558 " bytes, but the file only " << fileContent.length() << " bytes in " << inFile;
in ReadFileExtern() 561 if (memcpy_s(pixelMap, bytesPerFile, static_cast<const char *>(fileContent.c_str()), bytesPerFile) != 0) {
in ReadFileExtern()
|
/foundation/bundlemanager/distributed_bundle_framework/services/dbms/test/unittest/dbms_services_kit_test/ |
H A D | dbms_services_kit_test.cpp | 903 std::unique_ptr<uint8_t[]> fileContent; in HWTEST_F() local 907 HAP_FILE_PATH, fileContent, fileLength); in HWTEST_F() 1474 std::unique_ptr<uint8_t[]> fileContent; in HWTEST_F() local 1476 bool res = imageCompress->GetImageFileInfo(PATH_LOCATION, fileContent, fileLength); in HWTEST_F() 1500 std::unique_ptr<uint8_t[]> fileContent = std::make_unique<uint8_t[]>(fileLength); in HWTEST_F() local 1501 bool res = imageCompress->GetImageFileInfo(PATH_LOCATIONS, fileContent, fileLength); in HWTEST_F()
|
/foundation/ai/intelligent_voice_framework/frameworks/js/napi/ |
H A D | wakeup_manager_napi.cpp | 456 napi_set_named_property(env, obj, "fileContent", SetValue(env, files[filesIndex].fileContent)); in GetCloneCompleteCallback() 534 status = napi_get_named_property(env, value, "fileContent", &tempResult); in WakeupFilesForResultParser() 536 status = GetValue(env, tempResult, fileInfo.fileContent); in WakeupFilesForResultParser() 537 CHECK_CONDITION_RETURN_FALSE((status != napi_ok), "get fileContent failed"); in WakeupFilesForResultParser()
|
/foundation/communication/netmanager_base/services/netpolicymanager/src/core/ |
H A D | net_policy_file.cpp | 76 std::string fileContent = buffer.str(); in ReadFile() local 78 return Json2Obj(fileContent, netPolicy_); in ReadFile()
|