Channel structure should be public for implementations.
authorThadeu Lima de Souza Cascardo <cascardo@cascardo.info>
Wed, 17 Jul 2013 21:36:54 +0000 (18:36 -0300)
committerThadeu Lima de Souza Cascardo <cascardo@cascardo.info>
Wed, 17 Jul 2013 21:36:54 +0000 (18:36 -0300)
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/channel.h
src/channel.c

index 8fe64c8..b8f30ef 100644 (file)
 
 #include <sgp/msg.h>
 
 
 #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 *);
 
 
 int sgp_channel_send(struct sgp_channel *, struct sgp_msg *);
 
index 3aec1bf..d531242 100644 (file)
 #include <sgp/channel.h>
 #include <sgp/msg.h>
 
 #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.
  */
 /*
  * Send a message through a channel.
  */