aboutsummaryrefslogtreecommitdiffstats
path: root/src/metadata_pipe.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-08-29 09:38:11 +0200
committerEric Wong <normalperson@yhbt.net>2008-09-02 00:05:35 -0700
commit8ae390f65142ed38a0b5e2474fc6a21866092e84 (patch)
treecd044479302be57d4f73683e6844d782d5c836e3 /src/metadata_pipe.c
parentdd7f8a723efa9c9edce951981aef7f3adf814134 (diff)
downloadmpd-8ae390f65142ed38a0b5e2474fc6a21866092e84.tar.gz
mpd-8ae390f65142ed38a0b5e2474fc6a21866092e84.tar.xz
mpd-8ae390f65142ed38a0b5e2474fc6a21866092e84.zip
tag: renamed MpdTag and MpdTagItem to struct mpd_tag, struct tag_item
Getting rid of CamelCase; not having typedefs also allows us to forward-declare the structures.
Diffstat (limited to '')
-rw-r--r--src/metadata_pipe.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/metadata_pipe.c b/src/metadata_pipe.c
index 5508b97c8..5cdc3af2d 100644
--- a/src/metadata_pipe.c
+++ b/src/metadata_pipe.c
@@ -34,7 +34,7 @@ static struct ringbuf *mp;
struct tag_container {
float metadata_time;
mpd_uint8 seq; /* ob.seq_decoder at time of metadata_pipe_send() */
- MpdTag *tag; /* our payload */
+ struct mpd_tag *tag; /* our payload */
};
/*
@@ -43,7 +43,7 @@ struct tag_container {
* done from one thread, so it will never block or clobber.
*/
static pthread_mutex_t read_lock = PTHREAD_MUTEX_INITIALIZER;
-static MpdTag *current_tag; /* requires read_lock for both r/w access */
+static struct mpd_tag *current_tag; /* requires read_lock for both r/w access */
static void metadata_pipe_finish(void)
{
@@ -58,7 +58,7 @@ void init_metadata_pipe(void)
atexit(metadata_pipe_finish);
}
-void metadata_pipe_send(MpdTag *tag, float metadata_time)
+void metadata_pipe_send(struct mpd_tag *tag, float metadata_time)
{
struct tag_container tc;
size_t written;
@@ -79,14 +79,14 @@ void metadata_pipe_send(MpdTag *tag, float metadata_time)
assert(written == sizeof(struct tag_container));
}
-MpdTag * metadata_pipe_recv(void)
+struct mpd_tag * metadata_pipe_recv(void)
{
struct tag_container tc;
size_t r;
static const size_t mpd_uint8_max = 255; /* XXX CLEANUP */
mpd_uint8 expect_seq = ob_get_player_sequence();
unsigned long current_time = ob_get_elapsed_time();
- MpdTag *tag = NULL;
+ struct mpd_tag *tag = NULL;
if (pthread_mutex_trylock(&read_lock) == EBUSY)
return NULL;
@@ -124,9 +124,9 @@ out:
return tag;
}
-MpdTag *metadata_pipe_current(void)
+struct mpd_tag *metadata_pipe_current(void)
{
- MpdTag *tag;
+ struct mpd_tag *tag;
assert(! pthread_equal(pthread_self(), dc.thread));
if (pthread_mutex_trylock(&read_lock) == EBUSY)