qTbot 0.2.123.6f57966
qTbot is base back end library for your c++ Qt projects.
qTbot::iUpdate Class Referenceabstract

The iUpdate class is the main interface for all update objects. More...

#include <iupdate.h>

Inheritance diagram for qTbot::iUpdate:
Inheritance graph
Collaboration diagram for qTbot::iUpdate:
Collaboration graph

Public Member Functions

 iUpdate ()
 iUpdate default constructor.
const QByteArray & rawData () const
 rawData returns the raw data of the update. The raw data is the not parsed value from the server.
virtual void setRawData (const QByteArray &newRawData)
 setRawData This method sets a new raw data value.
virtual bool isValid () const
 isValid returns true if the update is valid else false.
virtual QString from () const =0
 from This virtual function should return the id of the user that sent this update to the bot.
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.

Detailed Description

The iUpdate class is the main interface for all update objects.

Note
All update objects are possible to create only inside the bot object using the IBot::makeMesasge method.
See also
IBot::sigReceiveUpdate
IBot::incomeNewUpdate
IBot::markUpdateAsProcessed
IBot::takeNextUnreadUpdate
IBot::makeMesasge

Definition at line 28 of file iupdate.h.

Constructor & Destructor Documentation

◆ iUpdate()

qTbot::iUpdate::iUpdate ( )

iUpdate default constructor.

Definition at line 12 of file iupdate.cpp.

Member Function Documentation

◆ chatId()

virtual QVariant qTbot::iUpdate::chatId ( ) const
pure virtual

chatId This virtual function should return the id of the chat that sent this update to the bot.

Returns
id of the chat.

Implemented in qTbot::TelegramMsg, qTbot::TelegramUpdate, and qTbot::TelegramUpdateAnswer.

◆ from()

virtual QString qTbot::iUpdate::from ( ) const
pure virtual

from This virtual function should return the id of the user that sent this update to the bot.

Returns
id of the sender.

Implemented in qTbot::TelegramMsg, qTbot::TelegramUpdate, and qTbot::TelegramUpdateAnswer.

◆ isValid()

bool qTbot::iUpdate::isValid ( ) const
virtual

isValid returns true if the update is valid else false.

Returns
true if the update is valid else false.

Reimplemented in qTbot::IJsonBasedUpdate, qTbot::TelegramMsg, qTbot::TelegramUpdate, and qTbot::TelegramUpdateAnswer.

Definition at line 24 of file iupdate.cpp.

◆ rawData()

const QByteArray & qTbot::iUpdate::rawData ( ) const

rawData returns the raw data of the update. The raw data is the not parsed value from the server.

Returns
raw data from the server.

Definition at line 16 of file iupdate.cpp.

◆ setRawData()

void qTbot::iUpdate::setRawData ( const QByteArray & newRawData)
virtual

setRawData This method sets a new raw data value.

Parameters
newRawDataThis is the new value of the rawData.

Reimplemented in qTbot::IJsonBasedUpdate.

Definition at line 20 of file iupdate.cpp.

Here is the caller graph for this function:

◆ updateId()

virtual unsigned long long qTbot::iUpdate::updateId ( ) const
pure virtual

updateId This method returns the numeric id of the update.

Returns
numeric id of the update.

Implemented in qTbot::TelegramMsg, qTbot::TelegramUpdate, and qTbot::TelegramUpdateAnswer.


The documentation for this class was generated from the following files: