diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2016-03-23 15:50:14 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2016-03-23 15:50:14 +0000 |
commit | 0b60fcc5772e91c80c52527ab6554ed25a05bab0 (patch) | |
tree | 5e93c63fce34c4b6e90559e7062da6313760af4c /protocols/Telegram/src/t_proto.cpp | |
parent | c49db60246165780c37b86ba8a084d31c5cc5446 (diff) |
Telegram: more initial code
git-svn-id: http://svn.miranda-ng.org/main/trunk@16528 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Telegram/src/t_proto.cpp')
-rw-r--r-- | protocols/Telegram/src/t_proto.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
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 <http://www.gnu.org/licenses/>. CTelegramProto::CTelegramProto(const char* protoName, const TCHAR* userName) : PROTO<CTelegramProto>(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()
|