Fix some includes.

GitOrigin-RevId: 901d167d7197e4c0222656e9fc1f9fc0e216e44b
This commit is contained in:
levlam 2018-06-26 02:43:11 +03:00
parent aa13a57a3c
commit 46535703e0
32 changed files with 54 additions and 12 deletions

View File

@ -11,7 +11,7 @@
#include "td/utils/format.h"
#include "td/utils/logging.h"
#include "td/utils/Slice.h"
#include "td/utils/misc.h"
#include "td/utils/Status.h"
#include <utility>

View File

@ -9,6 +9,7 @@
#include "td/utils/common.h"
#include "td/utils/int_types.h"
#include "td/utils/logging.h"
#include "td/utils/Slice.h"
#include "td/utils/Status.h"

View File

@ -15,6 +15,7 @@
#include "td/telegram/ContactsManager.h"
#include "td/telegram/Global.h"
#include "td/telegram/misc.h"
#include "td/telegram/net/DcId.h"
#include "td/telegram/net/NetQueryDispatcher.h"
#include "td/telegram/Td.h"
#include "td/telegram/UpdatesManager.h"

View File

@ -10,9 +10,12 @@
#include "td/telegram/Global.h"
#include "td/telegram/logevent/LogEvent.h"
#include "td/telegram/net/ConnectionCreator.h"
#include "td/telegram/net/DcId.h"
#include "td/telegram/net/DcOptions.h"
#include "td/telegram/net/NetQuery.h"
#include "td/telegram/net/NetQueryDispatcher.h"
#include "td/telegram/net/NetType.h"
#include "td/telegram/net/PublicRsaKeyShared.h"
#include "td/telegram/net/Session.h"
#if !TD_EMSCRIPTEN //FIXME

View File

@ -6,6 +6,7 @@
//
#pragma once
#include "td/telegram/net/DcId.h"
#include "td/telegram/net/DcOptions.h"
#include "td/telegram/net/NetQuery.h"

View File

@ -10,6 +10,7 @@
#include "td/telegram/AudiosManager.h"
#include "td/telegram/files/FileManager.h"
#include "td/telegram/Global.h"
#include "td/telegram/net/DcId.h"
#include "td/telegram/Photo.h"
#include "td/telegram/StickersManager.h"
#include "td/telegram/Td.h"

View File

