From cf6686206e050f0e010f76e5ff33b1d8c1e20c5b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 2 Dec 2022 16:36:46 +0300 Subject: Telegram: the first version that could be compiled --- protocols/Telegram/src/main.cpp | 7 +++++++ protocols/Telegram/src/mt_proto.cpp | 5 +++-- protocols/Telegram/src/mt_proto.h | 2 ++ protocols/Telegram/src/stdafx.cxx | 2 +- protocols/Telegram/src/stdafx.h | 6 ++++++ 5 files changed, 19 insertions(+), 3 deletions(-) (limited to 'protocols/Telegram/src') diff --git a/protocols/Telegram/src/main.cpp b/protocols/Telegram/src/main.cpp index 0315936c3f..07a551794b 100644 --- a/protocols/Telegram/src/main.cpp +++ b/protocols/Telegram/src/main.cpp @@ -3,6 +3,13 @@ int hLangpack; CMPlugin g_plugin; +#pragma comment(lib, "tdactor.lib") +#pragma comment(lib, "tdcore.lib") +#pragma comment(lib, "tddb.lib") +#pragma comment(lib, "tdlib.lib") +#pragma comment(lib, "tdnet.lib") +#pragma comment(lib, "tdutils.lib") + ///////////////////////////////////////////////////////////////////////////////////////// static PLUGININFOEX pluginInfo = diff --git a/protocols/Telegram/src/mt_proto.cpp b/protocols/Telegram/src/mt_proto.cpp index 7766f29025..8d7b0123e5 100644 --- a/protocols/Telegram/src/mt_proto.cpp +++ b/protocols/Telegram/src/mt_proto.cpp @@ -1,7 +1,8 @@ #include "stdafx.h" -CMTProto::CMTProto(const char* protoName, const wchar_t* userName) - : PROTO(protoName, userName) +CMTProto::CMTProto(const char* protoName, const wchar_t* userName) : + PROTO(protoName, userName), + client_manager_(std::make_unique()) { } diff --git a/protocols/Telegram/src/mt_proto.h b/protocols/Telegram/src/mt_proto.h index 9626d9bda7..22f5a5352f 100644 --- a/protocols/Telegram/src/mt_proto.h +++ b/protocols/Telegram/src/mt_proto.h @@ -2,6 +2,8 @@ struct CMTProto : public PROTO { + std::unique_ptr client_manager_; + public: ////////////////////////////////////////////////////////////////////////////////////// // Ctors diff --git a/protocols/Telegram/src/stdafx.cxx b/protocols/Telegram/src/stdafx.cxx index 1ab0efee94..d265a4c02e 100644 --- a/protocols/Telegram/src/stdafx.cxx +++ b/protocols/Telegram/src/stdafx.cxx @@ -15,4 +15,4 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "stdafx.h" \ No newline at end of file +#include "stdafx.h" diff --git a/protocols/Telegram/src/stdafx.h b/protocols/Telegram/src/stdafx.h index f039dc6474..f8658bacb0 100644 --- a/protocols/Telegram/src/stdafx.h +++ b/protocols/Telegram/src/stdafx.h @@ -3,6 +3,8 @@ #include +#include + #include #include @@ -11,6 +13,10 @@ #include #include +#include "td/telegram/Client.h" +#include "td/telegram/td_api.h" +#include "td/telegram/td_api.hpp" + struct CMTProto; #define MODULE "Telegram" -- cgit v1.2.3