Imported Upstream version 0.9.0
[deb_shairplay.git] / src / lib / http_request.h
CommitLineData
15c988f7
JB
1/**
2 * Copyright (C) 2011-2012 Juho Vähä-Herttua
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 */
14
15#ifndef HTTP_REQUEST_H
16#define HTTP_REQUEST_H
17
18typedef struct http_request_s http_request_t;
19
20
21http_request_t *http_request_init(void);
22
23int http_request_add_data(http_request_t *request, const char *data, int datalen);
24int http_request_is_complete(http_request_t *request);
25int http_request_has_error(http_request_t *request);
26
27const char *http_request_get_error_name(http_request_t *request);
28const char *http_request_get_error_description(http_request_t *request);
29const char *http_request_get_method(http_request_t *request);
30const char *http_request_get_url(http_request_t *request);
31const char *http_request_get_header(http_request_t *request, const char *name);
32const char *http_request_get_data(http_request_t *request, int *datalen);
33
34void http_request_destroy(http_request_t *request);
35
36#endif