aboutsummaryrefslogtreecommitdiffstats
path: root/lib/history/ephy-history-service.c
diff options
context:
space:
mode:
authorXan Lopez <xan@igalia.com>2012-03-05 23:57:45 +0800
committerXan Lopez <xan@igalia.com>2012-03-07 04:49:45 +0800
commit9666dba09d79cd88777e9066dbdb2ca5b5e7588f (patch)
tree0ef70074aa9f6bf5875440b6fc371083c9cd47e3 /lib/history/ephy-history-service.c
parent222b98ba6644addc080cccbd536d9b90bc27d3ba (diff)
downloadgsoc2013-epiphany-9666dba09d79cd88777e9066dbdb2ca5b5e7588f.tar.gz
gsoc2013-epiphany-9666dba09d79cd88777e9066dbdb2ca5b5e7588f.tar.zst
gsoc2013-epiphany-9666dba09d79cd88777e9066dbdb2ca5b5e7588f.zip
Get rid of EphyBrowseHistory
It was a very thin wrapper on top of the history service, it does not seem to make much sense. For now move the two useful helper methods down to the service without further changes.
Diffstat (limited to 'lib/history/ephy-history-service.c')
-rw-r--r--lib/history/ephy-history-service.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/lib/history/ephy-history-service.c b/lib/history/ephy-history-service.c
index 6261a4333..b8bd2c26b 100644
--- a/lib/history/ephy-history-service.c
+++ b/lib/history/ephy-history-service.c
@@ -709,3 +709,44 @@ ephy_history_service_process_message (EphyHistoryService *self,
return;
}
+
+/* Public API. */
+
+void
+ephy_history_service_find_urls (EphyHistoryService *self,
+ gint64 from, gint64 to,
+ guint limit,
+ GList *substring_list,
+ EphyHistoryJobCallback callback,
+ gpointer user_data)
+{
+ EphyHistoryQuery *query;
+
+ g_return_if_fail (EPHY_IS_HISTORY_SERVICE (self));
+
+ query = ephy_history_query_new ();
+ query->from = from;
+ query->to = to;
+ query->substring_list = substring_list;
+ query->sort_type = EPHY_HISTORY_SORT_MV;
+
+ if (limit != 0)
+ query->limit = limit;
+
+ ephy_history_service_query_urls (self,
+ query, callback, user_data);
+}
+
+void
+ephy_history_service_add_page (EphyHistoryService *self,
+ const char *url)
+{
+ EphyHistoryPageVisit *visit;
+
+ visit = ephy_history_page_visit_new (url,
+ time (NULL),
+ EPHY_PAGE_VISIT_TYPED);
+ ephy_history_service_add_visit (self,
+ visit, NULL, NULL);
+ ephy_history_page_visit_free (visit);
+}