aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorThomas Harning Jr <harningt@gmail.com>2007-09-05 22:48:49 -0400
committerThomas Harning Jr <harningt@gmail.com>2007-09-05 22:48:49 -0400
commit47d29aee95d93ef45c6e372f789a0de2c2643813 (patch)
treee4a49850effc11c06c81b8884159ace3390df22c /include
parent979040daddebcd90093c174006c5f13bfa085927 (diff)
downloadluaevent-prosody-47d29aee95d93ef45c6e372f789a0de2c2643813.tar.gz
luaevent-prosody-47d29aee95d93ef45c6e372f789a0de2c2643813.zip
Beginning refactoring of the event_callback outside of the core
Diffstat (limited to 'include')
-rw-r--r--include/event_callback.h24
-rw-r--r--include/luaevent.h6
2 files changed, 24 insertions, 6 deletions
diff --git a/include/event_callback.h b/include/event_callback.h
new file mode 100644
index 0000000..e6e60c4
--- /dev/null
+++ b/include/event_callback.h
@@ -0,0 +1,24 @@
+/* LuaEvent - Copyright (C) 2007 Thomas Harning <harningt@gmail.com>
+ * Licensed as LGPL - See doc/COPYING for details */
+#ifndef EVENT_CALLBACK
+#define EVENT_CALLBACK
+
+#include "luaevent.h"
+#include <lua.h>
+#include <sys/types.h>
+#include <sys/time.h>
+#include <event.h>
+
+#define EVENT_CALLBACK_ARG_MT "EVENT_CALLBACK_ARG_MT"
+
+typedef struct {
+ struct event ev;
+ le_base* base;
+ int callbackRef;
+} le_callback;
+
+int event_callback_register(lua_State* L);
+
+void luaevent_callback(int fd, short event, void* p);
+
+#endif
diff --git a/include/luaevent.h b/include/luaevent.h
index 2878632..ce2624e 100644
--- a/include/luaevent.h
+++ b/include/luaevent.h
@@ -13,12 +13,6 @@ typedef struct {
lua_State* loop_L;
} le_base;
-typedef struct {
- struct event ev;
- le_base* base;
- int callbackRef;
-} le_callback;
-
int luaopen_luaevent(lua_State* L);
#endif