* Fix a typo in the dpkg changelog.
[deb_shairplay.git] / src / lib / http_response.h
... / ...
CommitLineData
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_RESPONSE_H
16#define HTTP_RESPONSE_H
17
18typedef struct http_response_s http_response_t;
19
20http_response_t *http_response_init(const char *protocol, int code, const char *message);
21
22void http_response_add_header(http_response_t *response, const char *name, const char *value);
23void http_response_finish(http_response_t *response, const char *data, int datalen);
24
25void http_response_set_disconnect(http_response_t *response, int disconnect);
26int http_response_get_disconnect(http_response_t *response);
27
28const char *http_response_get_data(http_response_t *response, int *datalen);
29
30void http_response_destroy(http_response_t *response);
31
32#endif