Make Bluetooth Pref use BMessage to save data.

* This will break previus ways to store settings (as it only stored a struct)
* Now we use BMessage to save data.
* Added some stuff to SettingsMessage.
* Fix a bug in BluetoothSettingsView::_GetClassForMenu() and SettingsMessage::SetValue

Change-Id: I6a0fa1564e78460258f480947592eb4007985007
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3887
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
Fredrik Modéen
2021-06-02 13:44:13 +00:00
parent 7fca70f67e
commit 329ae20bac
7 changed files with 143 additions and 69 deletions
+5
View File
@@ -63,6 +63,8 @@ public:
const BFlattenable* value);
status_t SetValue(const char* name,
const BFont& value);
status_t SetValue(const char* name, type_code type,
const void* data, ssize_t numBytes);
bool GetValue(const char* name,
bool defaultValue) const;
@@ -98,6 +100,9 @@ public:
const BMessage& defaultValue) const;
BFont GetValue(const char* name,
const BFont& defaultValue) const;
void* GetValue(const char* name, type_code type,
ssize_t numBytes,
const void** defaultValue)const;
private:
void _NotifyValueChanged(const char* name) const;