Migrate to VoidLibrary (toolchain + API groundwork)
This commit is contained in:
1 parent
5e1e3d66c4
commit
e17cfed56f
38 files changed
+3077
-2505
No files matched your search
@@ -0,0 +1,34 @@
|
||||
#pragma once
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace Echoion::Api
|
||||
{
|
||||
|
||||
// Opaque state blob - contents are internal to Core
|
||||
// Plugin should NEVER inspect or modify the data field
|
||||
struct StateBlob {
|
||||
std::vector<uint8_t>
|
||||
data; // Serialized state data (JSON using glaze)
|
||||
uint32_t version = 0; // Format version (for logging/debugging only)
|
||||
std::string timestamp; // ISO 8601 timestamp when saved
|
||||
|
||||
bool empty() const { return data.empty(); }
|
||||
size_t size() const { return data.size(); }
|
||||
|
||||
// Clear the state
|
||||
void clear()
|
||||
{
|
||||
data.clear();
|
||||
version = 0;
|
||||
timestamp.clear();
|
||||
}
|
||||
};
|
||||
|
||||
// Constants for state management
|
||||
constexpr uint32_t MAX_SUPPORTED_STATE_VERSION_AGE =
|
||||
10; // Support 10 versions back
|
||||
constexpr uint32_t STATE_VERSION_NONE = 0;
|
||||
|
||||
} // namespace Echoion::Api
|
||||
Reference in new issue
Block a user