4 * Copyright (c) 2009 project bchan
6 * This software is provided 'as-is', without any express or implied
7 * warranty. In no event will the authors be held liable for any damages
8 * arising from the use of this software.
10 * Permission is granted to anyone to use this software for any purpose,
11 * including commercial applications, and to alter it and redistribute it
12 * freely, subject to the following restrictions:
14 * 1. The origin of this software must not be misrepresented; you must not
15 * claim that you wrote the original software. If you use this software
16 * in a product, an acknowledgment in the product documentation would be
17 * appreciated but is not required.
19 * 2. Altered source versions must be plainly marked as such, and must not be
20 * misrepresented as being the original software.
22 * 3. This notice may not be removed or altered from any source
29 #ifndef __RETREIEVER_H__
30 #define __RETREIEVER_H__
32 typedef struct retriever_t_ retriever_t;
34 IMPORT retriever_t* retriever_new();
35 IMPORT VOID retriever_delete(retriever_t *retriever);
36 IMPORT W retriever_gethost(retriever_t *retriever, UB *host);
37 IMPORT W retriever_request(retriever_t *retriever);
38 IMPORT B* retriever_getheader(retriever_t *retriever);
39 IMPORT W retriever_getheaderlength(retriever_t *retriever);
40 IMPORT B* retriever_getbody(retriever_t *retriever);
41 IMPORT W retriever_getbodylength(retriever_t *retriever);
43 IMPORT W retriver_connectsocket(retriever_t *retriever);
44 IMPORT VOID retriever_clearbuffer(retriever_t *retriever);
45 IMPORT W retriever_recieve(retriever_t *retriever, W sock);
46 IMPORT W retriever_parsehttpresponse(retriever_t *retriever);
47 IMPORT W retriever_parse_response_status(retriever_t *retriever);
48 IMPORT W retriever_decompress(retriever_t *retriever);
50 #ifdef BCHANL_CONFIG_DEBUG
51 IMPORT VOID retriever_debugprint(retriever_t *retriever);
52 IMPORT VOID retriever_dumpheader(retriever_t *retriever);
54 #define retriever_debugprint(retriever) /**/
55 #define retriever_dumpheader(retriever) /**/