aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-recipient.c
diff options
context:
space:
mode:
authorbertrand <Bertrand.Guiheneuf@aful.org>1999-09-02 19:19:40 +0800
committerBertrand Guiheneuf <bertrand@src.gnome.org>1999-09-02 19:19:40 +0800
commit5c7fc6df1165a26c7dfca91f9664c4e860856824 (patch)
treef0edec368083102280630c6d7f2ac3f88c98add3 /camel/camel-recipient.c
parentacfd8adff8c507d6ee738993866aefa12361b172 (diff)
downloadgsoc2013-evolution-5c7fc6df1165a26c7dfca91f9664c4e860856824.tar
gsoc2013-evolution-5c7fc6df1165a26c7dfca91f9664c4e860856824.tar.gz
gsoc2013-evolution-5c7fc6df1165a26c7dfca91f9664c4e860856824.tar.bz2
gsoc2013-evolution-5c7fc6df1165a26c7dfca91f9664c4e860856824.tar.lz
gsoc2013-evolution-5c7fc6df1165a26c7dfca91f9664c4e860856824.tar.xz
gsoc2013-evolution-5c7fc6df1165a26c7dfca91f9664c4e860856824.tar.zst
gsoc2013-evolution-5c7fc6df1165a26c7dfca91f9664c4e860856824.zip
changed decl to fit CRLFunc. (_write_recipients_to_stream): calls
1999-09-02 bertrand <Bertrand.Guiheneuf@aful.org> * camel/camel-mime-message.c (_write_one_recipient_to_stream): changed decl to fit CRLFunc. (_write_recipients_to_stream): calls camel_recipient_foreach_recipient_type now. * camel/camel-recipient.c (camel_recipient_foreach_recipient_type): new convinience function. Iterate over all recipient types. * camel/gmime-utils.c (gmime_write_header_table_to_stream): s/write_header_table_to_stream/gmime_write_header_table_to_stream/ (gmime_write_header_with_glist_to_stream): s/write_header_with_glist_to_stream/gmime_write_header_with_glist_to_stream/ svn path=/trunk/; revision=1167
Diffstat (limited to 'camel/camel-recipient.c')
-rw-r--r--camel/camel-recipient.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/camel/camel-recipient.c b/camel/camel-recipient.c
index b73152c238..436af5058b 100644
--- a/camel/camel-recipient.c
+++ b/camel/camel-recipient.c
@@ -66,7 +66,7 @@ _free_recipient_list (gpointer key, gpointer value, gpointer user_data)
void
camel_recipient_table_free (CamelRecipientTable *recipient_table)
{
- g_return_if_fail (recipient_table);
+ if (!recipient_table) return;
/* free each recipient list */
g_hash_table_foreach (recipient_table->recipient_hash_table, _free_recipient_list, NULL);
@@ -79,7 +79,8 @@ camel_recipient_table_free (CamelRecipientTable *recipient_table)
void
camel_recipient_table_unref (CamelRecipientTable *recipient_table)
{
- g_return_if_fail (recipient_table);
+ if (!recipient_table) return;
+
recipient_table->ref_count -= 1;
if (recipient_table->ref_count <1)
camel_recipient_table_free (recipient_table);
@@ -142,7 +143,7 @@ camel_recipient_table_add_list (CamelRecipientTable *recipient_table,
if (existent_list)
- g_list_concat (existent_list, recipient_type);
+ g_list_concat (existent_list, recipient_list);
else
g_hash_table_insert (recipient_table->recipient_hash_table, g_strdup (recipient_type), recipients_list);
}
@@ -191,3 +192,14 @@ camel_recipient_table_get (CamelRecipientTable *recipient_table,
{
return (const GList *)g_hash_table_lookup (recipient_table->recipient_hash_table, recipient_type);
}
+
+
+
+
+void
+camel_recipient_foreach_recipient_type (CamelRecipientTable *recipient_table,
+ CRLFunc func,
+ gpointer user_data)
+{
+ g_hash_table_foreach (recipient_table->recipient_hash_table, (GHFunc)func, user_data);
+}