summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2016-04-18 23:04:16 +0100
committerVincent Sanders <vince@kyllikki.org>2016-04-18 23:04:16 +0100
commit392307bb1fdf4186f26300631fe3710d895cf7ce (patch)
tree5a55cf451925bb4b00addcc69942f0678a0ee33e /content
parent34f6aa13234a618c3b1add75899af2ca1f6a08e9 (diff)
downloadnetsurf-392307bb1fdf4186f26300631fe3710d895cf7ce.tar.gz
netsurf-392307bb1fdf4186f26300631fe3710d895cf7ce.tar.bz2
reduce content header interdependancy
Diffstat (limited to 'content')
-rw-r--r--content/content.c3
-rw-r--r--content/content.h20
-rw-r--r--content/content_debug.h38
-rw-r--r--content/content_factory.c2
-rw-r--r--content/content_protected.h14
5 files changed, 54 insertions, 23 deletions
diff --git a/content/content.c b/content/content.c
index d20695613..b0d86b94c 100644
--- a/content/content.c
+++ b/content/content.c
@@ -32,6 +32,7 @@
#include "image/bitmap.h"
#include "content/content_protected.h"
+#include "content/content_debug.h"
#include "content/hlcache.h"
#define URL_FMT_SPC "%.140s"
@@ -62,7 +63,7 @@ static void content_convert(struct content *c);
*/
nserror content__init(struct content *c, const content_handler *handler,
- lwc_string *imime_type, const http_parameter *params,
+ lwc_string *imime_type, const struct http_parameter *params,
llcache_handle *llcache, const char *fallback_charset,
bool quirks)
{
diff --git a/content/content.h b/content/content.h
index 6c05df9c5..cdd7283cc 100644
--- a/content/content.h
+++ b/content/content.h
@@ -26,19 +26,14 @@
#ifndef _NETSURF_CONTENT_CONTENT_H_
#define _NETSURF_CONTENT_CONTENT_H_
-#include <stdbool.h>
-#include <stdio.h>
-
#include <libwapcaplet/libwapcaplet.h>
-#include "utils/config.h"
#include "utils/errors.h"
-#include "utils/http.h"
#include "content/content_factory.h"
#include "content/content_type.h"
-#include "desktop/search.h"
-#include "desktop/mouse.h"
-#include "desktop/plot_style.h"
+#include "desktop/search.h" /* search flags enum */
+#include "desktop/mouse.h" /* mouse state enums */
+#include "desktop/plot_style.h" /* color typedef */
struct browser_window;
struct browser_window_features;
@@ -318,15 +313,6 @@ void content_search(struct hlcache_handle *h, void *context,
void content_search_clear(struct hlcache_handle *h);
/**
- * Dump debug information to file.
- *
- * \param h content handle to debug.
- * \param f File to write output to.
- * \param op Debug operation type.
- */
-nserror content_debug_dump(struct hlcache_handle *h, FILE *f, enum content_debug op);
-
-/**
* Control debug con a content.
*
* \param h content handle to debug.
diff --git a/content/content_debug.h b/content/content_debug.h
new file mode 100644
index 000000000..b08f730b8
--- /dev/null
+++ b/content/content_debug.h
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2016 Vincent Sanders <vince@netsurf-browser.org>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * \file
+ * Interface to content handling debug.
+ */
+
+#ifndef _NETSURF_CONTENT_CONTENT_DEBUG_H_
+#define _NETSURF_CONTENT_CONTENT_DEBUG_H_
+
+#include <stdio.h>
+
+/**
+ * Dump debug information to file.
+ *
+ * \param h content handle to debug.
+ * \param f File to write output to.
+ * \param op Debug operation type.
+ */
+nserror content_debug_dump(struct hlcache_handle *h, FILE *f, enum content_debug op);
+
+#endif
diff --git a/content/content_factory.c b/content/content_factory.c
index 8da73337c..224220796 100644
--- a/content/content_factory.c
+++ b/content/content_factory.c
@@ -24,6 +24,8 @@
#include <stdlib.h>
#include <string.h>
+#include "utils/http.h"
+
#include "content/content.h"
#include "content/content_factory.h"
#include "content/content_protected.h"
diff --git a/content/content_protected.h b/content/content_protected.h
index e5ff1cae2..e901e40df 100644
--- a/content/content_protected.h
+++ b/content/content_protected.h
@@ -28,6 +28,8 @@
#include <stdint.h>
#include <time.h>
+#include <stdio.h>
+
#include "utils/config.h"
#include "content/content.h"
#include "content/content_factory.h"
@@ -38,15 +40,17 @@ struct bitmap;
struct content;
struct rect;
struct redraw_context;
+struct http_parameter;
struct content_handler {
void (*fini)(void);
nserror (*create)(const content_handler *handler,
- lwc_string *imime_type, const http_parameter *params,
- llcache_handle *llcache,
- const char *fallback_charset, bool quirks,
- struct content **c);
+ lwc_string *imime_type,
+ const struct http_parameter *params,
+ llcache_handle *llcache,
+ const char *fallback_charset, bool quirks,
+ struct content **c);
bool (*process_data)(struct content *c,
const char *data, unsigned int size);
@@ -157,7 +161,7 @@ extern const char * const content_type_name[];
extern const char * const content_status_name[];
nserror content__init(struct content *c, const content_handler *handler,
- lwc_string *imime_type, const http_parameter *params,
+ lwc_string *imime_type, const struct http_parameter *params,
struct llcache_handle *llcache, const char *fallback_charset,
bool quirks);
nserror content__clone(const struct content *c, struct content *nc);