diff options
-rw-r--r-- | bindings/python/pfw.i | 3 | ||||
-rw-r--r-- | parameter/ParameterMgr.cpp | 16 | ||||
-rw-r--r-- | parameter/ParameterMgr.h | 17 | ||||
-rw-r--r-- | parameter/ParameterMgrFullConnector.cpp | 10 | ||||
-rw-r--r-- | parameter/ParameterMgrPlatformConnector.cpp | 10 | ||||
-rw-r--r-- | parameter/include/ParameterMgrFullConnector.h | 13 | ||||
-rw-r--r-- | parameter/include/ParameterMgrPlatformConnector.h | 13 |
7 files changed, 82 insertions, 0 deletions
diff --git a/bindings/python/pfw.i b/bindings/python/pfw.i index da01cdc..ce27173 100644 --- a/bindings/python/pfw.i +++ b/bindings/python/pfw.i @@ -88,6 +88,9 @@ public: // Configuration application void applyConfigurations(); + bool getForceNoRemoteInterface() const; + void setForceNoRemoteInterface(bool bForceNoRemoteInterface); + void setFailureOnMissingSubsystem(bool bFail); bool getFailureOnMissingSubsystem() const; diff --git a/parameter/ParameterMgr.cpp b/parameter/ParameterMgr.cpp index 1d77666..4b8bdf6 100644 --- a/parameter/ParameterMgr.cpp +++ b/parameter/ParameterMgr.cpp @@ -306,6 +306,7 @@ CParameterMgr::CParameterMgr(const string& strConfigurationFilePath) : _uiMaxCommandUsageLength(0), _pLogger(NULL), _uiLogDepth(0), + _bForceNoRemoteInterface(false), _bFailOnMissingSubsystem(true), _bFailOnFailedSettingsLoad(true), _bValidateSchemasOnStart(false) @@ -2426,11 +2427,26 @@ void CParameterMgr::feedElementLibraries() _pElementLibrarySet->addElementLibrary(pParameterConfigurationLibrary); } +bool CParameterMgr::getForceNoRemoteInterface() const +{ + return _bForceNoRemoteInterface; +} + +void CParameterMgr::setForceNoRemoteInterface(bool bForceNoRemoteInterface) +{ + _bForceNoRemoteInterface = bForceNoRemoteInterface; +} + // Remote Processor Server connection handling bool CParameterMgr::handleRemoteProcessingInterface(string& strError) { CAutoLog autoLog(this, "Handling remote processing interface"); + if (_bForceNoRemoteInterface) { + // The user requested not to start the remote interface + return true; + } + // Start server if tuning allowed if (getConstFrameworkConfiguration()->isTuningAllowed()) { diff --git a/parameter/ParameterMgr.h b/parameter/ParameterMgr.h index de948ba..c6a2fd5 100644 --- a/parameter/ParameterMgr.h +++ b/parameter/ParameterMgr.h @@ -143,6 +143,17 @@ public: // Dynamic parameter handling CParameterHandle* createParameterHandle(const std::string& strPath, std::string& strError); + /** Is the remote interface forcefully disabled ? + */ + bool getForceNoRemoteInterface() const; + + /** + * Forcefully disable the remote interface or cancel this policy + * + * @param[in] bForceNoRemoteInterface disable the remote interface if true. + */ + void setForceNoRemoteInterface(bool bForceNoRemoteInterface); + /** Should start fail in case of missing subsystems. * * @param[in] bFail: If set to true, parameterMgr start will fail on missing subsystems. @@ -614,6 +625,12 @@ private: ILogger* _pLogger; mutable uint32_t _uiLogDepth; + /** If set to false, the remote interface won't be started no matter what. + * If set to true - the default - it has no impact on the policy for + * starting the remote interface. + */ + bool _bForceNoRemoteInterface; + /** If set to true, missing subsystem will abort parameterMgr start. * If set to false, missing subsystem will fallback on virtual subsystem. */ diff --git a/parameter/ParameterMgrFullConnector.cpp b/parameter/ParameterMgrFullConnector.cpp index 9cd2441..b03facc 100644 --- a/parameter/ParameterMgrFullConnector.cpp +++ b/parameter/ParameterMgrFullConnector.cpp @@ -95,6 +95,16 @@ ISelectionCriterionInterface* CParameterMgrFullConnector::getSelectionCriterion( return _pParameterMgr->getSelectionCriterion(strName); } +bool CParameterMgrFullConnector::getForceNoRemoteInterface() const +{ + return _pParameterMgr->getForceNoRemoteInterface(); +} + +void CParameterMgrFullConnector::setForceNoRemoteInterface(bool bForceNoRemoteInterface) +{ + _pParameterMgr->setForceNoRemoteInterface(bForceNoRemoteInterface); +} + void CParameterMgrFullConnector::applyConfigurations() { return _pParameterMgr->applyConfigurations(); diff --git a/parameter/ParameterMgrPlatformConnector.cpp b/parameter/ParameterMgrPlatformConnector.cpp index f1ca539..f29c8a8 100644 --- a/parameter/ParameterMgrPlatformConnector.cpp +++ b/parameter/ParameterMgrPlatformConnector.cpp @@ -93,6 +93,16 @@ void CParameterMgrPlatformConnector::setLogger(CParameterMgrPlatformConnector::I _pLogger = pLogger; } +bool CParameterMgrPlatformConnector::getForceNoRemoteInterface() const +{ + return _pParameterMgr->getForceNoRemoteInterface(); +} + +void CParameterMgrPlatformConnector::setForceNoRemoteInterface(bool bForceNoRemoteInterface) +{ + _pParameterMgr->setForceNoRemoteInterface(bForceNoRemoteInterface); +} + bool CParameterMgrPlatformConnector::setFailureOnMissingSubsystem(bool bFail, string &strError) { if (_bStarted) { diff --git a/parameter/include/ParameterMgrFullConnector.h b/parameter/include/ParameterMgrFullConnector.h index 63d3cf0..8ef7bb7 100644 --- a/parameter/include/ParameterMgrFullConnector.h +++ b/parameter/include/ParameterMgrFullConnector.h @@ -71,6 +71,19 @@ public: const ISelectionCriterionTypeInterface* pSelectionCriterionType); ISelectionCriterionInterface* getSelectionCriterion(const std::string& strName); + /** Is the remote interface forcefully disabled ? + */ + bool getForceNoRemoteInterface() const; + + /** + * Forcefully disable the remote interface or cancel this policy. + * + * Has no effect if called after calling start(). + * + * @param[in] bForceNoRemoteInterface disable the remote interface if true. + */ + void setForceNoRemoteInterface(bool bForceNoRemoteInterface); + void applyConfigurations(); /** Should start fail in case of missing subsystems. diff --git a/parameter/include/ParameterMgrPlatformConnector.h b/parameter/include/ParameterMgrPlatformConnector.h index d8ae433..cd99215 100644 --- a/parameter/include/ParameterMgrPlatformConnector.h +++ b/parameter/include/ParameterMgrPlatformConnector.h @@ -78,6 +78,19 @@ public: // Must be cassed after successfull start CParameterHandle* createParameterHandle(const std::string& strPath, std::string& strError) const; + /** Is the remote interface forcefully disabled ? + */ + bool getForceNoRemoteInterface() const; + + /** + * Forcefully disable the remote interface or cancel this policy. + * + * Has no effect if called after calling start(). + * + * @param[in] bForceNoRemoteInterface disable the remote interface if true. + */ + void setForceNoRemoteInterface(bool bForceNoRemoteInterface); + /** Should start fail in case of missing subsystems. * * Will fail if called on started instance. |