Lines Matching refs:rootElement
101 Result<const XMLElement*> readExactlyOneElement(const char* tag, const XMLElement* rootElement) { in readExactlyOneElement() argument
102 const XMLElement* element = rootElement->FirstChildElement(tag); in readExactlyOneElement()
112 Result<ComponentType> readComponentType(const XMLElement* rootElement) { in readComponentType() argument
114 if (const auto result = readExactlyOneElement(kTagComponentType, rootElement); result.ok()) { in readComponentType()
141 Result<std::vector<std::string>> readSafeToKillPackages(const XMLElement* rootElement) { in readSafeToKillPackages() argument
143 for (const XMLElement* outerElement = rootElement->FirstChildElement(kTagSafeToKillPackages); in readSafeToKillPackages()
161 Result<std::vector<std::string>> readVendorPackagePrefixes(const XMLElement* rootElement) { in readVendorPackagePrefixes() argument
163 for (const XMLElement* outerElement = rootElement->FirstChildElement(kTagVendorPackagePrefixes); in readVendorPackagePrefixes()
194 Result<std::vector<PackageMetadata>> readPackageToAppCategoryTypes(const XMLElement* rootElement) { in readPackageToAppCategoryTypes() argument
197 rootElement->FirstChildElement(kTagPackageToAppCategoryTypes); in readPackageToAppCategoryTypes()
225 Result<PerStateBytes> readPerStateBytes(const XMLElement* rootElement) { in readPerStateBytes() argument
228 for (const XMLElement* childElement = rootElement->FirstChildElement(kTagState); in readPerStateBytes()
267 const XMLElement* rootElement) { in readComponentLevelThresholds() argument
269 if (const auto result = readExactlyOneElement(kTagComponentLevelThresholds, rootElement); in readComponentLevelThresholds()
288 const XMLElement* rootElement) { in readPerStateThresholds() argument
290 for (const XMLElement* childElement = rootElement->FirstChildElement(kTagPerStateThreshold); in readPerStateThresholds()
312 const XMLElement* rootElement) { in readPackageSpecificThresholds() argument
315 rootElement->FirstChildElement(kTagPackageSpecificThresholds); in readPackageSpecificThresholds()
329 const XMLElement* rootElement) { in readAppCategorySpecificThresholds() argument
332 rootElement->FirstChildElement(kTagAppCategorySpecificThresholds); in readAppCategorySpecificThresholds()
345 Result<IoOveruseAlertThreshold> readIoOveruseAlertThreshold(const XMLElement* rootElement) { in readIoOveruseAlertThreshold() argument
348 for (const XMLElement* childElement = rootElement->FirstChildElement(kTagParam); in readIoOveruseAlertThreshold()
383 const XMLElement* rootElement) { in readSystemWideThresholds() argument
385 for (const XMLElement* outerElement = rootElement->FirstChildElement(kTagSystemWideThresholds); in readSystemWideThresholds()
403 const XMLElement* rootElement) { in readIoOveruseConfiguration() argument
405 if (const auto result = readExactlyOneElement(kTagIoOveruseConfiguration, rootElement); in readIoOveruseConfiguration()
437 Result<void> writeComponentType(ComponentType componentType, XMLElement* rootElement) { in writeComponentType() argument
438 XMLElement* childElement = rootElement->InsertNewChildElement(kTagComponentType); in writeComponentType()
448 XMLElement* rootElement) { in writeSafeToKillPackages() argument
452 XMLElement* outerElement = rootElement->InsertNewChildElement(kTagSafeToKillPackages); in writeSafeToKillPackages()
468 XMLElement* rootElement) { in writeVendorPackagePrefixes() argument
472 XMLElement* outerElement = rootElement->InsertNewChildElement(kTagVendorPackagePrefixes); in writeVendorPackagePrefixes()
489 XMLElement* rootElement) { in writePackageToAppCategoryTypes() argument
493 XMLElement* outerElement = rootElement->InsertNewChildElement(kTagPackageToAppCategoryTypes); in writePackageToAppCategoryTypes()
510 Result<void> writePerStateBytes(const PerStateBytes& perStateBytes, XMLElement* rootElement) { in writePerStateBytes() argument
512 XMLElement* childElement = rootElement->InsertNewChildElement(kTagState); in writePerStateBytes()
542 XMLElement* rootElement) { in writeComponentLevelThresholds() argument
543 XMLElement* childElement = rootElement->InsertNewChildElement(kTagComponentLevelThresholds); in writeComponentLevelThresholds()
556 XMLElement* rootElement) { in writePerStateThresholds() argument
557 XMLElement* childElement = rootElement->InsertNewChildElement(kTagPerStateThreshold); in writePerStateThresholds()
571 const std::vector<PerStateIoOveruseThreshold>& thresholds, XMLElement* rootElement) { in writePackageSpecificThresholds() argument
572 XMLElement* childElement = rootElement->InsertNewChildElement(kTagPackageSpecificThresholds); in writePackageSpecificThresholds()
587 const std::vector<PerStateIoOveruseThreshold>& thresholds, XMLElement* rootElement) { in writeAppCategorySpecificThresholds() argument
589 rootElement->InsertNewChildElement(kTagAppCategorySpecificThresholds); in writeAppCategorySpecificThresholds()
604 XMLElement* rootElement) { in writeAlertThresholds() argument
605 XMLElement* outerElement = rootElement->InsertNewChildElement(kTagAlertThreshold); in writeAlertThresholds()
635 XMLElement* rootElement) { in writeSystemWideThresholds() argument
636 XMLElement* childElement = rootElement->InsertNewChildElement(kTagSystemWideThresholds); in writeSystemWideThresholds()
650 XMLElement* rootElement) { in writeIoOveruseConfiguration() argument
651 XMLElement* childElement = rootElement->InsertNewChildElement(kTagIoOveruseConfiguration); in writeIoOveruseConfiguration()
690 const XMLElement* rootElement = xmlDoc.RootElement(); in parseXmlFile() local
691 if (!rootElement || strcmp(rootElement->Name(), kTagResourceOveruseConfiguration)) { in parseXmlFile()
695 if (const auto result = readComponentType(rootElement); result.ok()) { in parseXmlFile()
700 if (const auto result = readSafeToKillPackages(rootElement); result.ok()) { in parseXmlFile()
705 if (const auto result = readVendorPackagePrefixes(rootElement); result.ok()) { in parseXmlFile()
710 if (const auto result = readPackageToAppCategoryTypes(rootElement); result.ok()) { in parseXmlFile()
715 if (const auto result = readIoOveruseConfiguration(configuration.componentType, rootElement); in parseXmlFile()
733 XMLElement* rootElement = xmlDoc.NewElement(kTagResourceOveruseConfiguration); in writeXmlFile() local
734 if (!rootElement) { in writeXmlFile()
738 rootElement->SetAttribute(kAttrVersion, kVersionNumber); in writeXmlFile()
739 xmlDoc.InsertEndChild(rootElement); in writeXmlFile()
740 if (const auto result = writeComponentType(configuration.componentType, rootElement); in writeXmlFile()
744 if (const auto result = writeSafeToKillPackages(configuration.safeToKillPackages, rootElement); in writeXmlFile()
749 writeVendorPackagePrefixes(configuration.vendorPackagePrefixes, rootElement); in writeXmlFile()
754 writePackageToAppCategoryTypes(configuration.packageMetadata, rootElement); in writeXmlFile()
766 if (const auto result = writeIoOveruseConfiguration(ioOveruseConfig, rootElement); in writeXmlFile()