|
| void | timeline_item_storage_init (TimelineItemStorage *storage, char *filename, uint32_t max_size, uint32_t max_age) |
| | Initialize a storage and open its settings file.
|
| |
| void | timeline_item_storage_deinit (TimelineItemStorage *storage) |
| | Close the settings file of a storage.
|
| |
| status_t | timeline_item_storage_compact (TimelineItemStorage *storage) |
| | Compact and shrink the backing settings file.
|
| |
| bool | timeline_item_storage_exists_with_parent (TimelineItemStorage *storage, const Uuid *parent_id) |
| | Check whether any item has a given parent.
|
| |
| status_t | timeline_item_storage_flush (TimelineItemStorage *storage) |
| | Delete all items except those created on the watch.
|
| |
| status_t | timeline_item_storage_delete (TimelineItemStorage *storage, const uint8_t *key, int key_len) |
| | Delete an item.
|
| |
| status_t | timeline_item_storage_read (TimelineItemStorage *storage, const uint8_t *key, int key_len, uint8_t *val_out, int val_len) |
| | Read a serialized item.
|
| |
| status_t | timeline_item_storage_get_from_settings_record (SettingsFile *file, SettingsRecordInfo *info, TimelineItem *item) |
| | Deserialize the item of a settings file record, from an each callback.
|
| |
| status_t | timeline_item_storage_set_status_bits (TimelineItemStorage *storage, const uint8_t *key, int key_len, uint8_t status) |
| | Overwrite the status bits of an item in place.
|
| |
| int | timeline_item_storage_get_len (TimelineItemStorage *storage, const uint8_t *key, int key_len) |
| | Get the length of a serialized item.
|
| |
| status_t | timeline_item_storage_insert (TimelineItemStorage *storage, const uint8_t *key, int key_len, const uint8_t *val, int val_len, bool mark_as_synced) |
| | Insert or replace a serialized item.
|
| |
| status_t | timeline_item_storage_each (TimelineItemStorage *storage, TimelineItemStorageEachCallback each, void *data) |
| | Call a function for every record, with the storage locked.
|
| |
| status_t | timeline_item_storage_mark_synced (TimelineItemStorage *storage, const uint8_t *key, int key_len) |
| | Mark an item as synced.
|
| |
| status_t | timeline_item_storage_delete_with_parent (TimelineItemStorage *storage, const Uuid *parent_id, TimelineItemStorageChildDeleteCallback child_delete_cb) |
| | Delete the children of a parent.
|
| |
| status_t | timeline_item_storage_next_item (TimelineItemStorage *storage, Uuid *id_out, TimelineItemStorageFilterCallback filter_cb) |
| | Find the earliest item that is not older than the maximum age.
|
| |
| bool | timeline_item_storage_is_empty (TimelineItemStorage *storage) |
| | Check whether the storage holds no valid item.
|
| |