Move DhCallback to a separate header.
This commit is contained in:
parent
61664b4044
commit
040e0deb31
@ -6,6 +6,7 @@
|
|||||||
//
|
//
|
||||||
#include "td/utils/benchmark.h"
|
#include "td/utils/benchmark.h"
|
||||||
|
|
||||||
|
#include "td/mtproto/DhCallback.h"
|
||||||
#include "td/mtproto/DhHandshake.h"
|
#include "td/mtproto/DhHandshake.h"
|
||||||
|
|
||||||
#include "td/utils/base64.h"
|
#include "td/utils/base64.h"
|
||||||
|
29
td/mtproto/DhCallback.h
Normal file
29
td/mtproto/DhCallback.h
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
//
|
||||||
|
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2021
|
||||||
|
//
|
||||||
|
// 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/utils/Slice.h"
|
||||||
|
|
||||||
|
namespace td {
|
||||||
|
namespace mtproto {
|
||||||
|
|
||||||
|
class DhCallback {
|
||||||
|
public:
|
||||||
|
DhCallback() = default;
|
||||||
|
DhCallback(const DhCallback &) = delete;
|
||||||
|
DhCallback &operator=(const DhCallback &) = delete;
|
||||||
|
DhCallback(DhCallback &&) = delete;
|
||||||
|
DhCallback &operator=(DhCallback &&) = delete;
|
||||||
|
virtual ~DhCallback() = default;
|
||||||
|
|
||||||
|
virtual int is_good_prime(Slice prime_str) const = 0;
|
||||||
|
virtual void add_good_prime(Slice prime_str) const = 0;
|
||||||
|
virtual void add_bad_prime(Slice prime_str) const = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace mtproto
|
||||||
|
} // namespace td
|
@ -6,6 +6,8 @@
|
|||||||
//
|
//
|
||||||
#include "td/mtproto/DhHandshake.h"
|
#include "td/mtproto/DhHandshake.h"
|
||||||
|
|
||||||
|
#include "td/mtproto/DhCallback.h"
|
||||||
|
|
||||||
#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"
|
||||||
|
@ -16,19 +16,7 @@
|
|||||||
namespace td {
|
namespace td {
|
||||||
namespace mtproto {
|
namespace mtproto {
|
||||||
|
|
||||||
class DhCallback {
|
class DhCallback;
|
||||||
public:
|
|
||||||
DhCallback() = default;
|
|
||||||
DhCallback(const DhCallback &) = delete;
|
|
||||||
DhCallback &operator=(const DhCallback &) = delete;
|
|
||||||
DhCallback(DhCallback &&) = delete;
|
|
||||||
DhCallback &operator=(DhCallback &&) = delete;
|
|
||||||
virtual ~DhCallback() = default;
|
|
||||||
|
|
||||||
virtual int is_good_prime(Slice prime_str) const = 0;
|
|
||||||
virtual void add_good_prime(Slice prime_str) const = 0;
|
|
||||||
virtual void add_bad_prime(Slice prime_str) const = 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
class DhHandshake {
|
class DhHandshake {
|
||||||
public:
|
public:
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
//
|
//
|
||||||
#include "td/mtproto/Handshake.h"
|
#include "td/mtproto/Handshake.h"
|
||||||
|
|
||||||
|
#include "td/mtproto/DhHandshake.h"
|
||||||
#include "td/mtproto/KDF.h"
|
#include "td/mtproto/KDF.h"
|
||||||
#include "td/mtproto/mtproto_api.h"
|
#include "td/mtproto/mtproto_api.h"
|
||||||
#include "td/mtproto/utils.h"
|
#include "td/mtproto/utils.h"
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "td/mtproto/AuthKey.h"
|
#include "td/mtproto/AuthKey.h"
|
||||||
#include "td/mtproto/DhHandshake.h"
|
|
||||||
#include "td/mtproto/RSA.h"
|
#include "td/mtproto/RSA.h"
|
||||||
|
|
||||||
#include "td/utils/buffer.h"
|
#include "td/utils/buffer.h"
|
||||||
@ -24,6 +23,8 @@ class Object;
|
|||||||
|
|
||||||
namespace mtproto {
|
namespace mtproto {
|
||||||
|
|
||||||
|
class DhCallback;
|
||||||
|
|
||||||
class AuthKeyHandshakeContext {
|
class AuthKeyHandshakeContext {
|
||||||
public:
|
public:
|
||||||
virtual ~AuthKeyHandshakeContext() = default;
|
virtual ~AuthKeyHandshakeContext() = default;
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "td/mtproto/DhHandshake.h"
|
#include "td/mtproto/DhCallback.h"
|
||||||
|
|
||||||
#include "td/utils/Slice.h"
|
#include "td/utils/Slice.h"
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
#include "td/telegram/UserId.h"
|
#include "td/telegram/UserId.h"
|
||||||
|
|
||||||
#include "td/mtproto/AuthKey.h"
|
#include "td/mtproto/AuthKey.h"
|
||||||
|
#include "td/mtproto/DhCallback.h"
|
||||||
#include "td/mtproto/DhHandshake.h"
|
#include "td/mtproto/DhHandshake.h"
|
||||||
|
|
||||||
#include "td/actor/actor.h"
|
#include "td/actor/actor.h"
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#include "td/telegram/secret_api.h"
|
#include "td/telegram/secret_api.h"
|
||||||
#include "td/telegram/telegram_api.hpp"
|
#include "td/telegram/telegram_api.hpp"
|
||||||
|
|
||||||
#include "td/mtproto/DhHandshake.h"
|
#include "td/mtproto/DhCallback.h"
|
||||||
|
|
||||||
#include "td/actor/PromiseFuture.h"
|
#include "td/actor/PromiseFuture.h"
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@
|
|||||||
|
|
||||||
#include "td/db/binlog/BinlogEvent.h"
|
#include "td/db/binlog/BinlogEvent.h"
|
||||||
|
|
||||||
#include "td/mtproto/DhHandshake.h"
|
#include "td/mtproto/DhCallback.h"
|
||||||
#include "td/mtproto/Handshake.h"
|
#include "td/mtproto/Handshake.h"
|
||||||
#include "td/mtproto/HandshakeActor.h"
|
#include "td/mtproto/HandshakeActor.h"
|
||||||
#include "td/mtproto/RawConnection.h"
|
#include "td/mtproto/RawConnection.h"
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include "td/telegram/StateManager.h"
|
#include "td/telegram/StateManager.h"
|
||||||
#include "td/telegram/UniqueId.h"
|
#include "td/telegram/UniqueId.h"
|
||||||
|
|
||||||
#include "td/mtproto/DhHandshake.h"
|
#include "td/mtproto/DhCallback.h"
|
||||||
#include "td/mtproto/Handshake.h"
|
#include "td/mtproto/Handshake.h"
|
||||||
#include "td/mtproto/HandshakeActor.h"
|
#include "td/mtproto/HandshakeActor.h"
|
||||||
#include "td/mtproto/RawConnection.h"
|
#include "td/mtproto/RawConnection.h"
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
#include "td/telegram/NotificationManager.h"
|
#include "td/telegram/NotificationManager.h"
|
||||||
|
|
||||||
#include "td/mtproto/AuthData.h"
|
#include "td/mtproto/AuthData.h"
|
||||||
|
#include "td/mtproto/DhCallback.h"
|
||||||
#include "td/mtproto/DhHandshake.h"
|
#include "td/mtproto/DhHandshake.h"
|
||||||
#include "td/mtproto/Handshake.h"
|
#include "td/mtproto/Handshake.h"
|
||||||
#include "td/mtproto/HandshakeActor.h"
|
#include "td/mtproto/HandshakeActor.h"
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#include "td/db/BinlogKeyValue.h"
|
#include "td/db/BinlogKeyValue.h"
|
||||||
#include "td/db/DbKey.h"
|
#include "td/db/DbKey.h"
|
||||||
|
|
||||||
#include "td/mtproto/DhHandshake.h"
|
#include "td/mtproto/DhCallback.h"
|
||||||
#include "td/mtproto/utils.h"
|
#include "td/mtproto/utils.h"
|
||||||
|
|
||||||
#include "td/tl/tl_object_parse.h"
|
#include "td/tl/tl_object_parse.h"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user