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

The IJsonBasedUpdate class This is updates that have a json sructure. More...

#include <ijsonbasedupdate.h>

Public Member Functions

 IJsonBasedUpdate ()
 
bool isValid () const override
 isValid return true if the message is valid else false.
 
void setRawData (const QByteArray &newRawData) override
 setRawData This method sets new raw data value.
 
- Public Member Functions inherited from qTbot::iUpdate
 iUpdate ()
 
const QByteArray & rawData () const
 rawData returns raw data of the message. The raw data is not parsed value form the server.
 
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.
 
- Public Member Functions inherited from qTbot::IJsonBasedObject
 IJsonBasedObject ()
 
 IJsonBasedObject (const QJsonObject &newRawJson)
 
const QJsonObject & rawJson () const
 rawJson Telegram use rest api with json objects. So all received messages will be parsed in to jsobject.
 
virtual void setRawJson (const QJsonObject &newRawJson)
 setRawJson this method convert jsobject into telegram message.
 

Detailed Description

The IJsonBasedUpdate class This is updates that have a json sructure.

Definition at line 22 of file ijsonbasedupdate.h.

Inheritance diagram for qTbot::IJsonBasedUpdate:
Inheritance graph
Collaboration diagram for qTbot::IJsonBasedUpdate:
Collaboration graph

Constructor & Destructor Documentation

◆ IJsonBasedUpdate()

qTbot::IJsonBasedUpdate::IJsonBasedUpdate ( )

Definition at line 14 of file ijsonbasedupdate.cpp.

Member Function Documentation

◆ isValid()

bool qTbot::IJsonBasedUpdate::isValid ( ) const
overridevirtual

isValid return true if the message is valid else false.

Returns
true if the message is valid else false.

Reimplemented from qTbot::iUpdate.

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

Definition at line 18 of file ijsonbasedupdate.cpp.

Here is the call graph for this function:

◆ setRawData()

void qTbot::IJsonBasedUpdate::setRawData ( const QByteArray &  newRawData)
overridevirtual

setRawData This method sets new raw data value.

Parameters
newRawDataThis is new value of the rawData.

Reimplemented from qTbot::iUpdate.

Definition at line 22 of file ijsonbasedupdate.cpp.

Here is the call graph for this function:

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