Implementations of the channels need to register such a channel, and
making the structure public is more simple than creating a series of
functions to register every hook.
#include <sgp/msg.h>
-struct sgp_channel;
+struct sgp_channel {
+ int (*send) (void *, struct sgp_msg *);
+ void * data;
+};
int sgp_channel_send(struct sgp_channel *, struct sgp_msg *);
#include <sgp/channel.h>
#include <sgp/msg.h>
-struct sgp_channel {
- int (*send) (void *, struct sgp_msg *);
- void * data;
-};
-
/*
* Send a message through a channel.
*/