1#ifndef _DITTO_ATTACHMENT_FETCH_EVENT_
2#define _DITTO_ATTACHMENT_FETCH_EVENT_
4#include "Attachment.hpp"
10enum class AttachmentFetchEventType {
19struct AttachmentFetchEvent {
20 friend struct AttachmentFetchEventCompleted;
21 friend struct AttachmentFetchEventProgress;
22 friend struct AttachmentFetchEventDeleted;
27 AttachmentFetchEventType
type;
30 virtual ~AttachmentFetchEvent() =
default;
33 explicit AttachmentFetchEvent(AttachmentFetchEventType
type);
40struct AttachmentFetchEventCompleted : AttachmentFetchEvent {
41 friend class AttachmentFetcher;
56struct AttachmentFetchEventProgress : AttachmentFetchEvent {
57 friend class AttachmentFetcher;
77struct AttachmentFetchEventDeleted : AttachmentFetchEvent {
78 friend class AttachmentFetcher;
81 explicit AttachmentFetchEventDeleted();
Represents an attachment and can be used to insert the associated attachment into a document at a spe...
Definition Attachment.hpp:22
Attachment attachment
The successfully fetched attachment.
Definition AttachmentFetchEvent.hpp:46
AttachmentFetchEventType type
The type of the attachment fetch event.
Definition AttachmentFetchEvent.hpp:27
uint64_t total_bytes
Gets the full size of the attachment, if it were complete.
Definition AttachmentFetchEvent.hpp:68
uint64_t downloaded_bytes
Gets the size of the attachment that was successfully downloaded, in bytes.
Definition AttachmentFetchEvent.hpp:63