summaryrefslogtreecommitdiff
path: root/src/cmumble.h
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2011-09-23 10:53:51 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2011-09-23 10:53:51 +0200
commitd1fac4d941aaa9dbf9e72540f97d928af241cb5e (patch)
treefd360bbafbc5b90bbc088671d0306b38043622a1 /src/cmumble.h
parente50020020c9770e180735361182e9968249cbfa2 (diff)
downloadcmumble-d1fac4d941aaa9dbf9e72540f97d928af241cb5e.tar.gz
cmumble-d1fac4d941aaa9dbf9e72540f97d928af241cb5e.tar.bz2
cmumble-d1fac4d941aaa9dbf9e72540f97d928af241cb5e.zip
Store callbacks in context
Diffstat (limited to 'src/cmumble.h')
-rw-r--r--src/cmumble.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/cmumble.h b/src/cmumble.h
index f315368..9f40d31 100644
--- a/src/cmumble.h
+++ b/src/cmumble.h
@@ -18,9 +18,12 @@
#include "io.h"
#include "connection.h"
+typedef void (*callback_t)(ProtobufCMessage *msg, struct context *);
+
struct context {
struct cmumble_connection con;
struct cmumble_io io;
+ const callback_t *callbacks;
GMainLoop *loop;
uint32_t session;
@@ -60,18 +63,10 @@ enum mumble_message {
#undef MUMBLE_MSG
};
-struct mumble_callbacks {
-#define MUMBLE_MSG(a,b) void (* a)(MumbleProto__##a *, struct context *);
- MUMBLE_MSGS
-#undef MUMBLE_MSG
-};
-
-typedef void (*callback_t)(ProtobufCMessage *msg, struct context *);
-
void
send_msg(struct context *ctx, ProtobufCMessage *msg);
int
-recv_msg(struct context *ctx, const struct mumble_callbacks *callbacks);
+recv_msg(struct context *ctx);
#endif