summaryrefslogtreecommitdiffhomepage
path: root/whiteboard.h
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2023-01-01 22:37:36 +0100
committerRoland Reichwein <mail@reichwein.it>2023-01-01 22:37:36 +0100
commit4ca6b48f8d0d9cb61995fec63dde95880ff37547 (patch)
tree5c46c472371a88e3123916985a6314309b0bccdc /whiteboard.h
parenta72cd70af957a06ae870d93314b4ed0f3625f6ee (diff)
generate_id() using DB not FS
Diffstat (limited to 'whiteboard.h')
-rw-r--r--whiteboard.h24
1 files changed, 21 insertions, 3 deletions
diff --git a/whiteboard.h b/whiteboard.h
index 39eeb66..be89f4b 100644
--- a/whiteboard.h
+++ b/whiteboard.h
@@ -1,6 +1,24 @@
-// pseudo main() - for testability
-
#pragma once
-int whiteboard(int argc, char* argv[]);
+#include <mutex>
+#include <string>
+
+#include "config.h"
+#include "storage.h"
+
+class Whiteboard
+{
+public:
+ Whiteboard();
+ int run(int argc, char* argv[]);
+ std::string generate_id();
+ uint32_t checksum32(const std::string& s);
+
+private:
+ Config m_config;
+ Storage m_storage;
+ std::mutex m_storage_mutex;
+
+ void storage_cleanup();
+};