summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAsheem Mamoowala <asheem.mamoowala@mapbox.com>2018-08-21 14:11:44 -0700
committerAsheem Mamoowala <asheem.mamoowala@mapbox.com>2018-08-28 07:14:54 -0700
commit065f5ca87e96f2280959b9fd3ad3d6e63a99bae6 (patch)
tree0054ce9c196bd270ca997caddc99e80148aed897 /include
parent48381efa11f4b352c25ff2f24ef44b972b6eb5ba (diff)
downloadqtlocation-mapboxgl-065f5ca87e96f2280959b9fd3ad3d6e63a99bae6.tar.gz
[core] Add DefaultFileSource::mergeRegions API and CLI support in the mbgl-offline tool.
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/storage/default_file_source.hpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/mbgl/storage/default_file_source.hpp b/include/mbgl/storage/default_file_source.hpp
index e048d82af2..942749fc00 100644
--- a/include/mbgl/storage/default_file_source.hpp
+++ b/include/mbgl/storage/default_file_source.hpp
@@ -100,6 +100,23 @@ public:
std::function<void (expected<OfflineRegionStatus, std::exception_ptr>)>) const;
/*
+ * Merge offline regions from a secondary database into the main offline database.
+ *
+ * When the database merge is completed, the provided 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.
+ *
+ * Only resources and tiles that belong to a region will be copied over. Identical
+ * regions will be flattened into a single new region in the main database.
+ *
+ * Note that the resulting new regions may not be in a completed status if the
+ * secondary database does not contain all the tiles or resources required by the
+ * region definition.
+ */
+ void mergeOfflineRegions(const std::string& sideDatabasePath,
+ std::function<void (expected<OfflineRegions, std::exception_ptr>)>);
+
+ /*
* Remove an offline region from the database and perform any resources evictions
* necessary as a result.
*