From deecdb66bc39bb5ebea55854c7121b847c1a42fa Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 3 Jul 2018 22:29:04 +0300 Subject: [PATCH] Fix some td/actor/ includes. GitOrigin-RevId: f9cf960b96018c4eb6169d2ec6cb5d3fbc16c0ec --- benchmark/bench_tddb.cpp | 3 +++ td/mtproto/NoCryptoStorer.h | 1 + td/mtproto/RawConnection.h | 1 + td/mtproto/SessionConnection.h | 4 ++-- td/telegram/AnimationsManager.h | 1 + td/telegram/AnimationsManager.hpp | 1 + td/telegram/AudiosManager.cpp | 2 -- td/telegram/AudiosManager.hpp | 1 + td/telegram/AuthManager.h | 2 ++ td/telegram/AuthManager.hpp | 2 ++ td/telegram/CallbackQueriesManager.cpp | 1 + td/telegram/CallbackQueriesManager.h | 2 ++ td/telegram/Client.cpp | 2 ++ td/telegram/ConfigManager.h | 1 + td/telegram/DialogDb.cpp | 3 +++ td/telegram/DocumentsManager.hpp | 1 + td/telegram/Game.hpp | 1 + td/telegram/Global.cpp | 1 - td/telegram/InlineQueriesManager.h | 1 + td/telegram/LanguagePackManager.cpp | 1 + td/telegram/LanguagePackManager.h | 1 + td/telegram/MessagesDb.cpp | 2 ++ td/telegram/MessagesManager.h | 1 + td/telegram/PasswordManager.h | 3 +++ td/telegram/PrivacyManager.h | 1 + td/telegram/SecretChatsManager.h | 4 ++-- td/telegram/SecureManager.h | 5 +++-- td/telegram/SecureStorage.h | 2 -- td/telegram/SequenceDispatcher.cpp | 2 ++ td/telegram/SequenceDispatcher.h | 2 ++ td/telegram/StickersManager.hpp | 1 + td/telegram/TdDb.cpp | 1 - td/telegram/TdDb.h | 2 ++ td/telegram/UpdatesManager.h | 2 ++ td/telegram/VideoNotesManager.cpp | 2 -- td/telegram/VideoNotesManager.hpp | 1 + td/telegram/VideosManager.cpp | 2 -- td/telegram/VideosManager.hpp | 1 + td/telegram/VoiceNotesManager.cpp | 2 -- td/telegram/files/FileDownloader.h | 3 --- td/telegram/files/FileHashUploader.h | 2 ++ td/telegram/files/FileLoader.h | 1 - td/telegram/files/FileLoaderActor.h | 2 ++ td/telegram/files/FileManager.h | 3 +++ td/telegram/files/FileUploader.h | 3 --- td/telegram/files/ResourceManager.h | 1 - td/telegram/logevent/SecretChatEvent.h | 2 ++ td/telegram/net/SessionProxy.cpp | 2 ++ tdactor/td/actor/Condition.h | 1 + tdactor/td/actor/impl/Actor.h | 1 + tdactor/td/actor/impl/ActorId-decl.h | 5 ++++- tdactor/td/actor/impl/ActorId.h | 4 ---- tdactor/td/actor/impl/ActorInfo-decl.h | 1 + tdactor/td/actor/impl/ActorInfo.h | 4 +++- tdactor/td/actor/impl/Event.h | 2 ++ tdactor/td/actor/impl/Scheduler-decl.h | 2 ++ tdactor/test/actors_bugs.cpp | 1 + tddb/td/db/DbKey.h | 1 + tddb/td/db/SqliteKeyValueAsync.cpp | 2 ++ tddb/td/db/SqliteKeyValueSafe.h | 2 ++ tddb/td/db/binlog/detail/BinlogEventsBuffer.h | 1 + tddb/td/db/binlog/detail/BinlogEventsProcessor.h | 2 ++ tdnet/td/net/GetHostByNameActor.h | 1 + tdnet/td/net/HttpConnectionBase.cpp | 3 +-- tdnet/td/net/Socks5.h | 1 - tdnet/td/net/Wget.h | 1 + tdutils/td/utils/Closure.h | 2 +- tdutils/td/utils/Storer.h | 1 + tdutils/td/utils/config.h.in | 1 + tdutils/td/utils/invoke.h | 8 ++++---- tdutils/td/utils/port/detail/ThreadPthread.h | 1 + tdutils/td/utils/port/detail/ThreadStl.h | 1 + test/data.h | 4 ++++ test/db.cpp | 2 ++ test/secret.cpp | 1 + test/tdclient.cpp | 1 + 76 files changed, 105 insertions(+), 40 deletions(-) diff --git a/benchmark/bench_tddb.cpp b/benchmark/bench_tddb.cpp index 91e957a501ec..63e5a7b07947 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 f43a2ebf541f..f78a77e2fe21 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 3660b1df7e8f..76aa93fd48d5 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 be3c1de89584..033732940b3b 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 3282d70521c6..2a53beaec687 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 1e450393334a..1a2dacccbffb 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 301be671f271..37536d5d8c3b 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 d9813352ab4b..9b437d0f618a 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 d5f347130c33..702cd8635bf4 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 ada3d3511acc..2c986fd52006 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 46bd5e1c4427..67888594c9bb 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 f2a064508813..213ccff08b8d 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 d6469328720c..f6661c0b2ae0 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 dde2452f23d5..0b2e4e627199 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 ea799bd529d3..3071ebd0c152 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 71b45cf27405..b57ee2c56d9b 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 497362eac252..a0c5c8ecd472 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 36a75cdc7807..db1180942412 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 97548c41ed0d..687c197874f1 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 ce0a81567505..68f7a2f35ab6 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 4a0b9762a93e..0fa559f480f0 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 8ada08bfabab..987e2ec97218 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 abd783ddd7b8..b7b500ff2b1b 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 6493d61e0252..8eb19e275bd2 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 00532488bf61..3f0be231d8a9 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 c05af851f41d..f21bcf9ba3b3 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 9fcf7c769a96..3db9ca6efc96 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 2cac75b22560..7026f8c80e8b 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 b6ff7806d2f9..bba39d701aa4 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 dbfbef904bdf..820332cac8d3 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 e641c1e1cb80..b3b89edb5771 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 734b89fbab4d..c602f6aa5513 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 dbb219ec01a8..aa114b773a87 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 325051d3a6c3..7a92f8c5c060 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 1649b9273096..b8553db14618 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 5992848c97b8..df77f7311003 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 0686af093f50..92e9c37ad693 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 b93ce4c02cf8..d267975589ee 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 57e500ab0a51..14dc00917db0 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 f173963262fc..ea654be28d47 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 f47d53408c96..b756a36b0454 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 8ee3160d4c01..1da7977354da 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 d802f589ca91..3e4646c701d5 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 b144aa3cfb9d..30c619f0f5cb 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 cc81804bce9a..8c946142b772 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 e12f65b6d504..475ad964cc94 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 539f9fa13314..e4f9bb749fcd 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 f26229c86f28..6f9a6d93df29 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 e5065dc97b21..f64149aa4514 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 3fe5e20abfdc..0b52f0fbef9b 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 5e82ed6a057c..e1959eff265d 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 34d79706330a..79d744ee1edb 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 de9fba794e05..1b934abe7a47 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 df0b0dfd81a6..24a90f250354 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 fac66dd1203b..0686b0c7d01f 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 4b51c102a546..24222ec9530a 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 f4267f2818e4..2ecddb1eb61d 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 b0edde2ae183..633e3b616b3c 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 e6a951c06800..e0bd501b905c 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 d63af3cfb243..dbe79baf7a4e 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 00d97e3beda0..fbfb2838e3f1 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 054b917e8599..84ec28c1cf50 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 4061927af5c0..cdd6af476ed9 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 c5dc9a95feac..c093efc75d84 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 b67a33c28208..9d20dd05e213 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 6c539ab286ea..3b7f521e09dd 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 718f930b8ae9..b82fc1186556 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 91750dcd4467..56bc0968c77e 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 92cbd5cdc685..99e178fb755c 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 e9e56fc2c52b..5d73c316a788 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 e42efc377105..edb93ae09d0e 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 64bf3213cf04..91e0b98edede 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 c447d5cba670..f2b1b00103ce 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 7cbf71e9f5c3..6a5f0b137c79 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 75f4acb1b546..618e37607751 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 85b2061f262a..85e85162762c 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"