PebbleOS
Loading...
Searching...
No Matches
Data Structures | Macros
App glance records

Serialized app glance format stored in the app glance database. More...

Data Structures

struct  SerializedAppGlanceHeader
 Header of a serialized glance, the value of an app glance record. More...
 
struct  SerializedAppGlanceSliceHeader
 Header of a serialized glance slice. More...
 

Macros

#define APP_GLANCE_DB_CURRENT_VERSION   (1)
 Version of the serialized glance format; records with another version are rejected.
 
#define APP_GLANCE_DB_MAX_SLICES_PER_GLANCE   (8)
 Maximum number of slices stored per glance; extra slices are trimmed on insert.
 
#define APP_GLANCE_DB_MAX_NUM_APP_GLANCES   (50)
 Number of glances the database is sized for.
 
#define APP_GLANCE_DB_ICON_AND_SUBTITLE_SLICE_MIN_SIZE    (sizeof(SerializedAppGlanceSliceHeader) + sizeof(SerializedAttributeHeader) + sizeof(uint32_t))
 Minimum size of an icon and subtitle slice.
 
#define APP_GLANCE_DB_ICON_AND_SUBTITLE_SLICE_MAX_SIZE
 Maximum size of an icon and subtitle slice.
 
#define APP_GLANCE_DB_SLICE_MIN_SIZE   (APP_GLANCE_DB_ICON_AND_SUBTITLE_SLICE_MIN_SIZE)
 Minimum size of any slice.
 
#define APP_GLANCE_DB_SLICE_MAX_SIZE   (APP_GLANCE_DB_ICON_AND_SUBTITLE_SLICE_MAX_SIZE)
 Maximum size of any slice.
 

Detailed Description

Serialized app glance format stored in the app glance database.


Data Structure Documentation

◆ SerializedAppGlanceHeader

struct SerializedAppGlanceHeader

Header of a serialized glance, the value of an app glance record.

Data Fields
uint32_t creation_time Creation time; inserts must be strictly newer than the stored glance.
uint8_t data[] Serialized slices.
uint8_t version Format version, APP_GLANCE_DB_CURRENT_VERSION.

◆ SerializedAppGlanceSliceHeader

struct SerializedAppGlanceSliceHeader

Header of a serialized glance slice.

Data Fields
uint8_t data[] Serialized attributes.
uint8_t num_attributes Number of serialized attributes in data.
uint16_t total_size Size of the slice in bytes, header included.
uint8_t type Slice type (AppGlanceSliceType).

Macro Definition Documentation

◆ APP_GLANCE_DB_CURRENT_VERSION

#define APP_GLANCE_DB_CURRENT_VERSION   (1)

Version of the serialized glance format; records with another version are rejected.

◆ APP_GLANCE_DB_ICON_AND_SUBTITLE_SLICE_MAX_SIZE

#define APP_GLANCE_DB_ICON_AND_SUBTITLE_SLICE_MAX_SIZE
Value:
sizeof(uint32_t) + sizeof(uint32_t) + ATTRIBUTE_APP_GLANCE_SUBTITLE_MAX_LEN + 1)
Header of a serialized glance slice.
Definition app_glance_db_private.h:45
Header of a serialized attribute, followed by length bytes of value.
Definition attribute_private.h:18
#define ATTRIBUTE_APP_GLANCE_SUBTITLE_MAX_LEN
Maximum length of an app glance subtitle template string, in bytes.
Definition attribute.h:68

Maximum size of an icon and subtitle slice.

Header plus the expiration time, icon resource id and NUL-terminated subtitle attributes.

◆ APP_GLANCE_DB_ICON_AND_SUBTITLE_SLICE_MIN_SIZE

#define APP_GLANCE_DB_ICON_AND_SUBTITLE_SLICE_MIN_SIZE    (sizeof(SerializedAppGlanceSliceHeader) + sizeof(SerializedAttributeHeader) + sizeof(uint32_t))

Minimum size of an icon and subtitle slice.

Header plus the expiration time; icon and subtitle are optional.

◆ APP_GLANCE_DB_MAX_NUM_APP_GLANCES

#define APP_GLANCE_DB_MAX_NUM_APP_GLANCES   (50)

Number of glances the database is sized for.

◆ APP_GLANCE_DB_MAX_SLICES_PER_GLANCE

#define APP_GLANCE_DB_MAX_SLICES_PER_GLANCE   (8)

Maximum number of slices stored per glance; extra slices are trimmed on insert.

Reduced in unit tests to keep test payloads small.

◆ APP_GLANCE_DB_SLICE_MAX_SIZE

#define APP_GLANCE_DB_SLICE_MAX_SIZE   (APP_GLANCE_DB_ICON_AND_SUBTITLE_SLICE_MAX_SIZE)

Maximum size of any slice.

◆ APP_GLANCE_DB_SLICE_MIN_SIZE

#define APP_GLANCE_DB_SLICE_MIN_SIZE   (APP_GLANCE_DB_ICON_AND_SUBTITLE_SLICE_MIN_SIZE)

Minimum size of any slice.