crosspoint-reader/src/CrossPointState.h

26 lines
593 B
C
Raw Normal View History

2025-12-04 00:07:25 +11:00
#pragma once
#include <iosfwd>
#include <string>
class CrossPointState {
// 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
uint8_t lastSleepImage;
2025-12-04 00:07:25 +11:00
~CrossPointState() = default;
2025-12-06 12:56:39 +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
};
// Helper macro to access settings
#define APP_STATE CrossPointState::getInstance()