2025-12-04 00:07:25 +11:00
|
|
|
#pragma once
|
|
|
|
|
#include <iosfwd>
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
|
|
class CrossPointState {
|
2025-12-17 23:32:18 +11:00
|
|
|
// Static instance
|
|
|
|
|
static CrossPointState instance;
|
|
|
|
|
|
2025-12-04 00:07:25 +11:00
|
|
|
public:
|
|
|
|
|
std::string openEpubPath;
|
2026-01-24 03:59:08 -05:00
|
|
|
std::string openBookTitle; // Cached title for the current book
|
|
|
|
|
std::string openBookAuthor; // Cached author for the current book
|
2026-01-14 05:05:08 -05:00
|
|
|
uint8_t lastSleepImage;
|
2025-12-04 00:07:25 +11:00
|
|
|
~CrossPointState() = default;
|
2025-12-06 12:56:39 +11:00
|
|
|
|
2025-12-17 23:32:18 +11:00
|
|
|
// Get singleton instance
|
|
|
|
|
static CrossPointState& getInstance() { return instance; }
|
|
|
|
|
|
2025-12-06 12:56:39 +11:00
|
|
|
bool saveToFile() const;
|
|
|
|
|
|
|
|
|
|
bool loadFromFile();
|
2025-12-04 00:07:25 +11:00
|
|
|
};
|
2025-12-17 23:32:18 +11:00
|
|
|
|
|
|
|
|
// Helper macro to access settings
|
|
|
|
|
#define APP_STATE CrossPointState::getInstance()
|