Represents an attachment in a dpp::message.
More...
#include <message.h>
Represents an attachment in a dpp::message.
◆ attachment() [1/2]
dpp::attachment::attachment |
( |
struct message * |
o | ) |
|
Constructs a new attachment object.
- Parameters
-
◆ attachment() [2/2]
Constructs a new attachment object from a JSON object.
- Parameters
-
◆ ~attachment()
dpp::attachment::~attachment |
( |
| ) |
|
|
default |
Destructs the attachment object.
◆ download()
Download this attachment.
- Parameters
-
callback | A callback which is called when the download completes. |
- Note
- The content of the file will be in the http_info.body parameter of the callback parameter.
- Exceptions
-
dpp::exception | If there is no owner associated with this attachment that itself has an owning cluster, this method will throw a dpp::exception when called. |
◆ content_type
std::string dpp::attachment::content_type |
MIME type of the attachment, if applicable
◆ ephemeral
bool dpp::attachment::ephemeral |
Whether this attachment is ephemeral, if applicable
◆ filename
std::string dpp::attachment::filename |
File name of the attachment
◆ height
uint32_t dpp::attachment::height |
Height of the attachment, if applicable
◆ id
◆ owner
struct message* dpp::attachment::owner |
◆ proxy_url
std::string dpp::attachment::proxy_url |
Proxied URL which points to the attachment
◆ size
uint32_t dpp::attachment::size |
Size of the attachment in bytes
◆ url
std::string dpp::attachment::url |
URL which points to the attachment
◆ width
uint32_t dpp::attachment::width |
Width of the attachment, if applicable