MCPcopy Create free account
hub / github.com/comaps/comaps / PrepareTrackFileForSharing

Method PrepareTrackFileForSharing

libs/map/bookmark_manager.cpp:3157–3173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3155}
3156
3157void BookmarkManager::PrepareTrackFileForSharing(kml::TrackId trackId, SharingHandler && handler,
3158 KmlFileType kmlFileType)
3159{
3160 CHECK_THREAD_CHECKER(m_threadChecker, ());
3161 ASSERT(handler, ());
3162 auto collection = PrepareToSaveBookmarksForTrack(trackId);
3163 if (m_testModeEnabled)
3164 {
3165 handler(GetFileForSharing(std::move(collection), kmlFileType));
3166 }
3167 else
3168 {
3169 GetPlatform().RunTask(Platform::Thread::File, [collection = std::move(collection), handler = std::move(handler),
3170 kmlFileType = kmlFileType]() mutable
3171 { handler(GetFileForSharing(std::move(collection), kmlFileType)); });
3172 }
3173}
3174
3175void BookmarkManager::PrepareFileForSharing(kml::GroupIdCollection && categoriesIds, SharingHandler && handler,
3176 KmlFileType kmlFileType)

Calls 3

ASSERTFunction · 0.85
GetFileForSharingFunction · 0.85
RunTaskMethod · 0.80

Tested by 1

UNIT_CLASS_TESTFunction · 0.64