The IPreferencesControl interface.
More...
#include <murl_i_preferences_control.h>
The IPreferencesControl interface.
The IPreferencesControl implements operating system dependent preferences, limitations to the number of keys and size of the keys should be considered.
- iOS / tvOS / OSX uses standardUserDefaults from NSUserDefaults
- Android uses SharedPreferences from Activity
- Windows uses Registry entries
◆ Exists()
virtual Bool Murl::IPreferencesControl::Exists |
( |
const String & |
key | ) |
const |
|
pure virtual |
Check if a given key exists in the preferences.
- Parameters
-
key | The item key to check. |
- Returns
- true if the key exists.
◆ GetValue() [1/2]
virtual String Murl::IPreferencesControl::GetValue |
( |
const String & |
key | ) |
const |
|
pure virtual |
Get the value from a preference item with a given key.
- Parameters
-
key | The item key to query. |
- Returns
- The value of the item, or an empty string if the key does not exist or the key does not contain a string.
◆ GetValue() [2/2]
virtual Bool Murl::IPreferencesControl::GetValue |
( |
const String & |
key, |
|
|
String & |
value |
|
) |
| const |
|
pure virtual |
Get the value from a preference item with a given key.
- Parameters
-
key | The item key to query. |
value | The string return value. |
- Returns
- true if successful, false if the key does not exist or the key does not contain a string. If false the 'value' return value stays unchanged.
◆ SetValue()
virtual Bool Murl::IPreferencesControl::SetValue |
( |
const String & |
key, |
|
|
const String & |
value |
|
) |
| |
|
pure virtual |
Set the value to a preference item with a given key.
- Parameters
-
key | The item key to set. |
value | The item's new value. |
- Returns
- true if successful.
◆ GetData()
virtual Bool Murl::IPreferencesControl::GetData |
( |
const String & |
key, |
|
|
Data & |
value |
|
) |
| const |
|
pure virtual |
Get binary data from a preference item with a given key.
- Parameters
-
key | The item key to query. |
value | The data return value. |
- Returns
- true if successful, false if the key does not exist or the key does not contain binary data. If false the 'value' return value stays unchanged.
◆ SetData()
virtual Bool Murl::IPreferencesControl::SetData |
( |
const String & |
key, |
|
|
const Data & |
value |
|
) |
| |
|
pure virtual |
Set binary data to a preference item with a given key.
- Parameters
-
key | The item key to set. |
value | The item's new binary data. |
- Returns
- true if successful.
◆ Remove()
virtual Bool Murl::IPreferencesControl::Remove |
( |
const String & |
key | ) |
|
|
pure virtual |
Remove an preference item for a given key.
- Parameters
-
key | The item key to reomve. |
- Returns
- true if successful, false if the key does not exist.
The documentation for this interface was generated from the following file:
- murl_i_preferences_control.h