Add schedule sync and schedule-aware playback
This commit is contained in:
@@ -54,6 +54,18 @@ struct AudioFileRecord {
|
||||
int solfeggio_frequency_id = 0; // 0 = not associated with a solfeggio frequency
|
||||
};
|
||||
|
||||
// One scheduled listening block, mirrored from GET /schedule. `proclamation_ids`
|
||||
// is the ordered play list for the block.
|
||||
struct ScheduleBlockRecord {
|
||||
std::string id;
|
||||
int start_minutes = 0;
|
||||
int end_minutes = 0;
|
||||
bool overnight = false;
|
||||
int duration_minutes = 0;
|
||||
bool dynamic_audio = true; // override the device audio for this block
|
||||
std::vector<std::string> proclamation_ids;
|
||||
};
|
||||
|
||||
// A single color in a solfeggio frequency's color palette (RGBA).
|
||||
struct PaletteColor {
|
||||
uint8_t r = 0;
|
||||
@@ -154,6 +166,16 @@ public:
|
||||
// palettes can be pushed from the portal once the API route exists.
|
||||
bool replaceColorPalettes(const std::vector<PaletteRecord>& records);
|
||||
|
||||
// ── Schedule Blocks Table ─────────────────────────────────────────
|
||||
// Full sync: replaces the stored schedule with `records` (the portal is the
|
||||
// source of truth). Pass an empty vector to clear the schedule. Block order
|
||||
// and per-block proclamation order are preserved exactly as given.
|
||||
bool replaceScheduleBlocks(const std::vector<ScheduleBlockRecord>& records);
|
||||
|
||||
// Fetch all schedule blocks, ordered as stored, with their proclamation ids
|
||||
// in play order.
|
||||
std::vector<ScheduleBlockRecord> getScheduleBlocks();
|
||||
|
||||
// ── Event Logging Table ───────────────────────────────────────────
|
||||
bool logEvent(const std::string& level, const std::string& component, const std::string& message);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user