Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
86b0adc8
Commit
86b0adc8
authored
Jan 26, 2013
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playlist/*: convert to C++
parent
ba49f20f
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
85 additions
and
66 deletions
+85
-66
Makefile.am
Makefile.am
+8
-8
CommandLine.cxx
src/CommandLine.cxx
+1
-1
Main.cxx
src/Main.cxx
+1
-1
PlaylistAny.cxx
src/PlaylistAny.cxx
+1
-1
PlaylistMapper.cxx
src/PlaylistMapper.cxx
+1
-1
PlaylistPrint.cxx
src/PlaylistPrint.cxx
+1
-1
PlaylistRegistry.cxx
src/PlaylistRegistry.cxx
+9
-5
PlaylistRegistry.hxx
src/PlaylistRegistry.hxx
+3
-3
UpdateWalk.cxx
src/UpdateWalk.cxx
+1
-1
DespotifyPlaylistPlugin.cxx
src/playlist/DespotifyPlaylistPlugin.cxx
+1
-1
EmbeddedCuePlaylistPlugin.cxx
src/playlist/EmbeddedCuePlaylistPlugin.cxx
+22
-13
EmbeddedCuePlaylistPlugin.hxx
src/playlist/EmbeddedCuePlaylistPlugin.hxx
+3
-3
LastFMPlaylistPlugin.cxx
src/playlist/LastFMPlaylistPlugin.cxx
+13
-10
LastFMPlaylistPlugin.hxx
src/playlist/LastFMPlaylistPlugin.hxx
+3
-3
SoundCloudPlaylistPlugin.cxx
src/playlist/SoundCloudPlaylistPlugin.cxx
+12
-9
SoundCloudPlaylistPlugin.hxx
src/playlist/SoundCloudPlaylistPlugin.hxx
+3
-3
dump_playlist.cxx
test/dump_playlist.cxx
+2
-2
No files found.
Makefile.am
View file @
86b0adc8
...
...
@@ -97,14 +97,12 @@ mpd_headers = \
src/Playlist.hxx
\
src/playlist_error.h
\
src/playlist_plugin.h
\
src/playlist_list.h
\
src/playlist/extm3u_playlist_plugin.h
\
src/playlist/m3u_playlist_plugin.h
\
src/playlist/pls_playlist_plugin.h
\
src/playlist/xspf_playlist_plugin.h
\
src/playlist/asx_playlist_plugin.h
\
src/playlist/rss_playlist_plugin.h
\
src/playlist/lastfm_playlist_plugin.h
\
src/playlist/cue_playlist_plugin.h
\
src/poison.h
\
src/riff.h
\
...
...
@@ -928,9 +926,9 @@ libplaylist_plugins_a_SOURCES = \
src/playlist/asx_playlist_plugin.c
\
src/playlist/rss_playlist_plugin.c
\
src/playlist/cue_playlist_plugin.c
\
src/playlist/
embcue_playlist_plugin.c
\
src/playlist/
embcue_playlist_plugin.h
\
src/
playlist_list.c
src/playlist/
EmbeddedCuePlaylistPlugin.cxx
\
src/playlist/
EmbeddedCuePlaylistPlugin.hxx
\
src/
PlaylistRegistry.cxx src/PlaylistRegistry.hxx
libplaylist_plugins_a_CPPFLAGS
=
$(AM_CPPFLAGS)
\
$(YAJL_CFLAGS)
\
$
(
patsubst
-I
%/FLAC,-I%,
$(FLAC_CFLAGS)
)
...
...
@@ -940,7 +938,9 @@ PLAYLIST_LIBS = \
$(FLAC_LIBS)
if
ENABLE_LASTFM
libplaylist_plugins_a_SOURCES
+=
src/playlist/lastfm_playlist_plugin.c
libplaylist_plugins_a_SOURCES
+=
\
src/playlist/LastFMPlaylistPlugin.cxx
\
src/playlist/LastFMPlaylistPlugin.hxx
endif
if
ENABLE_DESPOTIFY
...
...
@@ -951,8 +951,8 @@ endif
if
ENABLE_SOUNDCLOUD
libplaylist_plugins_a_SOURCES
+=
\
src/playlist/
soundcloud_playlist_plugin.h
\
src/playlist/
soundcloud_playlist_plugin.c
src/playlist/
SoundCloudPlaylistPlugin.cxx
\
src/playlist/
SoundCloudPlaylistPlugin.hxx
PLAYLIST_LIBS
+=
$(YAJL_LIBS)
endif
...
...
src/CommandLine.cxx
View file @
86b0adc8
...
...
@@ -28,7 +28,7 @@
#include "output_plugin.h"
#include "InputRegistry.hxx"
#include "InputPlugin.hxx"
#include "
playlist_list.h
"
#include "
PlaylistRegistry.hxx
"
#include "playlist_plugin.h"
#include "mpd_error.h"
#include "glib_compat.h"
...
...
src/Main.cxx
View file @
86b0adc8
...
...
@@ -48,6 +48,7 @@
#include "event/Loop.hxx"
#include "IOThread.hxx"
#include "fs/Path.hxx"
#include "PlaylistRegistry.hxx"
extern
"C"
{
#include "daemon.h"
...
...
@@ -55,7 +56,6 @@ extern "C" {
#include "audio_config.h"
#include "pcm_resample.h"
#include "decoder_list.h"
#include "playlist_list.h"
#include "zeroconf.h"
}
...
...
src/PlaylistAny.cxx
View file @
86b0adc8
...
...
@@ -20,10 +20,10 @@
#include "config.h"
#include "PlaylistAny.hxx"
#include "PlaylistMapper.hxx"
#include "PlaylistRegistry.hxx"
#include "input_stream.h"
extern
"C"
{
#include "playlist_list.h"
#include "uri.h"
}
...
...
src/PlaylistMapper.cxx
View file @
86b0adc8
...
...
@@ -20,11 +20,11 @@
#include "config.h"
#include "PlaylistMapper.hxx"
#include "PlaylistFile.hxx"
#include "PlaylistRegistry.hxx"
#include "Mapper.hxx"
#include "fs/Path.hxx"
extern
"C"
{
#include "playlist_list.h"
#include "uri.h"
}
...
...
src/PlaylistPrint.cxx
View file @
86b0adc8
...
...
@@ -23,6 +23,7 @@
#include "PlaylistAny.hxx"
#include "PlaylistSong.hxx"
#include "Playlist.hxx"
#include "PlaylistRegistry.hxx"
#include "QueuePrint.hxx"
#include "SongPrint.hxx"
#include "DatabaseGlue.hxx"
...
...
@@ -31,7 +32,6 @@
#include "input_stream.h"
extern
"C"
{
#include "playlist_list.h"
#include "playlist_plugin.h"
#include "song.h"
}
...
...
src/
playlist_list.c
→
src/
PlaylistRegistry.cxx
View file @
86b0adc8
/*
* Copyright (C) 2003-201
1
The Music Player Daemon Project
* Copyright (C) 2003-201
3
The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -18,21 +18,25 @@
*/
#include "config.h"
#include "
playlist_list.h
"
#include "
PlaylistRegistry.hxx
"
#include "playlist_plugin.h"
#include "playlist/extm3u_playlist_plugin.h"
#include "playlist/m3u_playlist_plugin.h"
#include "playlist/xspf_playlist_plugin.h"
#include "playlist/
lastfm_playlist_plugin.h
"
#include "playlist/
LastFMPlaylistPlugin.hxx
"
#include "playlist/DespotifyPlaylistPlugin.hxx"
#include "playlist/
soundcloud_playlist_plugin.h
"
#include "playlist/
SoundCloudPlaylistPlugin.hxx
"
#include "playlist/pls_playlist_plugin.h"
#include "playlist/asx_playlist_plugin.h"
#include "playlist/rss_playlist_plugin.h"
#include "playlist/cue_playlist_plugin.h"
#include "playlist/
embcue_playlist_plugin.h
"
#include "playlist/
EmbeddedCuePlaylistPlugin.hxx
"
#include "input_stream.h"
extern
"C"
{
#include "uri.h"
}
#include "string_util.h"
#include "conf.h"
#include "mpd_error.h"
...
...
src/
playlist_list.h
→
src/
PlaylistRegistry.hxx
View file @
86b0adc8
/*
* Copyright (C) 2003-201
1
The Music Player Daemon Project
* Copyright (C) 2003-201
3
The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef MPD_PLAYLIST_
LIST_H
#define MPD_PLAYLIST_
LIST_H
#ifndef MPD_PLAYLIST_
REGISTRY_HXX
#define MPD_PLAYLIST_
REGISTRY_HXX
#include <glib.h>
...
...
src/UpdateWalk.cxx
View file @
86b0adc8
...
...
@@ -28,6 +28,7 @@
#include "Directory.hxx"
#include "song.h"
#include "PlaylistVector.hxx"
#include "PlaylistRegistry.hxx"
#include "Mapper.hxx"
#include "ExcludeList.hxx"
#include "conf.h"
...
...
@@ -35,7 +36,6 @@
extern
"C"
{
#include "uri.h"
#include "playlist_list.h"
}
#include <glib.h>
...
...
src/playlist/DespotifyPlaylistPlugin.cxx
View file @
86b0adc8
...
...
@@ -21,7 +21,7 @@
#include "DespotifyPlaylistPlugin.hxx"
#include "DespotifyUtils.hxx"
#include "playlist_plugin.h"
#include "
playlist_list.h
"
#include "
PlaylistRegistry.hxx
"
#include "conf.h"
#include "uri.h"
#include "tag.h"
...
...
src/playlist/
embcue_playlist_plugin.c
→
src/playlist/
EmbeddedCuePlaylistPlugin.cxx
View file @
86b0adc8
/*
* Copyright (C) 2003-201
2
The Music Player Daemon Project
* Copyright (C) 2003-201
3
The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -24,15 +24,18 @@
*/
#include "config.h"
#include "
playlist/embcue_playlist_plugin.h
"
#include "
EmbeddedCuePlaylistPlugin.hxx
"
#include "playlist_plugin.h"
#include "tag.h"
#include "tag_handler.h"
#include "song.h"
extern
"C"
{
#include "tag_file.h"
#include "tag_ape.h"
#include "tag_id3.h"
#include "song.h"
#include "cue/cue_parser.h"
}
#include <glib.h>
#include <assert.h>
...
...
@@ -67,7 +70,7 @@ struct embcue_playlist {
static
void
embcue_tag_pair
(
const
char
*
name
,
const
char
*
value
,
void
*
ctx
)
{
struct
embcue_playlist
*
playlist
=
ctx
;
struct
embcue_playlist
*
playlist
=
(
struct
embcue_playlist
*
)
ctx
;
if
(
playlist
->
cuesheet
==
NULL
&&
g_ascii_strcasecmp
(
name
,
"cuesheet"
)
==
0
)
...
...
@@ -75,7 +78,9 @@ embcue_tag_pair(const char *name, const char *value, void *ctx)
}
static
const
struct
tag_handler
embcue_tag_handler
=
{
.
pair
=
embcue_tag_pair
,
nullptr
,
nullptr
,
embcue_tag_pair
,
};
static
struct
playlist_provider
*
...
...
@@ -170,12 +175,16 @@ static const char *const embcue_playlist_suffixes[] = {
};
const
struct
playlist_plugin
embcue_playlist_plugin
=
{
.
name
=
"cue"
,
.
open_uri
=
embcue_playlist_open_uri
,
.
close
=
embcue_playlist_close
,
.
read
=
embcue_playlist_read
,
.
suffixes
=
embcue_playlist_suffixes
,
.
mime_types
=
NULL
,
"cue"
,
nullptr
,
nullptr
,
embcue_playlist_open_uri
,
nullptr
,
embcue_playlist_close
,
embcue_playlist_read
,
embcue_playlist_suffixes
,
nullptr
,
nullptr
,
};
src/playlist/
embcue_playlist_plugin.h
→
src/playlist/
EmbeddedCuePlaylistPlugin.hxx
View file @
86b0adc8
/*
* Copyright (C) 2003-201
2
The Music Player Daemon Project
* Copyright (C) 2003-201
3
The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef MPD_
PLAYLIST_EMBCUE_PLAYLIST_PLUGIN_H
#define MPD_
PLAYLIST_EMBCUE_PLAYLIST_PLUGIN_H
#ifndef MPD_
EMBCUE_PLAYLIST_PLUGIN_HXX
#define MPD_
EMBCUE_PLAYLIST_PLUGIN_HXX
extern
const
struct
playlist_plugin
embcue_playlist_plugin
;
...
...
src/playlist/
lastfm_playlist_plugin.c
→
src/playlist/
LastFMPlaylistPlugin.cxx
View file @
86b0adc8
/*
* Copyright (C) 2003-201
1
The Music Player Daemon Project
* Copyright (C) 2003-201
3
The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -18,9 +18,9 @@
*/
#include "config.h"
#include "
playlist/lastfm_playlist_plugin.h
"
#include "
LastFMPlaylistPlugin.hxx
"
#include "playlist_plugin.h"
#include "
playlist_list.h
"
#include "
PlaylistRegistry.hxx
"
#include "conf.h"
#include "uri.h"
#include "song.h"
...
...
@@ -284,13 +284,16 @@ static const char *const lastfm_schemes[] = {
};
const
struct
playlist_plugin
lastfm_playlist_plugin
=
{
.
name
=
"lastfm"
,
"lastfm"
,
.
init
=
lastfm_init
,
.
finish
=
lastfm_finish
,
.
open_uri
=
lastfm_open_uri
,
.
close
=
lastfm_close
,
.
read
=
lastfm_read
,
lastfm_init
,
lastfm_finish
,
lastfm_open_uri
,
nullptr
,
lastfm_close
,
lastfm_read
,
.
schemes
=
lastfm_schemes
,
lastfm_schemes
,
nullptr
,
nullptr
,
};
src/playlist/
lastfm_playlist_plugin.h
→
src/playlist/
LastFMPlaylistPlugin.hxx
View file @
86b0adc8
/*
* Copyright (C) 2003-201
1
The Music Player Daemon Project
* Copyright (C) 2003-201
3
The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef MPD_
PLAYLIST_LASTFM_PLAYLIST_PLUGIN_H
#define MPD_
PLAYLIST_LASTFM_PLAYLIST_PLUGIN_H
#ifndef MPD_
LASTFM_PLAYLIST_PLUGIN_HXX
#define MPD_
LASTFM_PLAYLIST_PLUGIN_HXX
extern
const
struct
playlist_plugin
lastfm_playlist_plugin
;
...
...
src/playlist/
soundcloud_playlist_plugin.c
→
src/playlist/
SoundCloudPlaylistPlugin.cxx
View file @
86b0adc8
/*
* Copyright (C) 2003-201
1
The Music Player Daemon Project
* Copyright (C) 2003-201
3
The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -18,7 +18,7 @@
*/
#include "config.h"
#include "
playlist/soundcloud_playlist_plugin.h
"
#include "
SoundCloudPlaylistPlugin.hxx
"
#include "conf.h"
#include "input_stream.h"
#include "playlist_plugin.h"
...
...
@@ -434,15 +434,18 @@ static const char *const soundcloud_schemes[] = {
};
const
struct
playlist_plugin
soundcloud_playlist_plugin
=
{
.
name
=
"soundcloud"
,
"soundcloud"
,
.
init
=
soundcloud_init
,
.
finish
=
soundcloud_finish
,
.
open_uri
=
soundcloud_open_uri
,
.
close
=
soundcloud_close
,
.
read
=
soundcloud_read
,
soundcloud_init
,
soundcloud_finish
,
soundcloud_open_uri
,
nullptr
,
soundcloud_close
,
soundcloud_read
,
.
schemes
=
soundcloud_schemes
,
soundcloud_schemes
,
nullptr
,
nullptr
,
};
src/playlist/
soundcloud_playlist_plugin.h
→
src/playlist/
SoundCloudPlaylistPlugin.hxx
View file @
86b0adc8
/*
* Copyright (C) 2003-201
1
The Music Player Daemon Project
* Copyright (C) 2003-201
3
The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef MPD_
PLAYLIST_SOUNDCLOUD_PLAYLIST_PLUGIN_H
#define MPD_
PLAYLIST_SOUNDCLOUD_PLAYLIST_PLUGIN_H
#ifndef MPD_
SOUNDCLOUD_PLAYLIST_PLUGIN_HXX
#define MPD_
SOUNDCLOUD_PLAYLIST_PLUGIN_HXX
extern
const
struct
playlist_plugin
soundcloud_playlist_plugin
;
...
...
test/dump_playlist.cxx
View file @
86b0adc8
...
...
@@ -26,11 +26,11 @@
#include "decoder_api.h"
#include "InputInit.hxx"
#include "IOThread.hxx"
#include "PlaylistRegistry.hxx"
#include "playlist_plugin.h"
extern
"C"
{
#include "decoder_list.h"
#include "playlist_list.h"
#include "playlist_plugin.h"
}
#include <glib.h>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment