summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@netsurf-browser.org>2011-03-13 18:26:46 +0000
committerDaniel Silverstone <dsilvers@netsurf-browser.org>2011-03-13 18:26:46 +0000
commit93e9bfe3232fbcb3531acf07a870ed404c526f27 (patch)
tree7835b3cc4ac66d21fc64460c5f11f6e62760a042 /desktop
parentc615507e150592895980608d00601beed16d28b9 (diff)
downloadnetsurf-93e9bfe3232fbcb3531acf07a870ed404c526f27.tar.gz
netsurf-93e9bfe3232fbcb3531acf07a870ed404c526f27.tar.bz2
Shunt the schedule function definitions to desktop/schedule.h. Shunt the hlcache/llcache to using schedule to get their cleanups run.
svn path=/trunk/netsurf/; revision=12029
Diffstat (limited to 'desktop')
-rw-r--r--desktop/browser.c1
-rw-r--r--desktop/browser.h6
-rw-r--r--desktop/cookies.c1
-rw-r--r--desktop/netsurf.c5
-rw-r--r--desktop/schedule.h32
5 files changed, 37 insertions, 8 deletions
diff --git a/desktop/browser.c b/desktop/browser.c
index ecf43b61b..63b61de16 100644
--- a/desktop/browser.c
+++ b/desktop/browser.c
@@ -51,6 +51,7 @@
#include "desktop/knockout.h"
#include "desktop/options.h"
#include "desktop/selection.h"
+#include "desktop/schedule.h"
#include "desktop/textinput.h"
#include "desktop/plotters.h"
diff --git a/desktop/browser.h b/desktop/browser.h
index 717c032c2..a9cba2ee7 100644
--- a/desktop/browser.h
+++ b/desktop/browser.h
@@ -291,12 +291,6 @@ void global_history_add(const char *url);
void global_history_add_recent(const char *url);
char **global_history_get_recent(int *count);
-/* In platform specific schedule.c. */
-typedef void (*schedule_callback_fn)(void *p);
-
-void schedule(int t, schedule_callback_fn callback, void *p);
-void schedule_remove(schedule_callback_fn callback, void *p);
-
/* In platform specific theme_install.c. */
#ifdef WITH_THEME_INSTALL
void theme_install_start(struct hlcache_handle *c);
diff --git a/desktop/cookies.c b/desktop/cookies.c
index a49a8db9f..4862b690e 100644
--- a/desktop/cookies.c
+++ b/desktop/cookies.c
@@ -32,6 +32,7 @@
#include "content/urldb.h"
#include "desktop/cookies.h"
#include "desktop/options.h"
+#include "desktop/schedule.h"
#include "desktop/tree.h"
#include "utils/messages.h"
#include "utils/log.h"
diff --git a/desktop/netsurf.c b/desktop/netsurf.c
index 789868ec3..3edbae8d5 100644
--- a/desktop/netsurf.c
+++ b/desktop/netsurf.c
@@ -145,8 +145,9 @@ nserror netsurf_init(int *pargc,
setlocale(LC_ALL, "C");
fetch_init();
-
- llcache_initialise(netsurf_llcache_query_handler, NULL);
+
+ /* Initialise the hlcache and allow it to init the llcache for us */
+ hlcache_initialise(netsurf_llcache_query_handler, NULL);
/* Initialize system colours */
gui_system_colour_init();
diff --git a/desktop/schedule.h b/desktop/schedule.h
new file mode 100644
index 000000000..8d5aa1e90
--- /dev/null
+++ b/desktop/schedule.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2011 Daniel Silverstone <dsilvers@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
+ * Job scheduler (interface).
+ */
+
+#ifndef _NETSURF_DESKTOP_SCHEDULE_H_
+#define _NETSURF_DESKTOP_SCHEDULE_H_
+
+/* In platform specific schedule.c. */
+typedef void (*schedule_callback_fn)(void *p);
+
+void schedule(int t, schedule_callback_fn callback, void *p);
+void schedule_remove(schedule_callback_fn callback, void *p);
+
+#endif