From fbc04d171cd11ec16b9141dda95699323762a00b Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 26 May 2005 14:37:35 +0000 Subject: passage du separateur de message a \0 suppression des fonctions IvyChannel dynamique on se repose sur le linker modif des adresses mails --- src/ivyglibloop.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'src/ivyglibloop.c') diff --git a/src/ivyglibloop.c b/src/ivyglibloop.c index 968824a..438e22d 100644 --- a/src/ivyglibloop.c +++ b/src/ivyglibloop.c @@ -39,9 +39,6 @@ struct _channel { static int channel_initialized = 0; -ChannelInit channel_init = IvyGlibChannelInit; -ChannelSetUp channel_setup = IvyGlibChannelSetUp; -ChannelClose channel_close = IvyGlibChannelClose; static gboolean IvyGlibHandleChannelRead(GIOChannel *source, GIOCondition condition, @@ -52,7 +49,7 @@ static gboolean IvyGlibHandleChannelDelete(GIOChannel *source, gpointer data); -void IvyGlibChannelInit(void) { +void IvyChannelInit(void) { if ( channel_initialized ) return; /* fixes bug when another app coredumps */ #ifndef WIN32 @@ -61,9 +58,13 @@ void IvyGlibChannelInit(void) { channel_initialized = 1; } +void IvyChannelStop( ) +{ + channel_initialized = 0; +} -Channel IvyGlibChannelSetUp(HANDLE fd, void *data, +Channel IvyChannelOpen(HANDLE fd, void *data, ChannelHandleDelete handle_delete, ChannelHandleRead handle_read ) { @@ -88,13 +89,12 @@ Channel IvyGlibChannelSetUp(HANDLE fd, void *data, -void IvyGlibChannelClose( Channel channel ) { +void IvyChannelClose( Channel channel ) { if ( channel->handle_delete ) (*channel->handle_delete)( channel->data ); g_source_remove( channel->id_read ); g_source_remove( channel->id_delete ); } - static gboolean IvyGlibHandleChannelRead(GIOChannel *source, GIOCondition condition, @@ -118,10 +118,8 @@ static gboolean IvyGlibHandleChannelDelete(GIOChannel *source, return TRUE; } - -void -IvyStop () +void IvyMainLoop(void(*hook)(void)) { - /* To be implemented */ + GMainLoop *ml = g_main_loop_new(NULL, FALSE); + g_main_loop_run(ml); } - -- cgit v1.1