diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/buffer_event.h | 21 | ||||
-rw-r--r-- | include/event_buffer.h | 3 | ||||
-rw-r--r-- | include/utility.h | 13 |
3 files changed, 37 insertions, 0 deletions
diff --git a/include/buffer_event.h b/include/buffer_event.h new file mode 100644 index 0000000..b3fe3c1 --- /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/event_buffer.h b/include/event_buffer.h index b34ea2d..a7b1525 100644 --- a/include/event_buffer.h +++ b/include/event_buffer.h @@ -14,5 +14,8 @@ typedef struct { } le_buffer; int event_buffer_register(lua_State* L); +int is_event_buffer(lua_State* L, int idx); +le_buffer* event_buffer_check(lua_State* L, int idx); +int event_buffer_push(lua_State* L, struct evbuffer* buffer); #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 |