[epiphany/history-rewrite: 34/45] ephy-history-service: Add ephy_history_service_query_visits()



commit c4182f9f05e966674edce9b346d1656474336165
Author: Claudio Saavedra <csaavedra igalia com>
Date:   Mon Jul 18 16:27:03 2011 +0300

    ephy-history-service: Add ephy_history_service_query_visits()
    
    This is more generic than just passing the time range to query for.

 lib/history/ephy-history-service.c |   13 +++++++++++++
 lib/history/ephy-history-service.h |    1 +
 2 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/lib/history/ephy-history-service.c b/lib/history/ephy-history-service.c
index 642287a..8fb274b 100644
--- a/lib/history/ephy-history-service.c
+++ b/lib/history/ephy-history-service.c
@@ -510,6 +510,19 @@ ephy_history_service_find_visits_in_time (EphyHistoryService *self, gint64 from,
 
 }
 
+void
+ephy_history_service_query_visits (EphyHistoryService *self, EphyHistoryQuery *query, EphyHistoryJobCallback callback, gpointer user_data)
+{
+  EphyHistoryThreadJobDetails *details;
+
+  details = ephy_history_thread_job_details_new (self,
+                                                 (EphyHistoryJobMethod) ephy_history_service_execute_find_visits,
+                                                 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_query_urls (EphyHistoryService *self, EphyHistoryQuery *query, gpointer *result)
 {
diff --git a/lib/history/ephy-history-service.h b/lib/history/ephy-history-service.h
index 95991d9..efaeb6f 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_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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]