Make inherited classes final if possible.

This commit is contained in:
levlam 2021-07-04 05:58:54 +03:00
parent edfa5d1d98
commit 40c5d47717
197 changed files with 862 additions and 862 deletions

View File

@ -20,7 +20,7 @@
#endif
template <int type>
class RingBench : public td::Benchmark {
class RingBench final : public td::Benchmark {
public:
struct PassActor;
@ -37,7 +37,7 @@ class RingBench : public td::Benchmark {
return PSTRING() << "Ring (send_" << types[type] << ") (threads_n = " << thread_n_ << ")";
}
struct PassActor : public td::Actor {
struct PassActor final : public td::Actor {
int id = -1;
td::ActorId<PassActor> next_actor;
int start_n = 0;
@ -118,7 +118,7 @@ class RingBench : public td::Benchmark {
};
template <int type>
class QueryBench : public td::Benchmark {
class QueryBench final : public td::Benchmark {
public:
std::string get_description() const final {
static const char *types[] = {"callback", "immediate future", "delayed future", "dummy", "lambda", "lambda_future"};
@ -126,7 +126,7 @@ class QueryBench : public td::Benchmark {
return PSTRING() << "QueryBench: " << types[type];
}
class ClientActor : public td::Actor {
class ClientActor final : public td::Actor {
public:
class Callback {
public:
@ -157,9 +157,9 @@ class QueryBench : public td::Benchmark {
td::unique_ptr<Callback> callback_;
};
class ServerActor : public td::Actor {
class ServerActor final : public td::Actor {
public:
class ClientCallback : public ClientActor::Callback {
class ClientCallback final : public ClientActor::Callback {
public:
explicit ClientCallback(td::ActorId<ServerActor> server) : server_(server) {
}

View File

@ -29,7 +29,7 @@ static constexpr int DATA_SIZE = 8 << 10;
static constexpr int SHORT_DATA_SIZE = 64;
#if OPENSSL_VERSION_NUMBER <= 0x10100000L
class SHA1Bench : public td::Benchmark {
class SHA1Bench final : public td::Benchmark {
public:
alignas(64) unsigned char data[DATA_SIZE];
@ -53,7 +53,7 @@ class SHA1Bench : public td::Benchmark {
};
#endif
class AesEcbBench : public td::Benchmark {
class AesEcbBench final : public td::Benchmark {
public:
alignas(64) unsigned char data[DATA_SIZE];
td::UInt256 key;
@ -84,7 +84,7 @@ class AesEcbBench : public td::Benchmark {
}
};
class AesIgeEncryptBench : public td::Benchmark {
class AesIgeEncryptBench final : public td::Benchmark {
public:
alignas(64) unsigned char data[DATA_SIZE];
td::UInt256 key;
@ -112,7 +112,7 @@ class AesIgeEncryptBench : public td::Benchmark {
}
};
class AesIgeDecryptBench : public td::Benchmark {
class AesIgeDecryptBench final : public td::Benchmark {
public:
alignas(64) unsigned char data[DATA_SIZE];
td::UInt256 key;
@ -140,7 +140,7 @@ class AesIgeDecryptBench : public td::Benchmark {
}
};
class AesCtrBench : public td::Benchmark {
class AesCtrBench final : public td::Benchmark {
public:
alignas(64) unsigned char data[DATA_SIZE];
td::UInt256 key;
@ -169,7 +169,7 @@ class AesCtrBench : public td::Benchmark {
};
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
class AesCtrOpenSSLBench : public td::Benchmark {
class AesCtrOpenSSLBench final : public td::Benchmark {
public:
alignas(64) unsigned char data[DATA_SIZE];
td::UInt256 key;
@ -205,7 +205,7 @@ class AesCtrOpenSSLBench : public td::Benchmark {
};
#endif
class AesCbcDecryptBench : public td::Benchmark {
class AesCbcDecryptBench final : public td::Benchmark {
public:
alignas(64) unsigned char data[DATA_SIZE];
td::UInt256 key;
@ -231,7 +231,7 @@ class AesCbcDecryptBench : public td::Benchmark {
}
};
class AesCbcEncryptBench : public td::Benchmark {
class AesCbcEncryptBench final : public td::Benchmark {
public:
alignas(64) unsigned char data[DATA_SIZE];
td::UInt256 key;
@ -258,7 +258,7 @@ class AesCbcEncryptBench : public td::Benchmark {
};
template <bool use_state>
class AesIgeShortBench : public td::Benchmark {
class AesIgeShortBench final : public td::Benchmark {
public:
alignas(64) unsigned char data[SHORT_DATA_SIZE];
td::UInt256 key;
@ -363,7 +363,7 @@ BENCH(Pbkdf2, "pbkdf2") {
td::pbkdf2_sha256(password, salt, n, key);
}
class Crc32Bench : public td::Benchmark {
class Crc32Bench final : public td::Benchmark {
public:
alignas(64) unsigned char data[DATA_SIZE];
@ -387,7 +387,7 @@ class Crc32Bench : public td::Benchmark {
}
};
class Crc64Bench : public td::Benchmark {
class Crc64Bench final : public td::Benchmark {
public:
alignas(64) unsigned char data[DATA_SIZE];

View File

@ -28,7 +28,7 @@
#include <memory>
template <class KeyValueT>
class TdKvBench : public td::Benchmark {
class TdKvBench final : public td::Benchmark {
td::ConcurrentScheduler sched;
td::string name_;
@ -41,7 +41,7 @@ class TdKvBench : public td::Benchmark {
return name_;
}
class Main : public td::Actor {
class Main final : public td::Actor {
public:
explicit Main(int n) : n_(n) {
}
@ -50,7 +50,7 @@ class TdKvBench : public td::Benchmark {
void loop() final {
KeyValueT::destroy("test_tddb").ignore();
class Worker : public Actor {
class Worker final : public Actor {
public:
Worker(int n, td::string db_name) : n_(n) {
kv_.init(db_name).ensure();
@ -89,7 +89,7 @@ class TdKvBench : public td::Benchmark {
};
template <bool is_encrypted = false>
class SqliteKVBench : public td::Benchmark {
class SqliteKVBench final : public td::Benchmark {
td::SqliteDb db;
td::string get_description() const final {
return PSTRING() << "SqliteKV " << td::tag("is_encrypted", is_encrypted);
@ -142,7 +142,7 @@ static td::Status init_db(td::SqliteDb &db) {
return td::Status::OK();
}
class SqliteKeyValueAsyncBench : public td::Benchmark {
class SqliteKeyValueAsyncBench final : public td::Benchmark {
public:
td::string get_description() const final {
return "SqliteKeyValueAsync";
@ -199,7 +199,7 @@ class SqliteKeyValueAsyncBench : public td::Benchmark {
}
};
class SeqKvBench : public td::Benchmark {
class SeqKvBench final : public td::Benchmark {
td::string get_description() const final {
return "SeqKvBench";
}
@ -213,7 +213,7 @@ class SeqKvBench : public td::Benchmark {
};
template <bool is_encrypted = false>
class BinlogKeyValueBench : public td::Benchmark {
class BinlogKeyValueBench final : public td::Benchmark {
td::string get_description() const final {
return PSTRING() << "BinlogKeyValue " << td::tag("is_encrypted", is_encrypted);
}

View File

@ -28,12 +28,12 @@ static string prime_base64 =
"WC2xF40WnGvEZbDW_5yjko_vW5rk5Bj8Feg-vqD4f6n_Xu1wBQ3tKEn0e_lZ2VaFDOkphR8NgRX2NbEF7i5OFdBLJFS_b0-t8DSxBAMRnNjjuS_MW"
"w";
class HandshakeBench : public Benchmark {
class HandshakeBench final : public Benchmark {
std::string get_description() const final {
return "Handshake";
}
class FakeDhCallback : public DhCallback {
class FakeDhCallback final : public DhCallback {
public:
int is_good_prime(Slice prime_str) const final {
auto it = cache.find(prime_str.str());

View File

@ -24,7 +24,7 @@ namespace td {
std::atomic<int> counter;
class HttpClient : public HttpOutboundConnection::Callback {
class HttpClient final : public HttpOutboundConnection::Callback {
void start_up() final {
IPAddress addr;
addr.init_ipv4_port("127.0.0.1", 8082).ensure();

View File

@ -16,7 +16,7 @@
static std::string http_query = "GET / HTTP/1.1\r\nConnection:keep-alive\r\nhost:127.0.0.1:8080\r\n\r\n";
static const size_t block_size = 2500;
class HttpReaderBench : public td::Benchmark {
class HttpReaderBench final : public td::Benchmark {
std::string get_description() const final {
return "HttpReaderBench";
}
@ -52,7 +52,7 @@ class HttpReaderBench : public td::Benchmark {
}
};
class BufferBench : public td::Benchmark {
class BufferBench final : public td::Benchmark {
std::string get_description() const final {
return "BufferBench";
}
@ -78,7 +78,7 @@ class BufferBench : public td::Benchmark {
}
};
class FindBoundaryBench : public td::Benchmark {
class FindBoundaryBench final : public td::Benchmark {
std::string get_description() const final {
return "FindBoundaryBench";
}

View File

@ -21,7 +21,7 @@ namespace td {
static int cnt = 0;
class HelloWorld : public HttpInboundConnection::Callback {
class HelloWorld final : public HttpInboundConnection::Callback {
public:
void handle(unique_ptr<HttpQuery> query, ActorOwn<HttpInboundConnection> connection) final {
// LOG(ERROR) << *query;
@ -47,7 +47,7 @@ class HelloWorld : public HttpInboundConnection::Callback {
};
const int N = 0;
class Server : public TcpListener::Callback {
class Server final : public TcpListener::Callback {
public:
void start_up() final {
listener_ = create_actor<TcpListener>("Listener", 8082, ActorOwn<TcpListener::Callback>(actor_id(this)));

View File

@ -24,7 +24,7 @@ namespace td {
// HttpInboundConnection header
static int cnt = 0;
class HelloWorld : public Actor {
class HelloWorld final : public Actor {
public:
explicit HelloWorld(SocketFd socket_fd) : socket_fd_(std::move(socket_fd)) {
}
@ -98,7 +98,7 @@ class HelloWorld : public Actor {
}
};
const int N = 0;
class Server : public TcpListener::Callback {
class Server final : public TcpListener::Callback {
public:
void start_up() final {
listener_ = create_actor<TcpListener>("Listener", 8082, ActorOwn<TcpListener::Callback>(actor_id(this)));

View File

@ -22,7 +22,7 @@
namespace td {
class HttpEchoConnection : public Actor {
class HttpEchoConnection final : public Actor {
public:
explicit HttpEchoConnection(SocketFd fd) : fd_(std::move(fd)) {
}
@ -85,7 +85,7 @@ class HttpEchoConnection : public Actor {
};
const int N = 8;
class Server : public TcpListener::Callback {
class Server final : public TcpListener::Callback {
public:
void start_up() final {
listener_ = create_actor<TcpListener>("Listener", 8082, ActorOwn<TcpListener::Callback>(actor_id(this)));

View File

@ -36,7 +36,7 @@ std::string create_tmp_file() {
#endif
}
class IostreamWriteBench : public td::Benchmark {
class IostreamWriteBench final : public td::Benchmark {
protected:
std::string file_name_;
std::ofstream stream;
@ -67,7 +67,7 @@ class IostreamWriteBench : public td::Benchmark {
}
};
class FILEWriteBench : public td::Benchmark {
class FILEWriteBench final : public td::Benchmark {
protected:
std::string file_name_;
FILE *file;
@ -101,7 +101,7 @@ class FILEWriteBench : public td::Benchmark {
#if TD_ANDROID
#include <android/log.h>
#define ALOG(...) __android_log_print(ANDROID_LOG_VERBOSE, "XXX", __VA_ARGS__)
class ALogWriteBench : public td::Benchmark {
class ALogWriteBench final : public td::Benchmark {
public:
std::string get_description() const final {
return "android_log";
@ -118,7 +118,7 @@ class ALogWriteBench : public td::Benchmark {
};
#endif
class LogWriteBench : public td::Benchmark {
class LogWriteBench final : public td::Benchmark {
protected:
std::string file_name_;
std::ofstream stream;

View File

@ -119,7 +119,7 @@ BENCH(Time, "Clocks::monotonic") {
}
*/
#if !TD_WINDOWS
class PipeBench : public Benchmark {
class PipeBench final : public Benchmark {
public:
int p[2];
@ -153,7 +153,7 @@ class PipeBench : public Benchmark {
#endif
#if TD_LINUX || TD_ANDROID || TD_TIZEN
class SemBench : public Benchmark {
class SemBench final : public Benchmark {
sem_t sem;
public:
@ -180,7 +180,7 @@ class SemBench : public Benchmark {
#endif
#if !TD_WINDOWS
class UtimeBench : public Benchmark {
class UtimeBench final : public Benchmark {
public:
void start_up() final {
FileFd::open("test", FileFd::Flags::Create | FileFd::Flags::Write).move_as_ok().close();
@ -210,7 +210,7 @@ BENCH(Pwrite, "pwrite") {
fd.close();
}
class CreateFileBench : public Benchmark {
class CreateFileBench final : public Benchmark {
string get_description() const final {
return "create_file";
}
@ -233,7 +233,7 @@ class CreateFileBench : public Benchmark {
}
};
class WalkPathBench : public Benchmark {
class WalkPathBench final : public Benchmark {
string get_description() const final {
return "walk_path";
}
@ -266,7 +266,7 @@ class WalkPathBench : public Benchmark {
#if !TD_THREAD_UNSUPPORTED
template <int ThreadN = 2>
class AtomicReleaseIncBench : public Benchmark {
class AtomicReleaseIncBench final : public Benchmark {
string get_description() const final {
return PSTRING() << "AtomicReleaseInc" << ThreadN;
}
@ -290,7 +290,7 @@ template <int ThreadN>
std::atomic<uint64> AtomicReleaseIncBench<ThreadN>::a_;
template <int ThreadN = 2>
class AtomicReleaseCasIncBench : public Benchmark {
class AtomicReleaseCasIncBench final : public Benchmark {
string get_description() const final {
return PSTRING() << "AtomicReleaseCasInc" << ThreadN;
}
@ -316,7 +316,7 @@ template <int ThreadN>
std::atomic<uint64> AtomicReleaseCasIncBench<ThreadN>::a_;
template <int ThreadN = 2>
class RwMutexReadBench : public Benchmark {
class RwMutexReadBench final : public Benchmark {
string get_description() const final {
return PSTRING() << "RwMutexRead" << ThreadN;
}
@ -336,7 +336,7 @@ class RwMutexReadBench : public Benchmark {
}
};
template <int ThreadN = 2>
class RwMutexWriteBench : public Benchmark {
class RwMutexWriteBench final : public Benchmark {
string get_description() const final {
return PSTRING() << "RwMutexWrite" << ThreadN;
}

View File

@ -562,7 +562,7 @@ class SemCheatQueue {
};
template <class QueueT>
class QueueBenchmark2 : public td::Benchmark {
class QueueBenchmark2 final : public td::Benchmark {
QueueT client, server;
int connections_n, queries_n;
@ -704,7 +704,7 @@ class QueueBenchmark2 : public td::Benchmark {
};
template <class QueueT>
class QueueBenchmark : public td::Benchmark {
class QueueBenchmark final : public td::Benchmark {
QueueT client, server;
const int connections_n;
int queries_n;
@ -836,7 +836,7 @@ class QueueBenchmark : public td::Benchmark {
};
template <class QueueT>
class RingBenchmark : public td::Benchmark {
class RingBenchmark final : public td::Benchmark {
static constexpr int QN = 504;
struct Thread {

View File

@ -37,7 +37,7 @@ static Status init_db(SqliteDb &db) {
return Status::OK();
}
class MessagesDbBench : public Benchmark {
class MessagesDbBench final : public Benchmark {
public:
string get_description() const final {
return "MessagesDb";

View File

@ -16,7 +16,7 @@
namespace td {
class TlWriterCCommon : public tl::TL_writer {
class TlWriterCCommon final : public tl::TL_writer {
public:
int is_header_;
std::string prefix_;
@ -547,7 +547,7 @@ class TlWriterCCommon : public tl::TL_writer {
}
};
struct file_store_methods_to_td : public file_store_methods {
struct file_store_methods_to_td final : public file_store_methods {
explicit file_store_methods_to_td(const class TlWriterCCommon *cl) : cl(cl) {
}
void store_simple_type(std::stringstream &ss, std::string offset, std::string res_var, std::string var,
@ -609,7 +609,7 @@ class TlWriterCCommon : public tl::TL_writer {
const class TlWriterCCommon *cl;
};
struct file_store_methods_destroy : public file_store_methods {
struct file_store_methods_destroy final : public file_store_methods {
explicit file_store_methods_destroy(const class TlWriterCCommon *cl) : cl(cl) {
}
void store_simple_type(std::stringstream &ss, std::string offset, std::string res_var, std::string var,
@ -666,7 +666,7 @@ class TlWriterCCommon : public tl::TL_writer {
}
const class TlWriterCCommon *cl;
};
struct file_store_methods_stack : public file_store_methods {
struct file_store_methods_stack final : public file_store_methods {
explicit file_store_methods_stack(const class TlWriterCCommon *cl) : cl(cl) {
}
void store_simple_type(std::stringstream &ss, std::string offset, std::string res_var, std::string var,
@ -767,7 +767,7 @@ class TlWriterCCommon : public tl::TL_writer {
}
};
struct file_fetch_methods_from_td : public file_fetch_methods {
struct file_fetch_methods_from_td final : public file_fetch_methods {
explicit file_fetch_methods_from_td(const class TlWriterCCommon *cl) : cl(cl) {
}
std::string fetch_field_start(std::stringstream &ss, std::string offset, int depth,
@ -818,7 +818,7 @@ class TlWriterCCommon : public tl::TL_writer {
const class TlWriterCCommon *cl;
};
struct file_fetch_methods_stack : public file_fetch_methods {
struct file_fetch_methods_stack final : public file_fetch_methods {
explicit file_fetch_methods_stack(const class TlWriterCCommon *cl) : cl(cl) {
}
std::string fetch_field_start(std::stringstream &ss, std::string offset, int depth,

View File

@ -17,7 +17,7 @@
namespace td {
namespace tl {
class TlWriterDotNet : public TL_writer {
class TlWriterDotNet final : public TL_writer {
public:
bool is_header_;
std::string prefix_;

View File

@ -14,7 +14,7 @@
namespace td {
class TD_TL_writer_hpp : public TD_TL_writer {
class TD_TL_writer_hpp final : public TD_TL_writer {
public:
TD_TL_writer_hpp(const std::string &tl_name, const std::string &string_type, const std::string &bytes_type)
: TD_TL_writer(tl_name, string_type, bytes_type) {

View File

@ -14,7 +14,7 @@
namespace td {
class TD_TL_writer_java : public tl::TL_writer {
class TD_TL_writer_java final : public tl::TL_writer {
static const int MAX_ARITY = 0;
static const std::string base_type_class_names[MAX_ARITY + 1];

View File

@ -15,7 +15,7 @@
namespace td {
class TD_TL_writer_jni_cpp : public TD_TL_writer_cpp {
class TD_TL_writer_jni_cpp final : public TD_TL_writer_cpp {
std::string gen_vector_fetch(std::string field_name, const tl::tl_tree_type *t,
const std::vector<tl::var_description> &vars, int parser_type) const;

View File

@ -13,7 +13,7 @@
namespace td {
class TD_TL_writer_jni_h : public TD_TL_writer_h {
class TD_TL_writer_jni_h final : public TD_TL_writer_h {
public:
TD_TL_writer_jni_h(const std::string &tl_name, const std::string &string_type, const std::string &bytes_type,
const std::vector<std::string> &ext_include)

View File

@ -19,7 +19,7 @@ namespace td {
namespace mtproto {
// Has Raw connection. Generates new auth key. And returns it and raw_connection. Or error...
class HandshakeActor : public Actor {
class HandshakeActor final : public Actor {
public:
HandshakeActor(unique_ptr<AuthKeyHandshake> handshake, unique_ptr<RawConnection> raw_connection,
unique_ptr<AuthKeyHandshakeContext> context, double timeout,

View File

@ -24,7 +24,7 @@
namespace td {
namespace mtproto {
class HandshakeConnection
class HandshakeConnection final
: private RawConnection::Callback
, private AuthKeyHandshake::Callback {
public:

View File

@ -21,7 +21,7 @@ namespace td {
namespace mtproto {
namespace http {
class Transport : public IStreamTransport {
class Transport final : public IStreamTransport {
public:
explicit Transport(string secret) : secret_(std::move(secret)) {
}

View File

@ -15,7 +15,7 @@ namespace td {
namespace mtproto {
template <class Impl>
class PacketStorer
class PacketStorer final
: public Storer
, public Impl {
public:

View File

@ -21,7 +21,7 @@ namespace mtproto {
ActorOwn<> create_ping_actor(string debug, unique_ptr<RawConnection> raw_connection, unique_ptr<AuthData> auth_data,
Promise<unique_ptr<RawConnection>> promise, ActorShared<> parent) {
class PingActor : public Actor {
class PingActor final : public Actor {
public:
PingActor(unique_ptr<RawConnection> raw_connection, unique_ptr<AuthData> auth_data,
Promise<unique_ptr<RawConnection>> promise, ActorShared<> parent)

View File

@ -27,7 +27,7 @@ namespace td {
namespace mtproto {
namespace detail {
class PingConnectionReqPQ
class PingConnectionReqPQ final
: public PingConnection
, private RawConnection::Callback {
public:
@ -86,7 +86,7 @@ class PingConnectionReqPQ
bool was_ping_ = false;
};
class PingConnectionPingPong
class PingConnectionPingPong final
: public PingConnection
, private SessionConnection::Callback {
public:

View File

@ -33,7 +33,7 @@
namespace td {
namespace mtproto {
class RawConnectionDefault : public RawConnection {
class RawConnectionDefault final : public RawConnection {
public:
RawConnectionDefault(SocketFd socket_fd, TransportType transport_type, unique_ptr<StatsCallback> stats_callback)
: socket_fd_(std::move(socket_fd))
@ -260,7 +260,7 @@ class RawConnectionDefault : public RawConnection {
};
#if TD_EXPERIMENTAL_WATCH_OS
class RawConnectionHttp : public RawConnection {
class RawConnectionHttp final : public RawConnection {
public:
RawConnectionHttp(IPAddress ip_address, unique_ptr<StatsCallback> stats_callback)
: ip_address_(std::move(ip_address)), stats_callback_(std::move(stats_callback)) {

View File

@ -65,7 +65,7 @@ inline StringBuilder &operator<<(StringBuilder &stream, const MsgInfo &id) {
<< "] [seq_no:" << format::as_hex(id.seq_no) << "]";
}
class SessionConnection
class SessionConnection final
: public Named
, private RawConnection::Callback {
public:

View File

@ -49,7 +49,7 @@ class ITransport {
virtual ~ITransport() = default;
};
class AbridgedTransport : public ITransport {
class AbridgedTransport final : public ITransport {
public:
size_t read_from_stream(ChainBufferReader *stream, BufferSlice *message, uint32 *quick_ack) final;
void write_prepare_inplace(BufferWriter *message, bool quick_ack) final;
@ -79,7 +79,7 @@ class IntermediateTransport : ITransport {
using TransportImpl = IntermediateTransport;
class OldTransport : public IStreamTransport {
class OldTransport final : public IStreamTransport {
public:
OldTransport() = default;
Result<size_t> read_next(BufferSlice *message, uint32 *quick_ack) final TD_WARN_UNUSED_RESULT {
@ -126,7 +126,7 @@ class OldTransport : public IStreamTransport {
ChainBufferWriter *output_;
};
class ObfuscatedTransport : public IStreamTransport {
class ObfuscatedTransport final : public IStreamTransport {
public:
ObfuscatedTransport(int16 dc_id, const ProxySecret &secret)
: dc_id_(dc_id), secret_(secret), impl_(secret_.use_random_padding()) {

View File

@ -23,7 +23,7 @@ class Grease {
static void init(MutableSlice res);
};
class TlsInit : public TransparentProxy {
class TlsInit final : public TransparentProxy {
public:
TlsInit(SocketFd socket_fd, string domain, string secret, unique_ptr<Callback> callback, ActorShared<> parent,
double server_time_difference)

View File

@ -18,7 +18,7 @@ template <class T>
using TLStorer = DefaultStorer<T>;
template <class T>
class TLObjectStorer : public Storer {
class TLObjectStorer final : public Storer {
mutable size_t size_ = std::numeric_limits<size_t>::max();
const T &object_;

View File

@ -38,7 +38,7 @@
namespace td {
class GetSavedGifsQuery : public Td::ResultHandler {
class GetSavedGifsQuery final : public Td::ResultHandler {
bool is_repair_ = false;
public:
@ -66,7 +66,7 @@ class GetSavedGifsQuery : public Td::ResultHandler {
}
};
class SaveGifQuery : public Td::ResultHandler {
class SaveGifQuery final : public Td::ResultHandler {
FileId file_id_;
string file_reference_;
bool unsave_ = false;

View File

@ -27,7 +27,7 @@ namespace td {
class Td;
class AnimationsManager : public Actor {
class AnimationsManager final : public Actor {
public:
AnimationsManager(Td *td, ActorShared<> parent);

View File

@ -23,7 +23,7 @@
namespace td {
class AuthManager : public NetActor {
class AuthManager final : public NetActor {
public:
AuthManager(int32 api_id, const string &api_hash, ActorShared<> parent);

View File

@ -30,7 +30,7 @@ static td_api::object_ptr<td_api::autoDownloadSettings> convert_auto_download_se
settings->video_upload_maxbitrate_, video_preload_large, audio_preload_next, phonecalls_less_data);
}
class GetAutoDownloadSettingsQuery : public Td::ResultHandler {
class GetAutoDownloadSettingsQuery final : public Td::ResultHandler {
Promise<td_api::object_ptr<td_api::autoDownloadSettingsPresets>> promise_;
public:
@ -79,7 +79,7 @@ telegram_api::object_ptr<telegram_api::autoDownloadSettings> get_input_auto_down
settings.max_video_file_size, settings.max_other_file_size, settings.video_upload_bitrate);
}
class SaveAutoDownloadSettingsQuery : public Td::ResultHandler {
class SaveAutoDownloadSettingsQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:

View File

@ -40,7 +40,7 @@
namespace td {
class GetBackgroundQuery : public Td::ResultHandler {
class GetBackgroundQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
BackgroundId background_id_;
string background_name_;
@ -75,7 +75,7 @@ class GetBackgroundQuery : public Td::ResultHandler {
}
};
class GetBackgroundsQuery : public Td::ResultHandler {
class GetBackgroundsQuery final : public Td::ResultHandler {
Promise<telegram_api::object_ptr<telegram_api::account_WallPapers>> promise_;
public:
@ -101,7 +101,7 @@ class GetBackgroundsQuery : public Td::ResultHandler {
}
};
class InstallBackgroundQuery : public Td::ResultHandler {
class InstallBackgroundQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -128,7 +128,7 @@ class InstallBackgroundQuery : public Td::ResultHandler {
}
};
class UploadBackgroundQuery : public Td::ResultHandler {
class UploadBackgroundQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
FileId file_id_;
BackgroundType type_;
@ -174,7 +174,7 @@ class UploadBackgroundQuery : public Td::ResultHandler {
}
};
class UnsaveBackgroundQuery : public Td::ResultHandler {
class UnsaveBackgroundQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -205,7 +205,7 @@ class UnsaveBackgroundQuery : public Td::ResultHandler {
}
};
class ResetBackgroundsQuery : public Td::ResultHandler {
class ResetBackgroundsQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -235,7 +235,7 @@ class ResetBackgroundsQuery : public Td::ResultHandler {
}
};
class BackgroundManager::UploadBackgroundFileCallback : public FileManager::UploadCallback {
class BackgroundManager::UploadBackgroundFileCallback final : public FileManager::UploadCallback {
public:
void on_upload_ok(FileId file_id, tl_object_ptr<telegram_api::InputFile> input_file) final {
send_closure_later(G()->background_manager(), &BackgroundManager::on_upload_background_file, file_id,

View File

@ -29,7 +29,7 @@ namespace td {
class Td;
class BackgroundManager : public Actor {
class BackgroundManager final : public Actor {
public:
BackgroundManager(Td *td, ActorShared<> parent);

View File

@ -22,7 +22,7 @@
namespace td {
class SetBotCommandsQuery : public Td::ResultHandler {
class SetBotCommandsQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -52,7 +52,7 @@ class SetBotCommandsQuery : public Td::ResultHandler {
}
};
class ResetBotCommandsQuery : public Td::ResultHandler {
class ResetBotCommandsQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -78,7 +78,7 @@ class ResetBotCommandsQuery : public Td::ResultHandler {
}
};
class GetBotCommandsQuery : public Td::ResultHandler {
class GetBotCommandsQuery final : public Td::ResultHandler {
Promise<td_api::object_ptr<td_api::botCommands>> promise_;
public:

View File

@ -89,7 +89,7 @@ struct CallState {
tl_object_ptr<td_api::CallState> get_call_state_object() const;
};
class CallActor : public NetQueryCallback {
class CallActor final : public NetQueryCallback {
public:
CallActor(CallId call_id, ActorShared<> parent, Promise<int64> promise);

View File

@ -22,7 +22,7 @@
namespace td {
class CallManager : public Actor {
class CallManager final : public Actor {
public:
using Update = telegram_api::object_ptr<telegram_api::updatePhoneCall>;
explicit CallManager(ActorShared<> parent);

View File

@ -28,7 +28,7 @@
namespace td {
class GetBotCallbackAnswerQuery : public Td::ResultHandler {
class GetBotCallbackAnswerQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
int64 result_id_;
DialogId dialog_id_;
@ -97,7 +97,7 @@ class GetBotCallbackAnswerQuery : public Td::ResultHandler {
}
};
class SetBotCallbackAnswerQuery : public Td::ResultHandler {
class SetBotCallbackAnswerQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:

View File

@ -47,7 +47,7 @@ class TdReceiver {
}
unique_ptr<TdCallback> create_callback(ClientManager::ClientId client_id) {
class Callback : public TdCallback {
class Callback final : public TdCallback {
public:
Callback(ClientManager::ClientId client_id, TdReceiver *impl) : client_id_(client_id), impl_(impl) {
}
@ -231,7 +231,7 @@ class Client::Impl final {
#else
class MultiTd : public Actor {
class MultiTd final : public Actor {
public:
explicit MultiTd(Td::Options options) : options_(std::move(options)) {
}
@ -287,7 +287,7 @@ class TdReceiver {
}
unique_ptr<TdCallback> create_callback(ClientManager::ClientId client_id) {
class Callback : public TdCallback {
class Callback final : public TdCallback {
public:
explicit Callback(ClientManager::ClientId client_id, std::shared_ptr<OutputQueue> output_queue)
: client_id_(client_id), output_queue_(std::move(output_queue)) {

View File

@ -27,7 +27,7 @@ class Td;
* This is a low-level Actor interface for interaction with TDLib. The interface is a lot more flexible than
* the Client interface, however, for most usages the Client interface should be sufficient.
*/
class ClientActor : public Actor {
class ClientActor final : public Actor {
public:
/// Options for ClientActor creation.
struct Options {

View File

@ -379,7 +379,7 @@ ActorOwn<> get_simple_config_firebase_firestore(Promise<SimpleConfigResult> prom
}
ActorOwn<> get_full_config(DcOption option, Promise<FullConfig> promise, ActorShared<> parent) {
class SessionCallback : public Session::Callback {
class SessionCallback final : public Session::Callback {
public:
SessionCallback(ActorShared<> parent, DcOption option) : parent_(std::move(parent)), option_(std::move(option)) {
}
@ -417,7 +417,7 @@ ActorOwn<> get_full_config(DcOption option, Promise<FullConfig> promise, ActorSh
std::vector<Promise<unique_ptr<mtproto::RawConnection>>> delay_forever_;
};
class SimpleAuthData : public AuthDataShared {
class SimpleAuthData final : public AuthDataShared {
public:
explicit SimpleAuthData(DcId dc_id) : dc_id_(dc_id) {
}
@ -487,7 +487,7 @@ ActorOwn<> get_full_config(DcOption option, Promise<FullConfig> promise, ActorSh
}
};
class GetConfigActor : public NetQueryCallback {
class GetConfigActor final : public NetQueryCallback {
public:
GetConfigActor(DcOption option, Promise<FullConfig> promise, ActorShared<> parent)
: option_(std::move(option)), promise_(std::move(promise)), parent_(std::move(parent)) {
@ -542,7 +542,7 @@ ActorOwn<> get_full_config(DcOption option, Promise<FullConfig> promise, ActorSh
return ActorOwn<>(create_actor<GetConfigActor>("GetConfigActor", option, std::move(promise), std::move(parent)));
}
class ConfigRecoverer : public Actor {
class ConfigRecoverer final : public Actor {
public:
explicit ConfigRecoverer(ActorShared<> parent) : parent_(std::move(parent)) {
connecting_since_ = Time::now();
@ -840,7 +840,7 @@ class ConfigRecoverer : public Actor {
}
void start_up() final {
class StateCallback : public StateManager::Callback {
class StateCallback final : public StateManager::Callback {
public:
explicit StateCallback(ActorId<ConfigRecoverer> parent) : parent_(std::move(parent)) {
}

View File

@ -83,7 +83,7 @@ using FullConfig = tl_object_ptr<telegram_api::config>;
ActorOwn<> get_full_config(DcId dc_id, IPAddress ip_address, Promise<FullConfig> promise);
class ConfigRecoverer;
class ConfigManager : public NetQueryCallback {
class ConfigManager final : public NetQueryCallback {
public:
explicit ConfigManager(ActorShared<> parent);

View File

@ -75,7 +75,7 @@
namespace td {
class DismissSuggestionQuery : public Td::ResultHandler {
class DismissSuggestionQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
DialogId dialog_id_;
@ -107,7 +107,7 @@ class DismissSuggestionQuery : public Td::ResultHandler {
}
};
class SetAccountTtlQuery : public Td::ResultHandler {
class SetAccountTtlQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -138,7 +138,7 @@ class SetAccountTtlQuery : public Td::ResultHandler {
}
};
class GetAccountTtlQuery : public Td::ResultHandler {
class GetAccountTtlQuery final : public Td::ResultHandler {
Promise<int32> promise_;
public:
@ -166,7 +166,7 @@ class GetAccountTtlQuery : public Td::ResultHandler {
}
};
class AcceptLoginTokenQuery : public Td::ResultHandler {
class AcceptLoginTokenQuery final : public Td::ResultHandler {
Promise<td_api::object_ptr<td_api::session>> promise_;
public:
@ -193,7 +193,7 @@ class AcceptLoginTokenQuery : public Td::ResultHandler {
}
};
class GetAuthorizationsQuery : public Td::ResultHandler {
class GetAuthorizationsQuery final : public Td::ResultHandler {
Promise<tl_object_ptr<td_api::sessions>> promise_;
public:
@ -234,7 +234,7 @@ class GetAuthorizationsQuery : public Td::ResultHandler {
}
};
class ResetAuthorizationQuery : public Td::ResultHandler {
class ResetAuthorizationQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -261,7 +261,7 @@ class ResetAuthorizationQuery : public Td::ResultHandler {
}
};
class ResetAuthorizationsQuery : public Td::ResultHandler {
class ResetAuthorizationsQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -289,7 +289,7 @@ class ResetAuthorizationsQuery : public Td::ResultHandler {
}
};
class GetWebAuthorizationsQuery : public Td::ResultHandler {
class GetWebAuthorizationsQuery final : public Td::ResultHandler {
Promise<tl_object_ptr<td_api::connectedWebsites>> promise_;
public:
@ -337,7 +337,7 @@ class GetWebAuthorizationsQuery : public Td::ResultHandler {
}
};
class ResetWebAuthorizationQuery : public Td::ResultHandler {
class ResetWebAuthorizationQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -364,7 +364,7 @@ class ResetWebAuthorizationQuery : public Td::ResultHandler {
}
};
class ResetWebAuthorizationsQuery : public Td::ResultHandler {
class ResetWebAuthorizationsQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -391,7 +391,7 @@ class ResetWebAuthorizationsQuery : public Td::ResultHandler {
}
};
class GetContactsQuery : public Td::ResultHandler {
class GetContactsQuery final : public Td::ResultHandler {
public:
void send(int32 hash) {
LOG(INFO) << "Reload contacts with hash " << hash;
@ -415,7 +415,7 @@ class GetContactsQuery : public Td::ResultHandler {
}
};
class GetContactsStatusesQuery : public Td::ResultHandler {
class GetContactsStatusesQuery final : public Td::ResultHandler {
public:
void send() {
LOG(INFO) << "Reload contacts statuses";
@ -438,7 +438,7 @@ class GetContactsStatusesQuery : public Td::ResultHandler {
}
};
class AddContactQuery : public Td::ResultHandler {
class AddContactQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
UserId user_id_;
@ -475,7 +475,7 @@ class AddContactQuery : public Td::ResultHandler {
}
};
class AcceptContactQuery : public Td::ResultHandler {
class AcceptContactQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
UserId user_id_;
@ -506,7 +506,7 @@ class AcceptContactQuery : public Td::ResultHandler {
}
};
class ImportContactsQuery : public Td::ResultHandler {
class ImportContactsQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
vector<Contact> input_contacts_;
vector<UserId> imported_user_ids_;
@ -609,7 +609,7 @@ class ImportContactsQuery : public Td::ResultHandler {
}
};
class DeleteContactsQuery : public Td::ResultHandler {
class DeleteContactsQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -637,7 +637,7 @@ class DeleteContactsQuery : public Td::ResultHandler {
}
};
class DeleteContactsByPhoneNumberQuery : public Td::ResultHandler {
class DeleteContactsByPhoneNumberQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
vector<UserId> user_ids_;
@ -674,7 +674,7 @@ class DeleteContactsByPhoneNumberQuery : public Td::ResultHandler {
}
};
class ResetContactsQuery : public Td::ResultHandler {
class ResetContactsQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -708,7 +708,7 @@ class ResetContactsQuery : public Td::ResultHandler {
}
};
class SearchDialogsNearbyQuery : public Td::ResultHandler {
class SearchDialogsNearbyQuery final : public Td::ResultHandler {
Promise<tl_object_ptr<telegram_api::Updates>> promise_;
public:
@ -742,7 +742,7 @@ class SearchDialogsNearbyQuery : public Td::ResultHandler {
}
};
class UploadProfilePhotoQuery : public Td::ResultHandler {
class UploadProfilePhotoQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
FileId file_id_;
@ -795,7 +795,7 @@ class UploadProfilePhotoQuery : public Td::ResultHandler {
}
};
class UpdateProfilePhotoQuery : public Td::ResultHandler {
class UpdateProfilePhotoQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
FileId file_id_;
int64 old_photo_id_;
@ -849,7 +849,7 @@ class UpdateProfilePhotoQuery : public Td::ResultHandler {
}
};
class DeleteProfilePhotoQuery : public Td::ResultHandler {
class DeleteProfilePhotoQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
int64 profile_photo_id_;
@ -885,7 +885,7 @@ class DeleteProfilePhotoQuery : public Td::ResultHandler {
}
};
class UpdateProfileQuery : public Td::ResultHandler {
class UpdateProfileQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
int32 flags_;
string first_name_;
@ -923,7 +923,7 @@ class UpdateProfileQuery : public Td::ResultHandler {
}
};
class CheckUsernameQuery : public Td::ResultHandler {
class CheckUsernameQuery final : public Td::ResultHandler {
Promise<bool> promise_;
public:
@ -948,7 +948,7 @@ class CheckUsernameQuery : public Td::ResultHandler {
}
};
class UpdateUsernameQuery : public Td::ResultHandler {
class UpdateUsernameQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -979,7 +979,7 @@ class UpdateUsernameQuery : public Td::ResultHandler {
}
};
class CheckChannelUsernameQuery : public Td::ResultHandler {
class CheckChannelUsernameQuery final : public Td::ResultHandler {
Promise<bool> promise_;
ChannelId channel_id_;
string username_;
@ -1018,7 +1018,7 @@ class CheckChannelUsernameQuery : public Td::ResultHandler {
}
};
class UpdateChannelUsernameQuery : public Td::ResultHandler {
class UpdateChannelUsernameQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
ChannelId channel_id_;
string username_;
@ -1066,7 +1066,7 @@ class UpdateChannelUsernameQuery : public Td::ResultHandler {
}
};
class SetChannelStickerSetQuery : public Td::ResultHandler {
class SetChannelStickerSetQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
ChannelId channel_id_;
StickerSetId sticker_set_id_;
@ -1115,7 +1115,7 @@ class SetChannelStickerSetQuery : public Td::ResultHandler {
}
};
class ToggleChannelSignaturesQuery : public Td::ResultHandler {
class ToggleChannelSignaturesQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
ChannelId channel_id_;
@ -1155,7 +1155,7 @@ class ToggleChannelSignaturesQuery : public Td::ResultHandler {
}
};
class TogglePrehistoryHiddenQuery : public Td::ResultHandler {
class TogglePrehistoryHiddenQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
ChannelId channel_id_;
bool is_all_history_available_;
@ -1208,7 +1208,7 @@ class TogglePrehistoryHiddenQuery : public Td::ResultHandler {
}
};
class ConvertToGigagroupQuery : public Td::ResultHandler {
class ConvertToGigagroupQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
ChannelId channel_id_;
@ -1247,7 +1247,7 @@ class ConvertToGigagroupQuery : public Td::ResultHandler {
}
};
class EditChatAboutQuery : public Td::ResultHandler {
class EditChatAboutQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
DialogId dialog_id_;
string about_;
@ -1309,7 +1309,7 @@ class EditChatAboutQuery : public Td::ResultHandler {
}
};
class SetDiscussionGroupQuery : public Td::ResultHandler {
class SetDiscussionGroupQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
ChannelId broadcast_channel_id_;
ChannelId group_channel_id_;
@ -1348,7 +1348,7 @@ class SetDiscussionGroupQuery : public Td::ResultHandler {
}
};
class EditLocationQuery : public Td::ResultHandler {
class EditLocationQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
ChannelId channel_id_;
DialogLocation location_;
@ -1387,7 +1387,7 @@ class EditLocationQuery : public Td::ResultHandler {
}
};
class ToggleSlowModeQuery : public Td::ResultHandler {
class ToggleSlowModeQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
ChannelId channel_id_;
int32 slow_mode_delay_ = 0;
@ -1441,7 +1441,7 @@ class ToggleSlowModeQuery : public Td::ResultHandler {
}
};
class ReportChannelSpamQuery : public Td::ResultHandler {
class ReportChannelSpamQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
ChannelId channel_id_;
@ -1482,7 +1482,7 @@ class ReportChannelSpamQuery : public Td::ResultHandler {
}
};
class DeleteChatQuery : public Td::ResultHandler {
class DeleteChatQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -1510,7 +1510,7 @@ class DeleteChatQuery : public Td::ResultHandler {
}
};
class DeleteChannelQuery : public Td::ResultHandler {
class DeleteChannelQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
ChannelId channel_id_;
@ -1542,7 +1542,7 @@ class DeleteChannelQuery : public Td::ResultHandler {
}
};
class AddChatUserQuery : public Td::ResultHandler {
class AddChatUserQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -1571,7 +1571,7 @@ class AddChatUserQuery : public Td::ResultHandler {
}
};
class EditChatAdminQuery : public Td::ResultHandler {
class EditChatAdminQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
ChatId chat_id_;
@ -1607,7 +1607,7 @@ class EditChatAdminQuery : public Td::ResultHandler {
}
};
class ExportChatInviteQuery : public Td::ResultHandler {
class ExportChatInviteQuery final : public Td::ResultHandler {
Promise<td_api::object_ptr<td_api::chatInviteLink>> promise_;
DialogId dialog_id_;
@ -1666,7 +1666,7 @@ class ExportChatInviteQuery : public Td::ResultHandler {
}
};
class EditChatInviteLinkQuery : public Td::ResultHandler {
class EditChatInviteLinkQuery final : public Td::ResultHandler {
Promise<td_api::object_ptr<td_api::chatInviteLink>> promise_;
DialogId dialog_id_;
@ -1718,7 +1718,7 @@ class EditChatInviteLinkQuery : public Td::ResultHandler {
}
};
class GetExportedChatInviteQuery : public Td::ResultHandler {
class GetExportedChatInviteQuery final : public Td::ResultHandler {
Promise<td_api::object_ptr<td_api::chatInviteLink>> promise_;
DialogId dialog_id_;
@ -1768,7 +1768,7 @@ class GetExportedChatInviteQuery : public Td::ResultHandler {
}
};
class GetExportedChatInvitesQuery : public Td::ResultHandler {
class GetExportedChatInvitesQuery final : public Td::ResultHandler {
Promise<td_api::object_ptr<td_api::chatInviteLinks>> promise_;
DialogId dialog_id_;
@ -1836,7 +1836,7 @@ class GetExportedChatInvitesQuery : public Td::ResultHandler {
}
};
class GetChatAdminWithInvitesQuery : public Td::ResultHandler {
class GetChatAdminWithInvitesQuery final : public Td::ResultHandler {
Promise<td_api::object_ptr<td_api::chatInviteLinkCounts>> promise_;
DialogId dialog_id_;
@ -1886,7 +1886,7 @@ class GetChatAdminWithInvitesQuery : public Td::ResultHandler {
}
};
class GetChatInviteImportersQuery : public Td::ResultHandler {
class GetChatInviteImportersQuery final : public Td::ResultHandler {
Promise<td_api::object_ptr<td_api::chatInviteLinkMembers>> promise_;
DialogId dialog_id_;
@ -1947,7 +1947,7 @@ class GetChatInviteImportersQuery : public Td::ResultHandler {
}
};
class RevokeChatInviteLinkQuery : public Td::ResultHandler {
class RevokeChatInviteLinkQuery final : public Td::ResultHandler {
Promise<td_api::object_ptr<td_api::chatInviteLinks>> promise_;
DialogId dialog_id_;
@ -2022,7 +2022,7 @@ class RevokeChatInviteLinkQuery : public Td::ResultHandler {
}
};
class DeleteExportedChatInviteQuery : public Td::ResultHandler {
class DeleteExportedChatInviteQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
DialogId dialog_id_;
@ -2056,7 +2056,7 @@ class DeleteExportedChatInviteQuery : public Td::ResultHandler {
}
};
class DeleteRevokedExportedChatInvitesQuery : public Td::ResultHandler {
class DeleteRevokedExportedChatInvitesQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
DialogId dialog_id_;
@ -2093,7 +2093,7 @@ class DeleteRevokedExportedChatInvitesQuery : public Td::ResultHandler {
}
};
class CheckChatInviteQuery : public Td::ResultHandler {
class CheckChatInviteQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
string invite_link_;
@ -2124,7 +2124,7 @@ class CheckChatInviteQuery : public Td::ResultHandler {
}
};
class ImportChatInviteQuery : public Td::ResultHandler {
class ImportChatInviteQuery final : public Td::ResultHandler {
Promise<DialogId> promise_;
string invite_link_;
@ -2168,7 +2168,7 @@ class ImportChatInviteQuery : public Td::ResultHandler {
}
};
class DeleteChatUserQuery : public Td::ResultHandler {
class DeleteChatUserQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -2201,7 +2201,7 @@ class DeleteChatUserQuery : public Td::ResultHandler {
}
};
class JoinChannelQuery : public Td::ResultHandler {
class JoinChannelQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
ChannelId channel_id_;
@ -2234,7 +2234,7 @@ class JoinChannelQuery : public Td::ResultHandler {
}
};
class InviteToChannelQuery : public Td::ResultHandler {
class InviteToChannelQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
ChannelId channel_id_;
@ -2269,7 +2269,7 @@ class InviteToChannelQuery : public Td::ResultHandler {
}
};
class EditChannelAdminQuery : public Td::ResultHandler {
class EditChannelAdminQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
ChannelId channel_id_;
@ -2304,7 +2304,7 @@ class EditChannelAdminQuery : public Td::ResultHandler {
}
};
class EditChannelBannedQuery : public Td::ResultHandler {
class EditChannelBannedQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
ChannelId channel_id_;
@ -2339,7 +2339,7 @@ class EditChannelBannedQuery : public Td::ResultHandler {
}
};
class LeaveChannelQuery : public Td::ResultHandler {
class LeaveChannelQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
ChannelId channel_id_;
@ -2372,7 +2372,7 @@ class LeaveChannelQuery : public Td::ResultHandler {
}
};
class CanEditChannelCreatorQuery : public Td::ResultHandler {
class CanEditChannelCreatorQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -2403,7 +2403,7 @@ class CanEditChannelCreatorQuery : public Td::ResultHandler {
}
};
class EditChannelCreatorQuery : public Td::ResultHandler {
class EditChannelCreatorQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
ChannelId channel_id_;
@ -2445,7 +2445,7 @@ class EditChannelCreatorQuery : public Td::ResultHandler {
}
};
class MigrateChatQuery : public Td::ResultHandler {
class MigrateChatQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -2473,7 +2473,7 @@ class MigrateChatQuery : public Td::ResultHandler {
}
};
class GetCreatedPublicChannelsQuery : public Td::ResultHandler {
class GetCreatedPublicChannelsQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
PublicDialogType type_;
@ -2527,7 +2527,7 @@ class GetCreatedPublicChannelsQuery : public Td::ResultHandler {
}
};
class GetGroupsForDiscussionQuery : public Td::ResultHandler {
class GetGroupsForDiscussionQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -2571,7 +2571,7 @@ class GetGroupsForDiscussionQuery : public Td::ResultHandler {
}
};
class GetInactiveChannelsQuery : public Td::ResultHandler {
class GetInactiveChannelsQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -2602,7 +2602,7 @@ class GetInactiveChannelsQuery : public Td::ResultHandler {
}
};
class GetUsersQuery : public Td::ResultHandler {
class GetUsersQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -2629,7 +2629,7 @@ class GetUsersQuery : public Td::ResultHandler {
}
};
class GetFullUserQuery : public Td::ResultHandler {
class GetFullUserQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -2656,7 +2656,7 @@ class GetFullUserQuery : public Td::ResultHandler {
}
};
class GetUserPhotosQuery : public Td::ResultHandler {
class GetUserPhotosQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
UserId user_id_;
int32 offset_;
@ -2709,7 +2709,7 @@ class GetUserPhotosQuery : public Td::ResultHandler {
}
};
class GetChatsQuery : public Td::ResultHandler {
class GetChatsQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -2752,7 +2752,7 @@ class GetChatsQuery : public Td::ResultHandler {
}
};
class GetFullChatQuery : public Td::ResultHandler {
class GetFullChatQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
ChatId chat_id_;
@ -2783,7 +2783,7 @@ class GetFullChatQuery : public Td::ResultHandler {
}
};
class GetChannelsQuery : public Td::ResultHandler {
class GetChannelsQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
ChannelId channel_id_;
@ -2836,7 +2836,7 @@ class GetChannelsQuery : public Td::ResultHandler {
}
};
class GetFullChannelQuery : public Td::ResultHandler {
class GetFullChannelQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
ChannelId channel_id_;
@ -2868,7 +2868,7 @@ class GetFullChannelQuery : public Td::ResultHandler {
}
};
class GetChannelParticipantQuery : public Td::ResultHandler {
class GetChannelParticipantQuery final : public Td::ResultHandler {
Promise<DialogParticipant> promise_;
ChannelId channel_id_;
DialogId participant_dialog_id_;
@ -2921,7 +2921,7 @@ class GetChannelParticipantQuery : public Td::ResultHandler {
}
};
class GetChannelParticipantsQuery : public Td::ResultHandler {
class GetChannelParticipantsQuery final : public Td::ResultHandler {
Promise<tl_object_ptr<telegram_api::channels_channelParticipants>> promise_;
ChannelId channel_id_;
@ -2968,7 +2968,7 @@ class GetChannelParticipantsQuery : public Td::ResultHandler {
}
};
class GetChannelAdministratorsQuery : public Td::ResultHandler {
class GetChannelAdministratorsQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
ChannelId channel_id_;
@ -3038,7 +3038,7 @@ class GetChannelAdministratorsQuery : public Td::ResultHandler {
}
};
class GetSupportUserQuery : public Td::ResultHandler {
class GetSupportUserQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -3180,7 +3180,7 @@ tl_object_ptr<td_api::chatStatisticsChannel> ContactsManager::convert_broadcast_
convert_stats_graph(std::move(obj->iv_interactions_graph_)), std::move(recent_message_interactions));
}
class GetMegagroupStatsQuery : public Td::ResultHandler {
class GetMegagroupStatsQuery final : public Td::ResultHandler {
Promise<td_api::object_ptr<td_api::ChatStatistics>> promise_;
ChannelId channel_id_;
@ -3218,7 +3218,7 @@ class GetMegagroupStatsQuery : public Td::ResultHandler {
}
};
class GetBroadcastStatsQuery : public Td::ResultHandler {
class GetBroadcastStatsQuery final : public Td::ResultHandler {
Promise<td_api::object_ptr<td_api::ChatStatistics>> promise_;
ChannelId channel_id_;
@ -3267,7 +3267,7 @@ tl_object_ptr<td_api::messageStatistics> ContactsManager::convert_message_stats(
return make_tl_object<td_api::messageStatistics>(convert_stats_graph(std::move(obj->views_graph_)));
}
class GetMessageStatsQuery : public Td::ResultHandler {
class GetMessageStatsQuery final : public Td::ResultHandler {
Promise<td_api::object_ptr<td_api::messageStatistics>> promise_;
ChannelId channel_id_;
@ -3307,7 +3307,7 @@ class GetMessageStatsQuery : public Td::ResultHandler {
}
};
class LoadAsyncGraphQuery : public Td::ResultHandler {
class LoadAsyncGraphQuery final : public Td::ResultHandler {
Promise<td_api::object_ptr<td_api::StatisticalGraph>> promise_;
public:
@ -3338,7 +3338,7 @@ class LoadAsyncGraphQuery : public Td::ResultHandler {
}
};
class ContactsManager::UploadProfilePhotoCallback : public FileManager::UploadCallback {
class ContactsManager::UploadProfilePhotoCallback final : public FileManager::UploadCallback {
public:
void on_upload_ok(FileId file_id, tl_object_ptr<telegram_api::InputFile> input_file) final {
send_closure_later(G()->contacts_manager(), &ContactsManager::on_upload_profile_photo, file_id,

View File

@ -58,7 +58,7 @@ struct BinlogEvent;
class Td;
class ContactsManager : public Actor {
class ContactsManager final : public Actor {
public:
ContactsManager(Td *td, ActorShared<> parent);
ContactsManager(const ContactsManager &) = delete;

View File

@ -25,7 +25,7 @@
namespace td {
class GetNearestDcQuery : public Td::ResultHandler {
class GetNearestDcQuery final : public Td::ResultHandler {
Promise<string> promise_;
public:
@ -54,7 +54,7 @@ class GetNearestDcQuery : public Td::ResultHandler {
}
};
class GetCountriesListQuery : public Td::ResultHandler {
class GetCountriesListQuery final : public Td::ResultHandler {
Promise<tl_object_ptr<telegram_api::help_CountriesList>> promise_;
public:

View File

@ -21,7 +21,7 @@ namespace td {
class Td;
class CountryInfoManager : public Actor {
class CountryInfoManager final : public Actor {
public:
CountryInfoManager(Td *td, ActorShared<> parent);

View File

@ -16,7 +16,7 @@
namespace td {
class DelayDispatcher : public Actor {
class DelayDispatcher final : public Actor {
public:
DelayDispatcher(double default_delay, ActorShared<> parent)
: default_delay_(default_delay), parent_(std::move(parent)) {

View File

@ -22,7 +22,7 @@
namespace td {
class DeviceTokenManager : public NetQueryCallback {
class DeviceTokenManager final : public NetQueryCallback {
public:
explicit DeviceTokenManager(ActorShared<> parent) : parent_(std::move(parent)) {
}

View File

@ -12,7 +12,7 @@
namespace td {
class DhCache : public DhCallback {
class DhCache final : public DhCallback {
public:
int is_good_prime(Slice prime_str) const final;
void add_good_prime(Slice prime_str) const final;

View File

@ -117,7 +117,7 @@ Status drop_dialog_db(SqliteDb &db, int version) {
return status;
}
class DialogDbImpl : public DialogDbSyncInterface {
class DialogDbImpl final : public DialogDbSyncInterface {
public:
explicit DialogDbImpl(SqliteDb db) : db_(std::move(db)) {
init().ensure();
@ -313,7 +313,7 @@ class DialogDbImpl : public DialogDbSyncInterface {
std::shared_ptr<DialogDbSyncSafeInterface> create_dialog_db_sync(
std::shared_ptr<SqliteConnectionSafe> sqlite_connection) {
class DialogDbSyncSafe : public DialogDbSyncSafeInterface {
class DialogDbSyncSafe final : public DialogDbSyncSafeInterface {
public:
explicit DialogDbSyncSafe(std::shared_ptr<SqliteConnectionSafe> sqlite_connection)
: lsls_db_([safe_connection = std::move(sqlite_connection)] {
@ -330,7 +330,7 @@ std::shared_ptr<DialogDbSyncSafeInterface> create_dialog_db_sync(
return std::make_shared<DialogDbSyncSafe>(std::move(sqlite_connection));
}
class DialogDbAsync : public DialogDbAsyncInterface {
class DialogDbAsync final : public DialogDbAsyncInterface {
public:
DialogDbAsync(std::shared_ptr<DialogDbSyncSafeInterface> sync_db, int32 scheduler_id) {
impl_ = create_actor_on_scheduler<Impl>("DialogDbActor", scheduler_id, std::move(sync_db));
@ -370,7 +370,7 @@ class DialogDbAsync : public DialogDbAsyncInterface {
}
private:
class Impl : public Actor {
class Impl final : public Actor {
public:
explicit Impl(std::shared_ptr<DialogDbSyncSafeInterface> sync_db_safe) : sync_db_safe_(std::move(sync_db_safe)) {
}

View File

@ -33,7 +33,7 @@ class Td;
extern int VERBOSITY_NAME(file_references);
class FileReferenceManager : public Actor {
class FileReferenceManager final : public Actor {
public:
static bool is_file_reference_error(const Status &error);
static size_t get_file_reference_error_pos(const Status &error);

View File

@ -60,7 +60,7 @@ class WebPagesManager;
namespace td {
class Global : public ActorContext {
class Global final : public ActorContext {
public:
Global();
~Global() final;

View File

@ -31,7 +31,7 @@
namespace td {
class GetGroupCallStreamQuery : public Td::ResultHandler {
class GetGroupCallStreamQuery final : public Td::ResultHandler {
Promise<string> promise_;
public:
@ -69,7 +69,7 @@ class GetGroupCallStreamQuery : public Td::ResultHandler {
}
};
class GetGroupCallJoinAsQuery : public Td::ResultHandler {
class GetGroupCallJoinAsQuery final : public Td::ResultHandler {
Promise<td_api::object_ptr<td_api::messageSenders>> promise_;
DialogId dialog_id_;
@ -123,7 +123,7 @@ class GetGroupCallJoinAsQuery : public Td::ResultHandler {
}
};
class SaveDefaultGroupCallJoinAsQuery : public Td::ResultHandler {
class SaveDefaultGroupCallJoinAsQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -159,7 +159,7 @@ class SaveDefaultGroupCallJoinAsQuery : public Td::ResultHandler {
}
};
class CreateGroupCallQuery : public Td::ResultHandler {
class CreateGroupCallQuery final : public Td::ResultHandler {
Promise<InputGroupCallId> promise_;
DialogId dialog_id_;
@ -218,7 +218,7 @@ class CreateGroupCallQuery : public Td::ResultHandler {
}
};
class GetGroupCallQuery : public Td::ResultHandler {
class GetGroupCallQuery final : public Td::ResultHandler {
Promise<tl_object_ptr<telegram_api::phone_groupCall>> promise_;
public:
@ -248,7 +248,7 @@ class GetGroupCallQuery : public Td::ResultHandler {
}
};
class GetGroupCallParticipantQuery : public Td::ResultHandler {
class GetGroupCallParticipantQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
InputGroupCallId input_group_call_id_;
@ -281,7 +281,7 @@ class GetGroupCallParticipantQuery : public Td::ResultHandler {
}
};
class GetGroupCallParticipantsQuery : public Td::ResultHandler {
class GetGroupCallParticipantsQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
InputGroupCallId input_group_call_id_;
string offset_;
@ -315,7 +315,7 @@ class GetGroupCallParticipantsQuery : public Td::ResultHandler {
}
};
class StartScheduledGroupCallQuery : public Td::ResultHandler {
class StartScheduledGroupCallQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -347,7 +347,7 @@ class StartScheduledGroupCallQuery : public Td::ResultHandler {
}
};
class JoinGroupCallQuery : public Td::ResultHandler {
class JoinGroupCallQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
InputGroupCallId input_group_call_id_;
DialogId as_dialog_id_;
@ -406,7 +406,7 @@ class JoinGroupCallQuery : public Td::ResultHandler {
}
};
class JoinGroupCallPresentationQuery : public Td::ResultHandler {
class JoinGroupCallPresentationQuery final : public Td::ResultHandler {
InputGroupCallId input_group_call_id_;
uint64 generation_ = 0;
@ -441,7 +441,7 @@ class JoinGroupCallPresentationQuery : public Td::ResultHandler {
}
};
class LeaveGroupCallPresentationQuery : public Td::ResultHandler {
class LeaveGroupCallPresentationQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -473,7 +473,7 @@ class LeaveGroupCallPresentationQuery : public Td::ResultHandler {
}
};
class EditGroupCallTitleQuery : public Td::ResultHandler {
class EditGroupCallTitleQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -505,7 +505,7 @@ class EditGroupCallTitleQuery : public Td::ResultHandler {
}
};
class ToggleGroupCallStartSubscriptionQuery : public Td::ResultHandler {
class ToggleGroupCallStartSubscriptionQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -537,7 +537,7 @@ class ToggleGroupCallStartSubscriptionQuery : public Td::ResultHandler {
}
};
class ToggleGroupCallSettingsQuery : public Td::ResultHandler {
class ToggleGroupCallSettingsQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -569,7 +569,7 @@ class ToggleGroupCallSettingsQuery : public Td::ResultHandler {
}
};
class InviteToGroupCallQuery : public Td::ResultHandler {
class InviteToGroupCallQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -597,7 +597,7 @@ class InviteToGroupCallQuery : public Td::ResultHandler {
}
};
class ExportGroupCallInviteQuery : public Td::ResultHandler {
class ExportGroupCallInviteQuery final : public Td::ResultHandler {
Promise<string> promise_;
public:
@ -628,7 +628,7 @@ class ExportGroupCallInviteQuery : public Td::ResultHandler {
}
};
class ToggleGroupCallRecordQuery : public Td::ResultHandler {
class ToggleGroupCallRecordQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -667,7 +667,7 @@ class ToggleGroupCallRecordQuery : public Td::ResultHandler {
}
};
class EditGroupCallParticipantQuery : public Td::ResultHandler {
class EditGroupCallParticipantQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -719,7 +719,7 @@ class EditGroupCallParticipantQuery : public Td::ResultHandler {
}
};
class CheckGroupCallQuery : public Td::ResultHandler {
class CheckGroupCallQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -755,7 +755,7 @@ class CheckGroupCallQuery : public Td::ResultHandler {
}
};
class LeaveGroupCallQuery : public Td::ResultHandler {
class LeaveGroupCallQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -783,7 +783,7 @@ class LeaveGroupCallQuery : public Td::ResultHandler {
}
};
class DiscardGroupCallQuery : public Td::ResultHandler {
class DiscardGroupCallQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:

View File

@ -29,7 +29,7 @@ namespace td {
class Td;
class GroupCallManager : public Actor {
class GroupCallManager final : public Actor {
public:
GroupCallManager(Td *td, ActorShared<> parent);
GroupCallManager(const GroupCallManager &) = delete;

View File

@ -15,7 +15,7 @@
namespace td {
class HashtagHints : public Actor {
class HashtagHints final : public Actor {
public:
HashtagHints(string mode, ActorShared<> parent);

View File

@ -59,7 +59,7 @@
namespace td {
class GetInlineBotResultsQuery : public Td::ResultHandler {
class GetInlineBotResultsQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
DialogId dialog_id_;
UserId bot_user_id_;
@ -116,7 +116,7 @@ class GetInlineBotResultsQuery : public Td::ResultHandler {
}
};
class SetInlineBotResultsQuery : public Td::ResultHandler {
class SetInlineBotResultsQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:

View File

@ -35,7 +35,7 @@ class Td;
class Game;
class InlineQueriesManager : public Actor {
class InlineQueriesManager final : public Actor {
public:
InlineQueriesManager(Td *td, ActorShared<> parent);

View File

@ -135,7 +135,7 @@ tl_object_ptr<telegram_api::JSONValue> convert_json_value(td_api::object_ptr<td_
namespace {
class JsonableJsonValue : public Jsonable {
class JsonableJsonValue final : public Jsonable {
public:
explicit JsonableJsonValue(const td_api::JsonValue *json_value) : json_value_(json_value) {
}

View File

@ -27,7 +27,7 @@ namespace td {
class SqliteKeyValue;
class LanguagePackManager : public NetQueryCallback {
class LanguagePackManager final : public NetQueryCallback {
public:
explicit LanguagePackManager(ActorShared<> parent) : parent_(std::move(parent)) {
}

View File

@ -64,13 +64,13 @@ static bool is_valid_username(Slice username) {
return true;
}
class LinkManager::InternalLinkActiveSessions : public InternalLink {
class LinkManager::InternalLinkActiveSessions final : public InternalLink {
td_api::object_ptr<td_api::InternalLinkType> get_internal_link_type_object() const final {
return td_api::make_object<td_api::internalLinkTypeActiveSessions>();
}
};
class LinkManager::InternalLinkAuthenticationCode : public InternalLink {
class LinkManager::InternalLinkAuthenticationCode final : public InternalLink {
string code_;
td_api::object_ptr<td_api::InternalLinkType> get_internal_link_type_object() const final {
@ -82,7 +82,7 @@ class LinkManager::InternalLinkAuthenticationCode : public InternalLink {
}
};
class LinkManager::InternalLinkBackground : public InternalLink {
class LinkManager::InternalLinkBackground final : public InternalLink {
string background_name_;
td_api::object_ptr<td_api::InternalLinkType> get_internal_link_type_object() const final {
@ -94,7 +94,7 @@ class LinkManager::InternalLinkBackground : public InternalLink {
}
};
class LinkManager::InternalLinkBotStart : public InternalLink {
class LinkManager::InternalLinkBotStart final : public InternalLink {
string bot_username_;
string start_parameter_;
@ -108,7 +108,7 @@ class LinkManager::InternalLinkBotStart : public InternalLink {
}
};
class LinkManager::InternalLinkBotStartInGroup : public InternalLink {
class LinkManager::InternalLinkBotStartInGroup final : public InternalLink {
string bot_username_;
string start_parameter_;
@ -122,13 +122,13 @@ class LinkManager::InternalLinkBotStartInGroup : public InternalLink {
}
};
class LinkManager::InternalLinkChangePhoneNumber : public InternalLink {
class LinkManager::InternalLinkChangePhoneNumber final : public InternalLink {
td_api::object_ptr<td_api::InternalLinkType> get_internal_link_type_object() const final {
return td_api::make_object<td_api::internalLinkTypeChangePhoneNumber>();
}
};
class LinkManager::InternalLinkConfirmPhone : public InternalLink {
class LinkManager::InternalLinkConfirmPhone final : public InternalLink {
string hash_;
string phone_number_;
@ -142,19 +142,19 @@ class LinkManager::InternalLinkConfirmPhone : public InternalLink {
}
};
class LinkManager::InternalLinkDialogInvite : public InternalLink {
class LinkManager::InternalLinkDialogInvite final : public InternalLink {
td_api::object_ptr<td_api::InternalLinkType> get_internal_link_type_object() const final {
return td_api::make_object<td_api::internalLinkTypeChatInvite>();
}
};
class LinkManager::InternalLinkFilterSettings : public InternalLink {
class LinkManager::InternalLinkFilterSettings final : public InternalLink {
td_api::object_ptr<td_api::InternalLinkType> get_internal_link_type_object() const final {
return td_api::make_object<td_api::internalLinkTypeFilterSettings>();
}
};
class LinkManager::InternalLinkGame : public InternalLink {
class LinkManager::InternalLinkGame final : public InternalLink {
string bot_username_;
string game_short_name_;
@ -168,7 +168,7 @@ class LinkManager::InternalLinkGame : public InternalLink {
}
};
class LinkManager::InternalLinkLanguage : public InternalLink {
class LinkManager::InternalLinkLanguage final : public InternalLink {
string language_pack_id_;
td_api::object_ptr<td_api::InternalLinkType> get_internal_link_type_object() const final {
@ -180,13 +180,13 @@ class LinkManager::InternalLinkLanguage : public InternalLink {
}
};
class LinkManager::InternalLinkMessage : public InternalLink {
class LinkManager::InternalLinkMessage final : public InternalLink {
td_api::object_ptr<td_api::InternalLinkType> get_internal_link_type_object() const final {
return td_api::make_object<td_api::internalLinkTypeMessage>();
}
};
class LinkManager::InternalLinkMessageDraft : public InternalLink {
class LinkManager::InternalLinkMessageDraft final : public InternalLink {
FormattedText text_;
bool contains_link_ = false;
@ -200,7 +200,7 @@ class LinkManager::InternalLinkMessageDraft : public InternalLink {
}
};
class LinkManager::InternalLinkPassportDataRequest : public InternalLink {
class LinkManager::InternalLinkPassportDataRequest final : public InternalLink {
UserId bot_user_id_;
string scope_;
string public_key_;
@ -223,7 +223,7 @@ class LinkManager::InternalLinkPassportDataRequest : public InternalLink {
}
};
class LinkManager::InternalLinkProxy : public InternalLink {
class LinkManager::InternalLinkProxy final : public InternalLink {
string server_;
int32 port_;
td_api::object_ptr<td_api::ProxyType> type_;
@ -254,7 +254,7 @@ class LinkManager::InternalLinkProxy : public InternalLink {
}
};
class LinkManager::InternalLinkPublicDialog : public InternalLink {
class LinkManager::InternalLinkPublicDialog final : public InternalLink {
string dialog_username_;
td_api::object_ptr<td_api::InternalLinkType> get_internal_link_type_object() const final {
@ -266,19 +266,19 @@ class LinkManager::InternalLinkPublicDialog : public InternalLink {
}
};
class LinkManager::InternalLinkQrCodeAuthentication : public InternalLink {
class LinkManager::InternalLinkQrCodeAuthentication final : public InternalLink {
td_api::object_ptr<td_api::InternalLinkType> get_internal_link_type_object() const final {
return td_api::make_object<td_api::internalLinkTypeQrCodeAuthentication>();
}
};
class LinkManager::InternalLinkSettings : public InternalLink {
class LinkManager::InternalLinkSettings final : public InternalLink {
td_api::object_ptr<td_api::InternalLinkType> get_internal_link_type_object() const final {
return td_api::make_object<td_api::internalLinkTypeSettings>();
}
};
class LinkManager::InternalLinkStickerSet : public InternalLink {
class LinkManager::InternalLinkStickerSet final : public InternalLink {
string sticker_set_name_;
td_api::object_ptr<td_api::InternalLinkType> get_internal_link_type_object() const final {
@ -290,7 +290,7 @@ class LinkManager::InternalLinkStickerSet : public InternalLink {
}
};
class LinkManager::InternalLinkTheme : public InternalLink {
class LinkManager::InternalLinkTheme final : public InternalLink {
string theme_name_;
td_api::object_ptr<td_api::InternalLinkType> get_internal_link_type_object() const final {
@ -302,19 +302,19 @@ class LinkManager::InternalLinkTheme : public InternalLink {
}
};
class LinkManager::InternalLinkThemeSettings : public InternalLink {
class LinkManager::InternalLinkThemeSettings final : public InternalLink {
td_api::object_ptr<td_api::InternalLinkType> get_internal_link_type_object() const final {
return td_api::make_object<td_api::internalLinkTypeThemeSettings>();
}
};
class LinkManager::InternalLinkUnknownDeepLink : public InternalLink {
class LinkManager::InternalLinkUnknownDeepLink final : public InternalLink {
td_api::object_ptr<td_api::InternalLinkType> get_internal_link_type_object() const final {
return td_api::make_object<td_api::internalLinkTypeUnknownDeepLink>();
}
};
class LinkManager::InternalLinkVoiceChat : public InternalLink {
class LinkManager::InternalLinkVoiceChat final : public InternalLink {
string dialog_username_;
string invite_hash_;
@ -328,7 +328,7 @@ class LinkManager::InternalLinkVoiceChat : public InternalLink {
}
};
class RequestUrlAuthQuery : public Td::ResultHandler {
class RequestUrlAuthQuery final : public Td::ResultHandler {
Promise<td_api::object_ptr<td_api::LoginUrlInfo>> promise_;
string url_;
DialogId dialog_id_;
@ -398,7 +398,7 @@ class RequestUrlAuthQuery : public Td::ResultHandler {
}
};
class AcceptUrlAuthQuery : public Td::ResultHandler {
class AcceptUrlAuthQuery final : public Td::ResultHandler {
Promise<td_api::object_ptr<td_api::httpUrl>> promise_;
string url_;
DialogId dialog_id_;

View File

@ -23,7 +23,7 @@ namespace td {
class Td;
class LinkManager : public Actor {
class LinkManager final : public Actor {
public:
LinkManager(Td *td, ActorShared<> parent);

View File

@ -88,7 +88,7 @@
namespace td {
class MessageText : public MessageContent {
class MessageText final : public MessageContent {
public:
FormattedText text;
WebPageId web_page_id;
@ -102,7 +102,7 @@ class MessageText : public MessageContent {
}
};
class MessageAnimation : public MessageContent {
class MessageAnimation final : public MessageContent {
public:
FileId file_id;
@ -117,7 +117,7 @@ class MessageAnimation : public MessageContent {
}
};
class MessageAudio : public MessageContent {
class MessageAudio final : public MessageContent {
public:
FileId file_id;
@ -132,7 +132,7 @@ class MessageAudio : public MessageContent {
}
};
class MessageDocument : public MessageContent {
class MessageDocument final : public MessageContent {
public:
FileId file_id;
@ -147,7 +147,7 @@ class MessageDocument : public MessageContent {
}
};
class MessagePhoto : public MessageContent {
class MessagePhoto final : public MessageContent {
public:
Photo photo;
@ -162,7 +162,7 @@ class MessagePhoto : public MessageContent {
}
};
class MessageSticker : public MessageContent {
class MessageSticker final : public MessageContent {
public:
FileId file_id;
@ -175,7 +175,7 @@ class MessageSticker : public MessageContent {
}
};
class MessageVideo : public MessageContent {
class MessageVideo final : public MessageContent {
public:
FileId file_id;
@ -190,7 +190,7 @@ class MessageVideo : public MessageContent {
}
};
class MessageVoiceNote : public MessageContent {
class MessageVoiceNote final : public MessageContent {
public:
FileId file_id;
@ -207,7 +207,7 @@ class MessageVoiceNote : public MessageContent {
}
};
class MessageContact : public MessageContent {
class MessageContact final : public MessageContent {
public:
Contact contact;
@ -220,7 +220,7 @@ class MessageContact : public MessageContent {
}
};
class MessageLocation : public MessageContent {
class MessageLocation final : public MessageContent {
public:
Location location;
@ -233,7 +233,7 @@ class MessageLocation : public MessageContent {
}
};
class MessageVenue : public MessageContent {
class MessageVenue final : public MessageContent {
public:
Venue venue;
@ -246,7 +246,7 @@ class MessageVenue : public MessageContent {
}
};
class MessageChatCreate : public MessageContent {
class MessageChatCreate final : public MessageContent {
public:
string title;
vector<UserId> participant_user_ids;
@ -261,7 +261,7 @@ class MessageChatCreate : public MessageContent {
}
};
class MessageChatChangeTitle : public MessageContent {
class MessageChatChangeTitle final : public MessageContent {
public:
string title;
@ -274,7 +274,7 @@ class MessageChatChangeTitle : public MessageContent {
}
};
class MessageChatChangePhoto : public MessageContent {
class MessageChatChangePhoto final : public MessageContent {
public:
Photo photo;
@ -287,21 +287,21 @@ class MessageChatChangePhoto : public MessageContent {
}
};
class MessageChatDeletePhoto : public MessageContent {
class MessageChatDeletePhoto final : public MessageContent {
public:
MessageContentType get_type() const final {
return MessageContentType::ChatDeletePhoto;
}
};
class MessageChatDeleteHistory : public MessageContent {
class MessageChatDeleteHistory final : public MessageContent {
public:
MessageContentType get_type() const final {
return MessageContentType::ChatDeleteHistory;
}
};
class MessageChatAddUsers : public MessageContent {
class MessageChatAddUsers final : public MessageContent {
public:
vector<UserId> user_ids;
@ -314,14 +314,14 @@ class MessageChatAddUsers : public MessageContent {
}
};
class MessageChatJoinedByLink : public MessageContent {
class MessageChatJoinedByLink final : public MessageContent {
public:
MessageContentType get_type() const final {
return MessageContentType::ChatJoinedByLink;
}
};
class MessageChatDeleteUser : public MessageContent {
class MessageChatDeleteUser final : public MessageContent {
public:
UserId user_id;
@ -334,7 +334,7 @@ class MessageChatDeleteUser : public MessageContent {
}
};
class MessageChatMigrateTo : public MessageContent {
class MessageChatMigrateTo final : public MessageContent {
public:
ChannelId migrated_to_channel_id;
@ -347,7 +347,7 @@ class MessageChatMigrateTo : public MessageContent {
}
};
class MessageChannelCreate : public MessageContent {
class MessageChannelCreate final : public MessageContent {
public:
string title;
@ -360,7 +360,7 @@ class MessageChannelCreate : public MessageContent {
}
};
class MessageChannelMigrateFrom : public MessageContent {
class MessageChannelMigrateFrom final : public MessageContent {
public:
string title;
ChatId migrated_from_chat_id;
@ -375,7 +375,7 @@ class MessageChannelMigrateFrom : public MessageContent {
}
};
class MessagePinMessage : public MessageContent {
class MessagePinMessage final : public MessageContent {
public:
MessageId message_id;
@ -388,7 +388,7 @@ class MessagePinMessage : public MessageContent {
}
};
class MessageGame : public MessageContent {
class MessageGame final : public MessageContent {
public:
Game game;
@ -401,7 +401,7 @@ class MessageGame : public MessageContent {
}
};
class MessageGameScore : public MessageContent {
class MessageGameScore final : public MessageContent {
public:
MessageId game_message_id;
int64 game_id;
@ -417,14 +417,14 @@ class MessageGameScore : public MessageContent {
}
};
class MessageScreenshotTaken : public MessageContent {
class MessageScreenshotTaken final : public MessageContent {
public:
MessageContentType get_type() const final {
return MessageContentType::ScreenshotTaken;
}
};
class MessageChatSetTtl : public MessageContent {
class MessageChatSetTtl final : public MessageContent {
public:
int32 ttl;
@ -437,7 +437,7 @@ class MessageChatSetTtl : public MessageContent {
}
};
class MessageUnsupported : public MessageContent {
class MessageUnsupported final : public MessageContent {
public:
static constexpr int32 CURRENT_VERSION = 7;
int32 version = CURRENT_VERSION;
@ -451,7 +451,7 @@ class MessageUnsupported : public MessageContent {
}
};
class MessageCall : public MessageContent {
class MessageCall final : public MessageContent {
public:
int64 call_id;
int32 duration;
@ -468,7 +468,7 @@ class MessageCall : public MessageContent {
}
};
class MessageInvoice : public MessageContent {
class MessageInvoice final : public MessageContent {
public:
InputInvoice input_invoice;
@ -481,7 +481,7 @@ class MessageInvoice : public MessageContent {
}
};
class MessagePaymentSuccessful : public MessageContent {
class MessagePaymentSuccessful final : public MessageContent {
public:
DialogId invoice_dialog_id;
MessageId invoice_message_id;
@ -509,7 +509,7 @@ class MessagePaymentSuccessful : public MessageContent {
}
};
class MessageVideoNote : public MessageContent {
class MessageVideoNote final : public MessageContent {
public:
FileId file_id;
@ -524,14 +524,14 @@ class MessageVideoNote : public MessageContent {
}
};
class MessageContactRegistered : public MessageContent {
class MessageContactRegistered final : public MessageContent {
public:
MessageContentType get_type() const final {
return MessageContentType::ContactRegistered;
}
};
class MessageExpiredPhoto : public MessageContent {
class MessageExpiredPhoto final : public MessageContent {
public:
MessageExpiredPhoto() = default;
@ -540,7 +540,7 @@ class MessageExpiredPhoto : public MessageContent {
}
};
class MessageExpiredVideo : public MessageContent {
class MessageExpiredVideo final : public MessageContent {
public:
MessageExpiredVideo() = default;
@ -549,7 +549,7 @@ class MessageExpiredVideo : public MessageContent {
}
};
class MessageLiveLocation : public MessageContent {
class MessageLiveLocation final : public MessageContent {
public:
Location location;
int32 period = 0;
@ -579,7 +579,7 @@ class MessageLiveLocation : public MessageContent {
}
};
class MessageCustomServiceAction : public MessageContent {
class MessageCustomServiceAction final : public MessageContent {
public:
string message;
@ -592,7 +592,7 @@ class MessageCustomServiceAction : public MessageContent {
}
};
class MessageWebsiteConnected : public MessageContent {
class MessageWebsiteConnected final : public MessageContent {
public:
string domain_name;
@ -605,7 +605,7 @@ class MessageWebsiteConnected : public MessageContent {
}
};
class MessagePassportDataSent : public MessageContent {
class MessagePassportDataSent final : public MessageContent {
public:
vector<SecureValueType> types;
@ -618,7 +618,7 @@ class MessagePassportDataSent : public MessageContent {
}
};
class MessagePassportDataReceived : public MessageContent {
class MessagePassportDataReceived final : public MessageContent {
public:
vector<EncryptedSecureValue> values;
EncryptedSecureCredentials credentials;
@ -633,7 +633,7 @@ class MessagePassportDataReceived : public MessageContent {
}
};
class MessagePoll : public MessageContent {
class MessagePoll final : public MessageContent {
public:
PollId poll_id;
@ -646,7 +646,7 @@ class MessagePoll : public MessageContent {
}
};
class MessageDice : public MessageContent {
class MessageDice final : public MessageContent {
public:
string emoji;
int32 dice_value = 0;
@ -676,7 +676,7 @@ class MessageDice : public MessageContent {
constexpr const char *MessageDice::DEFAULT_EMOJI;
class MessageProximityAlertTriggered : public MessageContent {
class MessageProximityAlertTriggered final : public MessageContent {
public:
DialogId traveler_dialog_id;
DialogId watcher_dialog_id;
@ -692,7 +692,7 @@ class MessageProximityAlertTriggered : public MessageContent {
}
};
class MessageGroupCall : public MessageContent {
class MessageGroupCall final : public MessageContent {
public:
InputGroupCallId input_group_call_id;
int32 duration = -1;
@ -708,7 +708,7 @@ class MessageGroupCall : public MessageContent {
}
};
class MessageInviteToGroupCall : public MessageContent {
class MessageInviteToGroupCall final : public MessageContent {
public:
InputGroupCallId input_group_call_id;
vector<UserId> user_ids;

View File

@ -177,7 +177,7 @@ Status drop_messages_db(SqliteDb &db, int32 version) {
return db.exec("DROP TABLE IF EXISTS messages");
}
class MessagesDbImpl : public MessagesDbSyncInterface {
class MessagesDbImpl final : public MessagesDbSyncInterface {
public:
explicit MessagesDbImpl(SqliteDb db) : db_(std::move(db)) {
init().ensure();
@ -925,7 +925,7 @@ class MessagesDbImpl : public MessagesDbSyncInterface {
std::shared_ptr<MessagesDbSyncSafeInterface> create_messages_db_sync(
std::shared_ptr<SqliteConnectionSafe> sqlite_connection) {
class MessagesDbSyncSafe : public MessagesDbSyncSafeInterface {
class MessagesDbSyncSafe final : public MessagesDbSyncSafeInterface {
public:
explicit MessagesDbSyncSafe(std::shared_ptr<SqliteConnectionSafe> sqlite_connection)
: lsls_db_([safe_connection = std::move(sqlite_connection)] {
@ -942,7 +942,7 @@ std::shared_ptr<MessagesDbSyncSafeInterface> create_messages_db_sync(
return std::make_shared<MessagesDbSyncSafe>(std::move(sqlite_connection));
}
class MessagesDbAsync : public MessagesDbAsyncInterface {
class MessagesDbAsync final : public MessagesDbAsyncInterface {
public:
MessagesDbAsync(std::shared_ptr<MessagesDbSyncSafeInterface> sync_db, int32 scheduler_id) {
impl_ = create_actor_on_scheduler<Impl>("MessagesDbActor", scheduler_id, std::move(sync_db));
@ -1017,7 +1017,7 @@ class MessagesDbAsync : public MessagesDbAsyncInterface {
}
private:
class Impl : public Actor {
class Impl final : public Actor {
public:
explicit Impl(std::shared_ptr<MessagesDbSyncSafeInterface> sync_db_safe) : sync_db_safe_(std::move(sync_db_safe)) {
}

View File

@ -84,7 +84,7 @@
namespace td {
class GetDialogFiltersQuery : public Td::ResultHandler {
class GetDialogFiltersQuery final : public Td::ResultHandler {
Promise<vector<tl_object_ptr<telegram_api::dialogFilter>>> promise_;
public:
@ -110,7 +110,7 @@ class GetDialogFiltersQuery : public Td::ResultHandler {
}
};
class UpdateDialogFilterQuery : public Td::ResultHandler {
class UpdateDialogFilterQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -142,7 +142,7 @@ class UpdateDialogFilterQuery : public Td::ResultHandler {
}
};
class UpdateDialogFiltersOrderQuery : public Td::ResultHandler {
class UpdateDialogFiltersOrderQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -169,7 +169,7 @@ class UpdateDialogFiltersOrderQuery : public Td::ResultHandler {
}
};
class GetSuggestedDialogFiltersQuery : public Td::ResultHandler {
class GetSuggestedDialogFiltersQuery final : public Td::ResultHandler {
Promise<vector<tl_object_ptr<telegram_api::dialogFilterSuggested>>> promise_;
public:
@ -195,7 +195,7 @@ class GetSuggestedDialogFiltersQuery : public Td::ResultHandler {
}
};
class GetOnlinesQuery : public Td::ResultHandler {
class GetOnlinesQuery final : public Td::ResultHandler {
DialogId dialog_id_;
public:
@ -226,7 +226,7 @@ class GetOnlinesQuery : public Td::ResultHandler {
}
};
class GetAllDraftsQuery : public Td::ResultHandler {
class GetAllDraftsQuery final : public Td::ResultHandler {
public:
void send() {
send_query(G()->net_query_creator().create(telegram_api::messages_getAllDrafts()));
@ -251,7 +251,7 @@ class GetAllDraftsQuery : public Td::ResultHandler {
}
};
class GetDialogQuery : public Td::ResultHandler {
class GetDialogQuery final : public Td::ResultHandler {
DialogId dialog_id_;
public:
@ -293,7 +293,7 @@ class GetDialogQuery : public Td::ResultHandler {
}
};
class GetDialogsQuery : public Td::ResultHandler {
class GetDialogsQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -329,7 +329,7 @@ class GetDialogsQuery : public Td::ResultHandler {
}
};
class GetPinnedDialogsActor : public NetActorOnce {
class GetPinnedDialogsActor final : public NetActorOnce {
FolderId folder_id_;
Promise<Unit> promise_;
@ -366,7 +366,7 @@ class GetPinnedDialogsActor : public NetActorOnce {
}
};
class GetDialogUnreadMarksQuery : public Td::ResultHandler {
class GetDialogUnreadMarksQuery final : public Td::ResultHandler {
public:
void send() {
send_query(G()->net_query_creator().create(telegram_api::messages_getDialogUnreadMarks()));
@ -394,7 +394,7 @@ class GetDialogUnreadMarksQuery : public Td::ResultHandler {
}
};
class GetDiscussionMessageQuery : public Td::ResultHandler {
class GetDiscussionMessageQuery final : public Td::ResultHandler {
Promise<vector<FullMessageId>> promise_;
DialogId dialog_id_;
MessageId message_id_;
@ -435,7 +435,7 @@ class GetDiscussionMessageQuery : public Td::ResultHandler {
}
};
class GetMessagesQuery : public Td::ResultHandler {
class GetMessagesQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -469,7 +469,7 @@ class GetMessagesQuery : public Td::ResultHandler {
}
};
class GetChannelMessagesQuery : public Td::ResultHandler {
class GetChannelMessagesQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
ChannelId channel_id_;
@ -530,7 +530,7 @@ class GetChannelMessagesQuery : public Td::ResultHandler {
}
};
class GetScheduledMessagesQuery : public Td::ResultHandler {
class GetScheduledMessagesQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
DialogId dialog_id_;
@ -570,7 +570,7 @@ class GetScheduledMessagesQuery : public Td::ResultHandler {
}
};
class UpdateDialogPinnedMessageQuery : public Td::ResultHandler {
class UpdateDialogPinnedMessageQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
DialogId dialog_id_;
@ -618,7 +618,7 @@ class UpdateDialogPinnedMessageQuery : public Td::ResultHandler {
}
};
class UnpinAllMessagesQuery : public Td::ResultHandler {
class UnpinAllMessagesQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
DialogId dialog_id_;
@ -679,7 +679,7 @@ class UnpinAllMessagesQuery : public Td::ResultHandler {
}
};
class ExportChannelMessageLinkQuery : public Td::ResultHandler {
class ExportChannelMessageLinkQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
ChannelId channel_id_;
MessageId message_id_;
@ -730,7 +730,7 @@ class ExportChannelMessageLinkQuery : public Td::ResultHandler {
}
};
class GetDialogListActor : public NetActorOnce {
class GetDialogListActor final : public NetActorOnce {
FolderId folder_id_;
Promise<Unit> promise_;
@ -792,7 +792,7 @@ class GetDialogListActor : public NetActorOnce {
}
};
class SearchPublicDialogsQuery : public Td::ResultHandler {
class SearchPublicDialogsQuery final : public Td::ResultHandler {
string query_;
public:
@ -823,7 +823,7 @@ class SearchPublicDialogsQuery : public Td::ResultHandler {
}
};
class GetCommonDialogsQuery : public Td::ResultHandler {
class GetCommonDialogsQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
UserId user_id_;
int32 offset_chat_id_ = 0;
@ -877,7 +877,7 @@ class GetCommonDialogsQuery : public Td::ResultHandler {
}
};
class GetBlockedDialogsQuery : public Td::ResultHandler {
class GetBlockedDialogsQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
int32 offset_;
int32 limit_;
@ -937,7 +937,7 @@ class GetBlockedDialogsQuery : public Td::ResultHandler {
}
};
class CreateChatQuery : public Td::ResultHandler {
class CreateChatQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
int64 random_id_;
@ -967,7 +967,7 @@ class CreateChatQuery : public Td::ResultHandler {
}
};
class CreateChannelQuery : public Td::ResultHandler {
class CreateChannelQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
int64 random_id_;
@ -1013,7 +1013,7 @@ class CreateChannelQuery : public Td::ResultHandler {
}
};
class CheckHistoryImportQuery : public Td::ResultHandler {
class CheckHistoryImportQuery final : public Td::ResultHandler {
Promise<tl_object_ptr<td_api::MessageFileType>> promise_;
public:
@ -1050,7 +1050,7 @@ class CheckHistoryImportQuery : public Td::ResultHandler {
}
};
class CheckHistoryImportPeerQuery : public Td::ResultHandler {
class CheckHistoryImportPeerQuery final : public Td::ResultHandler {
Promise<string> promise_;
DialogId dialog_id_;
@ -1082,7 +1082,7 @@ class CheckHistoryImportPeerQuery : public Td::ResultHandler {
}
};
class InitHistoryImportQuery : public Td::ResultHandler {
class InitHistoryImportQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
FileId file_id_;
DialogId dialog_id_;
@ -1133,7 +1133,7 @@ class InitHistoryImportQuery : public Td::ResultHandler {
}
};
class UploadImportedMediaQuery : public Td::ResultHandler {
class UploadImportedMediaQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
DialogId dialog_id_;
int64 import_id_;
@ -1186,7 +1186,7 @@ class UploadImportedMediaQuery : public Td::ResultHandler {
}
};
class StartImportHistoryQuery : public Td::ResultHandler {
class StartImportHistoryQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
DialogId dialog_id_;
@ -1222,7 +1222,7 @@ class StartImportHistoryQuery : public Td::ResultHandler {
}
};
class EditDialogPhotoQuery : public Td::ResultHandler {
class EditDialogPhotoQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
FileId file_id_;
bool was_uploaded_ = false;
@ -1306,7 +1306,7 @@ class EditDialogPhotoQuery : public Td::ResultHandler {
}
};
class EditDialogTitleQuery : public Td::ResultHandler {
class EditDialogTitleQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
DialogId dialog_id_;
@ -1362,7 +1362,7 @@ class EditDialogTitleQuery : public Td::ResultHandler {
}
};
class SetHistoryTtlQuery : public Td::ResultHandler {
class SetHistoryTtlQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
DialogId dialog_id_;
@ -1403,7 +1403,7 @@ class SetHistoryTtlQuery : public Td::ResultHandler {
}
};
class EditChatDefaultBannedRightsQuery : public Td::ResultHandler {
class EditChatDefaultBannedRightsQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
DialogId dialog_id_;
@ -1443,7 +1443,7 @@ class EditChatDefaultBannedRightsQuery : public Td::ResultHandler {
}
};
class SaveDraftMessageQuery : public Td::ResultHandler {
class SaveDraftMessageQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
DialogId dialog_id_;
@ -1507,7 +1507,7 @@ class SaveDraftMessageQuery : public Td::ResultHandler {
}
};
class ClearAllDraftsQuery : public Td::ResultHandler {
class ClearAllDraftsQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -1542,7 +1542,7 @@ class ClearAllDraftsQuery : public Td::ResultHandler {
}
};
class ToggleDialogPinQuery : public Td::ResultHandler {
class ToggleDialogPinQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
DialogId dialog_id_;
bool is_pinned_;
@ -1592,7 +1592,7 @@ class ToggleDialogPinQuery : public Td::ResultHandler {
}
};
class ReorderPinnedDialogsQuery : public Td::ResultHandler {
class ReorderPinnedDialogsQuery final : public Td::ResultHandler {
FolderId folder_id_;
Promise<Unit> promise_;
@ -1632,7 +1632,7 @@ class ReorderPinnedDialogsQuery : public Td::ResultHandler {
}
};
class ToggleDialogUnreadMarkQuery : public Td::ResultHandler {
class ToggleDialogUnreadMarkQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
DialogId dialog_id_;
bool is_marked_as_unread_;
@ -1683,7 +1683,7 @@ class ToggleDialogUnreadMarkQuery : public Td::ResultHandler {
}
};
class ToggleDialogIsBlockedQuery : public Td::ResultHandler {
class ToggleDialogIsBlockedQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
DialogId dialog_id_;
bool is_blocked_;
@ -1732,7 +1732,7 @@ class ToggleDialogIsBlockedQuery : public Td::ResultHandler {
}
};
class GetMessagesViewsQuery : public Td::ResultHandler {
class GetMessagesViewsQuery final : public Td::ResultHandler {
DialogId dialog_id_;
vector<MessageId> message_ids_;
@ -1785,7 +1785,7 @@ class GetMessagesViewsQuery : public Td::ResultHandler {
}
};
class ReadMessagesContentsQuery : public Td::ResultHandler {
class ReadMessagesContentsQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -1825,7 +1825,7 @@ class ReadMessagesContentsQuery : public Td::ResultHandler {
}
};
class ReadChannelMessagesContentsQuery : public Td::ResultHandler {
class ReadChannelMessagesContentsQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
ChannelId channel_id_;
@ -1869,7 +1869,7 @@ class ReadChannelMessagesContentsQuery : public Td::ResultHandler {
}
};
class GetDialogMessageByDateQuery : public Td::ResultHandler {
class GetDialogMessageByDateQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
DialogId dialog_id_;
int32 date_;
@ -1924,7 +1924,7 @@ class GetDialogMessageByDateQuery : public Td::ResultHandler {
}
};
class GetHistoryQuery : public Td::ResultHandler {
class GetHistoryQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
DialogId dialog_id_;
MessageId from_message_id_;
@ -2000,7 +2000,7 @@ class GetHistoryQuery : public Td::ResultHandler {
}
};
class ReadHistoryQuery : public Td::ResultHandler {
class ReadHistoryQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
DialogId dialog_id_;
@ -2043,7 +2043,7 @@ class ReadHistoryQuery : public Td::ResultHandler {
}
};
class ReadChannelHistoryQuery : public Td::ResultHandler {
class ReadChannelHistoryQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
ChannelId channel_id_;
@ -2077,7 +2077,7 @@ class ReadChannelHistoryQuery : public Td::ResultHandler {
}
};
class ReadDiscussionQuery : public Td::ResultHandler {
class ReadDiscussionQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
DialogId dialog_id_;
@ -2109,7 +2109,7 @@ class ReadDiscussionQuery : public Td::ResultHandler {
}
};
class SearchMessagesQuery : public Td::ResultHandler {
class SearchMessagesQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
DialogId dialog_id_;
string query_;
@ -2218,7 +2218,7 @@ class SearchMessagesQuery : public Td::ResultHandler {
}
};
class SearchMessagesGlobalQuery : public Td::ResultHandler {
class SearchMessagesGlobalQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
string query_;
int32 offset_date_;
@ -2279,7 +2279,7 @@ class SearchMessagesGlobalQuery : public Td::ResultHandler {
}
};
class GetAllScheduledMessagesQuery : public Td::ResultHandler {
class GetAllScheduledMessagesQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
DialogId dialog_id_;
uint32 generation_;
@ -2321,7 +2321,7 @@ class GetAllScheduledMessagesQuery : public Td::ResultHandler {
}
};
class GetRecentLocationsQuery : public Td::ResultHandler {
class GetRecentLocationsQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
DialogId dialog_id_;
int32 limit_;
@ -2375,7 +2375,7 @@ class GetRecentLocationsQuery : public Td::ResultHandler {
}
};
class GetMessagePublicForwardsQuery : public Td::ResultHandler {
class GetMessagePublicForwardsQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
DialogId dialog_id_;
int32 limit_;
@ -2420,7 +2420,7 @@ class GetMessagePublicForwardsQuery : public Td::ResultHandler {
}
};
class HidePromoDataQuery : public Td::ResultHandler {
class HidePromoDataQuery final : public Td::ResultHandler {
DialogId dialog_id_;
public:
@ -2447,7 +2447,7 @@ class HidePromoDataQuery : public Td::ResultHandler {
}
};
class DeleteHistoryQuery : public Td::ResultHandler {
class DeleteHistoryQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
DialogId dialog_id_;
MessageId max_message_id_;
@ -2516,7 +2516,7 @@ class DeleteHistoryQuery : public Td::ResultHandler {
}
};
class DeleteChannelHistoryQuery : public Td::ResultHandler {
class DeleteChannelHistoryQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
ChannelId channel_id_;
MessageId max_message_id_;
@ -2558,7 +2558,7 @@ class DeleteChannelHistoryQuery : public Td::ResultHandler {
}
};
class DeletePhoneCallHistoryQuery : public Td::ResultHandler {
class DeletePhoneCallHistoryQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
bool revoke_;
@ -2613,7 +2613,7 @@ class DeletePhoneCallHistoryQuery : public Td::ResultHandler {
}
};
class BlockFromRepliesQuery : public Td::ResultHandler {
class BlockFromRepliesQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -2651,7 +2651,7 @@ class BlockFromRepliesQuery : public Td::ResultHandler {
}
};
class DeleteUserHistoryQuery : public Td::ResultHandler {
class DeleteUserHistoryQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
ChannelId channel_id_;
UserId user_id_;
@ -2712,7 +2712,7 @@ class DeleteUserHistoryQuery : public Td::ResultHandler {
}
};
class ReadMentionsQuery : public Td::ResultHandler {
class ReadMentionsQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
DialogId dialog_id_;
@ -2772,7 +2772,7 @@ class ReadMentionsQuery : public Td::ResultHandler {
}
};
class SendSecretMessageActor : public NetActor {
class SendSecretMessageActor final : public NetActor {
int64 random_id_;
public:
@ -2822,7 +2822,7 @@ class SendSecretMessageActor : public NetActor {
}
};
class SendMessageActor : public NetActorOnce {
class SendMessageActor final : public NetActorOnce {
int64 random_id_;
DialogId dialog_id_;
@ -2907,7 +2907,7 @@ class SendMessageActor : public NetActorOnce {
}
};
class StartBotQuery : public Td::ResultHandler {
class StartBotQuery final : public Td::ResultHandler {
int64 random_id_;
DialogId dialog_id_;
@ -2957,7 +2957,7 @@ class StartBotQuery : public Td::ResultHandler {
}
};
class SendInlineBotResultQuery : public Td::ResultHandler {
class SendInlineBotResultQuery final : public Td::ResultHandler {
int64 random_id_;
DialogId dialog_id_;
@ -3001,7 +3001,7 @@ class SendInlineBotResultQuery : public Td::ResultHandler {
}
};
class SendMultiMediaActor : public NetActorOnce {
class SendMultiMediaActor final : public NetActorOnce {
vector<FileId> file_ids_;
vector<string> file_references_;
vector<int64> random_ids_;
@ -3107,7 +3107,7 @@ class SendMultiMediaActor : public NetActorOnce {
}
};
class SendMediaActor : public NetActorOnce {
class SendMediaActor final : public NetActorOnce {
int64 random_id_ = 0;
FileId file_id_;
FileId thumbnail_file_id_;
@ -3216,7 +3216,7 @@ class SendMediaActor : public NetActorOnce {
}
};
class UploadMediaQuery : public Td::ResultHandler {
class UploadMediaQuery final : public Td::ResultHandler {
DialogId dialog_id_;
MessageId message_id_;
FileId file_id_;
@ -3295,7 +3295,7 @@ class UploadMediaQuery : public Td::ResultHandler {
}
};
class SendScheduledMessageActor : public NetActorOnce {
class SendScheduledMessageActor final : public NetActorOnce {
Promise<Unit> promise_;
DialogId dialog_id_;
@ -3342,7 +3342,7 @@ class SendScheduledMessageActor : public NetActorOnce {
}
};
class EditMessageActor : public NetActorOnce {
class EditMessageActor final : public NetActorOnce {
Promise<int32> promise_;
DialogId dialog_id_;
@ -3431,7 +3431,7 @@ class EditMessageActor : public NetActorOnce {
}
};
class EditInlineMessageQuery : public Td::ResultHandler {
class EditInlineMessageQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -3487,7 +3487,7 @@ class EditInlineMessageQuery : public Td::ResultHandler {
}
};
class SetGameScoreActor : public NetActorOnce {
class SetGameScoreActor final : public NetActorOnce {
Promise<Unit> promise_;
DialogId dialog_id_;
@ -3544,7 +3544,7 @@ class SetGameScoreActor : public NetActorOnce {
}
};
class SetInlineGameScoreQuery : public Td::ResultHandler {
class SetInlineGameScoreQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -3589,7 +3589,7 @@ class SetInlineGameScoreQuery : public Td::ResultHandler {
}
};
class GetGameHighScoresQuery : public Td::ResultHandler {
class GetGameHighScoresQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
DialogId dialog_id_;
int64 random_id_;
@ -3629,7 +3629,7 @@ class GetGameHighScoresQuery : public Td::ResultHandler {
}
};
class GetInlineGameHighScoresQuery : public Td::ResultHandler {
class GetInlineGameHighScoresQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
int64 random_id_;
@ -3667,7 +3667,7 @@ class GetInlineGameHighScoresQuery : public Td::ResultHandler {
}
};
class ForwardMessagesActor : public NetActorOnce {
class ForwardMessagesActor final : public NetActorOnce {
Promise<Unit> promise_;
vector<int64> random_ids_;
DialogId to_dialog_id_;
@ -3773,7 +3773,7 @@ class ForwardMessagesActor : public NetActorOnce {
}
};
class SendScreenshotNotificationQuery : public Td::ResultHandler {
class SendScreenshotNotificationQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
int64 random_id_;
DialogId dialog_id_;
@ -3819,7 +3819,7 @@ class SendScreenshotNotificationQuery : public Td::ResultHandler {
}
};
class SetTypingQuery : public Td::ResultHandler {
class SetTypingQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
DialogId dialog_id_;
@ -3866,7 +3866,7 @@ class SetTypingQuery : public Td::ResultHandler {
}
};
class DeleteMessagesQuery : public Td::ResultHandler {
class DeleteMessagesQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
DialogId dialog_id_;
int32 query_count_;
@ -3929,7 +3929,7 @@ class DeleteMessagesQuery : public Td::ResultHandler {
}
};
class DeleteChannelMessagesQuery : public Td::ResultHandler {
class DeleteChannelMessagesQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
int32 query_count_;
ChannelId channel_id_;
@ -3988,7 +3988,7 @@ class DeleteChannelMessagesQuery : public Td::ResultHandler {
}
};
class DeleteScheduledMessagesQuery : public Td::ResultHandler {
class DeleteScheduledMessagesQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
DialogId dialog_id_;
@ -4027,7 +4027,7 @@ class DeleteScheduledMessagesQuery : public Td::ResultHandler {
}
};
class GetDialogNotifySettingsQuery : public Td::ResultHandler {
class GetDialogNotifySettingsQuery final : public Td::ResultHandler {
DialogId dialog_id_;
public:
@ -4055,7 +4055,7 @@ class GetDialogNotifySettingsQuery : public Td::ResultHandler {
}
};
class GetNotifySettingsExceptionsQuery : public Td::ResultHandler {
class GetNotifySettingsExceptionsQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -4117,7 +4117,7 @@ class GetNotifySettingsExceptionsQuery : public Td::ResultHandler {
}
};
class GetScopeNotifySettingsQuery : public Td::ResultHandler {
class GetScopeNotifySettingsQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
NotificationSettingsScope scope_;
@ -4149,7 +4149,7 @@ class GetScopeNotifySettingsQuery : public Td::ResultHandler {
}
};
class UpdateDialogNotifySettingsQuery : public Td::ResultHandler {
class UpdateDialogNotifySettingsQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
DialogId dialog_id_;
@ -4212,7 +4212,7 @@ class UpdateDialogNotifySettingsQuery : public Td::ResultHandler {
}
};
class UpdateScopeNotifySettingsQuery : public Td::ResultHandler {
class UpdateScopeNotifySettingsQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
NotificationSettingsScope scope_;
@ -4259,7 +4259,7 @@ class UpdateScopeNotifySettingsQuery : public Td::ResultHandler {
}
};
class ResetNotifySettingsQuery : public Td::ResultHandler {
class ResetNotifySettingsQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -4292,7 +4292,7 @@ class ResetNotifySettingsQuery : public Td::ResultHandler {
}
};
class GetPeerSettingsQuery : public Td::ResultHandler {
class GetPeerSettingsQuery final : public Td::ResultHandler {
DialogId dialog_id_;
public:
@ -4320,7 +4320,7 @@ class GetPeerSettingsQuery : public Td::ResultHandler {
}
};
class UpdatePeerSettingsQuery : public Td::ResultHandler {
class UpdatePeerSettingsQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
DialogId dialog_id_;
@ -4370,7 +4370,7 @@ class UpdatePeerSettingsQuery : public Td::ResultHandler {
}
};
class ReportEncryptedSpamQuery : public Td::ResultHandler {
class ReportEncryptedSpamQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
DialogId dialog_id_;
@ -4414,7 +4414,7 @@ class ReportEncryptedSpamQuery : public Td::ResultHandler {
}
};
class ReportPeerQuery : public Td::ResultHandler {
class ReportPeerQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
DialogId dialog_id_;
@ -4463,7 +4463,7 @@ class ReportPeerQuery : public Td::ResultHandler {
}
};
class ReportProfilePhotoQuery : public Td::ResultHandler {
class ReportProfilePhotoQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
DialogId dialog_id_;
FileId file_id_;
@ -4527,7 +4527,7 @@ class ReportProfilePhotoQuery : public Td::ResultHandler {
}
};
class EditPeerFoldersQuery : public Td::ResultHandler {
class EditPeerFoldersQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
DialogId dialog_id_;
@ -4570,7 +4570,7 @@ class EditPeerFoldersQuery : public Td::ResultHandler {
}
};
class GetStatsUrlQuery : public Td::ResultHandler {
class GetStatsUrlQuery final : public Td::ResultHandler {
Promise<td_api::object_ptr<td_api::httpUrl>> promise_;
DialogId dialog_id_;
@ -4606,7 +4606,7 @@ class GetStatsUrlQuery : public Td::ResultHandler {
}
};
class GetChannelDifferenceQuery : public Td::ResultHandler {
class GetChannelDifferenceQuery final : public Td::ResultHandler {
DialogId dialog_id_;
int32 pts_;
int32 limit_;
@ -4647,7 +4647,7 @@ class GetChannelDifferenceQuery : public Td::ResultHandler {
}
};
class ResolveUsernameQuery : public Td::ResultHandler {
class ResolveUsernameQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
string username_;
@ -4686,7 +4686,7 @@ class ResolveUsernameQuery : public Td::ResultHandler {
}
};
class GetChannelAdminLogQuery : public Td::ResultHandler {
class GetChannelAdminLogQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
ChannelId channel_id_;
int64 random_id_;
@ -4733,7 +4733,7 @@ class GetChannelAdminLogQuery : public Td::ResultHandler {
}
};
class MessagesManager::UploadMediaCallback : public FileManager::UploadCallback {
class MessagesManager::UploadMediaCallback final : public FileManager::UploadCallback {
public:
void on_progress(FileId file_id) final {
}
@ -4753,7 +4753,7 @@ class MessagesManager::UploadMediaCallback : public FileManager::UploadCallback
}
};
class MessagesManager::UploadThumbnailCallback : public FileManager::UploadCallback {
class MessagesManager::UploadThumbnailCallback final : public FileManager::UploadCallback {
public:
void on_upload_ok(FileId file_id, tl_object_ptr<telegram_api::InputFile> input_file) final {
send_closure_later(G()->messages_manager(), &MessagesManager::on_upload_thumbnail, file_id, std::move(input_file));
@ -4769,7 +4769,7 @@ class MessagesManager::UploadThumbnailCallback : public FileManager::UploadCallb
}
};
class MessagesManager::UploadDialogPhotoCallback : public FileManager::UploadCallback {
class MessagesManager::UploadDialogPhotoCallback final : public FileManager::UploadCallback {
public:
void on_upload_ok(FileId file_id, tl_object_ptr<telegram_api::InputFile> input_file) final {
send_closure_later(G()->messages_manager(), &MessagesManager::on_upload_dialog_photo, file_id,
@ -4787,7 +4787,7 @@ class MessagesManager::UploadDialogPhotoCallback : public FileManager::UploadCal
}
};
class MessagesManager::UploadImportedMessagesCallback : public FileManager::UploadCallback {
class MessagesManager::UploadImportedMessagesCallback final : public FileManager::UploadCallback {
public:
void on_upload_ok(FileId file_id, tl_object_ptr<telegram_api::InputFile> input_file) final {
send_closure_later(G()->messages_manager(), &MessagesManager::on_upload_imported_messages, file_id,
@ -4805,7 +4805,7 @@ class MessagesManager::UploadImportedMessagesCallback : public FileManager::Uplo
}
};
class MessagesManager::UploadImportedMessageAttachmentCallback : public FileManager::UploadCallback {
class MessagesManager::UploadImportedMessageAttachmentCallback final : public FileManager::UploadCallback {
public:
void on_upload_ok(FileId file_id, tl_object_ptr<telegram_api::InputFile> input_file) final {
send_closure_later(G()->messages_manager(), &MessagesManager::on_upload_imported_message_attachment, file_id,
@ -8500,7 +8500,7 @@ Result<string> MessagesManager::get_login_button_url(FullMessageId full_message_
}
void MessagesManager::load_secret_thumbnail(FileId thumbnail_file_id) {
class Callback : public FileManager::DownloadCallback {
class Callback final : public FileManager::DownloadCallback {
public:
explicit Callback(Promise<> download_promise) : download_promise_(std::move(download_promise)) {
}

View File

@ -89,7 +89,7 @@ class MessageContent;
class MultiSequenceDispatcher;
class Td;
class MessagesManager : public Actor {
class MessagesManager final : public Actor {
public:
// static constexpr int32 MESSAGE_FLAG_IS_UNREAD = 1 << 0;
static constexpr int32 MESSAGE_FLAG_IS_OUT = 1 << 1;
@ -1539,7 +1539,7 @@ class MessagesManager : public Actor {
}
};
class MessagesIterator : public MessagesIteratorBase {
class MessagesIterator final : public MessagesIteratorBase {
public:
MessagesIterator() = default;
@ -1553,7 +1553,7 @@ class MessagesManager : public Actor {
}
};
class MessagesConstIterator : public MessagesIteratorBase {
class MessagesConstIterator final : public MessagesIteratorBase {
public:
MessagesConstIterator() = default;
@ -2988,7 +2988,7 @@ class MessagesManager : public Actor {
being_loaded_secret_thumbnails_; // thumbnail_file_id -> ...
// TTL
class TtlNode : private HeapNode {
class TtlNode final : private HeapNode {
public:
TtlNode(DialogId dialog_id, MessageId message_id, bool by_ttl_period)
: full_message_id_(dialog_id, message_id), by_ttl_period_(by_ttl_period) {

View File

@ -67,7 +67,7 @@ namespace td {
int VERBOSITY_NAME(notifications) = VERBOSITY_NAME(INFO);
class SetContactSignUpNotificationQuery : public Td::ResultHandler {
class SetContactSignUpNotificationQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -95,7 +95,7 @@ class SetContactSignUpNotificationQuery : public Td::ResultHandler {
}
};
class GetContactSignUpNotificationQuery : public Td::ResultHandler {
class GetContactSignUpNotificationQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -288,7 +288,7 @@ void NotificationManager::init() {
}
}
class StateCallback : public StateManager::Callback {
class StateCallback final : public StateManager::Callback {
public:
explicit StateCallback(ActorId<NotificationManager> parent) : parent_(std::move(parent)) {
}

View File

@ -42,7 +42,7 @@ struct BinlogEvent;
class Td;
class NotificationManager : public Actor {
class NotificationManager final : public Actor {
public:
static constexpr int32 MIN_NOTIFICATION_GROUP_COUNT_MAX = 0;
static constexpr int32 MAX_NOTIFICATION_GROUP_COUNT_MAX = 25;

View File

@ -24,7 +24,7 @@
namespace td {
class NotificationTypeMessage : public NotificationType {
class NotificationTypeMessage final : public NotificationType {
bool can_be_delayed() const final {
return message_id_.is_valid() && message_id_.is_server();
}
@ -60,7 +60,7 @@ class NotificationTypeMessage : public NotificationType {
}
};
class NotificationTypeSecretChat : public NotificationType {
class NotificationTypeSecretChat final : public NotificationType {
bool can_be_delayed() const final {
return false;
}
@ -90,7 +90,7 @@ class NotificationTypeSecretChat : public NotificationType {
}
};
class NotificationTypeCall : public NotificationType {
class NotificationTypeCall final : public NotificationType {
bool can_be_delayed() const final {
return false;
}
@ -122,7 +122,7 @@ class NotificationTypeCall : public NotificationType {
}
};
class NotificationTypePushMessage : public NotificationType {
class NotificationTypePushMessage final : public NotificationType {
bool can_be_delayed() const final {
return false;
}

View File

@ -49,7 +49,7 @@ struct TempPasswordState {
}
};
class PasswordManager : public NetQueryCallback {
class PasswordManager final : public NetQueryCallback {
public:
using State = tl_object_ptr<td_api::passwordState>;
using TempState = tl_object_ptr<td_api::temporaryPasswordState>;

View File

@ -31,7 +31,7 @@
namespace td {
class SetBotShippingAnswerQuery : public Td::ResultHandler {
class SetBotShippingAnswerQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -69,7 +69,7 @@ class SetBotShippingAnswerQuery : public Td::ResultHandler {
}
};
class SetBotPreCheckoutAnswerQuery : public Td::ResultHandler {
class SetBotPreCheckoutAnswerQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -259,7 +259,7 @@ static tl_object_ptr<td_api::savedCredentials> convert_saved_credentials(
std::move(saved_credentials->title_));
}
class GetPaymentFormQuery : public Td::ResultHandler {
class GetPaymentFormQuery final : public Td::ResultHandler {
Promise<tl_object_ptr<td_api::paymentForm>> promise_;
DialogId dialog_id_;
@ -322,7 +322,7 @@ class GetPaymentFormQuery : public Td::ResultHandler {
}
};
class ValidateRequestedInfoQuery : public Td::ResultHandler {
class ValidateRequestedInfoQuery final : public Td::ResultHandler {
Promise<tl_object_ptr<td_api::validatedOrderInfo>> promise_;
DialogId dialog_id_;
@ -371,7 +371,7 @@ class ValidateRequestedInfoQuery : public Td::ResultHandler {
}
};
class SendPaymentFormQuery : public Td::ResultHandler {
class SendPaymentFormQuery final : public Td::ResultHandler {
Promise<tl_object_ptr<td_api::paymentResult>> promise_;
DialogId dialog_id_;
@ -440,7 +440,7 @@ class SendPaymentFormQuery : public Td::ResultHandler {
}
};
class GetPaymentReceiptQuery : public Td::ResultHandler {
class GetPaymentReceiptQuery final : public Td::ResultHandler {
Promise<tl_object_ptr<td_api::paymentReceipt>> promise_;
DialogId dialog_id_;
@ -498,7 +498,7 @@ class GetPaymentReceiptQuery : public Td::ResultHandler {
}
};
class GetSavedInfoQuery : public Td::ResultHandler {
class GetSavedInfoQuery final : public Td::ResultHandler {
Promise<tl_object_ptr<td_api::orderInfo>> promise_;
public:
@ -525,7 +525,7 @@ class GetSavedInfoQuery : public Td::ResultHandler {
}
};
class ClearSavedInfoQuery : public Td::ResultHandler {
class ClearSavedInfoQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -559,7 +559,7 @@ class ClearSavedInfoQuery : public Td::ResultHandler {
}
};
class GetBankCardInfoQuery : public Td::ResultHandler {
class GetBankCardInfoQuery final : public Td::ResultHandler {
Promise<td_api::object_ptr<td_api::bankCardInfo>> promise_;
public:

View File

@ -18,7 +18,7 @@
namespace td {
class PhoneNumberManager : public NetActor {
class PhoneNumberManager final : public NetActor {
public:
enum class Type : int32 { ChangePhone, VerifyPhone, ConfirmPhone };
PhoneNumberManager(Type type, ActorShared<> parent);

View File

@ -40,7 +40,7 @@ struct DialogPhoto {
bool has_animation = false;
};
struct ProfilePhoto : public DialogPhoto {
struct ProfilePhoto final : public DialogPhoto {
int64 id = 0;
};
@ -52,7 +52,7 @@ struct PhotoSize {
vector<int32> progressive_sizes;
};
struct AnimationSize : public PhotoSize {
struct AnimationSize final : public PhotoSize {
double main_frame_timestamp = 0.0;
};

View File

@ -65,11 +65,11 @@ struct PhotoSizeSource {
int64 dialog_access_hash = 0;
};
struct DialogPhotoSmall : public DialogPhoto {
struct DialogPhotoSmall final : public DialogPhoto {
using DialogPhoto::DialogPhoto;
};
struct DialogPhotoBig : public DialogPhoto {
struct DialogPhotoBig final : public DialogPhoto {
using DialogPhoto::DialogPhoto;
};
@ -111,16 +111,16 @@ struct PhotoSizeSource {
int32 local_id = 0;
};
struct DialogPhotoSmallLegacy : public DialogPhotoLegacy {
struct DialogPhotoSmallLegacy final : public DialogPhotoLegacy {
using DialogPhotoLegacy::DialogPhotoLegacy;
};
struct DialogPhotoBigLegacy : public DialogPhotoLegacy {
struct DialogPhotoBigLegacy final : public DialogPhotoLegacy {
using DialogPhotoLegacy::DialogPhotoLegacy;
};
// for legacy sticker set thumbnails
struct StickerSetThumbnailLegacy : public StickerSetThumbnail {
struct StickerSetThumbnailLegacy final : public StickerSetThumbnail {
StickerSetThumbnailLegacy() = default;
StickerSetThumbnailLegacy(int64 sticker_set_id, int64 sticker_set_access_hash, int64 volume_id, int32 local_id)
: StickerSetThumbnail(sticker_set_id, sticker_set_access_hash), volume_id(volume_id), local_id(local_id) {
@ -131,7 +131,7 @@ struct PhotoSizeSource {
};
// for sticker set thumbnails identified by version
struct StickerSetThumbnailVersion : public StickerSetThumbnail {
struct StickerSetThumbnailVersion final : public StickerSetThumbnail {
StickerSetThumbnailVersion() = default;
StickerSetThumbnailVersion(int64 sticker_set_id, int64 sticker_set_access_hash, int32 version)
: StickerSetThumbnail(sticker_set_id, sticker_set_access_hash), version(version) {

View File

@ -48,7 +48,7 @@
namespace td {
class GetPollResultsQuery : public Td::ResultHandler {
class GetPollResultsQuery final : public Td::ResultHandler {
Promise<tl_object_ptr<telegram_api::Updates>> promise_;
PollId poll_id_;
DialogId dialog_id_;
@ -89,7 +89,7 @@ class GetPollResultsQuery : public Td::ResultHandler {
}
};
class GetPollVotersQuery : public Td::ResultHandler {
class GetPollVotersQuery final : public Td::ResultHandler {
Promise<tl_object_ptr<telegram_api::messages_votesList>> promise_;
PollId poll_id_;
DialogId dialog_id_;
@ -137,7 +137,7 @@ class GetPollVotersQuery : public Td::ResultHandler {
}
};
class SetPollAnswerActor : public NetActorOnce {
class SetPollAnswerActor final : public NetActorOnce {
Promise<tl_object_ptr<telegram_api::Updates>> promise_;
DialogId dialog_id_;
@ -179,7 +179,7 @@ class SetPollAnswerActor : public NetActorOnce {
}
};
class StopPollActor : public NetActorOnce {
class StopPollActor final : public NetActorOnce {
Promise<Unit> promise_;
DialogId dialog_id_;
@ -247,7 +247,7 @@ PollManager::PollManager(Td *td, ActorShared<> parent) : td_(td), parent_(std::m
}
void PollManager::start_up() {
class StateCallback : public StateManager::Callback {
class StateCallback final : public StateManager::Callback {
public:
explicit StateCallback(ActorId<PollManager> parent) : parent_(std::move(parent)) {
}

View File

@ -33,7 +33,7 @@ struct BinlogEvent;
class Td;
class PollManager : public Actor {
class PollManager final : public Actor {
public:
PollManager(Td *td, ActorShared<> parent);

View File

@ -22,7 +22,7 @@
namespace td {
class PrivacyManager : public NetQueryCallback {
class PrivacyManager final : public NetQueryCallback {
public:
explicit PrivacyManager(ActorShared<> parent) : parent_(std::move(parent)) {
}

View File

@ -19,7 +19,7 @@
namespace td {
// combines identical queries into one request
class QueryCombiner : public Actor {
class QueryCombiner final : public Actor {
public:
QueryCombiner(Slice name, double min_delay);

View File

@ -46,7 +46,7 @@ namespace td {
class BinlogInterface;
class NetQueryCreator;
class SecretChatActor : public NetQueryCallback {
class SecretChatActor final : public NetQueryCallback {
public:
enum : int32 {
DEFAULT_LAYER = 73,

View File

@ -82,7 +82,7 @@ void SecretChatsManager::start_up() {
return;
}
class StateCallback : public StateManager::Callback {
class StateCallback final : public StateManager::Callback {
public:
explicit StateCallback(ActorId<SecretChatsManager> parent) : parent_(std::move(parent)) {
}
@ -291,7 +291,7 @@ ActorId<SecretChatActor> SecretChatsManager::create_chat_actor(int32 id) {
}
unique_ptr<SecretChatActor::Context> SecretChatsManager::make_secret_chat_context(int32 id) {
class Context : public SecretChatActor::Context {
class Context final : public SecretChatActor::Context {
public:
Context(int32 id, ActorShared<SecretChatsManager> parent, unique_ptr<SecretChatDb> secret_chat_db)
: secret_chat_id_(SecretChatId(id)), parent_(std::move(parent)), secret_chat_db_(std::move(secret_chat_db)) {

View File

@ -27,7 +27,7 @@ namespace td {
struct BinlogEvent;
class SecretChatsManager : public Actor {
class SecretChatsManager final : public Actor {
public:
explicit SecretChatsManager(ActorShared<> parent);

View File

@ -29,7 +29,7 @@
namespace td {
class GetSecureValue : public NetQueryCallback {
class GetSecureValue final : public NetQueryCallback {
public:
GetSecureValue(ActorShared<SecureManager> parent, std::string password, SecureValueType type,
Promise<SecureValueWithCredentials> promise);
@ -50,7 +50,7 @@ class GetSecureValue : public NetQueryCallback {
void on_result(NetQueryPtr query) final;
};
class GetAllSecureValues : public NetQueryCallback {
class GetAllSecureValues final : public NetQueryCallback {
public:
GetAllSecureValues(ActorShared<SecureManager> parent, std::string password, Promise<TdApiSecureValues> promise);
@ -69,7 +69,7 @@ class GetAllSecureValues : public NetQueryCallback {
void on_result(NetQueryPtr query) final;
};
class SetSecureValue : public NetQueryCallback {
class SetSecureValue final : public NetQueryCallback {
public:
SetSecureValue(ActorShared<SecureManager> parent, string password, SecureValue secure_value,
Promise<SecureValueWithCredentials> promise);
@ -94,7 +94,7 @@ class SetSecureValue : public NetQueryCallback {
enum class State : int32 { WaitSecret, WaitSetValue } state_ = State::WaitSecret;
class UploadCallback : public FileManager::UploadCallback {
class UploadCallback final : public FileManager::UploadCallback {
public:
UploadCallback(ActorId<SetSecureValue> actor_id, uint32 upload_generation);
@ -128,7 +128,7 @@ class SetSecureValue : public NetQueryCallback {
void merge(FileManager *file_manager, FileId file_id, EncryptedSecureFile &encrypted_file);
};
class SetSecureValueErrorsQuery : public Td::ResultHandler {
class SetSecureValueErrorsQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -652,7 +652,7 @@ void SetSecureValue::merge(FileManager *file_manager, FileId file_id, EncryptedS
LOG_IF(ERROR, status.is_error()) << status.error();
}
class DeleteSecureValue : public NetQueryCallback {
class DeleteSecureValue final : public NetQueryCallback {
public:
DeleteSecureValue(ActorShared<SecureManager> parent, SecureValueType type, Promise<Unit> promise)
: parent_(std::move(parent)), type_(std::move(type)), promise_(std::move(promise)) {
@ -681,7 +681,7 @@ class DeleteSecureValue : public NetQueryCallback {
}
};
class GetPassportAuthorizationForm : public NetQueryCallback {
class GetPassportAuthorizationForm final : public NetQueryCallback {
public:
GetPassportAuthorizationForm(ActorShared<SecureManager> parent, UserId bot_user_id, string scope, string public_key,
Promise<telegram_api::object_ptr<telegram_api::account_authorizationForm>> promise)
@ -752,7 +752,7 @@ void SecureManager::get_secure_value(std::string password, SecureValueType type,
.release();
}
class GetPassportConfig : public NetQueryCallback {
class GetPassportConfig final : public NetQueryCallback {
public:
GetPassportConfig(ActorShared<SecureManager> parent, string country_code,
Promise<td_api::object_ptr<td_api::text>> promise)

View File

@ -34,7 +34,7 @@ using TdApiSecureValues = td_api::object_ptr<td_api::passportElements>;
using TdApiSecureValuesWithErrors = td_api::object_ptr<td_api::passportElementsWithErrors>;
using TdApiAuthorizationForm = td_api::object_ptr<td_api::passportAuthorizationForm>;
class SecureManager : public NetQueryCallback {
class SecureManager final : public NetQueryCallback {
public:
explicit SecureManager(ActorShared<> parent);

View File

@ -90,7 +90,7 @@ BufferSlice gen_random_prefix(int64 data_size) {
return buff;
}
class FileDataView : public DataView {
class FileDataView final : public DataView {
public:
FileDataView(FileFd &fd, int64 size);

View File

@ -74,7 +74,7 @@ class DataView {
virtual ~DataView() = default;
};
class BufferSliceDataView : public DataView {
class BufferSliceDataView final : public DataView {
public:
explicit BufferSliceDataView(BufferSlice buffer_slice);
int64 size() const final;
@ -84,7 +84,7 @@ class BufferSliceDataView : public DataView {
BufferSlice buffer_slice_;
};
class ConcatDataView : public DataView {
class ConcatDataView final : public DataView {
public:
ConcatDataView(const DataView &left, const DataView &right);
int64 size() const final;
@ -161,7 +161,7 @@ class Decryptor {
};
// Encryption
class Encryptor : public DataView {
class Encryptor final : public DataView {
public:
Encryptor(AesCbcState aes_cbc_state, const DataView &data_view);
int64 size() const final;

View File

@ -18,7 +18,7 @@
namespace td {
class SequenceDispatcher : public NetQueryCallback {
class SequenceDispatcher final : public NetQueryCallback {
public:
class Parent : public Actor {
public:
@ -73,7 +73,7 @@ class SequenceDispatcher : public NetQueryCallback {
void tear_down() final;
};
class MultiSequenceDispatcher : public SequenceDispatcher::Parent {
class MultiSequenceDispatcher final : public SequenceDispatcher::Parent {
public:
void send_with_callback(NetQueryPtr query, ActorShared<NetQueryCallback> callback, uint64 sequence_id);

View File

@ -61,7 +61,7 @@
namespace td {
class GetAllStickersQuery : public Td::ResultHandler {
class GetAllStickersQuery final : public Td::ResultHandler {
bool is_masks_;
public:
@ -96,7 +96,7 @@ class GetAllStickersQuery : public Td::ResultHandler {
}
};
class SearchStickersQuery : public Td::ResultHandler {
class SearchStickersQuery final : public Td::ResultHandler {
string emoji_;
public:
@ -124,7 +124,7 @@ class SearchStickersQuery : public Td::ResultHandler {
}
};
class GetEmojiKeywordsLanguageQuery : public Td::ResultHandler {
class GetEmojiKeywordsLanguageQuery final : public Td::ResultHandler {
Promise<vector<string>> promise_;
public:
@ -151,7 +151,7 @@ class GetEmojiKeywordsLanguageQuery : public Td::ResultHandler {
}
};
class GetEmojiKeywordsQuery : public Td::ResultHandler {
class GetEmojiKeywordsQuery final : public Td::ResultHandler {
Promise<telegram_api::object_ptr<telegram_api::emojiKeywordsDifference>> promise_;
public:
@ -177,7 +177,7 @@ class GetEmojiKeywordsQuery : public Td::ResultHandler {
}
};
class GetEmojiKeywordsDifferenceQuery : public Td::ResultHandler {
class GetEmojiKeywordsDifferenceQuery final : public Td::ResultHandler {
Promise<telegram_api::object_ptr<telegram_api::emojiKeywordsDifference>> promise_;
public:
@ -205,7 +205,7 @@ class GetEmojiKeywordsDifferenceQuery : public Td::ResultHandler {
}
};
class GetEmojiUrlQuery : public Td::ResultHandler {
class GetEmojiUrlQuery final : public Td::ResultHandler {
Promise<telegram_api::object_ptr<telegram_api::emojiURL>> promise_;
public:
@ -231,7 +231,7 @@ class GetEmojiUrlQuery : public Td::ResultHandler {
}
};
class GetArchivedStickerSetsQuery : public Td::ResultHandler {
class GetArchivedStickerSetsQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
StickerSetId offset_sticker_set_id_;
bool is_masks_;
@ -275,7 +275,7 @@ class GetArchivedStickerSetsQuery : public Td::ResultHandler {
}
};
class GetFeaturedStickerSetsQuery : public Td::ResultHandler {
class GetFeaturedStickerSetsQuery final : public Td::ResultHandler {
public:
void send(int32 hash) {
LOG(INFO) << "Get trending sticker sets with hash " << hash;
@ -298,7 +298,7 @@ class GetFeaturedStickerSetsQuery : public Td::ResultHandler {
}
};
class GetOldFeaturedStickerSetsQuery : public Td::ResultHandler {
class GetOldFeaturedStickerSetsQuery final : public Td::ResultHandler {
int32 offset_;
int32 limit_;
uint32 generation_;
@ -328,7 +328,7 @@ class GetOldFeaturedStickerSetsQuery : public Td::ResultHandler {
}
};
class GetAttachedStickerSetsQuery : public Td::ResultHandler {
class GetAttachedStickerSetsQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
FileId file_id_;
string file_reference_;
@ -377,7 +377,7 @@ class GetAttachedStickerSetsQuery : public Td::ResultHandler {
}
};
class GetRecentStickersQuery : public Td::ResultHandler {
class GetRecentStickersQuery final : public Td::ResultHandler {
bool is_repair_ = false;
bool is_attached_ = false;
@ -414,7 +414,7 @@ class GetRecentStickersQuery : public Td::ResultHandler {
}
};
class SaveRecentStickerQuery : public Td::ResultHandler {
class SaveRecentStickerQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
FileId file_id_;
string file_reference_;
@ -483,7 +483,7 @@ class SaveRecentStickerQuery : public Td::ResultHandler {
}
};
class ClearRecentStickersQuery : public Td::ResultHandler {
class ClearRecentStickersQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
bool is_attached_;
@ -527,7 +527,7 @@ class ClearRecentStickersQuery : public Td::ResultHandler {
}
};
class GetFavedStickersQuery : public Td::ResultHandler {
class GetFavedStickersQuery final : public Td::ResultHandler {
bool is_repair_ = false;
public:
@ -555,7 +555,7 @@ class GetFavedStickersQuery : public Td::ResultHandler {
}
};
class FaveStickerQuery : public Td::ResultHandler {
class FaveStickerQuery final : public Td::ResultHandler {
FileId file_id_;
string file_reference_;
bool unsave_ = false;
@ -616,7 +616,7 @@ class FaveStickerQuery : public Td::ResultHandler {
}
};
class ReorderStickerSetsQuery : public Td::ResultHandler {
class ReorderStickerSetsQuery final : public Td::ResultHandler {
bool is_masks_;
public:
@ -650,7 +650,7 @@ class ReorderStickerSetsQuery : public Td::ResultHandler {
}
};
class GetStickerSetQuery : public Td::ResultHandler {
class GetStickerSetQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
StickerSetId sticker_set_id_;
string sticker_set_name_;
@ -699,7 +699,7 @@ class GetStickerSetQuery : public Td::ResultHandler {
}
};
class ReloadSpecialStickerSetQuery : public Td::ResultHandler {
class ReloadSpecialStickerSetQuery final : public Td::ResultHandler {
SpecialStickerSetType type_;
public:
@ -729,7 +729,7 @@ class ReloadSpecialStickerSetQuery : public Td::ResultHandler {
}
};
class SearchStickerSetsQuery : public Td::ResultHandler {
class SearchStickerSetsQuery final : public Td::ResultHandler {
string query_;
public:
@ -758,7 +758,7 @@ class SearchStickerSetsQuery : public Td::ResultHandler {
}
};
class InstallStickerSetQuery : public Td::ResultHandler {
class InstallStickerSetQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
StickerSetId set_id_;
bool is_archived_;
@ -791,7 +791,7 @@ class InstallStickerSetQuery : public Td::ResultHandler {
}
};
class UninstallStickerSetQuery : public Td::ResultHandler {
class UninstallStickerSetQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
StickerSetId set_id_;
@ -826,7 +826,7 @@ class UninstallStickerSetQuery : public Td::ResultHandler {
}
};
class ReadFeaturedStickerSetsQuery : public Td::ResultHandler {
class ReadFeaturedStickerSetsQuery final : public Td::ResultHandler {
public:
void send(vector<StickerSetId> sticker_set_ids) {
LOG(INFO) << "Read trending sticker sets " << format::as_array(sticker_set_ids);
@ -852,7 +852,7 @@ class ReadFeaturedStickerSetsQuery : public Td::ResultHandler {
}
};
class UploadStickerFileQuery : public Td::ResultHandler {
class UploadStickerFileQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
FileId file_id_;
bool was_uploaded_ = false;
@ -900,7 +900,7 @@ class UploadStickerFileQuery : public Td::ResultHandler {
}
};
class SuggestStickerSetShortNameQuery : public Td::ResultHandler {
class SuggestStickerSetShortNameQuery final : public Td::ResultHandler {
Promise<string> promise_;
public:
@ -928,7 +928,7 @@ class SuggestStickerSetShortNameQuery : public Td::ResultHandler {
}
};
class CheckStickerSetShortNameQuery : public Td::ResultHandler {
class CheckStickerSetShortNameQuery final : public Td::ResultHandler {
Promise<bool> promise_;
public:
@ -953,7 +953,7 @@ class CheckStickerSetShortNameQuery : public Td::ResultHandler {
}
};
class CreateNewStickerSetQuery : public Td::ResultHandler {
class CreateNewStickerSetQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -999,7 +999,7 @@ class CreateNewStickerSetQuery : public Td::ResultHandler {
}
};
class AddStickerToSetQuery : public Td::ResultHandler {
class AddStickerToSetQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -1029,7 +1029,7 @@ class AddStickerToSetQuery : public Td::ResultHandler {
}
};
class SetStickerSetThumbnailQuery : public Td::ResultHandler {
class SetStickerSetThumbnailQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -1059,7 +1059,7 @@ class SetStickerSetThumbnailQuery : public Td::ResultHandler {
}
};
class SetStickerPositionQuery : public Td::ResultHandler {
class SetStickerPositionQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -1089,7 +1089,7 @@ class SetStickerPositionQuery : public Td::ResultHandler {
}
};
class DeleteStickerFromSetQuery : public Td::ResultHandler {
class DeleteStickerFromSetQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -1167,7 +1167,7 @@ class StickersManager::StickerSetListLogEvent {
}
};
class StickersManager::UploadStickerFileCallback : public FileManager::UploadCallback {
class StickersManager::UploadStickerFileCallback final : public FileManager::UploadCallback {
public:
void on_upload_ok(FileId file_id, tl_object_ptr<telegram_api::InputFile> input_file) final {
send_closure_later(G()->stickers_manager(), &StickersManager::on_upload_sticker_file, file_id,

View File

@ -38,7 +38,7 @@ namespace td {
class Td;
class StickersManager : public Actor {
class StickersManager final : public Actor {
public:
static constexpr int64 GREAT_MINDS_SET_ID = 1842540969984001;

View File

@ -29,7 +29,7 @@ struct DatabaseStats {
tl_object_ptr<td_api::databaseStatistics> get_database_statistics_object() const;
};
class StorageManager : public Actor {
class StorageManager final : public Actor {
public:
StorageManager(ActorShared<> parent, int32 scheduler_id);
void get_storage_stats(bool need_all_files, int32 dialog_limit, Promise<FileStats> promise);

View File

@ -170,7 +170,7 @@ void Td::ResultHandler::send_query(NetQueryPtr query) {
td->send(std::move(query));
}
class GetPromoDataQuery : public Td::ResultHandler {
class GetPromoDataQuery final : public Td::ResultHandler {
Promise<telegram_api::object_ptr<telegram_api::help_PromoData>> promise_;
public:
@ -197,7 +197,7 @@ class GetPromoDataQuery : public Td::ResultHandler {
}
};
class GetRecentMeUrlsQuery : public Td::ResultHandler {
class GetRecentMeUrlsQuery final : public Td::ResultHandler {
Promise<tl_object_ptr<td_api::tMeUrls>> promise_;
public:
@ -296,7 +296,7 @@ class GetRecentMeUrlsQuery : public Td::ResultHandler {
}
};
class SendCustomRequestQuery : public Td::ResultHandler {
class SendCustomRequestQuery final : public Td::ResultHandler {
Promise<td_api::object_ptr<td_api::customRequestResult>> promise_;
public:
@ -324,7 +324,7 @@ class SendCustomRequestQuery : public Td::ResultHandler {
}
};
class AnswerCustomQueryQuery : public Td::ResultHandler {
class AnswerCustomQueryQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -354,7 +354,7 @@ class AnswerCustomQueryQuery : public Td::ResultHandler {
}
};
class SetBotUpdatesStatusQuery : public Td::ResultHandler {
class SetBotUpdatesStatusQuery final : public Td::ResultHandler {
public:
void send(int32 pending_update_count, const string &error_message) {
send_query(
@ -379,7 +379,7 @@ class SetBotUpdatesStatusQuery : public Td::ResultHandler {
}
};
class UpdateStatusQuery : public Td::ResultHandler {
class UpdateStatusQuery final : public Td::ResultHandler {
bool is_offline_;
public:
@ -410,7 +410,7 @@ class UpdateStatusQuery : public Td::ResultHandler {
}
};
class GetInviteTextQuery : public Td::ResultHandler {
class GetInviteTextQuery final : public Td::ResultHandler {
Promise<string> promise_;
public:
@ -436,7 +436,7 @@ class GetInviteTextQuery : public Td::ResultHandler {
}
};
class GetDeepLinkInfoQuery : public Td::ResultHandler {
class GetDeepLinkInfoQuery final : public Td::ResultHandler {
Promise<td_api::object_ptr<td_api::deepLinkInfo>> promise_;
public:
@ -497,7 +497,7 @@ class GetDeepLinkInfoQuery : public Td::ResultHandler {
}
};
class SaveAppLogQuery : public Td::ResultHandler {
class SaveAppLogQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:
@ -528,7 +528,7 @@ class SaveAppLogQuery : public Td::ResultHandler {
}
};
class TestQuery : public Td::ResultHandler {
class TestQuery final : public Td::ResultHandler {
public:
explicit TestQuery(uint64 request_id) : request_id_(request_id) {
}
@ -556,7 +556,7 @@ class TestQuery : public Td::ResultHandler {
uint64 request_id_;
};
class TestProxyRequest : public RequestOnceActor {
class TestProxyRequest final : public RequestOnceActor {
Proxy proxy_;
int16 dc_id_;
double timeout_;
@ -604,7 +604,7 @@ class TestProxyRequest : public RequestOnceActor {
if (r_data.is_error()) {
return promise_.set_error(r_data.move_as_error());
}
class HandshakeContext : public mtproto::AuthKeyHandshakeContext {
class HandshakeContext final : public mtproto::AuthKeyHandshakeContext {
public:
DhCallback *get_dh_callback() final {
return nullptr;
@ -664,7 +664,7 @@ class TestProxyRequest : public RequestOnceActor {
}
};
class GetMeRequest : public RequestActor<> {
class GetMeRequest final : public RequestActor<> {
UserId user_id_;
void do_run(Promise<Unit> &&promise) final {
@ -680,7 +680,7 @@ class GetMeRequest : public RequestActor<> {
}
};
class GetUserRequest : public RequestActor<> {
class GetUserRequest final : public RequestActor<> {
UserId user_id_;
void do_run(Promise<Unit> &&promise) final {
@ -698,7 +698,7 @@ class GetUserRequest : public RequestActor<> {
}
};
class GetUserFullInfoRequest : public RequestActor<> {
class GetUserFullInfoRequest final : public RequestActor<> {
UserId user_id_;
void do_run(Promise<Unit> &&promise) final {
@ -715,7 +715,7 @@ class GetUserFullInfoRequest : public RequestActor<> {
}
};
class GetGroupRequest : public RequestActor<> {
class GetGroupRequest final : public RequestActor<> {
ChatId chat_id_;
void do_run(Promise<Unit> &&promise) final {
@ -733,7 +733,7 @@ class GetGroupRequest : public RequestActor<> {
}
};
class GetGroupFullInfoRequest : public RequestActor<> {
class GetGroupFullInfoRequest final : public RequestActor<> {
ChatId chat_id_;
void do_run(Promise<Unit> &&promise) final {
@ -750,7 +750,7 @@ class GetGroupFullInfoRequest : public RequestActor<> {
}
};
class GetSupergroupRequest : public RequestActor<> {
class GetSupergroupRequest final : public RequestActor<> {
ChannelId channel_id_;
void do_run(Promise<Unit> &&promise) final {
@ -768,7 +768,7 @@ class GetSupergroupRequest : public RequestActor<> {
}
};
class GetSupergroupFullInfoRequest : public RequestActor<> {
class GetSupergroupFullInfoRequest final : public RequestActor<> {
ChannelId channel_id_;
void do_run(Promise<Unit> &&promise) final {
@ -785,7 +785,7 @@ class GetSupergroupFullInfoRequest : public RequestActor<> {
}
};
class GetSecretChatRequest : public RequestActor<> {
class GetSecretChatRequest final : public RequestActor<> {
SecretChatId secret_chat_id_;
void do_run(Promise<Unit> &&promise) final {
@ -802,7 +802,7 @@ class GetSecretChatRequest : public RequestActor<> {
}
};
class GetChatRequest : public RequestActor<> {
class GetChatRequest final : public RequestActor<> {
DialogId dialog_id_;
bool dialog_found_ = false;
@ -826,7 +826,7 @@ class GetChatRequest : public RequestActor<> {
}
};
class GetChatFilterRequest : public RequestActor<> {
class GetChatFilterRequest final : public RequestActor<> {
DialogFilterId dialog_filter_id_;
void do_run(Promise<Unit> &&promise) final {
@ -844,7 +844,7 @@ class GetChatFilterRequest : public RequestActor<> {
}
};
class GetChatsRequest : public RequestActor<> {
class GetChatsRequest final : public RequestActor<> {
DialogListId dialog_list_id_;
DialogDate offset_;
int32 limit_;
@ -872,7 +872,7 @@ class GetChatsRequest : public RequestActor<> {
}
};
class SearchPublicChatRequest : public RequestActor<> {
class SearchPublicChatRequest final : public RequestActor<> {
string username_;
DialogId dialog_id_;
@ -892,7 +892,7 @@ class SearchPublicChatRequest : public RequestActor<> {
}
};
class SearchPublicChatsRequest : public RequestActor<> {
class SearchPublicChatsRequest final : public RequestActor<> {
string query_;
vector<DialogId> dialog_ids_;
@ -911,7 +911,7 @@ class SearchPublicChatsRequest : public RequestActor<> {
}
};
class SearchChatsRequest : public RequestActor<> {
class SearchChatsRequest final : public RequestActor<> {
string query_;
int32 limit_;
@ -931,7 +931,7 @@ class SearchChatsRequest : public RequestActor<> {
}
};
class SearchChatsOnServerRequest : public RequestActor<> {
class SearchChatsOnServerRequest final : public RequestActor<> {
string query_;
int32 limit_;
@ -951,7 +951,7 @@ class SearchChatsOnServerRequest : public RequestActor<> {
}
};
class GetGroupsInCommonRequest : public RequestActor<> {
class GetGroupsInCommonRequest final : public RequestActor<> {
UserId user_id_;
DialogId offset_dialog_id_;
int32 limit_;
@ -973,7 +973,7 @@ class GetGroupsInCommonRequest : public RequestActor<> {
}
};
class GetCreatedPublicChatsRequest : public RequestActor<> {
class GetCreatedPublicChatsRequest final : public RequestActor<> {
vector<DialogId> dialog_ids_;
PublicDialogType type_;
@ -991,7 +991,7 @@ class GetCreatedPublicChatsRequest : public RequestActor<> {
}
};
class GetSuitableDiscussionChatsRequest : public RequestActor<> {
class GetSuitableDiscussionChatsRequest final : public RequestActor<> {
vector<DialogId> dialog_ids_;
void do_run(Promise<Unit> &&promise) final {
@ -1007,7 +1007,7 @@ class GetSuitableDiscussionChatsRequest : public RequestActor<> {
}
};
class GetInactiveSupergroupChatsRequest : public RequestActor<> {
class GetInactiveSupergroupChatsRequest final : public RequestActor<> {
vector<DialogId> dialog_ids_;
void do_run(Promise<Unit> &&promise) final {
@ -1023,7 +1023,7 @@ class GetInactiveSupergroupChatsRequest : public RequestActor<> {
}
};
class GetMessageRequest : public RequestOnceActor {
class GetMessageRequest final : public RequestOnceActor {
FullMessageId full_message_id_;
void do_run(Promise<Unit> &&promise) final {
@ -1040,7 +1040,7 @@ class GetMessageRequest : public RequestOnceActor {
}
};
class GetRepliedMessageRequest : public RequestOnceActor {
class GetRepliedMessageRequest final : public RequestOnceActor {
DialogId dialog_id_;
MessageId message_id_;
@ -1062,7 +1062,7 @@ class GetRepliedMessageRequest : public RequestOnceActor {
}
};
class GetMessageThreadRequest : public RequestActor<MessagesManager::MessageThreadInfo> {
class GetMessageThreadRequest final : public RequestActor<MessagesManager::MessageThreadInfo> {
DialogId dialog_id_;
MessageId message_id_;
@ -1090,7 +1090,7 @@ class GetMessageThreadRequest : public RequestActor<MessagesManager::MessageThre
}
};
class GetChatPinnedMessageRequest : public RequestOnceActor {
class GetChatPinnedMessageRequest final : public RequestOnceActor {
DialogId dialog_id_;
MessageId pinned_message_id_;
@ -1110,7 +1110,7 @@ class GetChatPinnedMessageRequest : public RequestOnceActor {
}
};
class GetCallbackQueryMessageRequest : public RequestOnceActor {
class GetCallbackQueryMessageRequest final : public RequestOnceActor {
DialogId dialog_id_;
MessageId message_id_;
int64 callback_query_id_;
@ -1133,7 +1133,7 @@ class GetCallbackQueryMessageRequest : public RequestOnceActor {
}
};
class GetMessagesRequest : public RequestOnceActor {
class GetMessagesRequest final : public RequestOnceActor {
DialogId dialog_id_;
vector<MessageId> message_ids_;
@ -1153,7 +1153,7 @@ class GetMessagesRequest : public RequestOnceActor {
}
};
class GetMessageEmbeddingCodeRequest : public RequestActor<> {
class GetMessageEmbeddingCodeRequest final : public RequestActor<> {
FullMessageId full_message_id_;
bool for_group_;
@ -1176,7 +1176,7 @@ class GetMessageEmbeddingCodeRequest : public RequestActor<> {
}
};
class GetMessageLinkInfoRequest : public RequestActor<MessageLinkInfo> {
class GetMessageLinkInfoRequest final : public RequestActor<MessageLinkInfo> {
string url_;
MessageLinkInfo message_link_info_;
@ -1203,7 +1203,7 @@ class GetMessageLinkInfoRequest : public RequestActor<MessageLinkInfo> {
}
};
class EditMessageTextRequest : public RequestOnceActor {
class EditMessageTextRequest final : public RequestOnceActor {
FullMessageId full_message_id_;
tl_object_ptr<td_api::ReplyMarkup> reply_markup_;
tl_object_ptr<td_api::InputMessageContent> input_message_content_;
@ -1228,7 +1228,7 @@ class EditMessageTextRequest : public RequestOnceActor {
}
};
class EditMessageLiveLocationRequest : public RequestOnceActor {
class EditMessageLiveLocationRequest final : public RequestOnceActor {
FullMessageId full_message_id_;
tl_object_ptr<td_api::ReplyMarkup> reply_markup_;
tl_object_ptr<td_api::location> location_;
@ -1257,7 +1257,7 @@ class EditMessageLiveLocationRequest : public RequestOnceActor {
}
};
class EditMessageMediaRequest : public RequestOnceActor {
class EditMessageMediaRequest final : public RequestOnceActor {
FullMessageId full_message_id_;
tl_object_ptr<td_api::ReplyMarkup> reply_markup_;
tl_object_ptr<td_api::InputMessageContent> input_message_content_;
@ -1282,7 +1282,7 @@ class EditMessageMediaRequest : public RequestOnceActor {
}
};
class EditMessageCaptionRequest : public RequestOnceActor {
class EditMessageCaptionRequest final : public RequestOnceActor {
FullMessageId full_message_id_;
tl_object_ptr<td_api::ReplyMarkup> reply_markup_;
tl_object_ptr<td_api::formattedText> caption_;
@ -1307,7 +1307,7 @@ class EditMessageCaptionRequest : public RequestOnceActor {
}
};
class EditMessageReplyMarkupRequest : public RequestOnceActor {
class EditMessageReplyMarkupRequest final : public RequestOnceActor {
FullMessageId full_message_id_;
tl_object_ptr<td_api::ReplyMarkup> reply_markup_;
@ -1328,7 +1328,7 @@ class EditMessageReplyMarkupRequest : public RequestOnceActor {
}
};
class SetGameScoreRequest : public RequestOnceActor {
class SetGameScoreRequest final : public RequestOnceActor {
FullMessageId full_message_id_;
bool edit_message_;
UserId user_id_;
@ -1356,7 +1356,7 @@ class SetGameScoreRequest : public RequestOnceActor {
}
};
class GetGameHighScoresRequest : public RequestOnceActor {
class GetGameHighScoresRequest final : public RequestOnceActor {
FullMessageId full_message_id_;
UserId user_id_;
@ -1380,7 +1380,7 @@ class GetGameHighScoresRequest : public RequestOnceActor {
}
};
class GetInlineGameHighScoresRequest : public RequestOnceActor {
class GetInlineGameHighScoresRequest final : public RequestOnceActor {
string inline_message_id_;
UserId user_id_;
@ -1404,7 +1404,7 @@ class GetInlineGameHighScoresRequest : public RequestOnceActor {
}
};
class GetChatHistoryRequest : public RequestActor<> {
class GetChatHistoryRequest final : public RequestActor<> {
DialogId dialog_id_;
MessageId from_message_id_;
int32 offset_;
@ -1437,7 +1437,7 @@ class GetChatHistoryRequest : public RequestActor<> {
}
};
class GetMessageThreadHistoryRequest : public RequestActor<> {
class GetMessageThreadHistoryRequest final : public RequestActor<> {
DialogId dialog_id_;
MessageId message_id_;
MessageId from_message_id_;
@ -1470,7 +1470,7 @@ class GetMessageThreadHistoryRequest : public RequestActor<> {
}
};
class SearchChatMessagesRequest : public RequestActor<> {
class SearchChatMessagesRequest final : public RequestActor<> {
DialogId dialog_id_;
string query_;
td_api::object_ptr<td_api::MessageSender> sender_;
@ -1520,7 +1520,7 @@ class SearchChatMessagesRequest : public RequestActor<> {
}
};
class SearchSecretMessagesRequest : public RequestActor<> {
class SearchSecretMessagesRequest final : public RequestActor<> {
DialogId dialog_id_;
string query_;
string offset_;
@ -1552,7 +1552,7 @@ class SearchSecretMessagesRequest : public RequestActor<> {
}
};
class SearchMessagesRequest : public RequestActor<> {
class SearchMessagesRequest final : public RequestActor<> {
FolderId folder_id_;
bool ignore_folder_id_;
string query_;
@ -1605,7 +1605,7 @@ class SearchMessagesRequest : public RequestActor<> {
}
};
class SearchCallMessagesRequest : public RequestActor<> {
class SearchCallMessagesRequest final : public RequestActor<> {
MessageId from_message_id_;
int32 limit_;
bool only_missed_;
@ -1633,7 +1633,7 @@ class SearchCallMessagesRequest : public RequestActor<> {
}
};
class SearchChatRecentLocationMessagesRequest : public RequestActor<> {
class SearchChatRecentLocationMessagesRequest final : public RequestActor<> {
DialogId dialog_id_;
int32 limit_;
int64 random_id_;
@ -1655,7 +1655,7 @@ class SearchChatRecentLocationMessagesRequest : public RequestActor<> {
}
};
class GetActiveLiveLocationMessagesRequest : public RequestActor<> {
class GetActiveLiveLocationMessagesRequest final : public RequestActor<> {
vector<FullMessageId> full_message_ids_;
void do_run(Promise<Unit> &&promise) final {
@ -1672,7 +1672,7 @@ class GetActiveLiveLocationMessagesRequest : public RequestActor<> {
}
};
class GetChatMessageByDateRequest : public RequestOnceActor {
class GetChatMessageByDateRequest final : public RequestOnceActor {
DialogId dialog_id_;
int32 date_;
@ -1692,7 +1692,7 @@ class GetChatMessageByDateRequest : public RequestOnceActor {
}
};
class GetChatMessageCountRequest : public RequestActor<> {
class GetChatMessageCountRequest final : public RequestActor<> {
DialogId dialog_id_;
MessageSearchFilter filter_;
bool return_local_;
@ -1720,7 +1720,7 @@ class GetChatMessageCountRequest : public RequestActor<> {
}
};
class GetChatScheduledMessagesRequest : public RequestActor<> {
class GetChatScheduledMessagesRequest final : public RequestActor<> {
DialogId dialog_id_;
vector<MessageId> message_ids_;
@ -1741,7 +1741,7 @@ class GetChatScheduledMessagesRequest : public RequestActor<> {
}
};
class GetMessagePublicForwardsRequest : public RequestActor<> {
class GetMessagePublicForwardsRequest final : public RequestActor<> {
FullMessageId full_message_id_;
string offset_;
int32 limit_;
@ -1769,7 +1769,7 @@ class GetMessagePublicForwardsRequest : public RequestActor<> {
}
};
class GetWebPagePreviewRequest : public RequestOnceActor {
class GetWebPagePreviewRequest final : public RequestOnceActor {
td_api::object_ptr<td_api::formattedText> text_;
int64 request_id_ = 0;
@ -1788,7 +1788,7 @@ class GetWebPagePreviewRequest : public RequestOnceActor {
}
};
class GetWebPageInstantViewRequest : public RequestActor<> {
class GetWebPageInstantViewRequest final : public RequestActor<> {
string url_;
bool force_full_;
@ -1810,7 +1810,7 @@ class GetWebPageInstantViewRequest : public RequestActor<> {
}
};
class CreateChatRequest : public RequestActor<> {
class CreateChatRequest final : public RequestActor<> {
DialogId dialog_id_;
bool force_;
@ -1828,7 +1828,7 @@ class CreateChatRequest : public RequestActor<> {
}
};
class CreateNewGroupChatRequest : public RequestActor<> {
class CreateNewGroupChatRequest final : public RequestActor<> {
vector<UserId> user_ids_;
string title_;
int64 random_id_;
@ -1853,7 +1853,7 @@ class CreateNewGroupChatRequest : public RequestActor<> {
}
};
class CreateNewSecretChatRequest : public RequestActor<SecretChatId> {
class CreateNewSecretChatRequest final : public RequestActor<SecretChatId> {
UserId user_id_;
SecretChatId secret_chat_id_;
@ -1888,7 +1888,7 @@ class CreateNewSecretChatRequest : public RequestActor<SecretChatId> {
}
};
class CreateNewSupergroupChatRequest : public RequestActor<> {
class CreateNewSupergroupChatRequest final : public RequestActor<> {
string title_;
bool is_megagroup_;
string description_;
@ -1922,7 +1922,7 @@ class CreateNewSupergroupChatRequest : public RequestActor<> {
}
};
class UpgradeGroupChatToSupergroupChatRequest : public RequestActor<> {
class UpgradeGroupChatToSupergroupChatRequest final : public RequestActor<> {
string title_;
DialogId dialog_id_;
@ -1943,7 +1943,7 @@ class UpgradeGroupChatToSupergroupChatRequest : public RequestActor<> {
}
};
class GetChatMemberRequest : public RequestActor<> {
class GetChatMemberRequest final : public RequestActor<> {
DialogId dialog_id_;
DialogId participant_dialog_id_;
int64 random_id_;
@ -1974,7 +1974,7 @@ class GetChatMemberRequest : public RequestActor<> {
}
};
class GetChatAdministratorsRequest : public RequestActor<> {
class GetChatAdministratorsRequest final : public RequestActor<> {
DialogId dialog_id_;
vector<DialogAdministrator> administrators_;
@ -1998,7 +1998,7 @@ class GetChatAdministratorsRequest : public RequestActor<> {
}
};
class CheckChatInviteLinkRequest : public RequestActor<> {
class CheckChatInviteLinkRequest final : public RequestActor<> {
string invite_link_;
void do_run(Promise<Unit> &&promise) final {
@ -2017,7 +2017,7 @@ class CheckChatInviteLinkRequest : public RequestActor<> {
}
};
class JoinChatByInviteLinkRequest : public RequestActor<DialogId> {
class JoinChatByInviteLinkRequest final : public RequestActor<DialogId> {
string invite_link_;
DialogId dialog_id_;
@ -2046,7 +2046,7 @@ class JoinChatByInviteLinkRequest : public RequestActor<DialogId> {
}
};
class GetChatEventLogRequest : public RequestOnceActor {
class GetChatEventLogRequest final : public RequestOnceActor {
DialogId dialog_id_;
string query_;
int64 from_event_id_;
@ -2079,7 +2079,7 @@ class GetChatEventLogRequest : public RequestOnceActor {
}
};
class GetBlockedMessageSendersRequest : public RequestActor<> {
class GetBlockedMessageSendersRequest final : public RequestActor<> {
int32 offset_;
int32 limit_;
int64 random_id_;
@ -2104,7 +2104,7 @@ class GetBlockedMessageSendersRequest : public RequestActor<> {
}
};
class ImportContactsRequest : public RequestActor<> {
class ImportContactsRequest final : public RequestActor<> {
vector<tl_object_ptr<td_api::contact>> contacts_;
int64 random_id_;
@ -2132,7 +2132,7 @@ class ImportContactsRequest : public RequestActor<> {
}
};
class SearchContactsRequest : public RequestActor<> {
class SearchContactsRequest final : public RequestActor<> {
string query_;
int32 limit_;
@ -2152,7 +2152,7 @@ class SearchContactsRequest : public RequestActor<> {
}
};
class RemoveContactsRequest : public RequestActor<> {
class RemoveContactsRequest final : public RequestActor<> {
vector<UserId> user_ids_;
void do_run(Promise<Unit> &&promise) final {
@ -2166,7 +2166,7 @@ class RemoveContactsRequest : public RequestActor<> {
}
};
class GetImportedContactCountRequest : public RequestActor<> {
class GetImportedContactCountRequest final : public RequestActor<> {
int32 imported_contact_count_ = 0;
void do_run(Promise<Unit> &&promise) final {
@ -2182,7 +2182,7 @@ class GetImportedContactCountRequest : public RequestActor<> {
}
};
class ChangeImportedContactsRequest : public RequestActor<> {
class ChangeImportedContactsRequest final : public RequestActor<> {
vector<tl_object_ptr<td_api::contact>> contacts_;
size_t contacts_size_;
int64 random_id_;
@ -2216,7 +2216,7 @@ class ChangeImportedContactsRequest : public RequestActor<> {
}
};
class GetRecentInlineBotsRequest : public RequestActor<> {
class GetRecentInlineBotsRequest final : public RequestActor<> {
vector<UserId> user_ids_;
void do_run(Promise<Unit> &&promise) final {
@ -2232,7 +2232,7 @@ class GetRecentInlineBotsRequest : public RequestActor<> {
}
};
class GetUserProfilePhotosRequest : public RequestActor<> {
class GetUserProfilePhotosRequest final : public RequestActor<> {
UserId user_id_;
int32 offset_;
int32 limit_;
@ -2259,7 +2259,7 @@ class GetUserProfilePhotosRequest : public RequestActor<> {
}
};
class GetChatNotificationSettingsExceptionsRequest : public RequestActor<> {
class GetChatNotificationSettingsExceptionsRequest final : public RequestActor<> {
NotificationSettingsScope scope_;
bool filter_scope_;
bool compare_sound_;
@ -2286,7 +2286,7 @@ class GetChatNotificationSettingsExceptionsRequest : public RequestActor<> {
}
};
class GetScopeNotificationSettingsRequest : public RequestActor<> {
class GetScopeNotificationSettingsRequest final : public RequestActor<> {
NotificationSettingsScope scope_;
const ScopeNotificationSettings *notification_settings_ = nullptr;
@ -2306,7 +2306,7 @@ class GetScopeNotificationSettingsRequest : public RequestActor<> {
}
};
class GetStickersRequest : public RequestActor<> {
class GetStickersRequest final : public RequestActor<> {
string emoji_;
int32 limit_;
@ -2327,7 +2327,7 @@ class GetStickersRequest : public RequestActor<> {
}
};
class SearchStickersRequest : public RequestActor<> {
class SearchStickersRequest final : public RequestActor<> {
string emoji_;
int32 limit_;
@ -2347,7 +2347,7 @@ class SearchStickersRequest : public RequestActor<> {
}
};
class GetInstalledStickerSetsRequest : public RequestActor<> {
class GetInstalledStickerSetsRequest final : public RequestActor<> {
bool is_masks_;
vector<StickerSetId> sticker_set_ids_;
@ -2366,7 +2366,7 @@ class GetInstalledStickerSetsRequest : public RequestActor<> {
}
};
class GetArchivedStickerSetsRequest : public RequestActor<> {
class GetArchivedStickerSetsRequest final : public RequestActor<> {
bool is_masks_;
StickerSetId offset_sticker_set_id_;
int32 limit_;
@ -2393,7 +2393,7 @@ class GetArchivedStickerSetsRequest : public RequestActor<> {
}
};
class GetTrendingStickerSetsRequest : public RequestActor<> {
class GetTrendingStickerSetsRequest final : public RequestActor<> {
std::pair<int32, vector<StickerSetId>> sticker_set_ids_;
int32 offset_;
int32 limit_;
@ -2413,7 +2413,7 @@ class GetTrendingStickerSetsRequest : public RequestActor<> {
}
};
class GetAttachedStickerSetsRequest : public RequestActor<> {
class GetAttachedStickerSetsRequest final : public RequestActor<> {
FileId file_id_;
vector<StickerSetId> sticker_set_ids_;
@ -2432,7 +2432,7 @@ class GetAttachedStickerSetsRequest : public RequestActor<> {
}
};
class GetStickerSetRequest : public RequestActor<> {
class GetStickerSetRequest final : public RequestActor<> {
StickerSetId set_id_;
StickerSetId sticker_set_id_;
@ -2452,7 +2452,7 @@ class GetStickerSetRequest : public RequestActor<> {
}
};
class SearchStickerSetRequest : public RequestActor<> {
class SearchStickerSetRequest final : public RequestActor<> {
string name_;
StickerSetId sticker_set_id_;
@ -2472,7 +2472,7 @@ class SearchStickerSetRequest : public RequestActor<> {
}
};
class SearchInstalledStickerSetsRequest : public RequestActor<> {
class SearchInstalledStickerSetsRequest final : public RequestActor<> {
bool is_masks_;
string query_;
int32 limit_;
@ -2494,7 +2494,7 @@ class SearchInstalledStickerSetsRequest : public RequestActor<> {
}
};
class SearchStickerSetsRequest : public RequestActor<> {
class SearchStickerSetsRequest final : public RequestActor<> {
string query_;
vector<StickerSetId> sticker_set_ids_;
@ -2513,7 +2513,7 @@ class SearchStickerSetsRequest : public RequestActor<> {
}
};
class ChangeStickerSetRequest : public RequestOnceActor {
class ChangeStickerSetRequest final : public RequestOnceActor {
StickerSetId set_id_;
bool is_installed_;
bool is_archived_;
@ -2532,7 +2532,7 @@ class ChangeStickerSetRequest : public RequestOnceActor {
}
};
class UploadStickerFileRequest : public RequestOnceActor {
class UploadStickerFileRequest final : public RequestOnceActor {
UserId user_id_;
tl_object_ptr<td_api::InputSticker> sticker_;
@ -2553,7 +2553,7 @@ class UploadStickerFileRequest : public RequestOnceActor {
}
};
class CreateNewStickerSetRequest : public RequestOnceActor {
class CreateNewStickerSetRequest final : public RequestOnceActor {
UserId user_id_;
string title_;
string name_;
@ -2587,7 +2587,7 @@ class CreateNewStickerSetRequest : public RequestOnceActor {
}
};
class AddStickerToSetRequest : public RequestOnceActor {
class AddStickerToSetRequest final : public RequestOnceActor {
UserId user_id_;
string name_;
tl_object_ptr<td_api::InputSticker> sticker_;
@ -2614,7 +2614,7 @@ class AddStickerToSetRequest : public RequestOnceActor {
}
};
class SetStickerSetThumbnailRequest : public RequestOnceActor {
class SetStickerSetThumbnailRequest final : public RequestOnceActor {
UserId user_id_;
string name_;
tl_object_ptr<td_api::InputFile> thumbnail_;
@ -2641,7 +2641,7 @@ class SetStickerSetThumbnailRequest : public RequestOnceActor {
}
};
class GetRecentStickersRequest : public RequestActor<> {
class GetRecentStickersRequest final : public RequestActor<> {
bool is_attached_;
vector<FileId> sticker_ids_;
@ -2660,7 +2660,7 @@ class GetRecentStickersRequest : public RequestActor<> {
}
};
class AddRecentStickerRequest : public RequestActor<> {
class AddRecentStickerRequest final : public RequestActor<> {
bool is_attached_;
tl_object_ptr<td_api::InputFile> input_file_;
@ -2676,7 +2676,7 @@ class AddRecentStickerRequest : public RequestActor<> {
}
};
class RemoveRecentStickerRequest : public RequestActor<> {
class RemoveRecentStickerRequest final : public RequestActor<> {
bool is_attached_;
tl_object_ptr<td_api::InputFile> input_file_;
@ -2692,7 +2692,7 @@ class RemoveRecentStickerRequest : public RequestActor<> {
}
};
class ClearRecentStickersRequest : public RequestActor<> {
class ClearRecentStickersRequest final : public RequestActor<> {
bool is_attached_;
void do_run(Promise<Unit> &&promise) final {
@ -2706,7 +2706,7 @@ class ClearRecentStickersRequest : public RequestActor<> {
}
};
class GetFavoriteStickersRequest : public RequestActor<> {
class GetFavoriteStickersRequest final : public RequestActor<> {
vector<FileId> sticker_ids_;
void do_run(Promise<Unit> &&promise) final {
@ -2722,7 +2722,7 @@ class GetFavoriteStickersRequest : public RequestActor<> {
}
};
class AddFavoriteStickerRequest : public RequestOnceActor {
class AddFavoriteStickerRequest final : public RequestOnceActor {
tl_object_ptr<td_api::InputFile> input_file_;
void do_run(Promise<Unit> &&promise) final {
@ -2736,7 +2736,7 @@ class AddFavoriteStickerRequest : public RequestOnceActor {
}
};
class RemoveFavoriteStickerRequest : public RequestOnceActor {
class RemoveFavoriteStickerRequest final : public RequestOnceActor {
tl_object_ptr<td_api::InputFile> input_file_;
void do_run(Promise<Unit> &&promise) final {
@ -2750,7 +2750,7 @@ class RemoveFavoriteStickerRequest : public RequestOnceActor {
}
};
class GetStickerEmojisRequest : public RequestActor<> {
class GetStickerEmojisRequest final : public RequestActor<> {
tl_object_ptr<td_api::InputFile> input_file_;
vector<string> emojis_;
@ -2770,7 +2770,7 @@ class GetStickerEmojisRequest : public RequestActor<> {
}
};
class SearchEmojisRequest : public RequestActor<> {
class SearchEmojisRequest final : public RequestActor<> {
string text_;
bool exact_match_;
vector<string> input_language_codes_;
@ -2797,7 +2797,7 @@ class SearchEmojisRequest : public RequestActor<> {
}
};
class GetEmojiSuggestionsUrlRequest : public RequestOnceActor {
class GetEmojiSuggestionsUrlRequest final : public RequestOnceActor {
string language_code_;
int64 random_id_;
@ -2816,7 +2816,7 @@ class GetEmojiSuggestionsUrlRequest : public RequestOnceActor {
}
};
class GetSavedAnimationsRequest : public RequestActor<> {
class GetSavedAnimationsRequest final : public RequestActor<> {
vector<FileId> animation_ids_;
void do_run(Promise<Unit> &&promise) final {
@ -2834,7 +2834,7 @@ class GetSavedAnimationsRequest : public RequestActor<> {
}
};
class AddSavedAnimationRequest : public RequestOnceActor {
class AddSavedAnimationRequest final : public RequestOnceActor {
tl_object_ptr<td_api::InputFile> input_file_;
void do_run(Promise<Unit> &&promise) final {
@ -2848,7 +2848,7 @@ class AddSavedAnimationRequest : public RequestOnceActor {
}
};
class RemoveSavedAnimationRequest : public RequestOnceActor {
class RemoveSavedAnimationRequest final : public RequestOnceActor {
tl_object_ptr<td_api::InputFile> input_file_;
void do_run(Promise<Unit> &&promise) final {
@ -2862,7 +2862,7 @@ class RemoveSavedAnimationRequest : public RequestOnceActor {
}
};
class GetInlineQueryResultsRequest : public RequestOnceActor {
class GetInlineQueryResultsRequest final : public RequestOnceActor {
UserId bot_user_id_;
DialogId dialog_id_;
Location user_location_;
@ -2893,7 +2893,7 @@ class GetInlineQueryResultsRequest : public RequestOnceActor {
}
};
class GetCallbackQueryAnswerRequest : public RequestOnceActor {
class GetCallbackQueryAnswerRequest final : public RequestOnceActor {
FullMessageId full_message_id_;
tl_object_ptr<td_api::CallbackQueryPayload> payload_;
@ -2925,7 +2925,7 @@ class GetCallbackQueryAnswerRequest : public RequestOnceActor {
}
};
class GetSupportUserRequest : public RequestActor<> {
class GetSupportUserRequest final : public RequestActor<> {
UserId user_id_;
void do_run(Promise<Unit> &&promise) final {
@ -2941,7 +2941,7 @@ class GetSupportUserRequest : public RequestActor<> {
}
};
class GetBackgroundsRequest : public RequestOnceActor {
class GetBackgroundsRequest final : public RequestOnceActor {
bool for_dark_theme_;
void do_run(Promise<Unit> &&promise) final {
@ -2958,7 +2958,7 @@ class GetBackgroundsRequest : public RequestOnceActor {
}
};
class SearchBackgroundRequest : public RequestActor<> {
class SearchBackgroundRequest final : public RequestActor<> {
string name_;
std::pair<BackgroundId, BackgroundType> background_;
@ -2978,7 +2978,7 @@ class SearchBackgroundRequest : public RequestActor<> {
}
};
class SetBackgroundRequest : public RequestActor<> {
class SetBackgroundRequest final : public RequestActor<> {
td_api::object_ptr<td_api::InputBackground> input_background_;
td_api::object_ptr<td_api::BackgroundType> background_type_;
bool for_dark_theme_ = false;
@ -4056,7 +4056,7 @@ void Td::close_impl(bool destroy_flag) {
send_closure_later(actor_id(this), &Td::dec_request_actor_refcnt); // remove guard
}
class Td::DownloadFileCallback : public FileManager::DownloadCallback {
class Td::DownloadFileCallback final : public FileManager::DownloadCallback {
public:
void on_progress(FileId file_id) final {
}
@ -4070,7 +4070,7 @@ class Td::DownloadFileCallback : public FileManager::DownloadCallback {
}
};
class Td::UploadFileCallback : public FileManager::UploadCallback {
class Td::UploadFileCallback final : public FileManager::UploadCallback {
public:
void on_progress(FileId file_id) final {
}
@ -4246,7 +4246,7 @@ Status Td::init(DbKey key) {
void Td::init_options_and_network() {
VLOG(td_init) << "Create StateManager";
class StateManagerCallback : public StateManager::Callback {
class StateManagerCallback final : public StateManager::Callback {
public:
explicit StateManagerCallback(ActorShared<Td> td) : td_(std::move(td)) {
}
@ -4298,7 +4298,7 @@ void Td::init_options_and_network() {
G()->set_config_manager(config_manager_.get());
VLOG(td_init) << "Set ConfigShared callback";
class ConfigSharedCallback : public ConfigShared::Callback {
class ConfigSharedCallback final : public ConfigShared::Callback {
public:
void on_option_updated(const string &name, const string &value) const final {
send_closure(G()->td(), &Td::on_config_option_updated, name);
@ -4357,7 +4357,7 @@ void Td::init_file_manager() {
download_file_callback_ = std::make_shared<DownloadFileCallback>();
upload_file_callback_ = std::make_shared<UploadFileCallback>();
class FileManagerContext : public FileManager::Context {
class FileManagerContext final : public FileManager::Context {
public:
explicit FileManagerContext(Td *td) : td_(td) {
}

View File

@ -17,7 +17,7 @@
namespace td {
class GetTermsOfServiceUpdateQuery : public Td::ResultHandler {
class GetTermsOfServiceUpdateQuery final : public Td::ResultHandler {
Promise<std::pair<int32, TermsOfService>> promise_;
public:
@ -58,7 +58,7 @@ class GetTermsOfServiceUpdateQuery : public Td::ResultHandler {
}
};
class AcceptTermsOfServiceQuery : public Td::ResultHandler {
class AcceptTermsOfServiceQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
public:

View File

@ -22,7 +22,7 @@
namespace td {
class TopDialogManager : public NetQueryCallback {
class TopDialogManager final : public NetQueryCallback {
public:
explicit TopDialogManager(ActorShared<> parent) : parent_(std::move(parent)) {
}

View File

@ -86,7 +86,7 @@ class OnUpdate {
}
};
class GetUpdatesStateQuery : public Td::ResultHandler {
class GetUpdatesStateQuery final : public Td::ResultHandler {
Promise<tl_object_ptr<telegram_api::updates_state>> promise_;
public:
@ -112,7 +112,7 @@ class GetUpdatesStateQuery : public Td::ResultHandler {
}
};
class PingServerQuery : public Td::ResultHandler {
class PingServerQuery final : public Td::ResultHandler {
Promise<tl_object_ptr<telegram_api::updates_state>> promise_;
public:
@ -138,7 +138,7 @@ class PingServerQuery : public Td::ResultHandler {
}
};
class GetDifferenceQuery : public Td::ResultHandler {
class GetDifferenceQuery final : public Td::ResultHandler {
Promise<tl_object_ptr<telegram_api::updates_Difference>> promise_;
public:

View File

@ -33,7 +33,7 @@ extern int VERBOSITY_NAME(get_difference);
class Td;
class dummyUpdate : public telegram_api::Update {
class dummyUpdate final : public telegram_api::Update {
public:
static constexpr int32 ID = 1234567891;
int32 get_id() const final {
@ -54,7 +54,7 @@ class dummyUpdate : public telegram_api::Update {
}
};
class updateSentMessage : public telegram_api::Update {
class updateSentMessage final : public telegram_api::Update {
public:
int64 random_id_;
MessageId message_id_;
@ -88,7 +88,7 @@ class updateSentMessage : public telegram_api::Update {
}
};
class UpdatesManager : public Actor {
class UpdatesManager final : public Actor {
public:
UpdatesManager(Td *td, ActorShared<> parent);

View File

@ -432,7 +432,7 @@ class RelatedArticle {
}
};
class WebPageBlockTitle : public WebPageBlock {
class WebPageBlockTitle final : public WebPageBlock {
RichText title;
public:
@ -466,7 +466,7 @@ class WebPageBlockTitle : public WebPageBlock {
}
};
class WebPageBlockSubtitle : public WebPageBlock {
class WebPageBlockSubtitle final : public WebPageBlock {
RichText subtitle;
public:
@ -499,7 +499,7 @@ class WebPageBlockSubtitle : public WebPageBlock {
}
};
class WebPageBlockAuthorDate : public WebPageBlock {
class WebPageBlockAuthorDate final : public WebPageBlock {
RichText author;
int32 date = 0;
@ -535,7 +535,7 @@ class WebPageBlockAuthorDate : public WebPageBlock {
}
};
class WebPageBlockHeader : public WebPageBlock {
class WebPageBlockHeader final : public WebPageBlock {
RichText header;
public:
@ -568,7 +568,7 @@ class WebPageBlockHeader : public WebPageBlock {
}
};
class WebPageBlockSubheader : public WebPageBlock {
class WebPageBlockSubheader final : public WebPageBlock {
RichText subheader;
public:
@ -601,7 +601,7 @@ class WebPageBlockSubheader : public WebPageBlock {
}
};
class WebPageBlockKicker : public WebPageBlock {
class WebPageBlockKicker final : public WebPageBlock {
RichText kicker;
public:
@ -634,7 +634,7 @@ class WebPageBlockKicker : public WebPageBlock {
}
};
class WebPageBlockParagraph : public WebPageBlock {
class WebPageBlockParagraph final : public WebPageBlock {
RichText text;
public:
@ -667,7 +667,7 @@ class WebPageBlockParagraph : public WebPageBlock {
}
};
class WebPageBlockPreformatted : public WebPageBlock {
class WebPageBlockPreformatted final : public WebPageBlock {
RichText text;
string language;
@ -703,7 +703,7 @@ class WebPageBlockPreformatted : public WebPageBlock {
}
};
class WebPageBlockFooter : public WebPageBlock {
class WebPageBlockFooter final : public WebPageBlock {
RichText footer;
public:
@ -736,7 +736,7 @@ class WebPageBlockFooter : public WebPageBlock {
}
};
class WebPageBlockDivider : public WebPageBlock {
class WebPageBlockDivider final : public WebPageBlock {
public:
Type get_type() const final {
return Type::Divider;
@ -758,7 +758,7 @@ class WebPageBlockDivider : public WebPageBlock {
}
};
class WebPageBlockAnchor : public WebPageBlock {
class WebPageBlockAnchor final : public WebPageBlock {
string name;
public:
@ -793,7 +793,7 @@ class WebPageBlockAnchor : public WebPageBlock {
}
};
class WebPageBlockList : public WebPageBlock {
class WebPageBlockList final : public WebPageBlock {
public:
struct Item {
string label;
@ -883,7 +883,7 @@ class WebPageBlockList : public WebPageBlock {
}
};
class WebPageBlockBlockQuote : public WebPageBlock {
class WebPageBlockBlockQuote final : public WebPageBlock {
RichText text;
RichText credit;
@ -921,7 +921,7 @@ class WebPageBlockBlockQuote : public WebPageBlock {
}
};
class WebPageBlockPullQuote : public WebPageBlock {
class WebPageBlockPullQuote final : public WebPageBlock {
RichText text;
RichText credit;
@ -959,7 +959,7 @@ class WebPageBlockPullQuote : public WebPageBlock {
}
};
class WebPageBlockAnimation : public WebPageBlock {
class WebPageBlockAnimation final : public WebPageBlock {
FileId animation_file_id;
WebPageBlockCaption caption;
bool need_autoplay = false;
@ -1025,7 +1025,7 @@ class WebPageBlockAnimation : public WebPageBlock {
}
};
class WebPageBlockPhoto : public WebPageBlock {
class WebPageBlockPhoto final : public WebPageBlock {
Photo photo;
WebPageBlockCaption caption;
string url;
@ -1075,7 +1075,7 @@ class WebPageBlockPhoto : public WebPageBlock {
}
};
class WebPageBlockVideo : public WebPageBlock {
class WebPageBlockVideo final : public WebPageBlock {
FileId video_file_id;
WebPageBlockCaption caption;
bool need_autoplay = false;
@ -1144,7 +1144,7 @@ class WebPageBlockVideo : public WebPageBlock {
}
};
class WebPageBlockCover : public WebPageBlock {
class WebPageBlockCover final : public WebPageBlock {
unique_ptr<WebPageBlock> cover;
public:
@ -1177,7 +1177,7 @@ class WebPageBlockCover : public WebPageBlock {
}
};
class WebPageBlockEmbedded : public WebPageBlock {
class WebPageBlockEmbedded final : public WebPageBlock {
string url;
string html;
Photo poster_photo;
@ -1245,7 +1245,7 @@ class WebPageBlockEmbedded : public WebPageBlock {
}
};
class WebPageBlockEmbeddedPost : public WebPageBlock {
class WebPageBlockEmbeddedPost final : public WebPageBlock {
string url;
string author;
Photo author_photo;
@ -1306,7 +1306,7 @@ class WebPageBlockEmbeddedPost : public WebPageBlock {
}
};
class WebPageBlockCollage : public WebPageBlock {
class WebPageBlockCollage final : public WebPageBlock {
vector<unique_ptr<WebPageBlock>> page_blocks;
WebPageBlockCaption caption;
@ -1347,7 +1347,7 @@ class WebPageBlockCollage : public WebPageBlock {
}
};
class WebPageBlockSlideshow : public WebPageBlock {
class WebPageBlockSlideshow final : public WebPageBlock {
vector<unique_ptr<WebPageBlock>> page_blocks;
WebPageBlockCaption caption;
@ -1388,7 +1388,7 @@ class WebPageBlockSlideshow : public WebPageBlock {
}
};
class WebPageBlockChatLink : public WebPageBlock {
class WebPageBlockChatLink final : public WebPageBlock {
string title;
DialogPhoto photo;
string username;
@ -1429,7 +1429,7 @@ class WebPageBlockChatLink : public WebPageBlock {
}
};
class WebPageBlockAudio : public WebPageBlock {
class WebPageBlockAudio final : public WebPageBlock {
FileId audio_file_id;
WebPageBlockCaption caption;
@ -1498,7 +1498,7 @@ class WebPageBlockAudio : public WebPageBlock {
}
};
class WebPageBlockTable : public WebPageBlock {
class WebPageBlockTable final : public WebPageBlock {
RichText title;
vector<vector<WebPageBlockTableCell>> cells;
bool is_bordered = false;
@ -1556,7 +1556,7 @@ class WebPageBlockTable : public WebPageBlock {
}
};
class WebPageBlockDetails : public WebPageBlock {
class WebPageBlockDetails final : public WebPageBlock {
RichText header;
vector<unique_ptr<WebPageBlock>> page_blocks;
bool is_open;
@ -1604,7 +1604,7 @@ class WebPageBlockDetails : public WebPageBlock {
}
};
class WebPageBlockRelatedArticles : public WebPageBlock {
class WebPageBlockRelatedArticles final : public WebPageBlock {
RichText header;
vector<RelatedArticle> related_articles;
@ -1652,7 +1652,7 @@ class WebPageBlockRelatedArticles : public WebPageBlock {
}
};
class WebPageBlockMap : public WebPageBlock {
class WebPageBlockMap final : public WebPageBlock {
Location location;
int32 zoom = 0;
Dimensions dimensions;
@ -1696,7 +1696,7 @@ class WebPageBlockMap : public WebPageBlock {
}
};
class WebPageBlockVoiceNote : public WebPageBlock {
class WebPageBlockVoiceNote final : public WebPageBlock {
FileId voice_note_file_id;
WebPageBlockCaption caption;

View File

@ -53,7 +53,7 @@
namespace td {
class GetWebPagePreviewQuery : public Td::ResultHandler {
class GetWebPagePreviewQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
int64 request_id_;
string url_;
@ -92,7 +92,7 @@ class GetWebPagePreviewQuery : public Td::ResultHandler {
}
};
class GetWebPageQuery : public Td::ResultHandler {
class GetWebPageQuery final : public Td::ResultHandler {
Promise<Unit> promise_;
WebPageId web_page_id_;
string url_;

View File

@ -33,7 +33,7 @@ struct BinlogEvent;
class Td;
class WebPagesManager : public Actor {
class WebPagesManager final : public Actor {
public:
WebPagesManager(Td *td, ActorShared<> parent);

View File

@ -190,7 +190,7 @@ static char **tg_cli_completion(const char *text, int start, int end) {
}
#endif
class CliLog : public LogInterface {
class CliLog final : public LogInterface {
void do_append(int log_level, CSlice slice) final {
#ifdef USE_READLINE
deactivate_readline();
@ -915,7 +915,7 @@ class CliClient final : public Actor {
}
LOG(WARNING) << "Creating new TD " << name << " with generation " << generation_ + 1;
class TdCallbackImpl : public TdCallback {
class TdCallbackImpl final : public TdCallback {
public:
TdCallbackImpl(CliClient *client, uint64 generation) : client_(client), generation_(generation) {
}
@ -4594,7 +4594,7 @@ void main(int argc, char **argv) {
ConcurrentScheduler scheduler;
scheduler.init(3);
class CreateClient : public Actor {
class CreateClient final : public Actor {
public:
CreateClient(ConcurrentScheduler *scheduler, bool use_test_dc, bool get_chat_list, bool disable_network,
int32 api_id, std::string api_hash)

View File

@ -57,9 +57,9 @@ Status init_file_db(SqliteDb &db, int32 version) {
return Status::OK();
}
class FileDb : public FileDbInterface {
class FileDb final : public FileDbInterface {
public:
class FileDbActor : public Actor {
class FileDbActor final : public Actor {
public:
FileDbActor(FileDbId current_pmc_id, std::shared_ptr<SqliteKeyValueSafe> file_kv_safe)
: current_pmc_id_(current_pmc_id), file_kv_safe_(std::move(file_kv_safe)) {

Some files were not shown because too many files have changed in this diff Show More