|
PebbleOS
|
App glances (BlobDBIdAppGlance), keyed by app UUID. More...
Functions | |
| status_t | app_glance_db_insert_glance (const Uuid *uuid, const AppGlance *glance) |
| Serialize and store the glance of an app. | |
| status_t | app_glance_db_read_glance (const Uuid *uuid, AppGlance *glance_out) |
| Read and deserialize the glance of an app. | |
| status_t | app_glance_db_read_creation_time (const Uuid *uuid, time_t *time_out) |
| Read the creation time of the glance of an app. | |
| status_t | app_glance_db_delete_glance (const Uuid *uuid) |
| Delete the glance of an app. | |
| void | app_glance_db_init (void) |
| Initialize the app glance database. | |
| status_t | app_glance_db_flush (void) |
| Delete all records of the app glance database. | |
| status_t | app_glance_db_compact (void) |
| Compact the settings file backing the app glance database. | |
| status_t | app_glance_db_insert (const uint8_t *key, int key_len, const uint8_t *val, int val_len) |
| Insert or replace a record in the app glance database. | |
| int | app_glance_db_get_len (const uint8_t *key, int key_len) |
| Get the length of a record in the app glance database. | |
| status_t | app_glance_db_read (const uint8_t *key, int key_len, uint8_t *val_out, int val_out_len) |
| Read a record from the app glance database. | |
| status_t | app_glance_db_delete (const uint8_t *key, int key_len) |
| Delete a record from the app glance database. | |
App glances (BlobDBIdAppGlance), keyed by app UUID.
| status_t app_glance_db_compact | ( | void | ) |
Compact the settings file backing the app glance database.
Shrinks a grown file back toward its initial allocation.
S_SUCCESS on success, an error code otherwise. | status_t app_glance_db_delete | ( | const uint8_t * | key, |
| int | key_len | ||
| ) |
Delete a record from the app glance database.
The key is the app UUID.
| key | Key data. |
| key_len | Length of key in bytes. |
S_SUCCESS on success, an error code otherwise. | status_t app_glance_db_delete_glance | ( | const Uuid * | uuid | ) |
Delete the glance of an app.
| uuid | App UUID. |
S_SUCCESS on success, an error code otherwise. | status_t app_glance_db_flush | ( | void | ) |
Delete all records of the app glance database.
S_SUCCESS on success, an error code otherwise. | int app_glance_db_get_len | ( | const uint8_t * | key, |
| int | key_len | ||
| ) |
Get the length of a record in the app glance database.
The key is the app UUID.
| key | Key data. |
| key_len | Length of key in bytes. |
| void app_glance_db_init | ( | void | ) |
Initialize the app glance database.
| status_t app_glance_db_insert | ( | const uint8_t * | key, |
| int | key_len, | ||
| const uint8_t * | val, | ||
| int | val_len | ||
| ) |
Insert or replace a record in the app glance database.
The key is the app UUID and the value a serialized glance (SerializedAppGlanceHeader). The glance must have the current version, be newer than the stored one, and belong to an installed or system app; excess slices are trimmed. Triggers a fetch of uncached apps.
| 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. Serialize and store the glance of an app.
| uuid | App UUID. |
| glance | Glance to store. |
S_SUCCESS on success, an error code otherwise. | status_t app_glance_db_read | ( | const uint8_t * | key, |
| int | key_len, | ||
| uint8_t * | val_out, | ||
| int | val_out_len | ||
| ) |
Read a record from the app glance database.
The key is the app UUID. Records with an outdated version are deleted and reported as E_DOES_NOT_EXIST.
| 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. | status_t app_glance_db_read_creation_time | ( | const Uuid * | uuid, |
| time_t * | time_out | ||
| ) |
Read the creation time of the glance of an app.
| uuid | App UUID. | |
| [out] | time_out | Creation time. |
S_SUCCESS on success, an error code otherwise.