PebbleOS
Loading...
Searching...
No Matches
Data Structures | Typedefs | Functions
app_db.h File Reference
#include <stdint.h>
#include <pbl/util/uuid.h>
#include <process_management/app_install_manager.h>
#include <process_management/pebble_process_info.h>
#include <system/status_codes.h>
#include <pbl/kernel/compiler.h>

Data Structures

struct  AppDBEntry
 App database record, as sent by the phone. More...
 

Typedefs

typedef void(* AppDBEnumerateCb) (AppInstallId install_id, AppDBEntry *entry, void *data)
 Callback of app_db_enumerate_entries().
 

Functions

AppInstallId app_db_get_install_id_for_uuid (const Uuid *uuid)
 Find the install id of an app.
 
status_t app_db_get_app_entry_for_uuid (const Uuid *uuid, AppDBEntry *entry)
 Read the record of an app by UUID.
 
status_t app_db_get_app_entry_for_install_id (AppInstallId app_id, AppDBEntry *entry)
 Read the record of an app by install id.
 
void app_db_enumerate_entries (AppDBEnumerateCb cb, void *data)
 Call a function for every app in the database.
 
bool app_db_exists_install_id (AppInstallId app_id)
 Check whether an install id is in the database.
 
void app_db_init (void)
 Initialize the app database.
 
status_t app_db_insert (const uint8_t *key, int key_len, const uint8_t *val, int val_len)
 Insert or replace a record in the app database.
 
int app_db_get_len (const uint8_t *key, int key_len)
 Get the length of a record in the app database.
 
status_t app_db_read (const uint8_t *key, int key_len, uint8_t *val_out, int val_out_len)
 Read a record from the app database.
 
status_t app_db_delete (const uint8_t *key, int key_len)
 Delete a record from the app database.
 
status_t app_db_flush (void)
 Delete all records of the app database.
 
status_t app_db_compact (void)
 Compact the settings file backing the app database.
 
AppInstallId app_db_check_next_unique_id (void)
 Get the next install id to be assigned, for tests.