diff options
author | jcid <devnull@localhost> | 2007-10-07 00:36:34 +0200 |
---|---|---|
committer | jcid <devnull@localhost> | 2007-10-07 00:36:34 +0200 |
commit | 93715c46a99c96d6c866968312691ec9ab0f6a03 (patch) | |
tree | 573f19ec6aa740844f53a7c0eb7114f04096bf64 /src/web.hh |
Initial revision
Diffstat (limited to 'src/web.hh')
-rw-r--r-- | src/web.hh | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/web.hh b/src/web.hh new file mode 100644 index 00000000..a5e05a2f --- /dev/null +++ b/src/web.hh @@ -0,0 +1,45 @@ +#ifndef __WEB_H__ +#define __WEB_H__ + +#include <stdio.h> /* for FILE */ +#include "bw.h" /* for BrowserWindow */ +#include "cache.h" /* for CA_Callback_t */ +#include "image.hh" /* for DilloImage */ + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/* + * Flag defines + */ +#define WEB_RootUrl 1 +#define WEB_Image 2 +#define WEB_Download 4 /* Half implemented... */ + + +typedef struct _DilloWeb DilloWeb; + +struct _DilloWeb { + DilloUrl *url; /* Requested URL */ + BrowserWindow *bw; /* The requesting browser window [reference] */ + int flags; /* Additional info */ + + DilloImage *Image; /* For image urls [reference] */ + + char *filename; /* Variables for Local saving */ + FILE *stream; + int SavedBytes; +}; + +void a_Web_init(void); +DilloWeb* a_Web_new (const DilloUrl* url); +int a_Web_valid(DilloWeb *web); +void a_Web_free (DilloWeb*); +int a_Web_dispatch_by_type (const char *Type, DilloWeb *web, + CA_Callback_t *Call, void **Data); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ +#endif /* __WEB_H__ */ |