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

The TelegramAudio class This is implementation of the audio objects of telegram. More...

#include <telegramaudio.h>

Inheritance diagram for qTbot::TelegramAudio:
Inheritance graph
Collaboration diagram for qTbot::TelegramAudio:
Collaboration graph

Public Member Functions

 TelegramAudio ()
 TelegramAudio default constructor.
 TelegramAudio (const QJsonObject &jsonObject)
 Constructs an Audio object from a JSON object.
int duration () const
 Returns the duration of the audio in seconds.
QString fileName () const
 Returns the file name of the audio.
QString mimeType () const
 Returns the MIME type of the audio.
Public Member Functions inherited from qTbot::TelegramFile
 TelegramFile ()
 TelegramFile default constructor.
 TelegramFile (const QJsonObject &jsonObject)
 Constructs a File object from a JSON object.
QString fileId () const
 Returns the file ID of the file.
QString fileUniqueId () const
 Returns the unique ID of the file.
int fileSize () const
 Returns the file size of the file.
QString takePath ()
 Returns the file path to get from the web.
Public Member Functions inherited from qTbot::IJsonBasedObject
 IJsonBasedObject ()
 IJsonBasedObject default constructor.
 IJsonBasedObject (const QJsonObject &newRawJson)
 IJsonBasedObject constructs the object from a raw json value.
const QJsonObject & rawJson () const
 rawJson Telegram uses a rest api with json objects. So all received messages are parsed into a json object.
virtual void setRawJson (const QJsonObject &newRawJson)
 setRawJson This method sets a new raw json data of the object.

Detailed Description

The TelegramAudio class This is implementation of the audio objects of telegram.

Definition at line 20 of file telegramaudio.h.

Constructor & Destructor Documentation

◆ TelegramAudio() [1/2]

qTbot::TelegramAudio::TelegramAudio ( )

TelegramAudio default constructor.

Definition at line 11 of file telegramaudio.cpp.

◆ TelegramAudio() [2/2]

qTbot::TelegramAudio::TelegramAudio ( const QJsonObject & jsonObject)

Constructs an Audio object from a JSON object.

Parameters
jsonObjectThe JSON object containing audio data.

Definition at line 16 of file telegramaudio.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ duration()

int qTbot::TelegramAudio::duration ( ) const

Returns the duration of the audio in seconds.

Returns
The duration of the audio.

Definition at line 18 of file telegramaudio.cpp.

Here is the call graph for this function:

◆ fileName()

QString qTbot::TelegramAudio::fileName ( ) const

Returns the file name of the audio.

Returns
The file name of the audio.

Definition at line 22 of file telegramaudio.cpp.

Here is the call graph for this function:

◆ mimeType()

QString qTbot::TelegramAudio::mimeType ( ) const

Returns the MIME type of the audio.

Returns
The MIME type of the audio.

Definition at line 26 of file telegramaudio.cpp.

Here is the call graph for this function:

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