1 2015-01-23 Sunghyun Kwon <sh0701.kwon@samsung.com>
3 * gmime/gmime-gpg-context.c (gpg_ctx_set_mode): Added the condition
4 (GPG_CTX_MODE_SIGN_ENCRYPT)
6 2013-02-19 Jeffrey Stedfast <fejj@gnome.org>
8 * README: Bumped version
10 * configure.ac: Bumped version to 2.6.15
12 2013-02-19 Jeffrey Stedfast <fejj@gnome.org>
14 * gmime/gmime-filter-html.c (html_convert): Fixed to convert the
15 last line of input even if it doesn't end with a \n.
17 2013-02-18 Jeffrey Stedfast <fejj@gnome.org>
19 * README: Bumped version
21 * configure.ac: Bumped version to 2.6.14
23 2013-02-18 Jeffrey Stedfast <fejj@gnome.org>
25 * util/url-scanner.c (url_addrspec_start): Fixed the logic to
26 actually scan for the beginning of the mailbox.
28 2012-12-09 Jeffrey Stedfast <fejj@gnome.org>
30 * README: Bumped version
32 * configure.ac: Bumped version to 2.6.13
34 2012-11-26 Jeffrey Stedfast <fejj@gnome.org>
36 * gmime/gmime-header.c (g_mime_header_iter_first): Make sure the
38 (g_mime_header_iter_last): Same.
40 2012-11-23 Jeffrey Stedfast <fejj@gnome.org>
42 * gmime/gmime-header.c (g_mime_header_list_prepend): Prepend the
43 header to the list, don't *append* it. Oops.
44 (g_mime_header_list_clear): Don't forget to reset the linked list
45 so that it doesn't contained free'd nodes.
47 2012-11-02 Jeffrey Stedfast <fejj@gnome.org>
49 * README: Bumped version
51 * configure.ac: Bumped version to 2.6.12
53 2012-10-27 Jeffrey Stedfast <fejj@gnome.org>
55 * gmime/gmime-stream-filter.c (stream_read): Initialize presize to
56 READ_PAD instead of READ_SIZE to prevent potential buffer
59 2012-10-20 Jeffrey Stedfast <fejj@gnome.org>
61 * gmime/gmime-filter-gzip.c (gunzip_filter): Apparently
62 Z_BUF_ERROR isn't actually an error unless there is input
63 available. Thanks to Pavlo <devgs@ukr.net> for this patch.
65 2012-10-19 Jeffrey Stedfast <fejj@gnome.org>
67 * gmime/gmime-parser.c (parser_push_boundary): Don't use strcmp to
68 check if the boundary is an mbox boundary, use a direct pointer
69 comparison so that we can handle Content-Type boundary parameters
70 with a value of "From "
72 2012-10-19 Jeffrey Stedfast <jeff@xamarin.com>
74 * gmime/gmime-parser.c (parser_step_headers): Don't assume that
75 the first non-header line we find indicates the start of the
76 content unless we've already gotten some basic headers.
80 2012-10-18 Jeffrey Stedfast <jeff@xamarin.com>
82 * README: Bumped version
84 * configure.ac: Bumped version to 2.6.11
86 2012-09-12 Jeffrey Stedfast <jeff@xamarin.com>
88 * gmime/gmime-gpg-context.c (gpg_ctx_parse_status): Unref the
89 certificate after adding it to the list (adding it to the list
92 * gmime/gmime-multipart-encrypted.c
93 (g_mime_multipart_encrypted_decrypt): If the 'result' out param is
94 null, unref the GMimeDecryptResult to avoid leaking.
96 2012-08-13 Jeffrey Stedfast <jeff@xamarin.com>
98 * gmime/gmime-utils.c (tokenize_rfc2047_phrase): Don't forget to
99 initialize 'ascii' to TRUE.
101 2012-08-05 Jeffrey Stedfast <jeff@xamarin.com>
103 * gmime/gmime-stream-pipe.c (stream_flush): Pipes and sockets
104 cannot be fsync()'d, so don't even try!
106 2012-08-05 Jeffrey Stedfast <jeff@xamarin.com>
108 * gmime/gmime-utils.c (rfc2047_token_new_encoded_word): Make sure
109 to properly handle broken encoded-word tokens in the form:
112 Fixes the g_malloc abort() in bug #679388
114 2012-08-05 Jeffrey Stedfast <jeff@xamarin.com>
116 * gmime/gmime-multipart-signed.c (check_protocol_supported): Oops,
117 need to compare against xsupported in the second string compare.
121 2012-06-13 Jeffrey Stedfast <fejj@gnome.org>
123 * README: Bumped version
125 * configure.ac: Bumped version to 2.6.10
127 2012-06-13 Jeffrey Stedfast <fejj@gnome.org>
129 * gmime/Makefile.am: Always build gmime-gpg-context.[c,h] and
130 gmime-pkcs7-context.[c,h]
132 * gmime/gmime-gpg-context.c: Armor internals with #ifdef
133 ENABLE_CRYPTOGRAPHY so that if crypto is disabled, only the
134 skeletal API is built.
136 * gmime/gmime.h: Include gmime-pkcs7-context.h
140 2012-06-13 Jeffrey Stedfast <fejj@gnome.org>
142 * gmime/gmime-utils.c (rfc2047_encode_get_rfc822_words): Use
143 is_blank() instead of is_lwsp() so that we only treat space and
144 tab as word delimiters (we want to rfc2047 encode \r's and
145 \n's). Check for ctrl characters when deciding what the type and
146 encoding of the word is.
148 2012-06-13 Jeffrey Stedfast <fejj@gnome.org>
150 * gmime/gmime-utils.c (rfc2047_encode_get_rfc822_words): When
151 breaking up really long atom tokens, change the word type to
152 RFC2047 so that we encode them, thus preventing forced header
153 folding which cannot be unmunged.
154 (header_fold): Fixed for cases where the first word in a header is
155 68 chars. (Note: this fix is largely unnecessary due to the above fix)
157 2012-06-13 Jeffrey Stedfast <fejj@gnome.org>
159 * gmime/gmime-message.c: When setting a header, make sure to
160 always clear the header list cache of the toplevel mime_part as
163 2012-06-13 Jeffrey Stedfast <fejj@gnome.org>
165 * gmime/gmime-param.c (rfc2184_param_new): Only decode the charset
166 and lang if the parameter is actually encoded. Thanks to Peter
167 Bloomfield for this patch.
169 2012-06-13 Jeffrey Stedfast <fejj@gnome.org>
171 * gmime/gmime-gpg-context.c (gpg_ctx_parse_status): Keep track of
172 DECRYPTION_OKAY status.
173 (gpg_decrypt): Only return NULL if decryption failed (e.g. we
174 didn't get a DECRYPTION_OKAY status).
178 2012-06-13 Jeffrey Stedfast <fejj@gnome.org>
180 * docs/reference/building.sgml: Updated docs.
184 2012-04-22 Jeffrey Stedfast <fejj@gnome.org>
186 * README: Bumped version
188 * configure.ac: Bumped version to 2.6.9
190 2012-04-22 Jeffrey Stedfast <fejj@gnome.org>
192 * gmime/gmime-multipart-signed.c (g_mime_multipart_signed_verify):
193 Match protocols like application/x-pkcs7-signature, too.
197 2012-04-19 Jeffrey Stedfast <fejj@gnome.org>
199 * README: Bumped version
201 * configure.ac: Bumped version to 2.6.8
203 2012-04-12 Jeffrey Stedfast <fejj@gnome.org>
205 * gmime/gmime-parser.c (parser_scan_headers): Make sure to
206 initialize 'start' before using it to calculate headers_end in the
207 case where parser_fill() failed.
211 2012-03-10 Daniel Gillmor <dkg@fifthhorseman.net>
213 * mono/gmime-sharp.dll.config.in: Fixed missing .so number.
217 2012-03-09 Jeffrey Stedfast <fejj@gnome.org>
219 * README: Bumped version
221 * configure.ac: Bumped version to 2.6.7
223 2012-03-09 Daniel Gillmor <dkg@fifthhorseman.net>
225 * gmime/gmime-certificate.h: Remove the trailing comma from the
226 last enum item to silence gcc -pedantic warnings.
228 * gmime/gmime-message.h: Same.
230 2012-03-09 Jeffrey Stedfast <fejj@gnome.org>
232 * gmime/gmime-parser.c (parser_step_headers): Be lenient with
233 "From " lines found in message headers. Fixes bug #671680.
235 2012-02-20 Jeffrey Stedfast <fejj@gnome.org>
237 * README: Bumped version
239 * configure.ac: Bumped version to 2.6.6
241 2012-02-20 Jeffrey Stedfast <fejj@gnome.org>
243 * gmime/gmime-message.c (multipart_guess_body): Fixed
244 multipart/signed logic.
246 2012-02-20 Jeffrey Stedfast <fejj@gnome.org>
248 * gmime/gmime-common.c (g_mime_strdup_trim): Optimized.
250 * gmime/gmime-parser.c (header_parse): Use g_mime_strdup_trim()
251 instead of reimplementing the same logic here.
253 2012-02-20 Jeffrey Stedfast <fejj@gnome.org>
255 * gmime/gmime-parser.c: Instead of filtering Content-* headers
256 inside GMimeObject subclasses, filter them in the parser. This way
257 header fetching works as expected in subparts which might have
258 non-standard headers (X-* and whatnot).
260 2012-02-19 Jeffrey Stedfast <fejj@gnome.org>
262 * gmime/gmime-encodings.c (g_mime_content_encoding_from_string):
263 Match non-standard encodings: 7-bit, 8-bit, and x-uue (the
264 standard names for these are 7bit, 8bit, and x-uuencode).
266 2012-02-19 Jeffrey Stedfast <fejj@gnome.org>
268 * gmime/gmime-common.c (g_mime_strdup_trim): New function that
269 optimizes g_strstrip combined with g_strdup in both speed and
270 memory usage (g_strstrip won't shrink the size of the dup'd
273 2012-02-18 Jeffrey Stedfast <fejj@gnome.org>
275 * configure.ac: Add a --enable-smime flag which defaults to "no".
277 2012-02-18 Jeffrey Stedfast <fejj@gnome.org>
279 * README: Bumped version
281 * configure.ac: Bumped version to 2.6.5
283 2012-02-18 Jeffrey Stedfast <fejj@gnome.org>
285 * gmime/gmime-parser.c (parser_scan_message_part): Make sure that
286 a boundary doesn't appear before we start scanning for the
289 2012-02-18 Jeffrey Stedfast <fejj@gnome.org>
292 * src/uudecode.c: Moved to examples/
294 2012-02-17 Jeffrey Stedfast <fejj@gnome.org>
296 * gmime/gmime-gpg-context.c (gpg_verify): In cases where gpg does
297 not exit with code 0, only set the GError when we've gotten no
298 signer information from gpg (otherwise we return the list of
299 signers, which will presumably include why the verification failed
300 in the status of each signer). Fixes bug #668085.
302 2012-02-17 Jeffrey Stedfast <fejj@gnome.org>
304 * gmime/gmime-part-iter.c: Fixed to behave the same as IMAP and
305 also to actually work.
307 2012-02-16 Jeffrey Stedfast <jeff@xamarin.com>
309 * mono/Multipart.custom: Fixed the binding for Multipart.Count.
311 2012-02-04 Jeffrey Stedfast <fejj@gnome.org>
313 * configure.ac: Added --with-gacdir to fix bug #667072
315 2012-01-11 Jeffrey Stedfast <fejj@gnome.org>
317 * mono/Makefile.am: Fixed up to more closely match the gtk-sharp
320 * mono/gmime-sharp.pc.in: Fixed to more closely match gtk-sharp.
322 2012-01-11 Jeffrey Stedfast <fejj@gnome.org>
324 * gmime/gmime-pkcs7-context.c: Fixed some switch statements to
325 include a 'default' code path, fixing some compiler
326 warnings. Fixes bug #667684.
328 2012-01-09 Ionut Biru <ibiru@archlinux.org>
330 * gmime/gmime-pkcs7-context.c: Fix compilation when S/MIME is not
333 2012-01-08 Jeffrey Stedfast <fejj@gnome.org>
335 * README: Bumped version
337 * configure.ac: Bumped version to 2.6.4
339 2012-01-08 Jeffrey Stedfast <fejj@gnome.org>
343 * configure.ac: Fixed Docbook checks for the html and pdf converters.
345 * docs/tutorial/Makefile.am: Use the DB2HTML and DB2PDF variables.
347 2012-01-05 Jeffrey Stedfast <jeff@xamarin.com>
349 Fixes for bug #667137.
351 * tests/Makefile.am: If any tests fail, exit with an error to
354 * tests/testsuite.c (testsuite_exit): Simply return
357 2012-01-05 Jeffrey Stedfast <fejj@gnome.org>
359 Fixes for bug #667072.
361 * mono/Makefile.am: Install to $(libdir) instead of $(prefix)/libdir.
363 * mono/gmime-sharp.pc.in: Set libdir to @libdir@
365 2012-01-05 Jeffrey Stedfast <fejj@gnome.org>
367 * src/Makefile.am: Rename uuencode/uudecode to
368 gmime-uuencode/decode to prevent naming collisions with the GNU
369 Sharutils tools. Fixes bug #667073.
371 2012-01-05 Jeffrey Stedfast <fejj@gnome.org>
373 * gmime/gmime-gpg-context.c (gpg_ctx_parse_status): Fixed returns
374 without a return value. Also fixed up some error-handling.
376 2012-01-05 Jeffrey Stedfast <fejj@gnome.org>
378 * gmime/gmime-utils.c (rfc2047_decode_tokens): Fixed a memory leak.
380 2011-12-23 Jeffrey Stedfast <fejj@gnome.org>
382 * README: Bumped version
384 * configure.ac: Bumped version to 2.6.3
386 2011-12-18 Jeffrey Stedfast <fejj@gnome.org>
388 * gmime/gmime-utils.c (quoted_decode): Made more robust and also
389 modified to keep state (e.g. for use when triplets span across
390 multiple encoded-word tokens).
391 (tokenize_rfc2047_phrase): Tokenizes a rfc822 phrase header for
393 (tokenize_rfc2047_text): Tokenizes a rfc822 unstructured text
394 header for later processing.
395 (rfc2047_decode_tokens): Merge and decode rfc2047 tokens,
396 converting the decoded text into UTF-8.
397 (g_mime_utils_header_decode_phrase): Rewritten to use the above
399 (g_mime_utils_header_decode_text): Same.
401 2011-12-18 Jeffrey Stedfast <fejj@gnome.org>
403 * gmime/gmime-utils.c (charset_convert): Don't count the
404 terminating nul character in the returned string length.
406 2011-12-17 Jeffrey Stedfast <fejj@gnome.org>
408 * README: Bumped version
410 * configure.ac: Bumped version to 2.6.2
412 2011-12-15 Jeffrey Stedfast <fejj@gnome.org>
414 * gmime/gmime-iconv-utils.c (g_mime_iconv_strndup): Same.
416 * gmime/gmime-filter-charset.c (flter_complete): Same as
419 * gmime/gmime-utils.c (charset_convert): Make sure the output
420 buffer is large enough when flushing the conversion descriptor.
422 2011-12-15 Jeffrey Stedfast <fejj@gnome.org>
424 * gmime/gmime.c (g_mime_init): Don't initialize the crypto types
425 unless crypto was enabled in the build.
427 2011-11-06 Jeffrey Stedfast <fejj@gnome.org>
429 * README: Bumped version
431 * configure.ac: Bumped version to 2.6.1
433 2011-11-05 Jeffrey Stedfast <fejj@gnome.org>
435 * gmime/gmime-multipart-encrypted.c
436 (g_mime_multipart_encrypted_decrypt): Need to decode the content
437 of the application/octet-stream part containing the encrypted
438 payload as it may have a non-7bit Content-Transfer-Encoding.
440 2011-11-05 Jeffrey Stedfast <fejj@gnome.org>
442 * gmime/gmime.c (g_mime_init): Register all GObject-based types
443 to prevent race conditions in multi-threaded apps.
445 2011-08-27 Jeffrey Stedfast <fejj@gnome.org>
447 * README: Bumped version
449 * configure.ac: Bumped version to 2.6.0
451 2011-08-14 Jeffrey Stedfast <fejj@gnome.org>
453 * mono/*.custom: Simplified the GetEnumerator() implementations.
455 * mono/HeaderEnumerator.cs: New IEnumerator class returned by
456 HeaderList.GetEnumerator(). Wraps HeaderIter, providing a more
459 2011-08-14 Jeffrey Stedfast <fejj@gnome.org>
461 * mono/GMime.metadata: Rename AppendHeader() to Append(),
462 PrependHeader() to Prepend(), RemoveHeader() to Remove(), etc.
464 * mono/HeaderList.custom: Instead of having
465 GetHeader()/SetHeader(), manually bind this as an indexer.
467 * gmime/gmime-header.c (g_mime_header_list_clear): New function
468 to clear all headers.
469 (g_mime_header_list_contains): New function added mostly for
470 completeness in the C# binding.
472 2011-08-14 Jeffrey Stedfast <fejj@gnome.org>
474 * README: Bumped version
476 * configure.ac: Bumped version to 2.5.10
478 2011-08-14 Jeffrey Stedfast <fejj@gnome.org>
480 * mono/GMime.metadata (PartBase): Rename to Entity to be more
481 consistent with MIME terminology and removed more convenience
482 methods that really only make sense in the C API.
483 (g_mime_object_new_type): Removed, there's no easy way to map this
485 (g_mime_object_new): Removed, there's no easy way to map this
488 2011-08-14 Jeffrey Stedfast <fejj@gnome.org>
490 * gmime/gmime-part-iter.c: Updated to be more consistent with IMAP
493 2011-08-13 Jeffrey Stedfast <fejj@gnome.org>
495 * gmime/gmime-part-iter.c: New class for iterating over a tree of
496 GMimeObjects. Fixes bug #652012.
498 2011-08-13 Jeffrey Stedfast <fejj@gnome.org>
500 * gmime/gmime-multipart.c (g_mime_multipart_replace): New
501 convenience function to replace a mime part at a specified
504 2011-08-08 Jeffrey Stedfast <fejj@gnome.org>
506 * README: Bumped version
508 * configure.ac: Bumped version to 2.5.9
510 2011-07-17 Jeffrey Stedfast <fejj@gnome.org>
512 * gmime/gmime-utils.c (charset_convert): Don't skip validation of
515 2011-07-17 Jeffrey Stedfast <fejj@gnome.org>
517 * gmime/gmime-utils.c (charset_convert): Handle ERANGE the same as
520 * gmime/gmime-filter-charset.c (filter_filter): Handle ERANGE the
523 * gmime/gmime-charset.c (g_mime_charset_map_init): Improved logic
524 for Win32 (and even Linux) systems. Don't rely on setlocale().
526 2011-06-15 Jeffrey Stedfast <fejj@gnome.org>
528 * gmime/gmime-parser.c: Added new state, MESSAGE_HEADERS, which
529 behaves the same as HEADERS but is only ever set when we are
530 parsing the toplevel GMimeMessage object.
531 (parser_step_headers): Be slightly more strict in handling
532 malformed headers in the MESSAGE_HEADERS state so that trying to
533 parse non-message streams fails (e.g. if someone tries to parse a
536 2011-06-15 Jeffrey Stedfast <fejj@gnome.org>
538 * gmime/gmime-gpg-context.c: Define nfds_t on OSX.
540 2011-06-10 Jeffrey Stedfast <fejj@gnome.org>
542 * README: Bumped version
544 * configure.ac: Bumped version to 2.5.8
546 2011-06-09 Jeffrey Stedfast <fejj@gnome.org>
550 * gmime/gmime-param.c (decode_value): If STRICT_PARSER isn't
551 defined, don't require the value to start with a valid character.
553 2011-06-08 Daniel Kahn Gillmor <dkg@fifthhorseman.net>
557 * gmime/gmime-gpg-context.c
558 (g_mime_gpg_context_[g,s]_set_use_agent): New functions to allow
559 the invoker to declare that they expect there to be a functioning
560 gpg-agent, and want gpg to talk to it for any needed credentials.
562 2011-06-08 Jeffrey Stedfast <fejj@gnome.org>
564 * gmime/gmime-gpg-context.c: If building on Apple, force the use
565 of our own implementation of poll() because Apple's poll() is
566 broken on some versions of MacOS.
568 2011-03-18 Jeffrey Stedfast <fejj@novell.com>
570 * README: Bumped version
572 * configure.ac: Bumped version to 2.5.7
574 2011-03-17 Jeffrey Stedfast <fejj@novell.com>
576 * gmime/gmime-multipart-encrypted.c: Updated for crypto API
579 * gmime/gmime-multipart-signed.c: Updated for crypto API changes.
581 * gmime/gmime-crypto-context.c (g_mime_crypto_context_verify): Now
582 returns a GMimeSignatureList, the 'details' string was worthless
584 (GMimeDecryptResult): This is now a GObject.
586 * gmime/gmime-pkcs7-context.c: Updated for crypto API changes.
588 * gmime/gmime-gpg-context.c: Updated for crypto API changes.
590 * gmime/gmime-certificate.[c,h]: New source files implementing
591 Certificate and CertificateList classes.
593 * gmime/gmime-signature.[c,h]: New source files implementing
594 Signature and SignatureList classes.
596 2011-03-16 Jeffrey Stedfast <fejj@novell.com>
598 * mono/StreamWrapper.cs (Write): Implemented.
600 * mono/CryptoRecipientCollection.cs:
601 * mono/SignerCollection.cs: New collections for Signers and
604 * mono/SignatureValidity.custom:
605 * mono/DecryptionResult.custom: Don't return IEnumerators for
606 signers/recipients, return the appropriate Collections instead.
608 2011-03-15 Jeffrey Stedfast <fejj@novell.com>
610 * mono/SignatureValidity.custom:
611 * mono/DecryptionResult.custom:
612 * mono/CryptoRecipient.custom:
613 * mono/Signer.custom: New custom sources implementing enumerators
614 for Signers and Recipients.
616 2011-03-14 Jeffrey Stedfast <fejj@novell.com>
618 * configure.ac: Check for glib-sharp-2.0 instead of gtk-sharp-2.0
619 since we really only depend on glib-sharp. Also check for gapi-2.0
622 2011-03-07 Jeffrey Stedfast <fejj@novell.com>
624 * README: Bumped version
626 * configure.ac: Bumped version to 2.5.6
628 * gmime/gmime-gpg-context.c (gpg_ctx_parse_signer_info): Treat
629 EXPSIG, EXPKEYSIG, and REVKEYSIG the same as GOODSIG/BADSIG status
630 messages in that all of them denote a new signer info.
632 2011-03-04 Jeffrey Stedfast <fejj@novell.com>
634 * README: Bumped version
636 * configure.ac: Bumped version to 2.5.5
638 2011-03-04 Jeffrey Stedfast <fejj@novell.com>
640 Implements features requested in bug #641841 and #641320.
642 * gmime/gmime-crypto-context.h (GMimeCryptoHash): Reordered to be
643 identical to gnupg's listing.
644 (GMimeCryptoPubKeyAlgo): Same.
646 * gmime/gmime-crypto-context.c (g_mime_decryption_result_[g,s]et_cipher):
647 New functions to get/set the cipher algorithm used.
648 (g_mime_decryption_result_[g,s]et_mdc): New functions to get/set
649 the mdc digest algorithm used.
651 * gmime/gmime-gpg-context.c (gpg_hash_algo): Removed, no longer
653 (gpg_pubkey_algo): Same.
654 (gpg_ctx_parse_status) :Parse the DECRYPTION_INFO status to get
655 the cipher and mdc algorithms used.
656 (gpg_decrypt): Set the cipher and mdc values on the
657 GMimeDecryptionResult.
659 * gmime/gmime-pkcs7-context.c (pkcs7_pubkey_algo): Removed, no
661 (pkcs7_hash_algo): Same.
663 2011-03-04 Jeffrey Stedfast <fejj@novell.com>
665 * gmime/gmime-gpg-context.c (gpg_ctx_parse_signer_info): Make sure
666 to extract the pubkey_algo, hash_algo, sig_class, sig_expires, and
667 return-code values for ERRSIG.
669 2011-03-04 Jeffrey Stedfast <fejj@novell.com>
671 Implemented bug #641319.
673 * gmime/gmime-crypto-context.c (g_mime_crypto_recipient_*): New
674 set of functions for manipulating a GMimeCryptoRecipient.
675 (g_mime_decryption_result_*): New set of functions to manipulate a
676 GMimeDecryptionResult
677 (g_mime_crypto_context_decrypt): Now returns a
678 GMimeDecryptionResult.
680 * gmime/gmime-multipart-encrypted.c
681 (g_mime_multipart_encrypted_decrypt): Updated for API changes.
683 * gmime/gmime-pkcs7-context.c (pkcs7_decrypt): Updated for API
686 * gmime/gmime-gpg-context.c (gpg_decrypt): Updated for API
689 2011-03-04 Jeffrey Stedfast <fejj@novell.com>
691 API cleanup as well as preparing for the possibility of a
692 multi-protocol CryptoContext.
694 * gmime/gmime-multipart-encrypted.c (g_mime_multipart_encrypted_encrypt):
695 Updated to use new APIs for getting the encryption protocol.
696 (g_mime_multipart_encrypted_decrypt): Same.
698 * gmime/gmime-multipart-signed.c (g_mime_multipart_signed_sign):
699 Updated to use new APIs for getting the signature protocol.
700 (g_mime_multipart_signed_verify): Same.
702 * gmime/gmime-crypto-context.c (g_mime_crypto_context_get_*_protocol):
703 New methods for getting the crypto protocol strings used by
704 multipart/encrypted and multipart/signed parts.
706 * gmime/gmime-pkcs7-context.c (pkcs7_get_*_protocol): Implemented.
708 * gmime/gmime-gpg-context.c (gpg_get_*_protocol): Implemented.
710 2011-03-03 Jeffrey Stedfast <fejj@novell.com>
712 * gmime/gmime-pkcs7-context.c (pkcs7_stream_seek): Added.
714 * gmime/gmime.c (g_mime_init): Initialize gpgme.
716 2011-02-08 Jeffrey Stedfast <fejj@novell.com>
718 Implements feature request in bug #635663.
720 * gmime/gmime-crypto-context.c (g_mime_signer_[g,s]et_sig_version):
721 New functions to access new signature version member.
722 (g_mime_signer_[g,s]et_sig_class): New functions to access new
723 signature class member.
725 * gmime/gmime-gpg-context.c (gpg_ctx_parse_signer_info): Extract
726 the signature class and version tokens.
728 2011-02-08 Jeffrey Stedfast <fejj@novell.com>
730 * PORTING: Updated docs.
732 * mono/GMime.metadata: Fixed up for the new decrypt API.
734 * gmime/gmime-message.c (multipart_guess_body): Updated. We can no
735 longer descend into the decrypted part because it is no longer
738 * gmime/gmime-multipart-encrypted.c (g_mime_multipart_encrypted_decrypt):
739 Now takes a GMimeSignatureValidity argument and no longer caches
740 the decrypted mime part/validity.
741 (g_mime_multipart_encrypted_get_signature_validity): Removed.
742 (g_mime_multipart_encrypted_encrypt): Don't cache the input part
743 as the decrypted part.
745 2011-01-22 Jeffrey Stedfast <fejj@novell.com>
747 * gmime/gmime-gpg-context.c (gpg_ctx_parse_signer_info): Parse the
748 ERRSIG's return code, fixes bug #638605.
750 * gmime/gmime-crypto-context.h: Added UNSUPP_ALGO error value.
752 2011-01-22 Jeffrey Stedfast <fejj@novell.com>
754 * gmime/gmime-stream-mem.c (stream_write): Correctly calculate the
755 end boundary of the stream when bound_end is -1.
757 2010-12-05 Jeffrey Stedfast <fejj@novell.com>
759 * README: Bumped version
761 * configure.ac: Bumped version to 2.5.4
763 2010-11-29 Jeffrey Stedfast <fejj@novell.com>
765 * gmime/internet-address.c (decode_address): Handle edge cases
766 where inptr reaches the end of the input string prematurely due to
769 2010-11-29 Jeffrey Stedfast <fejj@novell.com>
773 * gmime/gmime-pkcs7-context.c (pkcs7_get_validity): Reworked the
774 logic to calculate the signer status. Also dropped
775 GMimeSignatureStatus logic.
777 * gmime/gmime-gpg-context.c (gpg_verify): Removed the (broken)
778 logic of calculating a GMimeSignatureStatus.
780 (gpg_ctx_parse_signer_info): Updated for the g_mime_signer_new()
783 * gmime/gmime-crypto-context.c (g_mime_signature_validity_new): No
784 longer initializes a GMimeSignatureStatus member.
785 (g_mime_signature_validity_get_status): Removed.
786 (g_mime_signature_validity_set_status): Removed.
787 (g_mime_signer_new): Now takes a GMimeSignerStatus so that I could
788 get rid of the default NONE status.
790 * gmime/gmime-crypto-context.h (GMimeSignatureStatus): Removed.
792 2010-11-24 Jeffrey Stedfast <fejj@novell.com>
796 * gmime/gmime-crypto-context.c (g_mime_signer_new): Initialize
797 pubkey_algo and hash_algo.
798 (g_mime_signer_[g,s]et_pubkey_algo): Implemented.
799 (g_mime_signer_[g,s]et_hash_algo): Renamed from [g,s]et_hash().
801 * gmime/gmime-crypto-context.h (GMimeCryptoPubKeyAlgo): Defined
804 * gmime/gmime-pkcs7-context.c (pkcs7_get_validity): Record the
805 hash and pubkey algorithms used in the GMimeSigner.
807 * gmime/gmime-gpg-context.c (gpg_ctx_parse_signer_info): Record
808 the pubkey algorithm used by the signer.
810 2010-11-22 Jeffrey Stedfast <fejj@novell.com>
812 * gmime/gmime-multipart-encrypted.c (g_mime_multipart_encrypted_encrypt):
813 Now takes a hash algorithm argument which it passes along to
814 g_mime_crypto_context_encrypt().
816 * gmime/gmime-gpg-context.c (gpg_ctx_get_argv): When signing and
817 encrypting, pass the digest algorithm to gpg on the command-line.
818 (gpg_encrypt): Set the hash id on the GpgCtx.
820 * gmime/gmime-crypto-context.c (g_mime_crypto_context_encrypt):
821 Now takes a hash algorithm argument.
823 2010-11-22 Jeffrey Stedfast <fejj@novell.com>
827 * gmime/gmime-gpg-context.c (gpg_hash_from_id): New function
828 mapping the numeric hash id's that gpg uses to GMimeCryptoHash
830 (gpg_ctx_parse_signer_info): Extract the hash algorithm used by
832 (gpg_ctx_parse_status): Updated to use gpg_hash_from_id().
834 * gmime/gmime-crypto-context.c (g_mime_signer_set_hash): New
835 function to set the hash algorithm used by the signer.
836 (g_mime_signer_get_hash): New function to get the hash algorithm
839 2010-11-22 Jeffrey Stedfast <fejj@novell.com>
843 * gmime/gmime-crypto-context.[c,h]: Renamed from
844 gmime-cipher-context.[c,h].
846 2010-11-21 Jeffrey Stedfast <fejj@novell.com>
850 * gmime/gmime-multipart-encrypted.c (g_mime_multipart_encrypted_decrypt):
851 Updated error messages to be more consistent.
853 * gmime/gmime-multipart-signed.c (g_mime_multipart_signed_verify):
854 Make sure to set an error in all cases returning NULL.
856 2010-11-21 Jeffrey Stedfast <fejj@novell.com>
860 * gmime/gmime-cipher-context.c (g_mime_signer_get_*): These
861 functions all now take a const GMimeSigner *.
863 2010-11-19 Jeffrey Stedfast <fejj@novell.com>
867 * gmime/gmime-gpg-context.c (GpgCtx): No longer has a sigfile
868 member. Instead contains a sigstream and passwd_fd is now renamed
869 to secret_fd and used for both sending gpg the user's passwd as
870 well as for sending gpg the digital signature when verifying.
871 (gpg_ctx_new): Updated for the new struct members.
872 (gpg_ctx_set_sigstream): Replaces gpg_ctx_set_sigfile().
873 (gpg_ctx_free): Updated for the new struct members.
874 (gpg_ctx_get_argv): Modify our --verify command-line so that we
875 can pas gpg the digital signature without first writing it to
876 disk. Also modified to return char** instead of a GPtrArray to
878 (gpg_ctx_op_start): Modified to also create more pipes in VERIFY
880 (gpg_ctx_op_step): Modified to stream the digital signature to
882 (gpg_verify): Don't write the digital signature to disk - instead,
883 we now stream it directly to gpg.
885 2010-10-30 Jeffrey Stedfast <fejj@novell.com>
887 * gmime/gmime-message.c (g_mime_message_get_body): New function to
888 try and guess which part (or multipart/alternative) represents the
891 2010-09-25 Jeffrey Stedfast <fejj@novell.com>
893 * gmime/charset-map.c: According to rfc1557, it is suggested that
894 euc-kr be used for headers since many Korean mailers cannot handle
895 base64 or quoted-printable encoded iso-2022-kr. Based on this and
896 bug #629235, I'm just going to drop iso-2022-kr.
898 2010-09-17 Jeffrey Stedfast <fejj@novell.com>
900 Based on a patch by Marek Łętowski
902 * gmime/gmime-utils.c (g_mime_utils_header_decode_text): In the
903 workaround case, if we don't find an end marker, reset our inptr
904 to the beginning of the most recent word *plus 2* (to skip over
905 the leading "=?"), not the beginning of the input text. Also need
906 to reset our ascii state.
907 (g_mime_utils_header_decode_phrase): In the workaround case, if we
908 don't find an end marker, reset our inptr to the beginning of the
909 most recent word *plus 2*, to skip over the leading "=?".
911 2010-09-16 Jeffrey Stedfast <fejj@novell.com>
913 * gmime/gmime-encodings.c (g_mime_encoding_quoted_encode_close):
914 If the last input character is not a \n, append an "=\n" sequence.
916 2010-09-13 Jeffrey Stedfast <fejj@novell.com>
918 * gmime/gmime-charset.c: Mark known_iconv_charsets[] as
919 static. Also mark string members of various private structs as
922 2010-09-06 Jeffrey Stedfast <fejj@novell.com>
924 * configure.ac: Bump glib version requirement for
925 g_set_error_literal().
927 2010-09-02 Jeffrey Stedfast <fejj@novell.com>
929 * gmime/internet-address.c (group_to_string): Don't crash if the
930 group name is unset. Thanks to Damian Pietras for this patch.
932 2010-09-01 Jeffrey Stedfast <fejj@novell.com>
934 * gmime/gmime-utils.c (g_mime_utils_header_decode_phrase):
935 Implement the same rfc2047-workaround hack as the one found in
936 g_mime_utils_header_decode_text().
938 * gmime/gmime-encodings.c (g_mime_encoding_base64_decode_step):
939 Need to keep state to keep track of the number of ='s we've backed
940 out over in case it crosses buffer boundaries.
942 2010-08-30 Jeffrey Stedfast <fejj@novell.com>
944 * gmime/gmime-param.c (decode_token): Make less strict in order to
945 handle unquoted boundary values containing '=' (and other illegal
948 2010-08-26 Jeffrey Stedfast <fejj@novell.com>
950 * gmime/internet-address.c (_internet_address_set_name): Don't
951 decode/unquote the name. The docs for all the functions that call
952 this assume the name string is in its decoded form already.
953 (_internet_address_decode_name): New internal function that
954 decodes a string and sets it as the name on the InternetAddress.
955 (decode_address): Rewritten to be even more liberal in what it
958 2010-06-20 Jeffrey Stedfast <fejj@novell.com>
960 * gmime/gmime-multipart-encrypted.c (g_mime_multipart_encrypted_decrypt):
961 Don't unref the encrypted content mime part object when the
962 content-type doesn't match application/octet-stream,
963 g_mime_multipart_get_part() does not ref parts it returns. We also
964 need to set an error when this happens.
966 2010-05-18 Jeffrey Stedfast <fejj@novell.com>
968 * README: Bumped version
970 * configure.ac: Bumped version to 2.5.3
972 * gmime/gmime-encodings.h (GMIME_QP_ENCODE_LEN): Since
973 force-wrapped lines use "=\n" instead of just "\n", lines will be
976 2010-05-15 Jeffrey Stedfast <fejj@novell.com>
978 * README: Bumped version
980 * configure.ac: Bumped version to 2.5.2
982 2010-05-14 Jeffrey Stedfast <fejj@novell.com>
984 * gmime/gmime-encodings.h (GMIME_QP_ENCODE_LEN): Fixed to take
985 into acount the possibility of having to force-wrap lines at 72+
988 2010-05-06 Jeffrey Stedfast <fejj@novell.com>
990 * gmime/gmime-data-wrapper.c (g_mime_data_wrapper_get_stream):
993 2010-04-13 Jeffrey Stedfast <fejj@novell.com>
995 * configure.ac: Added a --disable-cryptography flag to alloow
996 building without GnuPG or S/MIME support. Thanks to
997 pier11@operamail.com for this patch. Fixes bug #615343.
999 * tests/test-streams.c: Use glib's G_GINT64_FORMAT and
1000 G_GSIZE_FORMAT macros for our various *printf needs to be more
1001 portable. Thanks to pier11@operamail.com for this patch.
1003 * gmime/gmime-gpg-context.c: Use g_set_error_literal() when no
1004 printf-style arguments are needed. Fixes bug #615594. Thanks to
1005 Tobias Mueller and Christian Persch.
1007 * Applied patch by pier11@operamail.com to fix the build for
1008 MingW. Fixes bug #615068.
1010 2010-03-26 Jeffrey Stedfast <fejj@novell.com>
1012 Fixes for bug #613653
1014 * gmime/gmime.c (g_mime_init): Initialize GMimeObject's type
1016 (g_mime_shutdown): Shut it down here.
1018 * gmime/gmime-object.c (g_mime_object_type_registry_init): Renamed
1019 a bit and fixed to not use g_atexit(). Also made internal-public.
1020 (g_mime_object_type_registry_shutdown): Renamed and made
1021 internal-public. Also set type_hash to NULL after destroying it so
1022 that a re-init will work.
1023 (g_mime_object_register_type): Don't init the type system anymore.
1024 (g_mime_object_new): Same.
1025 (g_mime_object_new_type): Same here.
1027 2010-03-26 Jeffrey Stedfast <fejj@novell.com>
1029 Fixes for bug #598855
1031 * gmime/gmime-message.c (process_header): Return TRUE if we match
1033 (message_prepend_header): Don't drop MIME-Version headers.
1034 (message_append_header): Same.
1035 (message_set_header): Here too.
1036 (message_get_header): Only return the hard-coded "1.0" value for
1037 MIME-Version if it is not set on the header object.
1038 (message_remove_header): Allow the MIME-Version header to be
1040 (message_get_headers): Only write our own MIME-Version header if
1041 one isn't already set in the message headers.
1042 (message_write_to_stream): Same here.
1044 2010-02-12 Jeffrey Stedfast <fejj@novell.com>
1048 * configure.ac: Define ENABLE_SMIME if we find GpgMe.
1050 * gmime/gmime-pkcs7-context.c: #ifdef out the GpgMe logic if we
1051 are building without S/MIME support enabled.
1053 2010-02-07 Jeffrey Stedfast <fejj@novell.com>
1055 * README: Bumped version
1057 * configure.in: Bumped version to 2.5.1
1059 2010-01-31 Jeffrey Stedfast <fejj@novell.com>
1061 * src/uudecode.c (uudecode): Just use fopen() to open fout instead
1062 of using open() and then fdopen(). Fixes the code to work properly
1065 * gmime/gmime-encodings.h (GMIME_UUENCODE_LEN): Fixed to prevent
1066 possible buffer overflows.
1068 2010-01-30 Jeffrey Stedfast <fejj@novell.com>
1070 * configure.ac: Disabled strict-aliasing to work around subtle
1071 bugs generated by gcc 4.4 when optimizations are enabled.
1073 2010-01-30 Jeffrey Stedfast <fejj@novell.com>
1075 * gmime/gmime-iconv-utils.c (g_mime_iconv_strndup): Cleaned up the
1078 2010-01-17 Jeffrey Stedfast <fejj@novell.com>
1080 * gmime/gmime-filter-crlf.c (filter_filter): Fixed bug #606875 by
1081 not trying to skip multiple characters per pass thru the loop when
1082 encountering the first '.' of a possible '..' sequence.
1084 2010-01-12 Jeffrey Stedfast <fejj@novell.com>
1086 * gmime/gmime-utils.c (g_mime_utils_decode_8bit): Make sure to
1087 always increment inptr as we force-convert it to ascii. Thanks to
1088 Damian Pietras for finding this bug.
1090 2009-12-15 Jeffrey Stedfast <fejj@novell.com>
1092 * Released 2.5.0 - it's time to get this out there for people to
1095 2009-11-30 Jeffrey Stedfast <fejj@novell.com>
1097 * configure.ac: Don't include EXTRA_LIBS in GMIME_LIBS, instead
1098 add it to GMIME_LIBS_PRIVATE so that things properly expand in the
1101 * gmime.pc.in: Moved -lz -lnsl, etc into Libs.private. Fixes bug
1104 2009-11-05 Jeffrey Stedfast <fejj@novell.com>
1106 * gmime/gmime-multipart.c (ptr_array_insert): Fixed to handle an
1107 index larger than the current array length as well as fixing the
1108 true insert case to shift items when index is les than the current
1109 array length (as opposed to when it is equal-to). Thanks to
1110 harven@gingers.rulez.pl for finding this bug.
1112 2009-10-10 Jeffrey Stedfast <fejj@novell.com>
1114 * gmime/gmime-utils.c: Fixed the military timezone offsets.
1116 * gmime/gmime-encodings.c (g_mime_encoding_uudecode_step): Fixed a
1117 uudecoding bug when uulen % 3 is 2. Thanks to Peter Hartley. Fixes
1120 2009-10-01 Jeffrey Stedfast <fejj@novell.com>
1122 * gmime/gmime-part.c (mime_part_encode): Shortcut if the currently
1123 set encoding is within the acceptable constraints.
1125 * docs/reference/gmime-sections.txt: Updated.
1127 * mono/gmime-api.raw: Updated.
1129 2009-10-01 Jeffrey Stedfast <fejj@novell.com>
1131 * gmime/gmime-filter-best.h: Moved GMimeEncodingConstraint to
1134 * gmime/gmime-object.c (g_mime_object_encode): New method to
1135 calculate and set the best Content-Transfer-Encoding on a mime
1136 part and its children.
1138 * gmime/gmime-part.c (mime_part_encode): Use a GMimeFilterBest to
1141 * gmime/gmime-message.c (message_encode): Encode our toplevel mime
1144 * gmime/gmime-multipart.c (multipart_encode): Recurse over our
1145 children and encode them.
1147 * gmime/gmime-multipart-signed.c (multipart_signed_encode):
1148 Prevent our base class implementation from iterating over our
1151 2009-09-30 Jeffrey Stedfast <fejj@novell.com>
1153 * build/vs2008/*: Made the Project/Solution tree much nicer.
1155 * gmime/gmime-stream-gio.c: various warning fixes.
1156 (set_errno): Fixes to build on Windows.
1157 (gio_seekable_bound_end): This needs to return gint64, not
1160 * tests/test-streams.c: Use GDir instead of POSIX's dirent API and
1161 also conditionally disable mmap tests.
1163 * tests/test-mbox.c: Use GDir instead of POSIX's dirent API to aid
1164 in portability to Windows.
1166 2009-09-03 Jeffrey Stedfast <fejj@novell.com>
1168 * mono/gmime-sharp.dll.config.in: Simply target
1169 libgmime-@GMIME_API_VERSION@.so since we are now properly
1170 versioning libgmime-2.6.so
1172 2009-08-12 Jeffrey Stedfast <fejj@novell.com>
1174 * gmime/gmime-utils.c (charset_convert): If iconv() fails, treat
1175 conditions where outleft == 0 the same as if we had gotten an
1176 E2BIG error (e.g. we need to grow the output buffer) so that we
1177 don't overrun it while appending a '?' placeholder character.
1179 2009-07-04 Jeffrey Stedfast <fejj@novell.com>
1181 * configure.ac: Check for GpgME needed for S/MIME support.
1183 * gmime/Makefile.am: Include gmime-pkcs7-context.[c,h] in the
1186 * gmime/gmime-pkcs7-context.[c,h]: New source files implementing
1187 the pkcs7 cipher context using GpgMe.
1189 2009-07-04 Jeffrey Stedfast <fejj@novell.com>
1191 * gmime/gmime-gpg-context.c (gpg_ctx_parse_signer_info): Updated
1192 for API changes to the GMimeSigner stuff.
1194 * gmime/gmime-cipher-context.c (g_mime_signer_new): Initialize the
1196 (g_mime_signer_free): Free the newly added fields.
1197 (g_mime_signer_set_issuer_serial): New field accessor.
1198 (g_mime_signer_get_issuer_serial): Same.
1199 (g_mime_signer_set_issuer_name): Another new accessor.
1200 (g_mime_signer_get_issuer_name): Same.
1201 (g_mime_signer_set_email): And another...
1202 (g_mime_signer_get_email): Same.
1203 (g_mime_signer_set_sig_created): Renamed from
1204 g_mime_signer_set_created().
1205 (g_mime_signer_get_sig_created): Renamed from
1206 g_mime_signer_get_created().
1207 (g_mime_signer_set_sig_expires): Renamed from
1208 g_mime_signer_set_expires().
1209 (g_mime_signer_get_sig_expires): Renamed from
1210 g_mime_signer_get_expires().
1211 (g_mime_signer_set_key_created): New field accesor.
1212 (g_mime_signer_get_key_created): Same.
1213 (g_mime_signer_set_key_expires): Same.
1214 (g_mime_signer_get_key_expires): Same.
1216 2009-07-02 Stanislav Brabec <sbrabec@suse.cz>
1218 * configure.ac: Simplified configuring of gmime in a
1219 cross-compilation environment. Make it possible to work-around
1220 AC_TRY_RUN limitations by copying of target system iconv-detect.h
1221 and setting ac_cv_have_iconv_detect_h=yes.
1223 2009-05-07 Jeffrey Stedfast <fejj@novell.com>
1225 * gmime/gmime-stream-fs.c (stream_read): Removed gross hack.
1226 (stream_write): Same.
1227 (g_mime_stream_fs_new): On Windows systems, set the translation
1229 (g_mime_stream_fs_new_with_bounds): Same.
1231 * gmime/gmime-stream-file.c: Same as GMimeStreamFs
1233 2009-05-02 Jeffrey Stedfast <fejj@novell.com>
1235 * gmime/gmime-stream-buffer.c (stream_seek_cache_read): Fixed a
1236 64bit cleanliness issue.
1237 (stream_seek_cache_read): Cap the max cache size to G_MAXSIZE.
1239 2009-04-30 Jeffrey Stedfast <fejj@novell.com>
1241 * gmime/gmime-filter-best.h: Renamed GMimeBestEncoding to
1242 GMimeEncodingConstraint to make this enum more clear as to what
1243 it's intended purpose is.
1245 * gmime/gmime-part.c: Updated.
1247 2009-04-29 Sankar P <sankar.curiosity@gmail.com>
1249 * gmime.doap: Added new doap file to describe the project.
1251 2009-04-29 Jeffrey Stedfast <fejj@novell.com>
1253 * gmime/gmime-events.[c,h]: Don't require a GObject owner.
1255 * gmime/gmime-message.c (g_mime_message_set_mime_part): Add a
1256 mime_part_headers_changed listener.
1257 (g_mime_message_finalize): Remove the listener.
1258 (mime_part_headers_changed): Uncache the message header stream.
1259 (message_get_headers): Removed hack.
1260 (message_write_to_stream): Same.
1262 * gmime/gmime-header.c (g_mime_header_list_set_stream): Emit a
1264 (g_mime_header_iter_set_value): Call set_stream() instead of
1265 setting the stream to NULL ourselves. Also causes a changed event
1267 (g_mime_header_list_prepend): Same.
1268 (g_mime_header_list_append): Here too.
1269 (g_mime_header_list_set): And here.
1270 (g_mime_header_list_remove): Same.
1272 2009-04-28 Jeffrey Stedfast <fejj@novell.com>
1274 * gmime/gmime-part.c (g_mime_part_get_best_content_encoding): New
1275 helper function to calculate the most efficient
1276 Content-Transfer-Encoding for a given mime-part.
1278 2009-04-28 Jeffrey Stedfast <fejj@novell.com>
1280 * build/vs2008/config-win32.h.in: No longer has GMIME_*_VERSION
1281 defines - these are all in gmime-version.h now.
1283 * gmime/gmime-version.h.in: New template for generating
1286 * gmime/gmime.h: #include gmime-version.h
1288 * configure.ac: Renamed from configure.in. Now generates a
1289 gmime/gmime-version.h header which contains a macro for checking
1290 the GMime version at compile-time. Requested feature from the
1293 2009-04-26 Jeffrey Stedfast <fejj@novell.com>
1295 * tests/test-streams.c: Updated to test GIO streams.
1297 * gmime/gmime-stream-gio.c: New GMimeStream wrapper around GIO
1300 2009-04-26 Jeffrey Stedfast <fejj@novell.com>
1302 * gmime/gmime-session*.[c,h]: Removed.
1304 * gmime/gmime-stream-pipe.[c,h]: New stream for pipes (where
1305 seeking isn't allowed). Needed by GMimeGpgContext.
1307 * gmime/gmime-gpg-context.c: Updated to use the new request_passwd
1308 callback function instead of the GMimeSession.
1309 (g_mime_gpg_context_set_auto_key_retrieve): New function for
1310 disabling the auto-key-retrieve functionality of gpg.
1311 (g_mime_gpg_context_get_auto_key_retrieve): New function to get
1312 the state of auto-key-retrieve enabledness.
1314 * gmime/gmime-cipher-context.[c,h]: No longer references a
1315 GMimeSession. Instead, we now have a GMimePasswordRequestFunc used
1316 for prompting the user.
1318 2009-04-26 Jeffrey Stedfast <fejj@novell.com>
1320 * gmime/gmime-multipart-encrypted.c: Removed stub virtual method
1321 overloads that did nothing but call the base class'
1324 * gmime/gmime-multipart-signed.c: Same.
1326 * gmime/gmime-message-part.c (message_part_prepend_header):
1327 Protect against setting Content-MD5 header since this is not
1329 (message_part_append_header): Same.
1330 (message_part_get_header): Don't bother checking that the
1331 requested header begins with "Content-", just pass it along to our
1332 base class implementation to worry about.
1333 (message_part_remove_header): Same.
1335 * gmime/gmime-message-partial.c (message_partial_get_header):
1337 (message_partial_remove_header): Here too.
1339 * gmime/gmime-part.c (mime_part_remove_header): Same.
1341 2009-04-25 Jeffrey Stedfast <fejj@novell.com>
1343 * gmime/gmime-message-partial.c (g_mime_message_partial_split_message):
1344 Fixed to use gint64 variables for stream length/offsets.
1346 2009-04-25 Jeffrey Stedfast <fejj@novell.com>
1348 * gmime/gmime-object.c (g_mime_object_set_disposition): Unref the
1349 disposition after setting it on the GMimeObject, don't ref it
1352 * gmime/gmime-message.c (to_list_changed, cc_list_changed):
1353 (bcc_list_changed): Fixed callback signatures. Oops.
1355 * gmime/gmime-events.c: Fixed list traversal. What was I thinking
1358 2009-04-25 Jeffrey Stedfast <fejj@novell.com>
1360 * gmime/gmime-parse-utils.h: Marked APIs as internal linkage only.
1362 * gmime/gmime-common.h: Same.
1364 * gmime/gmime-content-type.c: Use the new GMimeEvent API instead
1365 of libgobject's g_signal API which is more than we need.
1367 * gmime/gmime-disposition.c: Same.
1369 * gmime/gmime-object.c: Updated to use the GMimeEvent API for
1370 content-type and content-disposition.
1372 * gmime/internet-address.c: Use the new GMimeEvent API instead of
1375 * gmime/gmime-events.[c,h]: New source files implementing a simple
1376 and performant event system needed internally within GMime. Based
1377 on the event system that used to be in internet-address.c
1379 2009-04-24 Jeffrey Stedfast <fejj@novell.com>
1381 * gmime/gmime-parser.c (struct _GMimeParserPrivate): Added
1382 message_headers_begin/end and changed the meaning of
1383 headers_begin/end to be for the current MIME part rather than for
1384 the current message itself.
1385 (g_mime_parser_init): Init the boolean state variables before
1386 calling parser_init() so that parser_init() can use them.
1387 (parser_init): Only create a rawbuf if our stream isn't seekable
1388 or isn't persistent. Initialize our new message_headers_begin/end.
1389 (g_mime_parser_set_persist_stream): If our persist mode has
1390 changed, malloc or free our rawbuf.
1391 (raw_header_append): Don't append any data if rawbuf is NULL (this
1392 means we're keeping track of offsets instead).
1393 (parser_step_headers): Always update headers_begin/end since we
1394 now always want to keep track of all header begin/end offsets.
1395 (parser_step): Update our message_headers_begin/end state.
1396 (parser_scan_message_part): Set the mime-part's raw header stream
1398 (parser_construct_message): Same.
1399 (parser_construct_leaf_part): Substream the input stream to get
1400 our raw header stream to set on the mime-part's header-list.
1401 (parser_construct_multipart): Same.
1403 * gmime/gmime-header.c (struct _GMimeHeaderList): Instead of
1404 having a string buffer holding the raw header block content,
1405 instead keep a stream. This not only makes it easy for us to keep
1406 track of what the header offsets on disk are should the developer
1407 want to know, but it also means we don't necessarily have to use
1408 duplicate the header block to memory.
1409 (g_mime_header_list_set_stream): New function that replaces the
1410 old g_mime_header_list_set_raw() and looks much cleaner.
1411 (g_mime_header_list_get_stream): New function to access said
1414 * gmime/gmime-message.c: Fixed uses of
1415 g_mime_header_list_set/has_raw().
1416 (g_mime_message_set_mime_part): Set the message's raw header
1419 * gmime/gmime-multipart.c: Same.
1421 * tests/test-parser.c (test_parser): Updated.
1423 2009-04-24 Jeffrey Stedfast <fejj@novell.com>
1425 * build/vs2008/config-win32.h.in: New template to replace
1426 config.h.win32 so that the version info gets autogenerated when I
1427 make a new release. Makes it easier for me to keep it in sync.
1429 * build/vs2008/gmime.vcproj: No longer defines the gmime version
1430 variables on the command-line (as these are now part of config.h).
1432 2009-04-23 Jeffrey Stedfast <fejj@novell.com>
1434 * branched: now begins 2.5.x development
1436 * configure.in: Updated.
1438 * zentimer.h: Updated to hopefully build on Windows.
1440 * gmime/Makefile.am: Rename lib name to gmime-2.6.
1442 * gmime.pc.in: Renamed from gmime-2.4.pc.in.
1444 * mono/gmime-sharp.pc.in: Renamed from gmime-sharp-2.4.pc.in.
1446 * gmime/gmime-stream*.[c,h] (stream_length): Fixed to return a gint64
1448 2009-04-09 Jeffrey Stedfast <fejj@novell.com>
1450 * README: Bumped version
1452 * configure.in: Bumped version to 2.4.6
1454 2009-04-05 Jeffrey Stedfast <fejj@novell.com>
1456 * gmime/gmime-encodings.c (g_mime_encoding_uudecode_step): Fixed a
1457 bug wrt updating uulen when the data isn't an exact multiple of 3.
1459 * src/uuencode.c (uuencode): Don't bother dup()ing the stdout fd, just
1460 use set_owner(FALSE) so that it doesn't close when we destroy the stream
1463 * gmime/gmime-stream-file.c (stream_read, stream_write): Don't depend on
1464 simple arithmetic to update our stream->position on Windows since it
1465 may do line-ending translation behind our backs. Call ftell() to get
1466 our real position after reading or writing.
1468 * gmime/gmime-stream-fs.c (stream_read, stream_write): Same idea.
1470 * gmime/gmime-utils.c (mktime_utc): Fixed the Windows code-path.
1471 (charset_convert): In the Windows case, fake the E2BIG error condition
1472 if outleft <= inleft on any error as errno doesn't seem to get
1473 properly set in this case.
1475 * tests/test-headers.c: Removed unused headers to fix the build on
1478 2009-04-04 Jeffrey Stedfast <fejj@novell.com>
1480 * gmime/gmime-stream-fs.c: Ported to Windows by #including io.h
1482 * examples/basic-example.c: Reverted to the old GMimeStreamFs logic
1483 and #included io.h for G_OS_WIN32 systems.
1485 * examples/imap-example.c: Ported to Windows by #including io.h and
1486 using g_ascii_strcasecmp().
1488 2009-04-03 Jeffrey Stedfast <fejj@novell.com>
1490 * build/vs2008: New directory for Visual Studio 2008 Solution & Project
1493 * gmime.vcproj: Moved to build/vs2008
1495 * config.h.win32: Same.
1499 * examples/basic-example.c: Fixed to build under Visual Studio by
1500 using GMimeStreamFile instead of GMimeStreamFs and by #ifdef'ing
1503 * tests/testsuit.[c,h]: Fixed to compile under Visual Studio which
1504 basically means we can't use _try() as a function. Renamed to g_try().
1505 Also renamed throw() to g_throw() for consistency.
1507 2009-04-02 Jeffrey Stedfast <fejj@novell.com>
1509 * tests/testsuite.c: Modified to compile without the need for
1512 * gmime.vcproj: Added logic to the PreBuild step to copy
1513 config.h.win32 to config.h
1515 * config.h.win32: Added.
1517 2009-04-01 Jeffrey Stedfast <fejj@novell.com>
1519 * gmime/gmime-utils.c: #include <process.h> for getpid() and ws2tcpip.h
1520 for getaddrinfo() on Windows platforms.
1521 (mktime_utc): Use _get_timezone() when building on Windows.
1522 (g_mime_utils_header_format_date): Windows has gmtime_s() instead
1523 of gmtime_r(), so use that on Windows.
1525 * gmime/gmime-parser.c: If glib is >= 2.14, use GRegex instead of
1528 2009-04-01 Jeffrey Stedfast <fejj@novell.com>
1530 * gmime/gmime-utils.c: Need to #include <unistd.h> for getpid().
1532 * gmime/gmime-stream-fs.c: Need to #include <unistd.h> here.
1534 * gmime/gmime-multipart-signed.c: Got rid of an unused variable.
1536 * gmime/gmime-message.c: Removed unused variables.
1538 * gmime/gmime-content-type.c: Don't need to #include
1539 "gmime-table-private.h" here as we don't actually use it.
1541 * util/gtrie.c: Disable g_warning()'s when compiled w/o
1542 --enable-warnings and also fixed some compile warnings.
1544 2009-03-31 Jeffrey Stedfast <fejj@novell.com>
1546 * gmime.sln: New Microsoft Visual Studio 2008 Solution file for GMime.
1548 * gmime.vcproj: New Microsoft Visual C++ Project file for GMime.
1550 2009-03-31 Jeffrey Stedfast <fejj@novell.com>
1552 * gmime/gmime-utils.c: Removed unneeded #include <unistd.h>
1554 * configure.in: Check for unistd.h
1556 * gmime/gmime-multipart.c (read_random_pool): Implement using
1557 rand() in the case that unistd.h is not available.
1559 * gmime/gmime-parser.c (parser_scan_content): Fixed 'crlf'
1560 argument to be a guint to make it easier to avoid compile warnings
1561 about comparison between signed/unsigned ints in the callers.
1563 * gmime/internet-address.c (internet_address_group_add_member):
1564 Fixed g_return macros to return a value.
1565 (internet_address_mailbox_get_addr): Same.
1567 2009-03-30 Jeffrey Stedfast <fejj@novell.com>
1569 * configure.in: Check for regex.h
1571 * gmime/gmime-parser.c: #ifdef out the regex functionality if the
1572 system does not have regex.h
1574 * gmime/gmime-stream-fs.h: Don't #include <unistd.h> here.
1576 * gmime/gmime-stream.h: Removed #include <unistd.h> as it isn't
1579 * gmime/gmime-part.c: Removed unused includes.
1581 * gmime/gmime-utils.c: Only #include <sys/utsname.h> if we have
1582 utsname.domainname. Helps build process on Windows.
1584 2009-03-29 Jeffrey Stedfast <fejj@novell.com>
1586 * README: Bumped version
1588 * configure.in: Bumped version to 2.4.5
1590 2009-03-27 Jeffrey Stedfast <fejj@novell.com>
1592 * gmime/gmime-stream-buffer.c: Fixed to be more diligent in setting
1595 * gmime/gmime-stream-mmap.c: Fixed to be more diligent in setting
1598 * gmime/gmime-stream-mem.c: Fixed to be more diligent in setting
1600 (stream_seek): If the user seeks beyond the end of the buffer and
1601 bound_end is unbound, then grow the buffer (e.g. a sparse file).
1603 * gmime/gmime-stream-file.c: Fixed to be more diligent in setting
1606 * gmime/gmime-stream-fs.c: Fixed to be more diligent in setting
1609 2009-03-20 Jeffrey Stedfast <fejj@novell.com>
1611 * configure.in: Default --enable-largefile to yes. Looks like I
1612 forgot to do this before rolling the version to 2.4.0 like I
1615 * tools/Makefile.am: Fixed to include the porting script in
1616 EXTRA_DIST (instead of extra_DIST) so that the tarball includes
1619 2009-03-18 Jeffrey Stedfast <fejj@novell.com>
1621 * README: Bumped version
1623 * configure.in: Bumped version to 2.4.4
1625 2009-03-18 Jeffrey Stedfast <fejj@novell.com>
1627 * configure.in: Check for select() and poll() as well as poll.h
1629 * gmime/gmime-gpg-context.c (poll): Implement our own poll()
1630 function using select() for portability to MacOS 10.2, which
1631 apparently doesn't have poll().
1633 2009-02-22 Jeffrey Stedfast <fejj@novell.com>
1635 * gmime/gmime-utils.c: Use GSlice for rfc822 word tokens and date
1638 * gmime/gmime-parser.c: Updated to use GSlice.
1640 2009-02-22 Jeffrey Stedfast <fejj@novell.com>
1642 * gmime/gmime-header.c (g_mime_header_iter_new): Use
1644 (g_mime_header_iter_free): Use g_slice_free().
1645 (g_mime_header_list_new): Use g_slice_new().
1646 (g_mime_header_list_destroy): Use g_slice_free().
1648 * gmime/gmime-gpg-context.c (gpg_ctx_new): Use g_slice_new().
1649 (gpg_ctx_free): Use g_slice_free().
1651 * gmime/gmime-cipher-context.c (g_mime_signer_new): Use
1652 g_slice_new() instead of g_new().
1653 (g_mime_signature_validity_new): Same.
1654 (g_mime_signature_validity_free): Use g_slice_free().
1655 (g_mime_signer_free): Same.
1657 2009-02-07 Jeffrey Stedfast <fejj@novell.com>
1659 * gmime/internet-address.c: Removed some unused macros.
1661 2009-01-12 Jeffrey Stedfast <fejj@novell.com>
1663 * mono/Makefile.am: Fixed to parallel make install, thanks to
1664 Diego Pettenò. Fixes bug #567549.
1666 2009-01-09 Jeffrey Stedfast <fejj@novell.com>
1668 * examples/imap-example.c (write_part): Don't unref the stream we
1669 get from g_mime_data_wrapper_get_stream().
1670 (reconstruct_part_content): Fixed error-checking.
1672 2008-11-01 Jeffrey Stedfast <fejj@novell.com>
1674 * gmime/gmime-parser.c (nearest_pow): Implement using asm on i386
1675 - this code path isn't normally built, but it's fun to
1676 micro-optimize anyway ;-)
1678 * gmime/gmime-gpg-context.c (status_backup): Use next_alloc_size()
1679 macro - same as gmime-parser.c
1681 2008-10-22 Jeffrey Stedfast <fejj@novell.com>
1683 * README: Bumped version
1685 * configure.in: Bumped version to 2.4.3
1687 2008-10-22 Jeffrey Stedfast <fejj@novell.com>
1689 Fixes by Damian Pietras.
1691 * gmime/gmime-parser.c (check_boundary): Check that len > 0 before
1693 (header_parse): Fixed to handle headers with nothing but lwsp.
1695 2008-10-07 Jeffrey Stedfast <fejj@novell.com>
1697 * util/gtrie.c (g_trie_search): Instead of returning the first
1698 match, find instead the best match starting at the same starting
1699 offset (e.g. if we have two patterns "abc" and "abcdef" and the
1700 input buffer is "abcdefghi", we want to match "abcdef" rather than
1702 (g_trie_quick_search): Renamed from the old g_trie_search().
1704 2008-10-06 Jeffrey Stedfast <fejj@novell.com>
1706 * README: Bumped version
1708 * configure.in: Bumped version to 2.4.2
1710 2008-10-02 Jeffrey Stedfast <fejj@novell.com>
1712 * gtk-doc.make: More parallel-install fixes so that devhelp
1713 actually works. Patch to gtk-doc.make submitted upstream.
1715 2008-10-02 Jeffrey Stedfast <fejj@novell.com>
1717 Fixes for bug #554830
1719 * mono/Makefile.am: Don't hard-code the API version.
1721 * mono/gmime-sharp-2.4.pc.in: Fixed incorrect path to include the
1724 * gmime-2.4.pc.in: Similar fixes.
1726 * configure.in: Define GMIME_API_VERSION
1728 2008-10-02 Jeffrey Stedfast <fejj@novell.com>
1730 * README: Bumped version
1732 * configure.in: Bumped version to 2.4.1
1734 2008-10-02 Jeffrey Stedfast <fejj@novell.com>
1736 * gtk-doc.make: Allow for a versioned install of the
1737 gtk-docs. Completes the fix for bug #554121.
1739 * docs/reference/Makefile.am: Define a DOC_MODULE_VERSION
1741 * mono/Makefile.am: Fix PACKAGE_SHARP to be versioned. Partial fix
1744 * gmime/gmime-parser.c: Made the headerbuf allocator a little less
1745 liberal in the amount it allocates.
1747 2008-09-25 Jeffrey Stedfast <fejj@novell.com>
1749 * gmime/gmime-stream.c (stream_length): Implemented a default
1750 solution using g_mime_stream_seek().
1752 2008-09-25 Jeffrey Stedfast <fejj@novell.com>
1754 * README: Bumped version
1756 * configure.in: Bumped version to 2.4.0
1758 2008-09-18 Jeffrey Stedfast <fejj@novell.com>
1760 * gmime/gmime-utils.c (g_mime_utils_header_decode_text): Check if
1761 rfc2047-workarounds has been enabled at runtime.
1763 * gmime/gmime.h (GMIME_ENABLE_RFC2047_WORKAROUNDS): New
1764 g_mime_init() flag so that a programmer can enable rfc2047
1765 workarounds at runtime.
1767 * gmime/gmime.c (g_mime_init): Save the init flags.
1769 * gmime/internet-address.c (internet_address_group_set_members):
1770 Add an event listener to the new members, not the unref'd old
1771 member list. Thanks to Peter Bloomfield for spotting this.
1773 2008-09-18 Jeffrey Stedfast <fejj@novell.com>
1775 * gmime/gmime.c (g_mime_init): Register all of our GObject types
1776 with the glib type system so that there's less risk of a
1777 race-condition in multi-threaded applications (not sure if this is
1778 a justifiable concern or not, but it doesn't hurt).
1780 2008-09-15 Jeffrey Stedfast <fejj@novell.com>
1782 * gmime/gmime-message.c: Use the new InternetAddressList event
1785 * gmime/internet-address.c: Implemented a custom event system
1786 which gains us another 20% performance improvement.
1788 2008-09-14 Jeffrey Stedfast <fejj@novell.com>
1790 * gmime/gmime-object.c (g_mime_object_get_type): Register this
1791 class as being abstract.
1793 * gmime/gmime-filter.c (g_mime_filter_get_type): Register this
1794 class as being abstract.
1796 * gmime/gmime-stream.c (g_mime_stream_get_type): Register this
1797 class as being abstract.
1799 * gmime/internet-address.c (decode_mailbox): Pass name->len to
1800 g_utf8_validate() rather than -1 since we have the length. Might
1801 save us some cycles.
1802 (internet_address_get_type): Register this class as being
1805 * gmime/gmime-parser.c (parser_init): Initialize the headerbuf and
1806 rawbuf buffers to something more reasonable.
1808 2008-09-14 Jeffrey Stedfast <fejj@novell.com>
1810 * README: Bumped version
1812 * configure.in: Bumped version to 2.3.10
1814 2008-09-13 Jeffrey Stedfast <fejj@novell.com>
1816 Epic optimization hack-a-thon which resulted in another ~5%
1817 performance improvement.
1819 * gmime/gmime-message.c (g_mime_message_init): Instead of using a
1820 hash table for our recipients table, simply use an array since we
1821 can easily look them up using the GMimeRecipientType as an array
1822 index. Eliminates unnecessary memory and, most importantly,
1823 performance overhead.
1824 (message_add_recipients_from_string): Optimized quite a bit by
1825 using the new internet_address_list_append/prepend functions.
1827 * gmime/gmime-utils.c (decode_addrspec): Updated for
1828 g_mime_decode_domain() changes.
1830 * gmime/gmime-parse-utils.c (g_mime_decode_domain): Changed the
1831 API a bit to prevent the need for string duplication/g_free
1832 overhead in our callers.
1834 * gmime/gmime-parser.c (parser_fill): Keep track of the stream
1837 * gmime/internet-address.c (internet_address_list_append): Renamed
1838 from internet_address_list_concat() and optimized slightly.
1839 (internet_address_list_prepend): New function that prepends the
1840 contents of a list to another list.
1841 (_internet_address_set_name): New internal function which avoids
1842 emitting a "changed" event in an attempt to enhance the
1843 performance of internet_address_list_parse().
1844 (_internet_address_list_add): Same idea as
1845 _internet_address_set_name(), but also takes ownership of the
1846 InternetAddress' ref to avoid unnecessary ref/unref overhead.
1847 (internet_address_mailbox_new): Instead of calling
1848 internet_address_mailbox_set_addr(), set it manually to avoid a
1850 (internet_address_group_new): Call _internet_address_set_name() to
1851 avoid signal emission.
1852 (internet_address_group_add_member): Now returns the index of the
1854 (decode_mailbox): Avoid string duplication of the addrspec token,
1855 use the new g_mime_decode_domain() API to avoid unnecessary
1856 strdup/g_free overhead, and use _internet_address_set_name().
1857 (decode_address): Don't need to unref members anymore as the lists
1858 we add them to take ownership of the refs.
1860 2008-09-12 Jeffrey Stedfast <fejj@novell.com>
1862 I/O Optimization which improved performance by ~5%
1864 * gmime/gmime-parser.c (parser_fill): Now takes an 'atleast'
1865 argument which we use to decide whether we should bother calling
1866 read() or not. If we have more than 'atleast' bytes left in our
1867 buffer, we don't read.
1868 (parser_scan_content): Take advantage of the 'atleast' argument to
1870 (parser_step_headers): Same.
1871 (parser_step_from): Here too.
1872 (parser_skip_line): And here.
1874 2008-09-08 Jeffrey Stedfast <fejj@novell.com>
1876 * gmime/gmime-message.c (message_add_recipients_from_string):
1877 Prepend, append, or set the addresses in the recipients list
1878 depending on the new 'action' argument.
1879 (process_header): Pass along our 'action' to
1880 message_add_recipients_from_string().
1881 (message_prepend_header): Pass PREPEND as the action argument to
1883 (message_append_header): Pass APPEND as the action argument to
1885 (message_set_header): Pass SET as the action argument to
1888 * gmime/gmime-header.c (g_mime_header_list_set): If there is more
1889 than a single header with the specified name, remove them.
1891 2008-09-07 Jeffrey Stedfast <fejj@novell.com>
1893 * util/memchunk.[c,h]: Removed. No longer used.
1895 2008-09-07 Jeffrey Stedfast <fejj@novell.com>
1897 * README: Bumped version
1899 * configure.in: Bumped version to 2.3.9
1901 2008-09-07 Jeffrey Stedfast <fejj@novell.com>
1903 New feature needed by the Bongo project (seems DBMail could also
1904 use this feature as they currently have a hack-around).
1906 * tests/test-mbox.c: Output header offsets as well so that they
1909 * gmime/gmime-parser.c (g_mime_parser_get_headers_begin): New
1910 function to get the beginning offset of the message headers.
1911 (g_mime_parser_get_headers_end): Same, but for the end offset.
1912 (parser_step_headers): Only set priv->headers_begin and
1913 priv->headers_end if they are set to -1, we don't want to
1914 overwrite this value if parsing a subpart.
1915 (parser_step): Reset priv->headers_begin and priv->headers_end
1918 2008-09-07 Jeffrey Stedfast <fejj@novell.com>
1920 * gmime/gmime-charset.c (g_mime_charset_map_init): Create the
1921 iconv_charsets hashtable using g_hash_table_new_full() so that we
1922 don't have to call g_hash_table_foreach() before destroying it in
1923 g_mime_charset_map_shutdown().
1925 * gmime/gmime-gpg-context.c: Use g_hash_table_new_full() so that
1926 we don't have to g_hash_table_foreach() to remove all user-id
1927 hints before destroying the user-id hint hashtable.
1929 * util/cache.c: Updated to use GSlice instead of a custom MemChunk
1932 * util/gtrie.c: Updated to use GSlice instead of my custom
1933 MemChunk. The main purpose for using the MemChunk allocator had
1934 been ease of cleanup, but it made it more difficult to use GTrie
1937 * examples/basic-example.c: Updated for the foreach() changes.
1939 * gmime/gmime-multipart.c (g_mime_multipart_foreach): Changed to
1940 be recursive. The callback function signature has changed a bit to
1941 be more useful as well by providing the parent MIME object.
1943 * gmime/gmime-message.c (g_mime_message_foreach): Same.
1945 2008-09-06 Jeffrey Stedfast <fejj@novell.com>
1947 * gmime/gmime-multipart.c (g_mime_multipart_get_subpart_from_content_id):
1948 Multiparts can have Content-Id's too.
1950 2008-09-06 Jeffrey Stedfast <fejj@novell.com>
1952 * gmime/gmime-part.c (g_mime_part_set_content_object): Made
1953 virtual, seems like it could be useful.
1955 * gmime/gmime-object.c (set_content_type): Do not serialize the
1956 GMimeContentType object to the headers. This is done elsewhere
1958 (g_mime_object_set_content_type): After calling the virtual
1959 set_content_type(), serialize the GMimeContentType object to the
1962 * gmime/gmime-multipart-encrypted.c: Get rid of the protocol
1963 member variable, it's not needed.
1965 * gmime/gmime-multipart-signed.c: Get rid of the protocol and
1966 micalg member strings, these aren't needed - just request them
1967 from the content_type.
1969 * gmime/gmime-multipart.c: Get rid of boundary member variable, we
1970 can just request it from the ContentType object. No sense
1971 duplicating strings.
1973 * gmime/gmime-message.c (message_get_headers): Don't write out a
1974 MIME-Version header if a Content-Type header doesn't exist.
1976 * gmime/gmime-parser.c (parser_content_type): Instead of returning
1977 a GMimeContentType object, we now return a simpler ContentType
1978 struct so that we don't waste time processing more of the header
1979 than we need to, all we need is the type/subtype to figure out
1980 which MIME object type to instantiate.
1981 (parser_scan_message_part): After finishing parsing the object,
1982 destroy the content_type ourselves.
1983 (parser_construct_leaf_part): Updated. Don't set a
1984 GMimeContentType on the GMimeObject unless the Content-Type header
1985 doesn't exist (if it does exist, then appending the Content-Type
1986 header will cause one to be created and set on the GMimeObject).
1987 (parser_construct_multipart): Updated.
1989 * gmime/gmime-content-type.c (g_mime_content_type_new_from_string):
1990 Use the new g_mime_parse_content_type() utility function and set
1991 the parsed string values on the new GMimeContentType object
1992 directly to avoid unnecessary strdup()ing.
1994 * gmime/gmime-parse-utils.c (g_mime_parse_content_type): New
1995 function to parse the simple type/subtype Content-Type form.
1997 2008-08-31 Jeffrey Stedfast <fejj@novell.com>
1999 * README: Bumped version
2001 * configure.in: Bumped version to 2.3.8
2003 2008-08-31 Jeffrey Stedfast <fejj@novell.com>
2005 * mono/Multipart.custom: GMime.Multipart now implements the IList
2008 * gmime/gmime-message.c (g_mime_message_add_recipients_from_string):
2009 Removed. This function was a kludge - use
2010 g_mime_message_get_recipients() and then add recipients you have
2013 * gmime/gmime-multipart.c (g_mime_multipart_clear): New method.
2014 (g_mime_multipart_contains): Same.
2015 (g_mime_multipart_index_of): Same.
2017 2008-08-31 Jeffrey Stedfast <fejj@novell.com>
2019 * gmime/gmime-parser.c (parser_scan_multipart_subparts): Updated
2020 for GMimeMultipart API changes.
2022 * gmime/gmime-multipart-signed.c (sign_prepare): Updated for
2023 GMimeMultipart API changes.
2024 (g_mime_multipart_signed_sign): Same.
2026 * gmime/gmime-multipart-encrypted.c (g_mime_multipart_encrypted_encrypt):
2027 Updated for GMimeMultipart API changes.
2029 * gmime/gmime-multipart.c (g_mime_multipart_add): Renamed from
2030 g_mime_multipart_add_part(). The "_part" seemed superfluous.
2031 (g_mime_multipart_remove): Same.
2032 (g_mime_multipart_remove_at): Same.
2033 (g_mime_multipart_insert): Renamed from
2034 g_mime_multipart_add_part_at().
2035 (g_mime_multipart_get_count): Renamed to be more obvious.
2037 2008-08-31 Jeffrey Stedfast <fejj@novell.com>
2039 * gmime/gmime-message-partial.c (g_mime_message_partial_new): Need
2040 to unref the content_type after setting it on the object.
2042 * gmime/gmime-message-part.c (g_mime_message_part_new): Need to
2043 unref the content_type after setting it on the object.
2045 * gmime/gmime-multipart.c (g_mime_multipart_new): Need to unref
2046 the content_type after setting it on the object.
2047 (g_mime_multipart_new_with_subtype): Same.
2049 * gmime/gmime-multipart-signed.c (g_mime_multipart_signed_sign):
2050 Need to unref the content_type after setting it on the
2051 object. Also need to set mps->protocol /before/ we use it.
2053 * gmime/gmime-multipart-encrypted.c (g_mime_multipart_encrypted_new):
2054 Need to unref the content_type after setting it on the object.
2055 (g_mime_multipart_encrypted_encrypt): Same.
2057 * gmime/gmime-part.c (g_mime_part_new): Need to unref the
2058 content_type after setting it on the object.
2059 (g_mime_part_new_with_type): Same.
2060 (g_mime_part_set_content_header): Removed.
2061 (g_mime_part_get_content_header): Removed.
2062 (g_mime_part_set_filename): Don't need to pre-set a
2063 ContentDisposition on the object if it is NULL,
2064 g_mime_object_set_content_disposition_parameter() will do that for
2067 * gmime/gmime-parser.c (parser_construct_leaf_part): Instead of
2068 going around the GMimeObject's back to set the content_type, call
2069 g_mime_object_set_content_type().
2070 (parser_construct_multipart): Same.
2072 * gmime/gmime-object.c: Updated for GMimeContentType and
2073 ContentDisposition GObjectification.
2074 (g_mime_object_new): New function.
2076 * gmime/gmime-disposition.c: Subclass GObject.
2078 * gmime/gmime-content-type.c: Subclass GObject.
2080 * gmime/internet-address.c: Got rid of unneeded vfuncs for the
2081 changed event (which we don't want to be made public).
2083 2008-08-25 Jeffrey Stedfast <fejj@novell.com>
2085 Making GMime's object-returning APIs consistent with Gtk+ which do
2086 not ref returned objects.
2088 * tests/test-headers.c (test_header_sync): No longer need to unref
2089 the InternetAddressList object returned from
2090 g_mime_message_get_recipients().
2092 * tests/test-mbox.c (print_mime_struct): Since
2093 g_mime_multipart_get_part() no longer returns a ref'd object, no
2094 need to unref it once we're done with it.
2096 * gmime/gmime-multipart-encrypted.c (g_mime_multipart_encrypted_decrypt):
2097 Don't ref the returned decrypted part.
2099 * gmime/gmime-message-part.c (g_mime_message_part_get_message):
2100 Don't ref the returned message part.
2102 * gmime/gmime-data-wrapper.c (g_mime_data_wrapper_get_stream):
2103 Don't ref the returned stream.
2105 * gmime/gmime-part.c (g_mime_part_get_content_object): Don't ref
2106 the returned content object anymore.
2108 * gmime/gmime-multipart.c (multipart_get_part): No longer ref the
2110 (g_mime_multipart_get_subpart_from_content_id): Same.
2112 * gmime/gmime-message.c (g_mime_message_get_recipients): Don't ref
2114 (g_mime_message_get_mime_part): Don't ref the returned mime part
2117 * gmime/gmime-object.c (g_mime_object_get_content_type): Don't
2118 return const anymore. We want app devs to be able to manipulate
2119 the GMimeContentType directly.
2120 (g_mime_object_get_content_disposition): Same idea here.
2122 * gmime/internet-address.c (internet_address_group_get_members):
2123 Don't ref the members list anymore.
2124 (internet_address_list_get_address): Same.
2126 2008-08-24 Jeffrey Stedfast <fejj@novell.com>
2128 * tests/test-headers.c (test_header_sync): Check that changes to
2129 the GMimeContentType, GMimeDisposition, and InternetAddressList
2130 objects cause a re-sync of the GMimeObject/GMimeMessage headers.
2132 * gmime/internet-address.c (internet_address_list_add): Connect to
2133 the added address's changed signal. Exposed by my new test-suite
2135 (internet_address_list_insert): Assert index >= 0, not < 0.
2136 (internet_address_list_remove_at): Same.
2137 (internet_address_list_get_address): Same.
2138 (internet_address_list_set_address): Same.
2139 (internet_address_list_to_string): Return NULL if the list is
2140 empty. This makes it easier to keep the new behavior of keeping
2141 around InternetAddressList objects in GMimeMessage the same as the
2142 old behavior when all of the addresses have been removed.
2144 * gmime/gmime-disposition.c (g_mime_content_disposition_set_params):
2147 * gmime/gmime-content-type.c (g_mime_content_type_set_media_type):
2149 (g_mime_content_type_set_media_subtype): Another new function.
2150 (g_mime_content_type_set_params): New function.
2152 2008-08-19 Jeffrey Stedfast <fejj@novell.com>
2154 * gmime/gmime-message.c: Updated to listen to changed events from
2155 recipient lists and to update the headers when the lists change.
2157 * gmime/internet-address.c: InternetAddress is now GObject with a
2158 "changed" signal. Split out InternetAddressMailbox and
2159 InternetAddressGroup subclasses of
2160 InternetAddress. InternetAddressList is now also a GObject with a
2161 "changed" signal. These changes were made so that manipulating an
2162 InternetAddress[List] of recipients will auto-magically update
2163 GMimeMessage's corresponding recipient header.
2165 2008-08-18 Jeffrey Stedfast <fejj@novell.com>
2167 * gmime/gmime-message.c (g_mime_message_get_recipients): Now
2168 returns a ref'd version of the InternetAddressList. You must now
2169 unref the list when you are done with it.
2171 * tools/gmime-port-2-2-to-2-4.sh: Updated.
2173 * gmime/internet-address.c (internet_address_new_mailbox): Renamed
2174 from internet_address_new_name() to make it less ambiguous (and to
2175 use the terminology used in the RFC's).
2176 (internet_address_get_type): Now takes a const InternetAddress
2178 (internet_address_get_name): Same.
2179 (internet_address_get_addr): Same.
2180 (internet_address_get_members): Same, but now returns a ref'd
2181 InternetAddressList rather than a const InternetAddressList.
2182 (internet_address_list_ref): InternetAddressLists are now
2184 (internet_address_list_unref): Same.
2185 (internet_address_list_get_address): Now returns a ref'd copy of
2186 the InternetAddress at the index specified.
2188 2008-08-16 Jeffrey Stedfast <fejj@novell.com>
2190 * README: Bumped version
2192 * configure.in: Bumped version to 2.3.7
2194 2008-08-16 Jeffrey Stedfast <fejj@novell.com>
2196 Fixes to actually pass the test suite. D'oh!
2198 * gmime/gmime-message.c (process_header): Protect against passing
2199 a NULL list to internet_address_list_to_string().
2200 (g_mime_message_add_recipient): Create a new InternetAddressList
2201 if it doesn't already exist in the hash table.
2202 (message_add_recipients_from_string): Protect against passing a
2203 NULL list to internet_address_list_concat().
2205 * gmime/internet-address.c (_internet_address_list_to_string):
2206 Fixed the logic to avoid adding a ',' after the last email
2209 2008-08-16 Jeffrey Stedfast <fejj@novell.com>
2211 * README: Bumped version
2213 * configure.in: Bumped version to 2.3.6
2215 2008-08-16 Jeffrey Stedfast <fejj@novell.com>
2217 * mono/InternetAddressList.cs: Rewritten to be more awesome. Now
2220 * tools/gmime-port-2-2-to-2-4.sh: Updated.
2222 * gmime/gmime-message.c: Updated for InternetAddressList API
2225 * gmime/internet-address.c: Completely reworked the
2226 InternetAddressList API.
2227 (internet_address_list_parse_string): Renamed from
2228 internet_address_parse_string().
2230 2008-08-15 Jeffrey Stedfast <fejj@novell.com>
2232 * gmime/internet-address.c (decode_mailbox): Implemented a
2233 work-around for broken email addresses that have more than a
2234 single '.' between word tokens making up the local-part of an
2235 addr-spec. See Evolution bug #547969 for details.
2237 2008-08-07 Jeffrey Stedfast <fejj@novell.com>
2239 * gmime/gmime-message-part.c (g_mime_message_part_get_message):
2240 Only ref the message if it is non-NULL. Thanks to Peter Bloomfield
2243 2008-07-19 Jeffrey Stedfast <fejj@novell.com>
2245 * gmime/gmime-header.c (g_mime_header_iter_get_offset): Disable
2246 for now, currently it never gets set.
2248 2008-07-11 Jeffrey Stedfast <fejj@novell.com>
2250 * src/uudecode.c (uudecode): Don't base64 decode the
2251 end-tag ("====\n"). Fixes bug #542222.
2253 2008-07-08 Jeffrey Stedfast <fejj@novell.com>
2255 * COPYING: Fixed to reference LGPL v2.1
2257 * docs/reference/gmime-sections.txt: Updated.
2259 * gmime/gmime-header.c (g_mime_header_list_foreach): Added back
2260 since it's fairly simple and makes it easier for apps to be ported
2263 * gmime/gmime-message.h: Removed unused prototypes.
2265 * gmime/gmime-common.h: Same.
2267 2008-07-05 Jeffrey Stedfast <fejj@novell.com>
2269 * README: Bumped version
2271 * configure.in: Doltified and bumped version to 2.3.5
2273 2008-07-04 Jeffrey Stedfast <fejj@novell.com>
2275 * mono/Message.custom: Updated.
2277 * gmime/gmime-message.[c,h]: Make GMIME_RECIPIENT_TYPE_* string
2278 macros into an enum. Translate the enum into strings as
2279 appropriate internally.
2281 2008-07-04 Jeffrey Stedfast <fejj@novell.com>
2285 * gmime/gmime-message.c (g_mime_message_add_recipient): Change
2286 'type' argument to const char *.
2287 (g_mime_message_add_recipients_from_string): Same.
2289 2008-06-20 Jeffrey Stedfast <fejj@novell.com>
2291 * gmime/gmime-multipart.c (g_mime_multipart_remove_part): Fixed
2292 g_return macros to return bool instead of void.
2294 * gmime/gmime-cipher-context.c (g_mime_signer_get_errors): Fixed
2295 the function name to match the prototype name.
2297 * gmime/gmime-header.c (g_mime_header_list_remove): Fixed the
2298 g_return macros here too. Also need to make sure to return TRUE at
2299 the end of the function.
2301 * gmime/gmime-part.c (write_content): Don't unred filtered_stream
2302 if we haven't used it.
2304 * gmime/gmime-object.c (g_mime_object_remove_header): Fixed
2305 g_return macros, this function returns bool, not void.
2307 * gmime/gmime-gpg-context.c (gpg_ctx_parse_status): Get rid of
2310 2008-06-18 Jeffrey Stedfast <fejj@novell.com>
2312 * README: Bumped version
2314 * configure.in: Bumped version to 2.3.4
2316 2008-06-15 Jeffrey Stedfast <fejj@novell.com>
2318 * gmime/gmime-gpg-context.c (status_backup): Use the bitwise
2319 nearest_pow() implementation.
2321 2008-06-14 Jeffrey Stedfast <fejj@novell.com>
2323 * gmime/gmime-parser.c: When mallocing header/raw buffers, malloc
2324 a power-of-2 rather than a power-of-2 + 1. Also optimized the
2325 logic to calculate the amount of memory to realloc.
2327 2008-06-12 Jeffrey Stedfast <fejj@novell.com>
2329 * gmime/gmime-encodings.h (GMIME_QP_ENCODE_LEN): Add an extra byte
2330 for \n in the case of quoted_encode_close(). Thanks to Peter
2331 Bloomfield for discovering this.
2333 2008-06-08 Jeffrey Stedfast <fejj@novell.com>
2335 * gmime/gmime-gpg-context.c (gpg_ctx_parse_status): added
2336 constants for MD2, TIGER and HAVAL.
2338 2008-06-08 Jeffrey Stedfast <fejj@novell.com>
2340 * README: Bumped version
2342 * configure.in: Bumped version to 2.3.3
2344 * docs/reference/changes-2.4.sgml: Updated.
2348 2008-06-07 Jeffrey Stedfast <fejj@novell.com>
2350 * gmime/*.h: Finished documenting all of the structs. Now at 100%
2351 symbols documented! Woot!
2353 * gmime/gmime-multipart-signed.c (g_mime_multipart_signed_sign):
2354 Use the GMimeCipherHash returned from g_mime_cipher_context_sign()
2355 to create the micalg parameter value - this way if the requested
2356 hash was DEFAULT, we set the micalg to the proper value.
2358 * gmime/gmime-gpg-context.c (gpg_ctx_parse_status): Parse which
2359 hash algorithm was actually used by gpg.
2360 (gpg_hash_str): Updated to return strings for the new SHA
2361 algorithms added this past week.
2362 (gpg_sign): Return the hash algorithm actually used.
2364 * gmime/gmime-cipher-context.c (g_mime_cipher_context_sign): This
2365 method now returns -1 on fail or the GMimeCipherHash on success.
2367 2008-06-07 Jeffrey Stedfast <fejj@novell.com>
2369 * gmime/gmime-parse-utils.c (g_mime_decode_word): No longer
2370 returns a strdup'd string, this helps increase the performance of
2371 the address parser and reduces memory fragmentation.
2373 * gmime/gmime-utils.c (g_mime_references_decode): Updated for
2374 decode_word() changes.
2375 (decode_addrspec): Same.
2377 * gmime/internet-address.c (decode_mailbox): Make sure we don't
2378 stray beyond the end of the input string. Also updated for changes
2379 to decode_word() (which now returns a const string rather than a
2382 * gmime/gmime-header.c (g_mime_header_iter_is_valid): Fixed an FMR
2383 when the header the cursor is pointing to has been removed by
2384 validating the hdrlist version first.
2386 2008-06-06 Jeffrey Stedfast <fejj@novell.com>
2388 * README: Bumped version
2390 * configure.in: Bumped version to 2.3.2
2392 * gmime/*.[c,h]: Updated a bunch of gtk-doc documentation.
2394 2008-06-05 Jeffrey Stedfast <fejj@novell.com>
2396 * gmime/gmime-message.c (g_mime_message_get_date_as_string):
2397 Renamed from g_mime_message_get_date_string().
2398 (g_mime_message_set_date_as_string): New function to provide
2399 another means of setting a date (might help with some bindings
2400 where time_t and tz_offsets are more difficult to work with).
2402 * mono/GMime.metadata: Fixed MessagePartial.ReconstructMessage
2403 binding, thanks to Mike Kestner for helping me figure out the
2404 proper metadata kung-fu to achieve this.
2406 * gmime/gmime-object.c: Get rid of the 'init' class method,
2407 GObject already has an initializer (must be a leftover from before
2408 the port to GObject).
2409 (g_mime_object_new_type): Don't call GMimeObject->init(),
2410 g_object_new() has already initialized the object.
2412 * gmime/gmime-multipart.c (g_mime_multipart_remove_part): Now
2413 returns TRUE or FALSE.
2415 2008-06-04 Jeffrey Stedfast <fejj@novell.com>
2417 * tests/test-pgp.c (main): Test encrypt+sign and decrypt+verify as
2420 2008-06-03 Jeffrey Stedfast <fejj@novell.com>
2422 * tests/test-pgpmime.c: Updated to test for
2423 multipart/encrypted+sign
2425 * gmime/gmime-multipart-encrypted.c (g_mime_multipart_encrypted_encrypt):
2426 Changed to take 'sign' and 'userid' arguments so that it is
2427 possible to both sign and encrypt the content.
2428 (g_mime_multipart_encrypted_decrypt): Updated to save the
2429 GMimeSignatureValidity from our call ot
2430 g_mime_cipher_context_decrypt() so that callers can choose to get
2431 the signer validity (in the case where the encrypted part was also
2433 (g_mime_multipart_encrypted_get_signature_validity): New function.
2435 * gmime/gmime-gpg-context.c (gpg_decrypt): Updated to return a
2436 GMimeSignatureValidity.
2437 (gpg_ctx_parse_signer_info): Split out from gpg_ctx_parse_status()
2438 to parse signer info.
2439 (gpg_ctx_parse_status): Updated VERIFY mode to call
2440 gpg_ctx_parse_signer_info() and made DECRYPT also call it so that
2441 we properly collect signer info when the encrypted stream was also
2443 (gpg_encrypt): Respect the 'sign' argument.
2445 * gmime/gmime-cipher-context.c (g_mime_cipher_context_decrypt):
2446 Now returns a GMimeSignatureValidity in case the encrypted stream
2449 2008-06-02 Jeffrey Stedfast <fejj@novell.com>
2451 * gmime/gmime-message-partial.c (message_partial_message_new): Use
2452 an iter on the stack.
2454 * gmime/gmime-header.[c,h]: Changed iters again. Iters are now
2455 able to be allocated on the stack by making the struct public,
2456 however this means that they are more sensitive to changes in the
2457 HeaderList (e.g. all iters other than the one used to remove a
2458 header become invalid regardless of whether or not the header they
2459 refer to still exists).
2461 2008-06-01 Jeffrey Stedfast <fejj@novell.com>
2463 * gmime/gmime-header.c (g_mime_header_iter_new): New function to
2464 allocate an iter on the heap.
2465 (g_mime_header_iter_copy_to): New copy function so that you can
2466 copy to a pre-allocated destination iter.
2467 (g_mime_header_list_get_iter): Changed the API a bit. Instead of
2468 returning a newly allocated iter, instead return bool and take an
2469 iter arg to initialize.
2471 2008-06-01 Jeffrey Stedfast <fejj@novell.com>
2473 * tools/gmime-port-2-2-to-2-4.sh: New helper tool to port existing
2474 GMime 2.0 and 2.2 based applications over to GMime 2.4.
2476 * gmime/gmime-part.c: Updated for GMimeFilterCRLF changes.
2478 * gmime/gmime-multipart-signed.c: Updated for GMimeFilterCRLF
2481 * gmime/gmime-multipart-encrypted.c: Updated for GMimeFilterCRLF
2484 * gmime/gmime-filter-crlf.c (g_mime_filter_crlf_new): No longer
2485 takes 2 enum arguments, rather it now takes 2 bool arguments which
2486 makes the API simpler to understand.
2488 * gmime/gmime-filter-best.c (g_mime_filter_best_new): Changed the
2489 unsigned int flags argument to be an enum so developers could more
2490 easily figure out what the argument was.
2492 * gmime/gmime-param.c (g_mime_param_next): New helper function for
2494 (g_mime_param_get_name): Same.
2495 (g_mime_param_get_value): Same.
2497 2008-05-31 Jeffrey Stedfast <fejj@novell.com>
2499 * tests/test-html.c (main): Updated.
2501 * tests/test-best.c (main): Updated.
2503 * src/uuencode.c (uuencode): Updated.
2505 * gmime/gmime-part.c: Updated for filter stream change.
2507 * gmime/gmime-multipart-signed.c (g_mime_multipart_signed_sign):
2508 Updated for filter stream change.
2510 * gmime/gmime-multipart-encrypted.c: Updated for filter stream
2513 * gmime/gmime-gpg-context.c (gpg_ctx_new): Updated for filter
2516 * gmime/gmime-filter-yenc.c (g_mime_filter_yenc_new): Now takes a
2517 bool encode argument rather than a GMimeFilterYencDirection - no
2518 sense making this more complicated than it needs to be.
2520 * gmime/gmime-stream-filter.c (g_mime_stream_filter_new): Renamed
2521 from g_mime_stream_filter_new_with_stream(). This is the only
2522 constructor, so should be named _new().
2524 2008-05-31 Jeffrey Stedfast <fejj@novell.com>
2526 * README: Bumped version
2528 * configure.in: Bumped version to 2.3.1
2530 * gmime/gmime-header.c (g_mime_header_list_invalidate_iters): Only
2531 unlink the iter if the headers are being destroyed.
2533 * gmime/gmime-gpg-context.c: Updated.
2535 * gmime/gmime-cipher-context.c: Added GMimeCipherHash enums for
2536 SHA-224, SHA-256, SHA-384 and SHA-512.
2537 (g_mime_signer_next): New function to ease binding.
2538 (g_mime_signer_set_status): Same.
2539 (g_mime_signer_get_status): Same.
2540 (g_mime_signer_set_error): Same.
2541 (g_mime_signer_get_error): Same.
2542 (g_mime_signer_set_trust): Same.
2543 (g_mime_signer_get_trust): Same.
2544 (g_mime_signer_set_fingerprint): Same.
2545 (g_mime_signer_get_fingerprint): Same.
2546 (g_mime_signer_set_key_id): Same.
2547 (g_mime_signer_get_key_id): Same.
2548 (g_mime_signer_set_name): Same.
2549 (g_mime_signer_get_name): Same.
2550 (g_mime_signer_set_sig_created): Same.
2551 (g_mime_signer_get_sig_created): Same.
2552 (g_mime_signer_set_sig_expire): Same.
2553 (g_mime_signer_get_sig_expire): Same.
2555 2008-05-31 Jeffrey Stedfast <fejj@novell.com>
2557 * gmime/gmime-object.c (g_mime_object_get_header_list): New
2558 function to get at the GMimeObject headers.
2560 * gmime/gmime-message-partial.c (message_partial_message_new): Use
2561 iters to copy the headers.
2563 * gmime/gmime-header.c (g_mime_header_list_foreach): Removed, this
2566 2008-05-31 Jeffrey Stedfast <fejj@novell.com>
2568 * tests/test-headers.c: New set of unit tests for GMimeHeaderIter.
2570 * gmime/gmime-header.c (g_mime_header_iter_equal): New method to
2571 check if two iters are equal.
2572 (g_mime_header_iter_first): New method to update @iter to point to
2574 (g_mime_header_iter_last): New method to update @iter to point to
2576 (g_mime_header_iter_next): Fixed.
2577 (g_mime_header_iter_prev): Fixed.
2578 (g_mime_header_iter_remove): Invalidate all other iters currently
2579 pointing to the same header as @iter.
2581 2008-05-30 Jeffrey Stedfast <fejj@novell.com>
2583 * gmime/gmime-parser.c: Updated for GMimeHeaderList and
2584 GMimeObject changes.
2586 * gmime/gmime-message-partial.c: Updated for GMimeHeaderList and
2587 GMimeObject changes.
2589 * gmime/gmime-multipart-encrypted.c: Updated for GMimeHeaderList
2590 and GMimeObject changes.
2592 * gmime/gmime-multipart-signed.c: Updated for GMimeHeaderList and
2593 GMimeObject changes.
2595 * gmime/gmime-multipart.c: Updated for GMimeHeaderList and
2596 GMimeObject changes.
2598 * gmime/gmime-part.c: Updated for GMimeHeaderList and GMimeObject
2601 * gmime/gmime-message.c: Updated for GMimeHeaderList and
2602 GMimeObject changes.
2604 * gmime/gmime-object.c (g_mime_object_append_header): Renamed from
2605 g_mime_object_add_header().
2606 (g_mime_object_prepend_header): New method.
2607 (remove_header): Cleanup content-header variables if they get
2608 removed. Don't allow removal of the Content-Type header.
2610 * gmime/gmime-header.[c,h]: Renamed GMimeHeader to GMimeHeaderList
2611 and all of it's methods appropriately. Added a new GMimeHeaderIter
2612 class for iterating over a header list.
2613 (g_mime_header_list_remove): Return gboolean specifying whether or
2614 not a header was removed.
2615 (g_mime_header_list_get_iter): New function to get a header
2618 2008-05-30 Jeffrey Stedfast <fejj@novell.com>
2620 * util/cache.c: Updated for list.[c,h] changes.
2622 * util/list.c (list_append): Renamed from list_append_node().
2623 (list_prepend): Renamed from list_prepend_node().
2624 (list_unlink): Renamed from list_node_unlink().
2626 2008-05-30 Jeffrey Stedfast <fejj@novell.com>
2628 * gmime/gmime-message.c (g_mime_message_get_headers): Removed as
2629 GMimeObject has an equivalent method.
2630 (handle_multipart_alternative): Removed.
2631 (handle_multipart_mixed): Removed.
2632 (g_mime_message_get_header): Removed, this has equivalent
2633 functionality on GMimeObject.
2634 (g_mime_message_set_header): Same.
2635 (g_mime_message_add_header): Same.
2637 2008-05-28 Jeffrey Stedfast <fejj@novell.com>
2639 * README: Bumped version
2641 * configure.in: Bumped version to 2.3.0
2643 2008-05-28 Jeffrey Stedfast <fejj@novell.com>
2645 These changes are to make it so that changing the GMimeContentType
2646 and/or GMimeContentDisposition fields directly will still update
2649 * gmime/gmime-disposition.c (g_mime_content_disposition_set_disposition):
2650 Notify our parent object that we've changed.
2651 (g_mime_content_disposition_set_parameter): Same.
2653 * gmime/gmime-content-type.c (g_mime_content_type_set_parameter):
2654 Notify our parent object that we've changed.
2656 * gmime/gmime-object.c (_g_mime_object_content_type_changed):
2657 Renamed from sync_content_type() and also made callable from
2658 gmime-content-type.c
2659 (_g_mime_object_content_disposition_changed): Renamed from
2660 sync_content_disposition() and also made callable from
2662 (g_mime_object_set_content_type): Set the parent object on the
2663 GMimeContentType and call _g_mime_object_content_type_changed().
2664 (g_mime_object_set_content_disposition): Set the parent object on
2665 the GMimeContentDisposition and call
2666 _g_mime_object_content_disposition_changed().
2668 2008-05-28 Jeffrey Stedfast <fejj@novell.com>
2670 * gmime/gmime-encodings.c: New source file containing all the
2671 basic MIME encoding functions.
2673 * src/uuencode.c: Updated.
2675 * src/uudecode.c: Updated.
2677 * gmime/gmime-parser.c: Updated for GMimeContentEncoding change.
2679 * gmime/gmime-multipart-signed.c: Updated for GMimeContentEncoding
2682 * gmime/gmime-multipart-encrypted.c: Updated for
2683 GMimeContentEncoding change.
2685 * gmime/gmime-message-partial.c: Updated for GMimeContentEncoding
2688 * gmime/gmime-filter-best.c (g_mime_filter_best_encoding): Updated
2689 to use the new GMimeContentEncoding enum.
2691 * gmime/gmime-data-wrapper.c: Updated to use GMimeContentEncoding
2693 (write_to_stream): Drastically simplified using the new
2694 GMimeFilterBasic API.
2696 * gmime/gmime-filter-basic.c: Updated to use the new GMimeEncoding
2698 (g_mime_filter_basic_new): Renamed and changed the arguments. We
2699 now just re-use the GMimeContentEncoding enum and a bool to
2700 declare encode vs decode.
2702 * gmime/gmime-utils.c (g_mime_references_free): New function to
2704 (g_mime_utils_best_encoding): Updated to use the new
2705 GMimeContentEncoding enum.
2706 (g_mime_utils_base64_encode_close): Moved to gmime-encodings.c
2707 and renamed to g_mime_encoding_base64_encode_close().
2708 (g_mime_utils_base64_encode_step): Same.
2709 (g_mime_utils_base64_decode_step): Same.
2710 (g_mime_utils_uuencode_close): Same.
2711 (g_mime_utils_uuencode_step): Same.
2712 (g_mime_utils_uudecode_step): Same.
2713 (g_mime_utils_quoted_encode_close): Same.
2714 (g_mime_utils_quoted_encode_step): Same.
2715 (g_mime_utils_quoted_decode_step): Same.
2717 * gmime/gmime-utils.h (GMimePartEncodingType): Removed. This enum
2720 * gmime/gmime-part.c (g_mime_part_set_content_type): Removed,
2721 GMimeObject already has this functionality.
2722 (g_mime_part_get_content_type): Same.
2723 (g_mime_part_set_content_encoding): Renamed from
2724 g_mime_part_set_encoding() and updated to use the new
2725 GMimeContentEncoding enum.
2726 (g_mime_part_get_content_encoding): Renamed from
2727 g_mime_part_get_encoding() and updated to use the new
2728 GMimeContentEncoding enum.
2729 (g_mime_part_encoding_to_string): Removed, equivalent
2730 functionality has been added to gmime-encodings.c named
2731 g_mime_content_encoding_to_string().
2732 (g_mime_part_encoding_from_string): Removed, equivalent
2733 functionality has been added to gmime-encodings.c named
2734 g_mime_content_encoding_from_string().
2735 (write_content): Updated for new GMimeFilterBasic API which helps
2738 2008-05-27 Jeffrey Stedfast <fejj@novell.com>
2740 * gmime/gmime-utils.c (g_mime_references_get_message_id): New
2741 accessor function to ease bindings.
2742 (g_mime_references_get_next): Renamed from
2743 g_mime_references_next() for consistency.
2744 (g_mime_utils_8bit_header_decode): Removed.
2745 (g_mime_utils_8bit_header_encode): Removed.
2746 (g_mime_utils_8bit_header_encode_phrase): Removed.
2748 * gmime/gmime-disposition.c (g_mime_content_disposition_get_params):
2749 New accessor function to ease bindings.
2751 * gmime/gmime-content-type.c (g_mime_content_type_get_media_type):
2752 New accessor function to ease bindings.
2753 (g_mime_content_type_get_media_subtype): Same.
2754 (g_mime_content_type_get_params): Same.
2756 2008-05-27 Jeffrey Stedfast <fejj@novell.com>
2758 * examples/basic-example.c: Fixed to use GMimeSignatureValidity.
2760 * gmime/gmime-cipher-context.c (g_mime_cipher_*): Removed, since
2761 we're not going to maintain compatability with 2.2, no sense
2762 keeping these wrappers around.
2763 (g_mime_cipher_validity_*): Removed. No one should still be using
2766 2008-05-26 Jeffrey Stedfast <fejj@novell.com>
2768 * gmime/gmime-message.c (g_mime_message_get_body): Removed.
2770 * gmime/gmime-disposition.c: Changed GMimeDisposition to
2771 GMimeContentDisposition and updated method names to match.
2772 (g_mime_content_disposition_new_from_string): Same as the old
2773 g_mime_disposition_new().
2774 (g_mime_content_disposition_new): New ctor that doesn't take any
2776 (g_mime_content_disposition_set_parameter): Renamed from
2777 g_mime_disposition_add_parameter().
2778 (g_mime_content_disposition_get_disposition): Renamed from
2779 g_mime_disposition_get().
2780 (g_mime_content_disposition_set_disposition): Renamed from
2781 g_mime_disposition_set().
2783 * gmime/gmime-object.c: Moved Content-Disposition handling here.
2784 (g_mime_object_get_content_disposition): New method which is the
2785 equivalent of g_mime_part_get_content_disposition_object().
2786 (g_mime_object_set_content_disposition): New method which is the
2787 equivalent of g_mime_part_set_content_disposition_object().
2788 (g_mime_object_get_disposition): New method which is the
2789 equivalent of g_mime_part_get_content_disposition().
2790 (g_mime_object_set_disposition): New method which is the
2791 equivalent of g_mime_part_set_content_disposition().
2792 (g_mime_object_get_content_disposition_parameter): New method
2793 which is the equivalent of
2794 g_mime_part_get_content_disposition_parameter().
2795 (g_mime_object_set_content_disposition_parameter): New method
2796 which is the equivalent of
2797 g_mime_part_add_content_disposition_parameter().
2799 * gmime/gmime-part.c (g_mime_part_get_content_disposition_object):
2800 Moved functionality to GMimeObject.
2801 (g_mime_part_set_content_disposition_object): Same.
2802 (g_mime_part_set_content_disposition): Same.
2803 (g_mime_part_get_content_disposition): Same.
2804 (g_mime_part_add_content_disposition_parameter): Same.
2805 (g_mime_part_get_content_disposition_parameter): Same.
2806 (g_mime_part_set_content): Removed long-deprecated function.
2807 (g_mime_part_set_content_byte_array): Same.
2808 (g_mime_part_set_pre_encoded_content): Same.
2809 (g_mime_part_get_content): Same.
2810 (g_mime_part_set_content_type):
2811 Removed... equivalent functionality already on GMimeObject.
2812 (g_mime_part_get_content_type): Same.
2814 2008-05-25 Jeffrey Stedfast <fejj@novell.com>
2816 * gmime/gmime-multipart-encrypted.c (g_mime_multipart_encrypted_encrypt):
2817 Don't use g_mime_part_set_content() as it is a deprecated
2820 * gmime/gmime-part.c (g_mime_part_get_content_disposition_object):
2821 Added an accessor to make bindings easier.
2823 2008-05-24 Jeffrey Stedfast <fejj@novell.com>
2825 * gmime/gmime-stream.c (stream_eos): Fixed a typo.
2827 2008-05-24 Jeffrey Stedfast <fejj@novell.com>
2829 * tests/test-pgp.c: Updated.
2831 * gmime/gmime-multipart-encrypted.c: Updated.
2833 * gmime/gmime-multipart-signed.c: Updated.
2835 * gmime/gmime-cipher-context.c (g_mime_cipher_context_*): Renamed
2836 from g_mime_cipher_*() which did not match the class
2837 name. Deprecated the old names.
2839 2008-05-24 Jeffrey Stedfast <fejj@novell.com>
2841 * gmime/gmime-message.c (g_mime_message_write_to_stream):
2842 Removed. Removing all deprecated functions which have equivalent
2843 functionality in a parent class.
2844 (g_mime_message_to_string): Same.
2846 * gmime/gmime-object.c (g_mime_object_ref): Same.
2847 (g_mime_object_unref): Same.
2849 * gmime/gmime-part.c (g_mime_part_write_to_stream): Same.
2850 (g_mime_part_to_string): Same.
2852 * gmime/gmime-stream.c (g_mime_stream_ref): Same.
2853 (g_mime_stream_unref): Same.
2855 2008-05-23 Jeffrey Stedfast <fejj@novell.com>
2857 * gmime/gmime-stream-fs.c: Cast offset arguments to lseek() to
2860 * gmime/gmime-stream-file.c: Cast offset arguments to fseek() to
2863 * gmime/gmime-stream-mmap.c (g_mime_stream_mmap_new_with_bounds):
2864 Don't assign to st.st_size.
2866 * gmime/*.[c,h]: Use gint64 instead of off_t for public APIs.
2868 * mono/gmime-api.raw: s/off_t/gint64/g
2870 2008-05-23 Jeffrey Stedfast <fejj@novell.com>
2872 * mono/Makefile.am: Don't delay-sign, newer versions of Mono do
2873 not allow this anymore.
2875 * mono/gmime-sharp.snk: New sign-key for signing gmime-sharp
2878 * mono/AssemblyInfo.cs.in: Updated.
2880 2008-05-23 Jeffrey Stedfast <fejj@novell.com>
2882 * branched: now begins 2.3.x development
2884 * gmime-2.4.pc.in: Renamed from gmime-2.0.pc.in.
2886 * gmime-config.in: Removed.
2888 * gmimeConf.sh.in: Removed.
2890 * configure.in: Updated.
2892 * */Makefile.am: Rename lib name to gmime-2.4.
2894 2008-05-23 Jeffrey Stedfast <fejj@novell.com>
2896 * mono/StreamWrapper.cs: Allow seeking to position 0 for
2897 GMimeStreamFilter. Thanks to Debajyoti Bera for this patch.
2899 2008-05-23 Jeffrey Stedfast <fejj@novell.com>
2901 * README: Bumped version
2903 * configure.in: Bumped version to 2.2.21
2905 * gmime/gmime-parser.c: Check parser_step() against
2906 GMIME_PARSER_STATE_ERROR rather than -1 in case the value ever
2908 (struct _GMimeParserPrivate): Changed state to be 16bit int
2909 instead of a 26bit int which apparently cannot be set to -1 on
2910 Solaris. Fixes bug #534301.
2911 (parser_step_headers): Fixed a corner-case where a read boundary
2912 fell between the \n and \t of a folded header.
2914 2008-05-16 Jeffrey Stedfast <fejj@novell.com>
2916 * README: Bumped version
2918 * configure.in: Bumped version to 2.2.20
2920 2008-05-15 Jeffrey Stedfast <fejj@novell.com>
2922 * gmime/gmime-stream-buffer.c (stream_read): Break if
2923 g_mime_stream_read() returns 0 as well (meaning EOF, no more data
2924 to read) and don't keep looping. Fixes bug #533331.
2926 2008-05-03 Jeffrey Stedfast <fejj@novell.com>
2928 * README: Bumped version
2930 * configure.in: Bumped version to 2.2.19
2932 2008-05-02 Jeffrey Stedfast <fejj@novell.com>
2934 * gmime/gmime-parser.c (parser_step_headers): Fix for CRLF encoded
2937 2008-04-05 Jeffrey Stedfast <fejj@novell.com>
2939 * gmime/gmime-parser.c (header_parse): Fixed a memory leak in the
2940 case of an invalid header.
2942 2008-02-16 Jeffrey Stedfast <fejj@novell.com>
2944 * README: Bumped version
2946 * configure.in: Bumped version to 2.2.18
2948 2008-03-13 Jeffrey Stedfast <fejj@novell.com>
2950 * gmime/gmime-parser.c (parser_construct_message): Changed
2951 content_length to an unsigned long rather than unsigned int, fixes
2952 bug #521872. Thanks to Pawel Salek for this fix.
2954 2008-03-10 Jeffrey Stedfast <fejj@novell.com>
2956 * gmime/gmime-parser.c (parser_scan_mime_part_content): Don't let
2959 2008-02-10 Jeffrey Stedfast <fejj@novell.com>
2961 * README: Bumped version
2963 * configure.in: Bumped version to 2.2.17
2965 2008-02-09 Jeffrey Stedfast <fejj@novell.com>
2967 * gmime/gmime-filter-basic.c (filter_filter): Use the new macros
2970 * gmime/gmime-utils.c (rfc2047_encode_word): Use the new macros.
2972 * gmime/gmime-utils.h: Added more accurate encoding-length macros
2973 for base64, quoted-printable, and uuencode which are try to
2974 minimize over-calculating the amount of output data that we
2975 need. Also namespaced them.
2977 2008-02-08 Jeffrey Stedfast <fejj@novell.com>
2979 * src/uudecode.c (uudecode): Use g_strchomp() on the filename
2980 parsed from the 'begin' line.
2982 2008-02-07 Jeffrey Stedfast <fejj@novell.com>
2984 * util/url-scanner.c (url_web_end): Handle IP address literals
2985 within []'s. Fixes bug #515088.
2987 2008-02-06 Jeffrey Stedfast <fejj@novell.com>
2989 * gmime/gmime-utils.c (g_mime_utils_uuencode_step): Optimized.
2991 2008-02-03 Jeffrey Stedfast <fejj@novell.com>
2993 * gmime/gmime-stream-cat.c (stream_read): Removed an extra seek.
2995 2008-02-02 Jeffrey Stedfast <fejj@novell.com>
2997 * README: Bumped version
2999 * configure.in: Bumped version to 2.2.16
3001 2008-02-02 Jeffrey Stedfast <fejj@novell.com>
3003 Fix for https://bugzilla.novell.com/show_bug.cgi?id=333292 and
3004 some other bugs I discovered while fixing it.
3006 * gmime/gmime-parser.c (header_parse): Made an actual function
3007 rather than a macro. Don't turn invalid headers into
3008 X-Invalid-Headers, just ignore them. Instead of using
3009 g_strstrip(), do our own lwsp trimming so we can do it before
3010 malloc'ing - this helps reduce memory usage and memmove()
3011 processing in g_strstrip().
3012 (parser_step_headers): Validate the header field names as we go so
3013 that we can stop when we come to an invalid header in some
3014 cases. May now return with 3 states rather than only 1:
3015 HEADERS_END (as before), CONTENT (suggesting we've reached body
3016 content w/o a blank line to separate it from the headers), and
3017 COMPLETE (which suggests that we've reached the next message's
3019 (parser_skip_line): Rearranged a bit: don't fill unless/until we
3021 (parser_step): For HEADERS_END state, skip a line and increment
3022 state to CONTENT. No-op for CONTENT and COMPLETE states.
3023 (parser_scan_message_part): parser_step() can return more than
3024 just HEADERS_END on 'success' when starting with HEADERS state, so
3025 check for error rather than HEADERS_END.
3026 (parser_construct_leaf_part): No need to parser_step() thru header
3027 parsing, they should already be parsed by the time we get
3028 here. Also, don't call parser_skip_line() directly to skip the
3029 blank line between headers and content, use parser_step() to do
3031 (parser_construct_multipart): Same as parser_construct_leaf_part()
3032 (found_immediate_boundary): Now takes an 'end' argument so callers
3033 can request a check against an end-boundary vs a part boundary.
3034 (parser_scan_multipart_subparts): Check for errors with
3035 parser_skip_line(). Set HEADERS state and use parser_step() to
3036 parse headers rather than calling parser_step_headers()
3037 directly. If, after parsing the headers, we are at the next
3038 message (aka COMPLETE state) and we have no header list, then
3039 break out of our loop and pretend we've found an
3040 end-boundary. After parsing the content of each MIME part, check
3041 that the boundary we found is our own and not a parent's (if it
3042 belongs to a parent, break out).
3043 (parser_construct_part): Loop parser_step() until we're at any
3044 state past the header block (>= HEADERS_END).
3045 (parser_construct_message): Same idea. Also, do error checking for
3046 decoded content_length value.
3048 2008-02-02 Jeffrey Stedfast <fejj@novell.com>
3050 * gmime/gmime-iconv-utils.c (iconv_utils_init): Don't break if the
3051 user's locale is unset (e.g. US-ASCII).
3053 2008-01-31 Jeffrey Stedfast <fejj@novell.com>
3055 * gmime/gmime-parser.c: Removed the need for 'unstep' state
3058 2008-01-27 Jeffrey Stedfast <fejj@novell.com>
3060 * gmime/gmime-stream-buffer.c (stream_write): Don't modify the
3061 passed-in arguments so that it makes debugging easier if there's
3064 2008-01-27 Jeffrey Stedfast <fejj@novell.com>
3066 * gmime/gmime-stream-buffer.c (stream_read): Optimized the
3067 BLOCK_READ code-path.
3068 (stream_write): Optimized the BLOCK_WRITE code-path.
3069 (stream_seek): Optimized the BLOCK_READ code-path.
3070 (g_mime_stream_buffer_gets): Updated for the changes made to the
3071 way bufptr is used in the BLOCK_READ case.
3073 2008-01-14 Jeffrey Stedfast <fejj@novell.com>
3075 * gmime/gmime-charset.c (g_mime_set_user_charsets): Deep copy the
3076 string array. Fixes bug #509434.
3078 2008-01-03 Jeffrey Stedfast <fejj@novell.com>
3080 * README: Bumped version
3082 * configure.in: Bumped version to 2.2.15
3084 2008-01-02 Jeffrey Stedfast <fejj@novell.com>
3086 * gmime/gmime-message.c (message_write_to_stream): Reworked the
3087 logic to be easier to understand what is going on.
3089 * gmime/gmime-multipart.c (multipart_write_to_stream): In the case
3090 where multipart->boundary is NULL /and/ we have a raw
3091 header (suggesting a parsed message), do not set a boundary as it
3092 will break the output because it will clobber the saved raw header
3093 and GMimeMessage's write_to_stream() method will have skipped
3094 writing its own headers if its toplevel part (us) have a raw
3095 header set. In this case, also skip writing the end boundary.
3097 2008-01-01 Jeffrey Stedfast <fejj@novell.com>
3099 * README: Bumped version
3101 * configure.in: Bumped version to 2.2.14
3103 * gmime/gmime-utils.c (g_mime_utils_generate_message_id): Fixed a
3104 Free Memory Read access (FMR) by not freeing 'name' before using
3105 it's value. Also reworked to take advantage of uname(2) or
3106 getdomainname() to get the domain name if available to avoid
3107 having to do a DNS lookup.
3109 2007-01-01 Jeffrey Stedfast <fejj@novell.com>
3111 * README: Bumped version
3113 * configure.in: Bumped version to 2.2.13
3115 2008-01-01 Jeffrey Stedfast <fejj@novell.com>
3119 * gmime/gmime-utils.c (rfc2047_encode_get_rfc822_words): Don't
3120 reset the word-type variable as it needs to be preserved when
3121 breaking long words.
3122 (rfc2047_encode): Switch on word->encoding - if 0, rfc2047 encode
3125 2007-12-27 Jeffrey Stedfast <fejj@novell.com>
3127 * gmime/gmime-utils.c (decode_8bit): Now takes a default_charset
3128 argument which we use in place of the locale charet if
3129 non-NULL. We also now always include this charset in our list of
3130 charsets to check for a best-match (obviously this charset is
3131 unlikely to be an exact fit if this function is getting called, so
3132 we place it at the end of the list).
3133 (rfc2047_decode_word): If given a valid charset in the
3134 encoded-word token, always use that for charset conversion to UTF-8
3135 even if it doesn't convert fully. We don't want to fall back to
3136 the user's supplied charset list because it may contain iso-8859-1
3137 which will likely always be a 'best-match' charset.
3139 2007-12-26 Jeffrey Stedfast <fejj@novell.com>
3141 * gmime/gmime-utils.c (g_mime_utils_decode_8bit): Made public.
3143 * gmime/internet-address.c (decode_mailbox): Instead of doing our
3144 own thing to convert raw 8bit/multibyte text sequences into UTF-8,
3145 use the same function we use in gmime-utils.c's header decoder.
3147 2007-12-25 Jeffrey Stedfast <fejj@novell.com>
3149 * gmime/charset-map.c: New source file to generate the charset
3150 map (moved out of gmime-charset.c)
3152 * gmime/gmime-charset.c (main): Removed.
3154 2007-12-25 Jeffrey Stedfast <fejj@novell.com>
3156 * gmime/gmime-charset.c (main): Cleaned up the logic and made it
3157 so that we can alias a block to a previous block if the blocks are
3158 identical rather than just aliasing when all values in the block
3159 are identical. Happens to make no difference in the output, but
3160 the logic is now there if that ever changes.
3162 2007-12-24 Jeffrey Stedfast <fejj@novell.com>
3164 * gmime/gmime-charset-map-private.h: Regenerated.
3166 * gmime/gmime-charset.c (known_iconv_charsets): Map all of the
3167 gb2312 aliases to GBK as GBK is a superset of gb2312 (apparently
3168 some clients are tagging GBK as gb2312 which is missing some
3169 glyphs contained within GBK).
3170 (main): Added iso-8859-6 to the table for Arabic support.
3172 2007-12-16 Jeffrey Stedfast <fejj@novell.com>
3174 * gmime/gmime-utils.c (decode_8bit): When reallocing our output
3175 buffer, we need to update outleft as well.
3177 2007-12-15 Jeffrey Stedfast <fejj@novell.com>
3179 * README: Bumped version
3181 * configure.in: Bumped version to 2.2.12
3183 2007-12-08 Jeffrey Stedfast <fejj@novell.com>
3185 * gmime/gmime-utils.c (rfc2047_encode_merge_rfc822_words):
3186 Completely rewritten with new logic which will hopefully group
3187 words more logically.
3189 2007-12-08 Jeffrey Stedfast <fejj@novell.com>
3193 * gmime/internet-address.c (internet_address_list_writer): Renamed
3194 from the temporary internet_address_list_fold() name.
3195 (_internet_address_to_string): New internal function that writes
3196 an InternetAddress to a GString, doing proper folding and rfc2047
3197 encoding if requested.
3198 (internet_address_to_string): Use the new internal function.
3200 * tests/test-mime.c: Added another addrspec test and fixed up some
3201 exception strings to be a little more helpful.
3203 2007-12-05 Jeffrey Stedfast <fejj@novell.com>
3205 * configure.in: Fixed a bug where explicitly disabling largefile
3206 support would add -D_FILE_OFFSET_BITS=no to the compiler
3207 CFLAGS. Also added a blaring WARNING when -enable-largefile is
3210 2007-11-23 Jeffrey Stedfast <fejj@novell.com>
3212 Attempt at solving bug #498720 for address fields, altho it should
3213 probably be made to handle folding single addresses in the case
3214 where they are too long to fit within a single line.
3216 * gmime/internet-address.c (internet_address_list_fold): New
3219 * gmime/gmime-message.c (write_structured): Renamed from
3221 (write_addrspec): New header writer that writes
3222 InternetAddressLists in a nicely folded manner.
3224 2007-11-12 Jeffrey Stedfast <fejj@novell.com>
3226 * gmime/internet-address.c (internet_address_destroy): No need to
3227 check if ia != NULL, we know this is true already.
3229 2007-11-12 Jeffrey Stedfast <fejj@novell.com>
3231 * README: Bumped version
3233 * configure.in: Bumped version to 2.2.11
3235 * gmime/gmime-utils.c (g_mime_utils_header_decode_text): Fix for
3238 2007-11-06 Jeffrey Stedfast <fejj@novell.com>
3240 * gmime/gmime-utils.c (rfc2047_decode_word): If the charset string
3241 is empty, default to decode_8bit() and don't try to iconv_open()
3244 2007-11-06 Jeffrey Stedfast <fejj@novell.com>
3246 * gmime/gmime-utils.c (is_rfc2047_token): Don't assume the charset
3247 component of the token is >= 1 char, start checking for a '?' at
3250 2007-11-01 Jeffrey Stedfast <fejj@novell.com>
3252 * gmime/gmime-gpg-context.c (gpg_ctx_parse_status): Clear any
3253 error we may have (bad passwd?) each pass so that we don't try to
3254 set an error when one is already set.
3256 2007-10-27 Jeffrey Stedfast <fejj@novell.com>
3258 * gmime/gmime-message.c (g_mime_message_set_mime_part): Reset the
3259 raw headers of the current top-level MIME part so that if it is
3260 being used elsewhere, it won't carry along all the message headers
3263 2007-10-24 Jeffrey Stedfast <fejj@novell.com>
3265 * gmime/gmime-part.c (g_mime_part_encoding_from_string): Handle
3266 the value "uuencode" the same as we were handling "x-uuencode".
3268 2007-10-14 Jeffrey Stedfast <fejj@gnome.org>
3270 Changed the license to LGPLv2
3272 2007-10-13 Jeffrey Stedfast <fejj@gnome.org>
3274 * tests/test-pgp.c (test_export): Skip past the PGP headers so as
3275 to avoid comparing the "Version: " headers which might fail if a
3276 newer gnupg is used than what created the pgp key originally.
3278 2007-10-13 Jeffrey Stedfast <fejj@gnome.org>
3280 * gmime/gmime-filter-html.c: Updated for url-scanner.c symbol
3283 * util/url-scanner.[c,h]: Renamed symbols to get rid of the G
3284 prefix and marked all symbols for internal linkage.
3286 * util/md5-utils.h: Declare symbols as internal.
3288 * util/memchunk.h: Here too.
3290 * util/cache.h: And here.
3292 * util/list.h: Same.
3294 2007-09-25 Joe Shaw <joe@joeshaw.org>
3296 * configure.in: Set an AM_CONDITIONAL for whether we are
3297 building with large file support.
3299 * mono/GMime.metadata.in: Move GMime.metadata to this and
3300 change any references of off_t to @off_t_type@, which is
3301 substituted with the correct type. This is needed because
3302 off_t is converted to an IntPtr by the gtk-sharp binding
3303 generator, which is good for 64-bit systems and 32-bit
3304 systems without large file support but breaks on 32-bit
3305 systems with large file support.
3307 * mono/Makefile.am: Generate GMime.metadata from
3308 GMime.metadata.in by using sed to replace @off_t_type@
3309 with gint64 on 32-bit systems with large file support
3312 2007-09-03 Jeffrey Stedfast <fejj@gnome.org>
3314 * gmime/gmime-utils.c: Disabled a debug printf.
3316 2007-08-15 Joe Shaw <joe@ximian.com>
3318 * mono/DataWrapper.custom: We want to dispose of the GMime
3319 stream immediately, since we don't use its managed wrapper
3320 except to immediately pass it into the GMime.StreamFilter
3323 2007-07-21 Jeffrey Stedfast <fejj@gnome.org>
3325 * gmime/gmime-iconv-utils.c (g_mime_iconv_strndup): Save errno
3326 before resetting the iconv descriptor so that we don't lose the
3329 2007-07-19 Jeffrey Stedfast <fejj@gnome.org>
3331 * README: Bumped version
3333 * configure.in: Bumped version to 2.2.10
3335 * tests/test-mime.c: Added rfc2047_text entries for testing the
3336 new workaround support.
3338 * gmime/gmime-utils.c (g_mime_utils_header_decode_text):
3339 Implemented a conditional workaround for broken rfc2047 encodings.
3341 2007-07-03 Jeffrey Stedfast <fejj@gnome.org>
3343 * gmime/gmime-common.c: Removed str[n]casecmp
3345 2007-05-21 Jeffrey Stedfast <fejj@gnome.org>
3347 * README: Bumped version
3349 * configure.in: Bumped version to 2.2.9
3351 * gmime/gmime-stream-cat.c (stream_substream): Fixed a memory leak
3352 by always returning a GMimeStreamCat, even if the source list
3353 contains only a single stream (probably better that it work this
3354 way anyway for consistency), thanks again to Charles Kerr for
3355 finding and presenting a fix for this. Fixes bug #440054.
3357 * gmime/gmime-stream-file.c (stream_seek): Oops, fseek() should
3358 have been using SEEK_SET, not SEEK_END. Thanks to Charles Kerr for
3359 the report and the fix. Fixes bug #439841.
3361 2007-04-25 Jeffrey Stedfast <fejj@gnome.org>
3363 * README: Bumped version
3365 * configure.in: Bumped version to 2.2.8
3367 * tests/test-pgp.c: Test exporting of keys.
3369 * gmime/gmime-utils.c (rfc2047_decode_word): Fixed compile
3372 * gmime/gmime-stream-file.c (stream_reset): Removed an unused
3375 * gmime/gmime-charset.c (g_mime_charset_can_encode):
3376 s/if (mask->level = 1)/if (mask->level == 1)/
3378 2007-04-23 Jeffrey Stedfast <fejj@gnome.org>
3380 * README: Bumped version
3382 * configure.in: Bumped version to 2.2.7
3384 2007-04-14 Jeffrey Stedfast <fejj@gnome.org>
3386 * gmime/*.c (g_mime_*_get_type): Set n_preallocs to 0.
3388 2007-04-12 Jeffrey Stedfast <fejj@gnome.org>
3390 * gmime/*.c: no need for a second NULL argument to g_object_new()
3392 * util/cache.c (cache_new): Change max_size and node_size to be of
3395 * gmime/gmime-multipart-encrypted.c
3396 (g_mime_multipart_encrypted_new): g_object_new() doesn't need a
3397 second NULL argument.
3399 * gmime/gmime-utils.c (decode_8bit): Close the iconv descriptor
3400 and since we are using is_ascii() now, we don't need to use
3403 2007-04-12 Jeffrey Stedfast <fejj@gnome.org>
3405 * gmime/gmime-utils.c (decode_8bit): Use is_ascii().
3406 (g_mime_utils_header_decode_text): Same.
3407 (g_mime_utils_header_decode_phrase): Here too.
3409 * gmime/gen-table.c: Added a is_ascii() macro for use instead of
3410 the ctype isascii() so that I don't have to worry about casting.
3412 2007-04-11 Jeffrey Stedfast <fejj@gnome.org>
3414 Revision 1119 (previous commit) made the following 2 functions
3415 even less attractive than they already were, so I decided to
3416 rewrite them especially since it wasn't hard to find a far cleaner
3419 * gmime/gmime-utils.c (g_mime_utils_header_decode_text): Rewritten
3420 to be cleaner, faster, and more elegant.
3421 (g_mime_utils_header_decode_phrase): Same.
3423 2007-04-11 Jeffrey Stedfast <fejj@gnome.org>
3425 Fixes for bug #423760 and bug #342196
3427 * gmime/gmime-charset.c (g_mime_charset_can_encode): New
3428 convenience function to check whether a length of UTF-8 text can
3429 be converted into the specified charset.
3430 (g_mime_set_user_charsets): New function allowing an application
3431 to provide GMime with a list of user-preferred charsets to use for
3432 encoding and decoding headers.
3433 (g_mime_user_charsets): New function to get the list of
3434 user-preferred charsets.
3436 * gmime/gmime-utils.c (decode_8bit): New function to convert
3437 arbitrary 8bit text into UTF-8 using the charset list provided by
3438 g_mime_user_charsets().
3439 (rfc2047_decode_word): Don't assume that just because the declared
3440 charset is UTF-8 that it actually is in UTF-8.
3441 (rfc2047_decode_word): If we can't open a converter for the
3442 declared charset to UTF-8 or if we can't convert from the declared
3443 charset into UTF-8, fall back to using decode_8bit().
3444 (g_mime_utils_header_decode_text): Convert 8bit word tokens into
3445 UTF-8 using decode_8bit().
3446 (g_mime_utils_header_decode_phrase): Same.
3447 (rfc2047_encode_word): Be a little more efficient about removing
3449 (rfc2047_encode): When encoding a level-2 word cluster, attempt to
3450 fit the cluster within a charset provided by
3451 g_mime_user_charsets() rather than using GMime's best-fit charset
3452 table (unless, of course, it doesn't fit within any of the
3453 user-specified charsets).
3455 2007-03-28 Jeffrey Stedfast <fejj@gnome.org>
3457 * gmime/gmime-iconv-utils.c (g_mime_iconv_strndup): No need to
3458 cast out to a char *, it already is.
3460 * gmime/gmime-stream-mem.c (g_mime_stream_mem_set_byte_array):
3461 Only free the previous memory buffer if we were the owner.
3463 2007-03-28 Jeffrey Stedfast <fejj@gnome.org>
3465 * README: Bumped version
3467 * configure.in: Bumped version to 2.2.6 - critical release for the
3468 gmime-stream-fs and gmime-stream-file fixes below.
3470 * gmime/gmime-stream-filter.c (stream_reset): Try resetting source
3471 stream first, this way if that fails we don't reset our state
3474 * gmime/gmime-stream-fs.c (stream_reset): Same as below.
3476 * gmime/gmime-stream-file.c (stream_reset): Make sure to always
3477 return 0 or -1, not the value from fseek()ing back to the
3478 beginning of the stream (which might not be position 0).
3480 2007-03-27 Jeffrey Stedfast <fejj@gnome.org>
3482 * gmime/gmime-gpg-context.c (gpg_ctx_parse_status): If we aren't
3483 in a UTF-8 locale, convert status messages into UTF-8 when using
3484 the status line in the GError.
3486 2007-03-26 Jeffrey Stedfast <fejj@gnome.org>
3488 * gmime/gmime-utils.c (g_mime_utils_8bit_header_decode)
3489 (g_mime_utils_8bit_header_encode)
3490 (g_mime_utils_8bit_header_encode_phrase): Changed all of these
3491 functions to take `const unsigned char *' like they used to. Fixes
3494 * gmime/gmime-gpg-context.c (gpg_ctx_new): Initialize flushed and
3495 nodata state variables. Thanks to valgrind for finding these...
3497 * gmime/gmime-content-type.c
3498 (g_mime_content_type_new_from_string): Shouldn't need to
3499 g_strstrip() the type, is_ttoken() won't match against lwsp
3500 chars. Also, instead of simply scanning past lwsp between some
3501 tokens, use decode_lwsp() between *all* tokens so that we handle
3502 comments as well (not that there should be any...).
3504 * gmime-2.0.pc.in: Got rid of the redundant @LIBS@ which contained
3505 the same value as @GMIME_LIBS@.
3507 * configure.in: Added configure checks for large file support.
3509 2007-03-26 Jeffrey Stedfast <fejj@gnome.org>
3511 * gmime-param.c: #include "gmime-parse-utils.h" and got rid of
3512 this file's own decode_lwsp() implementation.
3514 * internet-address.c: #include "gmime-parse-utils.h" which is
3515 where a bunch of the parser functions have been moved from here.
3517 * gmime-utils.c: #include "gmime-parse-utils.h" for decode_lwsp()
3519 (decode_addrspec): Moved here from internet-address.c which had
3520 been exporting the symbol previously (so that decode_domain didn't
3521 have to be copy/pasted). Now this function can be made static -
3522 yay! No more exporting un-namespaced symbols!
3524 * gmime/gmime-message.c: #include "gmime-parse-utils.h" for
3527 * gmime/gmime-parse-utils.[c,h]: New source files containing some
3528 parse utility functions that had been copy/pasted between several
3529 source files previously.
3531 2007-03-25 Jeffrey Stedfast <fejj@gnome.org>
3533 * README: Bumped version
3535 * configure.in: Bumped version to 2.2.5
3537 2007-03-25 Jeffrey Stedfast <fejj@gnome.org>
3539 * tests/Makefile.am (local-check): Simplified.
3541 * tests/test-streams.c: Generate our own test data if we aren't
3544 * tests/test-cat.c: Updated for the new Makefile.am rule.
3546 * gmime/gmime-stream-mmap.c (stream_length): Fixed to return the
3547 correct length when bound_end == -1 but bound_start != 0.
3548 Discovered this thanks to my new testsuite.
3550 * gmime/internet-address.c (decode_mailbox): If we can't find a
3551 local-part and inptr is ',', set *in = inptr; rather than *in =
3552 inptr + 1; Discovered this bug thanks to my new testsuite.
3554 * tests/test-mime.c: Rewritten to use testsuite library.
3556 2007-03-24 Jeffrey Stedfast <fejj@gnome.org>
3558 * tests/Makefile.am (check-local): Rewritten to actually run the
3561 * tests/test-mbox.c: Rewritten to use testsuite library.
3563 * tests/test-pgp.c: Rewritten to use testsuite library.
3565 * tests/test-pgpmime.c: Rewritten to use testsuite library.
3567 * tests/test-cat.c: Rewritten to use testsuite library.
3569 * tests/test-streams.c: Rewritten to use testsuite library.
3571 * tests/test-iconv.c: Rewritten to use testsuite library.
3573 * tests/testsuite.[c,h]: New automated test-suite helper library.
3575 2007-03-20 Jeffrey Stedfast <fejj@gnome.org>
3577 * configure.in: Check for the existance of _timezone and nfds_t.
3579 * gmime/gmime-utils.c (mktime_utc): Use _timezone if
3580 HAVE__TIMEZONE is set.
3582 * gmime/gmime.c (g_mime_init): If HAVE_TIMEZONE or HAVE__TIMEZONE
3583 is set, call tzset() to initialise the timezone variable.
3585 2007-03-12 Jeffrey Stedfast <fejj@gnome.org>
3587 * gmime/gmime-param.c (decode_param): Instead of only checking
3588 that the param value begins with "=?", check if that sequence
3589 exists anywhere in the value. Fixes bug #407522.
3591 * src/uudecode.c (uudecode): Use a strcmp instead of comparing
3592 against a string literal (which was technically correct in this
3593 case, but the prettyification would be nice if "-" was specified
3594 in argv too). Fixes bug #408613.
3596 2007-03-10 Jeffrey Stedfast <fejj@gnome.org>
3598 * gmime/gmime-message.c (g_mime_message_get_all_recipients): New
3599 convenience function to get To, Cc, and Bcc recipients all in a
3602 2007-02-19 Jeffrey Stedfast <fejj@gnome.org>
3604 * gmime/gmime-message.h: Moved g_mime_message_get_body() into the
3607 2007-02-11 Jeffrey Stedfast <fejj@gnome.org>
3609 * gmime/gmime-utils.c: Removed the need for the ctype isblank()
3612 * gmime/gmime-param.c (decode_int): Need to use (unsigned char *)
3613 when passing indexes to ctype functions.
3615 2007-02-10 Jeffrey Stedfast <fejj@gnome.org>
3617 * gmime/gmime-charset.c: Changed the names of the charset format
3618 macros to coincide with the new names output by iconv-charset.c.
3619 (g_mime_charset_iconv_name): Use the new macro names.
3621 * iconv-detect.c: Use %u instead of %d, also changed the names of
3622 the format #defines that we print out.
3624 * gmime/gmime-utils.c (g_mime_utils_quote_string): Optimise a
3626 (g_mime_utils_unquote_string): Fixed, this wasn't working right...
3628 2007-02-09 Jeffrey Stedfast <fejj@gnome.org>
3630 * gmime/gmime-stream-filter.c (stream_write): Instead of comparing
3631 the return value of the source stream write() to our input length
3632 to write, compare to -1. We can't assume the the value the source
3633 stream will return will be what we expected, all we can do is
3636 * gmime/gmime-part.c: Same as below.
3638 * gmime/gmime-filter-basic.c: Fixes to signedness compile warnings
3639 and updated to reflect gmime-utils.h changes.
3641 * gmime/gmime-multipart.c (multipart_set_boundary): Updated to
3642 reflect gmime-utils.h changes.
3644 * gmime/gmime-stream.c (g_mime_stream_writev): If any of the
3645 writes fail, return -1.
3647 * gmime/gmime-utils.c: header_encode_*() and header_decode_*() now
3648 take const char * rather than const unsigned char *
3649 arguments. This has been done in an effort to fix compile warnings
3650 about signed vs unsigned char * pointers. The 'save' argument to
3651 all of the stream encoders/decoders have been changed to a
3652 guint32, again for signed vs unsigned warning fixes.
3654 2007-02-08 Jeffrey Stedfast <fejj@gnome.org>
3656 * README: Bumped version
3658 * configure.in: Bumped version to 2.2.4
3660 2007-02-06 Jeffrey Stedfast <fejj@gnome.org>
3664 * configure.in: Detect if the system has GNU's getopt
3665 implementation available for us to use.
3667 * Makefile.am: Don't build our own copy of the GNU getopt library
3668 if the system has it available.
3670 * src/uuencode.c: If the system has getopt.h, use it instead of
3673 * src/uudecode.c: If the system has getopt.h, use it instead of
3676 2007-02-06 Jeffrey Stedfast <fejj@gnome.org>
3678 More fixes on account of my test suite...
3680 * tests/test-cat.c (test_cat_substream): end = start + random
3681 amount... duh. Fixes a bug where sometimes the end bound was < the
3684 * gmime/gmime-stream-cat.c (stream_substream): Calculate the
3685 length of each of the source streams correctly. D'oh.
3686 (stream_substream): Fixed the calculation for s->start.
3687 (stream_substream): Fixed the s->end calculation for when end
3688 within the source stream's bounds.
3689 (stream_substream): Keep track of how long our substream is going
3690 to be for use with setting absolute bound_end on a multi-stream
3693 2007-02-05 Jeffrey Stedfast <fejj@gnome.org>
3695 Fixes on account of the awesome test suite I wrote earlier... still
3696 need to fix ::substream() tho (or maybe it's just the test that's
3699 * gmime/gmime-stream-cat.c: Added an id member to struct
3700 _cat_node, for use with debugging...
3701 (stream_read): Seek in the source stream, don't call
3702 Cat::stream_seek() to do it.
3703 (stream_seek): Swapped the logic of the "within bounds" check, had
3704 it backwards. When seeking past a stream, set the node->position
3705 to the length of the stream (technically, it's like we read() thru
3706 all that data, right?). Instead of resetting all streams starting
3707 at n->next, reset them all starting at current->next... since 'n'
3708 technically might be before 'current'.
3709 (g_mime_stream_cat_add_source): Assign each node an id for easier
3712 2007-02-05 Jeffrey Stedfast <fejj@gnome.org>
3714 * tests/test-cat.c: The beginnings of a test suite for
3717 * gmime/gmime-stream-cat.c (stream_read): Go to the next stream if
3718 nread <= 0, not just nread == 0.
3720 2007-02-04 Jeffrey Stedfast <fejj@gnome.org>
3722 * gmime/gmime-stream-mem.c (stream_reset): No longer need to
3723 update stream->position.
3725 * gmime/gmime-stream-mmap.c (stream_reset): Same g_return_if_fail
3726 change. Also don't update stream->position.
3727 (stream_seek): Added similar sanity checking/eos resetting as
3730 * gmime/gmime-stream-file.c (stream_read): Style changes.
3731 (stream_write): Style changes.
3732 (stream_close): Fixed compiler warning.
3733 (stream_reset): Changed g_return_if_fail to a true if-then.
3734 (stream_seek): Changed to mimic the StreamFs changes.
3735 (g_mime_stream_file_new): Similar to fs_new() change.
3737 * gmime/gmime-stream-fs.c (stream_close): Loop the close()
3739 (stream_reset): Changed g_return_if_fail to a true if-then. Also
3740 be better about resetting eos.
3741 (stream_seek): Rewritten to be more correct/robust (at least I
3742 hope). Also properly reset eos when appropriate.
3743 (g_mime_stream_fs_new): If lseek() fails, pretend start offset is
3746 * gmime/gmime-stream.c (stream_reset): No longer needs to update
3748 (g_mime_stream_reset): Update stream->position if everything reset
3749 smoothly. This is just a convenience change to subclass
3752 * gmime/gmime-stream-cat.c (stream_read): Rewritten. Hopefully
3753 correct now? Ugh. We can hope...
3754 (stream_write): Fixed to work better.
3755 (stream_close): Rewritten.
3756 (stream_reset): Rewritten to reset the streams, don't seek.
3757 (stream_seek): Rewritten... still not correct, but should be ok
3758 assuming our bound_start is 0.
3759 (stream_length): Rewritten to not depend on a pre-calculated
3760 length value... this Does Not Work (tm) if the source streams are
3761 unbound and we've written to them.
3762 (stream_substream): Rewritten... because ::seek() is so complex
3763 for this type of stream, I've tried to eliminate a lot of the
3764 headaches by making substreams only slurp up the streams within
3765 the bounds of the start/end requested. If the entire contents
3766 within the requested bounds are contained within a single source
3767 stream, we return a substream of said source stream instead.
3768 (g_mime_stream_cat_add_source): Don't precalculate the length here
3771 * gmime/gmime-stream-buffer.c (stream_read): Fixed to never allow
3772 buflen to be negative if the read() of our source stream fails.
3773 (stream_close): Handle the case where we've already been closed.
3774 (stream_eos): Simplified.
3775 (stream_reset): Stylistic changes.
3776 (stream_seek): Don't allow seeks under our bound_start.
3778 2007-02-03 Jeffrey Stedfast <fejj@gnome.org>
3780 * gmime/gmime-stream-cat.c (stream_flush): Flush all streams up to
3781 and including the current stream, not just the current stream.
3782 (stream_write): break if we don't write any data to
3783 current->stream or get an error so we can try the next stream.
3785 * gmime/gmime-stream-file.c (stream_close): Same as below.
3787 * gmime/gmime-stream-fs.c (stream_close): Allow closing multiple
3788 times... makes this consistant with the other streams.
3789 (stream_write): If a system write fails with EFBIG or ENOSPC, set
3792 2007-01-20 Jeffrey Stedfast <fejj@gnome.org>
3794 * tests/test-streams.c (test_stream_gets): printf formatter fixes.
3796 * examples/imap-example.c: #include <glib/gstdio.h>, fixes bug
3799 2007-01-20 Jeffrey Stedfast <fejj@gnome.org>
3803 * gmime/gmime-filter-charset.c (filter_filter): Do iconv const
3805 (filter_complete): Same.
3807 2006-11-02 Jeffrey Stedfast <fejj@novell.com>
3809 * gmime/gmime-utils.c (g_mime_utils_header_format_date): Changed
3810 the names of the parameters to date and tz_offset to prevent
3811 warnings from -Wshadow.
3813 * gmime/gmime-filter-html.c (writeln): Fixed another possible
3814 buffer overflow condition pointed out by hpj.
3816 * gmime/gmime-filter-crlf.c (filter_filter): Fixed a possible
3817 buffer overflow condition pointed out by hpj.
3819 * gmime/gmime-gpg-context.c (gpg_ctx_op_step): Modified to use
3820 poll() rather than select()
3822 2006-09-18 Joe Shaw <joeshaw@novell.com>
3824 * mono/Makefile.am: Use SOURCES_XML instead of XML_SOURCES to
3825 specify the sources.xml file. XML_SOURCES breaks with newer
3828 2006-08-29 Pawel Salek <pawsa@theochem.kth.se>
3830 * gmime/gmime-message-partial.c: set buf just before use - since
3831 the mem stream buffer may get reallocated in the meantime leading
3834 2006-08-29 Jeffrey Stedfast <fejj@novell.com>
3836 * gmime/gmime-param.c (decode_quoted_string): Unescape escape
3837 sequences. Fixes bug #352771.
3839 * gmime/gmime-message.c (g_mime_message_set_subject): Updated the
3841 (g_mime_message_get_subject): Same.
3843 2006-08-21 Peter Bloomfield <peterbloomfield@bellsouth.net>
3845 * gmime/gmime-utils.c (g_mime_utils_unquote_string): handle an
3846 arbitrary sequence of quoted and unquoted sections.
3848 2006-08-02 Jeffrey Stedfast <fejj@novell.com>
3850 * README: Bumped version
3852 * configure.in: Bumped version to 2.2.3
3854 * gmime/gmime-message.c (process_header): Decode the values for
3855 Subject, From, Reply-To so that g_mime_message_get_subject/etc all
3856 return decoded strings like they were meant to.
3858 2006-06-23 Jeffrey Stedfast <fejj@novell.com>
3860 * gmime/gmime-gpg-context.c (swrite): Use g_build_filename() and
3861 g_get_tmp_dir() rather than hard-coding the tmpfile to be in /tmp.
3863 2006-06-23 Jeffrey Stedfast <fejj@novell.com>
3865 * gmime/gmime-part.c: Use g_ascii_* versions of str[n]casecmp.
3867 * gmime/gmime-parser.c: Use g_ascii_* versions of str[n]casecmp.
3869 * gmime/gmime-param.c: Use g_ascii_* versions of str[n]casecmp.
3871 * gmime/gmime-multipart-signed.c: Use g_ascii_* versions of
3874 * gmime/gmime-multipart-encrypted.c: Use g_ascii_* versions of
3877 * gmime/gmime-multipart.c: Use g_ascii_* versions of
3880 * gmime/gmime-message-partial.c: Use g_ascii_* versions of
3883 * gmime/gmime-message-part.c: Use g_ascii_* versions of
3886 * gmime/gmime-message.c: Use g_ascii_* versions of str[n]casecmp.
3888 * gmime/gmime-iconv.c (g_mime_iconv_open): Use g_ascii_* versions
3891 * gmime/gmime-header.c (g_mime_header_new): Use
3892 g_mime_strcase_[hash,equal] rather than param_[hash,equal] to
3895 * gmime/gmime-gpg-context.c: Use g_ascii_* versions of
3898 * gmime/gmime-filter-enriched.c: Use g_ascii_* versions of
3901 * gmime/gmime-disposition.c (g_mime_disposition_add_parameter):
3902 Use g_mime_strcase_[hash,equal] rather than param_[hash,equal] to
3904 (g_mime_disposition_new): Same.
3905 (param_equal): Removed.
3906 (param_hash): Removed.
3908 * gmime/gmime-content-type.c: Use g_ascii_* versions of
3910 (g_mime_content_type_new_from_string): Use
3911 g_mime_strcase_[hash,equal] rather than param_[hash,equal] to
3913 (g_mime_content_type_set_parameter): Same.
3914 (param_equal): Removed.
3915 (param_hash): Removed.
3917 * gmime/gmime-charset.c: Use g_ascii_* versions of str[n]casecmp.
3919 2006-06-23 Jeffrey Stedfast <fejj@novell.com>
3921 * gmime/gmime-stream-cat.c (stream_seek): Fixed to only seek if
3922 necessary and also to use ::reset() if seeking back to the
3923 beginning of the stream so that it works for non-seekable streams
3924 too. Fixes bug #345503 - again thanks to Charles for reporting
3927 * gmime/gmime-object.c (subtype_bucket_foreach): Fixed to also
3928 free the bucket memory. Fixes bug #345768, thanks to Charles Kerr
3929 for pointing this out.
3931 2006-06-22 Jeffrey Stedfast <fejj@novell.com>
3933 * gmime/gmime-gpg-context.c: Removed #define _POSIX_SOURCE to fix
3936 2006-06-15 Jeffrey Stedfast <fejj@novell.com>
3938 * README: Bumped version
3940 * configure.in: Bumped version to 2.2.2
3942 2006-06-01 Jeffrey Stedfast <fejj@novell.com>
3944 * gmime/gmime-utils.c (parse_broken_date): Fixed to handle
3945 MM-DD-YY properly and also to fallback to DD-MM-YY if the first
3946 pair of digits isn't within range for a proper month.
3948 2006-05-30 Jeffrey Stedfast <fejj@novell.com>
3950 * gmime.h.in: Removed.
3952 * gmime.h: Now static, no longer auto-generated.
3954 * gmime/gmime.c: Set the gmime_[major,minor,micro]_version
3956 (g_mime_check_version): New function to check the required
3959 * gmime/gmime-stream-fs.c: Implement our own no-op version of
3960 fsync() for systems that don't have fsync().
3962 2006-05-24 Jeffrey Stedfast <fejj@novell.com>
3964 * examples/imap-example.c (main): Use g_mkdir() to make this
3965 example portable to Win32.
3967 2006-05-01 Jeffrey Stedfast <fejj@novell.com>
3969 * gmime/gmime-gpg-context.c (gpg_ctx_parse_status): Handle prompts
3970 from GnuPG asking for the user's PIN for their SmartCard.
3972 2006-04-21 Jeffrey Stedfast <fejj@novell.com>
3974 * gmime/gmime-stream.h: #include <stdio.h> for SEEK_SET/CUR/END
3977 2006-03-16 Jeffrey Stedfast <fejj@novell.com>
3979 * README: Bumped version
3981 * configure.in: Bumped version to 2.2.1
3983 * gmime/gmime-parser.c (parser_step): No-op if we are in an ERROR
3985 (parser_construct_message): Don't bail if we don't start in state
3986 INIT, this is valid.
3987 (parser_step_from): We need to bail even if parser_fill() returns
3988 > 0 if the line is incomplete (e.g. a forced refill was needed but
3989 no additional data could be read).
3991 2006-03-16 Jeffrey Stedfast <fejj@novell.com>
3993 * README: Bumped version
3995 * configure.in: Bumped version to 2.2.0, it's about time I made a
3998 2006-03-15 Jeffrey Stedfast <fejj@novell.com>
4000 * gmime/gmime-parser.c (parser_step_from): If we fail to find a
4001 From line, set an error state. Also fixed the End-Of-Data check to
4002 prevent an infinite loop if the stream ends with \n\n.
4003 (parser_construct_message): Make sure our state starts off at
4004 INIT. Also check for the ERROR state in our parser_step() loop and
4005 return NULL if we encounter an error.
4007 2006-03-03 Jeffrey Stedfast <fejj@novell.com>
4009 * util/url-scanner.c (g_url_web_end): Allow urls such as
4010 "http://www.novell.com./path" (note the '.' before the path
4012 (g_url_addrspec_start): If the '@' is the first character in the
4013 match, then it isn't a valid email address.
4015 2006-01-12 Jeffrey Stedfast <fejj@novell.com>
4017 * configure.in: Bumped version to 2.1.19
4019 2006-01-19 Joe Shaw <joeshaw@novell.com>
4021 * mono/DataWrapper.custom: We need to manually create a decoding
4022 filtering stream and wrap that in a StreamWrapper rather than the
4023 DataWrapper's GMimeStream directly, which contains undecoded data.
4025 * mono/GMime.metadata: Rename some enum members, add DataWrapper's
4026 GMimeStream property and MimePart's ContentObject properties as
4027 items which return an owned ref.
4029 2006-01-12 Jeffrey Stedfast <fejj@novell.com>
4031 ** made a release of 2.1.18 **
4033 * gmime/gmime-stream-mem.c (g_mime_stream_mem_get_byte_array): Use
4034 g_return_val_if_fail() rather than g_return_if_fail() since we
4035 need to return NULL on error.
4037 2006-01-09 Joe Shaw <joeshaw@novell.com>
4039 * mono/Message.custom: Add a References property. Based on a
4040 patch from D Bera <dbera.web@gmail.com>
4042 2006-01-05 Joe Shaw <joeshaw@novell.com>
4044 * configure.in: Require gtk-sharp 2.4.0. Set the mono API version
4045 to <major>.<minor>.0.<interface>, which initially is set to
4046 2.1.0.0, so that version numbers are handled better with gmime
4047 upgrades (and hopefully RPM deps on most distros). Bump version
4050 * README: Updated version
4052 * gmime/gmime-stream-mem.[ch]: Add a
4053 g_mime_stream_mem_get_byte_array() method for the mono bindings.
4055 * mono/DataWrapper.custom:
4056 * mono/Header.custom:
4057 * mono/Object.custom: Remove WriteToStream() and replace with a
4058 new Stream property which returns a wrapped gmime memory stream.
4060 * mono/GMime.metadata: A bunch of metadata fixes, mainly for
4061 64-bit compatibility. gtk-sharp incorrectly maps off_t to size_t,
4062 which is an int; it's actually a long, so map it manually
4065 * mono/ObjectStream.cs: Remove this; it's been replaced by
4066 StreamWrapper, which is much more memory efficient.
4068 * mono/Stream.custom: Seek() returns a long. Remove the
4069 CopyToStream() and WriteToStream() methods, since streams can now
4070 just be wrapped with a StreamWrapper. Implement the Read()
4071 method, and return a long.
4073 * mono/StreamWrapper.cs: Added. Wraps a GMime.Stream in a
4076 * mono/gmime-api.raw: Regenerated.
4078 2005-11-14 Jeffrey Stedfast <fejj@novell.com>
4080 * gmime/gmime-utils.c (g_mime_references_next): Added for the C#
4083 2005-10-12 Jeffrey Stedfast <fejj@novell.com>
4085 * README: Updated version
4087 * configure.in: Bumped version to 2.1.17
4089 * gmime/gmime-message.c (message_get_header): For added
4090 convenience, if the requested header is a Content-* header and a
4091 top-level MIME part exists, query for the requested header on the
4092 top-level MIME part and return the value.
4094 * gmime/gmime-parser.c (parser_step_headers): If we weren't able
4095 to find the end of the header, save it to our tmp buff before
4096 refilling our input buffer and set midline to TRUE. No need to
4097 check inptr < inend later because we know it to be true.
4098 (parser_step_headers): Append the raw header leftovers in the
4099 parser_fill() failure case.
4101 2005-09-27 Jeffrey Stedfast <fejj@novell.com>
4103 * gmime/gmime-message-partial.c
4104 (g_mime_message_partial_split_message): Reworked the splitting
4105 logic to try and split on whole-lines.
4107 * gmime/gmime-multipart-signed.c (g_mime_multipart_signed_verify):
4108 Return NULL if the number of parts is incorrect.
4110 2005-09-20 Jeffrey Stedfast <fejj@novell.com>
4112 * gmime/gmime-message-partial.c (header_copy): Only set the value
4113 if the value is non-NULL. Thanks to Peter Bloomfield for this fix.
4115 2005-08-18 Jeffrey Stedfast <fejj@novell.com>
4117 * README: Updated version
4119 * configure.in: Bumped version to 2.1.16
4121 2005-08-18 Joe Shaw <joeshaw@novell.com>
4123 * mono/Makefile.am: Install gmime-api.xml into gapi-2.0
4125 2005-08-17 Joe Shaw <joeshaw@novell.com>
4127 * configure.in: Require gtk-sharp 2 for the mono bindings.
4129 * mono/GMime.metadata: Rename a few items that the gtk-sharp 2
4132 * mono/gmime-api.raw: Regengerate this using the gtk-sharp 2
4135 2005-08-16 Joe Shaw <joeshaw@novell.com>
4137 * mono/Makefile.am: libexecdir isn't right; we should be using
4138 $prefix/lib instead.
4140 2005-07-12 Jeffrey Stedfast <fejj@novell.com>
4142 * mono/Makefile.am: libexecdir fixes by Stanislav
4144 * gmime/internet-address.c: Fixes to various functions that used
4145 incorrect g_return*_if_fail variants. Thanks to sbrabec@suse.cz
4147 2005-06-23 Jeffrey Stedfast <fejj@novell.com>
4149 * gmime/gmime-utils.c (g_mime_utils_header_decode_date): Handle
4150 the case where the number of tokens returned from datetok is 0
4151 which can happen if broken software sends an empty Date: header.
4153 2005-06-13 Jeffrey Stedfast <fejj@novell.com>
4157 * configure.in: Bumped version to 2.1.15
4159 * gmime/gmime-parser.c (parser_step_headers): Don't check
4160 inptr[-1] unless inptr > start
4162 2005-06-10 Joe Shaw <joeshaw@novell.com>
4164 * mono/Stream.custom (CopyToStream): Check to see if
4165 byte_array.data is IntPtr.Zero and don't try to copy if it is.
4167 2005-06-10 Joe Shaw <joeshaw@novell.com>
4169 * mono/DataWrapper.custom: Added. Adds a WriteToStream() overload
4170 which takes a System.IO.Stream.
4172 * mono/Header.custom: Ditto.
4174 * mono/Makefile.am: Add DataWrapper.custom and Header.custom to
4177 * mono/Object.custom: Remove the GetData() method... it was rather
4178 flawed. WriteToStream() is the right way to go about it now. Add
4179 a WriteToStream() overload like DataWrapper and Header.
4181 * mono/Stream.custom: Add an internal CopyToStream() method which
4182 instantiates a GMime.StreamMem, calls WriteToStream() on it, and
4183 then copies the data from the GByteArray into a System.IO.Stream.
4184 Also add a WriteToStream() overload like the others.
4186 2005-05-25 Joe Shaw <joeshaw@novell.com>
4188 * mono/GMime.metdata: Add a few extra rules since the
4189 parser/generator changed how certain types are represented.
4191 * mono/InternetAddress.custom: Remove this file, move the code to...
4193 * mono/InternetAddressList.cs: ... this file, making it a
4194 first-order object. Since it implements IDisposable and people
4195 might want to explicitly dispose it.
4197 * mono/Message.custom (GetRecipients): Return an
4198 InternetAddressList rather than an ICollection, so people can
4199 dispose when finished. Also have it always return a valid
4200 InternetAddressList, so you don't have to do a null check before a
4203 * mono/Makefile.am: Remove InternetAddress.custom from customs and
4204 add InternetAddressList.cs to sources.
4206 2005-05-25 Joe Shaw <joeshaw@novell.com>
4208 * gmime/internet-address.c: Add accessor functions
4209 internet_address_get_type(), internet_address_get_name(),
4210 internet_address_get_addr() and internet_address_get_members() for
4211 binding into the Mono bindings.
4213 * mono/GMime.metadata: Work around an automatic rename of the
4214 gtk-sharp generator of a method named "GetType" to a property
4215 named "GType," since this method doesn't return a GType. Rename
4216 it to "GetAddressType" which is mapped to an "AddressType"
4219 * mono/gmime-api.raw: Regenerated.
4221 2005-05-20 Jeffrey Stedfast <fejj@novell.com>
4223 * gmime/gmime-utils.c (header_fold): Eat up extraneous whitespace
4224 after forcing a fold.
4226 2005-03-30 Tim Mooney <Tim.Mooney@ndsu.edu>
4228 * tests/test-stream.c: include <glib.h>, so we can use G_GNUC_FUNCTION
4229 and therefore compile with non-gcc compilers.
4231 2005-04-14 Jeffrey Stedfast <fejj@novell.com>
4233 * configure.in: Applied patch from
4234 mooney@dogbert.cc.ndsu.nodak.edu to not assume that mcs was GNU
4235 Mono and to instead verify that it was. Fixes bug #172175.
4237 2005-03-29 Jeffrey Stedfast <fejj@novell.com>
4241 * configure.in: Bumped version to 2.1.14
4243 * gmime/gmime-parser.c (parser_step_headers): If we didn't find
4244 EOL for a header, set state based on 'inptr' rather than
4245 'start'. Fixes a bug parsing headers that cross read boundaries
4246 (and where headers are longer than the internal read-ahead buffer
4249 2005-03-23 Joe Shaw <joeshaw@novell.com>
4251 * configure.in: Require gtk-sharp >= 1.0.6 for important
4254 2005-03-15 Joe Shaw <joeshaw@novell.com>
4256 * mono/Makefile.am: Build ObjectStream.cs
4258 * mono/ObjectStream.cs: Added. Implements a .net Stream for
4259 getting the conents from a GMime.Object.
4261 2005-03-12 Joe Shaw <joeshaw@novell.com>
4263 * mono/GMime.metadata: Tag the return values of
4264 MessagePart.Message, Message.MimePart, Multipart.GetPart() and
4265 Multipart.GetSubpartFromContentId() as "owned", meaning that
4266 gtk-sharp should not ref them but take ownership of the single
4267 reference that's returned from the underlying C functions.
4269 * mono/Message.custom: Don't instantiate InternetAddress
4270 objects, just deal with the C APIs directly. This saves us a
4271 lot of allocations and fixes a bug in gtk-sharp where opaque
4272 objects would leak references.
4274 2005-03-07 Jeffrey Stedfast <fejj@novell.com>
4276 * gmime/gmime-header.c (g_mime_header_prepend): New function to
4277 prepend a header to the list.
4279 2005-03-07 Jeffrey Stedfast <fejj@novell.com>
4283 * configure.in: Bumped version to 2.1.13
4285 * gmime/gmime-charset.c (g_mime_charset_step): Don't bother with
4286 MAX() for cases where we'll just end up setting level to 2.
4288 2005-03-07 Joe Shaw <joeshaw@novell.com>
4290 * mono/GMime.metadata: Add the "owned" flag to the return
4291 value parameter for ConstructMessage on the GMimeParser,
4292 because this method returns a new object with a refcount
4293 of 1. The binding needs to take ownership of the object.
4295 2005-02-14 Jeffrey Stedfast <fejj@novell.com>
4299 * configure.in: Bumped version to 2.1.12
4301 2005-01-31 Jeffrey Stedfast <fejj@novell.com>
4303 * gmime/gmime-utils.c (header_fold): Don't break apart rfc2047
4306 2005-01-18 Jeffrey Stedfast <fejj@novell.com>
4310 * configure.in: Bumped version to 2.1.11
4312 2005-01-26 Joe Shaw <joeshaw@novell.com>
4314 * mono/GMime.metdata: The gtk-sharp generator doesn't handle
4315 "const unsigned char *" well, so override those methods in
4318 2005-01-20 Jeffrey Stedfast <fejj@novell.com>
4320 * gmime/gmime-param.c (param_list_format): If folding mode is
4321 enabled, terminate the header with a \n.
4323 2005-01-19 Jeffrey Stedfast <fejj@novell.com>
4325 * gmime/gmime-part.c (g_mime_part_init): Register a writer for
4326 Content-Disposition.
4328 * gmime/gmime-object.c (g_mime_object_init): Register a new writer
4329 func for Content-Type headers so that we don't accidently fold in
4330 the middle of a parameter value.
4332 2005-01-13 Joe Shaw <joeshaw@novell.com>
4334 * autogen.sh: Allow automake 1.9
4336 2005-01-11 Jeffrey Stedfast <fejj@novell.com>
4340 * configure.in: Bumped version to 2.1.10
4342 2004-12-10 Jeffrey Stedfast <fejj@ximian.com>
4344 * gmime/internet-address.c (internet_address_to_string): rfc2047
4345 encode the group name too.
4347 2004-12-08 Jeffrey Stedfast <fejj@ximian.com>
4349 * gmime/gmime-content-type.c (g_mime_content_type_is_type): Fixed
4350 to do as advertised - allow wildcard matching for type.
4352 2004-12-06 Joe Shaw <joeshaw@novell.com>
4354 * mono/Makefile.am: Add InternetAddress.custom
4356 * mono/InternetAddress.custom: Added. Implements a new class
4357 which will handle the destroying of InternetAddressLists.
4358 Implement ParseString, which basically implements a managed
4359 version of internet_address_parse_string.
4361 * mono/Message.custom: Use the InternetAddressList for
4364 2004-12-01 Joe Shaw <joeshaw@novell.com>
4366 * configure.in: Error out if the user explicitly enables the mono
4367 bindings and we can't find mcs.
4369 * gmime.spec.in: Add support for the mono bindings, placing them
4370 in a separate gmime-sharp package. Patch from Ryan Skadberg
4371 <skadz@stigmata.org>
4373 2004-11-29 Joe Shaw <joeshaw@novell.com>
4375 * mono/AssemblyInfo.cs.in: Add @srcdir@ to AssemblyKeyFile so we
4376 build when builddir != srcdir.
4378 * mono/Makefile.am: Add gmime-sharp.pub to EXTRA_DIST.
4380 2004-11-27 Jeffrey Stedfast <fejj@ximian.com>
4382 * gmime/gmime-gpg-context.c: #define _POSIX_SOURCE so it compiles
4385 * gmime/gmime-multipart-signed.c (multipart_signed_remove_header):
4388 * gmime/gmime-multipart-encrypted.c
4389 (multipart_encrypted_remove_header): Don't return.
4391 2004-11-19 Joe Shaw <joeshaw@novell.com>
4393 * mono/GMime.metadata: Don't autogenerate get GetDate method
4395 * mono/Message.custom: Implement it by hand and return a DateTime.
4397 2004-11-17 Joe Shaw <joeshaw@novell.com>
4399 * mono/GMime.metadata: More metadata goodness.
4401 * mono/Makefile.am: Added Object.custom and Stream.custom.
4403 * mono/Object.custom: Add a GetData() method which returns a byte
4404 array of the object's data.
4406 * mono/Stream.custom: Add a wrapper around Seek() so that you
4407 don't need to specify whence.
4409 2004-11-16 Joe Shaw <joeshaw@novell.com>
4411 * configure.in: Generate mono/gmime-sharp.pc.
4413 * mono/GMime.metadata: Convert all ssize_t and off_t values to
4414 ints in C#, since they're not automatically handled by the
4415 generator right now.
4417 * mono/Makefile.am: Install the gmime-sharp stuff as gmime-sharp
4420 * mono/gmime-sharp.pc.in: Added. pkgconfig file for the mono
4423 2004-11-16 Joe Shaw <joeshaw@novell.com>
4425 * Makefile.am: iconv-detect.h should be in DISTCLEANFILES, not
4426 CLEANFILES, or else the build fails following a "make clean"
4427 unless you re-autogen.
4429 * gmime/internet-address.[ch]: Added functions
4430 internet_address_list_next() and
4431 internet_address_list_get_address() since we can't poke at the
4432 structures by hand in mono.
4434 * mono/GMime.metadata: Remove a bunch of commented out stuff, hide
4435 the entire InternetAddressList structure. We'd prefer to do it
4436 with .net datatypes.
4438 * mono/Message.custom: Added. Adds a GetRecipients() method which
4439 returns an ICollection of InternetAddresses, and a
4440 GetRecipientsAsString() method which returns a stringified list
4441 for pretty printing.
4443 * mono/gmime-api.raw: Regenerate this for the new
4444 InternetAddress.GetAddress() and Next() methods.
4446 2004-11-15 Joe Shaw <joeshaw@novell.com>
4448 * Added a mono binding
4450 * configure.in: Add optional checks for mono and gtk-sharp.
4452 * Makefile.am: Build the mono subdir if enabled.
4454 * gmime/Makefile.am: Add $(GLIB_LIBS) to the libgmime LIBADD line.
4456 * gmime/*.h: Replace GMIME_CHECK macros with the G_TYPE_CHECK
4457 ones, because the gtk-sharp binding generator looks for them.
4459 * gmime/gmime-type-utils.h: Removed.
4461 * mono/AssemblyInfo.cs.in: Added.
4463 * mono/sources.xml: Added. The sources file, which tells the
4464 generator how to generate the API data.
4466 * mono/GMime.metadata: Added. Metadata file used to tweak the
4469 * mono/Global.custom: Added. The g_mime_init() function isn't
4470 being wrapped automatically for some reason, so add the code here.
4472 * mono/gmime-api.raw: Added. The raw generated API, so that the
4473 parser doesn't have to be run by most people.
4475 * mono/gmime-sharp.pub: Added. Public key used to sign the
4478 2004-10-22 Jeffrey Stedfast <fejj@ximian.com>
4480 * configure.in: Removed the --enable-ipv6 option. getaddrinfo is
4481 now the only way hostname resolution is done. Added checks to see
4482 if getaddrinfo requires -lsocket for Solaris boxen.
4484 * gmime/gmime-host-utils.[c,h]: Removed
4486 * gmime/gmime.h.in: Removed gmime-host-utils.h
4488 * gmime/gmime-utils.c (g_mime_utils_generate_message_id): Use
4489 getaddrinfo to resolve hostnames, don't bother with the
4490 gethostbyname() variants. Makes this code simpler and allows us to
4491 get rid of gmime-host-utils.[c,h].
4493 2004-10-01 Jeffrey Stedfast <fejj@ximian.com>
4497 * configure.in: Bumped version to 2.1.9
4499 2004-09-29 Jeffrey Stedfast <fejj@ximian.com>
4501 * gmime/gmime-parser.c (parser_step_headers): Save the entire raw
4502 part header as well.
4503 (parser_init): Init the rawbuf (will be used for holding the raw
4505 (parser_close): Free the rawbuf.
4506 (parser_construct_leaf_part): Set the raw header on the mime part.
4507 (parser_construct_multipart): Set the raw header on the multipart.
4508 (parser_construct_message): Don't use g_mime_message_set_mime_part
4509 or we'll end up clearing the raw header that we worked so hard to
4511 (parser_scan_message_part): Same.
4512 (parser_scan_multipart_face): Change comparison to >= so that we
4513 actually get rid of the last crlf sequence like we meant to.
4514 (parser_fill): Get rid of the atleast check (it isn't really
4515 needed and can cause breakage).
4517 * gmime/gmime-message.c (message_get_headers): Modified to only
4518 write part headers if the toplevel mime part contains the raw
4520 (message_write_to_stream): Same.
4521 (g_mime_message_set_mime_part): Clear the raw message headers
4522 since it obviously won't contain the raw message headers.
4523 (message_add_header): If any message headers change, clear the raw
4524 header from the toplebel mime part.
4525 (message_set_header): Same.
4527 * gmime/gmime-header.c (g_mime_header_set_raw): New function to
4528 set the raw part header (to be used in place of our own folding if
4530 (g_mime_header_has_raw): New function to check if the raw header
4533 2004-09-28 Peter Bloomfield <PeterBloomfield@bellsouth.net>
4535 * gmime/gmime-multipart-signed.c (sign_prepare): Must treat
4536 multipart/signed and multipart/encrypetd parts as opaque
4537 (e.g. don't even attempt to change their encodings).
4539 2004-09-13 Jeffrey Stedfast <fejj@novell.com>
4541 * gmime/gmime-message.c (write_addrspec): New folding callback to
4542 use on addrspec headers.
4543 (g_mime_message_init): Register write_addrspec for all address
4546 * gmime/gmime-utils.c (header_fold): Fixed the logic a bit for
4547 structured headers such that we don't break long tokens.
4549 2004-08-22 Jeffrey Stedfast <fejj@ximian.com>
4553 * configure.in: Bumped the version to 2.1.8
4555 * gmime/gmime.h.in: #include <gmime/gmime-session-simple.h> for
4556 ia64 build fix on Debian (required because of the way gtk-doc's
4557 scan program works).
4559 * gmime/gmime-filter-enriched.c (enriched_to_html): Don't replace
4560 <nofill> with <pre>. Also, replace lone '\n's with a space as
4561 suggested by rfc1896.
4563 2004-08-08 Jeffrey Stedfast <fejj@ximian.com>
4565 * gmime/gmime-multipart-encrypted.c
4566 (g_mime_multipart_encrypted_encrypt): Don't set encrypted.asc as
4567 the filename anymore.
4569 * gmime/gmime-multipart-signed.c (g_mime_multipart_signed_sign):
4570 Added a hack for Balsa so it can support S/MIME. Also don't set
4571 the filename to signature.asc. Balsa maintainers don't want this
4573 (g_mime_multipart_signed_verify): Same. These changes really
4574 require a design change to CipherContext but that'll have to wait.
4576 2004-08-04 Jeffrey Stedfast <fejj@ximian.com>
4578 * configure.in: Changed the iconv-detect logic to not error-out on
4579 fail. The code can properly handle the case where iconv-detect.h
4580 doesn't exist, so let it do that instead.
4582 2004-07-30 Jeffrey Stedfast <fejj@novell.com>
4584 * gmime/gmime-utils.c (rfc2047_encode_get_rfc822_words): Don't use
4585 g_unichar_isspace() here, we only want to break 'words' on ascii
4588 2004-07-16 Jeffrey Stedfast <fejj@ximian.com>
4590 * gmime/gmime.c (g_mime_init): Make intialisation ref-counted.
4591 (g_mime_shutdown): Updated.
4593 2004-07-06 Jeffrey Stedfast <fejj@ximian.com>
4595 * gmime/gmime-utils.c (rfc2047_encode_get_rfc822_words): Break
4596 apart long words so that they we don't generate encoded-word
4597 tokens that are >75 chars. Fixes bug #145497.
4599 2004-07-04 Jeffrey Stedfast <fejj@novell.com>
4603 * configure.in: Bumped the version to 2.1.7
4605 * gmime/gmime-parser.c (parser_construct_leaf_part): Removed code
4606 to check that the content_type argument is NULL - it can never be
4608 (parser_scan_multipart_face): Fixed a possible buffer-overrun.
4610 * gmime/gmime-object.c (process_header): Modified to call
4611 g_mime_object_set_content_type() if we got called with a
4612 Content-Type header. This way all the ::set_content_type()
4613 subclass methods get a chance to update the object's state.
4614 (process_header): Return TRUE if we've "processed" the value or
4616 (add_header): Only add the header if process_header() didn't do
4617 anything with the header.
4620 * gmime/gmime-message.c (g_mime_message_set_sender): Parse the
4621 sender string so we can properly encode it before setting it as
4624 2004-06-28 Jeffrey Stedfast <fejj@ximian.com>
4626 * gmime/gmime-parser.c (parser_scan_content): Updated to handle
4628 (parser_scan_mime_part_content): Same.
4629 (crlf2lf): New function to convert CRLF to LF.
4630 (parser_scan_multipart_face): Convert the pre/postface into lf
4633 2004-06-27 Jeffrey Stedfast <fejj@novell.com>
4635 * util/url-scanner.c (g_url_web_end): Some fixes that I had to do
4636 recently for Camel as well.
4638 2004-06-22 Jeffrey Stedfast <fejj@novell.com>
4640 * gmime/gmime-parser.c (parser_construct_leaf_part): Only destroy
4641 the existing content_type on the object if it is non-NULL.
4642 (parser_construct_multipart): Same.
4644 2004-06-15 Jeffrey Stedfast <fejj@ximian.com>
4646 * configure.in: Added --enable-profile option and removed
4647 --enable-gprof. --enable-profile enables gprof and gcov.
4649 * gmime/gmime-parser.c: #include <stdlib.h> for strtoul()
4650 (parser_construct_leaf_part): Got rid of an unused variable.
4652 * gmime/gmime-param.c (rfc2184_param_new): Got rid of an unused
4654 (rfc2184_decode): Got rid of an unused variable.
4656 * util/gtrie.c (trie_utf8_getc): Get rid of the unused labels.
4658 2004-06-09 Jeffrey Stedfast <fejj@ximian.com>
4660 * gmime/gmime-stream-filter.c (stream_write): Set flushed to
4662 (stream_read): Set flushed to FALSE if we end up filtering more
4665 * gmime/gmime-gpg-context.c (gpg_ctx_parse_status): Record the
4667 (gpg_verify): Check the nodata state.
4669 2004-06-06 Jeffrey Stedfast <fejj@ximian.com>
4673 * configure.in: Bumped version to 2.1.6
4675 * gmime/gmime-parser.c (parser_construct_multipart): Instead of
4676 using g_mime_object_set_content_type(), destroy the current
4677 content_type object and set our own on it directly. This prevents
4678 the raw Content-Type header value from being overridden by the
4679 re-written version from our parsed object.
4680 (parser_construct_leaf_part): Same.
4682 * gmime/gmime-part.c (mime_part_write_to_stream): Don't sync the
4683 GMimeDisposition object to the header here anymore. We want to try
4684 and keep the original raw header if this is a parsed message.
4686 2004-06-03 Jeffrey Stedfast <fejj@ximian.com>
4688 * gmime/gmime-part.c (sync_content_disposition): Moved. Also
4689 protect against a NULL disposition.
4690 (mime_part_write_to_stream): Sync the Content-Disposition header
4691 before writing to the stream.
4693 * gmime/gmime-utils.c (header_fold): Fixed a folding bug where we
4694 could get a blank line (well, wasn't really blank - but we would
4695 get a "\n\t\n" sequence which isn't really useful nor desirable).
4697 * gmime/gen-table.c: Added a new bit and corresponding macro.
4699 * gmime/gmime-table-private.h: Updated.
4701 * gmime/gmime-param.c (encode_param): If conversion into the best
4702 charset fails, fall back to using UTF-8. Also use the new
4703 convenience macro, is_attrchar(), to decide which characters in
4704 the param value to encode.
4705 (param_list_format): Use is_attrchar() for calculating how many
4706 characters we expect to either have to quote or encode.
4707 (decode_param_list): Rewritten.
4709 2004-05-31 Jeffrey Stedfast <fejj@ximian.com>
4711 * gmime/gmime-data-wrapper.c (g_mime_data_wrapper_set_stream):
4712 Updated gtk-doc comments to note that you'll probably also want to
4713 call g_mime_data_wrapper_set_encoding().
4715 2004-05-26 Jeffrey Stedfast <fejj@ximian.com>
4717 * gmime/gmime-message.c (write_subject): New function. Use
4718 unstructured folding rather than the default.
4719 (g_mime_message_init): Register the subject header writer.
4721 * gmime/gmime-utils.c (g_mime_utils_structured_header_fold): New
4722 function (same as g_mime_utils_header_fold() but more
4723 appropriately named).
4724 (g_mime_utils_unstructured_header_fold): Fold unstructured headers
4726 (header_fold): Moved all of the g_mime_utils_header_fold() logic
4727 into here with a small adjustment to differentiate structured vs
4728 unstructured header folding.
4730 2004-05-25 Jeffrey Stedfast <fejj@ximian.com>
4732 * gmime/gmime-param.c (param_list_format): Modified to try and
4733 squeeze more characters per line and still keep it under 76 chars
4736 2004-05-24 Jeffrey Stedfast <fejj@ximian.com>
4738 * gmime/gmime-filter-gzip.c (g_mime_filter_gzip_finalize): Call
4739 inflateEnd/deflateEnd to fix a memory leak.
4741 * gmime/gmime-parser.c (parser_offset): If priv->offset == -1,
4742 don't bother doing any pointer arithmetic as it will result in a
4743 value that will break certain code (eg. the boundary matching
4746 2004-05-20 Jeffrey Stedfast <fejj@ximian.com>
4748 * gmime/gmime-gpg-context.c (gpg_ctx_new): Remember if our
4749 environment is in UTF-8 or not.
4750 (gpg_ctx_parse_status): Only convert the user name from the locale
4751 charset to UTF-8 if the env isn't UTF-8.
4752 (gpg_ctx_parse_status): Convert the password to the locale charset
4753 if the locale isn't UTF-8.
4755 2004-05-15 Jeffrey Stedfast <fejj@ximian.com>
4759 * configure.in: Bumped version to 2.1.5
4761 * gmime/gmime-multipart-signed.c (g_mime_multipart_signed_verify):
4764 * gmime/gmime-cipher-context.h: Added a new GMimeSignatureValidity
4765 which replaces the now deprecated GMimeCipherValidity. Typedef
4766 GMimeCipherValidity to GMimeSignatureValidity and wrap deprecated
4767 functions with #ifndef GMIME_DISABLE_DEPRECATED.
4769 * gmime/gmime-cipher-context.c (g_mime_signature_validity_new):
4771 (g_mime_signature_validity_free): New.
4772 (g_mime_signature_validity_get_status): New.
4773 (g_mime_signature_validity_set_status): New.
4774 (g_mime_signature_validity_get_details): New.
4775 (g_mime_signature_validity_set_details): New.
4776 (g_mime_signature_validity_get_signers): New.
4777 (g_mime_signature_validity_add_signer): New.
4778 (g_mime_cipher_validity_new): Deprecated.
4779 (g_mime_cipher_validity_init): Deprecated.
4780 (g_mime_cipher_validity_get_valid): Deprecated.
4781 (g_mime_cipher_validity_set_valid): Deprecated.
4782 (g_mime_cipher_validity_get_description): Deprecated.
4783 (g_mime_cipher_validity_set_description): Deprecated.
4784 (g_mime_cipher_validity_clear): Deprecated.
4785 (g_mime_cipher_validity_free): Deprecated.
4786 (g_mime_signer_new): New function
4787 (g_mime_signer_free): New function.
4789 * gmime/gmime-gpg-context.c (gpg_ctx_parse_status): Save more
4791 (gpg_verify): Updated to fill out the new GMimeSignatureValidity
4792 structure with more details.
4794 2004-05-15 Jeffrey Stedfast <fejj@ximian.com>
4796 * gmime/gmime-host-utils.h: Wrap inclusion of netdb.h with G_OS_WIN32
4798 * util/memchunk.c (memchunk_alloc): Fixed another cast warning on
4801 * gmime/gmime-message.c (g_mime_message_get_mime_part): New
4803 (g_mime_message_get_body): Fixed a bug where is_html could get set
4804 to TRUE even if the part wasn't html.
4806 2004-05-13 Jeffrey Stedfast <fejj@ximian.com>
4808 * util/memchunk.c (memchunk_alloc): Add parens to fix casting
4811 * gmime/gmime-message.c (write_received): Rewritten.
4813 2004-05-10 Jeffrey Stedfast <fejj@ximian.com>
4815 * gmime/gmime-filter-gzip.c: New filter for compressing/inflating
4818 2004-05-09 Jeffrey Stedfast <fejj@ximian.com>
4820 * gmime/gmime-message.c (write_received): Be careful to never
4821 append bytes beyond the end of the header value (eg the nul byte).
4823 * gmime/gmime-utils.c (g_mime_utils_header_fold): Don't allow
4824 folded headers to end with \n\n.
4826 2004-04-28 Jeffrey Stedfast <fejj@ximian.com>
4828 * gmime/gmime-multipart-encrypted.c
4829 (g_mime_multipart_encrypted_decrypt): Reset the stream before
4832 2004-04-25 Jeffrey Stedfast <fejj@ximian.com>
4834 * gmime/gmime-utils.c (g_mime_utils_header_fold): Rather than
4835 always using a tab character when folding, use the lwsp character
4836 that we are wrapping at instead.
4838 2004-04-24 Jeffrey Stedfast <fejj@ximian.com>
4840 * gmime/gmime-parser.c (g_mime_parser_init): Initialise
4841 respect_content_length.
4843 2004-04-24 Jeffrey Stedfast <fejj@ximian.com>
4847 * configure.in: Bumped version to 2.1.4
4849 * gmime/gmime-part.c (g_mime_part_get_content): Disable debug
4852 * gmime/gmime-iconv.c: Same.
4854 * gmime/gmime-iconv-utils.c: Disable warnings.
4856 * gmime/gmime-utils.c (decode_msgid): Try to always return a
4857 string buffer containing whatever we can get from the msg-id, even
4858 if it isn't a valid msg-id token.
4860 2004-04-19 Jeffrey Stedfast <fejj@ximian.com>
4862 * gmime/gmime-content-type.c
4863 (g_mime_content_type_new_from_string): Chew up lwsp between the
4864 end of the subtype and the ';' token, if there is any.
4866 2004-04-13 Jeffrey Stedfast <fejj@ximian.com>
4868 * gmime/gmime-gpg-context.c (gpg_ctx_parse_status): Save both the
4869 TRUST_UNDEFINED trust state as well as the whether or not we get a
4870 NO_PUBKEY status message.
4872 2004-04-11 Jeffrey Stedfast <fejj@ximian.com>
4874 * gmime/gmime-stream-filter.c (stream_read): Check that we haven't
4875 already flushed the stream if the source stream is at EOS - fixes
4876 an infinite loop case if the user doesn't use a loop to check
4879 2004-04-02 Jeffrey Stedfast <fejj@ximian.com>
4881 * gmime/gmime-stream-cat.c (stream_write): This should be writing
4882 data, not reading it from the underlying streams. Oops.
4884 2004-03-30 Jeffrey Stedfast <fejj@ximian.com>
4886 * gmime/gmime-charset.c (charset_best_mask): Don't use the charset
4887 if it is lang specific and the lang doesn't match the
4888 locale. Fixes bug #138218.
4890 * gmime/gmime-utils.c (mktime_utc): New function to mktime() into
4892 (parse_rfc822_date): Use mktime_utc() instead of doing it
4894 (parse_broken_date): Same.
4896 2004-03-21 Jeffrey Stedfast <fejj@ximian.com>
4898 * gmime/gmime-stream-buffer.c (stream_write): Fixed a bug when
4899 writing across block boundaries.
4901 2004-03-09 Jeffrey Stedfast <fejj@ximian.com>
4903 * gmime/gmime-cipher-context.c (g_mime_cipher_verify): Allow the
4904 sigstream to be NULL (it is optional afterall).
4906 Thanks to Peter Bloomfield for reminding me about
4907 g_ascii_strdown() and g_ascii_strup() and for providing the
4910 * gmime/gmime-charset.c (locale_parse_lang): Don't use
4911 g_ascii_strdown() and g_ascii_strup() as these functions strdup
4912 the result rather than working on the input string.
4913 (g_mime_charset_map_init): Instead of strdup()ing the charset name
4914 and then using g_ascii_strdown(), just use g_ascii_strdown() since
4915 it malloc's. Also, even if we have nl_langinfo(), we want to parse
4916 LC_ALL to get the locale lang.
4918 2004-03-06 Jeffrey Stedfast <fejj@ximian.com>
4922 * configure.in: Bumped version to 2.1.3
4924 2004-02-28 Jeffrey Stedfast <fejj@ximian.com>
4926 * gmime/gmime-stream-buffer.c (stream_write): Shrink buflen down
4927 by the number of bytes flushed or we'll loop forever writing the
4928 same block over and over.
4930 * gmime/gmime-strea.[c,h]: Make stream_write() take a const char
4931 *buf argument instead of char *buf.
4933 * gmime/gmime-stream-*.c (stream_write): constify the buf
4936 * gmime/gmime-stream-null.c (stream_write): Count newlines as
4939 2004-02-26 Jeffrey Stedfast <fejj@ximian.com>
4941 * util/*.[c,h]: Moved here from gmime/
4943 * gmime/*.h: Fixed #includes
4945 * gmime/cache.[c,h]: Moved to util/
4947 * gmime/gtrie.[c,h]: Moved to util/
4949 * gmime/list.[c,h]: Moved to util/
4951 * gmime/md5-utils.[c,h]: Moved to util/
4953 * gmime/memchunk.[c,h]: Moved to util/
4955 * gmime/url-scanner.[c,h]: Moved to util/
4957 * gmime/gmime-parser.c: Don't use gobject macro casts.
4959 * gmime/gmime-filter-md5.c: Move the MD5Context into a private
4960 structure so that we don't need to install md5-utils.h
4962 2004-02-18 Jeffrey Stedfast <fejj@ximian.com>
4964 * gmime/gmime-utils.c (rfc2047_encode): Return a duplicate of the
4965 input string if there are no 'words'.
4967 * gmime/internet-address.c (internet_address_to_string): Make sure
4968 ia->name is not an empty string.
4970 2004-02-13 Jeffrey Stedfast <fejj@ximian.com>
4972 * gmime/gmime-parser.c (parser_construct_multipart): Pop our end
4973 boundary before scanning postface text data. Prevents a hang if a
4974 multipart brokenly has 2 end boundaries.
4976 2004-02-08 Jeffrey Stedfast <fejj@ximian.com>
4978 * gmime/*.c: Use g_object_ref/unref instead of the
4979 g_mime_object_ref/unref and g_mime_stream_ref/unref.
4981 2004-02-08 Jeffrey Stedfast <fejj@ximian.com>
4983 * gmime/gmime-utils.c (rfc2047_encode): Changed to take a safemask
4984 arg instead of a gboolean phrase arg since we never used 'phrase'
4986 (g_mime_utils_header_encode_phrase): Pass IS_PSAFE as second
4988 (g_mime_utils_header_encode_text): Pass IS_ESAFE as second
4991 2004-02-07 Jeffrey Stedfast <fejj@ximian.com>
4995 * configure.in: Bumped version to 2.1.2
4997 * examples/README: New README explaining the purpose of each of
4998 the example sources.
5000 2004-02-06 Jeffrey Stedfast <fejj@ximian.com>
5002 * gmime/gmime-parser.c (parser_construct_message): If we've been
5003 told to respect the Content-Length header, then parse the length
5004 value and calculate the offset of the beginning of the next
5006 (g_mime_parser_get_respect_content_length): New function to get
5007 whether we've been told to respect the Content-Length header.
5008 (g_mime_parser_set_respect_content_length): New function to set
5010 (parser_offset): Now takes a private struct pointer rather than
5011 the parser object since it didn't really need it. Also makes it
5012 usable from check_boundary().
5013 (g_mime_parser_tell): Updated.
5014 (check_boundary): Only scan for end-boundaries if we've reached
5015 the projected end-of-content offset as calculated using the
5016 Content-Length header.
5018 2004-02-06 Jeffrey Stedfast <fejj@ximian.com>
5020 * configure.in: Generate examples/Makefile
5022 * gmime/gmime-utils.c (g_mime_utils_generate_message_id):
5023 Simplified and updated for g_gethostbyname_r() API changes.
5025 * gmime/gmime-error.h: Changed the #define of GMIME_ERROR_QUARK to
5026 just be the GQuark variable. Also added GMIME_ERROR_IS_SYSTEM() to
5027 decide if an error is a system error (aka errno) or a GMime error.
5029 * gmime/gmime.c: Make gmime_error_quark an actual variable and
5032 2004-02-05 Jeffrey Stedfast <fejj@ximian.com>
5034 * gmime/gmime-host-utils.c (g_gethostbyname_r): Replace the herr
5035 argument with a GError to make the interface a bit nicer to use.
5036 (g_gethostbyaddr_r): Same.
5038 * gmime/url-scanner.c: Added single/double quotes to url_braces[]
5039 in case the user is quoting the url.
5040 (g_url_web_end): Add "-;:" to list of punctuation to strip off the
5041 end of urls. Also fixed to handle user@domain's
5042 (g_url_addrspec_start): Strip open brace characters from the
5043 beginning of the addr.
5044 (g_url_web_start): Make sure "www" wasn't part of something not a
5045 url (like "Ewww.Gross") by check that pos[-1] is either an open
5046 brace or whitespace.
5047 (g_url_addrspec_end): Don't allow toplevel domain addr-specs
5048 (if we encounter something that looks like it is a toplevel domain
5049 addr, it is more likely to be bogus than correct).
5051 2004-02-04 Jeffrey Stedfast <fejj@ximian.com>
5053 * gmime/gmime-stream-buffer.c (g_mime_stream_buffer_gets): Strip
5054 off \r too if the stream is in the canonical form.
5056 * gmime/gmime.c (g_mime_shutdown): Oops, call
5057 g_mime_charset_map_shutdown(), not g_mime_charset_shutdown().
5059 2004-01-26 Jeffrey Stedfast <fejj@ximian.com>
5061 * gmime/gmime.c (g_mime_shutdown): New public function to shutdown
5062 GMime. Fixes a segfault in applications that dynamically
5063 load/unload GMime during execution.
5065 * gmime/gmime-iconv.c (g_mime_iconv_init): Don't register an
5067 (g_mime_iconv_shutdown): Make public.
5069 * gmime/gmime-charset.c (g_mime_charset_map_init): Don't set a
5070 g_atexit handler for the shutdown routine.
5071 (g_mime_charset_map_shutdown): Make public.
5073 2004-01-25 Jeffrey Stedfast <fejj@ximian.com>
5075 * gmime/gmime-param.c: Disable debugging and conditionally disable
5078 * gmime/gmime-multipart.c: Disable debugging.
5080 * gmime/gmime-stream.c: Disable debugging.
5082 * gmime/internet-address.c: Same.
5084 * gmime/gmime-parser.c: Conditionally disable warnings.
5086 2004-01-19 Jeffrey Stedfast <fejj@ximian.com>
5088 * gmime/gmime-host-utils.c (g_gethostbyaddr_r): Fixed some compile
5089 problems in the IPv6 implementation.
5091 2003-12-16 Jeffrey Stedfast <fejj@ximian.com>
5093 * gmime/gmime-stream-mmap.c (g_mime_stream_mmap_new): Don't add
5094 getpagesize() to the file length.
5095 (g_mime_stream_mmap_new_with_bounds): Same.
5097 2003-12-11 Jeffrey Stedfast <fejj@ximian.com>
5099 * gmime/gmime-gpg-context.c (gpg_ctx_parse_status): Don't immediately
5100 prompt for a passwd after receiving the NEED_PASSPHRASE status
5101 message. Instead, parse the userid that gpg needs a passwd for and
5102 store it on our context. Wait for a GET_HIDDEN status message
5103 before prompting, this way if the user has their gpg configured to
5104 use gpg-agent, the user won't get 2 passwd prompts.
5106 2003-12-06 Jeffrey Stedfast <fejj@ximian.com>
5108 * gmime/gmime-parser.c (parser_step_headers): If scanning for eoln
5109 results in finding inend, request a refill and try again (changed
5110 from inptr + 1 >= inend).
5112 2003-12-05 Jeffrey Stedfast <fejj@ximian.com>
5114 * gmime/internet-address.c (decode_domain): Make sure domain->len
5115 > 0 before checking domain->str[domain->len - 1].
5117 * gmime/gmime-gpg-context.c (gpg_ctx_op_start): Properly set the
5118 O_NONBLOCK flag on each of the pipes (ie. we need to get the
5119 current flags first and then add the O_NONBLOCK flag rather than
5120 just setting the O_NONBLOCK flag by itself).
5122 2003-12-04 Jeffrey Stedfast <fejj@ximian.com>
5126 * configure.in: Bumped version to 2.1.1
5128 2003-12-02 Jeffrey Stedfast <fejj@ximian.com>
5130 * gmime/gmime-gpg-context.c (gpg_ctx_op_start): Modified the code
5131 that closes the child's fds to use fcntl and also to start at fd =
5132 3 so as to get rid of the need to check for stdin/out/err.
5134 * gmime/gmime-filter-from.c (filter_filter): Fixed to malloc the
5135 correct buffer length.
5137 2003-10-28 Pawel Salek <pawsa@theochem.kth.se>
5139 * gmime.h.in: Use macros rather than the global variables to
5140 prevent compiler warnings.
5142 * gmime-error.h: Removed the trailing comma after the last enum
5143 value to fix ANSI compile warnings.
5145 * gmime-filter-basic.h: Same.
5147 * gmime-filter-best.h: Here too.
5149 * gmime-filter-crlf.h: And here.
5151 * gmime-filter-from.h: Same.
5153 * gmime-filter-yenc.h: Again here.
5155 * gmime-multipart-encrypted.h: And here.
5157 * gmime-multipart-signed.h: Here too.
5159 * gmime-stream-buffer.h: Same.
5161 * gmime-stream.h: And finally here.
5163 2003-10-08 Jeffrey Stedfast <fejj@ximian.com>
5165 * configure.in: Added a check for altzone.
5167 * gmime/gmime-utils.c (parse_broken_date, parse_rfc822_date):
5168 Account for altzone if the system libc defines it.
5170 2003-09-26 Jeffrey Stedfast <fejj@ximian.com>
5172 * gmime/gmime-host-utils.c (g_gethostbyaddr_r): IPv6
5173 implementation rewritten to use getnameinfo() which is the proper
5174 function to use in this case.
5176 * gmime/internet-address.c (internet_address_list_length): Changed
5177 to take a const argument.
5178 (internet_address_to_string): Now takes a const InternetAddress.
5179 (internet_address_list_to_string): Now takes a const
5180 InternetAddressList.
5182 2003-09-12 Jeffrey Stedfast <fejj@ximian.com>
5184 * gmime/gmime-stream.c (g_mime_stream_read): If len == 0, return 0.
5185 (g_mime_stream_write): Same.
5187 * gmime/gmime-parser.c (parser_push_boundary): Fix the
5188 boundarylenfinal calculation. Thanks to Bart Visscher for catching
5191 2003-08-30 Jeffrey Stedfast <fejj@ximian.com>
5193 * gmime/md5-utils.c (md5_get_digest_from_file): Open in binary
5194 mode, fixes a bug when built on Win32 systems.
5196 2003-08-09 Jeffrey Stedfast <fejj@ximian.com>
5198 * README: Bumped to version 2.1.0
5200 * configure.in: Bumped to version 2.1.0
5202 * gmime/gmime-charset.c (g_mime_charset_name): Added back this
5203 symbol in order to avoid breaking ABI.
5204 (g_mime_charset_locale_name): Same.
5206 * gmime/gmime-utils.c (g_mime_utils_generate_message_id): Slight
5207 fix for growing the buffer used by g_gethostbyname_r().
5209 2003-08-09 Jeffrey Stedfast <fejj@ximian.com>
5211 * gmime/gmime.h.in: Added new headers.
5213 * gmime/gmime-utils.c (g_mime_utils_generate_message_id): Use the
5214 re-entrant g_gethostbyname_r() function rather than
5215 gethostbyname() so that we are threadsafe.
5217 * gmime/gmime-host-utils.[c,h]: New source files containing
5218 gethostbyname_r() and gethostbyaddr_r() implementations.
5220 * gmime/gmime-filter-windows.[c,h]: New source files implementing
5221 a windows charset detection filter.
5223 * gmime/gmime-charset.c (g_mime_charset_iso_to_windows): New
5224 function to return the windows-cp125# equivalent charset for
5225 iso-8859-# charsets.
5227 * gmime/gmime-parser.c (parser_push_boundary): Soptimise a bit :-)
5228 (parser_push_boundary):
5230 2003-08-06 Jeffrey Stedfast <fejj@ximian.com>
5232 * gmime/gmime-multipart.c (g_mime_multipart_foreach): Simplified.
5234 * gmime/gmime-stream-cat.c (stream_read): Same here.
5235 (stream_write): And finally here.
5237 * gmime/gmime-stream-file.c (stream_read): Same.
5238 (stream_write): And again...
5240 * gmime/gmime-stream-fs.c (stream_read): Here too.
5241 (stream_write): And here.
5243 * gmime/gmime-stream-mmap.c (stream_read): Same as the mem stream.
5244 (stream_write): Same.
5246 * gmime/gmime-stream-mem.c (stream_read): Need to fix the MIN
5247 expresion so that both args are signed, otherwise 'len' will be
5248 the min if the 'bytes-left' calculation is negative.
5249 (stream_write): Same.
5251 2003-07-29 Jeffrey Stedfast <fejj@ximian.com>
5253 * gmime/gmime-message.c (g_mime_message_get_recipients): Return
5256 * gmime/gmime-message-part.c (g_mime_message_part_get_message):
5257 Ref the content message before returning it.
5259 2003-07-25 Jeffrey Stedfast <fejj@ximian.com>
5261 * gmime/gmime-multipart.c (g_mime_multipart_foreach): Don't
5262 descend recursively... make the user descend into sub-multiparts
5263 him/herself. This makes more sense since the callback will be
5264 called on the multipart too...
5265 (g_mime_multipart_get_subpart_from_content_id): Make checking if
5266 the subpart is a multipart more efficient by using
5267 GMIME_IS_MULTIPART macro.
5269 2003-07-15 Jeffrey Stedfast <fejj@ximian.com>
5271 * gmime/gmime-charset.c (g_mime_charset_canon_name): Updated to
5272 return canonical charset names for windows-cp125x charsets.
5274 2003-06-19 Jeffrey Stedfast <fejj@ximian.com>
5276 * README: Added a section for links to language bindings starting
5277 with the Perl MIME::Fast modules.
5279 * docs/reference/question_index.sgml: Updated docs about the Perl
5282 * docs/tutorial/gmime-tut.sgml: Updated slightly.
5284 2003-06-14 Jeffrey Stedfast <fejj@ximian.com>
5286 * gmime/gmime-parser.c (g_mime_parser_get_persist_stream): New
5287 function to get whether or not the parser will attempt to keep the
5288 content on disk when it constructs messages.
5289 (g_mime_parser_set_persist_stream): New function to set whether or
5290 not the above should be done.
5291 (parser_scan_mime_part_content): Only load content if persist and
5292 seekable are both TRUE.
5294 * gmime/gmime-stream-fs.c (g_mime_stream_fs_get_owner): Same idea.
5295 (g_mime_stream_fs_set_owner): And here.
5297 * gmime/gmime-stream-file.c (g_mime_stream_file_get_owner): New
5298 function, just like StreamMem.
5299 (g_mime_stream_file_set_owner): Same.
5301 * gmime/gmime-stream-mem.c (g_mime_stream_mem_set_owner): New
5302 function to set whether or not the memory stream should free the
5303 backend memory buffer when finalized.
5304 (g_mime_stream_mem_get_owner): New function to get the above
5307 2003-06-12 Jeffrey Stedfast <fejj@ximian.com>
5309 * gmime/gtrie.c (g_trie_free): Free the fail_states array.
5311 2003-05-26 Jeffrey Stedfast <fejj@ximian.com>
5313 * gmime/gmime-common.c (g_mime_strcase_hash): Oops, fixed a bug.
5315 * gmime/gmime-multipart-signed.c (g_mime_multipart_signed_verify):
5316 Do not strip trailing whitespace when verifying, this should allow
5317 us to verify both rfc2015 and rfc3156 signed messages (as well as
5318 this being the correct way of doing it anyway).
5320 2003-05-26 Jeffrey Stedfast <fejj@ximian.com>
5322 * gmime/gmime-common.[c,h]: New source files implementing some
5323 common routines scattered throughout the gmime sources (currently
5324 a strcase_hash and strcase_equal implementation).
5326 * gmime/gmime-object.c (type_registry_init): Use the new
5327 g_mime_strcase_[hash,equal] functions from gmime-common.h.
5328 (g_mime_object_register_type): Here too.
5330 * gmime/gmime-filter-enriched.c
5331 (g_mime_filter_enriched_class_init): Use the new
5332 g_mime_strcase_[hash,equal] functions from gmime-common.h.
5334 2003-05-22 Jeffrey Stedfast <fejj@ximian.com>
5336 * gmime/gmime-parser.c (parser_construct_multipart): Fixed to
5337 properly handle multiparts which do not end with their own
5338 end-boundary. See bug #113527 for details.
5340 2003-05-22 Jeffrey Stedfast <fejj@ximian.com>
5342 * configure.in: Check for sys/param.h
5344 * gmime/gmime-stream-mmap.h: Removed sys/mman.h and unistd.h from
5345 the #includes. These are needed in the ehader and will break the
5348 * gmime/gmime-utils.c: Only #include sys/param.h if the system has
5349 it. Also added unistd.h and sys/types.h as they should have been
5352 2003-05-21 Jeffrey Stedfast <fejj@ximian.com>
5354 * gmime/gmime-message.c (handle_multipart_mixed): Don't look at
5355 the subtype of the first_type unless we have already defined
5356 first_type. Fixes a crash.
5358 * gmime/gmime-multipart.c
5359 (g_mime_multipart_get_subpart_from_content_id): Don't return a
5360 const GMimeObject, ref it to be consistant with the rest of the
5363 * gmime/gmime-message-partial.c
5364 (g_mime_message_partial_split_message): Fixed an optimisation gone
5365 bad. Thanks to Piotr Klaban for reporting this.
5367 2003-05-19 Jeffrey Stedfast <fejj@ximian.com>
5369 * tests/test-mbox.c: Fixed a memory leak.
5371 * gmime/gmime-multipart-encrypted.c: Same as below.
5373 * gmime/gmime-multipart-signed.c: Fixed the prototype for
5376 2003-05-17 Jeffrey Stedfast <fejj@ximian.com>
5378 * docs/reference/streams.sgml: Updated for correctness.
5380 * docs/reference/data-wrappers.sgml: Pretty much re-written to
5381 better explain GMimeDataWrapper.
5383 * gmime/gmime-session-simple.[c,h]: New simple instantiable class
5384 implementing the GMimeSession interfaces.
5386 2003-04-30 Jeffrey Stedfast <fejj@ximian.com>
5388 * tests/test-mime.c: Fixed some compile warnings.
5390 * src/uudecode.c: Fixed some compile warnings.
5392 * src/uuencode.c: Fixed some compile warnings.
5394 * gmime/gmime-parser.c (parser_scan_content): Initialise 'start'.
5396 * gmime/gmime-multipart-signed.c: #include <string.h>
5398 * gmime/gmime-message-part.c: #include <string.h>
5400 * gmime/gmime-filter-enriched.c: #include <stdlib.h> for strtoul.
5402 * gmime/gmime-charset.c (strdown): New function to lowercasify a
5403 string inline (rather than being lame and strdup'ing the bloody
5404 string like g_ascii_strdown does).
5406 * gmime/gmime-iconv.c: Turn off cache debugging.
5408 2003-04-21 Jeffrey Stedfast <fejj@ximian.com>
5410 * gmime/gmime-gpg-context.c (gpg_ctx_new): Initialise seen_eof1 to
5412 (gpg_ctx_set_ostream): Set seen_eof1 to FALSE here, this way we
5413 only ever check for EOF for gpg's stdout if we care about the data
5415 (gpg_ctx_parse_status): Remove the hack that set seen_eof1 to TRUE
5416 when we received a TRUST status from gpg when verifying a
5417 signature. Same for when importing signatures.
5418 (gpg_ctx_op_step): Only FD_SET() fd's that we have not finished
5420 (gpg_ctx_op_exited): #if 0'd for now since we aren't using it
5421 anymore. Keeping it around for historical reasons and in case we
5422 find we really do need it back.
5424 2003-04-15 Jeffrey Stedfast <fejj@ximian.com>
5426 * configure.in: Check for netdb.h, gethostname and gethostbyname.
5428 * gmime/gmime-utils.c (g_mime_utils_generate_message_id): Guard
5429 against systems without netdb.h, gethostname() and/or
5430 gethostbyname(). Seems MingW does not have these things.
5432 * gmime/gmime-gpg-context.c (gpg_ctx_get_diagnostics): Flush the
5433 diagnostics stream and append a nul-byte. This allows us to return
5434 a const char * which will allow us to avoid strdup/free later.
5435 (gpg_ctx_free): Unref the diagnostics stream.
5436 (gpg_ctx_new): Get the locale charset and setup a charset filter
5437 for the diagnostics stream (use a stream instead of a GByteArray
5438 like we did before so we can do charset conversion more easily).
5439 (gpg_ctx_op_step): Use g_mime_stream_write() to append data to the
5440 diagnostics buffer instead of g_byte_array_append() - this way we
5441 get some charset filtering action. When reporting errors, use
5442 gpg_ctx_get_diagnostics(). Also make the errors reported to the
5443 user a little nicer.
5444 (gpg_sign): Diagnostics is now const, so don't free the result.
5445 (gpg_verify): Same. But also don't exit the main loop when gpg
5446 exits - there could still be data in the pipes left to read.
5447 (gpg_encrypt): Same as gpg_sign().
5448 (gpg_decrypt): Same here.
5449 (gpg_import_keys): Here too.
5450 (gpg_export_keys): And here.
5451 (gpg_ctx_parse_status): Convert the userid hint to UTF-8.
5453 2003-03-31 Jeffrey Stedfast <fejj@ximian.com>
5455 * gmime/*.c: s/g_str[n]casecmp/str[n]casecmp/g
5457 * configure.in: Change the check for mmap so that we know we not
5458 only have mmap defined, but also that it "works". Also added
5459 checks for strcasecmp and strncasecmp and define them to the glib
5460 versions if appropriate (g_ascii_str[n]casecmp since
5461 g_str[n]casecmp is apparently deprecated *sigh*). Doing this
5462 because I don't want to type g_ascii_str[n]casecmp. Call me a lazy
5463 bastard, but this is rediculous.
5465 * gmime/gmime-filter-enriched.[c,h]: New source files that can be
5466 used to convert text/enriched and text/rtf to text/html.
5468 2003-03-31 Jeffrey Stedfast <fejj@ximian.com>
5470 * PORTING: Began writing a porting guide for developers porting
5471 their applications from GMime 2.0 to GMime 2.2.
5473 * gmime/gmime-utils.c (g_mime_utils_8bit_header_encode_phrase):
5474 Re-added for binary compatability. At least for now?
5475 (g_mime_utils_8bit_header_encode): Same.
5476 (g_mime_utils_8bit_header_decode): Here too.
5478 2003-03-30 Jeffrey Stedfast <fejj@ximian.com>
5480 * gmime/internet-address.c (internet_address_new_name): Use
5481 header_decode_phrase().
5482 (internet_address_new_group): Same.
5483 (internet_address_set_name): Again here.
5484 (encoded_name): Always use encode_phrase() here if rfc2047_encode
5485 is TRUE, even if the raw name contains no 8bit characters. It
5486 *should* do the Right Thing (tm) now.
5488 * gmime/gmime-param.c (decode_param): Use
5489 g_mime_utils_header_decode_text().
5491 * gmime/gmime-message.c (g_mime_message_set_subject): Use
5492 g_mime_utils_header_encode_text().
5494 * gmime/gmime-utils.c (g_mime_utils_header_encode_phrase):
5495 Renamed. Also rewritten to do the Right Thing (ie. Group 'word's
5496 by type and so forth).
5497 (g_mime_utils_header_encode_text): Renamed from
5498 8bit_header_encode() to make it clear that this function is meant
5499 to encode 'text' fields (see rfc822 for the definition of 'text'
5500 and for which headers have text values). Does the same basic
5501 thing, but now shares a lot of code with encode_phrase().
5502 (rfc2047_encode_get_rfc822_words): Renamed from
5503 rfc2047_encode_phrase_get_words() - also now handles WORD_QSTRING
5504 and takes an arg to determine whether or not to allow for QSTRING
5506 (g_mime_utils_text_is_8bit): Don't go past '\0' if we encounter
5507 one before inend. Should allow our caller to cheat and pass in -1
5508 instead of strlen()ing the string if the string is nul-terminated.
5509 (g_mime_utils_header_decode_text): Renamed from
5510 8bit_header_decode(). Also made a lot less strict.
5511 (g_mime_utils_header_decode_phrase): Basically the same as
5512 decode_text() but with the same strictness of previous versions.
5514 2003-03-30 Jeffrey Stedfast <fejj@ximian.com>
5516 * gmime/gmime-message.c (g_mime_message_set_subject): Encode the
5517 subject before setting it in the raw header list.
5519 * gmime/gmime-header.c (g_mime_header_add): Don't try to encode
5520 the header here. This is not our responsibility.
5521 (g_mime_header_set): Same.
5523 2003-03-27 Jeffrey Stedfast <fejj@ximian.com>
5525 * gmime/gmime-utils.c (rfc2047_encode_word): Add 1 to enclen so as
5526 to protect against buffer overruns.
5527 (rfc2047_encode_phrase_get_words): if c > 127 && c < 256, then set
5528 encoding to MAX (encoding, 1), not 2.
5530 2003-03-11 Charles Kerr <charles@rebelbase.com>
5532 * gmime/md5-utils.c (md5_get_digest_from_file): fix
5533 dangling file pointer.
5535 2003-03-09 Jeffrey Stedfast <fejj@ximian.com>
5537 * gmime/url-scanner.c (g_url_addrspec_end): Make sure inptr != pos
5538 + 1, if it does, then return FALSE.
5540 2003-03-06 Jeffrey Stedfast <fejj@ximian.com>
5542 * configure.in: Check that the compiler supports the inline
5543 optimisation keyword (or variant) and #define it to 'inline'.
5545 * gmime/gtrie.c (trie_utf8_getc): Same.
5547 * gmime/gmime-filter-html.c (html_utf8_getc): Use the inline macro.
5549 2003-03-03 Jeffrey Stedfast <fejj@ximian.com>
5551 * gmime/gmime-filter-charset.c (filter_filter): Use outbuf -
5552 filter->outbuf to calculate how much data we've written - simpler
5553 and less likely to be wrong.
5554 (filter_complete): Same.
5556 * gmime/gmime-iconv.c: Modified to use the new cache
5557 implementation in cache.c
5559 * gmime/cache.[c,h]: New source files implementing an LRU cache.
5561 * gmime/list.[c,h]: New source files containing a really nice/fast
5562 linked-list implementation.
5564 2003-03-02 Jeffrey Stedfast <fejj@ximian.com>
5566 * gmime/gmime-iconv.c (iconv_cache_bucket_new): If the current
5567 list of cache buckets is non-NULL, set list->prev to the new
5568 bucket being prepended.
5569 (g_mime_iconv_open): Only expire unused if the cache size is
5570 greater than the max allowable size.
5572 2003-02-27 Jeffrey Stedfast <fejj@ximian.com>
5574 * gmime/gmime-stream-filter.c (stream_read): Set priv->flushed to
5575 TRUE if we call g_mime_filter_complete() on our filters.
5576 (stream_eos): It's not actually the end of the stream until we've
5577 flushed the filters. This fixes some possible truncation when
5578 reading from a filtered stream.
5580 2003-02-25 Jeffrey Stedfast <fejj@ximian.com>
5582 * README: Bumped version to 2.1.0
5584 * configure.in: Bumped version to 2.1.0
5586 * gmime/gmime-utils.c (rfc2047_decode_word): Use
5587 g_mime_locale_charset().
5589 * gmime/gmime-param.c (rfc2184_decode): Use
5590 g_mime_locale_charset().
5592 * gmime/gmime-iconv-utils.c (iconv_utils_init): Same as
5593 below. Also use g_mime_locale_charset() rather than
5594 g_mime_charset_locale_name().
5596 * gmime/gmime-iconv.c (g_mime_iconv_open): Use
5597 g_mime_charset_iconv_name() instead of the older deprecated
5598 g_mime_charset_name() function.
5600 * gmime/gmime-charset.c (g_mime_charset_map_init): Initialize the
5602 (g_mime_charset_iconv_name): Renamed from g_mime_charset_name()
5603 (g_mime_charset_canon_name): New function which does almost the
5604 same thing as g_mime_charset_iconv_name() except that it will
5605 always return the canonical forms of the iso-8859 charsets.
5606 (g_mime_locale_charset): Renamed from g_mime_charset_locale_name()
5607 (g_mime_locale_language): New function to return the user's locale
5609 (g_mime_charset_language): New function to map charsets to their
5610 language code (meant for CJKR).
5612 2003-02-13 Jeffrey Stedfast <fejj@ximian.com>
5614 * README: Bumped version to 2.0.2
5616 * configure.in: Bumped version to 2.0.2
5618 * gmime/gmime-parser.c (parser_scan_content): Stop looping if/when
5619 we find EOS in all cases. Also handle the case where an
5620 [end-]boundary ends an an EOS rather than a new-line.
5622 2003-02-14 Jeffrey Stedfast <fejj@ximian.com>
5624 * gmime/url-scanner.c (g_url_file_end): If the file:// url is
5625 preceded with some sort of brace, when scanning for the end of the
5626 url - take this into consideration.
5627 (g_url_web_end): Same.
5629 2003-02-13 Jeffrey Stedfast <fejj@ximian.com>
5631 * gmime/gmime-gpg-context.c: #include <sys/time.h>
5633 2003-02-12 Jeffrey Stedfast <fejj@ximian.com>
5635 * gmime/url-scanner.c: Fixed the table to treat >=127 as a CTRL
5638 * gmime/gtrie.c (trie_utf8_getc): When we encounter an invalid
5639 UTF-8 sequence, update in to point to in+1 and return 0xffff.
5640 (g_trie_add): Handle invalid UTF-8 sequences (ie, c == 0xffff).
5641 (g_trie_search): Same.
5643 * gmime/gmime-filter-html.c (html_utf8_getc): Shortcut if inptr ==
5644 inend by returning 0 and treating it as if we found the
5645 terminating nul-char.
5647 2003-02-08 Jeffrey Stedfast <fejj@ximian.com>
5649 * configure.in: Bumped the version to 2.0.1
5651 * docs/*: A completely new set of documentation.
5653 2003-02-07 Jeffrey Stedfast <fejj@ximian.com>
5655 * gmime/gmime-multipart.c (multipart_remove_part): When the part
5656 being removed is not the first part in the list, make sure to set
5657 node->prev->next = node->next -- oops :-)
5658 (multipart_remove_part_at): Same.
5660 2003-01-25 Jeffrey Stedfast <fejj@ximian.com>
5662 * configure.in: Bumped the version to 2.0.0
5664 * gmime/gmime-filter-html.c (writeln): Read the stream as UTF-8
5665 rather than 8bit so that we can properly write out unicode
5668 2002-12-17 Jeffrey Stedfast <fejj@ximian.com>
5670 Build fixes for G_DISABLE_DEPRECATED
5672 * gmime/gmime-param.c (encode_param): Replace calls to
5673 g_string_sprintfa() with g_string_append_printf() since the former
5674 is marked as being deprecated.
5675 (param_list_format): Same.
5677 * gmime/gmime-utils.c (rfc2047_encode_word): Here too.
5679 2002-12-16 Jeffrey Stedfast <fejj@ximian.com>
5681 * configure.in: Bumped the version to 1.90.8
5683 * doc/gmime-doc.sgml: Added a section for GMimeFilterMd5.
5685 * doc/gmime-sections.txt: Added a section on GMimeFilterMd5.
5687 * tests/test-parser.c (print_mime_struct): Validate Content-Md5
5690 * gmime/gmime-part.c (g_mime_part_set_content_md5): Rewritten to
5691 use the md5 filter and also to do things the right way by
5692 converting textual parts to their canonical CRLF form.
5693 (g_mime_part_verify_content_md5): Same.
5695 * gmime/gmime-filter-md5.[c,h]: New filter to compute the md5
5696 digest of a stream passed through it.
5698 2002-12-11 Jeffrey Stedfast <fejj@ximian.com>
5700 * gmime/gmime-message.c (g_mime_message_get_body): Reworked the
5701 logic a bit to properly handle multipart/alternative.
5703 2002-12-10 Jeffrey Stedfast <fejj@ximian.com>
5705 * configure.in: Bumped the version to 1.90.7
5707 2002-12-09 Jeffrey Stedfast <fejj@ximian.com>
5709 * gmime/url-scanner.c: Use our own masking table since we need it
5710 atoms to be slightly different. There's a few more chars we want
5711 to restrict. Also has the benefit of being easier to split out if
5712 someone else wants to use it.
5713 (g_url_addrspec_end): Fixed to not be fooled in the case where the
5714 address is followed immediately by a period.
5715 (g_url_web_end): Made more robust.
5716 (g_url_scanner_scan): Oops. We need to set the match->pattern
5717 string pointer to the correct pattern before executing the
5718 start/end methods (as some of them rely on this info).
5720 2002-12-09 Jeffrey Stedfast <fejj@ximian.com>
5722 * gmime/url-scanner.c: Don't need a hash table anymore.
5723 (g_url_scanner_add): When adding a pattern to the trie, use the
5724 array index as the pattern_id argument.
5725 (g_url_scanner_scan): Use the matched_id set by g_trie_search() to
5726 lookup the urlpattern_t instead of using a hash table.
5728 * gmime/gtrie.c (g_trie_add): Now takes a pattern_id argument so
5729 that we can avoid the use of GQuarks and thus save on unecessary
5731 (g_trie_search): Instead of giving our caller back the pattern
5732 string pointer, give him back the pattern id.
5734 2002-12-09 Jeffrey Stedfast <fejj@ximian.com>
5736 * gmime/gtrie.c (g_trie_matches): Removed.
5737 (g_trie_search): Fixed the FIXME.
5739 2002-12-09 Jeffrey Stedfast <fejj@ximian.com>
5741 * gmime/gmime-filter-html.c: Modified to use url-scanner.c instead
5742 of using glibc's regex routines. This has improved performance by
5743 ~16.5x not to mention that it is also more accurate than the regex
5744 patterns had been (the url scanner can be setup to be much
5745 stricter in the matching).
5747 * gmime/url-scanner.c: New source file implementing a simple
5748 expression scanner meant (currently designed for url matching)
5751 * gmime/gtrie.c: New source file implementing Aho-Corasick's Trie
5754 2002-12-08 Jeffrey Stedfast <fejj@ximian.com>
5758 * gmime/gmime-object.c (g_mime_object_register_type): Use a struct
5759 to hold the object_type for the subtype hash. 64 archs use 32bit
5760 ints and so using GINT_TO_POINTER() and GPOINTER_TO_INT() doesn't
5762 (g_mime_object_new_type): Get the object_type from the subtype
5765 2002-12-06 Jeffrey Stedfast <fejj@ximian.com>
5767 * gmime/gmime-stream.c (g_mime_stream_writev): Pointer arithmetic
5770 * gmime/memchunk.c (memchunk_alloc): Pointer arithmetic fixes.
5772 2002-12-03 Jeffrey Stedfast <fejj@ximian.com>
5774 * gmime/gmime-utils.c (datetok): Modified to properly handle when
5775 the first char of a token is a special char (such as a '-') that
5776 is also used as a token delimiter.
5778 2002-12-02 Jeffrey Stedfast <fejj@ximian.com>
5780 * gmime/gmime-filter-html.c (g_mime_filter_html_init): match
5781 REG_ICASE so we don't cut off at the first capital letter, duh.
5783 2002-12-01 Jeffrey Stedfast <fejj@ximian.com>
5785 * gmime/gmime-utils.c: #define _GNU_SOURCE for isblank on GNU
5788 * gmime/gmime-gpg-context.c (gpg_ctx_op_wait): Fixed the errno
5791 2002-11-21 Jeffrey Stedfast <fejj@ximian.com>
5793 * gmime/gmime-message.c (write_received): After skipping the
5794 special received token and it's value, skip any following comments
5796 (skip_addrspec): Skip past the '.' and '@' chars before decoding
5797 the next word or domain respectively.
5799 2002-11-20 Jeffrey Stedfast <fejj@ximian.com>
5801 * gmime/gmime-message.c (write_received): New function to nicely
5802 format Received headers.
5803 (write_msgid): New writer function that doesn't fold the msg-id no
5804 matter now long it is.
5805 (g_mime_message_init): Override the writer functions for Received
5806 and Message-Id headers. Should we also override the writer
5807 function for Path headers to not wrap?
5809 * gmime/internet-address.c (decode_addrspec): Get rid of an extra
5810 call to decode_lwsp that wasn't needed.
5812 * gmime/gmime-header.c (g_mime_header_register_writer): Renamed.
5814 2002-11-18 Jeffrey Stedfast <fejj@ximian.com>
5816 * configure.in: Make sure to include -liconv on systems that need it.
5818 2002-11-17 Jeffrey Stedfast <fejj@ximian.com>
5820 * configure.in: Check for gethostbyname in -lnsl and also bump the
5823 * src/getopt*.[c,h]: Added for portability to non-GNU systems.
5825 * gmime/gmime-parser.c (g_mime_parser_init): Initialize scan_from
5826 and have_regex here instead of in parser_init() since we don't
5827 want these flags to be reset when a new stream gets set.
5828 (g_mime_parser_new_with_stream): New convenience function.
5830 2002-11-16 Jeffrey Stedfast <fejj@ximian.com>
5832 * gmime/gmime-utils.c (decode_msgid): Eat the '<' before
5833 continuing to parse the addr-spec.
5835 2002-11-14 Jeffrey Stedfast <fejj@ximian.com>
5837 * gmime/gmime-content-type.c
5838 (g_mime_content_type_new_from_string): #include
5839 "gmime-table-private.h" and use is_ttoken() to correctly parse
5840 type/subtype. Fixes bug #98463.
5842 2002-11-13 Jeffrey Stedfast <fejj@ximian.com>
5844 * gmime/gmime-gpg-context.c (gpg_ctx_op_start): Don't bother
5845 stat()ing gpg->path, if the file doesn't exist, the exec() call
5846 will return immediately anyway.
5848 2002-11-13 Jeffrey Stedfast <fejj@ximian.com>
5850 * configure.in: Bumped the version to 1.90.5.
5852 * gmime/Makefile.am: Remove gmime-exception-list.def from the
5855 2002-11-12 Jeffrey Stedfast <fejj@ximian.com>
5859 * gmime/gmime-error.h: Added.
5861 * gmime/gmime-multipart-encrypted.[c,h]: Use GError instead of
5864 * gmime/gmime-multipart-signed.[c,h]: Same.
5866 * gmime/gmime-session.[c,h]: Here too.
5868 * gmime/gmime-gpg-context.[c,h]: Don't use GMimeException anymore,
5871 * gmime/gmime-cipher-context.[c,h]: Same here.
5873 * gmime/gmime.h.in: Remove gmime-exception.h and add gmime-error.h
5875 2002-11-09 Jeffrey Stedfast <fejj@ximian.com>
5877 * configure.in: Generate src/Makefile.
5879 * Makefile.am: Add src to the SUBDIRS.
5881 * src/Makefile.am: Build uuencode and uudecode.
5883 * src/uuencode.c: New source file emulating GNU shareutils'
5886 * src/uudecode.c: New source file emulating GNU shareutils'
5889 2002-11-07 Jeffrey Stedfast <fejj@ximian.com>
5891 * configure.in: Bumped the version to 1.90.4
5893 * PORTING: New document meant to help developers port their
5894 applications from gmime-1.0 to gmime-2.0.
5896 * iconv-detect.c: Removed unused variables and #include <stdlib.h>
5898 * gmime/gmime-multipart.c
5899 (g_mime_multipart_get_subpart_from_content_id): Init part to NULL.
5901 * gmime/gmime-stream-cat.c (stream_write): Init n to -1 each time
5902 through the outer loop.
5904 * gmime/gmime-filter-strip.c: #include <string.h> for memcpy.
5906 * gmime/gmime-filter-html.c (html_convert): Make sure to
5907 initialise depth to 0 each loop so we don't use it uninitialised.
5909 2002-11-07 Jeffrey Stedfast <fejj@ximian.com>
5911 * gmime*.[c,h]: Moved to gmime/ subdirectory. Also updated to
5912 #include <gmime/some-header.h> instead of #include "some-header.h"
5914 * test-*.c: Moved to tests/ subdirectory.
5916 2002-11-06 Jeffrey Stedfast <fejj@ximian.com>
5918 * Makefile.am: Install headers to $(includedir)/gmime-2.0/gmime
5920 2002-11-04 Jeffrey Stedfast <fejj@ximian.com>
5922 * gmime-filter-basic.c (g_mime_filter_basic_new_type): Set the
5925 2002-11-01 Jeffrey Stedfast <fejj@ximian.com>
5927 * gmime.h.in: Wrap in #ifdef __cplusplus
5929 * gmime-filter-html.c (html_convert): If flush is TRUE, flush any
5930 remaining input rather than backing it up.
5932 2002-10-31 Jeffrey Stedfast <fejj@ximian.com>
5934 * gmime-gpg-context.c: Renamed stdin to stdin_fd, stdout to
5935 stdout_fd, and stderr to stderr_fd to be more portable.
5937 2002-10-30 Jeffrey Stedfast <fejj@ximian.com>
5939 * gmime-filter-html.c (html_convert): Rewrote to use regex for
5940 url/addr extraction. Outputs more correct html now too.
5942 2002-10-18 Jeffrey Stedfast <fejj@ximian.com>
5944 * gmime-stream-filter.c (stream_read): Change presize from an int
5945 to a size_t to fix a 64bit cleanliness bug.
5946 (stream_write): Same.
5948 2002-10-14 Jeffrey Stedfast <fejj@ximian.com>
5950 * gmime-gpg-context.c (gpg_ctx_get_argv): Setup the import/export
5952 (gpg_ctx_op_step): Handle import/export errors.
5953 (gpg_import_keys): Implemented.
5954 (gpg_export_keys): Implemented.
5955 (gpg_ctx_op_step): Don't do anything with gpg's stdin unless we
5956 have something to write to it (exporting keys doesn't require
5957 writing to gpg's stdin).
5959 2002-10-13 Jeffrey Stedfast <fejj@ximian.com>
5963 * gmime-utils.c (g_mime_utils_generate_message_id): New function
5964 to generate a valid unique message-id string.
5966 2002-10-08 Jeffrey Stedfast <fejj@ximian.com>
5968 Fixes to make g_mime_message_partial_split_message() use the
5969 correct token as the id parameter.
5971 * gmime-object.c (g_mime_object_set_content_id): Same as with
5972 GMimeMessage::message_id.
5973 (process_header): Same as process_header for gmime-message.c but
5976 * gmime-message.c (process_header): Set only the addr-spec portion
5978 (g_mime_message_set_message_id): Treat the message_id passed in as
5979 the addr-spec msgid (ie, as if it didn't contain <>'s).
5981 2002-10-02 Jeffrey Stedfast <fejj@ximian.com>
5983 * gmime-gpg-context.c (gpg_import_keys): Renamed.
5984 (gpg_export_keys): Renamed.
5986 * gmime-cipher-context.c (g_mime_cipher_export_keys): Renamed to
5987 be friendlier toward c++.
5988 (g_mime_cipher_import_keys): Renamed to be similarly named with
5991 2002-09-30 Jeffrey Stedfast <fejj@ximian.com>
5993 * configure.in: Bumped version.
5995 * Makefile.am: Don't install gmime.m4
5997 * gmime.m4: Removed.
5999 2002-09-30 Jeffrey Stedfast <fejj@ximian.com>
6001 * gmime-filter-charset.c (filter_filter): Rewritten, don't set
6002 errno to 0 before calling iconv (we can't assume that on success
6003 errno will not be set?). Also, don't grow the buffer here, save
6004 any un-converted text in the backup buffer to be converted next
6006 (filter_complete): Pick up the slack of filter_filter by
6007 converting anything left over.
6009 2002-09-29 Jeffrey Stedfast <fejj@ximian.com>
6011 * gmime-filter[c,h]: Ported to GObject.
6013 * gmime-filter-basic.[c,h]:
6014 * gmime-filter-best.[c,h]:
6015 * gmime-filter-charset.[c,h]:
6016 * gmime-filter-crlf.[c,h]:
6017 * gmime-filter-from.[c,h]:
6018 * gmime-filter-html.[c,h]:
6019 * gmime-filter-strip.[c,h]:
6020 * gmime-filter-yenc.[c,h]: Ported to the new GMimeFilter.
6022 * gmime-data-wrapper.c (write_to_stream): Unref the filter after
6023 adding it to the filtered stream.
6025 * gmime-multipart-encrypted.c
6026 (g_mime_multipart_encrypted_encrypt): Unref the filters once we've
6027 added them to the filtered_stream.
6028 (g_mime_multipart_encrypted_decrypt): And here.
6030 * gmime-multipart-signed.c (g_mime_multipart_signed_sign): Unref
6031 the filters once we've added them to the filtered_stream.
6032 (g_mime_multipart_signed_verify): Same here.
6034 * gmime-part.c (write_content): Unref the filter.
6035 (g_mime_part_set_pre_encoded_content): Here too.
6037 * gmime-stream-filter.c (g_mime_stream_filter_add): Ref the filter
6039 (g_mime_stream_filter_remove): Unref the filter.
6040 (g_mime_stream_filter_finalize): Unref the filters here.
6042 2002-09-23 Jeffrey Stedfast <fejj@ximian.com>
6044 * gmime-filter-charset.c: Try our best to handle EILSEQ (illegal
6045 multibyte sequences) by eating the illegal bytes and
6046 continuing. This seems to be what users expect (it's what Mozilla
6049 2002-09-15 Jeffrey Stedfast <fejj@ximian.com>
6051 * gmime-charset.c (g_mime_charset_name): Don't g_assert after
6052 using strtoul on the iso charset name, seems that some news
6053 clients use 'isolatin' as if it were a real charset (it's not) and
6054 we don't want to abort() on this.
6056 2002-09-14 Jeffrey Stedfast <fejj@ximian.com>
6060 * gmime-utils.c (g_mime_utils_decode_message_id): New function to
6061 decode a message-id as defined by rfc822.
6062 (g_mime_references_decode): New function to decode a references or
6064 (g_mime_references_append): New function to append a raw
6065 message-id to a GMimeReferences list.
6066 (g_mime_references_clear): New function to clear a GMimeReferences
6069 * internet-address.c (decode_addrspec): New function to parse an
6070 addr-spec needed by the msg-id decoder.
6071 (decode_lwsp): Make public.
6072 (decode_word): Same.
6074 2002-09-08 Jeffrey Stedfast <fejj@ximian.com>
6076 * gmime-utils.c (parse_broken_date): Wrap printfs in d() to
6077 prevent them from printing anything unless debugging is turned on.
6079 2002-09-03 Jeffrey Stedfast <fejj@ximian.com>
6081 * gmime-utils.c (get_tzone): Fixed to not get false positives when
6082 the token is shorter than the actual timezone string (but matches
6083 the first little bit of it).
6085 2002-09-03 Tomasz K³oczko <kloczek@pld.org.pl>
6087 * Makefile.am: fixes for automake >= 1.5 (removed duplicated
6088 variables) and few minor cleanups and better method for install gmime
6091 * doc/Makefile.am: fixes for "make install DESTDIR=</install/prefix>".
6093 2002-09-01 Jeffrey Stedfast <fejj@ximian.com>
6095 * internet-address.c (decode_mailbox): When erroring out due to no
6096 local part in the add-spec, set *in to inptr + 1 so we don't get
6097 into an infinite loop.
6099 * gmime-message-part.c (message_part_remove_header): Same as
6102 * gmime-multipart.c (multipart_remove_header): Same as
6105 * gmime-part.c (mime_part_remove_header): Don't return anything
6106 here since our function is supposed to return void.
6108 2002-08-31 Jeffrey Stedfast <fejj@ximian.com>
6110 * gmime-parser.c (parser_scan_mime_part_content): Pass `content'
6111 into parser_scan_content(), fixes bug #92183.
6113 2002-08-30 Jeffrey Stedfast <fejj@ximian.com>
6115 * configure.in: Bumped version to 1.90.1
6117 * doc/Makefile.am: Don't gtkdoc-fixxref if the user disabled
6118 gtk-doc from the build.
6120 2002-08-25 Jeffrey Stedfast <fejj@ximian.com>
6122 * test-best.c: New test suite for the gmime-filter-best filter.
6124 * gmime.h.in: Added gmime-filter-best.h
6126 * gmime-filter-best.c (g_mime_filter_best_charset): Never return
6127 NULL, instead return us-ascii.
6128 (filter_filter): Fixed to not get into an infinite loop.
6130 2002-08-23 Jeffrey Stedfast <fejj@ximian.com>
6134 * gmime-message-part.c (message_part_write_to_stream): Changed the
6135 prototype to return ssize_t and not int.
6137 2002-08-21 Jeffrey Stedfast <fejj@ximian.com>
6139 * gmime-filter-best.c: New filter for calculating the best charset
6140 and encoding for a stream.
6142 * gmime-iconv-utils.c (g_mime_iconv_locale_to_utf8): Make
6144 (g_mime_iconv_locale_to_utf8_length): Same.
6145 (g_mime_iconv_utf8_to_locale): Here too.
6146 (g_mime_iconv_utf8_to_locale_length): And here.
6148 * gmime.c (g_mime_init): Updated to call
6149 g_mime_charset_map_init().
6151 * gmime-charset.c (g_mime_charset_locale_name): Initialize the
6152 charset map if it hasn't already been initialized.
6153 (g_mime_charset_map_init): Renamed from g_mime_charset_init().
6154 (g_mime_charset_init): Renamed from charset_init() and also made
6155 it globally accessable.
6156 (g_mime_charset_step): New external function (was an internal
6158 (g_mime_charset_best_name): Now an external function also.
6160 2002-08-19 Jeffrey Stedfast <fejj@ximian.com>
6162 * gmime-gpg-context.c (gpg_decrypt): Report better errors for when
6163 gpg fails to be executed.
6164 (gpg_encrypt): Same.
6165 (gpg_verify): Here too.
6166 (gpg_sign): And here.
6167 (gpg_ctx_op_start): Try stat()ing the gpg binary to make sure it
6168 exists and when handling an exception, save errno so we can re-set
6171 2002-08-11 Jeffrey Stedfast <fejj@ximian.com>
6173 * gmime-iconv.c: Instead of checking for #ifdef _REENTRANT, just
6174 check #ifdef G_THREADS_ENABLED and use a GStaticMutex rather than
6177 * gmime-charset.c (g_mime_charset_init): Use nl_langinfo() if it
6179 (g_mime_charset_name): Call g_mime_charset_init() if
6180 iconv_charsets is NULL (meaning the programmer did not properly
6181 initialize gmime). Also do mutex locking around the use of the
6182 iconv_charset hash table.
6184 2002-08-10 Jeffrey Stedfast <fejj@ximian.com>
6186 * test-pgpmime.c (test_multipart_signed): Unref the content object
6187 after setting it on the MIME part.
6189 * gmime-multipart-signed.c (g_mime_multipart_signed_sign): Unref
6190 the content object after setting it on the MIME part.
6191 (g_mime_multipart_signed_verify): Unref the content object after
6194 * gmime-multipart-encrypted.c
6195 (g_mime_multipart_encrypted_encrypt): Unref the content object
6196 after setting it on the MIME part.
6197 (g_mime_multipart_encrypted_decrypt): Unref the content object
6198 after we're done with it.
6200 * gmime-message-partial.c
6201 (g_mime_message_partial_reconstruct_message): Unref the content
6202 object when we're done with it.
6203 (g_mime_message_partial_split_message): Unref the content object
6204 after setting it on the MIME part.
6206 * gmime-parser.c (parser_scan_mime_part_content): Unref the
6207 content object after setting it on the MIME part.
6209 * gmime-part.c (g_mime_part_set_content_object): Ref the new
6210 content object and unref the old.
6211 (g_mime_part_get_content_object): Ref the content object before
6212 returning it to our caller.
6213 (g_mime_part_finalize): Unref the content object.
6215 * gmime-data-wrapper.c: Rewritten to subclass GObject.
6216 (g_mime_data_wrapper_destroy): Removed.
6217 (g_mime_data_wrapper_write_to_stream): Virtualize.
6219 2002-08-08 Jeffrey Stedfast <fejj@ximian.com>
6221 * gmime-iconv.c: Implemented an all new iconv cache. Also has the
6222 beginnings of thread-safety but I'd really need to fix the
6223 Makefiles to conditionally link with -lpthread before it'd be of
6224 any value as well as needing to make gmime-charset.c's functions
6227 2002-08-07 Jeffrey Stedfast <fejj@ximian.com>
6229 * gmime-message.c (message_remove_header): If the header to be
6230 removed is one of the special headers, then g_free() the cached
6231 value on the message object and set it to NULL. Fixes bug #90138.
6233 2002-08-05 Jeffrey Stedfast <fejj@ximian.com>
6237 * gmime-multipart-signed.c (g_mime_multipart_signed_sign):
6239 (g_mime_multipart_signed_verify): Documented.
6241 * gmime-filter-from.c (g_mime_filter_from_new): Updated the
6242 documentation to explain the new mode argument.
6244 * gmime-multipart-encrypted.c
6245 (g_mime_multipart_encrypted_encrypt): Documented.
6246 (g_mime_multipart_encrypted_decrypt): Documented.
6248 * gmime-gpg-context.c (g_mime_gpg_context_get_always_trust):
6251 2002-08-04 Jeffrey Stedfast <fejj@ximian.com>
6255 2002-08-03 Jeffrey Stedfast <fejj@ximian.com>
6257 * gmime-message.c (g_mime_message_set_message_id): Revert Charles'
6258 previous fix and just g_return_if_fail() if the message_id is NULL
6260 (g_mime_message_set_subject): Same for NULL subjects.
6261 (g_mime_message_set_reply_to): Here too.
6262 (g_mime_message_set_sender): Again here.
6263 (g_mime_message_add_header): Check that the value != NULL.
6264 (g_mime_message_set_header): Same here.
6266 * internet-address.c (decode_mailbox): Changed a for-loop into a
6267 while-loop to make the code a tad easier to read. Also fixed a
6268 type-o that meant to wrap a debug printf in d(). While we're at
6269 it, g_strstrip the resulting comment before using it as the name
6270 part of the address.
6272 2002-08-02 Jeffrey Stedfast <fejj@ximian.com>
6274 * gmime-message-part.c: Fix some comments that say "message/*"
6275 (which is meant as a wildcard mime-type match) and change them to
6276 just "message" to prevent compiler warnings about a /* being
6279 * gmime-charset.c: Get rid of a #include "unicode.h". This is no
6280 longer needed since we use glib2's unicode stuff.
6282 2002-08-02 Charles Kerr <charles@rebelbase.com>
6284 * gmime-message.c (gmime_message_foreach_part): if the message
6285 isn't a multipart message, just invoke the callback directly,
6286 passing in the single part.
6288 * gmime-message.c (gmime_message_set_message_id): work around
6289 a g_strstrip() warning if message_id is NULL.
6291 * gmime-part.c (g_mime_part_get_content_object): remove "const"
6292 from the retval; otherwise it's impossible to add a new filter.
6294 2002-07-31 Jeffrey Stedfast <fejj@ximian.com>
6296 * gmime-filter-html.c (is_addr_char): Don't use "isprint(c)" to
6297 mean "c >= 32 && c < 128" since it doesn't in most locales.
6298 (is_url_char): Same.
6299 (is_trailing_garbage): Same.
6300 (is_domain_name_char): New macro for dns-valid characters
6301 (email_address_extract): Use is_domain_name_char rather than
6302 is_addr_char for the part after the @.
6304 2002-07-30 Jeffrey Stedfast <fejj@ximian.com>
6306 * gmime-parser.c (parser_step_headers): Finish the fix from
6307 yesterday, the last statement of the while-loop needs to
6308 re-calculate `len' for parser_fill().
6310 2002-07-30 Charles Kerr <charles@rebelbase.com>
6312 * gmime-message.c (message_remove_header): Fix April 3 2002 bug
6313 that kept message-remove-header from removing headers.
6315 2002-07-29 Jeffrey Stedfast <fejj@ximian.com>
6317 * gmime-message.c (message_get_headers): Write the toplevel MIME
6318 Part's headers to the string as well, this fixes bug #88632 in
6321 2002-07-29 Jeffrey Stedfast <fejj@ximian.com>
6323 The following changes are meant to address bug #88100 on
6324 bugzilla.gnome.org - I'm as of yet unsure whether or not GMime
6325 should override the Message-Id write function or if Pan should do
6326 it. I'm sort of leaning towards Pan doing it simply because the
6327 current behavior is RFC compliant and the bug is really a "we need
6328 a workaround for a buggy NNTP server". However... It might just be
6329 simpler to have GMime do it.
6331 * gmime-header.c (g_mime_header_new): Init a new hash table that
6332 stores info on how to write a particular header.
6333 (g_mime_header_destroy): Free the hash table.
6334 (g_mime_header_set_write_func): Set the writer function for a
6336 (g_mime_header_write_to_stream): Use the specified header write
6337 function for each ehader. If one wasn't specified, use the
6340 2002-07-29 Charles Kerr <charles@rebelbase.com>
6342 * remove strlib.[ch]
6343 * use g_strcasecmp instead of strcasecmp
6344 * use g_strncasecmp instead of strncasecmp
6345 * use g_stpcpy instead of stpcpy
6346 * added "#include <string.h>" where needed
6348 2002-07-29 Charles Kerr <charles@rebelbase.com>
6350 * gmime-filter-strip: fix trivial compiler warning.
6351 * gmime-message-part.c: same.
6352 * gmime-multipart-signed.c: same.
6353 * gmime-object.c: same.
6354 * gmime-param.c: same.
6355 * gmime-session.c: same.
6356 * test-iconv.c: same.
6357 * test-mbox.c: same.
6358 * test-parser.c: same.
6359 * test-partial.c: same.
6361 2002-07-29 Jeffrey Stedfast <fejj@ximian.com>
6363 * gmime-parser.c (parser_step_headers): When refilling, make sure
6364 that the refilled buffer is larger than the buffer was before
6365 refilling, otherwise break out of the loop and parse whatever is
6366 left. Fixes bug #89260 on bugzilla.gnome.org
6368 2002-07-27 Jeffrey Stedfast <fejj@ximian.com>
6370 * gmime-stream-cat.c (stream_read): Initialize `n' at the
6371 beginning of the while-loop so that it can't be used
6374 * gmime-parser.c (header_parse): Check to make sure that the
6375 header was valid (ie, `colon' == ':'). If not, then set
6376 header->value to "".
6378 2002-05-26 Charles Kerr <charles@rebelbase.com>
6380 * alloca.c: removed.
6381 * gmime-charset.c: use g_alloca instead of alloca.
6382 * gmime-filter-from.c: same.
6383 * gmime-filter-strip.c: same.
6384 * gmime-iconv.c: same.
6385 * gmime-param.c: same.
6386 * gmime-part.c: same.
6387 * gmime-utils.c: same.
6390 2002-07-21 Jeffrey Stedfast <fejj@ximian.com>
6392 * gmime-filter-crlf.c (filter_filter): Fix to not add an extra \r
6393 for pre-canonicalised streams.
6395 2002-07-19 Jeffrey Stedfast <fejj@ximian.com>
6397 * gmime-iconv-utils.c (g_mime_iconv_strndup): Fix a logic mistake
6398 in the calculation of the number of bytes converted.
6400 2002-07-18 Jeffrey Stedfast <fejj@ximian.com>
6402 * gmime-part.c (set_disposition): Fix to parse the disposition
6403 parameter values rather than assuming it is only the "attachment"
6404 or "inline" part of the value.
6406 2002-07-14 Jeffrey Stedfast <fejj@ximian.com>
6408 * configure.in: check for gmtime_r
6410 * gmime-utils.c (g_mime_utils_header_format_date): Use gmtime_r() if
6411 we have this function available to us.
6413 * gmime-parser.c (parser_step_from): Save the From-line offset.
6414 (g_mime_parser_get_from_offset): Newly implemented function used
6415 for retrieving the offset of the From-line (for use when parsing
6418 2002-07-11 Jeffrey Stedfast <fejj@ximian.com>
6420 * strlib.c (strlcpy): Changed to behave the same as the Solaris
6422 (strlcat): Changed to behave the same as the Solaris strlcat
6425 2002-07-04 Jeffrey Stedfast <fejj@ximian.com>
6427 * gmime-iconv-utils.c (g_mime_iconv_strndup): Fix for
6428 nul-terminating some multibyte charsets.
6430 2002-06-28 Jeffrey Stedfast <fejj@ximian.com>
6432 * gmime-gpg-context.c (gpg_ctx_op_step): If we get an EOF from the
6433 status-fd, then set gpg->complete to TRUE.
6434 (gpg_ctx_get_argv): Use --charset=UTF-8 and --keyserver-options to
6435 disable auto-key-retrieve rather than the deprecated
6436 --no-auto-key-retrieve flag.
6438 2002-06-27 Jeffrey Stedfast <fejj@ximian.com>
6440 * gmime-gpg-context.c (gpg_ctx_op_step): Loop on our reads while
6441 errno is EINTR or EAGAIN. Also make sure to completely read stdout
6442 and stderr by keeping better state.
6443 (gpg_ctx_parse_status): If we encounted a NODATA error from gpg
6444 and we have diagnostics output, use that as the exception string.
6445 (gpg_ctx_op_exited): New function to determine if the gpg process
6447 (gpg_ctx_op_wait): Reuse any exit status information from
6448 gpg_ctx_op_exited().
6449 (gpg_verify): Check that the gpg process has not exited each loop.
6451 2002-06-26 Jeffrey Stedfast <fejj@ximian.com>
6453 * gmime-multipart-signed.c (g_mime_multipart_signed_sign): Once
6454 we've created the mime-part stream and armored the From lines and
6455 such, create a new MIME part based on this stream (since normally
6456 our QP encoder will not armor From lines) and use it as the
6457 content part for this multipart/signed part rather than the
6459 (multipart_signed_write_to_stream): This can now be simplified by
6460 calling our parent class's write_to_stream implementation since
6461 g_mime_multipart_signed_sign() takes care of all the From
6464 2002-06-26 Jeffrey Stedfast <fejj@ximian.com>
6466 * test-pgpmime.c: New test suite for the pgp/mime code.
6468 * gmime-gpg-context.c (gpg_ctx_parse_status): Handle a NODATA
6469 status message from gpg.
6471 * gmime-message.c (g_mime_message_new): Don't set NULL header
6472 values via the g_mime_object_set_header interface.
6474 * gmime-object.c (g_mime_object_add_header): Don't allow value == NULL.
6475 (g_mime_object_set_header): Same.
6477 * gmime.h.in: Updated to #include the new headers related to
6478 encryption and digital signatures.
6480 * gmime.c (g_mime_init): register the multipart/encrypted and
6481 multipart/signed cclass types.
6483 * gmime-multipart-signed.c: Fixed to compile cleanly.
6484 (multipart_signed_write_to_stream): We need to handle writing out
6485 the subparts ourselves because we need to armor From-lines.
6487 * gmime-multipart-encrypted.c: Fixed to compile cleanly.
6489 2002-06-25 Jeffrey Stedfast <fejj@ximian.com>
6491 * gmime-param.c (g_string_append_len_quoted): Append length as
6492 advertised rather than appending the whole string. Oops.
6494 * gmime-multipart-encrypted.c
6495 (g_mime_multipart_encrypted_decrypt): Ugh, the
6496 g_return_val_if_fail()'s should be returning NULL.
6498 * test-pgp.c: New test suite to make sure that the gpg code works.
6500 * gmime-gpg-context.c: Keep more state as it seems we needed
6501 it. Also keep information such as trust level and whether the
6502 signature was found to be valid and such (in case we ever decide
6505 2002-06-24 Jeffrey Stedfast <fejj@ximian.com>
6507 * gmime-multipart-signed.c (g_mime_multipart_signed_get_type):
6508 Register as a subclass of a GMimeMultipart.
6510 * gmime-multipart-encrypted.c
6511 (g_mime_multipart_encrypted_get_type): Same.
6513 * gmime-gpg-context.[c,h]: A new class implementing the
6514 GMimeCipherContext interfaces for GnuPG.
6516 * gmime-session.[c,h]: New abstract session class for use by the
6517 cipher context classes for requesting passphrases/etc.
6519 * gmime-cipher-context.c (g_mime_cipher_context_finalize): Unref
6522 2002-06-22 Jeffrey Stedfast <fejj@ximian.com>
6524 * gmime-part.c: Oops, a prototype had the wrong return type.
6526 2002-06-19 Jeffrey Stedfast <fejj@ximian.com>
6528 * gmime-multipart.c: Oops, some prototypes had the wrong return
6531 2002-06-15 Jeffrey Stedfast <fejj@ximian.com>
6533 * gmime-parser.c (parser_scan_mime_part_content): Use
6534 g_mime_stream_mem_new_with_byte_array() so that the mem stream
6535 owns the byte array so we don't leak.
6537 2002-06-12 Jeffrey Stedfast <fejj@ximian.com>
6539 * gen-table.c: Updated.
6541 * gmime-utils.c (quoted_decode): Oops. ESPECIALs are allowed
6542 inside of the encoded-text section of the encoded-word.
6544 * gmime-message.c (process_header): Add some NULL-protection.
6546 * gmime-iconv.c (g_mime_iconv_open): If the from charset is
6547 "x-unknown", replace it with the user's locale charset.
6549 2002-06-11 Jeffrey Stedfast <fejj@ximian.com>
6551 * gmime-parser.c (parser_scan_mime_part_content): If the parser
6552 stream is not seekable, then scan the content into a memory
6555 2002-06-09 Jeffrey Stedfast <fejj@ximian.com>
6557 * gmime-2.0.pc.in: New file for use in pkg-config.
6559 * gmime-filter-strip.[c,h]: New source files implementing a stream
6560 filter for stripping trailing whitespace from lines (needed for
6563 * gmime-exception.[c,h]: New source files implementing generic
6564 error reporting functionality.
6566 * gmime-cipher-context.[c,h]: New abstract class for performing
6567 common functionality (such as encryption, decryption, signing,
6568 verifying, importing keys, and exporting keys) needed by any MIME
6569 cipher suite (PGP/MIME and S/MIME specifically).
6571 * gmime-multipart-signed.[c,h]: New source files implementing the
6572 multipart/signed specification.
6574 * gmime-multipart-encrypted.[c,h]: New source files implementing
6575 the multipart/encrypted specification.
6577 2002-06-06 Jeffrey Stedfast <fejj@ximian.com>
6579 * test-mbox.c (test_parser): Test the new set_header_regex
6582 * gmime-parser.c (g_mime_parser_set_header_regex): New convenience
6583 function to allow an application to be notified when a header
6584 matching a particular pattern is parsed by the
6585 parser. Particularly useful for finding the Status: header when
6588 2002-06-04 Jeffrey Stedfast <fejj@ximian.com>
6590 * gmime-iconv-utils.c (g_mime_iconv_strndup): Pull up past fixes
6591 from the gmime-1 branch.
6593 2002-06-02 Jeffrey Stedfast <fejj@ximian.com>
6595 * gmime.c (g_mime_init): Register the message-part class.
6597 * gmime-message-part.c: New class for handling message/* subparts.
6599 * gmime-parser.c (parser_scan_message_part): Handle mime parts of
6601 (parser_construct_leaf_part): Find out if the leaf part is
6602 actually a message part.
6604 * gmime-filter-from.c (g_mime_filter_from_new): Now takes a mode
6605 argument to specify how "From "'s should be protected.
6606 (filter_filter): If we are to armor the "From " then transform it
6607 into "=46rom " otherwise transform it into the normal ">From ".
6609 2002-05-31 Jeffrey Stedfast <fejj@ximian.com>
6611 * gmime/gmime-stream-cat.c (stream_read): Rewritten to work
6612 correctly. This was broken worse than I could imagine :-)
6613 (stream_write): Fix similarly.
6615 2002-05-30 Jeffrey Stedfast <fejj@ximian.com>
6617 * gmime-stream-cat.c (stream_reset): Same.
6619 * gmime-stream-file.c (stream_reset): Same.
6621 * gmime-stream-fs.c (stream_reset): If the stream position is
6622 already reset, just return 0.
6624 2002-05-23 Jeffrey Stedfast <fejj@ximian.com>
6626 * doc/*: Updated documentation.
6628 2002-05-22 Jeffrey Stedfast <fejj@ximian.com>
6630 * gmime-multipart.c (multipart_write_to_stream): Avoid adding an
6631 extranious newline character when a preface doesn't exist.
6633 2002-05-20 Jeffrey Stedfast <fejj@ximian.com>
6635 * gmime-part.c (g_mime_part_set_content_md5): Fix some compiler
6636 warnings as well as doing some more error handling.
6637 (g_mime_part_verify_content_md5): Same.
6639 * md5-utils.c: Removed some compiler warnings.
6641 2002-05-20 Jeffrey Stedfast <fejj@ximian.com>
6643 * gmime-stream-cat.c (stream_seek): Return the absolute offset
6644 into the cat stream rather than the relative offset of one of the
6645 substreams on success. Fixed a few other things too.
6646 (stream_read): Fix the logic here so that we never try reading
6647 from a stream that is current at EOS.
6649 2002-05-16 Jeffrey Stedfast <fejj@ximian.com>
6651 * gmime-parser.c (parser_scan_mime_part_content): Only compensate
6652 for the '\n' if we found a boundary.
6654 2002-05-16 Charles Kerr <charles@rebelbase.com>
6656 * gmime-filter-yenc.c: fixed regression that caused end line of
6657 yenc encoding to not be detected. This was causing crc errors in Pan.
6659 2002-05-14 Jeffrey Stedfast <fejj@ximian.com>
6661 * gmime-stream-filter.c (stream_destroy): Removed.
6663 2002-05-12 Jeffrey Stedfast <fejj@ximian.com>
6665 * gmime-stream-cat.c (stream_read): Don't allow our caller to read
6666 past the end of the stream.
6667 (stream_write): Same.
6668 (stream_seek): Don't forget to add the current source stream's
6669 bound_start when seeking on the current source stream.
6671 * gmime-message-partial.c (g_mime_message_partial_init): Zero our
6673 (g_mime_message_partial_finalize): Cleanup strdup'd memory.
6674 (message_partial_set_content_type): Implemented.
6675 (g_mime_message_partial_class_init): Override set_content_type().
6676 (g_mime_message_partial_get_id): Simplify.
6677 (g_mime_message_partial_get_number): Simplify.
6678 (g_mime_message_partial_get_total): Simplify.
6680 * gmime-multipart.c (multipart_set_content_type): Implement.
6681 (g_mime_multipart_class_init): Override set_content_type().
6683 * gmime-object.c: Make set_content_type() virtual.
6685 2002-05-12 Jeffrey Stedfast <fejj@ximian.com>
6687 * gmime-message-partial.c (partial_compare): Fixed to work
6690 2002-05-12 Jeffrey Stedfast <fejj@ximian.com>
6692 * test-partial.c: New test suite for gmime-message-partial.c.
6694 * gmime-stream-cat.c: Several fixes.
6695 (g_mime_stream_cat_class_init): Overload the seek method.
6697 * gmime-stream-mmap.c (g_mime_stream_mmap_class_init): Overload
6700 * gmime-stream-buffer.c (g_mime_stream_buffer_class_init):
6701 Overload the seek method.
6703 * gmime-stream-null.c (g_mime_stream_null_class_init): Overload
6706 * gmime-stream-filter.c (g_mime_stream_filter_class_init):
6707 Overload the seek method.
6709 * gmime-stream.c (g_mime_stream_class_init): Overload the seek
6712 * gmime-stream-mem.c (g_mime_stream_mem_class_init): Overload the
6715 * gmime-stream-file.c (g_mime_stream_file_class_init): Overload
6717 (stream_length): The length of the stream is bound_end -
6720 * gmime-stream-fs.c (g_mime_stream_fs_class_init): Overload the
6722 (stream_length): The length of the stream is bound_end -
6725 2002-05-10 Jeffrey Stedfast <fejj@ximian.com>
6727 * gmime-stream-cat.c (stream_reset): Use stream_seek().
6728 (stream_read): Seek to position before starting our read, this is
6729 to protect against one of our source streams being read while we
6730 weren't looking and/or a substream related to our cat stream.
6731 (stream_write): Same.
6733 2002-05-09 Jeffrey Stedfast <fejj@ximian.com>
6735 * gmime-message-partial.c: New class to handle MIME parts with a
6736 content-type of message/partial.
6738 * gmime.c (g_mime_init): Register the message/partial class.
6740 * gmime-object.c (g_mime_object_new_type): If we fail to find an
6741 appropriate mime object class, try falling back to the */*
6742 handler. Only if that fails do we return NULL.
6744 2002-05-08 Jeffrey Stedfast <fejj@ximian.com>
6746 * Makefile.am: Added gmime-stream-cat.c to the build.
6748 * gmime-stream-cat.c: New stream that acts similar to the Unix
6749 `cat` command by concatenating multiple streams.
6751 2002-05-07 Jeffrey Stedfast <fejj@ximian.com>
6753 * gmime-stream-fs.c (stream_write): Do more error handling and
6754 also try to write out everything.
6756 2002-05-02 Jeffrey Stedfast <fejj@ximian.com>
6758 * gmime-charset.c (main): Generate the multibyte charsets without
6759 the need for using external .dat files. Also attempt to condense
6760 the charset-map table a bit.
6762 * gen-multibyte.c: Removed.
6764 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
6766 * gmime-charset.c (main): Instead of converting the multibyte
6767 charset tables to UTF-8 and then using the unicode functions to
6768 convert UTF-8 to UCS4, just convert directly to UCS4. Also fixed a
6769 type-o in the Big5.dat filename (it should be Big5.dat not
6772 2002-04-26 Jeffrey Stedfast <fejj@ximian.com>
6774 * gmime-parser.c (parser_fill): Try to align the end of our
6775 left-over buffer with realbuf + SCAN_HEAD so that we avoid: 1)
6776 completely filling the prespace or 2) reading more than SCAN_BUF
6777 bytes per read() call.
6779 2002-04-25 Jeffrey Stedfast <fejj@ximian.com>
6781 * gmime-utils.c (g_mime_utils_base64_decode_step): Only backtrack
6782 if we have output data.
6784 2002-04-23 Jeffrey Stedfast <fejj@ximian.com>
6786 * gmime-utils.c (rfc2047_encode_phrase): Fixed a small memory
6787 leak. Thanks to the Pan guys for finding this.
6789 2002-04-21 Jeffrey Stedfast <fejj@ximian.com>
6791 * gmime-parser.c (parser_step_from): Fixes to make it work.
6792 (g_mime_parser_eos): New function to tell if a parser is at the
6795 2002-04-20 Jeffrey Stedfast <fejj@ximian.com>
6799 * configure.in: Add $srcdir to the include path so it catches
6802 2002-04-18 Jeffrey Stedfast <fejj@ximian.com>
6804 * gmime-parser.c (parser_step_headers): Take advantage of the same
6805 optimization as parser_scan_content.
6807 2002-04-17 Jeffrey Stedfast <fejj@ximian.com>
6809 * gmime-parser.c (parser_scan_content): Optimized by a good 15% by
6810 simply changing my inner while-loop. See comment for explanation.
6812 * gmime-part.c (g_mime_part_encoding_from_string): Added support
6813 for the binary encoding.
6814 (g_mime_part_encoding_to_string): Same.
6816 * gmime-utils.h: Added GMIME_PART_ENCODING_BINARY.
6818 2002-04-17 Jeffrey Stedfast <fejj@ximian.com>
6820 * gmime-parser.c (parser_scan_multipart_subparts): Don't leak
6823 2002-04-16 Jeffrey Stedfast <fejj@ximian.com>
6825 * gmime-message.c (process_header): process the headers we care
6827 (message_add_header): Call process_header.
6828 (message_set_header): Same.
6830 * gmime-part.c (process_header): process the headers we care
6832 (mime_part_add_header): Call process_header.
6833 (mime_part_set_header): Same.
6835 * gmime-object (process_header): process the headers we care
6837 (add_header): Call process_header.
6840 2002-04-15 Jeffrey Stedfast <fejj@ximian.com>
6842 * gmime-parser.c (g_mime_parser_set_scan_from): New accessor
6843 method to set whether or not to scan from-lines.
6844 (g_mime_parser_get_scan_from): New accessor method to get the
6847 2002-04-14 Jeffrey Stedfast <fejj@ximian.com>
6849 * gmime-utils.c (datetok): Treat ',' as a token delimeter. Also
6850 updated the datetok lookup table.
6852 * configure.in: Check for off_t, size_t, and ssize_t.
6854 2002-04-15 Jeffrey Stedfast <fejj@ximian.com>
6856 * gmime-parser.[c,h]: Brand spankin' new parser. Seems to work for
6857 at least simple messages, needs a lot more love though.
6859 * gmime-stream*.c: Don't use a base_class init or finalize.
6861 * gmime-object.c: Same.
6863 * gmime-part.c: Same here.
6865 * gmime.c (g_mime_init): Call g_type_init.
6867 * gmime-utils.c (g_mime_utils_header_fold): Slight bugfix to get
6868 rid of extra whitespace at the end of a line.
6870 * gmime-multipart.c (g_mime_multipart_set_preface): New accesor
6871 function to set the multipart preface.
6872 (g_mime_multipart_get_preface): New accesor function to get the
6874 (g_mime_multipart_set_postface): New accesor function to set the
6876 (g_mime_multipart_get_postface): New accesor function to get the
6878 (write_to_stream): Don't force a preface if we don't have one.
6880 2002-04-08 Jeffrey Stedfast <fejj@ximian.com>
6882 * gmime-object.c: Don't tie the type-registry lifetime to the
6883 GMimeObject lifetime.
6885 * gmime.c (g_mime_init): Register our generic and multipart/* MIME
6886 object classes here.
6888 * gmime-part.c (g_mime_part_class_init): Don't register ourselves
6891 * gmime-multipart.c (g_mime_multipart_class_init): Don't register
6892 ourselves here anymore.
6894 2002-04-07 Jeffrey Stedfast <fejj@ximian.com>
6896 * gmime-utils.c (g_mime_utils_uuencode_close): Fixed a bug that
6897 crept in during my simplification.
6899 2002-04-07 Jeffrey Stedfast <fejj@ximian.com>
6901 * gmime-part.c (g_mime_part_set_content_id): Wrap the object
6903 (g_mime_part_get_content_id): Same.
6906 (g_mime_multipart_get_subpart_from_content_id): Compare the
6907 object->content_id's.
6909 * gmime-object.c (g_mime_object_set_content_id): New function
6910 since the Content-Id should really be stored on the object class.
6911 (g_mime_object_get_content_id): Same.
6912 (set_header): If we are setting the Content-Id header, also set
6913 our internal content_id member.
6916 * gmime-content-type.c (g_mime_content_type_set_parameter):
6917 Renamed from g_mime_content_type_add_parameter.
6919 * gmime-multipart.c (g_mime_multipart_new_with_subtype): New
6920 convenience function.
6922 * Makefile.am temporarily removed gmime-parser.c from the
6923 build. It needs to be completely rewritten from scratch pretty
6926 2002-04-06 Jeffrey Stedfast <fejj@ximian.com>
6928 * gmime-part.c (g_mime_part_add_subpart): Removed.
6929 (g_mime_part_set_boundary): Removed.
6930 (g_mime_part_get_boundary): Removed.
6932 * gmime-object.c (g_mime_object_get_content_type_parameter): New
6934 (g_mime_object_set_content_type_parameter): New function.
6936 * gmime-multipart.c (g_mime_multipart_new): New function, forgot
6937 to implement it before ;-)
6938 (multipart_set_boundary): Set the boundary parameter on the
6941 2002-04-06 Jeffrey Stedfast <fejj@ximian.com>
6943 * gmime-part.c (g_mime_part_foreach): Removed.
6944 (g_mime_part_get_subpart_from_content_id): Same.
6946 * gmime-multipart.c (g_mime_multipart_foreach): Moved here from
6947 gmime-part.c:g_mime_part_foreach since this is really only meant
6948 to work on multiparts.
6949 (g_mime_multipart_get_subpart_from_content_id): Same idea here too.
6951 * gmime-object.c (g_mime_object_set_content_type): Move
6952 g_mime_part_set_content_type up to the GMimeObject abstraction.
6953 (g_mime_object_get_content_type): Same.
6955 2002-04-03 Jeffrey Stedfast <fejj@ximian.com>
6957 * gmime-message.c: Initial port to GObject.
6959 2002-04-02 Jeffrey Stedfast <fejj@ximian.com>
6961 * gmime-message.c (g_mime_message_add_recipients_from_string):
6962 Destroy the temporary addrlist.
6964 2002-03-29 Jeffrey Stedfast <fejj@ximian.com>
6966 * configure.in: Detect the iconv-friendly formats for iso charsets
6967 at configure time and dump them into iconv-detect.h for use in
6970 * gmime-charset.c: Updated to use iconv-detect.h if it exists.
6972 2002-03-25 Jeffrey Stedfast <fejj@ximian.com>
6974 * gmime-multipart.c: Compile fixes.
6976 * gmime-header.c (g_mime_header_write_to_stream): Now returns the
6977 number of bytes written or -1 on fail.
6979 * gmime-object.c: Compile fixes.
6981 * gmime-stream-null.c (g_mime_stream_null_finalize): And finally
6984 * gmime-stream-mmap.c (g_mime_stream_mmap_finalize): Here too.
6986 * gmime-stream-mem.c (g_mime_stream_mem_finalize): And again...
6988 * gmime-stream-fs.c (g_mime_stream_fs_finalize): Again here.
6990 * gmime-stream-filter.c (g_mime_stream_filter_finalize): Here too.
6992 * gmime-stream-file.c (g_mime_stream_file_finalize): Same.
6994 * gmime-stream-buffer.c (g_mime_stream_buffer_finalize): Call
6995 GObject's finalize function.
6997 2002-03-24 Jeffrey Stedfast <fejj@ximian.com>
6999 * memchunk.c: Make this compile.
7001 * internet-address.c (decode_mailbox): No longer check
7002 gmime_interfaces_utf8 as that was a hack in gmime-1's branch.
7004 * gmime-charset.c (charset_step): Sync with the gmime-1 branch. We
7005 now have multibyte charset detection.
7007 * gmime-utils.c: Sync with gmime-1's changed.
7008 (rfc2047_decode_word): Always convert decoded text to UTF-8.
7009 (rfc2047_encode_phrase_get_words): We can always assume our input
7011 (rfc2047_encode_phrase): Sam here.
7012 (g_string_append_len): Removed since glib2 now has this function.
7014 * gmime-param.c (decode_param): Make sure the decoded text is
7016 (encode_param): Convert to the best charset before encoding.
7017 (g_string_append_len): Removed since glib2 now has this function.
7019 * gmime.c (g_mime_init): Initializes gmime. We no longer care
7020 about GMIME_INIT_FLAGS_UTF8 as we now always use UTF-8 interfaces.
7022 2002-03-17 Jeffrey Stedfast <fejj@ximian.com>
7024 * gmime-stream-null.c (g_mime_stream_null_get_type): Use
7025 GMIME_TYPE_STREAM as our base class.
7026 (g_mime_stream_null_class_init): Our parent class is a
7027 GMIME_STREAM_CLASS, not a G_OBJECT_CLASS.
7028 (g_mime_stream_null_finalize): Call our parent's finalize, which
7029 is GMIME_STREAM_CLASS's finalize, not G_OBJECT_CLASS's finalize.
7031 * gmime-stream-mmap.c: Same.
7033 * gmime-stream-filter.c: Here too.
7035 * gmime-stream-file.c: And here.
7037 * gmime-stream-fs.c: Again here.
7039 * gmime-stream-mem.c: And again...
7041 * gmime-stream-buffer.c: And finally here.
7043 * gmime-multipart.[c,h]: New class that inherits from GMimeObject
7044 that represents a MIME multipart.
7046 2002-03-17 Jeffrey Stedfast <fejj@ximian.com>
7048 * gmime-object.c: Ported to glib2 by subclassing GObject and also
7049 added a GMimeHeader data member and methods to access those
7050 headers as well as adding abstract methods for getting the headers
7051 as one big string buffer and writing the object headers/content to
7054 * gmime-stream-*.c (*_class_init): Don't set a destroy handler -
7055 we can't, we don't have a virtual function pointer for it!
7057 * gmime-stream.c (g_mime_stream_substream): Use GET_CLASS since we
7058 are passing in an object.
7059 (g_mime_stream_length): Same.
7060 (g_mime_stream_tell): Here too.
7061 (g_mime_stream_seek): And here.
7062 (g_mime_stream_reset): And again here.
7063 (g_mime_stream_eos): Again.
7064 (g_mime_stream_close): Here too.
7065 (g_mime_stream_flush): Same.
7066 (g_mime_stream_write): Same here.
7067 (g_mime_stream_read): And finally here.
7068 (g_mime_stream_class_init): Setup default implementations of all
7069 the stream methods. Also no longer set a destroy handler.
7071 * gmime-stream-buffer.[c,h]: Updated to subclass the new
7072 GMimeStream based on GObject.
7074 2002-03-16 Jeffrey Stedfast <fejj@ximian.com>
7076 * gmime-stream-filter.[c,h]: Updated to subclass the new
7077 GMimeStream based on GObject.
7079 * gmime-stream-fs.[c,h]: Updated to subclass the new GMimeStream
7082 * gmime-stream-file.[c,h]: Updated to subclass the new GMimeStream
7085 * gmime-stream-mmap.[c,h]: Updated to subclass the new GMimeStream
7088 * gmime-stream-null.[c,h]: Updated to subclass the new GMimeStream
7091 * gmime-stream-mem.[c,h]: Updated to be based on the new
7092 implementation of GMimeStream.
7094 * gmime-type-utils.h: New file to contain some more-friendly
7095 type-cast macros around the glib2 ones.
7097 * gmime-stream.[c,h]: Now subclasses GObject. Not sure if I got
7098 everything right, but I think it's mostly there?
7100 2002-03-15 Charles Kerr <charles@rebelbase.com>
7102 * gmime-filter-charset.c: fixed minor compiler warnings.
7103 * gmime-iconv-utils.c: same.
7104 * test-html.c: same.
7105 * test-iconv.c: same.
7106 * test-mime.c: same.
7107 * test-streams.c: same.
7109 2002-03-15 Jeffrey Stedfast <fejj@ximian.com>
7111 * gmime-utils.c (g_mime_utils_uudecode_step): Fixed a logic
7112 mistake. All is good now in the land of UU :-)
7114 2002-03-15 Charles Kerr <charles@rebelbase.com>
7116 Syncing up with small changes from Pan...
7118 * gmime-content-type.c: remove unused #include <alloca.h>
7119 * gmime-message.c: same.
7120 * gmime-part.c: same.
7121 * internet-address.c: same.
7123 * gmime-filter-basic.c: add #include <string.h> (strncmp)
7124 * gmime-filter-yenc.c: add #include <string.h> (strncmp)
7125 * gmime-iconv-utils.c: add #include <string.h> (strlen)
7126 * gmime-iconv.c: add #include <string.h> (strlen)
7127 * gmime-iconv.c: add #include <stdio.h> (sprintf)
7129 2002-03-14 Jeffrey Stedfast <fejj@ximian.com>
7131 * gmime-filter-yenc.c (filter_reset): Added a switch-statement
7132 based on direction. Yes, for now the INIT state for encode/decode
7133 are both the same but this may change? Probably not but oh well
7135 (g_mime_ydecode_step): Sync up with Charles' yenc fixes.
7137 2002-03-13 Jeffrey Stedfast <fejj@ximian.com>
7139 * gmime-filter-yenc.c: Compile fixes.
7141 2002-03-12 Jeffrey Stedfast <fejj@ximian.com>
7143 * gmime-filter-yenc.c (g_mime_filter_yenc_get_pcrc): Finalize the
7144 crc before returning.
7145 (g_mime_filter_yenc_get_crc): Same.
7147 2002-03-12 Jeffrey Stedfast <fejj@ximian.com>
7149 * gmime-filter-yenc.c: New filter to encode/decode yEnc streams.
7151 2002-03-03 Jeffrey Stedfast <fejj@ximian.com>
7153 Thanks to Carlos Morgado <chbm@chbm.nu>
7155 * gmime.spec.in: Fix.
7157 2002-03-03 Jeffrey Stedfast <fejj@ximian.com>
7159 * gmime-part.c (g_mime_part_write_to_stream): Get rid of some
7162 2002-02-21 Jeffrey Stedfast <fejj@ximian.com>
7166 * configure.in: Updated version to 0.8.0
7168 2002-01-25 Jeffrey Stedfast <fejj@ximian.com>
7170 * gmime-charset.c (g_mime_charset_name): Updated for AIX, HPUX,
7171 IRIX, and Sun systems.
7173 2002-01-24 Jeffrey Stedfast <fejj@ximian.com>
7175 * gmime-iconv.c (iconv_cache_bucket_add_node): Fixed an oops.
7176 (iconv_cache_bucket_get_first_unused): Fixed another oops.
7178 2002-01-20 Jeffrey Stedfast <fejj@ximian.com>
7180 * gmime-data-wrapper.c (g_mime_data_wrapper_write_to_stream):
7181 Handle the x-uuencode encoding type.
7183 * gmime-utils.c (g_mime_utils_uuencode_close): No longer needs a
7184 uulen argument since it is now compacted into the state argument.
7185 (g_mime_utils_uuencode_step): Same here.
7187 * gmime-filter-basic.c (filter_filter): Ignore data until we have
7188 found the "begin" line. Also, we no longer need uulen.
7189 (filter_complete): Same.
7191 * gmime-part.c (g_mime_part_encoding_to_string): Handle
7193 (g_mime_part_encoding_from_string): Same.
7194 (g_mime_part_set_pre_encoded_content): Here too.
7195 (write_content): And again here.
7197 2002-01-19 Jeffrey Stedfast <fejj@ximian.com>
7199 * gmime-iconv.c (iconv_node_new): Return the node - how did I miss
7202 2002-01-18 Jeffrey Stedfast <fejj@ximian.com>
7204 * configure.in: Fixed more silliness.
7206 * acconfig.h: Added #undef's for some iconv stuff.
7208 * gmime-filter-charset.c (g_mime_filter_charset_new): Put the
7209 charset arguments in the right order.
7211 * gmime-iconv.c (g_mime_iconv_open): Swap the to/from arguments so
7212 that they are in the same order as iconv_open.
7214 * gmime-iconv-utils.c (iconv_utils_init): Put the to/from
7215 arguments in the right order.
7217 2002-01-17 Jeffrey Stedfast <fejj@ximian.com>
7219 * gmime-iconv-utils.c (g_mime_iconv_strndup): If we get an EILSEQ,
7220 just return NULL rather than g_strndup'ing the original
7221 string. We'd rather get back NULL and know it failed than get back
7222 a string thinking everything went okay.
7224 * configure.in: Fixed some silliness, thanks to Charles Schmidt.
7226 2002-01-16 Jeffrey Stedfast <fejj@ximian.com>
7228 * gmime-iconv-utils.c (g_mime_iconv_strndup): New utility function
7229 to iconv n bytes of a string and return a buffer containing the
7231 (g_mime_iconv_strdup): Same but for the whole string.
7232 (g_mime_iconv_locale_to_utf8): Converts a string in the locale
7234 (g_mime_iconv_locale_to_utf8_length): Same but for a sublength of
7236 (g_mime_iconv_utf8_to_locale): Converts a string from utf8 to the
7238 (g_mime_iconv_utf8_to_locale_length): Same but for a sublength of
7241 2002-01-15 Jeffrey Stedfast <fejj@ximian.com>
7243 * test-iconv.c: test suite to make sure that the gmime-iconv cache
7246 * gmime-iconv.c (g_mime_iconv_init): Initialize the iconv_node
7248 (g_mime_iconv_shutdown): Destroy the iconv_node memchunk.
7249 (iconv_node_destroy): Use memchunk_free instead of g_free.
7250 (iconv_node_new): Use memchunk_alloc.
7251 (iconv_node_set_used): Add/Remove the node to the iconv_open_hash.
7253 2002-01-14 Jeffrey Stedfast <fejj@ximian.com>
7255 * configure.in: Bumped the version to 0.7.7
7257 * doc/*: Updated to document the new gmime-iconv interfaces.
7259 * gmime-filter-charset.c (g_mime_filter_charset_new): Use
7260 g_mime_iconv_open instead of iconv_open. Also no longer need to
7261 use g_mime_charset_name() since gmime-iconv does this for us.
7262 (filter_destroy): Use g_mime_iconv_close() instead of
7265 * gmime-iconv.c (g_mime_iconv_open): New wrapper around
7266 iconv_open() so that we can cache the results. This'll be a major
7267 speedup for systems like Solaris where iconv_open() must dlopen a
7268 module for each of the charsets. Also uses g_mime_charset_name()
7269 to get the iconv-friendly charset name for you.
7270 (g_mime_iconv_close): New wrapper around iconv_close().
7272 2002-01-13 Jeffrey Stedfast <fejj@ximian.com>
7274 * configure.in: Bumped version to 0.7.6
7276 * doc/*: Updated to document the new charset code.
7278 * gmime.h.in: Added #includes for gmime-charset.h and
7279 gmime-filter-charset.h.
7281 * gmime-filter-charset.c: New filter for converting text between
7282 charsets using iconv.
7284 * gmime-charset.c (g_mime_charset_name): New function to derive
7285 the iconv-friendly name for a given charset.
7287 2002-01-09 Charles Kerr <charles@rebelbase.com>
7289 * internet-address.c (internet_address_list_prepend): replaced
7290 "g_return_if_fail" with "g_return_val_if_fail".
7291 * internet-address.c (internet_address_list_append): same.
7293 * internet-address.c (internet_address_set_group): removed
7294 unused variables to shut up compiler.
7295 * gmime-param.c (rfc2184_decode): same.
7297 2002-01-08 Jeffrey Stedfast <fejj@ximian.com>
7299 * config.h.in: Added a #include <alloca.h> if HAVE_ALLOCA_H is
7300 defined - this limits the number of places I have to conditionally
7301 add #include <alloca.h> in the source files.
7303 2002-01-05 Jeffrey Stedfast <fejj@ximian.com>
7305 * gmime-utils.c (parse_broken_date): Implemented.
7307 2002-01-04 Jeffrey Stedfast <fejj@ximian.com>
7309 * memchunk.c (memchunk_clean): Oops, when tree_search() returns 0
7310 we want to prune it, not the other way around :-)
7312 2002-01-02 Jeffrey Stedfast <fejj@ximian.com>
7314 * memchunk.c (memchunk_clean): Fixed a logic mistake that
7315 prevented pruning of the head node.
7317 2002-01-01 Charles Kerr <charles@rebelbase.com>
7319 * gmime-message (g_mime_message_get_body): added g_return_val_if_fail
7320 checks in the entry point.
7322 2001-12-31 Jeffrey Stedfast <fejj@ximian.com>
7324 * internet-address.c (decode_address): Optimized group parsing.
7328 2001-12-31 Jeffrey Stedfast <fejj@ximian.com>
7330 * strlib.c (strncasecmp): Convert the chars to lowercase before
7333 2001-12-30 Jeffrey Stedfast <fejj@ximian.com>
7335 * configure.in: Bumped version number to 0.7.5 since the
7336 internet-address API and bits of the gmime-message API have
7339 * internet-address.c (internet_address_new): Initialize the
7341 (internet_address_destroy): This is now an internal function.
7342 (internet_address_ref): New function to ref an InternetAddress
7344 (internet_address_unref): New function to unref an InternetAddress
7346 (internet_address_set_group): Updated to use the new
7347 internet_address_list functions.
7348 (internet_address_add_member): Same.
7349 (internet_address_list_prepend): New function to manipulate a list
7350 of InternetAddress objects.
7351 (internet_address_list_append): Same.
7352 (internet_address_list_concat): Another new function.
7353 (internet_address_list_length): Again...
7354 (internet_address_list_destroy): Destroy a list of addresses.
7355 (internet_address_list_to_string): New utility function to write a
7356 list of addresses to a string.
7357 (internet_address_parse_string): Optimized slightly by not using
7358 GLists' generic append function and also updated to use
7359 InternetAddressList.
7361 * gmime-message.c (recipients_destroy): Updated to call
7362 internet_address_list_destroy.
7363 (sync_recipient_header): Updated to let the InternetAddress code
7365 (g_mime_message_add_recipient): Updated to use the new
7366 InternetAddress API.
7367 (g_mime_message_add_recipients_from_string): Same.
7368 (g_mime_message_get_recipients): Return an InternetaddressList
7371 2001-12-30 Jeffrey Stedfast <fejj@ximian.com>
7373 * strlib.c (strncasecmp): Do null-checking.
7375 * TODO: Remove features that have already been
7376 implemented/fixed/whatever.
7378 2001-12-30 Jeffrey Stedfast <fejj@ximian.com>
7380 * memchunk.c (memchunk_clean): Prune 'cleaned' nodes from our
7381 free-node list. Thanks to Charles Kerr for discovering this bug.
7383 * strlib.c (strncasecmp): Moved the return calculation to within
7384 the loop so as to only take a difference if the strings are not
7385 identical. This also fixes a bug that would falsely return
7386 non-zero for strings that were identical for the first n bytes.
7388 2001-12-20 Jeffrey Stedfast <fejj@ximian.com>
7390 * gmime-stream.c (g_mime_stream_construct): 'type' is now an
7391 unsigned int rather than a signed int.
7393 * memchunk.c (memchunk_clean): Oops. Don't forget to free the tree
7394 after we're finished with it...
7396 2001-12-18 Jeffrey Stedfast <fejj@ximian.com>
7398 Various compiler warning fixes to several source files (mostly
7399 "unused variable" type stuff).
7401 2001-12-17 Jeffrey Stedfast <fejj@ximian.com>
7403 * gmime-utils.c (datetok): reimplement to not use GLists
7404 (appending is slow) and also to not g_strndup the token, instead
7405 just remember it's offset and length so we can examine it later.
7406 (decode_int): New function to decode an int.
7407 (get_wday): Now takes an inlen argument.
7408 (get_mday): Same. Also calls decode_int.
7409 (get_month): Here too.
7410 (get_year): Again here... also calls decode_int.
7411 (get_tzone): Modified to use struct _date_token.
7412 (get_time): Completely rewritten.
7414 2001-12-16 Jeffrey Stedfast <fejj@ximian.com>
7416 * memchunk.[c,h]: A memchunk library similar to g_mem_chunk's but
7419 2001-12-16 Jeffrey Stedfast <fejj@ximian.com>
7421 * configure.in: Added a --enable-warnings to turn on compiler
7424 * gmime-utils.c: Various compiler warning cleanup.
7426 * gmime-object.c (g_mime_object_construct): Change the type
7427 argument to be of type unsigned rather than int.
7429 * gmime-filter-html.c (url_extract): g_strndup takes an unsigned
7432 * gmime-filter-from.c (filter_filter): memcpy takes an unsigned
7435 * gmime-disposition.c (g_mime_disposition_new): g_strndup takes an
7436 unsigned length argument.
7438 * gmime-content-type.c (g_mime_content_type_new_from_string):
7439 g_strndup takes an unsigned length argument.
7441 * gmime-charset.c (g_mime_charset_init): g_strndup takes an
7442 unsigned length argument.
7444 2001-12-16 Jeffrey Stedfast <fejj@ximian.com>
7446 * gmime-part.c (g_mime_part_destroy): Now an internal-only method.
7448 * gmime-message.c (g_mime_message_destroy): Now an internal-only
7451 2001-12-05 Jeffrey Stedfast <fejj@ximian.com>
7453 * gmime-filter-basic.c (filter_filter):
7454 (filter_complete): The outbuf for QP decoding can be up to len + 2
7455 bytes and UU decoding outbuf can be up to len + 3 bytes.
7457 2001-12-01 Jeffrey Stedfast <fejj@ximian.com>
7459 * gmime-parser.c (parse_content_headers): Set is_multipart to
7461 (g_mime_parser_construct_part_internal): Get the inlen properly
7462 and do content-offsetting a little better by skipping past the
7463 end-of-header marker.
7465 * gmime-stream-buffer.c (g_mime_stream_buffer_gets): Use the
7466 'register' keyword for some variables.
7468 * gmime-data-wrapper.c (g_mime_data_wrapper_set_stream): Safeguard
7469 against NULL streams.
7470 (g_mime_data_wrapper_write_to_stream): Reset the stream before
7473 * gmime-stream-mem.c (stream_seek): Fix to work like the others.
7474 (stream_read): On error, always return -1 (and not just any value
7476 (stream_write): Same.
7478 2001-11-30 Jeffrey Stedfast <fejj@ximian.com>
7480 * gmime-part.c (write_content): Implemented a slight optimization
7481 which bypasses the need to do any encoding in certain
7484 2001-11-28 Jeffrey Stedfast <fejj@ximian.com>
7486 * pan-mime-parser.c (parser_read_until_boundary): Make sure
7487 boundary is non-NULL before calling strlen on it.
7489 2001-11-26 Jeffrey Stedfast <fejj@ximian.com>
7491 * gmime-parser.c (g_mime_parser_construct_part_internal): Fixed a
7492 bug - don't set bounds on the original stream, set the bounds on
7493 our temporary memory stream. Also got rid of find_header_end().
7495 * gmime-filter-from.c (filter_filter): initialize fromcount to 0.
7497 2001-11-25 Jeffrey Stedfast <fejj@ximian.com>
7499 * strlib.c (strlcpy): BSD defines the prototype as returning
7500 size_t, the strlen of the resultant string.
7503 * gmime-stream-buffer.c (stream_flush): Oops, memmove the buffer
7504 too and a smidgen of code cleanup.
7505 (stream_reset): Fix reset for block write mode.
7507 * configure.in: Bumped the version to 0.7.4 and added checks for
7508 system mmap functions.
7510 * gmime-stream-mmap.[c,h]: New stream that uses an mmaped buffer.
7512 2001-11-24 Jeffrey Stedfast <fejj@ximian.com>
7514 * doc/gmime-docs.sgml: Added documentation of the use of filters.
7516 2001-11-23 Jeffrey Stedfast <fejj@ximian.com>
7518 * gmime-stream-buffer.c (stream_seek): Implemented.
7520 * gmime-parser.c (parse_content_headers): Fixed another memory
7523 * gmime-param.c (decode_param_list): Fixed a small memory leak.
7525 2001-11-22 Jeffrey stedfast <fejj@ximian.com>
7527 * gmime-filter-from.[c,h]: New filter to escape from-lines.
7529 * pan-mime-parser.c (parser_read_until_boundary): Slight
7532 2001-11-21 Jeffrey Stedfast <fejj@ximian.com>
7534 * gmime-utils.c (is_8bit_word_encoded): Make into a macro, we
7535 don't need to do a strlen because the atom is a GString which
7536 means we have it's length already. This also saves us some
7537 overhead of calling a function.
7538 (g_mime_utils_8bit_header_decode): Update to pass the len argument
7539 to is_8bit_word_encoded.
7541 2001-11-18 Jeffrey Stedfast <fejj@ximian.com>
7543 * configure.in: Bumped version to 0.7.3
7545 * gmime-param.c: GMimeParam is now a linked list of parameters
7546 rather than a single name/value pair.
7547 (g_mime_param_new_from_string): Now returns a parameter list based
7548 on the input string rather than only returning a single parameter
7549 name/value pair. Also updated to handle rfc2184 encoded
7551 (g_mime_param_destroy): Destroy the linked list of params.
7552 (g_mime_param_append): Append a new parameter.
7553 (g_mime_param_append_param): Append a new parameter object.
7554 (g_mime_param_write_to_string): New function (which replaces
7555 g_mime_param_to_string) which correctly encodes (either by quoting
7556 the value or rfc2184 encoding it) the list of parameters and
7557 optionally folds them suitable for header wrapping.
7559 * gmime-disposition.[c,h]: New source files to handle
7560 parsing/generating Content-Disposition headers.
7562 * gmime-part.c (g_mime_part_destroy): Updated to use
7563 g_mime_disposition_destroy.
7564 (g_mime_part_set_content_disposition_object): New function for
7565 setting the disposition object on a mime part.
7566 (g_mime_part_set_content_disposition): Updated to use
7567 g_mime_disposition_set.
7568 (g_mime_part_get_content_disposition): Updated to use
7569 g_mime_disposition_get.
7570 (g_mime_part_add_content_disposition_parameter): Updated to use
7571 g_mime_disposition_add_parameter.
7572 (g_mime_part_get_content_disposition_parameter): Updated to use
7573 g_mime_disposition_get_parameter.
7574 (g_mime_part_set_filename): Updated to use
7575 g_mime_disposition_add_parameter.
7576 (g_mime_part_get_filename): Updated to use
7577 g_mime_disposition_get_parameter.
7579 * gmime-content-type.c (g_mime_content_type_new_from_string): Use
7580 the gmime-param code to parse any Content-Type parameters.
7581 (g_mime_content_type_destroy): Updated to use
7582 g_mime_param_destroy.
7583 (g_mime_content_type_add_parameter): Updated to use g_mime_param
7586 * gmime-utils.c (g_mime_utils_header_fold): Fixed a small header
7589 * gmime-parser.c (parse_content_headers): Updated to use the
7590 GMimeDisposition parser.
7592 * pan-mime-parser.c (parse_content_headers): Updated to use the
7593 GMimeDisposition parser.
7595 2001-11-16 Jeffrey Stedfast <fejj@ximian.com>
7597 * configure.in: Bumped version to 0.7.2 due to the change-over to
7598 refcounted mime objects.
7600 * gmime-object[c,h]: New source files that implement an abstract
7603 * gmime-message.c: Updated to subclass GMimeObject
7605 * gmime-part.c: Updated to subclass GMimeObject
7606 (g_mime_part_set_content_header): Set an arbitrary mime content
7608 (g_mime_part_get_content_header): Get an arbitrary mime content
7610 (g_mime_part_add_child): Finally deprecated, please use
7611 g_mime_part_add_subpart instead if you aren't already.
7613 * gmime-parser.c: Updated to unref mime parts where appropriate as
7614 well as set unknown content headers on mime parts.
7616 * pan-mime-parser.c: Same as gmime-parser.c
7618 2001-11-14 Jeffrey Stedfast <fejj@ximian.com>
7620 * gmime-stream-null.c (g_mime_stream_null_new): A new stream,
7621 similar to /dev/null basically.
7623 2001-11-10 Jeffrey Stedfast <fejj@ximian.com>
7625 * configure.in: Added checks for strlib functions and bumped the
7626 version to 0.7.1 (there won't be an official 0.7.1 release but I
7627 figure I should be bumping version numbers whenever I add
7630 * strlib.[c,h]: New string library that provides anything that the
7631 system libc doesn't (includig strnstr and stpcpy).
7633 * gmime-filter-html.[c,h]: New filter that converts plain text
7634 into HTML suitable for display in things like GtkHTML (makes urls
7635 into hyperlinks and preserves whitespace and such).
7637 * gmime-parser.c (g_strstrbound): Removed.
7638 (find_header_part_end): Use strnstr.
7639 (g_mime_parser_construct_part_internal): Use strnstr.
7641 2001-10-26 Jeffrey Stedfast <fejj@ximian.com>
7643 * configure.in: Updated the version to 0.7.0
7647 2001-10-25 Jeffrey Stedfast <fejj@ximian.com>
7649 * gmime-message.c (g_mime_message_new): Now takes an
7650 "init_headers" argument, it doesn't really matter what value you
7651 put here - it's more a "I want my message headers to be in a nice
7652 friendly order rather than the order they are set in".
7654 * gmime-parser.c (g_mime_parser_construct_message): Use
7655 !preserve_headers as the init_headers argument to
7656 g_mime_message_new ().
7658 * pan-mime-parser.c (g_mime_parser_construct_message): Same.
7660 2001-10-24 Jeffrey Stedfast <fejj@ximian.com>
7662 * pan-mime-parser.c (construct_message_headers): Use
7663 g_mime_header_add instead of g_mime_header_set so we can get
7664 multiple of the same header (such as "Received:").
7666 * gmime-parser.c (construct_headers): Use g_mime_header_add
7667 instead of g_mime_header_set so we can get multiple of the same
7668 header (such as "Received:") and also move it into the switch
7669 statement into the default case.
7671 * gmime-message.c (g_mime_message_set_header): New function to add
7672 a header to a message.
7674 * gmime-header.c (g_mime_header_add): New function to add a
7677 * gmime-stream.c (g_mime_stream_writev): New function to write a
7680 2001-10-21 Jeffrey Stedfast <fejj@ximian.com>
7682 * pan-mime-parser.c: Updated to use g_mime_stream_buffer_readln.
7684 * gmime-stream-buffer.c (g_mime_stream_buffer_readln): New
7685 convenience function to read a single line from a stream.
7687 2001-10-12 Jeffrey Stedfast <fejj@ximian.com>
7689 * gmime-part.c (g_mime_part_write_to_stream): No longer takes a
7690 'toplevel' argument.
7691 (g_mime_part_to_string): No longer takes a 'toplevel' argument.
7693 * gmime-message.c (g_mime_message_write_to_stream): Write the
7694 MIME-Version header here instead of needing to pass a 'toplevel'
7695 argument to g_mime_part_write_to_stream().
7697 * gmime-charset.c (g_mime_charset_init): Fix for Debian and
7700 2001-10-09 Charles Kerr <charles@rebelbase.com>
7702 * gmime-filter.c (g_mime_filter_construct): make sure outptr is
7703 zeroed out before we read it in g_mime_filter_set_size().
7705 2001-10-06 Jeffrey Stedfast <fejj@ximian.com>
7707 * gmime-filter-basic.c (filter_filter): Implemented uuencoding.
7708 (filter_complete): Implemented uuencoding.
7710 * gmime-utils.c (g_mime_utils_uuencode_close): New function to
7711 flush the uuencoder.
7712 (g_mime_utils_uuencode_step): New function to uuencode a block of
7715 2001-10-05 Jeffrey Stedfast <fejj@ximian.com>
7717 Fixes for c++ compilation
7719 * gmime-stream*.c: s/template/stream_template
7721 * gmime-filter*.c: s/template/filter_template
7723 2001-10-04 Jeffrey Stedfast <fejj@ximian.com>
7725 * gmime-data-wrapper.c (g_mime_data_wrapper_set_stream): If we
7726 just change the order of operations, we can get away without a
7727 second stream pointer.
7729 * gmime-stream.c (g_mime_stream_substream): Revert.
7731 * gmime-stream-buffer.c (stream_substream): Instead of calling
7732 g_mime_stream_substream(), call the source stream's substream
7733 method directly. I think this is the better fix for the bug
7736 2001-10-04 Charles Kerr <charles@rebelbase.com>
7738 * gmime-stream.c (g_mime_stream_substream): fix refcount stealth
7739 bug. Calling this on a buffered stream wound up reffing two
7740 streams instead of one because of a nested call to
7741 g_mime_stream_substream(). This took a lot of scaffolding to
7744 * gmime-data-wrapper.c (g_mime_data_wrapper_set_stream): fix
7745 refcount paranoia bug. ref the new *before* unreffing the old
7746 just in case new==old.
7748 * gmime-filter-basic.[ch]: fix some compiler warnings that I
7749 introduced yesterday. (Strange how the same version of gcc finds
7750 different warnings on different platforms.)
7752 2001-10-03 Charles Kerr <charles@rebelbase.com>
7754 * gmime-part.c (g_mime_part_get_content): bugfix for when getting
7755 the content from a stream-mem. We were just returning the
7756 stream-mem's gbytearray buffer, but we need to check against the
7759 * gmime-filter-basic.[ch]: added support for decoding a uuencoded
7760 stream; added a placeholder for uuencoding a stream.
7762 * md5-utils.c: commented out d(x) macro.
7764 2001-10-02 Jeffrey Stedfast <fejj@ximian.com>
7766 * gmime-stream-buffer.h: buflen should be an ssize_t not a
7767 size_t. Thanks to Charles for catching this.
7769 2001-10-01 Charles Kerr <charles@rebelbase.com>
7771 * gmime-filter.c: include <string.h> to pick up memcpy prototype.
7772 * gmime-stream-mem.c: same.
7773 * gmime-stream-buffer.c: same.
7774 * gmime-stream-filter.c: same.
7776 * gmime-stream-mem.c (stream_flush): added a retval of 0.
7778 * gmime-filter-crlf.h (g_mime_filter_crlf_new_type): renamed
7779 prototype as g_mime_filter_crlf_new to sync with .c
7781 * gmime-part.h: added g_mime_part_set_content_object() prototype.
7783 * gmime-content-type.h: Replaced <> with "" in #include
7786 * pan-mime-parser.c: added #include gmime-stream-buffer.h to pick
7787 up prototype for g_mime_stream_buffer_gets.
7788 (g_strstrbound): removed unused func.
7790 * gmime-utils.c: on calls to ctype functions, explicitly upcast
7791 the char arguments as ints to shut up gcc warnings on Solaris.
7792 * gmime-param.c: same.
7794 2001-09-29 Jeffrey Stedfast <fejj@ximian.com>
7796 * pan-mime-parser.c: New parser (with exactly the same API as
7797 gmime-parser.c) that is meant to parse MIME objects without
7798 needing them to be memory mapped. Quite a bit slower on average,
7799 but is vastly sped up by using a GMimeStreamBuffer in BLOCK_READ
7802 * gmime-stream-buffer.c (stream_write): Incremement the stream
7803 position by the number of bytes we wrote.
7804 (stream_tell): Return stream->position.
7805 (stream_substream): Just return a substream of our source stream.
7806 (g_mime_stream_buffer_gets): Increment the stream position by the
7807 number of bytes read if and only if we are operating on a buffered
7810 2001-09-27 Jeffrey Stedfast <fejj@ximian.com>
7812 * gmime-stream-file.c (stream_tell): Return stream->position here
7815 * gmime-part.c (g_mime_part_set_pre_encoded_content): Don't decode
7816 into a stream and then set the data wrapper encoding to the
7817 incoming encoding type, instead use filters to decode into the
7818 stream and set the data wrapper encoding to the default.
7820 * gmime-stream.c (g_mime_stream_set_bounds): Don't set the
7821 position equal to end if end == -1.
7823 * gmime-parser.c (g_mime_parser_construct_message): Use the stream
7824 functions to find the beginning and end of the stream rather than
7825 breaking abstractions. Also reset the mem stream after writing to
7827 (g_mime_parser_construct_part): Reset the mem stream here too.
7828 (g_mime_parser_construct_part_internal): Use the stream interfaces
7829 to get the position instead of breaking abstractions.
7831 * gmime-stream-fs.c (stream_tell): Return stream->position.
7833 * gmime-stream-mem.c (stream_seek): Return the new syteam
7835 (stream_tell): Return stream->position.
7837 2001-09-23 Jeffrey Stedfast <fejj@ximian.com>
7839 * doc/gmime-docs.sgml: Documented streams.
7841 * gmime-stream-fs.c (stream_write): Seek to the position we think
7842 we're at before attempting to write, and increment the stream
7843 position after the write.
7845 * gmime-stream-file.c (stream_write): Seek to the position we
7846 think we're at... this is just in case we are or have substreams
7847 that might have read or written in the meantime. Also remember to
7848 increment the stream position after the write.
7849 (stream_eos): Only return feof() if our end boundary is unlimited.
7851 * gmime-stream-mem.c (stream_write): Start writing data at
7852 stream->position rather than always appending it to the end of the
7853 mem stream. Also don't go writing past the end boundary if it's
7855 (stream_length): Use a relative bound_end.
7856 (stream_seek): Same.
7857 (stream_eos): Here too.
7858 (stream_write): And here.
7859 (stream_read): And here.
7860 (stream_substream): Correctly set the bounds.
7861 (g_mime_stream_mem_new): Here too.
7862 (g_mime_stream_mem_new_with_byte_array): And here.
7863 (g_mime_stream_mem_new_with_buffer): Same.
7864 (g_mime_stream_mem_set_byte_array): And finally here.
7866 2001-09-22 Jeffrey Stedfast <fejj@ximian.com>
7868 * test-streams.c: New test suite for streams.
7870 * gmime-stream-buffer.c (stream_read): Fixed some logic bugs
7871 (including forgetting a break statement at the end of a case).
7872 (g_mime_stream_buffer_gets): Fixed some logic bugs.
7874 * gmime-stream-mem.c (stream_read): Fixed logic error.
7876 2001-09-21 Jeffrey Stedfast <fejj@ximian.com>
7878 * gmime-stream-buffer.c (g_mime_stream_buffer_gets): Implemented.
7879 (stream_reset): Implemented.
7880 (stream_eos): Implemented.
7881 (stream_write): Reimplemented.
7882 (stream_read): Reimplemented.
7884 2001-09-21 Jeffrey Stedfast <fejj@ximian.com>
7886 * gmime-stream-buffer.[c,h]: New stream that buffers reads or
7887 writes to/from another stream. Will also implement a gets() method
7890 2001-09-20 Jeffrey Stedfast <fejj@ximian.com>
7892 * gmime-stream-mem.c (stream_eos): Check for position >= instead
7895 * gmime-stream.c (g_mime_stream_eos): Do some simple bounds
7900 * gmime-part.c (g_mime_part_get_content_object): Added.
7902 2001-09-19 Jeffrey Stedfast <fejj@ximian.com>
7904 * gmime-stream-fs.c (stream_seek): Improve.
7906 * gmime-stream-file.c (stream_reset): Oops, reset the position
7907 pointer on a successful reset.
7908 (stream_seek): Fixed.
7910 2001-09-19 Jeffrey Stedfast <fejj@ximian.com>
7912 * gmime-stream-fs.c (stream_reset): Reset the position offset. Doh!
7914 * gmime-stream.c (g_mime_stream_write_to_stream): Don't increment
7915 total if no bytes were read/written.
7917 * gmime-stream-filter.c (stream_substream): Copy over the filters.
7919 * gmime-part.c (g_mime_part_verify_content_md5): Updated.
7920 (g_mime_part_set_content_md5): Updated.
7921 (g_mime_part_get_content): Updated.
7922 (write_content): Updated.
7924 * gmime-data-wrapper.c (g_mime_data_wrapper_write_to_stream):
7927 * gmime-filter-basic.[c,h]: A basic filter that does Base64 and QP
7930 * gmime-filter-crlf.[c,h]: A simple filter that does crlf(/dot)
7933 2001-09-19 Jeffrey Stedfast <fejj@ximian.com>
7935 * gmime-data-wrapper.c (g_mime_data_wrapper_new_with_stream): Ref
7937 (g_mime_data_wrapper_set_stream): Same.
7938 (g_mime_data_wrapper_get_stream): Return the internal stream.
7939 (g_mime_data_wrapper_get_encoding): Return the internal stream's
7941 (g_mime_data_wrapper_write_to_stream): Not-yet-implemented.
7943 * gmime-filter.[c,h]: Abstract class for filters.
7945 * gmime-stream-filter.[c,h]: Abstract stream for filtering.
7947 * gmime-part.c (g_mime_part_set_content): Updated for data-wrapper
7949 (g_mime_part_set_content_byte_array): Same.
7950 (g_mime_part_set_pre_encoded_content): And here.
7951 (g_mime_part_get_content): And here too.
7953 * gmime-parser.c (g_mime_parser_construct_part_internal): Fix
7954 offset calculations.
7955 (g_mime_parser_construct_part_internal): Updated for data-wrapper
7958 2001-09-18 Jeffrey Stedfast <fejj@ximian.com>
7960 * test-parser.c (test_parser): Updated.
7962 * test-mime.c (test_parser): Updated.
7964 * gmime-utils.h: Move the GMimePartEncodingType enum here.
7966 * gmime-stream-fs.[c,h]: Implemented.
7968 * gmime-stream.c (g_mime_stream_construct): New function to
7969 initialize the stream data members.
7970 (g_mime_stream_substream): New function to get a substream of
7972 (g_mime_stream_unref): If the stream is actually a substream,
7973 unref it's "super" stream if we are destroying the substream.
7975 * gmime-stream-mem.c (stream_substream): Implemented.
7976 (g_mime_stream_mem_new): Updated to use g_mime_stream_construct().
7977 (g_mime_stream_mem_new_with_byte_array): Same.
7978 (g_mime_stream_mem_new_with_buffer): And here too.
7980 * gmime-stream-file.c (stream_substream): Implemented.
7981 (g_mime_stream_file_new): Updated to use
7982 g_mime_stream_construct().
7983 (g_mime_stream_file_new_with_bounds): Same.
7985 * gmime-part.c (g_mime_part_set_content_md5): Updated to use
7987 (g_mime_part_verify_content_md5): Same.
7988 (g_mime_part_set_content): Updated to use streams and data
7990 (g_mime_part_set_content_byte_array): Same.
7991 (g_mime_part_set_pre_encoded_content): And here.
7992 (g_mime_part_set_content_object): New function that allows one to
7993 set the content object of a MIME part.
7994 (g_mime_part_get_content): Updated to use streams.
7995 (write_content): Same.
7996 (g_mime_part_write_to_stream): Replacement for
7997 g_mime_part_write_to_string().
7998 (g_mime_part_to_string): Updated to use
7999 g_mime_part_write_to_stream().
8000 (g_mime_part_destroy): Updated to destroy the content object
8001 rather than destroying a GByteArray (since we longer use a
8002 GByteArray for the content data).
8004 * gmime-parser.c (g_mime_parser_construct_message): Now takes a
8005 stream argument instead of a string.
8006 (g_mime_parser_construct_message_from_file): Deprecated.
8007 (g_mime_parser_construct_part): Also takes a stream now.
8009 * gmime-message.c (g_mime_message_write_to_stream): Replacement
8010 for g_mime_message_write_to_string().
8011 (g_mime_message_to_string): Updated.
8013 * gmime-header.c (g_mime_header_write_to_stream): Replacement for
8014 g_mime_header_write_to_string().
8015 (g_mime_header_to_string): Updated.
8017 2001-09-17 Jeffrey Stedfast <fejj@ximian.com>
8019 * gmime-stream.[c,h]: Abstract stream class.
8021 * gmime-stream-mem.[c,h]: Memory stream.
8023 * gmime-stream-file.[c,h]: File stream.
8025 * gmime-data-wrapper.[c,h]: Data wrapper class. Will be used as
8026 the content object in MIME parts.
8028 2001-08-23 Jeffrey Stedfast <fejj@ximian.com>
8030 * gmime-utils.c (encode_8bit_word): Oops. Add the closing ? char.
8031 (g_mime_utils_8bit_header_encode): Oops. Make sure we encode *all*
8033 (g_mime_utils_8bit_header_decode): Slightly better fix for the
8036 2001-08-19 Jeffrey Stedfast <fejj@ximian.com>
8040 2001-08-18 Jeffrey Stedfast <fejj@ximian.com>
8042 * Makefile.am: Added gmime-charset.[c,h] to the build.
8044 * gmime-charset.[c,h]: New source files for managing charset
8046 (g_mime_charset_init): New function to retrieve the user's locale
8047 information for later use with gmime_charset_locale_name.
8048 (g_mime_charset_locale_name): New function to return user's
8051 * gmime-utils.c (g_mime_utils_8bit_header_decode): linear
8052 whitespace isn't the only thing that can delimit atoms.
8053 (get_codeset): Removed in favor of the new gmime-charset
8055 (g_mime_utils_8bit_header_encode): Use g_mime_charset_locale_name.
8056 (encode_8bit_word): And here too.
8058 2001-08-15 Jeffrey Stedfast <fejj@ximian.com>
8060 * internet-address.c (decode_mailbox): When returning due to a
8061 missing local part, make sure to set *in to inptr.
8063 2001-08-13 Charles Kerr <charles@rebelbase.com>
8065 * gmime-utils.c (encode_8bit_word): query nl_langinfo for the
8066 codeset instead of just assuming iso-8859-1. Thanks to Volodymyr
8067 M . Lisivka <lvm@mystery.lviv.net> for suggesting this patch.
8069 * gmime-utils.c (g_mime_utils_8bit_header_encode): same.
8071 * gmime-parser.c (find_header_part_end): new utility function to
8072 find the dividing line between body & header.
8073 (g_mime_parser_construct_part): sync.
8074 (g_mime_parser_construct_message): sync.
8076 * gmime-parser.c (get_header_block): remove unused func.
8077 (rfc822_headers): remove unused static array.
8079 2001-07-02 Jeffrey Stedfast <fejj@ximian.com>
8081 * zentimer.h: Added. Provides some timing macros for performace
8084 * zenprofiler.h: Added. Extends zentimer.h as a simple profiler
8085 that gives nice printouts.
8087 * test-parser.c: Use zentimer.h
8089 2001-06-23 Jeffrey Stedfast <fejj@ximian.com>
8091 * gmime-header.c (g_mime_header_remove): New function.
8092 (g_mime_header_set): Setting header to NULL no longer removes the
8093 header. Use g_mime_header_remove instead.
8095 * gmime-message.c (g_mime_message_write_to_string): No longer have
8096 to sync the headers.
8097 (g_mime_message_get_headers): Same.
8098 (g_mime_message_set_sender): sync the From header.
8099 (g_mime_message_set_reply_to): Sync the Reply-To header.
8100 (g_mime_message_add_recipient): Sync the recipient header.
8101 (g_mime_message_add_recipients_from_string): Same.
8102 (g_mime_message_set_subject): Sync the Subject header.
8103 (g_mime_message_set_date): Sync the date header.
8104 (g_mime_message_set_message_id): Sync the Message-Id header.
8106 2001-06-03 Jeffrey Stedfast <fejj@ximian.com>
8108 * gmime-utils.c (quoted_encode): Minor cleanup.
8110 2001-06-02 Jeffrey Stedfast <fejj@ximian.com>
8112 * gmime-message.c (sync_headers): Oops. Don't place "Cc:" in the
8113 header value string :-)
8115 2001-03-31 Charles Kerr <charles@rebelbase.com>
8117 * gmime-utils.c (g_mime_utils_8bit_header_decode): big speedups.
8119 * gmime-utils.c (g_mime_utils_8bit_header_encode): small speedups.
8121 2001-05-29 Jeffrey Stedfast <fejj@ximian.com>
8123 * internet-address.c (decode_mailbox): Oops, test to make sure we
8124 won't be running past the end of the buffer when considering a
8125 retry. Thanks to Charles Kerr for this fix.
8127 2001-03-29 Charles Kerr <charles@rebelbase.com>
8129 * gmime-part.c (g_mime_part_append_pre_encoded_content): fix small
8130 bug that crept into the last commit.
8132 2001-05-29 Jeffrey Stedfast <fejj@ximian.com>
8134 Fixes on behalf of Charles Kerr of Pan fame:
8136 * gmime-parser.c (g_mime_parser_construct_part_from_file):
8137 Use g_mime_part_append_pre_encoded_content().
8139 * gmime-part.c (g_mime_part_append_pre_encoded_content): New
8140 function so that the FILE parser doesn't need to manage it's own
8143 * gmime-header.[c,h]: const'ify.
8144 (g_mime_header_foreach): New function to call a chosen function
8145 for each header in the header object.
8147 2001-05-26 Jeffrey Stedfast <fejj@ximian.com>
8149 * configure.in: Updated version to 0.6.0.
8151 * README: Updated version to 0.6.0.
8153 * doc/*: Updated again.
8155 * gmime-header.c (g_mime_header_to_string): New function - mostly
8156 for the sake of keeping with the API of the rest of GMime.
8157 (g_mime_header_set): Make sure to always encode the header value
8160 * gmime-part.c (g_mime_part_write_to_string): New function to
8161 write the mime part to a GString.
8162 (g_mime_part_to_string): Use g_mime_part_write_to_string.
8164 * gmime-message.c (g_mime_message_get_headers): Use the new
8165 g_mime_header_to_string function.
8166 (g_mime_message_write_to_string): New function to write the
8167 message to a GString.
8168 (g_mime_message_to_string): Use write_to_string.
8170 2001-05-25 Jeffrey Stedfast <fejj@ximian.com>
8174 * Makefile.am: Add gmime-header.[c,h] to the build.
8176 * gmime-parser.c: Numerous changes to use gmime-header.
8178 * gmime-message.c: Numerous changes to use gmime-header.
8179 (g_mime_message_add_arbitrary_header): Removed.
8180 (g_mime_message_set_header): The replacement for
8181 add_arbitrary_header.
8182 (g_mime_message_get_header): New function to get a header.
8184 * gmime-header.[c,h]: New source fies to handle the complicated
8185 nature of setting/getting header pairs.
8187 2001-05-24 Jeffrey Stedfast <fejj@ximian.com>
8191 * doc/Makefile.am: Use $(INSTALL) and $(INSTALL_DATA) rather than
8194 * alloca.c: New file for systems that do not have alloca().
8196 * Makefile.am: build alloca.c
8198 * gmime-utils.c: Don't #include <alloca.h> - this is now handled
8201 * config.h.in: Added alloca define checks.
8203 * acconfig.h: Remove some extra defines that we don't care about.
8205 2001-05-20 Jeffrey Stedfast <fejj@ximian.com>
8207 * gmime-parser.c (parse_content_headers): Simplified and also
8208 unfolded content-headers.
8210 * gmime-part.c (g_mime_part_get_filename): If there isn't a
8211 disposition, make sure that we don't ignore the possibility of a
8212 "name" param in the Content-Type header.
8214 2001-05-12 Jeffrey Stedfast <fejj@ximian.com>
8216 * gmime-utils.c (need_quotes): Include '.' as a char to quote.
8218 * gen-table.c (main): Fixed a type-o.
8220 * internet-address.c (decode_mailbox): Be a little more forgiving
8221 about unexpected chars while parsing the name part of the email
8222 address. Skip the bad char and then retry. If we fail again,
8225 * gmime-utils.c: #include <alloca.h>
8227 * gmime-parser.c (g_mime_parser_construct_part): Oops, inend
8228 points to the end of the string, not the last char of the string
8229 (ie, '\0' not the char before it).
8231 2001-05-08 Jeffrey Stedfast <fejj@ximian.com>
8233 * gmime-table-private.h: Oops, take out the check for isblank().
8235 * internet-address.c (decode_quoted_string): Get rid of unused
8237 (decode_address): Same.
8239 2001-04-03 Jeffrey Stedfast <fejj@ximian.com>
8241 * internet-address.c (decode_domain): Try to only get
8242 "fully-qualified" domain names, or ones that "look" like they are
8244 (decode_mailbox): If decode_domain() returns NULL, don't append
8245 the '@' char. Also make sure that the name is non-empty.
8247 2001-04-01 Jeffrey Stedfast <fejj@ximian.com>
8249 * gmime-utils.c (g_mime_utils_quote_string): Made smarter.
8251 2001-03-31 Jeffrey Stedfast <fejj@ximian.com>
8253 * Makefile.am: Added rules to build gen-table.c and added
8254 gmime-table-private.h to the build.
8256 * gen-table.c: New file to generate gmime-table-private.h if need
8259 * gmime-table-private.h: New file that contains
8260 gmime_special_table.
8262 * gmime-utils.c: Remove the gmime_special_table from here and
8263 instead #include gmime-table-private.h.
8265 * internet-address.c: #include gmime-table-private.h
8267 2001-03-30 Jeffrey Stedfast <fejj@ximian.com>
8269 * gmime-message.c (create_header): Simplified a tad.
8270 (g_mime_message_add_recipient): Updated for the new
8271 InternetAddress API.
8272 (g_mime_message_add_recipients_from_string): Simplified greatly
8273 using the new InternetAddress API.
8275 * internet-address.[c,h]: Completely rewritten to be a lot more
8278 2001-03-28 Jeffrey Stedfast <fejj@ximian.com>
8280 * README, configure.in: Updated version to 0.5.0
8282 2001-03-29 Charles Kerr <charles@rebelbase.com>
8284 * gmime-parser.c (g_mime_parser_construct_message_from_file): new
8285 function to read a message from a FILE* instead of a character
8286 array. This can be used to reduce the memory requirements of very
8289 * gmime-parser.c (get_next_line): new internal function.
8290 * gmime-parser.c (g_mime_parser_construct_part_from_file): same.
8291 * gmime-parser.c (parse_content_headers): same.
8292 * gmime-parser.c (find_header_end): same.
8293 * gmime-parser.c (get_header_block): same.
8294 * gmime-parser.c (get_header_block_from_file): same.
8296 2001-03-28 Jeffrey Stedfast <fejj@ximian.com>
8298 * gmime-utils.c (get_time): Fix a compile warning.
8300 2001-03-20 Charles Kerr <charles@rebelbase.com>
8302 * gmime-utils.c (get_year): constify the argument list.
8303 * gmime-utils.c (get_time): same.
8305 * gmime-utils.c (get_days_in_month): if #0'ed out unused code.
8306 * gmime-utils.c (parse_broken_date): same.
8308 2001-03-15 Jeffrey Stedfast <fejj@ximian.com>
8310 * internet-address.c (internet_address_new_from_string): Try to be
8311 a little better about extracting the name, not 100% accurate but
8314 2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
8316 * gmime-part.c (g_mime_part_get_content_disposition_parameter):
8317 It's okay to have a NULL disposition or a NULL param hash.
8318 (g_mime_part_get_filename): Same.
8319 (g_mime_part_get_content): It's okay not to have content.
8321 2001-03-13 Jeffrey Stedfast <fejj@ximian.com>
8323 * gmime-utils.c (quoted_decode): Fix a possible buffer overrun.
8325 2001-02-27 Jeffrey Stedfast <fejj@ximian.com>
8327 * gmime-utils.c (parse_rfc822_date): Allow for time token to not
8328 have a seconds field.
8330 2001-02-11 Jeffrey Stedfast <fejj@ximian.com>
8332 * gmime-part.c (g_mime_part_to_string): Oops. Don't init
8333 content_md5 with the content location string ;-)
8335 * gmime-parser.c (g_mime_parser_construct_part): Init content to
8336 NULL to get rid of a warning (this doesn't really matter as 'len'
8339 * gmime-part.c: #include unistd.h
8341 2001-01-27 Jeffrey Stedfast <fejj@helixcode.com>
8343 * gmime-part.c (g_mime_part_set_content_byte_array): So
8344 set_content_array() was no good. After inspecting glib it was
8345 discovered that there are hidden data members of a GByteArray that
8346 hold info like if the data is NUL terminated, how much data is
8349 2001-01-26 Charles Kerr <charles@superpimp.org>
8351 * gmime-part.c (g_mime_part_set_content_array): new function.
8353 2001-01-25 Charles Kerr <charles@superpimp.org>
8355 * gmime-part.c (g_mime_part_destroy): fix memory leak - the
8356 disposition wasn't being g_free()d.
8358 2001-01-24 Charles Kerr <charles@superpimp.org>
8360 * gmime-part.c (g_mime_part_get_filename): Now takes a const
8363 2001-01-17 Jeffrey Stedfast <fejj@ximian.com>
8365 * internet-address.c (encoded_name): Updated.
8367 * gmime-part.c (g_mime_part_set_pre_encoded_content): Updated to
8368 reflect changes to gmime-utils.
8370 * gmime-utils.c (g_mime_utils_text_is_8bit): Take a len argument.
8371 (g_mime_utils_best_encoding): Same.
8372 (encode_8bit_word): Updated.
8374 2001-01-14 Jeffrey Stedfast <fejj@ximian.com>
8376 * gmime-parser.c (g_mime_parser_construct_part): Check for NULL
8377 returns from g_strstrbound.
8379 2001-01-11 Charles Kerr <charles@superpimp.org>
8381 * gmime-utils.c (get_year): small patch to handle 2-digit year
8382 representation a little better -- "71" now translates to 1971,
8383 but "01" now translates to 2001. Thanks to Ihar Viarheichyk for
8384 suggesting this change.
8386 2001-01-07 Jeffrey Stedfast <fejj@helixcode.com>
8388 * gmime-part.c (g_mime_part_set_content_md5): Don't allow the
8389 setting of Content-MD5 headers for multipart/* and message/rfc822
8392 * rfc/rfc1864.txt: Added (Content-MD5 RFC).
8394 2001-01-05 Jeffrey Stedfast <fejj@helixcode.com>
8396 * gmime-part.c (g_mime_part_set_content_md5): Oops, didn't quite
8397 do this right. It should be correct now.
8398 (g_mime_part_verify_content_md5): New function to verify the
8401 2001-01-04 Jeffrey Stedfast <fejj@helixcode.com>
8403 * gmime-parser.c (g_mime_parser_construct_part): Added support for
8404 parsing Content-Location and Content-Md5 headers. Trim excess
8405 trailing \n's. Also fix a bug where the end boundary would get
8406 included as part of the last MIME Part's contents.
8407 (g_strstrbound): Bounded strstr.
8410 * README: Updated version to 0.4.0
8412 * Makefile.am: Added md5-utils to the build.
8414 * md5-utils.[c,h]: Added.
8416 * gmime-part.c (g_mime_part_to_string): Slightly new
8417 implementation. Also added in support for Content-Location and
8418 Content-Md5 headers.
8419 (g_mime_part_destroy): Return if the mime part is
8420 NULL. Also free the new content_location and content_md5 headers.
8421 (g_mime_part_set_content_md5): Implemented.
8422 (g_mime_part_get_content_md5): Implemented.
8423 (g_mime_part_set_content_location): Implemented.
8424 (g_mime_part_get_content_location): Implemented.
8425 (get_content_type): Append a '\n'.
8427 2001-01-01 Jeffrey Stedfast <fejj@helixcode.com>
8429 * doc/gmime-sections.txt: Updated.
8431 * doc/sgml/*: Updated.
8433 * doc/html/*: Updated.
8435 2000-12-24 Jeffrey Stedfast <fejj@helixcode.com>
8437 * gmime-parser.c (g_mime_parser_construct_part): Don't set the
8438 boundary if we are able to get the boundary from the content-type
8439 because we'll just set the same data over again which is a
8440 waste. Also tack a \n onto the ends of the boundary markers so
8441 that "blah_" and "blah_D" don't trick the parser. Fix it so that
8442 an empty part won't set any contents (since setting a 0-length
8443 content stream causes a segfault).
8444 (construct_headers): Take an inlen argument so that we can parse
8445 headers without needing to strdup before passing into this
8447 (g_mime_parser_construct_message): Don't strdup the headers since
8448 we can just pass in the length to the construct_headers() function
8451 2000-12-18 Jeffrey Stedfast <fejj@helixcode.com>
8453 * gmime-parser.c (g_mime_parser_construct_part): Moved from being
8454 an internal-only function.
8456 2000-12-28 Charles Kerr <charles@superpimp.org>
8458 * gmime-utils.c (g_mime_utils_text_is_8bit): gracefully handle
8459 a NULL pointer being passed in. Thanks to Christophe Lambin for
8460 reporting this problem.
8462 2000-12-14 Charles Kerr <charles@superpimp.org>
8464 * gmime-messge.c (g_mime_message_get_message_id): change
8465 g_return_if_fail() to g_return_val_if_fail() to ensure that
8466 a value is always returned.
8468 * gmime-part.h (g_mime_part_get_content_description): make
8469 the GMimePart argument const.
8470 * gmime-part.h (g_mime_part_get_content): same.
8472 * test-mime.c (test_addresses): fix bad printf statement.
8474 * test-parser.c (test_parser): fixed the printf type of a time_t
8475 from an int to unsigned long to avoid compiler warnings.
8477 2000-12-13 Jeffrey Stedfast <fejj@helixcode.com>
8481 * doc/gmime-sections.txt: Updated.
8483 * README: Updated version line to 0.3.0
8485 2000-12-12 Jeffrey Stedfast <fejj@helixcode.com>
8487 * gmime-part.c (g_mime_part_to_string): Wrap some content-*
8488 headers that might sometimes be long.
8490 * gmime-message.c (create_header): Updated to reflect function
8493 * gmime-utils.c (g_mime_utils_header_printf): Moved here from
8494 gmime-message.c and slightly renamed ;-)
8495 (g_mime_utils_header_fold): Moved from being private to being
8498 2000-12-12 Jeffrey Stedfast <fejj@helixcode.com>
8500 * gmime-part.c: Hmmm, why weren't multiparts using the internal
8501 get_content_type function rather than ...content_type_to_string?
8502 Possible FIXME: Should content_type_to_string do what
8503 get_content_type does? or should it remain untouched and just
8504 return "type/subtype"?
8506 * gmime-part.h: No more boundary data member.
8508 * gmime-part.c (g_mime_part_get_boundary): Updated, as we no
8509 longer store the boundary on the MIME Part and instead only on the
8510 content-type (where it belongs).
8511 (g_mime_part_set_boundary): And here too.
8512 (g_mime_part_destroy): No longer need to destroy the boundary.
8514 2000-12-11 Jeffrey Stedfast <fejj@helixcode.com>
8516 * gmime-part.c (g_mime_part_get_subpart_from_content_id): Erm,
8517 smack me. This needs to be recursive (this is what happens when I
8518 code really late at night).
8520 2000-12-11 Jeffrey Stedfast <fejj@helixcode.com>
8522 * configure.in (GMIME_MINOR_VERSION): Updated to 0.3.0
8524 * gmime-parser.c (get_mime_part): Updated to reflect the
8525 add_subpart API change.
8527 * test-mime.c (test_multipart): And here too.
8529 * gmime-part.h (g_mime_part_add_child): Macro added for backward
8530 source compatability.
8532 * gmime-part.c (g_mime_part_get_subpart_from_content_id): Renamed
8533 from g_mime_part_get_child_from_content_id as I think I'm gonna
8534 start calling them subparts in the API as it's a bit clearer than
8535 calling them children. Also fixed up some of the logic (what if
8536 the parent mime part had a content-id? The way the code was before
8537 it'd never search the subparts). Oh, it also returns const now.
8538 (g_mime_part_add_subpart): Renamed from g_mime_part_add_child and
8539 also now does some error checking to make sure the parent part is
8542 2000-12-10 Charles Kerr <charles@superpimp.org>
8544 * gmime-part.c (g_mime_part_get_child_by_content_id): new
8547 2000-12-09 Jeffrey Stedfast <fejj@helixcode.com>
8549 * gmime-part.c (g_mime_part_set_boundary): Generate a random
8550 boundary if passed boundary is NULL.
8552 2000-12-07 Jeffrey Stedfast <fejj@helixcode.com>
8554 * gmime-message.c (multipart_get_body): Traverses a MIME Part and
8555 'always' extracts the body assuming it exists. Extracts the
8556 preffered text type if it exists, otherwise returns the type less
8558 (g_mime_message_get_body): Use multipart_get_body if the toplevel
8559 part is a multipart.
8561 2000-12-05 Jeffrey Stedfast <fejj@helixcode.com>
8563 * README: Updated with more RFCs, etc.
8565 * rfc/* Added a bunch more rfcs of interest.
8567 2000-12-04 Jeffrey Stedfast <fejj@helixcode.com>
8569 * test-mime.c: Added test code for the address parser.
8571 * gmime-utils.c (g_mime_utils_quoted_encode_step): Updated. No
8572 longer need to special-case whitespace chars as they have been put
8573 into the gmime_special_table (a while ago).
8575 2000-12-02 Jeffrey Stedfast <fejj@helixcode.com>
8577 * Makefile.am: Install gmime.m4
8581 2000-12-02 Jeffrey Stedfast <fejj@helixcode.com>
8583 * gmime-part.c (g_mime_part_foreach): New convenience function for
8584 manipulating each subpart of a mime part.
8586 * gmime-message.c (g_mime_message_foreach_part): New convenience
8587 function for manipulating all mime parts of a message.
8589 2000-12-02 Jeffrey Stedfast <fejj@helixcode.com>
8592 * doc/html/*: Updated.
8594 * doc/gmime-sections.txt: Add g_mime_message_[g,s]et_message_id.
8596 * gmime-parser.c (construct_headers): Parse out Message-Id
8599 * gmime-message.c (g_mime_message_destroy): Free the message id.
8600 (g_mime_message_set_message_id): New function to set the message
8602 (g_mime_message_set_message_id): New accessor function for
8604 (create_header): Write out the Message-Id if and only if it
8607 2000-11-29 Jeffrey Stedfast <fejj@helixcode.com>
8611 * doc/gmime-sections.txt: Added new functions.
8613 * doc/html/*: Updated.
8615 2000-11-29 Jeffrey Stedfast <fejj@helixcode.com>
8617 * configure.in: Bumped the version to 0.2.0 because the API has
8621 * test-mime.c: Updated.
8623 * gmime-utils.c (BASE64_ENCODE_LEN):
8624 (QP_ENCODE_LEN): Macros for determining how much space we need to
8625 encode a chunk of data to that encoding (estimate is liberal).
8626 (encode_8bit_word): Use the macros to determine the length we
8629 * gmime-message.c (g_mime_message_get_body): Updated to reflect
8630 changes to gmime-part.
8632 * gmime-parser.c (get_mime_part): Updated.
8634 * gmime-part.c (g_mime_part_set_content): Now takes a len argument
8635 and has been updated to reflect the move to GByteArray.
8636 (g_mime_part_destroy): Updated.
8637 (g_mime_part_set_pre_encoded_content): New convenience function to
8638 decode pre-encoded content and set it on the mime part.
8639 (g_mime_part_get_content): Renamed from
8640 g_mime_part_decode_contents.
8642 * gmime-part.h: GMimePart->content is now a GByteArray that will
8643 hold the raw content (in it's unencoded form).
8645 2000-11-28 Jeffrey Stedfast <fejj@helixcode.com>
8647 * gmime-content-type.c (g_mime_content_type_new_from_string):
8648 Ignore extranious semicolons between parameters. Handle the event
8649 where the content-type doesn't specify a subtype (this is broken
8650 but some mailers will send "Content-Type: text" for example).
8651 (g_mime_content_type_new): If there isn't a type or subtype, print
8652 a warning and try to do some smart defaulting action.
8654 * gmime-message.c (handle_multipart_alternative): Only remember
8655 the last subpart if it was a text part.
8657 2000-11-19 Jeffrey Stedfast <fejj@helixcode.com>
8660 * doc/sgml/*: Updated.
8662 * test-mime.c: Updated.
8664 * gmime-utils.c (g_mime_utils_quote_string): Do the detection on
8665 whether or not to wrap the string in quotes here rather than
8666 requiring a boolean argument specifying whether the string should
8667 be quoted. RFC2045 provides us with a list of characters that are
8670 * gmime-param.c (g_mime_param_to_string): Updated to reflect
8671 changes to g_mime_utils_quote_string. This function is the main
8672 reason for the change - parameter values should really only be
8673 quoted if they have to be else they should remain unquoted.
8675 * internet-address.c (encoded_name): Updated to reflect changes to
8676 g_mime_utils_quote_string.
8678 2000-11-19 Jeffrey Stedfast <fejj@helixcode.com>
8682 * gmime-utils.c: Updated gmime_special_table.
8683 (g_mime_utils_8bit_header_encode): Since rfc2047 states that all
8684 whitespace between encoded atoms must be ignored, the encoder
8685 should therefor make an effort to encode whitespace when it falls
8686 between two atoms that will be encoded. Use the IS_ESAFE mask.
8687 (quoted_encode): Now takes a safemask argument to specify which
8688 chars are safe to leave unencoded and also a arg to save whether
8689 or not the word was encoded.
8690 (g_mime_utils_8bit_header_encode_phrase): Updated to use the
8693 2000-11-19 Jeffrey Stedfast <fejj@helixcode.com>
8695 * gmime-parser.c (header_unfold): New function to unfold a header
8696 (to be used internally).
8697 (construct_headers): Unfold headers as we parse them.
8699 * configure.in: Changed version to 0.1.1.
8701 * gmime-part.c (get_content_disposition): Append a ";" before
8702 appending any parameters even when there is no disposition
8703 text. Also only enter into the param loop if there exist params.
8705 2000-11-16 Jeffrey Stedfast <fejj@helixcode.com>
8707 * doc/sgml/*: Added.
8709 * doc/gmime-sections.txt: Added g_mime_part_decode_contents and
8710 g_mime_header_printf.
8712 * gmime-message.c (header_fold): New function to fold headers.
8713 (g_mime_header_printf): New convenience function to print a
8714 formatted header (which will get correctly folded).
8715 (create_header): Correctly fold each header.
8717 2000-11-16 Charles Kerr <charles@superpimp.org>
8719 * gmime-utils.c (datetok): don't crash if the date string passed
8722 2000-11-15 Jeffrey Stedfast <fejj@helixcode.com>
8724 * gmime-part.c (g_mime_part_decode_contents): New convenience
8725 function to decode the contents of a mime part (based on code by
8728 2000-11-14 Jeffrey Stedfast <fejj@helixcode.com>
8730 * doc/html/index.sgml: Added - apparently we need this :-)
8732 * doc/Makefile.am: Updated to pass distcheck
8734 2000-11-10 Jeffrey Stedfast <fejj@helixcode.com>
8736 * doc/gmime-docs.sgml: Added a new paragraph explaining the
8737 difference between functions that return const and the ones that
8740 * doc/html/*.html: Updated.
8745 * internet-address.c:
8746 * gmime-param.c: Updated Gtk-Doc comments.
8748 * gmime-content-type.c: Wrote Gtk-Doc comments.
8750 2000-11-10 Jeffrey Stedfast <fejj@helixcode.com>
8752 * Makefile.am (SUBDIRS): Added doc
8754 * configure.in: Generate doc/Makefile
8756 * doc/Makefile.am: Ignore more headers when performaing
8759 * doc/gmime-docs.sgml:
8760 * doc/gmime-sections.txt: Added.
8762 * doc/html/*.html: Generated library reference.
8764 2000-11-09 Jeffrey Stedfast <fejj@helixcode.com>
8768 * test-mime.c: Added test of the new quote/unquote functions.
8770 * gmime-message.c (g_mime_message_add_recipients_from_string):
8771 Check for escaped quotes.
8773 * gmime-part.c (get_content_type): Correctly quote params.
8774 (get_content_disposition): Same.
8776 * gmime-param.c (g_mime_param_new_from_string): Check for escaped
8777 quotes. Also use unquote_string() to unquote the value.
8778 (g_mime_param_to_string): Correctly quote the value.
8780 * gmime-parser.c (get_mime_part): Check for escaped quotes and
8781 correctly unquote strings where appropriate.
8783 * gmime-utils.c (g_mime_utils_quote_string): New convenience
8784 function to escape and quote a string.
8785 (g_mime_utils_unquote_string): New convenience function to
8786 un-escape and un-quote a string.
8788 * internet-address.c (encoded_name): Use quote_string().
8789 (internet_address_new): Use unquote_string() to unquote and
8790 unescape the name component (it will be re-escaped and re-quoted
8791 when it's written to a string later).
8793 2000-11-09 Jeffrey Stedfast <fejj@helixcode.com>
8797 2000-11-08 Jeffrey Stedfast <fejj@helixcode.com>
8799 * gmime-parser.c (construct_headers): Oops. Set the subject with
8800 the decoded string rather than the encoded one.
8801 (get_mime_part): On the chance that we come accross a broken
8802 multipart, default the mime type to text/plain and continue on.
8804 2000-11-08 Jeffrey Stedfast <fejj@helixcode.com>
8806 * internet-address.c (internet_address_to_string): Moved code
8807 around to avoid unecessary warnings.
8809 * gmime-utils.c: Added Gtk-Doc style comments to all the
8811 (g_mime_utils_best_encoding): Return a GMimePartEncodingType
8814 2000-11-01 Jeffrey Stedfast <fejj@helixcode.com>
8816 * Makefile.am (INCLUDES): Add -DG_LOG_DOMAIN=\"gmime\"
8818 2000-10-31 Jeffrey Stedfast <fejj@helixcode.com>
8820 * test-parser.c (test_parser): Test g_mime_message_get_body() here
8823 * test-mime.c: Updated to reflect changes to get_body.
8825 * gmime-message.c (g_mime_message_get_body): Return an allocated
8826 buffer because we want to return the decoded message body rather
8827 than the (possibly) encoded form.
8828 (create_header): Write out the arbitrary headers first as they may
8829 contain headers like "Received:" which really ought to be at the
8832 * gmime-part.c: Removed some old cruft.
8834 2000-10-29 Jeffrey Stedfast <fejj@helixcode.com>
8836 * internet-address.c (encoded_name): Use
8837 g_mime_utils_8bit_header_encode_phrase() to encode the addrspec.
8839 * gmime-utils.c (g_mime_utils_8bit_header_decode): Fix to make the
8840 decoder more rfc compliant. As stated by rfc2047, all white space
8841 between encoded words MUST be ignored.
8842 (g_mime_utils_8bit_header_encode_phrase): New rfc2047 encoding
8843 function for phrases (see rfc2047 section 5 part 3).
8845 2000-10-28 Jeffrey Stedfast <fejj@helixcode.com>
8847 * gmime-utils.c (parse_rfc822_date): Fixed the off-by-one-hour
8850 * test-mime.c: Updated to reflect changes to
8851 g_mime_message_get_body().
8853 * gmime-message.c (g_mime_message_get_headers): Added Gtk-Doc
8855 (g_mime_message_get_body): Modified to return a const pointer to
8856 the message body rather than allocating it.
8858 2000-10-28 Charles Kerr <charles@superpimp.org>
8860 * gmime-message.c (g_mime_message_get_headers): New function
8861 similar to g_mime_message_get_body. Useful if you want a raw
8862 display of headers separate from the body.
8864 * gmime-message.[c,h] (g_mime_message_get_body): made const.
8866 2000-10-28 Jeffrey Stedfast <fejj@helixcode.com>
8868 * tests/Makefile.am: New automake file (when we make a release,
8869 this directory should really be a part of the tarball as it
8870 contains data for the test programs).
8872 * tests/.cvsignore: Added.
8874 * Makefile.am (SUBDIRS): Add the 'tests' directory
8876 * configure.in: Generate tests/Makefile
8878 2000-10-27 Jeffrey Stedfast <fejj@helixcode.com>
8880 * test-mime.c: Added code to test g_mime_message_get_body()
8882 * gmime-message.c (g_mime_message_get_body): New convenience
8883 function that attempts to get the message body in the requested
8884 text format (plain vs html).
8886 * gmime-parser.c (construct_headers): If the end of a header field
8887 is the end of the header, break out of the loop.
8889 * gmime-content-type.[c,h]: Added const to arguments where
8892 * gmime-utils.h: Fixed a spelling mistake in a comment ;-)
8894 2000-10-26 Charles Kerr <charles@superpimp.org>
8896 * gmime-utils.h: made const the input ptrs for encode/decode
8899 * gmime-utils.c: Updated to reflect const changes.
8901 2000-10-26 Jeffrey Stedfast <fejj@helixcode.com>
8903 * test-mime.c: Also updated.
8905 * gmime-parser.c (construct_headers): Updated to reflect name
8908 * gmime-message.c: Updated to reflect name changes.
8910 * gmime-message.h: Changed the name of the recipient type
8913 2000-10-24 Jeffrey Stedfast <fejj@helixcode.com>
8915 * Makefile.am (SUBDIRS): Added "."
8917 * configure.in: Create libgmime.spec
8919 2000-10-24 Charles Kerr <charles@superpimp.org>
8921 * gmime-utils.c: added #include <stdlib.h> to pick up atoi.
8923 * internet-address.c (internet_address_new): removed unused
8926 2000-10-24 Jeffrey Stedfast <fejj@helixcode.com>
8928 Thanks to Charles Kerr of Pan fame for the following fixes.
8930 * gmime-utils.c (encode_8bit_word): Oops, encode 'word' and not 'ptr'.
8932 * gmime-part.c (g_mime_part_destroy): Free the content-id.
8934 2000-10-21 Jeffrey Stedfast <fejj@helixcode.com>
8936 * gmime.h.in: Wrap definitions in #ifndef __GMIME_H__
8938 2000-10-18 Jeffrey Stedfast <fejj@helixcode.com>
8942 * test-*.c: Updated to reflect GMime API changes.
8944 * gmime-part.c: #include "gmime-utils.h"
8946 * gmime-parser.c (g_mime_parser_construct_message): Now takes a
8947 boolean argument 'save_extra_headers' which tells the parser
8948 whether it should add unknown headers to the arbitrary header
8949 array or ignore them.
8950 (construct_headers): Save the extra headers if desired.
8952 * gmime-message.c (g_mime_message_add_arbitrary_header): Use the
8953 new GMimeHeader structure.
8954 (g_mime_message_new): Always initialize the arbitrary header array.
8955 (g_mime_message_destroy): The arbitrary header array will never
8956 be NULL (as it is now pre-initialized) so don't bother
8958 (create_header): rfc2047 encode the arbitrary header values.
8960 2000-10-17 Jeffrey Stedfast <fejj@helixcode.com>
8962 * rfc/rfc*.txt: MIME specification RFCs
8966 * TODO: Added a list of tasks that need to be done eventually.
8968 * gmime-parser.c (get_mime_part): rfc2047 decode the
8969 content-description before we set the value.
8971 * gmime-part.c (g_mime_part_to_string): rfc2047 encode the
8972 content-description before we write it to the string.
8974 2000-10-06 Jeffrey Stedfast <fejj@helixcode.com>
8976 * gmime-parser.c (construct_headers): rfc2047 decode some headers.
8978 * internet-address.c (internet_address_to_string): Now takes an
8979 argument to rfc2047 encode or not, when not rfc2047 encoding.
8980 (internet_address_new_from_string): Rewrote
8982 * gmime-message.c (create_header): rfc2047 encode addresses and
8985 2000-10-05 Jeffrey Stedfast <fejj@helixcode.com>
8987 * gmime-utils.c (g_mime_utils_quoted_encode_step): Fixed some
8988 non-compliance issues like encoding all spaces as =20 even when
8989 they shouldn't have been.
8991 2000-10-04 Jeffrey Stedfast <fejj@helixcode.com>
8994 * config.h.in: #undef HAVE_ISBLANK
8996 * configure.in: Check for the isblank() GNU extension function.
8998 * gmime-parser.c (get_mime_part): Parse for the Content-Id. Use
8999 isblank() instead of isspace() when looking to see if the content
9000 header was wrapped. We want it to match only if the next char is
9001 either a tab or a space.
9002 (isblank): Define an isblank() macro if HAVE_ISBLANK isn't
9005 * gmime-part.c (g_mime_part_set_content_id): New function to set
9007 (g_mime_part_get_content_id): New function to get the Content-Id.
9008 (g_mime_part_to_string): Print content id's if available.
9009 (get_content_type): Eek! If there aren't any params, don't assign
9010 'string' an empty string! It's already been initialized with a
9013 2000-10-04 Jeffrey Stedfast <fejj@helixcode.com>
9015 * gmime-utils.c (quoted_decode): New function to decode rfc2047's
9016 version of the quoted-printable encoding.
9017 (decode_8bit_word): Use quoted_decode()
9018 (quoted_encode): New function to encode to rfc2047's version of
9019 quoted-printable (removed from the internals of encode_8bit_word)
9020 (encode_8bit_word): Use quoted_encode()
9022 2000-10-01 Jeffrey Stedfast <fejj@helixcode.com>
9024 * internet-address.c (internet_address_new_from_string): Fixed a
9025 logic error that cut off the last char of the name (or address).
9027 * gmime-parser.c (construct_headers): Optimized.
9029 * gmime-part.c (get_content_type): If there are no params, don't
9030 try to get any. Fixes a segfault.
9032 * gmime-utils.[c,h]: New utilities functions for use with libgmime
9033 (time and encoding/decoding routines)
9035 * test-mime.c: test some of the routines in gmime-utils.c
9037 * gmime.h.in: #include "gmime-utils.h"
9039 * configure.in: Added checks for time zone stuff
9042 * config.h.in: Added some #undef's for timezone stuff
9044 * Makefile.am: Added gmime-utils.[c,h]
9046 2000-09-24 Jeffrey Stedfast <fejj@helixcode.com>
9050 * gmime-param.c: Wrote Gtk-docs comments
9052 * gmime-parser.c: Wrote Gtk-docs comments
9056 * autogen.sh: Updated autogen.sh to look for gmime.h.in instead of
9059 2000-09-24 Jeffrey Stedfast <fejj@helixcode.com>
9063 * gmime.h.in: Replacement for gmime.h - modified to be dynamically
9064 created at build-time.
9066 * configure.in: Updated to generate gmime.h and also to ignore
9067 doc/ until docs are written.
9069 * Makefile.am: Modified to ignore doc/
9071 * tests/*: MIME messages that break are likely to break MIME
9074 2000-09-24 Jeffrey Stedfast <fejj@helixcode.com>
9076 * gmime-part.c (get_content_disposition): Put a space between
9077 disposition parameters.
9078 (get_content_type): New convenience function to dump the content
9079 type and it's params to a string (for use internally).
9080 (g_mime_part_to_string): Use get_content_type and add print for
9081 content-description's.
9083 * gmime-parser.c (get_mime_part): strip leading/trailing
9084 whitespace from the disposition and convert param names to
9085 lowercase. Also fixed Content-Transfer-Encoding.
9087 2000-09-23 Jeffrey Stedfast <fejj@helixcode.com>
9089 * gmime-part.c (g_mime_part_destroy): Erm, make sure to increment
9090 to the next item in the list.
9092 * gmime-message.c (recipients_destroy): Optimized a bit
9094 * gmime-content-type.c (g_mime_content_type_new_from_string):
9095 Change all parameter names to lowercase, this way we can look them
9096 up without having to know which case the original name used (eg
9099 * test-mime.c: renamed from mime-test.c
9101 * test-parser.c: a new test program that allows us to specify a
9102 file to get our test email from.
9104 2000-09-22 Jeffrey Stedfast <fejj@helixcode.com>
9106 * configure.in: remember glib_cflags and glib_libs so we can dump
9107 them into gmime-config later.
9109 * gmime-config.in: use glib_cflags and glib_libs.
9111 * gmime.h: add variables for major/minor/micro release
9113 * Makefile.am: switch to GMIME_ instead of LIBGMIME_ stuff