Files
MapLibreParticleLab/include/mbgl/storage/online_file_source.hpp
John Firebaugh 6d88a23a60 [core] Remove internal threading from OnlineFileRequest
There's no need to do the work that OnlineFileRequest does on a separate thread from the DefaultFileSource thread, and having AsyncTasks proxy to other tasks across a thread boundary adds needless complexity.
2016-04-14 14:18:19 -07:00

29 lines
624 B
C++

#ifndef MBGL_STORAGE_ONLINE_FILE_SOURCE
#define MBGL_STORAGE_ONLINE_FILE_SOURCE
#include <mbgl/storage/file_source.hpp>
namespace mbgl {
class OnlineFileSource : public FileSource {
public:
OnlineFileSource();
~OnlineFileSource() override;
void setAccessToken(const std::string& t) { accessToken = t; }
std::string getAccessToken() const { return accessToken; }
std::unique_ptr<AsyncRequest> request(const Resource&, Callback) override;
private:
friend class OnlineFileRequest;
class Impl;
const std::unique_ptr<Impl> impl;
std::string accessToken;
};
} // namespace mbgl
#endif