Ditto 4.4.0
Loading...
Searching...
No Matches
AttachmentFetcher.hpp
1#ifndef _DITTO_ATTACHMENT_FETCHER_
2#define _DITTO_ATTACHMENT_FETCHER_
3
4#include "AttachmentFetchEvent.hpp"
5#include "AttachmentToken.hpp"
6#include "Observer.hpp"
7
8#include <functional>
9#include <memory>
10
11namespace ditto {
12class DittoHandleWrapper;
13
19 std::function<void(std::unique_ptr<AttachmentFetchEvent>)> fn;
20};
21
32 friend class Collection;
33
34public:
36
37private:
38 void on_stop() override;
39 AttachmentFetcher(std::shared_ptr<AttachmentToken> token,
40 AttachmentFetcherEventHandler on_fetch_event,
41 std::shared_ptr<DittoHandleWrapper> ditto_handle_wrapper);
42 class AttachmentFetcherCtx;
43 AttachmentFetcherCtx *ctx;
44 bool stopped;
45};
46
47} // namespace ditto
48#endif
These objects are returned by calls to Collection::fetch_attachment.
Definition AttachmentFetcher.hpp:31
A reference to a collection in a Store.
Definition Collection.hpp:26
An observation token returned by any observation API in the Ditto SDK. Retain this object to continue...
Definition Observer.hpp:11
A thin wrapper around a function that will get called when there are updates relating to an attempt t...
Definition AttachmentFetcher.hpp:18