MPD  0.20.18
PlaylistFile.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 #ifndef MPD_PLAYLIST_FILE_HXX
21 #define MPD_PLAYLIST_FILE_HXX
22 
23 #include <vector>
24 #include <string>
25 
26 class DetachedSong;
27 class SongLoader;
28 class PlaylistVector;
30 
31 typedef std::vector<std::string> PlaylistFileContents;
32 
33 extern bool playlist_saveAbsolutePaths;
34 
38 void
40 
45 bool
46 spl_valid_name(const char *name_utf8);
47 
49 spl_map_to_fs(const char *name_utf8);
50 
56 
58 LoadPlaylistFile(const char *utf8path);
59 
60 void
61 spl_move_index(const char *utf8path, unsigned src, unsigned dest);
62 
63 void
64 spl_clear(const char *utf8path);
65 
66 void
67 spl_delete(const char *name_utf8);
68 
69 void
70 spl_remove_index(const char *utf8path, unsigned pos);
71 
72 void
73 spl_append_song(const char *utf8path, const DetachedSong &song);
74 
78 void
79 spl_append_uri(const char *path_utf8,
80  const SongLoader &loader, const char *uri_utf8);
81 
82 void
83 spl_rename(const char *utf8from, const char *utf8to);
84 
85 #endif
std::vector< std::string > PlaylistFileContents
AllocatedPath spl_map_to_fs(const char *name_utf8)
A path name in the native file system character set.
const Storage const char const char * path_utf8
PlaylistVector ListPlaylistFiles()
Returns a list of stored_playlist_info struct pointers.
void spl_rename(const char *utf8from, const char *utf8to)
void spl_append_uri(const char *path_utf8, const SongLoader &loader, const char *uri_utf8)
Throws #std::runtime_error on error.
void spl_append_song(const char *utf8path, const DetachedSong &song)
void spl_delete(const char *name_utf8)
void spl_clear(const char *utf8path)
PlaylistFileContents LoadPlaylistFile(const char *utf8path)
A utility class that loads a DetachedSong object by its URI.
Definition: SongLoader.hxx:41
void spl_remove_index(const char *utf8path, unsigned pos)
void spl_move_index(const char *utf8path, unsigned src, unsigned dest)
void spl_global_init()
Perform some global initialization, e.g.
bool spl_valid_name(const char *name_utf8)
Determines whether the specified string is a valid name for a stored playlist.
bool playlist_saveAbsolutePaths