Dillo v3.1.1-98-g318d1f14
Loading...
Searching...
No Matches
capi.h
Go to the documentation of this file.
1#ifndef __CAPI_H__
2#define __CAPI_H__
3
4#ifdef __cplusplus
5extern "C" {
6#endif /* __cplusplus */
7
8
9#include "cache.h"
10#include "web.hh"
11
12/*
13 * Flag defines
14 */
15#define CAPI_IsCached (0x1)
16#define CAPI_IsEmpty (0x2)
17#define CAPI_InProgress (0x4)
18#define CAPI_Aborted (0x8)
19#define CAPI_Completed (0x10)
20
21/*
22 * Function prototypes
23 */
24void a_Capi_init(void);
25int a_Capi_open_url(DilloWeb *web, CA_Callback_t Call, void *CbData);
26int a_Capi_get_buf(const DilloUrl *Url, char **PBuf, int *BufSize);
27void a_Capi_unref_buf(const DilloUrl *Url);
28const char *a_Capi_get_content_type(const DilloUrl *url);
29const char *a_Capi_set_content_type(const DilloUrl *url, const char *ctype,
30 const char *from);
31int a_Capi_get_flags(const DilloUrl *Url);
34int a_Capi_dpi_send_data(const DilloUrl *url, void *bw,
35 char *data, int data_sz, char *server, int flags);
36int a_Capi_dpi_send_cmd(DilloUrl *url, void *bw, char *cmd, char *server,
37 int flags);
38void a_Capi_set_vsource_url(const DilloUrl *url);
39void a_Capi_stop_client(int Key, int force);
40void a_Capi_conn_abort_by_url(const DilloUrl *url);
41
42
43#ifdef __cplusplus
44}
45#endif /* __cplusplus */
46
47#endif /* __CAPI_H__ */
48
void(* CA_Callback_t)(int Op, CacheClient_t *Client)
Callback type for cache clients.
Definition cache.h:43
int a_Capi_get_buf(const DilloUrl *Url, char **PBuf, int *BufSize)
Get the cache's buffer for the URL, and its size.
Definition capi.c:541
int a_Capi_dpi_send_cmd(DilloUrl *url, void *bw, char *cmd, char *server, int flags)
Send a dpi cmd.
Definition capi.c:611
const char * a_Capi_set_content_type(const DilloUrl *url, const char *ctype, const char *from)
Set the Content-Type for the URL.
Definition capi.c:565
void a_Capi_set_vsource_url(const DilloUrl *url)
Store the last URL requested by "view source".
Definition capi.c:223
int a_Capi_dpi_verify_request(BrowserWindow *bw, DilloUrl *url)
Safety test: only allow GET|POST dpi-urls from dpi-generated pages.
Definition capi.c:232
void a_Capi_unref_buf(const DilloUrl *Url)
Unref the cache's buffer when no longer using it.
Definition capi.c:549
int a_Capi_open_url(DilloWeb *web, CA_Callback_t Call, void *CbData)
Most used function for requesting a URL.
Definition capi.c:392
int a_Capi_get_flags_with_redirection(const DilloUrl *Url)
Same as a_Capi_get_flags() but following redirections.
Definition capi.c:530
void a_Capi_stop_client(int Key, int force)
Remove a client from the cache client queue.
Definition capi.c:621
void a_Capi_init(void)
Initialize capi&cache data.
Definition capi.c:80
const char * a_Capi_get_content_type(const DilloUrl *url)
Get the Content-Type associated with the URL.
Definition capi.c:557
int a_Capi_dpi_send_data(const DilloUrl *url, void *bw, char *data, int data_sz, char *server, int flags)
Send data to a dpi (e.g.
Definition capi.c:576
void a_Capi_conn_abort_by_url(const DilloUrl *url)
Abort the connection for a given url, using its CCC.
Definition capi.c:199
int a_Capi_get_flags(const DilloUrl *Url)
Return status information of an URL's content-transfer process.
Definition capi.c:520
Contains the specific data for a single window.
Definition bw.h:27
Definition url.h:88