qTbot
0.2.107.d8fc923
qTbot is base back end library for your c++ Qt projects.
telegramrestbot.h
Go to the documentation of this file.
1
//#
2
//# Copyright (C) 2023-2024 QuasarApp.
3
//# Distributed under the GPLv3 software license, see the accompanying
4
//# Everyone is permitted to copy and distribute verbatim copies
5
//# of this license document, but changing it is not allowed.
6
//#
7
8
9
#ifndef TELEGRAMRESTBOT_H
10
#define TELEGRAMRESTBOT_H
11
12
#include "
itelegrambot.h
"
13
14
class
QTimer;
15
16
namespace
qTbot
{
17
21
class
QTBOT_EXPORT
TelegramRestBot
:
public
ITelegramBot
22
{
23
Q_OBJECT
24
public
:
25
TelegramRestBot
();
26
~TelegramRestBot
();
27
28
// IBot interface
29
bool
login(
const
QByteArray &token)
override
;
30
31
void
logout()
override
;
32
37
int
updateDelay()
const
;
38
43
void
setUpdateDelay(
int
newUpdateDelay);
44
45
void
setProcessed(
const
QSet<unsigned long long> &newProcessed)
override
;
46
private
slots:
47
void
handleReceiveUpdates(
const
QByteArray &replay);
48
void
handleReceiveUpdatesErr(QNetworkReply::NetworkError err);
49
50
private
:
51
void
startUpdates();
52
53
bool
_run =
false
;
54
long
long
_lanstUpdateTime = 0;
55
unsigned
long
long
_lanstUpdateid = 0;
56
57
int
_updateDelay = 1000;
58
59
};
60
}
61
#endif
// TELEGRAMRESTBOT_H
qTbot::ITelegramBot
The ITelegramBot class This is base implementation of the all telegramm bots.
Definition
itelegrambot.h:35
qTbot::TelegramRestBot
The TelegramRestBot class Is Rest implementation base on the Update API telegram method.
Definition
telegramrestbot.h:22
QTBOT_EXPORT
#define QTBOT_EXPORT
Definition
global.h:18
itelegrambot.h
qTbot
Definition
telegramdeletemessage.cpp:8
src
qTbot
src
public
qTbot
telegramrestbot.h
Generated by
1.9.8