summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSudarsana Babu Nagineni <sudarsana.babu@mapbox.com>2019-04-03 15:08:02 +0300
committerSudarsana Babu Nagineni <sudarsana.babu@mapbox.com>2019-04-29 17:09:58 +0300
commit2604991b2b0090ed69893f6b156a6e640a789c9f (patch)
treed6b29f0a512b3de53fb4cc23d96cc2f52b1fdffe /include
parent4c8295e67200e15979ddc0c6b16d9b09e4f0a192 (diff)
downloadqtlocation-mapboxgl-2604991b2b0090ed69893f6b156a6e640a789c9f.tar.gz
[core] Introduce resetCache API
Add an API to delete existing database and re-initialize.
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/storage/default_file_source.hpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/mbgl/storage/default_file_source.hpp b/include/mbgl/storage/default_file_source.hpp
index 8f88964acf..10a836094c 100644
--- a/include/mbgl/storage/default_file_source.hpp
+++ b/include/mbgl/storage/default_file_source.hpp
@@ -174,6 +174,15 @@ public:
*/
void put(const Resource&, const Response&);
+ /*
+ * Delete existing database and re-initialize.
+ *
+ * When the operation is complete or encounters an error, the given callback will be
+ * executed on the database thread; it is the responsibility of the SDK bindings
+ * to re-execute a user-provided callback on the main thread.
+ */
+ void resetCache(std::function<void (std::exception_ptr)>);
+
// For testing only.
void setOnlineStatus(bool);