summaryrefslogtreecommitdiff
path: root/content/content_protected.h
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2017-12-31 00:05:28 +0000
committerVincent Sanders <vince@kyllikki.org>2020-12-11 16:17:27 +0000
commit399d7189f21ad41bd80e11d5ff8da4037edfc1c2 (patch)
treed33b460100416c64630d1006a0a8aaf86bd58d5e /content/content_protected.h
parent434f6c3fe7d1d2c6a3e6ae6338608a4a4421ab1b (diff)
downloadnetsurf-399d7189f21ad41bd80e11d5ff8da4037edfc1c2.tar.gz
netsurf-399d7189f21ad41bd80e11d5ff8da4037edfc1c2.tar.bz2
Add initial content handler for PDF format
Diffstat (limited to 'content/content_protected.h')
-rw-r--r--content/content_protected.h24
1 files changed, 21 insertions, 3 deletions
diff --git a/content/content_protected.h b/content/content_protected.h
index fd0924d64..f8ecd42da 100644
--- a/content/content_protected.h
+++ b/content/content_protected.h
@@ -57,18 +57,36 @@ typedef struct content_handler content_handler;
* function table implementing a content type.
*/
struct content_handler {
+ /**
+ * content handler finalisation
+ */
void (*fini)(void);
+ /**
+ * create a content
+ */
nserror (*create)(const struct content_handler *handler,
lwc_string *imime_type,
const struct http_parameter *params,
struct llcache_handle *llcache,
- const char *fallback_charset, bool quirks,
+ const char *fallback_charset,
+ bool quirks,
struct content **c);
- bool (*process_data)(struct content *c,
- const char *data, unsigned int size);
+ /**
+ * ongoing fetch has received data
+ */
+ bool (*process_data)(struct content *c,
+ const char *data,
+ unsigned int size);
+
+ /**
+ * fetcher has completed retrieving all the data
+ *
+ * \param c The completed content.
+ */
bool (*data_complete)(struct content *c);
+
void (*reformat)(struct content *c, int width, int height);
void (*destroy)(struct content *c);
void (*stop)(struct content *c);