|
PebbleOS
|
BlobDB front end of notification storage (BlobDBIdNotifs). More...
Functions | |
| void | notif_db_init (void) |
| Initialize the notification database. | |
| status_t | notif_db_insert (const uint8_t *key, int key_len, const uint8_t *val, int val_len) |
| Insert or replace a record in the notification database. | |
| int | notif_db_get_len (const uint8_t *key, int key_len) |
| Get the length of a record in the notification database. | |
| status_t | notif_db_read (const uint8_t *key, int key_len, uint8_t *val_out, int val_out_len) |
| Read a record from the notification database. | |
| status_t | notif_db_delete (const uint8_t *key, int key_len) |
| Delete a record from the notification database. | |
| status_t | notif_db_flush (void) |
| Delete all records of the notification database. | |
BlobDB front end of notification storage (BlobDBIdNotifs).
| status_t notif_db_delete | ( | const uint8_t * | key, |
| int | key_len | ||
| ) |
Delete a record from the notification database.
The key is the notification UUID.
| key | Key data. |
| key_len | Length of key in bytes. |
S_SUCCESS on success, an error code otherwise. | status_t notif_db_flush | ( | void | ) |
Delete all records of the notification database.
S_SUCCESS on success, an error code otherwise. | int notif_db_get_len | ( | const uint8_t * | key, |
| int | key_len | ||
| ) |
Get the length of a record in the notification database.
The key is the notification UUID.
| key | Key data. |
| key_len | Length of key in bytes. |
| void notif_db_init | ( | void | ) |
Initialize the notification database.
| status_t notif_db_insert | ( | const uint8_t * | key, |
| int | key_len, | ||
| const uint8_t * | val, | ||
| int | val_len | ||
| ) |
Insert or replace a record in the notification database.
The key is the notification UUID and the value a serialized timeline item. A new notification is stored and announced; for an existing one only the status bits are updated. New notifications that already carry status bits are ignored.
| 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 notif_db_read | ( | const uint8_t * | key, |
| int | key_len, | ||
| uint8_t * | val_out, | ||
| int | val_out_len | ||
| ) |
Read a record from the notification database.
Not implemented: returns S_SUCCESS without writing to val_out.
| 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.