aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/DatabasePlaylist.cxx6
-rw-r--r--src/OtherCommands.cxx6
-rw-r--r--src/PlaylistCommands.cxx4
-rw-r--r--src/PlaylistFile.cxx (renamed from src/stored_playlist.c)20
-rw-r--r--src/PlaylistFile.h (renamed from src/stored_playlist.h)6
-rw-r--r--src/PlaylistMapper.cxx (renamed from src/playlist_mapper.c)9
-rw-r--r--src/PlaylistMapper.h (renamed from src/playlist_mapper.h)6
-rw-r--r--src/PlaylistPrint.cxx2
-rw-r--r--src/PlaylistSave.cxx (renamed from src/playlist_save.c)16
-rw-r--r--src/PlaylistSave.hxx (renamed from src/playlist_save.h)2
-rw-r--r--src/main.c2
-rw-r--r--src/playlist_any.c2
12 files changed, 49 insertions, 32 deletions
diff --git a/src/DatabasePlaylist.cxx b/src/DatabasePlaylist.cxx
index f9934bab2..3020b3274 100644
--- a/src/DatabasePlaylist.cxx
+++ b/src/DatabasePlaylist.cxx
@@ -20,11 +20,7 @@
#include "config.h"
#include "DatabasePlaylist.hxx"
#include "DatabaseSelection.hxx"
-
-extern "C" {
-#include "stored_playlist.h"
-}
-
+#include "PlaylistFile.h"
#include "DatabaseGlue.hxx"
#include "DatabasePlugin.hxx"
diff --git a/src/OtherCommands.cxx b/src/OtherCommands.cxx
index 1442ef05a..ab7321953 100644
--- a/src/OtherCommands.cxx
+++ b/src/OtherCommands.cxx
@@ -35,7 +35,11 @@ extern "C" {
#include "volume.h"
#include "stats.h"
#include "permission.h"
-#include "stored_playlist.h"
+}
+
+#include "PlaylistFile.h"
+
+extern "C" {
#include "client.h"
#include "client_idle.h"
#include "client_file.h"
diff --git a/src/PlaylistCommands.cxx b/src/PlaylistCommands.cxx
index 2789e6c43..108318c2f 100644
--- a/src/PlaylistCommands.cxx
+++ b/src/PlaylistCommands.cxx
@@ -22,17 +22,17 @@
#include "DatabasePlaylist.hxx"
#include "CommandError.hxx"
#include "PlaylistPrint.hxx"
+#include "PlaylistSave.hxx"
+#include "PlaylistFile.h"
extern "C" {
#include "protocol/argparser.h"
#include "protocol/result.h"
#include "playlist.h"
-#include "playlist_save.h"
#include "playlist_queue.h"
#include "time_print.h"
#include "ls.h"
#include "uri.h"
-#include "stored_playlist.h"
#include "client_internal.h"
}
diff --git a/src/stored_playlist.c b/src/PlaylistFile.cxx
index 121349bd8..9beae76ad 100644
--- a/src/stored_playlist.c
+++ b/src/PlaylistFile.cxx
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2011 The Music Player Daemon Project
+ * Copyright (C) 2003-2012 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -18,16 +18,20 @@
*/
#include "config.h"
-#include "stored_playlist.h"
-#include "playlist_save.h"
-#include "text_file.h"
+#include "PlaylistFile.h"
+#include "PlaylistSave.hxx"
#include "song.h"
+
+extern "C" {
+#include "text_file.h"
#include "mapper.h"
#include "path.h"
#include "uri.h"
#include "database.h"
#include "idle.h"
#include "conf.h"
+}
+
#include "glib_compat.h"
#include <assert.h>
@@ -171,7 +175,6 @@ GPtrArray *
spl_list(GError **error_r)
{
const char *parent_path_fs = spl_map(error_r);
-
if (parent_path_fs == NULL)
return NULL;
@@ -201,6 +204,7 @@ spl_list_free(GPtrArray *list)
{
for (unsigned i = 0; i < list->len; ++i) {
struct stored_playlist_info *playlist =
+ (struct stored_playlist_info *)
g_ptr_array_index(list, i);
g_free(playlist->name);
g_free(playlist);
@@ -229,7 +233,7 @@ spl_save(GPtrArray *list, const char *utf8path, GError **error_r)
}
for (unsigned i = 0; i < list->len; ++i) {
- const char *uri = g_ptr_array_index(list, i);
+ const char *uri = (const char *)g_ptr_array_index(list, i);
playlist_print_uri(file, uri);
}
@@ -287,7 +291,7 @@ void
spl_free(GPtrArray *list)
{
for (unsigned i = 0; i < list->len; ++i) {
- char *uri = g_ptr_array_index(list, i);
+ char *uri = (char *)g_ptr_array_index(list, i);
g_free(uri);
}
@@ -299,7 +303,7 @@ spl_remove_index_internal(GPtrArray *list, unsigned idx)
{
assert(idx < list->len);
- char *uri = g_ptr_array_remove_index(list, idx);
+ char *uri = (char *)g_ptr_array_remove_index(list, idx);
assert(uri != NULL);
return uri;
}
diff --git a/src/stored_playlist.h b/src/PlaylistFile.h
index cfe49633c..35eda6d7b 100644
--- a/src/stored_playlist.h
+++ b/src/PlaylistFile.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2011 The Music Player Daemon Project
+ * Copyright (C) 2003-2012 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -34,6 +34,8 @@ struct stored_playlist_info {
extern bool playlist_saveAbsolutePaths;
+G_BEGIN_DECLS
+
/**
* Perform some global initialization, e.g. load configuration values.
*/
@@ -85,4 +87,6 @@ spl_append_uri(const char *file, const char *utf8file, GError **error_r);
bool
spl_rename(const char *utf8from, const char *utf8to, GError **error_r);
+G_END_DECLS
+
#endif
diff --git a/src/playlist_mapper.c b/src/PlaylistMapper.cxx
index 13adb80d0..415f8ba2f 100644
--- a/src/playlist_mapper.c
+++ b/src/PlaylistMapper.cxx
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2011 The Music Player Daemon Project
+ * Copyright (C) 2003-2012 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -18,11 +18,14 @@
*/
#include "config.h"
-#include "playlist_mapper.h"
+#include "PlaylistMapper.h"
+#include "PlaylistFile.h"
+
+extern "C" {
#include "playlist_list.h"
-#include "stored_playlist.h"
#include "mapper.h"
#include "uri.h"
+}
#include <assert.h>
diff --git a/src/playlist_mapper.h b/src/PlaylistMapper.h
index 9a7187d93..829aac988 100644
--- a/src/playlist_mapper.h
+++ b/src/PlaylistMapper.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2011 The Music Player Daemon Project
+ * Copyright (C) 2003-2012 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -24,6 +24,8 @@
struct input_stream;
+G_BEGIN_DECLS
+
/**
* Opens a playlist from an URI relative to the playlist or music
* directory.
@@ -36,4 +38,6 @@ struct playlist_provider *
playlist_mapper_open(const char *uri, GMutex *mutex, GCond *cond,
struct input_stream **is_r);
+G_END_DECLS
+
#endif
diff --git a/src/PlaylistPrint.cxx b/src/PlaylistPrint.cxx
index 345506d5e..832f49cfd 100644
--- a/src/PlaylistPrint.cxx
+++ b/src/PlaylistPrint.cxx
@@ -19,6 +19,7 @@
#include "config.h"
#include "PlaylistPrint.hxx"
+#include "PlaylistFile.h"
#include "QueuePrint.hxx"
extern "C" {
@@ -27,7 +28,6 @@ extern "C" {
#include "playlist_any.h"
#include "playlist_song.h"
#include "playlist.h"
-#include "stored_playlist.h"
#include "song_print.h"
#include "song.h"
#include "database.h"
diff --git a/src/playlist_save.c b/src/PlaylistSave.cxx
index 122eca332..00de539d9 100644
--- a/src/playlist_save.c
+++ b/src/PlaylistSave.cxx
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2011 The Music Player Daemon Project
+ * Copyright (C) 2003-2012 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -18,16 +18,18 @@
*/
#include "config.h"
-#include "playlist_save.h"
-#include "playlist.h"
-#include "stored_playlist.h"
-#include "queue.h"
+#include "PlaylistSave.hxx"
+#include "PlaylistFile.h"
#include "song.h"
+
+extern "C" {
+#include "playlist.h"
#include "mapper.h"
#include "path.h"
#include "uri.h"
-#include "database.h"
#include "idle.h"
+}
+
#include "glib_compat.h"
#include <glib.h>
@@ -127,7 +129,7 @@ playlist_load_spl(struct playlist *playlist, struct player_control *pc,
end_index = list->len;
for (unsigned i = start_index; i < end_index; ++i) {
- const char *temp = g_ptr_array_index(list, i);
+ const char *temp = (const char *)g_ptr_array_index(list, i);
if ((playlist_append_uri(playlist, pc, temp, NULL)) != PLAYLIST_RESULT_SUCCESS) {
/* for windows compatibility, convert slashes */
char *temp2 = g_strdup(temp);
diff --git a/src/playlist_save.h b/src/PlaylistSave.hxx
index a6c31a9a6..20b2ca425 100644
--- a/src/playlist_save.h
+++ b/src/PlaylistSave.hxx
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2011 The Music Player Daemon Project
+ * Copyright (C) 2003-2012 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
diff --git a/src/main.c b/src/main.c
index f08a2ec31..39778aad6 100644
--- a/src/main.c
+++ b/src/main.c
@@ -26,7 +26,7 @@
#include "idle.h"
#include "AllCommands.h"
#include "playlist.h"
-#include "stored_playlist.h"
+#include "PlaylistFile.h"
#include "database.h"
#include "update.h"
#include "player_thread.h"
diff --git a/src/playlist_any.c b/src/playlist_any.c
index 450ca5932..e4017ac0d 100644
--- a/src/playlist_any.c
+++ b/src/playlist_any.c
@@ -20,7 +20,7 @@
#include "config.h"
#include "playlist_any.h"
#include "playlist_list.h"
-#include "playlist_mapper.h"
+#include "PlaylistMapper.h"
#include "uri.h"
#include "input_stream.h"