From d4f41364140cc37820f9a9bbff58e5e124097469 Mon Sep 17 00:00:00 2001 From: Asheem Mamoowala Date: Tue, 21 Aug 2018 17:41:22 -0700 Subject: Enforce Offline tile limit when merging sideloaded databases --- include/mbgl/storage/default_file_source.hpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/mbgl/storage/default_file_source.hpp b/include/mbgl/storage/default_file_source.hpp index 942749fc00..929fb3d7c3 100644 --- a/include/mbgl/storage/default_file_source.hpp +++ b/include/mbgl/storage/default_file_source.hpp @@ -106,12 +106,18 @@ public: * executed on the database thread; it is the responsibility of the SDK bindings * to re-execute a user-provided callback on the main thread. * + * The secondary database may need to be upgraded to the latest schema. This is done + * in-place and requires write-access to `sideDatabasePath`; it is the + * responsibility of the SDK bindings to ensure that this path is writeable. + * * 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. + * Invokes the callback with a `MapboxOfflineTileCountExceededException` error if + * the merge operation would result in the offline tile count limit being exceeded. + * + * Merged 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)>); -- cgit v1.2.1