mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-24 06:53:46 +00:00
Organic Maps sources as of 02.04.2025 (fad26bbf22ac3da75e01e62aa01e5c8e11861005)
To expand with full Organic Maps and Maps.ME commits history run: git remote add om-historic [om-historic.git repo url] git fetch --tags om-historic git replace squashed-history historic-commits
This commit is contained in:
43
map/bookmarks_search_params.hpp
Normal file
43
map/bookmarks_search_params.hpp
Normal file
@@ -0,0 +1,43 @@
|
||||
#pragma once
|
||||
|
||||
#include "kml/type_utils.hpp"
|
||||
|
||||
#include "base/assert.hpp"
|
||||
|
||||
#include <functional>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace search
|
||||
{
|
||||
struct BookmarksSearchParams
|
||||
{
|
||||
using Results = std::vector<kml::MarkId>;
|
||||
|
||||
enum class Status
|
||||
{
|
||||
InProgress,
|
||||
Completed,
|
||||
Cancelled
|
||||
};
|
||||
|
||||
std::string m_query;
|
||||
kml::MarkGroupId m_groupId = kml::kInvalidMarkGroupId;
|
||||
|
||||
using OnResults = std::function<void(Results results, Status status)>;
|
||||
OnResults m_onResults;
|
||||
};
|
||||
|
||||
inline std::string DebugPrint(BookmarksSearchParams::Status status)
|
||||
{
|
||||
using Status = BookmarksSearchParams::Status;
|
||||
switch (status)
|
||||
{
|
||||
case Status::InProgress: return "InProgress";
|
||||
case Status::Completed: return "Completed";
|
||||
case Status::Cancelled: return "Cancelled";
|
||||
}
|
||||
ASSERT(false, ("Unknown status"));
|
||||
return "Unknown";
|
||||
}
|
||||
} // namespace search
|
||||
Reference in New Issue
Block a user