Home
last modified time | relevance | path

Searched refs:fileContent (Results 1 – 25 of 48) sorted by relevance

12

/ohos5.0/foundation/communication/netmanager_ext/services/ethernetmanager/src/
H A Dethernet_configuration.cpp527 netMasks = fileContent.substr(pos, fileContent.find(WRAP, pos) - pos); in ParseStaticConfig()
539 routes = fileContent.substr(pos, fileContent.find(WRAP, pos) - pos); in ParseStaticConfig()
645 fileContent = fileContent + KEY_DEVICE + iface + WRAP; in GenCfgContent()
647 fileContent = fileContent + KEY_BOOTPROTO + mode + WRAP; in GenCfgContent()
662 fileContent = fileContent + KEY_IPADDR + ipAddresses + WRAP; in GenCfgContent()
663 fileContent = fileContent + KEY_NETMASK + netMasks + WRAP; in GenCfgContent()
664 fileContent = fileContent + KEY_GATEWAY + gateways + WRAP; in GenCfgContent()
665 fileContent = fileContent + KEY_ROUTE + routes + WRAP; in GenCfgContent()
666 fileContent = fileContent + KEY_ROUTE_NETMASK + routeMasks + WRAP; in GenCfgContent()
667 fileContent = fileContent + KEY_DNS + dnsServers + WRAP; in GenCfgContent()
[all …]
/ohos5.0/base/security/huks/test/unittest/huks_standard_test/module_test/service_test/huks_service/upgrade/file_transfer/config_parser/src/
H A Dhks_config_parser_test.cpp113 struct HksBlob fileContent = { .data = reinterpret_cast<uint8_t *>(paramSet001), variable
116 EXPECT_EQ(HKS_SUCCESS, HksParseConfig("", &fileContent, &info));
159 EXPECT_EQ(HKS_SUCCESS, HksParseConfig("", &fileContent, &info));
202 EXPECT_EQ(HKS_SUCCESS, HksParseConfig("", &fileContent, &info));
245 EXPECT_EQ(HKS_SUCCESS, HksParseConfig("", &fileContent, &info));
288 EXPECT_EQ(HKS_SUCCESS, HksParseConfig("", &fileContent, &info));
326 EXPECT_EQ(HKS_SUCCESS, HksParseConfig("", &fileContent, &info));
369 EXPECT_EQ(HKS_SUCCESS, HksParseConfig("", &fileContent, &info));
412 EXPECT_EQ(HKS_SUCCESS, HksParseConfig("", &fileContent, &info));
455 EXPECT_EQ(HKS_SUCCESS, HksParseConfig("", &fileContent, &info));
[all …]
/ohos5.0/foundation/communication/netmanager_ext/test/ethernetmanager/unittest/ethernet_manager_test/
H A Dethernet_configuration_test.cpp103 std::string fileContent = ""; variable
154 std::string fileContent = ""; variable
157 fileContent);
170 std::string fileContent = ""; variable
185 fileContent);
189 fileContent);
193 fileContent);
195 fileContent = "DEVICE=eth0\nBOOTPROTO=DHCP\n";
197 fileContent);
208 std::string fileContent = variable
[all …]
/ohos5.0/base/security/huks/services/huks_standard/huks_service/main/upgrade/file_transfer/src/
H A Dhks_file_transfer.c157 ret = HksFileWrite(newPath, alias, 0, fileContent->data, fileContent->size); in TransferFile()
198 static int32_t GetFileContent(const char *path, const char *alias, struct HksBlob *fileContent) in GetFileContent() argument
204 fileContent->data = (uint8_t *)HksMalloc(size); in GetFileContent()
205 HKS_IF_NULL_RETURN(fileContent->data, HKS_ERROR_MALLOC_FAIL) in GetFileContent()
207 fileContent->size = size; in GetFileContent()
208 return HksFileRead(path, alias, 0, fileContent, &fileContent->size); in GetFileContent()
220 struct HksBlob fileContent = { 0 }; in ProcessFileUpgrade() local
226 ret = GetFileContent(path, alias, &fileContent); in ProcessFileUpgrade()
230 ret = HksParseConfig(alias, &fileContent, &info); in ProcessFileUpgrade()
239 HKS_IF_NOT_SUCC_LOGE(TransferFile(alias, path, &fileContent, &info), "TransferFile failed!") in ProcessFileUpgrade()
[all …]
H A Dhks_config_parser.c94 static int32_t ParseOwnerIdFromFileContent(const struct HksBlob *fileContent, uint32_t *uid, uint64… in ParseOwnerIdFromFileContent() argument
98 …int32_t ret = HksGetParamSet((const struct HksParamSet *)fileContent->data, fileContent->size, &tm… in ParseOwnerIdFromFileContent()
192 int32_t HksParseConfig(const char *alias, const struct HksBlob *fileContent, struct HksUpgradeFileT… in HksParseConfig() argument
197 int32_t ret = ParseOwnerIdFromFileContent(fileContent, &uid, &accessTokenId, &userId); in HksParseConfig()
/ohos5.0/foundation/communication/netmanager_ext/services/ethernetmanager/include/
H A Dethernet_configuration.h50 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<InterfaceConfigurat…
66 … void ParserFileHttpProxy(const std::string &fileContent, const sptr<InterfaceConfiguration> &cfg);
68 …enCfgContent(const std::string &iface, sptr<InterfaceConfiguration> cfg, std::string &fileContent);
69 void GenHttpProxyContent(const sptr<InterfaceConfiguration> &cfg, std::string &fileContent);
/ohos5.0/base/security/huks/utils/file_iterative_reader/src/
H A Dhks_iterative_reader.c186 …32_t HksReadFileWithIterativeReader(struct HksIterativeReader *reader, struct HksBlob *fileContent, in HksReadFileWithIterativeReader() argument
201 fileContent->data = (uint8_t *)HksMalloc(size); in HksReadFileWithIterativeReader()
202 if (fileContent->data == NULL) { in HksReadFileWithIterativeReader()
207 fileContent->size = size; in HksReadFileWithIterativeReader()
228 … reader->fileLists->infos[reader->curIndex].fileName, 0, fileContent, &fileContent->size); in HksReadFileWithIterativeReader()
232 HKS_FREE_BLOB(*fileContent); in HksReadFileWithIterativeReader()
/ohos5.0/foundation/deviceprofile/device_info_manager/services/core/src/staticcapabilityloader/
H A Dstatic_capability_loader.cpp52 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
98fileContent = 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 …]
/ohos5.0/base/security/access_token/services/common/config_policy/src/
H A Dconfig_policy_loader.cpp121 … ConfigPolicLoader::GetConfigValueFromFile(const ServiceType& type, const std::string& fileContent, in GetConfigValueFromFile() argument
124 nlohmann::json jsonRes = nlohmann::json::parse(fileContent, nullptr, false); in GetConfigValueFromFile()
164 std::string fileContent; in GetConfigValue() local
165 int32_t res = JsonParser::ReadCfgFile(filePath, fileContent); in GetConfigValue()
172 if (GetConfigValueFromFile(type, fileContent, config)) { in GetConfigValue()
/ohos5.0/foundation/deviceprofile/device_info_manager/services/core/src/contentsensormanager/
H A Dswitch_status_collector.cpp38 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
88fileContent = std::string(std::istreambuf_iterator<char>{ifs}, std::istreambuf_iterator<char>{}); in LoadJsonFile()
/ohos5.0/foundation/deviceprofile/device_info_manager/services/core/test/unittest/
H A Dstatic_capability_loader_test.cpp96 std::string fileContent; variable
98 StaticCapabilityLoader::GetInstance().LoadJsonFile(filePath, fileContent);
110 std::string fileContent; variable
112 StaticCapabilityLoader::GetInstance().LoadJsonFile(filePath, fileContent);
124 std::string fileContent; variable
126 StaticCapabilityLoader::GetInstance().LoadJsonFile(filePath, fileContent);
138 std::string fileContent; variable
140 StaticCapabilityLoader::GetInstance().LoadJsonFile(filePath, fileContent);
152 std::string fileContent; variable
154 StaticCapabilityLoader::GetInstance().LoadJsonFile(filePath, fileContent);
[all …]
/ohos5.0/foundation/resourceschedule/resource_schedule_service/cgroup_sched/framework/sched_controller/
H A Dcgroup_adjuster.cpp70 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()
/ohos5.0/foundation/ability/idl_tool/test/unittest/cacheable_test/
H A Dcacheable_common.h69 int PrepareIdlFile(const std::string &fileName, const std::string &fileContent) in PrepareIdlFile() argument
79 stringBuilder.Append(fileContent.c_str()); in PrepareIdlFile()
/ohos5.0/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/service/data_share/
H A Ddata_share_profile_config.cpp184 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()
195 std::string rawData(fileContent.get(), fileContent.get() + len); in GetResFromResMgr()
/ohos5.0/base/security/appverify/interfaces/innerkits/appverify/test/unittest/src/
H A Dhap_verify_test.cpp165 std::string fileContent[TEST_FILE_NUM] = {HAP_FILE_ECC_SIGN_BASE64, HAP_FILE_RSA_SIGN_BASE64}; variable
174 ASSERT_TRUE(Base64StringDecode(fileContent[i], hapFileEccSign));
241 std::string fileContent = HAP_FILE_ECC_SIGN_BASE64; variable
244 ASSERT_TRUE(Base64StringDecode(fileContent, hapFileEccSign));
/ohos5.0/foundation/bundlemanager/distributed_bundle_framework/services/dbms/src/
H A Dimage_compress.cpp111 std::unique_ptr<uint8_t[]> &fileContent, int64_t &fileLength) in GetImageFileInfo() argument
128 fileContent = std::make_unique<uint8_t[]>(fileLength); in GetImageFileInfo()
129 if (!fread(fileContent.get(), sizeof(uint8_t), fileLength, file)) { in GetImageFileInfo()
/ohos5.0/foundation/ability/idl_tool/test/rust/common/
H A Didl_common.h109 …const std::string &fileName, const std::string &fileContent, const std::string &fileLicense = LICE…
120 stringBuilder.Append(fileContent.c_str());
/ohos5.0/foundation/ability/idl_tool/test/ts/common/
H A Didl_common.h109 …const std::string &fileName, const std::string &fileContent, const std::string &fileLicense = LICE…
120 stringBuilder.Append(fileContent.c_str());
/ohos5.0/base/security/huks/utils/file_iterative_reader/include/
H A Dhks_iterative_reader.h43 …32_t HksReadFileWithIterativeReader(struct HksIterativeReader *reader, struct HksBlob *fileContent,
/ohos5.0/foundation/deviceprofile/device_info_manager/services/core/include/contentsensormanager/
H A Dswitch_status_collector.h29 int32_t LoadJsonFile(const std::string& filePath, std::string& fileContent);
/ohos5.0/base/security/huks/services/huks_standard/huks_service/main/upgrade/file_transfer/include/
H A Dhks_config_parser.h62 int32_t HksParseConfig(const char *alias, const struct HksBlob *fileContent, struct HksUpgradeFileT…
/ohos5.0/foundation/ai/intelligent_voice_framework/frameworks/native/
H A Dintell_voice_manager.cpp259 ret = g_sProxy->GetWakeupSourceFile(cloneFiles[index], fileInfo.fileContent); in GetWakeupSourceFiles()
282 …nt ret = g_sProxy->SendWakeupFile(cloneFileInfo[index].filePath, cloneFileInfo[index].fileContent); in EnrollWithWakeupFilesForResult()
/ohos5.0/foundation/bundlemanager/distributed_bundle_framework/services/dbms/include/
H A Dimage_compress.h39 …bool GetImageFileInfo(const std::string &srcFile, std::unique_ptr<uint8_t[]> &fileContent, int64_t…
/ohos5.0/foundation/ai/intelligent_voice_framework/interfaces/inner_api/native/
H A Dintell_voice_info.h147 std::vector<uint8_t> fileContent; member
/ohos5.0/base/hiviewdfx/hitrace/frameworks/native/
H A Dcommon_utils.cpp123 …std::string fileContent((std::istreambuf_iterator<char>(inFile)), std::istreambuf_iterator<char>()… in ParseJsonFromFile()
124 cJSON* root = cJSON_Parse(fileContent.c_str()); in ParseJsonFromFile()

12