stored_playlist, playlist_save: use C++ compiler
This commit is contained in:
parent
acec9c4fd7
commit
7298b6c846
@ -152,11 +152,9 @@ mpd_headers = \
|
||||
src/playlist.h \
|
||||
src/playlist_error.h \
|
||||
src/playlist_internal.h \
|
||||
src/playlist_save.h \
|
||||
src/playlist_state.h \
|
||||
src/playlist_plugin.h \
|
||||
src/playlist_list.h \
|
||||
src/playlist_mapper.h \
|
||||
src/playlist_any.h \
|
||||
src/playlist_song.h \
|
||||
src/playlist_queue.h \
|
||||
@ -208,7 +206,6 @@ mpd_headers = \
|
||||
src/string_util.h \
|
||||
src/volume.h \
|
||||
src/zeroconf.h src/zeroconf-internal.h \
|
||||
src/stored_playlist.h \
|
||||
src/timer.h \
|
||||
src/archive_api.h \
|
||||
src/archive_internal.h \
|
||||
@ -322,8 +319,8 @@ src_mpd_SOURCES = \
|
||||
src/playlist_control.c \
|
||||
src/playlist_edit.c \
|
||||
src/PlaylistPrint.cxx src/PlaylistPrint.hxx \
|
||||
src/playlist_save.c \
|
||||
src/playlist_mapper.c \
|
||||
src/PlaylistSave.cxx src/PlaylistSave.hxx \
|
||||
src/PlaylistMapper.cxx src/PlaylistMapper.h \
|
||||
src/playlist_any.c \
|
||||
src/playlist_song.c \
|
||||
src/playlist_state.c \
|
||||
@ -359,7 +356,7 @@ src_mpd_SOURCES = \
|
||||
src/string_util.c \
|
||||
src/volume.c \
|
||||
src/SongFilter.cxx src/SongFilter.hxx \
|
||||
src/stored_playlist.c \
|
||||
src/PlaylistFile.cxx src/PlaylistFile.h \
|
||||
src/timer.c
|
||||
|
||||
#
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
@ -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
|
@ -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>
|
||||
|
@ -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
|
@ -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"
|
||||
|
@ -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);
|
@ -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
|
@ -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"
|
||||
|
@ -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"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user