BSB Developer Docs
Loading...
Searching...
No Matches
busy_timer_snapshot.h
Go to the documentation of this file.
1
5#pragma once
6
7#include "busy_timer_common.h"
8
9#include <busy/busy_common.h>
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14typedef enum {
15 BusyTimerSnapshotTypeNotStarted,
16 BusyTimerSnapshotTypeInfinite,
17 BusyTimerSnapshotTypeSimple,
18 BusyTimerSnapshotTypeInterval,
19 BusyTimerSnapshotTypeMax,
20} BusyTimerSnapshotType;
21
22typedef struct {
23 char card_id[BUSY_TIMER_CARD_ID_LEN + 1];
24 bool is_paused;
26
27typedef struct {
30
31typedef struct {
33 uint32_t time_left_ms;
35
41
42typedef struct {
43 BusyTimerSnapshotType type;
44 union {
49 };
50 BusyAppConfig app_config;
51 time_t timestamp_ms;
53
64
74 BusyTimerSnapshot* snapshot,
75 const char* json_text,
76 size_t json_text_len);
77
85
86#ifdef __cplusplus
87}
88#endif
Common BUSY application defines and variables.
Common BusyTimer types & macros.
char * busy_timer_snapshot_serialize(const BusyTimerSnapshot *snapshot)
Convert a BusyTimerSnapshot object to its JSON representation.
Definition busy_timer_snapshot.c:351
bool busy_timer_snapshot_is_valid(const BusyTimerSnapshot *snapshot)
Check whether a BusyTimerSnapshot object represents a valid state.
Definition busy_timer_snapshot.c:375
bool busy_timer_snapshot_deserialize(BusyTimerSnapshot *snapshot, const char *json_text, size_t json_text_len)
Load a BusyTimerSnapshot object from its JSON representation.
Definition busy_timer_snapshot.c:363
BusyApp configuration structure.
Definition busy_common.h:22
Definition busy_timer_common.h:59
Definition busy_timer_common.h:66
Definition busy_timer_snapshot.h:22
Definition busy_timer_snapshot.h:42
Definition busy_timer_snapshot.h:27
Definition busy_timer_snapshot.h:36
Definition busy_timer_snapshot.h:31