diff options
author | Roland Reichwein <mail@reichwein.it> | 2023-01-01 22:37:36 +0100 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2023-01-01 22:37:36 +0100 |
commit | 4ca6b48f8d0d9cb61995fec63dde95880ff37547 (patch) | |
tree | 5c46c472371a88e3123916985a6314309b0bccdc /whiteboard.h | |
parent | a72cd70af957a06ae870d93314b4ed0f3625f6ee (diff) |
generate_id() using DB not FS
Diffstat (limited to 'whiteboard.h')
-rw-r--r-- | whiteboard.h | 24 |
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(); +}; |