aboutsummaryrefslogtreecommitdiffstats
path: root/src/song.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/song.h')
-rw-r--r--src/song.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/song.h b/src/song.h
index 26a1dc806..8b97d45d0 100644
--- a/src/song.h
+++ b/src/song.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2010 The Music Player Daemon Project
+ * Copyright (C) 2003-2011 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -20,6 +20,8 @@
#ifndef MPD_SONG_H
#define MPD_SONG_H
+#include "util/list.h"
+
#include <stddef.h>
#include <stdbool.h>
#include <sys/time.h>
@@ -28,6 +30,16 @@
#define SONG_TIME "Time: "
struct song {
+ /**
+ * Pointers to the siblings of this directory within the
+ * parent directory. It is unused (undefined) if this song is
+ * not in the database.
+ *
+ * This attribute is protected with the global #db_mutex.
+ * Read access in the update thread does not need protection.
+ */
+ struct list_head siblings;
+
struct tag *tag;
struct directory *parent;
time_t mtime;
@@ -62,6 +74,15 @@ song_file_new(const char *path, struct directory *parent);
struct song *
song_file_load(const char *path, struct directory *parent);
+/**
+ * Replaces the URI of a song object. The given song object is
+ * destroyed, and a newly allocated one is returned. It does not
+ * update the reference within the parent directory; the caller is
+ * responsible for doing that.
+ */
+struct song *
+song_replace_uri(struct song *song, const char *uri);
+
void
song_free(struct song *song);