qTbot 0.2.123.6f57966
qTbot is base back end library for your c++ Qt projects.
iupdate.h
Go to the documentation of this file.
1//#
2//# Copyright (C) 2021-2026 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
10#ifndef IUPDATE_H
11#define IUPDATE_H
12
13#include "qTbot/global.h"
14#include <QByteArray>
15
16
17namespace qTbot {
18
28class QTBOT_EXPORT iUpdate
29{
30public:
34 iUpdate();
35
41 const QByteArray &rawData() const;
42
47 virtual void setRawData(const QByteArray &newRawData);
48
53 virtual bool isValid() const;
54
59 virtual QString from() const = 0;
60
65 virtual QVariant chatId() const = 0;
66
71 virtual unsigned long long updateId() const = 0;
72
73private:
74
75 QByteArray _rawData;
76};
77}
78#endif // IUPDATE_H
iUpdate()
iUpdate default constructor.
Definition iupdate.cpp:12
virtual bool isValid() const
isValid returns true if the update is valid else false.
Definition iupdate.cpp:24
const QByteArray & rawData() const
rawData returns the raw data of the update. The raw data is the not parsed value from the server.
Definition iupdate.cpp:16
virtual void setRawData(const QByteArray &newRawData)
setRawData This method sets a new raw data value.
Definition iupdate.cpp:20
virtual QVariant chatId() const =0
chatId This virtual function should return the id of the chat that sent this update to the bot.
virtual unsigned long long updateId() const =0
updateId This method returns the numeric id of the update.
virtual QString from() const =0
from This virtual function should return the id of the user that sent this update to the bot.