DriverSettingsMessageAdapter: added "wildcard" support.

* You can now add arbitrarily named fields to the message as well,
  without having them all specified in the template.
* Also added a missing converter method that is called when there
  are no values to add, and implemented all methods in the base
  class, so that you only have to implement the methods you actually
  need.
This commit is contained in:
Axel Dörfler
2015-07-22 20:42:22 +02:00
parent e51a20af4f
commit c4b6278c02
4 changed files with 170 additions and 17 deletions
@@ -22,10 +22,15 @@ public:
virtual status_t ConvertFromDriverSettings(
const driver_parameter& parameter,
const char* name, int32 index, uint32 type,
BMessage& target) = 0;
BMessage& target);
virtual status_t ConvertEmptyFromDriverSettings(
const driver_parameter& parameter,
const char* name, uint32 type,
BMessage& target);
virtual status_t ConvertToDriverSettings(const BMessage& source,
const char* name, int32 index,
uint32 type, BString& value) = 0;
uint32 type, BString& value);
};