summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/audio.c14
-rw-r--r--src/audio.h10
-rw-r--r--src/cmumble.c26
-rw-r--r--src/cmumble.h6
-rw-r--r--src/commands.c14
-rw-r--r--src/commands.h6
-rw-r--r--src/connection.c8
-rw-r--r--src/connection.h6
-rw-r--r--src/io.c8
-rw-r--r--src/io.h6
-rw-r--r--src/message.c4
-rw-r--r--src/message.h6
-rw-r--r--src/util.h4
13 files changed, 59 insertions, 59 deletions
diff --git a/src/audio.c b/src/audio.c
index 3096edf..1c537dd 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[1024];
uint32_t write = 0, pos = 0;
@@ -63,7 +63,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;
@@ -140,7 +140,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;
@@ -180,7 +180,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);
@@ -192,7 +192,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;
@@ -204,7 +204,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 e76920e..4dc0de8 100644
--- a/src/cmumble.c
+++ b/src/cmumble.c
@@ -9,7 +9,7 @@
#include "util.h"
static void
-recv_udp_tunnel(MumbleProto__UDPTunnel *tunnel, struct cmumlbe *cm)
+recv_udp_tunnel(MumbleProto__UDPTunnel *tunnel, struct cmumble *cm)
{
int64_t session, sequence;
uint32_t pos = 1, read = 0;
@@ -46,7 +46,7 @@ recv_udp_tunnel(MumbleProto__UDPTunnel *tunnel, struct cmumlbe *cm)
}
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);
@@ -54,7 +54,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;
@@ -85,7 +85,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);
@@ -96,7 +96,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)
{
#if 0
int i;
@@ -124,14 +124,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;
@@ -145,7 +145,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;
@@ -175,7 +175,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;
@@ -186,7 +186,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 = {
@@ -219,7 +219,7 @@ static const struct {
};
static gboolean
-do_ping(struct cmumlbe *cm)
+do_ping(struct cmumble *cm)
{
MumbleProto__Ping ping;
GTimeVal tv;
@@ -234,7 +234,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;
@@ -281,7 +281,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 cc40149..1b336d8 100644
--- a/src/cmumble.h
+++ b/src/cmumble.h
@@ -12,9 +12,9 @@
#include "audio.h"
#include "commands.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;
@@ -72,6 +72,6 @@ enum udp_message_target {
};
void
-cmumble_protocol_init(struct cmumlbe *cm);
+cmumble_protocol_init(struct cmumble *cm);
#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 <readline/history.h>
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 7fefdb3..05a62b7 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -8,7 +8,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 {
@@ -21,7 +21,7 @@ read_cb(GObject *pollable_stream, gpointer data)
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;
@@ -54,7 +54,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;
@@ -77,7 +77,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 508a71c..61fbe0a 100644
--- a/src/connection.h
+++ b/src/connection.h
@@ -14,13 +14,13 @@ struct cmumble_connection {
GSource *source;
};
-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);
#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),