summaryrefslogtreecommitdiff
path: root/src/ivyglibloop.c
diff options
context:
space:
mode:
authorfcolin2005-05-26 14:37:35 +0000
committerfcolin2005-05-26 14:37:35 +0000
commitfbc04d171cd11ec16b9141dda95699323762a00b (patch)
treef2452251df738bc7d1995c636fd06e82e8f90c10 /src/ivyglibloop.c
parentdeaa6a5ec82c1d158caf360fd12672f72d7dae5b (diff)
downloadivy-c-fbc04d171cd11ec16b9141dda95699323762a00b.zip
ivy-c-fbc04d171cd11ec16b9141dda95699323762a00b.tar.gz
ivy-c-fbc04d171cd11ec16b9141dda95699323762a00b.tar.bz2
ivy-c-fbc04d171cd11ec16b9141dda95699323762a00b.tar.xz
passage du separateur de message a \0
suppression des fonctions IvyChannel dynamique on se repose sur le linker modif des adresses mails
Diffstat (limited to 'src/ivyglibloop.c')
-rw-r--r--src/ivyglibloop.c22
1 files changed, 10 insertions, 12 deletions
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);
}
-