4 * Copyright (c) 2009-2012 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
28 #include "bbsmenucache.h"
29 #include <http/http_connector.h>
31 #ifndef __BBSMENURETREIEVER_H__
32 #define __BBSMENURETREIEVER_H__
34 typedef struct bbsmnretriever_t_ bbsmnretriever_t;
36 IMPORT bbsmnretriever_t* bbsmnretriever_new(http_connector_t *connector, UB *useragent, W useragent_len);
37 IMPORT VOID bbsmnretriever_delete(bbsmnretriever_t *retriever);
38 IMPORT W bbsmnretriever_sendrequest(bbsmnretriever_t *retriever, bbsmncache_t *cache);
39 IMPORT Bool bbsmnretriever_iswaitingendpoint(bbsmnretriever_t *retriever, ID endpoint);
40 IMPORT W bbsmnretriever_recievehttpevent(bbsmnretriever_t *retriever, bbsmncache_t *cache, http_connector_event *hevent);
42 #define BBSMNRETRIEVER_REQUEST_NOT_MODIFIED 0
43 #define BBSMNRETRIEVER_REQUEST_ALLRELOAD 1
44 #define BBSMNRETRIEVER_REQUEST_WAITNEXT 2