r10080 jmb - in /branches/jmb/new-cache/content: content.c content.h

netsurf at semichrome.net netsurf at semichrome.net
Thu Feb 25 00:50:00 GMT 2010


Author: jmb
Date: Wed Feb 24 18:50:00 2010
New Revision: 10080

URL: http://source.netsurf-browser.org?rev=10080&view=rev
Log:
Squash a bunch of warnings

Modified:
    branches/jmb/new-cache/content/content.c
    branches/jmb/new-cache/content/content.h

Modified: branches/jmb/new-cache/content/content.c
URL: http://source.netsurf-browser.org/branches/jmb/new-cache/content/content.c?rev=10080&r1=10079&r2=10080&view=diff
==============================================================================
--- branches/jmb/new-cache/content/content.c (original)
+++ branches/jmb/new-cache/content/content.c Wed Feb 24 18:50:00 2010
@@ -34,6 +34,7 @@
 #include "utils/config.h"
 #include "content/content_protected.h"
 #include "content/fetchcache.h"
+#include "content/hlcache.h"
 #include "css/css.h"
 #include "image/bitmap.h"
 #include "desktop/options.h"
@@ -1001,8 +1002,10 @@
  * \param c  Content to retrieve type of
  * \return Content type
  */
-content_type content_get_type(struct content *c)
-{
+content_type content_get_type(hlcache_handle *h)
+{
+	struct content *c = hlcache_handle_get_content(h);
+
 	if (c == NULL)
 		return CONTENT_UNKNOWN;
 
@@ -1015,8 +1018,10 @@
  * \param c  Content to retrieve URL from
  * \return Pointer to URL, or NULL if not found.
  */
-const char *content_get_url(struct content *c)
-{
+const char *content_get_url(hlcache_handle *h)
+{
+	struct content *c = hlcache_handle_get_content(h);
+
 	if (c == NULL)
 		return NULL;
 
@@ -1029,8 +1034,10 @@
  * \param c  Content to retrieve title from
  * \return Pointer to title, or NULL if not found.
  */
-const char *content_get_title(struct content *c)
-{
+const char *content_get_title(hlcache_handle *h)
+{
+	struct content *c = hlcache_handle_get_content(h);
+
 	if (c == NULL)
 		return NULL;
 
@@ -1043,8 +1050,10 @@
  * \param c  Content to retrieve status of
  * \return Content status
  */
-content_status content_get_status(struct content *c)
-{
+content_status content_get_status(hlcache_handle *h)
+{
+	struct content *c = hlcache_handle_get_content(h);
+
 	if (c == NULL)
 		return CONTENT_STATUS_TYPE_UNKNOWN;
 
@@ -1057,8 +1066,10 @@
  * \param c  Content to retrieve status message from
  * \return Pointer to status message, or NULL if not found.
  */
-const char *content_get_status_message(struct content *c)
-{
+const char *content_get_status_message(hlcache_handle *h)
+{
+	struct content *c = hlcache_handle_get_content(h);
+
 	if (c == NULL)
 		return NULL;
 
@@ -1071,8 +1082,10 @@
  * \param c  Content to retrieve width of
  * \return Content width
  */
-int content_get_width(struct content *c)
-{
+int content_get_width(hlcache_handle *h)
+{
+	struct content *c = hlcache_handle_get_content(h);
+
 	if (c == NULL)
 		return 0;
 
@@ -1085,8 +1098,10 @@
  * \param c  Content to retrieve height of
  * \return Content height
  */
-int content_get_height(struct content *c)
-{
+int content_get_height(hlcache_handle *h)
+{
+	struct content *c = hlcache_handle_get_content(h);
+
 	if (c == NULL)
 		return 0;
 
@@ -1100,8 +1115,9 @@
  * \param size  Pointer to location to receive byte size of source
  * \return Pointer to source data
  */
-const char *content_get_source_data(struct content *c, unsigned long *size)
-{
+const char *content_get_source_data(hlcache_handle *h, unsigned long *size)
+{
+	struct content *c = hlcache_handle_get_content(h);
 	const uint8_t *data;
 	size_t len;
 
@@ -1124,8 +1140,13 @@
  *
  * \param c  Content to invalidate
  */
-void content_invalidate_reuse_data(struct content *c)
-{
+void content_invalidate_reuse_data(hlcache_handle *h)
+{
+	struct content *c = hlcache_handle_get_content(h);
+
+	if (c == NULL)
+		return;
+
 	/* For now, just cause the content to be completely ignored */
 	c->fresh = false;
 }
@@ -1136,8 +1157,10 @@
  * \param c  Content to retrieve refresh URL from
  * \return Pointer to URL, or NULL if none
  */
-const char *content_get_refresh_url(struct content *c)
-{
+const char *content_get_refresh_url(hlcache_handle *h)
+{
+	struct content *c = hlcache_handle_get_content(h);
+
 	if (c == NULL)
 		return NULL;
 
@@ -1150,8 +1173,10 @@
  * \param c  Content to retrieve bitmap from
  * \return Pointer to bitmap, or NULL if none.
  */
-struct bitmap *content_get_bitmap(struct content *c)
-{
+struct bitmap *content_get_bitmap(hlcache_handle *h)
+{
+	struct content *c = hlcache_handle_get_content(h);
+
 	if (c == NULL)
 		return NULL;
 

Modified: branches/jmb/new-cache/content/content.h
URL: http://source.netsurf-browser.org/branches/jmb/new-cache/content/content.h?rev=10080&r1=10079&r2=10080&view=diff
==============================================================================
--- branches/jmb/new-cache/content/content.h (original)
+++ branches/jmb/new-cache/content/content.h Wed Feb 24 18:50:00 2010
@@ -39,6 +39,7 @@
 struct box;
 struct browser_window;
 struct content;
+struct hlcache_handle;
 struct object_params;
 
 /** Status of a content */
@@ -140,16 +141,17 @@
 void content_add_error(struct content *c, const char *token,
 		unsigned int line);
 
-content_type content_get_type(struct content *c);
-const char *content_get_url(struct content *c);
-const char *content_get_title(struct content *c);
-content_status content_get_status(struct content *c);
-const char *content_get_status_message(struct content *c);
-int content_get_width(struct content *c);
-int content_get_height(struct content *c);
-const char *content_get_source_data(struct content *c, unsigned long *size);
-void content_invalidate_reuse_data(struct content *c);
-const char *content_get_refresh_url(struct content *c);
-struct bitmap *content_get_bitmap(struct content *c);
+content_type content_get_type(struct hlcache_handle *c);
+const char *content_get_url(struct hlcache_handle *c);
+const char *content_get_title(struct hlcache_handle *c);
+content_status content_get_status(struct hlcache_handle *c);
+const char *content_get_status_message(struct hlcache_handle *c);
+int content_get_width(struct hlcache_handle *c);
+int content_get_height(struct hlcache_handle *c);
+const char *content_get_source_data(struct hlcache_handle *c, 
+		unsigned long *size);
+void content_invalidate_reuse_data(struct hlcache_handle *c);
+const char *content_get_refresh_url(struct hlcache_handle *c);
+struct bitmap *content_get_bitmap(struct hlcache_handle *c);
 
 #endif




More information about the netsurf-commits mailing list