[epiphany/history-rewrite: 14/26] 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/26] ephy-history-service: Add method to retrieve a URL from the history
- Date: Tue, 5 Jul 2011 17:26:44 +0000 (UTC)
commit a728ad1e3c39272a21aac1e8b5cfb43faaafe9d6
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 edc44a8..2b8b2c0 100644
--- a/lib/history/ephy-history-service.c
+++ b/lib/history/ephy-history-service.c
@@ -539,3 +539,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]