aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorThomas Harning Jr <harningt@gmail.com>2007-09-21 14:35:11 -0400
committerThomas Harning Jr <harningt@gmail.com>2007-09-21 14:35:11 -0400
commite652e93f7d73f67c6bb5299c9df14d42b66dba7d (patch)
tree57a6e77f4efbd2d37404e2ee627e154fe4a7940a /include
parent68bd2b507fa935eb491479b10e53a97b17994cb5 (diff)
downloadluaevent-prosody-e652e93f7d73f67c6bb5299c9df14d42b66dba7d.tar.gz
luaevent-prosody-e652e93f7d73f67c6bb5299c9df14d42b66dba7d.zip
buffer_event is born, albeit w/ deformities. Can construct instances but not use, yet.
Diffstat (limited to 'include')
-rw-r--r--include/buffer_event.h21
-rw-r--r--include/utility.h13
2 files changed, 34 insertions, 0 deletions
diff --git a/include/buffer_event.h b/include/buffer_event.h
new file mode 100644
index 0000000..960b576
--- /dev/null
+++ b/include/buffer_event.h
@@ -0,0 +1,21 @@
+/* LuaEvent - Copyright (C) 2007 Thomas Harning <harningt@gmail.com>
+ * Licensed as LGPL - See doc/COPYING for details */
+ #ifndef BUFFER_EVENT_H
+ #define BUFFER_EVENT_H
+
+#include "luaevent.h"
+#include <lua.h>
+#include <sys/types.h>
+#include <sys/time.h>
+#include <event.h>
+
+typedef struct {
+ struct bufferevent* ev;
+ le_base* base;
+} le_bufferevent;
+
+int buffer_event_register(lua_State* L);
+int is_buffer_event(lua_State* L, int idx);
+le_bufferevent* buffer_event_check(lua_State* L, int idx);
+
+#endif
diff --git a/include/utility.h b/include/utility.h
new file mode 100644
index 0000000..f5afcfc
--- /dev/null
+++ b/include/utility.h
@@ -0,0 +1,13 @@
+/* LuaEvent - Copyright (C) 2007 Thomas Harning <harningt@gmail.com>
+ * Licensed as LGPL - See doc/COPYING for details */
+#ifndef UTILITY_H
+#define UTILITY_H
+
+#include <lua.h>
+
+void le_weak_ref(lua_State* L, void* ptr, int idx);
+void le_weak_unref(lua_State* L, void* ptr);
+void le_weak_get(lua_State* L, void* ptr);
+
+void le_register_utility(lua_State* L);
+#endif