ledger-core
|
#include <Preferences.hpp>
Public Member Functions | |
virtual std::string | getString (const std::string &key, const std::string &fallbackValue)=0 |
virtual int32_t | getInt (const std::string &key, int32_t fallbackValue)=0 |
virtual int64_t | getLong (const std::string &key, int64_t fallbackValue)=0 |
virtual bool | getBoolean (const std::string &key, bool fallbackValue)=0 |
virtual std::vector< std::string > | getStringArray (const std::string &key, const std::vector< std::string > &fallbackValue)=0 |
virtual std::vector< uint8_t > | getData (const std::string &key, const std::vector< uint8_t > &fallbackValue)=0 |
virtual bool | contains (const std::string &key)=0 |
virtual std::shared_ptr< PreferencesEditor > | edit ()=0 |
Interface for accessing and modifying custom preferences. Preferences are key - value data which will be persisted to the filesystem. They can be local or stored with the Ledger API backend (encrypted by a user secret). This can be used to attach application data to the libledger-core modules (i.e. a wallet pool, a wallet, an account, an operation). This interface is highly inspired by Android SharedPreferences.
|
pure virtual |
Checks whether the Preferences contains the given key.
Implemented in ledger::core::Preferences.
|
pure virtual |
Get a preferences editor in order to add/modify/remove data.
Implemented in ledger::core::Preferences.
|
pure virtual |
Retrieves the value associated with the given key or fallback to the default value.
Implemented in ledger::core::Preferences.
|
pure virtual |
Retrieves the value associated with the given key or fallback to the default value.
Implemented in ledger::core::Preferences.
|
pure virtual |
Retrieves the value associated with the given key or fallback to the default value.
Implemented in ledger::core::Preferences.
|
pure virtual |
Retrieves the value associated with the given key or fallback to the default value.
Implemented in ledger::core::Preferences.
|
pure virtual |
Retrieves the value associated with the given key or fallback to the default value.
Implemented in ledger::core::Preferences.
|
pure virtual |
Retrieves the value associated with the given key or fallback to the default value.
Implemented in ledger::core::Preferences.