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
d65ad1bf
Commit
d65ad1bf
authored
Jan 02, 2013
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mapper: convert to C++
parent
43cbbe11
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
31 additions
and
35 deletions
+31
-35
Makefile.am
Makefile.am
+1
-2
DecoderThread.cxx
src/DecoderThread.cxx
+1
-1
InotifyUpdate.cxx
src/InotifyUpdate.cxx
+1
-1
Main.cxx
src/Main.cxx
+1
-1
Mapper.cxx
src/Mapper.cxx
+5
-2
Mapper.hxx
src/Mapper.hxx
+9
-12
OtherCommands.cxx
src/OtherCommands.cxx
+1
-1
PlaylistFile.cxx
src/PlaylistFile.cxx
+1
-1
PlaylistMapper.cxx
src/PlaylistMapper.cxx
+1
-1
PlaylistSave.cxx
src/PlaylistSave.cxx
+1
-1
PlaylistSong.cxx
src/PlaylistSong.cxx
+1
-1
QueuePrint.cxx
src/QueuePrint.cxx
+1
-1
SongPrint.cxx
src/SongPrint.cxx
+1
-1
SongUpdate.cxx
src/SongUpdate.cxx
+1
-1
UpdateArchive.cxx
src/UpdateArchive.cxx
+1
-1
UpdateContainer.cxx
src/UpdateContainer.cxx
+1
-1
UpdateGlue.cxx
src/UpdateGlue.cxx
+1
-1
UpdateIO.cxx
src/UpdateIO.cxx
+1
-4
UpdateWalk.cxx
src/UpdateWalk.cxx
+1
-1
No files found.
Makefile.am
View file @
d65ad1bf
...
...
@@ -130,7 +130,6 @@ mpd_headers = \
src/pipe.h
\
src/chunk.h
\
src/path.h
\
src/mapper.h
\
src/open.h
\
src/output/httpd_client.h
\
src/output/httpd_internal.h
\
...
...
@@ -283,7 +282,7 @@ src_mpd_SOURCES = \
src/pipe.c
\
src/chunk.c
\
src/path.c
\
src/
mapper.c
\
src/
Mapper.cxx src/Mapper.hxx
\
src/page.c
\
src/permission.c
\
src/PlayerThread.cxx src/PlayerThread.hxx
\
...
...
src/DecoderThread.cxx
View file @
d65ad1bf
...
...
@@ -23,6 +23,7 @@
#include "decoder_plugin.h"
#include "song.h"
#include "mpd_error.h"
#include "Mapper.hxx"
extern
"C"
{
#include "decoder_control.h"
...
...
@@ -32,7 +33,6 @@ extern "C" {
#include "replay_gain_ape.h"
#include "input_stream.h"
#include "tag.h"
#include "mapper.h"
#include "uri.h"
}
...
...
src/InotifyUpdate.cxx
View file @
d65ad1bf
...
...
@@ -22,9 +22,9 @@
#include "InotifySource.hxx"
#include "InotifyQueue.hxx"
#include "database.h"
#include "Mapper.hxx"
extern
"C"
{
#include "mapper.h"
#include "path.h"
}
...
...
src/Main.cxx
View file @
d65ad1bf
...
...
@@ -24,6 +24,7 @@
#include "chunk.h"
#include "StateFile.hxx"
#include "PlayerThread.hxx"
#include "Mapper.hxx"
extern
"C"
{
#include "daemon.h"
...
...
@@ -38,7 +39,6 @@ extern "C" {
#include "cmdline.h"
#include "conf.h"
#include "path.h"
#include "mapper.h"
#include "player_control.h"
#include "stats.h"
#include "sig_handlers.h"
...
...
src/
mapper.c
→
src/
Mapper.cxx
View file @
d65ad1bf
/*
* 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
...
...
@@ -22,10 +22,13 @@
*/
#include "config.h"
#include "
mapper.h
"
#include "
Mapper.hxx
"
#include "directory.h"
#include "song.h"
extern
"C"
{
#include "path.h"
}
#include <glib.h>
...
...
src/
mapper.h
→
src/
Mapper.hxx
View file @
d65ad1bf
/*
* 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
...
...
@@ -21,15 +21,12 @@
* Maps directory and song objects to file system paths.
*/
#ifndef MPD_MAPPER_H
#define MPD_MAPPER_H
#ifndef MPD_MAPPER_H
XX
#define MPD_MAPPER_H
XX
#include "gcc.h"
#include "gerror.h"
#include <stdbool.h>
#include <stddef.h>
#define PLAYLIST_FILE_SUFFIX ".m3u"
struct
directory
;
...
...
@@ -61,7 +58,7 @@ gcc_const
static
inline
bool
mapper_has_music_directory
(
void
)
{
return
mapper_get_music_directory_utf8
()
!=
NULL
;
return
mapper_get_music_directory_utf8
()
!=
nullptr
;
}
/**
...
...
@@ -86,7 +83,7 @@ map_uri_fs(const char *uri);
* Determines the file system path of a directory object.
*
* @param directory the directory object
* @return the path in file system encoding, or
NULL
if mapping failed
* @return the path in file system encoding, or
nullptr
if mapping failed
*/
gcc_malloc
char
*
...
...
@@ -98,7 +95,7 @@ map_directory_fs(const struct directory *directory);
*
* @param directory the parent directory object
* @param name the child's name in UTF-8
* @return the path in file system encoding, or
NULL
if mapping failed
* @return the path in file system encoding, or
nullptr
if mapping failed
*/
gcc_malloc
char
*
...
...
@@ -109,7 +106,7 @@ map_directory_child_fs(const struct directory *directory, const char *name);
* remote song.
*
* @param song the song object
* @return the path in file system encoding, or
NULL
if mapping failed
* @return the path in file system encoding, or
nullptr
if mapping failed
*/
gcc_malloc
char
*
...
...
@@ -120,7 +117,7 @@ map_song_fs(const struct song *song);
* absolute) to a relative path in UTF-8 encoding.
*
* @param path_fs a path in file system encoding
* @return the relative path in UTF-8, or
NULL
if mapping failed
* @return the relative path in UTF-8, or
nullptr
if mapping failed
*/
gcc_malloc
char
*
...
...
@@ -138,7 +135,7 @@ map_spl_path(void);
* path. The return value is allocated on the heap and must be freed
* with g_free().
*
* @return the path in file system encoding, or
NULL
if mapping failed
* @return the path in file system encoding, or
nullptr
if mapping failed
*/
gcc_pure
char
*
...
...
src/OtherCommands.cxx
View file @
d65ad1bf
...
...
@@ -27,6 +27,7 @@
#include "SongPrint.hxx"
#include "TagPrint.hxx"
#include "TimePrint.hxx"
#include "Mapper.hxx"
extern
"C"
{
#include "protocol/argparser.h"
...
...
@@ -46,7 +47,6 @@ extern "C" {
#include "client_idle.h"
#include "client_file.h"
#include "idle.h"
#include "mapper.h"
}
#ifdef ENABLE_SQLITE
...
...
src/PlaylistFile.cxx
View file @
d65ad1bf
...
...
@@ -22,10 +22,10 @@
#include "PlaylistSave.hxx"
#include "song.h"
#include "io_error.h"
#include "Mapper.hxx"
extern
"C"
{
#include "text_file.h"
#include "mapper.h"
#include "path.h"
#include "uri.h"
#include "database.h"
...
...
src/PlaylistMapper.cxx
View file @
d65ad1bf
...
...
@@ -20,10 +20,10 @@
#include "config.h"
#include "PlaylistMapper.hxx"
#include "PlaylistFile.hxx"
#include "Mapper.hxx"
extern
"C"
{
#include "playlist_list.h"
#include "mapper.h"
#include "uri.h"
}
...
...
src/PlaylistSave.cxx
View file @
d65ad1bf
...
...
@@ -21,10 +21,10 @@
#include "PlaylistSave.hxx"
#include "PlaylistFile.hxx"
#include "song.h"
#include "Mapper.hxx"
extern
"C"
{
#include "playlist.h"
#include "mapper.h"
#include "path.h"
#include "uri.h"
#include "idle.h"
...
...
src/PlaylistSong.cxx
View file @
d65ad1bf
...
...
@@ -19,10 +19,10 @@
#include "config.h"
#include "PlaylistSong.hxx"
#include "Mapper.hxx"
extern
"C"
{
#include "database.h"
#include "mapper.h"
#include "song.h"
#include "uri.h"
#include "path.h"
...
...
src/QueuePrint.cxx
View file @
d65ad1bf
...
...
@@ -21,12 +21,12 @@
#include "QueuePrint.hxx"
#include "SongFilter.hxx"
#include "SongPrint.hxx"
#include "Mapper.hxx"
extern
"C"
{
#include "queue.h"
#include "song.h"
#include "client.h"
#include "mapper.h"
}
/**
...
...
src/SongPrint.cxx
View file @
d65ad1bf
...
...
@@ -23,11 +23,11 @@
#include "directory.h"
#include "TimePrint.hxx"
#include "TagPrint.hxx"
#include "Mapper.hxx"
extern
"C"
{
#include "client.h"
#include "uri.h"
#include "mapper.h"
}
void
...
...
src/SongUpdate.cxx
View file @
d65ad1bf
...
...
@@ -25,9 +25,9 @@ extern "C" {
}
#include "directory.h"
#include "Mapper.hxx"
extern
"C"
{
#include "mapper.h"
#include "decoder_list.h"
#include "decoder_plugin.h"
#include "tag_ape.h"
...
...
src/UpdateArchive.cxx
View file @
d65ad1bf
...
...
@@ -23,9 +23,9 @@
#include "DatabaseLock.hxx"
#include "directory.h"
#include "song.h"
#include "Mapper.hxx"
extern
"C"
{
#include "mapper.h"
#include "archive_list.h"
#include "archive_plugin.h"
}
...
...
src/UpdateContainer.cxx
View file @
d65ad1bf
...
...
@@ -25,9 +25,9 @@
#include "directory.h"
#include "song.h"
#include "decoder_plugin.h"
#include "Mapper.hxx"
extern
"C"
{
#include "mapper.h"
#include "tag.h"
#include "tag_handler.h"
}
...
...
src/UpdateGlue.cxx
View file @
d65ad1bf
...
...
@@ -22,10 +22,10 @@
#include "UpdateQueue.hxx"
#include "UpdateWalk.hxx"
#include "UpdateRemove.hxx"
#include "Mapper.hxx"
extern
"C"
{
#include "database.h"
#include "mapper.h"
#include "playlist.h"
#include "event_pipe.h"
#include "idle.h"
...
...
src/UpdateIO.cxx
View file @
d65ad1bf
...
...
@@ -20,12 +20,9 @@
#include "config.h"
/* must be first for large file support */
#include "UpdateIO.hxx"
#include "directory.h"
#include "Mapper.hxx"
#include "glib_compat.h"
extern
"C"
{
#include "mapper.h"
}
#include <glib.h>
#include <errno.h>
...
...
src/UpdateWalk.cxx
View file @
d65ad1bf
...
...
@@ -27,12 +27,12 @@
#include "directory.h"
#include "song.h"
#include "PlaylistVector.hxx"
#include "Mapper.hxx"
extern
"C"
{
#include "exclude.h"
#include "database.h"
#include "uri.h"
#include "mapper.h"
#include "path.h"
#include "playlist_list.h"
#include "conf.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