annotate src/capi.h @ 250:fce9380ee68a

- Switched from charset to content-type for handling data. - Fixed data guesser to detect ASCII, LATIN1, UTF8, KOI8-R, CP-1251 as text.
author jcid
date Thu, 29 May 2008 02:19:08 +0200
parents 14f50d7607ed
children 81fc5011ea56
rev   line source
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
1 #ifndef __CAPI_H__
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
2 #define __CAPI_H__
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
3
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
4 #ifdef __cplusplus
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
5 extern "C" {
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
6 #endif /* __cplusplus */
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
7
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
8
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
9 #include "cache.h"
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
10 #include "web.hh"
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
11
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
12 /*
156
14f50d7607ed - Added a_Capi_get_flags(). It requests a cache entry's status as flags.
jcid
parents: 0
diff changeset
13 * Flag defines
14f50d7607ed - Added a_Capi_get_flags(). It requests a cache entry's status as flags.
jcid
parents: 0
diff changeset
14 */
14f50d7607ed - Added a_Capi_get_flags(). It requests a cache entry's status as flags.
jcid
parents: 0
diff changeset
15 #define CAPI_IsCached (0x1)
14f50d7607ed - Added a_Capi_get_flags(). It requests a cache entry's status as flags.
jcid
parents: 0
diff changeset
16 #define CAPI_IsEmpty (0x2)
14f50d7607ed - Added a_Capi_get_flags(). It requests a cache entry's status as flags.
jcid
parents: 0
diff changeset
17 #define CAPI_InProgress (0x4)
14f50d7607ed - Added a_Capi_get_flags(). It requests a cache entry's status as flags.
jcid
parents: 0
diff changeset
18 #define CAPI_Aborted (0x8)
14f50d7607ed - Added a_Capi_get_flags(). It requests a cache entry's status as flags.
jcid
parents: 0
diff changeset
19 #define CAPI_Completed (0x10)
14f50d7607ed - Added a_Capi_get_flags(). It requests a cache entry's status as flags.
jcid
parents: 0
diff changeset
20
14f50d7607ed - Added a_Capi_get_flags(). It requests a cache entry's status as flags.
jcid
parents: 0
diff changeset
21 /*
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
22 * Function prototypes
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
23 */
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
24 void a_Capi_init(void);
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
25 int a_Capi_open_url(DilloWeb *web, CA_Callback_t Call, void *CbData);
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
26 int a_Capi_get_buf(const DilloUrl *Url, char **PBuf, int *BufSize);
250
fce9380ee68a - Switched from charset to content-type for handling data.
jcid
parents: 156
diff changeset
27 const char *a_Capi_get_content_type(const DilloUrl *url);
fce9380ee68a - Switched from charset to content-type for handling data.
jcid
parents: 156
diff changeset
28 const char *a_Capi_set_content_type(const DilloUrl *url, const char *ctype,
fce9380ee68a - Switched from charset to content-type for handling data.
jcid
parents: 156
diff changeset
29 bool_t force);
156
14f50d7607ed - Added a_Capi_get_flags(). It requests a cache entry's status as flags.
jcid
parents: 0
diff changeset
30 int a_Capi_get_flags(const DilloUrl *Url);
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
31 int a_Capi_dpi_send_cmd(DilloUrl *url, void *bw, char *cmd, char *server,
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
32 int flags);
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
33 void a_Capi_stop_client(int Key, int force);
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
34 void a_Capi_conn_abort_by_url(const DilloUrl *url);
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
35
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
36
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
37 #ifdef __cplusplus
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
38 }
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
39 #endif /* __cplusplus */
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
40
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
41 #endif /* __CAPI_H__ */
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
42