From 4ca6b48f8d0d9cb61995fec63dde95880ff37547 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sun, 1 Jan 2023 22:37:36 +0100 Subject: generate_id() using DB not FS --- whiteboard.h | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'whiteboard.h') 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 +#include + +#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(); +}; -- cgit v1.2.3