From bda01b31353e60fe4ad40d765de8ea1c396509bc Mon Sep 17 00:00:00 2001 From: James Bursa Date: Sat, 13 Jan 2007 00:21:15 +0000 Subject: Fix parsing error when an empty HTML data is returned. Add HTTP status and other information to status bar. svn path=/trunk/netsurf/; revision=3140 --- content/content.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'content/content.h') diff --git a/content/content.h b/content/content.h index 123733ba9..268ba31a1 100644 --- a/content/content.h +++ b/content/content.h @@ -2,7 +2,7 @@ * This file is part of NetSurf, http://netsurf-browser.org/ * Licensed under the GNU General Public License, * http://www.opensource.org/licenses/gpl-license - * Copyright 2005 James Bursa + * Copyright 2005-2007 James Bursa * Copyright 2003 Philip Pemberton */ @@ -16,6 +16,7 @@ #define _NETSURF_DESKTOP_CONTENT_H_ #include +#include #include "netsurf/utils/config.h" #include "netsurf/content/content_type.h" #include "netsurf/css/css.h" @@ -178,6 +179,9 @@ struct content { * shared between users. */ bool fresh; struct cache_data *cache_data; /**< Cache control data */ + clock_t time; /**< Creation time, if TYPE_UNKNOWN, + LOADING or READY, + otherwise total time. */ unsigned int size; /**< Estimated size of all data associated with this content, except @@ -186,7 +190,8 @@ struct content { unsigned int active; /**< Number of child fetches or conversions currently in progress. */ struct content_user *user_list; /**< List of users. */ - char status_message[80]; /**< Text for status bar. */ + char status_message[120]; /**< Full text for status bar. */ + char sub_status[80]; /**< Status of content. */ /** Content is being processed: data structures may be inconsistent * and content must not be redrawn or modified. */ bool locked; @@ -196,6 +201,7 @@ struct content { unsigned long source_size; /**< Amount of data fetched so far. */ unsigned long source_allocated; /**< Amount of space allocated so far. */ unsigned long total_size; /**< Total data size, 0 if unknown. */ + long http_code; /**< HTTP status code, 0 if not HTTP. */ bool no_error_pages; /**< Used by fetchcache(). */ bool download; /**< Used by fetchcache(). */ @@ -226,6 +232,7 @@ void content_set_status(struct content *c, const char *status_message, ...); bool content_process_data(struct content *c, const char *data, unsigned int size); void content_convert(struct content *c, int width, int height); +void content_set_done(struct content *c); void content_reformat(struct content *c, int width, int height); void content_clean(void); void content_reset(struct content *c); -- cgit v1.2.3