#include <KVMap.h>
Public Member Functions | |
| int | init () |
| Initializes KVMap. More... | |
| int | attach (const char *partition_name, kvstore_config_t *kv_config) |
| Attach a KVStore partition configuration, and add it to the KVMap array. More... | |
| int | detach (const char *partition_name) |
| Detach a KVStore partition configuration from the KVMap array, and deinitialize its components. More... | |
| int | deinit () |
| Deinitialize the KVMap array, and deinitialize all the attached partitions. More... | |
| int | lookup (const char *full_name, mbed::KVStore **kv_instance, size_t *key_index, uint32_t *flags_mask=NULL) |
| Full name lookup, and then break it into KVStore instance and key. More... | |
| KVStore * | get_internal_kv_instance (const char *name) |
| Getter for the internal KVStore instance. More... | |
| KVStore * | get_external_kv_instance (const char *name) |
| Getter for the external KVStore instance. More... | |
| KVStore * | get_main_kv_instance (const char *name) |
| Getter for the main KVStore instance. More... | |
| BlockDevice * | get_internal_blockdevice_instance (const char *name) |
| Getter for the internal BlockDevice instance. More... | |
| BlockDevice * | get_external_blockdevice_instance (const char *name) |
| Getter for the external BlockDevice instance. More... | |
| FileSystem * | get_external_filesystem_instance (const char *name) |
| Getter for the external FileSystem instance. More... | |
Static Public Member Functions | |
| static KVMap & | get_instance () |
| As a singleton, return the single instance of the class. More... | |
| int attach | ( | const char * | partition_name, |
| kvstore_config_t * | kv_config | ||
| ) |
| int deinit | ( | ) |
Deinitialize the KVMap array, and deinitialize all the attached partitions.
| int detach | ( | const char * | partition_name | ) |
| BlockDevice* get_external_blockdevice_instance | ( | const char * | name | ) |
Getter for the external BlockDevice instance.
| name | String parameter contains the /partition name/. |
| FileSystem* get_external_filesystem_instance | ( | const char * | name | ) |
Getter for the external FileSystem instance.
| name | String parameter contains the /partition name/. |
| KVStore* get_external_kv_instance | ( | const char * | name | ) |
Getter for the external KVStore instance.
| name | String parameter contains the /partition name/. |
|
static |
As a singleton, return the single instance of the class.
This class is a singleton for the following reasons:
| BlockDevice* get_internal_blockdevice_instance | ( | const char * | name | ) |
Getter for the internal BlockDevice instance.
| name | String parameter contains the /partition name/. |
| KVStore* get_internal_kv_instance | ( | const char * | name | ) |
Getter for the internal KVStore instance.
| name | String parameter contains the /partition name/. |
| KVStore* get_main_kv_instance | ( | const char * | name | ) |
Getter for the main KVStore instance.
| name | String parameter contains the /partition name/. |
| int init | ( | ) |
Initializes KVMap.
| int lookup | ( | const char * | full_name, |
| mbed::KVStore ** | kv_instance, | ||
| size_t * | key_index, | ||
| uint32_t * | flags_mask = NULL |
||
| ) |
Full name lookup, and then break it into KVStore instance and key.
| [in] | full_name | String parameter contains the partition name to look for. The String should be formated as follow "/partition name/key". The key is optional. |
| [out] | kv_instance | Returns the main KVStore instance associated with the required partition name. |
| [out] | key_index | Returns an index to the first character of the key. |
| [out] | flags_mask | Return the flag masking for the current configuration |