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.
22 * Internal declarations for the "httpd" audio output plugin.
25 #ifndef MPD_OUTPUT_HTTPD_INTERNAL_H
26 #define MPD_OUTPUT_HTTPD_INTERNAL_H
36 #include <sys/socket.h>
44 * True if the audio output is open and accepts client
50 * The configured encoder plugin.
52 struct encoder
*encoder
;
55 * The MIME type produced by the #encoder.
57 const char *content_type
;
60 * The configured address of the listener socket.
62 struct sockaddr_storage address
;
65 * The size of #address.
67 socklen_t address_size
;
70 * This mutex protects the listener socket and the client
76 * A #Timer object to synchronize this output with the
82 * The listener socket.
87 * A GLib main loop source id for the listener socket.
92 * The header page, which is sent to every client on connect.
97 * The metadata, which is sent to every client.
99 struct page
*metadata
;
102 * A linked list containing all clients which are currently
108 * A temporary buffer for the httpd_output_read_page()
114 * The maximum and current number of clients connected
117 guint clients_max
, clients_cnt
;
121 * Removes a client from the httpd_output.clients linked list.
124 httpd_output_remove_client(struct httpd_output
*httpd
,
125 struct httpd_client
*client
);
128 * Sends the encoder header to the client. This is called right after
129 * the response headers have been sent.
132 httpd_output_send_header(struct httpd_output
*httpd
,
133 struct httpd_client
*client
);