#include <KVStore.h>
Data Structures | |
struct | info |
Holds key information. More... | |
Public Types | |
typedef struct mbed::KVStore::info | info_t |
Holds key information. More... | |
Public Member Functions | |
virtual int | init ()=0 |
Initialize KVStore. More... | |
virtual int | deinit ()=0 |
Deinitialize KVStore. More... | |
virtual int | reset ()=0 |
Reset KVStore contents (clear all keys) More... | |
virtual int | set (const char *key, const void *buffer, size_t size, uint32_t create_flags)=0 |
Set one KVStore item, given key and value. More... | |
virtual int | get (const char *key, void *buffer, size_t buffer_size, size_t *actual_size=NULL, size_t offset=0)=0 |
Get one KVStore item, given key. More... | |
virtual int | get_info (const char *key, info_t *info=NULL)=0 |
Get information of a given key. More... | |
virtual int | remove (const char *key)=0 |
Remove a KVStore item, given key. More... | |
virtual int | set_start (set_handle_t *handle, const char *key, size_t final_data_size, uint32_t create_flags)=0 |
Start an incremental KVStore set sequence. More... | |
virtual int | set_add_data (set_handle_t handle, const void *value_data, size_t data_size)=0 |
Add data to incremental KVStore set sequence. More... | |
virtual int | set_finalize (set_handle_t handle)=0 |
Finalize an incremental KVStore set sequence. More... | |
virtual int | iterator_open (iterator_t *it, const char *prefix=NULL)=0 |
Start an iteration over KVStore keys. More... | |
virtual int | iterator_next (iterator_t it, char *key, size_t key_size)=0 |
Get next key in iteration. More... | |
virtual int | iterator_close (iterator_t it)=0 |
Close iteration. More... | |
bool | is_valid_key (const char *key) const |
Convenience function for checking key validity. More... | |
typedef struct mbed::KVStore::info info_t |
Holds key information.
|
pure virtual |
Deinitialize KVStore.
Implemented in SecureStore, TDBStore, and FileSystemStore.
|
pure virtual |
Get one KVStore item, given key.
[in] | key | Key - must not include '*' '/' '?' ':' ';' '\' '"' '|' ' ' '<' '>' '\'. |
[in] | buffer | Value data buffer. |
[in] | buffer_size | Value data buffer size. |
[out] | actual_size | Actual read size (NULL to pass nothing). |
[in] | offset | Offset to read from in data. |
Implemented in SecureStore, TDBStore, and FileSystemStore.
|
pure virtual |
Get information of a given key.
[in] | key | Key - must not include '*' '/' '?' ':' ';' '\' '"' '|' ' ' '<' '>' '\'. |
[out] | info | Returned information structure (NULL to pass nothing). |
Implemented in SecureStore, TDBStore, and FileSystemStore.
|
pure virtual |
Initialize KVStore.
Implemented in SecureStore, TDBStore, and FileSystemStore.
bool is_valid_key | ( | const char * | key | ) | const |
|
pure virtual |
Close iteration.
[in] | it | Iterator handle. |
Implemented in SecureStore, TDBStore, and FileSystemStore.
|
pure virtual |
Get next key in iteration.
[in] | it | Iterator handle. |
[in] | key | Buffer for returned key. |
[in] | key_size | Key buffer size. |
Implemented in SecureStore, TDBStore, and FileSystemStore.
|
pure virtual |
Start an iteration over KVStore keys.
[out] | it | Returned iterator handle. |
[in] | prefix | Key prefix (null for all keys). |
Implemented in SecureStore, TDBStore, and FileSystemStore.
|
pure virtual |
Remove a KVStore item, given key.
[in] | key | Key - must not include '*' '/' '?' ':' ';' '\' '"' '|' ' ' '<' '>' '\'. |
Implemented in SecureStore, TDBStore, and FileSystemStore.
|
pure virtual |
Reset KVStore contents (clear all keys)
Implemented in SecureStore, TDBStore, and FileSystemStore.
|
pure virtual |
Set one KVStore item, given key and value.
[in] | key | Key - must not include '*' '/' '?' ':' ';' '\' '"' '|' ' ' '<' '>' '\'. |
[in] | buffer | Value data buffer. |
[in] | size | Value data size. |
[in] | create_flags | Flag mask. |
Implemented in SecureStore, TDBStore, and FileSystemStore.
|
pure virtual |
Add data to incremental KVStore set sequence.
[in] | handle | Incremental set handle. |
[in] | value_data | Value data to add. |
[in] | data_size | Value data size. |
Implemented in SecureStore, TDBStore, and FileSystemStore.
|
pure virtual |
Finalize an incremental KVStore set sequence.
[in] | handle | Incremental set handle. |
Implemented in SecureStore, TDBStore, and FileSystemStore.
|
pure virtual |
Start an incremental KVStore set sequence.
[out] | handle | Returned incremental set handle. |
[in] | key | Key - must not include '*' '/' '?' ':' ';' '\' '"' '|' ' ' '<' '>' '\'. |
[in] | final_data_size | Final value data size. |
[in] | create_flags | Flag mask. |
Implemented in SecureStore, TDBStore, and FileSystemStore.