summaryrefslogtreecommitdiffstats
path: root/parameter
diff options
context:
space:
mode:
authorPatrick Benavoli <patrickx.benavoli@intel.com>2011-11-07 20:32:51 +0100
committerDavid Wagner <david.wagner@intel.com>2014-02-10 17:14:59 +0100
commit95ac034b72580306e9246f7efa3f7ba709a02183 (patch)
tree9dc36b32d1ff881132b3424d761aa3b06c06717d /parameter
parent99041c5b5ed90dd66c65fa1903a74f5f3f9a8fdc (diff)
downloadexternal_parameter-framework-95ac034b72580306e9246f7efa3f7ba709a02183.zip
external_parameter-framework-95ac034b72580306e9246f7efa3f7ba709a02183.tar.gz
external_parameter-framework-95ac034b72580306e9246f7efa3f7ba709a02183.tar.bz2
PFW: file organization
BZ: 12888, 12925, 13285, 13289 - Removed hard coded paths from source files - Separated test related resources and programs into a test subfolder - Schemas folder at root containing the schemas, a symbolic link to that folder might be a good way to enable schema aware editing - Now global configuration file path is passed from the hosting platform instead of the class name. - Global configuration path contains only the relevant class related descriptions (plugin paths, structure, settings) - .user environment file eclipsed through git-ignore (and removed from projects) - Removed system class configuration obsolete files Change-Id: I99b783ba22bca05238a760b2127939a91e976be8 Signed-off-by: Patrick Benavoli <patrickx.benavoli@intel.com> Reviewed-on: http://android.intel.com:8080/25404 Reviewed-by: Barthes, FabienX <fabienx.barthes@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
Diffstat (limited to 'parameter')
-rw-r--r--parameter/Android.mk1
-rw-r--r--parameter/BinarySerializableElement.h2
-rw-r--r--parameter/ConfigurableDomains.cpp2
-rw-r--r--parameter/ConfigurableDomains.h2
-rw-r--r--parameter/ConfigurableElement.h2
-rw-r--r--parameter/Element.h3
-rw-r--r--parameter/FrameworkConfigurationLocation.cpp12
-rw-r--r--parameter/ParameterFrameworkConfiguration.cpp35
-rw-r--r--parameter/ParameterFrameworkConfiguration.h19
-rw-r--r--parameter/ParameterMgr.cpp80
-rw-r--r--parameter/ParameterMgr.h10
-rw-r--r--parameter/ParameterMgrPlatformConnector.cpp10
-rw-r--r--parameter/ParameterMgrPlatformConnector.h2
-rw-r--r--parameter/SystemClass.cpp4
-rw-r--r--parameter/SystemClass.h2
-rw-r--r--parameter/SystemClassConfiguration.cpp63
-rw-r--r--parameter/SystemClassConfiguration.h54
17 files changed, 106 insertions, 197 deletions
diff --git a/parameter/Android.mk b/parameter/Android.mk
index caa2fb4..57bbe96 100644
--- a/parameter/Android.mk
+++ b/parameter/Android.mk
@@ -53,7 +53,6 @@ LOCAL_SRC_FILES:= \
KindElement.cpp \
ElementLibrarySet.cpp \
ErrorContext.cpp \
- SystemClassConfiguration.cpp \
AreaConfiguration.cpp \
DomainConfiguration.cpp \
ConfigurableDomain.cpp \
diff --git a/parameter/BinarySerializableElement.h b/parameter/BinarySerializableElement.h
index bf27789..f1d4b0d 100644
--- a/parameter/BinarySerializableElement.h
+++ b/parameter/BinarySerializableElement.h
@@ -36,7 +36,7 @@
class CBinarySerializableElement : public CElement
{
public:
- CBinarySerializableElement(const string& strName);
+ CBinarySerializableElement(const string& strName = "");
// Serialization
virtual void binarySerialize(CBinaryStream& binaryStream);
diff --git a/parameter/ConfigurableDomains.cpp b/parameter/ConfigurableDomains.cpp
index c65bf3f..597d453 100644
--- a/parameter/ConfigurableDomains.cpp
+++ b/parameter/ConfigurableDomains.cpp
@@ -36,7 +36,7 @@
#define base CBinarySerializableElement
-CConfigurableDomains::CConfigurableDomains(const string& strSystemClassName) : base(strSystemClassName)
+CConfigurableDomains::CConfigurableDomains()
{
}
diff --git a/parameter/ConfigurableDomains.h b/parameter/ConfigurableDomains.h
index 4c6192f..8b62d0f 100644
--- a/parameter/ConfigurableDomains.h
+++ b/parameter/ConfigurableDomains.h
@@ -40,7 +40,7 @@ class CSyncerSet;
class CConfigurableDomains : public CBinarySerializableElement
{
public:
- CConfigurableDomains(const string& strSystemClassName);
+ CConfigurableDomains();
// Configuration/Domains handling
/// Domains
diff --git a/parameter/ConfigurableElement.h b/parameter/ConfigurableElement.h
index 61a8bda..4cb2d72 100644
--- a/parameter/ConfigurableElement.h
+++ b/parameter/ConfigurableElement.h
@@ -47,7 +47,7 @@ class CConfigurableElement : public CElement
friend class CDomainConfiguration;
typedef list<const CConfigurableDomain*>::const_iterator ConfigurableDomainListConstIterator;
public:
- CConfigurableElement(const string& strName);
+ CConfigurableElement(const string& strName = "");
virtual ~CConfigurableElement();
// Offset in main blackboard
diff --git a/parameter/Element.h b/parameter/Element.h
index 99e7d10..af4fc33 100644
--- a/parameter/Element.h
+++ b/parameter/Element.h
@@ -59,6 +59,7 @@ public:
// Name / Path
const string& getName() const;
+ void setName(const string& strName);
bool rename(const string& strName, string& strError);
string getPath() const;
string getQualifiedPath() const;
@@ -111,8 +112,6 @@ public:
protected:
// Content dumping
virtual void logValue(string& strValue, CErrorContext& errorContext) const;
- // Name setting
- void setName(const string& strName);
// Utility to underline
static void appendTitle(string& strTo, const string& strTitle);
diff --git a/parameter/FrameworkConfigurationLocation.cpp b/parameter/FrameworkConfigurationLocation.cpp
index 22f1c7f..b8d9b79 100644
--- a/parameter/FrameworkConfigurationLocation.cpp
+++ b/parameter/FrameworkConfigurationLocation.cpp
@@ -44,7 +44,7 @@ bool CFrameworkConfigurationLocation::fromXml(const CXmlElement& xmlElement, CXm
if (_strPath.empty()) {
- serializingContext.setError("Empty Path attribute in elememnt " + xmlElement.getPath());
+ serializingContext.setError("Empty Path attribute in element " + xmlElement.getPath());
return false;
}
@@ -66,15 +66,11 @@ string CFrameworkConfigurationLocation::getFolderPath(const string& strBaseFolde
{
uint32_t uiSlashPos = _strPath.rfind('/', -1);
- string strFolderPath = ".";
-
if (isPathRelative()) {
if (uiSlashPos != (uint32_t)-1) {
- strFolderPath = _strPath.substr(0, uiSlashPos);
-
- return strBaseFolder + "/" + strFolderPath;
+ return strBaseFolder + "/" + _strPath.substr(0, uiSlashPos);
} else {
@@ -84,9 +80,7 @@ string CFrameworkConfigurationLocation::getFolderPath(const string& strBaseFolde
assert(uiSlashPos != (uint32_t)-1);
- strFolderPath = _strPath.substr(0, uiSlashPos);
-
- return strFolderPath;
+ return _strPath.substr(0, uiSlashPos);
}
}
diff --git a/parameter/ParameterFrameworkConfiguration.cpp b/parameter/ParameterFrameworkConfiguration.cpp
index 388e375..d1c032b 100644
--- a/parameter/ParameterFrameworkConfiguration.cpp
+++ b/parameter/ParameterFrameworkConfiguration.cpp
@@ -33,6 +33,7 @@
#define base CElement
CParameterFrameworkConfiguration::CParameterFrameworkConfiguration()
+ : _bTuningAllowed(false), _uiServerPort(0)
{
}
@@ -45,3 +46,37 @@ bool CParameterFrameworkConfiguration::childrenAreDynamic() const
{
return true;
}
+
+// System class name
+const string& CParameterFrameworkConfiguration::getSystemClassName() const
+{
+ return _strSystemClassName;
+}
+
+// Tuning allowed
+bool CParameterFrameworkConfiguration::isTuningAllowed() const
+{
+ return _bTuningAllowed;
+}
+
+// Server port
+uint16_t CParameterFrameworkConfiguration::getServerPort() const
+{
+ return _uiServerPort;
+}
+
+// From IXmlSink
+bool CParameterFrameworkConfiguration::fromXml(const CXmlElement& xmlElement, CXmlSerializingContext& serializingContext)
+{
+ // System class name
+ _strSystemClassName = xmlElement.getAttributeString("SystemClassName");
+
+ // Tuning allowed
+ _bTuningAllowed = xmlElement.getAttributeBoolean("TuningAllowed");
+
+ // Server port
+ _uiServerPort = (uint16_t)xmlElement.getAttributeInteger("ServerPort");
+
+ // Base
+ return base::fromXml(xmlElement, serializingContext);
+}
diff --git a/parameter/ParameterFrameworkConfiguration.h b/parameter/ParameterFrameworkConfiguration.h
index e0891e3..f8290e4 100644
--- a/parameter/ParameterFrameworkConfiguration.h
+++ b/parameter/ParameterFrameworkConfiguration.h
@@ -37,8 +37,25 @@ class CParameterFrameworkConfiguration : public CElement
public:
CParameterFrameworkConfiguration();
- virtual string getKind() const;
+ // System class name
+ const string& getSystemClassName() const;
+
+ // Tuning allowed
+ bool isTuningAllowed() const;
+
+ // Server port
+ uint16_t getServerPort() const;
+ // From IXmlSink
+ virtual bool fromXml(const CXmlElement& xmlElement, CXmlSerializingContext& serializingContext);
private:
+ virtual string getKind() const;
virtual bool childrenAreDynamic() const;
+
+ // System class name
+ string _strSystemClassName;
+ // Tuning allowed
+ bool _bTuningAllowed;
+ // Server port
+ uint16_t _uiServerPort;
};
diff --git a/parameter/ParameterMgr.cpp b/parameter/ParameterMgr.cpp
index 61e204a..102d28b 100644
--- a/parameter/ParameterMgr.cpp
+++ b/parameter/ParameterMgr.cpp
@@ -55,7 +55,6 @@
#include "ParameterFrameworkConfiguration.h"
#include "FrameworkConfigurationGroup.h"
#include "FrameworkConfigurationLocation.h"
-#include "SystemClassConfiguration.h"
#include "ConfigurableDomains.h"
#include "ConfigurableDomain.h"
#include "DomainConfiguration.h"
@@ -88,7 +87,7 @@ const char* gacSystemSchemasSubFolder = "Schemas";
// Config File System looks normally like this:
// ---------------------------------------------
-//├── ParameterFrameworkConfiguration.xml
+//├── <ParameterFrameworkConfiguration>.xml
//├── Schemas
//│ └── *.xsd
//├── Settings
@@ -168,16 +167,14 @@ const CParameterMgr::SRemoteCommandParserItem CParameterMgr::gastRemoteCommandPa
// Remote command parsers array Size
const uint32_t CParameterMgr::guiNbRemoteCommandParserItems = sizeof(gastRemoteCommandParserItems) / sizeof(gastRemoteCommandParserItems[0]);
-CParameterMgr::CParameterMgr(const string& strParameterFrameworkConfigurationFolderPath, const string& strSystemClassName) :
+CParameterMgr::CParameterMgr(const string& strConfigurationFilePath) :
_bTuningModeIsOn(false),
_bValueSpaceIsRaw(false),
_bOutputRawFormatIsHex(false),
_bAutoSyncOn(true),
_pMainParameterBlackboard(new CParameterBlackboard),
_pElementLibrarySet(new CElementLibrarySet),
- _strParameterFrameworkConfigurationFolderPath(strParameterFrameworkConfigurationFolderPath),
- _strSchemaFolderLocation(strParameterFrameworkConfigurationFolderPath + "/" + gacSystemSchemasSubFolder),
- _pSystemClassConfiguration(NULL),
+ _strXmlConfigurationFilePath(strConfigurationFilePath),
_uiStructureChecksum(0),
_pRemoteProcessorServer(NULL),
_uiMaxCommandUsageLength(0),
@@ -191,8 +188,8 @@ CParameterMgr::CParameterMgr(const string& strParameterFrameworkConfigurationFol
// Deal with children
addChild(new CParameterFrameworkConfiguration);
addChild(new CSelectionCriteria);
- addChild(new CSystemClass(strSystemClassName));
- addChild(new CConfigurableDomains(strSystemClassName));
+ addChild(new CSystemClass);
+ addChild(new CConfigurableDomains);
// Feed element library
feedElementLibraries();
@@ -212,6 +209,16 @@ CParameterMgr::CParameterMgr(const string& strParameterFrameworkConfigurationFol
pRemoteCommandParserItem->_pcHelp,
pRemoteCommandParserItem->_pcDescription);
}
+
+ // Configuration file folder
+ uint32_t uiSlashPos = _strXmlConfigurationFilePath.rfind('/', -1);
+
+ assert(uiSlashPos != (uint32_t)-1);
+
+ _strXmlConfigurationFolderPath = _strXmlConfigurationFilePath.substr(0, uiSlashPos);
+
+ // Schema absolute folder location
+ _strSchemaFolderLocation = _strXmlConfigurationFolderPath + "/" + gacSystemSchemasSubFolder;
}
CParameterMgr::~CParameterMgr()
@@ -348,18 +355,19 @@ bool CParameterMgr::loadFrameworkConfiguration(string& strError)
{
CAutoLog autoLog(this, "Loading framework configuration");
- // Get Xml config file name
- string strXmlConfigurationFilePath = _strParameterFrameworkConfigurationFolderPath + "/" + gacParameterFrameworkConfigurationFileName;
-
// Parse Structure XML file
CXmlElementSerializingContext elementSerializingContext(strError);
- if (!xmlParse(elementSerializingContext, getFrameworkConfiguration(), strXmlConfigurationFilePath, _strParameterFrameworkConfigurationFolderPath, EFrameworkConfigurationLibrary)) {
+ if (!xmlParse(elementSerializingContext, getFrameworkConfiguration(), _strXmlConfigurationFilePath, _strXmlConfigurationFolderPath, EFrameworkConfigurationLibrary)) {
return false;
}
+ // Set class name to system class and configurable domains
+ getSystemClass()->setName(getConstFrameworkConfiguration()->getSystemClassName());
+ getConfigurableDomains()->setName(getConstFrameworkConfiguration()->getSystemClassName());
+
// Get subsystem plugins folders element
- const CFrameworkConfigurationGroup* pSubsystemPluginFolders= static_cast<const CFrameworkConfigurationGroup*>(getConstFrameworkConfiguration()->findChild("SubsystemPluginFolders"));
+ const CFrameworkConfigurationGroup* pSubsystemPluginFolders = static_cast<const CFrameworkConfigurationGroup*>(getConstFrameworkConfiguration()->findChild("SubsystemPluginFolders"));
if (!pSubsystemPluginFolders) {
@@ -378,32 +386,16 @@ bool CParameterMgr::loadFrameworkConfiguration(string& strError)
return false;
}
+ // Collect plugin paths
for (uiPluginFolderLocation = 0; uiPluginFolderLocation < uiNbPluginFolderLocations; uiPluginFolderLocation++) {
const CFrameworkConfigurationLocation* pSubsystemPluginLocation = static_cast<const CFrameworkConfigurationLocation*>(pSubsystemPluginFolders->getChild(uiPluginFolderLocation));
- _astrPluginFolderPaths.push_back(pSubsystemPluginLocation->getFilePath(_strParameterFrameworkConfigurationFolderPath));
+ _astrPluginFolderPaths.push_back(pSubsystemPluginLocation->getFilePath(_strXmlConfigurationFilePath));
}
- // Get configuration for current system class
- const CFrameworkConfigurationGroup* pParameterConfigurationGroup = static_cast<const CFrameworkConfigurationGroup*>(getConstFrameworkConfiguration()->findChildOfKind("ParameterConfiguration"));
-
- if (!pParameterConfigurationGroup) {
-
- strError = "Parameter Framework Configuration: couldn't find ParameterConfiguration element";
-
- return false;
- }
- _pSystemClassConfiguration = static_cast<const CSystemClassConfiguration*>(pParameterConfigurationGroup->findChild(getSystemClass()->getName()));
-
- if (!_pSystemClassConfiguration) {
-
- strError = "No framework configuration found for SystemClass " + getSystemClass()->getName();
-
- return false;
- }
// Log tuning availability
- log("Tuning %s", _pSystemClassConfiguration->isTuningAllowed() ? "allowed" : "prohibited");
+ log("Tuning %s", getConstFrameworkConfiguration()->isTuningAllowed() ? "allowed" : "prohibited");
return true;
}
@@ -416,7 +408,7 @@ bool CParameterMgr::loadStructure(string& strError)
CAutoLog autoLog(this, "Loading " + pSystemClass->getName() + " system class structure");
// Get structure description element
- const CFrameworkConfigurationLocation* pStructureDescriptionFileLocation = static_cast<const CFrameworkConfigurationLocation*>(_pSystemClassConfiguration->findChildOfKind("StructureDescriptionFileLocation"));
+ const CFrameworkConfigurationLocation* pStructureDescriptionFileLocation = static_cast<const CFrameworkConfigurationLocation*>(getConstFrameworkConfiguration()->findChildOfKind("StructureDescriptionFileLocation"));
if (!pStructureDescriptionFileLocation) {
@@ -426,10 +418,10 @@ bool CParameterMgr::loadStructure(string& strError)
}
// Get Xml structure folder
- string strXmlStructureFolder = pStructureDescriptionFileLocation->getFolderPath(_strParameterFrameworkConfigurationFolderPath);
+ string strXmlStructureFolder = pStructureDescriptionFileLocation->getFolderPath(_strXmlConfigurationFolderPath);
// Get Xml structure file name
- string strXmlStructureFilePath = pStructureDescriptionFileLocation->getFilePath(_strParameterFrameworkConfigurationFolderPath);
+ string strXmlStructureFilePath = pStructureDescriptionFileLocation->getFilePath(_strXmlConfigurationFolderPath);
// Parse Structure XML file
CXmlParameterSerializingContext parameterBuildContext(strError);
@@ -455,7 +447,7 @@ bool CParameterMgr::loadSettings(string& strError)
CAutoLog autoLog(this, "Loading settings");
// Get settings configuration element
- const CFrameworkConfigurationGroup* pParameterConfigurationGroup = static_cast<const CFrameworkConfigurationGroup*>(_pSystemClassConfiguration->findChildOfKind("SettingsConfiguration"));
+ const CFrameworkConfigurationGroup* pParameterConfigurationGroup = static_cast<const CFrameworkConfigurationGroup*>(getConstFrameworkConfiguration()->findChildOfKind("SettingsConfiguration"));
if (!pParameterConfigurationGroup) {
@@ -471,7 +463,7 @@ bool CParameterMgr::loadSettings(string& strError)
if (pBinarySettingsFileLocation) {
// Get Xml binary settings file name
- strXmlBinarySettingsFilePath = pBinarySettingsFileLocation->getFilePath(_strParameterFrameworkConfigurationFolderPath);
+ strXmlBinarySettingsFilePath = pBinarySettingsFileLocation->getFilePath(_strXmlConfigurationFolderPath);
}
// Get configurable domains element
@@ -487,10 +479,10 @@ bool CParameterMgr::loadSettings(string& strError)
CConfigurableDomains* pConfigurableDomains = getConfigurableDomains();
// Get Xml configuration domains file name
- string strXmlConfigurationDomainsFilePath = pConfigurableDomainsFileLocation->getFilePath(_strParameterFrameworkConfigurationFolderPath);
+ string strXmlConfigurationDomainsFilePath = pConfigurableDomainsFileLocation->getFilePath(_strXmlConfigurationFolderPath);
// Get Xml configuration domains folder
- string strXmlConfigurationDomainsFolder = pConfigurableDomainsFileLocation->getFolderPath(_strParameterFrameworkConfigurationFolderPath);
+ string strXmlConfigurationDomainsFolder = pConfigurableDomainsFileLocation->getFolderPath(_strXmlConfigurationFolderPath);
// Parse configuration domains XML file (ask to read settings from XML file if they are not provided as binary)
CXmlDomainSerializingContext xmlDomainSerializingContext(strError, !pBinarySettingsFileLocation);
@@ -1247,7 +1239,7 @@ bool CParameterMgr::getValue(const string& strPath, string& strValue, string& st
bool CParameterMgr::setTuningMode(bool bOn, string& strError)
{
// Tuning allowed?
- if (bOn && !_pSystemClassConfiguration->isTuningAllowed()) {
+ if (bOn && !getConstFrameworkConfiguration()->isTuningAllowed()) {
strError = "Tuning prohibited";
@@ -1700,8 +1692,6 @@ void CParameterMgr::feedElementLibraries()
pFrameworkConfigurationLibrary->addElementBuilder(new TElementBuilderTemplate<CParameterFrameworkConfiguration>("ParameterFrameworkConfiguration"));
pFrameworkConfigurationLibrary->addElementBuilder(new TKindElementBuilderTemplate<CFrameworkConfigurationGroup>("SubsystemPluginFolders"));
pFrameworkConfigurationLibrary->addElementBuilder(new TKindElementBuilderTemplate<CFrameworkConfigurationLocation>("PluginFolderLocation"));
- pFrameworkConfigurationLibrary->addElementBuilder(new TKindElementBuilderTemplate<CFrameworkConfigurationGroup>("ParameterConfiguration"));
- pFrameworkConfigurationLibrary->addElementBuilder(new TKindElementBuilderTemplate<CSystemClassConfiguration>("SystemClassConfiguration"));
pFrameworkConfigurationLibrary->addElementBuilder(new TKindElementBuilderTemplate<CFrameworkConfigurationLocation>("StructureDescriptionFileLocation"));
pFrameworkConfigurationLibrary->addElementBuilder(new TKindElementBuilderTemplate<CFrameworkConfigurationGroup>("SettingsConfiguration"));
pFrameworkConfigurationLibrary->addElementBuilder(new TKindElementBuilderTemplate<CFrameworkConfigurationLocation>("ConfigurableDomainsFileLocation"));
@@ -1744,7 +1734,7 @@ bool CParameterMgr::handleRemoteProcessingInterface(string& strError)
CAutoLog autoLog(this, "Handling remote processing interface");
// Start server if tuning allowed
- if (_pSystemClassConfiguration->isTuningAllowed()) {
+ if (getConstFrameworkConfiguration()->isTuningAllowed()) {
log("Loading remote processor library");
@@ -1777,9 +1767,9 @@ bool CParameterMgr::handleRemoteProcessingInterface(string& strError)
}
// Create server
- _pRemoteProcessorServer = pfnCreateRemoteProcessorServer(_pSystemClassConfiguration->getServerPort(), _pCommandHandler);
+ _pRemoteProcessorServer = pfnCreateRemoteProcessorServer(getConstFrameworkConfiguration()->getServerPort(), _pCommandHandler);
- log("Starting remote processor server on port %d", _pSystemClassConfiguration->getServerPort());
+ log("Starting remote processor server on port %d", getConstFrameworkConfiguration()->getServerPort());
// Start
if (!_pRemoteProcessorServer->start()) {
diff --git a/parameter/ParameterMgr.h b/parameter/ParameterMgr.h
index 857034a..c7bdcb6 100644
--- a/parameter/ParameterMgr.h
+++ b/parameter/ParameterMgr.h
@@ -80,7 +80,7 @@ class CParameterMgr : private CElement
};
// Version
static const uint32_t guiEditionMajor = 0x1;
- static const uint32_t guiEditionMinor = 0x0;
+ static const uint32_t guiEditionMinor = 0x1;
static const uint32_t guiRevision = 0x0;
public:
// Logger interface
@@ -91,7 +91,7 @@ public:
};
// Construction
- CParameterMgr(const string& strParameterFrameworkConfigurationFolderPath, const string& strSystemClassName);
+ CParameterMgr(const string& strConfigurationFilePath);
virtual ~CParameterMgr();
// Logging
@@ -303,15 +303,13 @@ private:
CElementLibrarySet* _pElementLibrarySet;
// XML parsing, object creation handling
- string _strParameterFrameworkConfigurationFolderPath; // Root folder for framework configuration
+ string _strXmlConfigurationFilePath; // Configuration file path
+ string _strXmlConfigurationFolderPath; // Root folder for configuration file
string _strSchemaFolderLocation; // Place where schemas stand
// Subsystem plugin location
vector<string> _astrPluginFolderPaths;
- // System Class Configuration
- const CSystemClassConfiguration* _pSystemClassConfiguration;
-
// Whole system structure checksum
uint8_t _uiStructureChecksum;
diff --git a/parameter/ParameterMgrPlatformConnector.cpp b/parameter/ParameterMgrPlatformConnector.cpp
index 6fe5c65..17d202c 100644
--- a/parameter/ParameterMgrPlatformConnector.cpp
+++ b/parameter/ParameterMgrPlatformConnector.cpp
@@ -33,15 +33,9 @@
#include "ParameterMgrLogger.h"
#include <assert.h>
-#ifdef SIMULATION
-const char* gpcParameterFrameworkConfigurationFolderPath = "/home/pat/Documents/gingerbread2/hardware/intel/PRIVATE/parameter-framework/XML";
-#else
-const char* gpcParameterFrameworkConfigurationFolderPath = "/etc/parameter-framework";
-#endif
-
// Construction
-CParameterMgrPlatformConnector::CParameterMgrPlatformConnector(const string& strSystemClassName)
- : _pParameterMgr(new CParameterMgr(gpcParameterFrameworkConfigurationFolderPath, strSystemClassName)), _bStarted(false), _pLogger(NULL)
+CParameterMgrPlatformConnector::CParameterMgrPlatformConnector(const string& strConfigurationFilePath)
+ : _pParameterMgr(new CParameterMgr(strConfigurationFilePath)), _bStarted(false), _pLogger(NULL)
{
// Logging
_pParameterMgrLogger = new CParameterMgrLogger(this);
diff --git a/parameter/ParameterMgrPlatformConnector.h b/parameter/ParameterMgrPlatformConnector.h
index 518fd92..14e408c 100644
--- a/parameter/ParameterMgrPlatformConnector.h
+++ b/parameter/ParameterMgrPlatformConnector.h
@@ -39,7 +39,7 @@ public:
};
// Construction
- CParameterMgrPlatformConnector(const std::string& strSystemClassName);
+ CParameterMgrPlatformConnector(const std::string& strConfigurationFilePath);
~CParameterMgrPlatformConnector(); // Not virtual since not supposed to be derived!
// Selection Criteria interface. Beware returned objects are lent, clients shall not delete them!
diff --git a/parameter/SystemClass.cpp b/parameter/SystemClass.cpp
index d2adaac..6443e2c 100644
--- a/parameter/SystemClass.cpp
+++ b/parameter/SystemClass.cpp
@@ -54,7 +54,7 @@ const char* gpcPluginSymbolSuffix = "SusbystemBuilder";
// Used by subsystem plugins
typedef void (*GetSusbystemBuilder)(CSubsystemLibrary*);
-CSystemClass::CSystemClass(const string& strName) : base(strName), _pSubsystemLibrary(new CSubsystemLibrary)
+CSystemClass::CSystemClass() : _pSubsystemLibrary(new CSubsystemLibrary)
{
}
@@ -85,7 +85,7 @@ bool CSystemClass::loadSubsystems(string& strError, const vector<string>& astrPl
for (uiFolderLocation = 0; uiFolderLocation < astrPluginFolderPaths.size(); uiFolderLocation++) {
// Folder for current SystemClass
- string strPluginPath = astrPluginFolderPaths[uiFolderLocation] + "/" + getName() + "/";
+ string strPluginPath = astrPluginFolderPaths[uiFolderLocation] + "/";
// Get plugin list
getPluginFiles(strPluginPath, astrPluginFiles);
diff --git a/parameter/SystemClass.h b/parameter/SystemClass.h
index a739f1a..d80ab52 100644
--- a/parameter/SystemClass.h
+++ b/parameter/SystemClass.h
@@ -38,7 +38,7 @@ class CSubsystemLibrary;
class CSystemClass : public CConfigurableElement
{
public:
- CSystemClass(const string& strName);
+ CSystemClass();
virtual ~CSystemClass();
// Called from parent before actual init
diff --git a/parameter/SystemClassConfiguration.cpp b/parameter/SystemClassConfiguration.cpp
deleted file mode 100644
index 0ebb2b1..0000000
--- a/parameter/SystemClassConfiguration.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-/* <auto_header>
- * <FILENAME>
- *
- * INTEL CONFIDENTIAL
- * Copyright © 2011 Intel
- * Corporation All Rights Reserved.
- *
- * The source code contained or described herein and all documents related to
- * the source code ("Material") are owned by Intel Corporation or its suppliers
- * or licensors. Title to the Material remains with Intel Corporation or its
- * suppliers and licensors. The Material contains trade secrets and proprietary
- * and confidential information of Intel or its suppliers and licensors. The
- * Material is protected by worldwide copyright and trade secret laws and
- * treaty provisions. No part of the Material may be used, copied, reproduced,
- * modified, published, uploaded, posted, transmitted, distributed, or
- * disclosed in any way without Intel’s prior express written permission.
- *
- * No license under any patent, copyright, trade secret or other intellectual
- * property right is granted to or conferred upon you by disclosure or delivery
- * of the Materials, either expressly, by implication, inducement, estoppel or
- * otherwise. Any license under such intellectual property rights must be
- * express and approved by Intel in writing.
- *
- * AUTHOR: Patrick Benavoli (patrickx.benavoli@intel.com)
- * CREATED: 2011-06-01
- * UPDATED: 2011-07-27
- *
- *
- * </auto_header>
- */
-#include "SystemClassConfiguration.h"
-
-#define base CFrameworkConfigurationGroup
-
-CSystemClassConfiguration::CSystemClassConfiguration(const string& strName, const string& strKind)
- : base(strName, strKind), _bTuningAllowed(false), _uiServerPort(0)
-{
-}
-
-// Tuning allowed
-bool CSystemClassConfiguration::isTuningAllowed() const
-{
- return _bTuningAllowed;
-}
-
-// Server port
-uint16_t CSystemClassConfiguration::getServerPort() const
-{
- return _uiServerPort;
-}
-
-// From IXmlSink
-bool CSystemClassConfiguration::fromXml(const CXmlElement& xmlElement, CXmlSerializingContext& serializingContext)
-{
- // Tuning allowed
- _bTuningAllowed = xmlElement.getAttributeBoolean("TuningAllowed");
-
- // Server port
- _uiServerPort = (uint16_t)xmlElement.getAttributeInteger("ServerPort");
-
- // Base
- return base::fromXml(xmlElement, serializingContext);
-}
diff --git a/parameter/SystemClassConfiguration.h b/parameter/SystemClassConfiguration.h
deleted file mode 100644
index 0a24a8a..0000000
--- a/parameter/SystemClassConfiguration.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* <auto_header>
- * <FILENAME>
- *
- * INTEL CONFIDENTIAL
- * Copyright © 2011 Intel
- * Corporation All Rights Reserved.
- *
- * The source code contained or described herein and all documents related to
- * the source code ("Material") are owned by Intel Corporation or its suppliers
- * or licensors. Title to the Material remains with Intel Corporation or its
- * suppliers and licensors. The Material contains trade secrets and proprietary
- * and confidential information of Intel or its suppliers and licensors. The
- * Material is protected by worldwide copyright and trade secret laws and
- * treaty provisions. No part of the Material may be used, copied, reproduced,
- * modified, published, uploaded, posted, transmitted, distributed, or
- * disclosed in any way without Intel’s prior express written permission.
- *
- * No license under any patent, copyright, trade secret or other intellectual
- * property right is granted to or conferred upon you by disclosure or delivery
- * of the Materials, either expressly, by implication, inducement, estoppel or
- * otherwise. Any license under such intellectual property rights must be
- * express and approved by Intel in writing.
- *
- * AUTHOR: Patrick Benavoli (patrickx.benavoli@intel.com)
- * CREATED: 2011-06-01
- * UPDATED: 2011-07-27
- *
- *
- * </auto_header>
- */
-#pragma once
-
-#include "FrameworkConfigurationGroup.h"
-
-class CSystemClassConfiguration : public CFrameworkConfigurationGroup
-{
-public:
- CSystemClassConfiguration(const string& strName, const string& strKind);
-
- // Tuning allowed
- bool isTuningAllowed() const;
-
- // Server port
- uint16_t getServerPort() const;
-
- // From IXmlSink
- virtual bool fromXml(const CXmlElement& xmlElement, CXmlSerializingContext& serializingContext);
-private:
- // Tuning allowed
- bool _bTuningAllowed;
- // Server port
- uint16_t _uiServerPort;
-};
-