summaryrefslogtreecommitdiff
path: root/content/content.h
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2007-01-13 00:21:15 +0000
committerJames Bursa <james@netsurf-browser.org>2007-01-13 00:21:15 +0000
commitbda01b31353e60fe4ad40d765de8ea1c396509bc (patch)
tree252891fdd2159e82e1f6287a92a8f14e6192a2da /content/content.h
parente76140557d804016563be73d8220c46a9c42ca7a (diff)
downloadnetsurf-bda01b31353e60fe4ad40d765de8ea1c396509bc.tar.gz
netsurf-bda01b31353e60fe4ad40d765de8ea1c396509bc.tar.bz2
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
Diffstat (limited to 'content/content.h')
-rw-r--r--content/content.h11
1 files changed, 9 insertions, 2 deletions
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 <bursa@users.sourceforge.net>
+ * Copyright 2005-2007 James Bursa <bursa@users.sourceforge.net>
* Copyright 2003 Philip Pemberton <philpem@users.sourceforge.net>
*/
@@ -16,6 +16,7 @@
#define _NETSURF_DESKTOP_CONTENT_H_
#include <stdint.h>
+#include <time.h>
#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);