diff options
| author | Joel Klinghed <the_jk@spawned.biz> | 2021-11-17 22:34:57 +0100 |
|---|---|---|
| committer | Joel Klinghed <the_jk@spawned.biz> | 2021-11-17 22:34:57 +0100 |
| commit | 6232d13f5321b87ddf12a1aa36b4545da45f173d (patch) | |
| tree | 23f3316470a14136debd9d02f9e920ca2b06f4cc /src/document.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/document.hh')
| -rw-r--r-- | src/document.hh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/document.hh b/src/document.hh new file mode 100644 index 0000000..20e22f8 --- /dev/null +++ b/src/document.hh @@ -0,0 +1,30 @@ +#ifndef DOCUMENT_HH +#define DOCUMENT_HH + +#include "tag.hh" +#include "transport.hh" + +#include <memory> +#include <string> + +class Document { +public: + virtual ~Document() = default; + + static std::unique_ptr<Document> create(std::string title); + + virtual void add_style(std::string rel_path) = 0; + virtual void add_script(std::string src_path) = 0; + virtual void add_script(std::unique_ptr<Tag> script) = 0; + + virtual Tag* body() = 0; + + virtual std::unique_ptr<Transport::Response> build(Transport* transport) = 0; + +protected: + Document() = default; + Document(Document const&) = delete; + Document& operator=(Document const&) = delete; +}; + +#endif // DOCUMENT_HH |
