forked from mapsme/omim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
event.hpp
41 lines (34 loc) · 872 Bytes
/
event.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#pragma once
#include <chrono>
#include <string>
namespace local_ads
{
using Clock = std::chrono::system_clock;
using Timestamp = Clock::time_point;
enum class EventType
{
ShowPoint = 0,
OpenInfo,
ClickedPhone,
ClickedWebsite,
Visit
};
struct Event
{
EventType m_type;
int64_t m_mwmVersion;
std::string m_countryId;
uint32_t m_featureId;
uint8_t m_zoomLevel;
Timestamp m_timestamp;
double m_latitude;
double m_longitude;
uint16_t m_accuracyInMeters;
Event(EventType type, int64_t mwmVersion, std::string const & countryId, uint32_t featureId,
uint8_t zoomLevel, Timestamp const & timestamp, double latitude, double longitude,
uint16_t accuracyInMeters);
bool operator<(Event const & event) const;
bool operator==(Event const & event) const;
};
std::string DebugPrint(Event const & event);
} // namespace local_ads