Sendbird Chat SDK for Unreal
SBDFileMessage.h
1// Copyright (c) 2021 Sendbird, Inc. All rights reserved.
2
3#ifndef SENDBIRD_SBDFILEMESSAGE_H_
4#define SENDBIRD_SBDFILEMESSAGE_H_
5
6#include "SBDBaseMessage.h"
7
9class FSBDThumbnail;
10class FSBDFileMessage;
11
15class SBDThumbnailSize final {
16public:
17 SBDThumbnailSize(int64_t max_width, int64_t max_height);
18
19 int64_t max_width;
20 int64_t max_height;
21};
22
26class SBDThumbnail final {
27public:
28 SBDThumbnail(int64_t max_width, int64_t max_height, int64_t real_width, int64_t real_height,
29 const std::wstring& url, bool require_auth);
30
34 std::wstring GetUrl();
35
36 int64_t max_width;
37 int64_t max_height;
38 int64_t real_width;
39 int64_t real_height;
40
41private:
42 std::wstring url;
43 bool require_auth;
44
45 friend FSBDThumbnail;
46};
47
52class SBDFileMessage final : public SBDBaseMessage {
53public:
58
62 std::wstring url;
63
67 std::wstring name;
68
72 uint64_t size;
73
77 std::wstring type;
78
82 std::wstring data;
83
87 std::wstring request_id;
88
92 std::wstring custom_type;
93
97 std::vector<SBDThumbnail> thumbnails;
98
103
104private:
105 bool require_auth;
106
107 SBDFileMessage(const std::string& dict);
108 void SetSender(const SBDUser& sender);
109 void Overwrite(SBDFileMessage* message);
110
111 friend FSBDFileMessage;
112};
113
114#endif /* SENDBIRD_SBDFILEMESSAGE_H_ */
Definition: SBDBaseChannel.h:271
Definition: SBDBaseMessage.h:19
Definition: SBDFileMessage.h:52
std::wstring url
Definition: SBDFileMessage.h:62
std::wstring type
Definition: SBDFileMessage.h:77
std::wstring request_id
Definition: SBDFileMessage.h:87
SBDUser & GetSender()
std::vector< SBDThumbnail > thumbnails
Definition: SBDFileMessage.h:97
std::wstring name
Definition: SBDFileMessage.h:67
uint64_t size
Definition: SBDFileMessage.h:72
SBDUser sender
Definition: SBDFileMessage.h:57
std::wstring custom_type
Definition: SBDFileMessage.h:92
std::wstring data
Definition: SBDFileMessage.h:82
Definition: SBDFileMessage.h:26
std::wstring GetUrl()
Definition: SBDFileMessage.h:15
Definition: SBDUser.h:20