The Assimilation Project  based on Assimilation version
Go to the documentation of this file.
27 #ifndef _NETGSOURCE_H
28 #define _NETGSOURCE_H
29 #include <projectcommon.h>
30 #include <glib.h>
31 #include <netgsource.h>
32 #include <netaddr.h>
33 #include <netio.h>
34 typedef struct _NetGSource NetGSource;
35 #include <listener.h>
43 struct _NetGSource {
44  GSource baseclass;
45  GPollFD _gfd;
46  int _socket;
47  gint _gsourceid;
48  gpointer _userdata;
49  GSourceFuncs* _gsfuncs;
51  GHashTable* _dispatchers;
52  GDestroyNotify _finalize;
54  void (*sendframesets)(NetGSource*,const NetAddr*, GSList*);
55  void(*addListener)(NetGSource*, guint16, Listener*);
56 };
57 WINEXPORT NetGSource* netgsource_new(NetIO* iosrc, GDestroyNotify notify,
58  gint priority, gboolean can_recurse, GMainContext* context,
59  gsize objsize, gpointer userdata);
60 #endif /* _NETGSOURCE_H */
GSource baseclass
Parent GSource Object pointer.
Definition: netgsource.h:44
GPollFD _gfd
Poll/select object for gmainloop.
Definition: netgsource.h:45
void(* sendaframeset)(NetGSource *, const NetAddr *, FrameSet *)
Send a single frameset.
Definition: netgsource.h:53
NetIO * _netio
netio this object is based on
Definition: netgsource.h:50
Defines Generic Listener interfaces.
void(* sendframesets)(NetGSource *, const NetAddr *, GSList *)
Send a frameset list.
Definition: netgsource.h:54
WINEXPORT NetGSource * netgsource_new(NetIO *iosrc, GDestroyNotify notify, gint priority, gboolean can_recurse, GMainContext *context, gsize objsize, gpointer userdata)
Create a new (abstract) NetGSource object.
Definition: netgsource.c:74
Definition: projectcommon.h:45
Defines an abstract Network I/O class.
gpointer _userdata
Saved user data.
Definition: netgsource.h:48
void(* addListener)(NetGSource *, guint16, Listener *)
Register a new listener.
Definition: netgsource.h:55
Project common header file.
GSourceFuncs * _gsfuncs
pointers to GSource functions
Definition: netgsource.h:49
GHashTable * _dispatchers
Table of dispatch functions.
Definition: netgsource.h:51
The NetAddr class class represents a general network address - whether IP, MAC, or any other type of ...
Definition: netaddr.h:43
Defines interfaces for the NetAddr (network address) object.
gint _gsourceid
Source ID from g_source_attach()
Definition: netgsource.h:47
FrameSet class - used for collecting Frames when not on the wire, and for marshalling/demarshalling t...
Definition: frameset.h:46
GDestroyNotify _finalize
Function to call when we&#39;re destroyed.
Definition: netgsource.h:52
Implements NetIO GSource object.
This is a basic NetIO class abstract class for doing network I/O.
Definition: netio.h:58
The NetGSource class objects integrate NetIO class objects into the g_main_loop paradigm.
Definition: netgsource.h:43
This is the Listener class. object - which generically listens for packets.
Definition: listener.h:41
int _socket
Underlying socket descriptor.
Definition: netgsource.h:46