NetSurf
content-type.h
Go to the documentation of this file.
1/*
2 * Copyright 2010 John-Mark Bell <jmb@netsurf-browser.org>
3 *
4 * This file is part of NetSurf, http://www.netsurf-browser.org/
5 *
6 * NetSurf is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * NetSurf 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.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef NETSURF_UTILS_HTTP_CONTENT_TYPE_H_
20#define NETSURF_UTILS_HTTP_CONTENT_TYPE_H_
21
22#include <libwapcaplet/libwapcaplet.h>
23
25
26typedef struct http_content_type {
27 lwc_string *media_type;
30
31/**
32 * Parse an HTTP Content-Type header value
33 *
34 * \param header_value Header value to parse
35 * \param result Pointer to location to receive result
36 * \return NSERROR_OK on success,
37 * NSERROR_NOMEM on memory exhaustion
38 */
39nserror http_parse_content_type(const char *header_value,
41
42/**
43 * Destroy a content type object
44 *
45 * \param victim Object to destroy
46 */
48
49#endif
STATIC char result[100]
Definition: arexx.c:77
struct http_content_type http_content_type
nserror http_parse_content_type(const char *header_value, http_content_type **result)
Parse an HTTP Content-Type header value.
Definition: content-type.c:30
void http_content_type_destroy(http_content_type *victim)
Destroy a content type object.
Definition: content-type.c:122
nserror
Enumeration of error codes.
Definition: errors.h:29
http_parameter * parameters
Definition: content-type.h:28
lwc_string * media_type
Definition: content-type.h:27
Representation of an HTTP parameter.
Definition: parameter.c:31