tgbot-cpp
|
#include <EventBroadcaster.h>
Public Types | |
typedef std::function< void(const Message::Ptr &)> | MessageListener |
typedef std::function< void(const InlineQuery::Ptr &)> | InlineQueryListener |
typedef std::function< void(const ChosenInlineResult::Ptr &)> | ChosenInlineResultListener |
typedef std::function< void(const CallbackQuery::Ptr &)> | CallbackQueryListener |
Public Member Functions | |
void | onAnyMessage (const MessageListener &listener) |
void | onCommand (const std::string &commandName, const MessageListener &listener) |
void | onUnknownCommand (const MessageListener &listener) |
void | onNonCommandMessage (const MessageListener &listener) |
void | onInlineQuery (const InlineQueryListener &listener) |
void | onChosenInlineResult (const ChosenInlineResultListener &listener) |
void | onCallbackQuery (const CallbackQueryListener &listener) |
This class holds all event listeners.
Definition at line 44 of file EventBroadcaster.h.
typedef std::function<void (const CallbackQuery::Ptr&)> TgBot::EventBroadcaster::CallbackQueryListener |
Definition at line 52 of file EventBroadcaster.h.
typedef std::function<void (const ChosenInlineResult::Ptr&)> TgBot::EventBroadcaster::ChosenInlineResultListener |
Definition at line 51 of file EventBroadcaster.h.
typedef std::function<void (const InlineQuery::Ptr&)> TgBot::EventBroadcaster::InlineQueryListener |
Definition at line 50 of file EventBroadcaster.h.
typedef std::function<void (const Message::Ptr&)> TgBot::EventBroadcaster::MessageListener |
Definition at line 49 of file EventBroadcaster.h.
|
inline |
Registers listener which receives all messages which the bot can ever receive.
listener | Listener. |
Definition at line 58 of file EventBroadcaster.h.
|
inline |
Definition at line 103 of file EventBroadcaster.h.
|
inline |
Registers listener which receives all the chosen inline result.
listener | Listener. |
Definition at line 99 of file EventBroadcaster.h.
|
inline |
Registers listener which receives all messages with commands (messages with leading '/' char).
commandName | Command name which listener can handle. |
listener | Listener. |
Definition at line 67 of file EventBroadcaster.h.
|
inline |
Registers listener which receives all the inline query.
listener | Listener. |
Definition at line 91 of file EventBroadcaster.h.
|
inline |
Registers listener which receives all messages without commands (messages with no leading '/' char)
listener | Listener. |
Definition at line 83 of file EventBroadcaster.h.
|
inline |
Registers listener which receives all messages with commands (messages with leading '/' char) which haven't been handled by other listeners.
listener | Listener. |
Definition at line 75 of file EventBroadcaster.h.