Various include and other fixes.

GitOrigin-RevId: 68e03e0636cd4cff3e6fa876342ba16453630f15
This commit is contained in:
levlam 2019-02-12 19:48:52 +03:00
parent 6301dd65d7
commit 130b49a524
23 changed files with 27 additions and 27 deletions

View File

@ -409,7 +409,7 @@ class TdClient {
name: 'language_pack_database_path' name: 'language_pack_database_path'
value: { value: {
'@type': 'optionValueString', '@type': 'optionValueString',
value: this.tdfs.dbFileSystem.root + '/language' value: this.tdfs.dbFileSystem.root + '/language'
} }
}); });

View File

@ -15,6 +15,7 @@
#include "td/utils/logging.h" #include "td/utils/logging.h"
#include "td/utils/Slice.h" #include "td/utils/Slice.h"
#include "td/utils/StorerBase.h"
#include "td/utils/Time.h" #include "td/utils/Time.h"
namespace td { namespace td {

View File

@ -9,12 +9,9 @@
#include "td/utils/as.h" #include "td/utils/as.h"
#include "td/utils/crypto.h" #include "td/utils/crypto.h"
#include "td/utils/logging.h" #include "td/utils/logging.h"
#include "td/utils/misc.h"
#include "td/utils/Random.h"
#include "td/utils/Slice.h" #include "td/utils/Slice.h"
#include "td/utils/Status.h" #include "td/utils/Status.h"
#include "td/utils/UInt.h"
#include <cstring>
namespace td { namespace td {

View File

@ -13,12 +13,11 @@
#include "td/utils/buffer.h" #include "td/utils/buffer.h"
#include "td/utils/Slice.h" #include "td/utils/Slice.h"
#include "td/utils/Status.h" #include "td/utils/Status.h"
#include "td/utils/StorerBase.h"
#include "td/utils/UInt.h" #include "td/utils/UInt.h"
namespace td { namespace td {
class Storer;
namespace mtproto { namespace mtproto {
class AuthKeyHandshakeContext { class AuthKeyHandshakeContext {

View File

@ -19,6 +19,7 @@
#include "td/utils/logging.h" #include "td/utils/logging.h"
#include "td/utils/port/detail/PollableFd.h" #include "td/utils/port/detail/PollableFd.h"
#include "td/utils/Status.h" #include "td/utils/Status.h"
#include "td/utils/StorerBase.h"
namespace td { namespace td {
namespace mtproto { namespace mtproto {

View File

@ -6,7 +6,7 @@
// //
#pragma once #pragma once
#include "td/utils/Storer.h" #include "td/utils/StorerBase.h"
#include "td/utils/tl_storers.h" #include "td/utils/tl_storers.h"
#include <limits> #include <limits>

View File

@ -16,20 +16,16 @@
#include "td/utils/port/detail/PollableFd.h" #include "td/utils/port/detail/PollableFd.h"
#include "td/utils/port/SocketFd.h" #include "td/utils/port/SocketFd.h"
#include "td/utils/Status.h" #include "td/utils/Status.h"
#include "td/utils/StorerBase.h"
#include "td/telegram/StateManager.h" #include "td/telegram/StateManager.h"
#include <map> #include <map>
namespace td { namespace td {
class Storer;
namespace mtproto { namespace mtproto {
class AuthKey;
} // namespace mtproto
} // namespace td
namespace td { class AuthKey;
namespace mtproto {
class RawConnection { class RawConnection {
public: public:

View File

@ -16,6 +16,7 @@
#include "td/utils/port/detail/PollableFd.h" #include "td/utils/port/detail/PollableFd.h"
#include "td/utils/Slice.h" #include "td/utils/Slice.h"
#include "td/utils/Status.h" #include "td/utils/Status.h"
#include "td/utils/StorerBase.h"
#include "td/utils/StringBuilder.h" #include "td/utils/StringBuilder.h"
#include "td/utils/tl_parsers.h" #include "td/utils/tl_parsers.h"

View File

@ -7,12 +7,12 @@
#pragma once #pragma once
#include "td/mtproto/PacketInfo.h" #include "td/mtproto/PacketInfo.h"
#include "td/mtproto/utils.h"
#include "td/utils/common.h" #include "td/utils/common.h"
#include "td/utils/logging.h" #include "td/utils/logging.h"
#include "td/utils/Slice.h" #include "td/utils/Slice.h"
#include "td/utils/Status.h" #include "td/utils/Status.h"
#include "td/utils/StorerBase.h"
#include "td/utils/UInt.h" #include "td/utils/UInt.h"
#include <utility> #include <utility>

View File

@ -12,6 +12,7 @@
#include "td/utils/Slice.h" #include "td/utils/Slice.h"
#include "td/utils/Status.h" #include "td/utils/Status.h"
#include "td/utils/Storer.h" #include "td/utils/Storer.h"
#include "td/utils/StorerBase.h"
#include "td/utils/tl_parsers.h" #include "td/utils/tl_parsers.h"
#include "td/utils/tl_storers.h" #include "td/utils/tl_storers.h"

View File

@ -10,6 +10,7 @@
#include "td/telegram/telegram_api.h" #include "td/telegram/telegram_api.h"
#include "td/utils/common.h" #include "td/utils/common.h"
#include "td/utils/Status.h"
#include "td/utils/StringBuilder.h" #include "td/utils/StringBuilder.h"
namespace td { namespace td {

View File

@ -20,6 +20,7 @@
#include "td/utils/crypto.h" #include "td/utils/crypto.h"
#include "td/utils/format.h" #include "td/utils/format.h"
#include "td/utils/logging.h" #include "td/utils/logging.h"
#include "td/utils/misc.h"
#include "td/utils/Random.h" #include "td/utils/Random.h"
#include "td/utils/Slice.h" #include "td/utils/Slice.h"
#include "td/utils/Time.h" #include "td/utils/Time.h"
@ -394,8 +395,7 @@ void PasswordManager::check_recovery_email_address_code(string code, Promise<Uni
} }
void PasswordManager::resend_recovery_email_address_code(Promise<Unit> promise) { void PasswordManager::resend_recovery_email_address_code(Promise<Unit> promise) {
auto query = auto query = G()->net_query_creator().create(create_storer(telegram_api::account_resendPasswordEmail()));
G()->net_query_creator().create(create_storer(telegram_api::account_resendPasswordEmail()));
send_with_promise(std::move(query), send_with_promise(std::move(query),
PromiseCreator::lambda([promise = std::move(promise)](Result<NetQueryPtr> r_query) mutable { PromiseCreator::lambda([promise = std::move(promise)](Result<NetQueryPtr> r_query) mutable {
auto r_result = fetch_result<telegram_api::account_resendPasswordEmail>(std::move(r_query)); auto r_result = fetch_result<telegram_api::account_resendPasswordEmail>(std::move(r_query));

View File

@ -31,6 +31,7 @@
#include "td/utils/overloaded.h" #include "td/utils/overloaded.h"
#include "td/utils/Random.h" #include "td/utils/Random.h"
#include "td/utils/ScopeGuard.h" #include "td/utils/ScopeGuard.h"
#include "td/utils/StorerBase.h"
#include "td/utils/Time.h" #include "td/utils/Time.h"
#include "td/utils/tl_parsers.h" #include "td/utils/tl_parsers.h"

View File

@ -1135,7 +1135,8 @@ class WebPagesManager::PageBlockList : public PageBlock {
vector<Item> items; vector<Item> items;
static td_api::object_ptr<td_api::pageBlockListItem> get_page_block_list_item_object(const Item &item) { static td_api::object_ptr<td_api::pageBlockListItem> get_page_block_list_item_object(const Item &item) {
return td_api::make_object<td_api::pageBlockListItem>(item.label.empty() ? "" : item.label, // if label is empty, then Bullet U+2022 is used as a label
return td_api::make_object<td_api::pageBlockListItem>(item.label.empty() ? "\xE2\x80\xA2" : item.label,
get_page_block_objects(item.page_blocks)); get_page_block_objects(item.page_blocks));
} }

View File

@ -8,13 +8,11 @@
#include "td/telegram/files/FileData.h" #include "td/telegram/files/FileData.h"
#include "td/telegram/DialogId.h"
#include "td/telegram/FileReferenceManager.h" #include "td/telegram/FileReferenceManager.h"
#include "td/telegram/FileReferenceManager.hpp" #include "td/telegram/FileReferenceManager.hpp"
#include "td/telegram/files/FileEncryptionKey.h" #include "td/telegram/files/FileEncryptionKey.h"
#include "td/telegram/files/FileLocation.h" #include "td/telegram/files/FileLocation.h"
#include "td/telegram/files/FileLocation.hpp" #include "td/telegram/files/FileLocation.hpp"
#include "td/telegram/files/FileSourceId.h"
#include "td/telegram/Global.h" #include "td/telegram/Global.h"
#include "td/telegram/Td.h" #include "td/telegram/Td.h"

View File

@ -14,7 +14,7 @@
#include "td/utils/logging.h" #include "td/utils/logging.h"
#include "td/utils/Slice.h" #include "td/utils/Slice.h"
#include "td/utils/Status.h" #include "td/utils/Status.h"
#include "td/utils/Storer.h" #include "td/utils/StorerBase.h"
#include "td/utils/StringBuilder.h" #include "td/utils/StringBuilder.h"
#include "td/utils/tl_helpers.h" #include "td/utils/tl_helpers.h"
#include "td/utils/tl_parsers.h" #include "td/utils/tl_parsers.h"

View File

@ -13,7 +13,6 @@
#include "td/utils/buffer.h" #include "td/utils/buffer.h"
#include "td/utils/format.h" #include "td/utils/format.h"
#include "td/utils/logging.h" #include "td/utils/logging.h"
#include "td/utils/Storer.h"
#include "td/utils/StringBuilder.h" #include "td/utils/StringBuilder.h"
#include "td/utils/tl_helpers.h" #include "td/utils/tl_helpers.h"

View File

@ -12,7 +12,7 @@
#include "td/utils/buffer.h" #include "td/utils/buffer.h"
#include "td/utils/ObjectPool.h" #include "td/utils/ObjectPool.h"
#include "td/utils/Storer.h" #include "td/utils/StorerBase.h"
namespace td { namespace td {

View File

@ -19,6 +19,7 @@
#include "td/utils/port/RwMutex.h" #include "td/utils/port/RwMutex.h"
#include "td/utils/Slice.h" #include "td/utils/Slice.h"
#include "td/utils/Status.h" #include "td/utils/Status.h"
#include "td/utils/StorerBase.h"
#include "td/utils/tl_parsers.h" #include "td/utils/tl_parsers.h"
#include "td/utils/tl_storers.h" #include "td/utils/tl_storers.h"

View File

@ -13,6 +13,7 @@
#include "td/utils/Slice.h" #include "td/utils/Slice.h"
#include "td/utils/Status.h" #include "td/utils/Status.h"
#include "td/utils/Storer.h" #include "td/utils/Storer.h"
#include "td/utils/StorerBase.h"
#include "td/utils/StringBuilder.h" #include "td/utils/StringBuilder.h"
namespace td { namespace td {

View File

@ -11,7 +11,6 @@
#include "td/db/binlog/BinlogEvent.h" #include "td/db/binlog/BinlogEvent.h"
#include "td/utils/common.h" #include "td/utils/common.h"
#include "td/utils/Storer.h"
namespace td { namespace td {

View File

@ -6,11 +6,13 @@
// //
#include "td/net/GetHostByNameActor.h" #include "td/net/GetHostByNameActor.h"
#include "td/net/HttpQuery.h"
#include "td/net/SslStream.h" #include "td/net/SslStream.h"
#include "td/net/Wget.h" #include "td/net/Wget.h"
#include "td/utils/JsonBuilder.h" #include "td/utils/JsonBuilder.h"
#include "td/utils/logging.h" #include "td/utils/logging.h"
#include "td/utils/misc.h"
#include "td/utils/Slice.h" #include "td/utils/Slice.h"
#include "td/utils/Time.h" #include "td/utils/Time.h"
@ -134,7 +136,7 @@ void GetHostByNameActor::run(string host, int port, bool prefer_ipv6, Promise<IP
auto &value = cache_[prefer_ipv6].emplace(ascii_host, Value{{}, 0}).first->second; auto &value = cache_[prefer_ipv6].emplace(ascii_host, Value{{}, 0}).first->second;
auto begin_time = Time::now(); auto begin_time = Time::now();
if (value.expire_at > begin_time) { if (value.expires_at > begin_time) {
return promise.set_result(value.get_ip_port(port)); return promise.set_result(value.get_ip_port(port));
} }

View File

@ -14,6 +14,7 @@
#include "td/utils/Status.h" #include "td/utils/Status.h"
#include <unordered_map> #include <unordered_map>
#include <utility>
namespace td { namespace td {
@ -42,9 +43,9 @@ class GetHostByNameActor final : public Actor {
struct Value { struct Value {
Result<IPAddress> ip; Result<IPAddress> ip;
double expire_at; double expires_at;
Value(Result<IPAddress> ip, double expire_at) : ip(std::move(ip)), expire_at(expire_at) { Value(Result<IPAddress> ip, double expires_at) : ip(std::move(ip)), expires_at(expires_at) {
} }
Result<IPAddress> get_ip_port(int port) const { Result<IPAddress> get_ip_port(int port) const {