Jabber WindowGram Client (JWGC)

Introduction Screenshots Installation Downloads
Documentation Browse Source Resources Project Site

Stable Version
-none-

Latest Version
beta5



Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

mux.h

Go to the documentation of this file.
00001 #ifndef mux_MODULE
00002 #define mux_MODULE
00003 
00004 /*
00005  *      Copyright (c) 1989 by the Massachusetts Institute of Technology.
00006  *      For copying and distribution information, see the file
00007  *      "mit-copyright.h".
00008  *
00009  *      Modified for jwgc by Daniel Henninger.
00010  */
00011 
00012 #include "mit-copyright.h"
00013 
00014 /*
00015  * MAX_SOURCES - the greatest file descriptor # that can be waited on minus one
00016  *               This can not exceed FD_SETSIZE from <sys/types.h>.
00017  */
00018 
00019 #define  MAX_SOURCES  32
00020 
00021 /*
00022  * mux_end_loop_p - Setting this to true during a mux_loop causes the mux_loop
00023  *                  to be exited.
00024  */
00025 
00026 extern int mux_end_loop_p;
00027 
00028 /*
00029  *    void mux_init()
00030  *        Requires: mux_init has never been called before
00031  *        Effects: Initializes the mux module.  Must be called before
00032  *                 any other mux call.
00033  */
00034 
00035 extern void mux_init();
00036 
00037 /*
00038  *    void mux_add_input_source(int descriptior; void (*handler)(); void *arg)
00039  *        Requires: 0<=descriptor<MAX_SOURCES, mux_init has been called
00040  *        Modifies: Removes the previous input handler if any for descriptor
00041  *        Effects: Registers handler as the input handler for file descriptor
00042  *                 descriptor.  When mux_loop() is running and input is
00043  *                 available on descriptor, handler will be called with
00044  *                 argument arg.
00045  */
00046 
00047 extern void mux_add_input_source();
00048 extern void mux_delete_input_source();
00049 
00050 /*
00051  *    void mux_loop()
00052  *        Requires: mux_init has been called.
00053  *        Effects: Loops until mux_end_loop_p becomes true.  (Sets
00054  *                 mux_end_loop_p false to start).  Whenever input is
00055  *                 available on an input source which has a registered
00056  *                 handler (see mux_add_input_source), that handler is
00057  *                 called with its argument.  It is guarenteed that if
00058  *                 input is available on a source, its respective input
00059  *                 handler, if any, will eventually be called.  No other
00060  *                 ordering guarentees are made.  When some signal handler
00061  *                 or input handler eventually sets mux_end_loop_p to
00062  *                 true, we return.
00063  */
00064 
00065 extern void mux_loop();
00066 
00067 #endif


Last updated at Tue Dec 18 21:07:42 PST 2007. This site and project hosted by...SourceForge.net Logo
Source Perspective by Fisheye