VLC 4.0.0-dev
Loading...
Searching...
No Matches
outfile.h
Go to the documentation of this file.
1/*****************************************************************************
2 * outfile.h: HTTP write-only file
3 *****************************************************************************
4 * Copyright (C) 2015, 2020 RĂ©mi Denis-Courmont
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it 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#include <stdint.h>
22
23/**
24 * \defgroup http_outfile Output files
25 * HTTP write-only files
26 * \ingroup http
27 * @{
28 */
29
30struct vlc_http_mgr;
31struct vlc_http_outfile;
32
33/**
34 * Creates an HTTP output file.
35 *
36 * @param mgr HTTP connection manager
37 * @param url URL of the file to write
38 * @param ua user-agent string (NULL to ignore)
39 * @param user username for authentication (NULL to skip)
40 * @param pwd password for authentication (NULL to skip)
41 *
42 * @return an HTTP resource object pointer, or NULL on error
43 */
44struct vlc_http_outfile *vlc_http_outfile_create(struct vlc_http_mgr *mgr,
45 const char *url, const char *ua, const char *user, const char *pwd);
46
47/**
48 * Writes data.
49 */
50ssize_t vlc_http_outfile_write(struct vlc_http_outfile *, block_t *b);
51int vlc_http_outfile_close(struct vlc_http_outfile *);
52
53/** @} */
ssize_t vlc_http_outfile_write(struct vlc_http_outfile *, block_t *b)
Writes data.
Definition outfile.c:101
int vlc_http_outfile_close(struct vlc_http_outfile *)
Definition outfile.c:108
struct vlc_http_outfile * vlc_http_outfile_create(struct vlc_http_mgr *mgr, const char *url, const char *ua, const char *user, const char *pwd)
Creates an HTTP output file.
Definition outfile.c:36
Definition vlc_frame.h:123
Definition connmgr.c:100