From 399d7189f21ad41bd80e11d5ff8da4037edfc1c2 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sun, 31 Dec 2017 00:05:28 +0000 Subject: Add initial content handler for PDF format --- content/content_protected.h | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'content/content_protected.h') 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); -- cgit v1.2.3