diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2017-09-25 21:35:04 +0200 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-09-28 13:48:36 -0400 |
commit | 64c75b442c4d387e4867757abf49462c561e5955 (patch) | |
tree | 63f572961f6309a851d2e85ebe191e6a3cb7e5ab /platform/default/mbgl/storage/file_source_request.hpp | |
parent | d73e33eb62858b91212314d97bfe9cf49e857141 (diff) | |
download | qtlocation-mapboxgl-64c75b442c4d387e4867757abf49462c561e5955.tar.gz |
[build] split out DefaultFileSource and dependents to a separate target
We don't want to link it into the node bindings, so keep it in a separate target
Diffstat (limited to 'platform/default/mbgl/storage/file_source_request.hpp')
-rw-r--r-- | platform/default/mbgl/storage/file_source_request.hpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/platform/default/mbgl/storage/file_source_request.hpp b/platform/default/mbgl/storage/file_source_request.hpp new file mode 100644 index 0000000000..6bd0d44df6 --- /dev/null +++ b/platform/default/mbgl/storage/file_source_request.hpp @@ -0,0 +1,31 @@ +#pragma once + +#include <mbgl/actor/actor_ref.hpp> +#include <mbgl/storage/file_source.hpp> +#include <mbgl/util/async_request.hpp> + +#include <memory> +#include <functional> + +namespace mbgl { + +class Mailbox; + +class FileSourceRequest : public AsyncRequest { +public: + FileSourceRequest(FileSource::Callback&& callback); + ~FileSourceRequest() final; + + void onCancel(std::function<void()>&& callback); + void setResponse(const Response& res); + + ActorRef<FileSourceRequest> actor(); + +private: + FileSource::Callback responseCallback = nullptr; + std::function<void()> cancelCallback = nullptr; + + std::shared_ptr<Mailbox> mailbox; +}; + +} // namespace mbgl |