void LpmConfigurationReaderV1::setLpmEntryKeyPath(string keyPath, UIntN index) { string indexAsString = getIndexAsString(index); string path = keyPath; path += "LPMEntry" + indexAsString + "/"; setKeyPath(path); }
vector<string> LpmConfigurationReaderV1::readAppNames(UInt32 entryIndex) { string indexAsString = getIndexAsString(entryIndex); string path = "AppSpecificLpm" + indexAsString + "/"; setKeyPath(path); string key = "ExecutableNames"; string execNames = getPolicyServices().platformConfigurationData->readConfigurationString( root() + keyPath() + key); if (execNames.empty()) { throw dptf_exception("Empty execNames string returned"); } // Parse the string, it contains app names each separated by space. vector<string> appNames = tokenize(execNames, ' '); return appNames; }
vector<string> LpmConfigurationReaderV0::readAppNames(UInt32 entryIndex) { string key = "AppName"; vector<string> appNames; string indexAsString = getIndexAsString(entryIndex); setKeyPath("AppSpecificMode" + indexAsString + "/"); try { // TODO: Error check for appname? string appName = getPolicyServices().platformConfigurationData->readConfigurationString( root() + keyPath() + key); appNames.push_back(appName); } catch (dptf_exception& e) { string msg = e.what(); m_policyServices.messageLogging->writeMessageDebug(PolicyMessage(FLF, "Error msg (" + msg + "). Error in reading AppName", Constants::Invalid)); } return appNames; }
void LpmConfigurationReaderV1::setLpmSetsKeyPath(UIntN index) { string indexAsString = getIndexAsString(index); string path = "LPMSets" + indexAsString + "/"; setKeyPath(path); }