diff options
author | bertrand <Bertrand.Guiheneuf@inria.fr> | 1999-05-10 05:03:54 +0800 |
---|---|---|
committer | Bertrand Guiheneuf <bertrand@src.gnome.org> | 1999-05-10 05:03:54 +0800 |
commit | 62b338094aac49edd76acbc227e18c4f06e726c1 (patch) | |
tree | d482fec8e6a4ccabef92d7dddd267d9eb5e05b4a /camel/camel-mime-part.c | |
parent | 65cc58a082a305923a472bcd75c843a47586006c (diff) | |
download | gsoc2013-evolution-62b338094aac49edd76acbc227e18c4f06e726c1.tar.gz gsoc2013-evolution-62b338094aac49edd76acbc227e18c4f06e726c1.tar.zst gsoc2013-evolution-62b338094aac49edd76acbc227e18c4f06e726c1.zip |
new method
1999-05-09 bertrand <Bertrand.Guiheneuf@inria.fr>
* camel/camel-mime-part.c (__camel_mime_part_add_header):
new method
* camel/camel-mime-part.h (struct CamelMimePart):
added core fields.
svn path=/trunk/; revision=899
Diffstat (limited to 'camel/camel-mime-part.c')
-rw-r--r-- | camel/camel-mime-part.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/camel/camel-mime-part.c b/camel/camel-mime-part.c index 2d3fdb58fb..eed4e5de0a 100644 --- a/camel/camel-mime-part.c +++ b/camel/camel-mime-part.c @@ -73,3 +73,21 @@ camel_mime_part_get_type (void) + +static void +__camel_mime_part_add_header (CamelMimePart *mime_part, GString *header_name, GString *header_value) +{ + gboolean header_exists; + GString *old_header_name; + GString *old_header_value; + + header_exists = g_hash_table_lookup_extended (mime_part->headers, header_name, + (gpointer *) &old_header_name, + (gpointer *) &old_header_value); + if (header_exists) { + g_string_free (old_header_name, TRUE); + g_string_free (old_header_value, TRUE); + } + + g_hash_table_insert (mime_part->headers, header_name, header_value); +} |