summaryrefslogtreecommitdiff
path: root/protocols/Telegram/tgl/event-old.h
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2016-03-11 14:42:30 +0000
committerKirill Volinsky <mataes2007@gmail.com>2016-03-11 14:42:30 +0000
commitee75d9ae4a890d62b009444bed9512b4dab3ee1d (patch)
tree089d790ca21091372539ddd51f3762af232bf82d /protocols/Telegram/tgl/event-old.h
parentbb5bb4407f2578ed8d6dc3b41f6ddb8b798e560c (diff)
old version
git-svn-id: http://svn.miranda-ng.org/main/trunk@16458 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Telegram/tgl/event-old.h')
-rw-r--r--protocols/Telegram/tgl/event-old.h48
1 files changed, 0 insertions, 48 deletions
diff --git a/protocols/Telegram/tgl/event-old.h b/protocols/Telegram/tgl/event-old.h
deleted file mode 100644
index b920e68f02..0000000000
--- a/protocols/Telegram/tgl/event-old.h
+++ /dev/null
@@ -1,48 +0,0 @@
-#ifndef __EVENT_OLD_H__
-#define __EVENT_OLD_H__
-
-#include <assert.h>
-#include <stdlib.h>
-
-#define BEV_EVENT_READ EVBUFFER_READ
-#define BEV_EVENT_WRITE EVBUFFER_WRITE
-#define BEV_EVENT_EOF EVBUFFER_EOF
-#define BEV_EVENT_ERROR EVBUFFER_ERROR
-#define BEV_EVENT_TIMEOUT EVBUFFER_TIMEOUT
-
-typedef int evutil_socket_t;
-
-static inline struct event *event_new (struct event_base *base, int fd, int what, void(*callback)(int, short, void *), void *arg) __attribute__ ((unused));
-static inline struct event *event_new (struct event_base *base, int fd, int what, void(*callback)(int, short, void *), void *arg) {
- struct event *ev = malloc (sizeof (*ev));
- event_set (ev, fd, what, callback, arg);
- event_base_set (base, ev);
- return ev;
-}
-
-static inline struct event *evtimer_new (struct event_base *base, void(*callback)(int, short, void *), void *arg) __attribute__ ((unused));
-static inline struct event *evtimer_new (struct event_base *base, void(*callback)(int, short, void *), void *arg) {
- struct event *ev = malloc (sizeof (*ev));
- event_set (ev, -1, 0, callback, arg);
- event_base_set (base, ev);
- return ev;
-}
-
-static void event_free (struct event *ev) __attribute__ ((unused));
-static void event_free (struct event *ev) {
- event_del (ev);
- free (ev);
-}
-
-static struct bufferevent *bufferevent_socket_new (struct event_base *base, int fd, int flags) __attribute__ ((unused));
-static struct bufferevent *bufferevent_socket_new (struct event_base *base, int fd, int flags) {
- assert (!flags);
- struct bufferevent *bev = bufferevent_new(fd, 0, 0, 0, 0);
- bufferevent_base_set (base, bev);
- return bev;
-}
-
-static inline void *event_get_callback_arg(const struct event *ev) {
- return ev->ev_arg;
-}
-#endif