Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

GTaskEventDispatcher


Data Structures

struct  _GTaskEventDispatcher
struct  _GTaskEventDispatcherClass
struct  _GTaskEventDispatcherPrivate

Defines

#define GTASK_EVENT_DISPATCHER_TYPE   (gtask_event_dispatcher_get_type())
#define GTASK_EVENT_DISPATCHER(obj)
#define GTASK_EVENT_DISPATCHER_CLASS(klass)
#define GTASK_IS_EVENT_DISPATCHER(obj)
#define GTASK_IS_EVENT_DISPATCHER_CLASS(klass)
#define GTASK_EVENT_DISPATCHER_GET_CLASS(obj)

Typedefs

typedef _GTaskEventDispatcher GTaskEventDispatcher
typedef _GTaskEventDispatcherPrivate GTaskEventDispatcherPrivate
typedef _GTaskEventDispatcherClass GTaskEventDispatcherClass
typedef gboolean(* GTaskEventFunc )(GTaskEventDispatcher *, GObject *, gpointer)

Functions

GType gtask_event_dispatcher_get_type (void)
GTaskEventDispatchergtask_event_dispatcher_new_with_parser (GTaskStreamParser *parser)
 Creates a new GTaskEventDispatcher bound to the passed in GTaskStreamParser.

guint gtask_event_dispatcher_add_watch (GTaskEventDispatcher *dispatch, GType watch_type, GTaskEventFunc func, gpointer user_data)
 Adds a new watch to the GTaskEventDispatcher's watch list. Basically whenever the GTaskStreamParser passes back a GObject of GType watch_type your callback routine will be run.

void gtask_event_dispatcher_remove_watch (GTaskEventDispatcher *dispatch, guint watch_id)
 Removes a watch from the passed in GTaskEventDispatcher.

GTaskStreamParsergtask_event_dispatcher_get_stream_parser (GTaskEventDispatcher *dispatch)
 Returns the GTaskStreamParser for the passed in GTaskEventDispatcher.

gboolean gtask_event_dispatcher_private_parse_callback (GIOChannel *chann, GIOCondition cond, gpointer data)
 This is the callback that is generally run when the input GIOChannel on the GTaskConnection has data to read.


Define Documentation

#define GTASK_EVENT_DISPATCHER obj   ) 
 

Value:

(G_TYPE_CHECK_INSTANCE_CAST( (obj), \
                                            GTASK_EVENT_DISPATCHER_TYPE, \
                                            GTaskEventDispatcher ))
casts the passed in object to a GTaskEventDispatcher

Definition at line 19 of file gtask-event-dispatcher.h.

#define GTASK_EVENT_DISPATCHER_CLASS klass   ) 
 

Value:

(G_TYPE_CHECK_CLASS_CAST( (klass), \
                                             GTASK_EVENT_DISPATCHER_TYPE, \
                                             GTaskEventDispatcherClass ))
casts the passed in object to a GTaskEventDispatcherClass

Definition at line 24 of file gtask-event-dispatcher.h.

#define GTASK_EVENT_DISPATCHER_GET_CLASS obj   ) 
 

Value:

(G_TYPE_INSTANCE_GET_CLASS( (obj), \
                                               GTASK_EVENT_DISPATCHER_TYPE, \
                                               GTaskEventDispatcherClass ))

Definition at line 42 of file gtask-event-dispatcher.h.

#define GTASK_EVENT_DISPATCHER_TYPE   (gtask_event_dispatcher_get_type())
 

returns the GType of GTaskEventDispatcher

Definition at line 16 of file gtask-event-dispatcher.h.

#define GTASK_IS_EVENT_DISPATCHER obj   ) 
 

Value:

(G_TYPE_CHECK_INSTANCE_TYPE( (obj), \
                                            GTASK_EVENT_DISPATCHER_TYPE ))
returns TRUE if the passed in object is a GTaskEventDispatcher, FALSE otherwise

Definition at line 32 of file gtask-event-dispatcher.h.

