summaryrefslogtreecommitdiff
path: root/include/tgbot/net/TgLongPoll.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/tgbot/net/TgLongPoll.h')
-rw-r--r--include/tgbot/net/TgLongPoll.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/tgbot/net/TgLongPoll.h b/include/tgbot/net/TgLongPoll.h
index 417260a..9c50407 100644
--- a/include/tgbot/net/TgLongPoll.h
+++ b/include/tgbot/net/TgLongPoll.h
@@ -1,6 +1,7 @@
#ifndef TGBOT_TGLONGPOLL_H
#define TGBOT_TGLONGPOLL_H
+#include "tgbot/Api.h"
#include "tgbot/export.h"
#include <cstdint>
@@ -10,7 +11,6 @@
namespace TgBot {
-class Api;
class Bot;
class EventHandler;
@@ -22,8 +22,8 @@ class EventHandler;
class TGBOT_API TgLongPoll {
public:
- TgLongPoll(const Api* api, const EventHandler* eventHandler, std::int32_t, std::int32_t, std::shared_ptr<std::vector<std::string>>);
- TgLongPoll(const Bot& bot, std::int32_t = 100, std::int32_t = 10, const std::shared_ptr<std::vector<std::string>>& = nullptr);
+ TgLongPoll(const Api* api, const EventHandler* eventHandler, std::int32_t limit, std::int32_t timeout, std::shared_ptr<std::vector<std::string>> allowUpdates);
+ TgLongPoll(const Bot& bot, std::int32_t limit = 100, std::int32_t timeout = 10, const std::shared_ptr<std::vector<std::string>>& allowUpdates = nullptr);
/**
* @brief Starts long poll. After new update will come, this method will parse it and send to EventHandler which invokes your listeners. Designed to be executed in a loop.
@@ -37,6 +37,8 @@ private:
std::int32_t _limit;
std::int32_t _timeout;
std::shared_ptr<std::vector<std::string>> _allowUpdates;
+
+ std::vector<Update::Ptr> _updates;
};
}