2008-09-07 Jeffrey Stedfast * README: Bumped version * configure.in: Bumped version to 2.3.9 2008-09-07 Jeffrey Stedfast New feature needed by the Bongo project (seems DBMail could also use this feature as they currently have a hack-around). * tests/test-mbox.c: Output header offsets as well so that they can be checked. * gmime/gmime-parser.c (g_mime_parser_get_headers_begin): New function to get the beginning offset of the message headers. (g_mime_parser_get_headers_end): Same, but for the end offset. (parser_step_headers): Only set priv->headers_begin and priv->headers_end if they are set to -1, we don't want to overwrite this value if parsing a subpart. (parser_step): Reset priv->headers_begin and priv->headers_end when appropriate. 2008-09-07 Jeffrey Stedfast * gmime/gmime-charset.c (g_mime_charset_map_init): Create the iconv_charsets hashtable using g_hash_table_new_full() so that we don't have to call g_hash_table_foreach() before destroying it in g_mime_charset_map_shutdown(). * gmime/gmime-gpg-context.c: Use g_hash_table_new_full() so that we don't have to g_hash_table_foreach() to remove all user-id hints before destroying the user-id hint hashtable. * util/cache.c: Updated to use GSlice instead of a custom MemChunk allocator. * util/gtrie.c: Updated to use GSlice instead of my custom MemChunk. The main purpose for using the MemChunk allocator had been ease of cleanup, but it made it more difficult to use GTrie elsewhere. * examples/basic-example.c: Updated for the foreach() changes. * gmime/gmime-multipart.c (g_mime_multipart_foreach): Changed to be recursive. The callback function signature has changed a bit to be more useful as well by providing the parent MIME object. * gmime/gmime-message.c (g_mime_message_foreach): Same. 2008-09-06 Jeffrey Stedfast * gmime/gmime-multipart.c (g_mime_multipart_get_subpart_from_content_id): Multiparts can have Content-Id's too. 2008-09-06 Jeffrey Stedfast * gmime/gmime-part.c (g_mime_part_set_content_object): Made virtual, seems like it could be useful. * gmime/gmime-object.c (set_content_type): Do not serialize the GMimeContentType object to the headers. This is done elsewhere now. (g_mime_object_set_content_type): After calling the virtual set_content_type(), serialize the GMimeContentType object to the headers. * gmime/gmime-multipart-encrypted.c: Get rid of the protocol member variable, it's not needed. * gmime/gmime-multipart-signed.c: Get rid of the protocol and micalg member strings, these aren't needed - just request them from the content_type. * gmime/gmime-multipart.c: Get rid of boundary member variable, we can just request it from the ContentType object. No sense duplicating strings. * gmime/gmime-message.c (message_get_headers): Don't write out a MIME-Version header if a Content-Type header doesn't exist. * gmime/gmime-parser.c (parser_content_type): Instead of returning a GMimeContentType object, we now return a simpler ContentType struct so that we don't waste time processing more of the header than we need to, all we need is the type/subtype to figure out which MIME object type to instantiate. (parser_scan_message_part): After finishing parsing the object, destroy the content_type ourselves. (parser_construct_leaf_part): Updated. Don't set a GMimeContentType on the GMimeObject unless the Content-Type header doesn't exist (if it does exist, then appending the Content-Type header will cause one to be created and set on the GMimeObject). (parser_construct_multipart): Updated. * gmime/gmime-content-type.c (g_mime_content_type_new_from_string): Use the new g_mime_parse_content_type() utility function and set the parsed string values on the new GMimeContentType object directly to avoid unnecessary strdup()ing. * gmime/gmime-parse-utils.c (g_mime_parse_content_type): New function to parse the simple type/subtype Content-Type form.