From 0b60fcc5772e91c80c52527ab6554ed25a05bab0 Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Wed, 23 Mar 2016 15:50:14 +0000 Subject: Telegram: more initial code git-svn-id: http://svn.miranda-ng.org/main/trunk@16528 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Telegram/src/t_proto.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'protocols/Telegram/src/t_proto.cpp') diff --git a/protocols/Telegram/src/t_proto.cpp b/protocols/Telegram/src/t_proto.cpp index d87895a0cd..fd495a7f5f 100644 --- a/protocols/Telegram/src/t_proto.cpp +++ b/protocols/Telegram/src/t_proto.cpp @@ -19,15 +19,18 @@ along with this program. If not, see . CTelegramProto::CTelegramProto(const char* protoName, const TCHAR* userName) : PROTO(protoName, userName) { - tgl_register_app_id(&tgl, TELEGRAM_APP_ID, TELEGRAM_API_HASH); - char version[64]; - mir_snprintf(version, "Miranda Telegram %d.%d.%d.%d", __MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM); - tgl_set_app_version(&tgl, version); - tgl_init(&tgl); + TLS = new MirTLS; - tgl_update_callback tgucb = {}; + InitNetwork(); + tgl_set_timer_methods(TLS, &tgl_libevent_timers); + tgl_set_rsa_key(TLS, TELEGRAM_PUBLIC_KEY); + tgl_register_app_id(TLS, TELEGRAM_API_ID, TELEGRAM_API_HASH); + tgl_set_app_version(TLS, g_szMirVer); + + + tgl_init(TLS); } CTelegramProto::~CTelegramProto() -- cgit v1.2.3