MPD 0.20.6

- Main Page
- Namespaces
- Data Structures
- Files

- File List
- Globals

Mapper.hxx
Go to the documentation of this file.
1 /*
2 * Copyright 2003-2017 The Music Player Daemon Project
3 * http://www.musicpd.org
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20 /*
21 * Maps directory and song objects to file system paths.
22 */
23
24 #ifndef MPD_MAPPER_HXX
25 #define MPD_MAPPER_HXX
26
27 #include <string>
28
29 #include "Compiler.h"
30
31 #define PLAYLIST_FILE_SUFFIX ".m3u"
32
33 class Path;
34 class AllocatedPath;
35
36 void
37 mapper_init(AllocatedPath &&playlist_dir);
38
39 void
40 mapper_finish();
41
42 #ifdef ENABLE_DATABASE
43
49 gcc_pure
50 AllocatedPath
51 map_uri_fs(const char *uri);
52
61 gcc_pure
62 std::string
63 map_fs_to_utf8(Path path_fs);
64
65 #endif
66
70 gcc_const
71 const AllocatedPath &
72 map_spl_path();
73
80 gcc_pure
81 AllocatedPath
82 map_spl_utf8_to_fs(const char *name);
83
84 #endif
AllocatedPath
A path name in the native file system character set.
Definition: AllocatedPath.hxx:38
mapper_finish
void mapper_finish()
Path
A path name in the native file system character set.
Definition: Path.hxx:39
Compiler.h
gcc_const
#define gcc_const
Definition: Compiler.h:109
map_spl_utf8_to_fs
gcc_pure AllocatedPath map_spl_utf8_to_fs(const char *name)
Maps a playlist name (without the ".m3u" suffix) to a file system path.
map_spl_path
gcc_const const AllocatedPath & map_spl_path()
Returns the playlist directory.
gcc_pure
#define gcc_pure
Definition: Compiler.h:116
uri
const Storage const char * uri
Definition: DatabasePlaylist.hxx:31
mapper_init
void mapper_init(AllocatedPath &&playlist_dir)
name
const Partition const char * name
Definition: Count.hxx:34