OSDN Git Service

replace tray implementation.
[bbk/bchanl.git] / src / subjectretriever.h
1 /*
2  * subjectretriever.h
3  *
4  * Copyright (c) 2009-2012 project bchan
5  *
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.
9  *
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:
13  *
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.
18  *
19  * 2. Altered source versions must be plainly marked as such, and must not be
20  *    misrepresented as being the original software.
21  *
22  * 3. This notice may not be removed or altered from any source
23  *    distribution.
24  *
25  */
26
27 #include        <basic.h>
28 #include        "subjectcache.h"
29 #include        <http/http_connector.h>
30
31 #ifndef __SUBJECTRETREIEVER_H__
32 #define __SUBJECTRETREIEVER_H__
33
34 typedef struct sbjtretriever_t_ sbjtretriever_t;
35
36 IMPORT sbjtretriever_t* sbjtretriever_new(http_connector_t *connector);
37 IMPORT VOID sbjtretriever_delete(sbjtretriever_t *retriever);
38 IMPORT W sbjtretriever_sendrequest(sbjtretriever_t *retriever, sbjtcache_t *cache);
39 IMPORT Bool sbjtretriever_iswaitingendpoint(sbjtretriever_t *retriever, ID endpoint);
40 IMPORT W sbjtretriever_recievehttpevent(sbjtretriever_t *retriever, sbjtcache_t *cache, http_connector_event *hevent);
41
42 #define SBJTRETRIEVER_REQUEST_NOT_MODIFIED 0
43 #define SBJTRETRIEVER_REQUEST_ALLRELOAD    1
44 #define SBJTRETRIEVER_REQUEST_WAITNEXT     2
45
46 #endif