refactor: move the v2 controller to the repository root
The ESP-IDF project, docs, tools, tests and web UI move from v2/ to the root, and the Makefile, README, build scripts and test runner drop the v2/ prefix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
71bd320661
commit
1c222771a5
66 files changed
+30
-31
No files matched your search
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "cJSON.h"
|
||||
#include "esp_err.h"
|
||||
|
||||
// JSON "database": one file per collection under /db, each an object of
|
||||
// id -> record, mirroring the Pi's db/*.json. Collections stay in memory and
|
||||
// are written back (via a temp file and rename) whenever they change.
|
||||
|
||||
// Mount the db partition and load every collection
|
||||
esp_err_t store_init(void);
|
||||
|
||||
// Borrowed pointer to the collection object (id -> record); never NULL for a known name
|
||||
cJSON *store_coll(const char *name);
|
||||
bool store_known(const char *name);
|
||||
|
||||
// Replace a whole collection with a parsed object (takes ownership) and persist it
|
||||
esp_err_t store_replace(const char *name, cJSON *obj);
|
||||
esp_err_t store_save(const char *name);
|
||||
|
||||
// Next numeric string id for a collection ("1" when empty); writes into buf
|
||||
void store_next_id(const char *name, char *buf, size_t len);
|
||||
|
||||
// Settings are one flat object (the "settings" collection itself)
|
||||
cJSON *store_settings(void);
|
||||
|
||||
// Recursive lock around every read or write of the collections (HTTP handlers and the sequencer)
|
||||
void store_lock(void);
|
||||
void store_unlock(void);
|
||||
Reference in new issue
Block a user