aboutsummaryrefslogtreecommitdiffstats
path: root/lib/history
diff options
context:
space:
mode:
Diffstat (limited to 'lib/history')
-rw-r--r--lib/history/ephy-history-service.c41
-rw-r--r--lib/history/ephy-history-service.h3
2 files changed, 44 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);
+}
diff --git a/lib/history/ephy-history-service.h b/lib/history/ephy-history-service.h
index b01dd076f..049b3cdf5 100644
--- a/lib/history/ephy-history-service.h
+++ b/lib/history/ephy-history-service.h
@@ -64,6 +64,9 @@ void ephy_history_service_set_url_zoom_level (EphyHisto
void ephy_history_service_get_host_for_url (EphyHistoryService *self, const char *url, EphyHistoryJobCallback callback, gpointer user_data);
void ephy_history_service_get_url (EphyHistoryService *self, const char *url, EphyHistoryJobCallback callback, gpointer user_data);
void ephy_history_service_delete_urls (EphyHistoryService *self, GList *urls, EphyHistoryJobCallback callback, gpointer user_data);
+void ephy_history_service_find_urls (EphyHistoryService *self, gint64 from, gint64 to, guint limit, GList *substring_list, EphyHistoryJobCallback callback, gpointer user_data);
+void ephy_history_service_add_page (EphyHistoryService *self, const char *orig_url);
+
G_END_DECLS
#endif /* EPHY_HISTORY_SERVICE_H */