aboutsummaryrefslogtreecommitdiffstats
path: root/lib/history/ephy-history-service.h
diff options
context:
space:
mode:
authorClaudio Saavedra <csaavedra@igalia.com>2012-03-13 17:02:09 +0800
committerClaudio Saavedra <csaavedra@igalia.com>2012-03-13 18:33:41 +0800
commit637e046e0666576c71d1efa116d8148450b35db6 (patch)
treef83df81046290bbe1cb314bcde95ef2899e21289 /lib/history/ephy-history-service.h
parentf4ed0fb98f033727eb22f62ddb3ba60424c8cc91 (diff)
downloadgsoc2013-epiphany-637e046e0666576c71d1efa116d8148450b35db6.tar
gsoc2013-epiphany-637e046e0666576c71d1efa116d8148450b35db6.tar.gz
gsoc2013-epiphany-637e046e0666576c71d1efa116d8148450b35db6.tar.bz2
gsoc2013-epiphany-637e046e0666576c71d1efa116d8148450b35db6.tar.lz
gsoc2013-epiphany-637e046e0666576c71d1efa116d8148450b35db6.tar.xz
gsoc2013-epiphany-637e046e0666576c71d1efa116d8148450b35db6.tar.zst
gsoc2013-epiphany-637e046e0666576c71d1efa116d8148450b35db6.zip
ephy-history-service: make the async API cancellable
The main purpose of the cancellable API in ephy-history-service is to let the user notify when the results of the operation are no longer needed and the callback call can be omitted. Since performing a read operation, in such cases, makes no sense, we cancel them altogether. However, given the nature of the service, we don't cancel write operations. https://bugzilla.gnome.org/show_bug.cgi?id=671901
Diffstat (limited to 'lib/history/ephy-history-service.h')
-rw-r--r--lib/history/ephy-history-service.h33
1 files changed, 17 insertions, 16 deletions
diff --git a/lib/history/ephy-history-service.h b/lib/history/ephy-history-service.h
index 8e36d6317..c2e2093db 100644
--- a/lib/history/ephy-history-service.h
+++ b/lib/history/ephy-history-service.h
@@ -22,6 +22,7 @@
#define EPHY_HISTORY_SERVICE_H
#include <glib-object.h>
+#include <gio/gio.h>
#include "ephy-history-types.h"
G_BEGIN_DECLS
@@ -58,23 +59,23 @@ struct _EphyHistoryServiceClass {
GType ephy_history_service_get_type (void);
EphyHistoryService * ephy_history_service_new (const char *history_filename);
-void ephy_history_service_add_visit (EphyHistoryService *self, EphyHistoryPageVisit *visit, EphyHistoryJobCallback callback, gpointer user_data);
-void ephy_history_service_add_visits (EphyHistoryService *self, GList *visits, EphyHistoryJobCallback callback, gpointer user_data);
-void ephy_history_service_find_visits_in_time (EphyHistoryService *self, gint64 from, gint64 to, EphyHistoryJobCallback callback, gpointer user_data);
-void ephy_history_service_query_visits (EphyHistoryService *self, EphyHistoryQuery *query, EphyHistoryJobCallback callback, gpointer user_data);
-void ephy_history_service_query_urls (EphyHistoryService *self, EphyHistoryQuery *query, EphyHistoryJobCallback callback, gpointer user_data);
-void ephy_history_service_set_url_title (EphyHistoryService *self, const char *url, const char *title, EphyHistoryJobCallback callback, gpointer user_data);
-void ephy_history_service_set_url_zoom_level (EphyHistoryService *self, const char *url, const double zoom_level, EphyHistoryJobCallback callback, gpointer user_data);
-void ephy_history_service_get_host_for_url (EphyHistoryService *self, const char *url, EphyHistoryJobCallback callback, gpointer user_data);
-void ephy_history_service_get_hosts (EphyHistoryService *self, EphyHistoryJobCallback callback, gpointer user_data);
-void ephy_history_service_query_hosts (EphyHistoryService *self, EphyHistoryQuery *query, EphyHistoryJobCallback callback, gpointer user_data);
-void ephy_history_service_delete_host (EphyHistoryService *self, EphyHistoryHost *host, EphyHistoryJobCallback callback, gpointer user_data);
-void ephy_history_service_get_url (EphyHistoryService *self, const char *url, EphyHistoryJobCallback callback, gpointer user_data);
-void ephy_history_service_delete_urls (EphyHistoryService *self, GList *urls, EphyHistoryJobCallback callback, gpointer user_data);
-void ephy_history_service_find_urls (EphyHistoryService *self, gint64 from, gint64 to, guint limit, gint host, GList *substring_list, EphyHistoryJobCallback callback, gpointer user_data);
+void ephy_history_service_add_visit (EphyHistoryService *self, EphyHistoryPageVisit *visit, GCancellable *cancellable, EphyHistoryJobCallback callback, gpointer user_data);
+void ephy_history_service_add_visits (EphyHistoryService *self, GList *visits, GCancellable *cancellable, EphyHistoryJobCallback callback, gpointer user_data);
+void ephy_history_service_find_visits_in_time (EphyHistoryService *self, gint64 from, gint64 to, GCancellable *cancellable, EphyHistoryJobCallback callback, gpointer user_data);
+void ephy_history_service_query_visits (EphyHistoryService *self, EphyHistoryQuery *query, GCancellable *cancellable, EphyHistoryJobCallback callback, gpointer user_data);
+void ephy_history_service_query_urls (EphyHistoryService *self, EphyHistoryQuery *query, GCancellable *cancellable, EphyHistoryJobCallback callback, gpointer user_data);
+void ephy_history_service_set_url_title (EphyHistoryService *self, const char *url, const char *title, GCancellable *cancellable, EphyHistoryJobCallback callback, gpointer user_data);
+void ephy_history_service_set_url_zoom_level (EphyHistoryService *self, const char *url, const double zoom_level, GCancellable *cancellable, EphyHistoryJobCallback callback, gpointer user_data);
+void ephy_history_service_get_host_for_url (EphyHistoryService *self, const char *url, GCancellable *cancellable, EphyHistoryJobCallback callback, gpointer user_data);
+void ephy_history_service_get_hosts (EphyHistoryService *self, GCancellable *cancellable, EphyHistoryJobCallback callback, gpointer user_data);
+void ephy_history_service_query_hosts (EphyHistoryService *self, EphyHistoryQuery *query, GCancellable *cancellable, EphyHistoryJobCallback callback, gpointer user_data);
+void ephy_history_service_delete_host (EphyHistoryService *self, EphyHistoryHost *host, GCancellable *cancellable, EphyHistoryJobCallback callback, gpointer user_data);
+void ephy_history_service_get_url (EphyHistoryService *self, const char *url, GCancellable *cancellable, EphyHistoryJobCallback callback, gpointer user_data);
+void ephy_history_service_delete_urls (EphyHistoryService *self, GList *urls, GCancellable *cancellable, EphyHistoryJobCallback callback, gpointer user_data);
+void ephy_history_service_find_urls (EphyHistoryService *self, gint64 from, gint64 to, guint limit, gint host, GList *substring_list, GCancellable *cancellable, EphyHistoryJobCallback callback, gpointer user_data);
void ephy_history_service_visit_url (EphyHistoryService *self, const char *orig_url);
-void ephy_history_service_clear (EphyHistoryService *self, EphyHistoryJobCallback callback, gpointer user_data);
-void ephy_history_service_find_hosts (EphyHistoryService *self, gint64 from, gint64 to, EphyHistoryJobCallback callback, gpointer user_data);
+void ephy_history_service_clear (EphyHistoryService *self, GCancellable *cancellable, EphyHistoryJobCallback callback, gpointer user_data);
+void ephy_history_service_find_hosts (EphyHistoryService *self, gint64 from, gint64 to, GCancellable *cancellable, EphyHistoryJobCallback callback, gpointer user_data);
G_END_DECLS