[epiphany/history-rewrite: 14/45] ephy-history-service: Add method to retrieve a URL from the history
- From: Claudio Saavedra <csaavedra src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/history-rewrite: 14/45] ephy-history-service: Add method to retrieve a URL from the history
- Date: Wed, 24 Aug 2011 19:40:29 +0000 (UTC)
commit 8fc9f75f2a48a22c9135b918b60701e054439540
Author: Claudio Saavedra <csaavedra igalia com>
Date: Mon Jul 4 18:30:20 2011 +0300
ephy-history-service: Add method to retrieve a URL from the history
lib/history/ephy-history-service.c | 30 ++++++++++++++++++++++++++++++
lib/history/ephy-history-service.h | 1 +
2 files changed, 31 insertions(+), 0 deletions(-)
---
diff --git a/lib/history/ephy-history-service.c b/lib/history/ephy-history-service.c
index 2af60d8..8ac92de 100644
--- a/lib/history/ephy-history-service.c
+++ b/lib/history/ephy-history-service.c
@@ -540,3 +540,33 @@ ephy_history_service_set_url_title (EphyHistoryService *self,
ephy_history_service_execute_job_on_history_thread,
details);
}
+
+static gboolean
+ephy_history_service_execute_get_url (EphyHistoryService *self,
+ const gchar *orig_url,
+ gpointer *result)
+{
+ EphyHistoryURL *url;
+
+ url = ephy_history_service_get_url_row (self, orig_url, NULL);
+
+ *result = url;
+
+ return url != NULL;
+}
+
+void
+ephy_history_service_get_url (EphyHistoryService *self,
+ const char *url,
+ EphyHistoryJobCallback callback,
+ gpointer user_data)
+{
+ EphyHistoryThreadJobDetails *details =
+ ephy_history_thread_job_details_new (self,
+ (EphyHistoryJobMethod) ephy_history_service_execute_get_url,
+ g_strdup (url), g_free,
+ callback, user_data);
+ ephy_history_service_schedule_idle (self, G_PRIORITY_DEFAULT,
+ ephy_history_service_execute_job_on_history_thread,
+ details);
+}
diff --git a/lib/history/ephy-history-service.h b/lib/history/ephy-history-service.h
index 862f7f6..eeebc1d 100644
--- a/lib/history/ephy-history-service.h
+++ b/lib/history/ephy-history-service.h
@@ -56,6 +56,7 @@ void ephy_history_service_add_visit (EphyHisto
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_set_url_title (EphyHistoryService *self, const char *url, const char *title, EphyHistoryJobCallback callback, gpointer user_data);
+void ephy_history_service_get_url (EphyHistoryService *self, const char *url, EphyHistoryJobCallback callback, gpointer user_data);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]