summaryrefslogtreecommitdiffstats
path: root/parameter/EnumParameterType.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Drop release v2.6.0+no-stlportJean-Michel Trivi2015-07-151-2/+3
| | | | | | | Bug 246391 Change-Id: I662b7b0f90c97cb169978e1b64ad1fe32c440cf5 Signed-off-by: Jean-Michel Trivi <jmtrivi@google.com>
* Type mismatch corrections (Windows 64 bits)Patrick Benavoli2015-04-241-8/+8
| | | | | | | | This patch removes the type mismatch warnings revealed by Windows 64 compiler. Wherever necessary, used size_t type for size related data. Change-Id: Ie045ce95940cd83fe8d681168ac9526fc6028d43 Signed-off-by: Patrick Benavoli <patrick.benavoli@intel.com>
* Remove using std::XXX from headersSebastien Gonzalve2014-09-111-5/+7
| | | | | This is a bad practice to have using in headers because it pollutes the namespace of any user of that header.
* Change the license to 3-clause BSDDavid Wagner2014-02-131-19/+24
| | | | | | | Add license header in all source files and Makefiles, Add a "COPYING" file containing the license text. Signed-off-by: David Wagner <david.wagner@intel.com>
* Avoid integer overflow while calculating max valuesDmitry Shkurko2014-02-121-1/+1
| | | | | | | | | | | | BZ: 134249 The behavior is undefined in the case of signed integer overflow for enum and fixed point parameter types. Modify the behavior to handle correctly the signed integers. Change-Id: Idbd0798a39f826853ae1afcd05cebd897675b9a8 Signed-off-by: Dmitry Shkurko <Dmitry.V.Shkurko@intel.com>
* PFW: Add two commands to print xml settings and structureGeorges-Henri Baron2014-02-121-0/+8
| | | | | | | | | | | | | | | | | | | | | BZ: 44910 Creates two commands that can be called through the command line of the parameter-framework. First command getDomainXML returns a string containing the xml structure of the domains, configurations and settings. Second command getSystemClassXML returns a string containing the xml structure of all the instantiated parameter with their attributes. Change-Id: I9a35333802049a2177b8fc416754fdb67e6efff0 Signed-off-by: Georges-Henri Baron <georges-henrix.baron@intel.com> Reviewed-on: http://android.intel.com:8080/55155 Reviewed-by: Rocard, KevinX <kevinx.rocard@intel.com> Reviewed-by: Centelles, Sylvain <sylvain.centelles@intel.com> Tested-by: Mendi, EduardoX <eduardox.mendi@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: Verification of Enum size compatibilityFrédéric Boisnard2014-02-121-9/+47
| | | | | | | | | | | | | | | | | BZ: 30283 No verification is made on the compatibility of the numerical Enum with the declared size. This patch aims to fix this issue. Change-Id: I03dea88d1b3e482eecb92a92169537d51c44c2a7 Signed-off-by: Frédéric Boisnard <fredericx.boisnard@intel.com> Reviewed-on: http://android.intel.com:8080/59242 Reviewed-by: Rocard, KevinX <kevinx.rocard@intel.com> Reviewed-by: Benavoli, Patrick <patrick.benavoli@intel.com> Reviewed-by: De Chivre, Renaud <renaud.de.chivre@intel.com> Tested-by: Mendi, EduardoX <eduardox.mendi@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: Remove names from PFW license headerKevin Rocard2014-02-121-7/+1
| | | | | | | | | | | | | | | BZ: 47701 As parameter framework code is proprietary, it should not be signed (patrick Benavoli name inside the header). Change-Id: I198f2851ee2a6cffed64a552fa399b072a0cbd3e orig-Change-Id: I335ecce2fa22ad11d6fa24f57c7cbbae3423bf1e Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/59560 Reviewed-by: Mendi, EduardoX <eduardox.mendi@intel.com> Tested-by: Mendi, EduardoX <eduardox.mendi@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: overflow not detected for int parametersFrederic Boisnard2014-02-121-13/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BZ: 26285 The following errors were not detected by the PFW when setting parameters of type (U)INT8, (U)INT16, (U)INT32: - When setting a value out of the int32 range (ex: 999999999999999), the strtol/strtoul functions return the value -1 which was then assumed correct by the PFW. Now the errno value is checked to ensure that no range error was encountered by strtol/strtoul. - When the input string does not contain any digits, the strtol/strtoul functions return 0 which was assumed correct by the PFW. Now the endptr argument is checked to make sure that at least a part of the string was parsed. In any case an error message is displayed and the original value is not updated. Made the change compliant to 64-bit OSes. Applied the same corrections to Enum and FixedPoint types. Change-Id: I135538def791208a6eb6143444a3fc30337137e1 Orig-Change-Id: I1519dbf798228a9be579aaf612f456d5eb1b41b5 Signed-off-by: Frederic Boisnard <fredericx.boisnard@intel.com> Reviewed-on: http://android.intel.com:8080/55443 Reviewed-by: Mendi, EduardoX <eduardox.mendi@intel.com> Tested-by: Mendi, EduardoX <eduardox.mendi@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: Enum parameter mappingPatrick Benavoli2014-02-101-38/+44
| | | | | | | | | | | | | | | | | | | | | | | | | BZ: 22125 Enum parameter types are now fully parsed as any other types, which allow Mapping attributes to be correctly interpreted. Now inner structure of enum parameter types is based on automatically created objects: ValuePair Slight adaptation of to ICS environment in Android.mk files and XmlComposer (time.h). More explicit error statement issued in case of plugin load failure in SystemClass.cpp. Added a log for Alsa mixer elements accesses. Change-Id: Ia71fd854e639a288c5dae79260b1e2a0eb1a7ac2 Signed-off-by: Patrick Benavoli <patrickx.benavoli@intel.com> Reviewed-on: http://android.intel.com:8080/33756 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>
* PFW: Type safe dynamic parameter accessPatrick Benavoli2014-02-101-2/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BZ: 15065 Replaced high level string based parameter access interface with typed ones. Now hosting platforms that want to control parameters must instantiate a CParameterHandle object out of the desired parameter path. CParameterHandle object may be used to access any kind of parameters, whatever its internal type, whether it's an array or not. Note that non rogue parameters offer a read access only. Any attempt to write them will fail. CParameterHandle objects offer the following kind of parameter accessing interfaces: - Boolean - Integer (signed or unsigned) - Double - String Note that those interfaces are available for scalar as well as for array parameters. Not all parameter types support all access kinds. Naturally, array parameters are only accessed via array interfaces while scalar parameters are managed through scalar interfaces. Here's a list of parameter types that may be controlled through each kind of access interface: - Boolean access: boolean, bit (bit size must be one); - Integer access: integer (sign must match), boolean (unsigned access only, value <= 1), enumerations; - Double access: for now only fixed points (soon integers will support them also through platform adaptation objects) - String access: all parameter types In addition, cleaned up parameter access related code so as to make it more generic and reusable. Changed version to 2.0.0 Change-Id: Ib80868cdb773e90962e48f1f38d2ff0029189815 Signed-off-by: Patrick Benavoli <patrickx.benavoli@intel.com> Reviewed-on: http://android.intel.com:8080/25406 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>
* PFW: Enumeration typesPatrick Benavoli2014-02-101-0/+247
BZ: 13274 Added enumeration type parameters. They are sizeable like integers but always treated as signed. Lexical - numerical value pairs are now specified from the Strutural description XML file (subsystem level). When set, literal or numerical values may be used interchangeably, however the output form will depend on the currently selected value space and output format. Change-Id: I498b53a2bbd8f414bb8a09063c28265a7502bfbf Signed-off-by: Patrick Benavoli <patrickx.benavoli@intel.com> Reviewed-on: http://android.intel.com:8080/22635 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/26782 Reviewed-by: Barthes, FabienX <fabienx.barthes@intel.com>