From b30b0e8cff7a3b4a0bb1199ea1a398d75d05b105 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Sun, 12 Feb 2012 19:30:35 +0100 Subject: Fix typo in cmumble struct name --- src/audio.c | 14 +++++++------- src/audio.h | 10 +++++----- src/cmumble.c | 30 +++++++++++++++--------------- src/cmumble.h | 8 ++++---- src/commands.c | 14 +++++++------- src/commands.h | 6 +++--- src/connection.c | 20 ++++++++++---------- src/connection.h | 10 +++++----- src/io.c | 8 ++++---- src/io.h | 6 +++--- src/message.c | 4 ++-- src/message.h | 6 +++--- src/util.h | 4 ++-- 13 files changed, 70 insertions(+), 70 deletions(-) diff --git a/src/audio.c b/src/audio.c index 1ac1103..af92db5 100644 --- a/src/audio.c +++ b/src/audio.c @@ -7,7 +7,7 @@ #define CHANNELS 1 void -cmumble_audio_push(struct cmumlbe *cm, struct cmumble_user *user, +cmumble_audio_push(struct cmumble *cm, struct cmumble_user *user, const guint8 *data, gsize size) { GstBuffer *gstbuf; @@ -19,7 +19,7 @@ cmumble_audio_push(struct cmumlbe *cm, struct cmumble_user *user, static GstFlowReturn pull_buffer(GstAppSink *sink, gpointer user_data) { - struct cmumlbe *cm = user_data; + struct cmumble *cm = user_data; GstBuffer *buf; uint8_t data[1020]; uint32_t write = 0, pos = 0; @@ -59,7 +59,7 @@ pull_buffer(GstAppSink *sink, gpointer user_data) } static int -setup_recording_gst_pipeline(struct cmumlbe *cm) +setup_recording_gst_pipeline(struct cmumble *cm) { GstElement *pipeline, *cutter, *sink; GError *error = NULL; @@ -136,7 +136,7 @@ out: } int -cmumble_audio_create_playback_pipeline(struct cmumlbe *cm, +cmumble_audio_create_playback_pipeline(struct cmumble *cm, struct cmumble_user *user) { GstElement *pipeline, *sink_bin; @@ -176,7 +176,7 @@ cmumble_audio_create_playback_pipeline(struct cmumlbe *cm, } static int -setup_playback_gst_pipeline(struct cmumlbe *cm) +setup_playback_gst_pipeline(struct cmumble *cm) { cm->audio.celt_mode = celt_mode_create(SAMPLERATE, SAMPLERATE / 100, NULL); @@ -188,7 +188,7 @@ setup_playback_gst_pipeline(struct cmumlbe *cm) } int -cmumble_audio_init(struct cmumlbe *cm) +cmumble_audio_init(struct cmumble *cm) { if (setup_playback_gst_pipeline(cm) < 0) return -1; @@ -200,7 +200,7 @@ cmumble_audio_init(struct cmumlbe *cm) } int -cmumble_audio_fini(struct cmumlbe *cm) +cmumble_audio_fini(struct cmumble *cm) { return 0; diff --git a/src/audio.h b/src/audio.h index 6cae07f..90dc13d 100644 --- a/src/audio.h +++ b/src/audio.h @@ -20,21 +20,21 @@ struct cmumble_audio { CELTMode *celt_mode; }; -struct cmumlbe; +struct cmumble; struct cmumble_user; int -cmumble_audio_init(struct cmumlbe *cm); +cmumble_audio_init(struct cmumble *cm); int -cmumble_audio_fini(struct cmumlbe *cm); +cmumble_audio_fini(struct cmumble *cm); int -cmumble_audio_create_playback_pipeline(struct cmumlbe *cm, +cmumble_audio_create_playback_pipeline(struct cmumble *cm, struct cmumble_user *user); void -cmumble_audio_push(struct cmumlbe *cm, struct cmumble_user *user, +cmumble_audio_push(struct cmumble *cm, struct cmumble_user *user, const guint8 *data, gsize size); #endif /* _AUDIO_H_ */ diff --git a/src/cmumble.c b/src/cmumble.c index 640b6ea..9e3d931 100644 --- a/src/cmumble.c +++ b/src/cmumble.c @@ -9,7 +9,7 @@ #include "util.h" static void -cmumble_read_audio_packet(struct cmumlbe *cm, uint8_t *data, size_t len) +cmumble_read_audio_packet(struct cmumble *cm, uint8_t *data, size_t len) { int64_t session, sequence; uint32_t pos = 1, read = 0; @@ -44,7 +44,7 @@ cmumble_read_audio_packet(struct cmumlbe *cm, uint8_t *data, size_t len) } void -cmumble_read_udp_data(struct cmumlbe *cm, guint8 *data, gsize size) +cmumble_read_udp_data(struct cmumble *cm, guint8 *data, gsize size) { guint num; gint64 timestamp; @@ -66,13 +66,13 @@ cmumble_read_udp_data(struct cmumlbe *cm, guint8 *data, gsize size) } static void -recv_udp_tunnel(MumbleProto__UDPTunnel *tunnel, struct cmumlbe *cm) +recv_udp_tunnel(MumbleProto__UDPTunnel *tunnel, struct cmumble *cm) { cmumble_read_udp_data(cm, tunnel->packet.data, tunnel->packet.len); } static void -recv_version(MumbleProto__Version *version, struct cmumlbe *cm) +recv_version(MumbleProto__Version *version, struct cmumble *cm) { g_print("version: 0x%x\n", version->version); g_print("release: %s\n", version->release); @@ -80,7 +80,7 @@ recv_version(MumbleProto__Version *version, struct cmumlbe *cm) static void recv_channel_state(MumbleProto__ChannelState *state, - struct cmumlbe *cm) + struct cmumble *cm) { struct cmumble_channel *channel; @@ -111,7 +111,7 @@ recv_channel_state(MumbleProto__ChannelState *state, } static void -recv_server_sync(MumbleProto__ServerSync *sync, struct cmumlbe *cm) +recv_server_sync(MumbleProto__ServerSync *sync, struct cmumble *cm) { cm->session = sync->session; cm->user = find_user(cm, cm->session); @@ -122,7 +122,7 @@ recv_server_sync(MumbleProto__ServerSync *sync, struct cmumlbe *cm) } static void -recv_crypt_setup(MumbleProto__CryptSetup *crypt, struct cmumlbe *cm) +recv_crypt_setup(MumbleProto__CryptSetup *crypt, struct cmumble *cm) { g_return_if_fail(crypt->key.len == 16 && crypt->client_nonce.len == 16 && @@ -139,14 +139,14 @@ recv_crypt_setup(MumbleProto__CryptSetup *crypt, struct cmumlbe *cm) static void recv_codec_version(MumbleProto__CodecVersion *codec, - struct cmumlbe *cm) + struct cmumble *cm) { g_print("Codec Version: alpha: %d, beta: %d, pefer_alpha: %d\n", codec->alpha, codec->beta, codec->prefer_alpha); } static void -recv_user_remove(MumbleProto__UserRemove *remove, struct cmumlbe *cm) +recv_user_remove(MumbleProto__UserRemove *remove, struct cmumble *cm) { struct cmumble_user *user = NULL; @@ -160,7 +160,7 @@ recv_user_remove(MumbleProto__UserRemove *remove, struct cmumlbe *cm) } static void -recv_user_state(MumbleProto__UserState *state, struct cmumlbe *cm) +recv_user_state(MumbleProto__UserState *state, struct cmumble *cm) { struct cmumble_user *user = NULL; @@ -190,7 +190,7 @@ recv_user_state(MumbleProto__UserState *state, struct cmumlbe *cm) } static void -recv_text_message(MumbleProto__TextMessage *text, struct cmumlbe *cm) +recv_text_message(MumbleProto__TextMessage *text, struct cmumble *cm) { struct cmumble_user *user; @@ -201,7 +201,7 @@ recv_text_message(MumbleProto__TextMessage *text, struct cmumlbe *cm) static const struct { #define MUMBLE_MSG(a,b) void (* a)(MumbleProto__##a *, \ - struct cmumlbe *); + struct cmumble *); MUMBLE_MSGS #undef MUMBLE_MSG } callbacks = { @@ -234,7 +234,7 @@ static const struct { }; static gboolean -do_ping(struct cmumlbe *cm) +do_ping(struct cmumble *cm) { MumbleProto__Ping ping; GTimeVal tv; @@ -249,7 +249,7 @@ do_ping(struct cmumlbe *cm) } void -cmumble_protocol_init(struct cmumlbe *cm) +cmumble_protocol_init(struct cmumble *cm) { MumbleProto__Version version; MumbleProto__Authenticate authenticate; @@ -296,7 +296,7 @@ static GOptionEntry entries[] = { int main(int argc, char **argv) { - struct cmumlbe cm; + struct cmumble cm; GError *error = NULL; GOptionContext *context; diff --git a/src/cmumble.h b/src/cmumble.h index 3c9722b..0e0dd16 100644 --- a/src/cmumble.h +++ b/src/cmumble.h @@ -14,9 +14,9 @@ #include "crypt.h" -typedef void (*callback_t)(ProtobufCMessage *msg, struct cmumlbe *); +typedef void (*callback_t)(ProtobufCMessage *msg, struct cmumble *); -struct cmumlbe { +struct cmumble { struct cmumble_connection con; struct cmumble_io io; struct cmumble_audio audio; @@ -75,9 +75,9 @@ enum udp_message_target { }; void -cmumble_protocol_init(struct cmumlbe *cm); +cmumble_protocol_init(struct cmumble *cm); void -cmumble_read_udp_data(struct cmumlbe *cm, guint8 *data, gsize size); +cmumble_read_udp_data(struct cmumble *cm, guint8 *data, gsize size); #endif diff --git a/src/commands.c b/src/commands.c index 9ca2d8a..5209504 100644 --- a/src/commands.c +++ b/src/commands.c @@ -9,7 +9,7 @@ #include static void -list_users(struct cmumlbe *cm, +list_users(struct cmumble *cm, int argc, char **argv) { struct cmumble_user *user = NULL; @@ -23,7 +23,7 @@ list_users(struct cmumlbe *cm, } static void -list_channels(struct cmumlbe *cm, +list_channels(struct cmumble *cm, int argc, char **argv) { struct cmumble_channel *channel = NULL; @@ -37,7 +37,7 @@ list_channels(struct cmumlbe *cm, } static void -quit(struct cmumlbe *cm, +quit(struct cmumble *cm, int argc, char **argv) { rl_already_prompted = 1; @@ -45,7 +45,7 @@ quit(struct cmumlbe *cm, } static void -clear(struct cmumlbe *cm, +clear(struct cmumble *cm, int argc, char **argv) { rl_clear_screen(0,0); @@ -54,7 +54,7 @@ clear(struct cmumlbe *cm, } static void -help(struct cmumlbe *cm, +help(struct cmumble *cm, int argc, char **argv) { int i; @@ -65,7 +65,7 @@ help(struct cmumlbe *cm, } static void -msg(struct cmumlbe *cm, +msg(struct cmumble *cm, int argc, char **argv) { MumbleProto__TextMessage message; @@ -143,7 +143,7 @@ complete(const char *in, int n) } void -cmumble_commands_init(struct cmumlbe *cm) +cmumble_commands_init(struct cmumble *cm) { cm->commands = commands; diff --git a/src/commands.h b/src/commands.h index 24290af..cfecde9 100644 --- a/src/commands.h +++ b/src/commands.h @@ -1,17 +1,17 @@ #ifndef _COMMANDS_H_ #define _COMMANDS_H_ -struct cmumlbe; +struct cmumble; struct cmumble_command { const char *name; - void (*callback)(struct cmumlbe *, + void (*callback)(struct cmumble *, int argc, char **argv); const char *description; }; void -cmumble_commands_init(struct cmumlbe *cm); +cmumble_commands_init(struct cmumble *cm); const char * cmumble_command_expand_shortcut(const char *text); diff --git a/src/connection.c b/src/connection.c index e7f74bd..7f4a312 100644 --- a/src/connection.c +++ b/src/connection.c @@ -9,7 +9,7 @@ static gboolean read_cb(GObject *pollable_stream, gpointer data) { GPollableInputStream *input = G_POLLABLE_INPUT_STREAM(pollable_stream); - struct cmumlbe *cm = data; + struct cmumble *cm = data; gint count; do { @@ -22,7 +22,7 @@ read_cb(GObject *pollable_stream, gpointer data) static gboolean read_udp_socket(GSocket *socket, GIOCondition condition, gpointer user_data) { - struct cmumlbe *cm = user_data; + struct cmumble *cm = user_data; GError *error = NULL; guchar data[1024]; guchar plain[1020]; @@ -44,7 +44,7 @@ read_udp_socket(GSocket *socket, GIOCondition condition, gpointer user_data) } static void -send_udp_tcptunnel(struct cmumlbe *cm, guint8 *data, gsize len) +send_udp_tcptunnel(struct cmumble *cm, guint8 *data, gsize len) { MumbleProto__UDPTunnel tunnel; @@ -55,7 +55,7 @@ send_udp_tcptunnel(struct cmumlbe *cm, guint8 *data, gsize len) } static void -send_udp(struct cmumlbe *cm, guint8 *data, gsize len) +send_udp(struct cmumble *cm, guint8 *data, gsize len) { guint8 encrypted[1024]; GError *error = NULL; @@ -68,7 +68,7 @@ send_udp(struct cmumlbe *cm, guint8 *data, gsize len) } void -cmumble_connection_send_udp_data(struct cmumlbe *cm, guint8 *data, gsize len) +cmumble_connection_send_udp_data(struct cmumble *cm, guint8 *data, gsize len) { if (cm->con.udp.connected) send_udp(cm, data, len); @@ -77,7 +77,7 @@ cmumble_connection_send_udp_data(struct cmumlbe *cm, guint8 *data, gsize len) } static void -do_udp_ping(struct cmumlbe *cm) +do_udp_ping(struct cmumble *cm) { uint8_t data[16]; uint32_t written = 0, pos = 0; @@ -95,7 +95,7 @@ do_udp_ping(struct cmumlbe *cm) } void -cmumble_connection_udp_init(struct cmumlbe *cm) +cmumble_connection_udp_init(struct cmumble *cm) { GError *error = NULL; GSocketAddress *saddr; @@ -134,7 +134,7 @@ cmumble_connection_udp_init(struct cmumlbe *cm) static void connection_ready(GObject *source_object, GAsyncResult *res, gpointer user_data) { - struct cmumlbe *cm = user_data; + struct cmumble *cm = user_data; struct cmumble_connection *con = &cm->con; GError *error = NULL; @@ -166,7 +166,7 @@ connection_ready(GObject *source_object, GAsyncResult *res, gpointer user_data) } int -cmumble_connection_init(struct cmumlbe *cm, +cmumble_connection_init(struct cmumble *cm, const char *host, int port) { struct cmumble_connection *con = &cm->con; @@ -189,7 +189,7 @@ cmumble_connection_init(struct cmumlbe *cm, } int -cmumble_connection_fini(struct cmumlbe *cm) +cmumble_connection_fini(struct cmumble *cm) { if (cm->con.source) { g_source_remove(g_source_get_id(cm->con.source)); diff --git a/src/connection.h b/src/connection.h index 7696d07..c213b3c 100644 --- a/src/connection.h +++ b/src/connection.h @@ -20,20 +20,20 @@ struct cmumble_connection { } udp; }; -struct cmumlbe; +struct cmumble; int -cmumble_connection_init(struct cmumlbe *cm, +cmumble_connection_init(struct cmumble *cm, const char *host, int port); int -cmumble_connection_fini(struct cmumlbe *cm); +cmumble_connection_fini(struct cmumble *cm); void -cmumble_connection_udp_init(struct cmumlbe *cm); +cmumble_connection_udp_init(struct cmumble *cm); void -cmumble_connection_send_udp_data(struct cmumlbe *cm, +cmumble_connection_send_udp_data(struct cmumble *cm, guint8 *data, gsize len); #endif /* _CONNECTION_H_ */ diff --git a/src/io.c b/src/io.c index e0d608a..c0ec572 100644 --- a/src/io.c +++ b/src/io.c @@ -22,7 +22,7 @@ static gpointer global_rl_user_data = NULL; static gboolean read_cb(GIOChannel *source, GIOCondition condition, gpointer data) { - struct cmumlbe *cm = data; + struct cmumble *cm = data; if (condition & G_IO_IN) { global_rl_user_data = cm; @@ -144,7 +144,7 @@ command_split(char *cmd, char ***argv) static void process_line(char *line) { - struct cmumlbe *cm = global_rl_user_data; + struct cmumble *cm = global_rl_user_data; int i; int argc; char **argv; @@ -186,7 +186,7 @@ out: } int -cmumble_io_init(struct cmumlbe *cm) +cmumble_io_init(struct cmumble *cm) { struct termios term; @@ -217,7 +217,7 @@ cmumble_io_init(struct cmumlbe *cm) } int -cmumble_io_fini(struct cmumlbe *cm) +cmumble_io_fini(struct cmumble *cm) { rl_callback_handler_remove(); g_io_channel_unref(cm->io.input_channel); diff --git a/src/io.h b/src/io.h index 7fbf1bb..638de2e 100644 --- a/src/io.h +++ b/src/io.h @@ -10,12 +10,12 @@ struct cmumble_io { struct termios term; }; -struct cmumlbe; +struct cmumble; int -cmumble_io_init(struct cmumlbe *cm); +cmumble_io_init(struct cmumble *cm); int -cmumble_io_fini(struct cmumlbe *cm); +cmumble_io_fini(struct cmumble *cm); #endif /* _IO_H_ */ diff --git a/src/message.c b/src/message.c index d4d42c0..a718f3b 100644 --- a/src/message.c +++ b/src/message.c @@ -39,7 +39,7 @@ get_preamble(uint8_t *buffer, int *type, int *len) } void -cmumble_send_msg(struct cmumlbe *cm, ProtobufCMessage *msg) +cmumble_send_msg(struct cmumble *cm, ProtobufCMessage *msg) { uint8_t pad[128]; uint8_t preamble[PREAMBLE_SIZE]; @@ -72,7 +72,7 @@ cmumble_send_msg(struct cmumlbe *cm, ProtobufCMessage *msg) } int -cmumble_recv_msg(struct cmumlbe *cm) +cmumble_recv_msg(struct cmumble *cm) { uint8_t preamble[PREAMBLE_SIZE]; ProtobufCMessage *msg; diff --git a/src/message.h b/src/message.h index 7f3ffe4..0186192 100644 --- a/src/message.h +++ b/src/message.h @@ -10,12 +10,12 @@ enum cmumble_message { #undef MUMBLE_MSG }; -struct cmumlbe; +struct cmumble; void -cmumble_send_msg(struct cmumlbe *cm, ProtobufCMessage *msg); +cmumble_send_msg(struct cmumble *cm, ProtobufCMessage *msg); int -cmumble_recv_msg(struct cmumlbe *cm); +cmumble_recv_msg(struct cmumble *cm); #endif /* _MESSAGE_H_ */ diff --git a/src/util.h b/src/util.h index ec180be..6019fe5 100644 --- a/src/util.h +++ b/src/util.h @@ -8,7 +8,7 @@ gpointer cmumble_find_by_id(GList *list, gsize member_offset, guint id); static inline struct cmumble_user * -find_user(struct cmumlbe *cm, uint32_t session_id) +find_user(struct cmumble *cm, uint32_t session_id) { return cmumble_find_by_id(cm->users, G_STRUCT_OFFSET(struct cmumble_user, session), @@ -16,7 +16,7 @@ find_user(struct cmumlbe *cm, uint32_t session_id) } static inline struct cmumble_channel * -find_channel(struct cmumlbe *cm, guint channel_id) +find_channel(struct cmumble *cm, guint channel_id) { return cmumble_find_by_id(cm->channels, G_STRUCT_OFFSET(struct cmumble_channel, id), -- cgit