blob: c8cdda0ed65b6c0a9fe6cac6d8efaa6e84f930e9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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);
};
|