tgbot-cpp
Loading...
Searching...
No Matches
EventHandler.h
Go to the documentation of this file.
1#ifndef TGBOT_EVENTHANDLER_H
2#define TGBOT_EVENTHANDLER_H
3
7
8#include <algorithm>
9#include <cstddef>
10#include <string>
11
12namespace TgBot {
13
14class TGBOT_API EventHandler {
15
16public:
17 explicit EventHandler(const EventBroadcaster& broadcaster) : _broadcaster(broadcaster) {
18 }
19
20 void handleUpdate(const Update::Ptr& update) const;
21
22private:
23 const EventBroadcaster& _broadcaster;
24
25 void handleMessage(const Message::Ptr& message) const;
26};
27
28}
29
30#endif //TGBOT_EVENTHANDLER_H
This class holds all event listeners.
void handleUpdate(const Update::Ptr &update) const
EventHandler(const EventBroadcaster &broadcaster)
std::shared_ptr< Message > Ptr
Definition Message.h:68
std::shared_ptr< Update > Ptr
Definition Update.h:36
Definition Api.h:40