summaryrefslogtreecommitdiff
path: root/protocols/Telegram/src/t_timers.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <Mataes2007@gmail.com>2017-11-29 09:33:41 +0300
committerKirill Volinsky <Mataes2007@gmail.com>2017-11-29 09:33:41 +0300
commit89f3cf8bbb9dc1fa0fe72f6af6638ac086c7e011 (patch)
tree5be9a7ae2255b9ad420bed266b90b1f98059964a /protocols/Telegram/src/t_timers.cpp
parente28c4adb361a87e143eb8cb2af449e3bcb3375b1 (diff)
libevent, telegram, whatsapp moved to deprecated coz doesn't work
Diffstat (limited to 'protocols/Telegram/src/t_timers.cpp')
-rw-r--r--protocols/Telegram/src/t_timers.cpp56
1 files changed, 0 insertions, 56 deletions
diff --git a/protocols/Telegram/src/t_timers.cpp b/protocols/Telegram/src/t_timers.cpp
deleted file mode 100644
index 296242856d..0000000000
--- a/protocols/Telegram/src/t_timers.cpp
+++ /dev/null
@@ -1,56 +0,0 @@
-
-#include "stdafx.h"
-
-extern HANDLE hQueue;
-
-struct tgl_timer
-{
- tgl_state *TLS;
- void(*cb)(struct tgl_state *TLS, void *arg);
- void *arg;
- HANDLE hTimer;
-};
-
-VOID CALLBACK WaitOrTimerCallback(_In_ PVOID lpParameter, _In_ BOOLEAN TimerOrWaitFired)
-{
- tgl_timer *p = (tgl_timer*)lpParameter;
- p->cb(p->TLS, p->arg);
- p->hTimer = 0;
-}
-
-
-struct tgl_timer *mtgl_timer_alloc (struct tgl_state *TLS, void (*cb)(struct tgl_state *TLS, void *arg), void *arg)
-{
- tgl_timer *p = (tgl_timer *)mir_calloc(sizeof (tgl_timer));
- p->TLS = TLS;
- p->cb = cb;
- p->arg = arg;
- return p;
-}
-
-void mtgl_timer_insert (struct tgl_timer *t, double p)
-{
- HANDLE hNewTimer = 0;
- CreateTimerQueueTimer(&hNewTimer, hQueue, WaitOrTimerCallback, t, (DWORD)(p * 1000), 0, 0);
- t->hTimer = hNewTimer;
-}
-
-void mtgl_timer_delete (struct tgl_timer *t)
-{
- DeleteTimerQueueTimer(hQueue, t->hTimer, 0);
- t->hTimer = 0;
-}
-
-void mtgl_timer_free (struct tgl_timer *t)
-{
- if (t->hTimer) mtgl_timer_delete(t);
- mir_free(t);
-}
-
-
-struct tgl_timer_methods mtgl_libevent_timers = {
- mtgl_timer_alloc,
- mtgl_timer_insert,
- mtgl_timer_delete,
- mtgl_timer_free
-}; \ No newline at end of file