qTbot 0.2.123.6f57966
qTbot is base back end library for your c++ Qt projects.
telegramfile.h
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
8#ifndef TELEGRAMFILE_H
9#define TELEGRAMFILE_H
10
12namespace qTbot {
13
17class QTBOT_EXPORT TelegramFile: public IJsonBasedObject
18{
19public:
24
29 TelegramFile(const QJsonObject &jsonObject);
30
35 QString fileId() const;
36
41 QString fileUniqueId() const;
42
47 int fileSize() const;
48
54 [[nodiscard("This method return path only one time, please don't discard it.")]]
55 QString takePath();
56
57private:
58 bool _used = false;
59};
60}
61#endif // TELEGRAMFILE_H
IJsonBasedObject()
IJsonBasedObject default constructor.
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.
TelegramFile()
TelegramFile default constructor.
QString takePath()
Returns the file path to get from the web.