Ditto 1.1.7
AttachmentFetcher.hpp
1#ifndef _DITTO_ATTACHMENT_FETCHER_
2#define _DITTO_ATTACHMENT_FETCHER_
3
4#include "AttachmentFetchEvent.hpp"
5#include "AttachmentToken.hpp"
6
7#include <functional>
8#include <memory>
9
10namespace ditto {
11class DittoHandleWrapper;
12
18 std::function<void(std::unique_ptr<AttachmentFetchEvent>)> fn;
19};
20
31 friend class Collection;
32
33public:
35
48 void stop();
49
50private:
51 AttachmentFetcher(std::shared_ptr<AttachmentToken> token,
52 AttachmentFetcherEventHandler on_fetch_event,
53 std::shared_ptr<DittoHandleWrapper> ditto_handle_wrapper);
54 class AttachmentFetcherCtx;
55 AttachmentFetcherCtx *ctx;
56 bool stopped;
57};
58
59} // namespace ditto
60#endif
These objects are returned by calls to Collection::fetch_attachment.
Definition: AttachmentFetcher.hpp:30
void stop()
Stops fetching the fetcher's associated attachment and cleans up any associated resources.
Definition: AttachmentFetcher.cpp:127
A reference to a collection in a Store.
Definition: Collection.hpp:26
A thin wrapper around a function that will get called when there are updates relating to an attempt t...
Definition: AttachmentFetcher.hpp:17