#define GTASK_IS_EVENT_DISPATCHER_CLASS klass   ) 
 

Value:

(G_TYPE_CHECK_CLASS_TYPE( (klass), \
                                                GTASK_EVENT_DISPATCHER_TYPE ))
returns TRUE if the passed in object is a GTaskEventDispatcherClass, FALSE otherwise

Definition at line 39 of file gtask-event-dispatcher.h.


Typedef Documentation

typedef struct _GTaskEventDispatcher GTaskEventDispatcher
 

Definition at line 11 of file gtask-event-dispatcher.h.

typedef struct _GTaskEventDispatcherClass GTaskEventDispatcherClass
 

Definition at line 13 of file gtask-event-dispatcher.h.

typedef struct _GTaskEventDispatcherPrivate GTaskEventDispatcherPrivate
 

Definition at line 12 of file gtask-event-dispatcher.h.

typedef gboolean(* GTaskEventFunc)( GTaskEventDispatcher *, GObject *, gpointer )
 

Definition at line 68 of file gtask-event-dispatcher.h.


Function Documentation

guint gtask_event_dispatcher_add_watch GTaskEventDispatcher dispatch,
GType  watch_type,
GTaskEventFunc  func,
gpointer  user_data
 

Adds a new watch to the GTaskEventDispatcher's watch list. Basically whenever the GTaskStreamParser passes back a GObject of GType watch_type your callback routine will be run.

Attention:
You can remove watch by either having your callback function return false or by calling gtask_event_dispatcher_remove_watch().
Parameters:
dispatch a GTaskEventDispatcher
watch_type the GType of objects to look for
func the callback to run when an object that is of watch_type is found.
user_data user data for the callback function.
Returns:
the watch id associated with the watch, or 0 if there was some error.

Definition at line 153 of file gtask-event-dispatcher.c.

GTaskStreamParser* gtask_event_dispatcher_get_stream_parser GTaskEventDispatcher dispatch  ) 
 

Returns the GTaskStreamParser for the passed in GTaskEventDispatcher.

Attention:
This function does not add any additional references to the GTaskStreamParser that is returned.
Parameters:
dispatch a GTaskEventDispatcher
Returns:
the GTaskStreamParser

Definition at line 218 of file gtask-event-dispatcher.c.

GType gtask_event_dispatcher_get_type void   ) 
 

Definition at line 27 of file gtask-event-dispatcher.c.

GTaskEventDispatcher* gtask_event_dispatcher_new_with_parser GTaskStreamParser parser  ) 
 

Creates a new GTaskEventDispatcher bound to the passed in GTaskStreamParser.

Attention:
This object is generally created by a GTaskConnection object which will handle setting up the automatic parsing routines for you. Should you wish to do some amount of manual setup the parsing callback that is used it gtask_event_dispatcher_private_parse_callback.

This function will increase the reference count on the passed in GTaskStreamParser.

Parameters:
parser a GTaskStreamParser
Returns:
the new GTaskEventDispatcher

Definition at line 121 of file gtask-event-dispatcher.c.

gboolean gtask_event_dispatcher_private_parse_callback GIOChannel *  chann,
GIOCondition  cond,
gpointer  data
 

This is the callback that is generally run when the input GIOChannel on the GTaskConnection has data to read.

Parameters:
chann the GIOChannel
cond the CIOCondition
data the user data (must be a GTaskEventDispatcher)
Returns:
FALSE to remove the callback from the main event loop, TRUE otherwise
Todo:
call close on the connection or something

blah

Definition at line 237 of file gtask-event-dispatcher.c.

void gtask_event_dispatcher_remove_watch GTaskEventDispatcher dispatch,
guint  watch_id
 

Removes a watch from the passed in GTaskEventDispatcher.

Parameters:
dispatch a GTaskEventDispatcher
watch_id the id of the watch to remove

Definition at line 182 of file gtask-event-dispatcher.c.


Generated on Mon Feb 2 21:26:17 2004 for libgtask by doxygen 1.3.4