diff options
Diffstat (limited to 'include/mbgl/storage')
-rw-r--r-- | include/mbgl/storage/default_file_source.hpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/mbgl/storage/default_file_source.hpp b/include/mbgl/storage/default_file_source.hpp index effc60745e..9262e0a1bc 100644 --- a/include/mbgl/storage/default_file_source.hpp +++ b/include/mbgl/storage/default_file_source.hpp @@ -115,7 +115,23 @@ public: */ void setOfflineMapboxTileCountLimit(uint64_t) const; + /* + * Pause file request activity. + * + * If pause is called then no revalidation or network request activity + * will occur. + * + * Note: Calling pause and then calling getAPIBaseURL or getAccessToken + * will lock the thread that those calls are made on. + */ void pause(); + + /* + * Resume file request activity. + * + * Calling resume will unpause the file source and process any tasks that + * expired while the file source was paused. + */ void resume(); // For testing only. @@ -127,6 +143,8 @@ private: const std::unique_ptr<util::Thread<Impl>> thread; const std::unique_ptr<FileSource> assetFileSource; const std::unique_ptr<FileSource> localFileSource; + std::string cachedBaseURL = mbgl::util::API_BASE_URL; + std::string cachedAccessToken; }; } // namespace mbgl |