configure.ac: Move the encoders before the audio outputs.
[mpd-mk.git] / src / playlist_print.h
blobb3a0446edfa5df80155bb0304dbf25158aa40950
1 /*
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
23 #include <stdbool.h>
24 #include <stdint.h>
26 struct client;
27 struct playlist;
28 struct locate_item_list;
30 /**
31 * Sends the whole playlist to the client, song URIs only.
33 void
34 playlist_print_uris(struct client *client, const struct playlist *playlist);
36 /**
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.
42 bool
43 playlist_print_info(struct client *client, const struct playlist *playlist,
44 unsigned start, unsigned end);
46 /**
47 * Sends the song with the specified id to the client.
49 * @return true on suite, false if there is no such song
51 bool
52 playlist_print_id(struct client *client, const struct playlist *playlist,
53 unsigned id);
55 /**
56 * Sends the current song to the client.
58 * @return true on success, false if there is no current song
60 bool
61 playlist_print_current(struct client *client, const struct playlist *playlist);
63 /**
64 * Find songs in the playlist.
66 void
67 playlist_print_find(struct client *client, const struct playlist *playlist,
68 const struct locate_item_list *list);
70 /**
71 * Search for songs in the playlist.
73 void
74 playlist_print_search(struct client *client, const struct playlist *playlist,
75 const struct locate_item_list *list);
77 /**
78 * Print detailed changes since the specified playlist version.
80 void
81 playlist_print_changes_info(struct client *client,
82 const struct playlist *playlist,
83 uint32_t version);
85 /**
86 * Print changes since the specified playlist version, position only.
88 void
89 playlist_print_changes_position(struct client *client,
90 const struct playlist *playlist,
91 uint32_t version);
93 /**
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
101 bool
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
112 bool
113 playlist_file_print(struct client *client, const char *uri, bool detail);
115 #endif