]> git.sesse.net Git - vlc/blob - src/missing.c
src/missing: fix compilation if httpd is disabled
[vlc] / src / missing.c
1 /*****************************************************************************
2  * missing.c: missing libvlccore symbols
3  *****************************************************************************
4  * Copyright (C) 2008 RĂ©mi Denis-Courmont
5  *
6  * This program is free software; you can redistribute it and/or modify it
7  * under the terms of the GNU Lesser General Public License as published by
8  * the Free Software Foundation; either version 2.1 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with this program; if not, write to the Free Software Foundation,
18  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
19  *****************************************************************************/
20
21 /** \file
22  * This file contains dummy replacement API for disabled features
23  */
24
25 #ifdef HAVE_CONFIG_H
26 # include "config.h"
27 #endif
28
29 #include <vlc_common.h>
30 #include <assert.h>
31
32 #ifndef ENABLE_HTTPD
33 # include <vlc_httpd.h>
34
35 char *httpd_ClientIP (const httpd_client_t *cl, char *psz_ip, int *port)
36 {
37     (void) cl; (void) psz_ip; (void) port;
38     assert (0);
39 }
40
41 void httpd_ClientModeBidir (httpd_client_t *cl)
42 {
43     (void) cl;
44     assert (0);
45 }
46
47 void httpd_ClientModeStream (httpd_client_t *cl)
48 {
49     (void) cl;
50     assert (0);
51 }
52
53 httpd_file_sys_t *httpd_FileDelete (httpd_file_t *file)
54 {
55     (void) file;
56     assert (0);
57 }
58
59 httpd_file_t *httpd_FileNew (httpd_host_t *host,
60                              const char *url, const char *content_type,
61                              const char *login, const char *password,
62                              httpd_file_callback_t cb, httpd_file_sys_t *data)
63 {
64     (void) host;
65     (void) url; (void) content_type;
66     (void) login; (void) password;
67     (void) cb; (void) data;
68     assert (0);
69 }
70
71 httpd_handler_sys_t *httpd_HandlerDelete (httpd_handler_t *handler)
72 {
73     (void) handler;
74     assert (0);
75 }
76
77 httpd_handler_t *httpd_HandlerNew (httpd_host_t *host, const char *url,
78                                    const char *login, const char *password,
79                                    httpd_handler_callback_t cb,
80                                    httpd_handler_sys_t *data)
81 {
82     (void) host; (void) url;
83     (void) login; (void) password;
84     (void) cb; (void) data;
85     assert (0);
86 }
87
88 void httpd_HostDelete (httpd_host_t *h)
89 {
90     (void) h;
91     assert (0);
92 }
93
94 httpd_host_t *vlc_http_HostNew (vlc_object_t *obj)
95 {
96     msg_Err (obj, "HTTP server not compiled-in!");
97     return NULL;
98 }
99
100 httpd_host_t *vlc_https_HostNew (vlc_object_t *obj)
101 {
102     msg_Err (obj, "HTTPS server not compiled-in!");
103     return NULL;
104 }
105
106 httpd_host_t *vlc_rtsp_HostNew (vlc_object_t *obj)
107 {
108     msg_Err (obj, "RTSP server not compiled-in!");
109     return NULL;
110 }
111
112 void httpd_MsgAdd (httpd_message_t *m, const char *name, const char *fmt, ...)
113 {
114     (void) m; (void) name; (void) fmt;
115     assert (0);
116 }
117
118 const char *httpd_MsgGet (const httpd_message_t *m, const char *name)
119 {
120     (void) m; (void) name;
121     assert (0);
122 }
123
124 void httpd_RedirectDelete (httpd_redirect_t *r)
125 {
126     (void) r;
127     assert (0);
128 }
129
130 httpd_redirect_t *httpd_RedirectNew (httpd_host_t *host,
131                                      const char *dst, const char *src)
132 {
133     (void) host; (void) dst; (void) src;
134     assert (0);
135 }
136
137 char *httpd_ServerIP (const httpd_client_t *client, char *ip, int *port)
138 {
139     (void) client; (void) ip; (void) port;
140     assert (0);
141 }
142
143 void httpd_StreamDelete (httpd_stream_t *stream)
144 {
145     (void) stream;
146     assert (0);
147 }
148
149 int httpd_StreamHeader (httpd_stream_t *stream, uint8_t *data, int count)
150 {
151     (void) stream; (void) data; (void) count;
152     assert (0);
153 }
154
155 httpd_stream_t *httpd_StreamNew (httpd_host_t *host,
156                                  const char *url, const char *content_type,
157                                  const char *login, const char *password)
158 {
159     (void) host; (void) url; (void) content_type;
160     (void) login; (void) password;
161     assert (0);
162 }
163
164 int httpd_StreamSend (httpd_stream_t *stream, const block_t *p_block)
165 {
166     (void) stream; (void) p_block;
167     assert (0);
168 }
169
170 int httpd_StreamSetHTTPHeaders (httpd_stream_t * stream,
171                                 httpd_header * headers,
172                                 size_t i_headers)
173 {
174     (void) stream; (void) headers; (void) i_headers;
175     assert (0);
176 }
177
178 int httpd_UrlCatch (httpd_url_t *url, int request, httpd_callback_t cb,
179                     httpd_callback_sys_t *data)
180 {
181     (void) url; (void) request; (void) cb; (void) data;
182     assert (0);
183 }
184
185 void httpd_UrlDelete (httpd_url_t *url)
186 {
187     (void) url;
188     assert (0);
189 }
190
191 httpd_url_t *httpd_UrlNew (httpd_host_t *host, const char *url,
192                            const char *login, const char *password)
193 {
194     (void) host; (void) url; (void) login; (void) password;
195     assert (0);
196 }
197 #endif /* !ENABLE_HTTPD */
198
199 #ifndef ENABLE_SOUT
200 # include <vlc_sout.h>
201
202 char *sdp_AddMedia (char **sdp, const char *type, const char *protocol,
203                     int dport, unsigned pt, bool bw_indep, unsigned bw,
204                     const char *ptname, unsigned clockrate, unsigned channels,
205                     const char *fmtp)
206 {
207     assert (*sdp == NULL);
208     return NULL;
209 }
210
211 char *sdp_AddAttribute (char **sdp, const char *name, const char *fmt, ...)
212 {
213     assert (*sdp == NULL);
214     return NULL;
215 }
216
217 int sout_AccessOutControl (sout_access_out_t *out, int query, ...)
218 {
219     assert (0);
220 }
221
222 void sout_AccessOutDelete (sout_access_out_t *out)
223 {
224     assert (0);
225 }
226
227 #undef sout_AccessOutNew
228 sout_access_out_t *sout_AccessOutNew (vlc_object_t *obj,
229                                       const char *access, const char *name)
230 {
231     msg_Err (obj, "Output support not compiled-in!");
232     return NULL;
233 }
234
235 ssize_t sout_AccessOutRead (sout_access_out_t *out, block_t *block)
236 {
237     assert (0);
238 }
239
240 int sout_AccessOutSeek (sout_access_out_t *out, off_t offset)
241 {
242     assert (0);
243 }
244
245 ssize_t sout_AccessOutWrite (sout_access_out_t *out, block_t *block)
246 {
247     assert (0);
248 }
249
250 #undef sout_AnnounceRegisterSDP
251 session_descriptor_t *sout_AnnounceRegisterSDP (vlc_object_t *obj,
252                                                 const char *sdp,
253                                                 const char *dst)
254 {
255     msg_Err (obj, "SDP export not compiled-in!");
256     return NULL;
257 }
258
259 #undef sout_AnnounceUnRegister
260 sout_AnnounceUnRegister (vlc_object_t *obj, session_descriptor_t *d)
261 {
262     assert (0);
263 }
264
265 #undef sout_EncoderCreate
266 encoder_t *sout_EncoderCreate( vlc_object_t *p_this )
267 {
268     msg_Err (p_this, "Encoding support not compiled-in!");
269     return NULL;
270 }
271
272 sout_input_t *sout_MuxAddStream (sout_mux_t *mux, es_format_t *fmt)
273 {
274     assert (0);
275 }
276
277 void sout_MuxDelete (sout_mux_t *mux)
278 {
279     assert (0);
280 }
281
282 void sout_MuxDeleteStream (sout_mux_t *mux, sout_input_t *input)
283 {
284     assert (0);
285 }
286
287 int sout_MuxGetStream (sout_mux_t *p_mux, int i_blocks, mtime_t *pi_dts)
288 {
289     assert (0);
290 }
291
292 sout_mux_t *sout_MuxNew (sout_instance_t *instance, const char *mux,
293                          sout_access_out_t *out)
294 {
295     assert (0);
296 }
297
298 int sout_MuxSendBuffer (sout_mux_t *mux, sout_input_t *input, block_t *block)
299 {
300     assert (0);
301 }
302
303 void sout_StreamChainDelete (sout_stream_t *p_first, sout_stream_t *p_last)
304 {
305     assert (0);
306 }
307
308 sout_stream_t *sout_StreamChainNew (sout_instance_t *p_sout, char *psz_chain,
309                                     sout_stream_t *p_next,
310                                     sout_stream_t **pp_last)
311 {
312     assert (0);
313 }
314
315 char *vlc_sdp_Start (vlc_object_t *obj, const char *cfg,
316                      const struct sockaddr *src, size_t srclen,
317                      const struct sockaddr *addr, size_t addrlen)
318 {
319     return NULL;
320 }
321 #endif /* !ENABLE_SOUT */
322
323 #ifndef ENABLE_VLM
324 # include <vlc_vlm.h>
325
326 int vlm_Control (vlm_t *vlm, int query, ...)
327 {
328     VLC_UNUSED (vlm);
329     assert (0);
330 }
331
332 void vlm_Delete (vlm_t *vlm)
333 {
334     VLC_UNUSED (vlm);
335     assert (0);
336 }
337
338 int vlm_ExecuteCommand (vlm_t *vlm, const char *cmd, vlm_message_t **pm)
339 {
340     VLC_UNUSED (vlm);
341     VLC_UNUSED (cmd);
342     VLC_UNUSED (pm);
343     assert (0);
344 }
345
346 vlm_message_t *vlm_MessageAdd (vlm_message_t *a, vlm_message_t *b)
347 {
348     VLC_UNUSED (a);
349     VLC_UNUSED (b);
350     assert (0);
351 }
352
353 void vlm_MessageDelete (vlm_message_t *m)
354 {
355     VLC_UNUSED (m);
356     assert (0);
357 }
358
359 vlm_message_t *vlm_MessageSimpleNew (const char *a)
360 {
361     VLC_UNUSED (a);
362     return NULL;
363 }
364
365 vlm_message_t *vlm_MessageNew (const char *a, const char *fmt, ...)
366 {
367     VLC_UNUSED (a);
368     VLC_UNUSED (fmt);
369     return vlm_MessageSimpleNew (a);
370 }
371
372 #undef vlm_New
373 vlm_t *vlm_New (vlc_object_t *obj)
374 {
375      msg_Err (obj, "VLM not compiled-in!");
376      return NULL;
377 }
378 #endif /* !ENABLE_VLM */