[epiphany/history-rewrite: 39/45] ephy-history-service: Add EphyHistoryURL list handling methods
- From: Claudio Saavedra <csaavedra src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/history-rewrite: 39/45] ephy-history-service: Add EphyHistoryURL list handling methods
- Date: Wed, 24 Aug 2011 19:42:35 +0000 (UTC)
commit 3d3f45ac3ce87727c952c9aeb0ddfd8a900bbd53
Author: Claudio Saavedra <csaavedra igalia com>
Date: Thu Jul 21 12:31:58 2011 +0300
ephy-history-service: Add EphyHistoryURL list handling methods
lib/history/ephy-history-types.c | 25 +++++++++++++++++++++++++
lib/history/ephy-history-types.h | 3 +++
2 files changed, 28 insertions(+), 0 deletions(-)
---
diff --git a/lib/history/ephy-history-types.c b/lib/history/ephy-history-types.c
index 921c617..b64f8bd 100644
--- a/lib/history/ephy-history-types.c
+++ b/lib/history/ephy-history-types.c
@@ -119,6 +119,31 @@ ephy_history_url_free (EphyHistoryURL *url)
g_slice_free1 (sizeof (EphyHistoryURL), url);
}
+GList *
+ephy_history_url_list_copy (GList *original)
+{
+ GList *new = NULL, *last;
+
+ if (original) {
+ new = last = g_list_append (NULL, ephy_history_url_copy (original->data));
+ original = original->next;
+
+ while (original) {
+ last = g_list_append (last, ephy_history_url_copy (original->data));
+ last = last->next;
+ original = original->next;
+ }
+ }
+
+ return new;
+}
+
+void
+ephy_history_url_list_free (GList *list)
+{
+ g_list_free_full (list, (GDestroyNotify) ephy_history_url_free);
+}
+
EphyHistoryQuery *
ephy_history_query_new ()
{
diff --git a/lib/history/ephy-history-types.h b/lib/history/ephy-history-types.h
index 0b7bc64..a234fb5 100644
--- a/lib/history/ephy-history-types.h
+++ b/lib/history/ephy-history-types.h
@@ -81,6 +81,9 @@ EphyHistoryURL * ephy_history_url_new (const char *url, const cha
EphyHistoryURL * ephy_history_url_copy (EphyHistoryURL *url);
void ephy_history_url_free (EphyHistoryURL *url);
+GList * ephy_history_url_list_copy (GList *original);
+void ephy_history_url_list_free (GList *list);
+
EphyHistoryQuery * ephy_history_query_new (void);
void ephy_history_query_free (EphyHistoryQuery *query);
EphyHistoryQuery * ephy_history_query_copy (EphyHistoryQuery *query);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]