[epiphany/history-rewrite: 33/45] ephy-history-service: Add public ephy_history_service_query_urls()
- From: Claudio Saavedra <csaavedra src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/history-rewrite: 33/45] ephy-history-service: Add public ephy_history_service_query_urls()
- Date: Wed, 24 Aug 2011 19:42:05 +0000 (UTC)
commit a1549fdec21de70740c2334f8ce2a0d823aaae99
Author: Claudio Saavedra <csaavedra igalia com>
Date: Mon Jul 18 16:05:49 2011 +0300
ephy-history-service: Add public ephy_history_service_query_urls()
This is the main query method for the history frontend.
lib/history/ephy-history-service.c | 23 +++++++++++++++++++++++
lib/history/ephy-history-service.h | 1 +
2 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/lib/history/ephy-history-service.c b/lib/history/ephy-history-service.c
index 78b0d3e..642287a 100644
--- a/lib/history/ephy-history-service.c
+++ b/lib/history/ephy-history-service.c
@@ -511,6 +511,29 @@ ephy_history_service_find_visits_in_time (EphyHistoryService *self, gint64 from,
}
static gboolean
+ephy_history_service_execute_query_urls (EphyHistoryService *self, EphyHistoryQuery *query, gpointer *result)
+{
+ GList *urls = ephy_history_service_find_url_rows (self, query);
+
+ *result = urls;
+
+ return TRUE;
+}
+
+void
+ephy_history_service_query_urls (EphyHistoryService *self, EphyHistoryQuery *query, EphyHistoryJobCallback callback, gpointer user_data)
+{
+ EphyHistoryThreadJobDetails *details;
+
+ details = ephy_history_thread_job_details_new (self,
+ (EphyHistoryJobMethod) ephy_history_service_execute_query_urls,
+ ephy_history_query_copy (query), (GDestroyNotify) ephy_history_query_free, callback, user_data);
+ ephy_history_service_schedule_idle (self, G_PRIORITY_DEFAULT,
+ ephy_history_service_execute_job_on_history_thread,
+ details);
+}
+
+static gboolean
ephy_history_service_execute_set_url_title (EphyHistoryService *self,
EphyHistoryURL *url,
gpointer *result)
diff --git a/lib/history/ephy-history-service.h b/lib/history/ephy-history-service.h
index 9d5d950..95991d9 100644
--- a/lib/history/ephy-history-service.h
+++ b/lib/history/ephy-history-service.h
@@ -57,6 +57,7 @@ EphyHistoryService * ephy_history_service_new (const cha
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_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_set_url_property (EphyHistoryService *self, const char *url, EphyHistoryURLProperty property, GVariant *value, EphyHistoryJobCallback callback, gpointer user_data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]