qTbot
0.2.123.6f57966
qTbot is base back end library for your c++ Qt projects.
Toggle main menu visibility
telegramaudio.cpp
Go to the documentation of this file.
1
//#
2
//# Copyright (C) 2023-2026 QuasarApp.
3
//# Distributed under the GPLv3 software license, see the accompanying
4
//# Everyone is permitted to copy and distribute verbatim copies
5
//# of this license document, but changing it is not allowed.
6
//#
7
#include "
telegramaudio.h
"
8
9
namespace
qTbot
{
10
11
TelegramAudio::TelegramAudio
()
12
{
13
14
}
15
16
TelegramAudio::TelegramAudio
(
const
QJsonObject &jsonObject) :
TelegramFile
(jsonObject) {}
17
18
int
TelegramAudio::duration
()
const
{
19
return
rawJson
()[
"duration"
].toInt();
20
}
21
22
QString
TelegramAudio::fileName
()
const
{
23
return
rawJson
()[
"file_name"
].toString();
24
}
25
26
QString
TelegramAudio::mimeType
()
const
{
27
return
rawJson
()[
"mime_type"
].toString();
28
}
29
}
30
qTbot::IJsonBasedObject::rawJson
const QJsonObject & rawJson() const
rawJson Telegram uses a rest api with json objects. So all received messages are parsed into a json o...
Definition
ijsonbasedobject.cpp:21
qTbot::TelegramAudio::fileName
QString fileName() const
Returns the file name of the audio.
Definition
telegramaudio.cpp:22
qTbot::TelegramAudio::duration
int duration() const
Returns the duration of the audio in seconds.
Definition
telegramaudio.cpp:18
qTbot::TelegramAudio::mimeType
QString mimeType() const
Returns the MIME type of the audio.
Definition
telegramaudio.cpp:26
qTbot::TelegramAudio::TelegramAudio
TelegramAudio()
TelegramAudio default constructor.
Definition
telegramaudio.cpp:11
qTbot::TelegramFile::TelegramFile
TelegramFile()
TelegramFile default constructor.
Definition
telegramfile.cpp:13
qTbot
Definition
telegramdeletemessage.cpp:8
telegramaudio.h
src
qTbot
src
public
qTbot
messages
telegramaudio.cpp
Generated by
1.18.0