diff options
Diffstat (limited to 'src/activitypub/apattachment.h')
-rw-r--r-- | src/activitypub/apattachment.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/activitypub/apattachment.h b/src/activitypub/apattachment.h new file mode 100644 index 0000000..c8cdda0 --- /dev/null +++ b/src/activitypub/apattachment.h @@ -0,0 +1,33 @@ +#pragma once + +#include "apbase.h" +#include <array> +#include <vector> + +struct APAttachmentFields { + QString path; + QString filename; // "nicer" filename + QString media_type; + QString name; +}; + +class APAttachment : APBase { +public: + APAttachment(); + APAttachment(APAttachmentFields fields); + ~APAttachment() {}; + QString get_html_render(HtmlRenderDetails render_info); + +private: + QString blurhash; + std::array<float, 2> focal_point = {0.,0.}; + QString type; // MIME type, maps to "media_type" + QString description; // alt text, maps to "name" + QString path_url; // attachment URL, might be file on filesystem (make sure that the attachment dir has been found and that the path is correct) + QString filename; // nicer descriptor of the attachment's path +}; + +class APAttachmentList : public std::vector<APAttachment>, APBase { +public: + QString get_html_render(HtmlRenderDetails render_info); +}; |