qTbot 0.87.9547b0c
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>

Public Member Functions

 TelegramAudio ()
 
 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 (const QJsonObject &jsonObject)
 Constructs a Photo object from a JSON object.
 
QString fileId () const
 Returns the file ID of the photo.
 
QString fileUniqueId () const
 Returns the unique ID of the photo.
 
int fileSize () const
 Returns the file size of the photo.
 
QString takePath ()
 Returns the file path to get from web.
 
- 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 TelegramAudio class This is implementation of the audio objects of telegram.

Definition at line 20 of file telegramaudio.h.

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

Constructor & Destructor Documentation

◆ TelegramAudio() [1/2]

qTbot::TelegramAudio::TelegramAudio ( )

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.

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: