diff --git a/example/ios/README.md b/example/ios/README.md index 168f0328d..121a4a3e2 100644 --- a/example/ios/README.md +++ b/example/ios/README.md @@ -39,6 +39,6 @@ This may take a while, because TDLib will be built about 10 times. Resulting library for iOS will work on any architecture (armv7, armv7s, arm64) and even on a simulator. We use [CMake/iOS.cmake](https://github.com/tdlib/td/blob/master/CMake/iOS.cmake) toolchain, other toolchains may work too. -Built libraries will be store in `tdjson` directory. +Built libraries will be stored in `tdjson` directory. Documentation for all available classes and methods can be found at https://core.telegram.org/tdlib/docs. diff --git a/td/telegram/AnimationsManager.cpp b/td/telegram/AnimationsManager.cpp index 5501f40a4..51d8bab77 100644 --- a/td/telegram/AnimationsManager.cpp +++ b/td/telegram/AnimationsManager.cpp @@ -17,11 +17,11 @@ #include "td/telegram/Global.h" #include "td/telegram/logevent/LogEvent.h" #include "td/telegram/misc.h" -#include "td/telegram/SecretChatActor.h" #include "td/telegram/secret_api.h" +#include "td/telegram/SecretChatActor.h" #include "td/telegram/Td.h" -#include "td/telegram/TdDb.h" #include "td/telegram/td_api.h" +#include "td/telegram/TdDb.h" #include "td/telegram/telegram_api.h" #include "td/actor/PromiseFuture.h" diff --git a/td/telegram/BackgroundType.h b/td/telegram/BackgroundType.h index c2ecf72cf..e9be88e36 100644 --- a/td/telegram/BackgroundType.h +++ b/td/telegram/BackgroundType.h @@ -10,6 +10,7 @@ #include "td/telegram/telegram_api.h" #include "td/utils/common.h" +#include "td/utils/Slice.h" #include "td/utils/Status.h" #include "td/utils/StringBuilder.h" diff --git a/td/telegram/Client.cpp b/td/telegram/Client.cpp index 9b764209b..3b533784f 100644 --- a/td/telegram/Client.cpp +++ b/td/telegram/Client.cpp @@ -21,6 +21,7 @@ #include "td/utils/MpscPollableQueue.h" #include "td/utils/port/RwMutex.h" #include "td/utils/port/thread.h" +#include "td/utils/Slice.h" #include #include diff --git a/td/telegram/Client.h b/td/telegram/Client.h index d54b1e377..e811b5475 100644 --- a/td/telegram/Client.h +++ b/td/telegram/Client.h @@ -253,7 +253,7 @@ class ClientManager final { * None of the TDLib methods can be called from the callback. * By default the callback is not set. * - * \param[in] max_verbosity_level Maximum verbosity level of messages for which the callback will be called. + * \param[in] max_verbosity_level The maximum verbosity level of messages for which the callback will be called. * \param[in] callback Callback that will be called when a message is added to the internal TDLib log. * Pass nullptr to remove the callback. */ diff --git a/td/telegram/ClientDotNet.cpp b/td/telegram/ClientDotNet.cpp index 0ea8742e0..57d3dc934 100644 --- a/td/telegram/ClientDotNet.cpp +++ b/td/telegram/ClientDotNet.cpp @@ -121,7 +121,7 @@ public: /// Sets the callback that will be called when a message is added to the internal TDLib log. /// None of the TDLib methods can be called from the callback. /// - /// Maximum verbosity level of messages for which the callback will be called. + /// The maximum verbosity level of messages for which the callback will be called. /// Callback that will be called when a message is added to the internal TDLib log. /// Pass null to remove the callback. static void SetLogMessageCallback(std::int32_t max_verbosity_level, LogMessageCallback^ callback) { diff --git a/td/telegram/DialogInviteLink.cpp b/td/telegram/DialogInviteLink.cpp index d64e4d975..714e480d9 100644 --- a/td/telegram/DialogInviteLink.cpp +++ b/td/telegram/DialogInviteLink.cpp @@ -10,7 +10,6 @@ #include "td/telegram/LinkManager.h" #include "td/utils/logging.h" -#include "td/utils/misc.h" namespace td { diff --git a/td/telegram/GroupCallVideoPayload.h b/td/telegram/GroupCallVideoPayload.h index a47a3733e..e58c7e8ff 100644 --- a/td/telegram/GroupCallVideoPayload.h +++ b/td/telegram/GroupCallVideoPayload.h @@ -10,7 +10,6 @@ #include "td/telegram/telegram_api.h" #include "td/utils/common.h" -#include "td/utils/Status.h" namespace td { diff --git a/td/telegram/LinkManager.cpp b/td/telegram/LinkManager.cpp index d2dfc590f..0162f4cb2 100644 --- a/td/telegram/LinkManager.cpp +++ b/td/telegram/LinkManager.cpp @@ -6,12 +6,14 @@ // #include "td/telegram/LinkManager.h" +#include "td/telegram/AccessRights.h" #include "td/telegram/ChannelId.h" #include "td/telegram/ConfigShared.h" #include "td/telegram/ContactsManager.h" #include "td/telegram/Global.h" #include "td/telegram/MessageEntity.h" #include "td/telegram/MessagesManager.h" +#include "td/telegram/ServerMessageId.h" #include "td/telegram/Td.h" #include "td/telegram/telegram_api.h" #include "td/telegram/UserId.h" @@ -25,6 +27,7 @@ #include "td/utils/logging.h" #include "td/utils/misc.h" #include "td/utils/SliceBuilder.h" +#include "td/utils/StringBuilder.h" namespace td { diff --git a/td/telegram/Log.cpp b/td/telegram/Log.cpp index 365bf6bbf..884ca5661 100644 --- a/td/telegram/Log.cpp +++ b/td/telegram/Log.cpp @@ -12,8 +12,6 @@ #include "td/telegram/td_api.h" #include "td/utils/common.h" -#include "td/utils/logging.h" -#include "td/utils/Slice.h" #include diff --git a/td/telegram/Logging.cpp b/td/telegram/Logging.cpp index 728dec8ac..d80606ca4 100644 --- a/td/telegram/Logging.cpp +++ b/td/telegram/Logging.cpp @@ -32,9 +32,9 @@ #include "td/utils/algorithm.h" #include "td/utils/ExitGuard.h" #include "td/utils/FileLog.h" -#include "td/utils/NullLog.h" #include "td/utils/logging.h" #include "td/utils/misc.h" +#include "td/utils/NullLog.h" #include "td/utils/port/detail/NativeFd.h" #include "td/utils/TsLog.h" diff --git a/td/telegram/PhotoSizeSource.cpp b/td/telegram/PhotoSizeSource.cpp index 42056573b..655f59321 100644 --- a/td/telegram/PhotoSizeSource.cpp +++ b/td/telegram/PhotoSizeSource.cpp @@ -11,6 +11,8 @@ #include "td/telegram/UserId.h" #include "td/utils/common.h" +#include "td/utils/Slice.h" +#include "td/utils/SliceBuilder.h" #include "td/utils/StackAllocator.h" #include "td/utils/tl_helpers.h" #include "td/utils/tl_storers.h" diff --git a/td/telegram/SecretChatsManager.h b/td/telegram/SecretChatsManager.h index 81ece46d2..1aac56443 100644 --- a/td/telegram/SecretChatsManager.h +++ b/td/telegram/SecretChatsManager.h @@ -31,7 +31,7 @@ class SecretChatsManager : public Actor { public: explicit SecretChatsManager(ActorShared<> parent); - // Proxy query to corrensponding SecretChatActor + // proxy query to corrensponding SecretChatActor void on_update_chat(tl_object_ptr update); void on_new_message(tl_object_ptr &&message_ptr, Promise &&promise); @@ -47,7 +47,7 @@ class SecretChatsManager : public Actor { void notify_screenshot_taken(SecretChatId secret_chat_id, Promise<> promise); void send_set_ttl_message(SecretChatId secret_chat_id, int32 ttl, int64 random_id, Promise<> promise); - // Binlog replay + // binlog replay void replay_binlog_event(BinlogEvent &&binlog_event); void binlog_replay_finish(); diff --git a/td/telegram/StickersManager.cpp b/td/telegram/StickersManager.cpp index e8357de17..a359dfde4 100644 --- a/td/telegram/StickersManager.cpp +++ b/td/telegram/StickersManager.cpp @@ -29,8 +29,8 @@ #include "td/telegram/StickerSetId.hpp" #include "td/telegram/StickersManager.hpp" #include "td/telegram/Td.h" -#include "td/telegram/TdDb.h" #include "td/telegram/td_api.h" +#include "td/telegram/TdDb.h" #include "td/telegram/telegram_api.h" #include "td/actor/MultiPromise.h" diff --git a/td/telegram/VideoNotesManager.cpp b/td/telegram/VideoNotesManager.cpp index 2462efc26..97f3289ee 100644 --- a/td/telegram/VideoNotesManager.cpp +++ b/td/telegram/VideoNotesManager.cpp @@ -8,8 +8,8 @@ #include "td/telegram/AuthManager.h" #include "td/telegram/files/FileManager.h" -#include "td/telegram/SecretChatActor.h" #include "td/telegram/secret_api.h" +#include "td/telegram/SecretChatActor.h" #include "td/telegram/Td.h" #include "td/telegram/td_api.h" #include "td/telegram/telegram_api.h" diff --git a/td/telegram/cli.cpp b/td/telegram/cli.cpp index 417ce4e67..628132d1b 100644 --- a/td/telegram/cli.cpp +++ b/td/telegram/cli.cpp @@ -12,8 +12,8 @@ #include "td/net/HttpQuery.h" #include "td/net/HttpReader.h" -#include "td/telegram/ClientActor.h" #include "td/telegram/Client.h" +#include "td/telegram/ClientActor.h" #include "td/telegram/Td.h" // for VERBOSITY_NAME(td_requests) #include "td/telegram/td_api_json.h" diff --git a/td/telegram/files/FileDb.cpp b/td/telegram/files/FileDb.cpp index 2fd02e5dc..7a29e22d6 100644 --- a/td/telegram/files/FileDb.cpp +++ b/td/telegram/files/FileDb.cpp @@ -26,11 +26,9 @@ #include "td/utils/ScopeGuard.h" #include "td/utils/Slice.h" #include "td/utils/SliceBuilder.h" -#include "td/utils/StackAllocator.h" #include "td/utils/Status.h" #include "td/utils/tl_helpers.h" #include "td/utils/tl_parsers.h" -#include "td/utils/tl_storers.h" namespace td { diff --git a/td/telegram/misc.h b/td/telegram/misc.h index 7f17bedde..ce6111ebe 100644 --- a/td/telegram/misc.h +++ b/td/telegram/misc.h @@ -7,8 +7,6 @@ #pragma once #include "td/utils/common.h" -#include "td/utils/Slice.h" -#include "td/utils/Status.h" namespace td { diff --git a/td/telegram/td_json_client.h b/td/telegram/td_json_client.h index 458cd330f..2cfa975c8 100644 --- a/td/telegram/td_json_client.h +++ b/td/telegram/td_json_client.h @@ -174,7 +174,7 @@ typedef void (*td_log_message_callback_ptr)(int verbosity_level, const char *mes * None of the TDLib methods can be called from the callback. * By default the callback is not set. * - * \param[in] max_verbosity_level Maximum verbosity level of messages for which the callback will be called. + * \param[in] max_verbosity_level The maximum verbosity level of messages for which the callback will be called. * \param[in] callback Callback that will be called when a message is added to the internal TDLib log. * Pass nullptr to remove the callback. */ diff --git a/tddb/td/db/binlog/BinlogEvent.cpp b/tddb/td/db/binlog/BinlogEvent.cpp index 3333a821f..8c7f8a1e5 100644 --- a/tddb/td/db/binlog/BinlogEvent.cpp +++ b/tddb/td/db/binlog/BinlogEvent.cpp @@ -64,7 +64,7 @@ BufferSlice BinlogEvent::create_raw(uint64 id, int32 type, int32 flags, const St tl_storer.store_storer(storer); CHECK(tl_storer.get_buf() == raw_event.as_slice().uend() - TAIL_SIZE); - tl_storer.store_int(::td::crc32(raw_event.as_slice().truncate(raw_event.size() - TAIL_SIZE))); + tl_storer.store_int(crc32(raw_event.as_slice().truncate(raw_event.size() - TAIL_SIZE))); return raw_event; } diff --git a/tdutils/td/utils/CombinedLog.h b/tdutils/td/utils/CombinedLog.h index 87a690e77..d8ae953b4 100644 --- a/tdutils/td/utils/CombinedLog.h +++ b/tdutils/td/utils/CombinedLog.h @@ -23,12 +23,12 @@ class CombinedLog : public LogInterface { second_ = second; } - void set_first_verbosity_level(int verbosity_level) { - first_verbosity_level_ = verbosity_level; + void set_first_verbosity_level(int new_verbosity_level) { + first_verbosity_level_ = new_verbosity_level; } - void set_second_verbosity_level(int verbosity_level) { - second_verbosity_level_ = verbosity_level; + void set_second_verbosity_level(int new_verbosity_level) { + second_verbosity_level_ = new_verbosity_level; } const LogInterface *get_first() const { @@ -74,10 +74,10 @@ class CombinedLog : public LogInterface { vector get_file_paths() final { vector result; if (first_) { - td::append(result, first_->get_file_paths()); + ::td::append(result, first_->get_file_paths()); } if (second_) { - td::append(result, second_->get_file_paths()); + ::td::append(result, second_->get_file_paths()); } return result; }