2 * Copyright (C) 2003-2010 The Music Player Daemon Project
3 * http://www.musicpd.org
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.
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.
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.
20 #ifndef PLAYLIST_PRINT_H
21 #define PLAYLIST_PRINT_H
28 struct locate_item_list
;
31 * Sends the whole playlist to the client, song URIs only.
34 playlist_print_uris(struct client
*client
, const struct playlist
*playlist
);
37 * Sends a range of the playlist to the client, including all known
38 * information about the songs. The "end" offset is decreased
39 * automatically if it is too large; passing UINT_MAX is allowed.
40 * This function however fails when the start offset is invalid.
43 playlist_print_info(struct client
*client
, const struct playlist
*playlist
,
44 unsigned start
, unsigned end
);
47 * Sends the song with the specified id to the client.
49 * @return true on suite, false if there is no such song
52 playlist_print_id(struct client
*client
, const struct playlist
*playlist
,
56 * Sends the current song to the client.
58 * @return true on success, false if there is no current song
61 playlist_print_current(struct client
*client
, const struct playlist
*playlist
);
64 * Find songs in the playlist.
67 playlist_print_find(struct client
*client
, const struct playlist
*playlist
,
68 const struct locate_item_list
*list
);
71 * Search for songs in the playlist.
74 playlist_print_search(struct client
*client
, const struct playlist
*playlist
,
75 const struct locate_item_list
*list
);
78 * Print detailed changes since the specified playlist version.
81 playlist_print_changes_info(struct client
*client
,
82 const struct playlist
*playlist
,
86 * Print changes since the specified playlist version, position only.
89 playlist_print_changes_position(struct client
*client
,
90 const struct playlist
*playlist
,
94 * Send the stored playlist to the client.
96 * @param client the client which requested the playlist
97 * @param name_utf8 the name of the stored playlist in UTF-8 encoding
98 * @param detail true if all details should be printed
99 * @return true on success, false if the playlist does not exist
102 spl_print(struct client
*client
, const char *name_utf8
, bool detail
);
105 * Send the playlist file to the client.
107 * @param client the client which requested the playlist
108 * @param uri the URI of the playlist file in UTF-8 encoding
109 * @param detail true if all details should be printed
110 * @return true on success, false if the playlist does not exist
113 playlist_file_print(struct client
*client
, const char *uri
, bool detail
);