summaryrefslogtreecommitdiff
path: root/src/busloop.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/busloop.h')
-rw-r--r--src/busloop.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/busloop.h b/src/busloop.h
new file mode 100644
index 0000000..1eab8b6
--- /dev/null
+++ b/src/busloop.h
@@ -0,0 +1,39 @@
+#ifndef _BUSLOOP_H
+#define _BUSLOOP_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "buschannel.h"
+
+/* general Handle */
+
+#define ANYPORT 0
+
+#ifdef WIN32
+#include <windows.h>
+#define HANDLE SOCKET
+#else
+#define HANDLE int
+#endif
+
+extern void BusLoopChannelInit(void);
+extern void BusLoopChannelStop(void);
+extern void BusLoopChannelMainLoop(void(*hook)(void) );
+
+extern Channel BusLoopChannelSetUp(
+ HANDLE fd,
+ void *data,
+ ChannelHandleDelete handle_delete,
+ ChannelHandleRead handle_read
+ );
+
+extern void BusLoopChannelClose( Channel channel );
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif