summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2017-07-25 09:29:03 (GMT)
committerKonstantin Käfer <mail@kkaefer.com>2017-09-22 08:57:15 (GMT)
commitbd553de7bc5899a8e4a3a9c5e1d27a9f4d10e90e (patch)
tree6ac9fa0f63051b257d00fede260e91877aa1fe07 /include
parentfc2ca19bc553d90b3aafdbddc17d4e8170c02259 (diff)
downloadqtlocation-mapboxgl-bd553de7bc5899a8e4a3a9c5e1d27a9f4d10e90e.tar.gz
[test] add ability to take the OnlineFileSource offline
This functionality is used for testing to ensure correct offline behavior when connectivity is missing.
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/storage/default_file_source.hpp1
-rw-r--r--include/mbgl/storage/online_file_source.hpp3
2 files changed, 4 insertions, 0 deletions
diff --git a/include/mbgl/storage/default_file_source.hpp b/include/mbgl/storage/default_file_source.hpp
index 9911e0c..91e442c 100644
--- a/include/mbgl/storage/default_file_source.hpp
+++ b/include/mbgl/storage/default_file_source.hpp
@@ -140,6 +140,7 @@ public:
void resume();
// For testing only.
+ void setOnlineStatus(bool);
void put(const Resource&, const Response&);
class Impl;
diff --git a/include/mbgl/storage/online_file_source.hpp b/include/mbgl/storage/online_file_source.hpp
index ffd7566..28d70ce 100644
--- a/include/mbgl/storage/online_file_source.hpp
+++ b/include/mbgl/storage/online_file_source.hpp
@@ -24,6 +24,9 @@ public:
std::unique_ptr<AsyncRequest> request(const Resource&, Callback) override;
+ // For testing only.
+ void setOnlineStatus(bool);
+
private:
friend class OnlineFileRequest;