]> git.sesse.net Git - vlc/blob - src/network/httpd.h
e83c17d5b37782561b35c4b21fe1b0b4ac072b9a
[vlc] / src / network / httpd.h
1 /*****************************************************************************
2  * httpd.h: builtin HTTP/RTSP server internals.
3  *****************************************************************************
4  * Copyright (C) 2004-2006 the VideoLAN team
5  * $Id$
6  *
7  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22  *****************************************************************************/
23
24 #ifndef _LIBVLC_HTTPD_H
25 #define _LIBVLC_HTTPD_H 1
26
27 struct httpd_t
28 {
29     VLC_COMMON_MEMBERS
30
31     int          i_host;
32     httpd_host_t **host;
33 };
34
35
36 /* each host run in his own thread */
37 struct httpd_host_t
38 {
39     VLC_COMMON_MEMBERS
40
41     httpd_t     *httpd;
42
43     /* ref count */
44     int         i_ref;
45
46     /* address/port and socket for listening at connections */
47     char        *psz_hostname;
48     int         i_port;
49     int         *fd;
50
51     /* Statistics */
52     counter_t *p_active_counter;
53     counter_t *p_total_counter;
54
55     vlc_mutex_t lock;
56
57     /* all registered url (becarefull that 2 httpd_url_t could point at the same url)
58      * This will slow down the url research but make my live easier
59      * All url will have their cb trigger, but only the first one can answer
60      * */
61     int         i_url;
62     httpd_url_t **url;
63
64     int            i_client;
65     httpd_client_t **client;
66
67     /* TLS data */
68     tls_server_t *p_tls;
69 };
70 #endif /* _LIBVLC_HTTPD_H */