[evolution-groupwise] Adapt to Camel API changes.



commit a1a43fb3a59fc2b215bd1e740fa92fb4a423a040
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sun Jan 29 14:49:57 2012 -0500

    Adapt to Camel API changes.

 src/camel/camel-groupwise-journal.c |   28 ++++++++++++++--------------
 src/camel/camel-groupwise-journal.h |    2 --
 2 files changed, 14 insertions(+), 16 deletions(-)
---
diff --git a/src/camel/camel-groupwise-journal.c b/src/camel/camel-groupwise-journal.c
index 6aed6fa..4824f11 100644
--- a/src/camel/camel-groupwise-journal.c
+++ b/src/camel/camel-groupwise-journal.c
@@ -41,10 +41,10 @@
 
 #define d(x)
 
-static void groupwise_entry_free (CamelOfflineJournal *journal, CamelDListNode *entry);
-static CamelDListNode *groupwise_entry_load (CamelOfflineJournal *journal, FILE *in);
-static gint groupwise_entry_write (CamelOfflineJournal *journal, CamelDListNode *entry, FILE *out);
-static gint groupwise_entry_play (CamelOfflineJournal *journal, CamelDListNode *entry, GCancellable *cancellable, GError **error);
+static void groupwise_entry_free (CamelOfflineJournal *journal, gpointer entry);
+static gpointer groupwise_entry_load (CamelOfflineJournal *journal, FILE *in);
+static gint groupwise_entry_write (CamelOfflineJournal *journal, gpointer entry, FILE *out);
+static gint groupwise_entry_play (CamelOfflineJournal *journal, gpointer entry, GCancellable *cancellable, GError **error);
 
 G_DEFINE_TYPE (CamelGroupwiseJournal, camel_groupwise_journal, CAMEL_TYPE_OFFLINE_JOURNAL)
 
@@ -67,9 +67,9 @@ camel_groupwise_journal_init (CamelGroupwiseJournal *groupwise_journal)
 
 static void
 groupwise_entry_free (CamelOfflineJournal *journal,
-                      CamelDListNode *entry)
+                      gpointer entry)
 {
-	CamelGroupwiseJournalEntry *groupwise_entry = (CamelGroupwiseJournalEntry *) entry;
+	CamelGroupwiseJournalEntry *groupwise_entry = entry;
 
 	g_free (groupwise_entry->uid);
 	g_free (groupwise_entry->original_uid);
@@ -77,7 +77,7 @@ groupwise_entry_free (CamelOfflineJournal *journal,
 	g_free (groupwise_entry);
 }
 
-static CamelDListNode *
+static gpointer
 groupwise_entry_load (CamelOfflineJournal *journal,
                       FILE *in)
 {
@@ -105,7 +105,7 @@ groupwise_entry_load (CamelOfflineJournal *journal,
 		goto exception;
 	}
 
-	return (CamelDListNode *) entry;
+	return entry;
 
  exception:
 
@@ -120,10 +120,10 @@ groupwise_entry_load (CamelOfflineJournal *journal,
 
 static gint
 groupwise_entry_write (CamelOfflineJournal *journal,
-                       CamelDListNode *entry,
+                       gpointer entry,
                        FILE *out)
 {
-	CamelGroupwiseJournalEntry *groupwise_entry = (CamelGroupwiseJournalEntry *) entry;
+	CamelGroupwiseJournalEntry *groupwise_entry = entry;
 
 	if (camel_file_util_encode_uint32 (out, groupwise_entry->type) == -1)
 		return -1;
@@ -271,11 +271,11 @@ groupwise_entry_play_transfer (CamelOfflineJournal *journal,
 
 static gint
 groupwise_entry_play (CamelOfflineJournal *journal,
-                      CamelDListNode *entry,
+                      gpointer entry,
                       GCancellable *cancellable,
                       GError **error)
 {
-	CamelGroupwiseJournalEntry *groupwise_entry = (CamelGroupwiseJournalEntry *) entry;
+	CamelGroupwiseJournalEntry *groupwise_entry = entry;
 
 	switch (groupwise_entry->type) {
 	case CAMEL_GROUPWISE_JOURNAL_ENTRY_APPEND:
@@ -385,7 +385,7 @@ camel_groupwise_journal_append (CamelGroupwiseJournal *groupwise_journal,
 	entry->type = CAMEL_GROUPWISE_JOURNAL_ENTRY_APPEND;
 	entry->uid = uid;
 
-	camel_dlist_addtail (&journal->queue, (CamelDListNode *) entry);
+	g_queue_push_tail (&journal->queue, entry);
 
 	if (appended_uid)
 		*appended_uid = g_strdup (uid);
@@ -421,7 +421,7 @@ camel_groupwise_journal_transfer (CamelGroupwiseJournal *groupwise_journal,
 	entry->original_uid = g_strdup (original_uid);
 	entry->source_container = g_strdup (camel_groupwise_store_container_id_lookup (gw_store, camel_folder_get_display_name (((CamelFolder *) source_folder))));
 
-	camel_dlist_addtail (&journal->queue, (CamelDListNode *) entry);
+	g_queue_push_tail (&journal->queue, entry);
 
 	if (transferred_uid)
 		*transferred_uid = g_strdup (uid);
diff --git a/src/camel/camel-groupwise-journal.h b/src/camel/camel-groupwise-journal.h
index b32fe5a..3424b23 100644
--- a/src/camel/camel-groupwise-journal.h
+++ b/src/camel/camel-groupwise-journal.h
@@ -59,8 +59,6 @@ enum {
 };
 
 struct _CamelGroupwiseJournalEntry {
-	CamelDListNode node;
-
 	guint32 type;
 
 	gchar *uid;



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