Preferences of system apps set from the phone (BlobDBIdWatchAppPrefs).
More...
Preferences of system apps set from the phone (BlobDBIdWatchAppPrefs).
Records are keyed by a per-app string.
◆ watch_app_prefs_db_compact()
| status_t watch_app_prefs_db_compact |
( |
void |
| ) |
|
Compact the settings file backing the watch app preferences database.
- Returns
S_SUCCESS on success, an error code otherwise.
◆ watch_app_prefs_db_delete()
| status_t watch_app_prefs_db_delete |
( |
const uint8_t * |
key, |
|
|
int |
key_len |
|
) |
| |
Delete a record from the watch app preferences database.
- Parameters
-
| key | Key data. |
| key_len | Length of key in bytes. |
- Returns
S_SUCCESS on success, an error code otherwise.
◆ watch_app_prefs_db_flush()
| status_t watch_app_prefs_db_flush |
( |
void |
| ) |
|
Delete all records of the watch app preferences database.
- Returns
S_SUCCESS on success, an error code otherwise.
◆ watch_app_prefs_db_get_len()
| int watch_app_prefs_db_get_len |
( |
const uint8_t * |
key, |
|
|
int |
key_len |
|
) |
| |
Get the length of a record in the watch app preferences database.
- Parameters
-
| key | Key data. |
| key_len | Length of key in bytes. |
- Returns
- Length of the value in bytes, 0 if not found, or a negative error code.
◆ watch_app_prefs_db_init()
| void watch_app_prefs_db_init |
( |
void |
| ) |
|
Initialize the watch app preferences database.
◆ watch_app_prefs_db_insert()
| status_t watch_app_prefs_db_insert |
( |
const uint8_t * |
key, |
|
|
int |
key_len, |
|
|
const uint8_t * |
val, |
|
|
int |
val_len |
|
) |
| |
Insert or replace a record in the watch app preferences database.
Only the Send Text, Weather and Reminders app keys are accepted; list sizes are validated.
- Parameters
-
| key | Key data. |
| key_len | Length of key in bytes. |
| val | Value data. |
| val_len | Length of val in bytes. |
- Returns
S_SUCCESS on success, an error code otherwise.
◆ watch_app_prefs_db_read()
| status_t watch_app_prefs_db_read |
( |
const uint8_t * |
key, |
|
|
int |
key_len, |
|
|
uint8_t * |
val_out, |
|
|
int |
val_out_len |
|
) |
| |
Read a record from the watch app preferences database.
- Parameters
-
| 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. |
- Returns
S_SUCCESS on success, an error code otherwise.
◆ watch_app_prefs_destroy_weather()
◆ watch_app_prefs_get_reminder()
| SerializedReminderAppPrefs * watch_app_prefs_get_reminder |
( |
void |
| ) |
|
Read the Reminders app preferences.
Served from a cache after the first read.
- Returns
- Task heap allocated preferences, NULL on failure. Free with task_free().
◆ watch_app_prefs_get_send_text()
| SerializedSendTextPrefs * watch_app_prefs_get_send_text |
( |
void |
| ) |
|
Read the Send Text app preferences.
- Returns
- Task heap allocated preferences, NULL on failure. Free with task_free().
◆ watch_app_prefs_get_weather()