@ -57,6 +57,7 @@ class WebPagesManager;
}; // namespace td
namespace td {
class Global : public ActorContext {
public:
Global();
@ -348,4 +349,5 @@ inline Global *G() {
CHECK(Scheduler::context());
return static_cast<Global *>(Scheduler::context());
}
} // namespace td

View File

@ -5,14 +5,6 @@
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
#include "td/telegram/MessagesManager.h"
#include "td/telegram/secret_api.hpp"
#include "td/telegram/td_api.hpp"
#include "td/telegram/telegram_api.h"
#include "td/actor/PromiseFuture.h"
#include "td/actor/SleepActor.h"
#include "td/db/binlog/BinlogHelper.h"
#include "td/telegram/AnimationsManager.h"
#include "td/telegram/AnimationsManager.hpp"
@ -35,6 +27,7 @@
#include "td/telegram/MessageEntity.hpp"
#include "td/telegram/MessagesDb.h"
#include "td/telegram/misc.h"
#include "td/telegram/net/DcId.h"
#include "td/telegram/net/NetActor.h"
#include "td/telegram/net/NetQuery.h"
#include "td/telegram/Payments.h"
@ -59,6 +52,15 @@
#include "td/telegram/WebPageId.h"
#include "td/telegram/WebPagesManager.h"
#include "td/telegram/secret_api.hpp"
#include "td/telegram/td_api.hpp"
#include "td/telegram/telegram_api.h"
#include "td/actor/PromiseFuture.h"
#include "td/actor/SleepActor.h"
#include "td/db/binlog/BinlogHelper.h"
#include "td/utils/format.h"
#include "td/utils/HttpUrl.h"
#include "td/utils/MimeType.h"

View File

@ -11,6 +11,7 @@
#include "td/telegram/files/FileManager.h"
#include "td/telegram/Global.h"
#include "td/telegram/net/DcId.h"
#include "td/utils/common.h"
#include "td/utils/format.h"

View File

@ -10,6 +10,7 @@
#include "td/telegram/files/FileManager.h"
#include "td/telegram/Global.h"
#include "td/telegram/misc.h"
#include "td/telegram/net/DcId.h"
#include "td/telegram/Payments.h"
#include "td/telegram/td_api.h"

View File

@ -23,6 +23,7 @@
#include "td/telegram/logevent/LogEvent.h"
#include "td/telegram/MessagesManager.h"
#include "td/telegram/misc.h"
#include "td/telegram/net/DcId.h"
#include "td/telegram/StickersManager.hpp"
#include "td/telegram/Td.h"

View File

@ -9,11 +9,13 @@
#include "td/db/binlog/BinlogEvent.h"
#include "td/telegram/net/ConnectionCreator.h"
#include "td/telegram/net/DcId.h"
#include "td/telegram/net/MtprotoHeader.h"
#include "td/telegram/net/NetQuery.h"
#include "td/telegram/net/NetQueryDelayer.h"
#include "td/telegram/net/NetQueryDispatcher.h"
#include "td/telegram/net/NetStatsManager.h"
#include "td/telegram/net/NetType.h"
#include "td/telegram/net/TempAuthKeyWatchdog.h"
#include "td/telegram/AccessRights.h"

View File

@ -13,6 +13,7 @@
#include "td/utils/buffer.h"
#include "td/utils/logging.h"
#include "td/utils/Status.h"
namespace td {

View File

@ -15,6 +15,7 @@
#include "td/actor/PromiseFuture.h"
#include "td/utils/common.h"
#include "td/utils/Slice.h"
#include "td/utils/tl_helpers.h"
#include <utility>

View File

@ -10,6 +10,7 @@
#include "td/telegram/files/FileLoaderUtils.h"
#include "td/telegram/Global.h"
#include "td/telegram/net/DcId.h"
#include "td/telegram/UniqueId.h"
#include "td/utils/buffer.h"

View File

@ -13,6 +13,7 @@
#include "td/telegram/files/FileLoader.h"
#include "td/telegram/files/FileLocation.h"
#include "td/telegram/net/DcId.h"
#include "td/telegram/net/NetQuery.h"
#include "td/utils/common.h"

View File

@ -9,6 +9,7 @@
#include "td/telegram/telegram_api.h"
#include "td/telegram/Global.h"
#include "td/telegram/net/DcId.h"
#include "td/telegram/net/NetQueryDispatcher.h"
#include "td/utils/buffer.h"

View File

@ -15,6 +15,7 @@
#include "td/telegram/files/FileLocation.h"
#include "td/telegram/files/FileUploader.h"
#include "td/telegram/files/ResourceManager.h"
#include "td/telegram/net/DcId.h"
#include "td/utils/buffer.h"
#include "td/utils/Container.h"

View File

@ -11,6 +11,7 @@
#include "td/telegram/files/FileLoaderUtils.h"
#include "td/telegram/Global.h"
#include "td/telegram/net/DcId.h"
#include "td/telegram/net/NetQueryDispatcher.h"
#include "td/utils/buffer.h"

View File

@ -15,6 +15,7 @@
#include "td/telegram/MessagesManager.h"
#include "td/telegram/net/MtprotoHeader.h"
#include "td/telegram/net/NetQueryDispatcher.h"
#include "td/telegram/net/NetType.h"
#include "td/telegram/StateManager.h"
#include "td/mtproto/IStreamTransport.h"

View File

@ -9,6 +9,7 @@
#include "td/telegram/td_api.h"
#include "td/telegram/telegram_api.h"
#include "td/telegram/net/DcId.h"
#include "td/telegram/net/DcOptions.h"
#include "td/telegram/net/DcOptionsSet.h"
#include "td/telegram/net/NetQuery.h"

View File

@ -8,6 +8,7 @@
#include "td/telegram/Global.h"
#include "td/telegram/net/AuthDataShared.h"
#include "td/telegram/net/DcId.h"
#include "td/telegram/net/NetQuery.h"
#include "td/actor/actor.h"

View File

@ -6,6 +6,7 @@
//
#pragma once
#include "td/telegram/net/DcId.h"
#include "td/telegram/net/DcOptions.h"
#include "td/utils/Container.h"

View File

@ -8,6 +8,9 @@
#include "td/telegram/Global.h"
#include "td/utils/misc.h"
#include "td/utils/Slice.h"
namespace td {
ListNode net_query_list_;

View File

@ -9,6 +9,7 @@
#include "td/telegram/net/DcAuthManager.h"
#include "td/telegram/net/NetQuery.h"
#include "td/telegram/net/NetQueryDelayer.h"
#include "td/telegram/net/PublicRsaKeyShared.h"
#include "td/telegram/net/PublicRsaKeyWatchdog.h"
#include "td/telegram/net/SessionMultiProxy.h"

View File

@ -7,6 +7,7 @@
#pragma once
#include "td/telegram/net/AuthDataShared.h"
#include "td/telegram/net/DcId.h"
#include "td/telegram/net/NetQuery.h"
#include "td/actor/actor.h"
@ -23,11 +24,11 @@
namespace td {
class NetQueryDelayer;
class DcAuthManager;
class SessionMultiProxy;
class NetQueryDelayer;
class PublicRsaKeyShared;
class PublicRsaKeyWatchdog;
class SessionMultiProxy;
// Not just dispatcher.
class NetQueryDispatcher {

View File

@ -7,6 +7,7 @@
#include "td/telegram/net/PublicRsaKeyWatchdog.h"
#include "td/telegram/Global.h"
#include "td/telegram/net/DcId.h"
#include "td/telegram/telegram_api.h"

View File

@ -13,6 +13,7 @@
#include "td/telegram/net/MtprotoHeader.h"
#include "td/telegram/net/NetQuery.h"
#include "td/telegram/net/NetQueryDispatcher.h"
#include "td/telegram/net/NetType.h"
#include "td/telegram/StateManager.h"
#include "td/telegram/UniqueId.h"

View File

@ -8,6 +8,7 @@
#include "td/telegram/Global.h"
#include "td/telegram/net/ConnectionCreator.h"
#include "td/telegram/net/DcId.h"
#include "td/telegram/net/NetQueryDispatcher.h"
#include "td/telegram/net/Session.h"

View File

@ -15,6 +15,8 @@
#include "td/utils/ScopeGuard.h"
#include "td/utils/Status.h"
#include <atomic>
#include <memory>
#include <tuple>
#include <type_traits>
#include <utility>
@ -303,7 +305,6 @@ class CancellablePromise : public PromiseT {
}
virtual bool is_cancellable() const {
return true;
;
}
virtual bool is_cancelled() const {
return cancellation_token_.is_canceled();

View File

@ -9,15 +9,18 @@
#include "sqlite/sqlite3.h"
#include "td/utils/common.h"
#include "td/utils/format.h"
#include "td/utils/logging.h"
#include "td/utils/port/path.h"
#include "td/utils/port/Stat.h"
namespace td {
namespace detail {
Status RawSqliteDb::last_error(sqlite3 *db) {
return Status::Error(Slice(sqlite3_errmsg(db)));
}
Status RawSqliteDb::destroy(Slice path) {
Status error;
with_db_path(path, [&](auto path) {
@ -28,6 +31,7 @@ Status RawSqliteDb::destroy(Slice path) {
});
return error;
}
Status RawSqliteDb::last_error() {
//If database was corrupted, try to delete it.
auto code = sqlite3_errcode(db_);
@ -37,6 +41,7 @@ Status RawSqliteDb::last_error() {
return last_error(db_);
}
RawSqliteDb::~RawSqliteDb() {
auto rc = sqlite3_close(db_);
LOG_IF(FATAL, rc != SQLITE_OK) << last_error(db_);

View File

@ -19,6 +19,7 @@
#include "td/net/Socks5.h"
#include "td/telegram/ConfigManager.h"
#include "td/telegram/net/DcId.h"
#include "td/telegram/net/PublicRsaKeyShared.h"
#include "td/utils/logging.h"