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

The iMessage class - is main interface for all messages objects. More...

#include <iupdate.h>

Public Member Functions

 iUpdate ()
 
const QByteArray & rawData () const
 rawData returns raw data of the message. The raw data is not parsed value form the server.
 
virtual void setRawData (const QByteArray &newRawData)
 setRawData This method sets new raw data value.
 
virtual bool isValid () const
 isValid return true if the message is valid else false.
 
virtual QString from () const =0
 from This virtual function should return name of the user that sent this message to bot.
 
virtual QVariant chatId () const =0
 from This virtual function should return name of the chat when sent this message to bot.
 
virtual unsigned long long updateId () const =0
 updateId This method returns numeric id of the update.
 

Detailed Description

The iMessage class - is main interface for all messages objects.

Note
Theall message objects posible to create only inner bot object using the IBot::makeMesasge method.
See also
IBot::sigReceiveMessage
IBot::incomeNewMessage
IBot::markMessageAsProcessed
IBot::takeNextUnreadMessage
IBot::makeMesasge

Definition at line 28 of file iupdate.h.

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

Constructor & Destructor Documentation

◆ iUpdate()

qTbot::iUpdate::iUpdate ( )

Definition at line 12 of file iupdate.cpp.

Member Function Documentation

◆ chatId()

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

from This virtual function should return name of the chat when sent this message to bot.

Returns
id of the sender.

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

◆ from()

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

from This virtual function should return name of the user that sent this message to bot.

Returns
id of the sender.

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

◆ isValid()

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

isValid return true if the message is valid else false.

Returns
true if the message 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 raw data of the message. The raw data is not parsed value form 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 new raw data value.

Parameters
newRawDataThis is 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 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: