summaryrefslogtreecommitdiff
path: root/src/site.hh
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@spawned.biz>2021-11-17 22:34:57 +0100
committerJoel Klinghed <the_jk@spawned.biz>2021-11-17 22:34:57 +0100
commit6232d13f5321b87ddf12a1aa36b4545da45f173d (patch)
tree23f3316470a14136debd9d02f9e920ca2b06f4cc /src/site.hh
Travel3: Simple image and video display site
Reads the images and videos from filesystem and builds a site in memroy.
Diffstat (limited to 'src/site.hh')
-rw-r--r--src/site.hh35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/site.hh b/src/site.hh
new file mode 100644
index 0000000..b6a32ff
--- /dev/null
+++ b/src/site.hh
@@ -0,0 +1,35 @@
+#ifndef SITE_HH
+#define SITE_HH
+
+#include "transport.hh"
+
+#include <memory>
+
+class Config;
+class Logger;
+class TaskRunner;
+class Travel;
+
+class Site {
+public:
+ virtual ~Site() = default;
+
+ static std::unique_ptr<Site> create(std::shared_ptr<Logger> logger,
+ std::shared_ptr<TaskRunner> runner,
+ std::shared_ptr<Travel> travel);
+
+ virtual bool setup(Logger* logger, Config* config) = 0;
+
+ virtual void start() = 0;
+
+ virtual void reload() = 0;
+
+ virtual Transport::Handler* handler() = 0;
+
+protected:
+ Site() = default;
+ Site(Site const&) = delete;
+ Site& operator=(Site const&) = delete;
+};
+
+#endif // SITE_HH