summaryrefslogtreecommitdiff
path: root/include/tgbot/types/Location.h
blob: ea98bbbfa99c3127b79f5b369d410cfe01bd4324 (plain)
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef TGBOT_LOCATION_H
#define TGBOT_LOCATION_H

#include <cstdint>
#include <memory>

namespace TgBot {

/**
 * @brief This object represents a point on the map.
 *
 * @ingroup types
 */
class Location {

public:
    typedef std::shared_ptr<Location> Ptr;

    /**
     * @brief Latitude as defined by sender
     */
    float latitude;

    /**
     * @brief Longitude as defined by sender
     */
    float longitude;

    /**
     * @brief Optional. The radius of uncertainty for the location, measured in meters; 0-1500
     */
    float horizontalAccuracy;

    /**
     * @brief Optional. Time relative to the message sending date, during which the location can be updated; in seconds.
     *
     * For active live locations only.
     */
    std::int32_t livePeriod;

    /**
     * @brief Optional. The direction in which user is moving, in degrees; 1-360.
     *
     * For active live locations only.
     */
    std::int32_t heading;

    /**
     * @brief Optional. The maximum distance for proximity alerts about approaching another chat member, in meters.
     *
     * For sent live locations only.
     */
    std::int32_t proximityAlertRadius;
};
}

#endif //TGBOT_LOCATION_H