PFW: Dynamic parameter access
BZ: 13272
Added dynamic parameter setting / getting interface for hosting platforms
This new API allows:
- getting any parameter
- setting any parameter as long as it is rogue (attached to no domains)
Passed parameter values are in the form of strings.
Change-Id: I01a34597fcb4dafb225519cbc01dfffb22b5d52a
Signed-off-by: Patrick Benavoli <patrickx.benavoli@intel.com>
Reviewed-on: http://android.intel.com:8080/22629
Reviewed-by: Centelles, Sylvain <sylvain.centelles@intel.com>
Tested-by: Barthes, FabienX <fabienx.barthes@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
Reviewed-on: http://android.intel.com:8080/26781
Reviewed-by: Barthes, FabienX <fabienx.barthes@intel.com>
diff --git a/parameter/ArrayParameter.cpp b/parameter/ArrayParameter.cpp
index e8d351d..e777c61 100644
--- a/parameter/ArrayParameter.cpp
+++ b/parameter/ArrayParameter.cpp
@@ -104,6 +104,12 @@
return false;
}
+ // Check for dynamic access
+ if (!checkForDynamicAccess(parameterContext)) {
+
+ return false;
+ }
+
if (uiStartIndex == (uint32_t)-1) {
// No index provided, start with 0
@@ -136,6 +142,13 @@
return false;
}
+
+ // Check for dynamic access
+ if (!checkForDynamicAccess(parameterContext)) {
+
+ return false;
+ }
+
if (uiIndex == (uint32_t)-1) {
// Whole array requested
@@ -275,6 +288,8 @@
uint32_t uiOffset = getOffset() - uiBaseOffset;
uint32_t uiArrayLength = getArrayLength();
+ strValues.clear();
+
bool bFirst = true;
for (uiValueIndex = 0; uiValueIndex < uiArrayLength; uiValueIndex++) {