1 /* 2 * linc.h: This file is part of the linc library. 3 * 4 * Authors: 5 * Elliot Lee (sopwith@redhat.com) 6 * Michael Meeks (michael@ximian.com) 7 * Mark McLouglin (mark@skynet.ie) & others 8 * 9 * Copyright 2001, Red Hat, Inc., Ximian, Inc., 10 * Sun Microsystems, Inc. 11 */ 12 #ifndef _LINK_H_ 13 #define _LINK_H_ 14 15 #include <linc/linc-config.h> 16 #include <linc/linc-types.h> 17 #include <linc/linc-protocol.h> 18 #include <linc/linc-connection.h> 19 #include <linc/linc-server.h> 20 #include <linc/linc-source.h> 21 22 G_BEGIN_DECLS 23 24 extern GMainLoop *link_loop; 25 26 void link_init (gboolean thread_safe); 27 void link_set_io_thread (gboolean io_in_thread); 28 void link_shutdown (void); 29 void link_main_iteration (gboolean block_for_reply); 30 gboolean link_main_pending (void); 31 void link_main_loop_run (void); 32 GMainLoop *link_main_get_loop (void); 33 guint link_main_idle_add (GSourceFunc function, 34 gpointer data); 35 36 void link_wait (void); 37 void link_signal (void); 38 39 gboolean link_thread_io (void); 40 gboolean link_thread_safe (void); 41 42 guint link_io_thread_add_timeout (guint interval, 43 GSourceFunc function, 44 gpointer data); 45 void link_io_thread_remove_timeout (guint source_id); 46 47 #ifdef G_OS_WIN32 48 void link_map_winsock_error_to_errno (void); 49 #endif 50 51 int link_pipe (int *handles); /* Creates a pipe on Unix, a TCP socket pair on Windows */ 52 53 G_END_DECLS 54 55 #endif /* _LINK_H_ */ 56