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

Function GetFileForSharing

libs/map/bookmark_manager.cpp:198–213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196}
197
198BookmarkManager::SharingResult GetFileForSharing(BookmarkManager::KMLDataCollectionPtr collection,
199 KmlFileType kmlFileType)
200{
201 if (collection->size() > 1)
202 return ExportMultipleFiles(collection);
203 switch (kmlFileType)
204 {
205 case KmlFileType::Text: return ExportSingleFileKml(collection->front());
206 case KmlFileType::Gpx: return ExportSingleFileGpx(collection->front());
207 default:
208 LOG(LERROR, ("Unexpected file type", kmlFileType));
209 return {{collection->front().second->m_categoryData.m_id},
210 BookmarkManager::SharingResult::Code::FileError,
211 "Unexpected file type"};
212 }
213}
214
215std::string ToString(BookmarkManager::SortingType type)
216{

Callers 2

PrepareFileForSharingMethod · 0.85

Calls 5

ExportMultipleFilesFunction · 0.85
ExportSingleFileKmlFunction · 0.85
ExportSingleFileGpxFunction · 0.85
frontMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected