summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Benavoli <patrickx.benavoli@intel.com>2011-11-07 19:46:00 +0100
committerDavid Wagner <david.wagner@intel.com>2014-02-10 17:14:59 +0100
commit082dd4728914bae6d6cb70e74c8cffa5155082a3 (patch)
treecbc41110d8784450e9bd63227c557e1c279a2911
parentd3a86bf6c46db222b0afadc7899c25e1a6e015fb (diff)
downloadexternal_parameter-framework-082dd4728914bae6d6cb70e74c8cffa5155082a3.zip
external_parameter-framework-082dd4728914bae6d6cb70e74c8cffa5155082a3.tar.gz
external_parameter-framework-082dd4728914bae6d6cb70e74c8cffa5155082a3.tar.bz2
PFW: selection criteria rule constraints
BZ: 13907 Selection criteria rules' constraints previously applied on the inclusive type of criteria while those should support all kinds of predicates. Now inclusive types support all predicates and exclusive ones support only identity predicates. Change-Id: If5d9d4bd338748950eb4927d833d9d3da7ad48ee Signed-off-by: Patrick Benavoli <patrickx.benavoli@intel.com> Reviewed-on: http://android.intel.com:8080/25402 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>
-rw-r--r--parameter/SelectionCriterionRule.cpp12
-rw-r--r--parameter/SelectionCriterionRule.h2
2 files changed, 7 insertions, 7 deletions
diff --git a/parameter/SelectionCriterionRule.cpp b/parameter/SelectionCriterionRule.cpp
index eec88be..bb353bd 100644
--- a/parameter/SelectionCriterionRule.cpp
+++ b/parameter/SelectionCriterionRule.cpp
@@ -38,10 +38,10 @@
#define base CRule
const CSelectionCriterionRule::SMatchingRuleDescription CSelectionCriterionRule::_astMatchesWhen[CSelectionCriterionRule::ENbMatchesWhen] = {
- { "Is", false },
- { "IsNot", false },
- { "Includes", true },
- { "Excludes", true }
+ { "Is", true },
+ { "IsNot", true },
+ { "Includes", false },
+ { "Excludes", false }
};
CSelectionCriterionRule::CSelectionCriterionRule() : _pSelectionCriterion(NULL), _eMatchesWhen(CSelectionCriterionRule::EIs), _iMatchValue(0)
@@ -156,9 +156,9 @@ bool CSelectionCriterionRule::setMatchesWhen(const string& strMatchesWhen, strin
const ISelectionCriterionTypeInterface* pSelectionCriterionType = _pSelectionCriterion->getCriterionType();
// Check compatibility if relevant
- if (pSelectionCriterionType->isTypeInclusive() && !pstMatchingRuleDescription->bInclusiveTypeCompatible) {
+ if (!pSelectionCriterionType->isTypeInclusive() && !pstMatchingRuleDescription->bExclusiveTypeCompatible) {
- strError = "Value incompatible with inclusive kind of type";
+ strError = "Value incompatible with exclusive kind of type";
return false;
}
diff --git a/parameter/SelectionCriterionRule.h b/parameter/SelectionCriterionRule.h
index 51f22e7..0efa89d 100644
--- a/parameter/SelectionCriterionRule.h
+++ b/parameter/SelectionCriterionRule.h
@@ -49,7 +49,7 @@ class CSelectionCriterionRule : public CRule
struct SMatchingRuleDescription
{
const char* pcMatchesWhen;
- bool bInclusiveTypeCompatible;
+ bool bExclusiveTypeCompatible;
};
public: