diff --git a/benchmark/bench_tddb.cpp b/benchmark/bench_tddb.cpp index 91e957a50..63e5a7b07 100644 --- a/benchmark/bench_tddb.cpp +++ b/benchmark/bench_tddb.cpp @@ -9,6 +9,9 @@ #include "td/telegram/MessagesDb.h" #include "td/telegram/UserId.h" +#include "td/actor/actor.h" +#include "td/actor/PromiseFuture.h" + #include "td/utils/benchmark.h" #include "td/utils/buffer.h" #include "td/utils/common.h" diff --git a/td/mtproto/NoCryptoStorer.h b/td/mtproto/NoCryptoStorer.h index f43a2ebf5..f78a77e2f 100644 --- a/td/mtproto/NoCryptoStorer.h +++ b/td/mtproto/NoCryptoStorer.h @@ -5,6 +5,7 @@ // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #pragma once + #include "td/mtproto/PacketStorer.h" #include "td/utils/Random.h" diff --git a/td/mtproto/RawConnection.h b/td/mtproto/RawConnection.h index 3660b1df7..76aa93fd4 100644 --- a/td/mtproto/RawConnection.h +++ b/td/mtproto/RawConnection.h @@ -5,6 +5,7 @@ // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #pragma once + #include "td/mtproto/IStreamTransport.h" #include "td/utils/buffer.h" diff --git a/td/mtproto/SessionConnection.h b/td/mtproto/SessionConnection.h index be3c1de89..033732940 100644 --- a/td/mtproto/SessionConnection.h +++ b/td/mtproto/SessionConnection.h @@ -10,8 +10,6 @@ #include "td/mtproto/RawConnection.h" #include "td/mtproto/utils.h" -#include "td/actor/actor.h" - #include "td/utils/buffer.h" #include "td/utils/format.h" #include "td/utils/Named.h" @@ -47,6 +45,7 @@ class msg_new_detailed_info; } // namespace mtproto_api namespace mtproto { + class AuthData; struct PacketInfo; @@ -249,5 +248,6 @@ class SessionConnection Status on_raw_packet(const td::mtproto::PacketInfo &info, BufferSlice packet) override; Status on_quick_ack(uint64 quick_ack_token) override; }; + } // namespace mtproto } // namespace td diff --git a/td/telegram/AnimationsManager.h b/td/telegram/AnimationsManager.h index 3282d7052..2a53beaec 100644 --- a/td/telegram/AnimationsManager.h +++ b/td/telegram/AnimationsManager.h @@ -10,6 +10,7 @@ #include "td/telegram/telegram_api.h" #include "td/actor/actor.h" +#include "td/actor/PromiseFuture.h" #include "td/telegram/files/FileId.h" #include "td/telegram/Photo.h" diff --git a/td/telegram/AnimationsManager.hpp b/td/telegram/AnimationsManager.hpp index 1e4503933..1a2dacccb 100644 --- a/td/telegram/AnimationsManager.hpp +++ b/td/telegram/AnimationsManager.hpp @@ -5,6 +5,7 @@ // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #pragma once + #include "td/telegram/AnimationsManager.h" #include "td/telegram/files/FileId.hpp" diff --git a/td/telegram/AudiosManager.cpp b/td/telegram/AudiosManager.cpp index 301be671f..37536d5d8 100644 --- a/td/telegram/AudiosManager.cpp +++ b/td/telegram/AudiosManager.cpp @@ -6,8 +6,6 @@ // #include "td/telegram/AudiosManager.h" -#include "td/actor/PromiseFuture.h" - #include "td/telegram/DocumentsManager.h" #include "td/telegram/files/FileManager.h" #include "td/telegram/Global.h" diff --git a/td/telegram/AudiosManager.hpp b/td/telegram/AudiosManager.hpp index d9813352a..9b437d0f6 100644 --- a/td/telegram/AudiosManager.hpp +++ b/td/telegram/AudiosManager.hpp @@ -5,6 +5,7 @@ // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #pragma once + #include "td/telegram/AudiosManager.h" #include "td/telegram/files/FileId.hpp" diff --git a/td/telegram/AuthManager.h b/td/telegram/AuthManager.h index d5f347130..702cd8635 100644 --- a/td/telegram/AuthManager.h +++ b/td/telegram/AuthManager.h @@ -13,6 +13,8 @@ #include "td/telegram/td_api.h" #include "td/telegram/telegram_api.h" +#include "td/actor/actor.h" + #include "td/utils/common.h" #include "td/utils/Slice.h" #include "td/utils/Status.h" diff --git a/td/telegram/AuthManager.hpp b/td/telegram/AuthManager.hpp index ada3d3511..2c986fd52 100644 --- a/td/telegram/AuthManager.hpp +++ b/td/telegram/AuthManager.hpp @@ -4,6 +4,8 @@ // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // +#pragma once + #include "td/telegram/AuthManager.h" #include "td/telegram/Version.h" diff --git a/td/telegram/CallbackQueriesManager.cpp b/td/telegram/CallbackQueriesManager.cpp index 46bd5e1c4..67888594c 100644 --- a/td/telegram/CallbackQueriesManager.cpp +++ b/td/telegram/CallbackQueriesManager.cpp @@ -9,6 +9,7 @@ #include "td/telegram/td_api.h" #include "td/telegram/telegram_api.h" +#include "td/actor/actor.h" #include "td/actor/PromiseFuture.h" #include "td/telegram/AccessRights.h" diff --git a/td/telegram/CallbackQueriesManager.h b/td/telegram/CallbackQueriesManager.h index f2a064508..213ccff08 100644 --- a/td/telegram/CallbackQueriesManager.h +++ b/td/telegram/CallbackQueriesManager.h @@ -13,6 +13,8 @@ #include "td/telegram/MessageId.h" #include "td/telegram/UserId.h" +#include "td/actor/PromiseFuture.h" + #include "td/utils/buffer.h" #include "td/utils/common.h" diff --git a/td/telegram/Client.cpp b/td/telegram/Client.cpp index d64693287..f6661c0b2 100644 --- a/td/telegram/Client.cpp +++ b/td/telegram/Client.cpp @@ -8,6 +8,8 @@ #include "td/telegram/Td.h" +#include "td/actor/actor.h" + #include "td/utils/crypto.h" #include "td/utils/logging.h" #include "td/utils/MpscPollableQueue.h" diff --git a/td/telegram/ConfigManager.h b/td/telegram/ConfigManager.h index dde2452f2..0b2e4e627 100644 --- a/td/telegram/ConfigManager.h +++ b/td/telegram/ConfigManager.h @@ -13,6 +13,7 @@ #include "td/telegram/telegram_api.h" #include "td/actor/actor.h" +#include "td/actor/PromiseFuture.h" #include "td/utils/port/IPAddress.h" #include "td/utils/Slice.h" diff --git a/td/telegram/DialogDb.cpp b/td/telegram/DialogDb.cpp index ea799bd52..3071ebd0c 100644 --- a/td/telegram/DialogDb.cpp +++ b/td/telegram/DialogDb.cpp @@ -8,6 +8,9 @@ #include "td/telegram/Version.h" +#include "td/actor/actor.h" +#include "td/actor/SchedulerLocalStorage.h" + #include "td/db/SqliteDb.h" #include "td/db/SqliteKeyValue.h" #include "td/db/SqliteStatement.h" diff --git a/td/telegram/DocumentsManager.hpp b/td/telegram/DocumentsManager.hpp index 71b45cf27..b57ee2c56 100644 --- a/td/telegram/DocumentsManager.hpp +++ b/td/telegram/DocumentsManager.hpp @@ -5,6 +5,7 @@ // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #pragma once + #include "td/telegram/DocumentsManager.h" #include "td/telegram/files/FileId.hpp" diff --git a/td/telegram/Game.hpp b/td/telegram/Game.hpp index 497362eac..a0c5c8ecd 100644 --- a/td/telegram/Game.hpp +++ b/td/telegram/Game.hpp @@ -5,6 +5,7 @@ // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #pragma once + #include "td/telegram/Game.h" #include "td/telegram/AnimationsManager.hpp" diff --git a/td/telegram/Global.cpp b/td/telegram/Global.cpp index 36a75cdc7..db1180942 100644 --- a/td/telegram/Global.cpp +++ b/td/telegram/Global.cpp @@ -13,7 +13,6 @@ #include "td/telegram/net/TempAuthKeyWatchdog.h" #include "td/telegram/TdDb.h" -#include "td/actor/MultiPromise.h" #include "td/actor/PromiseFuture.h" #include "td/utils/format.h" diff --git a/td/telegram/InlineQueriesManager.h b/td/telegram/InlineQueriesManager.h index 97548c41e..687c19787 100644 --- a/td/telegram/InlineQueriesManager.h +++ b/td/telegram/InlineQueriesManager.h @@ -11,6 +11,7 @@ #include "td/actor/actor.h" #include "td/actor/MultiPromise.h" +#include "td/actor/PromiseFuture.h" #include "td/actor/Timeout.h" #include "td/telegram/DialogId.h" diff --git a/td/telegram/LanguagePackManager.cpp b/td/telegram/LanguagePackManager.cpp index ce0a81567..68f7a2f35 100644 --- a/td/telegram/LanguagePackManager.cpp +++ b/td/telegram/LanguagePackManager.cpp @@ -11,6 +11,7 @@ #include "td/telegram/net/NetQueryDispatcher.h" #include "td/utils/logging.h" +#include "td/utils/misc.h" #include "td/telegram/td_api.h" #include "td/telegram/telegram_api.h" diff --git a/td/telegram/LanguagePackManager.h b/td/telegram/LanguagePackManager.h index 4a0b9762a..0fa559f48 100644 --- a/td/telegram/LanguagePackManager.h +++ b/td/telegram/LanguagePackManager.h @@ -15,6 +15,7 @@ #include "td/actor/PromiseFuture.h" #include "td/utils/Container.h" +#include "td/utils/Status.h" namespace td { diff --git a/td/telegram/MessagesDb.cpp b/td/telegram/MessagesDb.cpp index 8ada08bfa..987e2ec97 100644 --- a/td/telegram/MessagesDb.cpp +++ b/td/telegram/MessagesDb.cpp @@ -12,7 +12,9 @@ #include "td/db/SqliteDb.h" #include "td/db/SqliteStatement.h" +#include "td/actor/actor.h" #include "td/actor/PromiseFuture.h" +#include "td/actor/SchedulerLocalStorage.h" #include "td/utils/format.h" #include "td/utils/logging.h" diff --git a/td/telegram/MessagesManager.h b/td/telegram/MessagesManager.h index abd783ddd..b7b500ff2 100644 --- a/td/telegram/MessagesManager.h +++ b/td/telegram/MessagesManager.h @@ -10,6 +10,7 @@ #include "td/telegram/td_api.h" #include "td/telegram/telegram_api.h" +#include "td/actor/actor.h" #include "td/actor/MultiPromise.h" #include "td/actor/PromiseFuture.h" #include "td/actor/SignalSlot.h" diff --git a/td/telegram/PasswordManager.h b/td/telegram/PasswordManager.h index 6493d61e0..8eb19e275 100644 --- a/td/telegram/PasswordManager.h +++ b/td/telegram/PasswordManager.h @@ -9,6 +9,9 @@ #include "td/telegram/net/NetQuery.h" #include "td/telegram/SecureStorage.h" +#include "td/actor/actor.h" +#include "td/actor/PromiseFuture.h" + #include "td/utils/Container.h" #include "td/utils/logging.h" #include "td/utils/optional.h" diff --git a/td/telegram/PrivacyManager.h b/td/telegram/PrivacyManager.h index 00532488b..3f0be231d 100644 --- a/td/telegram/PrivacyManager.h +++ b/td/telegram/PrivacyManager.h @@ -9,6 +9,7 @@ #include "td/telegram/td_api.h" #include "td/telegram/telegram_api.h" +#include "td/actor/actor.h" #include "td/actor/PromiseFuture.h" #include "td/telegram/net/NetQuery.h" diff --git a/td/telegram/SecretChatsManager.h b/td/telegram/SecretChatsManager.h index c05af851f..f21bcf9ba 100644 --- a/td/telegram/SecretChatsManager.h +++ b/td/telegram/SecretChatsManager.h @@ -6,16 +6,16 @@ // #pragma once -#include "td/telegram/SecretChatActor.h" - #include "td/telegram/secret_api.h" #include "td/telegram/telegram_api.h" #include "td/telegram/logevent/SecretChatEvent.h" #include "td/telegram/PtsManager.h" +#include "td/telegram/SecretChatActor.h" #include "td/telegram/SecretChatId.h" #include "td/actor/actor.h" +#include "td/actor/PromiseFuture.h" #include "td/db/binlog/BinlogEvent.h" diff --git a/td/telegram/SecureManager.h b/td/telegram/SecureManager.h index 9fcf7c769..3db9ca6ef 100644 --- a/td/telegram/SecureManager.h +++ b/td/telegram/SecureManager.h @@ -6,8 +6,6 @@ // #pragma once -#include "td/actor/actor.h" - #include "td/telegram/net/NetQuery.h" #include "td/telegram/SecureValue.h" #include "td/telegram/UserId.h" @@ -15,6 +13,9 @@ #include "td/telegram/td_api.h" #include "td/telegram/telegram_api.h" +#include "td/actor/actor.h" +#include "td/actor/PromiseFuture.h" + #include "td/utils/Container.h" #include "td/utils/Status.h" diff --git a/td/telegram/SecureStorage.h b/td/telegram/SecureStorage.h index 2cac75b22..7026f8c80 100644 --- a/td/telegram/SecureStorage.h +++ b/td/telegram/SecureStorage.h @@ -13,8 +13,6 @@ #include "td/utils/Slice.h" #include "td/utils/Status.h" -#include "td/actor/actor.h" - namespace td { // Types // Password diff --git a/td/telegram/SequenceDispatcher.cpp b/td/telegram/SequenceDispatcher.cpp index b6ff7806d..bba39d701 100644 --- a/td/telegram/SequenceDispatcher.cpp +++ b/td/telegram/SequenceDispatcher.cpp @@ -9,6 +9,8 @@ #include "td/telegram/Global.h" #include "td/telegram/net/NetQueryDispatcher.h" +#include "td/actor/PromiseFuture.h" + #include "td/utils/format.h" #include "td/utils/logging.h" #include "td/utils/misc.h" diff --git a/td/telegram/SequenceDispatcher.h b/td/telegram/SequenceDispatcher.h index dbfbef904..820332cac 100644 --- a/td/telegram/SequenceDispatcher.h +++ b/td/telegram/SequenceDispatcher.h @@ -8,6 +8,8 @@ #include "td/telegram/net/NetQuery.h" +#include "td/actor/actor.h" + #include "td/utils/common.h" #include "td/utils/Random.h" diff --git a/td/telegram/StickersManager.hpp b/td/telegram/StickersManager.hpp index e641c1e1c..b3b89edb5 100644 --- a/td/telegram/StickersManager.hpp +++ b/td/telegram/StickersManager.hpp @@ -5,6 +5,7 @@ // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #pragma once + #include "td/telegram/StickersManager.h" #include "td/telegram/files/FileId.hpp" diff --git a/td/telegram/TdDb.cpp b/td/telegram/TdDb.cpp index 734b89fba..c602f6aa5 100644 --- a/td/telegram/TdDb.cpp +++ b/td/telegram/TdDb.cpp @@ -13,7 +13,6 @@ #include "td/telegram/TdParameters.h" #include "td/telegram/Version.h" -#include "td/actor/actor.h" #include "td/actor/MultiPromise.h" #include "td/db/BinlogKeyValue.h" diff --git a/td/telegram/TdDb.h b/td/telegram/TdDb.h index dbb219ec0..aa114b773 100644 --- a/td/telegram/TdDb.h +++ b/td/telegram/TdDb.h @@ -6,6 +6,8 @@ // #pragma once +#include "td/actor/PromiseFuture.h" + #include "td/db/binlog/Binlog.h" #include "td/db/binlog/BinlogEvent.h" #include "td/db/binlog/ConcurrentBinlog.h" diff --git a/td/telegram/UpdatesManager.h b/td/telegram/UpdatesManager.h index 325051d3a..7a92f8c5c 100644 --- a/td/telegram/UpdatesManager.h +++ b/td/telegram/UpdatesManager.h @@ -12,8 +12,10 @@ #include "td/telegram/td_api.h" #include "td/telegram/telegram_api.h" +#include "td/actor/actor.h" #include "td/actor/PromiseFuture.h" #include "td/actor/Timeout.h" + #include "td/utils/common.h" #include diff --git a/td/telegram/VideoNotesManager.cpp b/td/telegram/VideoNotesManager.cpp index 1649b9273..b8553db14 100644 --- a/td/telegram/VideoNotesManager.cpp +++ b/td/telegram/VideoNotesManager.cpp @@ -10,8 +10,6 @@ #include "td/telegram/td_api.h" #include "td/telegram/telegram_api.h" -#include "td/actor/PromiseFuture.h" - #include "td/telegram/DocumentsManager.h" #include "td/telegram/files/FileManager.h" #include "td/telegram/SecretChatActor.h" diff --git a/td/telegram/VideoNotesManager.hpp b/td/telegram/VideoNotesManager.hpp index 5992848c9..df77f7311 100644 --- a/td/telegram/VideoNotesManager.hpp +++ b/td/telegram/VideoNotesManager.hpp @@ -5,6 +5,7 @@ // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #pragma once + #include "td/telegram/VideoNotesManager.h" #include "td/telegram/files/FileId.hpp" diff --git a/td/telegram/VideosManager.cpp b/td/telegram/VideosManager.cpp index 0686af093..92e9c37ad 100644 --- a/td/telegram/VideosManager.cpp +++ b/td/telegram/VideosManager.cpp @@ -10,8 +10,6 @@ #include "td/telegram/td_api.h" #include "td/telegram/telegram_api.h" -#include "td/actor/PromiseFuture.h" - #include "td/telegram/AuthManager.h" #include "td/telegram/DocumentsManager.h" #include "td/telegram/files/FileManager.h" diff --git a/td/telegram/VideosManager.hpp b/td/telegram/VideosManager.hpp index b93ce4c02..d26797558 100644 --- a/td/telegram/VideosManager.hpp +++ b/td/telegram/VideosManager.hpp @@ -5,6 +5,7 @@ // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #pragma once + #include "td/telegram/VideosManager.h" #include "td/telegram/files/FileId.hpp" diff --git a/td/telegram/VoiceNotesManager.cpp b/td/telegram/VoiceNotesManager.cpp index 57e500ab0..14dc00917 100644 --- a/td/telegram/VoiceNotesManager.cpp +++ b/td/telegram/VoiceNotesManager.cpp @@ -10,8 +10,6 @@ #include "td/telegram/td_api.h" #include "td/telegram/telegram_api.h" -#include "td/actor/PromiseFuture.h" - #include "td/telegram/DocumentsManager.h" #include "td/telegram/files/FileManager.h" #include "td/telegram/Global.h" diff --git a/td/telegram/files/FileDownloader.h b/td/telegram/files/FileDownloader.h index f17396326..ea654be28 100644 --- a/td/telegram/files/FileDownloader.h +++ b/td/telegram/files/FileDownloader.h @@ -8,9 +8,6 @@ #include "td/telegram/telegram_api.h" -#include "td/actor/actor.h" -#include "td/actor/PromiseFuture.h" - #include "td/telegram/files/FileLoader.h" #include "td/telegram/files/FileLocation.h" #include "td/telegram/net/DcId.h" diff --git a/td/telegram/files/FileHashUploader.h b/td/telegram/files/FileHashUploader.h index f47d53408..b756a36b0 100644 --- a/td/telegram/files/FileHashUploader.h +++ b/td/telegram/files/FileHashUploader.h @@ -10,6 +10,8 @@ #include "td/telegram/files/FileLocation.h" #include "td/telegram/files/ResourceManager.h" +#include "td/actor/actor.h" + #include "td/utils/BufferedFd.h" #include "td/utils/crypto.h" #include "td/utils/port/FileFd.h" diff --git a/td/telegram/files/FileLoader.h b/td/telegram/files/FileLoader.h index 8ee3160d4..1da797735 100644 --- a/td/telegram/files/FileLoader.h +++ b/td/telegram/files/FileLoader.h @@ -7,7 +7,6 @@ #pragma once #include "td/actor/actor.h" -#include "td/actor/PromiseFuture.h" #include "td/telegram/files/FileLoaderActor.h" #include "td/telegram/files/FileLocation.h" diff --git a/td/telegram/files/FileLoaderActor.h b/td/telegram/files/FileLoaderActor.h index d802f589c..3e4646c70 100644 --- a/td/telegram/files/FileLoaderActor.h +++ b/td/telegram/files/FileLoaderActor.h @@ -9,6 +9,8 @@ #include "td/telegram/files/ResourceState.h" #include "td/telegram/net/NetQuery.h" +#include "td/actor/actor.h" + namespace td { class LocalFileLocation; diff --git a/td/telegram/files/FileManager.h b/td/telegram/files/FileManager.h index b144aa3cf..30c619f0f 100644 --- a/td/telegram/files/FileManager.h +++ b/td/telegram/files/FileManager.h @@ -17,6 +17,9 @@ #include "td/telegram/files/FileLocation.h" #include "td/telegram/files/FileStats.h" +#include "td/actor/actor.h" +#include "td/actor/PromiseFuture.h" + #include "td/utils/buffer.h" #include "td/utils/common.h" #include "td/utils/Container.h" diff --git a/td/telegram/files/FileUploader.h b/td/telegram/files/FileUploader.h index cc81804bc..8c946142b 100644 --- a/td/telegram/files/FileUploader.h +++ b/td/telegram/files/FileUploader.h @@ -6,9 +6,6 @@ // #pragma once -#include "td/actor/actor.h" -#include "td/actor/PromiseFuture.h" - #include "td/telegram/files/FileLoader.h" #include "td/telegram/files/FileLocation.h" diff --git a/td/telegram/files/ResourceManager.h b/td/telegram/files/ResourceManager.h index e12f65b6d..475ad964c 100644 --- a/td/telegram/files/ResourceManager.h +++ b/td/telegram/files/ResourceManager.h @@ -7,7 +7,6 @@ #pragma once #include "td/actor/actor.h" -#include "td/actor/PromiseFuture.h" #include "td/telegram/files/FileLoaderActor.h" #include "td/telegram/files/ResourceState.h" diff --git a/td/telegram/logevent/SecretChatEvent.h b/td/telegram/logevent/SecretChatEvent.h index 539f9fa13..e4f9bb749 100644 --- a/td/telegram/logevent/SecretChatEvent.h +++ b/td/telegram/logevent/SecretChatEvent.h @@ -8,6 +8,8 @@ #include "td/telegram/logevent/LogEvent.h" +#include "td/actor/PromiseFuture.h" + #include "td/utils/buffer.h" #include "td/utils/format.h" #include "td/utils/logging.h" diff --git a/td/telegram/net/SessionProxy.cpp b/td/telegram/net/SessionProxy.cpp index f26229c86..6f9a6d93d 100644 --- a/td/telegram/net/SessionProxy.cpp +++ b/td/telegram/net/SessionProxy.cpp @@ -12,6 +12,8 @@ #include "td/telegram/net/NetQueryDispatcher.h" #include "td/telegram/net/Session.h" +#include "td/actor/PromiseFuture.h" + #include "td/utils/logging.h" #include "td/utils/Slice.h" diff --git a/tdactor/td/actor/Condition.h b/tdactor/td/actor/Condition.h index e5065dc97..f64149aa4 100644 --- a/tdactor/td/actor/Condition.h +++ b/tdactor/td/actor/Condition.h @@ -7,6 +7,7 @@ #pragma once #include "td/actor/actor.h" +#include "td/actor/PromiseFuture.h" #include "td/utils/logging.h" diff --git a/tdactor/td/actor/impl/Actor.h b/tdactor/td/actor/impl/Actor.h index 3fe5e20ab..0b52f0fbe 100644 --- a/tdactor/td/actor/impl/Actor.h +++ b/tdactor/td/actor/impl/Actor.h @@ -19,6 +19,7 @@ #include namespace td { + inline Actor::Actor(Actor &&other) { CHECK(info_.empty()); info_ = std::move(other.info_); diff --git a/tdactor/td/actor/impl/ActorId-decl.h b/tdactor/td/actor/impl/ActorId-decl.h index 5e82ed6a0..e1959eff2 100644 --- a/tdactor/td/actor/impl/ActorId-decl.h +++ b/tdactor/td/actor/impl/ActorId-decl.h @@ -12,8 +12,10 @@ #include namespace td { -class ActorInfo; + class Actor; +class ActorInfo; + template class ActorId { public: @@ -166,4 +168,5 @@ class ActorRef { ActorId<> actor_id_; uint64 token_ = 0; }; + } // namespace td diff --git a/tdactor/td/actor/impl/ActorId.h b/tdactor/td/actor/impl/ActorId.h index 34d797063..79d744ee1 100644 --- a/tdactor/td/actor/impl/ActorId.h +++ b/tdactor/td/actor/impl/ActorId.h @@ -13,7 +13,6 @@ #include "td/utils/Slice.h" namespace td { -/*** ActorId ***/ // If actor is on our scheduler(thread) result will be valid // If actor is on another scheduler we will see it in migrate_dest_flags @@ -44,7 +43,6 @@ Slice ActorId::get_name() const { return ptr_->get_name(); } -// ActorOwn template ActorOwn::ActorOwn(ActorId id) : id_(std::move(id)) { } @@ -108,7 +106,6 @@ const ActorId *ActorOwn::operator->() const { return &id_; } -// ActorShared template template ActorShared::ActorShared(ActorId id, uint64 token) : id_(std::move(id)), token_(token) { @@ -180,7 +177,6 @@ const ActorId *ActorShared::operator->() const { return &id_; } -/*** ActorRef ***/ template ActorRef::ActorRef(const ActorId &actor_id) : actor_id_(actor_id) { } diff --git a/tdactor/td/actor/impl/ActorInfo-decl.h b/tdactor/td/actor/impl/ActorInfo-decl.h index de9fba794..1b934abe7 100644 --- a/tdactor/td/actor/impl/ActorInfo-decl.h +++ b/tdactor/td/actor/impl/ActorInfo-decl.h @@ -116,4 +116,5 @@ class ActorInfo }; StringBuilder &operator<<(StringBuilder &sb, const ActorInfo &info); + } // namespace td diff --git a/tdactor/td/actor/impl/ActorInfo.h b/tdactor/td/actor/impl/ActorInfo.h index df0b0dfd8..24a90f250 100644 --- a/tdactor/td/actor/impl/ActorInfo.h +++ b/tdactor/td/actor/impl/ActorInfo.h @@ -24,12 +24,13 @@ #include namespace td { -/*** ActorInfo ***/ + inline StringBuilder &operator<<(StringBuilder &sb, const ActorInfo &info) { sb << info.get_name() << ":" << const_cast(static_cast(&info)) << ":" << const_cast(static_cast(info.get_context())); return sb; } + inline void ActorInfo::init(int32 sched_id, Slice name, ObjectPool::OwnerPtr &&this_ptr, Actor *actor_ptr, Deleter deleter, bool is_lite) { CHECK(!is_running()); @@ -198,4 +199,5 @@ inline const ListNode *ActorInfo::get_list_node() const { inline ActorInfo *ActorInfo::from_list_node(ListNode *node) { return static_cast(node); } + } // namespace td diff --git a/tdactor/td/actor/impl/Event.h b/tdactor/td/actor/impl/Event.h index fac66dd12..0686b0c7d 100644 --- a/tdactor/td/actor/impl/Event.h +++ b/tdactor/td/actor/impl/Event.h @@ -241,7 +241,9 @@ class Event { } } }; + inline StringBuilder &operator<<(StringBuilder &sb, const Event &e) { return sb << tag("Event", static_cast(e.type)); } + } // namespace td diff --git a/tdactor/td/actor/impl/Scheduler-decl.h b/tdactor/td/actor/impl/Scheduler-decl.h index 4b51c102a..24222ec95 100644 --- a/tdactor/td/actor/impl/Scheduler-decl.h +++ b/tdactor/td/actor/impl/Scheduler-decl.h @@ -30,7 +30,9 @@ #include namespace td { + class ActorInfo; + struct Send { using Flags = uint32; static const Flags immediate = 0x001; diff --git a/tdactor/test/actors_bugs.cpp b/tdactor/test/actors_bugs.cpp index f4267f281..2ecddb1eb 100644 --- a/tdactor/test/actors_bugs.cpp +++ b/tdactor/test/actors_bugs.cpp @@ -6,6 +6,7 @@ // #include "td/utils/tests.h" +#include "td/actor/actor.h" #include "td/actor/Timeout.h" using namespace td; diff --git a/tddb/td/db/DbKey.h b/tddb/td/db/DbKey.h index b0edde2ae..633e3b616 100644 --- a/tddb/td/db/DbKey.h +++ b/tddb/td/db/DbKey.h @@ -5,6 +5,7 @@ // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #pragma once + #include "td/utils/common.h" #include "td/utils/Slice.h" diff --git a/tddb/td/db/SqliteKeyValueAsync.cpp b/tddb/td/db/SqliteKeyValueAsync.cpp index e6a951c06..e0bd501b9 100644 --- a/tddb/td/db/SqliteKeyValueAsync.cpp +++ b/tddb/td/db/SqliteKeyValueAsync.cpp @@ -6,6 +6,8 @@ // #include "td/db/SqliteKeyValueAsync.h" +#include "td/actor/actor.h" + #include "td/utils/optional.h" #include "td/utils/Time.h" diff --git a/tddb/td/db/SqliteKeyValueSafe.h b/tddb/td/db/SqliteKeyValueSafe.h index d63af3cfb..dbe79baf7 100644 --- a/tddb/td/db/SqliteKeyValueSafe.h +++ b/tddb/td/db/SqliteKeyValueSafe.h @@ -9,6 +9,8 @@ #include "td/db/SqliteConnectionSafe.h" #include "td/db/SqliteKeyValue.h" +#include "td/actor/SchedulerLocalStorage.h" + #include namespace td { diff --git a/tddb/td/db/binlog/detail/BinlogEventsBuffer.h b/tddb/td/db/binlog/detail/BinlogEventsBuffer.h index 00d97e3be..fbfb2838e 100644 --- a/tddb/td/db/binlog/detail/BinlogEventsBuffer.h +++ b/tddb/td/db/binlog/detail/BinlogEventsBuffer.h @@ -5,6 +5,7 @@ // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #pragma once + #include "td/db/binlog/BinlogEvent.h" #include "td/utils/common.h" diff --git a/tddb/td/db/binlog/detail/BinlogEventsProcessor.h b/tddb/td/db/binlog/detail/BinlogEventsProcessor.h index 054b917e8..84ec28c1c 100644 --- a/tddb/td/db/binlog/detail/BinlogEventsProcessor.h +++ b/tddb/td/db/binlog/detail/BinlogEventsProcessor.h @@ -5,9 +5,11 @@ // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #pragma once + #include "td/db/binlog/BinlogEvent.h" #include "td/utils/common.h" +#include "td/utils/logging.h" namespace td { namespace detail { diff --git a/tdnet/td/net/GetHostByNameActor.h b/tdnet/td/net/GetHostByNameActor.h index 4061927af..cdd6af476 100644 --- a/tdnet/td/net/GetHostByNameActor.h +++ b/tdnet/td/net/GetHostByNameActor.h @@ -5,6 +5,7 @@ // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #pragma once + #include "td/actor/actor.h" #include "td/actor/PromiseFuture.h" diff --git a/tdnet/td/net/HttpConnectionBase.cpp b/tdnet/td/net/HttpConnectionBase.cpp index c5dc9a95f..c093efc75 100644 --- a/tdnet/td/net/HttpConnectionBase.cpp +++ b/tdnet/td/net/HttpConnectionBase.cpp @@ -6,8 +6,6 @@ // #include "td/net/HttpConnectionBase.h" -#include "td/actor/actor.h" - #include "td/net/HttpHeaderCreator.h" #include "td/utils/logging.h" @@ -149,5 +147,6 @@ void HttpConnectionBase::loop() { return stop(); } } + } // namespace detail } // namespace td diff --git a/tdnet/td/net/Socks5.h b/tdnet/td/net/Socks5.h index b67a33c28..9d20dd05e 100644 --- a/tdnet/td/net/Socks5.h +++ b/tdnet/td/net/Socks5.h @@ -7,7 +7,6 @@ #pragma once #include "td/actor/actor.h" -#include "td/actor/PromiseFuture.h" #include "td/utils/BufferedFd.h" #include "td/utils/common.h" diff --git a/tdnet/td/net/Wget.h b/tdnet/td/net/Wget.h index 6c539ab28..3b7f521e0 100644 --- a/tdnet/td/net/Wget.h +++ b/tdnet/td/net/Wget.h @@ -10,6 +10,7 @@ #include "td/net/HttpQuery.h" #include "td/net/SslFd.h" +#include "td/actor/actor.h" #include "td/actor/PromiseFuture.h" #include "td/utils/common.h" diff --git a/tdutils/td/utils/Closure.h b/tdutils/td/utils/Closure.h index 718f930b8..b82fc1186 100644 --- a/tdutils/td/utils/Closure.h +++ b/tdutils/td/utils/Closure.h @@ -54,7 +54,7 @@ // If delay is needed, just std::forward data to temporary storage, and std::move them when call is executed. // // -// create_immediate_closure(&Actor::func, arg1, arg2, ..., argn).run(actor) +// create_immediate_closure(&ActorT::func, arg1, arg2, ..., argn).run(actor) // to_delayed_closure(std::move(immediate)).run(actor) namespace td { diff --git a/tdutils/td/utils/Storer.h b/tdutils/td/utils/Storer.h index 91750dcd4..56bc0968c 100644 --- a/tdutils/td/utils/Storer.h +++ b/tdutils/td/utils/Storer.h @@ -5,6 +5,7 @@ // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #pragma once + #include "td/utils/StorerBase.h" #include "td/utils/common.h" diff --git a/tdutils/td/utils/config.h.in b/tdutils/td/utils/config.h.in index 92cbd5cdc..99e178fb7 100644 --- a/tdutils/td/utils/config.h.in +++ b/tdutils/td/utils/config.h.in @@ -1,3 +1,4 @@ #pragma once + #cmakedefine01 TD_HAVE_OPENSSL #cmakedefine01 TD_HAVE_ZLIB diff --git a/tdutils/td/utils/invoke.h b/tdutils/td/utils/invoke.h index e9e56fc2c..5d73c316a 100644 --- a/tdutils/td/utils/invoke.h +++ b/tdutils/td/utils/invoke.h @@ -125,8 +125,8 @@ void invoke_tuple_impl(std::tuple &&tuple, IntSeq) { invoke(std::forward(std::get(tuple))...); } -template -void mem_call_tuple_impl(Actor *actor, F &func, std::tuple &&tuple, IntSeq) { +template +void mem_call_tuple_impl(ActorT *actor, F &func, std::tuple &&tuple, IntSeq) { (actor->*func)(std::forward(std::get(tuple))...); } @@ -160,8 +160,8 @@ void invoke_tuple(std::tuple &&tuple) { detail::invoke_tuple_impl(std::move(tuple), detail::IntRange()); } -template -void mem_call_tuple(Actor *actor, F &func, std::tuple &&tuple) { +template +void mem_call_tuple(ActorT *actor, F &func, std::tuple &&tuple) { detail::mem_call_tuple_impl(actor, func, std::move(tuple), detail::IntRange()); } diff --git a/tdutils/td/utils/port/detail/ThreadPthread.h b/tdutils/td/utils/port/detail/ThreadPthread.h index e42efc377..edb93ae09 100644 --- a/tdutils/td/utils/port/detail/ThreadPthread.h +++ b/tdutils/td/utils/port/detail/ThreadPthread.h @@ -5,6 +5,7 @@ // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #pragma once + #include "td/utils/port/config.h" #ifdef TD_THREAD_PTHREAD diff --git a/tdutils/td/utils/port/detail/ThreadStl.h b/tdutils/td/utils/port/detail/ThreadStl.h index 64bf3213c..91e0b98ed 100644 --- a/tdutils/td/utils/port/detail/ThreadStl.h +++ b/tdutils/td/utils/port/detail/ThreadStl.h @@ -5,6 +5,7 @@ // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #pragma once + #include "td/utils/port/config.h" #ifdef TD_THREAD_STL diff --git a/test/data.h b/test/data.h index c447d5cba..f2b1b0010 100644 --- a/test/data.h +++ b/test/data.h @@ -5,11 +5,15 @@ // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #pragma once + #include "td/utils/common.h" + namespace td { + extern const char *thumbnail; extern const size_t thumbnail_size; extern const char *gzip_bomb; extern const size_t gzip_bomb_size; + } // namespace td diff --git a/test/db.cpp b/test/db.cpp index 7cbf71e9f..6a5f0b137 100644 --- a/test/db.cpp +++ b/test/db.cpp @@ -11,6 +11,8 @@ #include "td/db/SqliteKeyValueSafe.h" #include "td/db/TsSeqKeyValue.h" +#include "td/actor/actor.h" + #include "td/utils/common.h" #include "td/utils/logging.h" #include "td/utils/port/FileFd.h" diff --git a/test/secret.cpp b/test/secret.cpp index 75f4acb1b..618e37607 100644 --- a/test/secret.cpp +++ b/test/secret.cpp @@ -4,6 +4,7 @@ // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // +#include "td/actor/actor.h" #include "td/actor/PromiseFuture.h" #include "td/db/binlog/detail/BinlogEventsProcessor.h" diff --git a/test/tdclient.cpp b/test/tdclient.cpp index 85b2061f2..85e851627 100644 --- a/test/tdclient.cpp +++ b/test/tdclient.cpp @@ -6,6 +6,7 @@ // #include "data.h" +#include "td/actor/actor.h" #include "td/actor/PromiseFuture.h" #include "td/telegram/ClientActor.h"