aboutsummaryrefslogtreecommitdiffstats
path: root/lib/history/ephy-history-service.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/history/ephy-history-service.c')
-rw-r--r--lib/history/ephy-history-service.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/lib/history/ephy-history-service.c b/lib/history/ephy-history-service.c
index 590c1c4a0..26de9e43f 100644
--- a/lib/history/ephy-history-service.c
+++ b/lib/history/ephy-history-service.c
@@ -40,6 +40,7 @@ typedef enum {
GET_HOST_FOR_URL,
QUERY_URLS,
QUERY_VISITS,
+ GET_HOSTS
} EphyHistoryServiceMessageType;
enum {
@@ -518,6 +519,18 @@ ephy_history_service_execute_find_visits (EphyHistoryService *self, EphyHistoryQ
return TRUE;
}
+static gboolean
+ephy_history_service_execute_get_hosts (EphyHistoryService *self,
+ gpointer pointer, gpointer *results)
+{
+ GList *hosts;
+
+ hosts = ephy_history_service_get_all_hosts (self);
+ *results = hosts;
+
+ return hosts != NULL;
+}
+
void
ephy_history_service_add_visit (EphyHistoryService *self, EphyHistoryPageVisit *visit, EphyHistoryJobCallback callback, gpointer user_data)
{
@@ -581,6 +594,19 @@ ephy_history_service_query_urls (EphyHistoryService *self, EphyHistoryQuery *que
ephy_history_service_send_message (self, message);
}
+void
+ephy_history_service_get_hosts (EphyHistoryService *self,
+ EphyHistoryJobCallback callback,
+ gpointer user_data)
+{
+ EphyHistoryServiceMessage *message;
+
+ message = ephy_history_service_message_new (self, GET_HOSTS,
+ NULL, NULL,
+ callback, user_data);
+ ephy_history_service_send_message (self, message);
+}
+
static gboolean
ephy_history_service_execute_set_url_title (EphyHistoryService *self,
EphyHistoryURL *url,
@@ -789,7 +815,8 @@ static EphyHistoryServiceMethod methods[] = {
(EphyHistoryServiceMethod)ephy_history_service_execute_get_url,
(EphyHistoryServiceMethod)ephy_history_service_execute_get_host_for_url,
(EphyHistoryServiceMethod)ephy_history_service_execute_query_urls,
- (EphyHistoryServiceMethod)ephy_history_service_execute_find_visits
+ (EphyHistoryServiceMethod)ephy_history_service_execute_find_visits,
+ (EphyHistoryServiceMethod)ephy_history_service_execute_get_hosts
};
static void