From d090d7150e3814ecd436e68bd3e247eda880ee58 Mon Sep 17 00:00:00 2001 From: fcolin Date: Mon, 3 Aug 1998 13:04:08 +0000 Subject: Ajout des fonctions pour permettre la gestion par des boucles autres que XT et Interne( select ) buschannel.h : Interface avec gestion MainLoop busloop.[ch] : Implementation MainLoop par select busxtloop.[ch] : Implementation MainLoop par Appel Xt --- src/busloop.h | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/busloop.h (limited to 'src/busloop.h') 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 +#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 -- cgit v1.1