|
PebbleOS
|
System preferences exposed to the phone (BlobDBIdPrefs). More...
Functions | |
| void | prefs_db_init (void) |
| Initialize the preferences database. | |
| status_t | prefs_db_insert (const uint8_t *key, int key_len, const uint8_t *val, int val_len) |
| Insert or replace a record in the preferences database. | |
| int | prefs_db_get_len (const uint8_t *key, int key_len) |
| Get the length of a record in the preferences database. | |
| status_t | prefs_db_read (const uint8_t *key, int key_len, uint8_t *val_out, int val_out_len) |
| Read a record from the preferences database. | |
| status_t | prefs_db_delete (const uint8_t *key, int key_len) |
| Delete a record from the preferences database. | |
| status_t | prefs_db_flush (void) |
| Delete all records of the preferences database. | |
System preferences exposed to the phone (BlobDBIdPrefs).
| status_t prefs_db_delete | ( | const uint8_t * | key, |
| int | key_len | ||
| ) |
Delete a record from the preferences database.
Not supported: always returns E_INVALID_OPERATION.
| key | Key data. |
| key_len | Length of key in bytes. |
S_SUCCESS on success, an error code otherwise. | status_t prefs_db_flush | ( | void | ) |
Delete all records of the preferences database.
Not supported: always returns E_INVALID_OPERATION.
S_SUCCESS on success, an error code otherwise. | int prefs_db_get_len | ( | const uint8_t * | key, |
| int | key_len | ||
| ) |
Get the length of a record in the preferences database.
Returns E_INVALID_ARGUMENT for unknown keys.
| key | Key data. |
| key_len | Length of key in bytes. |
| void prefs_db_init | ( | void | ) |
Initialize the preferences database.
| status_t prefs_db_insert | ( | const uint8_t * | key, |
| int | key_len, | ||
| const uint8_t * | val, | ||
| int | val_len | ||
| ) |
Insert or replace a record in the preferences database.
Writes the backing store of the system preferences.
| key | Key data. |
| key_len | Length of key in bytes. |
| val | Value data. |
| val_len | Length of val in bytes. |
S_SUCCESS on success, an error code otherwise. | status_t prefs_db_read | ( | const uint8_t * | key, |
| int | key_len, | ||
| uint8_t * | val_out, | ||
| int | val_out_len | ||
| ) |
Read a record from the preferences database.
| key | Key data. | |
| key_len | Length of key in bytes. | |
| [out] | val_out | Buffer for the value. |
| val_out_len | Size of val_out in bytes. |
S_SUCCESS on success, an error code otherwise.