1#pragma once
2
3#include <mbgl/actor/actor_ref.hpp>
4#include <mbgl/storage/file_source.hpp>
5#include <mbgl/util/async_request.hpp>
6
7#include <memory>
8#include <functional>
9
10namespace mbgl {
11
12class Mailbox;
13
14class FileSourceRequest : public AsyncRequest {
15public:
16 FileSourceRequest(FileSource::Callback&& callback);
17 ~FileSourceRequest() final;
18
19 void onCancel(std::function<void()>&& callback);
20 void setResponse(const Response& res);
21
22 ActorRef<FileSourceRequest> actor();
23
24private:
25 FileSource::Callback responseCallback = nullptr;
26 std::function<void()> cancelCallback = nullptr;
27
28 std::shared_ptr<Mailbox> mailbox;
29};
30
31} // namespace mbgl
32

source code of qtlocation/src/3rdparty/mapbox-gl-native/platform/default/mbgl/storage/file_source_request.hpp