From 3c9ec9e74ef3128e84c0076eb1761205b0e84532 Mon Sep 17 00:00:00 2001 From: nobody Date: Sat, 4 Aug 2001 19:29:35 +0000 Subject: This commit was manufactured by cvs2svn to create tag 'GNOME_CORE_1_4_0_6'. svn path=/tags/GNOME_CORE_1_4_0_6/; revision=11668 --- camel/.cvsignore | 12 - camel/CODING.STYLE | 19 - camel/ChangeLog | 13923 ------------------- camel/Makefile.am | 263 - camel/README | 63 - camel/README.COPYRIGHT | 47 - camel/README.HACKING | 14 - camel/README.mt | 171 - camel/broken-date-parser.c | 318 - camel/broken-date-parser.h | 32 - camel/camel-address.c | 240 - camel/camel-address.h | 70 - camel/camel-charset-map-private.h | 515 - camel/camel-charset-map.c | 424 - camel/camel-charset-map.h | 44 - camel/camel-cipher-context.c | 450 - camel/camel-cipher-context.h | 125 - camel/camel-cms-context.c | 324 - camel/camel-cms-context.h | 128 - camel/camel-data-wrapper.c | 294 - camel/camel-data-wrapper.h | 94 - camel/camel-digest-folder.c | 305 - camel/camel-digest-folder.h | 52 - camel/camel-disco-diary.c | 417 - camel/camel-disco-diary.h | 100 - camel/camel-disco-folder.c | 325 - camel/camel-disco-folder.h | 117 - camel/camel-disco-store.c | 311 - camel/camel-disco-store.h | 122 - camel/camel-exception-list.def | 37 - camel/camel-exception.c | 296 - camel/camel-exception.h | 88 - camel/camel-file-utils.c | 283 - camel/camel-file-utils.h | 55 - camel/camel-filter-driver.c | 943 -- camel/camel-filter-driver.h | 97 - camel/camel-filter-search.c | 476 - camel/camel-filter-search.h | 44 - camel/camel-folder-search.c | 905 -- camel/camel-folder-search.h | 121 - camel/camel-folder-summary.c | 2617 ---- camel/camel-folder-summary.h | 326 - camel/camel-folder-thread.c | 784 -- camel/camel-folder-thread.h | 58 - camel/camel-folder.c | 1810 --- camel/camel-folder.h | 310 - camel/camel-html-parser.c | 807 -- camel/camel-html-parser.h | 78 - camel/camel-internet-address.c | 510 - camel/camel-internet-address.h | 55 - camel/camel-lock-client.c | 329 - camel/camel-lock-client.h | 42 - camel/camel-lock-helper.c | 389 - camel/camel-lock-helper.h | 70 - camel/camel-lock.c | 407 - camel/camel-lock.h | 64 - camel/camel-medium.c | 327 - camel/camel-medium.h | 101 - camel/camel-mime-filter-basic.c | 222 - camel/camel-mime-filter-basic.h | 58 - camel/camel-mime-filter-bestenc.c | 289 - camel/camel-mime-filter-bestenc.h | 88 - camel/camel-mime-filter-charset.c | 248 - camel/camel-mime-filter-charset.h | 52 - camel/camel-mime-filter-crlf.c | 164 - camel/camel-mime-filter-crlf.h | 63 - camel/camel-mime-filter-from.c | 221 - camel/camel-mime-filter-from.h | 49 - camel/camel-mime-filter-html.c | 200 - camel/camel-mime-filter-html.h | 46 - camel/camel-mime-filter-index.c | 156 - camel/camel-mime-filter-index.h | 55 - camel/camel-mime-filter-linewrap.c | 140 - camel/camel-mime-filter-linewrap.h | 51 - camel/camel-mime-filter-save.c | 144 - camel/camel-mime-filter-save.h | 50 - camel/camel-mime-filter-stripheader.c | 181 - camel/camel-mime-filter-stripheader.h | 54 - camel/camel-mime-filter.c | 256 - camel/camel-mime-filter.h | 84 - camel/camel-mime-message.c | 835 -- camel/camel-mime-message.h | 134 - camel/camel-mime-parser.c | 1953 --- camel/camel-mime-parser.h | 133 - camel/camel-mime-part-utils.c | 333 - camel/camel-mime-part-utils.h | 45 - camel/camel-mime-part.c | 813 -- camel/camel-mime-part.h | 134 - camel/camel-mime-utils.c | 4069 ------ camel/camel-mime-utils.h | 201 - camel/camel-movemail.c | 544 - camel/camel-movemail.h | 45 - camel/camel-multipart.c | 522 - camel/camel-multipart.h | 105 - camel/camel-news-address.c | 65 - camel/camel-news-address.h | 45 - camel/camel-object.c | 979 -- camel/camel-object.h | 147 - camel/camel-operation.c | 675 - camel/camel-operation.h | 67 - camel/camel-pgp-context.c | 1388 -- camel/camel-pgp-context.h | 81 - camel/camel-pgp-mime.c | 514 - camel/camel-pgp-mime.h | 64 - camel/camel-pkcs7-context.c | 691 - camel/camel-pkcs7-context.h | 73 - camel/camel-private.h | 195 - camel/camel-provider.c | 155 - camel/camel-provider.h | 161 - camel/camel-remote-store.c | 588 - camel/camel-remote-store.h | 86 - camel/camel-sasl-anonymous.c | 150 - camel/camel-sasl-anonymous.h | 70 - camel/camel-sasl-cram-md5.c | 142 - camel/camel-sasl-cram-md5.h | 59 - camel/camel-sasl-digest-md5.c | 895 -- camel/camel-sasl-digest-md5.h | 62 - camel/camel-sasl-kerberos4.c | 223 - camel/camel-sasl-kerberos4.h | 62 - camel/camel-sasl-login.c | 134 - camel/camel-sasl-login.h | 61 - camel/camel-sasl-plain.c | 104 - camel/camel-sasl-plain.h | 59 - camel/camel-sasl-popb4smtp.c | 155 - camel/camel-sasl-popb4smtp.h | 59 - camel/camel-sasl.c | 261 - camel/camel-sasl.h | 77 - camel/camel-search-private.c | 433 - camel/camel-search-private.h | 46 - camel/camel-seekable-stream.c | 203 - camel/camel-seekable-stream.h | 88 - camel/camel-seekable-substream.c | 304 - camel/camel-seekable-substream.h | 70 - camel/camel-service.c | 624 - camel/camel-service.h | 130 - camel/camel-session.c | 686 - camel/camel-session.h | 182 - camel/camel-smime-context.c | 942 -- camel/camel-smime-context.h | 62 - camel/camel-smime-utils.c | 126 - camel/camel-smime-utils.h | 43 - camel/camel-store.c | 819 -- camel/camel-store.h | 194 - camel/camel-stream-buffer.c | 456 - camel/camel-stream-buffer.h | 109 - camel/camel-stream-filter.c | 382 - camel/camel-stream-filter.h | 52 - camel/camel-stream-fs.c | 374 - camel/camel-stream-fs.h | 75 - camel/camel-stream-mem.c | 251 - camel/camel-stream-mem.h | 75 - camel/camel-stream-null.c | 92 - camel/camel-stream-null.h | 46 - camel/camel-stream.c | 275 - camel/camel-stream.h | 91 - camel/camel-tcp-stream-openssl.c | 593 - camel/camel-tcp-stream-openssl.h | 64 - camel/camel-tcp-stream-raw.c | 445 - camel/camel-tcp-stream-raw.h | 64 - camel/camel-tcp-stream-ssl.c | 453 - camel/camel-tcp-stream-ssl.h | 65 - camel/camel-tcp-stream.c | 180 - camel/camel-tcp-stream.h | 122 - camel/camel-transport.c | 147 - camel/camel-transport.h | 90 - camel/camel-types.h | 81 - camel/camel-uid-cache.c | 240 - camel/camel-uid-cache.h | 55 - camel/camel-url.c | 554 - camel/camel-url.h | 90 - camel/camel-vee-folder.c | 1056 -- camel/camel-vee-folder.h | 69 - camel/camel-vee-store.c | 140 - camel/camel-vee-store.h | 51 - camel/camel-vtrash-folder.c | 141 - camel/camel-vtrash-folder.h | 53 - camel/camel.c | 92 - camel/camel.h | 91 - camel/devel-docs/camel_data_wrapper.dia | Bin 3062 -> 0 bytes camel/devel-docs/camel_parser_states.dia | Bin 2505 -> 0 bytes camel/devel-docs/camel_stream.dia | Bin 2669 -> 0 bytes camel/gstring-util.c | 217 - camel/gstring-util.h | 66 - camel/hash-table-utils.c | 79 - camel/hash-table-utils.h | 48 - camel/providers/.cvsignore | 2 - camel/providers/Makefile.am | 11 - camel/providers/imap/.cvsignore | 11 - camel/providers/imap/Makefile.am | 50 - camel/providers/imap/camel-imap-command.c | 740 - camel/providers/imap/camel-imap-command.h | 80 - camel/providers/imap/camel-imap-folder.c | 2072 --- camel/providers/imap/camel-imap-folder.h | 91 - camel/providers/imap/camel-imap-message-cache.c | 485 - camel/providers/imap/camel-imap-message-cache.h | 103 - camel/providers/imap/camel-imap-private.h | 95 - camel/providers/imap/camel-imap-provider.c | 149 - camel/providers/imap/camel-imap-search.c | 161 - camel/providers/imap/camel-imap-search.h | 51 - camel/providers/imap/camel-imap-store.c | 1486 -- camel/providers/imap/camel-imap-store.h | 92 - camel/providers/imap/camel-imap-summary.c | 229 - camel/providers/imap/camel-imap-summary.h | 76 - camel/providers/imap/camel-imap-types.h | 40 - camel/providers/imap/camel-imap-utils.c | 732 - camel/providers/imap/camel-imap-utils.h | 68 - camel/providers/imap/camel-imap-wrapper.c | 220 - camel/providers/imap/camel-imap-wrapper.h | 71 - camel/providers/imap/libcamelimap.urls | 1 - camel/providers/local/.cvsignore | 11 - camel/providers/local/Makefile.am | 64 - camel/providers/local/camel-local-folder.c | 351 - camel/providers/local/camel-local-folder.h | 96 - camel/providers/local/camel-local-private.h | 74 - camel/providers/local/camel-local-provider.c | 95 - camel/providers/local/camel-local-store.c | 308 - camel/providers/local/camel-local-store.h | 68 - camel/providers/local/camel-local-summary.c | 573 - camel/providers/local/camel-local-summary.h | 86 - camel/providers/local/camel-maildir-folder.c | 233 - camel/providers/local/camel-maildir-folder.h | 59 - camel/providers/local/camel-maildir-store.c | 323 - camel/providers/local/camel-maildir-store.h | 56 - camel/providers/local/camel-maildir-summary.c | 763 - camel/providers/local/camel-maildir-summary.h | 84 - camel/providers/local/camel-mbox-folder.c | 445 - camel/providers/local/camel-mbox-folder.h | 63 - camel/providers/local/camel-mbox-store.c | 171 - camel/providers/local/camel-mbox-store.h | 59 - camel/providers/local/camel-mbox-summary.c | 888 -- camel/providers/local/camel-mbox-summary.h | 63 - camel/providers/local/camel-mh-folder.c | 224 - camel/providers/local/camel-mh-folder.h | 59 - camel/providers/local/camel-mh-store.c | 136 - camel/providers/local/camel-mh-store.h | 56 - camel/providers/local/camel-mh-summary.c | 397 - camel/providers/local/camel-mh-summary.h | 53 - camel/providers/local/camel-spool-folder.c | 649 - camel/providers/local/camel-spool-folder.h | 103 - camel/providers/local/camel-spool-store.c | 231 - camel/providers/local/camel-spool-store.h | 67 - camel/providers/local/camel-spool-summary.c | 1274 -- camel/providers/local/camel-spool-summary.h | 96 - camel/providers/local/libcamellocal.urls | 4 - camel/providers/nntp/.cvsignore | 12 - camel/providers/nntp/Makefile.am | 53 - camel/providers/nntp/camel-nntp-auth.c | 93 - camel/providers/nntp/camel-nntp-auth.h | 43 - camel/providers/nntp/camel-nntp-folder.c | 289 - camel/providers/nntp/camel-nntp-folder.h | 75 - camel/providers/nntp/camel-nntp-grouplist.c | 220 - camel/providers/nntp/camel-nntp-grouplist.h | 49 - camel/providers/nntp/camel-nntp-newsrc.c | 645 - camel/providers/nntp/camel-nntp-newsrc.h | 34 - camel/providers/nntp/camel-nntp-provider.c | 112 - camel/providers/nntp/camel-nntp-resp-codes.h | 56 - camel/providers/nntp/camel-nntp-store.c | 876 -- camel/providers/nntp/camel-nntp-store.h | 128 - camel/providers/nntp/camel-nntp-types.h | 34 - camel/providers/nntp/camel-nntp-utils.c | 301 - camel/providers/nntp/camel-nntp-utils.h | 42 - camel/providers/nntp/libcamelnntp.urls | 2 - camel/providers/nntp/test-newsrc.c | 10 - camel/providers/pop3/.cvsignore | 10 - camel/providers/pop3/Makefile.am | 37 - camel/providers/pop3/camel-pop3-folder.c | 370 - camel/providers/pop3/camel-pop3-folder.h | 72 - camel/providers/pop3/camel-pop3-provider.c | 113 - camel/providers/pop3/camel-pop3-store.c | 650 - camel/providers/pop3/camel-pop3-store.h | 79 - camel/providers/pop3/libcamelpop3.urls | 1 - camel/providers/sendmail/.cvsignore | 11 - camel/providers/sendmail/Makefile.am | 31 - camel/providers/sendmail/camel-sendmail-provider.c | 63 - .../providers/sendmail/camel-sendmail-transport.c | 250 - .../providers/sendmail/camel-sendmail-transport.h | 64 - camel/providers/sendmail/libcamelsendmail.urls | 1 - camel/providers/smtp/.cvsignore | 10 - camel/providers/smtp/Makefile.am | 37 - camel/providers/smtp/camel-smtp-provider.c | 65 - camel/providers/smtp/camel-smtp-transport.c | 1135 -- camel/providers/smtp/camel-smtp-transport.h | 81 - camel/providers/smtp/libcamelsmtp.urls | 1 - camel/providers/vee/.cvsignore | 6 - camel/string-utils.c | 233 - camel/string-utils.h | 70 - camel/tests/.cvsignore | 7 - camel/tests/Makefile.am | 3 - camel/tests/README | 44 - camel/tests/data/gendoc.pl | 65 - camel/tests/data/genline.pl | 72 - camel/tests/data/getaddr.pl | 32 - camel/tests/folder/.cvsignore | 21 - camel/tests/folder/Makefile.am | 29 - camel/tests/folder/README | 11 - camel/tests/folder/test1.c | 50 - camel/tests/folder/test2.c | 58 - camel/tests/folder/test3.c | 335 - camel/tests/folder/test4.c | 53 - camel/tests/folder/test5.c | 53 - camel/tests/folder/test6.c | 55 - camel/tests/folder/test7.c | 55 - camel/tests/folder/test8.c | 215 - camel/tests/folder/test9.c | 227 - camel/tests/lib/.cvsignore | 12 - camel/tests/lib/Makefile.am | 14 - camel/tests/lib/address-data.h | 93 - camel/tests/lib/addresses.c | 51 - camel/tests/lib/addresses.h | 5 - camel/tests/lib/camel-test.c | 350 - camel/tests/lib/camel-test.h | 68 - camel/tests/lib/folders.c | 524 - camel/tests/lib/folders.h | 20 - camel/tests/lib/messages.c | 154 - camel/tests/lib/messages.h | 12 - camel/tests/lib/session.c | 59 - camel/tests/lib/session.h | 19 - camel/tests/lib/streams.c | 244 - camel/tests/lib/streams.h | 12 - camel/tests/message/.cvsignore | 15 - camel/tests/message/Makefile.am | 23 - camel/tests/message/README | 5 - camel/tests/message/test1.c | 200 - camel/tests/message/test2.c | 326 - camel/tests/message/test3.c | 199 - camel/tests/mime-filter/.cvsignore | 8 - camel/tests/mime-filter/Makefile.am | 39 - camel/tests/mime-filter/crlf-1.in | 19 - camel/tests/mime-filter/crlf-1.out | 19 - camel/tests/mime-filter/stripheader-1.in | 6 - camel/tests/mime-filter/stripheader-1.out | 5 - camel/tests/mime-filter/stripheader-2.in | 8 - camel/tests/mime-filter/stripheader-2.out | 6 - camel/tests/mime-filter/stripheader-3.in | 9 - camel/tests/mime-filter/stripheader-3.out | 7 - camel/tests/mime-filter/stripheader-4.in | 7 - camel/tests/mime-filter/stripheader-4.out | 5 - camel/tests/mime-filter/stripheader-5.in | 9 - camel/tests/mime-filter/stripheader-5.out | 5 - camel/tests/mime-filter/stripheader-6.in | 15 - camel/tests/mime-filter/stripheader-6.out | 6 - camel/tests/mime-filter/test-crlf.c | 163 - camel/tests/mime-filter/test-stripheader.c | 131 - camel/tests/misc/.cvsignore | 12 - camel/tests/misc/Makefile.am | 21 - camel/tests/misc/README | 3 - camel/tests/misc/url.c | 108 - camel/tests/smime/.cvsignore | 5 - camel/tests/smime/Makefile.am | 20 - camel/tests/smime/README | 2 - camel/tests/smime/pgp-mime.c | 170 - camel/tests/smime/pgp.c | 178 - camel/tests/smime/pkcs7.c | 178 - camel/tests/stream/.cvsignore | 14 - camel/tests/stream/Makefile.am | 21 - camel/tests/stream/README | 4 - camel/tests/stream/test1.c | 119 - camel/tests/stream/test2.c | 53 - camel/tests/stream/test3.c | 104 - 359 files changed, 92739 deletions(-) delete mode 100644 camel/.cvsignore delete mode 100644 camel/CODING.STYLE delete mode 100644 camel/ChangeLog delete mode 100644 camel/Makefile.am delete mode 100644 camel/README delete mode 100644 camel/README.COPYRIGHT delete mode 100644 camel/README.HACKING delete mode 100644 camel/README.mt delete mode 100644 camel/broken-date-parser.c delete mode 100644 camel/broken-date-parser.h delete mode 100644 camel/camel-address.c delete mode 100644 camel/camel-address.h delete mode 100644 camel/camel-charset-map-private.h delete mode 100644 camel/camel-charset-map.c delete mode 100644 camel/camel-charset-map.h delete mode 100644 camel/camel-cipher-context.c delete mode 100644 camel/camel-cipher-context.h delete mode 100644 camel/camel-cms-context.c delete mode 100644 camel/camel-cms-context.h delete mode 100644 camel/camel-data-wrapper.c delete mode 100644 camel/camel-data-wrapper.h delete mode 100644 camel/camel-digest-folder.c delete mode 100644 camel/camel-digest-folder.h delete mode 100644 camel/camel-disco-diary.c delete mode 100644 camel/camel-disco-diary.h delete mode 100644 camel/camel-disco-folder.c delete mode 100644 camel/camel-disco-folder.h delete mode 100644 camel/camel-disco-store.c delete mode 100644 camel/camel-disco-store.h delete mode 100644 camel/camel-exception-list.def delete mode 100644 camel/camel-exception.c delete mode 100644 camel/camel-exception.h delete mode 100644 camel/camel-file-utils.c delete mode 100644 camel/camel-file-utils.h delete mode 100644 camel/camel-filter-driver.c delete mode 100644 camel/camel-filter-driver.h delete mode 100644 camel/camel-filter-search.c delete mode 100644 camel/camel-filter-search.h delete mode 100644 camel/camel-folder-search.c delete mode 100644 camel/camel-folder-search.h delete mode 100644 camel/camel-folder-summary.c delete mode 100644 camel/camel-folder-summary.h delete mode 100644 camel/camel-folder-thread.c delete mode 100644 camel/camel-folder-thread.h delete mode 100644 camel/camel-folder.c delete mode 100644 camel/camel-folder.h delete mode 100644 camel/camel-html-parser.c delete mode 100644 camel/camel-html-parser.h delete mode 100644 camel/camel-internet-address.c delete mode 100644 camel/camel-internet-address.h delete mode 100644 camel/camel-lock-client.c delete mode 100644 camel/camel-lock-client.h delete mode 100644 camel/camel-lock-helper.c delete mode 100644 camel/camel-lock-helper.h delete mode 100644 camel/camel-lock.c delete mode 100644 camel/camel-lock.h delete mode 100644 camel/camel-medium.c delete mode 100644 camel/camel-medium.h delete mode 100644 camel/camel-mime-filter-basic.c delete mode 100644 camel/camel-mime-filter-basic.h delete mode 100644 camel/camel-mime-filter-bestenc.c delete mode 100644 camel/camel-mime-filter-bestenc.h delete mode 100644 camel/camel-mime-filter-charset.c delete mode 100644 camel/camel-mime-filter-charset.h delete mode 100644 camel/camel-mime-filter-crlf.c delete mode 100644 camel/camel-mime-filter-crlf.h delete mode 100644 camel/camel-mime-filter-from.c delete mode 100644 camel/camel-mime-filter-from.h delete mode 100644 camel/camel-mime-filter-html.c delete mode 100644 camel/camel-mime-filter-html.h delete mode 100644 camel/camel-mime-filter-index.c delete mode 100644 camel/camel-mime-filter-index.h delete mode 100644 camel/camel-mime-filter-linewrap.c delete mode 100644 camel/camel-mime-filter-linewrap.h delete mode 100644 camel/camel-mime-filter-save.c delete mode 100644 camel/camel-mime-filter-save.h delete mode 100644 camel/camel-mime-filter-stripheader.c delete mode 100644 camel/camel-mime-filter-stripheader.h delete mode 100644 camel/camel-mime-filter.c delete mode 100644 camel/camel-mime-filter.h delete mode 100644 camel/camel-mime-message.c delete mode 100644 camel/camel-mime-message.h delete mode 100644 camel/camel-mime-parser.c delete mode 100644 camel/camel-mime-parser.h delete mode 100644 camel/camel-mime-part-utils.c delete mode 100644 camel/camel-mime-part-utils.h delete mode 100644 camel/camel-mime-part.c delete mode 100644 camel/camel-mime-part.h delete mode 100644 camel/camel-mime-utils.c delete mode 100644 camel/camel-mime-utils.h delete mode 100644 camel/camel-movemail.c delete mode 100644 camel/camel-movemail.h delete mode 100644 camel/camel-multipart.c delete mode 100644 camel/camel-multipart.h delete mode 100644 camel/camel-news-address.c delete mode 100644 camel/camel-news-address.h delete mode 100644 camel/camel-object.c delete mode 100644 camel/camel-object.h delete mode 100644 camel/camel-operation.c delete mode 100644 camel/camel-operation.h delete mode 100644 camel/camel-pgp-context.c delete mode 100644 camel/camel-pgp-context.h delete mode 100644 camel/camel-pgp-mime.c delete mode 100644 camel/camel-pgp-mime.h delete mode 100644 camel/camel-pkcs7-context.c delete mode 100644 camel/camel-pkcs7-context.h delete mode 100644 camel/camel-private.h delete mode 100644 camel/camel-provider.c delete mode 100644 camel/camel-provider.h delete mode 100644 camel/camel-remote-store.c delete mode 100644 camel/camel-remote-store.h delete mode 100644 camel/camel-sasl-anonymous.c delete mode 100644 camel/camel-sasl-anonymous.h delete mode 100644 camel/camel-sasl-cram-md5.c delete mode 100644 camel/camel-sasl-cram-md5.h delete mode 100644 camel/camel-sasl-digest-md5.c delete mode 100644 camel/camel-sasl-digest-md5.h delete mode 100644 camel/camel-sasl-kerberos4.c delete mode 100644 camel/camel-sasl-kerberos4.h delete mode 100644 camel/camel-sasl-login.c delete mode 100644 camel/camel-sasl-login.h delete mode 100644 camel/camel-sasl-plain.c delete mode 100644 camel/camel-sasl-plain.h delete mode 100644 camel/camel-sasl-popb4smtp.c delete mode 100644 camel/camel-sasl-popb4smtp.h delete mode 100644 camel/camel-sasl.c delete mode 100644 camel/camel-sasl.h delete mode 100644 camel/camel-search-private.c delete mode 100644 camel/camel-search-private.h delete mode 100644 camel/camel-seekable-stream.c delete mode 100644 camel/camel-seekable-stream.h delete mode 100644 camel/camel-seekable-substream.c delete mode 100644 camel/camel-seekable-substream.h delete mode 100644 camel/camel-service.c delete mode 100644 camel/camel-service.h delete mode 100644 camel/camel-session.c delete mode 100644 camel/camel-session.h delete mode 100644 camel/camel-smime-context.c delete mode 100644 camel/camel-smime-context.h delete mode 100644 camel/camel-smime-utils.c delete mode 100644 camel/camel-smime-utils.h delete mode 100644 camel/camel-store.c delete mode 100644 camel/camel-store.h delete mode 100644 camel/camel-stream-buffer.c delete mode 100644 camel/camel-stream-buffer.h delete mode 100644 camel/camel-stream-filter.c delete mode 100644 camel/camel-stream-filter.h delete mode 100644 camel/camel-stream-fs.c delete mode 100644 camel/camel-stream-fs.h delete mode 100644 camel/camel-stream-mem.c delete mode 100644 camel/camel-stream-mem.h delete mode 100644 camel/camel-stream-null.c delete mode 100644 camel/camel-stream-null.h delete mode 100644 camel/camel-stream.c delete mode 100644 camel/camel-stream.h delete mode 100644 camel/camel-tcp-stream-openssl.c delete mode 100644 camel/camel-tcp-stream-openssl.h delete mode 100644 camel/camel-tcp-stream-raw.c delete mode 100644 camel/camel-tcp-stream-raw.h delete mode 100644 camel/camel-tcp-stream-ssl.c delete mode 100644 camel/camel-tcp-stream-ssl.h delete mode 100644 camel/camel-tcp-stream.c delete mode 100644 camel/camel-tcp-stream.h delete mode 100644 camel/camel-transport.c delete mode 100644 camel/camel-transport.h delete mode 100644 camel/camel-types.h delete mode 100644 camel/camel-uid-cache.c delete mode 100644 camel/camel-uid-cache.h delete mode 100644 camel/camel-url.c delete mode 100644 camel/camel-url.h delete mode 100644 camel/camel-vee-folder.c delete mode 100644 camel/camel-vee-folder.h delete mode 100644 camel/camel-vee-store.c delete mode 100644 camel/camel-vee-store.h delete mode 100644 camel/camel-vtrash-folder.c delete mode 100644 camel/camel-vtrash-folder.h delete mode 100644 camel/camel.c delete mode 100644 camel/camel.h delete mode 100644 camel/devel-docs/camel_data_wrapper.dia delete mode 100644 camel/devel-docs/camel_parser_states.dia delete mode 100644 camel/devel-docs/camel_stream.dia delete mode 100644 camel/gstring-util.c delete mode 100644 camel/gstring-util.h delete mode 100644 camel/hash-table-utils.c delete mode 100644 camel/hash-table-utils.h delete mode 100644 camel/providers/.cvsignore delete mode 100644 camel/providers/Makefile.am delete mode 100644 camel/providers/imap/.cvsignore delete mode 100644 camel/providers/imap/Makefile.am delete mode 100644 camel/providers/imap/camel-imap-command.c delete mode 100644 camel/providers/imap/camel-imap-command.h delete mode 100644 camel/providers/imap/camel-imap-folder.c delete mode 100644 camel/providers/imap/camel-imap-folder.h delete mode 100644 camel/providers/imap/camel-imap-message-cache.c delete mode 100644 camel/providers/imap/camel-imap-message-cache.h delete mode 100644 camel/providers/imap/camel-imap-private.h delete mode 100644 camel/providers/imap/camel-imap-provider.c delete mode 100644 camel/providers/imap/camel-imap-search.c delete mode 100644 camel/providers/imap/camel-imap-search.h delete mode 100644 camel/providers/imap/camel-imap-store.c delete mode 100644 camel/providers/imap/camel-imap-store.h delete mode 100644 camel/providers/imap/camel-imap-summary.c delete mode 100644 camel/providers/imap/camel-imap-summary.h delete mode 100644 camel/providers/imap/camel-imap-types.h delete mode 100644 camel/providers/imap/camel-imap-utils.c delete mode 100644 camel/providers/imap/camel-imap-utils.h delete mode 100644 camel/providers/imap/camel-imap-wrapper.c delete mode 100644 camel/providers/imap/camel-imap-wrapper.h delete mode 100644 camel/providers/imap/libcamelimap.urls delete mode 100644 camel/providers/local/.cvsignore delete mode 100644 camel/providers/local/Makefile.am delete mode 100644 camel/providers/local/camel-local-folder.c delete mode 100644 camel/providers/local/camel-local-folder.h delete mode 100644 camel/providers/local/camel-local-private.h delete mode 100644 camel/providers/local/camel-local-provider.c delete mode 100644 camel/providers/local/camel-local-store.c delete mode 100644 camel/providers/local/camel-local-store.h delete mode 100644 camel/providers/local/camel-local-summary.c delete mode 100644 camel/providers/local/camel-local-summary.h delete mode 100644 camel/providers/local/camel-maildir-folder.c delete mode 100644 camel/providers/local/camel-maildir-folder.h delete mode 100644 camel/providers/local/camel-maildir-store.c delete mode 100644 camel/providers/local/camel-maildir-store.h delete mode 100644 camel/providers/local/camel-maildir-summary.c delete mode 100644 camel/providers/local/camel-maildir-summary.h delete mode 100644 camel/providers/local/camel-mbox-folder.c delete mode 100644 camel/providers/local/camel-mbox-folder.h delete mode 100644 camel/providers/local/camel-mbox-store.c delete mode 100644 camel/providers/local/camel-mbox-store.h delete mode 100644 camel/providers/local/camel-mbox-summary.c delete mode 100644 camel/providers/local/camel-mbox-summary.h delete mode 100644 camel/providers/local/camel-mh-folder.c delete mode 100644 camel/providers/local/camel-mh-folder.h delete mode 100644 camel/providers/local/camel-mh-store.c delete mode 100644 camel/providers/local/camel-mh-store.h delete mode 100644 camel/providers/local/camel-mh-summary.c delete mode 100644 camel/providers/local/camel-mh-summary.h delete mode 100644 camel/providers/local/camel-spool-folder.c delete mode 100644 camel/providers/local/camel-spool-folder.h delete mode 100644 camel/providers/local/camel-spool-store.c delete mode 100644 camel/providers/local/camel-spool-store.h delete mode 100644 camel/providers/local/camel-spool-summary.c delete mode 100644 camel/providers/local/camel-spool-summary.h delete mode 100644 camel/providers/local/libcamellocal.urls delete mode 100644 camel/providers/nntp/.cvsignore delete mode 100644 camel/providers/nntp/Makefile.am delete mode 100644 camel/providers/nntp/camel-nntp-auth.c delete mode 100644 camel/providers/nntp/camel-nntp-auth.h delete mode 100644 camel/providers/nntp/camel-nntp-folder.c delete mode 100644 camel/providers/nntp/camel-nntp-folder.h delete mode 100644 camel/providers/nntp/camel-nntp-grouplist.c delete mode 100644 camel/providers/nntp/camel-nntp-grouplist.h delete mode 100644 camel/providers/nntp/camel-nntp-newsrc.c delete mode 100644 camel/providers/nntp/camel-nntp-newsrc.h delete mode 100644 camel/providers/nntp/camel-nntp-provider.c delete mode 100644 camel/providers/nntp/camel-nntp-resp-codes.h delete mode 100644 camel/providers/nntp/camel-nntp-store.c delete mode 100644 camel/providers/nntp/camel-nntp-store.h delete mode 100644 camel/providers/nntp/camel-nntp-types.h delete mode 100644 camel/providers/nntp/camel-nntp-utils.c delete mode 100644 camel/providers/nntp/camel-nntp-utils.h delete mode 100644 camel/providers/nntp/libcamelnntp.urls delete mode 100644 camel/providers/nntp/test-newsrc.c delete mode 100644 camel/providers/pop3/.cvsignore delete mode 100644 camel/providers/pop3/Makefile.am delete mode 100644 camel/providers/pop3/camel-pop3-folder.c delete mode 100644 camel/providers/pop3/camel-pop3-folder.h delete mode 100644 camel/providers/pop3/camel-pop3-provider.c delete mode 100644 camel/providers/pop3/camel-pop3-store.c delete mode 100644 camel/providers/pop3/camel-pop3-store.h delete mode 100644 camel/providers/pop3/libcamelpop3.urls delete mode 100644 camel/providers/sendmail/.cvsignore delete mode 100644 camel/providers/sendmail/Makefile.am delete mode 100644 camel/providers/sendmail/camel-sendmail-provider.c delete mode 100644 camel/providers/sendmail/camel-sendmail-transport.c delete mode 100644 camel/providers/sendmail/camel-sendmail-transport.h delete mode 100644 camel/providers/sendmail/libcamelsendmail.urls delete mode 100644 camel/providers/smtp/.cvsignore delete mode 100644 camel/providers/smtp/Makefile.am delete mode 100644 camel/providers/smtp/camel-smtp-provider.c delete mode 100644 camel/providers/smtp/camel-smtp-transport.c delete mode 100644 camel/providers/smtp/camel-smtp-transport.h delete mode 100644 camel/providers/smtp/libcamelsmtp.urls delete mode 100644 camel/providers/vee/.cvsignore delete mode 100644 camel/string-utils.c delete mode 100644 camel/string-utils.h delete mode 100644 camel/tests/.cvsignore delete mode 100644 camel/tests/Makefile.am delete mode 100644 camel/tests/README delete mode 100755 camel/tests/data/gendoc.pl delete mode 100755 camel/tests/data/genline.pl delete mode 100755 camel/tests/data/getaddr.pl delete mode 100644 camel/tests/folder/.cvsignore delete mode 100644 camel/tests/folder/Makefile.am delete mode 100644 camel/tests/folder/README delete mode 100644 camel/tests/folder/test1.c delete mode 100644 camel/tests/folder/test2.c delete mode 100644 camel/tests/folder/test3.c delete mode 100644 camel/tests/folder/test4.c delete mode 100644 camel/tests/folder/test5.c delete mode 100644 camel/tests/folder/test6.c delete mode 100644 camel/tests/folder/test7.c delete mode 100644 camel/tests/folder/test8.c delete mode 100644 camel/tests/folder/test9.c delete mode 100644 camel/tests/lib/.cvsignore delete mode 100644 camel/tests/lib/Makefile.am delete mode 100644 camel/tests/lib/address-data.h delete mode 100644 camel/tests/lib/addresses.c delete mode 100644 camel/tests/lib/addresses.h delete mode 100644 camel/tests/lib/camel-test.c delete mode 100644 camel/tests/lib/camel-test.h delete mode 100644 camel/tests/lib/folders.c delete mode 100644 camel/tests/lib/folders.h delete mode 100644 camel/tests/lib/messages.c delete mode 100644 camel/tests/lib/messages.h delete mode 100644 camel/tests/lib/session.c delete mode 100644 camel/tests/lib/session.h delete mode 100644 camel/tests/lib/streams.c delete mode 100644 camel/tests/lib/streams.h delete mode 100644 camel/tests/message/.cvsignore delete mode 100644 camel/tests/message/Makefile.am delete mode 100644 camel/tests/message/README delete mode 100644 camel/tests/message/test1.c delete mode 100644 camel/tests/message/test2.c delete mode 100644 camel/tests/message/test3.c delete mode 100644 camel/tests/mime-filter/.cvsignore delete mode 100644 camel/tests/mime-filter/Makefile.am delete mode 100644 camel/tests/mime-filter/crlf-1.in delete mode 100644 camel/tests/mime-filter/crlf-1.out delete mode 100644 camel/tests/mime-filter/stripheader-1.in delete mode 100644 camel/tests/mime-filter/stripheader-1.out delete mode 100644 camel/tests/mime-filter/stripheader-2.in delete mode 100644 camel/tests/mime-filter/stripheader-2.out delete mode 100644 camel/tests/mime-filter/stripheader-3.in delete mode 100644 camel/tests/mime-filter/stripheader-3.out delete mode 100644 camel/tests/mime-filter/stripheader-4.in delete mode 100644 camel/tests/mime-filter/stripheader-4.out delete mode 100644 camel/tests/mime-filter/stripheader-5.in delete mode 100644 camel/tests/mime-filter/stripheader-5.out delete mode 100644 camel/tests/mime-filter/stripheader-6.in delete mode 100644 camel/tests/mime-filter/stripheader-6.out delete mode 100644 camel/tests/mime-filter/test-crlf.c delete mode 100644 camel/tests/mime-filter/test-stripheader.c delete mode 100644 camel/tests/misc/.cvsignore delete mode 100644 camel/tests/misc/Makefile.am delete mode 100644 camel/tests/misc/README delete mode 100644 camel/tests/misc/url.c delete mode 100644 camel/tests/smime/.cvsignore delete mode 100644 camel/tests/smime/Makefile.am delete mode 100644 camel/tests/smime/README delete mode 100644 camel/tests/smime/pgp-mime.c delete mode 100644 camel/tests/smime/pgp.c delete mode 100644 camel/tests/smime/pkcs7.c delete mode 100644 camel/tests/stream/.cvsignore delete mode 100644 camel/tests/stream/Makefile.am delete mode 100644 camel/tests/stream/README delete mode 100644 camel/tests/stream/test1.c delete mode 100644 camel/tests/stream/test2.c delete mode 100644 camel/tests/stream/test3.c (limited to 'camel') diff --git a/camel/.cvsignore b/camel/.cvsignore deleted file mode 100644 index e332b20150..0000000000 --- a/camel/.cvsignore +++ /dev/null @@ -1,12 +0,0 @@ -.deps -Makefile -Makefile.in -.libs -.deps -*.lo -*.la -*.bb -*.bbg -*.da -*.gcov -camel-lock-helper diff --git a/camel/CODING.STYLE b/camel/CODING.STYLE deleted file mode 100644 index 58e9c68bbe..0000000000 --- a/camel/CODING.STYLE +++ /dev/null @@ -1,19 +0,0 @@ -Note to hackers ---------------- - -When hacking on camel (and on the gnome mailer in general), -be sure to follow the same coding style as the initial authors. -Please read the file HACKING in gnumeric and follow the -general guidelines explained in it. - -Please take a look at camel source files and try to exactly -imitate the coding style. We are perfectly aware that this -is not the best and unique style, but it is absolutely -mandatory that Camel is homogeneous. If you find the current -coding style to have some weaknesses, please contact the -authors to discuss this matter. - -Thanks. - - Bertrand. - diff --git a/camel/ChangeLog b/camel/ChangeLog deleted file mode 100644 index 7b95db4ad9..0000000000 --- a/camel/ChangeLog +++ /dev/null @@ -1,13923 +0,0 @@ -2001-08-03 Jeffrey Stedfast - - * camel-pgp-context.c (pgp_verify): Minor changes to the iconv - code so that it does the check in the return value of iconv() just - like the code in camel-mime-utils.c in case this fixes Bo Rosen's - gpg bugs (but I doubt this will change anything?). - -2001-08-03 Jeffrey Stedfast - - * providers/smtp/camel-smtp-transport.c (smtp_connect): First - check to make sure that service->url->authmech is non-NULL before - passing it into strcmp to avoid a segfault. - - * camel-pgp-context.c (pgp_decrypt): Sigh, if gpg returns '1' it - means that the key is bad but it did succeede in decrypting the - block so to make users happy (even though I find this a - questionable action) we are going to ignore the error and show it - to the user anyway. This fixes bug #6136. - -2001-08-03 Not Zed - - * providers/smtp/camel-smtp-transport.c (smtp_connect): special - case popb4smtp auth before we try and connect, and do the magic - here first. - -2001-08-02 Not Zed - - * providers/smtp/camel-smtp-transport.c (smtp_connect): Check for - POPB4SMTP separate to the esmtp auth list. - (smtp_auth): If creating the sasl object means it is - already authenticated, then exit early. Sort of 'clean hack' to - help popb4smtp work. - (smtp_auth): Unref the sasl object, clean up a memleak i think. - - * providers/smtp/camel-smtp-provider.c - (camel_provider_module_init): Added POPB4SMTP auth type. - - * camel-sasl.c (camel_sasl_authtype): Added POPB4SMTP type. - - * camel-sasl-popb4smtp.c: New file for pop before smtp - 'authentication'. - - * Makefile.am (libcamel_la_SOURCES, HEADERS): Add - camel-sasl-popb4smtp.[ch]. - -2001-08-01 Not Zed - - * providers/local/camel-mbox-folder.c (mbox_lock): If we fail to - get the lock, make sure we close our locking fd, and reset it. - Fixes the crash part of 5095. - - * providers/imap/camel-imap-folder.c (camel_imap_folder_changed): - Slightly re-arranged filter/change notification logic. If we;re - filtering, freeze the folder till we're finished to smooth the ui - for new mail. - -2001-07-31 Not Zed - - * camel-folder.c (camel_folder_init): Chagned mutexes to - e_mutexes, folder lock recursive. This fixes the imap filtering - bug, or at least some cases of it. - (camel_folder_finalize): Free mutexes. - - * camel-private.h (CamelFolderPrivate): Changed mutexes to - e_mutexes. - -2001-07-25 Not Zed - - * camel-folder.c (camel_folder_change_info_*): Change the - return if fail's into asserts. - (camel_folder_change_info_free): Don't let it accept a NULL - argument. This isn't g_lib so we dont have to. - -2001-07-27 Jeffrey Stedfast - - * camel-mime-utils.c (header_decode_param): Fix the fix that fixes - broken mailer behavior. We want to make sure that the user's - locale charset is non-NULL before we pass it off to - iconv_open(). If it *is* NULL, we want to use iso-8859-1. - -2001-07-26 Jeffrey Stedfast - - * camel-url.c (camel_url_free): Allow the url to be NULL just like - the libc free convention. - -2001-07-26 Dan Winship - - * providers/imap/camel-imap-command.c (camel_imap_command_start): - Send an IMAP command, but don't wait for responses. - (camel_imap_command_response): Read a single line of response from - the server. - (camel_imap_command, etc): Reimplement in terms of the new code. - - * providers/imap/camel-imap-folder.c (imap_rescan): Use - camel_imap_command_start and camel_imap_command_response, and - call camel_operation_progress after each line read from the - server. - (imap_update_summary): Likewise, although with more fudging on the - precentages... Also, fix this so that if none of the new messages - are cached, it only does a single FETCH, and if some of them are - cached, it does two FETCHes (one to get the UIDs, FLAGS, and - SIZEs, and another to get the bodies of all of the messages that - aren't cached now that it knows the relevant UIDs). This should - speed up startup a bunch (especially if you have high bandwidth - but also high latency to the IMAP server). - -2001-07-25 Dan Winship - - * camel-mime-utils.c (mail_mlist_magic): Add another Sender - pattern. - -2001-07-24 Not Zed - - * providers/imap/camel-imap-folder.c (camel_imap_folder_changed): - Change the break into a continue, we should process as many as we - can find. - - * camel-folder.c (camel_folder_move_messages_to): If we have no - uid's to copy, exit here before going any further. Some code - internally [imap] assumes there are uids to copy otherwise it can - segfault. - (camel_folder_copy_messages_to): Same. - -2001-07-24 Jeffrey Stedfast - - * camel-mime-utils.c (header_decode_param): Handle broken mailers - that send unencoded 8bit header params. And there was much - rejoicing. Rah. - - * camel-url.h (CAMEL_URL_HIDE_ALL): New #define, and there was - much rejoicing. Rah. - -2001-07-24 Not Zed - - * camel-operation.c (camel_operation_register, unregister): Added - some warnings for bad cases. - -2001-07-23 Not Zed - - * camel-operation.c (camel_operation_register): Only insert a hash - entry if we haven't already. - (camel_operation_unregister): Only remove the has entry if the id - is a real thread. - -2001-07-23 Jeffrey Stedfast - - * camel-filter-driver.c (do_move): Slight fix for when source == - destination (we don't want to do this action because on-demand - filtering would then delete the messages it supposedly "moved"). - -2001-07-23 Not Zed - - * providers/smtp/camel-smtp-transport.c (smtp_auth, smtp_helo, - send_to): Added some operation progress reporting. Actual data - transfer is 'tricky' because of the layers used. - (smtp_auth): Instead of checking exception_is_set, use - challenge==NULL to test if sasl_challenge_base64 failed. - - * providers/local/camel-mbox-summary.c (mbox_summary_sync): Remove - peters changes below and put in a better fix. These functions - already return -1 on error, just use that, and not worry about - building our own exception redundantly. - - * camel-service.c (camel_get_host_byname): Turn the progress into - a transient event. - -2001-07-20 Peter Williams - - * providers/local/camel-mbox-summary.c (mbox_summary_sync): More - usage fixes for CamelException. Check our own exception for - summary_update and xfer it out if an error occurred. - -2001-07-20 JP Rosevear - - * Pull up test fixes to get them building again - -2001-07-20 Not Zed - - * camel-charset-map.c (camel_charset_get_iconv_friendly_name): - renamed to camel_charset_to_iconv() to make it just a little more - consistent and not so long & fixed callers. - -2001-07-19 Jeffrey Stedfast - - * camel-mime-filter-charset.c - (camel_mime_filter_charset_new_convert): Convert to the - iconv-friendly charset names. - - * providers/imap/camel-imap-store.c (create_folder): Fixed a - compiler warning about returning without a value in a non-void - function. Blah. - - * camel-mime-part.c (process_header): Pass the locale charset as - the default_charset to header_decode_string(). - - * camel-folder-summary.c (camel_folder_summary_format_string): - Pass the locale charset as the default_charset to - header_decode_string(). - (content_info_new): Same. - - * camel-mime-message.c (process_header): Pass the locale charset - as the default_charset to header_decode_string(). - - * camel-mime-utils.c (append_8bit): New helper function who's - purpose is similar to append_latin1() but for 8bit text that we - are assuming is not latin1. - (header_decode_text): Now takes a default_charset parameter and - calls append_8bit when appropriate. - (header_decode_string): Also takes a default_charset parameter - now. - (header_decode_mailbox): Pass NULL as the default_charset to - header_decode_string(). - -2001-07-19 Jeffrey Stedfast - - * camel-pgp-context.c (pgp_verify): Modified to treat the return - value from camel_charset_locale_name() as a const char*. - - * camel-sasl-digest-md5.c (digest_response): Modified to treat the - return value from camel_charset_locale_name() as a const char*. - - * camel-charset-map.c (camel_charset_locale_name): Modify to - return const char* by returning the static locale_charset which is - created inside of camel_charset_map_init(). - (camel_charset_map_init): Find the locale charset here and set the - static variable. - -2001-07-19 Peter Williams - - Policy change: NULL url's are no longer allowed in - CamelFolderInfos. They used to signify that the folder was, in - IMAP jargon, NoSelect; now the same effect is achieved by adding a - "noselect=yes" parameter to the end of the URL. As far as I know, - IMAP is the only affected provider. - - * providers/imap/camel-imap-store.c (delete_folder): New - function. Implement folder deletion. - (camel_imap_store_class_init): Set the delete_folder class - function here. - (get_folder_status): New function. Utility wrapper around the - STATUS command. - (create_folder): If the parent folder is NoSelect but is empty, - delete it and recreate it as a a subfolder-containing folder. If - it is NoSelect but contains messages, set an exception. - (parse_list_response_as_folder_info): Always set the FolderInfo's - URL, but add a NoSelect parameter if it isn't selectable. - (get_folder_info_online): Change logic of removing the namespace - to reflect URL change. Same for logic of checking unread counts. - (get_folder_info_online): Use get_folder_status to simplify this. - - * camel-store.c (camel_folder_info_build): When creating dummy - parents, copy the child's URL and set the NoSelect parameter. - -2001-07-19 Jeffrey Stedfast - - * camel-mime-part-utils.c - (simple_data_wrapper_construct_from_parser): No need for - `acharset' anymore. - (check_html_charset): Return a const char* and also use - camel_charset_get_iconv_friendly_name() internally. - - * camel-mime-utils.c (rfc2047_decode_word): Remove my iso8859-1 -> - iso-8859-1 hack and use camel_charset_get_iconv_friendly_name() - instead. - (rfc2184_decode): Use camel_charset_get_iconv_friendly_name() - - * camel.c (camel_init): Call camel_charset_map_init(). - - * camel-charset-map.c (camel_charset_map_init): New function to - initialize the charset-equivalent lookup table. To be called by - camel_init(). - (camel_charset_get_iconv_friendly_name): New function to try and - convert a charset into something that iconv is more likely to - accept. - -2001-07-19 Peter Williams - - * Revert 7/11/2001 patch for IMAP INBOX filtering at NotZed's - request. - -2001-07-17 Peter Williams - - Clean up some exception misusage. - - * providers/imap/camel-imap-command.c (camel_imap_command): Use - our own internal exception for sending the string and transfer it - to @ex if anything goes wrong. - (imap_read_response): Use our own internal exception for reading - the untagged responses and blah blah blah. - - * camel-session.c (get_service): Use our own internal exception - when constructing the service and transfer it to @ex if anything - goes wrong. - - * camel-remote-store.c (remote_recv_line): Instead of having - gboolean exception, use our own internal exception and copy - it to @ex if anything goes wrong. - - * camel-store.c (store_sync): Create an internal exception - because sync_folder() checks it for validity. Transfer it to - @ex when done. - - * camel-exception.c (camel_exception_get_description): If @ex is - NULL, complain - passing NULL exceptions to Camel is okay, but - there should be no circumstances under which they're then - examined. - (camel_exception_get_id): Same here, - (camel_exception_xfer): NULL-protect and warn if transferring from - a NULL exception. - -2001-07-17 Jeffrey Stedfast - - * camel-store.c (init_trash): Use CAMEL_VTRASH_NAME. - - * camel-vtrash-folder.h: #define CAMEL_VTRASH_NAME - -2001-07-16 Dan Winship - - * providers/imap/camel-imap-command.c (camel_imap_response_free): - Given: - * 4 EXISTS - * 1 EXPUNGE - We have to pass 3, not 4 to camel_imap_folder_changed for the - exists count. Fixes ximian bug #2112 (finally!). - -2001-07-14 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c (camel_imap_folder_changed): - If the message info for an expunged message is NULL, then just - break out - maybe a message was expunged that we were never - notified even existed? - -2001-07-13 Jeffrey Stedfast - - * camel-mime-utils.c (rfc2047_decode_word): Added a hack to - convert charsets in the format iso8859-1 to iso-8859-1 because it - seems to be more iconv friendly. It has been reported that on some - systems, iconv doesn't know about iso8859-1 while it *does* know - about iso-8859-1. See bug #4530. - -2001-07-13 Peter Williams - - * Makefile.am (install-exec-local): Let people install as - non-root, but give them a bigass warning so they're not allowed to - complain when it doesn't work right. - - * camel-remote-store.c (sync_remote_folder): New function: hash - table callback. - (remote_disconnect): If cleanly disconnecting, sync our - folders. Fixes deadlocks on exit (folders syncing after store - disconnects) and also makes sense. - -2001-07-13 Jeffrey Stedfast - - * camel-uid-cache.c (camel_uid_cache_new): We now use a structure - as the bucket data rather than just a cache level so set the save - state to TRUE. - (maybe_write_uid): We only save the uid if the cache levels are - the same *and* if the save state is TRUE. - (free_uid): Free the state value. - (camel_uid_cache_get_new_uids): New uids that get added to the - cache start with a save state of FALSE. - (camel_uid_cache_save_uid): Set the save state of the uid to - TRUE. What should we do if the uid isn't already in the cache? - Currently I make it add the uid, but maybe it shouldn't? - - * providers/imap/camel-imap-folder.c (imap_filter_timeout): Update - to reflect CamelFilterDriver API changes. - - * camel-filter-driver.c (camel_filter_driver_filter_folder): Take - a cache argument so we can tell the cache whether or not the uid - should be saved (meaning we have successfully filtered it). - -2001-07-12 Jeffrey Stedfast - - * camel-filter-driver.c (camel_filter_driver_filter_message): - Okay, I've decided that that user is just on crack. We don't want - to allow filtering of deleted messages or we could get some - unexpected behavior. - (do_move): Oops. My last fix needs to be after the if-statement, - not inside it. - (do_copy): And here too. - -2001-07-12 Jeffrey Stedfast - - * camel-filter-driver.c (do_move): Only set p->copied and - p->deleted if the messages are copied without an exception. - (do_copy): Same - but obviously we don't set the p->deleted here - at all. - (camel_filter_driver_filter_message): Since users complained that - they couldn't filter deleted messages for "safe keeping" (WTF? - safe keeping? why were they deleted in the first place then??), I - have taken out the code that optimized filtering by not allowing - deleted messages to be filtered. This fixes bug #4473. - - Note: Users have a warped sense of logic. - -2001-07-12 Not Zed - - * camel-mime-part-utils.c (extract_metatag_charset): Removed. - (check_html_charset): Replaced with this. - (simple_data_wrapper_construct_from_parser): Call - check_html_charset if we dont have a charset on the content-type, - and we have text/html data. - (check_html_charset): We also need to do qp/base64 decoding - ourselves, sigh. - - * camel-mime-utils.c (html_meta_param_list_decode): Removed. This - was very wrong, the rules for mail headers vastly different from - rules for decoding html elements. - (rfc2184_decode): Move the malloc inside the iconv_open worked, - otherwise we have a memleak. - - * camel-mime-filter-html.c (camel_mime_filter_html_finalize, init, - run, reset): Changed to use camelhtmlparser, and fixed a tiny - memleak. - - * camel-html-parser.c: Made the html indexer tokeniser re-usable. - ONLY TO BE USED INTERNAL TO CAMEL HOWEVER. - (tokenise_step): Slight fix to non-quoted values. - - * camel-folder-summary.c - (camel_folder_summary_info_new_from_message): Removed some code i - wasn't supposed to commit. - - * providers/local/camel-local-summary.c (local_summary_add): Only - set info->size if it is not zero. - (local_summary_add): If we dont get a size from the info passed - in, calculate it using a null stream write. Should do #4392. - -2001-07-11 Jeffrey Stedfast - - * camel-mime-part-utils.c (extract_metatag_charset): New function - to extract a meta-tag charset value if it exists. - (simple_data_wrapper_construct_from_parser): Along the same lines - as the code I previously ripped out, but this time use the - mime-parser's seek ability to help us along. Currently I read up - to a 2k buffer size - this is probably overkill, 1k is probably - plenty. - - * camel-mime-utils.c (html_meta_param_list_decode): When we get to - an `=', we must skip past it before trying to grab the param - value. duh. - -2001-07-11 Jeffrey Stedfast - - * camel-mime-part-utils.c - (simple_data_wrapper_construct_from_parser): Ripped out my code - since it was never being used since the mime parser is not using a - seekable stream (ever?) which pretty much means my code needs to - be done someplace else. - -2001-07-11 Peter Williams - - * providers/imap/camel-imap-folder.c (camel_imap_folder_changed): - Run the filter in its own thread to prevent locking issues. - (imap_filter_timeout): New function that does the filtering called - as a CamelSession timeout. - -2001-07-11 Not Zed - - * camel-filter-driver.c (camel_filter_driver_filter_mbox): Create - the messageinfo itself, so we can properly set the size. - - * camel-movemail.c (camel_movemail_solaris): Write out the from - line between each message. - -2001-07-10 Not Zed - - * providers/local/camel-local-summary.c (local_summary_add): Copy - the size across from the source message info if supplied. - - * camel-stream-null.c: Added a 'written' member which keeps track - of how much has been written to the stream. - - * camel-movemail.c (camel_movemail): If we have BROKEN_SPOOL - defined, then use the solaris movemail to quote from lines that - sendmail didn't. - (camel_movemail_solaris): Compile this in if BROKEN_SPOOL defined. - -2001-07-10 Jeffrey Stedfast - - * camel-mime-utils.c (html_meta_param_list_decode): New function - to parse an HTML meta-tag. - - * camel-mime-part-utils.c - (simple_data_wrapper_construct_from_parser): If the Content-Type - did not contain a charset parameter and it's also a text/html - part, we have 1 last place to look - in the META html tags. *sigh* - - * camel-mime-message.c (camel_mime_message_get_source): - s/gint/unsigned since that's what it should be. - -2001-07-09 Jeffrey Stedfast - - * camel-pgp-context.c (pgp_sign): Forget the passphrase if the - user has set that option. - (pgp_clearsign): Same. - (pgp_encrypt): And here... - (pgp_decrypt): And finally here. - (camel_pgp_context_new): Take a `remember' argument. - -2001-07-09 Not Zed - - * providers/local/camel-maildir-summary.c (maildir_summary_sync): - Oops, e_poolv_set free's it for us, so dont double-free here. - -2001-07-06 Not Zed - - * camel-vee-folder.c (camel_vee_folder_finalise): Changed so we - dont have the list changing under us, just going to the next node - before we call a function that might change the list is - potentially dangerous (slight mod of peters fix). Hmm, i think it - would've double-unref'd it too(?) - -2001-07-08 Chris Toshok - - * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_finalize): - openssl_table is gone. we now store/get the stream from the - SSL_CTX's app_data. - (stream_read): rework the non-blocking case to account for SSL - possibly buffering data (in which case select will block even - though data is ready to be read), and to account for FreeBSD's - strange behavior of returning -1/EAGAIN even though select said - the fd was ready to be read. - (ssl_verify): openssl_table is gone. - (open_ssl_connection): set the SSL_CTX's app_data to be the - stream, remove the openssl_table code. - -2001-07-06 Jeffrey Stedfast - - * camel-mime-utils.c (header_encode_param): Don't allow in to be - NULL, so instead of doing if (in == NULL) return;, make it a - g_return_val_if_fail and later we can make it an assert or - something. - - * providers/local/camel-maildir-store.c (get_inbox): Fixes bug - #1138. - - * providers/local/camel-mbox-summary.c - (camel_mbox_summary_build_from): Make the `day-of-month' digit - take up 2 chars by using "%2d". Fixes bug #3989 for lame mailers - like Pine. - - * camel-pgp-context.c (crypto_exec_with_passwd): Set the pipe fd's - to nonblocking. - -2001-07-06 Peter Williams - - * camel-object.c (camel_object_unref): Make sure that after the - finalization event has happened and the finalization functions - have been called that the object still has a zero refcount. - -2001-07-06 Joe Shaw - - * providers/nntp/camel-nntp-grouplist.c: Add locking to - camel_nntp_get_grouplist_from_server(). - - * providers/nntp/camel-nntp-resp-codes.h: Added - NNTP_EXTENSIONS_SUPPORTED (202). - - * providers/nntp/camel-nntp-store.c (camel_nntp_store_get_extensions): - Check for both NNTP_LIST_FOLLOWS and NNTP_EXTENSIONS_SUPPORTED from - a LIST EXTENSIONS request. (Dunno if NNTP_LIST_FOLLOWS ever comes - out of this, but that's what was already there...) Also, put some - locking around it. - (finalize): e_mutex_destroy() the command lock - (camel_nntp_store_init): e_mutex_new() the command lock. - - * providers/nntp/camel-nntp-store.h: Add locking macros. - -2001-07-05 Jeffrey Stedfast - - * camel-folder-summary.c (camel_message_info_string): Added an - assert to make sure that `mi' isn't NULL. - (camel_message_info_set_string): Same. - - * providers/imap/camel-imap-command.c (camel_imap_response_free): - Create and use a temporary CamelException for use with - camel_imap_folder_changed. - -2001-07-05 Jeffrey Stedfast - - * camel-pgp-context.c (pgp_verify): Send the - --no-auto-key-retrieve argument to gpg if we are in offline mode - so that we don't have to worry about gpg hanging if it can't - connect to the key servers, because now it shouldn't even attempt - to. - -2001-07-05 Chris Toshok - - * camel-tcp-stream-openssl.c (ssl_verify): use - X509_STORE_CTX_get_ex_data to get at the SSL* - don't use the - X509_STORE_CTX to look up our stream, since it's not what we used - to insert our stream into the hashtable. - (open_ssl_connection): insert the stream into the hashtable before - calling SSL_connect, as this can cause ssl_verify to be called, - and we need to look up the stream there. remove the stream from - the hashtable if there's an error connecting. - (stream_connect): pass the CamelTcpStreamOpenSSL* to - open_ssl_connection since it handles the hashtable stuff. remove - hashtable stuff from here. - -2001-07-05 Jeffrey Stedfast - - * camel-folder.c (camel_folder_copy_messages_to): if source == - dest, just no-op. - -2001-07-05 Peter Williams - - * camel-vee-folder.c (camel_vee_folder_finalise): Move this before the - camel_vee_folder_remove_folder because that function modifies p->folders - messing up our iteration. - (camel_vee_folder_finalise): Don't unref our summary; camel-folder now - does this. - - * camel-object.h (CamelObject): Add a 'destroying' flag to CamelObject. - - * camel-object.c (obj_init): Clear 'destroying'. - (camel_object_unref): If 'destroying' then do not send the finalize - event and do not call finalize functions. Otherwise, set destroying - so just in case we get refed (eg event code) we don't get doubly - finalized. - -2001-07-05 Not Zed - - * camel-mime-filter-basic.c (filter): Fix the assertion slightly, - if we have a little bit of input the output size could be larger, - since we store upto 3 chars in the state. - - * camel-folder-summary.c - (camel_folder_summary_info_new_from_message): When indexing a new - record, create a pseudo word 'ibexindexed' so we can always tell - that a message has already been idnexed, even if it contains no - words of its own. Things like maildir use this check to see if - its already been processed, and it matters if it is incorrect in - this case (not just wasted cycles). - (camel_message_info_dup_to): Assign the to->strings from the - e_poolv_cpy() call, since it may allocaote a new poolv if the - lengths do not match. - - (camel_folder_summary_info_new_from_parser): And same here. - - * providers/local/camel-maildir-summary.c (maildir_summary_sync): - Changed the logicfor epoolv code to be different, we dont need to - update hash references or any tricky stuff. - (maildir_summary_check): Samehere. - - * camel-folder-summary.h: Removed include of e-memory.h. - -2001-07-03 Joe Shaw - - * providers/nntp/camel-nntp-resp-codes.h: Added NNTP_NO_PERMISSION - (502) to the list of response codes. - - * providers/nntp/camel-nntp-store.c (nntp_store_connect): If we - receive a NNTP_NO_PERMISSION, don't get into an infinite loop trying - to reconnect, get extensions, etc. Just give up and return FALSE. - -2001-07-03 Dan Winship - - * providers/imap/camel-imap-message-cache.c - (camel_imap_message_cache_clear): Doh. Don't remove things from - the hash table while foreach'ing it. (And can't use foreach_remove - either because we have to remove them in a weird order). Fixes - #3618. - - * providers/imap/camel-imap-folder.c (imap_get_message): If the - server returns OK from the FETCH BODY, but there's no parseable - BODY response, it's probably because there's an UN-parseable BODY - response, implying the message is badly formatted, MIMEwise. In - that case, fall back to fetching the message as a single part. - -2001-07-02 Sam Creasey - - * providers/nntp/camel-nntp-folder.c: Implemented - nntp_folder_search_by_expression and - nntp_folder_search_free. Basic search functionality e.g. unread - marking now works for NNTP folders. - - * camel_filter_search.c (get_size): Added get-size sexp directive - to get the size of a message for filters. - - * providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new): - Always check with the NNTP server after summary load -- this - function now always expires old summary entries and syncs with - the news server. - - * providers/nntp/camel-nntp-utils.c (camel_nntp_get_headers): - Only fetch headers for articles not already logged in - the summary file. - - * providers/nntp/camel-nntp-grouplist.c - (camel_nntp_get_grouplist_from_*): change from g_list_append() - to g_list_prepend() + g_list_reverse. Traversing 40,000 - element linked lists sucks. - - * providers/nntp/camel-nntp-store.c (camel_nntp_command): - Should the NNTP connection die with - CAMEL_EXCEPTION_SERVICE_NOT_CONNECTED, make a single retry - attempt. Timing out the NNTP link is less painful this way. - -2001-07-02 Peter Williams - - * README (Introduction): Add comment noting that Camel actually - exists now :-) - -2001-07-02 Dan Winship - - * camel-session.c (camel_session_get_filter_driver): new method to - get an application-initialized filter driver. - - * camel-filter-driver.c (camel_filter_driver_new): Remove the - get_folder function and data args from here... - (camel_filter_driver_set_folder_func): ...and add this function to - set/change them. - - * providers/imap/camel-imap-folder.c (camel_imap_folder_new): If - this folder is INBOX and we're filtering INBOX, set a flag on the - folder for later. - (imap_update_summary): Add another argument (GPtrArray *recents), - and if it's non-NULL, add the uids of any \Recent new messages to - it. - (camel_imap_folder_changed): If doing filtering in this folder, - create a recents array and pass it to imap_update_summary. Then - get a filter driver and use it to filter the recent messages. - - * providers/imap/camel-imap-summary.h: - * providers/imap/camel-imap-utils.c (imap_parse_flag_list): Add - support for the \Recent flag. - - * providers/imap/camel-imap-provider.c (imap_conf_entries): enable - the "filter" option. - - * camel-types.h: add CamelFilterDriver typedef here - -2001-07-02 Not Zed - - * camel-lock-client.c (camel_lock_helper_init): properly return - error if we can't create pipes. - - * camel-folder-summary.c (summary_build_content_info): re-enable - html indexing. - - * camel-mime-filter-html.c: Completely re-implemented using a - custom parser. - -2001-07-02 Dan Winship - - * tests/misc/url.c (main): Change a camel_exception_clear to - camel_exception_init to fix a sometimes-crash - -2001-06-29 Jeffrey Stedfast - - * camel-mime-utils.c: Added Originator: header as a header to look - for when looking for the mailing list. - - * tests/mime-filter/Makefile.am: Build the test-crlf test program. - - * tests/mime-filter/test-crlf.c: New test suite for the crlf - filter. - - * camel-mime-filter-crlf.c (filter): Fixed to correctly encode and - decode dots. - -2001-06-28 Peter Williams - - * camel-mime-filter-stripheader.c: New file. Filter that strips a - header from mime output. - - * camel-mime-filter-stripheader.h: New file. Header for the above. - - * providers/smtp/camel-smtp-transport.c (smtp_data): Use the - stripheader filter to remove the "Bcc" header. - - * Makefile.am: Add the stripheader files. - - * tests/lib/Makefile.am (INCLUDES): Get this to compile again. - - * tests/mime-filter/test-stripheader.c: New file. Test suite for - the CamelMimeFilterStripHeader. - - * tests/mime-filter/Makefile.am: New test section: mime filters. - -2001-06-28 Jeffrey Stedfast - - * camel-mime-utils.c (header_decode_param_list): Fix a memory - leak. Also if the decoded value is NULL, that means it wasn't - encoded so we don't want to toss the old value. - (header_param_list_format_append): Correctly wrap long parameter - values according to rfc2184. - -2001-06-28 Dan Winship - - * providers/imap/camel-imap-folder.c (imap_refresh_info): If the - folder is frozen, don't refresh, just record that we need to do it - later. - (imap_append_online): If the APPEND doesn't trigger an immediate - EXISTS response (because the folder isn't the selected folder, or - because the server doesn't do that until the next command), call - imap_refresh_info on the folder. - (imap_copy_online): Likewise. (Replacing the unconditional NOOP - that was there before, which absolutely killed filter performance - by forcing the IMAP provider to switch back and forth between - folders after every copy or move.) - (imap_thaw): If the folder needs a refresh, do it. - - * camel-folder.c (camel_folder_is_frozen): New method - -2001-06-27 Jeffrey Stedfast - - * camel-transport.c (camel_transport_init): Initialize the private - send_lock. - (camel_transport_finalize): Free the private send_lock. - (camel_transport_get_type): Set the init and finalize functions. - (camel_transport_send): Lock the transport. - (camel_transport_send_to): Same. - - * camel-private.h: Add CAMEL_TRANSPORT_(UN)LOCK macros. - -2001-06-27 Jeffrey Stedfast - - * tests/folder/test9.c (main): Updated to match the current API. - - * tests/folder/test3.c: #include since we use - gtk_init(). - - * camel-internet-address.c - (camel_internet_address_encode_address): Use the new - header_address_fold. - - * camel-mime-utils.c: Removed some old #if 0'd code of mine. - (rfc2047_encode_word): If enclen is 0, don't write an encoded word - token (=?iso-8859-7?Q??= would be an invalid token). - (header_address_fold): New function to wrap address headers - - header_fold() was force-wrapping rfc2047 encoded words which was - making the test suite fail. The *real* solution, however, is to - not create rfc2047 encoded words longer than 72 chars. - -2001-06-26 Jeffrey Stedfast - - * camel-filter-driver.c (open_folder): Since we want an error - opening a folder to result in the message being copied to Inbox - (assuming no other filters get a chance to `move` it), don't - record any exceptions that may occur in this function. - -2001-06-26 Dan Winship - - * providers/imap/camel-imap-folder.c (camel_imap_folder_selected, - imap_append_offline, imap_append_online, - camel_imap_folder_changed): lock the cache around accesses - - * providers/imap/camel-imap-store.c (get_folder_online): ref the - newly-created folder (as current_folder) before calling - camel_imap_folder_selected, in case that needs to do something - that causes another folder to become current... - - * camel-service.c (camel_service_get_url): D'oh. - s/FALSE/CAMEL_URL_HIDE_PASSWORD/ - -2001-06-25 Jeffrey Stedfast - - * camel-filter-search.c (get_source): g_strdup() the message - source here or we will have problems later when we go to free the - result ;-) - -2001-06-25 Dan Winship - - * providers/imap/camel-imap-store.c (try_auth): Fix this: IMAP - doesn't allow an extra argument to AUTHENTICATE to avoid a useless - round trip like some other SASL bindings do. - - * providers/imap/camel-imap-command.c (imap_read_response): Deal - with IMAP servers that (incorrectly) return "+\r\n" rather than - "+ \r\n" for an empty continuation response. - (camel_imap_response_extract_continuation): Likewise. - -2001-06-21 Jeffrey Stedfast - - * camel-mime-utils.c (word_types_compatable): New function that - decides if 2 word types are mergeable. An atom and a qstring are - mergeable; 2 qstrings are mergeable; and 2 encoded words are - mergeable. - (header_encode_phrase_merge_words): If 2 words are merged, the new - word type is the MAX of the combined types. This means that if we - merge a qstring and an atom, the resulting word type is a - qstring. - - * camel-internet-address.c (internet_format): - s/g_string_sprintfa/g_string_append since this makes more sense in - this particular case. - (internet_encode): Same here. - -2001-06-21 Jeffrey Stedfast - - * providers/smtp/camel-smtp-transport.c (smtp_send): Use - camel_address_length() rather than casting and accessing data - members. - -2001-06-20 Jeffrey Stedfast - - * camel-mime-utils.c (header_raw_check_mailing_list): If the first - char of the mailing-list name is '<', chop it off to make Ettore - happy. Fixes bug #2153. - -2001-06-19 Not Zed - - * camel-lock-helper.c (unlock_id): Fixed a bug when not running - setuid it wouldn't unlock. - - * camel-movemail.c (camel_movemail): use new - locking daemon, also return an error code. - -2001-06-18 Jeffrey Stedfast - - Note: Except for the info_free(), the NULL checks are - g_return's. I felt that since g_free() handles NULL that our - _free() functions should also. - - * camel-folder.c (camel_folder_change_info_free): Check to make - sure that the info pointer isn't NULL. - (camel_folder_change_info_change_uid): Same. - (camel_folder_change_info_changed): Same. - (camel_folder_change_info_remove_uid): Same. - (camel_folder_change_info_add_uid): Same. - (camel_folder_change_info_build_diff): Same. - (camel_folder_change_info_cat): Same. - (camel_folder_change_info_add_source): Same. - (camel_folder_change_info_add_source_list): Same. - (camel_folder_change_info_add_update): Same. - (camel_folder_change_info_add_update_list): Same. - -2001-06-18 Dan Winship - - * tests/stream/Makefile.am (LDADD): - * tests/smime/Makefile.am (LDADD): - * tests/misc/Makefile.am (LDADD): - * tests/message/Makefile.am (LDADD): - * tests/folder/Makefile.am (LDADD): Remove DB3_LDADD - - * Makefile.am (install-exec-local): Set camel-lock-help setgid or - setuid as needed - -2001-06-18 Not Zed - - * camel-folder-summary.c - (camel_folder_summary_info_new_from_parser): Only create a missing - uid if we have indexing turned on. - - * camel-lock-helper.c (setup_process): Function to setup - process/sanity/security checks. Change to the real uid as soon as - we can. - (lock_path): First try to lock as the real uid, if that fails, try - the root uid. - (unlock_id): Unlock as the uid we created the lock as. - - * Makefile.am (INCLUDES): Added -DCAMEL_SBINDIR for lock helper - location. - - * providers/local/camel-spool-folder.c (spool_lock): Implemented, - using lock helper locking. Need to work out if the locking - requires a root created lock? - (spool_unlock): Likewise. - -2001-06-15 Not Zed - - * camel-lock-helper.c: Setuid Lock helper process. Creates and manages - .locks, keeping them active, removing them, etc. What real perms it - needs is a little system dependent. - -2001-06-14 Not Zed - - * providers/local/camel-maildir-store.c (get_folder_info): Implement. - (scan_dir): Does the work of scanning for maildir directories. - -2001-06-13 Not Zed - - * providers/local/camel-spool-store.c (get_folder_info): - Implemented, just returns a hardcoded INBOX folder. - (free_folder_info): implemented, free's the 1 possible level of - folder info. - - * providers/local/camel-spool-folder.c - (camel_spool_folder_construct): Set the real unread message - count on the folder_created thing. - -2001-06-15 Dan Winship - - * providers/imap/camel-imap-message-cache.c - (camel_imap_message_cache_max_uid): Return the largest real UID in - the cache (as an integer). Eventually to be used for an - optimization in the new-message fetch code. - (cache_put): Keep track of max_uid. - -2001-06-14 Jeffrey Stedfast - - * camel-mime-utils.c: Added Mailing-List header regex so that we - can do mlist magic on that header. - -2001-05-28 Jeffrey Stedfast - - * camel-mime-utils.c (header_decode_param): Properly handle - correct and incorrect (for the common case, ie Outlook and - Netscape/Mozilla) rfc2184 values. - (header_decode_rfc2184_param): Get the param name and see if we - should expect a rfc2184 parameter value. - (rfc2184_decode): Decode a rfc2184 value. - (hex_decode): hex decode a string. - (header_decode_param_list): Handle rfc2184 encoded parameters (ie - parameters that have been split and perhaps encoded). - (header_param_list_format_append): Encode the value before seeing - if it will fit on the line. If the value does get encoded, be sure - to put a '*' before the equal-sign. - (header_encode_param): New function to rfc2184 encode a parameter - value (maybe it should be renamed?) - -2001-06-14 Jeffrey Stedfast - - * camel-mime-part.c (init_header_name_table): Don't try to format - the Reply-To header - we don't want to wrap the reply-to address. - -2001-06-12 Not Zed - - * providers/local/camel-spool-*.[ch]: A new provider, for spool - mailboxes. Mostly a cut and paste of the mbox code, but not a - subclass CamelLocal*. Not tested a lot, doesn't lock yet, use - with extreme caution. - - * tests/lib/folders.c (test_folder_message_ops): Added spool arg, - spool folders can't be deleted, renamed, etc. - (test_folder_basic): Same. - - * tests/folder/test2.c (main): Added checks for spool type. - - * tests/[message|stream|folder|misc|smime]/Makefile.am (LDADD): - Added db3 flags, so make check compiles, doesn't run though. - -2001-05-24 Not Zed - - * providers/local/camel-local-provider.c - (camel_provider_module_init): Added spool provider. - -2001-06-07 Jon Trowbridge - - * camel-filter-driver.c (camel_filter_driver_filter_folder): Add a - separator between the service url and the folder name, if needed. - - * camel-filter-driver.c (camel_filter_driver_filter_mbox): Added - an argument, so that the original source URI of the mbox can be - passed in. This is needed because this function is called - post-movemail, so we are never reading from the original mbox - anymore. Without the original mbox URI, the X-Evolution-Source - tag gets set incorrectly and filter-on-source will fail to work. - (camel_filter_driver_filter_message): Also take an extra arg - for the original source URI. It is the original URI, not the - source URI, that is used for filtering and for setting the - X-Evolution-Source tag. - -2001-06-05 Dan Winship - - * providers/imap/camel-imap-folder.c (imap_rescan): Don't fetch - the UID and FLAGS of messages we don't know about yet, since - they'll just get discarded. - -2001-06-01 Jeffrey Stedfast - - * tests/smime/pgp.c: Fix to not get into a recursive loop in - get_type(). - - * tests/smime/pgp-mime.c: Same. - -2001-05-31 Jeffrey Stedfast - - * camel-smime-context.c: Numerous fixes to get it to compile. - - * camel.h: Added camel-cipher-context.h, camel-cms-context.h, - camel-smime-context.h, and camel-smime-utils.h - - * camel-cms-context.[c,h]: New virtual class for manipulating - cryptographic message syntax messages (like S/MIME). - - * camel-smime-context.[c,h]: Modified to inherit from the - CamelCMSContext class rather than the CamelCipherContext class. - - * camel-smime.[c,h]: Removed - just use camel-smime-context - directly. - - * camel-smime-utils.[c,h]: New source files. Moved the 2 useful - functions from camel-smime.[c,h] into here. - -2001-05-30 Dan Winship - - * camel-charset-map.c: Redo the BUILD_MAP code to not depend on - libunicode. Now it only generates a map of "popular" 8bit - encodings. (It's not worthwhile to support obscure encodings, - because any mailer that supports them will support UTF8 too. And - Chinese and Japanese use mostly the same UTF8 characters so you - need to decide between those encodings based on the locale or - the charset of the message you're replying to or the input - method you used. So this is sufficient for camel_charset_best's - use.) - - * camel-charset-map-private.h: Regenerated. - - * camel.c (camel_shutdown): Move #ifdefs around to prevent a - warning. - -2001-05-29 Dan Winship - - * camel-disco-diary.c: Code for logging and replaying offline - operations. - - * camel-disco-store.c (disco_construct): Set disco->status here - (where we can base it on the session's offline status) rather than - at init time. - (disco_connect): If we connect online and have a non-empty diary, - switch to RESYNCING mode and replay the diary to the server. - (disco_get_folder, disco_get_folder_info): Add _resyncing - variants. - - * camel-disco-folder.c (disco_sync, disco_expunge_uids, - disco_append_message, disco_copy_messages_to, - disco_move_messages_to): Add _resyncing variants to switches. - (disco_expunge_uids, disco_append_message, disco_copy_messages_to, - disco_move_messages_to): Remove #ifdef'ed out diary code: let the - provider do it. - (disco_append_message): Redo the append methods to no longer - return the UID, since we're no longer doing the logging from here. - - * providers/imap/camel-imap-store.c (imap_connect_online, - imap_connect_offline): Create a CamelDiscoDiary. - (imap_disconnect_offline): And free it. - - * providers/imap/camel-imap-folder.c (camel_imap_folder_selected): - If RESYNCING, don't do any sort of checking that the remote folder - matches the summary, beyond making sure that the UIDVALIDITY is - correct. - (imap_rescan): Add a missing camel_folder_summary_info_free when - removing a UID from the summary. - (imap_expunge_uids_offline): Implement. Fairly simple. - (imap_expunge_uids_resyncing): Implement. If the store supports - UIDPLUS, we can just use imap_expunge_uids_online. If not, we need - to temporarily undelete any messages marked deleted on the server - that aren't supposed to get expunged. - (imap_append_offline): Implement, using cache and summary - operations, and triggering the folder_changed event by hand. - (imap_append_resyncing): Implement. Redo imap_append_online a bit - in the process to make them able to share more code. - (imap_copy_offline): Implement. - (imap_copy_online): Move parts of this out into a helper. - (imap_copy_resyncing): Implement. In most cases this is just like - imap_copy_online, but if you are copying a message that was itself - copied or appended into the folder, and the server doesn't do - UIDPLUS, it will be necessary to replace at least part of the copy - operation with one or more appends. - - * providers/imap/camel-imap-command.c (imap_read_response): Don't - record the current folder in the response when in RESYNCING mode. - (This means that EXISTS and EXPUNGE responses won't be processed, - which is needed because the summary may not match the folder at - this point.) - (imap_read_response): On error, call - camel_imap_response_free_without_processing, not - camel_imap_response_free. - - * providers/imap/camel-imap-utils.c (imap_uid_array_to_set): Make - this work better when operating on UIDs that aren't in the summary. - - * providers/imap/camel-imap-summary.c - (camel_imap_summary_add_offline): New routine used by - imap_append_offline and imap_copy_offline to create new summary - entries. - -2001-05-28 Jeffrey Stedfast - - * camel-mime-utils.c (header_set_param): Use g_strcasecmp() - because some systems don't have strcasecmp(). Also, when removing - a param, make sure to free the param->name too. - -2001-05-27 Dan Winship - - * tests/lib/messages.c (test_message_read_file): Fix an fd leak - - * tests/lib/session.c, tests/lib/session.h: a CamelSession - subclass for the test programs. - - * tests/lib/Makefile.am: include session.[ch] - - * tests/folder/test*.c: Use a CamelTestSession from libcameltest - instead of cut+pasting everywhere. - - * tests/misc/url.c (main): Update for a camel_url_new change at - some point. - - * tests/*/.cvsignore: Add stuff. - - * camel-mime-utils.c (rfc2047_encode_word): Fix a silly ==/!= - mixup. - -2001-05-26 Dan Winship - - * providers/imap/camel-imap-folder.c: Add a "need_rescan" flag - saying if we want to rescan the entire folder for flag changes - next time it's selected. - (camel_imap_folder_init): Set need_rescan TRUE. - (camel_imap_folder_selected): If need_rescan is TRUE, call - imap_rescan. - (imap_refresh_info): Only do a full rescan if need_rescan is TRUE. - Otherwise just do a NOOP, making this a MUCH more lightweight - operation. Also, don't call imap_rescan directly if the folder - isn't selected, since that could end up causing the folder to be - scanned *twice* (imap_rescan -> camel_imap_command -> - camel_imap_folder_selected -> imap_rescan). - (imap_rescan): Set need_rescan FALSE. - (imap_sync_online): Don't NOOP if no changes were pushed: the - caller will call refresh_info if it wants to poll for changes. - Fixes evolution-mail doing lots of unnecessary extra work at - quit time. - - * providers/imap/camel-imap-store.c (refresh_folder_info): Set - need_rescan on each folder before calling refresh_info. - -2001-05-25 Jeffrey Stedfast - - * providers/smtp/camel-smtp-transport.c (smtp_auth): Oops. Use a - strNcmp to make sure the response begins with a 334 code, not a - strcmp. Duh. - - * providers/local/camel-maildir-folder.c (maildir_append_message): - remove the summary info so we are not out-of-sync with the maildir - folder. - - * providers/local/camel-mh-folder.c (mh_append_message): remove - the summary info so we are not out-of-sync with the mh folder. - - * providers/local/camel-mbox-folder.c (mbox_append_message): - remove the summary info so we are not out-of-sync with the mbox. - -2001-05-24 Jeffrey Stedfast - - * camel-smime-context.c (camel_smime_context_new): Oops, I spelled - the get-default-db function name wrong. - -2001-05-23 Jeffrey Stedfast - - * providers/local/camel-local-folder.c - (camel_local_folder_construct): s/folder_deleted/folder_created - - result of a bad copy/paste. - - * providers/imap/camel-imap-search.c (imap_body_contains): - Optimize the match "" case. - -2001-05-21 Jeffrey Stedfast - - * providers/imap/camel-imap-store.c (get_folder_info_online): - Store the CamelFolderInfo tree that was returned from - camel_folder_info_build() in a new variable, 'tree', rather than - 'fi' since we later use 'fi' when syncing folders. Not only does - this fix a memory leak, but it also fixes the bug where the user - would only see the last folder in the folder list and/or it's - subfolders. - -2001-05-16 Jeffrey Stedfast - - * camel-session.c (camel_session_forget_password): The service can - be NULL here too, thanks to Wayne Davis for pointing this out. - - * camel-smime-context.c (camel_smime_context_new): We don't need - to be passed the certdb path anymore. - -2001-05-16 Dan Winship - - * camel-medium.c (camel_medium_get_headers): New function to - return an array of all headers. - (camel_medium_free_headers): And free them. - - * camel-mime-part.c (get_headers, free_headers): Implement this - for CamelMimePart. (Works for CamelMimeMessage too.) - -2001-05-15 Jeffrey Stedfast - - * camel-smime-context.c (camel_smime_context_finalise): Don't - close or free (it wasn't allocated) the certdb. - (camel_smime_context_new): If we get a NULL certdb handle, then - don't bother trying to create a new certdb handle since NSS_Init* - should have done that. - -2001-05-15 Jeffrey Stedfast - - * Makefile.am: Don't use EXTRA_GNOME_*, use the new CAMEL_* - variables so we don't link in tons of extra cruft that we don't - need. - - * tests/smime/pkcs7.c: Added to the test suite - tests the S/MIME - pkcs7 functions. - -2001-05-14 Jeffrey Stedfast - - * camel-smime-context.c: Lots of fixes to get this to compile. - - * camel-smime.c (camel_smime_part_verify): Updated to pass in a - hash argument to camel_smime_verify(). - - * camel-pgp-mime.c (camel_pgp_mime_part_verify): Update according - to the changes in the context API. - - * camel-pgp-context.c (pgp_verify): Updated to take a - CamelCipherHash argument. - - * camel-cipher-context.c (camel_cipher_verify): Now takes a hash - argument since the S/MIME code needs this. - - * Makefile.am: Add camel-smime-context.[c,h] and camel-smime.[c,h] - to the build. - - * camel-smime.[c,h]: New source files for manipulating S/MIME - message parts. - -2001-05-14 Jon Trowbridge - - * camel-search-private.c (utf8_get): Replicate the semantics of - the libunicode utf8 functions by returning NULL in the arg - on invalid utf8. - - * camel-pgp-context.c (pgp_verify): Check for valid utf8, - terminate loop if something looks wrong. - - * camel-mime-utils.c (header_encode_phrase_get_words): Properly - check for invalid utf8. - (header_encode_string): Properly check for invalid utf8. - - * camel-charset-map.c (camel_charset_step): Properly check for - invalid utf8. - -2001-05-14 Jeffrey Stedfast - - * tests/folder/test9.c: - * tests/folder/test8.c: - * tests/folder/test7.c: - * tests/folder/test6.c: - * tests/folder/test5.c: - * tests/folder/test4.c: - * tests/folder/test3.c: - * tests/folder/test2.c: - * tests/folder/test1.c: - * tests/smime/pgp-mime.c: - * tests/smime/pgp.c: Subclass CamelSession since we can no longer - specify the passwd callback any other way and update code - accordingly. - -2001-05-11 Dan Winship - - * camel-mime-utils.c (header_location_decode): Decode - Content-Location, either correctly or Netscape-generated-brokenly. - - * camel-mime-part.c (camel_mime_part_set_content_location, - camel_mime_part_get_content_location, etc): Deal with - Content-Location header. - -2001-05-11 Jeffrey Stedfast - - * providers/smtp/camel-smtp-transport.c (smtp_auth): Don't check - the initial auth response until we get into the while-loop - otherwise we have problems if the SASL mechanism supported a - client initiated challenge (like PLAIN and LOGIN do). - -2001-05-11 Dan Winship - - * camel-stream-null.c (camel_stream_null_new): Make this return - CamelStream * (like the other stream new functions) instead of - CamelStreamNull * - -2001-05-10 Chris Toshok - - * camel-tcp-stream-ssl.c (stream_connect): call SSL_Enable after - the SSL_ImportFD and before PR_Connect. Otherwise, NSS aborts - during the connect. - -2001-05-10 Jeffrey Stedfast - - * camel-session.c (camel_session_get_password): Don't abort if the - Service is NULL, this is perfectly valid for cipher contexts. - -2001-05-09 Peter Williams - - * providers/imap/camel-imap-folder.c (imap_move_messages_to): Pass - appropriate parameters to CF_CLASS and add comment explaining why - my initial attempt at a solution didn't work. - -2001-05-09 Dan Winship - - * camel-disco-store.c (camel_disco_set_status): Set the - disconnected status. - (camel_disco_store_can_work_offline): Return whether or not a - given CamelDiscoStore can work offline or not. - - * camel-disco-folder.c (camel_disco_folder_cache_message): - Explicitly tell a folder to cache a message. (Better than using - get_message, because for IMAP that doesn't guarantee you'll get - all the message parts.) - (camel_disco_folder_prepare_for_offline): Prepare a folder for - offline use by caching all messages meeting given search criteria - (and doing anything else the particular folder implementation - needs). - - * camel-session.c (camel_session_set_online, - camel_session_is_online): A session-wide online/offline toggle. - (camel_session_init): Set online to TRUE. - - * providers/imap/camel-imap-store.c (can_work_offline): - Implementation of CamelDiscoStore::can_work_offline. (Checks that - the store has been used online at least once.) - (imap_get_folder_online, imap_get_folder_offline): Deal with - request for "inbox" properly. ("Don't you mean... 'INBOX'?"). - - * providers/imap/camel-imap-folder.c (imap_cache_message): - Implementation of CamelDiscoFolder::cache_message. - - * camel.h: Add camel-disco-store.h and camel-disco-folder.h - -2001-05-09 Jeffrey Stedfast - - * camel-mime-part.c (camel_mime_part_set_content_id): Wrap the - content-id with <>'s. - -2001-05-04 Jeffrey Stedfast - - * providers/smtp/camel-smtp-transport.c (connect_to_server): Add - support for using OpenSSL. - - * camel-remote-store.c (remote_connect): Add support for using the - OpenSSL implementation. - - * camel-tcp-stream-ssl.c (ssl_bad_cert): Hmmmm, don't pass in a - NULL as the last argument to alert_user - prototype doesn't take - that argument anymore? - - * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_finalize): - (ssl_verify): Use a global hash table to try and lookup the - CamelTcpStreamOpenSSL object given the ssl context since OpenSSL - doesn't think one needs to pass data around, we should all be - living in a world of global variables, duh! - -2001-05-06 Dan Winship - - * Makefile.am (libcamelinclude_HEADERS): Fix another build - problem. (Um, anyone else could have done this...) - -2001-05-04 Dan Winship - - * providers/imap/camel-imap-store.c (get_folder_online): Fix up - refcounting on current_folder. - - * camel-disco-folder.c, camel-disco-store.h: Remove - CamelDiscoDiary refs that weren't supposed to escape yet. - -2001-05-03 Dan Winship - - * camel-disco-store.c: new abstract class for disconnectable - remote stores - - * camel-disco-folder.c: new abstract class for folders on - disconnectable stores. - - * Makefile.am: Add camel-disco-folder.[ch] and - camel-disco-store.[ch]. - - * providers/imap/camel-imap-store.c: Make this a subclass of - CamelDiscoStore, and fix up the offline interfaces for the changes - since they were first written (particularly the fact that some - IMAP stores don't just use subscribed folders). - - * providers/imap/camel-imap-folder.c: Make this a subclass of - CamelDiscoFolder, although most ops still fail in disconnected - mode. - - * camel-store.c (camel_store_get_folder_info): Change gboolean, - gboolean, gboolean to guint32 in the prototype for this function. - - * providers/local/camel-local-store.c (get_folder_info): Update - for prototype change. - -2001-05-02 Dan Winship - - * providers/imap/camel-imap-store.h: Clean this up a bit. Add a - "tag_prefix" member. Move "useful_lsub" into capabilities. - - * providers/imap/camel-imap-store.c (camel_imap_store_init): - Initialize the tag_prefix, based on a static variable. - - * providers/imap/camel-imap-command.c (camel_imap_command): Use - the store's tag_prefix character rather than "A" at the start of - the tag. Makes the verbose debug output easier to parse when - connected to multiple IMAP servers. (Well, unless you're connected - to more than 26 servers...) - - * providers/imap/camel-imap-utils.c (imap_uid_array_to_set): Fix - this up... it was losing count in some cases and giving a more - verbose answer than it needed to. - - * providers/pop3/camel-pop3-store.c: Rescue the KPOP code from bit - rot. - -2001-05-01 Dan Winship - - * providers/imap/camel-imap-command.c (camel_imap_command): Redo - command locking. Since command_lock is recursive, we can just get - a lock here, and release it either on error, or when the caller - frees the response data. (This simplifies a lot of stuff, and - fixes some problems with camel_imap_folder_changed being called - without the command_lock locked because of the 2001-03-22 change.) - - (camel_imap_response_free): - (camel_imap_response_free_without_processing): - (camel_imap_response_extract): - (camel_imap_response_extract_continuation): These all take a - CamelImapStore now as well, to deal with locking. - - * providers/imap/camel-imap-private.h: Add - CAMEL_IMAP_STORE_ASSERT_LOCKED, which defaults to a noop, but can - be made to call e_mutex_assert_locked. - - * providers/imap/camel-imap-folder.c, camel-imap-search.c, - camel-imap-store.c: Simplify using new locking stuff. Add a few - CAMEL_IMAP_STORE_ASSERT_LOCKED checks. - -2001-05-01 Dan Winship - - Support the IMAP UIDPLUS extension (RFC 2359), which lets you - resync after disconnected operation more efficiently, but also - makes it possible to do appends and moves/copies more efficiently - now. - - * providers/imap/camel-imap-folder.c (imap_append_message): If the - server supports UIDPLUS, grab the APPENDUID response and cache the - message into the folder's message cache. - (imap_copy_messages_to): Likewise, for COPYUID, copy any message - parts we have cached between the source and destination folder - caches. - (imap_get_message): If the entire message is already in the cache, - just return that rather than building it from parts. - (imap_update_summary): Fetch just the "UID FLAGS RFC822.SIZE" of - the new messages first, then only fetch the headers for messages - where we don't already have the headers cached. - - * providers/imap/camel-imap-message-cache.c: Add gtk-doc comments. - (cache_put): Fix refcounting stuff here. - (camel_imap_message_cache_insert_stream, - camel_imap_message_cache_insert_wrapper): New. - (camel_imap_message_cache_get): Fix a bug here so the memory - caching actually works. - (camel_imap_message_cache_copy): New routine, used by - imap_copy_messages_to. - - * providers/imap/camel-imap-utils.c (imap_uid_set_to_array): - Inverse operation of imap_uid_array_to_set. Used to parse COPYUID - response. - -2001-04-30 Dan Winship - - * providers/imap/camel-imap-utils.c (imap_uid_array_to_set): - New-and-improved version of get_uid_set() from - camel-imap-folder.c. Looks at the summary as it goes so that if - you ask for messages 5, 6, 8, and 9, and there is no message 7, - then you get "5:9" instead of "5:6,8:9" - - * providers/imap/camel-imap-folder.c (imap_copy_messages_to): Use - imap_uid_array_to_set() rather than get_uid_set(). - (get_uid_set): Gone - -2001-04-27 Dan Winship - - * camel-session.c: Redo this a lot so that instead of having a - class full of callbacks, we have a subclassable class. Also, - replace the increasingly horrifying - camel_session_query_authenticator with three new routines, - camel_session_get_password, camel_session_forget_password, and - camel_session_alert_user. - - * camel-pgp-context.c: - * camel-pkcs7-context.c: - * camel-smime-context.c: - * providers/imap/camel-imap-store.c: - * providers/pop3/camel-pop3-store.c: - * providers/smtp/camel-smtp-transport.c: - Use camel_session_get_password / camel_session_forget_password. - - * camel-tcp-stream-ssl.c (ssl_bad_cert): Use - camel_session_alert_user. - -2001-04-26 Jeffrey Stedfast - - * camel.c (camel_init): Automagically call camel_shutdown() - atexit() ;-) - (camel_init): Also initialize NSS databases as read/write for - S/MIME and if NSS fails to init, try initializing with volatile - databases. - - * camel-file-utils.h: #include for off_t. - -2001-04-26 Dan Winship - - * camel-file-utils.c: New file, with the int, string, time_t, and - off_t encode/decode routines from camel-folder-summary.c moved - here and renamed, for the enjoyment of non-CamelFolderSummary - subclasses. - - * Makefile.am (libcamel_la_SOURCES): Add camel-file-utils.c - (libcamelinclude_HEADERS): and camel-file-utils.h - - * camel-folder-summary.c: Remove functions that were moved to - camel-file-utils.c, update uses of them for the new names. - (camel_folder_summary_{en,de}code_token are still here.) - - * providers/local/camel-mbox-summary.c: Use camel_file_util_* - names - - * providers/imap/camel-imap-summary.c: Use camel_file_util_* names - - * providers/imap/camel-imap-store.c (imap_store_setup_online, - imap_store_setup_offline): Use camel_file_util_* names, which - makes much more sense since this isn't folder summary stuff. - -2001-04-26 Dan Winship - - * Makefile.am (INCLUDES): Remove UNICODE_CFLAGS (and some other - stuff that's redundant with EXTRA_GNOME_CFLAGS) - (libcamel_la_LIBADD): Replace UNICODE_LIBS with GAL_LIBS. - - * camel-search-private.c: - * camel-pgp-context.c: - * camel-mime-utils.c: Use gunicode interfaces rather than - libunicode. - - * camel-charset-map.c: Use gunicode rather than libunicode. (The - charmap-regen code still depends on libunicode though.) - - * camel-mime-filter-charset.h: - * tests/message/test2.c (convert): Use iconv rather than - unicode_iconv. - - * providers/smtp/Makefile.am (libcamelsmtp_la_LIBADD): - * providers/pop3/Makefile.am (libcamelpop3_la_LIBADD): - * providers/local/Makefile.am (libcamellocal_la_LIBADD): Remove - UNICODE_LIBS. - - * camel.c (camel_init): Remove call to unicode_init. - - * camel-mime-parser.c: Remove unused unicode.h include. - -2001-04-26 Dan Winship - - * camel-service.c (get_host): Use e_gethostbyname_r. - (camel_service_gethost): Remove unused var. - -2001-04-26 Not Zed - - * Applied jacob's patches for e-poolv stuff. - -2001-04-23 Jeffrey Stedfast - - * camel.h: Add camel-vee-folder.h and camel-digest-folder.h - - * camel-digest-folder.[c,h]: New class that can be used to browse - a multipart/digest message as if it were a CamelFolder. - -2001-04-22 Jeffrey Stedfast - - * camel-pgp-context.c (pgp_verify): Oops, don't use the return - value of iconv() as a string length, it only tells us the number - of non-reversable character conversions. This fixes it so we - actually see the gpg output in the message viewer. - -2001-04-23 Mikael Hallendal - - * providers/nntp/Makefile.am (INCLUDES): - Changed GTK_INCLUDEDIR to EXTRA_GNOME_CFLAGS. - -2001-04-20 Jeffrey Stedfast - - * camel-smime-context.c (smime_sign): Implemented using the - secmime.h convenience functions. - (smime_clearsign): We just error our here, there is no clearsign - for smime. - (smime_verify): Copied code over from the pkcs7 verify - same - state, ugly and unknown :-) - (smime_encrypt): Implemented using the secmime.h convenience - functions. - (smime_decrypt): Same as the code in pkcs7-context. - -2001-04-19 Jeffrey Stedfast - - * camel-pkcs7-context.c (pkcs7_sign): Implemented. - (pkcs7_clearsign): Implemented. - (get_zero_len_passwd): Convenience function to try a 0-length key - on the certificate db - if this works then there is no need to - prompt the user. - (get_password): Callback to get the password. - (camel_cipher_hash_to_nss): Convenience function to convert a - CamelCipherHash to an NSS HASH_HashType. - (nss_hash_to_sec_oid): Converts a HASH_HashType to a SecOidTag. - (pkcs7_digest): Digest function for use with pkcs7_sign(). - (sign_encode_cb): Callback to write the signed data to the output - stream. - (pkcs7_verify): Hacked on a bit more but am still a bit on the - confused side. This might work but I wouldn't hold my breath. The - sign/clearsign should be close if not correct, but this one...god - only knows. - (pkcs7_decrypt): Implemented. - (pkcs7_encrypt): Implemented (mostly, still need to handle when - 'sign' is TRUE). - -2001-04-18 Dan Winship - - * providers/imap/camel-imap-store.c (camel_imap_store_finalize): - Free base_url and storage_path. - - * providers/pop3/camel-pop3-store.c (finalize): Free the - implementation string. - (camel_pop3_command): Clarify documentation to mention that - @ex isn't set (and *@ret is) on CAMEL_POP3_ERR. - (connect_to_server): Set @ex properly on CAMEL_POP3_ERR. - - * providers/pop3/camel-pop3-folder.c (pop3_refresh_info, - pop3_get_message): Set @ex properly on CAMEL_POP3_ERR. - -2001-04-17 Jeffrey Stedfast - - * camel-pkcs7-context.[c,h]: New source files to handle Pkcs7 - encryption, decryption, signing, and verifying. Not yet - complete. I'm sensing this is going to take a while seeing as how - NSS is just so well documented. - -2001-04-17 Dan Winship - - * camel-filter-driver.c (camel_filter_driver_filter_message): Fix - a memory leak in the error case. - -2001-04-16 Jeffrey Stedfast - - * providers/local/camel-mbox-summary.c (summary_rebuild): Don't we - want to tell where we are by using the start of the message? I - think this should be using camel_mime_parser_tell_start_from() - instead. Also divide by the size *before* multiplying by 100 so - that we don't overflow the int which was giving us negative values - for our progress status (oops). - -2001-04-16 Jeffrey Stedfast - - * camel-operation.c: Added a prototype for stamp(). - - * camel-charset-map.c (camel_charset_locale_name): #include - string.h so we don't get a warning about strchr being undefined - and also init charset to NULL. - - * camel-pgp-context.c (pgp_verify): Go back to doing the utf8 - conversion by hand so that we don't depend on gal. - - * Makefile.am: Remove the EXTRA_GNOME_CFLAGS include. - - * camel-store.c (camel_mkdir_hier): Convenience function that it - seems a number of camel-store implementations used gal for. - - * providers/nntp/camel-nntp-store.c (ensure_news_dir_exists): Lets - not depend on gal for just e_mkdir_hier() - use camel_mkdir_hier() - instead. - - * providers/nntp/camel-imap-store.c: Lets not depend on gal for - just e_mkdir_hier() - use camel_mkdir_hier() instead. - - * camel-session.c (camel_session_get_storage_path): Don't depend - on e_mkdir_heir() anymore, use the CamelStore version. - - * camel-folder-search.h: Removed gal dependency, why was this even - there in the first place? - - * providers/imap/camel-imap-folder.c: Don't need gal/util/e-util.h - here, so remove it. - - * string-utils.c (strstrcase): New function, well more like old - function brought back to life so we don't have to depend on gal. - - * providers/imap/camel-imap-store.c (imap_store_setup_online): Use - strstrcase rather than e_strstrcase so we don't depend on gal. - (get_unread_online): Same here. - - * providers/smtp/camel-smtp-transport.c (smtp_helo): Use - strstrcase. - -2001-04-15 Jeffrey Stedfast - - * camel-mime-utils.c (header_raw_check_mailing_list): regex - doesn't set errno and regcomp returns 0 on success and any other - value for an error (so don't *just* check for -1). - -2001-04-14 Jeffrey Stedfast - - * camel-cipher-context.c: Check to make sure the context is a - valid context in all the user functions. - -2001-04-13 Jon Trowbridge - - * providers/imap/camel-imap-store.c (imap_disconnect): - s/imap_store/store/, fixing a typo that was causing the build to - fail. - - * camel-filter-search.c (get_source): Make the (previously unused) - get-source command actually do the right thing, properly shrouding - any passed-in source and falling back to use the source attached - to the mime message. - -2001-04-13 Dan Winship - - * camel-object.c (camel_object_hook_event): - * camel-uid-cache.c (camel_uid_cache_get_new_uids): - * camel-url.c (camel_url_new_with_base): Plug leaks. - - * camel-remote-store.c (camel_remote_store_init): Don't - re-initialize the folders hash table. - - * providers/imap/camel-imap-store.c (imap_disconnect): Free - authtypes since they'll be re-read on re-connect. - (get_folder_info): Free folderinfos that we're discarding from the - list. - -2001-04-12 Jeffrey Stedfast - - * camel-pgp-context.c (camel_pgp_context_get_type): Oops, lets not - get into a recursive call here ;-) - - * tests/smime/pgp.c: Updated to reflect changes to the PGP code. - - * tests/smime/pgp-mime.c: Same. - -2001-04-12 Jeffrey Stedfast - - * camel-pgp-mime.c: Updated to reflect the few changes made to the - CamelPgpContext class. - - * camel-pgp-context.c: Updated to subclass of CamelCipherContext. - - * camel-cipher-context.[c,h]: New base class for - CamelPgpContext. Also contains the replacement for - CamelPgpValidity, CamelCipherValidity. - -2001-04-12 Dan Winship - - * camel-mime-filter-crlf.c (filter): Fix a pair of array bounds - reads noted by purify - -2001-04-12 Jeffrey Stedfast - - * camel.h: #include the pgp stuff. - -2001-04-12 Dan Winship - - * providers/imap/camel-imap-message-cache.c - (camel_imap_message_cache_remove): - * camel-url.c (camel_url_to_string): Plug memory leaks. - -2001-04-11 Dan Winship - - * providers/imap/camel-imap-utils.c (imap_parse_string_generic): - Simplify peterw's imap_is_atom_char fix. - -2001-04-11 Jeffrey Stedfast - - * tests/smime/Makefile.am: Added pgp-mime.c to the tests. - - * tests/smime/pgp-mime.c: Test suite for camel-pgp-mime.c functions. - - * Makefile.am: Add camel-pgp-mime.[c,h] to the build. - - * camel-pgp-mime.c: Made a number of fixes to get it to compile - and also fixed a few logic errors (mostly forgetting to reset - streams) so that it worked (thanks to the pgp-mime test program). - -2001-04-11 JP Rosevear - - * providers/imap/Makefile.am: user GNOME_INCLUDEDIR since gnome - files are included in the top level camel headers and the gtk - include dir is now versioned and such - - * providers/local/Makefile.am: ditto - - * providers/pop3/Makefile.am: ditto - - * providers/smtp/Makefile.am: ditto - - * providers/sendmail/Makefile.am: ditto - - * camel-service.c: use five arg version of gethostbyname_r if - appropriate - (camel_get_host_byname): check if msg->herr is non-zero instead of - checking if msg->hp is null since we may not always have msg->hp - -2001-04-11 Jeffrey Stedfast - - * camel-sasl-digest-md5.c (digest_response): Use - camel_charset_locale_name() to get the locale charset rather than - checking the CHARSET environment variable. This is a much less - ugly hack. Also: If we fail to be able to convert to UTF8, then - disavow all knowledge of the charset parameter. - - * camel-charset-map.c (camel_charset_locale_name): New function to - return the locale charset (or NULL if US-ASCII). - -2001-04-11 Jeffrey Stedfast - - * camel-pgp-context.c (camel_pgp_verify): Use - e_utf8_from_locale_string() rather than trying to do it manually - since Lauris's version works much better. - -2001-04-06 Jeffrey Stedfast - - * Makefile.am: Added camel-pgp-context.[c,h] to the build. Also - added tests/smime/pgp.c and Makefile.am - - * tests/smime/pgp.c: New test suite for PGP functions. - - * camel-pgp-context.c: Various fixes to get it to build. - -2001-04-07 Peter Williams - - * providers/imap/camel-imap-utils.c (imap_parse_string_generic): It - would be a good idea to recognize '\0'. Before, this code was running - off the ends of strings and intermittently coredumping (if it didn't - hit an imap_atom_char first) -- whoops! - -2001-04-05 Not Zed - - * merge from evolution-0-10-branch to evolution-0-10-merge-0 - -2001-04-03 Jeffrey Stedfast - - * Makefile.am: Added tests/ back in - - * camel-mime-utils.c (header_decode_text): Ignore whitespace - between encoded words (there were a few cases where it didn't - before). - (header_encode_string): Preserve whitespace between words that are - to be encoded by encoding them too. - (header_encode_phrase): Same here but with phrases. - -2001-04-03 Dan Winship - - * providers/imap/camel-imap-folder.c (imap_sync): If we don't - change any flags or expunge, send a NOOP to give the server a - chance to send EXISTS, etc, messages. - (imap_get_message): If the server_level < IMAP4rev1, always fetch - messages all-at-once, since they don't support the [#.MIME] - syntax. - (imap_update_summary): When reading message flags, set the - server_flags field as well, and don't overwrite any flags set by - camel_folder_summary_info_new_from_message. Might help with some - of the flag problems... - -2001-04-02 Dan Winship - - * camel-service.h: Remove the "quick_login" member, which is - unnecessary. - - * providers/smtp/camel-smtp-transport.c (smtp_auth): Remove the - references to quick_login and fix this to use the CamelSasl - interfaces correctly to do the same thing. - (connect_to_server): Split this out of smtp_connect - (smtp_connect): Use connect_to_server. When re-EHLO'ing after - auth, ignore errors. - (query_auth_types): Use connect_to_server rather than - smtp_connect, so it doesn't try to authenticate. Add LOGIN - authtype to the list of authtypes to check for. - - * providers/smtp/camel-smtp-provider.c - (camel_provider_module_init): Add LOGIN authtype to the authtypes - list explicitly. - - * camel-sasl.c (camel_sasl_authtype_list): Don't list LOGIN here: - it's not a real SASL authtype and is only used for SMTP. - - * camel-sasl-plain.c: - * camel-sasl-login.c: - * camel-sasl-kerberos4.c: - * camel-sasl-cram-md5.c: - * camel-sasl-anonymous.c: - * providers/pop3/camel-pop3-provider.c: Remove "quick_login" - argument from authtypes. - -2001-04-02 Gediminas Paulauskas - - * camel-filter-driver.c: marked missing report status' for translation. - -2001-04-02 Jeffrey Stedfast - - * camel-pgp-context.c (camel_pgp_sign): mutex lock & unlock the - context. - (camel_pgp_clearsign): Same. - (camel_pgp_verify): Same. - (camel_pgp_encrypt): Same. - (camel_pgp_decrypt): And finally here... - - * camel-pgp-context.h: Update the function prototypes to match - those found in camel-pgp-context.c. - - * camel-pgp-context.c: Updated. - - * camel-pgp-mime.c (camel_pgp_mime_part_sign): Implemented. - (camel_pgp_mime_part_verify): Implemented. - (camel_pgp_mime_part_encrypt): Implemented. - (camel_pgp_mime_part_decrypt): Implemented. - -2001-04-01 Jeffrey Stedfast - - * camel-sasl-login.[c,h]: New files to handle the LOGIN SASL - mechanism. - - * camel-sasl-plain.c: Removed the definition of - camel_sasl_login_authtype. - - * camel-sasl.c (camel_sasl_new): Oops. I thought LOGIN was an - alias to PLAIN. I was wrong. These two SASL objects have to be - separate. - - * providers/smtp/camel-smtp-transport.c (smtp_auth): Updated to - check for and use authmech->quick_login when available. - -2001-04-01 Jeffrey Stedfast - - * providers/pop3/camel-pop3-provider.c: Updated the authtypes here - too. - - * camel-sasl-plain.c: - * camel-sasl-anonymous.c: - * camel-sasl-digest-md5.c: - * camel-sasl-cram-md5.c: - * camel-sasl-kerberos4.c: Updated the authtype values. - - * camel-service.h: Added another field to CamelServiceAuthType - that specifies whether or not the mechanism supports "quick auth" - which means that the client can send the initial challenge in the - AUTH request. - - * camel-sasl.c (camel_sasl_new): Add support for LOGIN. - (camel_sasl_authtype_list): Here too. - (camel_sasl_authtype): And finally here. - - * camel-sasl-plain.c: Define camel_sasl_login_authtype. - - * providers/smtp/camel-smtp-transport.c (smtp_auth): Only unref - the SASL object if it exists. - -2001-03-30 Dan Winship - - * providers/pop3/camel-pop3-store.c (connect_to_server, - query_auth_types, pop3_connect): Move things around here to make - this all work right again (so you don't get prompted for a - password when checking the supported authtypes.) - -2001-03-30 Jon Trowbridge - - * camel-mime-message.c (camel_mime_message_set_source): Shrould - our source URL before putting it into X-Evolution-Source. - -2001-03-29 Jeffrey Stedfast - - * providers/imap/camel-imap-store.c (get_folder_info): Don't - blindly append "/INBOX", construct a CamelURL and set the path - that way. - (parse_list_response_as_folder_info): Don't blindly append - "/", construct a CamelURL and set the path that way - instead. - (get_folders_offline): And again here. - -2001-03-30 Not Zed - - * camel-service.c (camel_get_host_byname): Dont overwrite an - exception if we got one already. Added camel_operation status to - it, and comment out some debug. - -2001-03-29 Not Zed - - * providers/smtp/camel-smtp-transport.c (smtp_connect): Free host - name info when done ... blah blah. - - * camel-sasl-kerberos4.c (krb4_challenge): Free host name info - after we're done with it. - - * camel-sasl-digest-md5.c (digest_md5_challenge): Free host name - info after we're done with it. - - * camel-remote-store.c (remote_connect): Free the host name info - from get_host after we're finished with it. - - * camel-service.c (camel_get_host_byname): New function to - lookup a name, and still be cancellable. - (camel_free_host): And a function to free the structure - returned. - (camel_service_gethost): Call get_host_byname for this. - -2001-03-29 Jon Trowbridge - - * camel-filter-driver.c (camel_filter_driver_filter_message): Save - the source URL using camel_mime_message_set_source. - - * camel-mime-message.c (camel_mime_message_set_source): Renamed - camel_mime_message_set_identity to this. Sets the X-Evolution-Source - header. - (camel_mime_message_get_source): Returns the X-Evolution-Source - header. - -2001-03-29 Kjartan Maraas - - * broken-date-parser.c: #include , and - * broken-date-parser.h: Remove all includes but - * camel-address.h: Added #include - * camel-data-wrapper.c: Move system includes to the top. - * camel-data-wrapper.h: #include - * camel-exception.c: #ifdef HAVE_CONFIG_H - * camel-exception.h: Remove #include - * camel-filter-driver.c: #ifdef HAVE_CONFIG_H and move system - headers to top. Mark strings in camel_exception_set*() for i18n. - * camel-filter-driver.h: #include - * camel-filter-search.c: #ifdef HAVE_CONFIG_H - * camel-folder-search.c: #include - * camel-folder-search.h: Header shuffling - * camel-folder-summary.h: Same here - * camel-folder-thread.c: #ifdef HAVE_CONFIG_H - * camel-folder.c: Here too. - * camel-folder.h: #include - * camel-internet-address.c: Move system headers up - * camel-lock.c: #ifdef HAVE_CONFIG_H - * camel-medium.c: Same here - * camel-mime-filter-bestenc.c: Move system headers up - * camel-mime-filter-from.c: Same here - * camel-mime-filter-linewrap.c: And here - * camel-mime-filter.c: #include to fix warnings from new gcc - * camel-mime-filter.h: System headers moved up - * camel-mime-message.c: Here too. #ifdef HAVE_CONFIG_H added - * camel-mime-part-utils.c: #ifdef HAVE_CONFIG_H added - * camel-mime-part.c: Here too, and shuffle headers - * camel-mime-utils.c: #ifdef HAVE_CONFIG_H. Remove const from two - variables to remove warning. - * camel-mime-utils.h: Shuffle headers - * camel-movemail.c: #ifdef HAVE_CONFIG_H. Mark string in camel_exception_set - * camel-multipart.c: #ifdef HAVE_CONFIG_H. Added includes to remove - warnings from new gcc - * camel-object.c: #ifdef HAVE_CONFIG_H - * camel-object.h: Shuffle headers - * camel-operation.c: #ifdef HAVE_CONFIG_H - * camel-provider.c: #ifdef HAVE_CONFIG_H. Shuffle headers. Mark a string - * camel-remote-store.c: #ifdef HAVE_CONFIG_H - * camel-sasl-anonymous.c: #ifdef HAVE_CONFIG_H. #include - * camel-sasl-cram-md5.c: #ifdef HAVE_CONFIG_H. #include and - to remove warnings. - * camel-sasl-digest-md5.c: #ifdef HAVE_CONFIG_H. shuffle headers - * camel-sasl-digest-md5.h: Shuffle headers. - * camel-sasl-kerberos4.c: #ifdef HAVE_CONFIG_H. Shuffle headers. - * camel-sasl-kerberos4.h: Shuffle headers. - * camel-sasl-plain.c: #ifdef HAVE_CONFIG_H. Shuffle - * camel-sasl.c: #ifdef HAVE_CONFIG_H. #include - * camel-search-private.c: #include - * camel-seekable-stream.c: #ifdef HAVE_CONFIG_H - * camel-seekable-stream.h: Shuffle - * camel-seekable-substream.c: #ifdef HAVE_CONFIG_H - * camel-service.c: Same - * camel-service.h: Shuffle - * camel-session.c: #ifdef HAVE_CONFIG_H - * camel-store.c: Same - * camel-stream-buffer.c: Here too - * camel-stream-buffer.h: Shuffle - * camel-stream-filter.c: #include - * camel-stream-fs.c: #ifdef HAVE_CONFIG_H - * camel-stream-fs.h: Shuffle headers - * camel-stream-mem.c: Same as above - * camel-stream-mem.h: Here too - * camel-stream-null.c: #ifdef HAVE_CONFIG_H - * camel-stream.c: Here too - * camel-stream.h: Shuffle - * camel-tcp-stream-openssl.c: #ifdef HAVE_CONFIG_H - * camel-tcp-stream-raw.c: Same here. and move local includes down - * camel-tcp-stream-ssl.c: Same as above - * camel-tcp-stream.c: #ifdef HAVE_CONFIG_H - * camel-tcp-stream.h: move local include down - * camel-transport.c: #ifdef HAVE_CONFIG_H - * camel-transport.h: #include - * camel-uid-cache.c: #ifdef HAVE_CONFIG_H. Shuffle headers - * camel-uid-cache.h: Shuffle - * camel-url.c: #ifdef HAVE_CONFIG_H - * camel-vee-folder.c: #ifdef HAVE_CONFIG_H. Shuffle headers - * camel-vee-folder.h: #include - * camel-vee-store.h: Same here - * camel.c: #ifdef HAVE_CONFIG_H - * gstring-util.c: Here too - * hash-table-utils.c: Remove #include - * hash-table-utils.h: #include it here instead. - * string-utils.c: #ifdef HAVE_CONFIG_H - * providers/cache/camel-cache-map.c: #ifdef HAVE_CONFIG_H, shuffle - headers and mark strings in camel_exception_set*() - * providers/cache/camel-cache-provider.c: #ifdef HAVE_CONFIG_H - * providers/cache/camel-cache-store.c: Same here, and mark a string. - * providers/imap/camel-imap-command.c: #ifdef HAVE_CONFIG_H - * providers/imap/camel-imap-command.h: Shuffle header - * providers/imap/camel-imap-folder.c: #ifdef HAVE_CONFIG_H - * providers/imap/camel-imap-message-cache.c: #ifdef HAVE_CONFIG_H - * providers/imap/camel-imap-provider.c: #ifdef HAVE_CONFIG_H and - #include - * providers/imap/camel-imap-search.c: #ifdef HAVE_CONFIG_H - * providers/imap/camel-imap-store.c: #ifdef HAVE_CONFIG_H and mark - a string. - * providers/imap/camel-imap-summary.c: Shuffle headers - * providers/imap/camel-imap-wrapper.c: #ifdef HAVE_CONFIG_H. Shuffle - * providers/local/camel-local-folder.c: #ifdef HAVE_CONFIG_H - * providers/local/camel-local-provider.c: #ifdef HAVE_CONFIG_H - * providers/local/camel-local-store.c: Same here - * providers/local/camel-local-summary.c: Here too, shuffle, mark a string - * providers/local/camel-maildir-folder.c: #ifdef HAVE_CONFIG_H - * providers/local/camel-maildir-store.c: Same - * providers/local/camel-maildir-summary.c: Here too - * providers/local/camel-mbox-summary.c: And here - * providers/local/camel-mbox-store.c: And here - * providers/local/camel-mbox-summary.c: #include - * providers/local/camel-mh-folder.c: #ifdef HAVE_CONFIG_H - * providers/local/camel-mh-store.c: same - * providers/local/camel-mh-summary.c: #ifdef HAVE_CONFIG_H, shuffle headers - and mark a string for translation. - * providers/nntp/camel-nntp-auth.c: #include - * providers/nntp/camel-nntp-store.c: Remove superfluous arg to - CAMEL_SERVICE_CLASS to make it compile - * providers/pop3/camel-pop3-provider.c: #ifdef HAVE_CONFIG_H - * providers/pop3/camel-pop3-store.c: Same here - * providers/sendmail/camel-sendmail-provider.c: Here too - * providers/sendmail/camel-sendmail-transport.c: Here too - * providers/smtp/camel-smtp-provider.c: Same - * providers/smtp/camel-smtp-transport.c: #ifdef HAVE_CONFIG_H, mark - strings for translations. - -2001-03-29 Dan Winship - - * camel-url.c (camel_url_to_string): change "gboolean show_passwd" - to "guint32 flags". - - * tests/misc/url.c (main): Update calls to camel_url_to_string - - * providers/imap/camel-imap-store.c (construct): Call - camel_url_to_string with flags to hide password, authtype, and - params to create the base_url. - (etc): Update for the fact that the base_url no longer has the "/" - at the end. - - * camel-service.c (construct): Update calls to camel_url_to_string - (pass CAMEL_URL_HIDE_PASSWORD) - -2001-04-03 Jeffrey Stedfast - - * camel-mime-utils.c (header_decode_text): Ignore whitespace - between encoded words (there were a few cases where it didn't - before). - (header_encode_string): Preserve whitespace between words that are - to be encoded by encoding them too. - (header_encode_phrase): Same here but with phrases. - -2001-04-04 Kjartan Maraas - - * camel-filter-driver.c: Added #include . Marked - a bunch of strings for translation. - * camel-folder-search.c: Added #include . - * camel-folder-summary.c: Same here. - * camel-movemail.c: Marked strings for translation. - * camel-provider.c: Same here. - * camel-search-private.c: #include - * camel-vee-folder.c: Mark string for translation. - * providers/local/camel-mbox-summary.c: #include - -2001-04-03 Dan Winship - - * providers/imap/camel-imap-folder.c (imap_sync): If we don't - change any flags or expunge, send a NOOP to give the server a - chance to send EXISTS, etc, messages. - (imap_get_message): If the server_level < IMAP4rev1, always fetch - messages all-at-once, since they don't support the [#.MIME] - syntax. - -2001-04-01 Jeffrey Stedfast - - * providers/imap/camel-imap-store.c (get_folder_info): Don't - blindly append "/INBOX", construct a CamelURL and set the path - that way. - (parse_list_response_as_folder_info): Don't blindly append - "/", construct a CamelURL and set the path that way - instead. - (get_folders_offline): And again here. - -2001-03-31 Not Zed - - * camel-operation.c (struct _status_stack): change stamp to - unsigned to avoid overflow. - (camel_operation_end): - (camel_operation_progress_count): - (camel_operation_progress): Double the delay before transient - events start showing their own progress. - -2001-03-30 Not Zed - - * providers/pop3/camel-pop3-folder.c (pop3_get_message): Change - the pop download into a transient event. - - * camel-operation.c (stamp): Get a timestamp that changes 4x a - second (or rather, arbitrarily more often than 1/second). - (camel_operation_progress): Use stamp() for time updates. - (camel_operation_progress_count): " - (camel_operation_start): Store the status as a struct status_stack - item. - (camel_operation_start_transient): New function to start a - transient event, which is only reported if it runs for too - long/and is reset afterwards. - (camel_operation_progress): - (camel_operation_progress_count): Fix for status_stack changes, - and account for transient updates. - - * camel-filter-driver.c (camel_filter_driver_filter_folder): When - we remove things (set deleted), always set seen too, to mirror - interface behaviour when you delete. - (camel_filter_driver_filter_message): And same here too. - -2001-03-30 Dan Winship - - * providers/pop3/camel-pop3-store.c (connect_to_server, - query_auth_types, pop3_connect): Move things around here to make - this all work right again (so you don't get prompted for a - password when checking the supported authtypes.) - -2001-03-29 Dan Winship - - * camel-url.c (camel_url_to_string): change "gboolean show_passwd" - to "guint32 flags". - - * tests/misc/url.c (main): Update calls to camel_url_to_string - - * providers/imap/camel-imap-store.c (construct): Call - camel_url_to_string with flags to hide password, authtype, and - params to create the base_url. - (etc): Update for the fact that the base_url no longer has the "/" - at the end. - - * camel-service.c (construct): Update calls to camel_url_to_string - (pass CAMEL_URL_HIDE_PASSWORD) - -2001-03-28 Jeffrey Stedfast - - * camel-pgp-context.[c,h]: New class for PGP encrypting, - decrypting, signing and verifying. Next I'll be moving the - contents of mail/mail-crypto into Camel. These files will - basically replace mail/openpgp-utils.[c,h]. - -2001-03-29 Not Zed - - * camel-folder-search.c (search_body_contains): Optimise the match - "" case, just match everything in the folder (if we have it). - - * camel-vtrash-folder.c (vtrash_move_messages_to): Access the - folder directly from the message info. - (vtrash_move_messages_to): I think we also need to call the real - move_messages_to, and not try and bypass the lock, since we dont - have the lock for that folder. - - * camel-vee-folder.h: Move CamelVeeMessageInfo to public, so - subclasses can get to it. - - * camel-vee-folder.c (camel_vee_folder_add_folder): Dont let you - add a vfolder to itself. - (folder_changed): - (vee_folder_remove_folder): - (vee_folder_build_folder): Copy changes before triggering changed - events, so we can do them outside of locks. - (camel_vee_folder_get_message_folder): Removed function. - (camel_vee_folder_hash_folder): Made public (renamed from - hash_folder), simply for subclasses (probably not needed). - (vee_expunge): Oops, call the class sync, not superclass sync. - (vee_sync): Remove some accidental debug. - -2001-03-27 Jeffrey Stedfast - - * camel-service.c (get_path): Add the port (if user defined) to - the path to fix bug #1996. - - Danw: I'm iffy on the "fix" so I'd like you to comment. - -2001-03-27 Jeffrey Stedfast - - * providers/pop3/camel-pop3-folder.c (pop3_sync): If we aren't - going to even check the resp/free buffer that gets returned from - camel_pop3_command, don't even bother using it. Send in NULL - instead. - (pop3_get_message): Check to make sure that the `result' string is - non-NULL. It's possible that some POP servers may return with - "+OK\r\n..." rather than the expected - "+OK ### octets\r\n..." - -2001-03-27 Not Zed - - * camel-folder-summary.c (camel_folder_summary_finalize): Unref - the html filter when done. - (summary_build_content_info): Disable using the html parser to - help index html mails until it gets sorted out. - - * camel-vee-folder.c (folder_changed): Fix a cut n paste bug, we - want uid_removed not uid_changed deref, fixes bug #1999. - -2001-03-27 Dan Winship - - * camel-sasl.c (camel_sasl_authtype_list): add an argument to say - whether or not you want "PLAIN" in the list (so you don't end up - with "Password" twice in the config dialog). - - * providers/imap/camel-imap-provider.c (camel_provider_module_init): - * providers/imap/camel-imap-store.c (query_auth_types): We don't - want PLAIN. - - * providers/smtp/camel-smtp-provider.c (camel_provider_module_init): - * providers/smtp/camel-smtp-transport.c (query_auth_types): But we - do. - -2001-03-27 Dan Winship - - * camel-provider.h: Add an "extra_conf" field to CamelProvider - with structures and defines and stuff, for providers to specify - additional configuration options that they want. Also add a - "supports ssl" flag to the provider flags. - - * camel-url.c (camel_url_new_with_base): Fix parsing of params. - (output_param): And unparsing... - - * camel-remote-store.c: add a "default_ssl_port" field. - (remote_construct): If the URL has the "use_ssl" parameter, set - the store's use_ssl flag. - (remote_connect): If using SSL and no port specified, use the - default_ssl_port rather than the default_port. - - * providers/smtp/camel-smtp-provider.c (smtp_provider): add - CAMEL_PROVIDER_SUPPORTS_SSL and CAMEL_URL_ALLOW_USER. (The config - gui code knows that the ALLOW_USER and ALLOW_AUTH go together.) - (ssmtp_provider): gone - - * providers/smtp/camel-smtp-transport.c (smtp_construct): Set a - flag if "use_ssl" param is set. - (smtp_connect): Check the CamelSmtpTransport use_ssl flag rather - than checking if this is smtp or ssmtp. - - * providers/imap/camel-imap-provider.c (imap_conf_entries): Add a - bunch of IMAP-specific configuration options, like "check for new - mail in all folders" (default TRUE), "show only subscribed - folders" (default TRUE), "ignore server-supplied namespace", and - "apply filters to INBOX" (not yet implemented). - (imap_provider): We support SSL and we no longer allow a path in - the URL. (namespace is handled via extra_conf) - (simap_provider): Gone - - * providers/imap/camel-imap-store.c (camel_imap_store_init): Set - default_ssl_port, don't set CAMEL_STORE_SUBSCRIPTIONS here - (construct): remove simap stuff, deal with "use_lsub", - "namespace", "check_all", and "filter" parameters. Set base_url - to not include params. - (imap_store_setup_online): Don't ask for the namespace if it was - set explicitly. Don't get subscribed folders if !use_lsub. - (imap_concat): Fix a bug. - (get_folder_info): Support for not checking all folders. - - * providers/imap/camel-imap-folder.c (imap_get_full_name): Rewrite - to use imap_store->namespace, not service->url->path - - * providers/pop3/camel-pop3-provider.c (pop3_conf_entries): "keep - on server" (currently still implemented by the mailer code, not - here), "delete after N days" (not yet implemented). - (pop3_provider): we support SSL - (spop_provider): gone - - * providers/pop3/camel-pop3-store.c (camel_pop3_store_init): Set - default_ssl_port - (pop3_connect): Remove spop code - -2001-03-26 Jeffrey Stedfast - - * camel-vee-folder.c (vee_folder_construct): Move all of the - camel_vee_folder_construct() internals here. - (camel_vee_folder_construct): This function basically becomes a - wrapper for vee_folder_construct and also checks to make sure that - the UNMATCHED vfodler is constructed otherwise constructs it. - (camel_vee_folder_new): Call vee_folder_construct() instead so - that we don't get into a dead-lock. - -2001-03-26 Jeffrey Stedfast - - * camel-store.c (init_trash): Use camel_vtrash_folder_new() to - create the vtrash folder now. - - * camel-vtrash-folder.[c,h]: New subclass of CamelVeeFolder for - our vTrash folders. - - * camel-folder.c (camel_folder_copy_messages_to): Don't watch for - vtrash folders anymore. - (camel_folder_move_messages_to): Same. - - * camel-vee-folder.c (camel_vee_folder_class_init): Update. - (vee_move_messages_to): Rewrite to use the new move API. - - * camel-filter-driver.c (do_copy): Updated to reflect - copy_message_to changes. Create a temporary uid array and use - that. - (do_move): Same. - (camel_filter_driver_filter_message): And again, here... - - * providers/imap/camel-imap-folder.c (imap_copy_messages_to): - Update to the new API. - (imap_move_messages_to): Same. - (get_uid_set): New function to create a `set' string based on an - array of UIDs for use with imap_copy_messages_to. - - * camel-folder.c (camel_folder_copy_messages_to): Replaces - camel_folder_copy_message_to - (camel_folder_move_message_to): Replaces - camel_folder_move_message_to. - -2001-03-27 Not Zed - - * camel-vee-store.c (vee_get_folder): Added folder_created event - here. - - * camel-vee-folder.c (unmatched_finalise): Removed, moved into - main finalise code. - (message_changed): Just create a new change entry and promote it - to a folder_changed thing. - (vee_sync): Always rebuild folder on sync, even when not expunge. - (folder_changed): If not autoupdating, make sure we remove any - removed entries. - (vee_folder_build_folder): - (vee_folder_remove_folder): NOP if we're called on - folder_unmatched. - (vee_search_by_expression): Only search each folder once. Should - we also order the result in summary order? - -2001-03-20 Not Zed - - * camel-store.c (init_trash): Fix calling for vee_folder_new(). - - * camel-folder-summary.c (camel_folder_summary_remove_index): - Optimise slightly, use ptr_array_remove_index rather than have to - search for the index by using summary_remove. - - * camel-vee-folder.h: Removed local member from VeeFolder, since - it was never used. - - * camel-vee-store.c (camel_vee_store_finalise): Setup finalise - function. - - * camel-vee-folder.c (camel_vee_folder_set_expression): New - function to set the query of an existing vfolder. - (camel_vee_folder_construct): New function for - convenience/subclasses. - (camel_vee_folder_new): Removed exception parameter, no longer - needed (since we dont search yet). - (camel_vee_folder_new): Changed to use folder_construct, and no - longer raise the folder created signal. - (vee_folder_build_folder): Make it return error on exception, so - we can work without exceptions. - (vee_folder_remove_folder): Use remove index rather than - remove_uid, this is ok since we have the summary locked for our - own access. - (camel_vee_folder_add_folder): Only add the folder to the - unmatched private if it is not a private folder. - (camel_vee_folder_remove_folder): Only remove the folder from - unmatched if it is not private. - (vee_expunge): Just call sync with expunge set. - (vee_sync): If expunging, also refresh the search. - (vee_folder_build_folder): We do our own locking now, removed from - callers, also trigger changed events here too (within locks), - fixed callers appropriately. - (vee_folder_remove_folder): Do our own locking, and trigger - changed events. - (vee_folder_add_info): Renamed of vee_folder_add, we now take a - hash of the folder name, rather than use the folders address. - (hash_folder): Convert a folder name into an 8 character hash. - (vee_get_message, vee_search_by_expression, vee_set_message_flags, - vee_set_message_user_flag, vee_move_message_to): Changed the uid - to be an 8 byte hash + original uid, with no ':' anymore. - -2001-03-26 Jeffrey Stedfast - - * camel-mime-utils.c (header_decode_text): When writing the last - token (if not rfc2047 encoded), don't use g_string_append_len, use - append_latin1. - - * camel-mime-message.c (write_to_stream): Don't spew a warning if - the message-id wasn't set by the application, not a big deal since - we create one right here. - -2001-03-26 Dan Winship - - * providers/imap/camel-imap-command.c (camel_imap_command): keep a - reference on the store's current_folder. - - * providers/imap/camel-imap-store.c (camel_imap_store_finalize): - (imap_disconnect): unref the current_folder before clearing it. - - * camel-url.c (camel_url_get_param): Add missing accessor. - - * camel-session.c (camel_session_get_provider): New. Return - the provider for a URL. - -2001-03-25 Dan Winship - - * camel-url.c (camel_url_new_with_base): New URL parser with full - RFC1808 relative URL support. Yum. - (camel_url_new): Wrapper around camel_url_new_with_base now. - - * tests/Makefile.am: add misc subdir - - * tests/misc/url.c: relative URL test cases from RFC 1808 - -2001-03-25 Jeffrey Stedfast - - * camel-filter-driver.c (do_copy): Don't use copy_to if the source - folder doesn't support summary info's. - (do_move): Same. - (camel_filter_driver_filter_message): And again here. I think - this will fix the problem of "colour" tags not staying with the - message when it's copied to a folder during the filter process. - -2001-03-24 Jeffrey Stedfast - - * camel-sasl-digest-md5.c (digest_response): Do charset conversion - on the username param here if needed. - (parse_server_challenge): Protect against possibly empty-string - charset values. - -2001-03-23 Jon Trowbridge - - * camel-filter-driver.c (camel_filter_driver_filter_message): - Don't call camel_mime_message_set_identity. (The call is - commented out, left over from some earlier experimentation that I - want to be able to remember later...) - - * camel-mime-message.c (camel_mime_message_set_identity): Added. - A function to set the X-Evolution-Identity header. - -2001-03-22 Dan Winship - - * providers/imap/camel-imap-command.c (imap_read_response): Don't - look at untagged responses other than "* BYE"... - (camel_imap_response_free): ...do it here instead... - (camel_imap_response_free_without_processing): ...but not here. - - * providers/imap/camel-imap-folder.c (camel_imap_folder_selected): - Remove the "EXISTS" line from the response so - camel_imap_response_free won't try to process it. - (camel_imap_folder_selected): If we get an EXISTS response mixed - in with the FETCH responses, record the new EXISTS value. - Use camel_imap_response_free_without_processing so that an EXISTS - response won't cause a loop. - (imap_rescan): Use camel_imap_response_free_without_processing. - (imap_update_summary): Use - camel_imap_response_free_without_processing. If an EXISTS response - shows up, call imap_update_summary again to get the new messages. - (imap_protocol_get_summary_specifier): Use BODY.PEEK[0], not - RFC822.HEADER for prev IMAP4rev1, since the FETCH parser won't - deal with RFC822.HEADER responses. - - * providers/imap/camel-imap-store.c (get_folder_info): Fix an - uninitialized variable - -2001-03-21 Dan Winship - - * camel-provider.h: (CamelProvider) add a "GList *authtypes", so - you can get the list of authtypes used by a provider without - needing to have an actual CamelService object handy. (Will be - needed by the new config druid.) - (CAMEL_PROVIDER_ALLOWS, CAMEL_PROVIDER_NEEDS): New macros to test - the URL part stuff, since the way it works is too complicated and - everyone always does it wrong. - - * camel-service.c (camel_service_query_auth_types): Remove the - @connected arg again: if you don't want to connect, you can just - get the list of authtypes off the provider. - (camel_service_free_auth_types): Remove this. All existing - implementations do authtypes the same way, so just say the caller - should "g_list_free" the list. (Oh, look, removing this function - doesn't actually cause the mailer to not build. How 'bout that.) - (construct, get_path): Use the new URL part macros. - - * camel-remote-store.c (remote_query_auth_types): Update - (remote_free_auth_types): Nuke - (camel_remote_store_authtype_list): New function for use by - subclasses. - - * providers/imap/camel-imap-provider.c: - * providers/pop3/camel-pop3-provider.c: - * providers/smtp/camel-smtp-provider.c: Update CamelProvider - structures. - (camel_provider_module_init): Put all the SSL parts together so - there's only 1 #ifdef. Set up the provider authtypes field using - the SASL, CamelRemoteStore, and standard authtypes, as - appropriate. Copy that from the normal provider to the SSL - provider. - - * providers/local/camel-local-provider.c: - * providers/sendmail/camel-sendmail-provider.c: - * camel-session.c: Update CamelProvider structures. - - * providers/imap/camel-imap-store.c (query_auth_types): - * providers/pop3/camel-pop3-store.c (query_auth_types): Update - - * providers/smtp/camel-smtp-store.c (query_auth_types): Update. - Remove the no_authtype, because that's what "ALLOW_AUTH" rather - than "NEED_AUTH" means. - (free_auth_types): Nuke. - -2001-03-21 Jeffrey Stedfast - - * camel-filter-driver.c (camel_filter_driver_filter_message): - Return -1 on fail. - (camel_filter_driver_filter_folder): Same. - (camel_filter_driver_filter_mbox): Same. - (camel_filter_driver_filter_folder): Return -1 if an exception was - set as well. - -2001-03-19 Jeffrey Stedfast - - * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_finalize): - Free the expected host. - (camel_tcp_stream_openssl_new): Now takes a Service and an - expected_host. Set them. - -2001-03-20 Dan Winship - - * providers/imap/camel-imap-store.c - (camel_imap_store_check_online): Function to check if the store is - online and set an exception if not. Currently controlled by an - environment variable, but eventually there will be both a global - (session-level) setting and a per-store setting. - (construct): Set up storage_path and base_url here rather than at - connect-time. - (imap_auth_loop): Split out from imap_connect. - (imap_setup_online): Split out from imap_connect. Do the - post-authentication connection setup, and cache the results to - disk. - (imap_setup_offline): Set up a CamelImapStore with information - saved from a previous imap_setup_online. - (imap_connect): If online, do connect_to_server(), - imap_auth_loop(), and imap_setup_online(). Otherwise, do - imap_setup_offline(). - (get_folder, get_folder_info): Add offline support. - (create_folder, subscribe_folder, unsubscribe_folder): Disable - these when offline (for now). - - * providers/imap/camel-imap-folder.c (camel_imap_folder_new): - Remove the sync'ing-with-server stuff... it's done by - camel_imap_folder_selected now, which only gets called if the - store is online. - (camel_imap_folder_selected): add the code removed from - camel_imap_folder_new. Besides simplifying the folder_new and - summary_new code, this also means now that we'll DTRT if a - folder's UIDVALIDITY changes while we're connected. Also, when - that happens, clear the message cache explicitly. - (imap_refresh_info, imap_sync): These are no-ops when offline. - (imap_expunge, imap_append_message, imap_copy_message_to, - imap_search_by_expression): These don't yet work offline. - (imap_get_message, camel_imap_folder_fetch_data): Return an error - when trying to fetch a non-cached body part when we're offline. - - * providers/imap/camel-imap-summary.c (camel_imap_summary_new): - Rewrite to not check the validity here. (We'll do it from - camel_imap_folder_selected instead.) - - * providers/imap/camel-imap-command.c (camel_imap_command): Call - camel_imap_folder_selected even when the selection is all we're - doing, to match the changes in camel-imap-folder.c. - - * providers/imap/camel-imap-message-cache.c - (camel_imap_message_cache_clear): New function to clear out a - message cache. - -2001-03-19 Christopher James Lahey - - * Makefile.am (INCLUDES): Added $(EXTRA_GNOME_CFLAGS) - -2001-03-19 Jeffrey Stedfast - - * providers/pop3/camel-pop3-store.c (pop3_connect): Set the errbuf - to NULL after freeing it? I don't think this should fix bug #1801 - but I guess it can't hurt. - -2001-03-18 Jeffrey Stedfast - - * camel-remote-store.c (remote_recv_line): Protect against a - possibly NULL exception. - - * camel-filter-driver.c (camel_filter_driver_filter_message): - Document and modify to return a boolean value denoting whether or - not errors occured during processing. - (camel_filter_driver_filter_mbox): Same as above and also modified - to check return codes of filter_message rather than relying only - on whether or not the exception was set (as it's possible to pass - in NULL for the exception). - (camel_filter_driver_filter_folder): Same as above. - - * camel-mime-utils.c (header_param_list_format_append): Quote the - param value if it contains whitespace as well. - -2001-03-17 Jeffrey Stedfast - - * Makefile.am: Don't include system include dir. - - * camel.c: Use quotes around the nss.h include so it doesn't try - to use the systen nss.h file. - - * camel-tcp-stream-ssl.c: Same here. - -2001-03-17 Not Zed - - * providers/local/camel-maildir-summary.c (maildir_summary_sync): - Modified patch from Dan Berger to re-check - the maildir directory for new/updated messages at sync time. - - * camel-folder.c (camel_folder_ref_message_info): Implemented. - (ref_message_info): And default implementation. - - * camel-folder.h: Added ref_message_info virtual method. - -2001-03-16 Not Zed - - * camel-folder-thread.c - (camel_folder_thread_messages_new_summary): New function to create - a thread tree from a supplied summary array. - (camel_folder_thread_messages_destroy): Handle thread trees - generated by the above function properly. - -2001-03-16 Jeffrey Stedfast - - * camel-private.h: Same. - - * camel-remote-store.h: Fixed #include to use <>'s instead of ""'s - -2001-03-16 Jeffrey Stedfast - - * camel-tcp-stream-ssl.c (ssl_bad_cert): Print info about the - issuer of the certificate. - - * providers/smtp/camel-smtp-transport.c (smtp_connect): Use - camel_tcp_stream_get_socket(). - - * camel-tcp-stream-openssl.c (stream_get_socket): Implemented. - - * camel-tcp-stream-ssl.c (stream_get_socket): Implemented. - - * camel-tcp-stream-raw.c (stream_get_socket): Implemented. - - * camel-tcp-stream.c (camel_tcp_stream_get_socket): New function. - -2001-03-16 Kjartan Maraas - - * providers/pop3/camel-pop3-folder.c: Added #include - -2001-03-16 Dan Winship - - * camel-mime-utils.c (header_msgid_generate): Don't use - getdomainname: it's NIS crap, not DNS. - -2001-03-15 Jeffrey Stedfast - - * camel.c (camel_init): Don't use the hardcoded cert db directory, - use the one passed in. - - * camel-tcp-stream-ssl.c (ssl_get_client_auth): Wrote the default - implementation. Not that we'll use this though, since this is the - default implementation provided by NSS anyway. This more or less - serves as a reference in case we want to change anything. - (ssl_auth_cert): Same. - (ssl_bad_cert): Changed the prompt string and free it when we're - done. - -2001-03-15 Dan Winship - - First batch of disconnected IMAP-related stuff. This adds local - caching of message parts, but NOT any actual disconnected support. - (But it should speed up IMAP use.) - - * providers/imap/camel-imap-message-cache.c: New class for caching - message data to disk, and removing it when it's no longer - relevant. Will eventually also support merging message parts - together to save on files. Or maybe using a db instead of files? - - * providers/imap/camel-imap-private.h: Add a cache_lock to - CamelImapFolderPrivate. This lock must be recursive, so make both - locks EMutexes rather than GMutex. - - * providers/imap/camel-imap-folder.c (parse_fetch_response): "The - only FETCH response parser you need!" Replaces the various - almost-correct bits of code formerly scattered throughout this - file with a single fully-correct function that can handle any - FETCH response at any time, so we don't get confused by seeing a - flags update when we were only expecting a message body, etc. - (camel_imap_folder_fetch_data): FETCH a message body part either - from the cache or the server - (camel_imap_folder_changed): Remove expunged messages from the - message cache. - (camel_imap_folder_new): Change to take a directory instead of a - summary file name. Create a CamelImapMessageCache for the folder. - (imap_finalize): Unref the message cache. - (camel_imap_folder_selected, imap_rescan, get_content, - get_message, imap_get_message, imap_update_summary): Redone a - bunch to use parse_fetch_data, CamelImapMessageCache, etc. - - * providers/imap/camel-imap-store.c (get_folder): Pass directory - name to camel_imap_folder_new, not summary filename. Use - e_path_to_physical to generate a path with /subfolders/ inserted - between directory components. - - * providers/imap/camel-imap-wrapper.c (camel_imap_wrapper_new): - Call camel_imap_folder_fetch_data (with cache_only TRUE) and if - the data is cached, return an online datawrapper rather than an - offline one. - (write_to_stream): Use camel_imap_folder_fetch_data (with - cache_only FALSE) here too - - * providers/imap/camel-imap-utils.c (imap_skip_list): Renamed from - skip_list and made non-static. - -2001-03-15 Jeffrey Stedfast - - * camel-tcp-stream-ssl.h: Uninclude prnetdb.h since it's not - needed here. - - * providers/smtp/camel-smtp-transport.c: #include prnetdb.h here - instead of making camel-tcp-stream-ssl.h include it. Prevents some - header bloat. - - * providers/smtp/Makefile.am: Include the NSPR_CFLAGS and - NSS_CFLAGS. - -2001-03-14 Jeffrey Stedfast - - * providers/smtp/camel-smtp-transport.c (smtp_connect): Update for - using CamelTcpStreams and also for using SSL. - - * providers/smtp/libcamelsmtp.urls: defined "ssmtp" - - * providers/smtp/camel-smtp-provider.c: Defined the Secure SMTP - provider. - (camel_provider_module_init): Register the Secure SMTP provider. - -2001-03-14 Jeffrey Stedfast - - * providers/imap/camel-imap-store.c (imap_connect): Check for - "simap" instead of "imaps". - - * providers/pop3/camel-pop3-store.c (pop3_connect): Change the - port to be 995 for spop. - - * providers/pop3/libcamelpop3.urls: Change to "spop". - - * providers/imap/libcamelimap.urls: Change "imaps" to "simap" to - correspond to /etc/services. - -2001-03-14 Jeffrey Stedfast - - * providers/pop3/camel-pop3-store.c (pop3_connect): Check to see - if we are using "pops" and then set the appropriate SSL settings. - - * providers/pop3/libcamelpop3.urls: Add "pops" - - * providers/pop3/camel-pop3-provider.c: Defined the pops provider. - (camel_provider_module_init): Register the pops provider. - -2001-03-14 Jeffrey Stedfast - - * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_new): Ya know what? - Lets not ref the service because otherwise we'll start having the - same problems we had back with vtrash. Besides, since the store - owns the stream, it's not like the store is going anywhere without - the stream anyway. - (camel_tcp_stream_ssl_finalize): No need to unref the service. - -2001-03-14 Jeffrey Stedfast - - * camel-remote-store.c (remote_connect): Pass the service into the - SSL stream, not the session. - - * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_init): Set the - service to NULL. - (camel_tcp_stream_ssl_finalize): Unref the service. - (camel_tcp_stream_ssl_new): Takes a CamelService arg now rather - than a CamelSession arg. - -2001-03-14 Jeffrey Stedfast - - * camel.c (camel_init): So it turns out that NSS_Init *isn't* - idempotent, so we have to protect against initializing it more - than once(contrary to what their design specs suggest). - - * camel-session.c (camel_session_get_service): Use - camel_exception_is_set() - Makes no difference but it's more - consistant with how we normally do it. - - * camel-provider.h (CAMEL_URL_ALLOW_SSL): We don't need this. - - * providers/imap/camel-imap-provider.c: Define the imaps provider. - (camel_provider_module_init): Register the imaps provider. - - * camel-provider.c (camel_provider_init): Only add the protocol to - the hash table if it's non empty. Also, g_strdup() the filename - into the hash table. - - * providers/imap/camel-imap-store.c (camel_imap_store_init): Eek! - So the service's URL isn't set until after this is - initialized. This means we can't check for SSL here. - (imap_connect): Set the SSL options here instead. - -2001-03-14 Jeffrey Stedfast - - * camel-tcp-stream-ssl.c: Numerous fixes to get it to build - correctly with NSS enabled. - - * camel-remote-store.c (remote_connect): Pass in the session and - expected host args, oops. - - * camel-provider.h (CAMEL_URL_ALLOW_SSL): Defined. - - * providers/imap/camel-imap-store.c (camel_imap_store_init): Check - to see if we are supposed to use SSL and set the options - accordingly. - (imap_connect): Return FALSE here instead of NULL. - - * providers/imap/camel-imap-provider.c: Add CAMEL_URL_ALLOW_SSL. - - * providers/imap/libcamelimap.urls: Add "imaps" which is the - protocol for Secure IMAP. - -2001-03-14 Jeffrey Stedfast - - * camel-tcp-stream-openssl.[c,h]: Added - - * Makefile.am: Added camel-tcp-stream-openssl.[c,h] to the build. - - * camel-types.h: Added CamelTcpStreamSSL and CamelTcpStreamOpenSSL - -2001-03-14 Not Zed - - * camel-mime-filter-charset.c (filter, complete): re-constify - inbuf, to remove a warning. - - * camel-mime-parser.c (folder_scan_step): When we're out of data, - run the filter_complete. For some reason the logic that was there - was never being run, always try it now, i think it was to work - around a buggy filter, rather than fix it the right way. - - * camel-folder-summary.c (summary_build_content_info): If indexing - html parts, use the html filter to convert it to some indexable - format. - (summary_build_content_info): Reset the filters before adding them - back to the stream, if they get re-used in a given instance - (likely). - - * Makefile.am (libcamelinclude_HEADERS): Added - camel-mime-filter-html.[ch]. - (INCLUDES): Added xml clags - -2001-03-05 Not Zed - - * camel-folder-search.c (camel_folder_search_class_init): Setup a - new function, "uid" which matches uids. - (search_uid): Implement the "match uid" command. - -2001-03-13 Jeffrey Stedfast - - * camel-mime-utils.c: Check for a new type of mailing list header. - -2001-03-13 Jeffrey Stedfast - - * camel-tcp-stream-raw.c (stream_read): Made cancellable. - (stream_write): Same. - (stream_connect): Removed checks for DIVINE_INTERVENTION as the - code worked fine. - - * camel-tcp-stream-ssl.c (stream_write): get rid of 'w' as it - wasn't really needed. - (set_errno): New function to set errno based on the NSPR error - code. - (stream_read): If an error occured, call set_errno(). - (stream_write): Same. - -2001-03-13 Jeffrey Stedfast - - * Makefile.am: Added camel-tcp-stream-ssl to the build. - - * camel-remote-store.h: Add a use_ssl member to the - CamelRemoteStore object. - -2001-03-13 Jeffrey Stedfast - - * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_get_type): - Oops. Make this a subclass of CamelTcpStream, not CamelStream. - - * camel-types.h: Add the defs for CamelTcpStream and - CamelTcpStreamRaw - - * Makefile.am: Add camel-tcp-stream and camel-tcp-stream-raw to - the build. - - * camel-remote-store.c (remote_connect): Update to use - CamelTcpStreams. - - * camel-tcp-stream-raw.c (stream_connect): Made cancellable by - copying the currently used code in camel-remote-store.c. - (stream_setsockopt): Oops, flags = fcntl (..., GET_FL); - (camel_tcp_stream_raw_get_type): Oops. Make this a subclass of - CamelTcpStream, not CamelStream. - -2001-03-13 Jeffrey Stedfast - - * camel.c (camel_init): Since all of the Mozilla libs (including - NSPR and NSS) correctly handle reinitializations, we might as well - init both NSPR and NSS in camel_init so we can be sure of that - these libs have been initialized. - (camel_shutdown): New function to call the NSS cleanup stuff. - -2001-03-13 Jeffrey Stedfast - - * camel-folder.c (camel_folder_copy_message_to): Don't allow the - user to copy a message to or from the vtrash folder. Set an - exception if they try. - (camel_folder_move_message_to): This one is a bit more - complicated: 1) If the user tried to move a message from the - vtrash into the original folder, just undelete the message. 2) If - the user tries to move the message to the vtrash folder, then just - mark the message as deleted. 3) If the user tries to move the - message from the vTrash to a folder other than the original, use - the original folder as the source. As another optimization, I've - made it so that if the user tries to move a message to the same - folder, just no-op. - (move_message_to): Unset the deleted flag before moving (assuming - it's there). - (copy_message_to): Same. - - * camel-vee-folder.c (camel_vee_folder_get_message_folder): New - convenience function to get the folder from which the message uid - is derived from. - -2001-03-13 Dan Winship - - * providers/imap/camel-imap-store.c (imap_connect): When trying - again after a failed password attempt, check if the connection got - dropped (which Courier will do) and deal accordingly. - - * providers/sendmail/camel-sendmail-transport.c (sendmail_send_to, - sendmail_send): More fixing for exim: It can't deal with "-tif", - you need to say "-t -i -f". - -2001-03-12 Jeffrey Stedfast - - * camel-store.c (init_trash): Rename the folder to "Trash" and - i18nify it. - -2001-03-09 Jeffrey Stedfast - - * camel-tcp-stream-ssl.h: Comment out everything unless HAVE_NSS - is defined. - - * camel-tcp-stream-ssl.c (stream_read): Don't use errno, use - nspr's error code stuff. - (stream_write): Same. - -2001-03-09 Jeffrey Stedfast - - * camel-session.c (camel_session_query_authenticator): Created a - new mode (CAMEL_AUTHENTICATOR_ACCEPT) which is a Yes/No prompt to - the user. This will be needed by the SSL/TLS code to come. Also - changed the return value to a gpointer rather than a char* to - allow the returning of TRUE/FALSE values. - - * camel.c: Wrap stuff with HAVE_NSS - -2001-03-09 Dan Winship - - * providers/sendmail/camel-sendmail-transport.c (sendmail_send, - sendmail_send_to): Remove the "-U" for now, because it breaks - exim's "sendmail" wrapper. (And it doesn't actually do all that - much to sendmail's behavior, and it was working fine before - anyway.) - - * camel-mime-utils.c (header_fold): Fix a bug that could make this - walk off the end of a string. (The bug has been there since - December... maybe this will fix some unreproduceable crashes?) - -2001-03-08 Jeffrey Stedfast - - * camel-store.c (camel_store_get_folder): Changes so that the - folder gets added to the vtrash reguardless of whether or not the - store is holding it's own folder lookup hash. - (init_trash): Oops, lets try locking the cache before we go and - add all the cached folders to the vtrash. - -2001-03-08 Jeffrey Stedfast - These fixes make it so that the CamelStore does not actually hold - a ref on it's vTrash folder. The vTrash folder is now created ONLY - when it is requested. This solves the problem of not being able to - unref a Store and have it disconnect/finalize like we expect it to. - - * camel-store.c (init_trash): When we create the vtrash, add all - previously opened folders to it and hook on to the finalize event - so that we can then set the store->vtrash to NULL. - (get_trash): If a vtrash folder for the store doesn't exist, - init_trash() and then try. - (construct): No longer need this. - (camel_store_class_init): Don't override the construct method. - (camel_store_finalize): We no longer hold a ref on the vtrash so - don't unref it. - -2001-03-07 Jeffrey Stedfast - - * providers/pop3/camel-pop3-store.c (init_trash): Implement. - (get_trash): Implement. - (camel_pop3_store_class_init): Override the default init_trash and - get_trash virtual functions. Hopefully this should fix the problem - of pop3 sotre's not disconnecting after the send&recv code - finishes downloading mail. - - Wonder if I should override the default implementation for the - mbox, mh, and maildir too? - -2001-03-07 Dan Winship - - * camel-remote-store.c (camel_remote_store_connected): Return the - return value of camel_service_connect rather than returning - !camel_exception_is_set(), since that will be wrong if ex==NULL... - Fixes a crash in the IMAP keepalive code, but this same problem - probably exists in other places too... - (remote_recv_line): Fix another problem... - - * providers/local/camel-mbox-provider.c: - * providers/vee/.cvsignore: - * providers/vee/libcamelvee.urls: Remove some unused stuff - -2001-03-06 Jeffrey Stedfast - - * camel-sasl-digest-md5.c (compute_response): Redone so as to save - on memory allocations and speed. - -2001-03-05 Jeffrey Stedfast - - * camel-sasl-plain.c (plain_challenge): Don't return NULL if the - token is non-NULL. This is why: - - sending : AUTH PLAIN - received: 334 ok. go on. <-- this is why - sending : ZGZPaQpAZ214Lm5ldBBnb29jYXI= - received: 235 {mp005-rz3} go ahead - - * camel-sasl.c (camel_sasl_authtype): Add the PLAIN type here. - (camel_sasl_authtype_list): And here too. - - * camel-sasl-plain.c: Initialize the camel_sasl_plain_authtype. - - * camel-sasl-plain.h: extern the camel_sasl_plain_authtype. - -2001-03-05 Jeffrey Stedfast - - * providers/imap/camel-imap-store.c (imap_connect): i18n'd some - strings in here. - - * providers/smtp/camel-smtp-transport.c (smtp_connect): Keep - trying to authenticate until either we succeed or until the user - cancels. - -2001-03-04 Jeffrey Stedfast - - * camel-mime-utils.c: Wrote a new version of header_fold() that - takes a 'force' option and uses another new function called - header_fold_next_space() in place of strchr(inptr, ' ') to get the - next whitespace char. The idea of header_fold_next_space() is to - not treat spaces between a set of quotes as a space - this way it - will be possible to fold (for example) the Content-Type MIME - header without worrying about breaking up a boundary string. - Note: This code is #if 0'd out until Zucchi approves of the patch. - Another Note: We will probably still want to use the "don't fold - this header" hash lookup for headers like the Message-Id and - possibly a few others. - -2001-03-04 Jeffrey Stedfast - - * camel-internet-address.c - (camel_internet_address_encode_address): Make sure there is a - space between the name and the address tokens. - - * camel-mime-utils.c (rfc2047_decode_word): encoded string - segments need to be at least 8 chars (7 doesn't leave room for an - ecoding value. To be more realistic, even 8 chars isn't enough as - this assumes there is no charset nor any encoded text. If the - encoding value is not 'Q' or 'B', then return NULL. This fixes bug - #1689. - -2001-03-03 Not Zed - - * camel-vee-folder.c (vee_folder_remove_folder): New function to - remove a folder from a vfolder. - (camel_vee_folder_remove_folder): New public function to remove a - folder from a vfolder. - -2001-03-02 Jeffrey Stedfast - - * providers/smtp/camel-smtp-provider.c: Doh! Set the - CAMEL_URL_ALLOW_AUTH flag. - - * providers/smtp/camel-smtp-transport.c (get_smtp_error_string): - Updated with the extended AUTH return codes. - -2001-03-02 Jeffrey Stedfast - - * providers/imap/camel-imap-store.c (try_auth): Don't forget to - unref the SASL object. - - * providers/smtp/camel-smtp-transport.c (query_auth_types): - Implemented. - (smtp_auth): Implemented. - (smtp_helo): Don't bother parsing the authtypes if we already have - them. - (smtp_connect): call smtp_auth() here if we found any authtypes. - (smtp_disconnect): Updated as I now use a hash table for the - supported authtypes rather than a linked list. - (esmtp_get_authtypes): modify to use a hash table instead of a - linked list and also use isspace() rather than == ' '. - -2001-03-02 Dan Winship - - * providers/sendmail/camel-sendmail-transport.c (sendmail_send_to, - sendmail_send): Use "-f" to set the envelope from address so - bounces go to the right place. Also, pass "-U" since the man page - says we're supposed to... - -2001-03-01 Jeffrey Stedfast - - * camel-sasl.c: #include "camel-sasl-digest-md5.h" - (camel_sasl_authtype_list): add DIGEST-MD5 stuff here. - (camel_sasl_authtype): And here too. - (camel_sasl_new): And here... - - * camel-sasl-digest-md5.[c,h]: new SASL class for DIGEST-MD5 (has - been tested and proven to work). - -2001-03-01 Dan Winship - - * camel-sasl.c (camel_sasl_challenge): Take a GByteArray as input - as well. Comment that you can pass %NULL for @token to get the - initial auth data for mechanisms that are client-initiated. - (camel_sasl_challenge_base64): Convenience function for protocols - that use base64-encoded SASL. - (camel_sasl_authenticated): Implement this... (it was prototyped - already) - (camel_sasl_new): Function to take a service name, a mechanism - name, and a CamelService, and return a CamelSasl for it. - (camel_sasl_authtype, camel_sasl_authtype_list): Functions to - return CamelServiceAuthType information about SASL mechanisms, to - allow providers to deal with them generically. - - * camel-sasl-anonymous.c, camel-sasl-plain.c: Update/simplify for - CamelSasl changes. Both of these are single-round - (client-initiated) mechanisms, so they don't need to keep state. - (camel_sasl_plain_new): Removed; use camel_sasl_new instead. - (Can't get rid of camel_sasl_anonymous_new though...) - - * camel-sasl-cram-md5.c: Update/simplify for CamelSasl changes. - (camel_sasl_cram_md5_new): Removed; use camel_sasl_new instead. - (cram_md5_challenge): Use md5_get_digest where possible, and - various other minor simplifications. CRAM-MD5 only has a single - round, so there's no need to keep track of state. This code is now - tested (against Cyrus IMAPd) and known to work. - - * camel-sasl-kerberos4.h: Update/simplify for CamelSasl changes. - Make only a single #ifdef HAVE_KRB4. Remove stuff from priv that - isn't needed between rounds. - (camel_sasl_kerberos4_new): Removed; use camel_sasl_new instead - (krb4_challenge): Fix up the logic I broke in my previous "at - least make it compile" fixes, update to match other changes, and - remove IMAP-isms that shouldn't be in the generic code. This still - isn't tested, because we're stuck behind a NAT right now... - - * providers/imap/camel-imap-store.c: Add an "authtypes" hash table - to CamelImapStore recording the supported authtypes. - (connect_to_server): Record supported authtypes in the authtypes - hash rather than the capabilities bitmask, since now the IMAP code - is no longer responsible for keeping track of which authtypes we - support. - (query_auth_types): Use camel_sasl_authtype_list to get the - SASL-supported authtypes. - (try_auth): New function to try a SASL auth mechanism. Sort of - formerly imap_try_kerberos_v4_auth. - (imap_connect): Get rid of the krb4-specific bits and genericize - them for any SASL authtype. - - * providers/imap/Makefile.am: Remove camel-imap-auth.[ch] (moved - into camel-imap-store.c since it's now constant size) and the - KRB4_CFLAGS and KRB4_LDFLAGS references. - -2001-03-01 Jeffrey Stedfast - - * camel-sasl-anonymous.c (anon_challenge): Don't base64 encode the - data, leave that up to the provider to do if it needs to. Also - save on some memory allocations and stuff. - - * camel-sasl-cram-md5.c (cram_md5_challenge): Same here. Also get - rid of the need for the temp buf as we can just write it to the - GByteArray. - -2001-03-02 Not Zed - - * camel-mime-utils.c (rfc2047_encode_word, rfc2047_decode_word): - Reconstify variables to match iconv. - - * camel-search-private.c (camel_ustrstrcase): Change some - assertions back into valid returns. - -2001-03-01 Dan Winship - - * Makefile.am (libcamel_la_LIBADD, INCLUDES): camel depends on - krb4 now (where available), for camel-sasl-kerberos4.c - - * camel-sasl-kerberos4.[ch]: Make this at least compile. Dunno if - it works yet. - -2001-03-01 Peter Williams - - * camel-url.c (camel_url_new): Assert url_string != NULL. - -2001-02-28 Jeffrey Stedfast - - * Makefile.am: Added camel-sasl-anonymous.[c,h] to the build. - - * camel-sasl-anonymous.[c,h]: new SASL class for ANONYMOUS - - * camel-sasl-plain.c (plain_challenge): Oops, have a state for - setting sasl->authenticated = TRUE; - - * camel-sasl-cram-md5.c (cram_md5_challenge): Same here. - -2001-02-28 Jeffrey Stedfast - - * camel-mime-utils.c (header_decode_date): A fix for broken - mailers that send 2-digit years (ie "Wed, 28 Feb 01 - 04:59:41"). Fixes bug #1633. - - * camel-filter-driver.c (camel_filter_driver_filter_folder): Check - to make sure message isn't NULL. - -2001-02-28 Dan Winship - - * camel-remote-store.c (remote_recv_line): If we get back 0 bytes - from camel_stream_buffer_gets, that means the socket got - disconnected, so set an exception. (Noticed because of a message - that crashes our IMAP server when you try to look at it. :) - -2001-02-28 Jeffrey Stedfast - - * Makefile.am: Added camel-sasl*.[c,h] to the build. - - * camel-sasl.[c,h]: new "abstract" SASL class - - * camel-sasl-kerberos4.[c,h]: new SASL class for KERBEROS_V4 - - * camel-sasl-cram-md5.[c,h]: new SASL class for CRAM-MD5 - - * camel-sasl-plain.[c,h]: new SASL class for PLAIN - - * providers/imap/camel-imap-auth.c: Removed the base64 functions. - - * camel-mime-utils.c (base64_encode_simple): Moved here from - camel-imap-auth.c - (base64_decode_simple): Same. - -2001-02-26 Dan Winship - - * providers/imap/camel-imap-folder.c (imap_sync): Group messages - into sets with the same flags and use the IMAP message set - notation rather than doing a separate STORE FLAGS for each one. - This cuts the network traffic down to just a handful of commands - per sync rather than one per changed message. Removed the progress - notification stuff since it's no longer meaningful and should - hopefully be unnecessary. - (imap_copy_message_to): move the former sync_message function - into here, since it's no longer shared with imap_sync. - -2001-02-26 Jeffrey Stedfast - - * camel-mime-utils.c: Made thread-safe and moved to above the test - code. - - * camel-mime-message.c (camel_mime_message_init): Set the - message_id to NULL. - (camel_mime_message_finalize): Free the message_id. - (camel_mime_message_set_message_id): New function to set the - Message-Id. - (camel_mime_message_get_message_id): New function to get the - Message-Id. - (process_header): Decode the message-id. - -2001-02-24 Jeffrey Stedfast - - * camel-store.c (construct): init the vTrash folder here instead - of in store_init. - (camel_store_class_init): init service_class->construct. - (camel_store_finalize): We only need to unref the vtrash folder. - (init_trash): don't create a vstore since we don't need it. - -2001-02-23 Jeffrey Stedfast - - * camel-store.c (camel_store_class_init): init get_trash and - init_trash. - (camel_store_init): call the virtual init_trash function. - (camel_store_finalize): unref the vtrash folder/store if present. - (camel_store_get_folder): Add the new folder to the vtrash - vfolder. - (init_trash): default implementation of init_trash. - (get_trash): default implementation of get_trash. - - * camel-vee-store.c (vee_init_trash): No-op. - (vee_get_trash): return NULL - -2001-02-23 Not Zed - - * camel-folder-summary.c (camel_message_info_new_from_header): - Doh, cut and paste problem, use mlist not cc. - - * camel-folder.c (move_message_to): - (copy_message_to): If the source folder doesn't support a - summary, dont try and get the message info from it. - - * camel-filter-search.c (check_header): Implement a pseudo-header - "x-camel-mlist" which just looks up in the message info for a - match. - - * camel-folder-search.c (check_header): Add pseudo-header - "x-camel-mlist" which can be used to match on mailing list. - - * providers/imap/camel-imap-folder.c (imap_sync): Add some - internal progress reporting. - (imap_rescan): Do some progress reporting. - - * camel-mime-part.c (init_header_name_table): Add the message-id - to the formatted table, so we dont try and wrap it, and break it. - -2001-02-22 Jeffrey Stedfast - - * camel-folder.h: Remove the 'FIXME: remove because this isn't - required...' comment for copy_message_to since we now need and - cherish its existance in the filter-driver code ;-) - - * camel-filter-driver.c (camel_filter_driver_filter_message): Now - takes a UID and CamelFolder arguments (which can be NULL) to allow - for possible optimizations when copying messages between folders - on the same store. - (camel_filter_driver_filter_mbox): Updated (passes NULL for both - since this case can't be optimized anyway). - (camel_filter_driver_filter_folder): Updated to pass in the uid - and folder of the message. - -2001-02-22 Dan Winship - - * providers/imap/camel-imap-summary.h (CAMEL_IMAP_SERVER_FLAGS): - #define this as the set of all IMAP system flags - - * providers/imap/camel-imap-folder.c (sync_message): after syncing - flags, set server_flags to (flags & CAMEL_IMAP_SERVER_FLAGS) - rather than just "flags", since any other flags won't have been - synced. Prevents the CAMEL_MESSAGE_ATTACHMENTS flag from getting - lost. - -2001-02-22 Not Zed - - * providers/vee/*: Removed all files. - - * camel-private.h: Move camel-vee-private.h stuff into here. - - * camel-session.c: Move the vee_provider here, and initialise it - always as part of a session. The vfolder provider is always - available. - - * providers/Makefile.am: Remove "vee" from the build list, now - built as part of the main library. - - * Makefile.am (libcamelinclude_HEADERS): - (libcamel_la_SOURCES): Added camel-vee-store.[ch], - camel-vee-folder.[ch]. - - * providers/vee/camel-vee-folder.c (vee_folder_build): Removed, - not used. - (camel_vee_folder_new): Removed call to build_folder. - (vee_get_message): Dont try and free the mi if we didn't get it. - - * camel-folder.c (camel_folder_change_info_new): Added a hash - table of what we have in the lists, plus moved private things into - private pointer. - (camel_folder_change_info_add_source): Fixed up private accesses. - (camel_folder_change_info_add_uid): Changed to use a hashtable to - see if we already have the uid, etc. - (camel_folder_change_info_remove_uid): Similar. - (change_info_remove): Likewise. - (camel_folder_change_info_clear): Fixes for privatisations. - (camel_folder_change_info_free): " - -2001-02-21 Dan Winship - - * providers/imap/camel-imap-folder.c (fetch_medium): Fixes for - IMAP4-pre-rev1 from Torsten Schulz. - -2001-02-20 Not Zed - - * camel-mime-utils.c (mail_list_magic): Take the ^Header: part out - of the expression, since we look that up ourselves. - (header_raw_check_mailing_list): When getting the match, get match - 1, not match 0, we dont want the full string match. - - * camel-folder-summary.c (CAMEL_FOLDER_SUMMARY_VERSION): Bumped - for summary change. - (message_info_new): Extract the mlist info from the headers. - (message_info_load): Load mlist from summary. - (message_info_save): Save mlist to summary. - (message_info_free): Save the mlist entry. - (camel_message_info_new_from_header): Extract mailing list header. - (camel_message_info_dup_to): Copy the mlist entry. - (camel_message_info_free): Free mlist. - (message_info_dump): Dump the mlist. - - * camel-folder-summary.h: Add an mlist (mailing list) string to - the summary. - -2001-02-19 Not Zed - - * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Added - flags argument. - (message_changed): Add support for the auto-update flag, in which - case we auto-match the content as it changes. - (camel_vee_folder_init): Remoive "DYNAMIC" optionality - (camel_vee_folder_finalise): " - (vee_expunge): As we expunge folders, re-sync their content by - rerunning the query. - - * providers/vee/camel-vee-store.c (vee_get_folder): Pass flags to - folder new. - -2001-02-18 Not Zed - - * providers/vee/Makefile.am (noinst_HEADERS): Added - camel-vee-private.h. - - * providers/vee/camel-vee-private.h: New file to add locking stuff - for vee folders. - - * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Add - locking around unmatched setup. - (camel_vee_folder_init): Setup lock. - (camel_vee_folder_finalise): Free locks. - (folder_changed): Add locking. - (unmatched_finalise): " - (message_changed): " - (vee_folder_build): " - -2001-02-17 Not Zed - - * providers/vee/camel-vee-folder.c (vee_folder_add): Check uid - doesn't exist before adding it. - -2001-02-16 Not Zed - - * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Create - a new virtual virtual folder UNMATCHED, to store all messages that - dont match other vfolders. - (unmatched_folder_changed): When a vfolder issues a changed event, - use its info to update the unmatched folder info. - (unmatched_finalise): When a vfolder is finalised, remove any uids - it has as if we had a removed event for it. - -2001-02-16 Jeffrey Stedfast - - * camel-filter-driver.c (camel_filter_driver_finalise): Thaw the - defaultfolder. - (camel_filter_driver_set_default_folder): Thaw the defaultfolder - we're about to replace, and freeze the new defaultfolder. - -2001-02-15 Jeffrey Stedfast - - * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Emit - the folder_created signal here. - - * providers/local/camel-local-folder.c - (camel_local_folder_construct): Emit the folder_created signal. - - * providers/local/camel-local-store.c (delete_folder): On error, - free the 'name' string so we don't leak. Also emit the - folder_deleted signal. - - * providers/imap/camel-imap-store.c (subscribe_folder): Emit the - folder_created signal. - (unsubscribe_folder): Emit the folder_deleted signal. - - * camel-store.c (camel_store_class_init): Added folder_created and - folder_deleted signal defs. - -2001-02-15 Dan Winship - - * camel-folder-thread.c (container_parent_child): Deal with - out-of-order References headers so they don't cause messages to - disappear in threaded view. - - * providers/imap/camel-imap-folder.c (fetch_medium): IMAP4 - (pre-rev1) doesn't allow BODY.PEEK[], so use RFC822.PEEK instead - in that case. - -2001-02-14 Christopher James Lahey - - * camel-mime-filter-charset.c (complete, filter), - camel-mime-utils.c (rfc2047_decode_word, rfc2047_encode_word): - Changed this code to match the glibc iconv signature. - -2001-02-14 Dan Winship - - * camel-store.c (camel_store_create_folder): New method to create - a folder when you don't know its full name. - - * providers/imap/camel-imap-store.c (create_folder): Implement. - (create_folder): Oops, and fix bug involving namespaces - -2001-02-12 Not Zed - - * camel-mime-part.c (init_header_name_table): Add address headers - to list that we dont fold when writing. The are properly - formatted as we build them. - (write_to_stream): DOH, lookup the header name in the formatted - hash table, not the value, that would never have worked. - - * camel-internet-address.c - (camel_internet_address_encode_address): Changed to take a - parameter saying how much we've printed so far. We now fold the - header as we format it. We dont fold addresses, even if they are - too long, we simply put them on another line by themselves: this - should make the result more parsable by mailers that can't handle - split up addresses (which are legal). - (internet_encode): Fix for changes to above. - -2001-02-12 Jeffrey Stedfast - - * providers/local/camel-local-provider.c: mbox, mh, and maildir - camel-url's need absolute paths. - - * camel-provider.h (CAMEL_URL_PATH_IS_ABSOLUTE): New flaggy flag. - -2001-02-08 Dan Winship - - * camel-store.c: Rewrite a bunch. Replace the existing folder - cache stuff with much simpler code that still handles all the - existing cases. Now the folder hash table is always created by the - base class, using hash and compare functions provided by the class - implementation. (If they are set to NULL, CamelStore won't cache - folders.) lookup_folder, cache_folder, and uncache_folder are no - longer class methods, and get_name is gone completely. - - (camel_store_get_inbox): Renamed from - camel_store_get_default_folder, since that wasn't being used, and - this is what we actually need. - (camel_store_get_root_folder): Removed, since it's not needed for - anything given get_folder_info. - - * camel-remote-store.c: - * providers/local/camel-local-store.c: - * providers/local/camel-mbox-store.c: - * providers/local/camel-mh-store.c: - * providers/local/camel-maildir-store.c: - * providers/nntp/camel-nntp-store.c: - * providers/pop3/camel-pop3-store.c: - * providers/vee/camel-vee-store.c: Minor updates for CamelStore - changes - - * providers/imap/camel-imap-store.c (camel_imap_store_class_init): - Update for CamelStore changes. - (hash_folder_name, compare_folder_name): treat INBOX - case-insensitively, otherwise use g_str_hash and g_str_equal. - - * camel-service.c (camel_service_construct): Remove - camel_service_new and create camel_service_construct (as a class - method) in its place. - - * camel-session.c (camel_session_get_service): Use - camel_object_new and camel_service_construct to replace - camel_service_new. - - * providers/local/camel-local-store.c (construct): Append a '/' to - the URL path if it doesn't end with one - -2001-01-31 Jeffrey Stedfast - - * camel-tcp-stream-ssl.c: Oops, include the camel-tcp-stream-ssl - header instead of the raw one. - -2001-02-07 Not Zed - - * camel-operation.c (camel_operation_start): Changed to push the - operation into a status stack. - (camel_operation_progress): Changed to only accept % complete. - (camel_operation_reset): Free status stack as well. - - * providers/pop3/camel-pop3-folder.c (pop3_get_message): Get the - octect count from the return line, and pass it to - get_additional_data(). - (pop3_refresh_info): Added status stuff. - - * providers/pop3/camel-pop3-store.c - (camel_pop3_command_get_additional_data): Added a total bytes - expected argument for progress reporting & fixed callers. - (camel_pop3_command_get_additional_data): Added progress - reporting. - - * providers/local/camel-mbox-summary.c (mbox_summary_sync_full): - (mbox_summary_sync_quick): - (summary_rebuild): Added progress reporting stuff. - -2001-02-07 Jeffrey Stedfast - - * camel-search-private.c (CAMEL_SEARCH_COMPARE): Macro for making - comparisons easy. - (camel_ustrcasecmp): Use CAMEL_SEARCH_COMPARE and check for - end-of-string before the utf-8 error check. - (camel_ustrncasecmp): Same. - (camel_search_header_match): Strip leading spaces before doing - anything else. Also use vlen and mlen so as to not need to do 500 - strlen()'s. - (camel_ustrcasecmp): Don't get_utf8() for the 2 strings in the - comparison part of the loop because of short-circuit expression - evaluation. (blame JPR if this is the wrong term!) - (camel_ustrncasecmp): Same. - -2001-02-06 Jeffrey Stedfast - - * camel-search-private.c (utf8_get): Rewrote using unicode_get_utf8(). - (camel_ustrcasecmp): Use unicode_char_t - (camel_ustrncasecmp): Same. - -2001-02-06 Christopher James Lahey - - * camel-mime-filter-charset.c (complete, filter), - camel-mime-utils.c (rfc2047_decode_word, rfc2047_encode_word): - Made these pass char ** as the second parameter to iconv. - -2001-02-06 Not Zed - - * camel-session.c: Removed all the camel_cancel stuff. - - * camel-stream-fs.c (stream_read): Change to use camel_operation. - (stream_write): " - - * camel-remote-store.c (socket_connect): Change to use - camel_operation rather than camel_cancel stuff. - Removed gal include, WTF is that doing there anyway? - - * Makefile.am (libcamel_la_SOURCES): - (libcamelinclude_HEADERS): Added camel-operation.[ch], stuff to - handle notification and cancellation. - - * camel-search-private.c: Removed unwanted header. It was never - put in for a reason. Stop fixing irrelevant warnings. - - (camel_ustrstrcase): Our own strstrcase impl for utf8 strings. - (camel_ustrcasecmp): Ditto for strcasecmp. - (camel_ustrncasecmp): And strncasecmp. - (utf8_get): Simpler interface to utf8 string processing. - (camel_search_header_match): Use the new things. - -2001-02-05 Not Zed - - * camel-folder.c (get_summary): Removed some old variables/a small - memleak. - (free_summary): Removed old variables. - - * camel-mime-utils.c (header_raw_check_mailing_list): New utility - function to get the mailing list (if any) that a set of headers - came from. - -2001-02-05 Christopher James Lahey - - * camel-stream-fs.c: Added a missing #include. - - * camel-search-private.c: Added a missing #include. - -2001-02-05 Jeffrey Stedfast - - * camel-remote-store.c (remote_query_auth_types): Oops. Change - this too. - - * providers/smtp/camel-smtp-transport.c (query_auth_types): Updated. - - * providers/nntp/camel-nntp-store.c (nntp_store_query_auth_types): - Updated. - - * providers/pop3/camel-pop3-store.c (query_auth_types): Updated. - - * providers/imap/camel-imap-store.c (query_auth_types): Updated. - - * camel-service.c (camel_service_query_auth_types): Now takes a - boolean value to specify whether or not to connect when - constructing a supported authtype list. - -2001-02-05 Not Zed - - * camel-stream-filter.c (do_write): Revert jeff's earlier change, - the change below is the more-correct fix. All his was doing was - ignoring the return code & looping actually :) - - * camel-stream-fs.c (stream_write): Since we are non-blocking on - the outgoing fd, keep looping if writing out large blocks, so we - can keep checking for cancel, etc. - -2001-02-02 Not Zed - - * camel-folder-thread.c (camel_folder_thread_messages_new): When - we drop a fake node, dont skip checking the next in the list. - (camel_folder_thread_messages_new): Add an assertion check just to - make sure we dont get any pseudo nodes, and spit a warning if we - do. - -2001-02-04 Jeffrey Stedfast - - * camel-stream-filter.c (do_write): Make do_write loop until the - entire buffer is written. - -2001-02-02 Not Zed - - * camel-stream-fs.c: Add missing header for cancel check stuff. - - * camel-session.c (camel_cancel_cancel): Fix a wrong cast. - - * camel-mime-part.c (init_header_name_table): Setup a new table - header_formatted_table, that lists headers that we dont want to - fold (they've already been folded). - (write_to_stream): Check for already formatted headers, and dont - try and fold them. This is a fix for bug #1097. - -2001-02-01 Not Zed - - * camel-mime-utils.c (header_fold): If we are folding, drop the - space at the end of the line. - -2001-01-30 Not Zed - - * camel-remote-store.c (timeout_cb): Remvoe the stream locking - here. I think this was leading to a deadlock when a keepalive is - being sent, in imap. - -2001-01-29 Not Zed - - * providers/imap/camel-imap-command.c - (imap_command_strdup_vprintf): Include the terminating NUL in the - calculated string length. This hit memcheck. - -2001-01-25 Not Zed - - * tests/folder/test3.c: Changed the subject search to handle case - sensitive when it is mixed case. - - * Makefile.am (libcamel_la_SOURCES): Added camel-ssearch-private.c - (noinst_HEADERS): Added camel-search-private.h - - * camel-folder-search.c (check_header): New function to do the - work of the various header checks. - (search_header_matches): - (search_header_starts_with): - (search_header_ends_with): - (search_header_contains): Use check_header to do the work. - (build_match_regex): Removed. - - * camel-search-private.c (header_soundex): New - function to match words to phrases using soundex algorithm. - - * camel-filter-search.c (soundexcmp): Removed. - (check_match): Moved to search-private.h - -2001-01-24 Not Zed - - * camel-search-private.c (camel_search_build_match_regex): Added - extra flags, so the same function can be used for - start/end/whole/partial matches. - (camel_search_header_match): Convenience function to check a - single header against all sorts of different matches. - - * providers/imap/camel-imap-search.c (imap_body_contains): Fix for - e_sexp api changes. - - * camel-folder-search.c: Fix for e_sexp api changes. - (search_header_contains): Free args/quit on unknown header. - (search_header_matches): " - (search_header_starts_with): " - (search_header_ends_with): " - (match_message): Add an exception argument. - (search_body_contains): Free args/quit on fatal error. - (message_body_contains): Removed (moved to - camel-search-private.c), fixed callers. - - * camel-filter-search.c: Fix for e_sexp api changes. - (build_match_regex, message_body_contains): Moved into - camel-filter-private.c Fixed callers. - (check_header): moved guts to camel-search-private, and - changed to use regex's for everything. Just calls that with the - right args. - (check_header): GEts the header, decodes it, and checks for - failure, and whatnot. - (check_match): Removed. - (header_soundex): Changed significantly. Now it soundexes each - word in the header separately, and compares it to the first - argument. - - * tests/folder/test9.c (main): Fix for api changes. - (main): Added tests to see that invalid match and action - rules are properly detected. - - * camel-filter-driver.c (camel_filter_driver_filter_mbox): Remove - the 'finished message' bit. - (camel_filter_driver_filter_message): Remove an accidentally - checked in debug. - (camel_filter_driver_filter_message): Fix for e-sexp api changes. - -2001-01-23 Dan Winship - - * providers/imap/camel-imap-wrapper.c: Add a lock around the - delayed loading, so two threads won't try to do it at the same - time. - -2001-01-22 Dan Winship - - * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Set the - CamelFolder::name to just the base part of the vfolder name (the - non-query part) - -2001-01-23 Not Zed - - * camel-filter-search.c (camel_filter_search_match): Perform error - checking on parsing/execution. - - * camel-folder-search.c (camel_folder_search_execute_expression): - Perform error handling on search expression. - (CamelFolderSearchPrivate): Add a camelexception for error - returns. - (camel_folder_search_execute_expression): Setup exception pointer. - (search_match_all): Quit on error. - - * providers/imap/camel-imap-summary.c (message_info_load): Removed - some debug 'warnings', as they should now be displayed at the - toplevel loader, and just made the code match similar code - elsewhere. - - * providers/local/camel-mbox-summary.c (message_info_load): Error - handling. - (message_info_save): more error handling. - - * camel-folder-summary.c (message_info_load): Add error handling - and sanity checking. - (camel_folder_summary_load): Add error checks. - (perform_content_info_load): Error + sanity checks. - (content_info_load): error + sanity checks. - - * camel-filter-driver.c (close_folder): avoid /0 by updating after - we've done the sync. - (close_folders): Setup the first progress report to start it off. - (camel_filter_driver_filter_message): Fix a fixme, check errors in - e_sexp parsing, etc. - -2001-01-22 Christopher James Lahey - - * providers/imap/camel-imap-folder.c (camel_imap_folder_selected): - Initialize the value of the variable exists here. - -2001-01-22 Not Zed - - * .cvsignore */*/.cvsignore: Added profiling temp - files. - - * camel-folder-thread.c (camel_folder_thread_messages_new): When - removing phantom nodes, check for the end node too. - - * camel-filter-driver.[ch]: Changed status vars to be - CAMEL_FILTER_STATUS_ etc. - -2001-01-21 Jeffrey Stedfast - - * camel-mime-utils.c (header_param_list_format_append): Make the - output a little prettier. Okay, so I'm anal... - -2001-01-21 Not Zed - - * camel-filter-driver.h: Added an exception to - CamelFilterGetFolderFunc. - - * camel-filter-driver.c (camel_filter_driver_filter_message): - Remove source parameter, as it is determined elsewhere now. - (camel_filter_driver_filter_folder): Same here. - (camel_filter_driver_filter_mbox): And here. - (do_move): If we cannot open a folder, quit, rather than ignoring - it. - (do_copy): Here too. - (open_folder): Pass an exception into get_folder callback. - (camel_filter_driver_filter_folder): Report that we're syncing, - when we are. - (camel_filter_driver_filter_mbox): And here too. - (close_folder): And here. - -2001-01-19 Jeffrey Stedfast - - * camel-filter-driver.c (camel_filter_driver_filter_message): Set - the deleted bit *before* copying to the default folder, this way - if they are importing mail and have a rule to delete it, it - doesn't get copied to the default folder un-deleted. - -2001-01-19 Dan Winship - - * providers/imap/camel-imap-store.c - (get_subscribed_folders_by_hand): If LISTing a subscribed folder - doesn't return a LIST response, just ignore that folder. Yay - RFC2060. - (subscribe_folder): add a missing UNLOCK - -2001-01-19 Kjartan Maraas - - * providers/smtp/camel-smtp-provider.c: Mark strings for translation. - -2001-01-19 Not Zed - - * camel-filter-driver.c (report_status): Add a percentage complete - indicator to the status thing. - (camel_filter_driver_filter_mbox): Add percentage complete to - reporting. - (camel_filter_driver_filter_folder): Same. - -2001-01-18 Dan Winship - - * camel-store.c (camel_folder_info_build): More tweaking... skip - separator characters after the namespace character. (Gets rid of - the shell folder registration warning some people have had with - IMAP) - - * providers/imap/camel-imap-store.c (imap_connect): I'm sure there - was some clever reason I was storing the flags of the folder in - the hash table rather than just "1", but I don't remember what it - was now. Anyway, since we only ever test NULL/non-NULL, store 1, - since flags is sometimes 0. - - * providers/imap/camel-imap-folder.c (imap_update_summary): Oops. - Somewhere in one of the reorgs, the code to add new messages to - the CamelFolderChangeInfo structure got removed. Fix that. - -2001-01-17 Jeffrey Stedfast - - * providers/imap/camel-imap-summary.c (message_info_load): Add - some g_warnings() to help debug later if I ever get the segfaults - I was getting earlier. Can't seem to reproduce them after my - previous "fix". - - * camel-folder-summary.c (camel_folder_summary_load): Undid my - change here, NotZed said it was wrong and that if it gets a NULL - mi then it should abort and not continue. - -2001-01-17 Jeffrey Stedfast - - * camel-folder-summary.c (camel_folder_summary_load): Make sure - that the message-info is non-null before we go accessing inner - parts of it and/or adding it to the summary array. I may not have - handled the error correctly, but it does seem to work - correctly. If NotZed could double-check this it'd be great. - - * providers/smtp/camel-smtp-transport.c (get_smtp_error_string): - New smtp error-code to string mapping function. - (smtp_connect): Use the new error->string function for reporting - useful errors. - (smtp_helo): Same. Also use a case-insensitive strstr for 8BITMIEM - as it seems Exchange sends back lowercase for that one single SMTP - extension. Everything else is uppercase. I'm seeing a lack of love - for that extension by Microsoft dudes... - (smtp_mail): Use get_smtp_error_string. - (smtp_rcpt): Same. - (smtp_data): Same. - (smtp_quit): Same. - (smtp_rset): Same. - -2001-01-16 Jeffrey Stedfast - - * camel-folder-summary.c (camel_folder_summary_array): Add an int - i so this code will compile. Should I be worried about how well - this code will work? ;-) - -2001-01-17 Not Zed - - * camel-folder.c (free_summary): Call - camel_folder_summary_array_free() to do the work. - (get_summary): Use camel_folder_summary_array() to get the array - atomically. These fixes allow folder/test8 to work again, and fix - a sort of race where the summary size can change while we were - making a copy of it. - - * camel-folder-summary.c (camel_folder_summary_array): Get the - summary array atomically, so it can't contain empty records. - (camel_folder_summary_array_free): And free it. - - * tests/lib/camel-test.c (die): If we are verbose & in threads, - then goto sleep so we can debug. - - * tests/folder/test8.c (worker): Add a missing pull() for - comnparing content. - - * camel-filter-search.c: Fix the symbol table, so match-all is an - immediate function, as it should be. - - * tests/folder/test9.c (main): New test, tests some filtering - things. - - * tests/message/test3.c (main): Dont use a boundary string with - spaces in it. Folding can corrupt it. Maybe the folding isn't - working entirely right, but anyway. - - * camel-session.c: Debug out the debug. - - * camel-filter-driver.c (camel_filter_driver_filter_folder): Plug - a messageinfo leak. - -2001-01-16 Dan Winship - - Delayed loading of IMAP message parts. - - * camel-types.h: typedef CamelMessageInfo and - CamelMessageContentInfo here - - * camel-folder-summary.h: Add a "size" field to - CamelMessageContentInfo. - - * camel-folder-summary.c (camel_folder_summary_content_info_new, - camel_folder_summary_content_info_free): Renamed and made - non-static for providers that construct their own content info. - (content_info_load, content_info_save): load/save size - - * camel-data-wrapper.c (camel_data_wrapper_is_offline): New - function to return if a data wrapper's contents are "offline". (So - that, for example, we don't make thumbnails of images that haven't - been loaded off the IMAP server yet.) Defaults to FALSE. - - * providers/imap/camel-imap-folder.c (camel_imap_folder_selected): - Fix a bug in re-selecting a folder when messages have been - expunged from it by another client in the meantime. - (imap_get_message): Rewrite. If the message is larger than a - certain size, just create a skeleton message containing - CamelImapWrappers that will read parts as needed. This way, large - attachments only need to be downloaded if the user looks at them, - and multipart/alternative alternatives that aren't used will never - be downloaded at all. - (imap_update_summary): Rewrite this a bunch too to make the - parsing more robust. - - * providers/imap/camel-imap-summary.c - (CAMEL_IMAP_SUMMARY_VERSION): bump. - (camel_imap_summary_new): Set build_content to TRUE. - (content_info_load, content_info_save): Only save/load the content - for messages that have it. (The content info gets created as a - side effect of imap_get_message.) - - * providers/imap/camel-imap-utils.c (imap_parse_body): New routine - (and helpers) to parse an IMAP 'body' FETCH response and fill in a - CamelMessageContentInfo from it. - - * providers/imap/Makefile.am (libcamelimap_la_SOURCES, - libcamelimap_la_HEADERS): add camel-imap-wrapper. - -2001-01-16 Dan Winship - - * camel-tcp-stream-raw.c (stream_getsockopt, stream_setsockopt): - * camel-stream-fs.c (stream_read, stream_write): - * camel-remote-store.c (socket_connect): fcntl(fd, F_GETFL) - returns the flags as the return value, not via a passed in - pointer. And F_SETFL looks for an int, not a long, and you have to - pass it what it's expecting because it's a va_arg parameter. (Yes, - the man page lies on Linux. But check the UNIX98 spec or the glibc - source.) Also, fix another bug in socket_connect: if we manage to - connect right away, unset O_NONBLOCK so it doesn't mess us up - later. - - Fixes a bunch of problems with non-blocking I/O being done in the - allegedly-blocking case and then returning EWOULDBLOCK. - -2001-01-16 Chris Toshok - - * providers/Makefile.am (NNTP_DIR): set to nntp if ENABLE_NNTP - (SUBDIRS): use $(NNTP_DIR) - -2001-01-16 Jeffrey Stedfast - - * providers/smtp/camel-smtp-transport.c (smtp_rcpt): Don't check - errno as it's not being set. Fixes bug #1150. - -2001-01-16 Jeffrey Stedfast - - Ugh, this design is ugly like my butt. - - * camel-session.c (camel_session_query_cert_authenticator): New - function which will be useful when we integrate SSL. - - * camel-tcp-stream-ssl.c (ssl_auth_cert): Callback to authenticate - a certificate. - (ssl_bad_cert): Callback that gets the reason the certificate is - bad and then calls camel's cert-authenticator callback to notify - the user and to allow the user to override the check. - (stream_connect): Set the URL we expect to connect with and setup - the auth_cert and bad_cert callbacks. - (camel_tcp_stream_ssl_new): Now takes a CamelSession and a - expected_host argument that it will use for certificate - authentication. - (camel_tcp_stream_ssl_finalize): Unref the session and free the - expected_host. - -2001-01-16 Not Zed - - * camel-filter-search.c (header_exists): Changed to support - multiple args (or'd together). - (header_contains): Cleaned up to match the search code. Why did - fejj change it? I'll never know. - (header_matches): - (header_starts_with): - (header_ends_with): Big cleanup of fejj's "i'm the cut & paste - king" code. Also properly handle or'ing of additional args to - match what the folder-search code should do. - (check_match): New function which does the annoying matching - stuff (for header matches). - (check_header): Similarly, handles or'ing of the matches together. - (header_contains): - (header_matches): - (header_starts_with): - (header_ends_with): Call check_header to do the actual work. - (header_soundex): And here too. - (match_all): Yeah like match-all isn't passed expression results, - its passed expression terms. Fix this so match-all works like it - should, by executing the contained expression. - (message_body_contains): Copied directly from - camel-folder-search.c, a more robust/faster/simpler body search - code. - (mime_part_matches): Removed entirely. - (handle_multipart): Removed entirely. - (build_match_regex): Copied from camel-folder-search. Builds a - set of simple strings into a regex pattern that matches any of - them (for faster & simpler matching). Expanded to accept regex - patterns itself, so it can merge them together. - (body_contains): Use build match/match message to match using a - built regex. - (body_regex): Likewise, this time we tell it we're building a - regex though. - (header_full_regex): Use build_match_regex to take the drudgery - out of it, and expand it to handle multiple regex's at once. - (get_full_header): slightly cleaner (well i dunno, the sprintf - stuff just got to me). - (header_regex): Cleaned up to use build_match_Regex too, and to - properly check types. - (filter_message_search): Just allocate 'fms' on the stack. - - * camel-filter-driver.c (camel_filter_driver_finalise): - (camel_filter_driver_init): - (camel_filter_driver_class_init): - (camel_filter_driver_get_type): Changed from gtk object to camel - object. - (camel_filter_driver_add_rule): New function to add a rule to be - processed in sexp form. - (camel_filter_driver_init): Init the rules list. - (camel_filter_driver_finalise): Clear the rules/rules list. - (camel_filter_driver_filter_message): Scan rules list directly - rather than creating on the fly. - - * Makefile.am (libcamelinclude_HEADERS): Added camel-filter-driver.h - (libcamel_la_SOURCES): Added camel-filter-driver.c, code taken - from filter-driver, which can drive, uh, filters based on sexp's. - (libcamelinclude_HEADERS): - (libcamel_la_SOURCES): Added camel-filter-search.[ch] - - * camel-folder-summary.c (camel_folder_summary_decode_string): - Chganged len back to be unsigned. And do a simple range check on - the string value to try and detect corrupted summary files. - - * providers/imap/camel-imap-command.c (imap_read_untagged): Handle - cancelled stream reads with an appropriate exception. - - * providers/imap/camel-imap-private.h: Fix the include-once - macro. Doh, confliced with camel-private.h. - - * providers/imap/camel-imap-store.c (imap_store_refresh_folders): - A copy of camel_remote_store_refresh_folders. We avoid locking - each folder when we call it though. This should be removed when i - can work out how to remove the folder lock from this function - easily. - - * camel-stream-fs.c (stream_write): Fix n' argument of select. - (stream_read): Likewise. - - * camel-remote-store.c (socket_connect): Bump the connect timeout - upto 4 minutes. - (socket_connect): Oops, fix the 'n' argument of select. - - * camel-session.c (camel_cancel_cancel): If we are given no - cancellation node, then do it for all active ones. - -2001-01-15 Jeffrey Stedfast - - * camel-stream-fs.c (stream_close): If the close() is successful, - set the fd to -1. - - * camel-tcp-stream-raw.c: Removed the disconnect() method. - (stream_close): If the close() is successful, set the sockfd to - -1. - - * camel-tcp-stream-ssl.c: Removed the disconnect() method. - (stream_close): If the close() is successful, set the sockfd to - NULL. - - * camel-tcp-stream.c (camel_tcp_stream_disconnect): Removed, - easier to just use the close() method as it did the same thing - anyway. - -2001-01-15 Jeffrey Stedfast - - * camel-tcp-stream-raw.c (stream_getsockopt): Updated to be able - to get the CAMEL_SOCKOPT_NONBLOCKING socket opt. - (stream_setsockopt): Updated to be able to set the - CAMEL_SOCKOPT_NONBLOCKING socket opt. - -2001-01-15 Peter Williams - - * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Lock - around the imap_rescan, which needs it. - -2001-01-15 Not Zed - - * camel-remote-store.c (socket_connect): A cancellable connection - routine. - (remote_send_string): Return cancelled exception if we were. - (remote_send_stream): " - (remote_recv_line): " - - * camel-stream-fs.c (stream_read): First cut at cancellation - stuff. Its looking a bit ugly. - -2001-01-15 Jeffrey Stedfast - - * camel-tcp-stream-ssl.c (stream_connect): Uses an SSL socket now - although there's still a few things missing (like certificate - handling and such). - - * camel.c (camel_ssl_init): A replacement function for - camel_init() that also initializes SSL. - -2001-01-14 Jeffrey Stedfast - - * camel-tcp-stream-ssl.c (stream_getsockopt): Implemented. - (stream_setsockopt): Implemented. - - * camel-tcp-stream-raw.c (stream_getsockopt): Implemented. - (stream_setsockopt): Implemented. - - * camel-tcp-stream.c (camel_tcp_stream_getsockopt): New method. - (camel_tcp_stream_setsockopt): Another new method. I think you get - the idea of what these are for so I won't explain them. - -2001-01-14 Jeffrey Stedfast - - * camel-tcp-stream-ssl.[c,h]: New CamelTcpStream class that - implements nspr sockets and eventually will use nss for - SSL/TLS. Currently doesn't do any SSL/TLS but it should still - work. It's functionally equivalent to CamelTcpStreamRaw at the - moment only it uses nspr i/o. - - * camel-tcp-stream-raw.[c,h]: New CamelTcpStream class that - implements native sockets. Should be usable but may have some bugs - yet. - -2001-01-13 Jeffrey Stedfast - - * camel-tcp-stream.[c,h]: New abstract class for TCP streams. The - next step is to write child classes (CamelTcpStreamBSD and - CamelTcpStreamSSL). The BSD stream will use normal BSD sockets - while SSL will use Mozilla's NSPR and NSS libraries to do Secure - Socket Layers which wille ventually replace CamelStreamSSL which I - just commit'd. Oh well. - -2001-01-13 Jeffrey Stedfast - - * camel-stream-ssl.[c,h]: New stream for handling SSL/TLS - connections. - -2001-01-12 Not Zed - - * camel-folder-thread.c (camel_folder_thread_messages_new): - Perform a final pass, removing any pseudo nodes we added earlier. - Quick patch to test the idea. - (camel_folder_thread_messages_new): Added casts to rmeove some - warnings for the analites out there. - -2001-01-11 Dan Winship - - * providers/imap/camel-imap-folder.c (camel_imap_folder_selected): - Fix a bug in previous commit: don't check for deleted messages if - there are no known messages in the folder (because it would end up - sending "FETCH 0 ..."). - (imap_copy_message_to): Fix this up: sync flags to the server - before copying so that they end up correct in the remote folder. - And poke the destination folder after doing the copy so it notices - the new message right away. - (imap_move_message_to): Call imap_copy_message_to for most of the - work rather than duplicating the code (since it's much more - complicated now). - -2001-01-11 Dan Winship - - * providers/imap/camel-imap-folder.c (camel_imap_folder_selected): - New function to check for added/deleted messages when re-selecting - a folder. - (imap_refresh_info, imap_rescan, imap_update_summary): Various - locking tweaks that turn out to be irrelevant since command_lock - is recursive, but whatever. - - * providers/imap/camel-imap-command.c (camel_imap_command): When - selecting a new folder, call camel_imap_folder_selected on it. - - * camel-folder.c (camel_folder_copy_message_to): Fix a locking - problem. (One branch of an if statement was returning with the - lock still locked.) Also remove the deprecation comments, to match - move_message_to. - -2001-01-10 Jeffrey Stedfast - - * providers/local/camel-local-provider.c: Changed the descriptions - for mh, mbox, and maildir to be more "user-friendly". - -2001-01-10 Dan Winship - - * providers/imap/camel-imap-types.h: New header to prevent - recursive #include problems - - * providers/imap/*.h: Replace some #includes with #include - "camel-imap-types.h", remove typedefs that were moved to - camel-imap-types.h - - * providers/imap/*.c: Add #includes to make up for #includes - removed from .h files - - * providers/imap/Makefile.am (libcamelimapinclude_HEADERS): Add - camel-imap-types.h - -2001-01-10 Dan Winship - - * camel-store.c (camel_store_sync): New class function, parallel - to camel_folder_sync. (The default implementation just calls - camel_folder_sync on each cached folder.) - - * providers/imap/camel-imap-store.c (get_folder_info): Call - camel_store_sync before doing anything else so that the IMAP - server and Camel are working from the same data. Don't ask the - server for the unread message count of the current folder, since - UW will return often-incorrect cached data, and we can calculate - it without talking to the server anyway. - -2001-01-09 Dan Winship - - Mostly IMAP changes. Use the NAMESPACE extension (where - available). Deal with servers that don't return LIST flags in - response to LSUB (like UW) to get rid of the "not a selectable - folder" error messages in the UI. Take advantage of the \Marked - and \Unmarked flags to try to speed up the folder scan by not - doing STATUS on unmarked folders. Some further tweaks on the shape - of the resulting folder tree in various situations... - - * camel-store.h: Remove the (read) message_count, since nothing - uses it, and we can speed up IMAP a bit this way. - - * camel-store.c (camel_folder_info_build): Redo this a bit to make - it more useful for IMAP since that's the only thing that uses it. - - * camel-remote-store.c (camel_remote_store_connected): Public - function to check if the store is connected, and try to connect it - if it's not. - (remote_send_string, remote_send_stream, remote_recv_line): Use - that. - - * providers/imap/camel-imap-store.c (camel_imap_store_finalize): - fix up for changes. - (camel_imap_store_init): Initialize subscribed_folders to NULL - rather than an empty hash table. - (imap_connect): Get the list of subscribed folders here. If the - server doesn't claim that any of them are either Marked or - Unmarked, then assume that it doesn't do that for LSUB and - remember that for later. If the server supports the NAMESPACE - extension and the user didn't specify a namespace, use the - server-provided one. - (imap_disconnect): Free the list of subscribed folders, and the - namespace. - (get_folder): check camel_remote_store_connected - (get_folder_info): check camel_remote_store_connected. Add a bunch - of new cleverness. If we learned that the server doesn't do LSUB - usefully, do a bunch of LISTs by hand. Then, if we're getting - unread counts, only do it for folders that weren't listed as - Unmarked. Also, deal with namespaces that end with the separator - character, and update for changes to camel_folder_info_build. - (folder_subscribed): Add a g_return_val_if_fail. - (subscribe_folder, unsubscribe_folder): check - camel_remote_store_connected. - - * providers/nntp/camel-nntp-store.c (build_folder_info, - build_folder_info_from_grouplist, nntp_store_get_folder_info): - Don't fill in message_count since it doesn't exist any more. - -2001-01-09 Dan Winship - - Kill off a long-hated Camel kludge: "empty" URLs and - query_auth_types_generic. - - * camel-url.c: Remove "empty" from CamelURL. - (camel_url_new): No longer set it. - (camel_url_to_string): Treat "" as equivalent to NULL for - authmech. (Unrelated change, but it simplifies some stuff with the - new config dialog.) - - * camel-service.c (camel_service_new): Remove url->empty check: if - the URL isn't valid, we don't create the service. - (camel_service_query_auth_types): No longer need to switch between - generic and connected variants. - - * providers/smtp/camel-smtp-transport.c (query_auth_types): - * providers/pop3/camel-pop3-store.c (query_auth_types): - * providers/nntp/camel-nntp-store.c (nntp_store_query_auth_types): - * providers/imap/camel-imap-store.c (query_auth_types): - * camel-remote-store.c (remote_query_auth_types): Remove generic - version, rename connected version. - -2001-01-06 Not Zed - - * providers/vee/camel-vee-folder.c (vee_folder_build_folder): Dont - try and unref a messageinfo that wasn't there, and use the right - free function too. Modified patch from Iain. - (vee_move_message_to): New method, call the real folders' - move_message_to method. - -2001-01-04 JP Rosevear - - * tests/lib/Makefile.am: fix includes for compilation - - * tests/message/Makefile.am: Build test3 again - - * tests/message/test2.c: Kill warnings with header includes - - * tests/message/test3.c: ditto - - * tests/lib/streams.c: ditto - - * tests/lib/camel-test.c: ditto - - * tests/lib/messages.c: ditto - - * tests/lib/folders.c: ditto - -2001-01-04 Dan Winship - - * providers/imap/camel-imap-folder.c (imap_rescan): Fix two - problems in figuring out server-expunged messages. - -2001-01-04 Not Zed - - * camel-folder.c (thaw): If we have a lot of messages changed, - promote it to a folder changed event. - -2000-01-03 Jeffrey Stedfast - - * camel-folder-search.c (search_header_matches): Implemented. - (search_header_exists): Implemented. - (search_header_starts_with): Implemented. - (search_header_ends_with): Implemented. - -2001-01-03 Christopher James Lahey - - * providers/imap/camel-imap-folder.c (camel_imap_folder_new): - Initialize the exists variable so that we don't do random things - if the imap server misbehaves. - -2000-12-29 Not Zed - - * camel-folder.c (camel_folder_move_message_to): REmove warning, - this isn't really deprecated, sigh. - - * camel-mime-utils.c (header_fold): Comment out some debug. - -2001-01-02 Christopher James Lahey - - * providers/maildir/, providers/mbox/, providers/mh/: Removed - these directories since they're unused. - -2001-01-02 Dan Winship - - IMAP randomness. - - * providers/imap/camel-imap-stream.[ch]: Remove. To be replaced. - - * providers/imap/Makefile.am (libcamelimapinclude_HEADERS): Remove - camel-imap-stream.h - - * providers/imap/camel-imap-utils.c (imap_parse_flag_list): Take a - char ** instead of char *, to return the position at the end of - parsing like the string parsing functions. - (imap_parse_string_generic): New function to parse a string, - nstring, or astring. - (imap_parse_nstring, imap_parse_astring): Now macros - (imap_parse_string): Added - - * providers/imap/camel-imap-folder.h: Remove the "exists" field - from CamelImapFolder. - - * providers/imap/camel-imap-folder.c: Remove unused include of - camel-imap-stream.h. - (camel_imap_folder_init): Remove no-longer-relevant summary - initialization. - (camel_imap_folder_new): Update for imap_parse_flag_list change, - exists removal, and imap_rescan. - (imap_rescan): New function that does most of the work of the old - imap_refresh_info, but taking "exists" as an argument instead of - getting it from the folder. Also calls camel_imap_folder_changed - to do the summary updating and signalling, rather than duplicating - that code. - (imap_refresh_info): Just call imap_rescan (using the size of the - folder summary as "exists"). - (imap_update_summary): Update for imap_parse_flag_list change - (camel_imap_folder_changed): Update for "exists" change. - -2001-01-02 Dan Winship - - * camel-mime-utils.c (header_content_type_simple): New function to - return just foo/bar with no parameters. - - * camel-data-wrapper.c (get_mime_type): Use - header_content_type_simple rather than header_content_type_format. - -2000-12-28 Dan Winship - - * gmime-content-field.[ch]: Remove this. It was only a thin - wrapper around struct _header_content_type anyway, and didn't - match the naming scheme of anything else. - - * Makefile.am: Remove gmime-content-field.[ch] - - * camel.h: Remove gmime-content-field.h - - * camel-types.h: Add CamelContentType as a typedef for struct - _header_content_type (especially for use outside of camel). - - * camel-multipart.c: - * camel-mime-part.c: - * camel-mime-message.c: - * camel-folder-summary.c: - * camel-folder-search.c: - * camel-data-wrapper.[ch]: Use CamelContentType and - header_content_type_* functions rather than the GMime stuff. - - * camel-mime-part-utils.c: - * camel-medium.c: Remove unused gmime-content-field.h include. - -2000-12-27 Dan Winship - - * providers/pop3/camel-pop3-store.c (connect_to_server): Fix the - APOP check to not crash on servers that don't return any - information on the +OK greeting line. - -2000-12-24 Not Zed - - * providers/imap/camel-imap-search.c (imap_body_contains): Lock - the command channel while searching. - (imap_body_contains): If performing a whole uid search, then add - references to our own summary items, dont look it up in the - folder. This way they can't vanish unexpectedly. - - * providers/imap/camel-imap-folder.h (CamelImapFolder): Added a - private field. - (CamelImapFolder): Removed summary again from here. - - * providers/imap/camel-imap-private.h: Added lock for imap - searches. - - * Merge from camel-mt-branch. - - * providers/imap/camel-imap-folder.c (imap_update_summary): Merge - fix, use the folder->summary. - (imap_get_message_flags, imap_set_message_flags, - imap_get_message_user_flag, imap_set_message_user_flag): Removed - again. - (camel_imap_folder_init): Setup private data/lock. - (imap_finalize): Free private data/search lock. - (imap_search_free): Lock the search_lock. - (imap_search_by_expression): Lock the search lock when using the - search object. Also copy/ref hte summary, rather than getting it - directly. - (imap_refresh_info): Free any info lookups. Use folder->summary - not imap_folder->summary. And lock around commands. - (camel_imap_folder_changed): Use folder->summary again. - (camel_imap_folder_changed): Make sure we unref the summary lookup. - -2000-12-22 Dan Winship - - * providers/imap/camel-imap-store.c (get_folder_info): When - getting the top-level folder list, include INBOX even if it's not - subscribed. Don't show subscribed folders outside of the given - namespace. Do a better job of pruning the namespace from the - returned folder tree. - -2000-12-21 Dan Winship - - * providers/imap/camel-imap-search.c: New CamelFolderSearch - subclass that just reimplements body_contains (using the IMAP - SEARCH command). All other kinds of searching are done against the - local summary. - - * providers/imap/camel-imap-folder.c (imap_search_by_expression): - Use a CamelImapSearch to do searching. - - * providers/imap/camel-imap-utils.c (imap_translate_sexp, etc): No - longer needed. - - * camel-folder-search.h: Add missing CAMEL_FOLDER_SEARCH_TYPE - #define - -2000-12-21 Dan Winship - - * camel-stream-buffer.c (camel_stream_buffer_gets): Update the - doc comment: since it always NUL-terminates the buffer, it reads - at most @max-1 bytes, not @max. - - * camel-remote-store.c (remote_recv_line): Fix the "did - camel_stream_buffer_gets fill the whole buffer" check. Fixes a bug - when reading lines longer than 1024 characters (eg, IMAP SEARCH - responses in very large folders). - -2000-12-19 Dan Winship - - * providers/imap/camel-imap-folder.c (imap_refresh_info): Oops. - Don't do "FETCH 1:0" when the folder is empty. - (imap_protocol_get_summary_specifier): Request RFC822.SIZE too. - (imap_update_summary): Parse RFC822.SIZE and add it to the - summary. - -2000-12-18 Dan Winship - - * providers/imap/camel-imap-summary.c: Add "guint32 server_flags" - to CamelImapMessageInfo to keep track of the last known message - flag state on the server. - (message_info_save, message_info_load): Save/load the - server_flags. - - * providers/imap/camel-imap-folder.c: Make this use - CamelFolderChangeInfo and emit folder_changed notifications as it - gets them rather than only on refresh_info. - (imap_refresh_info): Notice flags that get cleared on the server - as well as flags that get set. - (imap_update_summary): Remove a comment that never actually - applied to the committed code. - -2000-12-15 Dan Winship - - * providers/imap/camel-imap-command.c (camel_imap_command): Change - the semantics of fmt: Now %S (capital S) means an IMAP "string", - (which can be sent as either a quoted string or a literal). If - the server supports LITERAL+, these will be sent as extended - literals (which don't require any special escaping). Otherwise - they'll be sent as quoted strings (and it now properly deals with - " or \ in the string). - (imap_command_strdup_vprintf): Utility routine that does the real - work for the functionality mentioned above. - - * providers/imap/camel-imap-utils.c (imap_quote_string): Turns a - string into a proper IMAP "quoted string". - - * providers/imap/camel-imap-store.c: - * providers/imap/camel-imap-folder.c: Use %S instead of "%s" where - appropriate. - -2000-12-22 Not Zed - - * camel-folder-summary.c (GLOBAL_INFO_UNLOCK): Doh, cut and paste - victim again, call unlock instead of lock! - (summary_assign_uid): Unlock around trying to get a new uid, if we - have a clash. - -2000-12-21 Not Zed - - * tests/folder/Makefile.am (TESTS): reenabled the tests here. - - * providers/nntp/camel-nntp-newsrc.c (CamelNNTPNewsrc): Add a - lock. Made completely mt-safe. Sigh, this is all so i can - support snooping of the set_flags stuff inside camel-nntp-folder, - since i've removed the global folder lock from all of the other - folder summary operations. - (camel_nntp_newsrc_read_for_server): Setup lock. - (camel_nntp_newsrc_get_highest_article_read): Lock internal access. - (camel_nntp_newsrc_get_num_articles_read): - (camel_nntp_newsrc_mark_article_read): - (camel_nntp_newsrc_mark_range_read): - (camel_nntp_newsrc_article_is_read): - (camel_nntp_newsrc_group_is_subscribed): - (camel_nntp_newsrc_unsubscribe_group): - (camel_nntp_newsrc_subscribe_group): - (camel_nntp_newsrc_get_subscribed_group_names): - (camel_nntp_newsrc_get_all_group_names): " - (camel_nntp_newsrc_write_to_file): Lock internal accesses. - (camel_nntp_newsrc_write): Lock around diry stuff. - - * providers/local/camel-maildir-summary.c (maildir_summary_check): - Lock around our internal poking of the summary hashtable/array. - (maildir_summary_sync): And the same here too. - - * camel-folder-summary.c: Moved the summaryprivate data into - camel-private.h. Only needed for the locks really. - (camel_folder_summary_init): Setup locks. - (camel_folder_summary_set_filename): Lock. - (camel_folder_summary_index): lock - (camel_folder_summary_uid): Lock - (camel_folder_summary_next_uid): " - (camel_folder_summary_set_uid): " - (camel_folder_summary_load): Lock around whole load. Hrm, - probably not required. - (camel_folder_summary_save): Lock around whole save, this is - reqwuired, unless we ref/copy the whole list first, and i couldn't - be bothreed. - (camel_folder_summary_add): lock - (summary_assign_uid): Lock around internal accesses. - (camel_folder_summary_info_new_from_parser): Lock around filtr stuff. - (camel_folder_summary_info_ref): Add locking. Could probably use - its own lock? - (camel_folder_summary_touch): Add locking, likewise. - (camel_folder_summary_clear): Lock. If the preiovus two are - changed, then so this will need mroe locking. - (camel_folder_summary_info_free): Lock around refcounting. - (camel_folder_summary_remove): Locking. - (camel_folder_summary_remove_uid): Lock ref, unlock, unref. Also - fixed a bug that would have made this never work, freeing the key, - which isn't allocated. - (camel_folder_summary_remove_index): lock, ref, unlock unref also. - (camel_message_info_ref): Lock using a separate global lock, since - we have no context here. - (camel_message_info_free): Here too. - (content_info_alloc): Use an alocation lock here. avoids races - with setting up content_info_chunks, etc. - (camel_folder_summary_info_new): And here too. - (camel_folder_summary_load): Changed to use a differnet lock for - loading/saving. - (camel_folder_summary_init): Doh, i do need a reflock afterall, - set one up. - (camel_folder_summary_finalize): Free it. - (camel_folder_summary_index): Add a reflock. - (camel_folder_summary_uid): And here too. - (camel_folder_summary_info_free): Use reflock instead of - summary_lock. - (camel_folder_summary_info_ref): Likewise. - (camel_folder_summary_remove_uid): Add reflocking. - (camel_folder_summary_remove_index): And here too. - - * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Setup a - summary object. - (vee_folder_build): Build each item into the real summary object. - (vee_folder_add, vee_folder_add_uid, vee_folder_add_change): New - functions to add a single record to the vfolder summary. - (vee_folder_build_folder): Use a real summary. - (vee_get_uids): Removed, use default impl. - (vee_free_message_info): " - (vee_get_message_info): " - (vee_get_summary): " - (vee_get_unread_message_count): " - (vee_get_message_count): " - (vee_sync): Make vee-folder-sync sync all subordinate folders. - Well i dont think this is right, but enough peopl ehave aksed for - it. - (vee_expunge): Same for expunge. - (vee_set_message_flags): Call parent class, then mirror flags to - subfolder. - (vee_get_message_user_flag): Removed, we just use the default - impl, and our flags should always match. - (vee_set_message_user_flag): Snoop the set and set on subfolder. - (vee_get_message_flags): Removed, jsut use parent impl, assume our - copy matches the real ones. - (get_real_message): Removed. We sort ofneed to keep the - summaryitem refed while we use it, so this doesn't make as much - sense as it did once. - (camel_vee_folder_finalise): Unhook listening events as we unref - folders. - (camel_vee_folder_new): Set the summary messageinfo data size - properly. - (vfolder_remove_match): Fixed for summary change. - (folder_changed): ditto. Also stopped changed items from being - re-searched and possibly removed. Might have to resort to the old - whole-search idea again. - (message_changed): Similarly. Might be easier just not to bother - with a whole search. - - * providers/vee/camel-vee-folder.h: Removes summary - hashtable/array, and use a real summary object. Sigh, more work. - - * providers/nntp/camel-nntp-folder.c (nntp_folder_sync): Move - summary to folder object. - (nntp_folder_get_message_count): Removed, use default impl. - (nntp_folder_set_message_flags): Call parent impl to do the work, - but snoop for newsrc. - (nntp_folder_get_uids): Removed, use default impl. - (nntp_folder_get_summary): " - (nntp_folder_get_message_info): " - (nntp_folder_free_message_info): " - (camel_nntp_folder_new): moved summary to folder class - - * providers/imap/camel-imap-folder.c (camel_imap_folder_init): - Move summary to folder object. - (camel_imap_folder_new): " - (imap_finalize): No longer unref the summary (or infact, do - anything else either). - (imap_refresh_info): move summary to folder object. - (imap_sync): " - (imap_get_message_count): Removed, use default impl. - (imap_get_unread_message_count): " - (imap_get_uids): " - (imap_get_summary): " - (imap_free_summary): " - (imap_get_message_info): " - (imap_free_message_info): " - (imap_get_message_flags): " - (imap_set_message_flags): " - (imap_get_message_user_flag): ", this changes functionality, but - only by providing non-permanent flags. - (imap_set_message_user_flag): " - (imap_update_summary): move summary to folder object, and use - camel_folder_summary_info_new_from_header, instead of calling the - virtual function directly. - - * providers/local/camel-maildir-folder.c (maildir_append_message): - move summary to folder object, again. - (maildir_get_message): " - - * providers/local/camel-mh-folder.c (mh_append_message): move - summary to folder object. - (mh_get_message): " - - * providers/local/camel-mbox-folder.c (mbox_append_message): Move - summary to folder object - (mbox_get_message): " - (mbox_set_message_user_flag): We need our own copy of this, sigh, - so we can track if the xev needs a rewrite (probably, its only a - guide anyway). - (mbox_set_message_user_tag): Same same with this one. - (camel_mbox_folder_class_init): Link in these new virtual functions. - - * providers/local/camel-local-folder.h (CamelLocalFolder): removed - summary. - - * providers/local/camel-local-folder.c (local_get_message_count): - (local_get_unread_message_count): - (local_get_uids): - (local_get_summary): - (local_free_summary): - (local_get_message_info): - (local_free_message_info): - (local_get_message_flags): - (local_set_message_flags): - (local_get_message_user_flag): - (local_set_message_user_flag): - (local_get_message_user_tag): - (local_set_message_user_tag): Removed, all now use default - implementation. - (camel_local_folder_class_init): Removed overrides. - (local_init): Clear folder->summary. - (local_finalize): move summary to folder. - (camel_local_folder_construct): " - (local_sync): " - - * camel-folder.c (free_summary): Provide a real impl. - (get_summary): " - (free_uids): " - (get_uids): " - (free_message_info): " - (get_message_info): " - (set_message_user_tag): " - (get_message_user_tag): " - (set_message_user_flag): " - (get_message_user_flag): " Sigh, the last so far. - (get_message_flags): Sigh, 1 more afterall. - (get_unread_message_count): And and this. - (get_message_count): and this! - (set_message_flags): Sigh, and this. - (camel_folder_finalize): Unref the summary if we have it. - (camel_folder_free_uids): Remove locking. - (camel_folder_get_message_flags): Remove locks, since the summary - is now mt-safe. - (camel_folder_set_message_flags): " - (camel_folder_get_message_user_flag): " - (camel_folder_set_message_user_flag): " - (camel_folder_get_message_user_tag): " - (camel_folder_set_message_user_tag): " - (camel_folder_get_message_info): " - (camel_folder_free_message_info): " - (camel_folder_get_uids): " - (camel_folder_free_summary): " - (camel_folder_get_unread_message_count): " - (get_unread_message_count): Check we got info, no big deal, but - the summary might change while we're counting, and upset the count - slightly. - (camel_folder_get_message_count): Remove locks. - - * camel-folder.h (struct _CamelFolder): Added CamelFolderSummary - to the base folder object. Sigh, this is going to be a lot of - work ... - - * camel-service.c (camel_service_init, finalise): changed - connect_lock to be recursive e_mutex. - - * camel-remote-store.c (camel_remote_store_init, finalise): Changed - stream_lock to recursive e_mutex. - - * camel-private.h (RemoteStorePrivate, ServicePrivate): Use - recursive mutexes for connect_lock & stream_lock. Ick. Because - of the imap code. - - * providers/imap/camel-imap-private.h: Change the command_lock to - be an EMutex. - - * providers/imap/camel-imap-store.c (connect_to_server): Removed - the command_lock stuff. If we are just connected again, it should - be safe to assume we have exclusive access at this point without - it (and yes, removes a deadlock). - (imap_create): Remove a lock that wasn't even supposed to be - there. - (camel_imap_store_finalize, init): g_mutex->e_mutex(E_MUTEX_REC). - Use a recursive mutex since the imap code is multiply recursivly - calling some functions (sigh, it would be nice to fix this). - -2000-12-20 Not Zed - - * camel-folder.c (folder_changed): Change the locks to inside the - if. Stops a deadloc,k and we dont need a lock to read a value. - (message_changed): Likewise. - - * camel.c (camel_init): Blah, comment out g_thread_init, leave it - to the caller, since it can only ever be done once. - - * camel-folder-thread.c (camel_folder_thread_messages_new): Ref - and save the folder in the thread return. Also get the summary - once, and access that for the messageinfo's. Added bonus that now - threads should come out in a similar order. We need to do this so - that the messageinfo's dont get unref'd under us, and using the - summary directly simplifies memory management. - (camel_folder_thread_messages_destroy): Free the summary/unref the - folder. - - * camel-folder-thread.h: Add a folder to CamelFolderThread struct. - -2000-12-19 Not Zed - - * providers/imap/camel-imap-utils.c (imap_translate_sexp): Unref - using e_sexp_unref, since it is no longer an object. - - * tests/lib/camel-test.c: Added a global lock, and made it - thread-aware. - - * camel-exception.c: Add a global lock. Not sure its really - needed here, but it doesn't really hurt. - (camel_exception_clear): Lock around access. - (camel_exception_set): Same. - (camel_exception_setv): " - (camel_exception_xfer): " - - * providers/local/Makefile.am (noinst_HEADERS): Added, for - camel-local-private.h - - * camel-folder.c (camel_folder_search_by_expression): Removed - locking here, now upto the implementing class to lock. - (camel_folder_search_free): Removed the folder lock here too, for - consistency really, and the locking probably wasn't needed. - - * providers/local/camel-local-folder.c (local_get_summary): - Changed to copy/ref the summary items. - (local_free_summary): Unref the summary items/free the array. - (local_get_unread_message_count): Free info lookups. - (local_search_by_expression): Perform more fine-grained locking, - and dont lock the whole folder while searching, just the search - object. Dum de dum, it *would* be possible to not even have to - lock the search, by using our own copy of the search object each - time. Could be investigated. - (local_init): Init priaate data/lock. - (local_finalize): Free private data/lock. - (local_search_free): Also lock around the search object, because - it accesses global data inside. - - * README.mt: Some info about the mt code development. - - * camel-folder-search.c (match_message): Put in a warning, this - plain deadlocks so far, but i'm going to bed now. - (camel_folder_search_finalize): Use e_sexp_unref() since its no - longer an object. - - * camel-session.c (camel_session_init): Init private data/lock. - (camel_session_finalise): Free private data/lock. - (camel_session_register_provider): Lock hash insert. - (service_cache_remove): Lock. - (camel_session_list_providers): " - (camel_session_get_service): Lock the whole function. - - * camel-session.h (struct _CamelSession): Added private data. - - * providers/imap/camel-imap-store.c (camel_imap_store_init): Setup - private data. - (camel_imap_store_finalize): Free private data. - (connect_to_server): Lock around command calls. I dont think its - needed, but it shouldn't hurt either. - (imap_connect): Lock around command calls. Again, I don think it - is needed, but wont hurt. - (imap_disconnect): ditto for this one. - (imap_create): Lock around command. - (get_folder): " - (get_folder_info): " - (subscribe_folder): " - (unsubscribe_folder): " - (imap_keepalive): " - - * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Lock - around calling a command. - (imap_refresh_info): Likewise. - (imap_sync): " - (imap_append_message): " - (imap_copy_message_to): " - (imap_move_message_to): " - (imap_get_message): " - (imap_update_summary): " - (imap_search_by_expression): ", also minor logic cleanup. - (imap_get_summary): Copy/ref the summary items. - (imap_free_summary): And free it now too. - - * providers/imap/camel-imap-auth.c (imap_try_kerberos_v4_auth): - Lock the command stream for the command session. - - * providers/imap/camel-imap-private.h: Private (locking info) - stuff for imap provider. - (CAMEL_IMAP_STORE_UNLOCK): Fix to call unlock, rather than lock! - - * camel-service.c (camel_service_query_auth_types): Lock also for - the connection here, incase the service needs to connect. - - * camel-remote-store.c (camel_remote_store_init): Init private - data/lock. - (camel_remote_store_finalise): Readded, free private data/lock. - (remote_send_stream): Changed to return the number of bytes - written, like a good little stream function should. - (camel_remote_store_send_string): Lock for stream access. - (camel_remote_store_send_stream): Same here. - (camel_remote_store_recv_line): And here. - (camel_remote_store_refresh_folders): Lock the store for cache - access. - (timeout_cb): Lock for stream access. - -2000-12-18 Not Zed - - * camel-service.c (camel_service_init): Init private data. - (camel_service_finalise): Free private data. - (camel_service_connect): Lock around connection access. - (camel_service_disconnect): " - - * camel-service.h (struct _CamelService): Added private field. - - * camel-store.c (camel_store_init): Init private data/lock. - (camel_store_finalize): Free private data/lock. - (camel_store_get_folder): Lock internal calls. - (camel_store_delete_folder): " - (camel_store_rename_folder): " - (camel_store_get_root_folder): " - (camel_store_get_default_folder): " - (camel_store_get_folder_info): " - (camel_store_folder_subscribed): " - (camel_store_subscribe_folder): " - (camel_store_unsubscribe_folder): " - (lookup_folder): Lock accesses to the folder cache. - (cache_folder): " - (uncache_folder): And here too. - - * camel-store.h (struct _CamelStore): Added a private field. - - * Makefile.am (noinst_HEADERS): Add camel-private.h. There is a - comment in that header as to why it ins't installed. - - * camel-private.h: New header for private data, that subclasses - can get to. - - * tests/lib/camel-test.c (camel_test_init): If we do have threads - enabled already, dont call g_thread_init(). - - * tests/lib/folders.c (test_folder_counts): Add free of info. - (test_folder_message): And here too. - - * providers/local/camel-maildir-summary.c (remove_summary): Free - info. - (maildir_summary_check): Free info lookups. - - * providers/local/camel-mh-summary.c (message_info_new): Removed, - didn't add value. - (remove_summary): free info after being used. - (mh_summary_check): Free info lookups. - (mh_summary_sync): and here too. - - * providers/local/camel-mbox-summary.c (summary_update): Free info - lookups. - (mbox_summary_sync_full): Likewise. - (mbox_summary_sync_quick): And here. - (mbox_summary_sync): ... and here. - - * providers/local/camel-maildir-folder.c (maildir_get_message): - Free messageinfo lookups. - - * providers/local/camel-mh-folder.c (mh_get_message): Free - messageinfo lookups. - - * providers/local/camel-mbox-folder.c (mbox_get_message): Free - messageinfo lookups. - - * providers/local/camel-local-summary.c - (message_info_new_from_message): Removed, since it wasn't doing - anything useful. - (message_info_new_from_parser): Same. And some other dead code. - - * providers/local/camel-local-folder.c (local_get_message_info): - deconstify. - (local_free_message_info):new func to free info. - (local_get_uids): - (local_get_message_flags): - (local_set_message_flags): - (local_get_message_user_flag): - (local_set_message_user_flag): - (local_get_message_user_tag): - (local_set_message_user_tag): Free all info lookups. - (local_expunge): Dont call camel_folder_* functions, to avoid a deadlock. - - * providers/nntp/camel-nntp-folder.c - (nntp_folder_get_message_info): deconstify. - (nntp_folder_free_message_info): Free summary item. - (nntp_folder_get_message_flags): Free summary lookup. - (nntp_folder_set_message_flags): and here. - (nntp_folder_get_uids): And here. - - * providers/imap/camel-imap-auth.c: Make base64_*_simple optional - with the HAVE_KRB4 flag. - - * providers/imap/camel-imap-folder.c (imap_free_message_info): - Added a free of the message info. - (imap_refresh_info): - (imap_sync): - (imap_refresh_info): - (imap_get_unread_message_count): - (imap_get_uids): - (imap_get_message_flags): - (imap_set_message_flags): Free any summary lookups. - (imap_get_message_flags): Get the message info directly from the - summary, not via the folder interface. - (imap_move_message_to): Dont call folder functions directly - (delete_message), as it will deadlock since we already have the - lock. - - * providers/vee/camel-vee-folder.c (vee_free_message_info): Free/unref - the messageinfo. - (vee_get_message_info): First ref the internal copy, then return it. - (folder_changed): Free all got message info's. - (message_changed): And here. - (get_real_message): And here. - (vee_folder_build): and here. - (vee_folder_build_folder): ... and here. - - * camel-folder-summary.c (camel_folder_summary_info_new): - Initialise the messageinfo refcount to 1. - (camel_folder_summary_info_free): Down the refcount till we need - to free. - (camel_folder_summary_info_ref): New function to up the refcount. - (camel_message_info_dup_to): Sewt the refcount of the dest to 1. - (camel_message_info_new): Set refcount to 1. - (camel_message_info_new_from_header): Dont allocate the mi - ourselves. - (camel_message_info_free): Handle refcounting. - (camel_message_info_ref): New function. - (camel_folder_summary_index): Ref the messageinfo before returning - it. - (camel_folder_summary_uid): Likewise. - (camel_folder_summary_save): Access the messageinfo array - directly, rather than through accessors (saves ref/unref). - (camel_folder_summary_clear): Likewise. - (camel_folder_summary_remove_index): Likewise. - (main): Free lookups. - - * camel-folder-summary.h (CamelMessageInfo): Added a refcount - value. - - * camel-folder.c (camel_folder_free_message_info): New function to - 'free' a message info. - (camel_folder_get_message_info): Deconstify return. - (camel_folder_lock): New (internal) function to thread-lock the - folder. - (camel_folder_unlock): Likewise for unlocking. - (freeze): - (thaw): Lock around access to folder->frozen/changed_frozen. - (folder_changed): Likewise. - (message_changed): Likewise. - (camel_folder_init): Init private data, locks and moved frozen - info. - (camel_folder_finalize): Free new private data, locks and moved - frozen info. - (copy_message_to): Free the messageinfo after we've used it. - (move_message_to): And here too. - (camel_folder_sync): Lock around virtual method invocation. Just - locking around any virtual method that is known to need it. This - is the first cut at locking. - (camel_folder_refresh_info): " - (camel_folder_expunge): " - (camel_folder_get_message_count): " - (camel_folder_get_unread_message_count): " - (camel_folder_append_message): " - (camel_folder_set_message_flags): " - (camel_folder_get_message_flags): " - (camel_folder_get_message_user_flag): " - (camel_folder_set_message_user_flag): " - (camel_folder_get_message_user_tag): " - (camel_folder_set_message_user_tag): " - (camel_folder_get_message): " - (camel_folder_get_uids): " - (camel_folder_free_uids): " - (camel_folder_get_summary): " - (camel_folder_search_by_expression): " - (camel_folder_free_summary): " - (camel_folder_search_free): " - (camel_folder_move_message_to): " - (camel_folder_copy_message_to): " - (copy_message_to): Dont call any of our own folder functions - directly, otherwise we will deadlock. - (move_message_to): Likewise. - - * camel-folder.h (CamelFolder): Added free_message_info() function - & deconstify get_message_info()'s return. - (CamelFolder): Add a private field (for locks). - (struct _CamelFolder): Moved changed_changed/frozen into private - data, since it really is private and now needs locked access. - -2000-12-15 Jeffrey Stedfast - - * camel-mime-utils.c (header_fold): When checking to see if we - need to fold the header, when we come accross a \n, make sure to - start at p + 1 the next time through the loop or else we get into - an infinite loop. - -2000-12-13 Dan Winship - - * Namespace cleanup: change a bunch of IS_CAMEL_* macros to - CAMEL_IS_* - -2000-12-13 Chris Toshok - - * providers/imap/camel-imap-auth.c: add #include for - freebsd. - -2000-12-12 Christopher James Lahey - - * camel-folder-summary.c, camel-folder-summary.h: Added #ifndef - NO_WARNINGS around a #warning. Added (void) to the prototype and - declaration of camel_message_info_new. - - * camel-mime-message.h: Added an include for - camel-mime-filter-bestenc.h. Added a prototype for - camel_mime_message_set_best_encoding. Reformatted prototypes to - line up. - - * camel-mime-parser.c: Added #if d(!)0 around the states string - lookup table since it's only used in debugging output. - - * camel-seekable-substream.c (stream_flush): Added a cast. - - * providers/imap/camel-imap-auth.c: Added #include . - - * providers/imap/camel-imap-folder.c (imap_refresh_info): Made uid - and flags const to fix warnings here. - - * providers/imap/camel-imap-store.c (get_folder_info): Made p - const to fix warnings here. - -2000-12-12 Dan Winship - - * tests/lib/Makefile.am: Add missing .h file. (From campd.) - -2000-12-11 Not Zed - - * providers/smtp/camel-smtp-transport.c (smtp_data): Remove use of - linewrap filter. Headers are now wrapped. encode_8bit already - enforces a 998 octet line limit. - (smtp_data): Also fixed a memleak, we always have to unref our own - copy of the filters. We also dont need to remove them manually, - so dont bother. The type's an int too ... - - * camel-internet-address.c (internet_unformat): When scanning past - quotes, remove them also. - (camel_internet_address_format_address): If the name contains "'s, - or ','s then strip and quotes and wrap the whole lot in one set of - quotes. - - * Makefile.am (noinst_HEADERS): We dont want to install - camel-charset-map-private.h, ever. There are probably other - similar files ..? - - * camel-mime-part.c (write_to_stream): Fold header lines - appropriately as we're writing them out. - - * camel-mime-utils.c (header_fold): Add a new argument, headerlen, - tells it how long the associated header token is. - (header_fold): Also,k check to see if we need to fold first, using - a better algorithm, and also accept already-folded lines, and - re-process accordingly. - (rfc2047_decode_word): Add a little buffer space to iconv output - for shifting overheads? - (rfc2047_decode_word): finish the iconv with a null call, to flush - shift state, etc. - (rfc2047_encode_word): Attempt to break up long words into - appropriately sized, independent, chunks. See rfc2047, section 2. - (header_decode_mailbox): Dont add in extra spaces into the output - if we are decoding adjacent encoded words. We can only guess this - case, as some broken mailers put encoded words inside quoted - words. - (header_encode_phrase): Dont merge words if they are going to end - up too long. Also change back ot only merge consecutive words of - the same type. e.g. 'foo. blah fum.' -> "foo." blah "fum." or - 'iam an. idiot' -> iam "an." idiot - - * camel-medium.c (camel_medium_set_header): Hrm, we actually want - to call set_header, not add_header here, probably explains some - duplicate X-Evolution headers i was trying to track down. Also - changed the api to handle a NULL value == remove the header. - - * providers/local/camel-maildir-summary.c - (maildir_summary_decode_x_evolution): Always return error, we dont - use x-evolution for maildir. - (maildir_summary_encode_x_evolution): Always return a NULL string, - likewise. - (maildir_summary_add): Hook in here, since the _new function - doesn't have access to any flags from the caller. If we have - flags, then update the filename again. Not ideal, but should - work. - -2000-12-08 JP Rosevear - - * tests/message/Makefile.am: Remove test3 from build until the files - show up - -2000-12-09 Not Zed - - * camel-mime-message.c (camel_mime_message_set_date): Change the - sign of the default date offset when none is supplied. - (camel_mime_message_set_date): Also do dst if its dst (forward 1 - hour). Fixes #928 + some. - -2000-12-06 Not Zed - - * tests/lib/camel-test.h (check): Change line no format so that - emacs can detect it. - -2000-12-06 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c (imap_refresh_info): We want - to bitwise-or the server and cached flags here so that we keep the - flags that we have set locally and set any additional flags that a - parallel connection may have set. - -2000-12-05 Jeffrey Stedfast - - * providers/smtp/camel-smtp-transport.c (smtp_data): If the data - wrapper fails to be written to the stream, unref it and the - filters before returning. - -2000-12-05 Dan Winship - - * providers/imap/camel-imap-folder.c (imap_get_message): use - BODY.PEEK[] rather than RFC822, so the message doesn't get marked - as \Seen. - (imap_refresh_info): Fix a really really really dumb bug. - -2000-12-05 Dan Winship - - * providers/imap/camel-imap-folder.c (imap_set_message_flags): Fix - the check for "flags aren't actually changing". - - * providers/local/camel-local-folder.c (local_set_message_flags, - local_set_message_user_flag, local_set_message_user_tag): Don't - emit message_changed unless the flags actually changed. - - * providers/nntp/camel-nntp-folder.c - (nntp_folder_set_message_flags): Don't emit message_changed unless - the flags actually changed. Fix the check for marked as seen. - -2000-12-05 Not Zed - - * camel-seekable-substream.c (stream_flush): stream_flush does - make sense for a substream afterall (if you have a stream_write). - (stream_write): Implement this. - (stream_seek): Change the STREAM_END behaviour to be more sane. - if bounded go from the end of the bound, if unbounded, go from the - end of the parent stream. - - * camel-stream-mem.c (stream_read): Dont return error if reading - past the end of data, just return 0. - - * camel-stream-fs.c (camel_stream_fs_init): Initialise the stream - to be unbound. - (stream_seek): Fix the logic when seeking from the end of an - unbounded stream. - (camel_stream_fs_new_with_fd): If the fd is invalid (-1), then - return NULL immediately. - (stream_seek): Range check a SEEK_END so it fits within - bound_start. - -2000-12-01 Not Zed - - * tests/lib/folders.c (test_folder_basic): New test to perform - basic store operations on folders (taken from folders/test1). - (test_folder_message_ops): Tkane the guts out of folders/test2. - -2000-12-04 Jeffrey Stedfast - - * providers/smtp/camel-smtp-transport.c (smtp_connect): i18n-ize - exception strings. - (get_name): And here. - (_send_to): Here too. - (smtp_helo): And here and there... - (smtp_mail): And around the square... - (smtp_rcpt): Saying catch me if you can... - (smtp_data): And here three. - (smtp_rset): And here. - (smtp_quit): And finally here. - -2000-12-01 Jeffrey Stedfast - - * camel-folder-search.h: Added system_flag to CamelFolderSearchClass - - * camel-folder-summary.c (camel_system_flag_get): Convenience - function to return whether or not a flag is set using a string as - the flag name. - (camel_system_flag): Return the integer value of the flag string. - - * camel-folder-search.c (search_system_flag): New ESExp callback - for allowing vfoldering on CamelMessageInfo flags. - -2000-12-01 Dan Winship - - * camel-service.c (camel_service_disconnect): Don't - g_return_if_fail if the service is already disconnected. Just - return. - - * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): - Return FALSE (don't try again) if we get CAMEL_POP3_FAIL. - (pop3_connect): If we don't succeed, disconnect. - -2000-11-30 Jeffrey Stedfast - - * providers/imap/camel-imap-store.c - (parse_list_response_as_folder_info): Fix a possible bug where - 'name' could be uninitialized. - - * camel-folder-summary.c (camel_message_info_new): New convenience - function, doesn't do much but it sure makes code cleaner to read. - (camel_message_info_new_from_header): This one makes my life heaven. - -2000-11-30 Jeffrey Stedfast - - * providers/imap/camel-imap-summary.c (camel_imap_summary_new): - Handle the case where the summary failed to load - clear the - summary and then set the dirty bit so that it is sure to save - later. Is this the right fix? - -2000-11-30 Dan Winship - - * camel-exception.c (camel_exception_setv): Remove unused - variable. - -2000-11-30 Not Zed - - * providers/local/camel-mbox-folder.c (mbox_get_message): Remove - assertion that content is there, when it no longer can be. - - * camel-folder-summary.h: Removed pos/bodypos/endpos from - camelmeessagecontentinfo. - (CamelMessageFlags): Added an attachments flag. - - * providers/local/camel-local-summary.h: Added load virtual - function. - - * tests/lib/folders.c (test_message_info): Accessors. - (test_folder_message): " - - * camel-folder-thread.c (get_root_subject): Fix accessors. - (dump_tree_rec): " - - * camel-folder-search.c (camel_folder_search_execute_expression): - Accessors for messageinfo. - (search_match_all): " - (search_header_contains): " - (search_header_contains): " - (search_body_contains): " - (camel_folder_search_execute_expression): Use mepool_strdup. - - * providers/local/camel-mbox-summary.c (summary_update): Accessors - for messageinfo. - (mbox_summary_sync_full): " - - * providers/local/camel-mh-summary.c (remove_summary): Accessors - for messageinfo. - (mh_summary_check): " - (mh_summary_sync_message): " - (mh_summary_sync): " - - * providers/local/camel-mh-folder.c (mh_append_message): Use - accessor for uid. - - * providers/local/camel-local-summary.c - (local_summary_decode_x_evolution): Use accessor to uid. - (local_summary_encode_x_evolution): Likewise. - (message_info_new): And here. - (camel_local_summary_load): Call virtual load function. - (local_summary_load): Default load function, load summary. - (camel_local_summary_load): Check file exists before trying to - load. - (camel_local_summary_construct): Turn off building content info! - (CAMEL_LOCAL_SUMMARY_VERSION): Bump, since we dont build content - info anymore. - (camel_local_summary_load): After a successful load/check, do a - save too so we dont have to go through it again randomly. - - * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): Use - accessors for messageinfo. - - * providers/nntp/camel-nntp-folder.c (nntp_folder_get_uids): Use - accessors for uid. - - * providers/imap/camel-imap-folder.c (imap_refresh_info): Use - accessor for uid. - (imap_sync): Likewise. - (imap_get_uids): Likewise. - (imap_update_summary): And here. - - * providers/vee/camel-vee-folder.c (vfolder_remove_match): Use - accessor for uid. - (vfolder_add_match): Handle estrv stuff. - (vfolder_change_match): Accessor for uid. - (get_real_message): " - (vee_get_uids): " - (vee_folder_build): " + estrv. - (vee_folder_build_folder): " - - * providers/local/camel-maildir-folder.c (maildir_append_message): - Use acccessors for uid's. - (maildir_get_message): Here too. - - * providers/local/camel-maildir-summary.c - (camel_maildir_summary_init): Setup the string count for us. - (message_info_new): Access the string array directly. - (message_info_free): No need to free string if using array. - (camel_maildir_summary_info_to_name): Use accessor to get to uid. - (remove_summary): And here. - (maildir_summary_check): Likewise. - (maildir_summary_sync): And here. - (maildir_summary_load): Load up a cache of uid->filename mappings - before loading the actual summary file. This saves us having to - waste the diskspace storing the filenames in the summary itself, - and also helps us sync the summary better on load. - (message_info_load): If we have the load_map setup, and the uid - exists, then set the filename cache from it, and update the flags - from the name, incase our summary mismatches it. - - * camel-folder-summary.c (camel_folder_summary_init): Setup string - count for compressed info record. An optional compile mode which - stores all strings for a given messageinfo into a packed array, - which should save 36-50 bytes/record. - (camel_folder_summary_info_new): Init the string array. - (message_info_new): Set the string array items, as required. - (message_info_load): And here too. - (message_info_save): Use accessors to get to strings. - (message_info_free): Free strings as one. - (camel_message_info_dup_to): Handle packed array case. - (camel_folder_summary_add): Use accessors. And pack the strv - before storing it. - (summary_assign_uid): New function to assign a unique uid to a - message, if it doesn't have one. - (camel_folder_summary_add): Call assign_uid instead of doing it - ourselves. - (camel_folder_summary_info_new_from_parser): " - (camel_folder_summary_info_new_from_message): " - (camel_folder_summary_encode_string): constify. - (camel_folder_summary_encode_token): " - (summary_build_content_info_message): Fix accessors to messageinfo. - (CAMEL_FOLDER_SUMMARY_VERSION): Bumped, for removal of - contentinfo->pos data. - (camel_folder_summary_info_new_from_parser): Calculate the size - based on the parser position, not the removed contentinfo stuff. - (camel_folder_summary_info_new_from_message): Remove size stuff. - (camel_folder_summary_offset_content): Removed, no longer means anything. - (content_info_new): - (content_info_load): - (content_info_save): - (summary_build_content_info): Remove stuff for contentinfo->pos*. - (summary_build_content_info): Take a msginfo argument, set - attachments flag if we find any attachments. - (summary_build_content_info_message): set attachments flag if we - find any attachments. - (camel_folder_summary_info_new_from_parser): Always scan the - content info, even if we dont save it. - (camel_folder_summary_info_new_from_message): And here too. - (summary_build_content_info): Only create the contentinfo stuff if - we have it turned on, otherwise just parse and discard. - (summary_build_content_info_message): Likewise. - -2000-11-29 Jeffrey Stedfast - - * camel-store.c (camel_store_get_folder): Updated the gtk-doc - comment. - -2000-11-29 Dan Winship - - * camel-mime-utils.c: - * camel-mime-filter-charset.c: Use iconv instead of unicode_iconv. - - * providers/imap/camel-imap-command.c (imap_read_untagged): Fix - some off-by-one-ness. - - * camel-stream-buffer.c (stream_read): Fix another bug found in - previously-unused code here. - -2000-11-29 Ettore Perazzoli - - * tests/lib/Makefile.am (INCLUDES): `$(top_srcdir)' for builddir - != srcdir compilation. - -2000-11-29 Not Zed - - * tests/message/test2.c (main): Add a missed unref. - - * camel-stream-mem.c (camel_stream_mem_set_buffer): We must set - ourselves as the owner of the byte-array. - Weird, someone has modified this file (its been reindented), but i - can't see any changelogs ... - - * tests/lib/messages.c (content_finalise): Fix memleak in tester, - free byte array when our content object is deleted. - - * camel-folder-search.c (camel_folder_search_finalize): Yeah - great, so the sexp is a gtk object, not a camel object. Isn't - that going to be fun to fix? - - * camel-session.c (camel_session_finalise): Free the storage path. - - * providers/local/camel-local-store.c (camel_local_store_init): If - store->folders is setup, free it first, then overwrite. Hmm, - this seems a bit crappy to me. - - * camel-store.c (camel_store_init): Dont setup store->folders if - its already setup. - - * camel-exception.c (camel_exception_setv): Removed a memleak. no - need to strdup after a strdup_printf!!! - - * camel-address.c (camel_address_finalize): Free the address - ptrarray, once finished. - - * providers/local/camel-local-folder.c (local_finalize): Make sure - we dont leave the folder locked on close. - (local_finalize): Free summary/search. - - * providers/local/camel-mh-summary.c (mh_summary_next_uid_string): - Small memleak, always free name after using it. - - * camel-mime-part.c (set_content_object): Free txt after setting - the header. - - * providers/local/camel-maildir-summary.c (maildir_summary_check): - Fix a memleak, close the dir after scanning new. - (message_info_free): Added so we can free the filename cached in - the messageinfo. - (camel_maildir_summary_finalise): Free the hostname. - - * tests/folder/test[12].c (main): Clear out camel-test before - starting. - - * providers/local/camel-mbox-summary.c (mbox_summary_sync_quick): - Because encode_x_evolution folds the line (sigh, because - encode_param does, unlike every other function in - camel-mime-utils), unfold the encoded result before comparing. - (mbox_summary_sync_quick): Another small memleak, free xevnew once - finished with it. - - * camel-mime-utils.c (header_decode_quoted_string): Removed a - redundant check for c=0. - (header_unfold): New function to un-fold headers. - - * providers/local/camel-local-summary.c - (local_summary_encode_x_evolution): some problems with encoding - tags, using the wrong output strings. - (local_summary_encode_x_evolution): We dont need to append a ; - either, param_list_format_append() will do it for us. - -2000-11-28 JP Rosevear - - * camel-lock.c: No longer hard code the enabled lock types - -2000-11-28 Dan Winship - - * camel-remote-store.c (remote_recv_line): Don't set exception to - g_strerror (errno) when nread == 0, because it won't have been - set. - - * providers/pop3/camel-pop3-folder.c (pop3_finalize): Don't try to - free things if they haven't been set yet. - -2000-11-28 Jeffrey Stedfast - - * providers/smtp/camel-smtp-transport.c (smtp_connect): Clear the - exception if EHLO fails before trying HELO in the cases where the - SMTP provider doesn't announce its ESMTPness. - -2000-11-28 Not Zed - - * providers/local/camel-maildir-summary.c - (camel_maildir_summary_init): Set the info size's properly, oops! - - * tests/lib/folders.[ch]: Folder testing helpers. - - * tests/folder/test2.c: Test basic message ops on folders. - - * tests/folder/test1.c (main): Test basic folder ops on (local) - stores. - - * providers/local/camel-local-provider.c - (camel_provider_module_init): Removed some debug. - - * providers/local/camel-maildir-folder.c - (camel_maildir_folder_class_init): fix parent class. - - * providers/local/camel-mh-folder.c (camel_mh_folder_class_init): - Fix parent class (damn cut & paste). - - * providers/local/camel-maildir-store.c (get_folder): Call parent - impl. - (camel_maildir_store_class_init): Fix parent class setup. - (delete_folder): Check the folder exists before trying to delete - it. - (delete_folder): Try and make the delete operation atomic/rollback - failures. e.g. if one directory isn't empty, then create the - other empty ones back. Also clear the tmp directory fully first. - - * providers/local/camel-mbox-store.c (get_folder): Call parent - impl. - (camel_mbox_store_class_init): parent class is camel_local_store, - not camel_folder, oops. - (delete_folder): Return an error if it doesn't exist, rather than - covering it up. - - * providers/local/camel-mh-store.c (get_folder): Call parent impl. - (camel_mh_store_class_init): fix parent class setup. - (delete_folder): Error if it doesn't exist now. - - * camel-folder.c (camel_folder_move_message_to): - (camel_folder_copy_message_to): Added warnings as these functions - are going to be removed later. - - * camel-store.c (camel_store_get_root_folder): Fix for an early - api change. We want CAMEL_STORE_FOLDER_CREATE, not TRUE, since - its a flag. - (camel_store_get_default_folder): And here too. - - * providers/local/camel-local-store.c (xrename): Handle renaming - folders differently to renaming files. - (get_default_folder_name): local stores dont have a default - folder, so make it so. Or at least, it doesn't seem to make sense - to have one. - (get_root_folder_name): Same for root. - (get_folder): Added parent implementation, that makes sure the - service path exists, if we are creating a new folder (but doesn't - create the folder). - -2000-11-27 Not Zed - - * providers/local/camel-local-store.c (xrename): Fixed races. Use - link/unlink, rather than rename, to properly detect overwriting - another file. And allow some files to be missing. - -2000-11-28 Radek Doulik - - * providers/local/camel-local-summary.c - (local_summary_decode_x_evolution): add scan = scan->next; to - avoid infinite loop - -2000-11-27 Dan Winship - - * providers/imap/camel-imap-command.c (imap_read_untagged): Make - this gratuitously more complicated. No wait, I mean, fix bugs. Now - fully handles NULs in the data stream (which "can't happen" but - do) and also handles responses containing multiple literals. Also - does less copying than the original code. - - * camel-stream-buffer.c (stream_read): Fix a bug that could make - it lose sync and/or overrun buffers. - -2000-11-27 JP Rosevear - - * providers/local/.cvsignore: shush - -2000-11-27 Not Zed - - * providers/Makefile.am: Removed mh, mbox, added local, to the default. - -2000-11-24 Not Zed - - * tests/data/getaddr.pl: little util to scan mailboxes for any and - every address they contain. - - * tests/message/test2.c (main): Added a bunch of stuff to test - decoding/reencoding/etc of internationalised addresses. - - * tests/message/lib/address-data.h: Copy of some unicode/other - testing data. **Beware** of editing this file in emacs, it'll - probably try and convert all the characters to something - unusable. - - * tests/lib/camel-test.c (camel_test_break): Add a debugger hook - point. - - * camel-mime-utils.c (quoted_encode): Check for space and convert - to _ separately. - (header_decode_mailbox): Fixed the 'check comments for realname' - code, problem was the domain getting code was skipping all - whitespace/comments before we could get a look-in. This is - approximate but fairly robust. - (header_decode_text): Dont use the c-type isspace func here, we - want a specific whitespace only. - (header_decode_text): If we have decoded words next to each other, - do not insert whitespaces between them, which is what rfc2047 requires. - (header_decode_text): Make c unsigned too. - - * tests/README: Added at least some explanation of all this stuff. - - * tests/lib/camel-test.h (check_msg): Added a non-gcc version of - the fail command, we dont get the expression that failed, but no - matter. Should be (more) portable now. - (check, check_msg): Put the file/lineno in the default message. - - * Makefile.am (SUBDIRS): Add tests. - - * camel-mime-filter-basic.c (filter): Well, I'll add the extra - bytes here too, lathough not strictly needed, might save a - re-malloc when we get to complete(). - - * camel-mime-filter-charset.c (filter): Make sure we have room if - we only convert very short data. - (complete): and here too. - - * tests/Makefile.am: Initial test harness & tests. Requires gcc - for this. - - * camel-internet-address.c (d): Turn off debug. - - * camel-charset-map.c (camel_charset_step): Oops, & masks for set - intersection, not | them. Dunno how this got even close to - working. - -2000-11-23 Not Zed - - * camel-mime-filter-basic.c (filter): For base64 encoding, the - output size for 0, 1, or 2 bytes of input can exceed input*2, so - make sure we account for that as well. - (complete): And here. - (complete): Similarly for qp encoding, if we have a trailing - space, we need some extra bytes (not needed for 'filter()', as any - such bytes are stored in state/save). - - * camel-mime-utils.c (quoted_decode_step): Removed fixme not required. - (quoted_encode_close): Dont append a trailing afterall. Otherwise - a pass through the encode/decode will grow the message each time. - -2000-11-22 Radek Doulik - - * camel-mime-utils.c (header_msgid_generate): check for return - values - -2000-11-21 Dan Winship - - * camel-lock.c: - * camel-movemail.c: add #ifdef HAVE_ALLOCA_H - -2000-11-21 Not Zed - - * providers/local/camel-mh-summary.c (mh_summary_sync_message): - Shite, -1 on error, >=0 on success. So i've just been truncating - all the messages I touched, good one zed. - (mh_summary_sync_message): Sigh, and write to the right damn fd as - well. - (mh_summary_sync_message): Argh, and we need to compare the length - of the old xev -1 to the new xev, to check if we can optimise it. - - * camel-folder.c (camel_folder_change_info_new): Init the pool. - (camel_folder_change_info_add_source): Allocate string in the - pool. - (camel_folder_change_info_add_source_list): - (camel_folder_change_info_add_update): No longer free the key, as - it cannot be yet. - (change_info_add_uid): Add a new arg, copy, telling it whether to - copy the uid argument or not, and copy using mempool_strdup. - (change_info_cat): Tell add_uid to copy the string. - (camel_folder_change_info_add_update): Call add_uid directly. - (change_info_remove): Call add_uid directly, with no copy, and - dont free the key. - (change_info_free_update): No longer required since we dont malloc - the keys. - (camel_folder_change_info_add_uid): Fix for add_uid change. - (camel_folder_change_info_remove_uid): - (camel_folder_change_info_change_uid): - (change_info_clear): No longer needed, just set the size to 0 on - the array directly. - (camel_folder_change_info_clear): Empty the arrays directly, and - flush the mempool too, and also clear uid_source, incase anyone - was silly enough to call us in the wrong order. - (camel_folder_change_info_free): Dont bother clearing the array's - contents, just free the pool and throw away all the indexes. - - * camel-folder.h: Added a mempool to CamelFolderChangeInfo to - store the uid's we get. - - * camel-folder-search.c (search_match_all): If we are only - matching a single info, just use that/do the search. - (camel_folder_search_match_expression): New function. Matches a - single message info against an expression. - (camel_folder_search_init): Init a hash table used to map the - returned gptrarrays' to mempools. - (camel_folder_search_execute_expression): Store all of the string - data in a mempool, slightly faster, less wasted space (usually),. - (camel_folder_search_free_result): Check for the mempool that - stores the data for the list, and free that if we have it, - otherwise assume we need to use g_free() (which should only happen - if the list is empty at the moment). - : commented out the debugging prints. Got sick of 'executing - header search' crap. - - * providers/vee/camel-vee-folder.c (camel_vee_folder_init): Init - changes. - (camel_vee_folder_finalise): Free changes. - (vfolder_add_match): Simple helper to add a new matching info - record. - (camel_vee_folder_add_folder): Only trigger a changed event if we - have changes. - (vfolder_change_match): New function, changes our local vfolder - info to match the source. - (vfolder_add_match): Add a new info to the vfolder list. - (vfolder_remove_match): Remove a no-longer matching info from the - vfolder summary. - (message_changed): check if the message still matches, and - remove/etc as required. - (camel_vee_folder_finalise, init): init/free search object. - (vee_folder_build_folder): Build the changes to the folder into - the changes data, as we go. - (folder_changed): If the folder gave us an explicit list of - changes, then process each one separately (unless there's a lot - added/changed). - - * providers/vee/camel-vee-folder.h: Added a changes field to the - folder. - - * Makefile.am (libcamel_la_SOURCES): Added - camel-folder-thread.[ch]. - - * camel-folder-thread.c: message-threading algorithm, taken from - evolutions' mail component, as it is generally more useful than - just for evolution itself. Changed to use e-memchunks as well to - speed it up a little and use less mem. - -2000-11-20 Jeffrey Stedfast - - * camel-remote-store.c (remote_recv_line): Fixed to return the - correct bytecount in all cases which is the real fix to - imap_parse_nstring. - - * providers/imap/camel-imap-command.c (imap_read_untagged): Again, - don't use strlen for the post-data, use 'n'. - - * providers/imap/camel-imap-utils.c (imap_parse_nstring): Undo my - previous temp-fix. - -2000-11-20 Not Zed - - * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): Fixes for - the summary messageid changes. Hash the messageid and store it. - (get_XOVER_headers): Use camel_folder_summary_info_new() to create - the summary item before adding it. - - * camel-folder-summary.h (CamelMessageInfo): Changed the - messgae-id to be an 8 byte md5 hash, and the references list to be - an array of these. - - * providers/local/camel-mh-summary.c (mh_summary_sync_message): - New function, sync out the message info stuff. Only updates the - X-Ev header if it can get away with it, otherwise writes out a - whole new message. - (mh_summary_sync): Added more functionality. All summary info is - now written to the X-Ev header, etc, and new messages re-written - if required during the sync process. - - * providers/local/camel-local-folder.c - (local_set_message_user_flag): Set the XEVCHANGE flag. - (local_set_message_user_tag): And here too. - - * providers/local/camel-local-summary.h: New flag - CAMEL_MESSAGE_FOLDER_XEVCHANGE to indicate the XEV header has - probably changed size and needs to be rewritten in whole. - - * camel-folder-summary.c (next_uid_string): Want this static, not - const. - (message_info_new): Store the references and message-id values as - 64 bit, binary hashes. - (message_info_load): fix for message-id/references changes. - (message_info_save): Likewise. - (camel_message_info_dup_to): And here. - (camel_message_info_free): And here too. No longer free - message_id, and simple free for references array. - (CAMEL_FOLDER_SUMMARY_VERSION): Bumped file revision. - (camel_folder_summary_init): Init memchunk allocators to empty. - (camel_folder_summary_finalize): Free memchunk allocators if - there. - (message_info_new): Use the chunk allocator to allocate message - info's. - (camel_folder_summary_info_new): New helper to allocate the - message info, and setup the memchunk if required. - (content_info_alloc): Likewise for content info's. - (message_info_load): Use summary_info_new_empty. - (content_info_new): Use content_info_alloc. - (content_info_load): " - (content_info_free): Free the content info as a memchunk. - (message_info_free): Free everything directly and the base as a - memchunk, rather than calling camel_message_info_free(), which - assumes a malloc'd array. - - * providers/local/camel-local-summary.c: Include ctype.h, kill a - warning. - (local_summary_decode_x_evolution): If we get a NULL message info, - then dont try and set anything, just check for validity. - (camel_local_summary_write_headers): New function to write a set - of headers to an fd. - (camel_local_summary_check): Added some statistic generation - stuff for memory profiling. - - * providers/local/camel-mbox-summary.c (header_write): Changed to - use stdoi functions to write out the header to a buffered stream, - instead of using writev, which is apparently slow (and writing - each line separately is slow anyway). - (mbox_summary_sync_full): New implementation. Does things - differently, doesn't use or require the content info stuff. - (summary_rebuild): Dont return an error if we start scanning at - the end of file. - (mbox_summary_sync_full): If we are not writing out new headers, - make sure we copy the From line as we go, and update frompos - appropriately. - (mbox_summary_sync_full): Always copy the From line from the - existing one, rather than trying to make one up ourselves. - (mbox_summary_sync): If we can get by with a quick-sync, then try - it, if that fails, then try a full sync anyway. - (mbox_summary_sync_quick): Quick sync. Only update system flags, - etc. - (mbox_summary_sync_full): Use the proper local summary encode_xev - function. - (header_evolution_decode): Removed, no longer needed. - (header_evolution_encode): Same. - (copy_block): No longer needed, removed. - (header_write): Removed, replaced with - camel_local_summary_write_headers. - (mbox_summary_sync_full): Fixed for header_write change. - - * camel-mime-parser.c (folder_scan_step): Implement the new - optional parser state HSCAN_PRE_FROM, that returns the (currently - unfiltered) input data. - (folder_scan_drop_step): Do the right thing for the PRE_FROM - state. - (camel_mime_parser_scan_from): Update the doco. - (camel_mime_parser_scan_pre_from): Ok, make this behaviour - optional, it simplifies a lot of loops that dont otherwise need to - know about it. - (folder_scan_step): Made the PRE_FROM state optional. - (struct _header_scan_state): Made the bool vars 1 bit. - (folder_pull_part): Free the from_line buffer if it is there. - (folder_scan_skip_line): Added a new arg, can save the skpped data - to a byte_array, as we go. - (folder_scan_step): Fixed calls to skip_line approrpiately. Now - we save the from line as we parse it. - (camel_mime_parser_read): New function to read from the mime - parser buffer directly. Useful if you use the parser to read the - first/some headers, then need to scan the rest of the data, - without needing to use a seek(), or allocate your own buffers. - - * camel-mime-parser.h (struct _header_state): Added a new parser state, - pre-from which returns any data found before a from line during - parsing (all other data can be retrieved by the caller except - this). - -2000-11-17 Jeffrey Stedfast - - * providers/imap/camel-imap-utils.c (imap_parse_nstring): When - extracting a literal string, capture up until the end of the last - line - this we we don't lose any data if the byte count is off. - - * providers/imap/camel-imap-command.c (imap_read_untagged): Use - the byte-read count to decrement the number of bytes left to read - rather than using strlen. Not only does this protect against a DoS - (embedded NUL chars in the literal string would make strlen - inaccurate) but it also improves performace a little. - - * camel-remote-store.c (remote_recv_line): *Sigh* Return the - number of bytes read on success rather than 0. Also don't use - camel_stream_buffer_read_line since we can't get an accurate octet - count. - -2000-11-17 Not Zed - - * providers/local/camel-local-summary.c (local_summary_add): Clear - the NOXEV/FLAGGED bits, since we do have an xev header. um m, - maybe this is right, this assumes a write is following. Maybe - this should be done in folder::append() instead ... - - * camel-stream-buffer.c (camel_stream_buffer_gets): We should - always terminate the string. No need to check outptr is in range, - its already been checked. - - * providers/local/camel-mbox-summary.c (mbox_summary_sync): When - we update the summary, do it from mbox_summary->folder_size, not - the content info endpos (which isn't any good anymore anyway). - - * providers/local/camel-mbox-folder.c (mbox_append_message): Set - the frompos from the current folder size, since summary_add wont - have initialised it to anything useful. - -2000-11-16 Not Zed - - * providers/local/camel-local-summary.c - (local_summary_encode_x_evolution): Check the uid string is all - digits before trying to write a 'standard' x-ev header. - - * providers/local/camel-maildir-summary.c - (camel_maildir_summary_info_to_name): Convert an info into a - maildir name:info filename. - (camel_maildir_summary_name_to_info): Convert a name:info filename - into an info, and tell us if it didn't match it. - (message_info_new): When creating a new filename, gets its info - from the flags field. Likewise if creating from an existing file, - extract the flags. - (maildir_summary_sync): Remove a small memleak. Also, if our - flags and that requires a filename change, perform that here. - (message_info_new): Get the received date from the filename. - Also, dont overwirte the uid if we have one. - (maildir_summary_check): Sort the summary in received order before - completion. - (maildir_summary_next_uid_string): Test the name for collusions - before we give it out. Retry, and if that fails, well, I guess we - collide :( - - * providers/local/camel-mbox-folder.c (mbox_lock): Implement mbox - locking. - (mbox_unlock): And unlocking. - (mbox_append_message): Lock the folder for write before doing - anything. - (mbox_get_message): Lock the folder for read before doing - anything. - - * providers/local/camel-local-folder.c (camel_local_folder_lock): - Implement something here. We handle the recursive ability but - pass the locking to the folder itself. - (camel_local_folder_unlock): Likewise for unlocking. - (local_lock): Default - do nothing, return success. - (local_unlock): Same. - (local_sync): Changed slightly for locking api changes, and also, - only lock around the sync process itself. - - * camel-lock.c: New file - utility functions for locking using - different strategies and/or for locking folders safely. - - * Makefile.am (libcamel_la_SOURCES): Adde camel-lock.[ch] - -2000-11-15 Radek Doulik - - * camel-mime-utils.c: mime_guess_type_from_file_name moved back to - composer as it introduced unwanted VFS dependency - removed #include - -2000-11-15 Not Zed - - * providers/Makefile.am: Removed local again, not quite ready. - -2000-11-14 Not Zed - - * camel-folder-summary.c (message_info_new_from_message): Use - message_info_new to create the summary from headers, instead of - getting directly from the message. - (format_recipients): No longer required. - - * providers/Makefile.am (SUBDIRS): Added local. - -2000-11-11 Not Zed - - * camel-mime-parser.c (folder_push_part): Make sure 'atleast' is - at least 1, always. This is possibly a temporary fix for a - bad failure mode on bad multipart messages. - (folder_scan_content): Go until inend, not inend+1. Changed the - continuation and retry logic to be simpler and more robust. If we - can't find a marker within - the atleast we need, just set it to 1, and try again, rather than - just going to the next smaller limit (boundary check checks the - length anyway). - (header_append): streamline the empty line case. And strip - trailing \r's if there are any (\n's already stripped). - (folder_scan_header): Reordered and cleaned up a lot. Check for - continuation only once, and compress lwsp then. Assume the header - buffer already has end of line's stripped, and simplify some things: - Only check for end of headers once and easier. - Dont check to remove end of line character - Dont bother testing inptr-start if we get a boundary match - it is - always zero. - (folder_scan_header): Removed the unused part variable, and a few - pointless assignments. - (folder_scan_header): Change the end limit to be 1 higher, to make - sure we get all content. - (folder_scan_content): And here too. - (folder_scan_header): Killed a warning. - (folder_push_part): Removed a bad comment. Actually - boundarylenfinal can be zero for a new message not in a - multipart. So we fix that here. - -2000-11-09 Not Zed - - * camel-mime-utils.c (header_decode_param_list): Renamed from - header_param_list_decode. - (header_param_list_decode): New external function to decode a - parameter list. - (header_param_list_format_append): Made public. - (header_param_list_format): Another new public helper function for - formatting just a param list. - - * camel-folder-summary.c (next_uid_string): Default implementation - is the same as before. - (camel_folder_summary_class_init): And set it up. - - * camel-folder-summary.h: Make next_uid_string a virtual function. - - * camel-folder.c (camel_folder_change_info_changed): New function - to return true if the changeset contains any changes. - -2000-11-14 Jeffrey Stedfast - - * camel-stream.c (camel_stream_printf): Don't cast an int to a - ssize_t. - -2000-11-10 Dan Winship - - * providers/mbox/camel-mbox-summary.c - (camel_mbox_summary_build_from): put a space before a single-digit - day of the month since it seems some mailers are fantastically - picky about this. (bugs.gnome.org #27232) - -2000-11-10 Radek Doulik - - * camel-mime-utils.c (header_msgid_generate): fix ids ending with '.' - -2000-11-09 Dan Winship - - * providers/imap/camel-imap-auth.c (imap_try_kerberos_v4_auth): - Fix error handling. (Only send a "*" to bail out of authentication - if the server hasn't already bailed on us.) - -2000-11-08 Radek Doulik - - * camel-mime-utils.c (mime_guess_type_from_file_name): new - function, moved from composer - -2000-11-08 Not Zed - - * camel-mime-message.c (find_best_encoding): Keep track of the - caller bestenc flags that make sense. - - * camel-mime-filter-bestenc.c (filter): Added code to detect when - we have "^From " lines in the sequence of text. - (camel_mime_filter_bestenc_get_best_encoding): Added a new flag - CAMEL_BESTENC_NO_FROM: if set, it will not allow any lines - matching "^From " to appear in the output - currently forcing - base64 encoding to achieve this. - - * camel-mime-parser.c (folder_scan_step): Call - camel_mime-filter_complete() once we're done, rather than - filter_filter(). - (folder_scan_content): Some fixes for state changing; so that when - we do find another boundary it is properly flagged. Since we - strip the last \n off all data, we must take that into account - too. Sigh. Fixes a rather nasty set of bugs where multipart - messages could start including following messages as parts, etc. - (struct _header_scan_stack): Added new parameter, - boundarylenfinal, which holds the length of the final boundary, if - it is different (e.g. for From lines, whihc aren't) - (folder_scan_step): Setup teh boundarylenfinal value when creating - a new boundary. - (folder_scan_content): Hmm, if we hit the end-of-buffer sentinal, - reset the scanner back to leave 'atleast' chars in the buffer - still, dump that content, and retry again. Stops us losing a - check for a boundary on some data we haven't really looked at yet! - (folder_scan_content): Use boundarylenfinal to calculate - 'atleast'. - (folder_scan_header): And here too. - (folder_boundary_check): Use the atleast value directly, dont - truncate it. Use the boundarylen/boundarylenfinal values directly - too. - (struct _header_scan_stack): Add an atleast parameter to cache the - atleast info. - (folder_push_part): Determine/set 'atleast', every time we add a - new part. - (folder_scan_header): Get the cached atleast info from the current - part. - (folder_scan_content): And here too. - (folder_scan_header): Fix a problem where a part starting with - " text" would be interpreted as a followon header wrongly. - - * camel-mime-filter-charset.c (complete): Add some assertions to - find a bug. - -2000-11-07 Ettore Perazzoli - - * camel-service.c (get_name): Strdup the "???" string you return, - so that the expected semantics for `::get_name()' is respected. - -2000-11-07 Dan Winship - - * camel-stream-filter.c (d): Kill debugging, as it causes lots of - evolution-mail spewage. - -2000-11-07 Not Zed - - * camel-mime-filter-bestenc.c (complete): Implement a complete() - function, now we need one. - (filter): Upgraded to match rfrc2045 properly. Checks also for - length of line and valid CRLF sequences. - (camel_mime_filter_bestenc_get_best_encoding): Do the work of - working out what is the best encoding given what we found about - the stream. - - * camel-mime-part.c (camel_mime_part_encoding_to_string): Use a - lookup table to get the encoding naem, and add the binary type. - (camel_mime_part_encoding_from_string): Likewise for the reverse. - - * camel-mime-part.h: Added the binary encoding type, see rfc2045. - - * camel-mime-utils.c (header_param_list_format_append): Dont put a - space before ;'s in parameter lists, makes them more - readable/consistent. - - * camel-mime-message.c (multipart_has_8bit_parts): Cleaned up the - old stuff, well removed it. - (camel_mime_message_set_best_encoding): Added another argument - that lets you select what you want to set the best of. i.e. for - smtp transport we only need 7 bit, and dont need to optimise the - charset (although of course, we should always). - (find_best_encoding): Implement this feature, if we are not - getting the best charset, use the one we have. - (best_encoding): Set the charset on the part appropriately. Sigh, - the interfaces for this are nonexistant. - (find_best_encoding): Tell the bestenc filter that lf should be - treated as crlf for the purposes of determining encodings. - -2000-11-06 Not Zed - - * camel-charset-map.c (camel_charset_init): Init function for an - iterative charset determinator. - (camel_charset_step): Iterate another buffer. - (camel_charset_mask): Removed, since it couldn't have worked. - (camel_charset_best): Use the iterative interface to do the work. - (camel_charset_best_name): Get the best name for a charset so far. - - * camel-mime-filter-bestenc.c: New class, a stream - filter that can be used to memory-efficiently determine the best - encoding and/or charset to use for a given stream of bytes. - - * Makefile.am (libcamelinclude_HEADERS): Added stream-null*. - (libcamel_la_SOURCES): Added bestenc* - - * camel-stream-null.c: New class, a null-stream, that always - succeeds, and never has any contents. - - * camel-stream.c: Minor pointless changes. Was going to do - something else but changed my mind. Added trivial default - implementations for all callbacks. - - * camel-mime-message.h: Cleaned up some old cruft. - - * camel-folder-summary.c (camel_folder_summary_format_address): - address_list_format() no longer encodes, so we dont need to decode - it. - - * camel-address.c (camel_address_unformat): New function, attempts - to reverse the formatting process on display addresses. - (camel_address_length): New function to get the number of - addresses, without having to peek the structure. - - * camel-mime-message.c (camel_mime_message_set_from): Fix a typo. - (camel_mime_message_finalize): Only unref from/reply_to if we have - it. - (camel_mime_message_set_recipients): New function - set the - recipients as a CamelInternetAddress. This function effectively - deprecates the older recipient setting functions. - (camel_mime_message_add_recipient): What the hell, i'll bite the - bullet. Terminate this function. The old api was ambiguious and - inefficient and didn't work right anyway. - (camel_mime_message_remove_recipient_address): And this one. - (camel_mime_message_remove_recipient_name): And this one too. - (camel_mime_message_set_recipients): If we set an empty header, - then remove it from the header list. Allow a null receipient - object to clear a header. - (camel_mime_message_set_from): Likewise, if setting an empty from - address. - (camel_mime_message_encode_8bit_parts): Eeek!! - camel_stream_mem_new_with_byte_array owns the byte_array we give - it, so make sure we dont free any of it! - (camel_mime_message_encode_8bit_parts): Infact, i'll just rewrite - the whole lot, its a bit of a mess. Should really rename it and - make it a little more useful too, lets see ... - (best_encoding): This has a string interface? Oh boy. - (camel_mime_message_foreach_part): New experimental function to - iterate over all message parts. Might not remain. - (camel_mime_message_has_8bit_parts): New implementation using - foreach_part. Fixed a couple of problems. - (find_best_encoding): New function, that finds the best encoding - for a given part (will probably be moved to camel-mime-part), and - also the best charset to use if it is a text part. Since one - affects the other it is a two pass process, but uses streams and - not memory to achieve this. - (camel_mime_message_set_best_encoding): Uses the function above to - configure an entire message for the best encoding possible given - transport constraints. - (camel_mime_message_encode_8bit_parts): Reimplemented to use the - function above to perform the work. - - * camel-internet-address.c - (camel_internet_address_format_address): Dont put <> around a lone - address with no real name. - (camel_internet_address_encode_address): Similarly. - (internet_decode): Actually return the count of decoded addresses. - (internet_unformat): Implement the unformatting routine. - -2000-11-05 Not Zed - - * providers/smtp/camel-smtp-transport.c (_send_to): Changed to get - the internetaddress directly, rather than having to parse it - itself. - - * camel-address.c (camel_address_format): Added a new function - which will format address, suitable for display. - (camel_address_cat): Concatentate 1 camel address onto another. - It is upto the caller to ensure the addresses are of compatible - types. - (camel_address_new_clone): New function to create a new address by - copying an existing one of the same type. - (camel_address_copy): New helper function to copy an address. - - * camel-mime-message.h (struct _CamelMimeMessage): Removed cached - copy of date string. - (struct _CamelMimeMessage): Added date_received info. - - * camel-mime-message.c (camel_mime_message_get_date_string): - Removed. Nothing uses it anyway, and it is redundant. - (camel_mime_message_finalize): No more date_str. - (camel_mime_message_init): No more date_str, initialise - date_received* - (write_to_stream): Change the check for a date header. - (process_header): No longer track the date_str. - (camel_mime_message_get_received_date): Removed. totally invalid - anyway. - (camel_mime_message_get_sent_date): Removed. Redundant. The only - 'date' is the sent date, the received date is just made up. - (camel_mime_message_get_date): Args changed to be more consistent - with utility functions. - (camel_mime_message_get_date): Dont set the date when we're asked - for it (if its not set by the time its written, it'll be set - then). - (camel_mime_message_get_date_received): Actually do 'the right - thing' here, if we have a received header, use that to determine - the received date. And return the data in the same format as - get_date. - (camel_mime_message_set_from): Changed the api to better match - what we should be doing. Pass a camelinternetaddress, etc. - (camel_mime_message_set_reply_to): Cahnged similarly to take an - internetaddress. - (camel_mime_message_get_reply_to): Likewise. - (camel_mime_message_finalize): Unref the from/reply_to objects. - (format_address): Removed, no longer needed. - (process_header): Changed to store the from/reply_to as - internetaddress's. - (write_to_stream): Set the from header directly to empty, if we - dont have one. Maybe we should just abort, and/or create one - based on the current user. - - * camel-mime-utils.c (header_address_list_format): Renamed to - header_address_list_encode, which is what it is actually doing. - (header_address_list_format_append): Similarly. - (encoding_map[]): Removed, no longer used. - (header_address_list_encode_append): Take another arg, do we - encode the address (for internet), or not (for display - utf8 - only). - (header_address_list_format): Re-added this function, but now it - generates a display version only. Surprise surprise, that is all - anythign needs to generate anyway. Sigh. - - * camel-internet-address.c (camel_internet_address_get): Return - false if we get an invalid index only. - (camel_internet_address_encode_address): Helper function to encode - a single address for mailing. - (internet_encode): Use the above function to format it. - (camel_internet_address_format_address): Format a single address - for display. - (internet_format): Implement the display version. - (camel_internet_address_class_init): Init the internet_format - virtual function. - (internet_cat): Implement virtual function to concatenate - addresses. - - * camel-folder-summary.c - (camel_folder_summary_info_new_from_header): new function, only - build the summary info, dont add it. - (camel_folder_summary_info_new_from_parser): Likewise, for new - info from parser. - (camel_folder_summary_add_from_parser): Cahnged to call function - above to build info. - (camel_folder_summary_add_from_header): Changed to call function - above, to build info. - (camel_folder_summary_info_free): New function to free the summary - message info. - (camel_folder_summary_clear): Changed to clal above to free info. - (camel_folder_summary_remove): Likewise. - (camel_folder_summary_add): Cleaned up the clashing uid - re-assignment logic a little bit. - (camel_folder_summary_decode_uint32): Fixed a typo, 01 != -1. - (camel_folder_summary_decode_time_t): Return -1 on error. - (camel_folder_summary_encode_off_t): New function to encode an - off_t type. - (camel_folder_summary_decode_off_t): And likewise for the reverse. - (CAMEL_FOLDER_SUMMARY_VERSION): Bumped the summary version, since - we're now encoding time/off_t's right. - (summary_header_save): Use time_t encoder to save the timestamp. - (summary_header_load): Likewise for decoding the timestamp. - (content_info_load): Decode off_t types directly, now we can. - (content_info_save): And likewise for encoding. - (camel_folder_summary_add_from_message): New function, create a - summary item from an existing message and add it. - (camel_folder_summary_info_new_from_message): New function, create - a summary item from an existing message. - (summary_build_content_info_message): New function to do the dirty - work of building the conent info/indexing, from a message source. - (format_recipients): Format an internetaddress suitable for the - summary. - (message_info_new_from_message): Build a new summary item from a - mime message. - (content_info_new_from_message): Build a new conent info from a - mime part. - (camel_folder_summary_class_init): Init the new class functions. - (message_info_new_from_message): Fixed for message api change. - - Added documentation to the functions. - -2000-11-03 Radek Doulik - - * camel-mime-utils.c (header_msgid_generate): new function, - generates simple message/content id - -2000-11-04 Not Zed - - * camel-mime-part-utils.c - (camel_mime_part_construct_content_from_parser): Set the - preface/postface from the parser into the multipart object. - - * camel-multipart.c (camel_multipart_set_postface): Function to - set the postface text on a multipart. - (camel_multipart_set_preface): Similarly for preface text. - - * camel-mime-parser.c (folder_scan_content): If we scan until a - boundary, then we do not include the \n that starts the boundary - line in the content. - (struct _header_scan_stack): Added a ByteArray to store the - multipart pre/post-text as we're scanning. - (folder_pull_part): Free pre/posttext if they are allocated. - (folder_scan_step): Build into the pre/posttext arrays as we - encounter data. - (camel_mime_parser_preface): REturn the multipart preface text, if - there is any scanned. - (camel_mime_parser_postface): Likewise for postface text. - (byte_array_to_string): helper function for above. - - * providers/mbox/camel-mbox-folder.c (mbox_append_message): Change - the from line to be "\nFrom ..." always, so no need to - check/append a \n to messages. - (mbox_append_message): Open the output stream with append mode - [assuming this is more efficient than seeking to the end] - And dont prepend \n on the From line if its the first in the - mbox. - (mbox_append_message): Pass the offset of the real start of the - "From " line when we perform the update (which may != 'seek') - - * camel-mime-filter-charset.c (complete): Removed the terminating - NUL 'fix'. - - * camel-stream-filter.c (do_read): Added some debug. - (do_flush): And here. - (do_write): And here too. - (do_write): ARGH!!! ARGH! Ok, so the filter stream was writing a - different number of bytes than the requester was asking it to - write (because of filtering, of course!). So instead of returning - the true number of written bytes, we'll return what they asked us - to write - unless there is an error in which case we return -1. - - * camel-mime-utils.c (base64_encode_close): Sigh, forgot to make - it unsigned. I think this is actually a gcc bug as (48 >> 2) - somehow ended up negative, when it obviously should not, even if - the data load was signed. - -2000-11-03 Jeffrey Stedfast - - * camel-url.c: Undo my incorrect fix - I misunderstood danw - - sorry! - -2000-11-03 Dan Winship - - * providers/pop3/camel-pop3-store.c (camel_pop3_store_expunge): - Unbreak this. - -2000-11-03 Jeffrey Stedfast - - * camel-url.c (camel_url_to_string): If show_pass, then base64 the - password before writing it to the output string. - (camel_url_new): Assume password has been base64 encoded and - decode accordingly. - -2000-11-03 Dan Winship - - * camel-provider.h: Add an "url_flags" field to CamelProvider. - Move the CAMEL_SERVICE_URL_* defines here and remove the SERVICE_ - part of the name. - - * camel-service.h: Remove CAMEL_SERVICE_URL_* flags and - service->url_flags field. - - * camel-service.c (check_url, get_path): Get URL flags from - service->provider, update for changed flag names. - - * providers/*/camel-*-provider.c: Add URL flags to provider - structures. - - * providers/*/camel-*-{store,transport}.c, camel-remote-store.c: - Remove service->url_flags initialization. - -2000-11-02 Jeffrey Stedfast - - * providers/imap/camel-imap-store.c (get_folder_info): Quote - foldernames when sending to the IMAP server because the folder - name might contain spaces. - -2000-11-02 Not Zed - - * Merged in camel-incremental-branch. - -2000-11-01 Dan Winship - - * providers/imap/camel-imap-store.c (get_folder_info): Remove old - subbed folders from hash table after freeing them. - - * providers/imap/camel-imap-folder.c (imap_get_full_name): Deal - correctly with namespace == "" - -2000-11-01 Gediminas Paulauskas - - * camel-charset-map.c, camel-charset-map-private.h: synced all charsets - with ones found in libunicode. Just include more "iso/*.h" and rebuild - ...private.h with this. - -2000-10-31 Dan Winship - - * camel-service.c (service_disconnect): Add a new argument, clean, - that says whether or not to try to disconnect cleanly. - - * camel-remote-store.c (remote_send_string, remote_send_stream, - remote_recv_line): disconnect uncleanly on failure to prevent - infinite loops when providers would normally send commands from - disconnect(). Remove some unneeded CamelException goo. - - * providers/smtp/camel-smtp-transport.c (smtp_disconnect): - * providers/pop3/camel-pop3-store.c (pop3_disconnect): - * providers/nntp/camel-nntp-store.c (nntp_store_disconnect): - * providers/imap/camel-imap-store.c (imap_disconnect): Don't send - QUIT/LOGOUT if !clean. - -2000-10-30 Dan Winship - - * providers/imap/camel-imap-auth.c: New file with code for IMAP - authentication mechanisms. (Currently just krb4, and without - integrity/privacy protection). - - * providers/imap/Makefile.am: Add camel-imap-auth.[ch] and krb4 - CFLAGS/LDFLAGS - - * providers/imap/camel-imap-store.c (connect_to_server): Split out - from imap_connect. Just does the basic connect and CAPABILITY - check. Redo the CAPABILITY code more robustly. - (query_auth_types_connected): Do this right rather than punting to - query_auth_types_generic. Check for KERBEROS_V4 if compiled with - krb4 support. - (query_auth_types_generic): Mention KERBEROS_V4 if compiled with - krb4 support. - (imap_connect): Use connect_to_server(). - - * camel-mime-utils.c (base64_encode_step, base64_encode_close): - Take an additional argument, "break_lines", saying whether or not - to add '\n's to the output. - - * camel-multipart.c (set_boundary): - * camel-mime-filter-basic.c (filter, complete): Update for base64 - api change. - -2000-10-30 Peter Williams - - * providers/imap/camel-imap-store.c (unsubscribe_folder): Correct - parameters to g_hash_table_lookup_extended. - -2000-10-29 Dan Winship - - Improved IMAP namespace handling: leave the namespace in the - folder names rather than constantly prepending it and stripping it - off. Also some subscription fixes. - - * camel-store.c (camel_folder_info_build): Fix for the case where - @top isn't in @folders. - - * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Add - a "short_name" argument rather than figuring it out ourselves. - (imap_get_full_name): Implementation of CamelFolder::get_full_name - that strips off namespace so the user doesn't have to see it. - (imap_append_message, imap_copy_message_to, imap_move_message_to): - Use folder->full_name rather than calling - camel_imap_store_get_folder_path. - - * providers/imap/camel-imap-utils.c (imap_parse_list_response): - Update this: make @flags a bitmask and @sep a char rather than a - string. Make all of the out arguments optional. Handle literals in - the server response. - - * providers/imap/camel-imap-store.c (imap_connect): Do a better - job of getting the correct dir_sep for the namespace we're using. - Construct a base_url here that will be used by get_folder_info. - (camel_imap_store_folder_path): Removed - (imap_folder_exists): Add an argument to return the short name of - the folder (parsed out of the LIST response). Update for - imap_parse_list_response change. - (get_folder): Update for the various other changes. - (get_folder_info): Update for the various other changes. Be more - consistent about the returned layout: put everything underneath - the "namespace" directory, including INBOX, even if it doesn't - belong there. Don't destroy the list of subscribed folders until - we've actually gotten the new list. - (folder_subscribed, subscribe_folder, unsubscribe_folder): Use - folder_name directly rather than camel_imap_store_folder_Path. - - * providers/imap/camel-imap-command.c (camel_imap_command): Update - for folder name changes. - -2000-10-29 Dan Winship - - * camel.h: Remove md5-utils.h include since it's not part of Camel - any more. - - * camel-charset-map.c: Kill some warnings. - - * providers/nntp/camel-nntp-grouplist.c - (camel_nntp_get_grouplist_from_file, camel_nntp_grouplist_save): - Clean up warnings about time_t casts. - - * providers/smtp/camel-smtp-transport.c: Remove unused md5-utils.h - include. - - * providers/pop3/camel-pop3-store.c: Undefine the "_" macro - defined by krb4's des.h when compiling with krb support. - Fix md5-utils.h include. - -2000-10-27 Dan Winship - - * camel-mime-utils.c (header_param_list_format_append): Only quote - Content-type parameters when the quoting is mandatory, and deal - with embedded quotes/backslashes when quoting. - -2000-10-27 - - * providers/pop3/Makefile.am: Tidy up build - - * providers/smtp/Makefile.am: ditto - - * Makefile.am: Move md5-utils.[hc] to e-util because the - addressbook is going to use md5 hashes for pilot syncing. - Maybe the calendar conduits as well because this is a good idea - Chris had. - -2000-10-26 Kjartan Maraas - - * camel-exceptions-list.def: Add newline to kill warnings. - -2000-10-25 Dan Winship - - * providers/imap/camel-imap-store.c (get_folder_info): Fix folder - listing code infinite loop. - - * camel-store.h: Add a "parent" field to CamelFolderInfo. - - * camel-store.c (camel_folder_info_build): Deal with "parent" - (camel_store_folder_subscribed, camel_store_subscribe_folder, - camel_store_unsubscribe_folder): Add g_return_if_fails checking - that the folder supports subscriptions. - - * providers/imap/camel-imap-store.c (folder_subscribed, - subscribe_folder, unsubscribe_folder): Remove "+ 1"s since the - mail subscribe UI won't prepend / to the folder names now. - (get_folder_info): Clear the "parent" field of the folderinfos - when removing an empty top level. - - * providers/nntp/camel-nntp-store.c (nntp_store_folder_subscribed, - nntp_store_subscribe_folder, nntp_store_unsubscribe_folder): - Remove "+ 1"s since the mail subscribe UI won't prepend / to the - folder names now. - -2000-10-24 Chris Toshok - - * providers/imap/camel-imap-store.h: add subscribed_folders. - - * providers/imap/camel-imap-store.c (camel_imap_store_class_init): - fill in vtable entries for subscription functions. - (camel_imap_store_finalize): new function, so we can free up our - subscribed_folders hashtable. - (camel_imap_store_init): set CAMEL_STORE_SUBSCRIPTIONS in the - CamelStore flags, and create our subscribed_folders hashtable. - (camel_imap_store_get_type): camel_imap_store_finalize is our - finalize function. - (get_folder_info): if we're looking at subscribed_only, clear out - the subscribed_folders hashtable, use LSUB instead of LIST, and - insert folder paths (prepended by their namespace if there is one) - into subscribed_folders. INBOX subscription support needs work, - since we always show it, regardless of it's subscribed state. - (folder_subscribed): new function. just look up the folder_path - in the hashtable. - (subscribe_folder): new function. use the imap SUBSCRIBE command, - and if successful add it to the hashtable. - (unsubscribe_folder): new function. use the imap UNSUBSCRIBE - command, and if successful remove it from the hashtable. - -2000-10-24 Dan Winship - - * providers/imap/camel-imap-store.c (get_folder_info): Fill in the - message_count and unread_message_count flags (if !fast). - -2000-10-23 Dan Winship - - * camel-object.h: #include gnome-i18n.h (and gnome-defs.h since - the former depends on it.) - - * *: Add lots of _() and N_(). - -2000-10-23 Chris Toshok - - * providers/nntp/Makefile.am (libcamelnntpinclude_HEADERS): add - camel-nntp-types.h. - -2000-10-23 Dan Winship - - * providers/imap/camel-imap-command.c (imap_read_untagged): Fix a - "how could this have been working before" memory overrun bug - found by Vlad. - - * camel-op-queue.[ch], camel-thread-proxy.[ch]: These should have - gone away a long time ago. - -2000-10-20 Chris Toshok - - * providers/Makefile.am (SUBDIRS): re-enable the nntp provider. - -2000-10-20 Chris Toshok - - * providers/nntp/camel-nntp-store.c (build_folder_info): add - function to build a tree from the nntp group names (using '.' as a - heirarchy separator.) #ifdefed INFO_AS_TREE only. - (build_folder_info_from_grouplist): if INFO_AS_TREE is selected, - call build_folder_info instead of appending a new CamelFolderInfo - to our list. - (ensure_news_dir_exists): use e_mkdir_hier instead of failing if a - parent directory (~/evolution/news generally) isn't there. - -2000-10-19 Chris Toshok - - * camel-folder-search.c: #include before - -2000-10-19 Dan Winship - - * providers/imap/camel-imap-utils.c (imap_parse_list_response): - Fix a bug with "INBOX" (or anything else with NIL hierarchy - separator) as the namespace. - - * providers/imap/camel-imap-folder.c (imap_refresh_info): Emit - message_changed and folder_changed as appropriate. - -2000-10-19 Dan Winship - - * camel-folder.c (camel_folder_refresh_info): Update comment here - so refresh_info isn't just for reconnects any more. Make the - default implementation a no-op rather than an error. - - * providers/nntp/camel-nntp-folder.c: Move refresh_info impl into - camel_nntp_folder_new, since it would have leaked memory and not - done anything useful if it was called later. - - * providers/mbox/camel-mbox-folder.c: Remove no-longer-necessary - refresh_info impl. - - * providers/imap/camel-imap-folder.c (camel_imap_folder_changed): - Update imap_folder->exists, but don't actually load the new - messages. This is a temporary workaround to deal with the IMAP - provider stealing the message list focus at annoying times. - (imap_copy_message_to, imap_move_message_to): Emit a - folder_changed by hand, for now. - -2000-10-19 Ettore Perazzoli - - * providers/imap/Makefile.am (libcamelimapinclude_HEADERS): Add - `camel-imap-stream.h'. - - * Makefile.am (libcamelinclude_HEADERS): Add `camel-charset-map.h' - and `camel-charset-map-private.h'. - -2000-10-18 Jeffrey Stedfast - - * camel-mime-part.c (camel_mime_part_set_description): The correct - fix this time - the description should be encoded here and not in - the camel-medium layer. - -2000-10-30 Not Zed - - * camel-folder.c (camel_folder_change_info_add_update): Fixed the - changeset logic, which was completely wrong. - -2000-10-27 Not Zed - - * camel-mime-utils.c (quoted_encode_step): Removed is_blank() stuff. - (header_decode_init): When we set the 'space' bit, dont clear all - the others. - (quoted_encode): Put back the safemask. Yes we totally need it, - see rfc 2047 section 5, parts (1) and (3). - (CHARS_PSPECIAL): Remove '=' and '_' from the list of allowed - characters (this is an allowed list, not a not-allowed list, like - the ESPECIAL). - (camel_mime_special_table): Updated for fixes to definitions. - (CHARS_ESPECIAL): Added '_' to list of characters that should be - encoded. - -2000-10-26 Not Zed - - * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_update): - Use the new camel_folder_change_info_* stuff to build the update - diff, rather than doing it ourselves. - - * camel-folder.c (camel_folder_change_info_add_source): Add a - 'source' list, used to create change lists. - (camel_folder_change_info_add_source_list): Add a list of uid's, - convenience function. - (camel_folder_change_info_add_update): Add a uid to the list of - uid's in the new updated list. - (camel_folder_change_info_add_update_list): Add a bunch of uid's - at once for the same purpose. - (camel_folder_change_info_build_diff): Take the source list, the - update list, and find the differences, building on the added or - removed list as appropriate. - -2000-10-20 Not Zed - - * providers/mbox/camel-mbox-summary.c (removed_uids): REnamed from - add_uid. - (camel_mbox_summary_update): Oops, fix the reversed logic for - determining the uid changesets. - - * camel-folder.c (message_changed): Oops, we want to change the - uid, not add it. - -2000-10-19 Not Zed - - * providers/mh/camel-mh-summary.c (camel_mh_summary_sync): Added a - change list argument, and add expunged uid's to it. - - * providers/mh/camel-mh-folder.c (mh_init): Setup the change list. - (mh_finalize): And free it. - (mh_sync): Track changes, and send a folder_changed signal as - appropriate. - (mh_expunge): Likewise. - (mh_append_message): Add the new uid to the change list and - trigger a folder_changed event. - - * providers/mbox/camel-mbox-folder.c (camel_mbox_folder_new): - Setup a mbox list of changes structure. - (mbox_finalize): And free it. - (mbox_expunge): Include the change list with the folder_changed - event, and clear it off. - (mbox_sync): And the same for when we are just syncing the folder. - (mbox_append_message): And do the same here, after we've updated - the folder. - - * providers/mbox/camel-mbox-summary.c - (camel_mbox_summary_build_from): Use gmtime_r to get the time - thread-safely. - (camel_mbox_summary_sync): Added a changeinfo argument. Add any - removed or changed messages to the changelists as appropriate. - (camel_mbox_summary_update): Added a changeinfo argument. - Genereate a list of added/removed uid's based on the difference - before and after rebuilding the summary. - - * camel-folder.c (camel_folder_change_info_new): - (camel_folder_change_info_add_uid): - (change_info_add_uid): - (camel_folder_change_info_remove_uid): - (camel_folder_change_info_change_uid): - (change_info_clear): - (camel_folder_change_info_clear): - (camel_folder_change_info_free): - (change_info_cat): - (camel_folder_change_info_cat): Bunch of utility functions for - working with change info lists. - (camel_folder_init): Init the change info list. - (camel_folder_finalize): And free it. - (thaw): Changed to pass through a list of changes, or to get the - changed message uids from the camelfolderchangeinfo struct, and - reset it. - (folder_changed): Add the changed lists to the frozen change list - if we are frozen. - (message_changed): Add the message to the changed list if we are - in the frozen state. - - * camel-folder.h (CamelFolderChangeInfo): New structure to hold - information for the folder_changed event. - -2000-10-18 Ettore Perazzoli - - * camel-mime-filter-charset.c (complete): Put a zero at the start - of the outbuf. - -2000-10-18 Not Zed - - * camel-mime-part.c (add_header): No, we must not encode the - headers here. These interfaces ARE raw interfaces as they are - defined in camel_medium. Also removed a bogus/meaningless FIXME. - (set_header): Likewise here, we must not. - (process_header): Removed another bogus comment. - - * camel-object.c (shared_is_of_type): Comment out the spitting of - a big warning when we're trying to determine types from code. - - * providers/mbox/camel-mbox-summary.c - (message_info_new_from_parser): Only call ibex funcitons if we - have an index. - - * providers/mh/camel-mh-summary.c (camel_mh_summary_add): Only - call ibex functions if we have an index. - (remove_summary): Likewise. - (camel_mh_summary_check): Likewise. - - * providers/nntp/camel-nntp-store.c (nntp_store_get_folder): - get_folder -> flags argument. - - * providers/vee/camel-vee-store.c (vee_get_folder): create->flags. - - * providers/pop3/camel-pop3-store.c (get_folder): Changed create - -> flags. - - * providers/imap/camel-imap-store.c (get_folder): Added flags - argument. - - * providers/mh/camel-mh-folder.c (camel_mh_folder_new): Added - flags argument, and fixed code appropriately. - - * providers/mh/camel-mh-store.c (get_folder): Added flags argument. - - * camel-folder-search.c (message_body_contains): Perform a regex - match on the contents of messages. This wont quite work yet as - message contents are encoded when written to a stream. - (build_match_regex): Converts a number of strings into a regex - matching pattern, escaping special chars. - (match_message): match a single message from a folder, by uid. - Slow. - (search_body_contains): Changed to support matching where no index - is supplied. Matches are performed by retrieving message - contents, etc. - () WTF? camel should not be including any widget headers. - - * providers/mbox/camel-mbox-folder.c (camel_mbox_folder_new): - Added flags argument. - (mbox_refresh_info): Changed into a NOP, the refresh info code - moved into the new function. - (camel_mbox_folder_new): If we have an index requested, build one, - otherwise, remove an old one, or just dont do anything. - - * providers/mbox/camel-mbox-store.c (get_folder): Changed create - to flags, changed code to suit. - - * camel-store.c (camel_store_get_folder): Changed create to flags. - (get_folder_internal): And here. - (get_folder): And here too. - - * camel-store.h (camel_store_get_folder): Change the create - argument to be a flags argument. - -2000-10-17 Dan Winship - - * providers/imap/camel-imap-folder.c (imap_refresh_info): Remove - cached info at the end of the summary when the folder shrinks - between sessions. Also remove an untrue comment. - (camel_imap_folder_new): Move the summary creation to after the - folder selection again, since it depends on the uidvalidity - having been set. - - * providers/imap/camel-imap-store.c (get_folder): Fix up - summary_file to not include the namespace twice. - -2000-10-17 Jeffrey Stedfast - - * camel-mime-part.c (set_header): Encode the header value. - (add_header): Same. - -2000-10-17 Not Zed - - * camel-mime-filter.c: Added some malloc check debugging stuff. - - * camel-mime-parser.c - (struct _header_scan_state): Removed top_part, top_start, and - pending. I can't even remember why they were there, and they're - not used anymore. - - * camel-mime-filter-basic.c (filter): Forgot to up the space here - too. - -2000-10-14 Not Zed - - * camel-mime-filter-basic.c (complete): Ok, so we hit a fixme, 3x - just wasn't enough for some sequences. - -2000-10-16 Jeffrey Stedfast - - * providers/imap/camel-imap-command.c - (imap_read_response): Don't imap_next_word(respbuf + 2), instead - use imap_next_word(respbuf) or else we'll skip over the second - token. - -2000-10-16 Jeffrey Stedfast - - * providers/imap/camel-imap-command.c - (camel_imap_response_extract): Don't free 'resp' as it doesn't - point to the beginning of the allocated data, instead free - response->untagged->pdata[i]. Also, if '*resp' is equal to a space - character, then set resp = imap_next_word (resp) rather than - expecting resp++ to work (there's a list broken IMAP daemons that - like to put extra spaces between tokens). - (imap_read_response): Don't expect 'respbuf+2' to be where the - untagged number response to start (see above fix for an - explanation). - -2000-10-16 Chris Toshok - - * camel-service.c (get_path): when using the construct (flags & - CAMEL_SERVICE_URL_NEED_*) make sure to do ((flags & - CAMEL_SERVICE_URL_NEED_*) == CAMEL_SERVICE_URL_NEED_*) - (check_url): same. - -2000-10-16 Jeffrey Stedfast - - * providers/imap/camel-imap-store.c (imap_disconnect): Only send - the LOGOUT command if the store is connected. - (imap_connect): Set the 'connected' state to TRUE when we - successfully connect. - (get_folder_info): if (!topfi), 'topfi' was allocated but then - 'fi' was set. I think Dan meant to set topfi since fi is an - uninitialized value at this point. - - * providers/imap/camel-imap-command.c (imap_read_response): Check - for the untagged BYE response and set the 'connected' state to - FALSE if we receive the BYE response. Return NULL if we get a BYE - response. - -2000-10-16 Dan Winship - - * providers/imap/camel-imap-store.c (get_folder_info): Deal with - the possibility of not getting a LIST response back for the top - level. - -2000-10-12 Dan Winship - - * providers/imap/camel-imap-summary.c: Simple subclass of - CamelFolderSummary that also keeps a UIDVALIDITY value (and - doesn't, for the moment, build content info). - - * providers/imap/camel-imap-folder.c: - (various): Use a CamelImapSummary to store/fetch summary info. - (camel_imap_folder_new): Take a path to a file to use for the - summary. Set the folder's permanent_flags correctly according to - the server response. Read in the summary (checking the - UIDVALIDITY) and update it if it's out of date. - (imap_refresh_info): Just fetch UIDs and flags. If the UIDs all - match, update the flags as needed and be done with it. Otherwise, - delete messages that have been expunged from the server and fetch - full summary info for any new messages. - (imap_sync): Save the summary to disk. - (imap_update_summary): Renamed from imap_get_summary_internal. Can - now be told to get summary for only a subset of messages. Use - camel-mime-utils functions rather than rolling our own header - parsing. - (imap_get_message_info_internal): Merged into imap_update_summary. - (imap_set_message_flags): Don't marked the message FOLDER_FLAGGED - if we're not actually changing the value of any of the flags. - (camel_imap_folder_changed): Deal with EXISTS rather than RECENT. - - * providers/imap/camel-imap-store.c (imap_connect): Call - camel_session_get_storage_path and save the value. - (get_folder): Create a local directory to store summary - information and pass a summary file name to camel_imap_folder_new. - Don't call camel_folder_refresh_info from here any more since - camel_imap_folder_new does it again. - - * providers/imap/camel-imap-command.c (camel_imap_command): Add a - special case to this to make it possible to get the repsonses from - a SELECT and still have store->current_folder be updated - correctly. - (imap_read_response): parse EXISTS rather than RECENT - - * camel-session.c (camel_session_get_storage_path): Use - e_mkdir_hier. - - * camel-folder-summary.c (camel_folder_summary_remove_index): New - function. - - * camel-mime-utils.c (header_raw_append_parse): fix this. - (camel-mime-parser.c doesn't use this code because of the MEMPOOL - optimization, so nothing was ever actually calling it before.) - -2000-10-11 Not Zed - - * camel-mime-part.h (struct _CamelMimePart): Removed - temp_message_buffer, and content_input_stream fields which seem to - have come from nowhere, and are unused. - - * camel-mime-utils.c: Added a note about touching this file. - Nobody is to touch it without asking me first. That goes for you - too Jeff. - (header_decode_text): In what way is this broken? - -2000-10-10 Not Zed - - * providers/imap/camel-imap-folder.c (imap_get_summary_internal): - Fix camel_summary_* function rename - (imap_get_message_info_internal): Likewise. - - * camel-mime-parser.c (camel_mime_parser_finalise): Fixed a spelling mistake. - - * camel-folder-summary.c (camel_summary_format_address): Uh, why - do we encode and then decode here ... sigh. This is not the way - to fix this. - (camel_folder_summary_format_address): Renamed to a proper name, - this was only supposed to be a private function. - (camel_folder_summary_format_string): Likewise. Oh i see why it - was made public, code reuse by cut & paste. Joy. - -2000-10-11 Chris Toshok - - * providers/nntp/camel-nntp-store.c (nntp_store_unsubscribe_folder): remove the leading '/'. - (nntp_store_subscribe_folder): same. - (nntp_store_folder_subscribed): same. - -2000-10-11 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c (imap_move_message_to): Quote - the mailbox name as it may contain spaces. - (imap_copy_message_to): Same. - -2000-10-10 Chris Toshok - - * providers/nntp/camel-nntp-store.c - (build_folder_info_from_grouplist): fill in message_count and - unread_message_count properly. - - * providers/nntp/camel-nntp-newsrc.h: reformat. - - * providers/nntp/camel-nntp-grouplist.c - (camel_nntp_get_grouplist_from_file): remove spew. - - * providers/nntp/camel-nntp-newsrc.c - (camel_nntp_newsrc_group_get_num_articles_read): new function. - (camel_nntp_newsrc_group_get_highest_article_read): robustification. - -2000-10-10 Joe Shaw - - * providers/imap/camel-imap-store.c - (parse_list_response_as_folder_info): Check before dereferencing the - sep pointer. - -2000-10-10 Jacob "Ulysses" Berkman - - * camel-*.c: teach camel about "its" vs. "it's" - -2000-10-09 Chris Toshok - - * providers/nntp/camel-nntp-store.c (finalize): write out the - newsrc. - (nntp_store_get_name): if @brief, just return host. - - * providers/nntp/camel-nntp-newsrc.c: robustification and bug - fixes. - -2000-10-06 Jeffrey Stedfast - - * camel-folder-summary.c (camel_summary_format_address): Decode - the resulting string. - -2000-10-06 Chris Toshok - - * providers/nntp/camel-nntp-grouplist.c: new file. - - * providers/nntp/camel-nntp-grouplist.h: new file. - - * providers/nntp/camel-nntp-types.h: new file. - -2000-10-06 Jeffrey Stedfast - - * camel-mime-utils.c (quoted_encode): Fix so that we don't encode - every single char in the word. Also, do we need a safemask? I - don't see why we would. - (header_encode_string): Don't strip off the last char!! - -2000-10-06 Chris Toshok - - * providers/nntp/Makefile.am (libcamelnntpinclude_HEADERS): add - camel-nntp-grouplist.h - (libcamelnntp_la_SOURCES): add camel-nntp-grouplist.c - - * providers/nntp/camel-nntp-provider.c: add our own hash functions - for nntp urls. - - * providers/nntp/camel-nntp-newsrc.c - (camel_nntp_newsrc_group_is_subscribed): new function. - (camel_nntp_newsrc_subscribe_group): new function. - (camel_nntp_newsrc_unsubscribe_group): new function. - - * providers/nntp/camel-nntp-newsrc.h: add prototypes for - _group_is_subscribed, _subscribe_group, and _unsubscribe_group. - - * providers/nntp/camel-nntp-store.c - (build_folder_info_from_grouplist): new function. - (nntp_store_get_folder_info): add subscribed_only_parameter. if - it's FALSE, load the grouplist and call - build_folder_info_from_grouplist. - (nntp_store_folder_subscribed): implement. - (nntp_store_subscribe_folder): implement. - (nntp_store_unsubscribe_folder): implement. - (camel_nntp_store_init): add CAMEL_STORE_SUBSCRIPTIONS to the - store's flags. - - * providers/mh/camel-mh-store.c (get_folder_info): add - subscribed_only parameter. - - * providers/mbox/camel-mbox-store.c (get_folder_info): add - subscribed_only parameter. - - * providers/imap/camel-imap-store.c (get_folder_info): add - subscribed_only parameter. - - * camel-store.c (camel_store_supports_subscriptions): new function. - (camel_store_folder_subscribed): new function. - (camel_store_subscribe_folder): new function. - (camel_store_unsubscribe_folder): new function. - - * camel-store.h: add prototypes and virtual functions for the - subscribe implementation. also, add a subscribed_only argument to - camel_store_get_folder_info. - -2000-10-05 Jeffrey Stedfast - - * camel-mime-utils.c (header_address_list_format_append): Encode - the name part of the address and don't quote the name. - (header_decode_text): Rewrote from scratch, the old code was badly - broken. - -2000-10-05 Jeffrey Stedfast - - * camel-mime-message.c (camel_mime_message_set_reply_to): Use the - camel_address_encode function again. - (camel_mime_message_set_from): Same. - -2000-10-05 Jeffrey Stedfast - - * camel-mime-utils.c (quoted_encode_step): Modified to not encode - space chars in the middle of a line. - (isblank): New macro if we're not on a system with the GNU isblank - extension. - - * camel-mime-message.c (camel_mime_message_set_from): Reversed my - changes, don't header_encode_phrase - it generates broken headers. - (camel_mime_message_set_reply_to): Same. - -2000-10-04 Chris Toshok - - * providers/nntp/camel-nntp-utils.c (camel_nntp_get_headers): - revert to old method (only use XOVER if OVER is supported.) - - * providers/nntp/camel-nntp-store.c - (camel_nntp_store_get_overview_fmt): handle the case where the - OVER extension isn't listed but LIST OVERVIEW.FMT works (again, - INN 2.2). enable the OVER extension in this case. - -2000-10-04 Chris Toshok - - * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): return a - gboolean so we can tell if this command worked. we can't key off - the OVER extension being present because at least one server (INN - 2.2) doesn't report the OVER extension but implements the XOVER - command. This could of course just be because I'm a loser for - thinking they were related in the first place. - (camel_nntp_get_headers): always try XOVER first, and if it fails - revert to the slow method. - -2000-10-04 Dan Winship - - * providers/mbox/camel-mbox-store.c (get_folder): Fix a case where - a variable was free'd and then possibly used in an error message. - -2000-10-04 Chris Toshok - - * providers/nntp/camel-nntp-provider.c - (camel_provider_module_init): news: -> nntp:. - -2000-10-04 Chris Toshok - - * providers/nntp/camel-nntp-store.c (nntp_store_get_folder_info): - use "nntp:" instead of "news:" since "news:" urls aren't supposed - to have host/user/port info in them. also, if there's a user - defined in the url, put it in the urls for our folders. - -2000-10-04 Chris Toshok - - * providers/nntp/camel-nntp-auth.c (camel_nntp_auth_authenticate): - borrow some code from the imap provider to query the user for - their password, and pass the user/passwd to nntp. be extra - paranoid and zero out the password before freeing it. - - * providers/nntp/camel-nntp-store.c (camel_nntp_store_init): add - ALLOW_USER/ALLOW_PASSWORD/ALLOW_AUTH to the url flags. - (nntp_store_query_auth_types_generic): return our list of - auth_types. - (nntp_store_query_auth_types_connected): broken, return same as in - query_auth_types_generic. - -2000-10-04 Dan Winship - - * providers/imap/camel-imap-store.c (imap_connect): IMAP4 - (pre-rev1) doesn't support the 'LIST "" ""' idiom, so don't use - it. Just assume the dir_sep is '/'. Shrug. - -2000-10-04 Jeffrey Stedfast - - * camel-mime-message.c (camel_mime_message_set_reply_to): Use - header_encode_phrase instead. - (camel_mime_message_set_from): Same. - -2000-10-04 Not Zed - - * camel-mime-utils.c (header_content_type_is): Handle the case - where ct != NULL, but type and subtype are, and also match that - against text/plain. - - * camel-folder-summary.c: Bump summary file version. - (message_info_save): Save the size from the messageinfo. - (message_info_load): Load the size from the summary file. - (message_info_load): Fixed up the time_t saving/loading. There - was a reason the warning was left there ... obviously nobody could - read the comment "/* warnings, leave them here */", why do i even - bother. - (camel_folder_summary_decode_time_t): Decode a time_t value from - the summary file. - (camel_folder_summary_encode_time_t): Encode a time_t value to the - summary file. - -2000-10-03 Jeffrey Stedfast - - * providers/imap/camel-imap-command.c (camel_imap_command): Quote - the mailbox name when sending a SELECT request otherwise mailboxes - with spaces in their names will cause problems. - - * camel-mime-message.c (camel_mime_message_set_reply_to): encode - before setting. - (camel_mime_message_set_from): Same. - -2000-10-03 Dan Winship - - * providers/imap/camel-imap-command.c: New file containing - camel_imap_command and friends. Major camel_imap_command rewrite - to remove duplicated code, make the parsing of literals be - more safe/correct, deal with RECENT/EXPUNGE responses more - consistently, and make it possible to implement the AUTHENTICATE - command. - - * providers/imap/camel-imap-utils.c (imap_parse_nstring): New - function, to parse an IMAP "nstring". - - * providers/imap/camel-imap-store.c: Move command stuff to - camel-imap-command.c. Update for camel_imap_command changes. - - * providers/imap/camel-imap-folder.c: Update for - camel_imap_command changes. - (imap_append_message): CRLF filter the message before sending it. - - * providers/imap/Makefile.am: Add camel-imap-command.[ch], remove - camel-imap-stream.[ch] for now. - -2000-10-02 Jeffrey Stedfast - - * camel-mime-message.c (camel_mime_message_has_8bit_parts): New - convenience function to determine if there are any 8bit mime parts - in a mime message. - (camel_mime_message_encode_8bit_parts): New convenience function - to recursively reencode all 8bit mime parts to either - quoted-printable or base64 depending on which would be the best - encoding for that part. - - * providers/smtp/camel-smtp-transport.c (smtp_data): If the mime - message contains 8bit parts and the server doesn't support 8bit - transfers, reencode those parts before proceding with the send. - (smtp_mail): If the mime message contains 8bit parts and the - server supports the 8BITMIME extension to SMTP, notify the server - that we'll be sending it 8bit mime parts. - (_send_to): Find out if the message contains 8bit parts. - -2000-10-02 Jeffrey Stedfast - - * providers/smtp/camel-smtp-transport.c (_send_to): Use the - CamelInternetAddress parser. - (smtp_get_email_addr_from_text): deprecated. - -2000-10-02 Dan Winship - - * camel-provider.h: Remove default_ports. - - * camel-remote-store.c (remote_connect): Get default_port from - CamelRemoteStore rather than CamelProvider. - - * providers/{imap,nntp,pop3}/camel-*-store.c: Initialize - CamelRemoteStore::default_port - - * providers/*/camel-*-provider.c: Remove default_ports. - -2000-10-02 Dan Winship - - * camel-folder.[ch]: Remove - camel_folder_{get,free}_subfolder_info, as we want to be able to - scan the whole subfolder tree without having to open any folders, - so this needs to be in CamelStore. Remove can_hold_folders and - can_hold_messages flags; things that don't hold messages are no - longer considered CamelFolders. - - * camel-folder-summary.[ch]: Remove CamelFolderInfo stuff. - - * camel-store.[ch]: Add camel_store_{get,free}_folder_info, as - well as camel_store_free_folder_info_full and ..._nop for default - implementations, and camel_folder_info_free and - camel_folder_info_build as convenience functions. Turn - CamelFolderInfo into a tree structure and also add an "url" - member. - - * providers/*/camel-*-folder.c: Remove subfolder_info and can_hold - stuff. - * providers/*/camel-*-store.c: Add folder_info stuff. - - * providers/imap/camel-imap-folder.c (imap_summary_free): Free the - summary elements with camel_message_info_free, not - camel_folder_info_free. Oops. - - * providers/imap/camel-imap-utils.c: const poison - -2000-09-28 Jeffrey Stedfast - - * providers/smtp/camel-smtp-transport.c: Fixed some memory leaks. - (camel_smtp_transport_init): Initialize supports_8bit to FALSE. - (smtp_helo): If server supports 8bit, set supports_8bit to TRUE. - - * camel-transport.h (struct _CamelTransport): Added variable - gboolean supports_8bit (we'll need this eventually? - see bugzilla - bug #53) - - * providers/smtp/camel-smtp-transport.c - (smtp_get_email_addr_from_text): Ugh, no wonder people were - getting illegal seek warnings *sigh*. I guess I can only blame - myself for this one though :-( - -2000-09-28 Jeffrey Stedfast - - * providers/smtp/camel-smtp-transport.c (_send_to): Don't send the - recipient data through smtp_get_email_addr_from_text - this is a - complete waste. In fact, we don't want to have to use that - function ever. - - * camel-internet-address.c, camel-address.c: Added some gtk-doc - comments. - -2000-09-28 Jeffrey Stedfast - - * camel-mime-utils.c (header_encode_string): Make sure to add the - space char after an encoded word when the encoding is iso-8859-1. - -2000-09-28 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c (imap_get_message): When - getting a literal string response, don't include the \r\n after - the closing } (as in: "... {798}\r\n...") - - * providers/imap/camel-imap-stream.c (stream_read): Same. - -2000-09-28 Not Zed - - * camel-mime-utils.c (header_fold): New function to fold headers. - -2000-09-27 Not Zed - - * camel-mime-parser.c (folder_scan_header): If we had an empty - header, then it must be end of the headers too. - (folder_scan_init): No we dont need to init the outbuf with a nul - terminator. - - * camel-folder-summary.c (camel_folder_summary_set_uid): New - function to reset the uid to a higher value. - - * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync): - "something failed (yo!)" what sort of crap is this? Fixed all the - indenting again, what wanker keeps running stuff through indent? - (message_info_new): Check the uid we loaded off the disk, if it - existed already, assign a new one. If it didn't then make sure - the nextuid is higher. - - * camel-charset-map.c: New file, used to build a large unicode - decoding mapping table, and use it to determine what is the - lowest charset a given word can be encoded with. Uses tables from - libunicode's source. - - * camel-internet-address.c (internet_encode): Use - header_phrase_encode to properly encode the fullname, as required. - refixed indenting. Who keeps doing that? - (camel_internet_address_find_address): Changed fatal return/warnings - into assertions. - - * camel-mime-utils.c (header_raw_append_parse): Check : explicitly - (removed from is_fieldname() macro). - (camel_mime_special_table): Changed to short, so we can represent - more bit types. - (quoted_encode): Take a mask of the safe chars for this encoding. - (header_address_decode): Removed a #warning that makes no sense - anymore. - (header_decode_date): Fixed the 'broken date' parser code, if it - ever decoded it it just threw away the result. - (header_encode_string): Use better charset matching for encoding - strings as well. - -2000-08-31 Not Zed - - * providers/mh/camel-mh-summary.c (camel_mh_summary_sync): Save - the index if we do a sync. - (camel_mh_summary_check): Save the index here too. Probably. - -2000-09-27 Dan Winship - - * providers/imap/camel-imap-store.c (camel_imap_command_extended): - Return untagged data in a GPtrArray rather than a string, since it - saves processing time and is much easier to deal with for several - commands. Update for camel_imap_folder_changed change. - (camel_imap_fetch_command): Update for camel_imap_folder_changed - change. - (imap_connect, imap_folder_exists): Update for - camel_imap_command_extended change. - - * providers/imap/camel-imap-folder.c - (imap_get_message_count_internal, - imap_get_subfolder_info_internal, imap_search_by_expression): - Update for camel_imap_command_extended change. - - (imap_get_summary_internal, imap_get_message_info_internal): Use - camel_imap_fetch_command here now to get around the - camel_imap_command_extended change. - - (camel_imap_folder_changed): turn expunged into a GArray of ints - rather than a GPtrArray of strings representing ints. - -2000-09-26 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c - (imap_get_message_count_internal): Quote the folder name as it may - contain spaces. - (imap_get_subfolder_info_internal): Same. - - * providers/imap/camel-imap-utils.c (imap_parse_list_response): Do - proper unquoting for folder names. - (func_get_current_date): Implemented. - - * providers/imap/camel-imap-store.c - (imap_folder_exists): Quote the folder name as it may have spaces. - (imap_create): Same. - (check_current_folder): Same. - -2000-09-22 Dan Winship - - * providers/imap/camel-imap-folder.c - (imap_get_subfolder_info_internal): The root folder's name is "", - not the namespace. - (camel_imap_folder_new): constify folder_name. - - * providers/imap/camel-imap-store.c (get_folder): Create the - folder with folder_name, not folder_path. - (camel_imap_command_preliminary): Don't free cmdid here. - -2000-09-21 Dan Winship - - * providers/imap/camel-imap-utils.c (imap_create_flag_list): New - function to convert Camel flags to an IMAP flag_list. - (imap_parse_flag_list): Contrariwise. - - * providers/imap/camel-imap-store.c (camel_imap_command_*): Make - the @ret arg actually optional, as (mostly) documented. - (various): Don't pass "&result" to camel_imap_command_* if we're - just going to immediately free it. Don't record status if we're - not going to look at it. - - * providers/imap/camel-imap-folder.c: Likewise. - (imap_summary_free): Use camel_folder_info_free. - (imap_sync): Use imap_create_flag_list. Clear - CAMEL_MESSAGE_FOLDER_FLAGGED after syncing so we don't keep - re-syncing. - (imap_append_message): Use imap_create_flag_list. Don't leak the - memstream if the append fails. - (imap_move_message_to): Use camel_folder_delete_message rather - than doing it by hand. - (imap_get_summary_internal, imap_get_message_info_internal): Use - imap_parse_flag_list and header_raw_clear. - (camel_imap_folder_changed): Use camel_message_info_free. - -2000-09-21 Dan Winship - - * providers/imap/camel-imap-store.c (get_folder_name): INBOX is - case-insensitive. - (get_root_folder_name): Make the root folder "" rather than "/". - (get_folder): Update for root folder name change. - (camel_imap_store_get_toplevel_dir): Removed. (Unused, unneeded.) - (camel_imap_store_folder_path): New function to turn a Camel - folder name into the corresponding namespaced IMAP path. - (imap_folder_exists): Make this take a store and a path rather - than a folder. - (imap_create): Likewise - (get_folder): Update for camel_imap_store_folder_path and other - changes. - (check_current_folder): Likewise. - - * providers/imap/camel-imap-folder.c: Change a bunch of CamelStore - variables to CamelImapStore (and add a few more) to prevent excess - gratuitous casting. Use camel_imap_store_folder_path where - appropriate. - (camel_imap_folder_new): Update for root folder name change. - -2000-09-19 Jeffrey Stedfast - - * providers/smtp/camel-smtp-transport.c (smtp_data): Use the - linewrap filter to achieve full RFC0821 compliance. - - * camel-mime-filter-linewrap.[c,h]: New mime-filter to word-wrap. - -2000-09-19 Jeffrey Stedfast - - * camel-internet-address.c (internet_encode): When encoding the - internet address, quote the name as the name may have commas or - any other token which may later confuse our address parser. - -2000-09-19 Dan Winship - - * providers/imap/camel-imap-folder.c - (imap_get_subfolder_info_internal): Fix the case where INBOX - isn't returned in the folder listing. - -2000-09-19 Dan Winship - - * camel-folder.c: (init): Removed - (camel_folder_init, camel_folder_construct): New object init - function and public object constructor to replace the old init - method in a more Gtk-like fashion. - - (get_parent_folder, camel_folder_get_parent_folder): Removed. No - CamelFolder subclass was ever setting the parent_folder member, no - code has ever needed to look at it, and fixing it would actually - be pretty hard. - - (get_subfolder_info, camel_folder_get_subfolder_info): Renamed - from ..._names. Deals in CamelFolderInfo now. - (free_subfolder_info, camel_folder_free_subfolder_info): Likewise. - - (get_subfolder, camel_folder_get_subfolder): Removed. - CamelFolderInfo contains the subfolder's full name, so this is - unnecessary now, and removing it lets us get rid of the - CamelFolder separator member, which is needed for the default - implementation of this function, but not otherwise needed for most - providers. - - Also, lots of code style fixes. - - * providers/*: Update CamelFolder subclasses for changes, although - none of them fill in the message counts in the CamelFolderInfo - yet. - -2000-09-18 Christopher James Lahey - - * camel-folder-search.c, camel-folder-search.h, - camel-remote-store.c, providers/imap/camel-imap-folder.c, - providers/imap/camel-imap-store.c: Fixed the #include lines to - deal properly with gal. - -2000-09-17 Dan Winship - - * camel-folder-summary.h: update CamelFolderInfo - * camel-folder-summary.c (camel_folder_info_free): New function to - free the contents of a CamelFolderInfo - -2000-09-15 Dan Winship - - * camel.c (camel_init): Set camel_verbose_debug to TRUE if - CAMEL_VERBOSE_DEBUG is set in the environment. - - * camel-remote-store.c (remote_send_line, remote_recv_line): only - log if camel_verbose_debug is TRUE. - -2000-09-14 Jeffrey Stedfast - - * providers/imap/camel-imap-store.c (get_folder): Don't use - dir_sep as top-level directory, use "/". - - * providers/imap/camel-imap-folder.c (imap_expunge): Get rid of - unused variable. - -2000-09-13 Dan Winship - - * providers/imap/camel-imap-folder.c (imap_expunge): Don't look at - the response of the command. camel_imap_command_extended() - processes EXPUNGE responses itself, so if we do it here too we - remove twice as many summary items as we should. - -2000-09-13 Jeffrey Stedfast - - * providers/imap/camel-imap-store.c (imap_folder_exists): Rewrote - to take a third argument (gboolean *selectable) so that we can - find out if the folder is selectable or not as we look to see if - it exists. Also, don't use EXAMINE because that will not work on - non-selectable folders, so use LIST instead. - (get_folder): Check to see if the folder exists even vefore - calling imap_create as this will save time. If the folder does - exist, find out if it's selectable. Moved the call to refresh_info - here. - - * providers/imap/camel-imap-folder.c (imap_get_uids): Check for a - NULL summary. - (camel_imap_folder_new): Don't call refresh_info here - call it in - get_folder() because we don't know if this folder even exists on - the server yet! And even if it does, we don't know if it can hold - messages or not yet. - -2000-09-12 Jeffrey Stedfast - - * camel-mime-parser.c (folder_scan_step): Make sure *datalength is - > 0 before calling camel_mime_filter_filter otherwise we will get - a segfault if the filter calls iconv(). - -2000-09-08 Christopher James Lahey - - * providers/nntp/camel-nntp-auth.c, - providers/nntp/camel-nntp-auth.h: Fixed a warning. - -2000-09-07 Dan Winship - - * camel-session.c (camel_session_get_storage_path): Make this not - leak. - -2000-09-07 Dan Winship - - * camel-session.c (camel_session_new): Make this take a path to a - directory that Camel can use for its own nefarious purposes. - (camel_session_get_storage_path): New function to return a path - that a service can use for its own nefarious sub-purposes. - - * camel-service.c (camel_service_get_path): New method (and - useful default implementation) to get a (relative) pathname - corresponding to the service. - -2000-09-06 Dan Winship - - * providers/pop3/camel-pop3-store.c (connect_to_server): Make KPOP - work again. - -2000-09-06 Jeffrey Stedfast - - * camel-mime-message.c (camel_mime_message_get_received_date): - Implemented (someone added these to camel-mime-message.h but never - implemented them!!) - though it may not be right. - (camel_mime_message_get_sent_date): Same. - -2000-09-05 Dan Winship - - * camel-mime-part.c (camel_mime_part_get_filename): If a MIME part - has no Content-Disposition, but does have a "name" on the - Content-Type, return that as the filename. - (process_header): strstrip the Content-Description - -2000-09-05 Chris Toshok - - * providers/nntp/camel-nntp-utils.c (get_OVER_headers): care about - response code. - (get_HEAD_headers): same. - (camel_nntp_get_headers): same. - - * providers/nntp/camel-nntp-store.h: get rid of - CAMEL_NNTP_OK/ERR/FAIL. - - * providers/nntp/camel-nntp-store.c - (camel_nntp_store_get_extensions): take CamelException arg and - pass along to camel_nntp_command. - (camel_nntp_store_get_overview_fmt): same. - (nntp_store_connect): convert to using constants in - camel-nntp-resp-codes.h - (nntp_store_get_folder): make use of camel_nntp_folder_new. - (camel_nntp_command_send_recv): new function to deal with auth - challenge. - (camel_nntp_command): split out most of this function into - camel_nntp_command_send_recv. also, return the actual response - code instead of CAMEL_NNTP_OK/ERR/FAIL. - - * providers/nntp/camel-nntp-resp-codes.h: new file. - - * providers/nntp/camel-nntp-folder.h: prototype for - camel_nntp_folder_new. - - * providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new): new - convenience function. - (nntp_folder_get_message): care more about the actual response - code. - - * providers/nntp/Makefile.am (libcamelnntp_la_SOURCES): add - camel-nntp-auth.c. - (libcamelnntpinclude_HEADERS): add camel-nntp-auth.h. - - * providers/nntp/camel-nntp-auth.h: new file. - - * providers/nntp/camel-nntp-auth.c: new file. - -2000-09-05 Peter Williams - - * providers/imap/camel-imap-store.c (imap_folder_exists): Don't free the - result on error; the exception will have the relevant info. - - * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Check for - exceptions here. - - * providers/imap/camel-imap-store.c (imap_connect): Check the exception - on the refresh_folders call. - - * providers/imap/camel-imap-store.h: Clean up some now-unused fields. - - * camel.c (camel_init): Call unicode_init again, now that libunicode - will not initialize itself twice. - -2000-09-02 Lauris Kaplinski - - * camel-folder-search (search_header_contains): Use e_utf8_strstrcase - -2000-09-01 Christopher James Lahey - - * providers/imap/camel-imap-utils.c: Removed some unused - functions. - -2000-09-01 Peter Williams - - * providers/nntp/camel-nntp-store.c (camel_nntp_command): Initialize - the statically-allocated CamelException so that it doesn't contain - junk data that camel_exception_set() may try to free. - (camel_nntp_store_get_extensions): Same. - (camel_nntp_store_get_overview_fmt): Same. - - * providers/pop3/camel-pop3-store.c (camel_pop3_command): Typo - fix (if (*ret) -> if (ret)). - - * providers/pop3/camel-pop3-store.c (pop3_connect): Set the - port # back to what was specified ASAP, so that the hash of - the URL doesn't change (which causes a failure in - service_cache_remove that leads to a segfault). - - * providers/imap/camel-imap-store.c (imap_connect): Clear the - exception after a failed LOGIN so that it doesn't pass through - to the upper level and make mail think that the login failed. - - * providers/pop3/camel-pop3-store.c (pop3_connect): As above. - -2000-08-31 Peter Williams - - * providers/pop3/camel-pop3-store.c (camel_pop3_store_get_type): - Implement POP3 with the CamelRemoteStore now. - (connect_to_server): Hack this a bit to get KPOP to work. Obey - the new connection semantics of the remote store (implicitly). - (query_auth_types_connected): Clear exceptions after attempts - to connect; the code at the bottom will catch hard errors. - Use camel_service_connect. - (camel_pop3_command): Take a CamelException; now, when an error - occurs, ret is set to NULL and the exception passes back the - appropriate information. - (pop3_get_response): Same as above. - (pop3_try_authenticate): Give camel_pop3_command its exception - and handle it properly. - (pop3_connect): Call the parent classfuncs. Don't disconnect - on error (done for us). - - * providers/pop3/camel-pop3-folder.c: Obey the camel_pop3_command - semantics. - - * camel-remote-store.c (remote_query_auth_types_connected): Don't - warn; just return NULL. - (remote_query_auth_types_generic): Same. - (remote_send_string): Filter out passwords in debugging output. - - * providers/pop3/camel-pop3-store.c (camel_pop3_store_init): Also - set the ALLOW_AUTH flag. - - * providers/imap/camel-imap-store.c (camel_imap_store_init): Same. - -2000-08-31 Chris Toshok - - * providers/nntp/camel-nntp-store.c (camel_nntp_store_class_init): - remove get_folder_name. - (nntp_store_get_folder_name): remove. - -2000-08-31 Lauris Kaplinski - - * camel-mime-part.c (write_to-stream): Use filter only if we have one - -2000-08-31 Chris Toshok - - * providers/nntp/camel-nntp-utils.c (get_OVER_headers): use - camel_remote_store_recv_line. - - * providers/nntp/camel-nntp-folder.c (nntp_folder_get_message): - use camel_remote_store_recv_line to build message. also, free our - buffer so we don't leak like mad. - - * providers/nntp/camel-nntp-store.c: - (camel_nntp_store_get_additional_data) remove. - (camel_nntp_store_get_extensions): use - camel_remote_store_recv_line. - (camel_nntp_store_get_overview_fmt): same. also, don't rely on - _get_additional_data anymore since it's easier to parse without. - (camel_nntp_command): use camel_remote_store_send_string and - camel_remote_store_recv_line. - - * providers/nntp/camel-nntp-store.h: CamelRemoteStore is the - parent class now. remove istream/ostream since CamelRemoteStore - takes care of that for us. also remove the prototype for - camel_nntp_store_get_additional_data. - - * providers/nntp/camel-nntp-newsrc.c (camel_nntp_newsrc_write): - make sure to clear dirty bit. - (camel_nntp_newsrc_read_for_server): don't worry about continually - trying to open the file - if it fails we just return an - unpopulated .newsrc file. - -2000-08-31 Chris Toshok - - * providers/nntp/camel-nntp-newsrc.c - (camel_nntp_newsrc_read_for_server): make this a bit more robust. - try to create an empty .newsrc file for the server if we can't - open it for reading. also, don't allocate everything until we've - opened the file. - - * providers/nntp/camel-nntp-utils.c (get_OVER_headers): make use - of our overview field indices. - (camel_nntp_get_headers): only call get_OVER_headers if the - extension is present. warn if it's not - since get_HEAD_headers - needs work before it works. - - * providers/nntp/camel-nntp-store.c - (camel_nntp_store_get_extensions): new function - query the server - for it's extensions. - (camel_nntp_store_get_overview_fmt): new function - query the - server for the overview format and build our table of the indices - we care about. support the "full" suffix on fields. - (nntp_store_connect): call camel_nntp_store_get_extensions and - camel_nntp_store_get_overview_fmt. - - * providers/nntp/camel-nntp-store.h: add codes for extensions - found on news.mozilla.org. only one that we care about is OVER. - also, add CamelNNTPOverField and an enum of the overview fields - that we care about. - -2000-08-31 Jeffrey Stedfast - - * providers/imap/camel-imap-utils.c (imap_translate_sexp): - Reimplemented. It should now work correctly for most possible - VFolder rules. - -2000-08-31 Jeffrey Stedfast - - * providers/imap/camel-imap-store.c (camel_imap_command_extended): - Don't save any exceptions caused by camel_imap_folder_changed - (camel_imap_fetch_command): Same. - - * providers/imap/camel-imap-folder.c (camel_imap_folder_changed): - Using a new way of calculating the first recent message that seems - more accurate. Also added code to make sure we don't accidently - add a duplicate summary. - -2000-08-31 Not Zed - - * camel-mime-part.c (write_to_stream): Use the proper type - checking function to check for text types. - (write_to_stream): If we have a charset on a text type that - isn't us-ascii or utf-8, then we need to reencode it, so add a - filter to do that too. - (write_to_stream): Fix some warnings/use the right constructor, - oops. - (write_to_stream): Rearrange the logic so it always does charset - conversion, and not just if we have a qp/base64 block. - - * camel-mime-utils.c (append_latin1): New function - even though - its broken, we'll assume mailers send latin1 headers instead of - us-ascii. We just have to encode high chars into utf-8. - (header_decode_text): Call append_latin1 for appending unencoded - text segments. - (append_latin1): Do an additional mask for account for c's - undefined behaviour for sign extension whilst shifting right. - -2000-08-30 Jeffrey Stedfast - - * providers/imap/camel-imap-store.c (camel_imap_fetch_command): - Rewrote to ignore strings that look like server responses until it - is sure that it has finished reading the literal string response. - -2000-08-30 Jeffrey Stedfast - - * camel-remote-store.c (remote_send_string): Don't wrap printed - strings in quotes, makes things messy - - * providers/imap/camel-imap-folder.c (imap_get_message): Updated - to use the camel_imap_fetch_command - - * providers/imap/camel-imap-stream.c (stream_read): Updated to use - camel_imap_fetch_command - - * providers/imap/camel-imap-store.c (camel_imap_command_extended): - No longer handles FETCH requests so no longer needs to be - concerned with checking to make sure that server responses are - valid (they have to be). - (camel_imap_fetch_command): New convenience function that handles - all FETCH requests - -2000-08-30 Peter Williams - - * camel-remote-store.c (remote_connect): Unify with remote_post_connect. - (remote_disconnect): Unify with remote_pre_disconnect. - (camel_remote_store_class_init): Don't use the post_connect and - pre_disconnect classfuncs anymore ; they weren't especially useful. - - * providers/imap/camel-imap-store.c (imap_connect): Use this again - instead of implementing post_connect. - (imap_disconnect): Analogous to above. - - * camel-session.c (camel_session_get_service_connected): New function. - Like camel_session_get_service() but also connects to the service - if needed. camel_session_get_{store,transport} (defined in the header) - used this now, preventing annoying when-to-connect problems. - - * camel-service.c (camel_service_new): Revert to the old behavior - of not connecting until told to do so. Otherwise doing auth - testing correctly is really hard. - (camel_service_connect): Fix behavior here (set the connected - flag). - (camel_service_disconnect): Unset the connected flag. - -2000-08-30 Jeffrey Stedfast - - * providers/imap/camel-imap-store.c: General cleanup / moving - stuff around to make things easier to follow. - -2000-08-30 Jeffrey Stedfast - - * camel-remote-store.c: Prevent exceptions from being overwritten - - * providers/imap/camel-imap-folder.c (imap_expunge): Beautified - (imap_get_subfolder_names_internal): Removed old code as the - replacement code has now been tested and proven to work - -2000-08-29 Jeffrey Stedfast - - * providers/imap/camel-imap-utils.c: Removed old code that will - never be needed again - - * providers/imap/camel-imap-store.c: Removed old code for - try_connect - will never need this code - (slurp_response): Update to make sure we aren't falsely detecting - EXPUNGE flags - -2000-08-29 Peter Williams - - * camel-service.c (camel_service_connect): Uncomment this. - (camel_service_disconnect): Same. - - * camel-remote-store.[ch]: New files. Abstract remote storages - (IMAP, POP3, NNTP) and hides the lower-level networky stuff. - - * camel-service.c (camel_service_new): Take an extra argument, the - provider that created us, cause it's useful. - (camel_service_finalize): Unref our new provider member. - - * camel-session.c (camel_session_get_service): Pass the proper number of - arguments to camel_service_new(). - - * camel-imap-store.c: Massive update: 1) use the CamelRemoteService to - make our life Very Easy (TM). 2) Change the semantics of all - camel_imap_command* functions to take exceptions, centralize tons of - duplicate code, and use the handy RemoteStore utility functions - - * camel-imap-folder.c: Use the new semantics of camel_imap_command* - - * camel-imap-stream.c: Same. - -2000-08-29 Jeffrey Stedfast - - * providers/imap/camel-imap-store.c (camel_imap_command_extended): - Updated to check for EXPUNGE notifications - - * providers/imap/camel-imap-folder.c (camel_imap_folder_changed): - Updated to account for messages which have been expunged (now - takes a new arg, a GPtrArray of message id's that have been - expunged) - (imap_expunge): Updated (we may want to just use the code in - folder_changed now instead of doing our own summary - expunging...but that can be fixed later) - (imap_append_message): Updated. - (imap_copy_message_to): Updated. - (imap_move_message_to): Updated. - -2000-08-28 Peter Williams - - * camel-folder.c (camel_folder_refresh_info): New member function, - refresh_info, used for rereading folder state after its state has - somehow become unknown. Tries to preserve last-known status of - messages. - - * providers/mbox/camel-mbox-folder.c (mbox_refresh_info): Implement - ::refresh_info (split up ::init) - - * providers/mbox/camel-mbox-store.c (get_folder): Call ::refresh_info. - - * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Call - ::refresh_info once initialized. - (imap_refresh_info): New member function; reads the summary from - the server (used to be in camel_imap_folder_new; split out). - - * providers/imap/camel-imap-store.c (imap_connect): Set - CamelService::connected a little early so that - camel_imap_command won't try to connect while already - connnecting. - (camel_imap_command*): Try to connect if not connected already. - - * providers/pop3/camel-pop3-folder.c (pop3_refresh_info): Same as above. - - * providers/pop3/camel-pop3-folder.c (camel_pop3_folder_new): Same - as above. - - * providers/pop3/camel-pop3-store.c (pop3_connect): Set - CamelService::connected a little early so that - camel_pop3_command won't try to connect while already - connecting - (connect_to_server): Same. - - * providers/nntp/camel-nntp-folder.c (nntp_folder_refresh_info): Same - as above. - -2000-08-28 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c (imap_get_message): Fixed the - hack around quoted string responses - should now handle them - according to the specifications in the RFC - - * providers/imap/camel-imap-stream.c (stream_read): Updated to - match the code currently used in camel-imap-folder.c - -2000-08-28 Ettore Perazzoli - - * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync): - Never ever free `tmpname' as it comes from `alloca()'! - -2000-08-26 Ettore Perazzoli - - * camel-mime-utils.c (header_decode_text): Use `g_free()', not - `free()', to free `decword'. - -2000-08-25 Peter Williams - - * camel.c (camel_init): Don't call unicode_init; code in e-util - will do it, and if unicode_init is called twice, you get an - infinite loop when looking up nonexistant encodings (patch - has been submitted to libunicode's maintainer). - - * camel-provider.h: Add a new field, default_ports, which - helps the configuration code guess about how to make CamelURL's - from providers. - - * providers/*/camel-*-provider.c: Specify default ports. - -2000-08-25 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c - (imap_get_subfolder_names_internal): If the url path is "/" and - the folder path is "/", just LIST "" "*" (this should fix some - cyrus imapd problems). Also, INBOX is case insensitive so use - g_strcasecmp - -2000-08-24 Lauris Kaplinski - - * camel-folder-summary.c (summary_build_content_info): - Use UTF-8 as default - * camel-mime-part-utils.c (simple_data_wrapper_construct_from_parser): - Use UTF-8 as default - * camel-mime-utils.c (rfc2047_decode_word): Use UTF-8 - -2000-08-17 Not Zed - - * providers/mh/camel-mh-folder.c (mh_finalize): And here too. - - * providers/mbox/camel-mbox-folder.c (mbox_finalize): Close index - on exit. - -2000-08-23 Dan Winship - - * camel-mime-utils.c (header_address_list_format_append): put - commas between addresses. - -2000-08-22 Dan Winship - - * providers/imap/camel-imap-folder.c - (imap_protocol_get_summary_specifier): use BODY.PEEK, not BODY, so - we don't set the message \Seen. - -2000-08-22 Christopher James Lahey - - * providers/pop3/camel-pop3-store.c: Fixed a small warning. - -2000-08-22 Peter Williams - - * camel-service.c (camel_service_new): Connect automatically if the - URL is not empty. - (finalize): Disconnect automatically if connected. - (camel_service_query_auth_types): Split into two functions; one to - be called if we're connected to an actual server (_connected), one - to be called if we're just gauging the general authtypes supported - (_generic). - (is_connected): Remove. - - * camel-store.c (camel_store_get_folder): Don't connect explicitly to - the service. - - * providers/nntp/camel-nntp-store.c (query_auth_types_generic): Split - the query_auth_types function. Hook it up in _new. - (finalize): Don't try to disconnect here. - - * providers/pop3/camel-pop3-store.c (query_auth_types_generic): Same. - (finalize): Don't try to disconnect here. - - * providers/imap/camel-imap-store.c (query_auth_types_generic): Same. - (finalize): Don't try to disconnect here. - - * providers/smtp/camel-smtp-transport.c (query_auth_types_generic): Split - the query_auth_types (dummy, in this case) function. Hook it up in _new. - (finalize): Don't try to disconnect here. - -2000-08-21 JP Rosevear - - * providers/nntp/camel-nntp-folder.c (nntp_folder_get_subfolder_names): - Make sure newsrc is not null - (nntp_folder_get_subfolder_names): ditto - - * providers/nntp/camel-nntp-newsrc.c - (camel_nntp_newsrc_get_subscribed_group_names): Programming check - for newsrc == NULL - (camel_nntp_newsrc_get_all_group_names): ditto - (camel_nntp_newsrc_write_to_file): ditto - (camel_nntp_newsrc_write): ditto - -2000-08-21 JP Rosevear - - * providers/nntp/camel-nntp-store.c (camel_nntp_command): - Make sure respbuffer is not null before manipulating it. - If it is null, return CAMEL_NNTP_FAIL and a decent error - message. - -2000-08-18 Peter Williams - - * camel-internet-address.c (internet_encode): If the name is "" we - weren't outputting anything; output the address at least. - -2000-08-16 Peter Williams - - * camel-internet-address.c (internet_encode): Fix a leak when - name = "". It's a single-byte leak, but it's the little things - that count. - - * camel-object.c (camel_type_lock_up): Don't leave the type - system locked when a bad unlock happens. - - * providers/mbox/camel-mbox-store.c (get_folder): Fix a leak. - -2000-08-15 Peter Williams - - * providers/imap/camel-imap-folder.c (imap_copy_message_to): Typo fix. - -2000-08-14 Peter Williams - - * camel-folder-search.c (search_get_sent_date): New search function; - returns the time_t when the message was sent. - (search_get_receive_date): Same for when it was received. - (search_get_current_date): Gets the current time for use with the - above two. Is this in the right place? - - * camel-folder-search.h: Add the new functions above to the class. - -2000-08-13 Dan Winship - - * providers/nntp/Makefile.am (libcamelnntpinclude_HEADERS): Add - camel-nntp-utils.h - - * providers/imap/camel-imap-folder.c - (imap_get_subfolder_names_internal): do a strcasecmp rather than - just a strcmp when checking if a folder is "INBOX", since it is - a case-insensitive name. - -2000-08-12 Dan Winship - - * providers/imap/camel-imap-folder.c (imap_get_summary_internal): - Don't assume the FETCH results will come back in the order they - were requested. - (imap_get_subfolder_names_internal): Add "INBOX" to the list as - g_malloc'ed memory, not a static string. - -2000-08-12 Jeffrey Stedfast - - * providers/imap/camel-imap-store.c - (camel_imap_command_continuation): Now takes a char * parameter - rather than a stream - (camel_imap_command_continuation_with_stream): Same function as - above but takes a stream parameter instead - - * providers/imap/camel-imap-folder.c (imap_append_message): Use - camel_imap_command_continuation_with_stream - -2000-08-12 Dan Winship - - * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): New - function to do one round of attempted authentication. - (pop3_connect): Move a bunch of code out into - pop3_try_authenticate and fix some bugs in the edge cases. - -2000-08-12 Jeffrey Stedfast - - * providers/imap/camel-imap-store.c (query_auth_types): No longer - calls try_connect() to get authtypes - -2000-08-11 Jeffrey Stedfast - - * providers/imap/camel-imap-store.c - (camel_imap_command_continuation): Changed param order a bit and - fixed some logic - - * providers/imap/camel-imap-folder.c (imap_append_message): Use - the new multi-transactional convenience functions - -2000-08-11 Jeffrey Stedfast - - * providers/imap/camel-imap-store.c - (camel_imap_command_preliminary): New convenience function for - multi-transactional commands (opening request) - (camel_imap_command_continuation): New convenience function for - multi-transactional commands (followup data) - -2000-08-11 Christopher James Lahey - - * providers/mh/camel-mh-folder.c: Fixed a warning. - -2000-08-11 Chris Toshok - - * providers/nntp/camel-nntp-folder.c - (camel_nntp_folder_class_init): remove get_name and get_full_name - assignments, since the camel-folder.c implementation does what we - need. - -2000-08-11 Chris Toshok - - * providers/nntp/camel-nntp-store.c - (camel_nntp_store_get_toplevel_dir): use g_get_home_dir, since - evolution_dir isn't available in the providers. - -2000-08-11 Peter Williams - - * camel-folder.c (thaw): Fix a bug where the message_changed - signal wasn't being emitted. - -2000-08-11 Not Zed - - * providers/mh/camel-mh-folder.c (mh_set_message_user_tag): - Implement. - (mh_get_message_user_tag): Implement. - - * providers/mbox/camel-mbox-folder.c (mbox_get_message_user_tag): - (mbox_set_message_user_tag): Implement. - - * camel-folder.c (move_message_to): Yay so lets fix an already - fixed fix, again. - (copy_message_to): and here too ... update for api change to append(). - And removed another warning. - (camel_folder_set_message_user_tag): Routine to set message tags. - (camel_folder_get_message_user_tag): And accessor. - -2000-08-10 Christopher James Lahey - - * camel-folder-search.c, camel-folder-summary.c, camel-medium.c, - camel-mime-filter-charset.c, camel-mime-filter.c, - camel-mime-filter.h, camel-mime-message.c, camel-mime-parser.c, - camel-mime-part-utils.c, camel-mime-part.c, camel-mime-utils.c, - camel-movemail.c, camel-multipart.c, camel-object.c, - camel-stream-mem.c, providers/mbox/camel-mbox-folder.c, - providers/mbox/camel-mbox-summary.c, - providers/mh/camel-mh-folder.c, - providers/smtp/camel-smtp-transport.c: Fixed some warnings. - -2000-08-11 Not Zed - - * providers/vee/camel-vee-folder.c (vee_folder_build_folder): Free - the search properly. - (vee_folder_build): And here too. - -2000-08-10 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c (camel_imap_folder_changed): - If we go over the max number of messages, don't keep requesting - new message summaries, just break. - -2000-08-11 Not Zed - - * camel-mime-parser.c (folder_scan_header): A better way to - compress leading whitespace. The code is probably invalid anyway, - I dont think it will work across buffer boundaries. - - * providers/mbox/camel-mbox-folder.c (mbox_append_message): And - write out proper format From lines here too. - - * providers/mbox/camel-mbox-summary.c - (camel_mbox_summary_build_from): New function to build a more - compatible mbox "From " line. - (camel_mbox_summary_sync): Write From lines in the proper format. - -2000-08-10 Not Zed - - * providers/mh/camel-mh-store.c (get_folder): Remove warnin g. - - * providers/mbox/camel-mbox-store.c (xrename): Kill some warnings - with constification. - - * providers/imap/camel-imap-folder.c (imap_append_message): Fixed - for append api change. Eek this routine seriously wastes memory. - - * providers/mh/camel-mh-folder.c (mh_search_free): Impelemnt. - (mh_append_message): Fix for api change, and include user flags - and tags in new message. - - * providers/vee/camel-vee-folder.c (vee_search_by_expression): Fix - for search api change. - - * camel-folder.c (camel_folder_search_free): New function for - freeing search results. - (search_free): Changed my mind, implement a default that actually - does something. Free as to the old interface. - (camel_folder_append_message): Changed to accept a - camelmessageinfo rather than flags, which just doesn't have enough - info in it. - (copy_message_to): Change for append_message api change. - (move_message_to): Likewise. - - * providers/mbox/camel-mbox-folder.c (mbox_search_free): - Implement. - (mbox_append_message): Fix for api change, and also copy user - flags/tags across to new summary. - - * camel-folder-search.c (search_user_tag): A search expression - that returns the current use flag by name. - (camel_folder_search_free_result): New function to free the result - of a search. - - * camel-folder-summary.c: Bump summary version. - (message_info_new): - (message_info_load): - (message_info_save): - (camel_message_info_dup_to): - (camel_message_info_free): Added support for arbitrary tag/value - pairs (CamelTag's). - (camel_tag_get): - (camel_tag_set): - (camel_tag_list_size): - (camel_tag_list_free): Operations for working with CamelTags. - -2000-08-09 Peter Williams - - * camel-store.c (camel_store_get_folder): Connect beforehand, if - necessary. - - * providers/imap/camel-imap-store.c (camel_imap_store_init): Default - the dir_sep to "/" so that certain functions can safely assume that - dir_sep is valid (at least, nonnull). - -2000-08-09 Ettore Perazzoli - - * providers/nntp/camel-nntp-folder.c - (nntp_folder_set_message_flags): Get rid of an unused variable. - - * providers/nntp/Makefile.am (INCLUDES): Fix includes so that we - don't use installed headers anymore. [I copied this over from the - IMAP provider, that does not seem to have this problem.] - -2000-08-09 Not Zed - - * camel-folder-search.c (camel_folder_search_execute_expression): - Reorder search result in summary order if we searched with a - summary. - -2000-08-08 Dan Winship - - * camel-uid-cache.c: New code to keep an on-disk cache of what - UIDs have been seen in a folder. - - * camel-provider.h: Add new flags CAMEL_PROVIDER_IS_SOURCE (mail - can arrive in it by non-Camel means) and CAMEL_PROVIDER_IS_STORAGE - (you can work with mail directly without needing to copy it local). - - * providers/*/camel-*-provider.c: Add flags as needed: imap and - mbox are SOURCE and STORAGE. mh and nntp are just STORAGE, pop3 is - just SOURCE. - - * camel-mime-message.c (process_header): Add another subject - g_strstrip that fejj's earlier commit missed. - -2000-08-08 Peter Williams - - * camel-provider.h: Remove some GTK stuff that I missed. - - * providers/imap/camel-imap-store.c (imap_noop): Turn this - back on with the new timeout interface in CamelSession. - - * camel-session.[ch] (camel_session_register_timeout): New - interface for Camel to register timeouts. Basically the - GTK timeout interface is copied. We do this because Camel isn't - allowed to use GTK anymore. - -2000-08-07 Not Zed - - * providers/mh/camel-mh-folder.c (mh_append_message): Only retry - another uid if we had a name clash, otherwise fail. - -2000-08-07 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c - (imap_get_subfolder_names_internal): If we are trying to get a - subfolder listing of the root folder, always make sure INBOX is - there... - - * providers/imap/camel-imap-utils.c (imap_parse_list_response): - Check for NIL as a directory separator. - -2000-08-07 Peter Williams - - * providers/nntp/Makefile.am: Reorder the INCLUDES to pull - in the camel headers from the local source tree before - the ones in $(includedir). This was causing compile problems - because the installed, Gtk-based camel-object.h was included - before the uninstall Camel-based one. - -2000-08-07 Jeffrey Stedfast - - * providers/imap/camel-imap-utils.c (imap_translate_sexp): Strip - all \n's from the expression - - * string-utils.c (strip): New convenience function to strip - occurences of a single char from a string - - * camel-mime-message.c (camel_mime_message_set_subject): Do a - g_strstrip on the subject so we can stop getting those annoying - leading spaces - -2000-08-07 Dan Winship - - * camel-folder.c (camel_folder_free_deep): Fix this to not require - NULL-termination of the array. - -2000-08-04 Jeffrey Stedfast - - * providers/imap/camel-imap-store.c (imap_connect): If we fail to - get a dir_sep, then supply the default of "/". - (get_folder): Undo changes by Peter - -2000-08-04 Peter Williams - - * providers/imap/camel-imap-store.c (get_folder): Prevent a coredump - when get_folder()ing from a store with dir_sep = NULL. - -2000-08-04 Peter Williams - - * camel-store.h: Include camel-object.h. Ettore said this wasn't - compiling. - -2000-08-04 Not Zed - - * camel-url.c (camel_url_set_protocol): - (camel_url_set_host): - (camel_url_set_path): - (camel_url_set_port): Url editing functions. - -2000-08-04 Dan Winship - - * providers/pop3/camel-pop3-folder.c (pop3_set_message_flags): - (pop3_sync): Indexes into the flags array are message_number minus - 1, not just message_number. - - * providers/pop3/camel-pop3-store.c: add a debugging macro for - doing protocol tracing. - -2000-08-03 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Only - call imap_get_summary_internal if the folder can hold messages - - * providers/nntp/camel-nntp-provider.c (camel_provider_module_init): - Initialize the service_cache for the news/nntp providers - -2000-08-03 Peter Williams - - * providers/nntp/Makefile.am (INCLUDES): Add -I$(top_srcdir) to - pull in libibex/ibex.h - -2000-08-02 Not Zed - - * providers/mh/camel-mh-summary.c (camel_mh_summary_sync): Expunge - from the end, so the index isn't messed up when you remove a - message. - - * providers/mh/camel-mh-folder.c (mh_append_message): Fix a bug - where it would never open an output file/uid. - - * providers/mbox/camel-mbox-store.c (rename_folder): - Implementation for mbox as well. - - * camel-store.c (camel_store_rename_folder): New method to rename folders. - (rename_folder): Default implementation. - - * providers/mh/camel-mh-store.c (delete_folder): Implement this. - (rename_folder): Implement a rename operation. - -2000-08-02 Dan Winship - - * providers/MH: Kill this. It doesn't have any code to do anything - the new mh provider doesn't do better. - - * providers/Makefile.am: Remove reference to MH subdir, and - promote nntp to fully-supported status, since it does compile and - all. - - * camel-mime-message.c (camel_mime_message_set_subject): Trim - trailing space from the subject. I've now seen replies from two - different people that tricked the threading code by (a) not having - References/In-Reply-To, and (b) adding an extra space to the end - of the subject line so the subject-based threading fails too. Who - writes these broken mailers anyway? - -2000-08-01 Jeffrey Stedfast - - * providers/smtp/camel-smtp-transport.c (smtp_helo): When forced - to use the IP, place it in square brackets. - - * providers/imap/camel-imap-utils.c (imap_translate_sexp): New and - improved sexp parser. An honest try at using e-sexp is wrapped in - a #ifdef at the bottom of the file but is currently not used - - * providers/imap/camel-imap-folder.c (imap_search_by_expression): - We want to do a UID SEARCH so we get UIDs back instead of sequence - numbers - -2000-08-01 Not Zed - - * providers/mh: New mh provider implementation. - - * providers/Makefile.am (SUBDIRS): Added mh provider. - -2000-07-31 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c (imap_get_message_info_internal): - Some IMAP servers don't wrap the UID in ()'s so don't depend on that - (imap_get_summary_internal): Same - - * providers/imap/camel-imap-utils.c (free_sexp_node): Oops, forgot to - free node->function - not good. - -2000-07-31 Peter Williams - - * providers/vee/camel-vee-folder.c (vee_search_by_expression): Add - a NULL to the matches pointer array so that g_strfreev knows where - the end is. - -2000-07-31 Jeffrey Stedfast - - * providers/imap/camel-imap-utils.c (imap_translate_sexp): New - convenience function to translate a Camel sexp into the equivalent - IMAP sexp. - - * providers/imap/camel-imap-store.c: More places now use - imap_next_word - - * providers/imap/camel-imap-folder.c (imap_search_by_expression): - Implemented initial version (this may or may not work quite right) - -2000-07-28 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c (imap_expunge): Make sure - the third word/token (whatever) is "EXPUNGE" and not something - else like "EXISTS" or "RECENT". When removing the message from - the summary also make sure to free that data to avoid leakage. - Also make sure to subtract 1 from the 'id' since IMAP starts - at 1 and our summary starts at 0 :-) - -2000-07-28 Jeffrey Stedfast - - * providers/imap/camel-imap-store.c (camel_imap_status): Cleaned - up a bit, now uses imap_next_word() - (camel_imap_command_extended): Now uses imap_next_word(). When - checking for RECENT, allow the first digit of the recent-count - be between 0 and 9 inclusive instead of exclusive. - - * providers/imap/camel-imap-folder.c (imap_expunge): Optimized. - No longer will it need to reload the summary as it now instead - removes the appropriate message summaries from the cache. - (camel_imap_folder_changed): If recent == 0 then return. If - recent < 0 then just emit the folder_changed signal, don't reload - summaries. - -2000-07-28 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c - (imap_get_message_count_internal): Get message count when STATUS - is not available. - (imap_init): folder->has_search_capability is required for IMAP so - should always be set to TRUE (is currently being set to FALSE as - I've not yet implemented SEARCH support). - (camel_imap_folder_changed): Seem to have fixed my optimization - hack - -2000-07-28 Jon K Hellan - - * providers/imap/camel-imap-store.h (CamelImapServerLevel): New - enum. - (CamelImapStore): Added server_level and has_status_capability - members. - - * providers/imap/camel-imap-store.c (imap_connect): Detect - IMAP4REV1, IMAP4 and STATUS in capability response. - - * providers/imap/camel-imap-folder.c - (imap_get_message_count_internal): Use STATUS only if server - supports it. TODO: Get message count when STATUS not supported. - (imap_get_message, imap_get_summary_internal, - imap_get_message_info_internal): Handle IMAP4 as well. - (imap_protocol_get_summary_specifier): New function: Make a data - item specifier for the header lines we need, appropriate to the - server level. - -2000-07-27 Peter Williams - - * camel-mime-utils.c (header_decode_lwsp): More - checks for end of string. - - * providers/imap/camel-imap-store.c: - (imap_command_extended): Free the elements of our - array (huge mem leak) - - * providers/imap/camel-imap-folder.c: - (summary_get_internal): Same as above. - - -2000-07-27 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c (camel_imap_folder_changed): - Fixed my routine to only fetch new headers, my IDs were off by 1 - on the high end, so when it would fetch the last newly arrived - message it would fail and end up fetching all of the summaries - because of the corruption. - -2000-07-27 Jeffrey Stedfast - - * camel-url.c (camel_url_to_string): If the path doesn't begin - with a / and there is a host, prepend a / to the path. - -2000-07-27 Jeffrey Stedfast - - * providers/imap/Makefile.am: Added camel-imap-utils.[c,h] - - * providers/imap/camel-imap-utils.[c,h]: Utilities for parsing - server responses for use in both camel-imap-store.c and - camel-imap-folder.c - - * providers/imap/camel-imap-folder.c (imap_get_summary_internal): - Free all the pointers in the headers array. - (imap_get_subfolder_names_internal): Updated to use - imap_parse_list_response - (imap_parse_subfolder_list): Removed in favor of - imap_parse_list_response - - * providers/imap/camel-imap-store.c (camel_imap_command_extended): - Free all the pointers in the data array. - (imap_connect): Updated to use imap_parse_list_response and fixed - a leak - (folder_is_selectable): Updated. - -2000-07-27 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c (imap_get_message_info): Now - uses a hash table for looking up message info rather than a linear - search :) - -2000-07-27 Peter Williams - - * providers/*/Makefile.am: Don't specify SUBDIRS = - [nothing]. Messes up distcheck. - -2000-07-26 Peter Williams - - * camel-mime-parser.c (folder_scan_init): Initialize - outbuf to be "" -- it's not guaranteed to be zeroed. - - * camel-mime-utils.c (header_references_decode): Return - if the header is NULL -> or "" <-. Don't do our stupid - mailer trick if we point to \0. - (header_decode_quoted_string): Don't rip past end of - string! - -2000-07-26 Dan Winship - - * camel-movemail.c (movemail_external): routine to call an - external movemail program. - (camel_movemail): Nuke return value, use movemail_external when - available and useful, and don't delete "dest" on errors, since - it might have started non-empty. - -2000-07-26 Jeffrey Stedfast - - * camel-url.c (camel_url_to_string): Should now always prepend a '/' - before the path if it doesn't already exist. - - * providers/imap/camel-imap-folder.c: Fixed a few compiler warnings - -2000-07-25 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c (imap_summary_free): Fixed the - real problem that Peter was running into. - -2000-07-25 Dan Winship - - * camel-mime-message.c (write_to_stream): Don't add a Mime-Version - header to a message that already has one. - - * camel-internet-address.c (internet_encode): Don't put <>s around - addresses with no name part. - -2000-07-25 Peter Williams - - * providers/imap/camel-imap-folder.c (imap_expunge): Set - imap_folder->summary to NULL after calling imap_summary_free, - so we don't get stuck with a junk summary pointer. Should - we free it at all? - -2000-07-25 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c (camel_imap_folder_changed): - Optimized to try and get the new message headers without reloading - the entire summary from scratch. - (imap_get_summary_internal): Will now sync() before attempting to - reload the summary so that flags are set in the reloaded summary - as well. - -2000-07-24 Jeffrey Stedfast - - * providers/imap/camel-imap-store.c (get_folder): Updated to give - special attention to the root folder. - - * providers/imap/camel-imap-folder.c - (imap_get_subfolder_names_internal): Updated to handle the root - folder - (imap_get_message_count_internal): return 0 if folder can't hold - messages - (camel_imap_folder_new): Change so that root folder gets special - attention and always gets can_hold_messages set to FALSE - -2000-07-24 Dan Winship - - * camel-folder.c: Remove exceptions from a number of methods that - work on what ought to be static data: get_parent_folder, - get_parent_store, get_message_count, get_unread_message_count, - get_permanent_flags, get_message_flags, set_message_flags, - get_message_user_flag, set_message_user_flag, get_uids, - get_summary, get_subfolder_names. Turn camel_folder_delete_message - into a macro. (Mostly a pull-up from the camel-async branch.) - - * providers/{imap,mbox,nntp,pop3,vee}: Update for CamelFolder - changes - -2000-07-24 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c (imap_get_message_info): Updated - to port easily to the new Camel API - (imap_init): Don't SELECT INBOX, we don't need to do that - -2000-07-24 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c (camel_imap_folder_new): - Initialize the summary and subfolder listing. - (imap_summary_free): Now takes a GPtrArray arg rather than a - CamelImapFolder as it increases it's usefullness for free()'ing - temporary summaries. - (imap_get_message_count_internal): A new convenience function for - getting the actual message count on a server to be used by - imap_get_summary_internal) - (imap_get_message_count): Since the Camel API is on the move again, - the future version of this function will not be able to make a - call to the store, it must only access previously fetched data (thus - the creation of the _internal function) - (imap_get_subfolder_names_internal): Again, because the future version - of imap_get_subfolder_names will not take an exception, we must rename - this function which will be called by camel_imap_folder_new() - (imap_get_subfolder_names): We now return the previously collected - subfolder listing that the _internal function fetched previously - (imap_get_summary_internal): Again, same idea as the previous _internal - functions... - (imap_get_summary): Again... now returns a previously aquired summary - - * providers/imap/camel-imap-store.c (imap_noop): This will hopefully - prevent the imap store from disconnecting. - (imap_connect): Modified to add a gtk timeout event that will call - imap_noop() every 10 minutes (we may want to change this time value) - (imap_disconnect): Modified to remove the NOOP timeout event from the - store. - (camel_imap_command_extended): Commented out the code that would try - and detect if the store was disconnected and then reconnect if it was - needed. - -2000-07-24 Dan Winship - - * camel-folder.[ch]: Remove camel_folder_get_message_uid, which - was not used, and not implemented by any provider. - - * providers/nntp/camel-nntp-folder.c: Remove get_message_uid - non-implementation. - - * camel-folder-pt-proxy.[ch], camel-arg-collector.c, - camel-marshal-utils.[ch]: Bye bye bye. - - * Makefile.am: remove reference to camel-arg-collector.c - -2000-07-23 Jeffrey Stedfast - - * providers/imap/camel-imap-store.c (imap_disconnect): Made it a - little more forgiving. Also set current_folder to NULL as there is - no selected folder after a disconnect. - (stream_is_alive): Detects whether or not a socket is "alive" - (camel_imap_command_extended): Use stream_is_alive() to aid in the - detection of a disconnected state. - -2000-07-22 Jeffrey Stedfast - - * providers/imap/camel-imap-store.c (get_folder): Clear - CamelExceptions when appropriate (eg when folder is marked as - \NoSelect). Still needs some cleanup and perhaps Dan will have a - better way of doing this as this seems like a messy way of - handling this. - - * providers/imap/camel-imap-folder.c (imap_get_uids): Took out - some debug statements as they are no longer needed. - -2000-07-21 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c (imap_get_subfolder_names): - Updated to not strip out subfolders that are marked as \NoSelect - because this will be correctly handled in store->get_folder from - now on. - - * providers/imap/camel-imap-store.c (folder_is_selectable): New - convenience function for use in get_folder(). - (parse_list_response): Now takes a char **flags argument which is - needed by folder_is_selectable(). - (imap_connect): Updated to reflect changes to - parse_list_response(). - -2000-07-21 Jeffrey Stedfast - - * providers/imap/camel-imap-stream.c (stream_read): Updated with - some of the same fixes I've made to camel-imap-folder.c like - recalculating message part lengths. - - * providers/imap/camel-imap-store.c (camel_imap_command_extended): - Rewrote the code to check for "* %d RECENT". Still needs to be - modified, but should no longer cause an infinite loop by detecting - mis-detecting RECENT messages. - -2000-07-20 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c (imap_get_summary): - (imap_get_message_info): Oops. Fix UID parser to allow 0 and 9 to - be in the range of valid UID chars. - -2000-07-20 Peter Williams - - * camel-object.c (camel_object_unref): Add a new global mutex - 'refcount' held when refcounting operations occur. - -2000-07-19 Peter Williams - - * camel-object.c (camel_type_lock_up): Correct the recursiveness; - the locklevel is stored as a private, so each thread has its own - idea of the locklevel. Thus one thread can relock, but a different - one will think that it's a level 0 and try to lock the type_system - mutex. - -2000-07-19 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c: General cleanup working - towards getting Actions->Expunge working correctly. - - * providers/imap/camel-imap-store.c - (cammel_imap_command_extended): Added code to look for "* %d - RECENT" and to emit the folder_changed signal if there are any - recent messages. Note: this is a hack and needs to be rewritten - badly. - -2000-07-19 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c (imap_get_summary): If the - folder's message count is not the same as the number of summaries, - free the old summary and create a new summary. - -2000-07-18 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c - (camel_imap_folder_class_init): Added in - imap_[g,s]et_message_user_flag() methods - (imap_get_message_info): Rewrote to use the more efficient way of - downloading summary information and also added a UID comparison so - that if the UID requested doesn't match the UID received, it - returns NULL. FIXME: When the mailer gets NULL when it requested - message info, it seems that it displays a row for that message and - when you try and select the blank row, it segfaults. - - * providers/imap/camel-imap-store.c (get_folder): Oops, this - should not be checking against "/", it should be checking against - dir_sep. - - * providers/imap/camel-imap-folder.c (imap_parse_subfolder_line): - Updated to trim out the leading namespace. - (imap_get_subfolder_names): Let the subfolder parser trim the - namespace off the folder name. - -2000-07-17 Peter Williams - - * camel-object.c (camel_type_lock_up): New function; the - Camel type_system lock is now fakey-recursive, being controlled - by a semaphore that goes up and down and is protected by another - lock. Theoretically all we need is the lock on the semaphore, - but this we catch exceptions "better" (by deadlocking). - (camel_type_lock_down): Corresponding to above. - (all functions): s,G_LOCK,camel_type_lock_up, etc. - -2000-07-17 Jeffrey Stedfast - - * providers/imap/camel-imap-store.c (imap_disconnect): Send a - "LOGOUT" command. - - * providers/imap/camel-imap-folder.c (imap_get_message): Hacks to - get IMAP code to work with CommunigatePro and MS Exchange (and any - other servers that send back a UID at the end of each FETCH inside - of the main body of the message part). - (imap_sync): Un-#if 0 the code that sets the flags on the IMAP - server for messages that have changed. Oops, don't mask with - DELETED to find out if the message has been answered ;-) - (imap_expunge): sync before expunging. - -2000-07-16 Jeffrey Stedfast - - * providers/imap/camel-imap-store.c: All SELECT calls now pass - a NULL folder argument to camel_imap_command_extended() since it's - not needed. - (imap_connect): Moved service_class->connect() to the point right - after a connection is established with the server rather than - waiting until the end of the function. - (camel_imap_command): Updated the documentation comment - (camel_imap_command_extended): Before sending a command, first - check to make sure we are connected; if we aren't, then reconnect. - Don't strncmp() command with "SELECT" as it's redundant. - - * providers/imap/camel-imap-folder.c: All SELECT calls now pass - a NULL folder argument to camel_imap_command_extended() since it's - not needed. Also s/camel_imap_command/camel_imap_command_extended as - I will probably be doing away with camel_imap_command() or at least - only using it for LOGIN and similar commands where the server won't - notify us of any recent messages. - -2000-07-15 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c (camel_imap_folder_new): - One last fix to get rid of hard-coded "/" directory separators - -2000-07-14 Peter Williams - - * camel-object.c : Implement 'events', which are suspiciously - like signals except without all the marshalling baggage, and - with quasi-thread-safety. - (camel_object_class_declare_event): New func. - (camel_object_hook_event): Ditto. - (camel_object_trigger_event): Ditto. - (obj_class_init): Declare the "finalize" event. - (obj_class_finalize): Free the hashtable of events->preps - (obj_finalize): Free the hashtable of events->hooklists - (camel_object_unref): Trigger the finalize event (ourselves, - to prevent massively unpleasant looping things.) - -2000-07-14 Peter Williams - - * camel-object.c (make_global_classfuncs): Change to return - a CamelObjectClass. Change parents to a GSList and free it - when done. - (camel_object_new): Don't allocate a classfuncs for every object; - merely give it a reference to the global_classfuncs. Convert - parents to a GSList and free it when done. - (camel_object_unref): Don't free the classfuncs. Free the parents - list, which is changed to a GSList. - -2000-07-14 Jeffrey Stedfast - - * string-utils.c (string_unquote): New convenience function - to unquote a string if it's encapsulated by "'s - - * providers/imap/camel-imap-folder.c: - * providers/imap/camel-imap-store.c: Made the necessary changes - to stop using hard coded directory separators. - -2000-07-13 Dan Winship - - * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_load): - If the summary is for a smaller mbox, and rebuilding from the - last-known end position fails, try rebuilding from the beginning. - Deals with the case where the user edits the mbox and makes it - bigger, without adding new messages. - -2000-07-13 Peter Williams - - * camel-object.c: Rewritten to not be based on GtkObject, - but a tiny threadsafe ripoff thereof. Objects still cannot - be shared across threads, but ref/unref/destroy/new/etc - will work. Signals are not implemented because doing it - robustly would be a major pain in the butt, but class - functions are. There's a small demonstration that it doesn't - crash in ./temp-test.c: build it with ./make-test.sh. - * camel-stream.c, camel-seekable-stream.c, camel-stream-mem.c: - moved over to CamelObject. Proof of concept: two levels of - subclass and class functions, all working without coredumps. - To port to CamelObject: - - s,GTK_,CAMEL_,g in the cast checks - - s,gtk_type_new,camel_object_new,g - - s,GtkType,CamelType,g - - Change get_type function over to camel_type_declare - - instead of hooking to finalize function, it goes into the - type declaration. - - remove signals. - - instead of GTK_OBJECT(so)->klass, CAMEL_OBJECT_GET_CLASS(so) - - s,gtk_type_class,camel_type_get_global_classfuncs,g - - don't chain finalize handlers; it will be done for you - -2000-07-13 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c: - * providers/imap/camel-imap-store.c: If a SELECT fails, set - imap_store->current_folder to NULL so a SELECT is forced before - any message/folder operations are requested. Also, because some - users don't use a namespace, make sure that if the url->path is - "/" we don't use it when creating the folder_path. - (camel_imap_command[_extended]): Since we allow the passing of - a NULL folder which we can use to bypass a forced SELECT, no need - to check for the individual commands that don't require a folder - to be selected. - -2000-07-13 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c: - * providers/imap/camel-imap-store.c: Updated to use CAMEL_IMAP_OK, - CAMEL_IMAP_NO, CAMEL_IMAP_BAD, and CAMEL_IMAP_FAIL rather than the - ones copied from the POP3 provider. - -2000-07-13 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c (imap_get_summary): Oops. - If the number of messages in the folder is 0, don't fetch - summaries 1 thru 0, just return an empty summary. - (imap_copy_message_to): Fixed to use message UID and also send - the source folder as an arg to camel_imap_command rather than NULL. - (imap_move_message_to): Same. - (imap_init): If SELECT is successful, we need to set the current - folder to the one selected, this was causing problems with move/copy - -2000-07-13 Dan Winship - - * camel-service.h: define a set of CAMEL_SERVICE_URL_ALLOW_* flags - parallel to the _NEED_* flags, and make the _NEED_* flags imply - the _ALLOW_* ones. - - * providers/imap/camel-imap-store.c (camel_imap_store_init): imap - urls ALLOW_PATH - -2000-07-13 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c (imap_get_summary): New - and improved approach to fetching an entire folder summary - that should be much much faster than the old way as it gets - the entire folder summary in 1 shot rather than requesting - message by message. As with the last update, this version - also only fetches the minimum number of header fields. - (imap_get_summary): Oops, forgot to free the temp - GPtrArray *headers - -2000-07-13 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c (imap_get_summary): Don't - fetch the entire RFC822 header, just fetch the fields we want. - (imap_get_message_info): Same. - -2000-07-13 Not Zed - - * camel-mime-filter-basic.c (camel_mime_filter_basic_new_type): - Reset filter on setup. - (reset): When resetting qp encoding, set the state to -1, instead - of 0. - - * camel-mime-utils.c (quoted_encode_step): Actually count the - characters output sofar (it never counted any). Bunch of other - fixes. - (quoted_encode_close): Also flush out final character, if there's - one. - -2000-07-12 Jeffrey Stedfast - - Chris forgot to add #include to the source files - - * providers/imap/camel-imap-store.c (imap_connect): Fixed Peter's - fix, we don't want to send a string to a %d. - -2000-07-12 Christopher James Lahey - - * camel-folder-search.c, providers/imap/camel-imap-store.c: - Changed from strstrcase to e_strstrcase. - - * string-utils.c, string-utils.h: Removed strstrcase (in favor of - e_strstrcase in e-util/e-util.c.) - -2000-07-12 Chris Toshok - - * providers/nntp/camel-nntp-folder.c - (nntp_folder_set_message_flags): get the article num out of our - uid and mark it read in the newsrc. - (nntp_folder_get_message): get the message id out of the uid to - fetch the article. - - * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): the uid - is now , - (get_HEAD_headers): same. - - * camel-mime-parser.c (folder_scan_step): go to HSCAN_MESSAGE - state when ct->subtype is "news" as well as "rfc822". this makes - attachments of type "message/news" display properly. - -2000-07-12 Dan Winship - - * camel-folder.c (camel_folder_free_deep, - camel_folder_free_shallow, camel_folder_free_nop): Useful default - implementations for free_{uids,subfolder_names,summary}. - (free_subfolder_names, free_uids): Make these g_warning-ing - default implementations. - - * providers/*/camel-*-folder.c: Use the new functions where - appropriate, remove duplicated code. - -2000-07-12 Peter Williams - - * providers/imap/camel-imap-store.c (query_auth_types): Check for - NULL parameters when setting the exception so as to not crash on - Solaris (can't handle a %s passed NULL). - (imap_connect): Same. - -2000-07-12 Jeffrey Stedfast - - * providers/mbox/camel-mbox-folder.c (mbox_delete_message): Use - mbox_set_message_flags () instead of setting the flags by hand. This - fixes the problem of the "message_changed" signal not being emitted - at the correct time. - - * providers/imap/camel-imap-folder.c: "folder_changed" signals should - pass a third argument (which is ignored). - - * camel-folder.c: Undo gtk signal emits done in set_flags and - expunge. - (move_message_to): - (copy_message_to): Create info as a const CamelMessageInfo - -2000-07-12 Chris Toshok - - * providers/nntp/Makefile.am: don't add test-newsrc to the build - since it needs libcamel (which isn't built at the time test-newsrc - needs linking.) - - * providers/nntp/camel-nntp-utils.c (get_HEAD_headers): fill in - MessageInfo->message_id. - (get_XOVER_headers): same. - - * providers/nntp/camel-nntp-folder.c (nntp_folder_init): move - summary loading here. - (nntp_folder_sync): summary/newsrc changes should be stored here. - put a comment to that effect. - (nntp_folder_set_message_flags): don't save the newsrc here. - (nntp_folder_get_uids): use g_ptr_array_index instead of the - cast/addition. - (nntp_folder_get_summary): no need to check if we should generate - the summary here. already done. - (nntp_folder_get_message_info): implement. - - * providers/nntp/camel-nntp-store.c - (camel_nntp_store_get_toplevel_dir): use evolution_dir instead of - computing it ourselves. - (nntp_store_disconnect): call camel_nntp_newsrc_write. - (ensure_news_dir_exists): new function to create the news/ subdir. - (camel_nntp_store_class_init): hook up connect/disconnect and - finalize. - (nntp_store_connect): if ensure_news_dir_exists fails throw an - exception. - -2000-07-12 Peter Williams - - * camel-folder.c (camel_folder_set_message_flags): Emit a message_changed - signal once the flags are set on the message. - (camel_folder_set_user_flag): Ditto. - (camel_folder_expunge): Emit a folder_changed if no exception. - -2000-07-12 Jeffrey Stedfast - - * camel-stream.c: Use size_t and ssize_t for read/write methods - - * providers/imap/camel-imap-folder.c (imap_set_message_flags): - Updated to emit the message_changed signal. - (imap_delete_message): Updated to use imap_set_message_flags (). - (imap_move_message_to): Updated to use imap_set_message_flags () - and to emit the folder_changed signal on the destination folder. - (imap_copy_message_to): Updated to emit the folder_changed signal - on the destination folder. - (imap_append_message): Updated to emit the folder_changed signal - on the destination folder. - -2000-07-11 Jeffrey Stedfast - - * camel-folder.c (camel_folder_append_message): Now takes a - flags argument to specify the flags to be set on the message - since we might not necessarily want the flags to be wiped clean. - (move_message_to): - (copy_message_to): Updated to send a flags argument to - append_message (); currently sends the original message's flags. - - * providers/mbox/camel-mbox-folder.c (mbox_append_message): - * providers/imap/camel-imap-folder.c (imap_append_message): - Updated. - -2000-07-11 Dan Winship - - * camel-folder.c: Remove exceptions from a number of methods - that work on what ought to be static data: get_parent_folder, - get_parent_store, get_message_count, get_unread_message_count, - get_permanent_flags, get_message_flags, set_message_flags, - get_message_user_flag, set_message_user_flag, get_message_uid, - get_uids, get_summary, get_subfolder_names. Turn - camel_folder_delete_message into a macro. - - * providers/{mbox,pop3,vee}: Update for CamelFolder changes - - * providers/Makefile.am: Disable imap and nntp for now - -2000-07-11 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c (imap_search_by_expression): - This shouldn't return NULL, it should return g_ptr_array_new () - so the mailer gets what it expects. - -2000-07-10 Jeffrey Stedfast - - * camel-folder-summary.c (camel_folder_summary_decode_string): - Oops, an unsigned integer can never be < 0 - -2000-07-10 Dan Winship - - * providers/vee/camel-vee-folder.c (vee_search_by_expression): - Initialize a variable to make this not crash again. And fix a bug - so it actually does something. - -2000-07-10 Jeffrey Stedfast - - * camel-folder-summary.c: Cleaned up a bunch of compile warnings - -2000-07-10 Dan Winship - - * providers/vee: kill more debugging messages - -2000-07-10 Jeffrey Stedfast - - * providers/mbox/camel-mbox-folder.c (mbox_get_unread_message_count): - * providers/vee/camel-vee-folder.c (vee_get_unread_message_count): - * providers/imap/camel-imap-folder.c (imap_get_unread_message_count): - Implemented. - - * camel-folder.c (camel_folder_get_unread_message_count): New - convenience function to allow the mailer to query the number - of unread messages in a folder (for displaying message stats - in a folder tree?). - -2000-07-09 Dan Winship - - * camel-mime-utils.c (header_references_dup): New function to copy - a header_references structure. - - * camel-folder-summary.c (camel_message_info_dup_to): New function - to (deep) copy the data from one CamelMessageInfo into another. - (camel_message_info_free): And free the data. - - * providers/vee/camel-vee-folder.c (vee_sync): Implement. (empty). - (vee_search_by_expression): belatedly update for - camel_folder_search change. - (vee_folder_build): belatedly update for camel_folder_search - change. Use camel_message_info_dup_to and camel_message_info_free - (in particular, so that we get message_id and references info so - vfolders can be threaded). - (vee_folder_build_folder): Ditto. - -2000-07-08 Jeffrey Stedfast - - * providers/nntp/camel-nntp-folder.c: - * providers/nntp/camel-nntp-utils.c: - * providers/nntp/camel-nntp-store.c: Update to reflect past changes - in the Camel API. Use gtk macro casts wherever possible and use glib's - memory functions instead of standard c's (since they are not - compatable) - - * providers/smtp/camel-smtp-transport.c: - * providers/imap/camel-imap-store.c: Wrap debug print statements - in a macro - - * providers/imap/camel-imap-stream.c (stream_read): Make sure - that we get up to and including the last \n of the mime part. - - * providers/imap/camel-imap-folder.c (imap_get_message): Make sure - that we get up to and including the last \n of the mime part. - Wrap debug print statements in a macro. - - * providers/imap/camel-imap-stream.c (stream_read): Only cache - the important data (aka the mime part requested and no extra - server response stuff) - -2000-07-07 Dan Winship - - * camel-mime-utils.c (header_references_decode): Work around - In-Reply-To's with unquoted punctuation. So many broken mailers. - - * camel-folder.c (camel_folder_search_by_expression): Make this - return a GPtrArray rather than a GList. - - * camel-folder-search.c (camel_folder_search_execute_expression): - * providers/imap/camel-imap-folder.c (imap_search_by_expression): - * providers/mbox/camel-mbox-folder.c (mbox_search_by_expression): - * providers/nntp/camel-nntp-folder.c (nntp_search_by_expression): - Update to return a GPtrArray rather than a GList. - -2000-07-07 Jeffrey Stedfast - - * providers/smtp/camel-smtp-transport.c (esmtp_get_authtypes): - Fixed the parser to actually work - -2000-07-06 Dan Winship - - * camel-mime-utils.c (header_references_decode): Make this deal - with the full RFC822 References/In-Reply-To format rather than - just the more-nicely-behaved RFC1036 version. (Needed to parse - In-Reply-To headers with extra junk in them.) - -2000-07-06 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c (imap_get_summary): Parse for - more header information to allow message threading in IMAP. - (imap_get_message_info): Same. - - * camel-folder-summary.c: Renamed summary_format_* to - camel_summary_format_* and moved them into public scope. - - * providers/smtp/camel-smtp-transport.c (smtp_connect): Oops. Don't - pass port # as a string in the error code (if it fails to connect). - - * providers/imap/camel-imap-folder.c (imap_append_message): Changed - over to camel_imap_command_extended as that was the source of the - problems - apparently appending replies with more than just 1 line. - -2000-07-05 Dan Winship - - * camel-folder-search.c (search_header_contains): make header - matching case-insensitive - - * camel-folder-summary.c: - * camel-session.c: - * providers/mbox/camel-mbox-folder.c: - * providers/mbox/camel-mbox-summary.c: Remove some non-error case - debugging-type messages. - -2000-07-05 Ettore Perazzoli - - * providers/mbox/camel-mbox-summary.c (d): Define to empty so that - we get rid of a ton of debugging messages. - -2000-07-05 Jeffrey Stedfast - - * camel-mime-utils.h: Added prototype for uudecode_step - - * camel-mime-utils.c (uudecode_step): Cleaned up some junk that - should have been cleaned up when debugging printf's were taken out. - -2000-07-05 Ettore Perazzoli - - * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync): - Update the X-Evolution: header even if the in-memory UID and the - saved UID are not the same. Otherwise mboxes with clashing UIDs - can never be fixed. - - * camel-folder-summary.c - (camel_folder_summary_add_from_parser): Add the message to the - summary before doing any ibex stuff. In fact, this might also - have the side effect of reassigning the UID so it needs to be done - before we start using the UID. - - * providers/mbox/camel-mbox-folder.c (mbox_append_message): Add - debugging message to keep track of the UIDs we add. - -2000-07-05 Dan Winship - - * camel-folder-summary.c: Add "Cc" to summary and bump summary - version number. - - * camel-folder-search.c (search_header_contains): make "Cc" a - searchable header. - -2000-07-03 Ettore Perazzoli - - * camel-folder-summary.c (camel_folder_summary_next_uid_string): - New. - (camel_folder_summary_add): Use - `camel_folder_summary_next_uid_string()' instead of recomputing - the UID manually here. - (camel_folder_summary_add_from_parser): Likewise. - -2000-07-03 Ettore Perazzoli - - * camel-folder-summary.c (camel_folder_summary_set_uid): Removed. - -2000-07-03 Dan Winship - - * camel-folder-summary.c (message_info_new): Parse In-Reply-To - with header_references_decode, not header_msgid_decode. - - * camel-mime-message.c (camel_mime_message_class_init): message - headers are case-insensitive. - - * providers/pop3/camel-pop3-store.c (camel_pop3_command): Fix a - bug in error-setting code. - (pop3_connect): Don't re-prompt for password in the KPOP case. - (pop3_get_response): New function, split out from - camel_pop3_command. - (connect_to_server): Use pop3_get_response to parse the greeting - message, and error out appropriately if it's -ERR. - -2000-07-02 Dan Winship - - * camel-folder.c (camel_folder_freeze, camel_folder_thaw): New - functions to freeze and thaw a folder (to prevent message/folder - changed signals in the middle of a long series of operations). - (camel_folder_class_init): Change signals to GTK_RUN_FIRST. - (message_changed, folder_changed): Add default implementations - that stop the emission and record info for later if the folder is - frozen. - - * providers/mbox/camel-mbox-folder.c (mbox_sync): leftover fixes - from the close->sync change: don't destroy the ibex, summary, and - search when syncing. - (append_message): emit "folder_changed" on a successful append. - -2000-07-02 Jeffrey Stedfast - - * camel-mime-utils.c (uudecode_step): A rather complex uudecoder - written in the spirit of Zucchi-ness, is it up to par? Only the - Z-man can tell us :-) - -2000-07-01 Dan Winship - - * camel-service.c (camel_service_get_name): New method, to return - an end-user-friendly name corresponding to a service. (eg, "POP - service for danw on trna.helixcode.com"). - - * providers/imap/camel-imap-store.c, - providers/mbox/camel-mbox-store.c, - providers/nntp/camel-nntp-store.c, - providers/pop3/camel-pop3-store.c, - providers/sendmail/camel-sendmail-transport.c, - providers/smtp/camel-smtp-transport.c: Implement. - - * providers/imap/Makefile.am: remove unneeded - libcamelimap_la_LDADD. - - * providers/pop3/camel-pop3-store.c (connect_to_server): fix the - CAPA-parsing code to not get into an infinite loop. - -2000-07-01 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c (imap_get_message): Fixed - the bug that would sometimes leave part of the server response - tacked on to the end of the message. - - * camel-folder.c: Renamed _by_uid methods. Since we no longer - have get-by-number methods, no need to have the _by_uid - extensions. - (get_message_by_uid): Renamed to get_message - (delete_message_by_uid): Renamed to delete_message - (summary_get_by_uid): Renamed to get_message_info - - * providers/mbox/camel-mbox-folder.c: - * providers/pop3/camel-pop3-folder.c: - * providers/imap/camel-imap-folder.c: - * providers/vee/camel-vee-folder.c: Updated to reflect - camel-folder changes. - -2000-06-30 Jeffrey Stedfast - - * camel-folder.c (camel_folder_copy_message_to): New function, to - copy a message from one folder to another. The default - implementation just uses append_message, but providers can - implement more efficient versions for use when both folders are on - the same store. - - * broken-date-parser.[c,h]: Utilities for parsing broken - date strings. - - * providers/imap/camel-imap-folder.c (imap_move_message_to): - (imap_copy_message_to): Implemented. - - * camel-mime-utils.c (header_decode_date): Wrote some code to try - and un-mangle broken date formats and then parse that new string - instead. - -2000-06-30 Dan Winship - - * camel-folder.c (camel_folder_move_message_to): New function, to - move a message from one folder to another. The default - implementation just uses append_message and delete_message, but - providers can implement more efficient versions for use when both - folders are on the same store. - -2000-06-29 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c (imap_expunge): Should now - print a meaningful error message when it doesn't succeed - -2000-06-28 Jeffrey Stedfast - - * providers/imap/camel-imap-store.c (imap_connect): Changed to - keep prompting user for a valid password until it either - authenticates or until Canceled by the user. - (camel_imap_command_extended): Improved speed (replaced the - g_strjoinv call with a faster implementation) - - * providers/pop3/camel-pop3-store.c - (camel_pop3_command_get_additional_data): Fixed. - (pop3_connect): Changed to keep prompting the user for a - password until it either works or until Canceled by the user. - - * providers/mbox/camel-mbox-summary.c: General cleanup - (camel_mbox_summary_sync): Fixed a memory leak and added - CamelException handling. - - * providers/mbox/camel-mbox-store.c (delete_folder): Fixed a - memory leak - - * providers/mbox/camel-mbox-folder.c (mbox_append_message): - Default 'off_t seek' to -1 so as to make sure it's initialized - before it's used in the case of a bad stat() call. - (mbox_sync): Updated - (mbox_expunge): Updated - -2000-06-27 Jeffrey Stedfast - - * providers/imap/camel-imap-store.c (imap_connect): Move the - CAPABILITY command here so we don't have to keep checking - each time we open a folder. - (camel_imap_command_extended): If we are doing an EXAMINE, - don't bother doing a SELECT first. - - * providers/imap/camel-imap-folder.c (imap_init): Update so - folder->has_search_capability depends on the parent IMAP store - (since this is really dependant on the IMAP implementation and - not the folder) - -2000-06-27 Christopher James Lahey - - * providers/smtp/camel-smtp-transport.c: Don't close the filter - stream when done with it (this causes the source stream to close); - Instead, just flush it when done. - -2000-06-27 Michael Zucchi - - * camel-folder-search.c (search_header_contains): Make header - search 'to' match 'to', and not 'from', small typo, fixes #317. - -2000-06-26 Christopher James Lahey - - * providers/mbox/camel-mbox-summary.c: Added debugging - information. - -2000-06-23 Jeffrey Stedfast - - * providers/imap/camel-imap-store.c: - * providers/imap/camel-imap-folder.c: Improved folder parsing. - Not specifying a namespace should no longer list the entire - filesystem. - -2000-06-22 Chris Toshok - - * providers/nntp/.cvsignore: ignore test-newsrc - - * providers/nntp/camel-nntp-store.c, - providers/nntp/camel-nntp-store.h, - providers/nntp/camel-nntp-folder.c, - providers/nntp/camel-nntp-folder.h, - providers/nntp/camel-nntp-utils.c: Bring the nntp provider up to a - state where it builds and is usable with the current camel. there - are still warts (semi-broken .newsrc file handling, and a lack of - a subscribe ui -- in fact no way to add a new server, really), but - it'll display news messages. - - * providers/nntp/Makefile.am (libcamelnntp_la_SOURCES): add - camel-nntp-newsrc.c - (libcamelnntpinclude_HEADERS): add camel-nntp-newsrc.h - also, add test-newsrc stuff. - - * providers/nntp/test-newsrc.c: new file that tests the newsrc - stuff by parsing and regurgitating a .newsrc file for a particular - server. - - * providers/nntp/camel-nntp-newsrc.c, - providers/nntp/camel-nntp-newsrc.h: new files, initial support for .newsrc files. - -2000-06-22 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c (imap_get_message_count): - Oops. Now appends the namespace to the folder before querying - for the number of messages. - - * providers/imap/camel-imap-store.c (imap_folder_exists): New - convenience function for use by imap_create(). - (get_folder): If folder is specified as "/", we really want - "INBOX". - - * providers/sendmail/camel-sendmail-provider.c: - * providers/vee/camel-vee-provider.c: - * providers/smtp/camel-smtp-provider.c: - * providers/mbox/camel-mbox-provider.c: - * providers/pop3/camel-pop3-provider.c: - * providers/imap/camel-imap-provider.c: Updated - - * camel-session.c: Moved service_cache hash table into the - providers. - (service_cache_remove): Updated. - (camel_session_get_service): Updated. - - * camel-url.c (camel_url_hash): Took out the hashing of - url->passwd. We don't want this anymore. - - * providers/imap/camel-imap-folder.c (imap_init): Took out - references to 'namespace' - (camel_imap_folder_init): Same - - * providers/imap/camel-imap-folder.h: No more namespace. We are - instead going to use url->path as the namespace. - -2000-06-21 Jeffrey Stedfast - - * providers/imap/camel-imap-store.c (imap_create): Modified to - use the "namespace" (url->path) if it exists. - - * providers/imap/camel-imap-folder.c (imap_delete_message_by_uid): - Now just sets the deleted flag on the summary rather than speaking - directly to the IMAP server. This is both faster and cleaner. - -2000-06-21 Dan Winship - - * providers/pop3/camel-pop3-store.c (query_auth_types): Fix dumb - bug. - -2000-06-21 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c (imap_get_message_by_uid): - We are getting mail in IMAP now!! whoo-hoo!. Stripped out the - filtering so messages may have some dot-stuffing, but the - filtering can always be added back in later when we know it - works and isn't the problem. - -2000-06-21 Peter Williams - - * providers/mbox/camel-mbox-folder.c (mbox_init): Use the basename - of the mailbox so we don't get pathnames like ~/evolution/inbox///movemail.ibex - -2000-06-21 Dan Winship - - * camel-folder-summary.c (message_info_new): Set date_received - based on the first (most recent) "Received" header. - -2000-06-20 Dan Winship - - * camel-mime-part.c (write_to_stream): flush the filter stream - before unreffing it, so it will camel_mime_filter_complete. - - * camel-stream-filter.c (camel_stream_filter_class_init): Fix a - braino so camel_stream_flush works here. - - * camel-stream-mem.c (stream_seek): Fix a bug that resulted in - large attachments being silently dropped. - - * providers/pop3/camel-pop3-store.c - (camel_pop3_command_get_additional_data): Don't use g_strjoinv - here, since it is O(n^2) on the length of the output string, and - we can do O(n). - - * camel-mime-part-utils.c - (simple_data_wrapper_construct_from_parser): add a CRLF decoder - after the QP/B64 decoder if it's text. - -2000-06-20 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c (imap_get_summary): Only - fetch the summary if the folder summary doesn't already exist. - When the summary *does* exist, start fetching from 1, not 0. - (imap_free_summary): Don't do anything here. - (imap_finalize): Free the summary here instead of in - imap_free_summary(). - (imap_set_message_flags): Implemented - (imap_sync): Added code to set flags on messages that have had - their flags changed (however I #if'd it out until we are more - confidant in the IMAP code :) - (imap_summary_get_by_uid): Now parese flags correctly. - (imap_get_summary): Now parese flags correctly. Also correctly - parses the UID correctly. - - * camel-url.c (check_equal): No need to check s1 if s2 is NULL - (camel_url_equal): Don't check the passwd component of the url. - -2000-06-20 Dan Winship - - * camel-folder-summary.c (camel_folder_summary_add): mark the - message info with CAMEL_MESSAGE_FOLDER_FLAGGED if we change the - uid, so the folder will know that it's dirty. - -2000-06-20 Jeffrey Stedfast - - * providers/imap/camel-imap-store.c (camel_imap_command_extended): - Now returns the last line of data that the server sends back as - well. This is needed for commands like SELECT (like Peter pointed - out). - (camel_imap_command): No longer checks for SELECT (no need) - - * providers/imap/camel-imap-folder.c: Added namespace stuff - which we will need later on... - (imap_parse_subfolder_line): Convenience function for use in - get_subfolder_names() - (imap_get_subfolder_names): Updated. Also changed it to use LIST - instead of LSUB (temporary change). - -2000-06-19 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c (camel_imap_folder_init): Set - summary equal to NULL. - (imap_get_summary): Store the summary in the ImapFolder - (imap_summary_get_by_uid): If we have a summary cache in the - ImapFolder, first check to see if that message info is in the - cached summary first, if not fetch it directly from the IMAP - server and append it to the summary cache. - (imap_get_message_flags): Don't free the message info that we get - back from summary_get_by_uid as we don't want to be corrupting our - cached summary. - -2000-06-19 Peter Williams - - * providers/imap/camel-imap-store.c (camel_imap_command{,_extended}): When - SELECT'ing a folder for an IMAP command, use _extended to grab the entire - response (before we just used camel_imap_command and missed the OK codes) - -2000-06-18 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c (imap_summary_get_by_uid): - Now gets the message flags as it should. - (imap_get_summary): Same as imap_summary_get_by_uid - (imap_get_permanent_flags): Return the permanent flags stored - on the folder. - (imap_get_message_flags): Return message flags associated with - given uid. Note: we may want to somehow cache summary info so - that we don't have to keep querying the IMAP provider in - imap_summary_get_by_uid(). - -2000-06-17 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c (imap_free_summary): We were - leaking memory - but not anymore! - (imap_get_summary): We now get the UIDs and the beginnings of the - code to get the message flags as well. - -2000-06-17 Dan Winship - - * camel-mime-parser.c (folder_scan_header): Don't copy newlines - into the parsed header text, and turn any number of tabs and - spaces after a newline into a single space. - -2000-06-17 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c (imap_init): Should now - correctly do CAPABILITY. - -2000-06-17 Dan Winship - - * providers/mbox/camel-mbox-summary.c: Add some debugging printfs - when rebulding summary to help figure out why people's summaries - are always being rebuilt. - -2000-06-17 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c (imap_search_by_expression): - Began to implement, need to get information on how to - deconstruct @expression into an IMAP search expression and - parse the results. - (imap_init): Now queries the IMAP provider for CAPABILITY to - determine if SEARCH is implemented or not. - - * providers/imap/imap.c: Removed - no longer a need to have - this as an example for anyone interesting to help mecode IMAP - support. - -2000-06-16 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c (imap_sync): Added code - to expunge if called for (still need to finish coding this). - (imap_get_uids): Implemented. - (imap_get_summary): Found a way to get the date - (imap_summary_get_by_uid): Same. - (imap_free_summary): Implemented. - - * string-utils.c (strstrcase): Fixed a compile warning - - * providers/imap/camel-imap-summary.c: Removed - we don't - need a CamelImapSummary structure. - -2000-06-16 Dan Winship - - Move flag handling from CamelMimeMessage to CamelFolder. This - simplifies several flag-handling pieces of code in the mailer, and - lets you change a message's flags without having to fetch the - message body. It also means that fully-constructed - CamelMimeMessages are now essentially constant, which will help - simplify locking issues later since it means two threads - interested in the same message can just work with separate copies - of it. - - * camel-mime-message.h (struct _CamelMimeMessage): Removed flags - and user_flags (moved to summary). Removed expunged and - message_number which were unused. Removed message_uid and folder - which are no longer needed in the new scheme. - (struct CamelMimeMessageClass): Removed message_changed signal and - get/set_message_number methods. - - * camel-mime-message.c: Updates for CamelMimeMessage changes. - (camel_mime_message_get/set_flags, - camel_mime_message_get/set_user_flag): Replaced with methods in - CamelFolder. - (camel_flag_get, camel_flag_set, camel_flag_list_size, - camel_flag_list_free): Moved verbatim to camel-folder-summary.c - - * camel-folder.c (camel_folder_get/set_message_flags, - camel_folder_get/set_message_user_flag): New methods (and - corresponding useless default implementations) - (camel_folder_class_init): add a message_changed signal - - * camel-folder-summary.c (camel_flag_get, camel_flag_set, - camel_flag_list_size, camel_flag_list_free): Moved here from - camel-mime-message.c - - * providers/mbox/camel-mbox-folder.c (message_changed): Removed. - (mbox_get_message_flags, mbox_set_message_flags, - mbox_get_message_user_flag, mbox_set_message_user_flag): Tweak - summary bits as appropriate. (Functionality moved here from - message_changed.) - (mbox_get_message_by_uid): Update for CamelMimeMessage changes - (less stuff to initialize). - - * providers/imap/camel-imap-folder.c (message_changed): Remove - this. It was just copied from the mbox provider and doesn't deal - with the real IMAP flag stuff anyway. (So there's currently no - flag support in the IMAP provider.) - (imap_get_message_by_uid): Update for CamelMimeMessage changes. - - * providers/vee/camel-vee-folder.c: (message_changed): Remove old - one. Add a new one to listen for message_changed on each folder - and re-emit message_changed signals that correspond to messages in - the vfolder. - (vee_get/set_message_flags, vee_get/set_message_user_flag): Proxy - flag setting to the underlying real messages. - (vee_append_message): Removed for now; there's no way to translate - this into the new CamelMimeMessage/CamelFolder scheme, but (a) - there's also no code which would ever call it and (b) we're - probably going want a better interface than append_message for - message drag and drop to work anyway. To be revisited. - -2000-06-16 Dan Winship - - * camel-mime-utils.c (rfc2047_decode_word): - * camel-mime-part-utils.c (simple_data_wrapper_construct_from_parser): - * camel-folder-summary.c (summary_build_content_info): - KLUDGE! Since neither ETable nor GtkHTML supports UTF-8 yet, - output ISO-8859-1 instead, so Ettore can read his Italian mail. :) - This will be reverted later. - -2000-06-15 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c (imap_get_summary): Started to - implement - may want to use ENVELOPE instead of BODY.PEEK[HEADER] - (imap_summary_get_by_uid): Started to code, I've got to find a way to - get the date in time_t format and also get the flags - - * string-utils.c (strstrcase): Added this convenience function - I - know about strcasestr() but it's not portable. - -2000-06-15 Dan Winship - - * camel-service.c: Remove camel_service_connect_with_url. (URLs - must be specified when the service is requested from the session, - so that there can only ever be one service for any URL.) - - * camel-folder.c: (camel_folder_open, camel_folder_is_open, - camel_folder_get_mode): Kill. Folders are now always open, and - handle "closing" sorts of operations at sync or finalize time. - (camel_folder_sync): renamed from camel_folder_close. Syncs state - to the store but doesn't necessarily close/disconnect. - - * providers/*/camel-*-folder.c: Merge "open" methods into "init" - methods. Rename close to sync and update appropriately. - - * providers/imap/camel-imap-store.c: Remove camel_imap_store_open - and camel_imap_store_close, which should not have been copied from - the POP provider (where the exist to work around limitations of - the POP protocol). - - * providers/mbox/camel-mbox-summary.c: fix a bug. (don't expunge - deleted messages if called with expunge == FALSE) - - * providers/pop3/camel-pop3-store.c (connect_to_server): Check - server for various interesting extensions. - - * providers/pop3/camel-pop3-folder.c (get_uids): If the server - supports UIDL, use real UIDs rather than fake ones. - (etc): Map uids back to numbers appropriately - - * providers/mbox/camel-mbox-folder.c (mbox_append_message): Fix to - previous change: make sure the "seek" variable ends up with the - value it should. - - * providers/mbox/camel-mbox-summary.c (summary_rebuild): Update - summary mtime as well as size. - -2000-06-14 Dan Winship - - * providers/mbox/camel-mbox-folder.c (mbox_append_message): if the - mbox doesn't end with a '\n', write one before appending the new - message. - -2000-06-14 Jeffrey Stedfast - - * camel-mime-filter-crlf.c (filter): Updated the encoder to allocate - more memory (since we are also now adding dots). Also updated the - decoder as we have found that it sometimes passes the end of the - buffer. - - * providers/pop3/camel-pop3-folder.c (get_message_by_uid): Took out the - filter code (we already filter in - camel_pop3_command_get_additional_data) - - * camel-folder.c (init): Updated: a separator is now a char* rather - than a single char because IMAP can have a string for a directory - separator. Also, since IMAP does not begin with a directory separator, - there is a new argument (path_begins_with_sep) which decides if a - directory should begin with a directory separator. - - * providers/imap/camel-imap-store.c (imap_create): Since, on connect, - Camel tries to create INBOX (which already exists on every IMAP - provider) we can return TRUE when the folder name is "INBOX". - - * providers/vee/camel-vee-folder.c (vee_init): Updated. - - * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Updated. - - * providers/mbox/camel-mbox-store.c (get_folder): Updated. - - * providers/mbox/camel-mbox-folder.c (mbox_init): Updated. - - * providers/pop3/camel-pop3-folder.c (camel_pop3_folder_new): Updated. - -2000-06-14 Dan Winship - - * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync): - Renamed from camel_mbox_summary_expunge. Takes a gboolean saying - whether to expunge or just sync the mbox file. Change some - g_errors to g_warning so we don't abort. Make the quick - X-Evolution updating code lseek around correctly. Update the - mbox mtime in the summary file even in the quick case. - - * providers/mbox/camel-mbox-summary.h: make - CAMEL_MESSAGE_FOLDER_NOXEV not conflict with - CAMEL_MESSAGE_FOLDER_FLAGGED defined in camel-mime-message.h - - * providers/mbox/camel-mbox-folder.c (mbox_close): call - camel_mbox_summary_sync to save flag state if not expunging. - (mbox_expunge): Update for camel_mbox_summary_expunge rename. - -2000-06-13 Jeffrey Stedfast - - * providers/imap/camel-imap-store.c (camel_imap_store_open): - (camel_imap_store_close): Added. - (camel_imap_command_extended): Fixed a segfault and updated - to use camel_imap_status() - (camel_imap_command): Updated to use camel_imap_status() - (camel_imap_status): New convenience function for parsing - the return status of an IMAP command - -2000-06-12 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c (imap_get_message_by_uid): - Works like the POP fetch code, should work temporarily until - we get around to coding it the way it "Should Be". - - * providers/pop3/camel-pop3-folder.c (get_message_by_uid): Now uses - the camel-mime-filter-crlf decoder when retrieving messages. - - * camel-mime-filter-smtp.c: Deprecated. - - * providers/smtp/camel-smtp-transport.c (smtp_data): Updated to use - camel-mime-filter-crlf with my 'dot' extension in place of - camel-mime-filter-smtp - - * camel-mime-part.c (write_to_stream): Updated to reflect changes - made to camel-mime-filter-crlf.c - - * camel-mime-filter-crlf.c (filter): Modified to be able to - encode/decode dots ("\n.\n"<->"\n..\n"). Also fixed the decoder - so that it should no longer get caught in an infinite loop. - -2000-06-12 Dan Winship - - * providers/*/Makefile.am: don't pass a second (incorrect) -rpath - in addition to the (correct) one automatically provided by - automake. - - * camel-mime-filter-crlf.c: New filter to do CRLF<->LF conversion. - (Currently only tested in the LF->CRLF direction.) - - * camel-mime-part.c (write_to_stream): if content-type is text, - and it's QP or B64 encoded, pass through the CRLF filter before - the other filter to satisfy the "canonical encoding" rules in the - MIME spec. - -2000-06-09 Dan Winship - - * camel-session.c (camel_session_query_authenticator): Add another - argument, "mode", which can be CAMEL_AUTHENTICATOR_ASK or - CAMEL_AUTHENTICATOR_TELL, so callers can get the app to un-cache - bad info. - - * providers/pop3/camel-pop3-store.c (pop3_connect): uncache the - password if it doesn't work. - -2000-06-09 Jeffrey Stedfast - - * providers/imap/camel-imap-stream.c (stream_read): Updated to reflect - changes made in camel-imap-store.c - - * providers/imap/camel-imap-store.c (imap_create): No longer checks to - make sure a folder doesn't already exists (as this is no longer needed) - (camel_imap_command): Now takes a CamelFolder argument so it can detect - whether or not it needs to SELECT a folder or not - (camel_imap_command_extended): Same. - - * providers/smtp/camel-smtp-transport.c (smtp_connect): Will now always - send EHLO first, if that fails it will fall back on HELO. - (esmtp_get_authtypes): Should now correctly parse authtypes. - -2000-06-07 Jeffrey Stedfast - - * providers/imap/camel-imap-summary.c: Now builds (not that it's worth - much yet). - - * providers/imap/camel-imap-folder.c (imap_get_uids): Now uses the - correct cast to a CamelImapMessageInfo structure (should get rid of - compile warnings). - - * providers/imap/Makefile.am: Added rules to build - camel-imap-stream - - * providers/imap/camel-imap-store.c (get_folder): Update. - Moved imap_create here. - - * providers/imap/camel-imap-folder.c (delete_messages): Remove. - (imap_create): Removed. - (imap_delete): Removed. - (imap_exists): Removed. - - * providers/imap/camel-imap-stream.h: Added typedef's for the stream - - * providers/imap/camel-imap-stream.c: Modified to build cleanly - -2000-06-07 Not Zed - - * camel-mime-utils.c (header_msgid_decode_internal): Properly - dereference warning/debug messages. - (header_references_decode): Check we actually have msgid stuff - before trying to decode it ... - -2000-06-06 Jeffrey Stedfast - - * camel-imap-stream.[c,h]: Removed - - * providers/imap/camel-imap-stream.[c,h]: Relocated to this - location - - * providers/imap/camel-imap-summary.c: Added - -2000-06-06 Dan Winship - - * camel-folder.c: Remove exists, create, delete. A CamelFolder - now always references an existing folder. Remove delete_messages - too since it wasn't being used. Add a "create" flag to - get_subfolder saying whether or not to create the subfolder if it - doesn't yet exist. - - * camel-store.c (camel_store_get_folder): Add a "create" flag to - say whether or not to create the folder if it doesn't yet exist. - (camel_store_delete_folder): New method, moved from CamelFolder. - (cache_folder, uncache_folder): Fix up a bit. - (get_folder_name): Explain what this is for. - - * providers/mbox/camel-mbox-folder.c: - * providers/mbox/camel-mbox-store.c: Update. Remove support for - hierarchical folders to simplify this for now, since we're not - using it, and it's not completely clear how they should work in an - ELocalStorage world. Needs to be revisited. - - * providers/pop3/camel-pop3-folder.c (delete_messages): Remove. - * providers/pop3/camel-pop3-store.c (get_folder): Update. - - * providers/vee/camel-vee-folder.c (exists): Remove. - * providers/vee/camel-vee-store.c (vee_get_folder): Update. - -2000-06-06 Jeffrey Stedfast - - * providers/imap/camel-imap-*.[c,h]: Started on getting - imap to build cleanly (tho some work has not been completed - so it still won't build until camel-imap-summary is finished - along with a few methods in camel-imap-folder) - - * camel-stream.[c,h]: Changed the read and write method prototypes - to return an ssize_t type rather than an int and also changed - the 'number of bytes' to read or write to a size_t type - - * camel-stream-fs.c: same as above - - * camel-stream-mem.c: again, same as above - - * camel-stream-buffer.c: same - - * camel-imap-stream.[c,h]: Added this new stream, cache's previously - read data so each successive call will instead read from the cache - -2000-06-05 Dan Winship - - * camel-mime-part.c (camel_mime_part_set_disposition): fix - typo/braino (set "Content-Disposition", not "Content-Description") - (camel_mime_part_set_filename): const poison - -2000-06-02 Not Zed - - * camel-mime-utils.c (base64_encode_step): Ick, damn signs! Fix a - bug with sign extended bytes. - - * camel-mime-filter-smtp.c (filter): Changed layout/logic slightly - (to match From filter) - -2000-06-02 Jeffrey Stedfast - - * camel-mime-filter-smtp.c (filter): Fixed the filter so that it - wouldn't insert garbage under certain conditions. - -2000-06-02 Christopher James Lahey - - * camel-session.c: Don't ref the services in the cache. - -2000-06-02 Jeffrey Stedfast - - * providers/smtp/camel-smtp-transport.c: Rearanged where debug - fprintf statements we placed so that any data the server sends - back is printed out before an exception is set and the function - returns. - -2000-06-02 Not Zed - - * camel-mime-utils.c (header_decode_date): If we get a funny - result, just throw it out. Basically a fix for the one true - broken TradeClient. - -2000-06-01 Not Zed - - * camel-folder-summary.c (message_info_free): Free - references/messsage id. - (message_info_save): Save them. - (message_info_load): Load them. - (message_info_new): And get them from the new message. - (CAMEL_FOLDER_SUMMARY_VERSION): Bumped for new changes. - - * camel-folder-summary.h: Added references and messageid to - summary. - -2000-06-02 Christopher James Lahey - - * camel-session.c: Ref and unref objects in the service cache - properly. - - * camel-store.c: Ref the folder when returning it using - lookup_folder. Used the folder's full name for the key for the - folder cache since that's used to uncache it. - -2000-06-02 Dan Winship - - Fun with purify. - - * providers/pop3/camel-pop3-store.c (pop3_connect): free msg on - success as well as failure. - (camel_pop3_command_get_additional_data): free buf after reading - the last line ("."). - - * providers/pop3/camel-pop3-folder.c (get_message_by_uid): free - body data after creating the memstream from it (which will copy - the data). - - * providers/mbox/camel-mbox-folder.c (mbox_finalize): free summary - and index paths. - - * camel-data-wrapper.c (finalize): unref the stream, if it exists. - -2000-06-01 Not Zed - - * camel-mime-part.c (construct_from_parser): For a message part, - set the default content-type to message/rfc822. Maybe needs to be - done for multiparts too? - -2000-05-31 Not Zed - - * camel-mime-message.c (construct_from_parser): Typo in assersion. - - * camel-mime-parser.c (folder_scan_step): Use a default type of - message/rfc822 for multipart/digest. Bug Z192. - (folder_scan_drop_step): Remove warning. - -2000-05-30 Not Zed - - * providers/mbox/camel-mbox-folder.c (mbox_append_message): Init - filter_from to NULL, for exception case. - (mbox_get_message_by_uid): Cast off_t to long int for diagnostics. - - * camel-url.c (camel_url_hash): Hash funciton for using camel - url's as hash keys. - (camel_url_equal): equal function for same. - - * camel-session.c (camel_session_finalise): Free cached services. - (camel_session_init): Init service cache. - (service_cache_remove): destroy callback to remove a service from - the cache. - - * camel-store.c (get_folder_internal): Remove the extra ref of the - folder. That seems the right behaviour ...? - (camel_store_get_type): Doh, actually call store init, so the - cache works. - (cache_folder): strdup the folder name! no wonder it never found - it again. - -2000-05-30 Jeffrey Stedfast - - * providers/imap/camel-imap-folder.c: Implemented a few more - methods like imap_append and 1 or 2 others - -2000-05-29 Not Zed - - * camel-store.c (camel_store_init): Move it to here. If this - level is going to maintain it, it should set it up. Lets see what - caching folders breaks :( - - * providers/pop3/camel-pop3-store.c (camel_pop3_store_init): Dont - init folder cache here. - - * providers/mbox/camel-mbox-summary.c - (camel_mbox_summary_expunge): Make sure we copy messages which are - still intact to the new folder. - (camel_mbox_summary_expunge): Update the frompos as well when - moving the content. - (camel_mbox_summary_expunge): Remove some debug, and dont offset - frompos? - - * providers/vee/camel-vee-folder.c (vee_folder_build): Check the - searched folder is open before trying to search it. - (message_changed): Track changes to the source message in the - summary. - (folder_changed): Track folder changes, re-query the folder that - changed, and cascade the changed event as well. - (camel_vee_folder_finalise): Free subfolder and subfolder summary. - -2000-05-29 Dan Winship - - * camel-service.c (camel_service_new): Fix up some glib - precondition stuff. Try to set the URL in camel_service_new before - checking whether or not it's "empty" so that you can successfully - set "sendmail:" as a URL. - -2000-05-28 Dan Winship - - * camel-provider.h: Add a domain field to CamelProvider, to say - what kind of data it provides. - - * providers/imap/camel-imap-provider.c: - * providers/mbox/camel-mbox-provider.c: - * providers/pop3/camel-pop3-provider.c: - * providers/sendmail/camel-sendmail-provider.c: - * providers/smtp/camel-smtp-provider.c: Set domain to "mail". - - * providers/nntp/camel-nntp-provider.c: Set domain to "news". - - * providers/vee/camel-vee-provider.c: Set domain to "vfolder". (So - it doesn't end up being listed as a potential mail source in the - mail config wizard.) - - * providers/pop3/camel-pop3-store.c: Split apart password and APOP - auth, since some servers seem to do both, but don't really. - (connect_to_server): Renamed from try_connect. Now actually does - the connection up to the point of checking the greeting for APOP - support. - (query_auth_types): Return APOP, if appropriate. Call - pop3_disconnect after connect_to_server since we don't really want - to be connected. - (pop3_connect): Use connect_to_server rather than duplicating - code. Fix a one-byte buffer overrun in the APOP code. - (pop3_disconnect): Make this able to clean up after a partial - connect. - (connect_to_server): Remove port number from error message since - it's not terribly useful and we were getting it from the wrong - place anyway. - - * camel-mime-utils.c (header_address_list_format_append): Use - `foo@bar' rather than `"" ' for email addresses with no - name component. - -2000-05-27 Jeffrey Stedfast - - * providers/imap/camel-imap-store.c: Removed - camel_imap_command_get_additional_data() as it was - completely useless, replaced with - camel_imap_command_extended() which may eventually replace - camel_imap_command() as well. - - * providers/imap/camel-imap-store.h: Modified to reflect - changes made to camel-imap-store.c - - * providers/imap/camel-imap-folder.c: Wrote the first of many - methods: camel_imap_init(), imap_open(), imap_expunge(), - imap_get_message_count(), and imap_get_subfolder_names() - -2000-05-26 Dan Winship - - * camel-multipart.c (camel_multipart_init): Don't set a default - boundary. Require the caller to do that. - (set_boundary): if boundary is NULL, generate a "random" boundary. - - * camel-mime-part-utils.c - (camel_mime_part_construct_content_from_parser): Add a call to - camel_multipart_set_boundary after creating a new multipart. - -2000-05-25 Jeffrey Stedfast - - * providers/imap/camel-imap-store.c (try_connect): Removed - Exception code - Pop doesn't seem to set exceptions - - * providers/imap/camel-imap-folder.c: Initial code, mostly - just a template for future code - - * providers/imap/imap.[c,h]: Source code from my personal - mailer - for reference only! - -2000-05-25 NotZed - - * camel-mime-part-utils.c - (camel_mime_part_construct_content_from_parser): Replace simple - data wrapper here too, oops. - - * Makefile.am (libcamel_la_SOURCES): Removed - camel-simple-data-wrapper again. Less code to maintain == better - code. - - * camel-data-wrapper.c (construct_from_stream): Fixes for bug - where text attachments dont work. Made data-wrapper concrete for - the second time. - -2000-05-23 NotZed - - * providers/vee/camel-vee-folder.c (vee_folder_build_folder): - Update the vfolder details for a single folder. - -2000-05-25 Jeffrey Stedfast - - * providers/smtp/camel-smtp-transport.c (_send_to): Took out code - that had been there to reconnect to the server if it was not - already connected - Mailer code was fixed so that this should not - be needed. - - * providers/imap/camel-imap-store.[c,h]: Initial code. - -2000-05-24 Dan Winship - - * camel.h: Re-add camel-simple-data-wrapper.h, which was removed - for some reason. - -2000-05-24 Jeffrey Stedfast - - * providers/smtp/camel-smtp-transport.[c,h]: Moved global - variables into struct CamelSmtpTransport to make SMTP - thread-safe - - * providers/imap/camel-imap-*.h: Stolen from Mbox. Rough structure - for Imap. - -2000-05-23 Jeffrey Stedfast - - * providers/imap: Added some initial code to the camel tree - for IMAPv4 - - * providers/imap/.cvsignore: Added to repository - - * providers/smtp/camel-smtp-transport.c: Added debug fprintf's - so that testers can provide more information. Tested with simple - messages and a reply to the hello@helixcode.com default message - but should really be tested more. - (smtp_data): Fixed to use data_wrapper_write_to_stream. - - * camel-mime-filter-smtp.c (filter): Modified to escape all lines - beginning with a '.' and to place a \r before each \n if one did - not previously exist. Removed code to escape "From " as it was - found to not be needed for SMTP. - -2000-05-22 Jeffrey Stedfast - - * providers/smtp/camel-smtp-transport.c (smtp_data): Fixed the - filtered stream. Fixes for stream changes, updated to use - camel-mime-filter-smtp. - - * Makefile.am: Added camel-mime-filter-smtp.c - - * camel-mime-filter-smtp.[c,h]: Added to camel tree - Smtp filter used to change \n into \r\n, escape lone dots, - and escape "From "'s. - -2000-05-19 NotZed - - * camel-simple-data-wrapper.c (construct_from_stream): If we - already have been constructed, unref our content. - (write_to_stream): Check we've been constructued, and change for - stream api changes. - - * camel-mime-parser.c: Removed exception stuff. - - * md5-utils.c (md5_get_digest_from_stream): repaired. - - * camel-mime-message.c: Remove exception from write_to_stream, and - fix, and fix formatting. - - * providers/sendmail/camel-sendmail-transport.c (_send_internal): - Fix for stream changes. - - * providers/pop3/camel-pop3-store.c (camel_pop3_command): Fixes - for stream changes. - - * providers/mbox/camel-mbox-folder.c, and elsewhere, fix all - stream api changes. - (mbox_append_message): Use stream_close() now its back. - (mbox_append_message): unref the from filter. - - * camel-stream-mem.c: And here. - - * camel-stream-fs.[ch]: Here too. - - * camel-stream-filter.c: Likewise. This is getting tedious. - - * camel-stream-buffer.c (stream_write): Fix a few little problems. - (stream_close): Reimplement. - (camel_stream_buffer_read_line): Slightly more efficient version, - that also only allocates the right amount of memory for strings. - - * camel-seekable-substream.c: Likewise. - - * camel-seekable-stream.[ch]: Remove exceptions, fix formatting, - changes for stream (re)fixes. set_bounds returns an error. - - * camel-stream.[ch]: Remove exceptions. Make flush and reset return - an error code, repair all the screwed up formatting, and put back - close. - - * camel-mime-part-utils.c - (camel_mime_part_construct_content_from_parser): And here. - - * camel-mime-part.c (camel_mime_part_set_content): And this too. - (write_to_stream): Fixed for stream changes. - - * camel.h: Fixed. - - * providers/vee/camel-vee-folder.c (vee_search_by_expression): - Implement. Performs an intersection of the two searches. - (camel_vee_folder_finalise): Unref search folders. - (vee_append_message): Implement append. - -2000-05-18 Dan Winship - - * camel-folder.c: remove message_number_capability and require uid - capatibility. - (camel_folder_list_subfolders, camel_folder_get_uid_list, - camel_folder_get_subfolder_info, camel_folder_get_message_info): - removed - (camel_folder_get_subfolder_names, - camel_folder_free_subfolder_names): new subfolder interfaces. - (camel_folder_get_uids, camel_folder_free_uids): new uid - interfaces - (camel_folder_get_summary, camel_folder_free_summary): new summary - interfaces - - * providers/mbox/camel-mbox-folder.c, - * providers/nntp/camel-nntp-folder.c: - * providers/vee/camel-vee-folder.c: Update for changes - - * providers/pop3/camel-pop3-folder.c: Implement get_uids, update - for other changes. - -2000-05-18 NotZed - - * providers/vee/camel-vee-folder.c: Guess! - - * camel-folder-search.c (search_user_flag): Implement user_flag - search term. - - * camel-folder-search.h: Added user_flag search capability - (user-flag "blah") - - * providers/mbox/camel-mbox-folder.c (mbox_init): Set USER flag in - permanent flags for the folder. - -2000-05-17 Dan Winship - - * camel-folder.c: Remove unused async open/close and - copy_message_to functions. - Rename functions without initial _. Fix glib preconditions and - gtk-doc comments. - -2000-05-17 Dan Winship - - * camel-data-wrapper.c: remove get/set_output_stream operations. - They're redundant with write_to_stream, and CamelMimePart and - CamelMimeMessage only implement the latter, meaning that trying to - get_output_stream on a CamelMimeMessage that was built from pieces - rather than being parsed from a stream doesn't work. Anything that - uses get_output_stream can be rewritten to use write_to_stream, so - we'll standardize on that. - (camel_data_wrapper_new): remove this: CamelDataWrapper is - supposed to be an abstract class. - (write_to_stream): remove default implementation. (Moved to - CamelSimpleDataWrapper) - - * camel-simple-data-wrapper.c: resurrect, although it's not really - the same thing it was before. A simple data wrapper, which is - backed by a CamelStream. - - * camel-mime-part-utils.c - (simple_data_wrapper_construct_from_parser): Use - construct_from_stream rather than set_output_stream. - (camel_mime_part_construct_content_from_parser): Change - camel_data_wrapper_new to camel_simple_data_wrapper_new. - - * camel-mime-part.c (camel_mime_part_set_content): Change - camel_data_wrapper_new to camel_simple_data_wrapper_new. - - -2000-05-17 Darin Adler - - * camel-folder-summary.c: (message_info_load): - Quick fix to get it to compile. I hope I don't get into trouble. - -2000-05-17 Dan Winship - - * camel.h: Don't include the no-longer-distributed - possibly-to-be-removed headers. - - * providers/smtp/camel-smtp-transport.c - (smtp_get_email_addr_from_text): fix an off-by-one error in - address parsing - (smtp_data): use camel_data_wrapper_get_output_stream rather than - data_wrapper->output_stream - -2000-05-17 NotZed - - * providers/mbox/camel-mbox-folder.c (message_changed): Snoop - changes to user flags on the message into the summary as well. - - * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_init): - Changed version init to include the parent class version info - (i.e. add it not overwrite it). - - * camel-folder-summary.c (message_info_new): Initialise user_flags - to empty. - (message_info_load): And load user flags. - (message_info_save): And save user flags. - (message_info_free): And free them. - (CAMEL_FOLDER_SUMMARY_VERSION): Bumped file revision. - - * camel-folder-summary.h: Added user-flags to summary. - - * camel-mime-message.c (camel_mime_message_set_user_flag): Dont - use a hashtable for user flags. - (camel_mime_message_get_user_flag): And changed here too. - (camel_flag_get): New interface to get a flag from a flag - list. Flag lists are easier to work with than hash tables, and - save memory too. - (camel_flag_set): And set. - (camel_flag_list_free): And free. - (free_key_only): Discard. - (finalize): Remove the flag list. - -2000-05-17 Jeffrey Stedfast - - * providers/smtp/camel-smtp-transport.c: (smtp_helo): Error - checking on gethostbyaddr() eliminating a possible segfault. - -2000-05-16 NotZed - - * providers/mbox/camel-mbox-folder.c (mbox_delete_message_by_uid): - Implement. - -2000-05-12 NotZed - - * camel-movemail.c (camel_movemail): Open the destination with - O_APPEND, so we dont blow away a partially transferred mbox. - (camel_movemail): Loop if we get errno=INTR, and not fail. - -2000-05-11 NotZed - - * providers/mbox/camel-mbox-summary.c (summary_rebuild): Update - the summarised file size, if everything went ok. - (camel_mbox_summary_expunge): Clear header flags after updating. - -2000-05-16 Chris Toshok - - * providers/nntp/camel-nntp-folder.c: - * providers/nntp/camel-nntp-folder.h: - * providers/nntp/camel-nntp-provider.c: - * providers/nntp/camel-nntp-store.c: - * providers/nntp/camel-nntp-utils.c: - * providers/nntp/camel-nntp-utils.h: - get things working with new camel summary stuff. - - * providers/nntp/camel-nntp-summary.c: - * providers/nntp/camel-nntp-summary.h: - removed files since camel-folder-summary does all we need. - -2000-05-15 Jeffrey Stedfast - - * providers/smtp/camel-smtp-transport.c: Added some preliminary - AUTH support. - -2000-05-15 Dan Winship - - * camel-folder.h: Remove camel_folder_get_summary, which no longer - exists. - -2000-05-11 Dan Winship - - * Makefile.am: remove some cruft that we're not currently using. - - * camel-stream-mem.c (camel_stream_mem_new_with_buffer): Change - to match prototype (size_t vs unsigned int) so it works on 64-bit - machines. Noted by msw. - -2000-05-11 NotZed - - * providers/mbox/camel-mbox-folder.c (message_changed): Indicate - the summary changed also. - -2000-05-11 Jeffrey Stedfast - - * providers/smtp/camel-smtp-transport.c: (smtp_helo): - Updated to more closely comply with RFC 821 standards - -2000-05-11 NotZed - - * camel-mime-part.c (write_to_stream): Unref the filter after - adding it to the filtering stream. - - * providers/mbox/camel-mbox-summary.c - (camel_mbox_summary_finalise): Free the folder path. - (camel_mbox_summary_update): Also save summary when done. - (camel_mbox_summary_expunge): Unindex items when deleting them. - (camel_mbox_summary_expunge): Save the index as well as the - summary. - - * camel-folder-summary.c (camel_folder_summary_finalise): Free the - summary path. - (camel_folder_summary_touch): New function, indicate the summary - info changed. - (camel_folder_summary_remove): Dirty here. - - * camel-internet-address.c (internet_decode): Free multiple entry - addresses properly. - - * camel-mime-utils.c (header_decode_mailbox): Plugged another - memleak, free text after converting it. - (header_decode_addrspec): More leaks plugged. - - * camel-mime-message.c (finalize): Free message_uid. - (finalize): Free the recipients hashtable. - -2000-05-11 - - * camel-folder-summary.c (camel_folder_summary_finalise): Free - summary items and charset filters. - -2000-05-10 - - * camel-folder-summary.c (camel_folder_summary_finalise): Don't - free stuff in p, after we've free'd p. - - * providers/mbox/camel-mbox-folder.c (mbox_append_message): Unref - the stream we created for appending. - -2000-05-10 Jeffrey Stedfast - - * providers/smtp/camel-smtp-transport.c: (camel_smtp_transport_class_init): - Added initialization for service_class - -2000-05-10 Dan Winship - - * camel-multipart.c (write_to_stream): fix a stupid typo. Thank - you, C. - - * camel-mime-part.c (write_to_stream): don't ref the stream before - wrapper a filter around it, since nothing will ever unref it. - -2000-05-10 Christopher James Lahey - - * Makefile.am: Added camel-types.h, camel-folder-pt-proxy.h, and - camel-thread-proxy.h. - -2000-05-09 Dan Winship - - * providers/sendmail/camel-sendmail-transport.c (_send_internal): - Bleah. Can't fsync a pipe. As a quick kludge, just don't - stream_flush it. The right fix will require bringing back - stream_close though. - -2000-05-09 Jeffrey Stedfast - * camel-internet-address.[c,h]: Undid my changes (moved - struct _address back into came-internet-address.c) - * providers/smtp/camel-smtp-transport.c: (_send): changed - from using it's own address manipulation (using struct _address) - to using camel_internet_address_get(). Also some format changes - to keep consistant with the rest of Camel - -2000-05-09 Jeffrey Stedfast - - * camel-internet-address.[c,h]: Moved struct _address from - camel-internet-address.c to camel-internet-address.h - (hopefully this doesn't break anything...) - * providers/smtp/camel-smtp-transport.c: (_send): now - populates the recipient list with To, Cc, and Bcc addresses. - Should now be able to use this module. - -2000-05-09 Dan Winship - - * providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid): - one more refcounting fix I missed before. - -2000-05-08 Jeffrey Stedfast - - * providers/smtp/camel-smtp-transport.c: no longer frees memory it - shouldn't, updated to reflect camel-stream changes involving - CamelException (perhaps it should use a different CamelException - variable than is passed to the camel smtp module?) - -2000-05-08 Dan Winship - - * camel-stream.c (camel_stream_read, camel_stream_write, - camel_stream_flush, camel_stream_reset, camel_stream_printf, - camel_stream_write_to_stream): Use CamelException to signal - failure. - (camel_stream_write_strings): Remove. camel_stream_printf is more - useful in most of the places that used this. - (camel_stream_write_string): Change from macro to function to - prevent problems with double-evaluation. - - * camel-seekable-stream.c (camel_seekable_stream_seek, - camel_seekable_stream_set_bounds): Use CamelException. - (reset): Update. - - * camel-seekable-substream.c, camel-stream-buffer.c, - camel-stream-filter.c, camel-stream-fs.c, camel-stream-mem.c: - Update. - - * camel-stream-fs.c: Remove the virtual init functions and move - the code into the creator functions. Add CamelExceptions to - creation functions that could fail. - - * camel-data-wrapper.c (camel_data_wrapper_write_to_stream): Use - CamelException. - * camel-mime-message.c, camel-mime-part.c, camel-multipart.c - (write_to_stream): Update. - - * camel-mime-parser.c: add an exception to the mime parser private - data and pass that to stream functions as needed. - - * gmime-content-field.c, md5-utils.c: Update (badly) for stream - changes. - - * camel-exception.h (camel_exception_is_set): convenience macro. - - * providers/Makefile.am: disable SMTP for now - - * providers/mbox/camel-mbox-folder.c (mbox_append_message): Pass - CamelException to the functions that now need it. Check the - exception after calling camel_stream_flush, and fail if it fails. - (mbox_get_message_by_uid): More updates. - - * providers/pop/camel-pop3-folder.c, - providers/pop/camel-pop3-store.c, - providers/sendmail/camel-sendmail/transport.c: Update. - - -2000-05-08 NotZed - - * camel-mime-message.c (process_header): Format From and Reply-To - to at least a decoded string. Should probably store them as an - camelinternetaddress. - - * Merged NEW_SUMMARY branch back to trunk, and resolved conflicts. - - * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_update): - Return status. - (camel_mbox_summary_expunge): Force an update of the summary - before we do anything. - (camel_mbox_summary_expunge): Build new xev line in xevnew, and - free that, and consify xev. - (camel_mbox_summary_load): If we are rebuilding from scratch, make - sure we clear the summary content. - - * camel-stream-filter.c (do_close): We NEED a stream close. - -2000-05-07 Dan Winship - - Make camel not leak like a sieve. - - * camel-object.c: New subclass of GtkObject which is now the base - of the Camel object hierarchy. Currently the only difference - between CamelObject and GtkObject is that CamelObjects don't start - out floating. - - * *.h: Move a bunch of typedefs to camel-types.h. Standardize on - using in header files rather than , "foo.h", - or "camel/foo.h". Remove some unneeded includes. - - * camel-address.c, camel-data-wrapper.c, camel-folder-search.c, - camel-folder-summary.c, camel-folder.c, camel-mime-filter.c, - camel-mime-parser.c, camel-service.c, camel-session.c, - camel-stream.c: These are now subclasses of CamelObject. - - * camel-data-wrapper.c (set_output_stream): - * camel-medium.c (set_content_object): - * camel-seekable-substream.c - (init_with_seekable_stream_and_bounds): - * providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid): - remove gtk_object_sink calls. - - * camel-stream-buffer.c (init_vbuf): - * camel-stream-filter.c (camel_stream_filter_new_with_stream): - ref the original stream. - - * camel-folder-summary.c (camel_folder_summary_finalise): unref - the filters when finalizing. - - * camel-mime-part-utils.c - (simple_data_wrapper_construct_from_parser, - camel_mime_part_construct_content_from_parser): - * camel-mime-part.c (camel_mime_part_set_content): Unref objects - that are created only to be handed off to other objects. If - they're going to be needed later, they will have been additionally - ref'ed by the object that needs them. - - * providers/pop3/camel-pop3-folder.c (get_message_by_number): - unref the message stream after creating the data from it. - - * camel-stream.c, camel-stream-buffer.c, camel-stream-filter.c, - camel-stream-fs.c, camel-stream-mem.c: Remove camel_stream_close, - since its semantics are dubious (what happens when you close a - stream other people still have references on?). - - * providers/nntp/camel-nntp-store.c: - * providers/smtp/camel-smtp-transport.c: - * providers/pop3/camel-pop3-store.c: - replace camel_stream_close calls with gtk_object_unref. - - * providers/mbox/camel-mbox-folder.c: - * providers/nntp/camel-nntp-folder.c: - * providers/sendmail/camel-sendmail-transport.c: - replace camel_stream_close with camel_stream_flush + - gtk_object_unref - -2000-05-06 Dan Winship - - * providers/pop3/camel-pop3-store.c (query_auth_types): A machine - which serves neither POP nor KPOP is not a POP server. - - * providers/smtp/camel-smtp-provider.c: Note in the description - that this provider is not yet tested. - -2000-05-08 - - * camel-mime-part.c (write_to_stream): Free the filter stream when - done. - - * camel-mime-parser.c (folder_seek): Make sure we add the \n - terminal when we seek as well (frob!). - - * camel-mime-utils.c (header_decode_addrspec): Plug minor memleak. - - * camel-mime-part.c (finalize): Free header tables once finished. - - * camel-folder-summary.c (camel_folder_summary_remove): Dont try - to access info after its free'd. - -2000-05-07 NotZed - - * camel-mime-part.c (write_to_stream): Apply encoding to content - part, when writing to a stream *sigh*. - - * camel-stream-filter.c (do_write): implement write for the - filtering stream. Writes shouldn't be mixed with reads. - (do_flush): Implemented flush. Again write/flush shouldn't be - mixed with reads. Only flushes if the last op was write. - (do_close): Force flush on close. - - * camel-mime-filter.c (filter_run): Oops, make sure we include the - backlen in the total length before passing onto the filter. - - * camel-mime-filter-from.c: New filter, munges 'From ' lines into - '>From ', for mbox. - - * camel-mime-parser.c (camel_mime_parser_header_remove): New - function to remove the parser's raw header, rather than - manipulating the header directly (wich doesn't work with - mempools). - - * camel-mime-utils.c (header_address_list_clear): Fixed some - broken(tm) logic, which would leak entries on multivalued lists. - - * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_load): - Use ibex_save() to save the ibex. Makes a big difference to - startup times for very large mailboxes. - (camel_mbox_summary_expunge): Dum de dum, reimplemented. Designed - to be much more robust, and to stop immediately if anything awry - happens. - (copy_block): Utility function to copy n bytes from one fd to - another. - (header_write): Utility function to write out raw headers to an - fd. - (camel_mbox_summary_update): Incremental summary updater. - - * providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid): - Dont unref the stream, because of the broken(tm) ref model of gtk - widget that for some odd reason is being perpetuated in camel. - (mbox_expunge): Reenable expunge again. - (mbox_append_message): Removed the optimised mbox append. If its - an issue, it can go back later. Cleaned up a lot, checks error - returns, and automagically translates 'From ' into '>From' as - necessary. - -2000-05-07 - - * camel-mime-filter.c (filter_run): Oops, forgot to add the - backlen to the pre-buffer (*poof*). - -2000-05-07 NotZed - - * camel-mime-message.c (construct_from_parser): Allow - HSCAN_FROM_END to terminate the processing of a message. - - * camel-folder-summary.c (perform_content_info_load): Ick, dont - try and append a node onto its own list. - (camel_folder_summary_clear): Actually clear the indexes after - we've removed the messages. - (camel_folder_summary_clear): Set dirty if it changes. - (camel_folder_summary_load): Clear dirty. - (camel_folder_summary_save): Only save if dirty. - - * providers/mbox/camel-mbox-summary.c (summary_header_load): Oops, - remember to call that parent class first ... - (summary_header_save): Here too. - (camel_mbox_summary_load): Do more checking to verify the index - contents as well as teh summary contents, against the mbox - contents. - (camel_mbox_summary_load): Removed some fo that checking, it needs - more code to work reliably. - -2000-05-07 - - * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_load): - Set the size and mtime of the mbox we indexed once done. - - * camel-folder-summary.c (camel_folder_summary_set_index): Dont - write the index if it changes - let the claler fix it (uh, kind of - impacts performance). - (camel_folder_summary_load): close in. - - * camel-folder-summary.c (summary_format_string): Check header - exists before trying to strip its leading spaces. - -2000-05-06 NotZed - - * camel-folder.h: Removed summary info from here, and include - camel-folder-summary.h as well. - - * camel-mime-parser.c (camel_mime_parser_step): Allow it to accept - a NULL databuffer. - - * providers/mbox/camel-mbox-summary.c: Totally new file, now - subclasses camel-folder-summary. - - * camel-folder-summary.c (message_info_load): Load the uid as a - string. - (message_info_save): And save too. - (camel_folder_summary_clear): New function, clears the contents of - the summary. - - * providers/mbox/camel-mbox-folder.c: Fixes for summary changes. - (mbox_get_message_by_uid): Completely redone. Now cross-checks - the summary information to make sure we get a real message. - (mbox_append_message): Disabled the copy version of append for - now. - (mbox_expunge): Temporarily disabled the expunge function, until - it is put back in camel-mbox-summary.c - -2000-05-05 NotZed - - * camel-folder-summary.c: And same here ... - (camel_folder_summary_encode_fixed_int32): Ugh, fwrite doesn't - return -1 on error .. - (camel_folder_summary_decode_fixed_int32): Neither deos fread. - (camel_folder_summary_encode_token): Fix here too. - (summary_build_content_info): Use start-headers to get the pos of - the message, not parser_tell(), which might not be what we - expected because of parser_unstep(). - (camel_folder_summary_encode_token): Use bserch() to tokenise the - values, rather than a linear search. - - * camel-mime-utils.c: Defined out some memory profiling stuff I - left there by mistake. - (header_decode_mailbox): Dont try to append the word part of a - local address if we ran out of words. - - * camel-mime-parser.c (folder_scan_content): Apply the fix from - the header scanner to here too. - (folder_scan_header): Only check for end of header if we have - space for it (didn't end the read with a newline) - (folder_scan_header): inptr is the only real thing we need - registerised for performance. Try to help the compiler be smart - about it .. - (folder_scan_header): Simplified the save header case a tad. - - Commented out some memory profiling stuff. - -2000-05-05 - - * camel-mime-utils.c (header_decode_mailbox): Plug a memory leak. - (header_decode_text): Fixed memory leaks with g_string_append(). - (header_encode_string): And here too, and a few other places. The - glib api is so awful ... - (header_content_type_decode): More memory leaks. - -2000-05-05 - - * camel-mime-parser.c (folder_scan_init_with_fd): Make sure we - init the end of buffer sentinal! - (folder_scan_init_with_stream): And here too ... - -2000-05-04 NotZed - - * providers/mbox/camel-mbox-folder.c (summary_get_message_info): - Maxcount is minimum of the max and the requested count, not the - maximum :) - - * camel-mime-parser.c (folder_scan_content): Properly set midline, - so we dont falsely catch offset boundary markers (i.e. From inside - content). - (folder_read): Set a sentinal on the end of the read data (\n) so - we dont have to check the buffer boundary in the inner loop. - (mempool_*): New experimental memory management routines, speed - up simple structure parsing by about 25% ... not compiled in by - default. Something similar may be needed for camel-mime-utils to - address performance issues with g_malloc and friends. - - * camel-mime-utils.c: Added a macro w(x) used to wrap all warnings - about mime/rfc violations, so they can be turned off. - - * camel-folder-summary.c (summary_build_content_info): Step after - the end of a message ... - Turn into a stand-alone program for testing and profiling. - -2000-05-04 Dan Winship - - * providers/pop3/camel-pop3-store.c (pop3_connect): Don't fall - back to plaintext passwords if APOP fails, since it should also - fail. - -2000-05-04 Dan Winship - - * camel-session.c (camel_session_list_providers): New function to - replace camel_provider_scan. Returns a list of either (a) all - currently-loaded providers, or (b) all available providers. - - * camel-url.[ch]: Add an "empty" flag to CamelURL (indicating that - it contains only a protocol). - - * camel-service.c (camel_service_query_auth_types): Make this take - a CamelException (since it may have to try to connect to the - server, and it might not able to.) - - * providers/pop3/camel-pop3-store.c: add KPOP (Kerberized POP) - support. This is mostly so I have two kinds of authmech to play - with instead of just one. (But it does actually work.) - - * providers/smtp/camel-smtp-transport.c (query_auth_types): update - for prototype change, but disable the functionality, since it - doesn't really support any auth types yet. - (camel_smtp_transport_get_type): add an object init function to - set the service url_flags. - -2000-05-04 NotZed - - * providers/mbox/camel-mbox-summary.c: Yes, and anotherone. - - * camel-mime-utils.c: And another one. - - * camel-mime-part.c: And another one. - - * camel-mime-part-utils.c: And another one. - - * camel-folder-search.c: And another one. - - * camel-mime-parser.c: Reverted a change wihtout a ChangeLog entry. - -2000-05-04 NotZed - - * camel-folder-summary.[hc]: Yes, CamelFolderSummary is back ... - ... re-usable class to summarise and index any stream or message - and to manage/load/save the created summaries. - - * camel-folder.c: Include string.h to kill a warning. - -2000-05-03 Jason Leach - - * Makefile.am (INCLUDES): add $(UNICODE_CFLAGS) to the INCLUDES, - people who installed libunicde in non-standard include paths need - this. - -2000-05-03 NotZed - - * camel-folder.h: Added pos/bodypos/endpos to the basic message - content info object. Size to be removed? Moved the - messageconentinfo and messageinfo back to camel-folder-summary.h. - - * camel-mime-filter-index.c (camel_mime_filter_index_set_ibex): - New function to (re)set the index to use on a filter. - - * camel-mime-parser.c (camel_mime_parser_scan_from): Whole bunch - of inline docs. - (camel_mime_parser_drop_step): New function to drop a state from - the parser. Needs more testing. - - * camel-mime-utils.c (rfc2047_decode_word): If the iconv handle is - -1, then dont try and convert (crashes unicode_iconv?). - (rfc2047_decode_word): Use alloca for variables instead of - g_malloc - by the rfc they should always be short. - (rfc2047_decode_word): If we can't do the charset conversion, undo - the quoted-printable/base64 at least? Should probably convert - unknown characters to the utf-8 unknown character. - -2000-05-02 Larry Ewing - - * camel-mime-utils.c (header_decode_date): fix typo when - dereferencing saveoffset. - -2000-05-02 NotZed - - * camel-folder-search.c: Added some header doco. - - * camel.h: REmove gmime-utils.h from here. - - * providers/mbox/camel-mbox-search.[ch]: Removed. Functionally - redundant. - - * providers/mbox/camel-mbox-folder.c (mbox_search_by_expression): - Use the new CamelFolderSearch class to do the actual searching, - just setup the search here. - - * camel-folder-search.[ch]: A helper class that providers may - subclass to provide their own search functionality, or they can - simply use as is, it supports body searches if an ibex is - supplied, and header searches if a summary is supplied. - -2000-05-02 Matt Loper - - * Makefile.am: set G_LOG_DOMAIN. - * providers/MH/Makefile.am: same. - * providers/maildir/Makefile.am: same. - * providers/mbox/Makefile.am: same. - * providers/nntp/Makefile.am: same. - * providers/pop3/Makefile.am: same. - * providers/sendmail/Makefile.am: same. - * providers/smtp/Makefile.am: same. - -2000-05-02 NotZed - - * providers/mbox/camel-mbox-search.c - (camel_mbox_folder_search_by_expression): Dont store/remove - current search from the search list. - - * providers/mbox/camel-mbox-folder.h: Removed searches list, - searches are all sync now. - - * gmime-utils.[ch]: What the hell, remove it. This will break the - nntp provider. The mime parser can be used instead though. - Removed from all code including it (but none were using it). - - * gmime-utils.c (_store_header_pair_from_string): Removed bizarre - string_dichotomy version of this. This code is somewhat redundant - now, and is headed for death anyway. - - * gstring-util.c (g_string_dichotomy): Same with this one. - (g_string_clone): Removed a memory leak, g_string_new() allocates - its own memory. - (g_string_append_g_string): Allow to append an empty gstring onto - another gstring, dont abort()! - - * string-utils.c (string_dichotomy): Removed this incredibly weird - function. - - * camel-folder.c (_create): Replaced the rather obtuse use of - "string_dichotomy" function with a simple strrchr(). Still not - sure it'll work. - - * camel-folder-summary.c: cvs removed a long-removed file. - - * camel-mime-parser.c (folder_scan_header): Fix the previous - overflow problem properly (can happen in 2 places). - (header_append): A new macro to include the code changed above, so - it only appears in one place. - (folder_scan_step): Change the content type to text/plain if the - multipart is broken. Doesn't actually change the header though. - (header_append): Also move the header-start tracking stuff here. - Could be a static function to save code. - -2000-05-02 - - * camel-mime-part-utils.c - (simple_data_wrapper_construct_from_parser): Dont use autofill on - these fucking long function anmes!!!!!! - -2000-05-02 NotZed - - * providers/mbox/camel-mbox-summary.c - (camel_mbox_summary_expunge): Fix the offset for the summary when - an item is expunged to take account of the From line. - -2000-05-01 NotZed - - * providers/mbox/camel-mbox-folder.h (CamelMboxFolder): Removed - search_id. - - * providers/mbox/camel-mbox-search.c - (camel_mbox_folder_search_cancel): Remove.d - (camel_mbox_folder_search_complete): Removed. - (camel_mbox_folder_search_by_expression): Changed back to sync - api. - (struct _searchcontext): Removed cancelled flag. - (find_context): Removed. - (func_header_contains): Debug out some search stuff. - - * providers/mbox/camel-mbox-search.h - (camel_mbox_folder_search_by_expression): Moved back to sync api. - - * providers/mbox/camel-mbox-summary.c - (camel_mbox_summary_set_flags_by_uid): New function to update the - flags in the summary. - (camel_mbox_summary_expunge): Expunge messages from a folder. - (offset_content): Re-align offsets of summary when messages - added/removed to an existing summary. - (camel_mbox_summary_remove_uid): Remove a message summary entry by - uid. - (index_folder): Restore flags from X-Evolution header, if they are set. - (index_folder): Make sure we index using a decimal uid, since - thats what everything else indexes off (oops). - Upped SUMMARY_VERSION as a result. - (camel_mbox_summary_expunge): Oops, my wrong, use the string uid - to unindex on. - - * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): - Connect to the message_changed signal. - (_init): Set permanent flags to something reasonable. No user - flags yet ... - (message_changed): If the flags of the message change, update the - flags in the summary. - (mbox_expunge): Implement the expunge. - (camel_mbox_folder_class_init): Renamed all leading _'s to mbox_'s - (mbox_expunge): Emit a folder_changed signal on expunge (uh, even - if it didn't ...) - - * camel-folder.c (_finalize): Uh, dont free permanent_flags - anymore (this wouldn't failed anyway, it was a GList !!!) - (camel_folder_search_complete): Removed. - (camel_folder_search_cancel): Removed. - (camel_folder_expunge): Changed to only allow expunge on an open - folder. It doesn't make sense for mbox, otherwise (?) - (camel_folder_class_init): Added a folder_changed signal. - - * camel-folder.h (struct _CamelFolder): Change permanent_flags to - a bitfield. - (list_permanent_flags): Renamed to get_permanent_flags, and - returns a bitfield. - (camel_folder_expunge): Changed expunge to a void type. The - messages would no longer be useful after they have been removed - ... - (CamelFolderClass): New function summary_get_by_uid() to get a single - summary. - (*search*): Moved back to synchronous search api ... *sigh* - - * camel-folder.h: Removed CamelSearchFunc. - - * camel-mime-message.c (set_flag): Removed. - (camel_mime_message_set_flag): Removed. - (get_flag): Removed. - (camel_mime_message_get_flag): Removed. - (add_flag_to_list): Removed. - (get_flag_list): Removed. - (camel_mime_message_get_flag_list): Removed. - (camel_mime_message_get_flags): New interface to get system flags. - (camel_mime_message_set_flags): " to set ". - (camel_mime_message_get_user_flag): To get a user flag. - (camel_mime_message_set_user_flag): To set a user flag. - (finalize): Hmm, the old one free'd the key and data, not good - when the data is a boolean ... - -2000-04-30 Dan Winship - - * camel-provider.h: Tweak the definition of CamelProvider. Among - other things, a provider may now be both a store and a transport. - - * camel-provider.c: Remove a lot of code we had no intention of - using. This now only contains two functions: camel_provider_init - to read the installed .urls files, and camel_provider_load to - load and register a new provider. - - * camel-session.c: Remove more unused code and simplify some of - the remaining code. The list of available provider modules is now - stored in the session, and it handles calling camel_provider_load - to load them as needed. Provider registration is now done by - calling back from the module init routine, which allows a single - module to register providers for multiple URL types. - - * providers/*: Update provider structures and init routines for - the new stuff. Add a .urls file to each provider specifying what - urls it handles, and install that with the library. - - * providers/nntp/camel-nntp-provider.c: Add hints towards - supporting both news: and nntp: URLs, and using nntp as both a - store and a transport. - -2000-04-29 Dan Winship - - * camel-internet-address.c (camel_internet_address_get): const - poison - - * camel-mime-part-utils.c - (simple_data_wrapper_construct_from_parser): - camel_mime_parser_tell() returns an offset from where it started - parsing, not necessarily from the start of data. Since we're - parsing a bounded seekable_stream, we need to add the stream's - starting bound to camel_mime_parser_tell's return value to - create the substream in the right place. - - * camel-seekable-substream.c - (camel_seekable_substream_new_with_seekable_stream_and_bounds): - say CAMEL_STREAM_UNBOUND rather than -1 in doc. - - * camel-seekable-stream.c (camel_seekable_stream_seek): Add more - info to docs. - -2000-04-28 Dan Winship - - * camel-mime-parser.c (folder_scan_header): fix a bug that would - cause corruption with very long headers. - -2000-04-27 Ettore Perazzoli - - * providers/pop3/Makefile.am (INCLUDES): Add `-I$(srcdir)/../../..' - to pick the Camel includes. - * providers/sendmail/Makefile.am (INCLUDES): Likewise. - - * camel.h: Don't #include anymore. - -2000-04-27 NotZed - - * camel-mime-utils.c (check_header): Dont try and check a NULL - header. - - * camel-recipient.[ch]: Dead. Its not pining. - - * camel-mime-message.h: Dont include recipients.h anymore. - - * camel-mime-message.c (camel_mime_message_add_recipient): Accept - name/address separately, and store in an CamelInternetAddress. - (add_recipient): Removed. - (remove_recipient): Removed. - (remove_recipient_address): Renamed from remove_receipient, works - via address. - (camel_mime_message_remove_recipient_name): New function to remove - by name. - (get_recipients): Removed. - (camel_mime_message_get_recipients): Return a camel-internet-address. - (write_to_stream): No longer write receipients directly. - (write_recipients_to_stream): Removed. - (write_one_recipient_to_stream): Removed. - (camel_mime_message_init): Setup recipients hashtable, rather than - usign the recipients stuff. - (set_recipient_list_from_string): Killed, a violent and lengthy - death. - (process_header): Simplified recipient handling code a lot. - (received_date_str, sent_date_str, reply_to_str, subject_str, - from_str): Removed some oddly-defined global statics. - (camel_mime_message_class_init): Dont initialise above variables - anymore. - (init_header_name_table): Removed, use a table to init this, and - do it in class init (2 lines of code ...). - - * camel-news-address.c: Class to represent news addresses - - currently empty, and not built. - - * camel-internet-address.h: Class to represent internet (email) - addresses. - - * camel-address.h: Abstract class to represent (lists of) - addresses. - -2000-04-27 Dan Winship - - * camel-mime-part.c (write_to_stream): Revert previous change. I - was confused. - - * camel-url.[ch] (camel_url_encode, camel_url_decode): expose - these routines. - -2000-04-26 Dan Winship - - * camel-mime-part.c (write_to_stream): Only write a newline - between the headers and the content object if the content object - is not a CamelMedium. (If the content is a medium, it may have its - own headers, which then need to go before the blank line.) - - * camel-mime-body-part.[ch]: Remove. We weren't using the fields - that made this different from camel-mime-part, so it basically - just forced us to do lots of gratuitous typecasting. - - * camel-multipart.[ch]: Use CamelMimePart. Remove the multipart - parent stuff, since we weren't using that either. - - * etc: update for CamelMimeBodyPart -> CamelMimePart - -2000-04-26 Dan Winship - - * camel-medium.c (set_content_object): sink the content object - after referencing it. - - * camel-mime-part.c: fix various little things in the handling - of CamelMedium methods. Change camel_mime_part_set_text to the - more generic camel_mime_part_set_content. - - * camel.h: sync to current reality - - * camel-folder-utils.[ch]: removed - - * camel-mime-utils.c (header_format_date): fix format specifier - for time zone. Fix typo in month names array. - -2000-04-26 NotZed - - * camel-seekable-substream.c (stream_seek): Changed to have - absolute seek semantics, not relative to the bounds. - - * camel-seekable-stream.c (reset): When we reset, seek to the - start of the bound, if there is one. - (stream_tell): Make tell virtual. - - * camel-stream-filter.c (do_available): Removed. - - * camel-stream-buffer.c: Remove leading _'s from static functions. - (stream_read): Renamed from read(). Fancy that conflicting! (my - boo!) Others too. - - * providers/pop3/camel-pop3-folder.c (get_message_by_number): - Changed to stream_mem interface. - - * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): Fixed - for streamfs interface changes, and implement a failure case. - (_append_message): Changed for fs stream interface change. - - * camel-multipart.c (print_part): Iterate rahter than callback. I - hate glists's interface (hence, move this to write_to_stream). - (write_to_stream): Return an error (yuck, this is a royal PITA to - do with the stream write interface). - - * camel-mime-message.c: Removed leading _ from static names. - - * camel-mime-part.h: construct_from_parser() now returns an error - code. - - * camel-mime-part-utils.c - (camel_mime_part_construct_content_from_parser): Changed to use a - camel-data-wrapper instead of a camel-simple-data-wrapper (no - change needed elsewhere?). - (simple_data_wrapper_construct_from_parser): Fixes for stream-mem - interface changes. - - * camel-simple-data-wrapper.[ch], - camel-simple-data-wrapper-stream.[ch], - camel-stream-data-wrapper.[ch], removed. Fixed including of these - files. - - * camel-mime-part.c (camel_mime_part_set_text): Remove the use of - the camel-simple-data-wrapper-stream, just use a mem stream. - (write_to_stream): Renamed from my_* - (construct_from_stream): Return an error on error. - - * camel-stream-mem.c (camel_stream_mem_new*): Remove mode - parameter. - - * camel-stream-mem.h (enum CamelStreamMemMode): Removed. It - wasn't used at all. - - * camel-data-wrapper.h: Add camel_data_wrapper_new() to create - these. - (write_to_stream, construct_from_stream): Return an error - indicator for success. Fixed all methods to match (ICK). - - * Makefile.am (libcamel_la_SOURCES): Remove - camel-simple-data-wrapper.c, camel-simple-data-wrapper-stream.c, - camel-stream-data-wrapper.c. Obsoleted by code re-use! - - * camel-data-wrapper.c (construct_from_stream): Change the default - implementation to just set the output stream == construction - stream. Well, this lets me get rid of both simple-data-wrapper - and stream-data-wrapper (unused anyway), and - simple-data-wrapper-stream in one hit. CamelDataWrapper is now - also a concrete class. - (write_to_stream): Use camel_stream_write_to_stream() to - calculate/return values (and save code). - Include for obvious reasons. - - * camel-stream.c (eos): Provide a default implementation of .eos(). - (camel_stream_write_to_stream): Make it return an error code on - error. - (camel_stream_printf): Changed to return the number of bytes - written/error. - (camel_stream_available): Removed. - - * camel-stream-fs.h (enum CamelStreamFsMode): Removed. Changed to - use unix modes and so forth (wasn't used for anything but new file - creation and didn't work well either). - - * camel-stream-fs.c: Removed leading _'s for names. And removed - some virtual method 'documentation'. - (destroy): Dont try and close a closed/error fd. Only report - error if close returns -1. Moved all the code to finalise(), and - killed this function. - (init_with_fd): Properly setup the seek offset, if it is a - valid and seekable file descriptor. - (init_with_fd_and_bounds): Use off_t for bounds, set bounds on the - seekable stream. - (init_with_name): Return error codes. - (init_with_name_and_bounds): Ditto. - (camel_stream_fs_new_with_name): REturn NULL object if it failed. - (camel_stream_fs_new_with_name_and_bounds): Return NULL object on - failure. Changed with_name* api's to take unix open style args - and flags. - (read): The bounded stream bounds checking seemed off, simplified - code a bit. - (write): Implement bounds checking for writing, the comment was - wrong, it could make sense to bound writing. Cleaned up a little. - (available): Gone. - (eos): Removed. Use CamelStream's implementation now. - (close): Reset the fd to -1, provide a warning for bad usage. - (seek): Cleaned up. Changed the behaviour a little, the returned - offset is the absolute position in the file, even in bounded - streams. - (seek): Seek from end mirrors lseek() behaviour (reverse seeking). - -2000-04-25 NotZed - - * camel-stream-fs.h (struct _CamelStreamFs): Moved bounds and eof - indicator to other parent classes. - - * camel-stream.c (camel_stream_printf): New utility - function. Obvious use. - - * camel-stream-mem.c: Removed leading _'s from static func's. - (camel_stream_mem_new_with_byte_array): Fixed for api changes, set - the owner for the byte array to us. - : Removed A bunch of gtk doc stuff for static (implementation) functions. - (available): Removed. - (write): Fixed the write implementation so that seek() works on a - seekable memory stream, as expected. Seeking past the end of the - buffer has unix semantics (filling with 0). - (available): Removed. - (write): Implement seekable stream bounded stream. - (read): Implement seekable stream bounded stream. - (close): Dont free the stream_mem if we're not the owner. - (seek): Allow to seek beyond the end of memory area, - implement bounds checking. - (seek): Set errno on bad policy. - - * camel-stream-mem.h (struct _CamelStreamMem): Changed position to off_t. - (new_with_buffer): Changed len to be a size_t. - (set_buffer, set_byte_array): New interface functions. - (struct _CamelStreamMem): Removed position, it is stored in the - superclass. - - * camel-stream.h: Removed some of the seemingly random - whitespace. Removed the available method (its not - impelemented/useful enough). - - * camel-seekable-substream.c - (init_with_seekable_stream_and_bounds): Remove the data_available - stuff, it hasn't been properly implemented/finished, and may never - work (unfortunately *sigh). - (reemit_parent_signal): Removed part of the above change. - (set_bounds): Removed (moved to seekable-stream). - : Fixed up some of the generally unreadable indenting (sorry, - wrapping at 80 characters with - camels_really_long_function_names() - just_doesnt_work_very_well_does_it(). - (available): Removed. - (stream_seek): Fixup for object changes. Make sure we return -1 - if the parent stream can't seek. - - * camel-seekable-stream.c (ccamel_seekable_stream_set_bounds): New - function to bound any seekable stream. - : Removed _'s. - (camel_seekable_stream_class_init): Implement an init function, to - setup the stream bounds to unbound. - - * camel-seekable-stream.h (CamelSeekableStreamClass): New virtual - method set_bounds for seekable streams. - (CAMEL_STREAM_UNBOUND): New define for no bound. - - * camel-seekable-substream.h (struct _CamelSeekableSubstream): - Removed sup_bound and inf_bound, moved to CamelSeekableStream (and - renamed, and changed to off_t's). - (new_with_seekable_stream_and_bounds): Use off_t as the bounds. - (CamelSeekableSubstreamClass): Uh, why was the intialiser virtual? - Removed. - - * camel-seekable-stream.[ch] (CamelSeekableStreamClass): Changed seek - to accept an off_t as the offset. - (struct _CamelSeekableStream): Renamed cur_pos to position and - changed it to an off_t type. - (enum CamelStreamSeekPolicy): Set to match the SEEK_* constants - from lseek(). - (get_current_position): Renamed to tell(). - - * camel-stream-buffer.h: Commented out set_vbuf - never implemented. - -2000-04-25 Dan Winship - - * camel-stream-buffer.c (_eos): only return TRUE if the parent is - at eos AND the buffer has been exhausted - - * camel-mime-message.c: fix some incorrect macro usage that - resulted in bogus casts - -2000-04-24 Dan Winship - - * camel-mime-part-utils.c - (simple_data_wrapper_construct_from_parser): fix a cut-and-pasto. - - * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): ref - (and sink) the message stream if we're going to unref it later. - Otherwise it could get destroyed while there are still substreams - attached to it. This needs a cleaner solution. - - * camel.h: remove data-wrapper-repository.h include(s) - -2000-04-24 NotZed - - * camel-mime-message.c (construct_from_parser): Allow MESSAGE_END - _or_ EOF as valid termination conditions. - - * providers/mbox/camel-mbox-summary.c (message_struct_new): Decode - and then re-encode the addresses, so they are consistently - formatted. - - * camel-mime-utils.c (header_decode_mailbox): Store the address in - a _header_address. And try to get a comment-stored name if there - is one. - (header_decode_address): Actually return an address. - (header_to_decode): Renamed to header_address_decode() - (header_mailbox_decode): New function to get a single mailbox. - (header_mime_decode): Return the major/minor value, as - appropriate. - (header_address_new, and friends): Whole bunch of utility - functions for working with the address thingies. - (header_decode_domain): Free the string header, and dont expand - '.' into ' . '. - - * camel.c (camel_init): No longer call - data_wrapper_repository_init. - - * camel-medium.c (write_to_stream): Moved (back) to - camel-mime-part. - (add_header): - (set_header): - (remove_header): - (get_header): Make all these abstract, and spit warnings if - called. I guess it could manage the list, but well, it doesn't. - - * camel-medium.h (struct _CamelMedium): Dont store headers here, - the implementor is the only one who knows their format. - (CamelMediumClass): Changed header values to be void *'s. They - need not be strings? - - * camel-simple-data-wrapper.c (construct_from_stream): And we're - back. Set the output stream. - (construct_from_parser): Moved to camel-mime-part-utils. - - * camel-mime-part-utils.c - (camel_mime_part_construct_content_from_parser): Create the - contents of multipart and simple messages. - (camel_mime_part_construct_content_from_parser): Oops, this was - totally screwed up, try creating the right cotnent on the right - object. - - * camel-multipart.c (construct_from_parser): Moved to - camel-mime-part-utils. - (separate_part): Removed. - - * camel-mime-part.c (construct_from_stream): Back again! This now - switches over to using a mime parser for any mime parts, only. - (my_write_to_stream): Write our headers and so forth here. - (add_header): Add header directly, parent class is abstract. - (remove_header): Ditto. - (set_header): Ditto. - - * camel-data-wrapper.c (camel_data_wrapper_construct_from_stream): - Remade abstract. - (camel_data_wrapper_construct_from_parser): Moved to - camel_mime_part. - - * camel-data-wrapper.h: Put back construct_from_stream. - - * camel-mime-part.h: Put construct_from_parser in here, the - data-wrapper shouldn't know about mime. Ok, so now to undo half - of the last hours changes ... duh. - -2000-04-23 Dan Winship - - * camel-mime-utils.c (header_to_decode, header_mime_decode): fix - some obvious minor bugs noted by -Wall. - -2000-04-23 NotZed - - * providers/pop3/camel-pop3-folder.c (get_message_by_number): Use - construct_from_stream instead of set_input_stream(). - - * camel-simple-data-wrapper-stream.c - (camel_simple_data_wrapper_stream_construct): REmoved the destroy - callback code. - (wrapper_destroy_cb): Removed. - - * camel-simple-data-wrapper.h: Add prototype for _construct() - method. - - * camel.c: Include unicode.h to kill a warning. - - * camel-data-wrapper.h (CameldataWrapperClass): Removed - construct_from_stream virtual method. - Removed get/set input stream. - - * data-wrapper-repository.[ch]: Removed&from build. Obsoleted? - The justification as is follows: It is mixing storage - protocol/format with message architecture. It really just doesn't - serve any purpose, as each medium implementor will have to have its - own type->handler mapping, and the only current implementor, - mimepart has a very simple structure and no need for this. - - * camel-medium.c (write_to_stream): Moved here from most of the - stuff in camel-mime-part. Well, the MEDIUM is the one that knows - what the headers are, and the content is, let it write it out. - - * camel-mime-part-utils.c (camel_mime_part_construct_content): - Copied from camel-mime-part.c, removed handling of message - followon state (moved to camel-mime-message). - (camel_mime_part_construct_content_from_parser): Renamed from - construct_content. - (camel_mime_part_construct_headers_from_stream): - (camel_mime_part_construct_content_from_stream): - (camel_mime_part_store_stream_in_buffer): Removed. Replaced by - the new construct from parser stuff. - - * camel-mime-message.c (construct_from_parser): Do - construct_from_parser for mime-message. - (_write_to_stream): Set the mime-version header for medium to - write out, rather than writing it out ourselves. - - * camel-data-wrapper.c (set_mime_type_field): Ref the - content_field when we get it? - (construct_from_stream): Removed. - (camel_data_wrapper_construct_from_stream): Changed to a helper - function, creates a mime_parser, and constructs from that. - (set_input_stream): Removed. - (camel_data_wrapper_set_input_stream): Removed. - (get_input_stream): Removed. - (camel_data_wrapper_get_input_stream): Removed. - - * camel-mime-parser.c (camel_mime_parser_unstep): New function. - Cause a subsequent call to mime_parser_step() to return the same - state over again. - - * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): - Initial test code using the mime parser to construct the message. - (_get_message_by_uid): Use construct_from_stream() instead of - creating our own parser. - - * camel-mime-part.c (construct_from_parser): part constructor. - (camel_mime_part_construct_content): Basically a simpler - replacement for the datawrapper repository. - (camel_mime_part_init): Set the default type to text/plain. - (camel_mime_part_construct_content): Removed to - camel-mime-part-utils.c - (my_get_output_stream): Removed. The streeam is in the - data-wrapper. - (my_get_content_object): Removed. The content object is stored in - the medium. If none is there, the object wasn't created properly. - (my_write_content_to_stream): Removed. The content object is the - one that knows how to write itself out!!!!!!!! - (my_write_to_stream): Remove the base header writing stuff - has - been moved to camel-medium, where it belongs. This can just be - used to check for mandatory headers. - (my_construct_from_stream): Removed. - (my_set_input_stream): What the hell, i'll remove this too. - Nobody seems to understand how it differs from create from stream, - and they both seem to serve the same purpose ... - - * camel-simple-data-wrapper.c (construct_from_parser): Initial - implementation of a content constructor. - (construct_from_stream): Removed! Job taken over by - construct_from_parser. - - * camel-multipart.c (construct_from_parser): Multipart - construction routine. - (camel_multipart_init): Set the default multipart type to - multipart/mixed. Duh, no subtype is not allowed anyway. - (set_input_stream): REmoved. Replaced by construct_from_parser. - -2000-04-22 Dan Winship - - * camel-multipart.[ch]: clean, document, etc. - (camel_multipart_init): pick a prettier default boundary. Still - need to deal with the larger problem - -2000-04-22 NotZed - - * camel-mime-message.h (struct _CamelMimeMessage): Removed - send_date, and received_date, and replaced it with a time_t - 'date' (this is what the header is called), and date_offset to - store the GMT offset of the date. - - * camel-mime-message.c (camel_mime_message_set_from): Update raw - header as we go. - (_set_from): Removed. - (_get_from): Removed. - (camel_mime_message_get_from): Moved implementation here. - (camel_mime_message_get_subject): Move implementation here. - (_get_subject): Nuked. - (camel_mime_message_set_subject): Handle utf-8 input, and also - update raw header when changed. - (_set_subject): Removed. - (_set_received_date): Removed. - (camel_mime_message_set_received_date): Removed. - (_get_received_date): Removed. - (camel_mime_message_get_received_date): Removed. - (_get_sent_date): Removed. - (camel_mime_message_get_sent_date): Removed. - (camel_mime_message_get_date): New function to get the date as a - time_t/offset. - (camel_mime_message_set_date): Set the date as a time_t/offset. - (camel_mime_message_get_date_string): Get the date as a string. - (camel_mime_message_init): Initialise the current date as - 'CMAEL_MESSAGE_DATE_CURRENT'. - (_set_reply_to): Removed. - (camel_mime_message_set_reply_to): Moved implementation here. - This is still broken, reply-to can have multiple addresses. - (_get_reply_to): Removed. - (_set_field): Removed, no longer used anywhere. - (_get_field): Also removed. - (_init_header_name_table): Add the Date header. - (process_header): Also handle snooping of Date header here. - - * camel-stream-filter.c (finalise): Unref the source stream on - finalise, and also call the parent class (oops). - - * camel-mime-parser.c (camel_mime_parser_state): New function to - get the current parser state. - (camel_mime_parser_stream): Allow you to get the stream back from - the mime_parser. - (camel_mime_parser_fd): Alternative to allow you to get the fd - back from the mime_parser. - (folder_scan_init_with_stream): Properly ref/unref the stream. - (folder_scan_close): Properly unref the stream/close the fd on - exit. - (folder_scan_init_with_fd): Close the old fd if there is one. - - * camel-data-wrapper.c (camel_data_wrapper_construct_from_parser): - New method, construct a data wrapper from an initialised parser. - (construct_from_parser): Empty implementation. - - * providers/mbox/camel-mbox-summary.c (message_struct_new): - Convert subject line to unicode, before storing in the summary. - (strdup_trim): Removed, no longer needed. - - * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): Ref - the folder after setting it in the new message. - - * camel-mime-part.c (my_set_content_object): Have the headers - follow the content-type change here too. - (my_write_to_stream): Dont write content-type here, automatically - stored in the headers ... - (my_write_to_stream): Use header_disposition_format() to format - the content-disposition header. - (my_write_to_stream): Removed old code, all headers are now stored - in the camel-medium level, always. Need to do the same with - camel-mime-message i suppose ... - (my_write_to_stream): Write the content using the parent class, - not some weird function. - (camel_mime_part_class_init): Dont override get_output_stream. - (camel_mime_part_encoding_from_string): Bleh, make it - case-insensitive. - - * camel-mime-utils.c (header_content_type_is): Handle empty types. - (header_encode_string): Start of an implementation of the rfc2047 - encoder. It does iso-8859-1, and us-ascii, and utf-8 (others get - tricky *sigh*) - (rfc2047_encode_word): Convert a single word/string into rfc2047 - encoding. - (quoted_encode): Different quoted-printable encoding for rfc2047 - encoding of headers. - - * gmime-content-field.c (gmime_content_field_write_to_stream): Use - header_content_type_format() to format it. - -2000-04-21 NotZed - - * camel-mime-utils.h: Add prototype for header_param_list_free. - - * camel-recipient.c: New function to remove all the types of a - recipient list. I think this whole object needs a major review. - - * camel-mime-message.c (camel_mime_message_class_init): Removed - parse_header_pair override, override add_header instead. - (_parse_header_pair): Renamed to add_header. - (remove_header): Add this method, to make sure we keep upto date - with removed headers too. - (_set_field): If given a NULL value, clear it out. - (_set_recipient_list_from_string): Constify. - (set_header): Override set_header from camel_medium. - (process_header): Local function to handle set/add/remove of each - header we know about. - - * camel-mime-part.c (camel_mime_part_class_init): Removed - parse_header_pair setup. - (my_parse_header_pair): Moved into add_header(), removed. - (my_set_disposition): Allow a NULL disposition to clear it. - (my_set_content_id): Allow NULL content id to clear it. - (remove_header): Track removed headers. - (my_set_description): Allow NULL description to clear it. - (my_set_content_MD5): Make sure we copy the md5 value, and allow a - NULL value to reset it. - (my_set_filename): Copy the filename. - (my_set_header_lines): Removed. Nothing uses it, it doesn't - actually serve any purpose. - (camel_mime_part_set_header_lines): Ditto. - (my_get_header_lines): Ditto. - (camel_mime_part_get_header_lines): Ditto. - (camel_mime_part_class_init): Remove *_header_lines setup. - (camel_mime_part_init): Remove header_lines init. - (my_finalize): Remove header_lines finalise. - (my_write_to_stream): Write the headers here. This is just WRONG, - camel_medium should be doing this. - (my_get_output_stream): Kill a warning. - (camel_mime_part_encoding_to_string): Ditto. - (camel_mime_part_set_description): Unvirtualiase, use add_header() - to do the processing. - (my_set_description): Removed. - (set_disposition): Renamed from my_set_disposition. - (camel_mime_part_get_description): Get the descriptionf rom the - get_header method. - (my_get_description): Removed. - (my_set_filename): Removed. - (camel_mime_part_get_filename): Get the parameter from the - disposition. - (camel_mime_part_encoding_from_string): Handle NULL string. - (camel_mime_part_init): Remove reference to filename. - (my_finalize): Dont free filename. - - * camel-mime-part.h (CamelMimePartClass): Removed - parse_header_pair() method, it doesn't add anything that - add_header() can't be used for. - (CamelMimePartClass): Remove *_header_lines methods. - (struct _CamelMimePart): Remove header_lines list. - (struct _CamelMimePart): Removed filename attribute. - - * camel-medium.c (camel_medium_init): Init headers to null, not a - hashtable. - (add_header): Append the headers as a list. - (remove_header): Remove headers as a list. - (get_header): Likewise for lookup. - (free_header): Removed, no longer needed. - (finalize): Free headers using header_raw_clear(). - (camel_medium_set_header): New function, to reset and override all - values of a header with a new value. - - * camel-medium.h (struct _CamelMedium): Changed to use a - header_raw struct rather than a hash table, to store headers - (many headers can occur multiple times). - - * camel-mime-utils.c (header_raw_find_next): New function, allows - you to find multi-valued header fields. - (header_disposition_format): New function to format/create - content-disposition header string. - (header_param_list_format_append): Function to format parameter - lists into a GString. - (header_content_type_format): Function to format content-type into - a usable format. - (header_set_param): allow NULL value to remove the parameter. - (decode_token): Renamed from header_decode_token. - (header_decode_token): New interface for external use. - (quoted_decode): Made static to kill annoying warnings. - (g_strdup_len): Killed, replaced with calls to g_strndup(). - (rfc2047_decode_word): Made static to kill warnings. - (decode_coded_string): Terminated. - (g_string_append_len): Made static to kill warnings. - (header_decode_text): Made static to kill warnings. - (header_decode_text): Constify. - (rfc2047_decode_word): Constify. - (header_param): Constify. - (header_content_type_new): Copy the type/subtype strings. - (header_param_list_decode): Made static. - (header_param_list_format_append): Made static. - (quoted_decode): Constify. - (g_string_append_len): Constify. - (header_token_decode): New function to decode a single token. - - * providers/mbox/camel-mbox-summary.c (header_write): Append a - trailing \n when writing headers. - (strdup_trim): Killed a warning. - (camel_mbox_summary_set_uid): Make sure the next uid is at least 1 - higher than any existing one. - (header_evolution_decode): Use header_token_decode to get the - token. - - * camel-mime-parser.c (folder_scan_header): Strip the trailing \n - of the end of all header lines. - -2000-04-20 NotZed - - * providers/mbox/camel-mbox-utils.[ch]: Removed. - - * providers/mbox/camel-mbox-parser.[ch]: Removed. Removed - references to it. - -2000-04-20 Dan Winship - - * camel-mime-utils.c (rfc2047_decode_word): use libunicode iconv - functions rather than libc ones (since libc might not have them). - (header_decode_date): add autoconfiscation on timezone code - - * camel.c (camel_init): call unicode_init () - -2000-04-20 NotZed - - * providers/mbox/camel-mbox-summary.c (message_struct_new): Trim - leading/trailing spaces off the raw headers. - - * MERGE NEW_PARSER branch into HEAD, fixed conflicts. - - * gmime-content-field.c (_print_parameter): Duh, removed again - (@@#$@ cvs merge). - - * camel-mime-utils.c (header_content_type_is): Constify. - (header_content_type_unref): Killed a couple warnings. - - * camel-folder.c (_init): Removed more log crap. - - * providers/Makefile.am (SUBDIRS): Removed nntp, pending fixes for - summary changes. - - * providers/mbox/camel-mbox-folder.c (_get_message_by_number): - Fixed for new summary interface. Added a warning for using this - broken api. - (_get_message_by_uid): Fixed for message new with session - vanishing. - -2000-04-19 Dan Winship - - * camel-simple-data-wrapper-stream.c - (camel_simple_data_wrapper_stream_get_type): This is a subtype of - CamelSeekableStream, not CamelStream. - - * camel-seekable-substream.c: clean up a lot. - (eos): When testing for end-of-stream, reset the parent position - before testing if it is at end-of-stream, since either (a) it may - have been seek'ed to eos by someone else, or (b) we may have been - seek'ed away from eos and it hasn't been synced yet. - - * camel-medium.[ch] (camel_medium_add_header): const poison. - (Belatedly goes with my change of 2000-02-23.) - (camel_medium_init): Use g_strcase_{hash,equal} on the header - array. - -2000-04-18 Dan Winship - - * camel-mime-part.c (my_set_input_stream): - * camel-data-wrapper.c (set_input_stream, set_output_stream): do - better reference counting of streams so they actually go away - when they should. - - * camel-log.[ch], *: Nuke camel log stuff. Replace calls to - CAMEL_LOG_WARNING with calls to g_warning. - - * camel-data-wrapper.[ch]: - * camel-simple-data-wrapper.[ch]: - * camel-medium.[ch]: Clean, polish, document. Most of the gtk-doc - comments added to camel-data-wrapper.c note serious problems that - need to be fixed. - -2000-04-17 Dan Winship - - * camel-mime-message.[ch]: Remove the "session" field from - CamelMimeMessage. Nothing uses it, about half of the existing - calls to camel_mime_message_new_with_session pass NULL, and - there's no obvious reason for it to be there. - - * providers/MH/camel-mh-folder.c: - * providers/maildir/camel-maildir-folder.c: - * providers/mbox/camel-mbox-folder.c: - * providers/mbox/camel-mbox-utils.c: - * providers/nntp/camel-nntp-folder.c: - * providers/pop3/camel-pop3-folder.c: Use camel_mime_message_new - instead of camel_mime_message_new_with_session. - - * camel-session.c (get_store_for_protocol_with_url): Set the - exception if no provider is found. - - * camel-url.c: Add code to encode and decode %-escapes in URLs, - and do some additional correctness-checking on URL syntax. From - Tiago Antŕo with modifications by me. - -2000-04-14 Chris Toshok - - * providers/Makefile.am (SUBDIRS): add nntp - -2000-04-14 Christopher James Lahey - - * providers/mbox/camel-mbox-folder.c: Fix switch statement. - -2000-04-14 Chris Toshok - - * providers/nntp/camel-nntp-folder.c (_exists): always return TRUE - for now. we need to check the server response to make sure the - group exists. - (_get_message_by_uid): make sure to account for the \n we add to - the string after every line. - - * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): function - to get the headers using the XOVER command. - (get_HEAD_headers): function to get the headers using the HEAD - command on each message. slooooooow. - (camel_nntp_get_headers): make this function use either XOVER or HEAD - versions depending on whether or not the server extension is present. - -2000-04-14 Dan Winship - - * camel-formatter.[ch]: This didn't belong in Camel. Move to mail/ - - * Makefile.am, camel-types.h: remove references to - camel-formatter. - -2000-04-12 Matt Loper - - * camel-folder-pt-proxy.c (_folder_open_cb): Print warning message - for broken function. - (_folder_close_cb): Same. - -2000-04-12 Miguel de Icaza - - * Makefile.am (pthread_SRC): Use correct names for the pthread - source variables. - -2000-04-10 Dan Winship - - * providers/pop3/camel-pop3-store.c (pop3_connect): fix various - bugs in APOP code (still untested) and some of the error cases. - - * camel-provider.h: Clarify what provider.protocol, provider.name, - and provider.description should be. - - * providers/mbox/camel-mbox-provider.c: - * providers/pop3/camel-pop3-provider.c: - * providers/sendmail/camel-sendmail-provider.c: - * providers/smtp/camel-smtp-provider.c: update protocols, names, - and descriptions - - * providers/mbox/camel-mbox-folder.c (_get_message_by_number): - implement get_message_by_number for the mail fetch code. - -2000-04-09 Jeffrey Stedfast - - * providers/smtp/camel-smtp-transport.c: reformatted to fit - the standard indent format used by helix code - -2000-04-09 Dan Winship - - * camel-movemail.c: New file with new function to dot-lock an mbox - file and copy it to a safe private directory. - -2000-04-08 Christopher James Lahey - - * providers/smtp/.cvsignore: Added a .cvsignore file. - -2000-04-08 Dan Winship - - * providers/sendmail/camel-sendmail-transport.c (_send_internal): - actually record the pid returned by fork(). Noticed by clahey. - - * providers/smtp/camel-smtp-transport.c: #include - for MAXHOSTNAMELEN. (This is a stopgap: some of the uses of - MAXHOSTNAMELEN are wrong anyway...) - -2000-04-07 Jeffrey Stedfast - - * providers/smtp/camel-smtp-transport.c: fixes to numerous bugs; - should now build fine. - * providers/Makefile.am: Readded smtp now that smtp builds without - error. - -2000-04-20 NotZed - - * providers/mbox/camel-mbox-summary.c - (camel_mbox_summary_next_uid): Public function to get the next - uid, makes sure its saved to disk too. - - * camel-mime-part.c (my_finalize): Fix disposition crap with a - real disposition. - (my_set_disposition): Likewise. - (my_get_disposition): And here. - (my_write_to_stream): And here, needs more cleanup. - - * providers/mbox/camel-mbox-folder.c (_append_message): Assign a - new uid at this point. - - * gmime-content-field.c (gmime_content_field_write_to_stream): - Make something up if we have an invalid/missing content type - (i.e. text/plain). - -2000-04-19 NotZed - - * providers/mbox/camel-mbox-folder.c (_delete): Fixed completely - broken switch() syntax, only compiled because errno is a macro on - some systems. - (_list_subfolders): Likewise. - -2000-04-18 NotZed - - * camel-mime-parser.c (folder_scan_init): init stream to null. - - * providers/mbox/camel-mbox-summary.c - (CAMEL_MBOX_SUMMARY_VERSION): Moved to .c file, incremented. - (index_folder): Changed to have index passed via the summary. - (decode_string): Do a sanity check on the string size, so we dont - visit g_malloc()'s friendly abort(). - - * camel-folder-pt-proxy.c (camel_folder_pt_proxy_class_init): - Removed reference to set_name. - (_set_name): Removed. - - * providers/mbox/camel-mbox-utils.c - (parsed_information_to_mbox_summary): Removed. Most of this file - is about to be binned. - - * providers/mbox/camel-mbox-search.c (func_header_contains): Fixes - for changes to summary interface. - (struct _searchcontext): Remove pointer to message info, get it - straight from the mboxsummary. - (camel_mbox_folder_search_by_expression): New summary interface. - (camel_mbox_folder_search_by_expression): Uh, the summary is not - an object anymore (well not yet). - - * providers/mbox/camel-mbox-folder.c - (camel_mbox_folder_class_init): Removed set_name init. - (_set_name): Removed. - (_open): Call new summary interface. - (_close): Use new summary interface. - (_create): Removed a summary object leak. - (_get_message_count): New summary interface. - (_get_uid_list): Use new summary interface. FIXME: this is leaky. - (_get_message_by_uid): Use the new summary interface, some - cleanup. - (_append_message): Totally changed, basically just appends the - message directly, ignores the summary (for now), the summary will - fix itself up if it needs to. - (_check_get_or_maybe_generate_summary_file): Bye bye old code. - (summary_get_message_info): Implement get_message_info again, for - folder. - - * camel-folder.c (camel_folder_class_init): Removed set_name - setup. - (_set_name): Moved contents into _init. - (_init): Perform the old functions of set_name here. - - * camel-folder.h: Removed the set_name internal interface. - -2000-04-14 NotZed - - * providers/mbox/camel-mbox-summary.[ch]: Completely replaced with - new code. - - * Makefile.am (libcamel_la_SOURCES): Removed - camel-folder-summary.[ch]. - - * camel-folder.h (struct _CamelFolder): Removed summary. - (struct _CamelFolder): Changed flags to be 1 bit bitfields. - - * camel-folder-summary.[ch]: Class removed entirely. - - * camel-folder.c (camel_folder_get_summary): Removed. - (camel_folder_summary_get_message_info): Moved from - camel-folder-summary.c - (camel_folder_summary_get_subfolder_info): Moved from - camel-folder-summary.c - - * camel-mime-parser.c (folder_scan_step): Store the start of - headers and start of from in the scan state. - (camel_mime_parser_tell_start_headers): Query the start of the - headers. - (camel_mime_parser_tell_start_from): Query the cached start of - from marker. - -2000-04-13 NotZed - - * gmime-content-field.c (gmime_content_field_free): Removed this - function. If its too dangerous to use, it shouldn't be here. - (gmime_content_field_ref): Also ref the embedded content-type. - (gmime_content_field_unref): Ditto to unref it. - - * camel-mime-utils.h: Add a refcount for content-type header. - - * camel-mime-utils.c (header_content_type_unref): Implement unref - for content-type. - (header_content_type_ref): Implement ref for header content type. - -2000-04-12 NotZed - - * gmime-content-field.h: Changed to use a _header_content_type. - Added type/subtype back for compatability with clients. - - * gmime-content-field.c: Basically a total rewrite, and now just a - thin wrapper ontop of header_content_type. - (_free_parameter): Got rid of it. - (gmime_content_field_new): Use header_content_type_* functions. - (gmime_content_field_set_parameter): Likewise. - (_print_parameter): Blow away. - (gmime_content_field_write_to_stream): Get details from the - content_type field. Should check if it needs to escape chars in - the paramter value. - (gmime_content_field_get_mime_type): Likewise. - (___debug_print_parameter): Get rid of this rather annoyingly - named function. - (gmime_content_field_get_parameter): Simplified function. - (gmime_content_field_construct_from_string): Fixed this to use a - real parser. - (gmime_content_field_is_type): New function to test if a type matches. - (gmime_content_field_construct_from_string): Track type/subtype - from subordinate content_type header struct. - - * gmime-rfc2047.[ch]: Removed. Unused. - - * camel-stream-b64.[ch]: Blown away more duplicated code. - - * Makefile.am: Removed camel-stream-b64.[ch], and - gmime-base64.[ch]. - - * camel-mime-part.c (my_get_content_object): Replaced - camel-stream-b64 with camel-stream-filter/camel-mime-filter-basic. - (my_write_content_to_stream): Replaced camel-stream-b64 with the - camel-stream-filter with an encoder. - (my_get_content_object): Also implement quoted-printable decoding. - (my_write_content_to_stream): Also implement quoted-printable - encoding. - (my_get_output_stream): Took out stream-b64 code (nothing's being - executed yet anyway). - - * gmime-base64.[ch]: Blown away. Not used, dont need it. - - * camel-mime-utils.h: Added offset for this header. Records where - it is in the source. - - * camel-mime-utils.c (header_raw_append_parse): Add offset - parameter, to store where the header is stored in the stream. - (header_raw_append): Added offset param. - (header_raw_find): Return offset, if a pointer supplied for it. - (header_raw_replace): Add offset param. - (header_content_type_new): New function, to create an empty - content type. - (header_content_type_set_param): Set a parameter in the - content-type. - (header_set_param): Generic header parameter setting function. - (header_decode_string): Handle NULL input. - - * camel-mime-parser.c (camel_mime_parser_headers_raw): New - function to get access to all the raw headers. - (folder_scan_header): Keep track of the header start position, and - store it when saving the header. - -2000-04-11 NotZed - - * camel-mime-utils.c: Moved a bunch of printf's to debug. - - * camel-mime-parser.c: Moved a bunch of printf's to debug. - (folder_scan_header): Detect end of each header line using the - last scanned char, and not the last scanned position. - - * camel-mime-filter-index.[ch]: Indexing filter. Indexes unicode - sequences into ibex files. - -2000-04-09 NotZed - - * camel-mime-part.c: Dont include gmime-base64.h - - * camel-mime-filter-charset.c (complete): Implement the completion - function. - - * camel-mime-parser.c (folder_scan_step): If we get to the end of - the body data, check any filters for outstanding completion data. - (camel_mime_parser_scan_from): Set whether we scan for "From " - headers or not. - - * camel-stream-filter.c (do_read): If we get to end of stream on - the source, then call the filtering completion function to see if - we have any more data to return. - - * camel-mime-filter-basic.c (filter): Implement quoted printable - encoding and decoding filters. - (complete): And the complete function as well. - - * camel-mime-utils.c (base64_encode_close): Also take an input - buffer, allow closing of filters. - (quoted_encode_step): First cut, simple quoted-printable encoder. - Doesn't handle trailing spaces/tabs on end of line properly yet. - (quoted_encode_close): Complete a quoted-encoding. - (is_qpsafe): New type check, for quoted-printable safe characters - (that do not need encoding). Thats all bits used in the type - table! Rebuilt the types table. - (header_content_type_is): Checks a content type against at - type/subtype match. - (header_content_type_param): Handle NULL content type pointer. - -2000-04-08 NotZed - - * camel-mime-filter-basic.c (filter): Implement the base64 - encoder. Problem is, there is no way to know when to close it. - Close/Reset will have to provide the same args as filter, so it can - flush remaining data *sigh* - - * camel-mime-utils.c (base64_encode_step): A rather complex base64 - encoder, fast? - (base64_step_close): Companion function to finish off the base64 - sequence. - - * camel-mime-part.c (my_write_content_to_stream): Changed to use - camel_stream_write_to_stream(). - - * camel-stream.[ch] (camel_stream_write_to_stream): From - camel_stream_b64_write_to_stream(). Fixed some infinite loop - bugs with error conditions. - - * camel-stream-b64.[ch] (camel_stream_b64_write_to_stream): Removed. - This has nothing to do with stream-b64, so i've moved it to - CamelStream. - - * camel-mime-utils.h: Add a comment about refcounting - header_content_type struct. - - * Makefile.am: Added camel-stream-filter*.[ch]. - - * camel-stream-filter.[ch]: Class to implement a generic - (multipass) filter ontop of a stream. Only implements a read-only - stream. - - * camel-mime-parser.c (camel_mime_parser_filter_add): Ref the - filter we just added. - - * Makefile.am: Added camel-mime-filter*.[ch]. - - * camel-mime-filter-charset.[ch]: A filter to preform character set - conversion (uses unicode_iconv). - - * camel-mime-filter-save.[ch]: A simple filter which will save all - data directly to a file or file descriptor. - - * camel-mime-filter-basic.[ch]: Implements the basic mime filters, - base64 and quoted-printable decoding (encoding not implemented yet). - - * camel-mime-filter.[ch]: A filtering class, which can filter streams - of data without having to copy them. Simpler than stream classes, - and can be plugged into a single stream class (when i write it). - -2000-04-07 Dan Winship - - * providers/pop3/camel-pop3-store.c (pop3_connect): Clarify error - messages. - (finalize): fix a bug in camel_exception usage - (pop3_connect): Remember the password after asking for it the - first time. - -2000-04-07 NotZed - - * Makefile.am: Added camel-mime-parser/camel-mime-utils. - - * camel-mime-parser.c: Fast mime parser. - - * camel-mime-utils.c: Mime utility functions, and email header - parsers. - -2000-04-07 NotZed - - * providers/Makefile.am: Removed smtp for now, its a long way from - building. - * providers/smtp/Makefile.in: Removed file that shouldn't have been - checked in. - -2000-04-06 Matt Loper - - * camel-folder-pt-proxy.c (_get_full_name): Remove exception param - from get_full_name() called, since get_full_name() was changed to - not have an exception in the last param (see dan's notes below). - (_get_name): same. - -2000-04-06 Dan Winship - - * camel-store.[ch]: Reorganize the folder-fetching methods and - implement a folder cache so that multiple requests for the same - folder will yield the same CamelFolder object (as long as it - remains active). Includes some code to remove no-longer-active - folders from the cache, but it doesn't get used since nothing is - ever unref'ed in Camel right now... - - * providers/mbox/camel-mbox-store.c: - * providers/pop3/camel-pop3-store.c: update for CamelStore - changes. - - * camel-folder.[ch]: Remove the (unused) CamelException argument - from camel_folder_get_name and camel_folder_get_full_name. - (camel_folder_set_name): make this go away since changing a - folder's name after it has been created could result in it - conflicting with a separately-issued folder. - -2000-04-05 Dan Winship - - * g_url_new really wanted to take a CamelException. So, rename - Gurl to CamelURL, g_url_* to camel_url_* (with camel_url_new - taking an exception), and url-util.[ch] to camel-url.[ch]. Also - force url->port to be numeric and remove camel_service_getport. (I - was confused before: the URL RFC says the port must be numeric, so - we don't want to do getportbyname.) - -2000-04-01 Dan Winship - - * providers/mbox/camel-mbox-folder.c - (_check_get_or_maybe_generate_summary_file): Compare - mbox_file_size and mbox_modtime to the results of stat()ing the - mbox file, not the summary file. Duh. - (_close): Update the summary's mbox_file_size and mbox_modtime - before writing it to disk. - - * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_save, - camel_mbox_summary_load): Wow. I must have been tired when I wrote - this code. First, the comparison bug above. Second, it was using - ntohs and htons instead of ntohl and htonl. Third, I was reading - the status flag byte in two different places and thus getting out - of sync. Fourth, it was writing out field_length bytes of each - header field after having converted field_length to network byte - order, resulting in lots of random crap being appended, and the - summary files being huge. (Fortunately, since the size/modtime - comparison was biffed, the garbage summary read from disk was - always immediately discarded.) - - * providers/mbox/camel-mbox-parser.c (camel_mbox_parse_file): fix - an off-by-one error that caused the last-used UID to be reused if - the summary file was regenerated. (That one wasn't my fault. :-) - -2000-03-31 Dan Winship - - * camel-stream-mem.c: implement unimplemented methods - - * gmime-content-field.c - (gmime_content_field_construct_from_string): - * data-wrapper-repository.c - (data_wrapper_repository_get_data_wrapper_type): - * camel-simple-data-wrapper.c (my_write_to_stream): - * camel-mime-part.c (my_set_input_stream): - remove debugging printf()s that no longer seem useful. - -2000-03-31 Matt Loper - - * camel-formatter.c (text_to_html): Added "convert_newlines_to_br" - boolean param, to give the option of not converting '\n's to
- tags. This way, when we stick stuff in a
 tag, newlines stay
-	newlines.
-
-2000-03-30  Matt Loper  
-
-	* camel-formatter.c (handle_text_plain): Use 
 tag to force
-	the use of monospaced fonts.
-
-2000-03-30  Dan Winship  
-
-	* camel-service.c (camel_service_getport): Add a htons in the
-	default_number case, and document the fact that the function
-	returns the port in network byte order.
-
-	* providers/pop3/camel-pop3-store.c (pop3_connect): Revert
-	Miguel's change. The port number bug was actually somewhere
-	else, and the IP address copying code was fine already.
-	
-2000-03-29  Miguel de Icaza  
-
-	* providers/pop3/camel-pop3-store.c (pop3_connect): Add htons
-	(port), and only copy 4 bytes for the IP address to prevent a DNS
-	attack. 
-
-2000-03-28  Dan Winship  
-
-	* camel-seekable-substream.c
-	(camel_seekable_substream_new_with_seekable_stream_and_bounds):
-	make this return a CamelStream rather than a
-	CamelSeekableSubstream, because that's the way Gtk objects tend to
-	work.
-
-	* camel-service.c (camel_service_gethost,
-	camel_service_getport): convenience functions to canonicalize
-	the host and port values of a service's URL.
-	* providers/pop3/camel-pop3-store.c: use them
-
-	* providers/mbox/camel-mbox-folder.c
-	(_check_get_or_maybe_generate_summary_file): Make this work when
-	the inbox file doesn't yet exist.
-
-2000-03-27  Dan Winship  
-
-	* providers/mbox/camel-mbox-folder.c (_append_message): uncomment
-	the call to unlink the temp file: there's no way to tell
-	camel_stream_fs to truncate a file, so reusing the same file was
-	resulting in junk at the ends of messages.
-
-	* camel-folder.[ch]: add delete_message_by_{number,uid}.
-
-	* providers/pop3/camel-pop3-folder.[ch]: implement
-	delete_message_by_uid. Add a close method to do expunging
-	of deleted messages if requested.
-
-	* providers/pop3/camel-pop3-store.[ch]: support for
-	CamelPop3Folder::close. (You have to close the connection
-	in order to expunge the folder, thus the store may be
-	connected in the CamelService::is_connected sense when it
-	is not actually connected to the server.) Also some bugfixes.
-
-2000-03-27  NotZed  
-
-	* providers/mbox/camel-mbox-folder.c (_append_message): Unref the
-	output_stream when done, close doesn't do it.
-	(_append_message): Clear all uid's from the appending messages, so
-	they are reassigned proper unique id's.
-
-	* gmime-utils.c (get_header_array_from_stream): Actually free the
-	header, it is copied elsewhere.
-
-2000-03-26  NotZed  
-
-	* providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev): Added
-	folder parameter to function.  Fixed callers.
-	(index_message): Index a message as it is assigned a unique id.
-
-	* camel-mime-part.c (my_set_content_id): Make sure we malloc and
-	copy the content_id, otherwise *poof*
-
-2000-03-25  NotZed  
-
-	* camel-medium.c (_finalize): Another leak, unref the content if
-	finished with it.
-
-	* camel-recipient.c (camel_recipient_table_free): Plug another
-	memory leak - actually free the recipient table.
-
-	* camel-mime-message.c (_finalize): Plugged a memory leak with the
-	flags table.
-
-	* gmime-utils.c (_store_header_pair_from_string): A simpler, more
-	debuggable and functionally identical header extraction function.
-
-2000-03-24  NotZed  
-
-	* gmime-content-field.c (gmime_content_field_set_parameter):
-	Remove the hash table entry before freeing its key and data.
-
-2000-03-27  Dan Winship  
-
-	* providers/Makefile.am (SUBDIRS): Add pop3.
-
-	* providers/pop3/camel-pop3-store.c: keep separate input and
-	output streams so the output doesn't end up being buffered.
-
-	* providers/pop3/camel-pop3-folder.c (get_message_by_number):
-	finish implementing this.
-
-2000-03-27  Michael Meeks  
-
-	* camel-mime-part.c (my_set_disposition): fix so less broken.
-	(my_finalize): remove dodgy disposition free.
-
-	* camel-data-wrapper.c (my_set_mime_type_field): unref instead of
-	free on mime_type.
-
-2000-03-27  Dan Winship  
-
-	* camel-service.c (camel_service_free_auth_types): new routine to
-	free the data allocated by camel_service_query_auth_types.
-
-	* providers/pop3/camel-pop3-store.c (free_auth_types): implement
-
-	* camel-stream-mem.c (camel_stream_mem_new_with_buffer): rename
-	camel_stream_mem_new_with_buffer to ..._with_byte_array and add a
-	new ..._with_buffer that takes a char * rather than a GByteArray.
-
-	* Remove CamelStreamBufferedFs, since CamelStreamBuffer makes it
-	redundant.
-
-2000-03-25  Dan Winship  
-
-	* camel-folder-summary.[ch]: change the CamelFolderSummary
-	interfaces to allow partial summary queries (for dealing
-	with very large folders). Remove the "extended_fields" from
-	CamelFolderInfo and CamelMessageInfo: this is better dealt
-	with by subtyping.
-
-	* providers/mbox/camel-mbox-summary.[ch]: Make CamelMboxSummary a
-	subclass of CamelFolderSummary. Update interfaces for that. Remove
-	the internal/external summary distinction. Remove the (unused) md5
-	checksum in the folder summary. Change the summary file format
-	(primarily to make it no longer byte-order dependent) and add a
-	version number to it so it will be easier to change in the future.
-	
-	* providers/mbox/camel-mbox-folder.[ch]
-	* providers/mbox/camel-mbox-search.c
-	* providers/mbox/camel-mbox-utils.c: update for summary changes
-
-	* camel-exception-list.def: add
-	CAMEL_EXCEPTION_FOLDER_SUMMARY_INVALID
-	
-2000-03-23  NotZed  
-
-	* providers/mbox/camel-mbox-provider.c: Added flag to provider
-	initialisation, to match changed structure.
-
-2000-03-22  NotZed  
-
-	* camel-folder.[ch]: Added async search api.
-
-	* providers/mbox/camel-mbox-search.c
-	(camel_mbox_folder_search_by_expression): Changed to use an
-	asynchronous interface.
-	(camel_mbox_folder_search_cancel): Cancel function for async
-	interface.
-
-2000-03-23  Dan Winship  
-
-	* camel-stream-buffer.c (camel_stream_buffer_read_line): Function
-	to read one line of any size from a stream and return it in
-	allocated memory.
-
-2000-03-22  Dan Winship  
-
-	* camel-service.c (camel_service_query_auth_types): New function
-	to query a service for the authentication protocols it supports.
-	* providers/pop3/camel-pop3-store.c (query_auth_types): implement
-
-	* camel-provider.c (camel_provider_scan): New function to
-	scan the provider dir and return a list of all providers.
-
-	* providers/pop3/camel-pop3-folder.c: fill this in partially
-	* providers/pop3/camel-pop3-store.c: make camel_pop3_command
-	return the text after "+OK"/"-ERR" and add a separate
-	camel_pop3_get_additional_data to get the message body or
-	whatever. Also make them take a CamelPop3Store rather than
-	a CamelStreamBuffer.
-
-2000-03-22  Matt Loper  
-
-	* camel-formatter.c (debug): Disabled some useless debug
-	messaging.
-
-2000-03-21  Dan Winship  
-
-	* providers/pop3: some initial bits of the POP3 provider, to
-	make Matt happy. Incomplete, untested, etc.
-
-2000-03-21  bertrand  
-
-	* providers/mbox/camel-mbox-summary.c 
-	(camel_mbox_summary_append_internal_to_external): copy the size field
-
-	* providers/mbox/camel-mbox-folder.c (_get_message_by_uid): initialize 
-	message_info to NULL
-
-	* camel-folder-summary.h: added the size field.
-
-	* providers/mbox/camel-mbox-summary.h: 
-	added the received_date field.
-
-	* providers/mbox/camel-mbox-summary.c:
-	documented all functions.
-
-	* camel-folder-summary.h: name change and 
-	new fields.
-
-	* providers/mbox/camel-mbox-search.c: update to 
-	conform to name change in the summary fields.
-
-2000-03-10  bertrand  
-
-	* camel-service.h: cosmetic changes.
-
-2000-03-09  Dan Winship  
-
-	* s/HelixCode/Helix Code, Inc./ in the copyrights
-
-2000-03-07  bertrand  
-
-	* camel-formatter.c (handle_mime_part): 
-	plug mem leaks due to bad documentation
-	of camel_content_field_get_mime_type
-	(print_camel_body_part): idem
-	(handle_multipart_alternative): idem
-
-	* gmime-content-field.c (gmime_content_field_get_mime_type): 
-	documentation fix.
-
-
-	* camel-mime-part.c (my_finalize): unref the 
-	content_input_stream if any. 
-
-2000-03-06  bertrand  
-
-	* camel-stream-fs.c (_seek): fix a bogus calculation
-	in the return position.
-
-2000-03-05  bertrand  
-
-	* camel-session.h: cosmetic fixes.
-
-	* camel-stream-fs.c (_read): 
-	(_seek): fixed the current position so that it refers
-	to the current position in the stream, not in its parent.
-
-2000-03-04  NotZed  
-
-	* providers/mbox/camel-mbox-search.c
-	(camel_mbox_folder_search_by_expression): Ref the summary
-	after we have got it.
-
-2000-03-04  bertrand  
-
-	* camel-mime-part.c (my_write_content_to_stream): 
-	stream the raw content instead of nothing if the encoding
-	is not supported.
-
-	* camel-stream-fs.c (_seek): handle eos more
-	properly.
-
-	* camel-formatter.c (get_bonobo_tag_for_object): 
-	bonobo-goad-id is the good key to look for. 
-	(get_bonobo_tag_for_object): close the  tag.
-	(get_bonobo_tag_for_object): the correct syntax for the
-	to set a parameter inside an  tag is :
-	  
-	
-
-2000-03-03  bertrand  
-
-	* providers/mbox/camel-mbox-folder.c (_get_message_by_uid): 
-	use set_input_stream instead of construct_from_stream
-	to feed the message object. 
-
-	* camel-data-wrapper.c (my_write_to_stream): reset output stream.
-	(my_set_input_stream): unref the previous input stream.
-	use the set_output_stream for default behaviour.
-	(my_set_output_stream): unref previous output stream.
-
-	* camel-mime-part.c (my_write_content_to_stream): reset content
-	object output stream.
-
-2000-03-03  NotZed  
-
-	* providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev): Make
-	sure we open with create with a creation mask.
-
-2000-03-01  NotZed  
-
-	* camel-mime-part-utils.c
-	(camel_mime_part_construct_content_from_stream): DO NOT assert on
-	content type, we have fallback code 4 lines below it ... *sigh*
-
-2000-02-29  NotZed  
-
-	* Makefile.am (libcamelinclude_HEADERS): Added camel-stream-buffer
-	to build.
-
-	* camel-stream-buffer.[ch]: Generic buffer which can be applied to
-	any stream.
-
-2000-03-03  bertrand  
-
-	* camel-formatter.c (handle_image): in the case
-	of images, put the content object output stream
-	in the url. This allows the message browser
-	to show inline images.
-
-	* camel-stream-b64.c (my_read_encode): fixed state
-	0 keep value. 
-
-2000-03-02  bertrand  
-
-	* camel-stream-b64.c (my_read_encode): don't forget to 
-	set the state to 0 after 3.
-	(my_read_encode): don't forget to encode, even in state 3.
-
-	* camel-simple-data-wrapper.c: static functions are prefixed 
-	with my_ instead of _
-	* camel-multipart.c: static functions are prefixed 
-	with my_ instead of _
-	(my_write_to_stream): commented.
-	(my_write_to_stream): warning in case the boudary is set
-	but is a zero length string.
-
-	* camel-mime-part.c (camel_mime_part_encoding_from_string): 
-	remove debug trace. 
-	
-	* camel-mime-part.c: Replaced all static functions
-	with name begining with _ by the same name begining
-	with "my_" to prevent the possible conflicts 
-	with system symbols Dan warned us about. 
-	
-	* camel-stream-b64.c (camel_stream_b64_write_to_stream): 
-	use CamelStreamB64 type for the input stream.
-
-	* camel-mime-part.c (_get_content_object): remove 
-	debugging trace
-	(_write_content_to_stream): implement the b64 
-	encoding the new way (that is using camel_stream_b64)
-
-	* camel-data-wrapper.c (my_write_to_stream): 
-	fix implementation so that it writes properly
-	to the output stream even.
-
-	* camel-stream-b64.c (camel_stream_b64_write_to_stream): 
-	fix implementation. 
-
-2000-02-29  bertrand  
-
-	* camel-stream-b64.c (camel_stream_b64_write_to_stream): new
-	utility function. 
-
-	* camel-data-wrapper.c (_write_to_stream): default
-	implementation. 
-
-	* gmime-utils.c (_store_header_pair_from_string): 
-	revert strange changes. 
-
-	* camel-stream-b64.c (my_read_decode): set eos to true when we
-	have read the whole input stream. 
-	(my_reset): set eos to FALSE.
-
-2000-02-28  NotZed  
-
-	* camel-mime-part.c (_parse_header_pair): Dont free this either.
-
-	* camel-medium.c (_remove_header): Ugh, dont free the header
-	before we actually remove it.
-	(_add_header): Ugh, dont free hashtable entries which may be
-	duplicated (hash_insert _will_ reference that memory).
-
-	* string-utils.c (string_trim): Trimming a 0-length string is not
-	an error.
-
-	* camel-mime-message.c (_parse_header_pair): Fixed very broken
-	memory handling of header_name/value.
-
-	* providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev):
-	Initialise end_of_last_message always.
-	(camel_mbox_copy_file_chunk): Stop trying to read if we run out of
-	data, rather than looping forever.
-	(camel_mbox_write_xev): Use an open flag when opening with create.
-
-	* camel-folder.c (camel_folder_search_by_expression): No, its not
-	a fatal error to search on a non-searchable folder, you just dont
-	get any matches.
-	(_open): Dont open an opened folder (i dont see why this is really
-	a bug, but what the hell ...)
-
-	* providers/mbox/camel-mbox-folder.c (_init): Set search cap on.
-	(_open): Call parent class to perform open.  Remove folder-open
-	check to parent instead.
-	(_create): open takes a creation mask, dont use umask to try and
-	set the open mode.
-	(_delete): Dont bother checking folder==NULL, its already been
-	checked on the external interface (changed to an assertion, this
-	would have to be a camel bug).
-	(_delete_messages): Likewise.
-	(_create): Ditto.
-	(_init): Dont go and clear all the paths and shit that the parent
-	open just setup for us.
-	(_delete_messages): Get rid of more umask stuff.
-	(_append_message): Make sure we pass file mode to open with create.
-	(_append_message): Cleaned up some indenting to make it readable.
-
-	* camel-stream-b64.c (my_read_encode): Fixed a typo.
-
-	* providers/mbox/camel-mbox-search.c: Changed to use e-sexp,
-	rather than filter-sexp.
-
-2000-02-28  bertrand  
-
-	* camel-stream-b64.c (my_read_encode): encoding
-	filter.
-
-2000-02-23  bertrand  
-
-	* camel-stream-b64.c: changed the __static 
-	suffix into a my_ prefix. 
-	(camel_stream_b64_set_mode): reset the persistent
-	status. 
-	(my_read_decode): remove superfluous %
-	
-	* providers/mbox/camel-mbox-utils.c (camel_mbox_copy_file_chunk): 
-	fix exception description message.
-
-2000-02-24  Dan Winship  
-
-	* camel-session.c: Add camel_session_get_transport_for_protocol.
-
-	* camel-transport.h:
-	* camel-transport.c: Add an abstract CamelTransport class.
-
-	* providers/sendmail/*: A CamelTransport that uses sendmail
-	to deliver mail.
-
-2000-02-24  Dan Winship  
-
-	* camel-folder.c: use CamelExceptions for run-time errors, not
-	incorrect code. Don't bother validating that an object exists from
-	inside one of its methods, since you couldn't have gotten there if
-	it didn't. Fix some code style bugs.
-
-	(_init): Rename init_with_store to init and add parent_folder,
-	separator, and name arguments.
-	(_set_name): Get separator from self, not parent_store now.
-
-	* camel-store.h:
-	* camel-store.c: Remove get/set_separator.
-
-	* providers/mbox/: Update for above.
-
-2000-02-23  Dan Winship  
-
-	* camel-medium.c (_finalize): Free the data in the headers hash
-	table.
-	(_add_header): g_strdup the header name and value when adding it.
-
-	* camel-mime-part-utils.c
-	(camel_mime_part_construct_headers_from_stream): Free the header
-	data after calling camel_medium_add_header, since it will have
-	g_strdup()ed it itself.
-
-2000-02-22  NotZed  
-
-	* providers/mbox/camel-mbox-search.c: Dont compile by default.
-
-	* providers/mbox/Makefile.am: Fuck off the filter code.
-
-2000-02-22  bertrand  
-
-	* camel-stream-b64.c (read_decode__static): 
-	don't read the char if we reached the length
-	of the output buffer. Hours lost on this
-	%$!@# bug : 3.5
-
-	* camel-folder.c (camel_folder_get_subfolder): 
-	(camel_folder_create): 
-	(camel_folder_delete): 
-	(camel_folder_delete_messages): 
-	(camel_folder_list_subfolders): 
-	(camel_folder_expunge): 
-	(camel_folder_get_message_by_number): 
-	(camel_folder_get_message_count): 
-	(camel_folder_append_message): 
-	(camel_folder_copy_message_to): 
-	(camel_folder_get_summary): 
-	(camel_folder_get_message_uid): 
-	(camel_folder_get_message_by_uid): 
-	(camel_folder_get_uid_list): 
-	Check folder state (open/close) and raise an
-	exception if it is not ok. 
-	
-	* providers/mbox/camel-mbox-folder.c (_create): 
-	create the file and the path with two different
-	names.
-
-	* camel-folder.c (_create): handle the case 
-	when the folder name starts with '/'
-
-	* camel-exception.c (camel_exception_new): use 
-	(void) instead of () in decl.
-
-	* camel-exception.h: cosmetic fixes.
-
-	* camel-exception.c (camel_exception_init): new routine.
-	Fix a bug in mail/message-list.c
-	
-
-	* camel-folder.h: cosmetic changes.
-
-	* camel-stream-b64.c (reset__static): added a
-	reset method. Thanks message-browser to find
-	so much bugs :)
-
-	* providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): readd
-	Unicode libs.
-
-2000-02-21  bertrand  
-
-	* camel-formatter.c (lookup_unique_id): 
-	awful hack to test get_output_stream.
-	* camel-stream-b64.[ch] :
-	b64 encoding/decoding is now implemented as
-	a stream. 
-	
-
-2000-02-21  bertrand  
-
-	* camel-seekable-substream.c (_reemit_parent_signal): 
-	emit "data_available" when parent stream emits it. 
-
-
-2000-02-21  NotZed  
-
-	* providers/mbox/Makefile.am: Uh, fixed LIBADD again.  What was
-	there was never ever going to work, wasn't it tested?
-
-
-2000-02-21  Dan Winship  
-
-	* camel-session.h: (struct _CamelSession): Add authenticator.
-
-	* camel-session.c (camel_session_new): Add authenticator.
-	(camel_session_query_authenticator): New function to query the
-	session authenticator for password, etc, information.
-
-2000-02-21  Dan Winship  
-
-	* camel-session.c: add CamelExceptions to several functions. Use
-	camel_session_new to initialize the session and URL fields of
-	created CamelStores as appropriate.
-
-	* camel-store.h:
-	* camel-store.c
-	* camel-service.h:
-	* camel-service.c: Move the session and url (and associated
-	functions) from CamelStore to CamelService. Add url_flags to
-	CamelService so subclasses can specify which URL components
-	are mandatory for them.	Add camel_session_new for
-	camel_session_get_store* to use.
-
-	* providers/mbox/camel-mbox-folder.c:
-	* providers/mbox/camel-mbox-store.c:
-	* providers/mbox/camel-mbox-store.h: Update for above changes.
-
-	* camel-exception-list.def: Once camel is being used for real,
-	exceptions won't be renumberable. So renumber them now to make
-	more room to add exceptions to the various categories later, and
-	add a big warning message.
-
-2000-02-20  Dan Winship  
-
-	* providers/mbox/Makefile.am: add libibex back to
-	libcamelmbox_la_LIBADD
-
-2000-02-18  NotZed  
-
-	* providers/mbox/camel-mbox-search.h
-	(camel_mbox_folder_search_by_expression): Added exception to call,
-	and fixed caller.
-
-	* providers/mbox/camel-mbox-search.c
-	(camel_mbox_folder_search_by_expression): Major changes, to use
-	the sexp evaluator from filter/filter-sexp.c to implement the
-	searching.
-	(func_body_contains): Changed to support multiple strings in 1
-	command (results or'd together)
-
-	* url-util.c (g_url_new): Fixed a typo (colon == 0 isn't right),
-	and made it so full url's are absolute pathed (Dan, this is how it
-	has to work!).  Also, always include a path part, even if it is an
-	empty string.
-
-2000-02-18  Dan Winship  
-
-	* camel/camel-types.h: New header with the typedefs for all camel
-	classes. Now the class headers can just include this and the
-	header for the parent type. This makes it possible for
-	CamelService to include a CamelSession without creating an
-	#include loop.
-
-	* camel/*:	
-	* composer/e-msg-composer-attachment-bar.h:
-	* mail/folder-browser.c:
-	* mail/message-list.c: frob #includes to match the new reality
-
-2000-02-17  Dan Winship  
-
-	* camel/camel-service.h:
-	* camel/camel-service.c: Make camel-service us a Gurl internally.
-	Remove the login/password interfaces and instead provide
-	camel_service_connect_with_url. Add CamelExceptions
-
-2000-02-17  bertrand  
-
-	* camel/camel-formatter.c (handle_text_plain): 
-	(handle_text_html): use camel_stream_reset instead
-	of seek. The formatter should be able to work 
-	with all streams, not only seekable streams. 
-	In the case where some provider implementation
-	would not be able to provide a reset method 
-	to their stream, implementors would have
-	to find a workaround.
-
-	* camel/camel-session.c (camel_session_new): use
-	(void) instean of () in function decl.
-
-	* camel/camel-folder.c: ifdef async operation 
-	related code. 
-
-	* camel/camel-seekable-stream.c (_seek): added a warning.
-	(_reset): default implementation of reset for seekable
-	stream.
-
-	* camel/camel-mime-message.h: set_received_date declaration fix.
-	cosmetic changes.
-
-	* camel/providers/mbox/camel-mbox-provider.c (camel_provider_module_init): 
-	use (void) instead of ().
-
-	* camel/camel-stream.c (camel_stream_reset): 
-	new method for CamelStream.
-
-2000-02-17  Dan Winship  
-
-	* camel/url-util.c (g_url_to_string): New function to convert
-	a Gurl back into a char *.
-
-2000-02-17  bertrand  
-
-	* camel/camel-formatter.c (handle_text_plain): 
-	revamped so that it uses the output stream
-	of the data wrapper
-	(handle_text_html): ditto.
-	
-	
-	* camel/camel-simple-data-wrapper.h: 
-	* camel/camel-simple-data-wrapper.c (camel_simple_data_wrapper_new): 
-	use (void) instead of ().
-	(_get_output_stream): simple implementation. 
-
-2000-02-16  bertrand  
-
-	* camel/camel-data-wrapper.c (_set_input_stream): ref input stream
-	(_set_output_stream): ref output stream
-	(_finalize): unref input and output streams
-
-	* camel/camel-seekable-substream.c (_set_bounds): don't
-	seek the begining of the substream.
-	(_eos): fix eos condition testing. 
-	(_finalize): unref parent stream
-	(_init_with_seekable_stream_and_bounds): ref parent stream
-
-	* camel/gstring-util.c (g_string_equal_for_hash): 
-	(g_string_equal_for_glist): return type is int.
-
-	* camel/camel.h: 
-	* camel/camel.c (camel_init): use (void) 
-	instead of ().
-	
-2000-02-16  NotZed  
-
-	* providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): Added
-	libfilter to link line (temporarily?).  Required for
-	filter-sexp.
-
-2000-02-15  bertrand  
-
-	* camel/camel-multipart.c (_localize_part): 
-	this routine replaces the _read_part routine
-	and does not store the part in a buffer. 
-	(_set_input_stream): use the set_input_stream
-	instead of the construct_from_stream.
-	each bodypart is given an input stream. 
-
-	* camel/camel-mime-part-utils.c: 
-	include the data-wrapper-repository header. 
-	(camel_mime_part_construct_content_from_stream): 
-	use the set_input_stream instead of the 
-	construct_from_stream method. 
-
-	* camel/camel-seekable-substream.c (_set_bounds): 
-	cur position is set to 0 not to inf_bound.
-
-2000-02-15  bertrand  
-
-	* camel/camel-mime-part.c: include gmime-base64.h
-	various compilation and runtime fixes.
-	(_set_input_stream): store the input substream 
-	for the content object.
-
-	* camel/camel-data-wrapper.h: declare the 
-	set/get function on input/output stream.
-
-	* camel/camel-mime-part.c (_get_content_object): 
-	don't use a temporary mem stream. 	
-
-	* camel/camel-seekable-substream.c (_seek): 
-	(_eos): 
-	(_read): the substream can be unlimited in length
-
-	* camel/camel-data-wrapper.c (camel_data_wrapper_class_init): 
-	set the get/set_input/output_stream methods. 	
-
-	* camel/camel-multipart.c (_construct_from_stream): 
-	camel_stream_seek -> camel_seekable_stream_seek
-
-2000-02-14  Miguel de Icaza  
-
-	* camel/providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): Add
-	the unicode libraries as well.
-
-	* camel/camel-provider.c (camel_provider_register_as_module): Add
-	error reporting here.  Desire to use Solaris increases.  Hair loss
-	in the last two hours: 5,400.
-
-	* camel/providers/mbox/camel-mbox-provider.c
-	(camel_mbox_get_provider): Renamed function.
-
-	* camel/camel.h: All include files use camel/ now here.
-
-	* camel/providers/mbox/Makefile.am: Drop all the dynamism from
-	Camel, and make this a standard library.
-
-2000-02-14  bertrand  
-
-	* camel/gmime-utils.c (get_header_array_from_stream): use the 
-	eos stream method. 
-	(gmime_read_line_from_stream): ditto.
-
-	* camel/camel-stream-fs.h (struct ): add the eof field
-	cosmetics changes. 
-
-	* camel/camel-stream-fs.c (camel_stream_fs_init): set eof.
-	(_read): set eof on end of file.
-	(_eos): implemented.
-
-	* camel/gmime-utils.c (get_header_array_from_stream): 
-	make a blocking version of the header parser. 
-	When the fs stream uses gnome-vfs, this should
-	be changed. 
-	(gmime_read_line_from_stream): ditto. 
-
-2000-02-11  bertrand  
-
-	* camel/camel-stream-fs.c: 
-	everywhere, when using the cur_pos field, do it
-	on the CamelSeekableStream object.
-	(_seek): small fix. 
-
-	* camel/camel-seekable-stream.c (camel_seekable_stream_seek): 
-	s/camel_stream_seek/camel_seekable_stream_seek/g
-
-	* camel/camel-seekable-stream.h: 
-	(struct ): added a field to store the
-	current position.
-
-	* camel/camel-seekable-stream.c (camel_seekable_stream_get_current_position): 
-	New function. Allows to get the current position 
-	of a seekable stream.
-	
-
-2000-02-13  NotZed  
-
-	* providers/mbox/camel-mbox-search.c: New file, implements the
-	search api for mbox folders.
-
-	* providers/mbox/Makefile.am: Link with ibex.
-
-	* camel-folder.c (camel_folder_has_search_capability): Api
-	additions.
-	(camel_folder_search_by_expression): Ditto.
-
-2000-02-12  NotZed  
-
-	* providers/mbox/camel-mbox-folder.c (_set_name): Setup index
-	filename as well.
-	(_init_with_store): Init index filename.  Hmm, none of these
-	names ever seem to get free'd (FIXME?)
-
-	* providers/mbox/camel-mbox-folder.h: Add index file name.
-
-2000-02-12  NotZed  
-
-	* camel-folder.h: Add folder search functions.
-
-	** Created ChangeLog just for camel **
-	 - refer to ../ChangeLog for changes prior to this date.
diff --git a/camel/Makefile.am b/camel/Makefile.am
deleted file mode 100644
index 572ad3bafa..0000000000
--- a/camel/Makefile.am
+++ /dev/null
@@ -1,263 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-SUBDIRS = providers tests
-
-libcamelincludedir = $(includedir)/camel
-providerdir = $(libdir)/evolution/camel-providers/$(VERSION)
-
-sbin_PROGRAMS =	camel-lock-helper
-
-lib_LTLIBRARIES = libcamel.la
-
-INCLUDES = -I.. -I$(srcdir)/.. 			 \
-	-I$(top_srcdir)/intl			 \
-	-I$(top_srcdir)/e-util			 \
-	$(CAMEL_CFLAGS)				 \
-	$(KRB4_CFLAGS)				 \
-	$(NSPR_CFLAGS)				 \
-	$(NSS_CFLAGS)				 \
-	$(OPENSSL_CFLAGS)			 \
-	-DCAMEL_SBINDIR=\""$(sbindir)"\"	 \
-	-DCAMEL_PROVIDERDIR=\""$(providerdir)"\" \
-	-DG_LOG_DOMAIN=\"camel\"
-
-libcamel_la_SOURCES = 				\
-	broken-date-parser.c			\
-	camel-address.c				\
-	camel-cipher-context.c			\
-	camel-cms-context.c			\
-	camel-data-wrapper.c			\
-	camel-digest-folder.c			\
-	camel-disco-diary.c			\
-	camel-disco-folder.c			\
-	camel-disco-store.c			\
-	camel-exception.c			\
-	camel-file-utils.c			\
-	camel-filter-driver.c			\
-	camel-filter-search.c			\
-	camel-folder-search.c			\
-	camel-folder-summary.c			\
-	camel-folder-thread.c			\
-	camel-folder.c				\
-	camel-html-parser.c			\
-	camel-internet-address.c		\
-	camel-lock.c				\
-	camel-lock-client.c			\
-	camel-medium.c				\
-	camel-mime-filter-bestenc.c		\
-	camel-mime-filter-basic.c		\
-	camel-mime-filter-charset.c		\
-	camel-mime-filter-crlf.c		\
-	camel-mime-filter-from.c		\
-	camel-mime-filter-html.c		\
-	camel-mime-filter-index.c		\
-	camel-mime-filter-linewrap.c		\
-	camel-mime-filter-save.c		\
-	camel-mime-filter-stripheader.c		\
-	camel-mime-filter.c			\
-	camel-mime-message.c			\
-	camel-mime-parser.c			\
-	camel-mime-part-utils.c			\
-	camel-mime-part.c			\
-	camel-mime-utils.c			\
-	camel-movemail.c			\
-	camel-multipart.c			\
-	camel-object.c				\
-	camel-operation.c			\
-	camel-pgp-context.c			\
-	camel-pgp-mime.c			\
-	camel-smime-context.c			\
-	camel-smime-utils.c			\
-	camel-provider.c			\
-	camel-remote-store.c			\
-	camel-sasl.c				\
-	camel-sasl-anonymous.c			\
-	camel-sasl-cram-md5.c			\
-	camel-sasl-digest-md5.c			\
-	camel-sasl-kerberos4.c			\
-	camel-sasl-login.c			\
-	camel-sasl-plain.c			\
-	camel-sasl-popb4smtp.c			\
-	camel-search-private.c			\
-	camel-seekable-stream.c			\
-	camel-seekable-substream.c		\
-	camel-service.c				\
-	camel-session.c				\
-	camel-store.c				\
-	camel-stream-buffer.c			\
-	camel-stream-filter.c			\
-	camel-stream-fs.c			\
-	camel-stream-mem.c			\
-	camel-stream-null.c			\
-	camel-stream.c				\
-	camel-tcp-stream-raw.c			\
-	camel-tcp-stream-ssl.c			\
-	camel-tcp-stream-openssl.c		\
-	camel-tcp-stream.c			\
-	camel-transport.c			\
-	camel-uid-cache.c			\
-	camel-url.c				\
-	camel-vee-folder.c			\
-	camel-vee-store.c			\
-	camel-vtrash-folder.c			\
-	camel-charset-map.c			\
-	camel.c					\
-	gstring-util.c				\
-	hash-table-utils.c			\
-	string-utils.c
-
-libcamelinclude_HEADERS =			\
-	broken-date-parser.h			\
-	camel-address.h				\
-	camel-charset-map.h			\
-	camel-cipher-context.h			\
-	camel-cms-context.h			\
-	camel-data-wrapper.h			\
-	camel-digest-folder.h			\
-	camel-disco-diary.h			\
-	camel-disco-folder.h			\
-	camel-disco-store.h			\
-	camel-exception-list.def		\
-	camel-exception.h			\
-	camel-file-utils.h			\
-	camel-filter-driver.h			\
-	camel-filter-search.h			\
-	camel-folder-search.h			\
-	camel-folder-summary.h			\
-	camel-folder-thread.h			\
-	camel-folder.h				\
-	camel-internet-address.h		\
-	camel-lock.h				\
-	camel-lock-client.h			\
-	camel-medium.h				\
-	camel-mime-filter-bestenc.h		\
-	camel-mime-filter-basic.h		\
-	camel-mime-filter-charset.h		\
-	camel-mime-filter-crlf.h		\
-	camel-mime-filter-from.h		\
-	camel-mime-filter-html.h		\
-	camel-mime-filter-index.h		\
-	camel-mime-filter-linewrap.h		\
-	camel-mime-filter-save.h		\
-	camel-mime-filter-stripheader.h		\
-	camel-mime-filter.h			\
-	camel-mime-message.h			\
-	camel-mime-parser.h			\
-	camel-mime-part-utils.h			\
-	camel-mime-part.h			\
-	camel-mime-utils.h			\
-	camel-movemail.h			\
-	camel-multipart.h			\
-	camel-object.h				\
-	camel-operation.h			\
-	camel-pgp-context.h			\
-	camel-pgp-mime.h			\
-	camel-smime-context.h			\
-	camel-smime-utils.h			\
-	camel-provider.h			\
-	camel-remote-store.h			\
-	camel-sasl.h				\
-	camel-sasl-anonymous.h			\
-	camel-sasl-cram-md5.h			\
-	camel-sasl-digest-md5.h			\
-	camel-sasl-kerberos4.h			\
-	camel-sasl-login.h			\
-	camel-sasl-plain.h			\
-	camel-sasl-popb4smtp.h			\
-	camel-seekable-stream.h			\
-	camel-seekable-substream.h		\
-	camel-service.h				\
-	camel-session.h				\
-	camel-store.h				\
-	camel-stream-buffer.h			\
-	camel-stream-filter.h			\
-	camel-stream-fs.h			\
-	camel-stream-mem.h			\
-	camel-stream-null.h			\
-	camel-stream.h				\
-	camel-tcp-stream-raw.h			\
-	camel-tcp-stream-ssl.h			\
-	camel-tcp-stream-openssl.h		\
-	camel-tcp-stream.h			\
-	camel-transport.h			\
-	camel-types.h				\
-	camel-uid-cache.h			\
-	camel-url.h				\
-	camel-vee-folder.h			\
-	camel-vee-store.h			\
-	camel-vtrash-folder.h			\
-	camel.h					\
-	gstring-util.h				\
-	hash-table-utils.h			\
-	string-utils.h
-
-libcamel_la_LDFLAGS = -version-info 0:0:0 -rpath $(libdir)
-
-libcamel_la_LIBADD = $(top_builddir)/e-util/libeutil.la \
-	$(CAMEL_LIBS)				\
-	$(KRB4_LDFLAGS)				\
-	$(NSPR_LDFLAGS)				\
-	$(NSS_LDFLAGS)				\
-	$(OPENSSL_LDFLAGS)
-
-
-camel-lock-helper: camel-lock-helper.o camel-lock.o
-	$(CC) -o $@ $^ -I$(srcdir)/.. -I$(srcdir)
-
-if CAMEL_LOCK_HELPER_SETUID
-install-exec-local:
-	@if test `whoami` = root ; then \
-	    chown $(CAMEL_LOCK_HELPER_USER) $(DESTDIR)$(sbindir)/camel-lock-helper ; \
-	    chmod u+s $(DESTDIR)$(sbindir)/camel-lock-helper ; \
-	else \
-	    echo '*** WARNING ***' ; \
-	    echo "Camel will not be able to open mbox files until you perform the following steps:" ; \
-	    echo "    1. Become root" ; \
-	    echo "    2. chown $(CAMEL_LOCK_HELPER_USER) $(DESTDIR)$(sbindir)/camel-lock-helper" ; \
-	    echo "    3. chmod u+s $(DESTDIR)$(sbindir)/camel-lock-helper" ; \
-	    echo '*** WARNING ***' ; \
-	fi
-endif
-if CAMEL_LOCK_HELPER_SETGID
-install-exec-local:
-	@if test `whoami` = root ; then \
-	    chgrp $(CAMEL_LOCK_HELPER_GROUP) $(DESTDIR)$(sbindir)/camel-lock-helper ; \
-	    chmod g+s $(DESTDIR)$(sbindir)/camel-lock-helper ; \
-	else \
-	    echo '*** WARNING ***' ; \
-	    echo "Camel will not be able to open mbox files until you perform the following steps:" ; \
-	    echo "    1. Become root" ; \
-	    echo "    2. chgrp $(CAMEL_LOCK_HELPER_GROUP) $(DESTDIR)$(sbindir)/camel-lock-helper" ; \
-	    echo "    3. chmod g+s $(DESTDIR)$(sbindir)/camel-lock-helper" ; \
-	    echo '*** WARNING ***' ; \
-	fi
-endif
-
-
-noinst_HEADERS =				\
-	camel-charset-map-private.h		\
-	camel-private.h				\
-	camel-search-private.h			\
-	camel-lock-helper.h			\
-	camel-html-parser.h
-
-# manually include camel-lock-helper.c since we build it manually
-EXTRA_DIST =					\
-	README 					\
-	camel-lock-helper.c
-
-#noinst_PROGRAMS =				\
-#	camel-mime-filter-from
-#
-#camel_mime_filter_from_SOURCES = 		\
-#	camel-mime-filter-from.c
-#
-#camel_mime_filter_from_LDADD = 		\
-#	../camel/libcamel.la			\
-#	../e-util/libeutil.la			\
-#	../libibex/libibex.la			\
-#	$(GNOME_LIBDIR)				\
-#	$(GNOMEUI_LIBS)				\
-#	$(INTLLIBS)				\
-#	$(PTHREAD_LIB)				\
-#	$(EXTRA_GNOME_LIBS)
diff --git a/camel/README b/camel/README
deleted file mode 100644
index 7449ae7cf6..0000000000
--- a/camel/README
+++ /dev/null
@@ -1,63 +0,0 @@
-
-                                   CAMEL
-     
-
-			A generic Messaging Library
-
-
-                                   ----
-				
-
-Introduction:
--------------
-
-[ NB. Camel has been written now. Please convert future tense to
-present tense. Thank you.
-
-	-- Peter Williams  7/2/2001
-]
-
-Camel will be a generic messaging library. It will evntually support 
-the standard messaging system for receiving and sending messages.
-It aims at being the backend for the future gnome-mailer system.
-
-The name "camel" stands for ... nothing. Open area of development there.
-You know, that "bazaar" thing. Maybe could we organize a big contest on
-gnome-list to find the best explanation :)
-
-Camel draws heavily from JavaMail and the IMAP4rev1 RFC. People
-wanting to hack on a provider should read the JavaMail API
-specification, but CMC and MAPI are of interest too.
-
-Please, before starting anything, wait for me to finish the abstract
-classes. Some parts are not definitive yet.
-
- 
-Organization:
--------------
-
-The library is roughly a set of abstract classes, some kind of generic
-"interfaces" (idl interfaces, not java interfaces ).
-
-Particular implementations are called providers.
-
-Here are the basic objects:
-
-* CamelService : an abstract class representing an access to a server.
-Handles the connection and authentication to any server.
-
-* CamelStore (CamelService): A hierarchy of folders on a server.
-
-* CamelFolder : An object containing messages. A folder is always
-associated with a store.
-
-* CamelMessage : An object contained in folders. Is defined by a set
-of attributes and a content. (Attributes include: the date it was
-received, the sender address, .....)
-
-* CamelTransport (CamelService): A way to send messages.
-
-....
-...
-
-
diff --git a/camel/README.COPYRIGHT b/camel/README.COPYRIGHT
deleted file mode 100644
index 91774e7339..0000000000
--- a/camel/README.COPYRIGHT
+++ /dev/null
@@ -1,47 +0,0 @@
-Important note for Camel hackers:
----------------------------------
-
-Camel has been a lot of work, and has been conceived to be general
-enough to be used outside the gnome-mailer. It is possible in the
-future that it is used in softwares with licenses incompatible with the
-LGPL. For this reason, the copyright has to be owned by a unique
-person.  Be sure, however, that Camel will always be available under
-the LGPL.  Significant authors will always be consulted before any
-special use of Camel. Moreover, in special situations, they may be
-given the authorization to use Camel with a license different than the
-LGPL.
-
-Thus, when adding code in Camel, always add the following lines at the
-begining of the file:
-
-/* 
- *
- * Copyright 199x, 200x Helix Code, Inc. (http://www.helixcode.com)
- * 
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-You may also want to add your name to the author name list after this
-header.
-
-Please contact me (Bertrand.Guiheneuf@aful.org) if you want to discuss
-this copyright issue.
-
-Happy hacking,
-
-Bertrand.
-
-
diff --git a/camel/README.HACKING b/camel/README.HACKING
deleted file mode 100644
index a4742ee7b8..0000000000
--- a/camel/README.HACKING
+++ /dev/null
@@ -1,14 +0,0 @@
-You want to hack on Camel ?
-
-Thanks. Camel aims at being the best messaging
-library for Linux and your help is welcome. 
-Please be sure to read the following files before
-commiting any change or sending any patch:
-
-CODING.STYLE
-README.COPYRIGHT
-
-
-Thanks.
-
-	Bertrand 
\ No newline at end of file
diff --git a/camel/README.mt b/camel/README.mt
deleted file mode 100644
index aeece1b0bb..0000000000
--- a/camel/README.mt
+++ /dev/null
@@ -1,171 +0,0 @@
-
-This version of camel is working towards being multi-thread safe
-(MT-SAFE).  At least, for the important api's.
-
-This code has now been merged into the main head, but this file
-will remain here as a log of how it was done, incase any issues
-arise.  The ChangeLog of course has a much more detailed list
-of changes.
-
-Intended method
-===============
-
-I intend working on it in several stages:
-
-1. Making the api multi-threadable.  Basically removing some const-returns,
-and copying some data where it wasn't before.  The api should
-still continue to work if not being used in a multithreaded
-application.  There is not a significant amount of work here since
-this was more or less the intention all along.
-
-Some functions where references to objects are returned may have to be
-changed slightly, so that refcounts are incremented before return.
-This doesn't affect much though.
-
-camel_folder::get_message_info				done
-camel_folder_summary::uid				done
-camel_folder_summary::index				done
-camel_folder::get_summary
-	Needs to ref each summary item it points to.	done
-camel_folder::free_summary
-	Needs to unref each summary item it points to.	done
-camel_folder_get_message_tag
-	needs to copy the tag return
-camel_maildir_summary filename string
-	should not be able to modify the string
-	array contents after it has been added to
-	the summary.
-camel_folder						done
-	Make every camel-folder use a camel-folder-summary.
-	This just reduces some of the code duplication,
-	since everything but vee-folder does this already.
-
-2. Adding high level locks for proof of concept.  The locks will
-be stored in private or global data, so the api should remain the same for
-non-threaded applications.
-
-A per-folder lock which governs access to the folder
-	summary, the folder file or
-	communications socket, etc.			done
-Locking for exceptions.					done
-Per store locks for internal stuff.			done
-Per-service locks for various internal lists and
-	caches						done
-
-3. Further fine-grained locking where it can be done/is worthwhile.
-
-A per-index lock for libibex				done
-Locking for the search object				half done
-Internal lock for the folder_summary itself
-	So that searching can be detatched from other
-	folder operations, etc.				done
-Possibly a lock for access to parts of a mime-part
-	or message
-
-4. A method to cancel operations.
-
-Individual outstanding operations must be cancellable, and not just
-'all current operations'.  This will probably not use pthread_cancel
-type of cancelling.
-
-This will however, probably use a method for starting a new thread,
-through camel, that can then be cancelled, and/or some method of
-registering that a thread can be cancelled.  Blocking states within
-camel, within that thread, will then act as checkpoints for if the
-operation, and if it is cancelled, the operation will abort
-(i.e. fail, with an appropriate exception code).
-
-Operation cancelling should also function when the application is not
-multi-threaded.  Not sure of the api for this yet, probably a callback
-system.  Hopefully the api for both scenarios can be made the same.
-
-Other thoughts
-==============
-
-Basically much of the code in camel that does the actual work does NOT
-need to be thread safe to make it safely usable in an mt context.
-
-camel-folder, camel-summary, camel-imap-search, and the camel-service
-classes (at least) are the important ones to be made multithreaded.
-
-For other things, they are either resources that are created
-one-off (for example, camel-mime-message, and its associated
-parts, like camel-internet-address), or multithreadedness
-doesn't make a lot of sense - e.g. camel-stream, or camel-mime-parser.
-
-So basically the approach is a low-risk one.  Adding the minimum
-number of locks to start with, and providing further fine-grained
-locks as required.  The locks should not need to be particularly
-fine-grained in order to get reasonable results.
-
-Log of changes
-==============
-
-Changed CamelFolder:get_message_info() to return a ref'd copy, requiring
-all get_message_info()'s to have a matching free_message_info().
-
-Moved the CamelFolder frozen changelog data to a private structure.
-
-Added a mutex for CamelFolder frozen changelog stuff (it was just easy
-to do, although it isn't needed yet).
-
-Added a single mutex around all other CamelFolder functions that need
-it, this is just the first cut at mt'edness.
-
-Fixed all camel-folder implementations that call any other
-camel-folder functions to call via virtual methods, to bypass the locks.
-
-Added camel-store private data.
-
-Added a single mutex lock for camel-store's folder functions.
-
-Added camel-service private data.
-
-Added a single mutex lock for camel-service's connect stuff.
-
-Added a mutex for remote-store stream io stuff.
-
-Added a mutex for imap, so it can bracket a compound command
-exclusively.  Pop doesn't need this since you can only have a single
-folder per store, and the folder interface is already forced
-single-threaded.
-
-Added mutex for camel-session, most operations.
-
-Running the tests finds at least 1 deadlock so far.  Need to
-work on that.
-
-Fixed get_summary to ref/unref its items.
-
-Removed the global folder lock from the toplevel
-camel_folder_search(), each implementation must now handle locking.
-
-Fixed the local-folder implementation of searching.  imap-folder
-searching should already be mt-safe through the command lock.
-
-Fixed imap summary to ref/unref too.
-
-Built some test cases, and expanded the test framework library to
-handle multiple threads.  It works!
-
-Next, added a recursive mutex class, so that locking inside imap had
-any chance of working.  Got imap working.
-
-Moved the camel folder summary into the base folder class, and fixed
-everything to use it that way.
-
-Made the vfolder use a real camel-folder-summary rather than a
-hashtable + array that it was using, and probably fixed some problems
-which caused evolution-mail not to always catch flag updates.  Oh, and
-made it sync/expunge all its subfolders when sync/expungeing.
-
-Made the camel-folder summary completely mt-safe.
-
-Removed all of the locks on the folder functions dealing directly with
-the summary, so now for example all summary lookups will not be
-interupted by long operations.
-
-Made the nntp newsrc thing mt-safe, because of some unfortunate
-sideeffect of it being called from the summary interaction code in
-nntp-folder.
-
diff --git a/camel/broken-date-parser.c b/camel/broken-date-parser.c
deleted file mode 100644
index b63103bba6..0000000000
--- a/camel/broken-date-parser.c
+++ /dev/null
@@ -1,318 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- *  Authors: Jeffrey Stedfast 
- *
- *  Copyright 2000 Ximian, Inc. (www.ximian.com)
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
- *
- */
-
-#include 
-#include 
-#include 
-#include "broken-date-parser.h"
-
-/* prototypes for functions dealing with broken date formats */
-static GList *datetok (const gchar *date);
-static gint get_days_in_month (gint mon, gint year);
-static gint get_weekday (gchar *str);
-static gint get_month (gchar *str);
-
-static char *tz_months [] = {
-	"Jan", "Feb", "Mar", "Apr", "May", "Jun",
-	"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
-};
-
-/*****************************************************************************
- * The following functions are here in the case of badly broken date formats *
- *                                                                           *
- * -- fejj@ximian.com                                                     *
- *****************************************************************************/
-
-typedef struct {
-	gchar dow[6];   /* day of week (should only need 4 chars) */
-	gint day;
-	gint mon;       /* 1->12 or 0 if invalid */
-	gint year;
-	gint hour;
-	gint min;
-	gint sec;
-	gchar zone[6];  /* time zone */
-} date_t;
-
-static
-GList *datetok (const gchar *date)
-{
-	GList *tokens = NULL;
-	gchar *token, *start, *end;
-	
-	start = (gchar *) date;
-	while (*start) {
-		/* find the end of this token */
-		for (end = start; *end && *end != ' '; end++);
-		
-		token = g_strndup (start, (end - start));
-		
-		if (token && *token)
-			tokens = g_list_append (tokens, token);
-		else
-			g_free (token);
-
-		if (*end)
-			start = end + 1;
-		else
-			break;
-	}
-
-	return tokens;
-}
-
-static gint
-get_days_in_month (gint mon, gint year)
-{
-	switch (mon) {
-	case 1: case 3: case 5: case 7: case 8: case 10: case 12:
-		return 31;
-	case 4: case 6: case 9: case 11:
-		return 30;
-	case 2:
-		if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0)
-			return 29;
-		return 28;
-	default:
-		return 30;
-	}
-}
-
-static gint
-get_weekday (gchar *str)
-{
-	g_return_val_if_fail ((str != NULL), 0);
-
-	if (strncmp (str, "Mon", 3) == 0) {
-		return 1;
-	} else if (strncmp (str, "Tue", 3) == 0) {
-		return 2;
-	} else if (strncmp (str, "Wed", 3) == 0) {
-		return 3;
-	} else if (strncmp (str, "Thu", 3) == 0) {
-		return 4;
-	} else if (strncmp (str, "Fri", 3) == 0) {
-		return 5;
-	} else if (strncmp (str, "Sat", 3) == 0) {
-		return 6;
-	} else if (strncmp (str, "Sun", 3) == 0) {
-		return 7;
-	}
-
-	return 0;  /* unknown week day */
-}
-
-static gint
-get_month (gchar *str)
-{
-	g_return_val_if_fail (str != NULL, 0);
-    
-	if (strncmp (str, "Jan", 3) == 0) {
-		return 1;
-	} else if (strncmp (str, "Feb", 3) == 0) {
-		return 2;
-	} else if (strncmp (str, "Mar", 3) == 0) {
-		return 3;
-	} else if (strncmp (str, "Apr", 3) == 0) {
-		return 4;
-	} else if (strncmp (str, "May", 3) == 0) {
-		return 5;
-	} else if (strncmp (str, "Jun", 3) == 0) {
-		return 6;
-	} else if (strncmp (str, "Jul", 3) == 0) {
-		return 7;
-	} else if (strncmp (str, "Aug", 3) == 0) {
-		return 8;
-	} else if (strncmp (str, "Sep", 3) == 0) {
-		return 9;
-	} else if (strncmp (str, "Oct", 3) == 0) {
-		return 10;
-	} else if (strncmp (str, "Nov", 3) == 0) {
-		return 11;
-	} else if (strncmp (str, "Dec", 3) == 0) {
-		return 12;
-	}
-    
-	return 0;  /* unknown month */
-}
-
-gchar *
-parse_broken_date (const gchar *datestr)
-{
-	GList *tokens;
-	date_t date;
-	gchar *token, *ptr, *newdatestr;
-	guint len, i, retval;
-	gdouble tz = 0.0;
-
-	memset ((void*)&date, 0, sizeof (date_t));
-	g_return_val_if_fail (datestr != NULL, NULL);
-	
-	tokens = datetok (datestr);
-	len = g_list_length (tokens);
-	for (i = 0; i < len; i++) {
-		token = g_list_nth_data (tokens, i);
-		
-		if ((retval = get_weekday (token))) {
-			strncpy (date.dow, datestr, 4);
-		} else if ((retval = get_month (token))) {
-			date.mon = retval;
-		} else if (strlen (token) <= 2) {
-			/* this could be a 1 or 2 digit day of the month */
-			for (retval = 1, ptr = token; *ptr; ptr++)
-				if (*ptr < '0' || *ptr > '9')
-					retval = 0;
-			
-			if (retval && atoi (token) <= 31 && !date.day)  /* probably should find a better way */
-				date.day = atoi (token);
-			else                                            /* fubar'd client using a 2-digit year */
-				date.year = atoi (token) < 69 ? 2000 + atoi (token) : 1900 + atoi (token);
-		} else if (strlen (token) == 4) {
-			/* this could be the year... */
-			for (retval = 1, ptr = token; *ptr; ptr++)
-				if (*ptr < '0' || *ptr > '9')
-					retval = 0;
-			
-			if (retval)
-				date.year = atoi (token);
-		} else if (strchr (token, ':')) {
-			/* this must be the time: hh:mm:ss */
-			sscanf (token, "%d:%d:%d", &date.hour, &date.min, &date.sec);
-		} else if (*token == '-' || *token == '+') {
-			tz = atoi (token) / 100.0;
-		}
-	}
-	
-	g_list_free (tokens);
-	
-	/* adjust times based on time zones */
-	
-	if (tz != 0) {
-		/* check for time-zone shift */
-		if (tz > 0) {
-			/* correct for positive hours off of UCT */
-			date.hour -= (tz / 100);
-			tz = (gint)tz % 100;
-			
-			if (tz > 0) /* correct for positive minutes off of UCT */
-				date.min -= (gint)(((gdouble) tz / 100.0) * 60.0);
-		} else {
-			if (tz < 0) {
-				/* correct for negative hours off of UCT */
-				tz = -tz;
-				date.hour += (tz / 100);
-				tz = -((gint)tz % 100);
-				
-				if (tz < 0)
-					date.min -= (gint)(((gdouble) tz / 100.0) * 60.0);
-			}
-		}
-		
-		/* adjust seconds to proper range */
-		if (date.sec > 59) {
-			date.min += (date.sec / 60);
-			date.sec = (date.sec % 60);
-		}
-		
-		/* adjust minutes to proper range */
-		if (date.min > 59) {
-			date.hour += (date.min / 60);
-			date.min = (date.min % 60);
-		} else {
-			if (date.min < 0) {
-				date.min = -date.min;
-				date.hour -= (date.min / 60) - 1;
-				date.min = 60 - (date.min % 60);
-			}
-		}
-		
-		/* adjust hours to the proper randge */
-		if (date.hour > 23) {
-			date.day += (date.hour / 24);
-			date.hour -= (date.hour % 24);
-		} else {
-			if (date.hour < 0) {
-				date.hour = -date.hour;
-				date.day -= (date.hour / 24) - 1;
-				date.hour = 24 - (date.hour % 60);
-			}
-		}
-		
-		/* adjust days to the proper range */
-		while (date.day > get_days_in_month (date.mon, date.year)) {
-			date.day -= get_days_in_month (date.mon, date.year);
-			date.mon++;
-			if (date.mon > 12) {
-				date.year += (date.mon / 12);
-				date.mon = (date.mon % 12);
-				if (date.mon == 0) {
-					/* month sanity check */
-					date.mon = 12;
-					date.year -= 1;
-				}
-			}
-		}
-		
-		while (date.day < 1) {
-			date.day += get_days_in_month (date.mon, date.year);
-			date.mon--;
-			if (date.mon < 1) {
-				date.mon = -date.mon;
-				date.year -= (date.mon / 12) - 1;
-				date.mon = 12 - (date.mon % 12);
-			}
-		}
-		
-		/* adjust months to the proper range */
-		if (date.mon > 12) {
-			date.year += (date.mon / 12);
-			date.mon = (date.mon % 12);
-			if (date.mon == 0) {
-				/* month sanity check */
-				date.mon = 12;
-				date.year -= 1;
-			}
-		} else {
-			if (date.mon < 1) {
-				date.mon = -date.mon;
-				date.year -= (date.mon / 12) - 1;
-				date.mon = 12 - (date.mon % 12);
-			}
-		}
-	}
-
-	/* now lets print this date into a string with the correct format */
-	newdatestr = g_strdup_printf ("%s, %d %s %d %s%d:%s%d:%s%d -0000",
-				      date.dow, date.day, tz_months[date.mon-1],
-				      date.year,
-				      date.hour > 10 ? "" : "0", date.hour,
-				      date.min > 10 ? "" : "0", date.min,
-				      date.sec > 10 ? "" : "0", date.sec);
-	
-	return newdatestr;
-}
-
-/*****************************************************************************
- * This ends the code for the broken date parser...                          *
- *                                                                           *
- * -- fejj@ximian.com                                                     *
- *****************************************************************************/
diff --git a/camel/broken-date-parser.h b/camel/broken-date-parser.h
deleted file mode 100644
index 6cb91aa6ea..0000000000
--- a/camel/broken-date-parser.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- *  Authors: Jeffrey Stedfast 
- *
- *  Copyright 2000 Ximian, Inc. (www.ximian.com)
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
- *
- */
-
-#include 
-
-/* prototypes for functions dealing with broken date formats */
-
-gchar *parse_broken_date (const gchar *datestr);
-
-
-
-
-
diff --git a/camel/camel-address.c b/camel/camel-address.c
deleted file mode 100644
index 4215cea15e..0000000000
--- a/camel/camel-address.c
+++ /dev/null
@@ -1,240 +0,0 @@
-/*
- *  Copyright (C) 2000 Ximian Inc.
- *
- *  Authors: Michael Zucchi 
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Library General Public License
- *  as published by the Free Software Foundation; either version 2 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU Library General Public License for more details.
- *
- *  You should have received a copy of the GNU Library General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include "camel-address.h"
-
-
-static void camel_address_class_init (CamelAddressClass *klass);
-static void camel_address_init       (CamelAddress *obj);
-static void camel_address_finalize   (CamelObject *obj);
-
-static CamelObjectClass *camel_address_parent;
-
-static void
-camel_address_class_init (CamelAddressClass *klass)
-{
-	camel_address_parent = camel_type_get_global_classfuncs (camel_object_get_type ());
-}
-
-static void
-camel_address_init (CamelAddress *obj)
-{
-	obj->addresses = g_ptr_array_new();
-}
-
-static void
-camel_address_finalize (CamelObject *obj)
-{
-	camel_address_remove((CamelAddress *)obj, -1);
-	g_ptr_array_free(((CamelAddress *)obj)->addresses, TRUE);
-}
-
-CamelType
-camel_address_get_type (void)
-{
-	static CamelType type = CAMEL_INVALID_TYPE;
-	
-	if (type == CAMEL_INVALID_TYPE) {
-		type = camel_type_register (camel_object_get_type (), "CamelAddress",
-					    sizeof (CamelAddress),
-					    sizeof (CamelAddressClass),
-					    (CamelObjectClassInitFunc) camel_address_class_init,
-					    NULL,
-					    (CamelObjectInitFunc) camel_address_init,
-					    (CamelObjectFinalizeFunc) camel_address_finalize);
-	}
-	
-	return type;
-}
-
-/**
- * camel_address_new:
- *
- * Create a new CamelAddress object.
- * 
- * Return value: A new CamelAddress widget.
- **/
-CamelAddress *
-camel_address_new (void)
-{
-	CamelAddress *new = CAMEL_ADDRESS(camel_object_new(camel_address_get_type()));
-	return new;
-}
-
-/**
- * camel_address_new_clone:
- * @in: 
- * 
- * Clone an existing address type.
- * 
- * Return value: 
- **/
-CamelAddress *
-camel_address_new_clone(const CamelAddress *in)
-{
-	CamelAddress *new = CAMEL_ADDRESS(camel_object_new(CAMEL_OBJECT_GET_TYPE(in)));
-
-	camel_address_cat(new, in);
-	return new;
-}
-
-/**
- * camel_address_length:
- * @a: 
- * 
- * Return the number of addresses stored in the address @a.
- * 
- * Return value: 
- **/
-int
-camel_address_length(CamelAddress *a)
-{
-	return a->addresses->len;
-}
-
-/**
- * camel_address_decode:
- * @a: An address.
- * @raw: Raw address description.
- * 
- * Construct a new address from a raw address field.
- * 
- * Return value: Returns the number of addresses found,
- * or -1 if the addresses could not be parsed fully.
- **/
-int
-camel_address_decode	(CamelAddress *a, const char *raw)
-{
-	g_return_val_if_fail(CAMEL_IS_ADDRESS(a), -1);
-
-	return CAMEL_ADDRESS_CLASS (CAMEL_OBJECT_GET_CLASS (a))->decode(a, raw);
-}
-
-/**
- * camel_address_encode:
- * @a: 
- * 
- * Encode an address in a format suitable for a raw header.
- * 
- * Return value: The encoded address.
- **/
-char *
-camel_address_encode	(CamelAddress *a)
-{
-	g_return_val_if_fail(CAMEL_IS_ADDRESS(a), NULL);
-
-	return CAMEL_ADDRESS_CLASS (CAMEL_OBJECT_GET_CLASS (a))->encode(a);
-}
-
-/**
- * camel_address_unformat:
- * @a: 
- * @raw: 
- * 
- * Attempt to convert a previously formatted and/or edited
- * address back into internal form.
- * 
- * Return value: -1 if it could not be parsed, or the number
- * of valid addresses found.
- **/
-int
-camel_address_unformat(CamelAddress *a, const char *raw)
-{
-	g_return_val_if_fail(CAMEL_IS_ADDRESS(a), -1);
-
-	return CAMEL_ADDRESS_CLASS (CAMEL_OBJECT_GET_CLASS (a))->unformat(a, raw);
-}
-
-/**
- * camel_address_format:
- * @a: 
- * 
- * Format an address in a format suitable for display.
- * 
- * Return value: The formatted address.
- **/
-char *
-camel_address_format	(CamelAddress *a)
-{
-	if (a == NULL)
-		return NULL;
-
-	g_return_val_if_fail(CAMEL_IS_ADDRESS(a), NULL);
-
-	return CAMEL_ADDRESS_CLASS (CAMEL_OBJECT_GET_CLASS (a))->format(a);
-}
-
-/**
- * camel_address_cat:
- * @dest: 
- * @source: 
- * 
- * Concatenate one address onto another.  The addresses must
- * be of the same type.
- * 
- * Return value: 
- **/
-int
-camel_address_cat	(CamelAddress *dest, const CamelAddress *source)
-{
-	g_return_val_if_fail(CAMEL_IS_ADDRESS(dest), -1);
-	g_return_val_if_fail(CAMEL_IS_ADDRESS(source), -1);
-
-	return CAMEL_ADDRESS_CLASS(CAMEL_OBJECT_GET_CLASS(dest))->cat(dest, source);
-}
-
-/**
- * camel_address_copy:
- * @dest: 
- * @source: 
- * 
- * Copy an address contents.
- * 
- * Return value: 
- **/
-int
-camel_address_copy	(CamelAddress *dest, const CamelAddress *source)
-{
-	g_return_val_if_fail(CAMEL_IS_ADDRESS(dest), -1);
-	g_return_val_if_fail(CAMEL_IS_ADDRESS(source), -1);
-
-	camel_address_remove(dest, -1);
-	return camel_address_cat(dest, source);
-}
-
-/**
- * camel_address_remove:
- * @a: 
- * @index: The address to remove, use -1 to remove all address.
- * 
- * Remove an address by index, or all addresses.
- **/
-void
-camel_address_remove	(CamelAddress *a, int index)
-{
-	g_return_if_fail(CAMEL_IS_ADDRESS(a));
-
-	if (index == -1) {
-		for (index=a->addresses->len; index>-1; index--)
-			CAMEL_ADDRESS_CLASS (CAMEL_OBJECT_GET_CLASS (a))->remove(a, index);
-	} else {
-		CAMEL_ADDRESS_CLASS (CAMEL_OBJECT_GET_CLASS (a))->remove(a, index);
-	}
-}
diff --git a/camel/camel-address.h b/camel/camel-address.h
deleted file mode 100644
index fe133c8825..0000000000
--- a/camel/camel-address.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- *  Copyright (C) 2000 Ximian Inc.
- *
- *  Authors: Michael Zucchi 
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Library General Public License
- *  as published by the Free Software Foundation; either version 2 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU Library General Public License for more details.
- *
- *  You should have received a copy of the GNU Library General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef _CAMEL_ADDRESS_H
-#define _CAMEL_ADDRESS_H
-
-#include 
-#include 
-
-#define CAMEL_ADDRESS(obj)         CAMEL_CHECK_CAST (obj, camel_address_get_type (), CamelAddress)
-#define CAMEL_ADDRESS_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_address_get_type (), CamelAddressClass)
-#define CAMEL_IS_ADDRESS(obj)      CAMEL_CHECK_TYPE (obj, camel_address_get_type ())
-
-typedef struct _CamelAddressClass CamelAddressClass;
-
-struct _CamelAddress {
-	CamelObject parent;
-
-	GPtrArray *addresses;
-
-	struct _CamelAddressPrivate *priv;
-};
-
-struct _CamelAddressClass {
-	CamelObjectClass parent_class;
-
-	int   (*decode)		(CamelAddress *, const char *raw);
-	char *(*encode)		(CamelAddress *);
-
-	int   (*unformat)	(CamelAddress *, const char *raw);
-	char *(*format)		(CamelAddress *);
-
-	int   (*cat)		(CamelAddress *, const CamelAddress *);
-
-	void  (*remove)		(CamelAddress *, int index);
-};
-
-guint		camel_address_get_type	(void);
-CamelAddress   *camel_address_new	(void);
-CamelAddress   *camel_address_new_clone	(const CamelAddress *);
-int		camel_address_length	(CamelAddress *);
-
-int	        camel_address_decode	(CamelAddress *, const char *);
-char	       *camel_address_encode	(CamelAddress *);
-int	        camel_address_unformat	(CamelAddress *, const char *);
-char	       *camel_address_format	(CamelAddress *);
-
-int		camel_address_cat	(CamelAddress *, const CamelAddress *);
-int		camel_address_copy	(CamelAddress *, const CamelAddress *);
-
-void		camel_address_remove	(CamelAddress *, int index);
-
-#endif /* ! _CAMEL_ADDRESS_H */
diff --git a/camel/camel-charset-map-private.h b/camel/camel-charset-map-private.h
deleted file mode 100644
index a795fbfd94..0000000000
--- a/camel/camel-charset-map-private.h
+++ /dev/null
@@ -1,515 +0,0 @@
-/* This file is automatically generated: DO NOT EDIT */
-
-static unsigned char m000[256] = {
-	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-	0xff, 0xff, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x6f, 
-	0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 
-	0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 
-	0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 
-	0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 0xc7, 
-	0xff, 0x00, 0x01, 0x81, 0x17, 0x00, 0x91, 0xd7, 
-	0x86, 0xb9, 0x00, 0x91, 0x91, 0xd7, 0x11, 0x02, 
-	0xbf, 0x91, 0xa9, 0x81, 0x06, 0x11, 0x11, 0xb9, 
-	0x06, 0x01, 0x00, 0x91, 0x01, 0x81, 0x01, 0x00, 
-	0x00, 0x06, 0x06, 0x02, 0x07, 0x03, 0x03, 0x04, 
-	0x00, 0x07, 0x00, 0x06, 0x00, 0x06, 0x06, 0x00, 
-	0x00, 0x00, 0x00, 0x05, 0x06, 0x03, 0x07, 0x07, 
-	0x03, 0x00, 0x06, 0x02, 0x07, 0x04, 0x00, 0x07, 
-	0x00, 0x06, 0x06, 0x02, 0x07, 0x03, 0x03, 0x04, 
-	0x00, 0x07, 0x00, 0x06, 0x00, 0x06, 0x06, 0x00, 
-	0x00, 0x00, 0x00, 0x05, 0x06, 0x03, 0x07, 0x2f, 
-	0x03, 0x00, 0x06, 0x02, 0x07, 0x04, 0x00, 0x00, 
-};
-
-static unsigned char m001[256] = {
-	0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 
-	0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 
-	0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 
-	0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 
-	0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 
-	0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 
-	0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 
-	0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 
-	0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 
-	0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 
-	0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 
-	0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 
-	0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 
-	0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 
-	0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 
-	0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 
-	0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 
-	0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 
-	0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 
-	0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 
-	0x03, 0x03, 0x03, 0x03, 0x01, 0x03, 0x01, 0x03, 
-	0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 
-	0x03, 0x03, 0x03, 0x03, 0x01, 0x03, 0x03, 0x03, 
-	0x01, 0x03, 0x03, 0x03, 0x01, 0x01, 0x01, 0x03, 
-	0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 
-	0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 
-	0x02, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 
-	0x03, 0x03, 0x03, 0x03, 0x03, 0x02, 0x02, 0x03, 
-	0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 
-	0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 
-	0x02, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 
-	0x03, 0x03, 0x03, 0x03, 0x03, 0x02, 0x02, 0x03, 
-};
-
-static unsigned char m010[256] = {
-	0x03, 0x03, 0x04, 0x04, 0x07, 0x07, 0x05, 0x05, 
-	0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x04, 0x04, 
-	0x06, 0x06, 0x03, 0x03, 0x00, 0x00, 0x03, 0x03, 
-	0x07, 0x07, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 
-	0x02, 0x02, 0x03, 0x03, 0x00, 0x00, 0x03, 0x03, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 
-	0x02, 0x04, 0x04, 0x03, 0x03, 0x04, 0x04, 0x00, 
-	0x00, 0x05, 0x05, 0x05, 0x05, 0x03, 0x03, 0x04, 
-	0x04, 0x00, 0x02, 0x02, 0x03, 0x03, 0x00, 0x00, 
-	0x04, 0x04, 0x00, 0x00, 0x04, 0x04, 0x03, 0x03, 
-	0x04, 0x04, 0x05, 0x05, 0x00, 0x00, 0x04, 0x04, 
-	0x07, 0x07, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 
-	0x02, 0x02, 0x03, 0x03, 0x00, 0x00, 0x04, 0x04, 
-	0x04, 0x04, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x05, 0x05, 0x05, 0x05, 0x07, 0x07, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-};
-
-static unsigned char m011[256] = {
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 
-	0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-};
-
-static unsigned char m020[256] = {
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x04, 0x06, 0x00, 0x06, 0x00, 0x04, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-};
-
-static unsigned char m030[256] = {
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x00, 
-	0x80, 0x80, 0x80, 0x00, 0x80, 0x00, 0x80, 0x80, 
-	0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 
-	0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 
-	0x80, 0x80, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 
-	0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 
-	0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 
-	0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 
-	0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 
-	0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-};
-
-static unsigned char m040[256] = {
-	0x00, 0x78, 0x50, 0x50, 0x70, 0x50, 0x70, 0x70, 
-	0x50, 0x50, 0x50, 0x50, 0x50, 0x00, 0x50, 0x50, 
-	0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 
-	0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 
-	0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 
-	0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 
-	0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 
-	0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 
-	0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 
-	0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 
-	0x00, 0x78, 0x50, 0x50, 0x70, 0x50, 0x70, 0x70, 
-	0x50, 0x50, 0x50, 0x50, 0x50, 0x00, 0x50, 0x50, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-};
-
-static unsigned char m200[256] = {
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x10, 0x10, 0x80, 0x00, 0x00, 
-	0x90, 0x91, 0x10, 0x00, 0x11, 0x11, 0x11, 0x00, 
-	0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-};
-
-static unsigned char m201[256] = {
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-};
-
-static unsigned char m210[256] = {
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-};
-
-static unsigned char m220[256] = {
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x28, 0x28, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-};
-
-static unsigned char m230[256] = {
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x28, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-};
-
-static unsigned char m250[256] = {
-	0x28, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 
-	0x28, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 
-	0x28, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x28, 0x28, 0x28, 0x08, 0x28, 0x08, 0x08, 0x28, 
-	0x28, 0x28, 0x28, 0x28, 0x08, 0x28, 0x28, 0x28, 
-	0x28, 0x28, 0x08, 0x28, 0x08, 0x08, 0x28, 0x28, 
-	0x28, 0x28, 0x28, 0x08, 0x28, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x28, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 
-	0x28, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 
-	0x28, 0x28, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-};
-
-struct {
-	unsigned char *bits0;
-	unsigned char *bits1;
-} camel_charmap[256] = {
-	{ m000, m001, }, { m010, m011, }, { m020, 0, }, { m030, 0, }, { m040, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, 
-	{ 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, 
-	{ 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, 
-	{ 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, 
-	{ m200, m201, }, { m210, 0, }, { m220, 0, }, { m230, 0, }, { 0, 0, }, { m250, 0, }, { 0, 0, }, { 0, 0, }, 
-	{ 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, 
-	{ 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, 
-	{ 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, 
-	{ 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, 
-	{ 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, 
-	{ 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, 
-	{ 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, 
-	{ 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, 
-	{ 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, 
-	{ 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, 
-	{ 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, 
-	{ 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, 
-	{ 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, 
-	{ 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, 
-	{ 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, 
-	{ 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, 
-	{ 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, 
-	{ 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, 
-	{ 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, 
-	{ 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, 
-	{ 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, 
-	{ 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, 
-	{ 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, 
-	{ 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, 
-	{ 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, 
-	{ 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, 
-	{ 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, { 0, 0, }, 
-};
-
-struct {
-	const char *name;
-	unsigned int bit;
-} camel_charinfo[] = {
-	{ "iso-8859-13", 0x0001 },
-	{ "iso-8859-4", 0x0002 },
-	{ "iso-8859-2", 0x0004 },
-	{ "koi8-r", 0x0008 },
-	{ "windows-1251", 0x0010 },
-	{ "koi8-u", 0x0020 },
-	{ "iso-8859-5", 0x0040 },
-	{ "iso-8859-7", 0x0080 },
-	{ "iso-8859-9", 0x0100 },
-	{ "iso-8859-15", 0x0200 },
-};
-
-#define charset_mask(x) \
-	(camel_charmap[(x)>>8].bits0?camel_charmap[(x)>>8].bits0[(x)&0xff]<<0:0)	\
-	| (camel_charmap[(x)>>8].bits1?camel_charmap[(x)>>8].bits1[(x)&0xff]<<8:0)
-
diff --git a/camel/camel-charset-map.c b/camel/camel-charset-map.c
deleted file mode 100644
index 5ad5a249af..0000000000
--- a/camel/camel-charset-map.c
+++ /dev/null
@@ -1,424 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; -*- */
-
-/* 
- * Authors:
- *   Michael Zucchi 
- *   Dan Winship 
- *
- * Copyright 2000, 2001 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#ifdef HAVE_CONFIG_H
-#include 
-#endif
-
-#include 
-
-/*
-  if you want to build the charset map, compile this with something like:
-    gcc -DBUILD_MAP camel-charset-map.c `glib-config --cflags`
-  (plus any -I/-L/-l flags you need for iconv), then run it as 
-    ./a.out > camel-charset-map-private.h
-
-  Note that the big-endian variant isn't tested...
-
-  The tables genereated work like this:
-
-   An indirect array for each page of unicode character
-   Each array element has an indirect pointer to one of the bytes of
-   the generated bitmask.
-*/
-
-#ifdef BUILD_MAP
-#include 
-#include 
-
-static struct {
-	char *name;
-	unsigned int bit;	/* assigned bit */
-} tables[] = {
-	/* These are the 8bit character sets (other than iso-8859-1,
-	 * which is special-cased) which are supported by both other
-	 * mailers and the GNOME environment. Note that the order
-	 * they're listed in is the order they'll be tried in, so put
-	 * the more-popular ones first.
-	 */
-	{ "iso-8859-2", 0 },	/* Central/Eastern European */
-	{ "iso-8859-4", 0 },	/* Baltic */
-	{ "koi8-r", 0 },	/* Russian */
-	{ "windows-1251", 0 },	/* Russian */
-	{ "koi8-u", 0 },	/* Ukranian */
-	{ "iso-8859-5", 0 },	/* Least-popular Russian encoding */
-	{ "iso-8859-7", 0 },	/* Greek */
-	{ "iso-8859-9", 0 },	/* Turkish */
-	{ "iso-8859-13", 0 },	/* Baltic again */
-	{ "iso-8859-15", 0 },	/* New-and-improved iso-8859-1, but most
-				 * programs that support this support UTF8
-				 */
-	{ 0, 0 }
-};
-
-unsigned int encoding_map[256 * 256];
-
-#if G_BYTE_ORDER == G_BIG_ENDIAN
-#define UCS "UCS-4BE"
-#else
-#define UCS "UCS-4LE"
-#endif
-
-void main(void)
-{
-	int i, j;
-	int max, min;
-	int bit = 0x01;
-	int k;
-	int bytes;
-	iconv_t cd;
-	char in[128];
-	guint32 out[128];
-	char *inptr, *outptr;
-	size_t inlen, outlen;
-
-	/* dont count the terminator */
-	bytes = ((sizeof(tables)/sizeof(tables[0]))+7-1)/8;
-
-	for (i = 0; i < 128; i++)
-		in[i] = i + 128;
-
-	for (j = 0; tables[j].name; j++) {
-		cd = iconv_open (UCS, tables[j].name);
-		inptr = in;
-		outptr = (char *)(out);
-		inlen = sizeof (in);
-		outlen = sizeof (out);
-		while (iconv (cd, &inptr, &inlen, &outptr, &outlen) == -1) {
-			if (errno == EILSEQ) {
-				inptr++;
-				inlen--;
-			} else {
-				printf ("%s\n", strerror (errno));
-				exit (1);
-			}
-		}
-		iconv_close (cd);
-
-		for (i = 0; i < 128 - outlen / 4; i++) {
-			encoding_map[i] |= bit;
-			encoding_map[out[i]] |= bit;
-		}
-
-		tables[j].bit = bit;
-		bit <<= 1;
-	}
-
-	printf("/* This file is automatically generated: DO NOT EDIT */\n\n");
-
-	for (i=0;i<256;i++) {
-		/* first, do we need this block? */
-		for (k=0;k> (k*8)) & 0xff );
-					if (((j+1)&7) == 0 && j<255)
-						printf("\n\t");
-				}
-				printf("\n};\n\n");
-			}
-		}
-	}
-
-	printf("struct {\n");
-	for (k=0;k>8].bits%d?camel_charmap[(x)>>8].bits%d[(x)&0xff]<<%d:0)", k, k, k*8);
-		if (k
-#include 
-#include 
-#include 
-#ifdef ENABLE_THREADS
-#include 
-#endif
-
-
-#ifdef ENABLE_THREADS
-static pthread_mutex_t iconv_charsets_lock = PTHREAD_MUTEX_INITIALIZER;
-#define ICONV_CHARSETS_LOCK() pthread_mutex_lock (&iconv_charsets_lock)
-#define ICONV_CHARSETS_UNLOCK() pthread_mutex_unlock (&iconv_charsets_lock)
-#else
-#define ICONV_CHARSETS_LOCK()
-#define ICONV_CHARSETS_UNLOCK()
-#endif /* ENABLE_THREADS */
-
-static GHashTable *iconv_charsets = NULL;
-static char *locale_charset = NULL;
-
-struct {
-	char *charset;
-	char *iconv_name;
-} known_iconv_charsets[] = {
-	/* charset name, iconv-friendly charset name */
-	{ "iso-8859-1",     "iso-8859-1" },
-	{ "iso8859-1",      "iso-8859-1" },
-	/* the above mostly serves as an example for iso-style charsets,
-	   but we have code that will populate the iso-*'s if/when they
-	   show up in camel_charset_map_to_iconv() so I'm
-	   not going to bother putting them all in here... */
-	{ "windows-cp1251", "cp1251"     },
-	{ "windows-1251",   "cp1251"     },
-	{ "cp1251",         "cp1251"     },
-	{ NULL,             NULL         }
-};
-
-
-static void
-shutdown_foreach (gpointer key, gpointer value, gpointer data)
-{
-	g_free (key);
-	g_free (value);
-}
-
-static void
-camel_charset_map_shutdown (void)
-{
-	g_hash_table_foreach (iconv_charsets, shutdown_foreach, NULL);
-	g_hash_table_destroy (iconv_charsets);
-	g_free (locale_charset);
-}
-
-void
-camel_charset_map_init (void)
-{
-	char *locale;
-	int i;
-	
-	if (iconv_charsets)
-		return;
-	
-	iconv_charsets = g_hash_table_new (g_strcase_hash, g_strcase_equal);
-	for (i = 0; known_iconv_charsets[i].charset != NULL; i++) {
-		g_hash_table_insert (iconv_charsets, g_strdup (known_iconv_charsets[i].charset),
-				     g_strdup (known_iconv_charsets[i].iconv_name));
-	}
-	
-	locale = setlocale (LC_ALL, NULL);
-	
-	if (!locale || !strcmp (locale, "C") || !strcmp (locale, "POSIX")) {
-		/* The locale "C"  or  "POSIX"  is  a  portable  locale;  its
-		 * LC_CTYPE  part  corresponds  to  the 7-bit ASCII character
-		 * set.
-		 */
-		
-		locale_charset = NULL;
-	} else {
-		/* A locale name is typically of  the  form  language[_terri-
-		 * tory][.codeset][@modifier],  where  language is an ISO 639
-		 * language code, territory is an ISO 3166 country code,  and
-		 * codeset  is  a  character  set or encoding identifier like
-		 * ISO-8859-1 or UTF-8.
-		 */
-		char *p;
-		int len;
-		
-		p = strchr (locale, '@');
-		len = p ? (p - locale) : strlen (locale);
-		if ((p = strchr (locale, '.'))) {
-			locale_charset = g_strndup (p + 1, len - (p - locale) + 1);
-			g_strdown (locale_charset);
-		}
-	}
-	
-	g_atexit (camel_charset_map_shutdown);
-}
-
-void
-camel_charset_init (CamelCharset *c)
-{
-	c->mask = ~0;
-	c->level = 0;
-}
-
-void
-camel_charset_step (CamelCharset *c, const char *in, int len)
-{
-	register unsigned int mask;
-	register int level;
-	const char *inptr = in, *inend = in+len;
-
-	mask = c->mask;
-	level = c->level;
-
-	/* check what charset a given string will fit in */
-	while (inptr < inend) {
-		gunichar c;
-		const char *newinptr;
-		newinptr = g_utf8_next_char(inptr);
-		c = g_utf8_get_char(inptr);
-		if (newinptr == NULL || !g_unichar_validate (c)) {
-			inptr++;
-			continue;
-		}
-
-		inptr = newinptr;
-		if (c<=0xffff) {
-			mask &= charset_mask(c);
-		
-			if (c>=128 && c<256)
-				level = MAX(level, 1);
-			else if (c>=256)
-				level = MAX(level, 2);
-		} else {
-			mask = 0;
-			level = MAX(level, 2);
-		}
-	}
-
-	c->mask = mask;
-	c->level = level;
-}
-
-/* gets the best charset from the mask of chars in it */
-static const char *
-camel_charset_best_mask(unsigned int mask)
-{
-	int i;
-
-	for (i=0;ilevel == 1)
-		return "ISO-8859-1";
-	else if (charset->level == 2)
-		return camel_charset_best_mask (charset->mask);
-	else
-		return NULL;
-
-}
-
-/* finds the minimum charset for this string NULL means US-ASCII */
-const char *
-camel_charset_best (const char *in, int len)
-{
-	CamelCharset charset;
-
-	camel_charset_init (&charset);
-	camel_charset_step (&charset, in, len);
-	return camel_charset_best_name (&charset);
-}
-
-const char *
-camel_charset_locale_name (void)
-{
-	return locale_charset;
-}
-
-const char *
-camel_charset_to_iconv (const char *name)
-{
-	const char *charset;
-	
-	ICONV_CHARSETS_LOCK ();
-	charset = g_hash_table_lookup (iconv_charsets, name);
-	if (!charset) {
-		/* Attempt to friendlyify the charset */
-		char *new_charset;
-		int len;
-		
-		/* Hack to convert charsets like ISO8859-1 to iconv-friendly ISO-8859-1 */
-		if (!g_strncasecmp (name, "iso", 3) && name[3] != '-' && name[3] != '_') {
-			len = strlen (name);
-			new_charset = g_malloc (len + 2);
-			memcpy (new_charset, name, 3);
-			new_charset[3] = '-';
-			memcpy (new_charset + 4, name + 3, len - 3);
-			new_charset[len + 1] = '\0';
-		} else {
-			/* *shrug* - add it to the hash table just the way it is? */
-			new_charset = g_strdup (name);
-		}
-		
-		g_hash_table_insert (iconv_charsets, g_strdup (name), new_charset);
-		charset = new_charset;
-	}
-	ICONV_CHARSETS_UNLOCK ();
-	
-	g_warning ("camel_charset_to_iconv (\"%s\") => \"%s\"", name, charset);
-	
-	return charset;
-}
-
-#endif /* !BUILD_MAP */
-
diff --git a/camel/camel-charset-map.h b/camel/camel-charset-map.h
deleted file mode 100644
index 0bf2c706c5..0000000000
--- a/camel/camel-charset-map.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *  Copyright (C) 2000 Ximian Inc.
- *
- *  Authors: Michael Zucchi 
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Library General Public License
- *  as published by the Free Software Foundation; either version 2 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU Library General Public License for more details.
- *
- *  You should have received a copy of the GNU Library General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef _CAMEL_CHARSET_MAP_H
-#define _CAMEL_CHARSET_MAP_H
-
-typedef struct _CamelCharset CamelCharset;
-
-struct _CamelCharset {
-	unsigned int mask;
-	int level;
-};
-
-void camel_charset_map_init (void);
-
-void camel_charset_init(CamelCharset *);
-void camel_charset_step(CamelCharset *, const char *in, int len);
-const char *camel_charset_best_name(CamelCharset *);
-
-/* helper function */
-const char *camel_charset_best(const char *in, int len);
-
-const char *camel_charset_locale_name (void);
-
-const char *camel_charset_to_iconv (const char *name);
-
-#endif /* ! _CAMEL_CHARSET_MAP_H */
diff --git a/camel/camel-cipher-context.c b/camel/camel-cipher-context.c
deleted file mode 100644
index 68ead9d01b..0000000000
--- a/camel/camel-cipher-context.c
+++ /dev/null
@@ -1,450 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- *  Authors: Jeffrey Stedfast 
- *
- *  Copyright 2001 Ximian, Inc. (www.ximian.com)
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include 
-#endif
-
-#include "camel-cipher-context.h"
-
-#include 
-
-#include 
-
-#ifdef ENABLE_THREADS
-#include 
-#define CIPHER_LOCK(ctx)   g_mutex_lock (((CamelCipherContext *) ctx)->priv->lock)
-#define CIPHER_UNLOCK(ctx) g_mutex_unlock (((CamelCipherContext *) ctx)->priv->lock);
-#else
-#define CIPHER_LOCK(ctx)
-#define CIPHER_UNLOCK(ctx)
-#endif
-
-#define d(x)
-
-#define CCC_CLASS(o) CAMEL_CIPHER_CONTEXT_CLASS(CAMEL_OBJECT_GET_CLASS(o))
-
-struct _CamelCipherContextPrivate {
-#ifdef ENABLE_THREADS
-	GMutex *lock;
-#endif
-};
-
-static int                  cipher_sign (CamelCipherContext *ctx, const char *userid, CamelCipherHash hash,
-					 CamelStream *istream, CamelStream *ostream, CamelException *ex);
-static int                  cipher_clearsign (CamelCipherContext *context, const char *userid,
-					      CamelCipherHash hash, CamelStream *istream,
-					      CamelStream *ostream, CamelException *ex);
-static CamelCipherValidity *cipher_verify (CamelCipherContext *context, CamelCipherHash hash,
-					   CamelStream *istream, CamelStream *sigstream,
-					   CamelException *ex);
-static int                  cipher_encrypt (CamelCipherContext *context, gboolean sign, const char *userid,
-					    GPtrArray *recipients, CamelStream *istream,
-					    CamelStream *ostream, CamelException *ex);
-static int                  cipher_decrypt (CamelCipherContext *context, CamelStream *istream,
-					    CamelStream *ostream, CamelException *ex);
-
-static CamelObjectClass *parent_class;
-
-static void
-camel_cipher_context_init (CamelCipherContext *context)
-{
-	context->priv = g_new0 (struct _CamelCipherContextPrivate, 1);
-#ifdef ENABLE_THREADS
-	context->priv->lock = g_mutex_new ();
-#endif
-}
-
-static void
-camel_cipher_context_finalise (CamelObject *o)
-{
-	CamelCipherContext *context = (CamelCipherContext *)o;
-	
-	camel_object_unref (CAMEL_OBJECT (context->session));
-	
-#ifdef ENABLE_THREADS
-	g_mutex_free (context->priv->lock);
-#endif
-	
-	g_free (context->priv);
-}
-
-static void
-camel_cipher_context_class_init (CamelCipherContextClass *camel_cipher_context_class)
-{
-	parent_class = camel_type_get_global_classfuncs (camel_object_get_type ());
-	
-	camel_cipher_context_class->sign = cipher_sign;
-	camel_cipher_context_class->clearsign = cipher_clearsign;
-	camel_cipher_context_class->verify = cipher_verify;
-	camel_cipher_context_class->encrypt = cipher_encrypt;
-	camel_cipher_context_class->decrypt = cipher_decrypt;
-}
-
-CamelType
-camel_cipher_context_get_type (void)
-{
-	static CamelType type = CAMEL_INVALID_TYPE;
-	
-	if (type == CAMEL_INVALID_TYPE) {
-		type = camel_type_register (camel_object_get_type (),
-					    "CamelCipherContext",
-					    sizeof (CamelCipherContext),
-					    sizeof (CamelCipherContextClass),
-					    (CamelObjectClassInitFunc) camel_cipher_context_class_init,
-					    NULL,
-					    (CamelObjectInitFunc) camel_cipher_context_init,
-					    (CamelObjectFinalizeFunc) camel_cipher_context_finalise);
-	}
-	
-	return type;
-}
-
-
-/**
- * camel_cipher_context_new:
- * @session: CamelSession
- *
- * This creates a new CamelCipherContext object which is used to sign,
- * verify, encrypt and decrypt streams.
- *
- * Return value: the new CamelCipherContext
- **/
-CamelCipherContext *
-camel_cipher_context_new (CamelSession *session)
-{
-	CamelCipherContext *context;
-	
-	g_return_val_if_fail (session != NULL, NULL);
-	
-	context = CAMEL_CIPHER_CONTEXT (camel_object_new (CAMEL_CIPHER_CONTEXT_TYPE));
-	
-	camel_object_ref (CAMEL_OBJECT (session));
-	context->session = session;
-	
-	return context;
-}
-
-
-/**
- * camel_cipher_context_construct:
- * @context: CamelCipherContext
- * @session: CamelSession
- *
- * Constucts the CamelCipherContext
- **/
-void
-camel_cipher_context_construct (CamelCipherContext *context, CamelSession *session)
-{
-	g_return_if_fail (CAMEL_IS_CIPHER_CONTEXT (context));
-	g_return_if_fail (CAMEL_IS_SESSION (session));
-	
-	camel_object_ref (CAMEL_OBJECT (session));
-	context->session = session;
-}
-
-
-static int
-cipher_sign (CamelCipherContext *ctx, const char *userid, CamelCipherHash hash,
-	     CamelStream *istream, CamelStream *ostream, CamelException *ex)
-{
-	camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
-			     _("Signing is not supported by this cipher"));
-	return -1;
-}
-
-/**
- * camel_cipher_sign:
- * @context: Cipher Context
- * @userid: private key to use to sign the stream
- * @hash: preferred Message-Integrity-Check hash algorithm
- * @istream: input stream
- * @ostream: output stream
- * @ex: exception
- *
- * Signs the input stream and writes the resulting signature to the output stream.
- *
- * Return value: 0 for success or -1 for failure.
- **/
-int
-camel_cipher_sign (CamelCipherContext *context, const char *userid, CamelCipherHash hash,
-		   CamelStream *istream, CamelStream *ostream, CamelException *ex)
-{
-	int retval;
-	
-	g_return_val_if_fail (CAMEL_IS_CIPHER_CONTEXT (context), -1);
-	
-	CIPHER_LOCK(context);
-	
-	retval = CCC_CLASS (context)->sign (context, userid, hash, istream, ostream, ex);
-	
-	CIPHER_UNLOCK(context);
-	
-	return retval;
-}
-
-
-static int
-cipher_clearsign (CamelCipherContext *context, const char *userid, CamelCipherHash hash,
-		  CamelStream *istream, CamelStream *ostream, CamelException *ex)
-{
-	camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
-			     _("Clearsigning is not supported by this cipher"));
-	return -1;
-}
-
-/**
- * camel_cipher_clearsign:
- * @context: Cipher Context
- * @userid: key id or email address of the private key to sign with
- * @hash: preferred Message-Integrity-Check hash algorithm
- * @istream: input stream
- * @ostream: output stream
- * @ex: exception
- *
- * Clearsigns the input stream and writes the resulting clearsign to the output stream.
- *
- * Return value: 0 for success or -1 for failure.
- **/
-int
-camel_cipher_clearsign (CamelCipherContext *context, const char *userid, CamelCipherHash hash,
-			CamelStream *istream, CamelStream *ostream, CamelException *ex)
-{
-	int retval;
-	
-	g_return_val_if_fail (CAMEL_IS_CIPHER_CONTEXT (context), -1);
-	
-	CIPHER_LOCK(context);
-	
-	retval = CCC_CLASS (context)->clearsign (context, userid, hash, istream, ostream, ex);
-	
-	CIPHER_UNLOCK(context);
-	
-	return retval;
-}
-
-
-static CamelCipherValidity *
-cipher_verify (CamelCipherContext *context, CamelCipherHash hash, CamelStream *istream,
-	       CamelStream *sigstream, CamelException *ex)
-{
-	camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
-			     _("Verifying is not supported by this cipher"));
-	return NULL;
-}
-
-/**
- * camel_cipher_verify:
- * @context: Cipher Context
- * @istream: input stream
- * @sigstream: optional detached-signature stream
- * @ex: exception
- *
- * Verifies the signature. If @istream is a clearsigned stream,
- * you should pass %NULL as the sigstream parameter. Otherwise
- * @sigstream is assumed to be the signature stream and is used to
- * verify the integirity of the @istream.
- *
- * Return value: a CamelCipherValidity structure containing information
- * about the integrity of the input stream or %NULL on failure to
- * execute at all.
- **/
-CamelCipherValidity *
-camel_cipher_verify (CamelCipherContext *context, CamelCipherHash hash, CamelStream *istream,
-		     CamelStream *sigstream, CamelException *ex)
-{
-	CamelCipherValidity *valid;
-	
-	g_return_val_if_fail (CAMEL_IS_CIPHER_CONTEXT (context), NULL);
-	
-	CIPHER_LOCK(context);
-	
-	valid = CCC_CLASS (context)->verify (context, hash, istream, sigstream, ex);
-	
-	CIPHER_UNLOCK(context);
-	
-	return valid;
-}
-
-
-static int
-cipher_encrypt (CamelCipherContext *context, gboolean sign, const char *userid, GPtrArray *recipients,
-		CamelStream *istream, CamelStream *ostream, CamelException *ex)
-{
-	camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
-			     _("Encryption is not supported by this cipher"));
-	return -1;
-}
-
-/**
- * camel_cipher_encrypt:
- * @context: Cipher Context
- * @sign: sign as well as encrypt
- * @userid: key id (or email address) to use when signing (assuming @sign is %TRUE)
- * @recipients: an array of recipient key ids and/or email addresses
- * @istream: cleartext input stream
- * @ostream: ciphertext output stream
- * @ex: exception
- *
- * Encrypts (and optionally signs) the cleartext input stream and
- * writes the resulting ciphertext to the output stream.
- *
- * Return value: 0 for success or -1 for failure.
- **/
-int
-camel_cipher_encrypt (CamelCipherContext *context, gboolean sign, const char *userid, GPtrArray *recipients,
-		      CamelStream *istream, CamelStream *ostream, CamelException *ex)
-{
-	int retval;
-	
-	g_return_val_if_fail (CAMEL_IS_CIPHER_CONTEXT (context), -1);
-	
-	CIPHER_LOCK(context);
-	
-	retval = CCC_CLASS (context)->encrypt (context, sign, userid, recipients, istream, ostream, ex);
-	
-	CIPHER_UNLOCK(context);
-	
-	return retval;
-}
-
-
-static int
-cipher_decrypt (CamelCipherContext *context, CamelStream *istream,
-		CamelStream *ostream, CamelException *ex)
-{
-	camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
-			     _("Decryption is not supported by this cipher"));
-	return -1;
-}
-
-/**
- * camel_cipher_decrypt:
- * @context: Cipher Context
- * @ciphertext: ciphertext stream (ie input stream)
- * @cleartext: cleartext stream (ie output stream)
- * @ex: exception
- *
- * Decrypts the ciphertext input stream and writes the resulting
- * cleartext to the output stream.
- *
- * Return value: 0 for success or -1 for failure.
- **/
-int
-camel_cipher_decrypt (CamelCipherContext *context, CamelStream *istream,
-		      CamelStream *ostream, CamelException *ex)
-{
-	int retval;
-	
-	g_return_val_if_fail (CAMEL_IS_CIPHER_CONTEXT (context), -1);
-	
-	CIPHER_LOCK(context);
-	
-	retval = CCC_CLASS (context)->decrypt (context, istream, ostream, ex);
-	
-	CIPHER_UNLOCK(context);
-	
-	return retval;
-}
-
-
-/* Cipher Validity stuff */
-struct _CamelCipherValidity {
-	gboolean valid;
-	gchar *description;
-};
-
-CamelCipherValidity *
-camel_cipher_validity_new (void)
-{
-	CamelCipherValidity *validity;
-	
-	validity = g_new (CamelCipherValidity, 1);
-	validity->valid = FALSE;
-	validity->description = NULL;
-	
-	return validity;
-}
-
-void
-camel_cipher_validity_init (CamelCipherValidity *validity)
-{
-	g_assert (validity != NULL);
-	
-	validity->valid = FALSE;
-	validity->description = NULL;
-}
-
-gboolean
-camel_cipher_validity_get_valid (CamelCipherValidity *validity)
-{
-	if (validity == NULL)
-		return FALSE;
-	
-	return validity->valid;
-}
-
-void
-camel_cipher_validity_set_valid (CamelCipherValidity *validity, gboolean valid)
-{
-	g_assert (validity != NULL);
-	
-	validity->valid = valid;
-}
-
-gchar *
-camel_cipher_validity_get_description (CamelCipherValidity *validity)
-{
-	if (validity == NULL)
-		return NULL;
-	
-	return validity->description;
-}
-
-void
-camel_cipher_validity_set_description (CamelCipherValidity *validity, const gchar *description)
-{
-	g_assert (validity != NULL);
-	
-	g_free (validity->description);
-	validity->description = g_strdup (description);
-}
-
-void
-camel_cipher_validity_clear (CamelCipherValidity *validity)
-{
-	g_assert (validity != NULL);
-	
-	validity->valid = FALSE;
-	g_free (validity->description);
-	validity->description = NULL;
-}
-
-void
-camel_cipher_validity_free (CamelCipherValidity *validity)
-{
-	if (validity == NULL)
-		return;
-	
-	g_free (validity->description);
-	g_free (validity);
-}
diff --git a/camel/camel-cipher-context.h b/camel/camel-cipher-context.h
deleted file mode 100644
index 06846e5840..0000000000
--- a/camel/camel-cipher-context.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- *  Authors: Jeffrey Stedfast 
- *
- *  Copyright 2001 Ximian, Inc. (www.ximian.com)
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
- *
- */
-
-#ifndef CAMEL_CIPHER_CONTEXT_H
-#define CAMEL_CIPHER_CONTEXT_H
-
-#include 
-#include 
-#include 
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#define CAMEL_CIPHER_CONTEXT_TYPE     (camel_cipher_context_get_type ())
-#define CAMEL_CIPHER_CONTEXT(obj)     (CAMEL_CHECK_CAST((obj), CAMEL_CIPHER_CONTEXT_TYPE, CamelCipherContext))
-#define CAMEL_CIPHER_CONTEXT_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_CIPHER_CONTEXT_TYPE, CamelCipherContextClass))
-#define CAMEL_IS_CIPHER_CONTEXT(o)    (CAMEL_CHECK_TYPE((o), CAMEL_CIPHER_CONTEXT_TYPE))
-
-typedef struct _CamelCipherValidity CamelCipherValidity;
-
-typedef enum {
-	CAMEL_CIPHER_HASH_DEFAULT,
-	CAMEL_CIPHER_HASH_MD2,
-	CAMEL_CIPHER_HASH_MD5,
-	CAMEL_CIPHER_HASH_SHA1
-} CamelCipherHash;
-
-typedef struct _CamelCipherContext {
-	CamelObject parent_object;
-	
-	struct _CamelCipherContextPrivate *priv;
-	
-	CamelSession *session;
-	
-} CamelCipherContext;
-
-typedef struct _CamelCipherContextClass {
-	CamelObjectClass parent_class;
-	
-	int                   (*sign)      (CamelCipherContext *ctx, const char *userid, CamelCipherHash hash,
-					    CamelStream *istream, CamelStream *ostream, CamelException *ex);
-	
-	int                   (*clearsign) (CamelCipherContext *context, const char *userid, CamelCipherHash hash,
-					    CamelStream *istream, CamelStream *ostream, CamelException *ex);
-	
-	CamelCipherValidity * (*verify)    (CamelCipherContext *context, CamelCipherHash hash,
-					    CamelStream *istream, CamelStream *sigstream,
-					    CamelException *ex);
-	
-	int                   (*encrypt)   (CamelCipherContext *context, gboolean sign, const char *userid,
-					    GPtrArray *recipients, CamelStream *istream, CamelStream *ostream,
-					    CamelException *ex);
-	
-	int                   (*decrypt)   (CamelCipherContext *context, CamelStream *istream, CamelStream *ostream,
-					    CamelException *ex);
-	
-} CamelCipherContextClass;
-
-CamelType            camel_cipher_context_get_type (void);
-
-CamelCipherContext  *camel_cipher_context_new (CamelSession *session);
-
-void                 camel_cipher_context_construct (CamelCipherContext *context, CamelSession *session);
-
-/* cipher routines */
-int                  camel_cipher_sign (CamelCipherContext *context, const char *userid, CamelCipherHash hash,
-					CamelStream *istream, CamelStream *ostream, CamelException *ex);
-
-int                  camel_cipher_clearsign (CamelCipherContext *context, const char *userid, CamelCipherHash hash,
-					     CamelStream *istream, CamelStream *ostream, CamelException *ex);
-
-CamelCipherValidity *camel_cipher_verify (CamelCipherContext *context, CamelCipherHash hash,
-					  CamelStream *istream, CamelStream *sigstream,
-					  CamelException *ex);
-
-int                  camel_cipher_encrypt (CamelCipherContext *context, gboolean sign, const char *userid,
-					   GPtrArray *recipients, CamelStream *istream, CamelStream *ostream,
-					   CamelException *ex);
-
-int                  camel_cipher_decrypt (CamelCipherContext *context, CamelStream *istream, CamelStream *ostream,
-					   CamelException *ex);
-
-/* CamelCipherValidity utility functions */
-CamelCipherValidity *camel_cipher_validity_new (void);
-
-void                 camel_cipher_validity_init (CamelCipherValidity *validity);
-
-gboolean             camel_cipher_validity_get_valid (CamelCipherValidity *validity);
-
-void                 camel_cipher_validity_set_valid (CamelCipherValidity *validity, gboolean valid);
-
-char                *camel_cipher_validity_get_description (CamelCipherValidity *validity);
-
-void                 camel_cipher_validity_set_description (CamelCipherValidity *validity, const char *description);
-
-void                 camel_cipher_validity_clear (CamelCipherValidity *validity);
-
-void                 camel_cipher_validity_free (CamelCipherValidity *validity);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_CIPHER_CONTEXT_H */
diff --git a/camel/camel-cms-context.c b/camel/camel-cms-context.c
deleted file mode 100644
index dea3951877..0000000000
--- a/camel/camel-cms-context.c
+++ /dev/null
@@ -1,324 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- *  Authors: Jeffrey Stedfast 
- *
- *  Copyright 2001 Ximian, Inc. (www.ximian.com)
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include 
-#endif
-
-#include "camel-cms-context.h"
-
-#include 
-
-#ifdef ENABLE_THREADS
-#include 
-#define CMS_LOCK(ctx)   g_mutex_lock (((CamelCMSContext *) ctx)->priv->lock)
-#define CMS_UNLOCK(ctx) g_mutex_unlock (((CamelCMSContext *) ctx)->priv->lock);
-#else
-#define CMS_LOCK(ctx)
-#define CMS_UNLOCK(ctx)
-#endif
-
-#define d(x)
-
-#define CCC_CLASS(o) CAMEL_CMS_CONTEXT_CLASS(CAMEL_OBJECT_GET_CLASS(o))
-
-struct _CamelCMSContextPrivate {
-#ifdef ENABLE_THREADS
-	GMutex *lock;
-#endif
-};
-
-static CamelMimeMessage *cms_sign      (CamelCMSContext *ctx, CamelMimeMessage *message,
-					const char *userid, gboolean signing_time,
-					gboolean detached, CamelException *ex);
-
-static CamelMimeMessage *cms_certsonly (CamelCMSContext *ctx, CamelMimeMessage *message,
-					const char *userid, GPtrArray *recipients,
-					CamelException *ex);
-
-static CamelMimeMessage *cms_encrypt   (CamelCMSContext *ctx, CamelMimeMessage *message,
-					const char *userid, GPtrArray *recipients, 
-					CamelException *ex);
-
-static CamelMimeMessage *cms_envelope  (CamelCMSContext *ctx, CamelMimeMessage *message,
-					const char *userid, GPtrArray *recipients, 
-					CamelException *ex);
-
-static CamelMimeMessage *cms_decode    (CamelCMSContext *ctx, CamelMimeMessage *message,
-					CamelCMSValidityInfo **info, CamelException *ex);
-
-static CamelObjectClass *parent_class;
-
-static void
-camel_cms_context_init (CamelCMSContext *context)
-{
-	context->priv = g_new0 (struct _CamelCMSContextPrivate, 1);
-#ifdef ENABLE_THREADS
-	context->priv->lock = g_mutex_new ();
-#endif
-}
-
-static void
-camel_cms_context_finalise (CamelObject *o)
-{
-	CamelCMSContext *context = (CamelCMSContext *)o;
-	
-	camel_object_unref (CAMEL_OBJECT (context->session));
-	
-#ifdef ENABLE_THREADS
-	g_mutex_free (context->priv->lock);
-#endif
-	
-	g_free (context->priv);
-}
-
-static void
-camel_cms_context_class_init (CamelCMSContextClass *camel_cms_context_class)
-{
-	parent_class = camel_type_get_global_classfuncs (camel_object_get_type ());
-	
-	camel_cms_context_class->sign = cms_sign;
-	camel_cms_context_class->certsonly = cms_certsonly;
-	camel_cms_context_class->encrypt = cms_encrypt;
-	camel_cms_context_class->envelope = cms_envelope;
-	camel_cms_context_class->decode = cms_decode;
-}
-
-CamelType
-camel_cms_context_get_type (void)
-{
-	static CamelType type = CAMEL_INVALID_TYPE;
-	
-	if (type == CAMEL_INVALID_TYPE) {
-		type = camel_type_register (camel_object_get_type (),
-					    "CamelCMSContext",
-					    sizeof (CamelCMSContext),
-					    sizeof (CamelCMSContextClass),
-					    (CamelObjectClassInitFunc) camel_cms_context_class_init,
-					    NULL,
-					    (CamelObjectInitFunc) camel_cms_context_init,
-					    (CamelObjectFinalizeFunc) camel_cms_context_finalise);
-	}
-	
-	return type;
-}
-
-
-/**
- * camel_cms_context_new:
- * @session: CamelSession
- * @encryption_key: preferred encryption key nickname
- *
- * This creates a new CamelCMSContext object which is used to sign,
- * encrypt, envelope and decode CMS messages.
- *
- * Return value: the new CamelCMSContext
- **/
-CamelCMSContext *
-camel_cms_context_new (CamelSession *session)
-{
-	CamelCMSContext *context;
-	
-	g_return_val_if_fail (session != NULL, NULL);
-	g_return_val_if_fail (CAMEL_IS_SESSION (session), NULL);
-	
-	context = CAMEL_CMS_CONTEXT (camel_object_new (CAMEL_CMS_CONTEXT_TYPE));
-	
-	camel_object_ref (CAMEL_OBJECT (session));
-	context->session = session;
-	
-	return context;
-}
-
-
-/**
- * camel_cms_context_construct:
- * @context: CMS Context
- * @session: CamelSession
- *
- * Construct the CMS Context.
- **/
-void
-camel_cms_context_construct (CamelCMSContext *context, CamelSession *session)
-{
-	g_return_if_fail (CAMEL_IS_CMS_CONTEXT (context));
-	g_return_if_fail (CAMEL_IS_SESSION (session));
-	
-	camel_object_ref (CAMEL_OBJECT (session));
-	context->session = session;
-}
-
-
-static CamelMimeMessage *
-cms_sign (CamelCMSContext *ctx, CamelMimeMessage *message,
-	  const char *userid, gboolean signing_time,
-	  gboolean detached, CamelException *ex)
-{
-	g_warning ("Using default CamelCMSContext::sign() method.");
-	
-	return NULL;
-}
-
-
-CamelMimeMessage *
-camel_cms_sign (CamelCMSContext *ctx, CamelMimeMessage *message,
-		const char *userid, gboolean signing_time,
-		gboolean detached, CamelException *ex)
-{
-	g_return_val_if_fail (CAMEL_IS_CMS_CONTEXT (ctx), NULL);
-	g_return_val_if_fail (CAMEL_IS_MIME_MESSAGE (message), NULL);
-	g_return_val_if_fail (userid != NULL, NULL);
-	
-	return CCC_CLASS (ctx)->sign (ctx, message, userid, signing_time, detached, ex);
-}
-
-
-static CamelMimeMessage *
-cms_certsonly (CamelCMSContext *ctx, CamelMimeMessage *message,
-	       const char *userid, GPtrArray *recipients,
-	       CamelException *ex)
-{
-	g_warning ("Using default CamelCMSContext::certsonly() method.");
-	
-	return NULL;
-}
-
-
-CamelMimeMessage *
-camel_cms_certsonly (CamelCMSContext *ctx, CamelMimeMessage *message,
-		     const char *userid, GPtrArray *recipients,
-		     CamelException *ex)
-{
-	g_return_val_if_fail (CAMEL_IS_CMS_CONTEXT (ctx), NULL);
-	g_return_val_if_fail (CAMEL_IS_MIME_MESSAGE (message), NULL);
-	g_return_val_if_fail (userid != NULL, NULL);
-	g_return_val_if_fail (recipients != NULL, NULL);
-	
-	return CCC_CLASS (ctx)->certsonly (ctx, message, userid, recipients, ex);
-}
-
-
-static CamelMimeMessage *
-cms_envelope (CamelCMSContext *ctx, CamelMimeMessage *message,
-	      const char *userid, GPtrArray *recipients, 
-	      CamelException *ex)
-{
-	g_warning ("Using default CamelCMSContext::envelope() method.");
-	
-	return NULL;
-}
-
-
-CamelMimeMessage *
-camel_cms_envelope (CamelCMSContext *ctx, CamelMimeMessage *message,
-		    const char *userid, GPtrArray *recipients, 
-		    CamelException *ex)
-{
-	g_return_val_if_fail (CAMEL_IS_CMS_CONTEXT (ctx), NULL);
-	g_return_val_if_fail (CAMEL_IS_MIME_MESSAGE (message), NULL);
-	g_return_val_if_fail (userid != NULL, NULL);
-	g_return_val_if_fail (recipients != NULL, NULL);
-	
-	return CCC_CLASS (ctx)->envelope (ctx, message, userid, recipients, ex);
-}
-
-
-static CamelMimeMessage *
-cms_encrypt (CamelCMSContext *ctx, CamelMimeMessage *message,
-	     const char *userid, GPtrArray *recipients, 
-	     CamelException *ex)
-{
-	g_warning ("Using default CamelCMSContext::encrypt() method.");
-	
-	return NULL;
-}
-
-
-CamelMimeMessage *
-camel_cms_encrypt (CamelCMSContext *ctx, CamelMimeMessage *message,
-		   const char *userid, GPtrArray *recipients, 
-		   CamelException *ex)
-{
-	g_return_val_if_fail (CAMEL_IS_CMS_CONTEXT (ctx), NULL);
-	g_return_val_if_fail (CAMEL_IS_MIME_MESSAGE (message), NULL);
-	g_return_val_if_fail (userid != NULL, NULL);
-	g_return_val_if_fail (recipients != NULL, NULL);
-	
-	return CCC_CLASS (ctx)->encrypt (ctx, message, userid, recipients, ex);
-}
-
-
-static CamelMimeMessage *
-cms_decode (CamelCMSContext *ctx, CamelMimeMessage *message,
-	    CamelCMSValidityInfo **info, CamelException *ex)
-{
-	g_warning ("Using default CamelCMSContext::decode() method.");
-	
-	return NULL;
-}
-
-
-CamelMimeMessage *
-camel_cms_decode (CamelCMSContext *ctx, CamelMimeMessage *message,
-		  CamelCMSValidityInfo **info, CamelException *ex)
-{
-	g_return_val_if_fail (CAMEL_IS_CMS_CONTEXT (ctx), NULL);
-	g_return_val_if_fail (CAMEL_IS_MIME_MESSAGE (message), NULL);
-	
-	return CCC_CLASS (ctx)->decode (ctx, message, info, ex);
-}
-
-
-void
-camel_cms_signer_free (CamelCMSSigner *signer)
-{
-	CamelCMSSigner *next;
-	
-	if (!signer)
-		return;
-	
-	while (signer) {
-		next = signer->next;
-		g_free (signer->signercn);
-		g_free (signer->status);
-		g_free (signer);
-		signer = next;
-	}
-}
-
-
-void
-camel_cms_validity_info_free (CamelCMSValidityInfo *info)
-{
-	CamelCMSValidityInfo *next;
-	
-	if (!info)
-		return;
-	
-	while (info) {
-		next = info->next;
-		if (info->type == CAMEL_CMS_TYPE_SIGNED)
-			camel_cms_signer_free (info->signers);
-		g_free (info);
-		info = next;
-	}
-}
diff --git a/camel/camel-cms-context.h b/camel/camel-cms-context.h
deleted file mode 100644
index b68547e8b0..0000000000
--- a/camel/camel-cms-context.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- *  Authors: Jeffrey Stedfast 
- *
- *  Copyright 2001 Ximian, Inc. (www.ximian.com)
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
- *
- */
-
-#ifndef CAMEL_CMS_CONTEXT_H
-#define CAMEL_CMS_CONTEXT_H
-
-#include 
-#include 
-#include 
-#include 
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#define CAMEL_CMS_CONTEXT_TYPE     (camel_cms_context_get_type ())
-#define CAMEL_CMS_CONTEXT(obj)     (CAMEL_CHECK_CAST((obj), CAMEL_CMS_CONTEXT_TYPE, CamelCMSContext))
-#define CAMEL_CMS_CONTEXT_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_CMS_CONTEXT_TYPE, CamelCMSContextClass))
-#define CAMEL_IS_CMS_CONTEXT(o)    (CAMEL_CHECK_TYPE((o), CAMEL_CMS_CONTEXT_TYPE))
-
-typedef enum {
-	CAMEL_CMS_TYPE_DATA,
-	CAMEL_CMS_TYPE_SIGNED,
-	CAMEL_CMS_TYPE_ENVELOPED,
-	CAMEL_CMS_TYPE_ENCRYPTED
-} CamelCMSType;
-
-typedef struct _CamelCMSSigner {
-	struct _CamelCMSSigner *next;
-	char *signercn;
-	char *status;
-} CamelCMSSigner;
-
-typedef struct _CamelCMSValidityInfo {
-	struct _CamelCMSValidityInfo *next;
-	CamelCMSType type;
-	CamelCMSSigner *signers;
-} CamelCMSValidityInfo;
-
-
-typedef struct _CamelCMSContext {
-	CamelObject parent_object;
-	
-	struct _CamelCMSContextPrivate *priv;
-	
-	CamelSession *session;
-} CamelCMSContext;
-
-typedef struct _CamelCMSContextClass {
-	CamelObjectClass parent_class;
-	
-	CamelMimeMessage *(*sign)       (CamelCMSContext *ctx, CamelMimeMessage *message,
-					 const char *userid, gboolean signing_time,
-					 gboolean detached, CamelException *ex);
-	
-	CamelMimeMessage *(*certsonly)  (CamelCMSContext *ctx, CamelMimeMessage *message,
-					 const char *userid, GPtrArray *recipients,
-					 CamelException *ex);
-	
-	CamelMimeMessage *(*encrypt)    (CamelCMSContext *ctx, CamelMimeMessage *message,
-					 const char *userid, GPtrArray *recipients, 
-					 CamelException *ex);
-	
-	CamelMimeMessage *(*envelope)   (CamelCMSContext *ctx, CamelMimeMessage *message,
-					 const char *userid, GPtrArray *recipients, 
-					 CamelException *ex);
-	
-	CamelMimeMessage *(*decode)     (CamelCMSContext *ctx, CamelMimeMessage *message,
-					 CamelCMSValidityInfo **info, CamelException *ex);
-	
-} CamelCMSContextClass;
-
-CamelType         camel_cms_context_get_type (void);
-
-CamelCMSContext  *camel_cms_context_new (CamelSession *session);
-
-void              camel_cms_context_construct (CamelCMSContext *context, CamelSession *session);
-
-/* cms routines */
-CamelMimeMessage *camel_cms_sign      (CamelCMSContext *ctx, CamelMimeMessage *message,
-				       const char *userid, gboolean signing_time,
-				       gboolean detached, CamelException *ex);
-
-CamelMimeMessage *camel_cms_certsonly (CamelCMSContext *ctx, CamelMimeMessage *message,
-				       const char *userid, GPtrArray *recipients,
-				       CamelException *ex);
-
-CamelMimeMessage *camel_cms_encrypt   (CamelCMSContext *ctx, CamelMimeMessage *message,
-				       const char *userid, GPtrArray *recipients, 
-				       CamelException *ex);
-
-CamelMimeMessage *camel_cms_envelope  (CamelCMSContext *ctx, CamelMimeMessage *message,
-				       const char *userid, GPtrArray *recipients, 
-				       CamelException *ex);
-
-CamelMimeMessage *camel_cms_decode    (CamelCMSContext *ctx, CamelMimeMessage *message,
-				       CamelCMSValidityInfo **info, CamelException *ex);
-
-
-void              camel_cms_signer_free        (CamelCMSSigner *signer);
-
-void              camel_cms_validity_info_free (CamelCMSValidityInfo *info);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_CMS_CONTEXT_H */
diff --git a/camel/camel-data-wrapper.c b/camel/camel-data-wrapper.c
deleted file mode 100644
index dd2f475b1e..0000000000
--- a/camel/camel-data-wrapper.c
+++ /dev/null
@@ -1,294 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; -*- */
-/* camel-data-wrapper.c : Abstract class for a data_wrapper */
-
-/*
- *
- * Authors: Bertrand Guiheneuf 
- *
- * Copyright 1999, 2000 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#ifdef HAVE_CONFIG_H
-#include 
-#endif
-
-#include 
-
-#include "camel-data-wrapper.h"
-#include "camel-mime-utils.h"
-#include "camel-stream.h"
-#include "camel-exception.h"
-
-#define d(x)
-
-static CamelObjectClass *parent_class = NULL;
-
-/* Returns the class for a CamelDataWrapper */
-#define CDW_CLASS(so) CAMEL_DATA_WRAPPER_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-
-
-static int construct_from_stream(CamelDataWrapper *, CamelStream *);
-static int write_to_stream (CamelDataWrapper *data_wrapper, CamelStream *stream);
-static void set_mime_type (CamelDataWrapper *data_wrapper, const gchar *mime_type);
-static gchar *get_mime_type (CamelDataWrapper *data_wrapper);
-static CamelContentType *get_mime_type_field (CamelDataWrapper *data_wrapper);
-static void set_mime_type_field (CamelDataWrapper *data_wrapper, CamelContentType *mime_type);
-
-static void
-camel_data_wrapper_class_init (CamelDataWrapperClass *camel_data_wrapper_class)
-{
-	parent_class = camel_type_get_global_classfuncs (camel_object_get_type ());
-
-	/* virtual method definition */
-	camel_data_wrapper_class->write_to_stream = write_to_stream;
-	camel_data_wrapper_class->set_mime_type = set_mime_type;
-	camel_data_wrapper_class->get_mime_type = get_mime_type;
-	camel_data_wrapper_class->get_mime_type_field = get_mime_type_field;
-	camel_data_wrapper_class->set_mime_type_field = set_mime_type_field;
-
-	camel_data_wrapper_class->construct_from_stream = construct_from_stream;
-}
-
-static void
-camel_data_wrapper_init (gpointer object, gpointer klass)
-{
-	CamelDataWrapper *camel_data_wrapper = CAMEL_DATA_WRAPPER (object);
-
-	camel_data_wrapper->mime_type = header_content_type_new ("application", "octet-stream");
-	camel_data_wrapper->offline = FALSE;
-}
-
-static void
-camel_data_wrapper_finalize (CamelObject *object)
-{
-	CamelDataWrapper *camel_data_wrapper = CAMEL_DATA_WRAPPER (object);
-
-	if (camel_data_wrapper->mime_type)
-		header_content_type_unref (camel_data_wrapper->mime_type);
-
-	if (camel_data_wrapper->stream)
-		camel_object_unref (CAMEL_OBJECT (camel_data_wrapper->stream));
-}
-
-CamelType
-camel_data_wrapper_get_type (void)
-{
-	static CamelType camel_data_wrapper_type = CAMEL_INVALID_TYPE;
-
-	if (camel_data_wrapper_type == CAMEL_INVALID_TYPE) {
-		camel_data_wrapper_type = camel_type_register (CAMEL_OBJECT_TYPE, "CamelDataWrapper",
-							       sizeof (CamelDataWrapper),
-							       sizeof (CamelDataWrapperClass),
-							       (CamelObjectClassInitFunc) camel_data_wrapper_class_init,
-							       NULL,
-							       (CamelObjectInitFunc) camel_data_wrapper_init,
-							       (CamelObjectFinalizeFunc) camel_data_wrapper_finalize);
-	}
-
-	return camel_data_wrapper_type;
-}
-
-static int
-write_to_stream (CamelDataWrapper *data_wrapper, CamelStream *stream)
-{
-	if (data_wrapper->stream == NULL) {
-		return -1;
-	}
-
-	if (camel_stream_reset (data_wrapper->stream) == -1)
-		return -1;
-
-	return camel_stream_write_to_stream (data_wrapper->stream, stream);
-}
-
-CamelDataWrapper *
-camel_data_wrapper_new(void)
-{
-	return (CamelDataWrapper *)camel_object_new(camel_data_wrapper_get_type());
-}
-
-/**
- * camel_data_wrapper_write_to_stream:
- * @data_wrapper: a data wrapper
- * @stream: stream for data to be written to
- * @ex: a CamelException
- *
- * Writes the data content to @stream in a machine-independent format
- * appropriate for the data. It should be possible to construct an
- * equivalent data wrapper object later by passing this stream to
- * camel_data_construct_from_stream().
- *
- * Return value: the number of bytes written, or -1 if an error occurs.
- **/
-int
-camel_data_wrapper_write_to_stream (CamelDataWrapper *data_wrapper,
-				    CamelStream *stream)
-{
-	g_return_val_if_fail (CAMEL_IS_DATA_WRAPPER (data_wrapper), -1);
-	g_return_val_if_fail (CAMEL_IS_STREAM (stream), -1);
-
-	return CDW_CLASS (data_wrapper)->write_to_stream (data_wrapper, stream);
-}
-
-static int
-construct_from_stream (CamelDataWrapper *data_wrapper, CamelStream *stream)
-{
-	if (data_wrapper->stream)
-		camel_object_unref((CamelObject *)data_wrapper->stream);
-
-	data_wrapper->stream = stream;
-	camel_object_ref (CAMEL_OBJECT (stream));
-	return 0;
-}
-
-/**
- * camel_data_wrapper_construct_from_stream:
- * @data_wrapper: a data wrapper
- * @stream: A stream that can be read from.
- *
- * Constructs the content of the data wrapper from the
- * supplied @stream.
- *
- * Return value: -1 on error.
- **/
-int
-camel_data_wrapper_construct_from_stream (CamelDataWrapper *data_wrapper,
-					  CamelStream *stream)
-{
-	g_return_val_if_fail (CAMEL_IS_DATA_WRAPPER (data_wrapper), -1);
-	g_return_val_if_fail (CAMEL_IS_STREAM (stream), -1);
-
-	return CDW_CLASS (data_wrapper)->construct_from_stream (data_wrapper, stream);
-}
-
-
-static void
-set_mime_type (CamelDataWrapper *data_wrapper, const gchar *mime_type)
-{
-	if (data_wrapper->mime_type)
-		header_content_type_unref (data_wrapper->mime_type);
-	data_wrapper->mime_type = header_content_type_decode (mime_type);
-}
-
-/**
- * camel_data_wrapper_set_mime_type:
- * @data_wrapper: a data wrapper
- * @mime_type: the text representation of a MIME type
- *
- * This sets the data wrapper's MIME type.
- * It might fail, but you won't know. It will allow you to set
- * Content-Type parameters on the data wrapper, which are meaningless.
- * You should not be allowed to change the MIME type of a data wrapper
- * that contains data, or at least, if you do, it should invalidate the
- * data.
- **/
-void
-camel_data_wrapper_set_mime_type (CamelDataWrapper *data_wrapper,
-				  const gchar *mime_type)
-{
-	g_return_if_fail (CAMEL_IS_DATA_WRAPPER (data_wrapper));
-	g_return_if_fail (mime_type != NULL);
-
-	CDW_CLASS (data_wrapper)->set_mime_type (data_wrapper, mime_type);
-}
-
-static gchar *
-get_mime_type (CamelDataWrapper *data_wrapper)
-{
-	return header_content_type_simple (data_wrapper->mime_type);
-}
-
-/**
- * camel_data_wrapper_get_mime_type:
- * @data_wrapper: a data wrapper
- *
- * Return value: the text form of the data wrapper's MIME type,
- * which the caller must free.
- **/
-gchar *
-camel_data_wrapper_get_mime_type (CamelDataWrapper *data_wrapper)
-{
-	g_return_val_if_fail (CAMEL_IS_DATA_WRAPPER (data_wrapper), NULL);
-
-	return CDW_CLASS (data_wrapper)->get_mime_type (data_wrapper);
-}
-
-
-static CamelContentType *
-get_mime_type_field (CamelDataWrapper *data_wrapper)
-{
-	return data_wrapper->mime_type;
-}
-
-/**
- * camel_data_wrapper_get_mime_type_field:
- * @data_wrapper: a data wrapper
- *
- * Return value: the parsed form of the data wrapper's MIME type
- **/
-CamelContentType *
-camel_data_wrapper_get_mime_type_field (CamelDataWrapper *data_wrapper)
-{
-	g_return_val_if_fail (CAMEL_IS_DATA_WRAPPER (data_wrapper), NULL);
-
-	return CDW_CLASS (data_wrapper)->get_mime_type_field (data_wrapper);
-}
-
-/**
- * camel_data_wrapper_set_mime_type_field:
- * @data_wrapper: a data wrapper
- * @mime_type: the parsed representation of a MIME type
- *
- * This sets the data wrapper's MIME type. It suffers from the same
- * flaws as camel_data_wrapper_set_mime_type.
- **/
-static void
-set_mime_type_field (CamelDataWrapper *data_wrapper,
-		     CamelContentType *mime_type)
-{
-	g_return_if_fail (CAMEL_IS_DATA_WRAPPER (data_wrapper));
-	g_return_if_fail (mime_type != NULL);
-
-	if (data_wrapper->mime_type)
-		header_content_type_unref (data_wrapper->mime_type);
-	data_wrapper->mime_type = mime_type;
-	if (mime_type)
-		header_content_type_ref (data_wrapper->mime_type);
-}
-
-void
-camel_data_wrapper_set_mime_type_field (CamelDataWrapper *data_wrapper,
-					CamelContentType *mime_type)
-{
-	CDW_CLASS (data_wrapper)->set_mime_type_field (data_wrapper, mime_type);
-}
-
-
-/**
- * camel_data_wrapper_is_offline:
- * @data_wrapper: a data wrapper
- *
- * Return value: whether @data_wrapper is "offline" (data stored
- * remotely) or not. Some optional code paths may choose to not
- * operate on offline data.
- **/
-gboolean
-camel_data_wrapper_is_offline (CamelDataWrapper *data_wrapper)
-{
-	return data_wrapper->offline;
-}
diff --git a/camel/camel-data-wrapper.h b/camel/camel-data-wrapper.h
deleted file mode 100644
index d256c5e842..0000000000
--- a/camel/camel-data-wrapper.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-data-wrapper.h : Abstract class for a data wrapper */
-
-/*
- *
- * Author :
- *  Bertrand Guiheneuf 
- *
- * Copyright 1999, 2000 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_DATA_WRAPPER_H
-#define CAMEL_DATA_WRAPPER_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-#include 
-
-#define CAMEL_DATA_WRAPPER_TYPE     (camel_data_wrapper_get_type ())
-#define CAMEL_DATA_WRAPPER(obj)     (CAMEL_CHECK_CAST((obj), CAMEL_DATA_WRAPPER_TYPE, CamelDataWrapper))
-#define CAMEL_DATA_WRAPPER_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_DATA_WRAPPER_TYPE, CamelDataWrapperClass))
-#define CAMEL_IS_DATA_WRAPPER(o)    (CAMEL_CHECK_TYPE((o), CAMEL_DATA_WRAPPER_TYPE))
-
-struct _CamelDataWrapper
-{
-	CamelObject parent_object;
-
-	CamelContentType *mime_type;
-	CamelStream *stream;
-	gboolean offline;
-};
-
-typedef struct {
-	CamelObjectClass parent_class;
-
-	/* Virtual methods */
-	void                (*set_mime_type)          (CamelDataWrapper *data_wrapper,
-						       const gchar * mime_type);
-	gchar *             (*get_mime_type)          (CamelDataWrapper *data_wrapper);
-	CamelContentType *  (*get_mime_type_field)    (CamelDataWrapper *data_wrapper);
-	void                (*set_mime_type_field)    (CamelDataWrapper *data_wrapper,
-						       CamelContentType *mime_type_field);
-
-	int                 (*write_to_stream)        (CamelDataWrapper *data_wrapper,
-						       CamelStream *stream);
-
-	int                 (*construct_from_stream)  (CamelDataWrapper *data_wrapper,
-						       CamelStream *);
-} CamelDataWrapperClass;
-
-/* Standard Camel function */
-CamelType camel_data_wrapper_get_type (void);
-
-/* public methods */
-CamelDataWrapper *  camel_data_wrapper_new(void);
-int                 camel_data_wrapper_write_to_stream          (CamelDataWrapper *data_wrapper,
-								 CamelStream *stream);
-void                camel_data_wrapper_set_mime_type            (CamelDataWrapper *data_wrapper,
-								 const gchar *mime_type);
-gchar *             camel_data_wrapper_get_mime_type            (CamelDataWrapper *data_wrapper);
-CamelContentType *  camel_data_wrapper_get_mime_type_field      (CamelDataWrapper *data_wrapper);
-void                camel_data_wrapper_set_mime_type_field      (CamelDataWrapper *data_wrapper,
-								 CamelContentType *mime_type);
-
-int                 camel_data_wrapper_construct_from_stream    (CamelDataWrapper *data_wrapper, CamelStream *stream);
-
-gboolean            camel_data_wrapper_is_offline               (CamelDataWrapper *data_wrapper);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_DATA_WRAPPER_H */
diff --git a/camel/camel-digest-folder.c b/camel/camel-digest-folder.c
deleted file mode 100644
index 42d238ade4..0000000000
--- a/camel/camel-digest-folder.c
+++ /dev/null
@@ -1,305 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- *  Authors: Jeffrey Stedfast 
- *
- *  Copyright 2001 Ximian, Inc. (www.ximian.com)
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include 
-#endif
-
-#include "camel-digest-folder.h"
-
-#include "camel-exception.h"
-#include "camel-multipart.h"
-#include "camel-mime-message.h"
-#include "camel-folder-summary.h"
-
-#define d(x)
-
-#define _PRIVATE(o) (((CamelDigestFolder *)(o))->priv)
-
-struct _CamelDigestFolderPrivate {
-	CamelMimeMessage *message;
-	GHashTable *info_hash;
-	GPtrArray *summary;
-	GPtrArray *uids;
-};
-
-static CamelFolderClass *parent_class = NULL;
-
-static void digest_refresh_info (CamelFolder *folder, CamelException *ex);
-static void digest_sync (CamelFolder *folder, gboolean expunge, CamelException *ex);
-static const char *digest_get_full_name (CamelFolder *folder);
-static void digest_expunge (CamelFolder *folder, CamelException *ex);
-
-static GPtrArray *digest_get_uids (CamelFolder *folder);
-static void digest_free_uids (CamelFolder *folder, GPtrArray *uids);
-static CamelMessageInfo *digest_get_message_info (CamelFolder *folder, const char *uid);
-
-/* message manipulation */
-static CamelMimeMessage *digest_get_message (CamelFolder *folder, const gchar *uid,
-					   CamelException *ex);
-static void digest_append_message (CamelFolder *folder, CamelMimeMessage *message,
-				 const CamelMessageInfo *info, CamelException *ex);
-static void digest_copy_messages_to (CamelFolder *source, GPtrArray *uids,
-				   CamelFolder *destination, CamelException *ex);
-static void digest_move_messages_to (CamelFolder *source, GPtrArray *uids,
-				   CamelFolder *destination, CamelException *ex);
-
-
-static void
-camel_digest_folder_class_init (CamelDigestFolderClass *camel_digest_folder_class)
-{
-	CamelFolderClass *camel_folder_class = CAMEL_FOLDER_CLASS (camel_digest_folder_class);
-	
-	parent_class = CAMEL_FOLDER_CLASS (camel_type_get_global_classfuncs (camel_folder_get_type ()));
-	
-	/* virtual method definition */
-	
-	/* virtual method overload */
-	camel_folder_class->refresh_info = digest_refresh_info;
-	camel_folder_class->sync = digest_sync;
-	camel_folder_class->expunge = digest_expunge;
-	camel_folder_class->get_full_name = digest_get_full_name;
-	
-	camel_folder_class->get_uids = digest_get_uids;
-	camel_folder_class->free_uids = digest_free_uids;
-	camel_folder_class->get_message_info = digest_get_message_info;
-	
-	camel_folder_class->get_message = digest_get_message;
-	camel_folder_class->append_message = digest_append_message;
-	camel_folder_class->copy_messages_to = digest_copy_messages_to;
-	camel_folder_class->move_messages_to = digest_move_messages_to;
-}
-
-static void
-camel_digest_folder_init (gpointer object, gpointer klass)
-{
-	CamelDigestFolder *digest_folder = CAMEL_DIGEST_FOLDER (object);
-	CamelFolder *folder = CAMEL_FOLDER (object);
-	
-	folder->has_summary_capability = TRUE;
-	folder->has_search_capability = FALSE;
-	
-	digest_folder->priv = g_new0 (struct _CamelDigestFolderPrivate, 1);
-	digest_folder->priv->info_hash = g_hash_table_new (g_str_hash, g_str_equal);
-}
-
-static void           
-digest_finalize (CamelObject *object)
-{
-	CamelDigestFolder *digest_folder = CAMEL_DIGEST_FOLDER (object);
-	GPtrArray *summary;
-	
-	camel_object_unref (CAMEL_OBJECT (digest_folder->priv->message));
-	
-	g_hash_table_destroy (digest_folder->priv->info_hash);
-	
-	summary = digest_folder->priv->summary;
-	if (summary) {
-		int i;
-		
-		for (i = 0; i < summary->len; i++)
-			camel_message_info_free (summary->pdata[i]);
-		
-		g_ptr_array_free (summary, TRUE);
-	}
-	
-	if (digest_folder->priv->uids)
-		g_ptr_array_free (digest_folder->priv->uids, TRUE);
-	
-	g_free (digest_folder->priv);
-}
-
-CamelType
-camel_digest_folder_get_type (void)
-{
-	static CamelType type = CAMEL_INVALID_TYPE;
-	
-	if (type == CAMEL_INVALID_TYPE) {
-		type = camel_type_register (CAMEL_FOLDER_TYPE,
-					    "CamelDigestFolder",
-					    sizeof (CamelDigestFolder),
-					    sizeof (CamelDigestFolderClass),
-					    (CamelObjectClassInitFunc) camel_digest_folder_class_init,
-					    NULL,
-					    (CamelObjectInitFunc) camel_digest_folder_init,
-					    (CamelObjectFinalizeFunc) digest_finalize);
-	}
-	
-	return type;
-}
-
-CamelFolder *
-camel_digest_folder_new (CamelMimeMessage *message)
-{
-	CamelDigestFolder *digest_folder;
-	CamelDataWrapper *wrapper;
-	CamelFolder *folder;
-	
-	wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (message));
-	if (!wrapper || !CAMEL_IS_MULTIPART (wrapper))
-		return NULL;
-	
-	if (!header_content_type_is (CAMEL_MIME_PART (message)->content_type, "multipart", "digest")) {
-		int i, parts;
-		
-		/* Make sure we have a multipart of message/rfc822 attachments... */
-		parts = camel_multipart_get_number (CAMEL_MULTIPART (wrapper));
-		for (i = 0; i < parts; i++) {
-			CamelMimePart *part = camel_multipart_get_part (CAMEL_MULTIPART (wrapper), i);
-			
-			if (!header_content_type_is (part->content_type, "message", "rfc822"))
-				return NULL;
-		}
-	}
-	
-	folder = CAMEL_FOLDER (camel_object_new (camel_digest_folder_get_type ()));
-	digest_folder = CAMEL_DIGEST_FOLDER (folder);
-	
-	camel_folder_construct (folder, NULL, "folder_name", "short_name");
-	
-	camel_object_ref (CAMEL_OBJECT (message));
-	digest_folder->priv->message = message;
-	
-	return folder;
-}
-
-static void
-digest_refresh_info (CamelFolder *folder, CamelException *ex)
-{
-	
-}
-
-static void
-digest_sync (CamelFolder *folder, gboolean expunge, CamelException *ex)
-{
-	
-}
-
-static void
-digest_expunge (CamelFolder *folder, CamelException *ex)
-{
-	
-}
-
-static GPtrArray *
-digest_get_uids (CamelFolder *folder)
-{
-	CamelDigestFolder *digest_folder = CAMEL_DIGEST_FOLDER (folder);
-	CamelDataWrapper *wrapper;
-	GHashTable *info_hash;
-	GPtrArray *summary;
-	GPtrArray *uids;
-	int parts, i;
-	
-	if (digest_folder->priv->uids)
-		return digest_folder->priv->uids;
-	
-	uids = g_ptr_array_new ();
-	summary = g_ptr_array_new ();
-	info_hash = digest_folder->priv->info_hash;
-	
-	wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (digest_folder->priv->message));
-	parts = camel_multipart_get_number (CAMEL_MULTIPART (wrapper));
-	for (i = 0; i < parts; i++) {
-		CamelMimeMessage *message;
-		CamelMessageInfo *info;
-		CamelMimePart *part;
-		char *uid;
-		
-		uid = g_strdup_printf ("%d", i + 1);
-		
-		part = camel_multipart_get_part (CAMEL_MULTIPART (wrapper), i);
-		message = CAMEL_MIME_MESSAGE (part);
-		
-		info = camel_message_info_new_from_header (CAMEL_MIME_PART (message)->headers);
-		camel_message_info_set_uid (info, uid);
-		
-		g_ptr_array_add (uids, uid);
-		g_ptr_array_add (summary, info);
-		g_hash_table_insert (info_hash, uid, info);
-	}
-	
-	digest_folder->priv->uids = uids;
-	digest_folder->priv->summary = summary;
-	
-	return uids;
-}
-
-static void
-digest_free_uids (CamelFolder *folder, GPtrArray *uids)
-{
-	/* no-op */
-}
-
-static CamelMessageInfo *
-digest_get_message_info (CamelFolder *folder, const char *uid)
-{
-	CamelDigestFolder *digest = CAMEL_DIGEST_FOLDER (folder);
-	
-	return g_hash_table_lookup (digest->priv->info_hash, uid);
-}
-
-static const char *
-digest_get_full_name (CamelFolder *folder)
-{
-	return folder->full_name;
-}
-
-static void
-digest_append_message (CamelFolder *folder, CamelMimeMessage *message,
-		       const CamelMessageInfo *info, CamelException *ex)
-{
-	/* no-op */
-}
-
-static void
-digest_copy_messages_to (CamelFolder *source, GPtrArray *uids,
-		       CamelFolder *destination, CamelException *ex)
-{
-	/* no-op */
-}
-
-static void
-digest_move_messages_to (CamelFolder *source, GPtrArray *uids,
-			 CamelFolder *destination, CamelException *ex)
-{
-	/* no-op */
-}
-
-static CamelMimeMessage *
-digest_get_message (CamelFolder *folder, const char *uid, CamelException *ex)
-{
-	CamelDigestFolder *digest = CAMEL_DIGEST_FOLDER (folder);
-	CamelDataWrapper *wrapper;
-	CamelMimeMessage *message;
-	CamelMimePart *part;
-	int id;
-	
-	id = atoi (uid) - 1;
-	
-	wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (digest->priv->message));
-	part = camel_multipart_get_part (CAMEL_MULTIPART (wrapper), id);
-	message = CAMEL_MIME_MESSAGE (part);
-	camel_object_ref (CAMEL_OBJECT (message));
-	
-	return message;
-}
diff --git a/camel/camel-digest-folder.h b/camel/camel-digest-folder.h
deleted file mode 100644
index 792182a653..0000000000
--- a/camel/camel-digest-folder.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- *  Authors: Jeffrey Stedfast 
- *
- *  Copyright 2001 Ximian, Inc. (www.ximian.com)
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
- *
- */
-
-#ifndef _CAMEL_DIGEST_FOLDER_H
-#define _CAMEL_DIGEST_FOLDER_H
-
-#include 
-#include 
-#include 
-
-#define CAMEL_DIGEST_FOLDER(obj)         CAMEL_CHECK_CAST (obj, camel_digest_folder_get_type (), CamelDigestFolder)
-#define CAMEL_DIGEST_FOLDER_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_digest_folder_get_type (), CamelDigestFolderClass)
-#define CAMEL_IS_DIGEST_FOLDER(obj)      CAMEL_CHECK_TYPE (obj, camel_digest_folder_get_type ())
-
-typedef struct _CamelDigestFolder      CamelDigestFolder;
-typedef struct _CamelDigestFolderClass CamelDigestFolderClass;
-
-struct _CamelDigestFolder {
-	CamelFolder parent;
-	
-	struct _CamelDigestFolderPrivate *priv;
-};
-
-struct _CamelDigestFolderClass {
-	CamelFolderClass parent_class;
-	
-};
-
-CamelType    camel_digest_folder_get_type (void);
-
-CamelFolder *camel_digest_folder_new      (CamelMimeMessage *message);
-
-#endif /* ! _CAMEL_DIGEST_FOLDER_H */
diff --git a/camel/camel-disco-diary.c b/camel/camel-disco-diary.c
deleted file mode 100644
index 66063e8a78..0000000000
--- a/camel/camel-disco-diary.c
+++ /dev/null
@@ -1,417 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-disco-diary.c: class for a disconnected operation log */
-
-/* 
- * Authors: Dan Winship 
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#ifdef HAVE_CONFIG_H
-#include 
-#endif
-
-#include "camel-disco-diary.h"
-#include "camel-disco-folder.h"
-#include "camel-disco-store.h"
-#include "camel-exception.h"
-#include "camel-file-utils.h"
-#include "camel-folder.h"
-#include "camel-operation.h"
-#include "camel-session.h"
-#include "camel-store.h"
-
-#include 
-
-
-static void
-camel_disco_diary_class_init (CamelDiscoDiaryClass *camel_disco_diary_class)
-{
-	/* virtual method definition */
-}
-
-static void
-camel_disco_diary_init (CamelDiscoDiary *diary)
-{
-	diary->folders = g_hash_table_new (g_str_hash, g_str_equal);
-	diary->uidmap = g_hash_table_new (g_str_hash, g_str_equal);
-}
-
-static void
-unref_folder (gpointer key, gpointer value, gpointer data)
-{
-	camel_object_unref (value);
-}
-
-static void
-free_uid (gpointer key, gpointer value, gpointer data)
-{
-	g_free (key);
-	g_free (value);
-}
-
-static void
-camel_disco_diary_finalize (CamelDiscoDiary *diary)
-{
-	if (diary->file)
-		fclose (diary->file);
-	if (diary->folders) {
-		g_hash_table_foreach (diary->folders, unref_folder, NULL);
-		g_hash_table_destroy (diary->folders);
-	}
-	if (diary->uidmap) {
-		g_hash_table_foreach (diary->uidmap, free_uid, NULL);
-		g_hash_table_destroy (diary->uidmap);
-	}
-}
-
-CamelType
-camel_disco_diary_get_type (void)
-{
-	static CamelType camel_disco_diary_type = CAMEL_INVALID_TYPE;
-
-	if (camel_disco_diary_type == CAMEL_INVALID_TYPE) {
-		camel_disco_diary_type = camel_type_register (
-			CAMEL_OBJECT_TYPE, "CamelDiscoDiary",
-			sizeof (CamelDiscoDiary),
-			sizeof (CamelDiscoDiaryClass),
-			(CamelObjectClassInitFunc) camel_disco_diary_class_init,
-			NULL,
-			(CamelObjectInitFunc) camel_disco_diary_init,
-			(CamelObjectFinalizeFunc) camel_disco_diary_finalize);
-	}
-
-	return camel_disco_diary_type;
-}
-
-
-static int
-diary_encode_uids (CamelDiscoDiary *diary, GPtrArray *uids)
-{
-	int i, status;
-
-	status = camel_file_util_encode_uint32 (diary->file, uids->len);
-	for (i = 0; status != -1 && i < uids->len; i++)
-		status = camel_file_util_encode_string (diary->file, uids->pdata[i]);
-	return status;
-}
-
-void
-camel_disco_diary_log (CamelDiscoDiary *diary, CamelDiscoDiaryAction action,
-		       ...)
-{
-	va_list ap;
-	int status;
-
-	/* You may already be a loser. */
-	if (!diary->file)
-		return;
-
-	status = camel_file_util_encode_uint32 (diary->file, action);
-	if (status == -1)
-		goto lose;
-
-	va_start (ap, action);
-	switch (action) {
-	case CAMEL_DISCO_DIARY_FOLDER_EXPUNGE:
-	{
-		CamelFolder *folder = va_arg (ap, CamelFolder *);
-		GPtrArray *uids = va_arg (ap, GPtrArray *);
-
-		status = camel_file_util_encode_string (diary->file, folder->full_name);
-		if (status != -1)
-			status = diary_encode_uids (diary, uids);
-		break;
-	}
-
-	case CAMEL_DISCO_DIARY_FOLDER_APPEND:
-	{
-		CamelFolder *folder = va_arg (ap, CamelFolder *);
-		char *uid = va_arg (ap, char *);
-
-		status = camel_file_util_encode_string (diary->file, folder->full_name);
-		if (status != -1)
-			status = camel_file_util_encode_string (diary->file, uid);
-		break;
-	}
-
-	case CAMEL_DISCO_DIARY_FOLDER_MOVE:
-	case CAMEL_DISCO_DIARY_FOLDER_COPY:
-	{
-		CamelFolder *source = va_arg (ap, CamelFolder *);
-		CamelFolder *destination = va_arg (ap, CamelFolder *);
-		GPtrArray *uids = va_arg (ap, GPtrArray *);
-
-		status = camel_file_util_encode_string (diary->file, source->full_name);
-		if (status == -1)
-			break;
-		status = camel_file_util_encode_string (diary->file, destination->full_name);
-		if (status == -1)
-			break;
-		status = diary_encode_uids (diary, uids);
-		break;
-	}
-
-	default:
-		g_assert_not_reached ();
-		break;
-	}
-
-	va_end (ap);
-
- lose:
-	if (status == -1) {
-		char *msg;
-
-		msg = g_strdup_printf (_("Could not write log entry: %s\n"
-					 "Further operations on this server "
-					 "will not be replayed when you\n"
-					 "reconnect to the network."),
-				       g_strerror (errno));
-		camel_session_alert_user (camel_service_get_session (CAMEL_SERVICE (diary->store)),
-					  CAMEL_SESSION_ALERT_ERROR,
-					  msg, FALSE);
-		g_free (msg);
-
-		fclose (diary->file);
-		diary->file = NULL;
-	}
-}
-
-static void
-free_uids (GPtrArray *array)
-{
-	while (array->len--)
-		g_free (array->pdata[array->len]);
-	g_ptr_array_free (array, TRUE);
-}
-
-static GPtrArray *
-diary_decode_uids (CamelDiscoDiary *diary)
-{
-	GPtrArray *uids;
-	char *uid;
-	guint32 i;
-
-	if (camel_file_util_decode_uint32 (diary->file, &i) == -1)
-		return NULL;
-	uids = g_ptr_array_new ();
-	while (i--) {
-		if (camel_file_util_decode_string (diary->file, &uid) == -1) {
-			free_uids (uids);
-			return NULL;
-		}
-		g_ptr_array_add (uids, uid);
-	}
-
-	return uids;
-}
-
-static CamelFolder *
-diary_decode_folder (CamelDiscoDiary *diary)
-{
-	CamelFolder *folder;
-	char *name;
-
-	if (camel_file_util_decode_string (diary->file, &name) == -1)
-		return NULL;
-	folder = g_hash_table_lookup (diary->folders, name);
-	if (!folder) {
-		CamelException ex;
-		char *msg;
-
-		camel_exception_init (&ex);
-		folder = camel_store_get_folder (CAMEL_STORE (diary->store),
-						 name, 0, &ex);
-		if (folder)
-			g_hash_table_insert (diary->folders, name, folder);
-		else {
-			msg = g_strdup_printf (_("Could not open `%s':\n%s\nChanges made to this folder will not be resynchronized."),
-					       name, camel_exception_get_description (&ex));
-			camel_exception_clear (&ex);
-			camel_session_alert_user (camel_service_get_session (CAMEL_SERVICE (diary->store)),
-						  CAMEL_SESSION_ALERT_WARNING,
-						  msg, FALSE);
-			g_free (msg);
-			g_free (name);
-		}
-	} else
-		g_free (name);
-	return folder;
-}
-
-static void
-close_folder (gpointer name, gpointer folder, gpointer data)
-{
-	g_free (name);
-	camel_folder_sync (folder, FALSE, NULL);
-	camel_object_unref (folder);
-}
-
-void
-camel_disco_diary_replay (CamelDiscoDiary *diary, CamelException *ex)
-{
-	guint32 action;
-	off_t size;
-	double pc;
-
-	fseeko (diary->file, 0, SEEK_END);
-	size = ftello (diary->file);
-	g_return_if_fail (size != 0);
-	rewind (diary->file);
-
-	camel_operation_start (NULL, _("Resynchronizing with server"));
-	while (!camel_exception_is_set (ex)) {
-		pc = ftello (diary->file) / size;
-		camel_operation_progress (NULL, pc * 100);
-
-		if (camel_file_util_decode_uint32 (diary->file, &action) == -1)
-			break;
-		if (action == CAMEL_DISCO_DIARY_END)
-			break;
-
-		switch (action) {
-		case CAMEL_DISCO_DIARY_FOLDER_EXPUNGE:
-		{
-			CamelFolder *folder;
-			GPtrArray *uids;
-
-			folder = diary_decode_folder (diary);
-			uids = diary_decode_uids (diary);
-			if (!uids)
-				goto lose;
-
-			if (folder)
-				camel_disco_folder_expunge_uids (folder, uids, ex);
-			free_uids (uids);
-			break;
-		}
-
-		case CAMEL_DISCO_DIARY_FOLDER_APPEND:
-		{
-			CamelFolder *folder;
-			char *uid;
-			CamelMimeMessage *message;
-			CamelMessageInfo *info;
-
-			folder = diary_decode_folder (diary);
-			if (camel_file_util_decode_string (diary->file, &uid) == -1)
-				goto lose;
-
-			if (!folder) {
-				g_free (uid);
-				continue;
-			}
-
-			message = camel_folder_get_message (folder, uid, NULL);
-			if (!message) {
-				/* The message was appended and then deleted. */
-				g_free (uid);
-				continue;
-			}
-			info = camel_folder_get_message_info (folder, uid);
-
-			camel_folder_append_message (folder, message, info, ex);
-			g_free (uid);
-			camel_folder_free_message_info (folder, info);
-
-			break;
-		}
-
-		case CAMEL_DISCO_DIARY_FOLDER_COPY:
-		case CAMEL_DISCO_DIARY_FOLDER_MOVE:
-		{
-			CamelFolder *source, *destination;
-			GPtrArray *uids;
-
-			source = diary_decode_folder (diary);
-			destination = diary_decode_folder (diary);
-			uids = diary_decode_uids (diary);
-			if (!uids)
-				goto lose;
-
-			if (!source || !destination) {
-				free_uids (uids);
-				continue;
-			}
-
-			if (action == CAMEL_DISCO_DIARY_FOLDER_COPY)
-				camel_folder_copy_messages_to (source, uids, destination, ex);
-			else
-				camel_folder_move_messages_to (source, uids, destination, ex);
-			free_uids (uids);
-			break;
-		}
-
-		}
-	}
-
- lose:
-	camel_operation_end (NULL);
-
-	/* Close folders */
-	g_hash_table_foreach (diary->folders, close_folder, diary);
-	g_hash_table_destroy (diary->folders);
-	diary->folders = NULL;
-
-	/* Truncate the log */
-	ftruncate (fileno (diary->file), 0);
-}
-
-CamelDiscoDiary *
-camel_disco_diary_new (CamelDiscoStore *store, const char *filename, CamelException *ex)
-{
-	CamelDiscoDiary *diary;
-
-	g_return_val_if_fail (CAMEL_IS_DISCO_STORE (store), NULL);
-	g_return_val_if_fail (filename != NULL, NULL);
-
-	diary = CAMEL_DISCO_DIARY (camel_object_new (CAMEL_DISCO_DIARY_TYPE));
-	diary->store = store;
-
-	diary->file = fopen (filename, "a+");
-	if (!diary->file) {
-		camel_object_unref (CAMEL_OBJECT (diary));
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
-				      "Could not open journal file: %s",
-				      g_strerror (errno));
-		return NULL;
-	}
-
-	return diary;
-}
-
-gboolean
-camel_disco_diary_empty  (CamelDiscoDiary *diary)
-{
-	return ftello (diary->file) == 0;
-}
-
-void
-camel_disco_diary_uidmap_add (CamelDiscoDiary *diary, const char *old_uid,
-			      const char *new_uid)
-{
-	g_hash_table_insert (diary->uidmap, g_strdup (old_uid),
-			     g_strdup (new_uid));
-}
-
-const char *
-camel_disco_diary_uidmap_lookup (CamelDiscoDiary *diary, const char *uid)
-{
-	return g_hash_table_lookup (diary->uidmap, uid);
-}
diff --git a/camel/camel-disco-diary.h b/camel/camel-disco-diary.h
deleted file mode 100644
index 8d2e8708e4..0000000000
--- a/camel/camel-disco-diary.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * camel-disco-diary.h: class for logging disconnected operation
- *
- * Authors: Dan Winship 
- *
- * Copyright 2001 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#ifndef CAMEL_DISCO_DIARY_H
-#define CAMEL_DISCO_DIARY_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include "camel-object.h"
-#include 
-#include 
-
-#define CAMEL_DISCO_DIARY_TYPE     (camel_disco_diary_get_type ())
-#define CAMEL_DISCO_DIARY(obj)     (CAMEL_CHECK_CAST((obj), CAMEL_DISCO_DIARY_TYPE, CamelDiscoDiary))
-#define CAMEL_DISCO_DIARY_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_DISCO_DIARY_TYPE, CamelDiscoDiaryClass))
-#define CAMEL_IS_DISCO_DIARY(o)    (CAMEL_CHECK_TYPE((o), CAMEL_DISCO_DIARY_TYPE))
-
-typedef enum {
-	CAMEL_DISCO_DIARY_END = 0,
-
-	CAMEL_DISCO_DIARY_FOLDER_EXPUNGE,
-	CAMEL_DISCO_DIARY_FOLDER_APPEND,
-	CAMEL_DISCO_DIARY_FOLDER_MOVE,
-	CAMEL_DISCO_DIARY_FOLDER_COPY
-} CamelDiscoDiaryAction;
-
-typedef enum {
-	CAMEL_DISCO_DIARY_ARG_NONE = 0,
-
-	CAMEL_DISCO_DIARY_ARG_FOLDER,
-	CAMEL_DISCO_DIARY_ARG_UID,
-	CAMEL_DISCO_DIARY_ARG_UID_LIST
-} CamelDiscoDiaryArgType;
-
-struct _CamelDiscoDiary {
-	CamelObject parent_object;
-
-	CamelDiscoStore *store;
-	FILE *file;
-	GHashTable *folders, *uidmap;
-};
-
-typedef struct {
-	CamelObjectClass parent_class;
-
-} CamelDiscoDiaryClass;
-
-
-/* public methods */
-CamelDiscoDiary *camel_disco_diary_new    (CamelDiscoStore *store,
-					   const char *filename,
-					   CamelException *ex);
-
-gboolean         camel_disco_diary_empty  (CamelDiscoDiary *diary);
-
-void             camel_disco_diary_log    (CamelDiscoDiary *diary,
-					   CamelDiscoDiaryAction action,
-					   ...);
-void             camel_disco_diary_replay (CamelDiscoDiary *diary,
-					   CamelException *ex);
-
-/* Temporary->Permanent UID map stuff */
-void        camel_disco_diary_uidmap_add    (CamelDiscoDiary *diary,
-					     const char *old_uid,
-					     const char *new_uid);
-const char *camel_disco_diary_uidmap_lookup (CamelDiscoDiary *diary,
-					     const char *uid);
-
-/* Standard Camel function */
-CamelType camel_disco_diary_get_type (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_DISCO_DIARY_H */
diff --git a/camel/camel-disco-folder.c b/camel/camel-disco-folder.c
deleted file mode 100644
index f3581bce19..0000000000
--- a/camel/camel-disco-folder.c
+++ /dev/null
@@ -1,325 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-disco-folder.c: abstract class for a disconnectable folder */
-
-/* 
- * Authors: Dan Winship 
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#ifdef HAVE_CONFIG_H
-#include 
-#endif
-
-#include "camel-disco-folder.h"
-#include "camel-disco-store.h"
-#include "camel-exception.h"
-
-#define CF_CLASS(o) (CAMEL_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS (o)))
-#define CDF_CLASS(o) (CAMEL_DISCO_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS (o)))
-
-static CamelFolderClass *parent_class = NULL;
-
-static void disco_refresh_info (CamelFolder *folder, CamelException *ex);
-static void disco_sync (CamelFolder *folder, gboolean expunge, CamelException *ex);
-static void disco_expunge (CamelFolder *folder, CamelException *ex);
-
-static void disco_append_message (CamelFolder *folder, CamelMimeMessage *message,
-				  const CamelMessageInfo *info, CamelException *ex);
-static void disco_copy_messages_to (CamelFolder *source, GPtrArray *uids,
-				    CamelFolder *destination, CamelException *ex);
-static void disco_move_messages_to (CamelFolder *source, GPtrArray *uids,
-				    CamelFolder *destination, CamelException *ex);
-
-static void disco_cache_message       (CamelDiscoFolder *disco_folder,
-				       const char *uid, CamelException *ex);
-static void disco_prepare_for_offline (CamelDiscoFolder *disco_folder,
-				       const char *expression,
-				       CamelException *ex);
-
-static void
-camel_disco_folder_class_init (CamelDiscoFolderClass *camel_disco_folder_class)
-{
-	CamelFolderClass *camel_folder_class = CAMEL_FOLDER_CLASS (camel_disco_folder_class);
-
-	parent_class = CAMEL_FOLDER_CLASS (camel_type_get_global_classfuncs (camel_folder_get_type ()));
-
-	/* virtual method definition */
-	camel_disco_folder_class->cache_message = disco_cache_message;
-	camel_disco_folder_class->prepare_for_offline = disco_prepare_for_offline;
-
-	/* virtual method overload */
-	camel_folder_class->refresh_info = disco_refresh_info;
-	camel_folder_class->sync = disco_sync;
-	camel_folder_class->expunge = disco_expunge;
-
-	camel_folder_class->append_message = disco_append_message;
-	camel_folder_class->copy_messages_to = disco_copy_messages_to;
-	camel_folder_class->move_messages_to = disco_move_messages_to;
-}
-
-CamelType
-camel_disco_folder_get_type (void)
-{
-	static CamelType camel_disco_folder_type = CAMEL_INVALID_TYPE;
-
-	if (camel_disco_folder_type == CAMEL_INVALID_TYPE) {
-		camel_disco_folder_type = camel_type_register (
-			CAMEL_FOLDER_TYPE, "CamelDiscoFolder",
-			sizeof (CamelDiscoFolder),
-			sizeof (CamelDiscoFolderClass),
-			(CamelObjectClassInitFunc) camel_disco_folder_class_init,
-			NULL, NULL, NULL);
-	}
-
-	return camel_disco_folder_type;
-}
-
-
-static void
-disco_refresh_info (CamelFolder *folder, CamelException *ex)
-{
-	if (camel_disco_store_status (CAMEL_DISCO_STORE (folder->parent_store)) != CAMEL_DISCO_STORE_ONLINE)
-		return;
-	CDF_CLASS (folder)->refresh_info_online (folder, ex);
-}
-
-static void
-disco_sync (CamelFolder *folder, gboolean expunge, CamelException *ex)
-{
-	if (expunge) {
-		disco_expunge (folder, ex);
-		if (camel_exception_is_set (ex))
-			return;
-	}
-
-	switch (camel_disco_store_status (CAMEL_DISCO_STORE (folder->parent_store))) {
-	case CAMEL_DISCO_STORE_ONLINE:
-		CDF_CLASS (folder)->sync_online (folder, ex);
-		break;
-
-	case CAMEL_DISCO_STORE_OFFLINE:
-		CDF_CLASS (folder)->sync_offline (folder, ex);
-		break;
-
-	case CAMEL_DISCO_STORE_RESYNCING:
-		CDF_CLASS (folder)->sync_resyncing (folder, ex);
-		break;
-	}
-}
-
-static void
-disco_expunge_uids (CamelFolder *folder, GPtrArray *uids, CamelException *ex)
-{
-	CamelDiscoStore *disco = CAMEL_DISCO_STORE (folder->parent_store);
-
-	if (uids->len == 0)
-		return;
-
-	switch (camel_disco_store_status (disco)) {
-	case CAMEL_DISCO_STORE_ONLINE:
-		CDF_CLASS (folder)->expunge_uids_online (folder, uids, ex);
-		break;
-
-	case CAMEL_DISCO_STORE_OFFLINE:
-		CDF_CLASS (folder)->expunge_uids_offline (folder, uids, ex);
-		break;
-
-	case CAMEL_DISCO_STORE_RESYNCING:
-		CDF_CLASS (folder)->expunge_uids_resyncing (folder, uids, ex);
-		break;
-	}
-}
-
-static void
-disco_expunge (CamelFolder *folder, CamelException *ex)
-{
-	GPtrArray *uids;
-	int i, count;
-	CamelMessageInfo *info;
-
-	uids = g_ptr_array_new ();
-	count = camel_folder_summary_count (folder->summary);
-	for (i = 0; i < count; i++) {
-		info = camel_folder_summary_index (folder->summary, i);
-		if (info->flags & CAMEL_MESSAGE_DELETED)
-			g_ptr_array_add (uids, g_strdup (camel_message_info_uid (info)));
-		camel_folder_summary_info_free (folder->summary, info);
-	}
-
-	disco_expunge_uids (folder, uids, ex);
-
-	for (i = 0; i < uids->len; i++)
-		g_free (uids->pdata[i]);
-	g_ptr_array_free (uids, TRUE);
-}
-
-static void
-disco_append_message (CamelFolder *folder, CamelMimeMessage *message,
-		      const CamelMessageInfo *info, CamelException *ex)
-{
-	CamelDiscoStore *disco = CAMEL_DISCO_STORE (folder->parent_store);
-
-	switch (camel_disco_store_status (disco)) {
-	case CAMEL_DISCO_STORE_ONLINE:
-		CDF_CLASS (folder)->append_online (folder, message, info, ex);
-		break;
-
-	case CAMEL_DISCO_STORE_OFFLINE:
-		CDF_CLASS (folder)->append_offline (folder, message, info, ex);
-		break;
-
-	case CAMEL_DISCO_STORE_RESYNCING:
-		CDF_CLASS (folder)->append_resyncing (folder, message, info, ex);
-		break;
-	}
-}
-
-static void
-disco_copy_messages_to (CamelFolder *source, GPtrArray *uids,
-			CamelFolder *destination, CamelException *ex)
-{
-	CamelDiscoStore *disco = CAMEL_DISCO_STORE (source->parent_store);
-
-	switch (camel_disco_store_status (disco)) {
-	case CAMEL_DISCO_STORE_ONLINE:
-		CDF_CLASS (source)->copy_online (source, uids, destination, ex);
-		break;
-
-	case CAMEL_DISCO_STORE_OFFLINE:
-		CDF_CLASS (source)->copy_offline (source, uids, destination, ex);
-		break;
-
-	case CAMEL_DISCO_STORE_RESYNCING:
-		CDF_CLASS (source)->copy_resyncing (source, uids, destination, ex);
-		break;
-	}
-}
-
-static void
-disco_move_messages_to (CamelFolder *source, GPtrArray *uids,
-			CamelFolder *destination, CamelException *ex)
-{
-	CamelDiscoStore *disco = CAMEL_DISCO_STORE (source->parent_store);
-
-	switch (camel_disco_store_status (disco)) {
-	case CAMEL_DISCO_STORE_ONLINE:
-		CDF_CLASS (source)->move_online (source, uids, destination, ex);
-		break;
-
-	case CAMEL_DISCO_STORE_OFFLINE:
-		CDF_CLASS (source)->move_offline (source, uids, destination, ex);
-		break;
-
-	case CAMEL_DISCO_STORE_RESYNCING:
-		CDF_CLASS (source)->move_resyncing (source, uids, destination, ex);
-		break;
-	}
-}
-
-
-/**
- * camel_disco_folder_expunge_uids:
- * @folder: a (disconnectable) folder
- * @uids: array of UIDs to expunge
- * @ex: a CamelException
- *
- * This expunges the messages in @uids from @folder. It should take
- * whatever steps are needed to avoid expunging any other messages,
- * although in some cases it may not be possible to avoid expunging
- * messages that are marked deleted by another client at the same time
- * as the expunge_uids call is running.
- **/
-void
-camel_disco_folder_expunge_uids (CamelFolder *folder, GPtrArray *uids,
-				 CamelException *ex)
-{
-	disco_expunge_uids (folder, uids, ex);
-}
-
-
-static void
-disco_cache_message (CamelDiscoFolder *disco_folder, const char *uid,
-		     CamelException *ex)
-{
-	g_warning ("CamelDiscoFolder::cache_message not implemented for `%s'",
-		   camel_type_to_name (CAMEL_OBJECT_GET_TYPE (disco_folder)));
-}
-
-/**
- * camel_disco_folder_cache_message:
- * @disco_folder: the folder
- * @uid: the UID of the message to cache
- * @ex: a CamelException
- *
- * Requests that @disco_folder cache message @uid to disk.
- **/
-void
-camel_disco_folder_cache_message (CamelDiscoFolder *disco_folder,
-				  const char *uid, CamelException *ex)
-{
-	CDF_CLASS (disco_folder)->cache_message (disco_folder, uid, ex);
-}
-
-
-static void
-disco_prepare_for_offline (CamelDiscoFolder *disco_folder,
-			   const char *expression,
-			   CamelException *ex)
-{
-	CamelFolder *folder = CAMEL_FOLDER (disco_folder);
-	GPtrArray *uids;
-	int i;
-
-	if (expression)
-		uids = camel_folder_search_by_expression (folder, expression, ex);
-	else
-		uids = camel_folder_get_uids (folder);
-	if (!uids)
-		return;
-	for (i = 0; i < uids->len; i++) {
-		camel_disco_folder_cache_message (disco_folder, uids->pdata[i], ex);
-		if (camel_exception_is_set (ex))
-			break;
-	}
-	if (expression)
-		camel_folder_search_free (folder, uids);
-	else
-		camel_folder_free_uids (folder, uids);
-}
-
-/**
- * camel_disco_folder_prepare_for_offline:
- * @disco_folder: the folder
- * @expression: an expression describing messages to synchronize, or %NULL
- * if all messages should be sync'ed.
- * @ex: a CamelException
- *
- * This prepares @disco_folder for offline operation, by downloading
- * the bodies of all messages described by @expression (using the
- * same syntax as camel_folder_search_by_expression() ).
- **/
-void 
-camel_disco_folder_prepare_for_offline (CamelDiscoFolder *disco_folder,
-					const char *expression,
-					CamelException *ex)
-{
-	g_return_if_fail (CAMEL_IS_DISCO_FOLDER (disco_folder));
-
-	CDF_CLASS (disco_folder)->prepare_for_offline (disco_folder, expression, ex);
-}
diff --git a/camel/camel-disco-folder.h b/camel/camel-disco-folder.h
deleted file mode 100644
index 7b0186ffc3..0000000000
--- a/camel/camel-disco-folder.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * camel-disco-folder.h: Abstract class for a disconnectable folder
- *
- * Authors: Dan Winship 
- *
- * Copyright 2001 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#ifndef CAMEL_DISCO_FOLDER_H
-#define CAMEL_DISCO_FOLDER_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include "camel-folder.h"
-
-#define CAMEL_DISCO_FOLDER_TYPE     (camel_disco_folder_get_type ())
-#define CAMEL_DISCO_FOLDER(obj)     (CAMEL_CHECK_CAST((obj), CAMEL_DISCO_FOLDER_TYPE, CamelDiscoFolder))
-#define CAMEL_DISCO_FOLDER_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_DISCO_FOLDER_TYPE, CamelDiscoFolderClass))
-#define CAMEL_IS_DISCO_FOLDER(o)    (CAMEL_CHECK_TYPE((o), CAMEL_DISCO_FOLDER_TYPE))
-
-struct _CamelDiscoFolder {
-	CamelFolder parent_object;
-
-};
-
-typedef struct {
-	CamelFolderClass parent_class;
-
-	void (*refresh_info_online) (CamelFolder *folder, CamelException *ex);
-
-	void (*sync_online)    (CamelFolder *folder, CamelException *ex);
-	void (*sync_offline)   (CamelFolder *folder, CamelException *ex);
-	void (*sync_resyncing) (CamelFolder *folder, CamelException *ex);
-
-	void (*expunge_uids_online)    (CamelFolder *folder, GPtrArray *uids,
-					CamelException *ex);
-	void (*expunge_uids_offline)   (CamelFolder *folder, GPtrArray *uids,
-					CamelException *ex);
-	void (*expunge_uids_resyncing) (CamelFolder *folder, GPtrArray *uids,
-					CamelException *ex);
-
-	void (*append_online)    (CamelFolder *folder,
-				  CamelMimeMessage *message,
-				  const CamelMessageInfo *info,
-				  CamelException *ex);
-	void (*append_offline)   (CamelFolder *folder,
-				  CamelMimeMessage *message,
-				  const CamelMessageInfo *info,
-				  CamelException *ex);
-	void (*append_resyncing) (CamelFolder *folder,
-				  CamelMimeMessage *message,
-				  const CamelMessageInfo *info,
-				  CamelException *ex);
-
-	void (*copy_online)    (CamelFolder *source, GPtrArray *uids,
-				CamelFolder *destination, CamelException *ex);
-	void (*copy_offline)   (CamelFolder *source, GPtrArray *uids,
-				CamelFolder *destination, CamelException *ex);
-	void (*copy_resyncing) (CamelFolder *source, GPtrArray *uids,
-				CamelFolder *destination, CamelException *ex);
-	
-	void (*move_online)    (CamelFolder *source, GPtrArray *uids,
-				CamelFolder *destination, CamelException *ex);
-	void (*move_offline)   (CamelFolder *source, GPtrArray *uids,
-				CamelFolder *destination, CamelException *ex);
-	void (*move_resyncing) (CamelFolder *source, GPtrArray *uids,
-				CamelFolder *destination, CamelException *ex);
-
-	void (*cache_message)       (CamelDiscoFolder *disco_folder,
-				     const char *uid, CamelException *ex);
-	void (*prepare_for_offline) (CamelDiscoFolder *disco_folder,
-				     const char *expression,
-				     CamelException *ex);
-
-	void (*update_uid) (CamelFolder *folder, const char *old_uid,
-			    const char *new_uid);
-} CamelDiscoFolderClass;
-
-
-/* public methods */
-void camel_disco_folder_expunge_uids (CamelFolder *folder, GPtrArray *uids,
-				      CamelException *ex);
-
-void camel_disco_folder_cache_message       (CamelDiscoFolder *disco_folder,
-					     const char *uid,
-					     CamelException *ex);
-void camel_disco_folder_prepare_for_offline (CamelDiscoFolder *disco_folder,
-					     const char *expression,
-					     CamelException *ex);
-
-/* Standard Camel function */
-CamelType camel_disco_folder_get_type (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_DISCO_FOLDER_H */
diff --git a/camel/camel-disco-store.c b/camel/camel-disco-store.c
deleted file mode 100644
index ebe26a1908..0000000000
--- a/camel/camel-disco-store.c
+++ /dev/null
@@ -1,311 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-disco-store.c: abstract class for a disconnectable remote store */
-
-/*
- *  Authors: Dan Winship 
- *
- *  Copyright 2001 Ximian, Inc.
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include 
-#endif
-
-#include "camel-disco-store.h"
-#include "camel-disco-diary.h"
-#include "camel-exception.h"
-#include "camel-session.h"
-
-#define CDS_CLASS(o) (CAMEL_DISCO_STORE_CLASS (CAMEL_OBJECT_GET_CLASS (o)))
-
-static CamelRemoteStoreClass *remote_store_class = NULL;
-
-static void disco_construct (CamelService *service, CamelSession *session,
-			     CamelProvider *provider, CamelURL *url,
-			     CamelException *ex);
-static gboolean disco_connect (CamelService *service, CamelException *ex);
-static gboolean disco_disconnect (CamelService *service, gboolean clean, CamelException *ex);
-static CamelFolder *disco_get_folder (CamelStore *store, const char *name,
-				      guint32 flags, CamelException *ex);
-static CamelFolderInfo *disco_get_folder_info (CamelStore *store,
-					       const char *top, guint32 flags,
-					       CamelException *ex);
-static void set_status (CamelDiscoStore *disco_store,
-			CamelDiscoStoreStatus status,
-			CamelException *ex);
-static gboolean can_work_offline (CamelDiscoStore *disco_store);
-
-static void
-camel_disco_store_class_init (CamelDiscoStoreClass *camel_disco_store_class)
-{
-	CamelServiceClass *camel_service_class =
-		CAMEL_SERVICE_CLASS (camel_disco_store_class);
-	CamelStoreClass *camel_store_class =
-		CAMEL_STORE_CLASS (camel_disco_store_class);
-
-	remote_store_class = CAMEL_REMOTE_STORE_CLASS (camel_type_get_global_classfuncs (camel_remote_store_get_type ()));
-
-	/* virtual method definition */
-	camel_disco_store_class->set_status = set_status;
-	camel_disco_store_class->can_work_offline = can_work_offline;
-
-	/* virtual method overload */
-	camel_service_class->construct = disco_construct;
-	camel_service_class->connect = disco_connect;
-	camel_service_class->disconnect = disco_disconnect;
-
-	camel_store_class->get_folder = disco_get_folder;
-	camel_store_class->get_folder_info = disco_get_folder_info;
-}
-
-CamelType
-camel_disco_store_get_type (void)
-{
-	static CamelType camel_disco_store_type = CAMEL_INVALID_TYPE;
-
-	if (camel_disco_store_type == CAMEL_INVALID_TYPE) {
-		camel_disco_store_type = camel_type_register (
-			CAMEL_REMOTE_STORE_TYPE, "CamelDiscoStore",
-			sizeof (CamelDiscoStore),
-			sizeof (CamelDiscoStoreClass),
-			(CamelObjectClassInitFunc) camel_disco_store_class_init,
-			NULL,
-			NULL,
-			NULL);
-	}
-
-	return camel_disco_store_type;
-}
-
-static void
-disco_construct (CamelService *service, CamelSession *session,
-		 CamelProvider *provider, CamelURL *url,
-		 CamelException *ex)
-{
-	CamelDiscoStore *disco = CAMEL_DISCO_STORE (service);
-
-	CAMEL_SERVICE_CLASS (remote_store_class)->construct (service, session, provider, url, ex);
-	if (camel_exception_is_set (ex))
-		return;
-
-	disco->status = camel_session_is_online (session) ?
-		CAMEL_DISCO_STORE_ONLINE : CAMEL_DISCO_STORE_OFFLINE;
-}
-
-static gboolean
-disco_connect (CamelService *service, CamelException *ex)
-{
-	CamelDiscoStore *store = CAMEL_DISCO_STORE (service);
-
-	if (!CAMEL_SERVICE_CLASS (remote_store_class)->connect (service, ex))
-		return FALSE;
-
-	switch (camel_disco_store_status (store)) {
-	case CAMEL_DISCO_STORE_ONLINE:
-	case CAMEL_DISCO_STORE_RESYNCING:
-		if (!CDS_CLASS (service)->connect_online (service, ex))
-			return FALSE;
-		if (camel_disco_diary_empty (store->diary))
-			return TRUE;
-
-		/* Need to resync */
-		store->status = CAMEL_DISCO_STORE_RESYNCING;
-		camel_disco_diary_replay (store->diary, ex);
-		store->status = CAMEL_DISCO_STORE_ONLINE;
-		if (camel_exception_is_set (ex))
-			return FALSE;
-
-		if (!camel_service_disconnect (service, TRUE, ex))
-			return FALSE;
-		return camel_service_connect (service, ex);
-
-	case CAMEL_DISCO_STORE_OFFLINE:
-		return CDS_CLASS (service)->connect_offline (service, ex);
-	}
-
-	g_assert_not_reached ();
-	return FALSE;
-}
-
-static gboolean
-disco_disconnect (CamelService *service, gboolean clean, CamelException *ex)
-{
-	CamelDiscoStore *store = CAMEL_DISCO_STORE (service);
-
-	switch (camel_disco_store_status (store)) {
-	case CAMEL_DISCO_STORE_ONLINE:
-	case CAMEL_DISCO_STORE_RESYNCING:
-		if (!CDS_CLASS (service)->disconnect_online (service, clean, ex))
-			return FALSE;
-		break;
-
-	case CAMEL_DISCO_STORE_OFFLINE:
-		if (!CDS_CLASS (service)->disconnect_offline (service, clean, ex))
-			return FALSE;
-		break;
-
-	}
-
-	return CAMEL_SERVICE_CLASS (remote_store_class)->disconnect (service, clean, ex);
-}
-
-static CamelFolder *
-disco_get_folder (CamelStore *store, const char *name,
-		  guint32 flags, CamelException *ex)
-{
-	CamelDiscoStore *disco_store = CAMEL_DISCO_STORE (store);
-
-	switch (camel_disco_store_status (disco_store)) {
-	case CAMEL_DISCO_STORE_ONLINE:
-		return CDS_CLASS (store)->get_folder_online (store, name, flags, ex);
-
-	case CAMEL_DISCO_STORE_OFFLINE:
-		return CDS_CLASS (store)->get_folder_offline (store, name, flags, ex);
-
-	case CAMEL_DISCO_STORE_RESYNCING:
-		return CDS_CLASS (store)->get_folder_resyncing (store, name, flags, ex);	
-	}
-
-	g_assert_not_reached ();
-	return NULL;
-}
-
-static CamelFolderInfo *
-disco_get_folder_info (CamelStore *store, const char *top,
-		       guint32 flags, CamelException *ex)
-{
-	CamelDiscoStore *disco_store = CAMEL_DISCO_STORE (store);
-
-	switch (camel_disco_store_status (disco_store)) {
-	case CAMEL_DISCO_STORE_ONLINE:
-		return CDS_CLASS (store)->get_folder_info_online (store, top, flags, ex);
-
-	case CAMEL_DISCO_STORE_OFFLINE:
-		/* Can't edit subscriptions while offline */
-		if ((store->flags & CAMEL_STORE_SUBSCRIPTIONS) &&
-		    !(flags & CAMEL_STORE_FOLDER_INFO_SUBSCRIBED)) {
-			camel_disco_store_check_online (disco_store, ex);
-			return NULL;
-		}
-
-		return CDS_CLASS (store)->get_folder_info_offline (store, top, flags, ex);
-
-	case CAMEL_DISCO_STORE_RESYNCING:
-		return CDS_CLASS (store)->get_folder_info_resyncing (store, top, flags, ex);
-	}
-
-	g_assert_not_reached ();
-	return NULL;
-}
-
-
-/**
- * camel_disco_store_status:
- * @store: a disconnectable store
- *
- * Return value: the current online/offline status of @store.
- **/
-CamelDiscoStoreStatus
-camel_disco_store_status (CamelDiscoStore *store)
-{
-	g_return_val_if_fail (CAMEL_IS_DISCO_STORE (store), CAMEL_DISCO_STORE_ONLINE);
-
-	return store->status;
-}
-
-
-static void
-set_status (CamelDiscoStore *disco_store, CamelDiscoStoreStatus status,
-	    CamelException *ex)
-{
-	if (disco_store->status == status)
-		return;
-
-	camel_store_sync (CAMEL_STORE (disco_store), ex);
-	if (camel_exception_is_set (ex))
-		return;
-	if (!camel_service_disconnect (CAMEL_SERVICE (disco_store), TRUE, ex))
-		return;
-
-	disco_store->status = status;
-	camel_service_connect (CAMEL_SERVICE (disco_store), ex);
-}
-
-/**
- * camel_disco_store_set_status:
- * @store: a disconnectable store
- * @status: the new status
- * @ex: a CamelException
- *
- * Sets @store to @status. If an error occurrs and the status cannot
- * be set to @status, @ex will be set.
- **/
-void
-camel_disco_store_set_status (CamelDiscoStore *store,
-			      CamelDiscoStoreStatus status,
-			      CamelException *ex)
-{
-	CDS_CLASS (store)->set_status (store, status, ex);
-}
-
-
-static gboolean
-can_work_offline (CamelDiscoStore *disco_store)
-{
-	g_warning ("CamelDiscoStore::can_work_offline not implemented for `%s'",
-		   camel_type_to_name (CAMEL_OBJECT_GET_TYPE (disco_store)));
-	return FALSE;
-}
-
-/**
- * camel_disco_store_can_work_offline:
- * @store: a disconnectable store
- *
- * Return value: whether or not @store can be used offline. (Will be
- * %FALSE if the store is not caching data to local disk, for example.)
- **/
-gboolean
-camel_disco_store_can_work_offline (CamelDiscoStore *store)
-{
-	return CDS_CLASS (store)->can_work_offline (store);
-}
-
-
-/**
- * camel_disco_store_check_online:
- * @store: a disconnectable store
- * @ex: a CamelException
- *
- * This checks that @store is online, and sets @ex if it is not. This
- * can be used as a simple way to set a generic error message in @ex
- * for operations that won't work offline.
- *
- * Return value: whether or not @store is online.
- **/
-gboolean
-camel_disco_store_check_online (CamelDiscoStore *store, CamelException *ex)
-{
-	if (camel_disco_store_status (store) != CAMEL_DISCO_STORE_ONLINE) {
-		camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
-				     _("You must be working online to "
-				       "complete this operation"));
-		return FALSE;
-	}
-
-	return TRUE;
-}
diff --git a/camel/camel-disco-store.h b/camel/camel-disco-store.h
deleted file mode 100644
index 73ba677c34..0000000000
--- a/camel/camel-disco-store.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-disco-store.h: abstruct class for a disconnectable store */
-
-/* 
- * Authors: Dan Winship 
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_DISCO_STORE_H
-#define CAMEL_DISCO_STORE_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include "camel-remote-store.h"
-
-#define CAMEL_DISCO_STORE_TYPE     (camel_disco_store_get_type ())
-#define CAMEL_DISCO_STORE(obj)     (CAMEL_CHECK_CAST((obj), CAMEL_DISCO_STORE_TYPE, CamelDiscoStore))
-#define CAMEL_DISCO_STORE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_DISCO_STORE_TYPE, CamelDiscoStoreClass))
-#define CAMEL_IS_DISCO_STORE(o)    (CAMEL_CHECK_TYPE((o), CAMEL_DISCO_STORE_TYPE))
-
-typedef enum {
-	CAMEL_DISCO_STORE_ONLINE,
-	CAMEL_DISCO_STORE_OFFLINE,
-	CAMEL_DISCO_STORE_RESYNCING
-} CamelDiscoStoreStatus;
-
-struct _CamelDiscoStore {
-	CamelRemoteStore parent_object;	
-
-	CamelDiscoStoreStatus status;
-	CamelDiscoDiary *diary;
-};
-
-
-typedef struct {
-	CamelRemoteStoreClass parent_class;
-
-	void              (*set_status)              (CamelDiscoStore *,
-						      CamelDiscoStoreStatus,
-						      CamelException *);
-	gboolean          (*can_work_offline)        (CamelDiscoStore *);
-
-
-	gboolean          (*connect_online)          (CamelService *,
-						      CamelException *);
-	gboolean          (*connect_offline)         (CamelService *,
-						      CamelException *);
-
-	gboolean          (*disconnect_online)       (CamelService *, gboolean,
-						      CamelException *);
-	gboolean          (*disconnect_offline)      (CamelService *, gboolean,
-						      CamelException *);
-
-	CamelFolder *     (*get_folder_online)       (CamelStore *store,
-						      const char *name,
-						      guint32 flags,
-						      CamelException *ex);
-	CamelFolder *     (*get_folder_offline)      (CamelStore *store,
-						      const char *name,
-						      guint32 flags,
-						      CamelException *ex);
-	CamelFolder *     (*get_folder_resyncing)    (CamelStore *store,
-						      const char *name,
-						      guint32 flags,
-						      CamelException *ex);
-
-	CamelFolderInfo * (*get_folder_info_online)    (CamelStore *store,
-							const char *top,
-							guint32 flags,
-							CamelException *ex);
-	CamelFolderInfo * (*get_folder_info_offline)   (CamelStore *store,
-							const char *top,
-							guint32 flags,
-							CamelException *ex);
-	CamelFolderInfo * (*get_folder_info_resyncing) (CamelStore *store,
-							const char *top,
-							guint32 flags,
-							CamelException *ex);
-
-} CamelDiscoStoreClass;
-
-
-/* Standard Camel function */
-CamelType camel_disco_store_get_type (void);
-
-/* Public methods */
-CamelDiscoStoreStatus camel_disco_store_status           (CamelDiscoStore *);
-void                  camel_disco_store_set_status       (CamelDiscoStore *,
-							  CamelDiscoStoreStatus,
-							  CamelException *);
-gboolean              camel_disco_store_can_work_offline (CamelDiscoStore *);
-
-
-/* Convenience functions */
-gboolean camel_disco_store_check_online (CamelDiscoStore *store, CamelException *ex);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_DISCO_STORE_H */
diff --git a/camel/camel-exception-list.def b/camel/camel-exception-list.def
deleted file mode 100644
index 8fe1e268cf..0000000000
--- a/camel/camel-exception-list.def
+++ /dev/null
@@ -1,37 +0,0 @@
-/* WARNING: Exceptions MUST NOT be renumbered: they need to be
- * consistent across libraries compiled at different times.
- * Categories should be widely separated, old unused exceptions can
- * never be deleted, and new exceptions can be added only to the
- * ends of categories.
- */
-
-CAMEL_EXCEPTION_NONE = 0,
-
-/* Generic exceptions */
-CAMEL_EXCEPTION_INVALID_PARAM,
-CAMEL_EXCEPTION_SYSTEM,
-CAMEL_EXCEPTION_USER_CANCEL,
-
-/* CamelFolderException */
-CAMEL_EXCEPTION_FOLDER_NULL = 100,
-CAMEL_EXCEPTION_FOLDER_INVALID,
-CAMEL_EXCEPTION_FOLDER_INVALID_STATE,
-CAMEL_EXCEPTION_FOLDER_NON_EMPTY,
-CAMEL_EXCEPTION_FOLDER_NON_UID,
-CAMEL_EXCEPTION_FOLDER_INSUFFICIENT_PERMISSION,
-CAMEL_EXCEPTION_FOLDER_INVALID_PATH,
-CAMEL_EXCEPTION_FOLDER_INVALID_UID,
-CAMEL_EXCEPTION_FOLDER_SUMMARY_INVALID,
-
-/* CamelStoreException */
-CAMEL_EXCEPTION_STORE_NULL = 200,
-CAMEL_EXCEPTION_STORE_INVALID,
-CAMEL_EXCEPTION_STORE_NO_FOLDER,
-
-/* CamelServiceException */
-CAMEL_EXCEPTION_SERVICE_NULL = 300,
-CAMEL_EXCEPTION_SERVICE_INVALID,
-CAMEL_EXCEPTION_SERVICE_URL_INVALID,
-CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
-CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
-CAMEL_EXCEPTION_SERVICE_NOT_CONNECTED
diff --git a/camel/camel-exception.c b/camel/camel-exception.c
deleted file mode 100644
index 3ae8d74f77..0000000000
--- a/camel/camel-exception.c
+++ /dev/null
@@ -1,296 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-execpetion.c : exception utils */
-
-/* 
- *
- * Author : 
- *  Bertrand Guiheneuf 
- *
- * Copyright 1999, 2000 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#ifdef HAVE_CONFIG_H
-#include 
-#endif
-
-#include 
-#include "camel-exception.h"
-
-/* i dont know why gthread_mutex stuff even exists, this is easier */
-
-/* also, i'm not convinced mutexes are needed here.  But it
-   doesn't really hurt either */
-#ifdef ENABLE_THREADS
-#include 
-
-static pthread_mutex_t exception_mutex = PTHREAD_MUTEX_INITIALIZER;
-
-#define CAMEL_EXCEPTION_LOCK(e) (pthread_mutex_lock(&exception_mutex))
-#define CAMEL_EXCEPTION_UNLOCK(e) (pthread_mutex_unlock(&exception_mutex))
-#else
-#define CAMEL_EXCEPTION_LOCK(e) 
-#define CAMEL_EXCEPTION_UNLOCK(e) 
-#endif
-
-/**
- * camel_exception_new: allocate a new exception object. 
- * 
- * Create and returns a new exception object.
- * 
- * 
- * Return value: The newly allocated exception object.
- **/
-CamelException *
-camel_exception_new (void)
-{
-	CamelException *ex;
-
-	ex = g_new (CamelException, 1);
-	ex->desc = NULL;
-
-	/* set the Exception Id to NULL */
-	ex->id = CAMEL_EXCEPTION_NONE;
-
-	return ex;
-}
-
-/**
- * camel_exception_init: init a (statically allocated) exception. 
- * 
- * Init an exception. This routine is mainly
- * useful when using a statically allocated
- * exception. 
- * 
- * 
- **/
-void
-camel_exception_init (CamelException *ex)
-{
-	ex->desc = NULL;
-
-	/* set the Exception Id to NULL */
-	ex->id = CAMEL_EXCEPTION_NONE;
-}
-
-
-/**
- * camel_exception_clear: Clear an exception
- * @exception: the exception object
- * 
- * Clear an exception, that is, set the 
- * exception ID to CAMEL_EXCEPTION_NONE and
- * free the description text.
- * If the exception is NULL, this funtion just
- * returns.
- **/
-void 
-camel_exception_clear (CamelException *exception)
-{
-	if (!exception)
-		return;
-
-	CAMEL_EXCEPTION_LOCK(exception);
-
-	if (exception->desc)
-		g_free (exception->desc);
-	exception->desc = NULL;
-	exception->id = CAMEL_EXCEPTION_NONE;
-
-	CAMEL_EXCEPTION_UNLOCK(exception);
-}
-
-/**
- * camel_exception_free: Free an exception 
- * @exception: The exception object to free
- * 
- * Free an exception object. If the exception
- * is NULL, nothing is done, the routine simply
- * returns.
- **/
-void 
-camel_exception_free (CamelException *exception)
-{
-	if (!exception)
-		return;
-	
-	if (exception->desc)
-		g_free (exception->desc);
-	g_free (exception);
-}
-
-/**
- * camel_exception_set: set an exception 
- * @ex: exception object 
- * @id: exception id 
- * @desc: textual description of the exception
- * 
- * Set the value of an exception. The exception id is 
- * a unique number representing the exception. The 
- * textual description is a small text explaining 
- * what happened and provoked the exception.
- *
- * When @ex is NULL, nothing is done, this routine
- * simply returns.
- *
- **/
-void
-camel_exception_set (CamelException *ex,
-		     ExceptionId id,
-		     const char *desc)
-{
-	if (!ex)
-		return;
-
-	CAMEL_EXCEPTION_LOCK(exception);
-
-	ex->id = id;
-
-	if (ex->desc)
-		g_free(ex->desc);
-	ex->desc = g_strdup(desc);
-
-	CAMEL_EXCEPTION_UNLOCK(exception);
-}
-
-/**
- * camel_exception_setv: set an exception 
- * @ex: exception object 
- * @id: exception id 
- * @format: format of the description string. The format string is
- * used as in printf().
- * 
- * Set the value of an exception. The exception id is 
- * a unique number representing the exception. The 
- * textual description is a small text explaining 
- * what happened and provoked the exception. 
- * In this version, the string is created from the format 
- * string and the variable argument list.
- *
- * It is safe to say:
- *   camel_exception_setv (ex, ..., camel_exception_get_description (ex), ...);
- *
- * When @ex is NULL, nothing is done, this routine
- * simply returns.
- *
- **/
-void
-camel_exception_setv (CamelException *ex,
-		      ExceptionId id,
-		      const char *format, 
-		      ...)
-{
-	va_list args;
-	
-	if (!ex)
-		return;
-
-	CAMEL_EXCEPTION_LOCK(exception);
-	
-	if (ex->desc)
-		g_free (ex->desc);
-	
-	va_start(args, format);
-	ex->desc = g_strdup_vprintf (format, args);
-	va_end (args);
-
-	ex->id = id;
-
-	CAMEL_EXCEPTION_UNLOCK(exception);
-}
-
-/**
- * camel_exception_xfer: transfer an exception
- * @ex_dst: Destination exception object 
- * @ex_src: Source exception object
- * 
- * Transfer the content of an exception from
- * an exception object to another. 
- * The destination exception receives the id and
- * the description text of the source exception. 
- **/
-void 
-camel_exception_xfer (CamelException *ex_dst,
-		      CamelException *ex_src)
-{
-	if (ex_src == NULL) {
-		g_warning ("camel_exception_xfer: trying to transfer NULL exception to %p\n", ex_dst);
-		return;
-	}
-
-	if (ex_dst == NULL) {
-		/* must have same side-effects */
-		camel_exception_clear (ex_src);
-		return;
-	}
-
-	CAMEL_EXCEPTION_LOCK(exception);
-
-	if (ex_dst->desc)
-		g_free (ex_dst->desc);
-
-	ex_dst->id = ex_src->id;
-	ex_dst->desc = ex_src->desc;
-
-	ex_src->desc = NULL;
-	ex_src->id = CAMEL_EXCEPTION_NONE;
-
-	CAMEL_EXCEPTION_UNLOCK(exception);
-}
-
-/**
- * camel_exception_get_id: get the exception id
- * @ex: The exception object
- * 
- * Return the id of an exception. 
- * If @ex is NULL, return CAMEL_EXCEPTION_NONE;
- * 
- * Return value: Exception ID.
- **/
-ExceptionId
-camel_exception_get_id (CamelException *ex)
-{
-	if (ex)
-		return ex->id;
-	else {
-		g_warning ("camel_exception_get_id called with NULL parameter.");
-		return CAMEL_EXCEPTION_NONE;
-	}
-}
-
-/**
- * camel_exception_get_description: get the description of an exception.
- * @ex: The exception object
- * 
- * Return the exception description text. 
- * If @ex is NULL, return NULL;
- * 
- * 
- * Return value: Exception description text.
- **/
-const gchar *
-camel_exception_get_description (CamelException *ex)
-{
-	char *ret = NULL;
-
-	if (ex)
-		ret = ex->desc;
-	else
-		g_warning ("camel_exception_get_description called with NULL parameter.");
-		
-	return ret;
-}
diff --git a/camel/camel-exception.h b/camel/camel-exception.h
deleted file mode 100644
index 5ee23444da..0000000000
--- a/camel/camel-exception.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-execpetion.h : exception utils */
-
-/* 
- *
- * Author : 
- *  Bertrand Guiheneuf 
- *
- * Copyright 1999, 2000 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-
-#ifndef CAMEL_EXCEPTION_H
-#define CAMEL_EXCEPTION_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-
-typedef enum {
-#include "camel-exception-list.def"
-
-} ExceptionId;
-
-
-struct _CamelException {
-	/* do not access the fields directly */
-	ExceptionId id;
-	char *desc;
-
-};
-
-
-
-/* creation and destruction functions */
-CamelException *          camel_exception_new           (void);
-void                      camel_exception_free          (CamelException *exception);
-void                      camel_exception_init          (CamelException *ex);
-
-
-/* exception content manipulation */
-void                      camel_exception_clear         (CamelException *exception);
-void                      camel_exception_set           (CamelException *ex,
-							 ExceptionId id,
-							 const char *desc);
-void                      camel_exception_setv          (CamelException *ex,
-							 ExceptionId id,
-							 const char *format,  
-							 ...);
-
-
-/* exception content transfer */
-void                      camel_exception_xfer          (CamelException *ex_dst,
-							 CamelException *ex_src);
-
-
-/* exception content retrieval */
-ExceptionId               camel_exception_get_id        (CamelException *ex);
-const char *             camel_exception_get_description (CamelException *ex);
-
-#define camel_exception_is_set(ex) (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE)
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_EXCEPTION_H */
-
diff --git a/camel/camel-file-utils.c b/camel/camel-file-utils.c
deleted file mode 100644
index 1b0fe65dbb..0000000000
--- a/camel/camel-file-utils.c
+++ /dev/null
@@ -1,283 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/* 
- * Authors:
- *   Michael Zucchi 
- *   Dan Winship 
- *
- * Copyright (C) 2000, 2001 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#include "camel-file-utils.h"
-
-#include 
-
-/**
- * camel_file_util_encode_uint32:
- * @out: file to output to
- * @value: value to output
- * 
- * Utility function to save an uint32 to a file.
- * 
- * Return value: 0 on success, -1 on error.
- **/
-int
-camel_file_util_encode_uint32 (FILE *out, guint32 value)
-{
-	int i;
-
-	for (i = 28; i > 0; i -= 7) {
-		if (value >= (1 << i)) {
-			unsigned int c = (value >> i) & 0x7f;
-			if (fputc (c, out) == -1)
-				return -1;
-		}
-	}
-	return fputc (value | 0x80, out);
-}
-
-/**
- * camel_file_util_decode_uint32:
- * @in: file to read from
- * @dest: pointer to a variable to store the value in
- * 
- * Retrieve an encoded uint32 from a file.
- * 
- * Return value: 0 on success, -1 on error.  @*dest will contain the
- * decoded value.
- **/
-int
-camel_file_util_decode_uint32 (FILE *in, guint32 *dest)
-{
-        guint32 value = 0;
-	int v;
-
-        /* until we get the last byte, keep decoding 7 bits at a time */
-        while ( ((v = fgetc (in)) & 0x80) == 0 && v!=EOF) {
-                value |= v;
-                value <<= 7;
-        }
-	if (v == EOF) {
-		*dest = value >> 7;
-		return -1;
-	}
-	*dest = value | (v & 0x7f);
-
-        return 0;
-}
-
-/**
- * camel_file_util_encode_fixed_int32:
- * @out: file to output to
- * @value: value to output
- * 
- * Encode a gint32, performing no compression, but converting
- * to network order.
- * 
- * Return value: 0 on success, -1 on error.
- **/
-int
-camel_file_util_encode_fixed_int32 (FILE *out, gint32 value)
-{
-	guint32 save;
-
-	save = htonl (value);
-	if (fwrite (&save, sizeof (save), 1, out) != 1)
-		return -1;
-	return 0;
-}
-
-/**
- * camel_file_util_decode_fixed_int32:
- * @in: file to read from
- * @dest: pointer to a variable to store the value in
- * 
- * Retrieve a gint32.
- * 
- * Return value: 0 on success, -1 on error.
- **/
-int
-camel_file_util_decode_fixed_int32 (FILE *in, gint32 *dest)
-{
-	guint32 save;
-
-	if (fread (&save, sizeof (save), 1, in) == 1) {
-		*dest = ntohl (save);
-		return 0;
-	} else {
-		return -1;
-	}
-}
-
-/**
- * camel_file_util_encode_time_t:
- * @out: file to output to
- * @value: value to output
- * 
- * Encode a time_t value to the file.
- * 
- * Return value: 0 on success, -1 on error.
- **/
-int
-camel_file_util_encode_time_t(FILE *out, time_t value)
-{
-	int i;
-
-	for (i = sizeof (time_t) - 1; i >= 0; i--) {
-		if (fputc((value >> (i * 8)) & 0xff, out) == -1)
-			return -1;
-	}
-	return 0;
-}
-
-/**
- * camel_file_util_decode_time_t:
- * @in: file to read from
- * @dest: pointer to a variable to store the value in
- * 
- * Decode a time_t value.
- * 
- * Return value: 0 on success, -1 on error.
- **/
-int
-camel_file_util_decode_time_t (FILE *in, time_t *dest)
-{
-	time_t save = 0;
-	int v, i = sizeof (time_t) - 1;
-
-        while (i >= 0 && (v = fgetc (in)) != EOF) {
-		save |= ((time_t)v) << (i * 8);
-		i--;
-	}
-	*dest = save;
-	if (v == EOF)
-		return -1;
-	return 0;
-}
-
-/**
- * camel_file_util_encode_off_t:
- * @out: file to output to
- * @value: value to output
- * 
- * Encode an off_t type.
- * 
- * Return value: 0 on success, -1 on error.
- **/
-int
-camel_file_util_encode_off_t (FILE *out, off_t value)
-{
-	int i;
-
-	for (i = sizeof (off_t) - 1; i >= 0; i--) {
-		if (fputc ((value >> (i * 8)) & 0xff, out) == -1)
-			return -1;
-	}
-	return 0;
-}
-
-/**
- * camel_file_util_decode_off_t:
- * @in: file to read from
- * @dest: pointer to a variable to put the value in
- * 
- * Decode an off_t type.
- * 
- * Return value: 0 on success, -1 on failure.
- **/
-int
-camel_file_util_decode_off_t (FILE *in, off_t *dest)
-{
-	off_t save = 0;
-	int v, i = sizeof(off_t) - 1;
-
-        while (i >= 0 && (v = fgetc (in)) != EOF) {
-		save |= ((off_t)v) << (i * 8);
-		i--;
-	}
-	*dest = save;
-	if (v == EOF)
-		return -1;
-	return 0;
-}
-
-/**
- * camel_file_util_encode_string:
- * @out: file to output to
- * @str: value to output
- * 
- * Encode a normal string and save it in the output file.
- * 
- * Return value: 0 on success, -1 on error.
- **/
-int
-camel_file_util_encode_string (FILE *out, const char *str)
-{
-	register int len;
-
-	if (str == NULL)
-		return camel_file_util_encode_uint32 (out, 0);
-
-	len = strlen (str);
-	if (camel_file_util_encode_uint32 (out, len+1) == -1)
-		return -1;
-	if (fwrite (str, len, 1, out) == 1)
-		return 0;
-	return -1;
-}
-
-/**
- * camel_file_util_decode_string:
- * @in: file to read from
- * @str: pointer to a variable to store the value in
- * 
- * Decode a normal string from the input file.
- * 
- * Return value: 0 on success, -1 on error.
- **/
-int
-camel_file_util_decode_string (FILE *in, char **str)
-{
-	guint32 len;
-	register char *ret;
-
-	if (camel_file_util_decode_uint32 (in, &len) == -1) {
-		*str = NULL;
-		return -1;
-	}
-
-	len--;
-	if (len > 65536) {
-		*str = NULL;
-		return -1;
-	}
-
-	ret = g_malloc (len+1);
-	if (fread (ret, len, 1, in) != 1) {
-		g_free (ret);
-		*str = NULL;
-		return -1;
-	}
-
-	ret[len] = 0;
-	*str = ret;
-	return 0;
-}
-
-
diff --git a/camel/camel-file-utils.h b/camel/camel-file-utils.h
deleted file mode 100644
index 4138b8b7df..0000000000
--- a/camel/camel-file-utils.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/* 
- * Authors:
- *   Michael Zucchi 
- *   Dan Winship 
- *
- * Copyright (C) 2000, 2001 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_FILE_UTILS_H
-#define CAMEL_FILE_UTILS_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-#include 
-#include 
-#include 
-
-int camel_file_util_encode_fixed_int32 (FILE *out, gint32);
-int camel_file_util_decode_fixed_int32 (FILE *in, gint32 *);
-int camel_file_util_encode_uint32 (FILE *out, guint32);
-int camel_file_util_decode_uint32 (FILE *in, guint32 *);
-int camel_file_util_encode_time_t (FILE *out, time_t);
-int camel_file_util_decode_time_t (FILE *in, time_t *);
-int camel_file_util_encode_off_t (FILE *out, off_t);
-int camel_file_util_decode_off_t (FILE *in, off_t *);
-int camel_file_util_encode_string (FILE *out, const char *);
-int camel_file_util_decode_string (FILE *in, char **);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_FILE_UTILS_H */
diff --git a/camel/camel-filter-driver.c b/camel/camel-filter-driver.c
deleted file mode 100644
index affc77b858..0000000000
--- a/camel/camel-filter-driver.c
+++ /dev/null
@@ -1,943 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- *  Copyright (C) 2000 Ximian Inc.
- *
- *  Authors: Michael Zucchi 
- *           Jeffrey Stedfast 
- *
- *  This program is free software; you can redistribute it and/or 
- *  modify it under the terms of the GNU General Public License as 
- *  published by the Free Software Foundation; either version 2 of the
- *  License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- *  USA
- */
-
-#ifdef HAVE_CONFIG_H
-#include 
-#endif
-
-#include 
-#include 
-
-#include 
-
-#include "camel-filter-driver.h"
-#include "camel-filter-search.h"
-
-#include "camel-exception.h"
-#include "camel-service.h"
-#include "camel-mime-message.h"
-
-#include "e-util/e-sexp.h"
-#include "e-util/e-memory.h"
-#include "e-util/e-msgport.h"	/* for edlist */
-
-#define d(x)
-
-/* type of status for a log report */
-enum filter_log_t {
-	FILTER_LOG_NONE,
-	FILTER_LOG_START,       /* start of new log entry */
-	FILTER_LOG_ACTION,      /* an action performed */
-	FILTER_LOG_END,	        /* end of log */
-};
-
-/* list of rule nodes */
-struct _filter_rule {
-	struct _filter_rule *next;
-	struct _filter_rule *prev;
-
-	char *match;
-	char *action;
-	char *name;
-};
-
-struct _CamelFilterDriverPrivate {
-	GHashTable *globals;       /* global variables */
-
-	CamelFolder *defaultfolder;	/* defualt folder */
-	
-	CamelFilterStatusFunc *statusfunc; 	/* status callback */
-	void *statusdata;		/* status callback data */
-	
-	/* for callback */
-	CamelFilterGetFolderFunc get_folder;
-	void *data;
-	
-	/* run-time data */
-	GHashTable *folders;       /* folders that message has been copied to */
-	int closed;		   /* close count */
-	GHashTable *forwards;      /* addresses that have been forwarded the message */
-	
-	gboolean terminated;       /* message processing was terminated */
-	gboolean deleted;          /* message was marked for deletion */
-	gboolean copied;           /* message was copied to some folder or another */
-	
-	CamelMimeMessage *message; /* input message */
-	CamelMessageInfo *info;    /* message summary info */
-	const char *uid;           /* message uid */
-	CamelFolder *source;       /* message source folder */
-	
-	FILE *logfile;             /* log file */
-	
-	EDList rules;		   /* list of _filter_rule structs */
-
-	CamelException *ex;
-	
-	/* evaluator */
-	ESExp *eval;
-};
-
-#define _PRIVATE(o) (((CamelFilterDriver *)(o))->priv)
-
-static void camel_filter_driver_class_init (CamelFilterDriverClass *klass);
-static void camel_filter_driver_init       (CamelFilterDriver *obj);
-static void camel_filter_driver_finalise   (CamelObject *obj);
-
-static void camel_filter_driver_log (CamelFilterDriver *driver, enum filter_log_t status, const char *desc, ...);
-
-static CamelFolder *open_folder (CamelFilterDriver *d, const char *folder_url);
-static int close_folders (CamelFilterDriver *d);
-
-static ESExpResult *do_delete (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *);
-static ESExpResult *mark_forward (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *);
-static ESExpResult *do_copy (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *);
-static ESExpResult *do_move (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *);
-static ESExpResult *do_stop (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *);
-static ESExpResult *do_colour (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *);
-static ESExpResult *do_score (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *);
-static ESExpResult *do_flag (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *);
-
-/* these are our filter actions - each must have a callback */
-static struct {
-	char *name;
-	ESExpFunc *func;
-	int type;		/* set to 1 if a function can perform shortcut evaluation, or
-				   doesn't execute everything, 0 otherwise */
-} symbols[] = {
-	{ "delete",          (ESExpFunc *) do_delete,    0 },
-	{ "forward-to",      (ESExpFunc *) mark_forward, 0 },
-	{ "copy-to",         (ESExpFunc *) do_copy,      0 },
-	{ "move-to",         (ESExpFunc *) do_move,      0 },
-	{ "stop",            (ESExpFunc *) do_stop,      0 },
-	{ "set-colour",      (ESExpFunc *) do_colour,    0 },
-	{ "set-score",       (ESExpFunc *) do_score,     0 },
-	{ "set-system-flag", (ESExpFunc *) do_flag,      0 }
-};
-
-static CamelObjectClass *camel_filter_driver_parent;
-
-guint
-camel_filter_driver_get_type (void)
-{
-	static CamelType type = CAMEL_INVALID_TYPE;
-
-	if (type == CAMEL_INVALID_TYPE)	{
-		type = camel_type_register(CAMEL_OBJECT_TYPE, "CamelFilterDriver",
-					   sizeof(CamelFilterDriver),
-					   sizeof(CamelFilterDriverClass),
-					   (CamelObjectClassInitFunc)camel_filter_driver_class_init,
-					   NULL,
-					   (CamelObjectInitFunc)camel_filter_driver_init,
-					   (CamelObjectFinalizeFunc)camel_filter_driver_finalise);
-	}
-	
-	return type;
-}
-
-static void
-camel_filter_driver_class_init (CamelFilterDriverClass *klass)
-{
-	/*CamelObjectClass *object_class = (CamelObjectClass *) klass;*/
-
-	camel_filter_driver_parent = camel_type_get_global_classfuncs(camel_object_get_type());
-}
-
-static void
-camel_filter_driver_init (CamelFilterDriver *obj)
-{
-	struct _CamelFilterDriverPrivate *p;
-	int i;
-	
-	p = _PRIVATE (obj) = g_malloc0 (sizeof (*p));
-
-	e_dlist_init(&p->rules);
-
-	p->eval = e_sexp_new ();
-	/* Load in builtin symbols */
-	for (i = 0; i < sizeof (symbols) / sizeof (symbols[0]); i++) {
-		if (symbols[i].type == 1) {
-			e_sexp_add_ifunction (p->eval, 0, symbols[i].name, (ESExpIFunc *)symbols[i].func, obj);
-		} else {
-			e_sexp_add_function (p->eval, 0, symbols[i].name, symbols[i].func, obj);
-		}
-	}
-	
-	p->globals = g_hash_table_new (g_str_hash, g_str_equal);
-	
-	p->folders = g_hash_table_new (g_str_hash, g_str_equal);
-}
-
-static void
-free_hash_strings (void *key, void *value, void *data)
-{
-	g_free (key);
-	g_free (value);
-}
-
-static void
-camel_filter_driver_finalise (CamelObject *obj)
-{
-	CamelFilterDriver *driver = (CamelFilterDriver *) obj;
-	struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);	
-	struct _filter_rule *node;
-
-	/* close all folders that were opened for appending */
-	close_folders (driver);
-	g_hash_table_destroy (p->folders);
-	
-	g_hash_table_foreach (p->globals, free_hash_strings, driver);
-	g_hash_table_destroy (p->globals);
-
-	e_sexp_unref(p->eval);
-	
-	if (p->defaultfolder) {
-		camel_folder_thaw (p->defaultfolder);
-		camel_object_unref (CAMEL_OBJECT (p->defaultfolder));
-	}
-
-	while ((node = (struct _filter_rule *)e_dlist_remhead(&p->rules))) {
-		g_free(node->match);
-		g_free(node->action);
-		g_free(node->name);
-		g_free(node);
-	}
-	
-	g_free (p);
-}
-
-/**
- * camel_filter_driver_new:
- *
- * Return value: A new CamelFilterDriver object
- **/
-CamelFilterDriver *
-camel_filter_driver_new (void)
-{
-	return CAMEL_FILTER_DRIVER (camel_object_new(camel_filter_driver_get_type ()));
-}
-
-void
-camel_filter_driver_set_folder_func (CamelFilterDriver *d, CamelFilterGetFolderFunc get_folder, void *data)
-{
-	struct _CamelFilterDriverPrivate *p = _PRIVATE (d);
-
-	p->get_folder = get_folder;
-	p->data = data;
-}
-
-void
-camel_filter_driver_set_logfile (CamelFilterDriver *d, FILE *logfile)
-{
-	struct _CamelFilterDriverPrivate *p = _PRIVATE (d);
-	
-	p->logfile = logfile;
-}
-
-void
-camel_filter_driver_set_status_func (CamelFilterDriver *d, CamelFilterStatusFunc *func, void *data)
-{
-	struct _CamelFilterDriverPrivate *p = _PRIVATE (d);
-	
-	p->statusfunc = func;
-	p->statusdata = data;
-}
-
-void
-camel_filter_driver_set_default_folder (CamelFilterDriver *d, CamelFolder *def)
-{
-	struct _CamelFilterDriverPrivate *p = _PRIVATE (d);
-	
-	if (p->defaultfolder) {
-		camel_folder_thaw (p->defaultfolder);
-		camel_object_unref (CAMEL_OBJECT (p->defaultfolder));
-	}
-	
-	p->defaultfolder = def;
-	
-	if (p->defaultfolder) {
-		camel_folder_freeze (p->defaultfolder);
-		camel_object_ref (CAMEL_OBJECT (p->defaultfolder));
-	}
-}
-
-void
-camel_filter_driver_add_rule(CamelFilterDriver *d, const char *name, const char *match, const char *action)
-{
-	struct _CamelFilterDriverPrivate *p = _PRIVATE (d);
-	struct _filter_rule *node;
-
-	node = g_malloc(sizeof(*node));
-	node->match = g_strdup(match);
-	node->action = g_strdup(action);
-	node->name = g_strdup(name);
-	e_dlist_addtail(&p->rules, (EDListNode *)node);
-}
-
-static void
-report_status (CamelFilterDriver *driver, enum camel_filter_status_t status, int pc, const char *desc, ...)
-{
-	/* call user-defined status report function */
-	struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);
-	va_list ap;
-	char *str;
-	
-	if (p->statusfunc) {
-		va_start (ap, desc);
-		str = g_strdup_vprintf (desc, ap);
-		p->statusfunc (driver, status, pc, str, p->statusdata);
-		g_free (str);
-	}
-}
-
-
-#if 0
-void
-camel_filter_driver_set_global (CamelFilterDriver *d, const char *name, const char *value)
-{
-	struct _CamelFilterDriverPrivate *p = _PRIVATE (d);
-	char *oldkey, *oldvalue;
-	
-	if (g_hash_table_lookup_extended (p->globals, name, (void *)&oldkey, (void *)&oldvalue)) {
-		g_free (oldvalue);
-		g_hash_table_insert (p->globals, oldkey, g_strdup (value));
-	} else {
-		g_hash_table_insert (p->globals, g_strdup (name), g_strdup (value));
-	}
-}
-#endif
-
-static ESExpResult *
-do_delete (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
-{
-	struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);
-	
-	d(fprintf (stderr, "doing delete\n"));
-	p->deleted = TRUE;
-	camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Delete");
-	
-	return NULL;
-}
-
-static ESExpResult *
-mark_forward (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
-{
-	/*struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);*/
-	
-	d(fprintf (stderr, "marking message for forwarding\n"));
-	/* FIXME: do stuff here */
-	camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Forward");
-	
-	return NULL;
-}
-
-static ESExpResult *
-do_copy (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
-{
-	struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);
-	int i;
-	
-	d(fprintf (stderr, "copying message...\n"));
-	
-	for (i = 0; i < argc; i++) {
-		if (argv[i]->type == ESEXP_RES_STRING) {
-			/* open folders we intent to copy to */
-			char *folder = argv[i]->value.string;
-			CamelFolder *outbox;
-			
-			outbox = open_folder (driver, folder);
-			if (!outbox)
-				break;
-			
-			if (p->uid && p->source && camel_folder_has_summary_capability (p->source)) {
-				GPtrArray *uids;
-				
-				uids = g_ptr_array_new ();
-				g_ptr_array_add (uids, (char *) p->uid);
-				camel_folder_copy_messages_to (p->source, uids, outbox, p->ex);
-				g_ptr_array_free (uids, TRUE);
-			} else
-				camel_folder_append_message (outbox, p->message, p->info, p->ex);
-			
-			if (!camel_exception_is_set (p->ex))
-				p->copied = TRUE;
-			
-			camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Copy to folder %s",
-						 folder);
-		}
-	}
-	
-	return NULL;
-}
-
-static ESExpResult *
-do_move (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
-{
-	struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);
-	int i;
-	
-	d(fprintf (stderr, "moving message...\n"));
-	
-	for (i = 0; i < argc; i++) {
-		if (argv[i]->type == ESEXP_RES_STRING) {
-			/* open folders we intent to move to */
-			char *folder = argv[i]->value.string;
-			CamelFolder *outbox;
-			
-			outbox = open_folder (driver, folder);
-			if (!outbox)
-				break;
-			
-			if (outbox == p->source)
-				break;
-			
-			if (p->uid && p->source && camel_folder_has_summary_capability (p->source)) {
-				GPtrArray *uids;
-				
-				uids = g_ptr_array_new ();
-				g_ptr_array_add (uids, (char *) p->uid);
-				camel_folder_copy_messages_to (p->source, uids, outbox, p->ex);
-				g_ptr_array_free (uids, TRUE);
-			} else
-				camel_folder_append_message (outbox, p->message, p->info, p->ex);
-			
-			if (!camel_exception_is_set (p->ex)) {
-				/* a 'move' is a copy & delete */
-				p->copied = TRUE;
-				p->deleted = TRUE;
-			}
-			
-			camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Move to folder %s",
-						 folder);
-		}
-	}
-	
-	return NULL;
-}
-
-static ESExpResult *
-do_stop (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
-{
-	struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);
-	
-	camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Stopped processing");
-	d(fprintf (stderr, "terminating message processing\n"));
-	p->terminated = TRUE;
-	
-	return NULL;
-}
-
-static ESExpResult *
-do_colour (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
-{
-	struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);
-	
-	d(fprintf (stderr, "setting colour tag\n"));
-	if (argc > 0 && argv[0]->type == ESEXP_RES_STRING) {
-		camel_tag_set (&p->info->user_tags, "colour", argv[0]->value.string);
-		camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Set colour to %s", argv[0]->value.string);
-	}
-	
-	return NULL;
-}
-
-static ESExpResult *
-do_score (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
-{
-	struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);
-	
-	d(fprintf (stderr, "setting score tag\n"));
-	if (argc > 0 && argv[0]->type == ESEXP_RES_INT) {
-		char *value;
-		
-		value = g_strdup_printf ("%d", argv[0]->value.number);
-		camel_tag_set (&p->info->user_tags, "score", value);
-		camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Set score to %d", argv[0]->value.number);
-		g_free (value);
-	}
-	
-	return NULL;
-}
-
-static ESExpResult *
-do_flag (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
-{
-	struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);
-	
-	d(fprintf (stderr, "setting flag\n"));
-	if (argc == 1 && argv[0]->type == ESEXP_RES_STRING) {
-		p->info->flags |= camel_system_flag (argv[0]->value.string) | CAMEL_MESSAGE_FOLDER_FLAGGED;
-		camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Set %s flag", argv[0]->value.string);
-	}
-	
-	return NULL;
-}
-
-static CamelFolder *
-open_folder (CamelFilterDriver *driver, const char *folder_url)
-{
-	struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);
-	CamelFolder *camelfolder;
-	CamelException ex;
-	
-	/* we have a lookup table of currently open folders */
-	camelfolder = g_hash_table_lookup (p->folders, folder_url);
-	if (camelfolder)
-		return camelfolder;
-	
-	camel_exception_init (&ex);
-	camelfolder = p->get_folder (driver, folder_url, p->data, &ex);
-	camel_exception_clear (&ex);
-	
-	if (camelfolder) {
-		g_hash_table_insert (p->folders, g_strdup (folder_url), camelfolder);
-		camel_folder_freeze (camelfolder);
-	}
-	
-	return camelfolder;
-}
-
-static void
-close_folder (void *key, void *value, void *data)
-{	
-	CamelFolder *folder = value;
-	CamelFilterDriver *driver = data;
-	struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);
-	
-	p->closed++;
-
-	g_free (key);
-	camel_folder_sync (folder, FALSE, p->ex);
-	camel_folder_thaw (folder);
-	camel_object_unref (CAMEL_OBJECT (folder));
-
-	report_status(driver, CAMEL_FILTER_STATUS_PROGRESS, g_hash_table_size(p->folders)* 100 / p->closed, _("Syncing folders"));
-}
-
-/* flush/close all folders */
-static int
-close_folders (CamelFilterDriver *driver)
-{
-	struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);
-
-	report_status(driver, CAMEL_FILTER_STATUS_PROGRESS, 0, _("Syncing folders"));
-
-	p->closed = 0;
-	g_hash_table_foreach (p->folders, close_folder, driver);
-	g_hash_table_destroy (p->folders);
-	p->folders = g_hash_table_new (g_str_hash, g_str_equal);
-	
-	/* FIXME: status from driver */
-	return 0;
-}
-
-#if 0
-static void
-free_key (gpointer key, gpointer value, gpointer user_data)
-{
-	g_free (key);
-}
-#endif
-
-
-static void
-camel_filter_driver_log (CamelFilterDriver *driver, enum filter_log_t status, const char *desc, ...)
-{
-	struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);
-	
-	if (p->logfile) {
-		char *str = NULL;
-		
-		if (desc) {
-			va_list ap;
-			
-			va_start (ap, desc);
-			str = g_strdup_vprintf (desc, ap);
-		}
-		
-		switch (status) {
-		case FILTER_LOG_START: {
-			/* write log header */
-			const char *subject = NULL;
-			char *fromstr;
-			const CamelInternetAddress *from;
-			char date[50];
-			time_t t;
-
-			/* FIXME: does this need locking?  Probably */
-
-			from = camel_mime_message_get_from (p->message);
-			fromstr = camel_address_format((CamelAddress *)from);
-			subject = camel_mime_message_get_subject (p->message);
-			
-			time (&t);
-			strftime (date, 49, "%a, %d %b %Y %H:%M:%S", localtime (&t));
-			fprintf (p->logfile, "Applied filter \"%s\" to message from %s - \"%s\" at %s\n",
-				 str, fromstr ? fromstr : "unknown", subject ? subject : "", date);
-			g_free(fromstr);
-			break;
-		}
-		case FILTER_LOG_ACTION:
-			fprintf (p->logfile, "Action: %s\n", str);
-			break;
-		case FILTER_LOG_END:
-			fprintf (p->logfile, "\n");
-			break;
-		default:
-			/* nothing else is loggable */
-			break;
-		}
-		
-		g_free (str);
-	}
-}
-
-
-/**
- * camel_filter_driver_filter_mbox:
- * @driver: CamelFilterDriver
- * @mbox: mbox filename to be filtered
- * @ex: exception
- *
- * Filters an mbox file based on rules defined in the FilterDriver
- * object. Is more efficient as it doesn't need to open the folder
- * through Camel directly.
- *
- * Returns -1 if errors were encountered during filtering,
- * otherwise returns 0.
- *
- **/
-int
-camel_filter_driver_filter_mbox (CamelFilterDriver *driver, const char *mbox, const char *original_source_url, CamelException *ex)
-{
-	struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);
-	CamelMimeParser *mp = NULL;
-	char *source_url = NULL;
-	int fd = -1;
-	int i = 0;
-	struct stat st;
-	int status;
-	CamelMessageInfo *info;
-	off_t last = 0;
-
-	fd = open (mbox, O_RDONLY);
-	if (fd == -1) {
-		camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, _("Unable to open spool folder"));
-		goto fail;
-	}
-	/* to get the filesize */
-	fstat (fd, &st);
-	
-	mp = camel_mime_parser_new ();
-	camel_mime_parser_scan_from (mp, TRUE);
-	if (camel_mime_parser_init_with_fd (mp, fd) == -1) {
-		camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, _("Unable to process spool folder"));
-		goto fail;
-	}
-	fd = -1;
-	
-	source_url = g_strdup_printf ("file://%s", mbox);
-	
-	while (camel_mime_parser_step (mp, 0, 0) == HSCAN_FROM) {
-		CamelMimeMessage *msg;
-		int pc = 0;
-		
-		if (st.st_size > 0)
-			pc = (int)(100.0 * ((double)camel_mime_parser_tell (mp) / (double)st.st_size));
-		
-		report_status (driver, CAMEL_FILTER_STATUS_START, pc, _("Getting message %d (%d%%)"), i, pc);
-		
-		msg = camel_mime_message_new ();
-		if (camel_mime_part_construct_from_parser (CAMEL_MIME_PART (msg), mp) == -1) {
-			report_status (driver, CAMEL_FILTER_STATUS_END, 100, _("Failed on message %d"), i);
-			camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, _("Cannot open message"));
-			camel_object_unref (CAMEL_OBJECT (msg));
-			goto fail;
-		}
-		
-		info = camel_message_info_new_from_header(((CamelMimePart *)msg)->headers);
-		info->size = camel_mime_parser_tell(mp) - last;
-		last = camel_mime_parser_tell(mp);
-		status = camel_filter_driver_filter_message (driver, msg, info, NULL, NULL, source_url, 
-							     original_source_url ? original_source_url : source_url, ex);
-		camel_object_unref (CAMEL_OBJECT (msg));
-		if (camel_exception_is_set (ex) || status == -1) {
-			report_status (driver, CAMEL_FILTER_STATUS_END, 100, _("Failed on message %d"), i);
-			goto fail;
-		}
-		
-		i++;
-		
-		/* skip over the FROM_END state */
-		camel_mime_parser_step (mp, 0, 0);
-	}
-	
-	if (p->defaultfolder) {
-		report_status(driver, CAMEL_FILTER_STATUS_PROGRESS, 100, _("Syncing folder"));
-		camel_folder_sync(p->defaultfolder, FALSE, ex);
-	}
-	
-	report_status (driver, CAMEL_FILTER_STATUS_END, 100, _("Complete"));
-	
-	return 0;
-	
-fail:
-	g_free (source_url);
-	if (fd != -1)
-		close (fd);
-	if (mp)
-		camel_object_unref (CAMEL_OBJECT (mp));
-	
-	return -1;
-}
-
-
-/**
- * camel_filter_driver_filter_folder:
- * @driver: CamelFilterDriver
- * @folder: CamelFolder to be filtered
- * @cache: UID cache (needed for POP folders)
- * @uids: message uids to be filtered or NULL (as a shortcut to filter all messages)
- * @remove: TRUE to mark filtered messages as deleted
- * @ex: exception
- *
- * Filters a folder based on rules defined in the FilterDriver
- * object.
- *
- * Returns -1 if errors were encountered during filtering,
- * otherwise returns 0.
- *
- **/
-int
-camel_filter_driver_filter_folder (CamelFilterDriver *driver, CamelFolder *folder, CamelUIDCache *cache,
-				   GPtrArray *uids, gboolean remove, CamelException *ex)
-{
-	struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);
-	int i;
-	int freeuids = FALSE;
-	CamelMimeMessage *message;
-	CamelMessageInfo *info;
-	char *source_url, *service_url;
-	const char *folder_name;
-	int status = 0;
-	int need_sep = 0;
-	
-	service_url = camel_service_get_url (CAMEL_SERVICE (camel_folder_get_parent_store (folder)));
-	folder_name = camel_folder_get_full_name (folder);
-	
-	/* Add a separator unless the first char of folder_name or the last char of service_url is '/' */
-	need_sep = (folder_name && *folder_name != '/');
-	if (service_url && *service_url && !need_sep) {
-		need_sep = (service_url[strlen (service_url)-1] != '/');
-	}
-	source_url = g_strdup_printf ("%s%s%s",
-				      service_url,
-				      need_sep ? "/" : "",
-				      folder_name);
-	g_free (service_url);
-	
-	if (uids == NULL) {
-		uids = camel_folder_get_uids (folder);
-		freeuids = TRUE;
-	}
-	
-	for (i = 0; i < uids->len; i++) {
-		int pc = (100 * i)/uids->len;
-		
-		report_status (driver, CAMEL_FILTER_STATUS_START, pc, _("Getting message %d of %d"), i+1,
-			       uids->len);
-		
-		message = camel_folder_get_message (folder, uids->pdata[i], ex);
-		if (!message || camel_exception_is_set (ex)) {
-			report_status (driver, CAMEL_FILTER_STATUS_END, 100, _("Failed at message %d of %d"),
-				       i+1, uids->len);
-			status = -1;
-			break;
-		}
-		
-		if (camel_folder_has_summary_capability (folder))
-			info = camel_folder_get_message_info (folder, uids->pdata[i]);
-		else
-			info = NULL;
-		
-		status = camel_filter_driver_filter_message (driver, message, info, uids->pdata[i],
-							     folder, source_url, source_url, ex);
-		
-		if (camel_folder_has_summary_capability (folder))
-			camel_folder_free_message_info (folder, info);
-		
-		if (camel_exception_is_set (ex) || status == -1) {
-			report_status (driver, CAMEL_FILTER_STATUS_END, 100, _("Failed at message %d of %d"),
-				       i+1, uids->len);
-			status = -1;
-			break;
-		}
-		
-		if (remove)
-			camel_folder_set_message_flags (folder, uids->pdata[i],
-							CAMEL_MESSAGE_DELETED | CAMEL_MESSAGE_SEEN,
-							CAMEL_MESSAGE_DELETED | CAMEL_MESSAGE_SEEN);
-		
-		if (cache)
-			camel_uid_cache_save_uid (cache, uids->pdata[i]);
-		
-		camel_object_unref (CAMEL_OBJECT (message));
-	}
-	
-	if (freeuids)
-		camel_folder_free_uids (folder, uids);
-	
-	if (p->defaultfolder) {
-		report_status (driver, CAMEL_FILTER_STATUS_PROGRESS, 100, _("Syncing folder"));
-		camel_folder_sync (p->defaultfolder, FALSE, ex);
-	}
-	
-	if (i == uids->len)
-		report_status (driver, CAMEL_FILTER_STATUS_END, 100, _("Complete"));
-	
-	g_free (source_url);
-	
-	return status;
-}
-
-
-/**
- * camel_filter_driver_filter_message:
- * @driver: CamelFilterDriver
- * @message: message to filter
- * @info: message info or NULL
- * @uid: message uid or NULL
- * @source: source folder or NULL
- * @source_url: url of source folder or NULL
- * @original_source_url: url of original source folder (pre-movemail) or NULL
- * @ex: exception
- *
- * Filters a message based on rules defined in the FilterDriver
- * object. If the source folder (@source) and the uid (@uid) are
- * provided, the filter will operate on the CamelFolder (which in
- * certain cases is more efficient than using the default
- * camel_folder_append_message() function).
- *
- * Returns -1 if errors were encountered during filtering,
- * otherwise returns 0.
- *
- **/
-int
-camel_filter_driver_filter_message (CamelFilterDriver *driver, CamelMimeMessage *message,
-				    CamelMessageInfo *info, const char *uid,
-				    CamelFolder *source, const char *source_url,
-				    const char *original_source_url,
-				    CamelException *ex)
-{
-	struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);
-	ESExpResult *r;
-	struct _filter_rule *node;
-	gboolean freeinfo = FALSE;
-	gboolean filtered = FALSE;
-	
-	if (info == NULL) {
-		struct _header_raw *h = CAMEL_MIME_PART (message)->headers;
-		
-		info = camel_message_info_new_from_header (h);
-		freeinfo = TRUE;
-	} else {
-		if (info->flags & CAMEL_MESSAGE_DELETED)
-			return 0;
-	}
-	
-	p->ex = ex;
-	p->terminated = FALSE;
-	p->deleted = FALSE;
-	p->copied = FALSE;
-	p->message = message;
-	p->info = info;
-	p->uid = uid;
-	p->source = source;
-	
-	if (original_source_url && camel_mime_message_get_source (message) == NULL)
-		camel_mime_message_set_source (message, original_source_url);
-	
-	node = (struct _filter_rule *)p->rules.head;
-	while (node->next) {
-		d(fprintf (stderr, "applying rule %s\naction %s\n", node->match, node->action));
-		
-		if (camel_filter_search_match (p->message, p->info, 
-					       original_source_url ? original_source_url : source_url,
-					       node->match, p->ex)) {
-			filtered = TRUE;
-			camel_filter_driver_log (driver, FILTER_LOG_START, node->name);
-			
-			/* perform necessary filtering actions */
-			e_sexp_input_text (p->eval, node->action, strlen (node->action));
-			if (e_sexp_parse (p->eval) == -1) {
-				camel_exception_setv (ex, 1, _("Error parsing filter: %s: %s"),
-						      e_sexp_error (p->eval), node->action);
-				goto error;
-			}
-			r = e_sexp_eval (p->eval);
-			if (r == NULL) {
-				camel_exception_setv (ex, 1, _("Error executing filter: %s: %s"),
-						      e_sexp_error (p->eval), node->action);
-				goto error;
-			}
-			e_sexp_result_free (p->eval, r);
-			if (p->terminated)
-				break;
-		}
-		
-		node = node->next;
-	}
-	
-	/* *Now* we can set the DELETED flag... */
-	if (p->deleted)
-		info->flags = info->flags | CAMEL_MESSAGE_DELETED | CAMEL_MESSAGE_SEEN | CAMEL_MESSAGE_FOLDER_FLAGGED;
-	
-	/* Logic: if !Moved and there exists a default folder... */
-	if (!(p->copied && p->deleted) && p->defaultfolder) {
-		/* copy it to the default inbox */
-		filtered = TRUE;
-		camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Copy to default folder");
-		if (p->uid && p->source && camel_folder_has_summary_capability (p->source)) {
-			GPtrArray *uids;
-			
-			uids = g_ptr_array_new ();
-			g_ptr_array_add (uids, (char *) p->uid);
-			camel_folder_copy_messages_to (p->source, uids, p->defaultfolder, p->ex);
-			g_ptr_array_free (uids, TRUE);
-		} else
-			camel_folder_append_message (p->defaultfolder, p->message, p->info, p->ex);
-	}
-	
-	if (freeinfo)
-		camel_message_info_free (info);
-	
-	return 0;
-	
-error:	
-	if (filtered)
-		camel_filter_driver_log (driver, FILTER_LOG_END, NULL);
-	
-	if (freeinfo)
-		camel_message_info_free (info);
-	
-	return -1;
-}
diff --git a/camel/camel-filter-driver.h b/camel/camel-filter-driver.h
deleted file mode 100644
index ff7028a890..0000000000
--- a/camel/camel-filter-driver.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- *  Copyright (C) 2000 Ximian Inc.
- *
- *  Authors: Michael Zucchi 
- *           Jeffrey Stedfast 
- *
- *  This program is free software; you can redistribute it and/or 
- *  modify it under the terms of the GNU General Public License as 
- *  published by the Free Software Foundation; either version 2 of the
- *  License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- *  USA
- */
-
-#ifndef _CAMEL_FILTER_DRIVER_H
-#define _CAMEL_FILTER_DRIVER_H
-
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#define CAMEL_FILTER_DRIVER_TYPE   (camel_filter_driver_get_type())
-#define CAMEL_FILTER_DRIVER(obj)         CAMEL_CHECK_CAST (obj, camel_filter_driver_get_type (), CamelFilterDriver)
-#define CAMEL_FILTER_DRIVER_CLASS(klass) CAMEL__CHECK_CLASS_CAST (klass, camel_filter_driver_get_type (), CamelFilterDriverClass)
-#define CAMEL_IS_FILTER_DRIVER(obj)      CAMEL_CHECK_TYPE (obj, camel_filter_driver_get_type ())
-
-typedef struct _CamelFilterDriverClass CamelFilterDriverClass;
-
-struct _CamelFilterDriver {
-	CamelObject parent;
-
-	struct _CamelFilterDriverPrivate *priv;
-};
-
-struct _CamelFilterDriverClass {
-	CamelObjectClass parent_class;
-};
-
-/* FIXME: this maybe should change... */
-/* type of status for a status report */
-enum camel_filter_status_t {
-	CAMEL_FILTER_STATUS_NONE,
-	CAMEL_FILTER_STATUS_START,	/* start of new message processed */
-	CAMEL_FILTER_STATUS_ACTION,	/* an action performed */
-	CAMEL_FILTER_STATUS_PROGRESS,	/* (an) extra update(s), if its taking longer to process */
-	CAMEL_FILTER_STATUS_END,	/* end of message */
-};
-
-typedef CamelFolder * (*CamelFilterGetFolderFunc) (CamelFilterDriver *, const char *uri, void *data, CamelException *ex);
-/* report status */
-typedef void (CamelFilterStatusFunc)(CamelFilterDriver *driver, enum camel_filter_status_t status, int pc, const char *desc, void *data);
-
-guint         camel_filter_driver_get_type (void);
-CamelFilterDriver  *camel_filter_driver_new     (void);
-
-/* modifiers */
-void    camel_filter_driver_set_folder_func     (CamelFilterDriver *d, CamelFilterGetFolderFunc fetcher, void *data);
-void    camel_filter_driver_set_logfile         (CamelFilterDriver *d, FILE *logfile);
-void	camel_filter_driver_set_status_func     (CamelFilterDriver *d, CamelFilterStatusFunc *func,
-						 void *data);
-void	camel_filter_driver_set_default_folder  (CamelFilterDriver *d, CamelFolder *def);
-void 	camel_filter_driver_add_rule		(CamelFilterDriver *d, const char *name, const char *match,
-						 const char *action);
-
-/*void camel_filter_driver_set_global(CamelFilterDriver *, const char *name, const char *value);*/
-
-int      camel_filter_driver_filter_message      (CamelFilterDriver *driver, CamelMimeMessage *message,
-						  CamelMessageInfo *info, const char *uri,
-						  CamelFolder *source, const char *source_url,
-						  const char *original_source_url, CamelException *ex);
-
-int      camel_filter_driver_filter_mbox         (CamelFilterDriver *driver, const char *mbox,
-						  const char *original_source_url, CamelException *ex);
-
-int      camel_filter_driver_filter_folder       (CamelFilterDriver *driver, CamelFolder *folder, CamelUIDCache *cache,
-						  GPtrArray *uids, gboolean remove, CamelException *ex);
-
-#if 0
-/* generate the search query/action string for a filter option */
-void camel_filter_driver_expand_option (CamelFilterDriver *d, GString *s, GString *action, struct filter_option *op);
-
-/* get info about rules (options) */
-int camel_filter_driver_rule_count (CamelFilterDriver *d);
-struct filter_option *camel_filter_driver_rule_get (CamelFilterDriver *d, int n);
-#endif
-
-#endif /* ! _CAMEL_FILTER_DRIVER_H */
diff --git a/camel/camel-filter-search.c b/camel/camel-filter-search.c
deleted file mode 100644
index b4651f67fc..0000000000
--- a/camel/camel-filter-search.c
+++ /dev/null
@@ -1,476 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- *  Authors: Jeffrey Stedfast 
- *	     Michael Zucchi 
- *
- *  Copyright 2000 Ximian, Inc. (www.ximian.com)
- *  Copyright 2001 Ximian Inc. (www.ximian.com)
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include 
-#endif
-
-/* (from glibc headers:
-   POSIX says that  must be included (by the caller) before .  */
-
-#include 
-#include 
-#include 
-#include 
-
-#include "e-util/e-sexp.h"
-#include "e-util/e-url.h"
-
-#include "camel-mime-message.h"
-#include "camel-filter-search.h"
-#include "camel-exception.h"
-#include "camel-multipart.h"
-#include "camel-stream-mem.h"
-#include "camel-search-private.h"
-
-#define d(x)
-
-typedef struct {
-	CamelMimeMessage *message;
-	CamelMessageInfo *info;
-	const char *source;
-	CamelException *ex;
-} FilterMessageSearch;
-
-/* ESExp callbacks */
-static ESExpResult *header_contains (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *header_matches (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *header_starts_with (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *header_ends_with (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *header_exists (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *header_soundex (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *header_regex (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *header_full_regex (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *match_all (struct _ESExp *f, int argc, struct _ESExpTerm **argv, FilterMessageSearch *fms);
-static ESExpResult *body_contains (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *body_regex (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *user_flag (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *user_tag (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *system_flag (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *get_sent_date (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *get_received_date (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *get_current_date (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *get_score (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *get_source (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *get_size (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-
-/* builtin functions */
-static struct {
-	char *name;
-	ESExpFunc *func;
-	int type;		/* set to 1 if a function can perform shortcut evaluation, or
-				   doesn't execute everything, 0 otherwise */
-} symbols[] = {
-	{ "match-all",          (ESExpFunc *) match_all,          1 },
-	{ "body-contains",      (ESExpFunc *) body_contains,      0 },
-	{ "body-regex",         (ESExpFunc *) body_regex,         0 },
-	{ "header-contains",    (ESExpFunc *) header_contains,    0 },
-	{ "header-matches",     (ESExpFunc *) header_matches,     0 },
-	{ "header-starts-with", (ESExpFunc *) header_starts_with, 0 },
-	{ "header-ends-with",   (ESExpFunc *) header_ends_with,   0 },
-	{ "header-exists",      (ESExpFunc *) header_exists,      0 },
-	{ "header-soundex",     (ESExpFunc *) header_soundex,     0 },
-	{ "header-regex",       (ESExpFunc *) header_regex,       0 },
-	{ "header-full-regex",  (ESExpFunc *) header_full_regex,  0 },
-	{ "user-tag",           (ESExpFunc *) user_tag,           0 },
-	{ "user-flag",          (ESExpFunc *) user_flag,          0 },
-	{ "system-flag",        (ESExpFunc *) system_flag,        0 },
-	{ "get-sent-date",      (ESExpFunc *) get_sent_date,      0 },
-	{ "get-received-date",  (ESExpFunc *) get_received_date,  0 },
-	{ "get-current-date",   (ESExpFunc *) get_current_date,   0 },
-	{ "get-score",          (ESExpFunc *) get_score,          0 },
-	{ "get-source",         (ESExpFunc *) get_source,         0 },
-	{ "get-size",           (ESExpFunc *) get_size,           0 },
-};
-
-static ESExpResult *
-check_header(struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms, camel_search_match_t how)
-{
-	gboolean matched = FALSE;
-	ESExpResult *r;
-	int i;
-	
-	if (argc > 1 && argv[0]->type == ESEXP_RES_STRING) {
-		char *name = argv[0]->value.string;
-		const char *header;
-
-		if (strcasecmp(name, "x-camel-mlist") == 0)
-			header = camel_message_info_mlist(fms->info);
-		else
-			header = camel_medium_get_header (CAMEL_MEDIUM (fms->message), argv[0]->value.string);
-
-		if (header) {
-			for (i=1;itype == ESEXP_RES_STRING
-				    && camel_search_header_match(header, argv[i]->value.string, how)) {
-					matched = TRUE;
-					break;
-				}
-			}
-		}
-	}
-	
-	r = e_sexp_result_new(f, ESEXP_RES_BOOL);
-	r->value.bool = matched;
-	
-	return r;
-}
-
-static ESExpResult *
-header_contains (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
-	return check_header(f, argc, argv, fms, CAMEL_SEARCH_MATCH_CONTAINS);
-}
-
-
-static ESExpResult *
-header_matches (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
-	return check_header(f, argc, argv, fms, CAMEL_SEARCH_MATCH_EXACT);
-}
-
-static ESExpResult *
-header_starts_with (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
-	return check_header(f, argc, argv, fms, CAMEL_SEARCH_MATCH_STARTS);
-}
-
-static ESExpResult *
-header_ends_with (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
-	return check_header(f, argc, argv, fms, CAMEL_SEARCH_MATCH_ENDS);
-}
-
-static ESExpResult *
-header_soundex (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
-	return check_header(f, argc, argv, fms, CAMEL_SEARCH_MATCH_SOUNDEX);
-}
-
-static ESExpResult *
-header_exists (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
-	gboolean matched = FALSE;
-	ESExpResult *r;
-	int i;
-
-	for (i=0;itype == ESEXP_RES_STRING)
-			matched = camel_medium_get_header (CAMEL_MEDIUM (fms->message), argv[i]->value.string) != NULL;
-	}
-	
-	r = e_sexp_result_new(f, ESEXP_RES_BOOL);
-	r->value.bool = matched;
-	
-	return r;
-}
-
-static ESExpResult *
-header_regex (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
-	ESExpResult *r = e_sexp_result_new(f, ESEXP_RES_BOOL);
-	regex_t pattern;
-	const char *contents;
-
-	if (argc>1
-	    && argv[0]->type == ESEXP_RES_STRING
-	    && (contents = camel_medium_get_header (CAMEL_MEDIUM (fms->message), argv[0]->value.string))
-	    && camel_search_build_match_regex(&pattern, CAMEL_SEARCH_MATCH_REGEX|CAMEL_SEARCH_MATCH_ICASE, argc-1, argv+1, fms->ex) == 0) {
-		r->value.bool = regexec(&pattern, contents, 0, NULL, 0) == 0;
-		regfree(&pattern);
-	} else
-		r->value.bool = FALSE;
-	
-	return r;
-}
-
-static gchar *
-get_full_header (CamelMimeMessage *message)
-{
-	CamelMimePart *mp = CAMEL_MIME_PART (message);
-	GString *str = g_string_new ("");
-	char   *ret;
-	struct _header_raw *h;
-	
-	for (h = mp->headers; h; h = h->next) {
-		if (h->value != NULL) {
-			g_string_append(str, h->name);
-			if (isspace(h->value[0]))
-				g_string_append(str, ":");
-			else
-				g_string_append(str, ": ");
-			g_string_append(str, h->value);
-		}
-	}
-	
-	ret = str->str;
-	g_string_free (str, FALSE);
-	
-	return ret;
-}
-
-static ESExpResult *
-header_full_regex (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
-	ESExpResult *r = e_sexp_result_new(f, ESEXP_RES_BOOL);
-	regex_t pattern;
-	char *contents;
-	
-	if (camel_search_build_match_regex(&pattern, CAMEL_SEARCH_MATCH_REGEX|CAMEL_SEARCH_MATCH_ICASE, argc-1, argv+1, fms->ex) == 0) {
-		contents = get_full_header (fms->message);
-		r->value.bool = regexec(&pattern, contents, 0, NULL, 0) == 0;
-		g_free(contents);
-		regfree(&pattern);
-	} else
-		r->value.bool = FALSE;
-	
-	return r;
-}
-
-static ESExpResult *
-match_all (struct _ESExp *f, int argc, struct _ESExpTerm **argv, FilterMessageSearch *fms)
-{
-	/* match-all: when dealing with single messages is a no-op */
-	ESExpResult *r;
-	
-	if (argc > 0)
-		return e_sexp_term_eval (f, argv[0]);
-	
-	r = e_sexp_result_new (f, ESEXP_RES_BOOL);
-	r->value.bool = FALSE;
-	
-	return r;
-}
-
-static ESExpResult *
-body_contains (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
-	ESExpResult *r = e_sexp_result_new(f, ESEXP_RES_BOOL);
-	regex_t pattern;
-
-	if (camel_search_build_match_regex(&pattern, CAMEL_SEARCH_MATCH_ICASE, argc, argv, fms->ex) == 0) {
-		r->value.bool = camel_search_message_body_contains((CamelDataWrapper *)fms->message, &pattern);
-		regfree(&pattern);
-	} else
-		r->value.bool = FALSE;
-	
-	return r;
-}
-
-static ESExpResult *
-body_regex (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
-	ESExpResult *r = e_sexp_result_new(f, ESEXP_RES_BOOL);
-	regex_t pattern;
-
-	if (camel_search_build_match_regex(&pattern, CAMEL_SEARCH_MATCH_ICASE|CAMEL_SEARCH_MATCH_REGEX, argc, argv, fms->ex) == 0) {
-		r->value.bool = camel_search_message_body_contains((CamelDataWrapper *)fms->message, &pattern);
-		regfree(&pattern);
-	} else
-		r->value.bool = FALSE;
-	
-	return r;
-}
-
-static ESExpResult *
-user_flag (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
-	ESExpResult *r;
-	gboolean truth = FALSE;
-	int i;
-	
-	/* performs an OR of all words */
-	for (i = 0; i < argc && !truth; i++) {
-		if (argv[i]->type == ESEXP_RES_STRING
-		    && camel_flag_get (&fms->info->user_flags, argv[i]->value.string)) {
-			truth = TRUE;
-			break;
-		}
-	}
-	
-	r = e_sexp_result_new (f, ESEXP_RES_BOOL);
-	r->value.bool = truth;
-	
-	return r;
-}
-
-static ESExpResult *
-system_flag (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
-	ESExpResult *r;
-	gboolean truth = FALSE;
-	
-	if (argc == 1)
-		truth = camel_system_flag_get (fms->info->flags, argv[0]->value.string);
-	
-	r = e_sexp_result_new (f, ESEXP_RES_BOOL);
-	r->value.bool = truth;
-	
-	return r;
-}
-
-static ESExpResult *
-user_tag (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
-	ESExpResult *r;
-	const char *tag;
-	
-	tag = camel_tag_get (&fms->info->user_tags, argv[0]->value.string);
-	
-	r = e_sexp_result_new (f, ESEXP_RES_STRING);
-	r->value.string = g_strdup (tag ? tag : "");
-	
-	return r;
-}
-
-static ESExpResult *
-get_sent_date (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
-	ESExpResult *r;
-	
-	r = e_sexp_result_new (f, ESEXP_RES_INT);
-	r->value.number = camel_mime_message_get_date (fms->message, NULL);
-	
-	return r;
-}
-
-static ESExpResult *
-get_received_date (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
-	ESExpResult *r;
-	
-	r = e_sexp_result_new (f, ESEXP_RES_INT);
-	r->value.number = camel_mime_message_get_date_received (fms->message, NULL);
-	
-	return r;
-}
-
-static ESExpResult *
-get_current_date (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
-	ESExpResult *r;
-	
-	r = e_sexp_result_new (f, ESEXP_RES_INT);
-	r->value.number = time (NULL);
-	
-	return r;
-}
-
-static ESExpResult *
-get_score (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
-	ESExpResult *r;
-	const char *tag;
-	
-	tag = camel_tag_get (&fms->info->user_tags, "score");
-	
-	r = e_sexp_result_new (f, ESEXP_RES_INT);
-	if (tag)
-		r->value.number = atoi (tag);
-	else
-		r->value.number = 0;
-	
-	return r;
-}
-
-static ESExpResult *
-get_source (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
-	ESExpResult *r;
-	
-	r = e_sexp_result_new (f, ESEXP_RES_STRING);
-	if (fms->source) {
-		r->value.string = e_url_shroud (fms->source);
-	} else {
-		r->value.string = g_strdup (camel_mime_message_get_source (fms->message));
-	}
-	
-	return r;
-}
-
-/* remember, the size comparisons are done at Kbytes */
-static ESExpResult *
-get_size (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
-	ESExpResult *r;
-	
-	r = e_sexp_result_new(f, ESEXP_RES_INT);
-	r->value.number = fms->info->size / 1024;
-
-	return r;
-}
-
-gboolean
-camel_filter_search_match (CamelMimeMessage *message, CamelMessageInfo *info,
-			   const char *source, const char *expression, CamelException *ex)
-{
-	FilterMessageSearch fms;
-	ESExp *sexp;
-	ESExpResult *result;
-	gboolean retval;
-	int i;
-	
-	fms.message = message;
-	fms.info = info;
-	fms.source = source;
-	fms.ex = ex;
-	
-	sexp = e_sexp_new ();
-	
-	for (i = 0; i < sizeof (symbols) / sizeof (symbols[0]); i++) {
-		if (symbols[i].type == 1)
-			e_sexp_add_ifunction (sexp, 0, symbols[i].name, (ESExpIFunc *)symbols[i].func, &fms);
-		else
-			e_sexp_add_function (sexp, 0, symbols[i].name, symbols[i].func, &fms);
-	}
-	
-	e_sexp_input_text (sexp, expression, strlen (expression));
-	if (e_sexp_parse (sexp) == -1) {
-		if (!camel_exception_is_set (ex))
-			camel_exception_setv (ex, 1, _("Error executing filter search: %s: %s"),
-					      e_sexp_error (sexp), expression);
-		goto error;
-	}
-	result = e_sexp_eval (sexp);
-	if (result == NULL) {
-		if (!camel_exception_is_set (ex))
-			camel_exception_setv (ex, 1, _("Error executing filter search: %s: %s"),
-					      e_sexp_error (sexp), expression);
-		goto error;
-	}
-	
-	if (result->type == ESEXP_RES_BOOL)
-		retval = result->value.bool;
-	else
-		retval = FALSE;
-	
-	e_sexp_result_free (sexp, result);
-	e_sexp_unref (sexp);
-	
-	return retval;
-	
-error:
-	e_sexp_unref (sexp);
-	return FALSE;
-}
diff --git a/camel/camel-filter-search.h b/camel/camel-filter-search.h
deleted file mode 100644
index 1482f70539..0000000000
--- a/camel/camel-filter-search.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- *  Authors: Jeffrey Stedfast 
- *	     Michael Zucchi 
- *
- *  Copyright 2000 Ximian, Inc. (www.ximian.com)
- *  Copyright 2001 Ximian Inc. (www.ximian.com)
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
- *
- */
-
-#ifndef CAMEL_FILTER_SEARCH_H
-#define CAMEL_FILTER_SEARCH_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include 
-#include 
-#include 
-
-gboolean camel_filter_search_match(CamelMimeMessage *message, CamelMessageInfo *info,
-				   const char *source, const char *expression, CamelException *ex); 
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* ! CAMEL_FILTER_SEARCH_H */
diff --git a/camel/camel-folder-search.c b/camel/camel-folder-search.c
deleted file mode 100644
index 72a2dce139..0000000000
--- a/camel/camel-folder-search.c
+++ /dev/null
@@ -1,905 +0,0 @@
-/*
- *  Copyright (C) 2000,2001 Ximian Inc.
- *
- *  Authors: Michael Zucchi 
- *
- *  This program is free software; you can redistribute it and/or 
- *  modify it under the terms of the GNU General Public License as 
- *  published by the Free Software Foundation; either version 2 of the
- *  License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- *  USA
- */
-
-/* This is a helper class for folders to implement the search function.
-   It implements enough to do basic searches on folders that can provide
-   an in-memory summary and a body index. */
-
-#ifdef HAVE_CONFIG_H
-#include 
-#endif
-
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include 
-
-#include "camel-folder-search.h"
-#include "string-utils.h"
-
-#include "camel-exception.h"
-#include "camel-medium.h"
-#include "camel-multipart.h"
-#include "camel-mime-message.h"
-#include "camel-stream-mem.h"
-#include "e-util/e-memory.h"
-#include "camel-search-private.h"
-
-#define d(x) 
-#define r(x) 
-
-struct _CamelFolderSearchPrivate {
-	GHashTable *mempool_hash;
-	CamelException *ex;
-};
-
-#define _PRIVATE(o) (((CamelFolderSearch *)(o))->priv)
-
-static ESExpResult *search_header_contains(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search);
-static ESExpResult *search_header_matches(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search);
-static ESExpResult *search_header_starts_with(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search);
-static ESExpResult *search_header_ends_with(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search);
-static ESExpResult *search_header_exists(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search);
-static ESExpResult *search_match_all(struct _ESExp *f, int argc, struct _ESExpTerm **argv, CamelFolderSearch *search);
-static ESExpResult *search_body_contains(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search);
-static ESExpResult *search_user_flag(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-static ESExpResult *search_user_tag(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-static ESExpResult *search_system_flag(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-static ESExpResult *search_get_sent_date(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-static ESExpResult *search_get_received_date(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-static ESExpResult *search_get_current_date(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-static ESExpResult *search_uid(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-
-static ESExpResult *search_dummy(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search);
-
-static void camel_folder_search_class_init (CamelFolderSearchClass *klass);
-static void camel_folder_search_init       (CamelFolderSearch *obj);
-static void camel_folder_search_finalize   (CamelObject *obj);
-
-static CamelObjectClass *camel_folder_search_parent;
-
-static void
-camel_folder_search_class_init (CamelFolderSearchClass *klass)
-{
-	camel_folder_search_parent = camel_type_get_global_classfuncs (camel_object_get_type ());
-
-	klass->match_all = search_match_all;
-	klass->body_contains = search_body_contains;
-	klass->header_contains = search_header_contains;
-	klass->header_matches = search_header_matches;
-	klass->header_starts_with = search_header_starts_with;
-	klass->header_ends_with = search_header_ends_with;
-	klass->header_exists = search_header_exists;
-	klass->user_tag = search_user_tag;
-	klass->user_flag = search_user_flag;
-	klass->system_flag = search_system_flag;
-	klass->get_sent_date = search_get_sent_date;
-	klass->get_received_date = search_get_received_date;
-	klass->get_current_date = search_get_current_date;
-	klass->uid = search_uid;
-}
-
-static void
-camel_folder_search_init (CamelFolderSearch *obj)
-{
-	struct _CamelFolderSearchPrivate *p;
-
-	p = _PRIVATE(obj) = g_malloc0(sizeof(*p));
-
-	obj->sexp = e_sexp_new();
-
-	/* use a hash of mempools to associate the returned uid lists with
-	   the backing mempool.  yes pretty weird, but i didn't want to change
-	   the api just yet */
-
-	p->mempool_hash = g_hash_table_new(0, 0);
-}
-
-static void
-free_mempool(void *key, void *value, void *data)
-{
-	GPtrArray *uids = key;
-	EMemPool *pool = value;
-
-	g_warning("Search closed with outstanding result unfreed: %p", uids);
-
-	g_ptr_array_free(uids, TRUE);
-	e_mempool_destroy(pool);
-}
-
-static void
-camel_folder_search_finalize (CamelObject *obj)
-{
-	CamelFolderSearch *search = (CamelFolderSearch *)obj;
-	struct _CamelFolderSearchPrivate *p = _PRIVATE(obj);
-
-	if (search->sexp)
-		e_sexp_unref(search->sexp);
-
-	g_free(search->last_search);
-	g_hash_table_foreach(p->mempool_hash, free_mempool, obj);
-	g_hash_table_destroy(p->mempool_hash);
-	g_free(p);
-}
-
-CamelType
-camel_folder_search_get_type (void)
-{
-	static CamelType type = CAMEL_INVALID_TYPE;
-	
-	if (type == CAMEL_INVALID_TYPE) {
-		type = camel_type_register (camel_object_get_type (), "CamelFolderSearch",
-					    sizeof (CamelFolderSearch),
-					    sizeof (CamelFolderSearchClass),
-					    (CamelObjectClassInitFunc) camel_folder_search_class_init,
-					    NULL,
-					    (CamelObjectInitFunc) camel_folder_search_init,
-					    (CamelObjectFinalizeFunc) camel_folder_search_finalize);
-	}
-	
-	return type;
-}
-
-#ifdef offsetof
-#define CAMEL_STRUCT_OFFSET(type, field)        ((gint) offsetof (type, field))
-#else
-#define CAMEL_STRUCT_OFFSET(type, field)        ((gint) ((gchar*) &((type *) 0)->field))
-#endif
-
-struct {
-	char *name;
-	int offset;
-	int flags;		/* 0x02 = immediate, 0x01 = always enter */
-} builtins[] = {
-	/* these have default implementations in e-sexp */
-	{ "and", CAMEL_STRUCT_OFFSET(CamelFolderSearchClass, and), 2 },
-	{ "or", CAMEL_STRUCT_OFFSET(CamelFolderSearchClass, or), 2 },
-	{ "not", CAMEL_STRUCT_OFFSET(CamelFolderSearchClass, not), 2 },
-	{ "<", CAMEL_STRUCT_OFFSET(CamelFolderSearchClass, lt), 2 },
-	{ ">", CAMEL_STRUCT_OFFSET(CamelFolderSearchClass, gt), 2 },
-	{ "=", CAMEL_STRUCT_OFFSET(CamelFolderSearchClass, eq), 2 },
-
-	/* these we have to use our own default if there is none */
-	/* they should all be defined in the language? so it poarses, or should they not?? */
-	{ "match-all", CAMEL_STRUCT_OFFSET(CamelFolderSearchClass, match_all), 3 },
-	{ "body-contains", CAMEL_STRUCT_OFFSET(CamelFolderSearchClass, body_contains), 1 },
-	{ "header-contains", CAMEL_STRUCT_OFFSET(CamelFolderSearchClass, header_contains), 1 },
-	{ "header-matches", CAMEL_STRUCT_OFFSET(CamelFolderSearchClass, header_matches), 1 },
-	{ "header-starts-with", CAMEL_STRUCT_OFFSET(CamelFolderSearchClass, header_starts_with), 1 },
-	{ "header-ends-with", CAMEL_STRUCT_OFFSET(CamelFolderSearchClass, header_ends_with), 1 },
-	{ "header-exists", CAMEL_STRUCT_OFFSET(CamelFolderSearchClass, header_exists), 1 },
-	{ "user-tag", CAMEL_STRUCT_OFFSET(CamelFolderSearchClass, user_tag), 1 },
-	{ "user-flag", CAMEL_STRUCT_OFFSET(CamelFolderSearchClass, user_flag), 1 },
-	{ "system-flag", CAMEL_STRUCT_OFFSET(CamelFolderSearchClass, system_flag), 1 },
-	{ "get-sent-date", CAMEL_STRUCT_OFFSET(CamelFolderSearchClass, get_sent_date), 1 },
-	{ "get-received-date", CAMEL_STRUCT_OFFSET(CamelFolderSearchClass, get_received_date), 1 },
-	{ "get-current-date", CAMEL_STRUCT_OFFSET(CamelFolderSearchClass, get_current_date), 1 },
-	{ "uid", CAMEL_STRUCT_OFFSET(CamelFolderSearchClass, uid), 1 },
-};
-
-void
-camel_folder_search_construct (CamelFolderSearch *search)
-{
-	int i;
-	CamelFolderSearchClass *klass = (CamelFolderSearchClass *)CAMEL_OBJECT_GET_CLASS(search);
-
-	for (i=0;is.type));
-			func = (void *)search_dummy;
-		}
-		if (func != NULL) {
-			if (builtins[i].flags&2) {
-				e_sexp_add_ifunction(search->sexp, 0, builtins[i].name, (ESExpIFunc *)func, search);
-			} else {
-				e_sexp_add_function(search->sexp, 0, builtins[i].name, (ESExpFunc *)func, search);
-			}
-		}
-	}
-}
-
-/**
- * camel_folder_search_new:
- *
- * Create a new CamelFolderSearch object.
- * 
- * A CamelFolderSearch is a subclassable, extensible s-exp
- * evaluator which enforces a particular set of s-expressions.
- * Particular methods may be overriden by an implementation to
- * implement a search for any sort of backend.
- *
- * Return value: A new CamelFolderSearch widget.
- **/
-CamelFolderSearch *
-camel_folder_search_new (void)
-{
-	CamelFolderSearch *new = CAMEL_FOLDER_SEARCH ( camel_object_new (camel_folder_search_get_type ()));
-
-	camel_folder_search_construct(new);
-	return new;
-}
-
-/**
- * camel_folder_search_set_folder:
- * @search:
- * @folder: A folder.
- * 
- * Set the folder attribute of the search.  This is currently unused, but
- * could be used to perform a slow-search when indexes and so forth are not
- * available.  Or for use by subclasses.
- **/
-void
-camel_folder_search_set_folder(CamelFolderSearch *search, CamelFolder *folder)
-{
-	search->folder = folder;
-}
-
-/**
- * camel_folder_search_set_summary:
- * @search: 
- * @summary: An array of CamelMessageInfo pointers.
- * 
- * Set the array of summary objects representing the span of the search.
- *
- * If this is not set, then a subclass must provide the functions
- * for searching headers and for the match-all operator.
- **/
-void
-camel_folder_search_set_summary(CamelFolderSearch *search, GPtrArray *summary)
-{
-	search->summary = summary;
-}
-
-/**
- * camel_folder_search_set_body_index:
- * @search: 
- * @index: 
- * 
- * Set the index (ibex) representing the contents of all messages
- * in this folder.  If this is not set, then the folder implementation
- * should sub-class the CamelFolderSearch and provide its own
- * body-contains function.
- **/
-void
-camel_folder_search_set_body_index(CamelFolderSearch *search, ibex *index)
-{
-	search->body_index = index;
-}
-
-/**
- * camel_folder_search_execute_expression:
- * @search: 
- * @expr: 
- * @ex: 
- * 
- * Execute the search expression @expr, returning an array of
- * all matches as a GPtrArray of uid's of matching messages.
- *
- * Note that any settings such as set_body_index(), set_folder(),
- * and so on are reset to #NULL once the search has completed.
- *
- * TODO: The interface should probably return summary items instead
- * (since they are much more useful to any client).
- * 
- * Return value: A GPtrArray of strings of all matching messages.
- * This must only be freed by camel_folder_search_free_result.
- **/
-GPtrArray *
-camel_folder_search_execute_expression(CamelFolderSearch *search, const char *expr, CamelException *ex)
-{
-	ESExpResult *r;
-	GPtrArray *matches;
-	int i;
-	GHashTable *results;
-	EMemPool *pool;
-	struct _CamelFolderSearchPrivate *p = _PRIVATE(search);
-
-	p->ex = ex;
-
-	/* only re-parse if the search has changed */
-	if (search->last_search == NULL
-	    || strcmp(search->last_search, expr)) {
-		e_sexp_input_text(search->sexp, expr, strlen(expr));
-		if (e_sexp_parse(search->sexp) == -1) {
-			camel_exception_setv(ex, 1, _("Cannot parse search expression: %s:\n%s"), e_sexp_error(search->sexp), expr);
-			return NULL;
-		}
-
-		g_free(search->last_search);
-		search->last_search = g_strdup(expr);
-	}
-	r = e_sexp_eval(search->sexp);
-	if (r == NULL) {
-		if (!camel_exception_is_set(ex))
-			camel_exception_setv(ex, 1, _("Error executing search expression: %s:\n%s"), e_sexp_error(search->sexp), expr);
-		return NULL;
-	}
-
-	matches = g_ptr_array_new();
-
-	/* now create a folder summary to return?? */
-	if (r
-	    && r->type == ESEXP_RES_ARRAY_PTR) {
-		d(printf("got result ...\n"));
-		/* we use a mempool to store the strings, packed in tight as possible, and freed together */
-		/* because the strings are often short (like <8 bytes long), we would be wasting appx 50%
-		   of memory just storing the size tag that malloc assigns us and alignment padding, so this
-		   gets around that (and is faster to allocate and free as a bonus) */
-		pool = e_mempool_new(512, 256, E_MEMPOOL_ALIGN_BYTE);
-		if (search->summary) {
-			/* reorder result in summary order */
-			results = g_hash_table_new(g_str_hash, g_str_equal);
-			for (i=0;ivalue.ptrarray->len;i++) {
-				d(printf("adding match: %s\n", (char *)g_ptr_array_index(r->value.ptrarray, i)));
-				g_hash_table_insert(results, g_ptr_array_index(r->value.ptrarray, i), (void *)1);
-			}
-			for (i=0;isummary->len;i++) {
-				CamelMessageInfo *info = g_ptr_array_index(search->summary, i);
-				char *uid = (char *)camel_message_info_uid(info);
-				if (g_hash_table_lookup(results, uid)) {
-					g_ptr_array_add(matches, e_mempool_strdup(pool, uid));
-				}
-			}
-			g_hash_table_destroy(results);
-		} else {
-			for (i=0;ivalue.ptrarray->len;i++) {
-				d(printf("adding match: %s\n", (char *)g_ptr_array_index(r->value.ptrarray, i)));
-				g_ptr_array_add(matches, e_mempool_strdup(pool, g_ptr_array_index(r->value.ptrarray, i)));
-			}
-		}
-		e_sexp_result_free(search->sexp, r);
-		/* instead of putting the mempool_hash in the structure, we keep the api clean by
-		   putting a reference to it in a hashtable.  Lets us do some debugging and catch
-		   unfree'd results as well. */
-		g_hash_table_insert(p->mempool_hash, matches, pool);
-	} else {
-		printf("no result!\n");
-	}
-
-	search->folder = NULL;
-	search->summary = NULL;
-	search->current = NULL;
-	search->body_index = NULL;
-
-	return matches;
-}
-
-/**
- * camel_folder_search_match_expression:
- * @search: 
- * @expr: 
- * @info: 
- * @ex: 
- * 
- * Returns #TRUE if the expression matches the specific message info @info.
- * Note that the folder and index may need to be set for body searches to
- * operate as well.
- * 
- * Return value: 
- **/
-gboolean
-camel_folder_search_match_expression(CamelFolderSearch *search, const char *expr, const CamelMessageInfo *info, CamelException *ex)
-{
-	GPtrArray *uids;
-	int ret = FALSE;
-
-	search->match1 = (CamelMessageInfo *)info;
-
-	uids = camel_folder_search_execute_expression(search, expr, ex);
-	if (uids) {
-		if (uids->len == 1)
-			ret = TRUE;
-		camel_folder_search_free_result(search, uids);
-	}
-	search->match1 = NULL;
-
-	return ret;
-}
-
-void camel_folder_search_free_result(CamelFolderSearch *search, GPtrArray *result)
-{
-	int i;
-	struct _CamelFolderSearchPrivate *p = _PRIVATE(search);
-	EMemPool *pool;
-
-	pool = g_hash_table_lookup(p->mempool_hash, result);
-	if (pool) {
-		e_mempool_destroy(pool);
-		g_hash_table_remove(p->mempool_hash, result);
-	} else {
-		for (i=0;ilen;i++)
-			g_free(g_ptr_array_index(result, i));
-	}
-	g_ptr_array_free(result, TRUE);
-}
-
-
-
-
-/* dummy function, returns false always, or an empty match array */
-static ESExpResult *
-search_dummy(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search)
-{
-	ESExpResult *r;
-
-	if (search->current == NULL) {
-		r = e_sexp_result_new(f, ESEXP_RES_BOOL);
-		r->value.bool = FALSE;
-	} else {
-		r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR);
-		r->value.ptrarray = g_ptr_array_new();
-	}
-
-	return r;
-}
-
-static ESExpResult *
-search_match_all(struct _ESExp *f, int argc, struct _ESExpTerm **argv, CamelFolderSearch *search)
-{
-	int i;
-	ESExpResult *r, *r1;
-
-	if (argc>1) {
-		g_warning("match-all only takes a single argument, other arguments ignored");
-	}
-	r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR);
-	r->value.ptrarray = g_ptr_array_new();
-
-	/* we are only matching a single message? */
-	if (search->match1) {
-		search->current = search->match1;
-
-		d(printf("matching against 1 message: %s\n", camel_message_info_subject(search->current)));
-
-		if (argc>0) {
-			r1 = e_sexp_term_eval(f, argv[0]);
-			if (r1->type == ESEXP_RES_BOOL) {
-				if (r1->value.bool)
-					g_ptr_array_add(r->value.ptrarray, (char *)camel_message_info_uid(search->current));
-			} else {
-				g_warning("invalid syntax, matches require a single bool result");
-				e_sexp_fatal_error(f, _("(match-all) requires a single bool result"));
-			}
-			e_sexp_result_free(f, r1);
-		} else {
-			g_ptr_array_add(r->value.ptrarray, (char *)camel_message_info_uid(search->current));
-		}
-		search->current = NULL;
-
-		return r;
-	}
-
-	if (search->summary == NULL) {
-		/* TODO: make it work - e.g. use the folder and so forth for a slower search */
-		g_warning("No summary supplied, match-all doesn't work with no summary");
-		g_assert(0);
-		return r;
-	}
-
-	/* TODO: Could make this a bit faster in the uncommon case (of match-everything) */
-	for (i=0;isummary->len;i++) {
-		search->current = g_ptr_array_index(search->summary, i);
-		if (argc>0) {
-			r1 = e_sexp_term_eval(f, argv[0]);
-			if (r1->type == ESEXP_RES_BOOL) {
-				if (r1->value.bool)
-					g_ptr_array_add(r->value.ptrarray, (char *)camel_message_info_uid(search->current));
-			} else {
-				g_warning("invalid syntax, matches require a single bool result");
-				e_sexp_fatal_error(f, _("(match-all) requires a single bool result"));
-			}
-			e_sexp_result_free(f, r1);
-		} else {
-			g_ptr_array_add(r->value.ptrarray, (char *)camel_message_info_uid(search->current));
-		}
-	}
-	search->current = NULL;
-
-	return r;
-}
-
-static ESExpResult *
-check_header(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search, camel_search_match_t how)
-{
-	ESExpResult *r;
-	int truth = FALSE;
-
-	r(printf("executing check-header %d\n", how));
-
-	/* are we inside a match-all? */
-	if (search->current && argc>1
-	    && argv[0]->type == ESEXP_RES_STRING) {
-		char *headername;
-		const char *header = NULL;
-		char strbuf[32];
-		int i;
-
-		/* only a subset of headers are supported .. */
-		headername = argv[0]->value.string;
-		if (!strcasecmp(headername, "subject")) {
-			header = camel_message_info_subject(search->current);
-		} else if (!strcasecmp(headername, "date")) {
-			/* FIXME: not a very useful form of the date */
-			sprintf(strbuf, "%d", (int)search->current->date_sent);
-			header = strbuf;
-		} else if (!strcasecmp(headername, "from")) {
-			header = camel_message_info_from(search->current);
-		} else if (!strcasecmp(headername, "to")) {
-			header = camel_message_info_to(search->current);
-		} else if (!strcasecmp(headername, "cc")) {
-			header = camel_message_info_cc(search->current);
-		} else if (!strcasecmp(headername, "x-camel-mlist")) {
-			header = camel_message_info_mlist(search->current);
-		} else {
-			e_sexp_resultv_free(f, argc, argv);
-			e_sexp_fatal_error(f, _("Performing query on unknown header: %s"), headername);
-		}
-
-		if (header) {
-			/* performs an OR of all words */
-			for (i=1;itype == ESEXP_RES_STRING
-				    && camel_search_header_match(header, argv[i]->value.string, how)) {
-					truth = TRUE;
-				}
-			}
-		}
-	}
-	/* TODO: else, find all matches */
-
-	r = e_sexp_result_new(f, ESEXP_RES_BOOL);
-	r->value.bool = truth;
-
-	return r;
-}
-
-static ESExpResult *
-search_header_contains(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search)
-{
-	return check_header(f, argc, argv, search, CAMEL_SEARCH_MATCH_CONTAINS);
-}
-
-static ESExpResult *
-search_header_matches(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search)
-{
-	return check_header(f, argc, argv, search, CAMEL_SEARCH_MATCH_EXACT);
-}
-
-static ESExpResult *
-search_header_starts_with (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search)
-{
-	return check_header(f, argc, argv, search, CAMEL_SEARCH_MATCH_STARTS);
-}
-
-static ESExpResult *
-search_header_ends_with (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search)
-{
-	return check_header(f, argc, argv, search, CAMEL_SEARCH_MATCH_ENDS);
-}
-
-static ESExpResult *
-search_header_exists (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search)
-{
-	ESExpResult *r;
-	
-	r(printf ("executing header-exists\n"));
-	
-	if (search->current) {
-		r = e_sexp_result_new(f, ESEXP_RES_BOOL);
-		if (argc == 1 && argv[0]->type == ESEXP_RES_STRING)
-			r->value.bool = camel_medium_get_header(CAMEL_MEDIUM(search->current), argv[0]->value.string) != NULL;
-		
-	} else {
-		r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR);
-		r->value.ptrarray = g_ptr_array_new();
-	}
-	
-	return r;
-}
-
-/* this is just to OR results together */
-struct _glib_sux_donkeys {
-	int count;
-	GPtrArray *uids;
-};
-
-/* or, store all unique values */
-static void
-g_lib_sux_htor(char *key, int value, struct _glib_sux_donkeys *fuckup)
-{
-	g_ptr_array_add(fuckup->uids, key);
-}
-
-static int
-match_message(CamelFolder *folder, const char *uid, regex_t *pattern, CamelException *ex)
-{
-	CamelMimeMessage *msg;
-	int truth = FALSE;
-
-	msg = camel_folder_get_message(folder, uid, ex);
-	if (!camel_exception_is_set(ex) && msg!=NULL) {
-		truth = camel_search_message_body_contains((CamelDataWrapper *)msg, pattern);
-		camel_object_unref((CamelObject *)msg);
-	}
-	return truth;
-}
-
-static ESExpResult *
-search_body_contains(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search)
-{
-	ESExpResult *r;
-	int i, j;
-	regex_t pattern;
-
-	if (search->current) {
-		int truth = FALSE;
-
-		if (argc == 1 && argv[0]->value.string[0] == 0 && search->folder) {
-			truth = TRUE;
-		} else if (search->body_index) {
-			for (i=0;itype == ESEXP_RES_STRING) {
-					truth = ibex_find_name(search->body_index, (char *)camel_message_info_uid(search->current),
-							       argv[i]->value.string);
-				} else {
-					e_sexp_resultv_free(f, argc, argv);
-					e_sexp_fatal_error(f, _("Invalid type in body-contains, expecting string"));
-				}
-			}
-		} else if (search->folder) {
-			/* we do a 'slow' direct search */
-			if (camel_search_build_match_regex(&pattern, CAMEL_SEARCH_MATCH_REGEX|CAMEL_SEARCH_MATCH_ICASE, argc, argv, search->priv->ex) == 0) {
-				truth = match_message(search->folder, camel_message_info_uid(search->current), &pattern, search->priv->ex);
-				regfree(&pattern);
-			}
-		} else {
-			g_warning("Cannot perform indexed body query with no index or folder set");
-		}
-		r = e_sexp_result_new(f, ESEXP_RES_BOOL);
-		r->value.bool = truth;
-	} else {
-		r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR);
-
-		if (argc == 1 && argv[0]->value.string[0] == 0 && search->folder) {
-			/* optimise the match "" case - match everything */
-			r->value.ptrarray = g_ptr_array_new();
-			for (i=0;isummary->len;i++) {
-				CamelMessageInfo *info = g_ptr_array_index(search->summary, i);
-				g_ptr_array_add(r->value.ptrarray, (char *)camel_message_info_uid(info));
-			}
-		} else if (search->body_index) {
-			if (argc==1) {
-				/* common case */
-				r->value.ptrarray = ibex_find(search->body_index, argv[0]->value.string);
-			} else {
-				GHashTable *ht = g_hash_table_new(g_str_hash, g_str_equal);
-				GPtrArray *pa;
-				struct _glib_sux_donkeys lambdafoo;
-
-				/* this sux, perform an or operation on the result(s) of each word */
-				for (i=0;itype == ESEXP_RES_STRING) {
-						pa = ibex_find(search->body_index, argv[i]->value.string);
-						for (j=0;jlen;j++) {
-							g_hash_table_insert(ht, g_ptr_array_index(pa, j), (void *)1);
-						}
-						g_ptr_array_free(pa, FALSE);
-					} else {
-						e_sexp_result_free(f, r);
-						e_sexp_resultv_free(f, argc, argv);
-						e_sexp_fatal_error(f, _("Invalid type in body-contains, expecting string"));
-					}
-				}
-				lambdafoo.uids = g_ptr_array_new();
-				g_hash_table_foreach(ht, (GHFunc)g_lib_sux_htor, &lambdafoo);
-				r->value.ptrarray = lambdafoo.uids;
-				g_hash_table_destroy(ht);
-			}
-		} else if (search->folder) {
-			/* do a slow search */
-			r->value.ptrarray = g_ptr_array_new();
-			if (camel_search_build_match_regex(&pattern, CAMEL_SEARCH_MATCH_REGEX|CAMEL_SEARCH_MATCH_ICASE, argc, argv, search->priv->ex) == 0) {
-				if (search->summary) {
-					for (i=0;isummary->len;i++) {
-						CamelMessageInfo *info = g_ptr_array_index(search->summary, i);
-
-						if (match_message(search->folder, camel_message_info_uid(info), &pattern, search->priv->ex))
-							g_ptr_array_add(r->value.ptrarray, (char *)camel_message_info_uid(info));
-					}
-				} /* else?  we could always get the summary from the folder, but then
-				     we need to free it later somehow */
-				regfree(&pattern);
-			}
-		} else {
-			g_warning("Cannot perform indexed body query with no index or folder set");
-			r->value.ptrarray = g_ptr_array_new();
-		}
-	}
-
-	return r;
-}
-
-static ESExpResult *
-search_user_flag(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search)
-{
-	ESExpResult *r;
-	int i;
-
-	r(printf("executing user-flag\n"));
-
-	/* are we inside a match-all? */
-	if (search->current) {
-		int truth = FALSE;
-		/* performs an OR of all words */
-		for (i=0;itype == ESEXP_RES_STRING
-			    && camel_flag_get(&search->current->user_flags, argv[i]->value.string)) {
-				truth = TRUE;
-				break;
-			}
-		}
-		r = e_sexp_result_new(f, ESEXP_RES_BOOL);
-		r->value.bool = truth;
-	} else {
-		r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR);
-		r->value.ptrarray = g_ptr_array_new();
-	}
-
-	return r;
-}
-
-static ESExpResult *
-search_system_flag (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search)
-{
-	ESExpResult *r;
-	
-	r(printf ("executing system-flag\n"));
-	
-	if (search->current) {
-		gboolean truth = FALSE;
-		
-		if (argc == 1)
-			truth = camel_system_flag_get (search->current->flags, argv[0]->value.string);
-		
-		r = e_sexp_result_new(f, ESEXP_RES_BOOL);
-		r->value.bool = truth;
-	} else {
-		r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR);
-		r->value.ptrarray = g_ptr_array_new ();
-	}
-	
-	return r;
-}
-
-static ESExpResult *search_user_tag(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search)
-{
-	ESExpResult *r;
-
-	r(printf("executing user-tag\n"));
-
-	/* are we inside a match-all? */
-	if (search->current) {
-		const char *value = NULL;
-		if (argc == 1) {
-			value = camel_tag_get(&search->current->user_tags, argv[0]->value.string);
-		}
-		r = e_sexp_result_new(f, ESEXP_RES_STRING);
-		r->value.string = g_strdup(value?value:"");
-	} else {
-		r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR);
-		r->value.ptrarray = g_ptr_array_new();
-	}
-
-	return r;
-}
-
-static ESExpResult *
-search_get_sent_date(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s)
-{
-	ESExpResult *r;
-
-	r(printf("executing get-sent-date\n"));
-
-	/* are we inside a match-all? */
-	if (s->current) {
-		r = e_sexp_result_new(f, ESEXP_RES_INT);
-
-		r->value.number = s->current->date_sent;
-	} else {
-		r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR);
-		r->value.ptrarray = g_ptr_array_new ();
-	}
-
-	return r;
-}
-
-static ESExpResult *
-search_get_received_date(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s)
-{
-	ESExpResult *r;
-
-	r(printf("executing get-received-date\n"));
-
-	/* are we inside a match-all? */
-	if (s->current) {
-		r = e_sexp_result_new(f, ESEXP_RES_INT);
-
-		r->value.number = s->current->date_received;
-	} else {
-		r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR);
-		r->value.ptrarray = g_ptr_array_new ();
-	}
-
-	return r;
-}
-
-static ESExpResult *
-search_get_current_date(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s)
-{
-	ESExpResult *r;
-
-	r(printf("executing get-current-date\n"));
-
-	r = e_sexp_result_new(f, ESEXP_RES_INT);
-	r->value.number = time (NULL);
-	return r;
-}
-
-static ESExpResult *
-search_uid(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search)
-{
-	ESExpResult *r;
-	int i;
-
-	r(printf("executing uid\n"));
-
-	/* are we inside a match-all? */
-	if (search->current) {
-		int truth = FALSE;
-		const char *uid = camel_message_info_uid(search->current);
-
-		/* performs an OR of all words */
-		for (i=0;itype == ESEXP_RES_STRING
-			    && !strcmp(uid, argv[i]->value.string)) {
-				truth = TRUE;
-				break;
-			}
-		}
-		r = e_sexp_result_new(f, ESEXP_RES_BOOL);
-		r->value.bool = truth;
-	} else {
-		r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR);
-		r->value.ptrarray = g_ptr_array_new();
-		for (i=0;itype == ESEXP_RES_STRING)
-				g_ptr_array_add(r->value.ptrarray, argv[i]->value.string);
-		}
-	}
-
-	return r;
-}
diff --git a/camel/camel-folder-search.h b/camel/camel-folder-search.h
deleted file mode 100644
index e08540e4d9..0000000000
--- a/camel/camel-folder-search.h
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- *  Copyright (C) 2000 Ximian Inc.
- *
- *  Authors: Michael Zucchi 
- *
- *  This program is free software; you can redistribute it and/or 
- *  modify it under the terms of the GNU General Public License as 
- *  published by the Free Software Foundation; either version 2 of the
- *  License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- *  USA
- */
-
-#ifndef _CAMEL_FOLDER_SEARCH_H
-#define _CAMEL_FOLDER_SEARCH_H
-
-#include 
-#include 
-#include 
-#include 
-
-#define CAMEL_FOLDER_SEARCH_TYPE         (camel_folder_search_get_type ())
-#define CAMEL_FOLDER_SEARCH(obj)         CAMEL_CHECK_CAST (obj, camel_folder_search_get_type (), CamelFolderSearch)
-#define CAMEL_FOLDER_SEARCH_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_folder_search_get_type (), CamelFolderSearchClass)
-#define CAMEL_IS_FOLDER_SEARCH(obj)      CAMEL_CHECK_TYPE (obj, camel_folder_search_get_type ())
-
-typedef struct _CamelFolderSearchClass CamelFolderSearchClass;
-
-struct _CamelFolderSearch {
-	CamelObject parent;
-
-	struct _CamelFolderSearchPrivate *priv;
-
-	ESExp *sexp;		/* s-exp evaluator */
-	char *last_search;	/* last searched expression */
-
-	/* these are only valid during the search, and are reset afterwards */
-	CamelFolder *folder;	/* folder for current search */
-	GPtrArray *summary;	/* summary array for current search */
-	CamelMessageInfo *current; /* current message info, when searching one by one */
-	CamelMessageInfo *match1; /* message info, when searching a single message only */
-	CamelMimeMessage *current_message; /* cache of current message, if required */
-	ibex *body_index;
-};
-
-struct _CamelFolderSearchClass {
-	CamelObjectClass parent_class;
-
-	/* general bool/comparison options, usually these wont need to be set, unless it is compiling into another language */
-	ESExpResult * (*and)(struct _ESExp *f, int argc, struct _ESExpTerm **argv, CamelFolderSearch *s);
-	ESExpResult * (*or)(struct _ESExp *f, int argc, struct _ESExpTerm **argv, CamelFolderSearch *s);
-	ESExpResult * (*not)(struct _ESExp *f, int argc, struct _ESExpTerm **argv, CamelFolderSearch *s);
-	ESExpResult * (*lt)(struct _ESExp *f, int argc, struct _ESExpTerm **argv, CamelFolderSearch *s);
-	ESExpResult * (*gt)(struct _ESExp *f, int argc, struct _ESExpTerm **argv, CamelFolderSearch *s);
-	ESExpResult * (*eq)(struct _ESExp *f, int argc, struct _ESExpTerm **argv, CamelFolderSearch *s);
-
-	/* search options */
-	/* (match-all [boolean expression]) Apply match to all messages */
-	ESExpResult * (*match_all)(struct _ESExp *f, int argc, struct _ESExpTerm **argv, CamelFolderSearch *s);
-
-	/* (body-contains "string1" "string2" ...) Returns a list of matches, or true if in single-message mode */
-	ESExpResult * (*body_contains)(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-
-	/* (header-contains "headername" "string1" ...) List of matches, or true if in single-message mode */
-	ESExpResult * (*header_contains)(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-	
-	/* (header-matches "headername" "string") */
-	ESExpResult * (*header_matches)(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-	
-	/* (header-starts-with "headername" "string") */
-	ESExpResult * (*header_starts_with)(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-	
-	/* (header-ends-with "headername" "string") */
-	ESExpResult * (*header_ends_with)(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-	
-	/* (header-exists "headername") */
-	ESExpResult * (*header_exists)(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-	
-	/* (user-flag "flagname" "flagname" ...) If one of user-flag set */
-	ESExpResult * (*user_flag)(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-
-	/* (user-tag "flagname") Returns the value of a user tag.  Can only be used in match-all */
-	ESExpResult * (*user_tag)(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-	
-	/* (system-flag "flagname") Returns the value of a system flag.  Can only be used in match-all */
-	ESExpResult * (*system_flag)(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-	
-	/* (get-sent-date) Retrieve the date that the message was sent on as a time_t */
-	ESExpResult * (*get_sent_date)(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-
-	/* (get-received-date) Retrieve the date that the message was received on as a time_t */
-	ESExpResult * (*get_received_date)(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-
-	/* (get-current-date) Retrieve 'now' as a time_t */
-	ESExpResult * (*get_current_date)(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-
-	/* (uid "uid" ...) True if the uid is in the list */
-	ESExpResult * (*uid)(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-};
-
-guint		camel_folder_search_get_type	(void);
-CamelFolderSearch      *camel_folder_search_new	(void);
-void camel_folder_search_construct (CamelFolderSearch *search);
-
-void camel_folder_search_set_folder(CamelFolderSearch *search, CamelFolder *folder);
-void camel_folder_search_set_summary(CamelFolderSearch *search, GPtrArray *summary);
-void camel_folder_search_set_body_index(CamelFolderSearch *search, ibex *index);
-GPtrArray *camel_folder_search_execute_expression(CamelFolderSearch *search, const char *expr, CamelException *ex);
-gboolean camel_folder_search_match_expression(CamelFolderSearch *search, const char *expr,
-					      const CamelMessageInfo *info, CamelException *ex);
-void camel_folder_search_free_result(CamelFolderSearch *search, GPtrArray *);
-
-#endif /* ! _CAMEL_FOLDER_SEARCH_H */
diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c
deleted file mode 100644
index ac525dd619..0000000000
--- a/camel/camel-folder-summary.c
+++ /dev/null
@@ -1,2617 +0,0 @@
-/*
- *  Copyright (C) 2000 Ximian Inc.
- *
- *  Authors: Michael Zucchi 
- *
- *  This program is free software; you can redistribute it and/or 
- *  modify it under the terms of the GNU General Public License as 
- *  published by the Free Software Foundation; either version 2 of the
- *  License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- *  USA
- */
-
-#ifdef HAVE_CONFIG_H
-#include 
-#endif
-
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include "camel-folder-summary.h"
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include "hash-table-utils.h"
-#include "e-util/md5-utils.h"
-#include "e-util/e-memory.h"
-
-#include "camel-private.h"
-
-#ifdef ENABLE_THREADS
-#include 
-
-static pthread_mutex_t info_lock = PTHREAD_MUTEX_INITIALIZER;
-
-/* this lock is ONLY for the standalone messageinfo stuff */
-#define GLOBAL_INFO_LOCK(i) pthread_mutex_lock(&info_lock)
-#define GLOBAL_INFO_UNLOCK(i) pthread_mutex_unlock(&info_lock)
-#else
-#define GLOBAL_INFO_LOCK(i) 
-#define GLOBAL_INFO_UNLOCK(i) 
-#endif
-
-/* this should probably be conditional on it existing */
-#define USE_BSEARCH
-
-#define d(x)
-#define io(x)			/* io debug */
-
-#if 0
-extern int strdup_count, malloc_count, free_count;
-#endif
-
-#define CAMEL_FOLDER_SUMMARY_VERSION (12)
-
-#define _PRIVATE(o) (((CamelFolderSummary *)(o))->priv)
-
-/* trivial lists, just because ... */
-struct _node {
-	struct _node *next;
-};
-
-static struct _node *my_list_append(struct _node **list, struct _node *n);
-static int my_list_size(struct _node **list);
-
-static int summary_header_load(CamelFolderSummary *, FILE *);
-static int summary_header_save(CamelFolderSummary *, FILE *);
-
-static CamelMessageInfo * message_info_new(CamelFolderSummary *, struct _header_raw *);
-static CamelMessageInfo * message_info_new_from_parser(CamelFolderSummary *, CamelMimeParser *);
-static CamelMessageInfo * message_info_new_from_message(CamelFolderSummary *s, CamelMimeMessage *msg);
-static CamelMessageInfo * message_info_load(CamelFolderSummary *, FILE *);
-static int		  message_info_save(CamelFolderSummary *, FILE *, CamelMessageInfo *);
-static void		  message_info_free(CamelFolderSummary *, CamelMessageInfo *);
-
-static CamelMessageContentInfo * content_info_new(CamelFolderSummary *, struct _header_raw *);
-static CamelMessageContentInfo * content_info_new_from_parser(CamelFolderSummary *, CamelMimeParser *);
-static CamelMessageContentInfo * content_info_new_from_message(CamelFolderSummary *s, CamelMimePart *mp);
-static CamelMessageContentInfo * content_info_load(CamelFolderSummary *, FILE *);
-static int		         content_info_save(CamelFolderSummary *, FILE *, CamelMessageContentInfo *);
-static void		         content_info_free(CamelFolderSummary *, CamelMessageContentInfo *);
-
-static char *next_uid_string(CamelFolderSummary *s);
-
-static CamelMessageContentInfo * summary_build_content_info(CamelFolderSummary *s, CamelMessageInfo *msginfo, CamelMimeParser *mp);
-static CamelMessageContentInfo * summary_build_content_info_message(CamelFolderSummary *s, CamelMessageInfo *msginfo, CamelMimePart *object);
-
-static void camel_folder_summary_class_init (CamelFolderSummaryClass *klass);
-static void camel_folder_summary_init       (CamelFolderSummary *obj);
-static void camel_folder_summary_finalize   (CamelObject *obj);
-
-static CamelObjectClass *camel_folder_summary_parent;
-
-static void
-camel_folder_summary_class_init (CamelFolderSummaryClass *klass)
-{
-	camel_folder_summary_parent = camel_type_get_global_classfuncs (camel_object_get_type ());
-
-	klass->summary_header_load = summary_header_load;
-	klass->summary_header_save = summary_header_save;
-
-	klass->message_info_new  = message_info_new;
-	klass->message_info_new_from_parser = message_info_new_from_parser;
-	klass->message_info_new_from_message = message_info_new_from_message;
-	klass->message_info_load = message_info_load;
-	klass->message_info_save = message_info_save;
-	klass->message_info_free = message_info_free;
-
-	klass->content_info_new  = content_info_new;
-	klass->content_info_new_from_parser = content_info_new_from_parser;
-	klass->content_info_new_from_message = content_info_new_from_message;
-	klass->content_info_load = content_info_load;
-	klass->content_info_save = content_info_save;
-	klass->content_info_free = content_info_free;
-
-	klass->next_uid_string = next_uid_string;
-}
-
-static void
-camel_folder_summary_init (CamelFolderSummary *s)
-{
-	struct _CamelFolderSummaryPrivate *p;
-
-	p = _PRIVATE(s) = g_malloc0(sizeof(*p));
-
-	p->filter_charset = g_hash_table_new(g_strcase_hash, g_strcase_equal);
-
-	s->message_info_size = sizeof(CamelMessageInfo);
-	s->content_info_size = sizeof(CamelMessageContentInfo);
-
-	s->message_info_chunks = NULL;
-	s->content_info_chunks = NULL;
-
-#if defined (DOESTRV) || defined (DOEPOOLV)
-	s->message_info_strings = CAMEL_MESSAGE_INFO_LAST;
-#endif
-
-	s->version = CAMEL_FOLDER_SUMMARY_VERSION;
-	s->flags = 0;
-	s->time = 0;
-	s->nextuid = 1;
-
-	s->messages = g_ptr_array_new();
-	s->messages_uid = g_hash_table_new(g_str_hash, g_str_equal);
-
-#ifdef ENABLE_THREADS
-	p->summary_lock = g_mutex_new();
-	p->io_lock = g_mutex_new();
-	p->filter_lock = g_mutex_new();
-	p->alloc_lock = g_mutex_new();
-	p->ref_lock = g_mutex_new();
-#endif
-}
-
-static void free_o_name(void *key, void *value, void *data)
-{
-	camel_object_unref((CamelObject *)value);
-	g_free(key);
-}
-
-static void
-camel_folder_summary_finalize (CamelObject *obj)
-{
-	struct _CamelFolderSummaryPrivate *p;
-	CamelFolderSummary *s = (CamelFolderSummary *)obj;
-
-	p = _PRIVATE(obj);
-
-	camel_folder_summary_clear(s);
-	g_ptr_array_free(s->messages, TRUE);
-	g_hash_table_destroy(s->messages_uid);
-
-	g_hash_table_foreach(p->filter_charset, free_o_name, 0);
-	g_hash_table_destroy(p->filter_charset);
-
-	g_free(s->summary_path);
-
-	if (s->message_info_chunks)
-		e_memchunk_destroy(s->message_info_chunks);
-	if (s->content_info_chunks)
-		e_memchunk_destroy(s->content_info_chunks);
-
-	if (p->filter_index)
-		camel_object_unref((CamelObject *)p->filter_index);
-	if (p->filter_64)
-		camel_object_unref((CamelObject *)p->filter_64);
-	if (p->filter_qp)
-		camel_object_unref((CamelObject *)p->filter_qp);
-	if (p->filter_save)
-		camel_object_unref((CamelObject *)p->filter_save);
-	if (p->filter_html)
-		camel_object_unref((CamelObject *)p->filter_html);
-
-#ifdef ENABLE_THREADS
-	g_mutex_free(p->summary_lock);
-	g_mutex_free(p->io_lock);
-	g_mutex_free(p->filter_lock);
-	g_mutex_free(p->alloc_lock);
-	g_mutex_free(p->ref_lock);
-#endif
-
-	g_free(p);
-}
-
-CamelType
-camel_folder_summary_get_type (void)
-{
-	static CamelType type = CAMEL_INVALID_TYPE;
-	
-	if (type == CAMEL_INVALID_TYPE) {
-		type = camel_type_register (camel_object_get_type (), "CamelFolderSummary",
-					    sizeof (CamelFolderSummary),
-					    sizeof (CamelFolderSummaryClass),
-					    (CamelObjectClassInitFunc) camel_folder_summary_class_init,
-					    NULL,
-					    (CamelObjectInitFunc) camel_folder_summary_init,
-					    (CamelObjectFinalizeFunc) camel_folder_summary_finalize);
-	}
-	
-	return type;
-}
-
-/**
- * camel_folder_summary_new:
- *
- * Create a new CamelFolderSummary object.
- * 
- * Return value: A new CamelFolderSummary widget.
- **/
-CamelFolderSummary *
-camel_folder_summary_new (void)
-{
-	CamelFolderSummary *new = CAMEL_FOLDER_SUMMARY ( camel_object_new (camel_folder_summary_get_type ()));	return new;
-}
-
-
-/**
- * camel_folder_summary_set_filename:
- * @s: 
- * @name: 
- * 
- * Set the filename where the summary will be loaded to/saved from.
- **/
-void camel_folder_summary_set_filename(CamelFolderSummary *s, const char *name)
-{
-	CAMEL_SUMMARY_LOCK(s, summary_lock);
-
-	g_free(s->summary_path);
-	s->summary_path = g_strdup(name);
-
-	CAMEL_SUMMARY_UNLOCK(s, summary_lock);
-}
-
-/**
- * camel_folder_summary_set_index:
- * @s: 
- * @index: 
- * 
- * Set the index used to index body content.  If the index is NULL, or
- * not set (the default), no indexing of body content will take place.
- *
- * Unlike earlier behaviour, build_content need not be set to perform indexing.
- **/
-void camel_folder_summary_set_index(CamelFolderSummary *s, ibex *index)
-{
-	struct _CamelFolderSummaryPrivate *p = _PRIVATE(s);
-
-	p->index = index;
-}
-
-/**
- * camel_folder_summary_set_build_content:
- * @s: 
- * @state: 
- * 
- * Set a flag to tell the summary to build the content info summary
- * (CamelMessageInfo.content).  The default is not to build content info
- * summaries.
- **/
-void camel_folder_summary_set_build_content(CamelFolderSummary *s, gboolean state)
-{
-	s->build_content = state;
-}
-
-/**
- * camel_folder_summary_count:
- * @s: 
- * 
- * Get the number of summary items stored in this summary.
- * 
- * Return value: The number of items int he summary.
- **/
-int
-camel_folder_summary_count(CamelFolderSummary *s)
-{
-	return s->messages->len;
-}
-
-/**
- * camel_folder_summary_index:
- * @s: 
- * @i: 
- * 
- * Retrieve a summary item by index number.
- *
- * A referenced to the summary item is returned, which may be
- * ref'd or free'd as appropriate.
- * 
- * Return value: The summary item, or NULL if the index @i is out
- * of range.
- * It must be freed using camel_folder_summary_info_free().
- **/
-CamelMessageInfo *
-camel_folder_summary_index(CamelFolderSummary *s, int i)
-{
-	CamelMessageInfo *info = NULL;
-
-	CAMEL_SUMMARY_LOCK(s, ref_lock);
-	CAMEL_SUMMARY_LOCK(s, summary_lock);
-
-	if (imessages->len)
-		info = g_ptr_array_index(s->messages, i);
-
-	CAMEL_SUMMARY_UNLOCK(s, summary_lock);
-
-	if (info)
-		info->refcount++;
-
-	CAMEL_SUMMARY_UNLOCK(s, ref_lock);
-
-	return info;
-}
-
-/**
- * camel_folder_summary_index:
- * @s: 
- * @i: 
- * 
- * Obtain a copy of the summary array.  This is done atomically,
- * so cannot contain empty entries.
- *
- * It must be freed using camel_folder_summary_array_free().
- **/
-GPtrArray *
-camel_folder_summary_array(CamelFolderSummary *s)
-{
-	CamelMessageInfo *info;
-	GPtrArray *res = g_ptr_array_new();
-	int i;
-	
-	CAMEL_SUMMARY_LOCK(s, ref_lock);
-	CAMEL_SUMMARY_LOCK(s, summary_lock);
-
-	g_ptr_array_set_size(res, s->messages->len);
-	for (i=0;imessages->len;i++) {
-		info = res->pdata[i] = g_ptr_array_index(s->messages, i);
-		info->refcount++;
-	}
-
-	CAMEL_SUMMARY_UNLOCK(s, summary_lock);
-	CAMEL_SUMMARY_UNLOCK(s, ref_lock);
-
-	return res;
-}
-
-/**
- * camel_folder_summary_array_free:
- * @s: 
- * @array: 
- * 
- * Free the folder summary array.
- **/
-void
-camel_folder_summary_array_free(CamelFolderSummary *s, GPtrArray *array)
-{
-	int i;
-
-	for (i=0;ilen;i++)
-		camel_folder_summary_info_free(s, array->pdata[i]);
-
-	g_ptr_array_free(array, TRUE);
-}
-
-/**
- * camel_folder_summary_uid:
- * @s: 
- * @uid: 
- * 
- * Retrieve a summary item by uid.
- *
- * A referenced to the summary item is returned, which may be
- * ref'd or free'd as appropriate.
- * 
- * Return value: The summary item, or NULL if the uid @uid
- * is not available.
- * It must be freed using camel_folder_summary_info_free().
- **/
-CamelMessageInfo *
-camel_folder_summary_uid(CamelFolderSummary *s, const char *uid)
-{
-	CamelMessageInfo *info;
-
-	CAMEL_SUMMARY_LOCK(s, ref_lock);
-	CAMEL_SUMMARY_LOCK(s, summary_lock);
-
-	info = g_hash_table_lookup(s->messages_uid, uid);
-
-	CAMEL_SUMMARY_UNLOCK(s, summary_lock);
-
-	if (info)
-		info->refcount++;
-
-	CAMEL_SUMMARY_UNLOCK(s, ref_lock);
-
-	return info;
-}
-
-/**
- * camel_folder_summary_next_uid:
- * @s: 
- * 
- * Generate a new unique uid value as an integer.  This
- * may be used to create a unique sequence of numbers.
- * 
- * Return value: The next unique uid value.
- **/
-guint32 camel_folder_summary_next_uid(CamelFolderSummary *s)
-{
-	guint32 uid;
-
-
-	CAMEL_SUMMARY_LOCK(s, summary_lock);
-
-	uid = s->nextuid++;
-
-	CAMEL_SUMMARY_UNLOCK(s, summary_lock);
-
-	/* FIXME: sync this to disk */
-/*	summary_header_save(s);*/
-	return uid;
-}
-
-/**
- * camel_folder_summary_set_uid:
- * @s: 
- * @uid: The next minimum uid to assign.  To avoid clashing
- * uid's, set this to the uid of a given messages + 1.
- * 
- * Set the next minimum uid available.  This can be used to
- * ensure new uid's do not clash with existing uid's.
- **/
-void camel_folder_summary_set_uid(CamelFolderSummary *s, guint32 uid)
-{
-	/* TODO: sync to disk? */
-	CAMEL_SUMMARY_LOCK(s, summary_lock);
-
-	s->nextuid = MAX(s->nextuid, uid);
-
-	CAMEL_SUMMARY_UNLOCK(s, summary_lock);
-}
-
-/**
- * camel_folder_summary_next_uid_string:
- * @s: 
- * 
- * Retrieve the next uid, but as a formatted string.
- * 
- * Return value: The next uid as an unsigned integer string.
- * This string must be freed by the caller.
- **/
-char *
-camel_folder_summary_next_uid_string(CamelFolderSummary *s)
-{
-	return ((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->next_uid_string(s);
-}
-
-/* loads the content descriptions, recursively */
-static CamelMessageContentInfo *
-perform_content_info_load(CamelFolderSummary *s, FILE *in)
-{
-	int i;
-	guint32 count;
-	CamelMessageContentInfo *ci, *part;
-
-	ci = ((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->content_info_load(s, in);
-	if (ci == NULL)
-		return NULL;
-
-	if (camel_file_util_decode_uint32(in, &count) == -1 || count > 500) {
-		camel_folder_summary_content_info_free(s, ci);
-		return NULL;
-	}
-
-	for (i=0;ichilds, (struct _node *)part);
-			part->parent = ci;
-		} else {
-			g_warning("Summary file format messed up?");
-			camel_folder_summary_content_info_free(s, ci);
-			return NULL;
-		}
-	}
-	return ci;
-}
-
-int
-camel_folder_summary_load(CamelFolderSummary *s)
-{
-	FILE *in;
-	int i;
-	CamelMessageInfo *mi;
-
-	g_assert(s->summary_path);
-
-	in = fopen(s->summary_path, "r");
-	if (in == NULL)
-		return -1;
-
-	CAMEL_SUMMARY_LOCK(s, io_lock);
-	if ( ((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->summary_header_load(s, in) == -1)
-		goto error;
-
-	/* now read in each message ... */
-	for (i=0;isaved_count;i++) {
-		mi = ((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->message_info_load(s, in);
-
-		if (mi == NULL)
-			goto error;
-
-		if (s->build_content) {
-			mi->content = perform_content_info_load(s, in);
-			if (mi->content == NULL) {
-				camel_folder_summary_info_free(s, mi);
-				goto error;
-			}
-		}
-
-		camel_folder_summary_add(s, mi);
-	}
-
-	CAMEL_SUMMARY_UNLOCK(s, io_lock);
-	
-	if (fclose(in) == -1)
-		return -1;
-
-	s->flags &= ~CAMEL_SUMMARY_DIRTY;
-
-	return 0;
-
-error:
-	g_warning("Cannot load summary file: %s", strerror(ferror(in)));
-	CAMEL_SUMMARY_UNLOCK(s, io_lock);
-	fclose(in);
-	s->flags |= ~CAMEL_SUMMARY_DIRTY;
-
-	return -1;
-}
-
-/* saves the content descriptions, recursively */
-static int
-perform_content_info_save(CamelFolderSummary *s, FILE *out, CamelMessageContentInfo *ci)
-{
-	CamelMessageContentInfo *part;
-
-	((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->content_info_save(s, out, ci);
-	camel_file_util_encode_uint32(out, my_list_size((struct _node **)&ci->childs));
-	part = ci->childs;
-	while (part) {
-		perform_content_info_save(s, out, part);
-		part = part->next;
-	}
-	return 0;
-}
-
-/**
- * camel_folder_summary_save:
- * @s: 
- * 
- * Writes the summary to disk.  The summary is only written if changes
- * have occured.
- * 
- * Return value: Returns -1 on error.
- **/
-int
-camel_folder_summary_save(CamelFolderSummary *s)
-{
-	FILE *out;
-	int fd;
-	int i;
-	guint32 count;
-	CamelMessageInfo *mi;
-
-	g_assert(s->summary_path);
-
-	if ((s->flags & CAMEL_SUMMARY_DIRTY) == 0)
-		return 0;
-
-	fd = open(s->summary_path, O_RDWR|O_CREAT, 0600);
-	if (fd == -1)
-		return -1;
-	out = fdopen(fd, "w");
-	if ( out == NULL ) {
-		close(fd);
-		return -1;
-	}
-
-	io(printf("saving header\n"));
-
-	CAMEL_SUMMARY_LOCK(s, io_lock);
-
-	if ( ((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->summary_header_save(s, out) == -1) {
-		fclose(out);
-		CAMEL_SUMMARY_UNLOCK(s, io_lock);
-		return -1;
-	}
-
-	/* now write out each message ... */
-	/* FIXME: check returns */
-
-	count = s->messages->len;
-	for (i=0;imessages->pdata[i];
-		((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->message_info_save(s, out, mi);
-
-		if (s->build_content) {
-			perform_content_info_save(s, out, mi->content);
-		}
-	}
-
-	CAMEL_SUMMARY_UNLOCK(s, io_lock);
-
-	if (fclose(out) == -1)
-		return -1;
-
-	s->flags &= ~CAMEL_SUMMARY_DIRTY;
-	return 0;
-}
-
-static void
-summary_assign_uid(CamelFolderSummary *s, CamelMessageInfo *info)
-{
-	const char *uid;
-
-	uid = camel_message_info_uid(info);
-	if (uid == NULL || uid[0] == 0) {
-		camel_message_info_set_uid(info, camel_folder_summary_next_uid_string(s));
-		uid = camel_message_info_uid(info);
-	}
-
-	CAMEL_SUMMARY_LOCK(s, summary_lock);
-
-	while (g_hash_table_lookup(s->messages_uid, uid)) {
-		g_warning("Trying to insert message with clashing uid (%s).  new uid re-assigned", camel_message_info_uid(info));
-		CAMEL_SUMMARY_UNLOCK(s, summary_lock);
-		camel_message_info_set_uid(info, camel_folder_summary_next_uid_string(s));
-		uid = camel_message_info_uid(info);
-		info->flags |= CAMEL_MESSAGE_FOLDER_FLAGGED;
-		CAMEL_SUMMARY_LOCK(s, summary_lock);
-	}
-
-	CAMEL_SUMMARY_UNLOCK(s, summary_lock);
-}
-
-/**
- * camel_folder_summary_add:
- * @s: 
- * @info: 
- * 
- * Adds a new @info record to the summary.  If @info->uid is NULL, then a new
- * uid is automatically re-assigned by calling :next_uid_string().
- *
- * The @info record should have been generated by calling one of the
- * info_new_*() functions, as it will be free'd based on the summary
- * class.  And MUST NOT be allocated directly using malloc.
- **/
-void camel_folder_summary_add(CamelFolderSummary *s, CamelMessageInfo *info)
-{
-	if (info == NULL)
-		return;
-
-	summary_assign_uid(s, info);
-
-	CAMEL_SUMMARY_LOCK(s, summary_lock);
-
-/* unnecessary for pooled vectors */
-#ifdef DOESTRV
-	/* this is vitally important, and also if this is ever modified, then
-	   the hash table needs to be resynced */
-	info->strings = e_strv_pack(info->strings);
-#endif
-
-	g_ptr_array_add(s->messages, info);
-	g_hash_table_insert(s->messages_uid, (char *)camel_message_info_uid(info), info);
-	s->flags |= CAMEL_SUMMARY_DIRTY;
-
-	CAMEL_SUMMARY_UNLOCK(s, summary_lock);
-}
-
-/**
- * camel_folder_summary_add_from_header:
- * @s: 
- * @h: 
- * 
- * Build a new info record based on a set of headers, and add it to the
- * summary.
- *
- * Note that this function should not be used if build_content_info has
- * been specified for this summary.
- * 
- * Return value: The newly added record.
- **/
-CamelMessageInfo *camel_folder_summary_add_from_header(CamelFolderSummary *s, struct _header_raw *h)
-{
-	CamelMessageInfo *info = camel_folder_summary_info_new_from_header(s, h);
-
-	camel_folder_summary_add(s, info);
-
-	return info;
-}
-
-/**
- * camel_folder_summary_add_from_parser:
- * @s: 
- * @mp: 
- * 
- * Build a new info record based on the current position of a CamelMimeParser.
- *
- * The parser should be positioned before the start of the message to summarise.
- * This function may be used if build_contnet_info or an index has been
- * specified for the summary.
- * 
- * Return value: The newly added record.
- **/
-CamelMessageInfo *camel_folder_summary_add_from_parser(CamelFolderSummary *s, CamelMimeParser *mp)
-{
-	CamelMessageInfo *info = camel_folder_summary_info_new_from_parser(s, mp);
-
-	camel_folder_summary_add(s, info);
-
-	return info;
-}
-
-/**
- * camel_folder_summary_add_from_message:
- * @s: 
- * @msg: 
- * 
- * Add a summary item from an existing message.
- * 
- * Return value: 
- **/
-CamelMessageInfo *camel_folder_summary_add_from_message(CamelFolderSummary *s, CamelMimeMessage *msg)
-{
-	CamelMessageInfo *info = camel_folder_summary_info_new_from_message(s, msg);
-
-	camel_folder_summary_add(s, info);
-
-	return info;
-}
-
-/**
- * camel_folder_summary_info_new_from_header:
- * @s: 
- * @h: 
- * 
- * Create a new info record from a header.
- * 
- * Return value: Guess?  This info record MUST be freed using
- * camel_folder_summary_info_free(), camel_message_info_free() will not work.
- **/
-CamelMessageInfo *camel_folder_summary_info_new_from_header(CamelFolderSummary *s, struct _header_raw *h)
-{
-	return ((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s))) -> message_info_new(s, h);
-}
-
-/**
- * camel_folder_summary_info_new_from_parser:
- * @s: 
- * @mp: 
- * 
- * Create a new info record from a parser.  If the parser cannot
- * determine a uid, then none will be assigned.
-
- * If indexing is enabled, and the parser cannot determine a new uid, then
- * one is automatically assigned.
- *
- * If indexing is enabled, then the content will be indexed based
- * on this new uid.  In this case, the message info MUST be
- * added using :add().
- *
- * Once complete, the parser will be positioned at the end of
- * the message.
- *
- * Return value: Guess?  This info record MUST be freed using
- * camel_folder_summary_info_free(), camel_message_info_free() will not work.
- **/
-CamelMessageInfo *camel_folder_summary_info_new_from_parser(CamelFolderSummary *s, CamelMimeParser *mp)
-{
-	CamelMessageInfo *info = NULL;
-	char *buffer;
-	int len;
-	struct _CamelFolderSummaryPrivate *p = _PRIVATE(s);
-	off_t start;
-
-	/* should this check the parser is in the right state, or assume it is?? */
-
-	start = camel_mime_parser_tell(mp);
-	if (camel_mime_parser_step(mp, &buffer, &len) != HSCAN_EOF) {
-		info = ((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->message_info_new_from_parser(s, mp);
-
-		camel_mime_parser_unstep(mp);
-
-		/* assign a unique uid, this is slightly 'wrong' as we do not really
-		 * know if we are going to store this in the summary, but no matter */
-		if (p->index)
-			summary_assign_uid(s, info);
-
-		CAMEL_SUMMARY_LOCK(s, filter_lock);
-
-		if (p->index) {
-			if (p->filter_index == NULL)
-				p->filter_index = camel_mime_filter_index_new_ibex(p->index);
-			camel_mime_filter_index_set_name(p->filter_index, (char *)camel_message_info_uid(info));
-			ibex_unindex(p->index, (char *)camel_message_info_uid(info));
-			ibex_index_buffer(p->index, (char *)camel_message_info_uid(info), "ibexindexed", strlen("ibexindexed"), NULL);
-		}
-
-		/* always scan the content info, even if we dont save it */
-		info->content = summary_build_content_info(s, info, mp);
-
-		CAMEL_SUMMARY_UNLOCK(s, filter_lock);
-
-		info->size = camel_mime_parser_tell(mp) - start;
-	}
-	return info;
-}
-
-/**
- * camel_folder_summary_info_new_from_message:
- * @: 
- * @: 
- * 
- * Create a summary item from a message.
- * 
- * Return value: 
- **/
-CamelMessageInfo *camel_folder_summary_info_new_from_message(CamelFolderSummary *s, CamelMimeMessage *msg)
-{
-	CamelMessageInfo *info;
-	struct _CamelFolderSummaryPrivate *p = _PRIVATE(s);
-
-	info = ((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->message_info_new_from_message(s, msg);
-
-	/* assign a unique uid, this is slightly 'wrong' as we do not really
-	 * know if we are going to store this in the summary, but no matter */
-	summary_assign_uid(s, info);
-
-	if (p->index) {
-		ibex_unindex(p->index, (char *)camel_message_info_uid(info));
-		ibex_index_buffer(p->index, (char *)camel_message_info_uid(info), "ibexindexed", strlen("ibexindexed"), NULL);
-	}
-
-	info->content = summary_build_content_info_message(s, info, (CamelMimePart *)msg);
-
-	return info;
-}
-
-/**
- * camel_folder_summary_content_info_free:
- * @s: 
- * @ci: 
- * 
- * Free the content info @ci, and all associated memory.
- **/
-void
-camel_folder_summary_content_info_free(CamelFolderSummary *s, CamelMessageContentInfo *ci)
-{
-	CamelMessageContentInfo *pw, *pn;
-
-	pw = ci->childs;
-	((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->content_info_free(s, ci);
-	while (pw) {
-		pn = pw->next;
-		camel_folder_summary_content_info_free(s, pw);
-		pw = pn;
-	}
-}
-
-/**
- * camel_folder_summary_info_free:
- * @s: 
- * @mi: 
- * 
- * Unref and potentially free the message info @mi, and all associated memory.
- **/
-void camel_folder_summary_info_free(CamelFolderSummary *s, CamelMessageInfo *mi)
-{
-	CamelMessageContentInfo *ci;
-
-	g_assert(mi);
-	g_assert(s);
-
-	CAMEL_SUMMARY_LOCK(s, ref_lock);
-
-	g_assert(mi->refcount >= 1);
-
-	mi->refcount--;
-	if (mi->refcount > 0) {
-		CAMEL_SUMMARY_UNLOCK(s, ref_lock);
-		return;
-	}
-
-	CAMEL_SUMMARY_UNLOCK(s, ref_lock);
-
-	ci = mi->content;
-
-	((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->message_info_free(s, mi);		
-	if (s->build_content && ci) {
-		camel_folder_summary_content_info_free(s, ci);
-	}
-}
-
-/**
- * camel_folder_summary_info_ref:
- * @s: 
- * @mi: 
- * 
- * Add an extra reference to @mi.
- **/
-void camel_folder_summary_info_ref(CamelFolderSummary *s, CamelMessageInfo *mi)
-{
-	g_assert(mi);
-	g_assert(s);
-
-	CAMEL_SUMMARY_LOCK(s, ref_lock);
-	g_assert(mi->refcount >= 1);
-	mi->refcount++;
-	CAMEL_SUMMARY_UNLOCK(s, ref_lock);
-}
-
-/**
- * camel_folder_summary_touch:
- * @s: 
- * 
- * Mark the summary as changed, so that a save will save it.
- **/
-void
-camel_folder_summary_touch(CamelFolderSummary *s)
-{
-	CAMEL_SUMMARY_LOCK(s, summary_lock);
-	s->flags |= CAMEL_SUMMARY_DIRTY;
-	CAMEL_SUMMARY_UNLOCK(s, summary_lock);
-}
-
-/**
- * camel_folder_summary_clear:
- * @s: 
- * 
- * Empty the summary contents.
- **/
-void
-camel_folder_summary_clear(CamelFolderSummary *s)
-{
-	int i;
-
-	CAMEL_SUMMARY_LOCK(s, summary_lock);
-	if (camel_folder_summary_count(s) == 0) {
-		CAMEL_SUMMARY_UNLOCK(s, summary_lock);
-		return;
-	}
-
-	for (i=0;imessages->len;i++)
-		camel_folder_summary_info_free(s, s->messages->pdata[i]);
-
-	g_ptr_array_set_size(s->messages, 0);
-	g_hash_table_destroy(s->messages_uid);
-	s->messages_uid = g_hash_table_new(g_str_hash, g_str_equal);
-	s->flags |= CAMEL_SUMMARY_DIRTY;
-	CAMEL_SUMMARY_UNLOCK(s, summary_lock);
-}
-
-/**
- * camel_folder_summary_remove:
- * @s: 
- * @info: 
- * 
- * Remove a specific @info record from the summary.
- **/
-void camel_folder_summary_remove(CamelFolderSummary *s, CamelMessageInfo *info)
-{
-	CAMEL_SUMMARY_LOCK(s, summary_lock);
-	g_hash_table_remove(s->messages_uid, camel_message_info_uid(info));
-	g_ptr_array_remove(s->messages, info);
-	s->flags |= CAMEL_SUMMARY_DIRTY;
-	CAMEL_SUMMARY_UNLOCK(s, summary_lock);
-
-	camel_folder_summary_info_free(s, info);
-}
-
-/**
- * camel_folder_summary_remove_uid:
- * @s: 
- * @uid: 
- * 
- * Remove a specific info record from the summary, by @uid.
- **/
-void camel_folder_summary_remove_uid(CamelFolderSummary *s, const char *uid)
-{
-        CamelMessageInfo *oldinfo;
-        char *olduid;
-
-	CAMEL_SUMMARY_LOCK(s, ref_lock);
-	CAMEL_SUMMARY_LOCK(s, summary_lock);
-        if (g_hash_table_lookup_extended(s->messages_uid, uid, (void *)&olduid, (void *)&oldinfo)) {
-		/* make sure it doesn't vanish while we're removing it */
-		oldinfo->refcount++;
-		CAMEL_SUMMARY_UNLOCK(s, summary_lock);
-		CAMEL_SUMMARY_UNLOCK(s, ref_lock);
-		camel_folder_summary_remove(s, oldinfo);
-		camel_folder_summary_info_free(s, oldinfo);
-        } else {
-		CAMEL_SUMMARY_UNLOCK(s, summary_lock);
-		CAMEL_SUMMARY_UNLOCK(s, ref_lock);
-	}
-}
-
-/**
- * camel_folder_summary_remove_index:
- * @s: 
- * @index: 
- * 
- * Remove a specific info record from the summary, by index.
- **/
-void camel_folder_summary_remove_index(CamelFolderSummary *s, int index)
-{
-	CAMEL_SUMMARY_LOCK(s, summary_lock);
-	if (index < s->messages->len) {
-		CamelMessageInfo *info = s->messages->pdata[index];
-
-		g_hash_table_remove(s->messages_uid, camel_message_info_uid(info));
-		g_ptr_array_remove_index(s->messages, index);
-		s->flags |= CAMEL_SUMMARY_DIRTY;
-
-		CAMEL_SUMMARY_UNLOCK(s, summary_lock);
-		camel_folder_summary_info_free(s, info);
-	} else {
-		CAMEL_SUMMARY_UNLOCK(s, summary_lock);
-	}
-}
-
-/* should be sorted, for binary search */
-/* This is a tokenisation mechanism for strings written to the
-   summary - to save space.
-   This list can have at most 31 words. */
-static char * tokens[] = {
-	"7bit",
-	"8bit",
-	"alternative",
-	"application",
-	"base64",
-	"boundary",
-	"charset",
-	"filename",
-	"html",
-	"image",
-	"iso-8859-1",
-	"iso-8859-8",
-	"message",
-	"mixed",
-	"multipart",
-	"name",
-	"octet-stream",
-	"parallel",
-	"plain",
-	"postscript",
-	"quoted-printable",
-	"related",
-	"rfc822",
-	"text",
-	"us-ascii",		/* 25 words */
-};
-
-#define tokens_len (sizeof(tokens)/sizeof(tokens[0]))
-
-/* baiscally ...
-    0 = null
-    1-tokens_len == tokens[id-1]
-    >=32 string, length = n-32
-*/
-
-#ifdef USE_BSEARCH
-static int
-token_search_cmp(char *key, char **index)
-{
-	d(printf("comparing '%s' to '%s'\n", key, *index));
-	return strcmp(key, *index);
-}
-#endif
-
-/**
- * camel_folder_summary_encode_token:
- * @out: 
- * @str: 
- * 
- * Encode a string value, but use tokenisation and compression
- * to reduce the size taken for common mailer words.  This
- * can still be used to encode normal strings as well.
- * 
- * Return value: -1 on error.
- **/
-int
-camel_folder_summary_encode_token(FILE *out, const char *str)
-{
-	io(printf("Encoding token: '%s'\n", str));
-
-	if (str == NULL) {
-		return camel_file_util_encode_uint32(out, 0);
-	} else {
-		int len = strlen(str);
-		int i, token=-1;
-
-		if (len <= 16) {
-			char lower[32];
-			char **match;
-
-			for (i=0;i 10240) {
-		g_warning("Got broken string header length: %d bytes", len);
-		*str = NULL;
-		return -1;
-	} else {
-		len -= 32;
-		ret = g_malloc(len+1);
-		if (fread(ret, len, 1, in) != 1) {
-			g_free(ret);
-			*str = NULL;
-			return -1;
-		}
-		ret[len]=0;
-	}
-
-	io(printf("Token = '%s'\n", ret));
-
-	*str = ret;
-	return 0;
-}
-
-static struct _node *
-my_list_append(struct _node **list, struct _node *n)
-{
-	struct _node *ln = (struct _node *)list;
-	while (ln->next)
-		ln = ln->next;
-	n->next = 0;
-	ln->next = n;
-	return n;
-}
-
-static int
-my_list_size(struct _node **list)
-{
-	int len = 0;
-	struct _node *ln = (struct _node *)list;
-	while (ln->next) {
-		ln = ln->next;
-		len++;
-	}
-	return len;
-}
-
-static int
-summary_header_load(CamelFolderSummary *s, FILE *in)
-{
-	gint32 version, flags, nextuid, count;
-	time_t time;
-
-	fseek(in, 0, SEEK_SET);
-
-	io(printf("Loading header\n"));
-
-	if (camel_file_util_decode_fixed_int32(in, &version) == -1
-	    || camel_file_util_decode_fixed_int32(in, &flags) == -1
-	    || camel_file_util_decode_fixed_int32(in, &nextuid) == -1
-	    || camel_file_util_decode_time_t(in, &time) == -1
-	    || camel_file_util_decode_fixed_int32(in, &count) == -1) {
-		return -1;
-	}
-
-	s->nextuid = nextuid;
-	s->flags = flags;
-	s->time = time;
-	s->saved_count = count;
-	if (s->version != version) {
-		g_warning("Summary header version mismatch");
-		return -1;
-	}
-	return 0;
-}
-
-static int
-summary_header_save(CamelFolderSummary *s, FILE *out)
-{
-	fseek(out, 0, SEEK_SET);
-
-	io(printf("Savining header\n"));
-
-	camel_file_util_encode_fixed_int32(out, s->version);
-	camel_file_util_encode_fixed_int32(out, s->flags);
-	camel_file_util_encode_fixed_int32(out, s->nextuid);
-	camel_file_util_encode_time_t(out, s->time);
-	return camel_file_util_encode_fixed_int32(out, camel_folder_summary_count(s));
-}
-
-/* are these even useful for anything??? */
-static CamelMessageInfo * message_info_new_from_parser(CamelFolderSummary *s, CamelMimeParser *mp)
-{
-	CamelMessageInfo *mi = NULL;
-	int state;
-
-	state = camel_mime_parser_state(mp);
-	switch (state) {
-	case HSCAN_HEADER:
-	case HSCAN_MESSAGE:
-	case HSCAN_MULTIPART:
-		mi = ((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->message_info_new(s, camel_mime_parser_headers_raw(mp));
-		break;
-	default:
-		g_error("Invalid parser state");
-	}
-
-	return mi;
-}
-
-static CamelMessageContentInfo * content_info_new_from_parser(CamelFolderSummary *s, CamelMimeParser *mp)
-{
-	CamelMessageContentInfo *ci = NULL;
-
-	switch (camel_mime_parser_state(mp)) {
-	case HSCAN_HEADER:
-	case HSCAN_MESSAGE:
-	case HSCAN_MULTIPART:
-		ci = ((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->content_info_new(s, camel_mime_parser_headers_raw(mp));
-		if (ci) {
-			ci->type = camel_mime_parser_content_type(mp);
-			header_content_type_ref(ci->type);
-		}
-		break;
-	default:
-		g_error("Invalid parser state");
-	}
-
-	return ci;
-}
-
-static CamelMessageInfo * message_info_new_from_message(CamelFolderSummary *s, CamelMimeMessage *msg)
-{
-	CamelMessageInfo *mi;
-
-	mi = ((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->message_info_new(s, ((CamelMimePart *)msg)->headers);
-
-	return mi;
-}
-
-static CamelMessageContentInfo * content_info_new_from_message(CamelFolderSummary *s, CamelMimePart *mp)
-{
-	CamelMessageContentInfo *ci;
-
-	ci = ((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->content_info_new(s, mp->headers);
-
-	return ci;
-}
-
-#ifndef NO_WARNINGS
-#warning "These should be made private again, easy to fix (used in filter-driver)"
-#endif
-char *
-camel_folder_summary_format_address(struct _header_raw *h, const char *name)
-{
-	struct _header_address *addr;
-	const char *text;
-	char *ret;
-
-	text = header_raw_find (&h, name, NULL);
-	addr = header_address_decode (text);
-	if (addr) {
-		ret = header_address_list_format (addr);
-		header_address_list_clear (&addr);
-	} else {
-		ret = g_strdup (text);
-	}
-	
-	return ret;
-}
-
-char *
-camel_folder_summary_format_string (struct _header_raw *h, const char *name)
-{
-	const char *charset, *text;
-	
-	text = header_raw_find (&h, name, NULL);
-	if (text) {
-		while (isspace ((unsigned) *text))
-			text++;
-		charset = camel_charset_locale_name ();
-		return header_decode_string (text, charset);
-	} else {
-		return NULL;
-	}
-}
-
-/**
- * camel_folder_summary_info_new:
- * @s: 
- * 
- * Allocate a new camel message info, suitable for adding
- * to this summary.
- * 
- * Return value: 
- **/
-CamelMessageInfo *
-camel_folder_summary_info_new(CamelFolderSummary *s)
-{
-	CamelMessageInfo *mi;
-
-	CAMEL_SUMMARY_LOCK(s, alloc_lock);
-	if (s->message_info_chunks == NULL)
-		s->message_info_chunks = e_memchunk_new(32, s->message_info_size);
-	mi = e_memchunk_alloc(s->message_info_chunks);
-	CAMEL_SUMMARY_UNLOCK(s, alloc_lock);
-
-	memset(mi, 0, s->message_info_size);
-#ifdef DOEPOOLV
-	mi->strings = e_poolv_new (s->message_info_strings);
-#endif
-#ifdef DOESTRV
-	mi->strings = e_strv_new(s->message_info_strings);
-#endif
-	mi->refcount = 1;
-	return mi;
-}
-
-/**
- * camel_folder_summary_content_info_new:
- * @s: 
- * 
- * Allocate a new camel message content info, suitable for adding
- * to this summary.
- * 
- * Return value: 
- **/
-CamelMessageContentInfo *
-camel_folder_summary_content_info_new(CamelFolderSummary *s)
-{
-	CamelMessageContentInfo *ci;
-
-	CAMEL_SUMMARY_LOCK(s, alloc_lock);
-	if (s->content_info_chunks == NULL)
-		s->content_info_chunks = e_memchunk_new(32, s->content_info_size);
-	ci = e_memchunk_alloc(s->content_info_chunks);
-	CAMEL_SUMMARY_UNLOCK(s, alloc_lock);
-
-	memset(ci, 0, s->content_info_size);
-	return ci;
-}
-
-static CamelMessageInfo *
-message_info_new(CamelFolderSummary *s, struct _header_raw *h)
-{
-	CamelMessageInfo *mi;
-	const char *received;
-	guchar digest[16];
-	struct _header_references *refs, *scan;
-	char *msgid;
-	int count;
-	char *subject, *from, *to, *cc, *mlist;
-
-	mi = camel_folder_summary_info_new(s);
-
-	subject = camel_folder_summary_format_string(h, "subject");
-	from = camel_folder_summary_format_address(h, "from");
-	to = camel_folder_summary_format_address(h, "to");
-	cc = camel_folder_summary_format_address(h, "cc");
-	mlist = header_raw_check_mailing_list(&h);
-
-#ifdef DOEPOOLV
-	e_poolv_set(mi->strings, CAMEL_MESSAGE_INFO_SUBJECT, subject, TRUE);
-	e_poolv_set(mi->strings, CAMEL_MESSAGE_INFO_FROM, from, TRUE);
-	e_poolv_set(mi->strings, CAMEL_MESSAGE_INFO_TO, to, TRUE);
-	e_poolv_set(mi->strings, CAMEL_MESSAGE_INFO_CC, cc, TRUE);
-	e_poolv_set(mi->strings, CAMEL_MESSAGE_INFO_MLIST, mlist, TRUE);
-#elif defined (DOESTRV)
-	e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_SUBJECT, subject);
-	e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_FROM, from);
-	e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_TO, to);
-	e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_CC, cc);
-	e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_MLIST, mlist);
-#else
-	mi->subject = subject;
-	mi->from = from;
-	mi->to = to;
-	mi->cc = cc;
-	mi->mlist = mlist;
-#endif
-
-	mi->user_flags = NULL;
-	mi->user_tags = NULL;
-	mi->date_sent = header_decode_date(header_raw_find(&h, "date", NULL), NULL);
-	received = header_raw_find(&h, "received", NULL);
-	if (received)
-		received = strrchr(received, ';');
-	if (received)
-		mi->date_received = header_decode_date(received + 1, NULL);
-	else
-		mi->date_received = 0;
-
-	msgid = header_msgid_decode(header_raw_find(&h, "message-id", NULL));
-	if (msgid) {
-		md5_get_digest(msgid, strlen(msgid), digest);
-		memcpy(mi->message_id.id.hash, digest, sizeof(mi->message_id.id.hash));
-		g_free(msgid);
-	}
-	/* if we have a references, use that, otherwise, see if we have an in-reply-to
-	   header, with parsable content, otherwise *shrug* */
-	if ((refs = header_references_decode(header_raw_find(&h, "references", NULL))) != NULL
-	    || (refs = header_references_decode(header_raw_find(&h, "in-reply-to", NULL))) != NULL) {
-		count = header_references_list_size(&refs);
-		mi->references = g_malloc(sizeof(*mi->references) + ((count-1) * sizeof(mi->references->references[0])));
-		count = 0;
-		scan = refs;
-		while (scan) {
-			/* FIXME: the id might be NULL because of a small bug in camel-mime-utils */
-			if (scan->id) {
-				md5_get_digest(scan->id, strlen(scan->id), digest);
-				memcpy(mi->references->references[count].id.hash, digest, sizeof(mi->message_id.id.hash));
-				count++;
-			}
-			scan = scan->next;
-		}
-		mi->references->size = count;
-		header_references_list_clear(&refs);
-	}
-
-	return mi;
-}
-
-
-static CamelMessageInfo *
-message_info_load(CamelFolderSummary *s, FILE *in)
-{
-	CamelMessageInfo *mi;
-	guint count;
-	int i;
-	char *subject, *from, *to, *cc, *mlist, *uid;;
-
-	mi = camel_folder_summary_info_new(s);
-
-	io(printf("Loading message info\n"));
-
-	camel_file_util_decode_string(in, &uid);
-	camel_file_util_decode_uint32(in, &mi->flags);
-	camel_file_util_decode_uint32(in, &mi->size);
-	camel_file_util_decode_time_t(in, &mi->date_sent);
-	camel_file_util_decode_time_t(in, &mi->date_received);
-	camel_file_util_decode_string(in, &subject);
-	camel_file_util_decode_string(in, &from);
-	camel_file_util_decode_string(in, &to);
-	camel_file_util_decode_string(in, &cc);
-	camel_file_util_decode_string(in, &mlist);
-
-#ifdef DOEPOOLV
-	e_poolv_set(mi->strings, CAMEL_MESSAGE_INFO_UID, uid, TRUE);
-	e_poolv_set(mi->strings, CAMEL_MESSAGE_INFO_SUBJECT, subject, TRUE);
-	e_poolv_set(mi->strings, CAMEL_MESSAGE_INFO_FROM, from, TRUE);
-	e_poolv_set(mi->strings, CAMEL_MESSAGE_INFO_TO, to, TRUE);
-	e_poolv_set(mi->strings, CAMEL_MESSAGE_INFO_CC, cc, TRUE);
-	e_poolv_set(mi->strings, CAMEL_MESSAGE_INFO_MLIST, mlist, TRUE);
-#elif defined (DOESTRV)
-	e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_UID, uid);
-	e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_SUBJECT, subject);
-	e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_FROM, from);
-	e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_TO, to);
-	e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_CC, cc);
-	e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_MLIST, mlist);
-#else
-	mi->uid = uid;
-	mi->subject = subject;
-	mi->from = from;
-	mi->to = to;
-	mi->cc = cc;
-	mi->mlist = mlist;
-#endif
-
-	mi->content = NULL;
-
-	camel_file_util_decode_fixed_int32(in, &mi->message_id.id.part.hi);
-	camel_file_util_decode_fixed_int32(in, &mi->message_id.id.part.lo);
-
-	if (camel_file_util_decode_uint32(in, &count) == -1 || count > 500)
-		goto error;
-
-	if (count > 0) {
-		mi->references = g_malloc(sizeof(*mi->references) + ((count-1) * sizeof(mi->references->references[0])));
-		mi->references->size = count;
-		for (i=0;ireferences->references[i].id.part.hi);
-			camel_file_util_decode_fixed_int32(in, &mi->references->references[i].id.part.lo);
-		}
-	}
-
-	if (camel_file_util_decode_uint32(in, &count) == -1 || count > 500)
-		goto error;
-
-	for (i=0;iuser_flags, name, TRUE);
-		g_free(name);
-	}
-
-	if (camel_file_util_decode_uint32(in, &count) == -1 || count > 500)
-		goto error;
-
-	for (i=0;iuser_tags, name, value);
-		g_free(name);
-		g_free(value);
-	}
-
-	if (!ferror(in))
-		return mi;
-
-error:
-	camel_folder_summary_info_free(s, mi);
-
-	return NULL;
-}
-
-static int
-message_info_save(CamelFolderSummary *s, FILE *out, CamelMessageInfo *mi)
-{
-	guint32 count;
-	CamelFlag *flag;
-	CamelTag *tag;
-	int i;
-
-	io(printf("Saving message info\n"));
-
-	camel_file_util_encode_string(out, camel_message_info_uid(mi));
-	camel_file_util_encode_uint32(out, mi->flags);
-	camel_file_util_encode_uint32(out, mi->size);
-	camel_file_util_encode_time_t(out, mi->date_sent);
-	camel_file_util_encode_time_t(out, mi->date_received);
-	camel_file_util_encode_string(out, camel_message_info_subject(mi));
-	camel_file_util_encode_string(out, camel_message_info_from(mi));
-	camel_file_util_encode_string(out, camel_message_info_to(mi));
-	camel_file_util_encode_string(out, camel_message_info_cc(mi));
-	camel_file_util_encode_string(out, camel_message_info_mlist(mi));
-
-	camel_file_util_encode_fixed_int32(out, mi->message_id.id.part.hi);
-	camel_file_util_encode_fixed_int32(out, mi->message_id.id.part.lo);
-
-	if (mi->references) {
-		camel_file_util_encode_uint32(out, mi->references->size);
-		for (i=0;ireferences->size;i++) {
-			camel_file_util_encode_fixed_int32(out, mi->references->references[i].id.part.hi);
-			camel_file_util_encode_fixed_int32(out, mi->references->references[i].id.part.lo);
-		}
-	} else {
-		camel_file_util_encode_uint32(out, 0);
-	}
-
-	count = camel_flag_list_size(&mi->user_flags);
-	camel_file_util_encode_uint32(out, count);
-	flag = mi->user_flags;
-	while (flag) {
-		camel_file_util_encode_string(out, flag->name);
-		flag = flag->next;
-	}
-
-	count = camel_tag_list_size(&mi->user_tags);
-	camel_file_util_encode_uint32(out, count);
-	tag = mi->user_tags;
-	while (tag) {
-		camel_file_util_encode_string(out, tag->name);
-		camel_file_util_encode_string(out, tag->value);
-		tag = tag->next;
-	}
-
-	return ferror(out);
-}
-
-static void
-message_info_free(CamelFolderSummary *s, CamelMessageInfo *mi)
-{
-#ifdef DOEPOOLV
-	e_poolv_destroy(mi->strings);
-#elif defined (DOESTRV)
-	e_strv_destroy(mi->strings);
-#else
-	g_free(mi->uid);
-	g_free(mi->subject);
-	g_free(mi->from);
-	g_free(mi->to);
-	g_free(mi->cc);
-	g_free(mi->mlist);
-#endif
-	g_free(mi->references);
-	camel_flag_list_free(&mi->user_flags);
-	camel_tag_list_free(&mi->user_tags);
-	e_memchunk_free(s->message_info_chunks, mi);
-}
-
-static CamelMessageContentInfo *
-content_info_new (CamelFolderSummary *s, struct _header_raw *h)
-{
-	CamelMessageContentInfo *ci;
-	const char *charset;
-	
-	ci = camel_folder_summary_content_info_new (s);
-	
-	charset = camel_charset_locale_name ();
-	ci->id = header_msgid_decode (header_raw_find (&h, "content-id", NULL));
-	ci->description = header_decode_string (header_raw_find (&h, "content-description", NULL), NULL);
-	ci->encoding = header_content_encoding_decode (header_raw_find (&h, "content-transfer-encoding", NULL));
-	
-	return ci;
-}
-
-static CamelMessageContentInfo *
-content_info_load(CamelFolderSummary *s, FILE *in)
-{
-	CamelMessageContentInfo *ci;
-	char *type, *subtype;
-	guint32 count, i;
-	struct _header_content_type *ct;
-
-	io(printf("Loading content info\n"));
-
-	ci = camel_folder_summary_content_info_new(s);
-	
-	camel_folder_summary_decode_token(in, &type);
-	camel_folder_summary_decode_token(in, &subtype);
-	ct = header_content_type_new(type, subtype);
-	g_free(type);		/* can this be removed? */
-	g_free(subtype);
-	if (camel_file_util_decode_uint32(in, &count) == -1 || count > 500)
-		goto error;
-	    
-	for (i=0;itype = ct;
-
-	camel_folder_summary_decode_token(in, &ci->id);
-	camel_folder_summary_decode_token(in, &ci->description);
-	camel_folder_summary_decode_token(in, &ci->encoding);
-
-	camel_file_util_decode_uint32(in, &ci->size);
-
-	ci->childs = NULL;
-
-	if (!ferror(in))
-		return ci;
-
-error:
-	camel_folder_summary_content_info_free(s, ci);
-	return NULL;
-}
-
-static int
-content_info_save(CamelFolderSummary *s, FILE *out, CamelMessageContentInfo *ci)
-{
-	struct _header_content_type *ct;
-	struct _header_param *hp;
-
-	io(printf("Saving content info\n"));
-
-	ct = ci->type;
-	if (ct) {
-		camel_folder_summary_encode_token(out, ct->type);
-		camel_folder_summary_encode_token(out, ct->subtype);
-		camel_file_util_encode_uint32(out, my_list_size((struct _node **)&ct->params));
-		hp = ct->params;
-		while (hp) {
-			camel_folder_summary_encode_token(out, hp->name);
-			camel_folder_summary_encode_token(out, hp->value);
-			hp = hp->next;
-		}
-	} else {
-		camel_folder_summary_encode_token(out, NULL);
-		camel_folder_summary_encode_token(out, NULL);
-		camel_file_util_encode_uint32(out, 0);
-	}
-	camel_folder_summary_encode_token(out, ci->id);
-	camel_folder_summary_encode_token(out, ci->description);
-	camel_folder_summary_encode_token(out, ci->encoding);
-	return camel_file_util_encode_uint32(out, ci->size);
-}
-
-static void
-content_info_free(CamelFolderSummary *s, CamelMessageContentInfo *ci)
-{
-	header_content_type_unref(ci->type);
-	g_free(ci->id);
-	g_free(ci->description);
-	g_free(ci->encoding);
-	e_memchunk_free(s->content_info_chunks, ci);
-}
-
-static char *
-next_uid_string(CamelFolderSummary *s)
-{
-	return g_strdup_printf("%u", camel_folder_summary_next_uid(s));
-}
-
-/*
-  OK
-  Now this is where all the "smarts" happen, where the content info is built,
-  and any indexing and what not is performed
-*/
-
-/* must have filter_lock before calling this function */
-static CamelMessageContentInfo *
-summary_build_content_info(CamelFolderSummary *s, CamelMessageInfo *msginfo, CamelMimeParser *mp)
-{
-	int state, len;
-	char *buffer;
-	CamelMessageContentInfo *info = NULL;
-	struct _header_content_type *ct;
-	int body;
-	int enc_id = -1, chr_id = -1, html_id = -1, idx_id = -1;
-	struct _CamelFolderSummaryPrivate *p = _PRIVATE(s);
-	CamelMimeFilterCharset *mfc;
-	CamelMessageContentInfo *part;
-
-	d(printf("building content info\n"));
-
-	/* start of this part */
-	state = camel_mime_parser_step(mp, &buffer, &len);
-	body = camel_mime_parser_tell(mp);
-
-	if (s->build_content)
-		info = ((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->content_info_new_from_parser(s, mp);
-
-	switch(state) {
-	case HSCAN_HEADER:
-		/* check content type for indexing, then read body */
-		ct = camel_mime_parser_content_type(mp);
-		/* update attachments flag as we go */
-		if (!header_content_type_is(ct, "text", "*"))
-			msginfo->flags |= CAMEL_MESSAGE_ATTACHMENTS;
-
-		if (p->index && header_content_type_is(ct, "text", "*")) {
-			char *encoding;
-			const char *charset;
-
-			d(printf("generating index:\n"));
-			
-			encoding = header_content_encoding_decode(camel_mime_parser_header(mp, "content-transfer-encoding", NULL));
-			if (encoding) {
-				if (!strcasecmp(encoding, "base64")) {
-					d(printf(" decoding base64\n"));
-					if (p->filter_64 == NULL)
-						p->filter_64 = camel_mime_filter_basic_new_type(CAMEL_MIME_FILTER_BASIC_BASE64_DEC);
-					else
-						camel_mime_filter_reset((CamelMimeFilter *)p->filter_64);
-					enc_id = camel_mime_parser_filter_add(mp, (CamelMimeFilter *)p->filter_64);
-				} else if (!strcasecmp(encoding, "quoted-printable")) {
-					d(printf(" decoding quoted-printable\n"));
-					if (p->filter_qp == NULL)
-						p->filter_qp = camel_mime_filter_basic_new_type(CAMEL_MIME_FILTER_BASIC_QP_DEC);
-					else
-						camel_mime_filter_reset((CamelMimeFilter *)p->filter_qp);
-					enc_id = camel_mime_parser_filter_add(mp, (CamelMimeFilter *)p->filter_qp);
-				} else {
-					d(printf(" ignoring encoding %s\n", encoding));
-				}
-				g_free(encoding);
-			}
-
-			charset = header_content_type_param(ct, "charset");
-			if (charset!=NULL
-			    && !(strcasecmp(charset, "us-ascii")==0
-				 || strcasecmp(charset, "utf-8")==0)) {
-				d(printf(" Adding conversion filter from %s to UTF-8\n", charset));
-				mfc = g_hash_table_lookup(p->filter_charset, charset);
-				if (mfc == NULL) {
-					mfc = camel_mime_filter_charset_new_convert(charset, "UTF-8");
-					if (mfc)
-						g_hash_table_insert(p->filter_charset, g_strdup(charset), mfc);
-				} else {
-					camel_mime_filter_reset((CamelMimeFilter *)mfc);
-				}
-				if (mfc) {
-					chr_id = camel_mime_parser_filter_add(mp, (CamelMimeFilter *)mfc);
-				} else {
-					g_warning("Cannot convert '%s' to 'UTF-8', message index may be corrupt", charset);
-				}
-			}
-
-			/* we do charset conversions before this filter, which isn't strictly correct,
-			   but works in most cases */
-			if (header_content_type_is(ct, "text", "html")) {
-				if (p->filter_html == NULL)
-					p->filter_html = camel_mime_filter_html_new();
-				else
-					camel_mime_filter_reset((CamelMimeFilter *)p->filter_html);
-				html_id = camel_mime_parser_filter_add(mp, (CamelMimeFilter *)p->filter_html);
-			}
-			
-			/* and this filter actually does the indexing */
-			idx_id = camel_mime_parser_filter_add(mp, (CamelMimeFilter *)p->filter_index);
-		}
-		/* and scan/index everything */
-		while (camel_mime_parser_step(mp, &buffer, &len) != HSCAN_BODY_END)
-			;
-		/* and remove the filters */
-		camel_mime_parser_filter_remove(mp, enc_id);
-		camel_mime_parser_filter_remove(mp, chr_id);
-		camel_mime_parser_filter_remove(mp, html_id);
-		camel_mime_parser_filter_remove(mp, idx_id);
-		break;
-	case HSCAN_MULTIPART:
-		d(printf("Summarising multipart\n"));
-		/* update attachments flag as we go */
-		ct = camel_mime_parser_content_type(mp);
-		if (header_content_type_is(ct, "multipart", "mixed"))
-			msginfo->flags |= CAMEL_MESSAGE_ATTACHMENTS;
-
-		while (camel_mime_parser_step(mp, &buffer, &len) != HSCAN_MULTIPART_END) {
-			camel_mime_parser_unstep(mp);
-			part = summary_build_content_info(s, msginfo, mp);
-			if (part) {
-				part->parent = info;
-				my_list_append((struct _node **)&info->childs, (struct _node *)part);
-			}
-		}
-		break;
-	case HSCAN_MESSAGE:
-		d(printf("Summarising message\n"));
-		/* update attachments flag as we go */
-		msginfo->flags |= CAMEL_MESSAGE_ATTACHMENTS;
-
-		part = summary_build_content_info(s, msginfo, mp);
-		if (part) {
-			part->parent = info;
-			my_list_append((struct _node **)&info->childs, (struct _node *)part);
-		}
-		state = camel_mime_parser_step(mp, &buffer, &len);
-		if (state != HSCAN_MESSAGE_END) {
-			g_error("Bad parser state: Expecing MESSAGE_END or MESSAGE_EOF, got: %d", state);
-			camel_mime_parser_unstep(mp);
-		}
-		break;
-	}
-
-	d(printf("finished building content info\n"));
-
-	return info;
-}
-
-/* build the content-info, from a message */
-/* this needs no lock, as we copy all data, and ibex is threadsafe */
-static CamelMessageContentInfo *
-summary_build_content_info_message(CamelFolderSummary *s, CamelMessageInfo *msginfo, CamelMimePart *object)
-{
-	CamelDataWrapper *containee;
-	int parts, i;
-	struct _CamelFolderSummaryPrivate *p = _PRIVATE(s);
-	CamelMessageContentInfo *info = NULL, *child;
-
-	if (s->build_content)
-		info = ((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->content_info_new_from_message(s, object);
-	
-	containee = camel_medium_get_content_object(CAMEL_MEDIUM(object));
-
-	if (containee == NULL)
-		return info;
-
-	/* TODO: I find it odd that get_part and get_content_object do not
-	   add a reference, probably need fixing for multithreading */
-
-	/* check for attachments */
-	if (header_content_type_is(CAMEL_DATA_WRAPPER(containee)->mime_type, "multipart", "*")) {
-		if (header_content_type_is(CAMEL_DATA_WRAPPER(containee)->mime_type, "multipart", "mixed"))
-			msginfo->flags |= CAMEL_MESSAGE_ATTACHMENTS;
-	} else if (!header_content_type_is(CAMEL_DATA_WRAPPER(containee)->mime_type, "text", "*"))
-		msginfo->flags |= CAMEL_MESSAGE_ATTACHMENTS;
-
-	/* using the object types is more accurate than using the mime/types */
-	if (CAMEL_IS_MULTIPART(containee)) {
-		parts = camel_multipart_get_number(CAMEL_MULTIPART(containee));
-		for (i=0;iparent = info;
-				my_list_append((struct _node **)&info->childs, (struct _node *)child);
-			}
-		}
-	} else if (CAMEL_IS_MIME_MESSAGE(containee)) {
-		/* for messages we only look at its contents */
-		child = summary_build_content_info_message(s, msginfo, (CamelMimePart *)containee);
-		if (child) {
-			child->parent = info;
-			my_list_append((struct _node **)&info->childs, (struct _node *)child);
-		}
-	} else if (p->index
-		   && header_content_type_is(CAMEL_DATA_WRAPPER(containee)->mime_type, "text", "*")) {
-		/* index all text parts if we're indexing */
-		CamelStreamMem *mem = (CamelStreamMem *)camel_stream_mem_new();
-
-		camel_data_wrapper_write_to_stream(containee, (CamelStream *)mem);
-		ibex_index_buffer(p->index, (char *)camel_message_info_uid(msginfo), mem->buffer->data, mem->buffer->len, NULL);
-		camel_object_unref((CamelObject *)mem);
-	}
-
-	return info;
-}
-
-/**
- * camel_flag_get:
- * @list: 
- * @name: 
- * 
- * Find the state of the flag @name in @list.
- * 
- * Return value: The state of the flag (TRUE or FALSE).
- **/
-gboolean
-camel_flag_get(CamelFlag **list, const char *name)
-{
-	CamelFlag *flag;
-	flag = *list;
-	while (flag) {
-		if (!strcmp(flag->name, name))
-			return TRUE;
-		flag = flag->next;
-	}
-	return FALSE;
-}
-
-/**
- * camel_flag_set:
- * @list: 
- * @name: 
- * @value: 
- * 
- * Set the state of a flag @name in the list @list to @value.
- *
- * Return value: Whether or not it changed.
- **/
-gboolean
-camel_flag_set(CamelFlag **list, const char *name, gboolean value)
-{
-	CamelFlag *flag, *tmp;
-
-	/* this 'trick' works because flag->next is the first element */
-	flag = (CamelFlag *)list;
-	while (flag->next) {
-		tmp = flag->next;
-		if (!strcmp(flag->next->name, name)) {
-			if (!value) {
-				flag->next = tmp->next;
-				g_free(tmp);
-			}
-			return !value;
-		}
-		flag = tmp;
-	}
-
-	if (value) {
-		tmp = g_malloc(sizeof(*tmp) + strlen(name));
-		strcpy(tmp->name, name);
-		tmp->next = 0;
-		flag->next = tmp;
-	}
-	return value;
-}
-
-/**
- * camel_flag_list_size:
- * @list: 
- * 
- * Get the length of the flag list.
- * 
- * Return value: The number of TRUE flags in the list.
- **/
-int
-camel_flag_list_size(CamelFlag **list)
-{
-	int count=0;
-	CamelFlag *flag;
-
-	flag = *list;
-	while (flag) {
-		count++;
-		flag = flag->next;
-	}
-	return count;
-}
-
-/**
- * camel_flag_list_free:
- * @list: 
- * 
- * Free the memory associated with the flag list @list.
- **/
-void
-camel_flag_list_free(CamelFlag **list)
-{
-	CamelFlag *flag, *tmp;
-	flag = *list;
-	while (flag) {
-		tmp = flag->next;
-		g_free(flag);
-		flag = tmp;
-	}
-	*list = NULL;
-}
-
-const char
-*camel_tag_get(CamelTag **list, const char *name)
-{
-	CamelTag *tag;
-
-	tag = *list;
-	while (tag) {
-		if (!strcmp(tag->name, name))
-			return (const char *)tag->value;
-		tag = tag->next;
-	}
-	return NULL;
-}
-
-/**
- * camel_tag_set:
- * @list: 
- * @name: 
- * @value: 
- * 
- * Set the tag @name in the tag list @list to @value.
- *
- * Return value: whether or not it changed
- **/
-gboolean
-camel_tag_set(CamelTag **list, const char *name, const char *value)
-{
-	CamelTag *tag, *tmp;
-
-	/* this 'trick' works because tag->next is the first element */
-	tag = (CamelTag *)list;
-	while (tag->next) {
-		tmp = tag->next;
-		if (!strcmp(tmp->name, name)) {
-			if (value == NULL) { /* clear it? */
-				tag->next = tmp->next;
-				g_free(tmp->value);
-				g_free(tmp);
-				return TRUE;
-			} else if (strcmp(tmp->value, value)) { /* has it changed? */
-				g_free(tmp->value);
-				tmp->value = g_strdup(value);
-				return TRUE;
-			}
-			return FALSE;
-		}
-		tag = tmp;
-	}
-
-	if (value) {
-		tmp = g_malloc(sizeof(*tmp)+strlen(name));
-		strcpy(tmp->name, name);
-		tmp->value = g_strdup(value);
-		tmp->next = 0;
-		tag->next = tmp;
-		return TRUE;
-	}
-	return FALSE;
-}
-
-/**
- * camel_tag_list_size:
- * @list: 
- * 
- * Get the number of tags present in the tag list @list.
- * 
- * Return value: The number of tags.
- **/
-int		camel_tag_list_size(CamelTag **list)
-{
-	int count=0;
-	CamelTag *tag;
-
-	tag = *list;
-	while (tag) {
-		count++;
-		tag = tag->next;
-	}
-	return count;
-}
-
-/**
- * camel_tag_list_free:
- * @list: 
- * 
- * Free the tag list @list.
- **/
-void		camel_tag_list_free(CamelTag **list)
-{
-	CamelTag *tag, *tmp;
-	tag = *list;
-	while (tag) {
-		tmp = tag->next;
-		g_free(tag->value);
-		g_free(tag);
-		tag = tmp;
-	}
-	*list = NULL;
-}
-
-struct flag_names_t {
-	char *name;
-	guint32 value;
-} flag_names[] = {
-	{ "answered", CAMEL_MESSAGE_ANSWERED },
-	{ "deleted", CAMEL_MESSAGE_DELETED },
-	{ "draft", CAMEL_MESSAGE_DELETED },
-	{ "flagged", CAMEL_MESSAGE_FLAGGED },
-	{ "seen", CAMEL_MESSAGE_SEEN },
-	{ "attachments", CAMEL_MESSAGE_ATTACHMENTS },
-	{ NULL, 0 }
-};
-
-/**
- * camel_system_flag:
- * @name: 
- * 
- * Returns the integer value of the flag string.
- **/
-guint32
-camel_system_flag (const char *name)
-{
-	struct flag_names_t *flag;
-	
-	g_return_val_if_fail (name != NULL, 0);
-	
-	for (flag = flag_names; *flag->name; flag++)
-		if (!g_strcasecmp (name, flag->name))
-			return flag->value;
-	
-	return 0;
-}
-
-/**
- * camel_system_flag_get:
- * @flags: 
- * @name: 
- * 
- * Find the state of the flag @name in @flags.
- * 
- * Return value: The state of the flag (TRUE or FALSE).
- **/
-gboolean
-camel_system_flag_get (guint32 flags, const char *name)
-{
-	g_return_val_if_fail (name != NULL, FALSE);
-	
-	return flags & camel_system_flag (name);
-}
-
-
-/**
- * camel_message_info_new:
- *
- * Returns a new CamelMessageInfo structure.
- **/
-CamelMessageInfo *
-camel_message_info_new (void)
-{
-	CamelMessageInfo *info;
-	
-	info = g_malloc0(sizeof(*info));
-#ifdef DOEPOOLV
-	info->strings = e_poolv_new(CAMEL_MESSAGE_INFO_LAST);
-#endif
-#ifdef DOESTRV
-	info->strings = e_strv_new (CAMEL_MESSAGE_INFO_LAST);
-#endif
-	info->refcount = 1;
-
-	return info;
-}
-
-/**
- * camel_message_info_ref:
- * @info: 
- * 
- * Reference an info.
- *
- * NOTE: This interface is not MT-SAFE, like the others.
- **/
-void camel_message_info_ref(CamelMessageInfo *info)
-{
-	GLOBAL_INFO_LOCK(info);
-	info->refcount++;
-	GLOBAL_INFO_UNLOCK(info);
-}
-
-/**
- * camel_message_info_new_from_header:
- * @header: raw header
- *
- * Returns a new CamelMessageInfo structure populated by the header.
- **/
-CamelMessageInfo *
-camel_message_info_new_from_header (struct _header_raw *header)
-{
-	CamelMessageInfo *info;
-	char *subject, *from, *to, *cc, *mlist;
-	
-	subject = camel_folder_summary_format_string(header, "subject");
-	from = camel_folder_summary_format_address(header, "from");
-	to = camel_folder_summary_format_address(header, "to");
-	cc = camel_folder_summary_format_address(header, "cc");
-	mlist = header_raw_check_mailing_list(&header);
-
-	info = camel_message_info_new();
-
-	camel_message_info_set_subject(info, subject);
-	camel_message_info_set_from(info, from);
-	camel_message_info_set_to(info, to);
-	camel_message_info_set_cc(info, cc);
-	camel_message_info_set_mlist(info, mlist);
-
-	return info;
-}
-
-/**
- * camel_message_info_dup_to:
- * @from: source message info
- * @to: destination message info
- *
- * Duplicates the contents of one CamelMessageInfo structure into another.
- * (The destination is assumed to be empty: its contents are not freed.)
- * The slightly odd interface is to allow this to be used to initialize
- * "subclasses" of CamelMessageInfo.
- **/
-void
-camel_message_info_dup_to(const CamelMessageInfo *from, CamelMessageInfo *to)
-{
-	CamelFlag *flag;
-	CamelTag *tag;
-
-	/* Copy numbers */
-	to->flags = from->flags;
-	to->size = from->size;
-	to->date_sent = from->date_sent;
-	to->date_received = from->date_received;
-	to->refcount = 1;
-
-	/* Copy strings */
-#ifdef DOEPOOLV
-	to->strings = e_poolv_cpy (to->strings, from->strings);
-#elif defined (DOESTRV)
-	/* to->strings = e_strv_new(CAMEL_MESSAGE_INFO_LAST); */
-	e_strv_set(to->strings, CAMEL_MESSAGE_INFO_SUBJECT, camel_message_info_subject(from));
-	e_strv_set(to->strings, CAMEL_MESSAGE_INFO_FROM, camel_message_info_from(from));
-	e_strv_set(to->strings, CAMEL_MESSAGE_INFO_TO, camel_message_info_to(from));
-	e_strv_set(to->strings, CAMEL_MESSAGE_INFO_CC, camel_message_info_cc(from));
-	e_strv_set(to->strings, CAMEL_MESSAGE_INFO_UID, camel_message_info_uid(from));
-	e_strv_set(to->strings, CAMEL_MESSAGE_INFO_UID, camel_message_info_mlist(from));
-#else
-	to->subject = g_strdup(from->subject);
-	to->from = g_strdup(from->from);
-	to->to = g_strdup(from->to);
-	to->cc = g_strdup(from->cc);
-	to->uid = g_strdup(from->uid);
-	to->mlist = g_strdup(from->mlist);
-#endif
-	memcpy(&to->message_id, &from->message_id, sizeof(from->message_id));
-
-	/* Copy structures */
-	if (from->references) {
-		int len = sizeof(*from->references) + ((from->references->size-1) * sizeof(from->references->references[0]));
-
-		to->references = g_malloc(len);
-		memcpy(to->references, from->references, len);
-	} else {
-		to->references = NULL;
-	}
-
-	flag = from->user_flags;
-	while (flag) {
-		camel_flag_set(&to->user_flags, flag->name, TRUE);
-		flag = flag->next;
-	}
-
-	tag = from->user_tags;
-	while (tag) {
-		camel_tag_set(&to->user_tags, tag->name, tag->value);
-		tag = tag->next;
-	}
-
-	/* No, this is impossible without knowing the class of summary we came from */
-	/* FIXME some day */
-	to->content = NULL;
-}
-
-/**
- * camel_message_info_free:
- * @mi: the message info
- *
- * Unref's and potentially frees a CamelMessageInfo and its contents.
- *
- * Can only be used to free CamelMessageInfo's created with
- * camel_message_info_dup_to.
- *
- * NOTE: This interface is not MT-SAFE, like the others.
- *
- **/
-void
-camel_message_info_free(CamelMessageInfo *mi)
-{
-	g_return_if_fail(mi != NULL);
-
-	GLOBAL_INFO_LOCK(info);
-	mi->refcount--;
-	if (mi->refcount > 0) {
-		GLOBAL_INFO_UNLOCK(info);
-		return;
-	}
-	GLOBAL_INFO_UNLOCK(info);
-
-#ifdef DOEPOOLV
-	e_poolv_destroy(mi->strings);
-#elif defined (DOESTRV)
-	e_strv_destroy(mi->strings);
-#else
-	g_free(mi->uid);
-	g_free(mi->subject);
-	g_free(mi->from);
-	g_free(mi->to);
-	g_free(mi->cc);
-	g_free(mi->mlist);
-#endif
-	g_free(mi->references);
-	camel_flag_list_free(&mi->user_flags);
-	camel_tag_list_free(&mi->user_tags);
-	/* FIXME: content info? */
-	g_free(mi);
-}
-
-#if defined (DOEPOOLV) || defined (DOESTRV)
-const char *
-camel_message_info_string (const CamelMessageInfo *mi, int type)
-{
-	g_assert (mi != NULL);
-	
-	if (mi->strings == NULL)
-		return "";
-#ifdef DOEPOOLV
-	return e_poolv_get (mi->strings, type);
-#else
-	return e_strv_get (mi->strings, type);
-#endif
-}
-
-void
-camel_message_info_set_string (CamelMessageInfo *mi, int type, char *str)
-{
-	g_assert (mi != NULL);
-	g_assert (mi->strings != NULL);
-#ifdef DOEPOOLV
-	e_poolv_set (mi->strings, type, str, TRUE);
-#else
-	mi->strings = e_strv_set_ref_free (mi->strings, type, str);
-#endif
-}
-#endif
-
-#if 0
-static void
-content_info_dump(CamelMessageContentInfo *ci, int depth)
-{
-	char *p;
-
-	p = alloca(depth*4+1);
-	memset(p, ' ', depth*4);
-	p[depth*4] = 0;
-
-	if (ci == NULL) {
-		printf("%s\n", p);
-		return;
-	}
-
-	printf("%scontent-type: %s/%s\n", p, ci->type->type, ci->type->subtype);
-	printf("%scontent-transfer-encoding: %s\n", p, ci->encoding);
-	printf("%scontent-description: %s\n", p, ci->description);
-	printf("%ssize: %lu\n", p, (unsigned long)ci->size);
-	ci = ci->childs;
-	while (ci) {
-		content_info_dump(ci, depth+1);
-		ci = ci->next;
-	}
-}
-
-void
-message_info_dump(CamelMessageInfo *mi)
-{
-	if (mi == NULL) {
-		printf("No message?\n");
-		return;
-	}
-
-	printf("Subject: %s\n", camel_message_info_subject(mi));
-	printf("To: %s\n", camel_message_info_to(mi));
-	printf("Cc: %s\n", camel_message_info_cc(mi));
-	printf("mailing list: %s\n", camel_message_info_mlist(mi));
-	printf("From: %s\n", camel_message_info_from(mi));
-	printf("UID: %s\n", camel_message_info_uid(mi));
-	printf("Flags: %04x\n", mi->flags & 0xffff);
-	content_info_dump(mi->content, 0);
-}
-
-int main(int argc, char **argv)
-{
-	CamelMimeParser *mp;
-	int fd;
-	CamelFolderSummary *s;
-	char *buffer;
-	int len;
-	int i;
-	ibex *index;
-
-	/*g_tk_init(&argc, &argv);*/
-
-#if 0
-	{
-		int i;
-		char *s;
-		char buf[1024];
-
-		for (i=0;i<434712;i++) {
-			memcpy(buf, "                                                         ", 50);
-			buf[50] = 0;
-#if 0
-			s = g_strdup(buf);
-			g_free(s);
-#endif
-		}
-		return 0;
-	}
-#endif
-
-	if (argc < 2 ) {
-		printf("usage: %s mbox\n", argv[0]);
-		return 1;
-	}
-
-	fd = open(argv[1], O_RDONLY);
-
-	index = ibex_open("index.ibex", O_CREAT|O_RDWR, 0600);
-
-	mp = camel_mime_parser_new();
-	camel_mime_parser_scan_from(mp, TRUE);
-/*	camel_mime_parser_set_header_regex(mp, "^(content-[^:]*|subject|from|to|date):");*/
-	camel_mime_parser_init_with_fd(mp, fd);
-
-	s = camel_folder_summary_new();
-	camel_folder_summary_set_build_content(s, TRUE);
-/*	camel_folder_summary_set_index(s, index);*/
-
-	while (camel_mime_parser_step(mp, &buffer, &len) == HSCAN_FROM) {
-		/*printf("Parsing message ...\n");*/
-		camel_folder_summary_add_from_parser(s, mp);
-		if (camel_mime_parser_step(mp, &buffer, &len) != HSCAN_FROM_END) {
-			g_warning("Uknown state encountered, excpecting %d, got %d\n", HSCAN_FROM_END, camel_mime_parser_state(mp));
-			break;
-		}
-	}
-
-	printf("Printing summary\n");
-	for (i=0;i
- *
- *  This program is free software; you can redistribute it and/or 
- *  modify it under the terms of the GNU General Public License as 
- *  published by the Free Software Foundation; either version 2 of the
- *  License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- *  USA
- */
-
-#ifndef _CAMEL_FOLDER_SUMMARY_H
-#define _CAMEL_FOLDER_SUMMARY_H
-
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#define CAMEL_FOLDER_SUMMARY(obj)         CAMEL_CHECK_CAST (obj, camel_folder_summary_get_type (), CamelFolderSummary)
-#define CAMEL_FOLDER_SUMMARY_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_folder_summary_get_type (), CamelFolderSummaryClass)
-#define CAMEL_IS_FOLDER_SUMMARY(obj)      CAMEL_CHECK_TYPE (obj, camel_folder_summary_get_type ())
-
-/*typedef struct _CamelFolderSummary      CamelFolderSummary;*/
-typedef struct _CamelFolderSummaryClass CamelFolderSummaryClass;
-
-/* A tree of message content info structures
-   describe the content structure of the message (if it has any) */
-struct _CamelMessageContentInfo {
-	struct _CamelMessageContentInfo *next;
-
-	struct _CamelMessageContentInfo *childs;
-	struct _CamelMessageContentInfo *parent;
-
-	struct _header_content_type *type;
-	char *id;
-	char *description;
-	char *encoding;
-	guint32 size;
-};
-
-/* system flag bits */
-enum _CamelMessageFlags {
-	CAMEL_MESSAGE_ANSWERED = 1<<0,
-	CAMEL_MESSAGE_DELETED = 1<<1,
-	CAMEL_MESSAGE_DRAFT = 1<<2,
-	CAMEL_MESSAGE_FLAGGED = 1<<3,
-	CAMEL_MESSAGE_SEEN = 1<<4,
-	CAMEL_MESSAGE_ATTACHMENTS = 1<<5,
-
-	/* following flags are for the folder, and are not really permanent flags */
-	CAMEL_MESSAGE_FOLDER_FLAGGED = 1<<16, /* for use by the folder implementation */
-	CAMEL_MESSAGE_USER = 1<<31 /* supports user flags */
-};
-
-typedef struct _CamelFlag {
-	struct _CamelFlag *next;
-	char name[1];		/* name allocated as part of the structure */
-} CamelFlag;
-
-typedef struct _CamelTag {
-	struct _CamelTag *next;
-	char *value;
-	char name[1];		/* name allocated as part of the structure */
-} CamelTag;
-
-/* a summary messageid is a 64 bit identifier (partial md5 hash) */
-typedef struct _CamelSummaryMessageID {
-	union {
-		guint64 id;
-		unsigned char hash[8];
-		struct {
-			guint32 hi;
-			guint32 lo;
-		} part;
-	} id;
-} CamelSummaryMessageID;
-
-/* summary references is a fixed size array of references */
-typedef struct _CamelSummaryReferences {
-	int size;
-	CamelSummaryMessageID references[1];
-} CamelSummaryReferences;
-
-/* #define DOESTRV */
-#define DOEPOOLV
-
-#if defined (DOEPOOLV) || defined (DOESTRV)
-
-/* string array indices */
-enum {
-	CAMEL_MESSAGE_INFO_UID,
-	CAMEL_MESSAGE_INFO_SUBJECT,
-	CAMEL_MESSAGE_INFO_FROM,
-	CAMEL_MESSAGE_INFO_TO,
-	CAMEL_MESSAGE_INFO_CC,
-	CAMEL_MESSAGE_INFO_MLIST,
-	CAMEL_MESSAGE_INFO_LAST,
-};
-#endif
-
-/* information about a given object */
-struct _CamelMessageInfo {
-	/* public fields */
-#ifdef DOEPOOLV
-	struct _EPoolv *strings;
-#elif defined (DOESTRV)
-	struct _EStrv *strings;		/* all strings packed into a single compact array */
-#else
-	char *subject;
-	char *from;
-	char *to;
-	char *cc;
-	char *mlist;
-
-	char *uid;
-#endif /* DOEPOOLV */
-	guint32 flags;
-	guint32 size;
-	guint32 refcount;
-
-	time_t date_sent;
-	time_t date_received;
-
-	CamelSummaryMessageID message_id;/* for this message */
-	CamelSummaryReferences *references;/* from parent to root */
-
-	struct _CamelFlag *user_flags;
-	struct _CamelTag *user_tags;
-
-	/* tree of content description - NULL if it is not available */
-	CamelMessageContentInfo *content;
-};
-
-enum _CamelFolderSummaryFlags {
-	CAMEL_SUMMARY_DIRTY = 1<<0,
-};
-
-struct _CamelFolderSummary {
-	CamelObject parent;
-
-	struct _CamelFolderSummaryPrivate *priv;
-
-	/* header info */
-	guint32 version;	/* version of file required, should be set by implementors */
-	guint32 flags;		/* flags */
-	guint32 nextuid;	/* next uid? */
-	guint32 saved_count;	/* how many were saved/loaded */
-	time_t time;		/* timestamp for this summary (for implementors to use) */
-
-	/* sizes of memory objects */
-	guint32 message_info_size;
-	guint32 content_info_size;
-
-#if defined (DOEPOOLV) || defined (DOESTRV)
-	guint32 message_info_strings;
-#endif	
-	/* memory allocators (setup automatically) */
-	struct _EMemChunk *message_info_chunks;
-	struct _EMemChunk *content_info_chunks;
-
-	char *summary_path;
-	gboolean build_content;	/* do we try and parse/index the content, or not? */
-
-	GPtrArray *messages;	/* CamelMessageInfo's */
-	GHashTable *messages_uid; /* CamelMessageInfo's by uid */
-};
-
-struct _CamelFolderSummaryClass {
-	CamelObjectClass parent_class;
-
-	/* load/save the global info */
-	int (*summary_header_load)(CamelFolderSummary *, FILE *);
-	int (*summary_header_save)(CamelFolderSummary *, FILE *);
-
-	/* create/save/load an individual message info */
-	CamelMessageInfo * (*message_info_new)(CamelFolderSummary *, struct _header_raw *);
-	CamelMessageInfo * (*message_info_new_from_parser)(CamelFolderSummary *, CamelMimeParser *);
-	CamelMessageInfo * (*message_info_new_from_message)(CamelFolderSummary *, CamelMimeMessage *);
-	CamelMessageInfo * (*message_info_load)(CamelFolderSummary *, FILE *);
-	int		   (*message_info_save)(CamelFolderSummary *, FILE *, CamelMessageInfo *);
-	void		   (*message_info_free)(CamelFolderSummary *, CamelMessageInfo *);
-
-	/* save/load individual content info's */
-	CamelMessageContentInfo * (*content_info_new)(CamelFolderSummary *, struct _header_raw *);
-	CamelMessageContentInfo * (*content_info_new_from_parser)(CamelFolderSummary *, CamelMimeParser *);
-	CamelMessageContentInfo * (*content_info_new_from_message)(CamelFolderSummary *, CamelMimePart *);
-	CamelMessageContentInfo * (*content_info_load)(CamelFolderSummary *, FILE *);
-	int		          (*content_info_save)(CamelFolderSummary *, FILE *, CamelMessageContentInfo *);
-	void		          (*content_info_free)(CamelFolderSummary *, CamelMessageContentInfo *);
-
-	/* get the next uid */
-	char *(*next_uid_string)(CamelFolderSummary *);
-};
-
-guint			 camel_folder_summary_get_type	(void);
-CamelFolderSummary      *camel_folder_summary_new	(void);
-
-void camel_folder_summary_set_filename(CamelFolderSummary *, const char *);
-void camel_folder_summary_set_index(CamelFolderSummary *, ibex *);
-void camel_folder_summary_set_build_content(CamelFolderSummary *, gboolean state);
-
-guint32  camel_folder_summary_next_uid        (CamelFolderSummary *s);
-char    *camel_folder_summary_next_uid_string (CamelFolderSummary *s);
-void 	 camel_folder_summary_set_uid	      (CamelFolderSummary *s, guint32 uid);
-
-/* load/save the summary in its entirety */
-int camel_folder_summary_load(CamelFolderSummary *);
-int camel_folder_summary_save(CamelFolderSummary *);
-
-/* set the dirty bit on the summary */
-void camel_folder_summary_touch(CamelFolderSummary *s);
-
-/* add a new raw summary item */
-void camel_folder_summary_add(CamelFolderSummary *, CamelMessageInfo *info);
-
-/* build/add raw summary items */
-CamelMessageInfo *camel_folder_summary_add_from_header(CamelFolderSummary *, struct _header_raw *);
-CamelMessageInfo *camel_folder_summary_add_from_parser(CamelFolderSummary *, CamelMimeParser *);
-CamelMessageInfo *camel_folder_summary_add_from_message(CamelFolderSummary *, CamelMimeMessage *);
-
-/* Just build raw summary items */
-CamelMessageInfo *camel_folder_summary_info_new(CamelFolderSummary *s);
-CamelMessageInfo *camel_folder_summary_info_new_from_header(CamelFolderSummary *, struct _header_raw *);
-CamelMessageInfo *camel_folder_summary_info_new_from_parser(CamelFolderSummary *, CamelMimeParser *);
-CamelMessageInfo *camel_folder_summary_info_new_from_message(CamelFolderSummary *, CamelMimeMessage *);
-
-void camel_folder_summary_info_ref(CamelFolderSummary *, CamelMessageInfo *);
-void camel_folder_summary_info_free(CamelFolderSummary *, CamelMessageInfo *);
-
-CamelMessageContentInfo *camel_folder_summary_content_info_new(CamelFolderSummary *s);
-void camel_folder_summary_content_info_free(CamelFolderSummary *s, CamelMessageContentInfo *ci);
-
-/* removes a summary item, doesn't fix content offsets */
-void camel_folder_summary_remove(CamelFolderSummary *s, CamelMessageInfo *info);
-void camel_folder_summary_remove_uid(CamelFolderSummary *s, const char *uid);
-void camel_folder_summary_remove_index(CamelFolderSummary *s, int);
-/* remove all items */
-void camel_folder_summary_clear(CamelFolderSummary *s);
-
-/* lookup functions */
-int camel_folder_summary_count(CamelFolderSummary *);
-CamelMessageInfo *camel_folder_summary_index(CamelFolderSummary *, int);
-CamelMessageInfo *camel_folder_summary_uid(CamelFolderSummary *, const char *uid);
-GPtrArray *camel_folder_summary_array(CamelFolderSummary *s);
-void camel_folder_summary_array_free(CamelFolderSummary *s, GPtrArray *array);
-
-/* summary formatting utils */
-char *camel_folder_summary_format_address(struct _header_raw *h, const char *name);
-char *camel_folder_summary_format_string(struct _header_raw *h, const char *name);
-
-/* basically like strings, but certain keywords can be compressed and de-cased */
-int camel_folder_summary_encode_token(FILE *, const char *);
-int camel_folder_summary_decode_token(FILE *, char **);
-
-/* message flag operations */
-gboolean	camel_flag_get(CamelFlag **list, const char *name);
-gboolean	camel_flag_set(CamelFlag **list, const char *name, gboolean state);
-int		camel_flag_list_size(CamelFlag **list);
-void		camel_flag_list_free(CamelFlag **list);
-
-guint32         camel_system_flag (const char *name);
-gboolean        camel_system_flag_get (guint32 flags, const char *name);
-
-/* message tag operations */
-const char	*camel_tag_get(CamelTag **list, const char *name);
-gboolean	camel_tag_set(CamelTag **list, const char *name, const char *value);
-int		camel_tag_list_size(CamelTag **list);
-void		camel_tag_list_free(CamelTag **list);
-
-/* message info utils for working with pseudo-messageinfo structures
-   NOTE: These cannot be added to a real summary object, but suffice for all
-   other external interfaces that use message info's */
-CamelMessageInfo *camel_message_info_new(void);
-void camel_message_info_ref(CamelMessageInfo *info);
-CamelMessageInfo *camel_message_info_new_from_header(struct _header_raw *header);
-void camel_message_info_dup_to(const CamelMessageInfo *from, CamelMessageInfo *to);
-void camel_message_info_free(CamelMessageInfo *mi);
-
-/* accessors */
-#if defined (DOEPOOLV) || defined (DOESTRV)
-const char *camel_message_info_string(const CamelMessageInfo *mi, int type);
-#define camel_message_info_subject(x) camel_message_info_string((const CamelMessageInfo *)(x), CAMEL_MESSAGE_INFO_SUBJECT)
-#define camel_message_info_from(x) camel_message_info_string((const CamelMessageInfo *)(x), CAMEL_MESSAGE_INFO_FROM)
-#define camel_message_info_to(x) camel_message_info_string((const CamelMessageInfo *)(x), CAMEL_MESSAGE_INFO_TO)
-#define camel_message_info_cc(x) camel_message_info_string((const CamelMessageInfo *)(x), CAMEL_MESSAGE_INFO_CC)
-#define camel_message_info_uid(x) camel_message_info_string((const CamelMessageInfo *)(x), CAMEL_MESSAGE_INFO_UID)
-#define camel_message_info_mlist(x) camel_message_info_string((const CamelMessageInfo *)(x), CAMEL_MESSAGE_INFO_MLIST)
-
-void camel_message_info_set_string(CamelMessageInfo *mi, int type, char *str);
-#define camel_message_info_set_subject(x, s) camel_message_info_set_string(x, CAMEL_MESSAGE_INFO_SUBJECT, s)
-#define camel_message_info_set_from(x, s) camel_message_info_set_string(x, CAMEL_MESSAGE_INFO_FROM, s)
-#define camel_message_info_set_to(x, s) camel_message_info_set_string(x, CAMEL_MESSAGE_INFO_TO, s)
-#define camel_message_info_set_cc(x, s) camel_message_info_set_string(x, CAMEL_MESSAGE_INFO_CC, s)
-#define camel_message_info_set_uid(x, s) camel_message_info_set_string(x, CAMEL_MESSAGE_INFO_UID, s)
-#define camel_message_info_set_mlist(x, s) camel_message_info_set_string(x, CAMEL_MESSAGE_INFO_MLIST, s)
-
-#else
-
-#define camel_message_info_subject(x) (((CamelMessageInfo *)(x))->subject?((CamelMessageInfo *)(x))->subject:"")
-#define camel_message_info_from(x) (((CamelMessageInfo *)(x))->from?((CamelMessageInfo *)(x))->from:"")
-#define camel_message_info_to(x) (((CamelMessageInfo *)(x))->to?((CamelMessageInfo *)(x))->to:"")
-#define camel_message_info_cc(x) (((CamelMessageInfo *)(x))->cc?((CamelMessageInfo *)(x))->cc:"")
-#define camel_message_info_uid(x) (((CamelMessageInfo *)(x))->uid?((CamelMessageInfo *)(x))->uid:"")
-#define camel_message_info_mlist(x) (((CamelMessageInfo *)(x))->mlist?((CamelMessageInfo *)(x))->mlist:"")
-
-#define camel_message_info_set_subject(x, s) (g_free(((CamelMessageInfo *)(x))->subject),((CamelMessageInfo *)(x))->subject = (s))
-#define camel_message_info_set_from(x, s) (g_free(((CamelMessageInfo *)(x))->from),((CamelMessageInfo *)(x))->from = (s))
-#define camel_message_info_set_to(x, s) (g_free(((CamelMessageInfo *)(x))->to),((CamelMessageInfo *)(x))->to = (s))
-#define camel_message_info_set_cc(x, s) (g_free(((CamelMessageInfo *)(x))->cc),((CamelMessageInfo *)(x))->cc = (s))
-#define camel_message_info_set_uid(x, s) (g_free(((CamelMessageInfo *)(x))->uid),((CamelMessageInfo *)(x))->uid = (s))
-#define camel_message_info_set_mlist(x, s) (g_free(((CamelMessageInfo *)(x))->mlist),((CamelMessageInfo *)(x))->mlist = (s))
-#endif
-
-#endif /* ! _CAMEL_FOLDER_SUMMARY_H */
diff --git a/camel/camel-folder-thread.c b/camel/camel-folder-thread.c
deleted file mode 100644
index 4417668ae1..0000000000
--- a/camel/camel-folder-thread.c
+++ /dev/null
@@ -1,784 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- *  Copyright (C) 2000 Ximian Inc.
- *
- *  Authors: Michael Zucchi 
- *
- *  This program is free software; you can redistribute it and/or 
- *  modify it under the terms of the GNU General Public License as 
- *  published by the Free Software Foundation; either version 2 of the
- *  License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- *  USA
- */
-
-/* TODO: This could probably be made a camel object, but it isn't really required */
-
-#ifdef HAVE_CONFIG_H
-#include 
-#endif
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include "camel-folder-thread.h"
-#include "e-util/e-memory.h"
-
-#define d(x)
-
-#define TIMEIT
-
-#ifdef TIMEIT
-#include 
-#include 
-#endif
-
-static void
-container_add_child(CamelFolderThreadNode *node, CamelFolderThreadNode *child)
-{
-	d(printf("\nAdding child %p to parent %p \n", child, node));
-	child->next = node->child;
-	node->child = child;
-	child->parent = node;
-}
-
-static void
-container_parent_child(CamelFolderThreadNode *parent, CamelFolderThreadNode *child)
-{
-	CamelFolderThreadNode *c, *node;
-
-	/* are we already the right parent? */
-	if (child->parent == parent)
-		return;
-
-	/* would this create a loop? */
-	node = parent->parent;
-	while (node) {
-		if (node == child)
-			return;
-		node = node->parent;
-	}
-
-	/* are we unparented? */
-	if (child->parent == NULL) {
-		container_add_child(parent, child);
-		return;
-	}
-
-	/* else remove child from its existing parent, and reparent */
-	node = child->parent;
-	c = (CamelFolderThreadNode *)&node->child;
-	d(printf("scanning children:\n"));
-	while (c->next) {
-		d(printf(" %p\n", c));
-	        if (c->next==child) {
-			d(printf("found node %p\n", child));
-			c->next = c->next->next;
-			child->parent = NULL;
-			container_add_child(parent, child);
-			return;
-		}
-		c = c->next;
-	}
-
-	printf("DAMN, we shouldn't  be here!\n");
-}
-
-static void
-prune_empty(CamelFolderThread *thread, CamelFolderThreadNode **cp)
-{
-	CamelFolderThreadNode *child, *next, *c, *lastc;
-
-	/* yes, this is intentional */
-	lastc = (CamelFolderThreadNode *)cp;
-	while (lastc->next) {
-		c = lastc->next;
-
-		d(printf("checking message %p %p (%08x%08x)\n", c,
-			 c->message, c->message?c->message->message_id.id.part.hi:0,
-			 c->message?c->message->message_id.id.part.lo:0));
-		if (c->message == NULL) {
-			if (c->child == NULL) {
-				d(printf("removing empty node\n"));
-				lastc->next = c->next;
-				e_memchunk_free(thread->node_chunks, c);
-				continue;
-			}
-			if (c->parent || c->child->next==0) {
-				d(printf("promoting child\n"));
-				lastc->next = c->next; /* remove us */
-				child = c->child;
-				while (child) {
-					next = child->next;
-
-					child->parent = c->parent;
-					child->next = lastc->next;
-					lastc->next = child;
-
-					child = next;
-				}
-				continue;
-			}
-		}
-		prune_empty(thread, &c->child);
-		lastc = c;
-	}
-}
-
-static void
-hashloop(void *key, void *value, void *data)
-{
-	CamelFolderThreadNode *c = value;
-	CamelFolderThreadNode *tail = data;
-
-	if (c->parent == NULL) {
-		c->next = tail->next;
-		tail->next = c;
-	}
-}
-
-static char *
-get_root_subject(CamelFolderThreadNode *c, int *re)
-{
-	char *s, *p;
-	CamelFolderThreadNode *scan;
-	
-	s = NULL;
-	*re = FALSE;
-	if (c->message)
-		s = (char *)camel_message_info_subject(c->message);
-	else {
-		/* one of the children will always have a message */
-		scan = c->child;
-		while (scan) {
-			if (scan->message) {
-				s = (char *)camel_message_info_subject(scan->message);
-				break;
-			}
-			scan = scan->next;
-		}
-	}
-	if (s != NULL) {
-		while (*s) {
-			while (isspace(*s))
-				s++;
-			if (s[0] == 0)
-				break;
-			if ((s[0] == 'r' || s[0]=='R')
-			    && (s[1] == 'e' || s[1]=='E')) {
-				p = s+2;
-				while (isdigit(*p) || (ispunct(*p) && (*p != ':')))
-					p++;
-				if (*p==':') {
-					*re = TRUE;
-					s = p+1;
-				} else
-					break;
-			} else
-				break;
-		}
-		if (*s)
-			return s;
-	}
-	return NULL;
-}
-
-/* this can be pretty slow, but not used often */
-/* clast cannot be null */
-static void
-remove_node(CamelFolderThreadNode **list, CamelFolderThreadNode *node, CamelFolderThreadNode **clast)
-{
-	CamelFolderThreadNode *c;
-
-	/* this is intentional, even if it looks funny */
-	/* if we have a parent, then we should remove it from the parent list,
-	   otherwise we remove it from the root list */
-	if (node->parent) {
-		c = (CamelFolderThreadNode *)&node->parent->child;
-	} else {
-		c = (CamelFolderThreadNode *)list;
-	}
-	while (c->next) {
-		if (c->next == node) {
-			if (*clast == c->next)
-				*clast = c;
-			c->next = c->next->next;
-			return;
-		}
-		c = c->next;
-	}
-
-	printf("ERROR: removing node %p failed\n", node);
-}
-
-static void
-group_root_set(CamelFolderThread *thread, CamelFolderThreadNode **cp)
-{
-	GHashTable *subject_table = g_hash_table_new(g_str_hash, g_str_equal);
-	CamelFolderThreadNode *c, *clast, *scan, *container;
-
-	/* gather subject lines */ 
-	d(printf("gathering subject lines\n"));
-	clast = (CamelFolderThreadNode *)cp;
-	c = clast->next;
-	while (c) {
-		c->root_subject = get_root_subject(c, &c->re);
-		if (c->root_subject) {
-			container = g_hash_table_lookup(subject_table, c->root_subject);
-			if (container == NULL
-			    || (container->message == NULL && c->message)
-			    || (container->re == TRUE && !c->re)) {
-				g_hash_table_insert(subject_table, c->root_subject, c);
-			}
-		}
-		c = c->next;
-	}
-
-	/* merge common subjects? */
-	clast = (CamelFolderThreadNode *)cp;
-	while (clast->next) {
-		c = clast->next;
-		d(printf("checking %p %s\n", c, c->root_subject));
-		if (c->root_subject
-		    && (container = g_hash_table_lookup(subject_table, c->root_subject))
-		    && (container != c)) {
-			d(printf(" matching %p %s\n", container, container->root_subject));
-			if (c->message == NULL && container->message == NULL) {
-				d(printf("merge containers children\n"));
-				/* steal the children from c onto container, and unlink c */
-				scan = (CamelFolderThreadNode *)&container->child;
-				while (scan->next)
-					scan = scan->next;
-				scan->next = c->child;
-				clast->next = c->next;
-				e_memchunk_free(thread->node_chunks, c);
-				continue;
-			} if (c->message == NULL && container->message != NULL) {
-				d(printf("container is non-empty parent\n"));
-				remove_node(cp, container, &clast);
-				container_add_child(c, container);
-			} else if (c->message != NULL && container->message == NULL) {
-				d(printf("container is empty child\n"));
-				clast->next = c->next;
-				container_add_child(container, c);
-				continue;
-			} else if (c->re && !container->re) {
-				d(printf("container is re\n"));
-				clast->next = c->next;
-				container_add_child(container, c);
-				continue;
-			} else if (!c->re && container->re) {
-				d(printf("container is not re\n"));
-				remove_node(cp, container, &clast);
-				container_add_child(c, container);
-			} else if (c->re && container->re) {
-				d(printf("subjects are common %p and %p\n", c, container));
-
-				/* build a phantom node */
-				remove_node(cp, container, &clast);
-				remove_node(cp, c, &clast);
-
-				scan = e_memchunk_alloc0(thread->node_chunks);
-
-				scan->root_subject = c->root_subject;
-				scan->re = c->re && container->re;
-				scan->next = c->next;
-				clast->next = scan;
-				container_add_child(scan, c);
-				container_add_child(scan, container);
-				clast = scan;
-				g_hash_table_insert(subject_table, scan->root_subject, scan);
-				continue;
-			}
-		}
-		clast = c;
-	}
-	g_hash_table_destroy(subject_table);
-}
-
-struct _tree_info {
-	GHashTable *visited;
-};
-
-static int
-dump_tree_rec(struct _tree_info *info, CamelFolderThreadNode *c, int depth)
-{
-	char *p;
-	int count=0;
-
-	p = alloca(depth*2+1);
-	memset(p, ' ', depth*2);
-	p[depth*2] = 0;
-
-	while (c) {
-		if (g_hash_table_lookup(info->visited, c)) {
-			printf("WARNING: NODE REVISITED: %p\n", c);
-		} else {
-			g_hash_table_insert(info->visited, c, c);
-		}
-		if (c->message) {
-			printf("%s %p Subject: %s <%.8s>\n", p, c, camel_message_info_subject(c->message), c->message->message_id.id.hash);
-			count += 1;
-		} else {
-			printf("%s %p \n", p, c);
-		}
-		if (c->child)
-			count += dump_tree_rec(info, c->child, depth+1);
-		c = c->next;
-	}
-	return count;
-}
-
-int
-camel_folder_threaded_messages_dump(CamelFolderThreadNode *c)
-{
-	int count;
-	struct _tree_info info;
-
-	info.visited = g_hash_table_new(g_direct_hash, g_direct_equal);
-	count = dump_tree_rec(&info, c, 0);
-	g_hash_table_destroy(info.visited);
-	return count;
-}
-
-static int
-sort_node(const void *a, const void *b)
-{
-	const CamelFolderThreadNode *a1 = ((CamelFolderThreadNode **)a)[0];
-	const CamelFolderThreadNode *b1 = ((CamelFolderThreadNode **)b)[0];
-
-	/* if we have no message, it must be a dummy node, which 
-	   also means it must have a child, just use that as the
-	   sort data (close enough?) */
-	if (a1->message == NULL)
-		a1 = a1->child;
-	if (b1->message == NULL)
-		b1 = b1->child;
-	if (a1->order == b1->order)
-		return 0;
-	if (a1->order < b1->order)
-		return -1;
-	else
-		return 1;
-}
-
-static void
-sort_thread(CamelFolderThreadNode **cp)
-{
-	CamelFolderThreadNode *c, *head, **carray;
-	int size=0;
-
-	c = *cp;
-	while (c) {
-		/* sort the children while we're at it */
-		if (c->child)
-			sort_thread(&c->child);
-		size++;
-		c = c->next;
-	}
-	if (size<2)
-		return;
-	carray = alloca(size*sizeof(CamelFolderThreadNode *));
-	c = *cp;
-	size=0;
-	while (c) {
-		carray[size] = c;
-		c = c->next;
-		size++;
-	}
-	qsort(carray, size, sizeof(CamelFolderThreadNode *), sort_node);
-	size--;
-	head = carray[size];
-	head->next = NULL;
-	size--;
-	do {
-		c = carray[size];
-		c->next = head;
-		head = c;
-		size--;
-	} while (size>=0);
-	*cp = head;
-}
-
-static guint id_hash(void *key)
-{
-	CamelSummaryMessageID *id = (CamelSummaryMessageID *)key;
-
-	return id->id.part.lo;
-}
-
-static gint id_equal(void *a, void *b)
-{
-	return ((CamelSummaryMessageID *)a)->id.id == ((CamelSummaryMessageID *)b)->id.id;
-}
-
-/**
- * camel_folder_thread_messages_new:
- * @folder: 
- * @uids: The subset of uid's to thread.  If NULL. then thread all
- * uid's in @folder.
- * 
- * Thread a (subset) of the messages in a folder.  And sort the result
- * in summary order.
- * 
- * This function is probably to be removed soon.
- *
- * Return value: A CamelFolderThread contianing a tree of CamelFolderThreadNode's
- * which represent the threaded structure of the messages.
- **/
-CamelFolderThread *
-camel_folder_thread_messages_new(CamelFolder *folder, GPtrArray *uids)
-{
-	GHashTable *id_table, *no_id_table;
-	int i;
-	CamelFolderThreadNode *c, *child, *head;
-	CamelFolderThread *thread;
-	GHashTable *wanted = NULL;
-	GPtrArray *summary;
-
-#ifdef TIMEIT
-	struct timeval start, end;
-	unsigned long diff;
-
-	gettimeofday(&start, NULL);
-#endif
-
-	thread = g_malloc(sizeof(*thread));
-	thread->tree = NULL;
-	thread->node_chunks = e_memchunk_new(32, sizeof(CamelFolderThreadNode));
-	thread->folder = folder;
-	camel_object_ref((CamelObject *)folder);
-
-	/* wanted is the list of what we want, we put it in a hash for quick lookup */
-	if (uids) {
-		wanted = g_hash_table_new(g_str_hash, g_str_equal);
-		for (i=0;ilen;i++)
-			g_hash_table_insert(wanted, uids->pdata[i], uids->pdata[i]);
-	}
-
-	thread->summary = summary = camel_folder_get_summary(folder);
-	
-	id_table = g_hash_table_new((GHashFunc)id_hash, (GCompareFunc)id_equal);
-	no_id_table = g_hash_table_new(NULL, NULL);
-	for (i=0;ilen;i++) {
-		CamelMessageInfo *mi = summary->pdata[i];
-		const char *uid = camel_message_info_uid(mi);
-
-		if (wanted && g_hash_table_lookup(wanted, uid) == 0)
-			continue;
-
-		if (mi->message_id.id.id) {
-			c = g_hash_table_lookup(id_table, &mi->message_id);
-			/* check for duplicate messages */
-			if (c) {
-				/* if duplicate, just make out it is a no-id message,  but try and insert it
-				   into the right spot in the tree */
-				d(printf("doing: (duplicate message id)\n"));
-				c = e_memchunk_alloc0(thread->node_chunks);
-				g_hash_table_insert(no_id_table, (void *)mi, c);
-			} else {
-				d(printf("doing : %08x%08x (%s)\n", mi->message_id.id.part.hi, mi->message_id.id.part.lo, camel_message_info_subject(mi)));
-				c = e_memchunk_alloc0(thread->node_chunks);
-				g_hash_table_insert(id_table, (void *)&mi->message_id, c);
-			}
-		} else {
-			d(printf("doing : (no message id)\n"));
-			c = e_memchunk_alloc0(thread->node_chunks);
-			g_hash_table_insert(no_id_table, (void *)mi, c);
-		}
-
-		c->message = mi;
-		c->order = i;
-		child = c;
-		if (mi->references) {
-			int j;
-
-			d(printf("references:\n"));
-			for (j=0;jreferences->size;j++) {
-				/* should never be empty, but just incase */
-				if (mi->references->references[j].id.id == 0)
-					continue;
-
-				c = g_hash_table_lookup(id_table, &mi->references->references[j]);
-				if (c == NULL) {
-					d(printf("not found\n"));
-					c = e_memchunk_alloc0(thread->node_chunks);
-					g_hash_table_insert(id_table, &mi->references->references[j], c);
-				}
-				if (c!=child)
-					container_parent_child(c, child);
-				child = c;
-			}
-		}
-	}
-
-	d(printf("\n\n"));
-	/* build a list of root messages (no parent) */
-	head = NULL;
-	g_hash_table_foreach(id_table, hashloop, &head);
-	g_hash_table_foreach(no_id_table, hashloop, &head);
-
-	g_hash_table_destroy(id_table);
-	g_hash_table_destroy(no_id_table);
-
-	/* remove empty parent nodes */
-	prune_empty(thread, &head);
-
-	/* find any siblings which missed out */
-	group_root_set(thread, &head);
-
-#if 0
-	printf("finished\n");
-	i = camel_folder_thread_messages_dump(head);
-	printf("%d count, %d items in tree\n", uids->len, i);
-#endif
-
-	sort_thread(&head);
-
-	/* remove any phantom nodes, this could possibly be put in group_root_set()? */
-	c = (CamelFolderThreadNode *)&head;
-	while (c && c->next) {
-		CamelFolderThreadNode *scan, *newtop;
-
-		child = c->next;
-		if (child->message == NULL) {
-			newtop = child->child;
-			/* unlink pseudo node */
-			c->next = newtop;
-
-			/* link its siblings onto the end of its children */
-			scan = (CamelFolderThreadNode *)&newtop->child;
-			while (scan->next)
-				scan = scan->next;
-			scan->next = newtop->next;
-			/* and link the now 'real' node into the list */
-			newtop->next = child->next;
-			c = newtop;
-			e_memchunk_free(thread->node_chunks, child);
-		} else {
-			c = child;
-		}
-	}
-
-	/* this is only debug assertion stuff */
-	c = (CamelFolderThreadNode *)&head;
-	while (c->next) {
-		c = c->next;
-		if (c->message == NULL)
-			g_warning("threading missed removing a pseudo node: %s\n", c->root_subject);
-	}
-
-	thread->tree = head;
-
-#ifdef TIMEIT
-	gettimeofday(&end, NULL);
-	diff = end.tv_sec * 1000 + end.tv_usec/1000;
-	diff -= start.tv_sec * 1000 + start.tv_usec/1000;
-	printf("Message threading %d messages took %ld.%03ld seconds\n",
-	       uids->len, diff / 1000, diff % 1000);
-#endif
-
-	return thread;
-}
-
-/**
- * camel_folder_thread_messages_new_summary:
- * @summary: Array of CamelMessageInfo's to thread.
- * 
- * Thread a list of MessageInfo's.  The summary must remain valid for the
- * life of the CamelFolderThread created by this function, and it is upto the
- * caller to ensure this.
- * 
- * Return value: A CamelFolderThread contianing a tree of CamelFolderThreadNode's
- * which represent the threaded structure of the messages.
- **/
-CamelFolderThread *
-camel_folder_thread_messages_new_summary(GPtrArray *summary)
-{
-	GHashTable *id_table, *no_id_table;
-	int i;
-	CamelFolderThreadNode *c, *child, *head;
-	CamelFolderThread *thread;
-
-#ifdef TIMEIT
-	struct timeval start, end;
-	unsigned long diff;
-
-	gettimeofday(&start, NULL);
-#endif
-
-	thread = g_malloc(sizeof(*thread));
-	thread->tree = NULL;
-	thread->node_chunks = e_memchunk_new(32, sizeof(CamelFolderThreadNode));
-	thread->folder = NULL;
-	thread->summary = NULL;
-	
-	id_table = g_hash_table_new((GHashFunc)id_hash, (GCompareFunc)id_equal);
-	no_id_table = g_hash_table_new(NULL, NULL);
-	for (i=0;ilen;i++) {
-		CamelMessageInfo *mi = summary->pdata[i];
-
-		if (mi->message_id.id.id) {
-			c = g_hash_table_lookup(id_table, &mi->message_id);
-			/* check for duplicate messages */
-			if (c) {
-				/* if duplicate, just make out it is a no-id message,  but try and insert it
-				   into the right spot in the tree */
-				d(printf("doing: (duplicate message id)\n"));
-				c = e_memchunk_alloc0(thread->node_chunks);
-				g_hash_table_insert(no_id_table, (void *)mi, c);
-			} else {
-				d(printf("doing : %08x%08x (%s)\n", mi->message_id.id.part.hi, mi->message_id.id.part.lo, camel_message_info_subject(mi)));
-				c = e_memchunk_alloc0(thread->node_chunks);
-				g_hash_table_insert(id_table, (void *)&mi->message_id, c);
-			}
-		} else {
-			d(printf("doing : (no message id)\n"));
-			c = e_memchunk_alloc0(thread->node_chunks);
-			g_hash_table_insert(no_id_table, (void *)mi, c);
-		}
-
-		c->message = mi;
-		c->order = i;
-		child = c;
-		if (mi->references) {
-			int j;
-
-			d(printf("references:\n"));
-			for (j=0;jreferences->size;j++) {
-				/* should never be empty, but just incase */
-				if (mi->references->references[j].id.id == 0)
-					continue;
-
-				c = g_hash_table_lookup(id_table, &mi->references->references[j]);
-				if (c == NULL) {
-					d(printf("not found\n"));
-					c = e_memchunk_alloc0(thread->node_chunks);
-					g_hash_table_insert(id_table, &mi->references->references[j], c);
-				}
-				if (c!=child)
-					container_parent_child(c, child);
-				child = c;
-			}
-		}
-	}
-
-	d(printf("\n\n"));
-	/* build a list of root messages (no parent) */
-	head = NULL;
-	g_hash_table_foreach(id_table, hashloop, &head);
-	g_hash_table_foreach(no_id_table, hashloop, &head);
-
-	g_hash_table_destroy(id_table);
-	g_hash_table_destroy(no_id_table);
-
-	/* remove empty parent nodes */
-	prune_empty(thread, &head);
-
-	/* find any siblings which missed out */
-	group_root_set(thread, &head);
-
-#if 0
-	printf("finished\n");
-	i = camel_folder_thread_messages_dump(head);
-	printf("%d count, %d items in tree\n", uids->len, i);
-#endif
-
-	sort_thread(&head);
-
-	/* remove any phantom nodes, this could possibly be put in group_root_set()? */
-	c = (CamelFolderThreadNode *)&head;
-	while (c && c->next) {
-		CamelFolderThreadNode *scan, *newtop;
-
-		child = c->next;
-		if (child->message == NULL) {
-			newtop = child->child;
-			/* unlink pseudo node */
-			c->next = newtop;
-
-			/* link its siblings onto the end of its children */
-			scan = (CamelFolderThreadNode *)&newtop->child;
-			while (scan->next)
-				scan = scan->next;
-			scan->next = newtop->next;
-			/* and link the now 'real' node into the list */
-			newtop->next = child->next;
-			c = newtop;
-			e_memchunk_free(thread->node_chunks, child);
-		} else {
-			c = child;
-		}
-	}
-
-	/* this is only debug assertion stuff */
-	c = (CamelFolderThreadNode *)&head;
-	while (c->next) {
-		c = c->next;
-		if (c->message == NULL)
-			g_warning("threading missed removing a pseudo node: %s\n", c->root_subject);
-	}
-
-	thread->tree = head;
-
-#ifdef TIMEIT
-	gettimeofday(&end, NULL);
-	diff = end.tv_sec * 1000 + end.tv_usec/1000;
-	diff -= start.tv_sec * 1000 + start.tv_usec/1000;
-	printf("Message threading %d messages took %ld.%03ld seconds\n",
-	       summary->len, diff / 1000, diff % 1000);
-#endif
-
-	return thread;
-}
-
-/**
- * camel_folder_thread_messages_destroy:
- * @thread: 
- * 
- * Free all memory associated with the thread descriptor @thread.
- **/
-void
-camel_folder_thread_messages_destroy(CamelFolderThread *thread)
-{
-	if (thread->folder) {
-		camel_folder_free_summary(thread->folder, thread->summary);
-		camel_object_unref((CamelObject *)thread->folder);
-	}
-	e_memchunk_destroy(thread->node_chunks);
-	g_free(thread);
-}
-
-#if 0
-/* intended for incremental update.  Not implemented yet as, well, its probbaly
-   not worth it (memory overhead vs speed, may as well just rethread the whole
-   lot?)
-
-   But it might be implemented at a later date.
-*/
-void
-camel_folder_thread_messages_add(CamelFolderThread *thread, CamelFolder *folder, GPtrArray *uids)
-{
-	
-}
-
-void
-thread_messages_remove(CamelFolderThread *thread, CamelFolder *folder, GPtrArray *uids)
-{
-	
-}
-#endif
diff --git a/camel/camel-folder-thread.h b/camel/camel-folder-thread.h
deleted file mode 100644
index 692991751b..0000000000
--- a/camel/camel-folder-thread.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- *  Copyright (C) 2000 Ximian Inc.
- *
- *  Authors: Michael Zucchi 
- *
- *  This program is free software; you can redistribute it and/or 
- *  modify it under the terms of the GNU General Public License as 
- *  published by the Free Software Foundation; either version 2 of the
- *  License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- *  USA
- */
-
-#ifndef _CAMEL_FOLDER_THREAD_H
-#define _CAMEL_FOLDER_THREAD_H
-
-#include 
-#include 
-
-typedef struct _CamelFolderThreadNode {
-	struct _CamelFolderThreadNode *next,
-		*parent,
-		*child;
-	const CamelMessageInfo *message;
-	char *root_subject;	/* cached root equivalent subject */
-	int re;			/* re version of subject? */
-	int order;
-} CamelFolderThreadNode;
-
-typedef struct CamelFolderThread {
-	struct _CamelFolderThreadNode *tree;
-	struct _EMemChunk *node_chunks;
-	CamelFolder *folder;
-	GPtrArray *summary;
-} CamelFolderThread;
-
-CamelFolderThread *camel_folder_thread_messages_new(CamelFolder *folder, GPtrArray *uids);
-
-/* new improved interface (believe it or not!) */
-CamelFolderThread *camel_folder_thread_messages_new_summary(GPtrArray *summary);
-/*
-void camel_folder_thread_messages_add(CamelFolderThread *threads, CamelFolder *folder, GPtrArray *uids);
-void camel_folder_thread_messages_remove(CamelFolderThread *threads, CamelFolder *folder, GPtrArray *uids);
-*/
-void camel_folder_thread_messages_destroy(CamelFolderThread *threads);
-
-/* debugging function only */
-int camel_folder_threaded_messages_dump(CamelFolderThreadNode *c);
-
-#endif /* !_CAMEL_FOLDER_THREAD_H */
diff --git a/camel/camel-folder.c b/camel/camel-folder.c
deleted file mode 100644
index ffd36cb730..0000000000
--- a/camel/camel-folder.c
+++ /dev/null
@@ -1,1810 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-folder.c: Abstract class for an email folder */
-
-/*
- * Author:
- *  Bertrand Guiheneuf 
- *
- * Copyright 1999, 2000 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#ifdef HAVE_CONFIG_H
-#include 
-#endif
-
-#include 
-#include 
-#include 
-#include "camel-store.h"
-#include "camel-mime-message.h"
-#include "string-utils.h"
-#include "e-util/e-memory.h"
-
-#include "camel-private.h"
-
-#define d(x) 
-
-static CamelObjectClass *parent_class = NULL;
-
-/* Returns the class for a CamelFolder */
-#define CF_CLASS(so) CAMEL_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-
-static void camel_folder_finalize (CamelObject *object);
-
-static void refresh_info (CamelFolder *folder, CamelException *ex);
-
-static void folder_sync (CamelFolder *folder, gboolean expunge,
-			 CamelException *ex);
-
-static const gchar *get_name (CamelFolder *folder);
-static const gchar *get_full_name (CamelFolder *folder);
-static CamelStore *get_parent_store   (CamelFolder *folder);
-
-static guint32 get_permanent_flags (CamelFolder *folder);
-static guint32 get_message_flags (CamelFolder *folder, const char *uid);
-static void set_message_flags (CamelFolder *folder, const char *uid,
-			       guint32 flags, guint32 set);
-static gboolean get_message_user_flag (CamelFolder *folder, const char *uid, const char *name);
-static void set_message_user_flag (CamelFolder *folder, const char *uid,
-				   const char *name, gboolean value);
-static const char *get_message_user_tag(CamelFolder *folder, const char *uid, const char *name);
-static void set_message_user_tag(CamelFolder *folder, const char *uid, const char *name, const char *value);
-
-static gint get_message_count (CamelFolder *folder);
-static gint get_unread_message_count (CamelFolder *folder);
-
-static void expunge             (CamelFolder *folder,
-				 CamelException *ex);
-
-
-static void append_message (CamelFolder *folder, CamelMimeMessage *message,
-			    const CamelMessageInfo *info, CamelException *ex);
-
-
-static GPtrArray        *get_uids            (CamelFolder *folder);
-static void              free_uids           (CamelFolder *folder,
-					      GPtrArray *array);
-static GPtrArray        *get_summary         (CamelFolder *folder);
-static void              free_summary        (CamelFolder *folder,
-					      GPtrArray *array);
-
-static CamelMimeMessage *get_message         (CamelFolder *folder,
-					      const gchar *uid,
-					      CamelException *ex);
-
-static CamelMessageInfo *get_message_info	(CamelFolder *folder, const char *uid);
-static void		 free_message_info	(CamelFolder *folder, CamelMessageInfo *info);
-static void		 ref_message_info	(CamelFolder *folder, CamelMessageInfo *info);
-
-static GPtrArray      *search_by_expression  (CamelFolder *folder,
-					      const char *exp,
-					      CamelException *ex);
-static void            search_free           (CamelFolder * folder, 
-					      GPtrArray * result);
-
-static void            copy_messages_to       (CamelFolder *source,
-					       GPtrArray *uids,
-					       CamelFolder *dest,
-					       CamelException *ex);
-
-static void            move_messages_to       (CamelFolder *source,
-					       GPtrArray *uids,
-					       CamelFolder *dest,
-					       CamelException *ex);
-
-static void            freeze                (CamelFolder *folder);
-static void            thaw                  (CamelFolder *folder);
-static gboolean        is_frozen             (CamelFolder *folder);
-
-static gboolean        folder_changed        (CamelObject *object,
-					      gpointer event_data);
-static gboolean        message_changed       (CamelObject *object,
-					      /*const char *uid*/gpointer event_data);
-
-static void
-camel_folder_class_init (CamelFolderClass *camel_folder_class)
-{
-	CamelObjectClass *camel_object_class =
-		CAMEL_OBJECT_CLASS (camel_folder_class);
-
-	parent_class = camel_type_get_global_classfuncs (camel_object_get_type ());
-
-	/* virtual method definition */
-	camel_folder_class->sync = folder_sync;
-	camel_folder_class->refresh_info = refresh_info;
-	camel_folder_class->get_name = get_name;
-	camel_folder_class->get_full_name = get_full_name;
-	camel_folder_class->get_parent_store = get_parent_store;
-	camel_folder_class->expunge = expunge;
-	camel_folder_class->get_message_count = get_message_count;
-	camel_folder_class->get_unread_message_count = get_unread_message_count;
-	camel_folder_class->append_message = append_message;
-	camel_folder_class->get_permanent_flags = get_permanent_flags;
-	camel_folder_class->get_message_flags = get_message_flags;
-	camel_folder_class->set_message_flags = set_message_flags;
-	camel_folder_class->get_message_user_flag = get_message_user_flag;
-	camel_folder_class->set_message_user_flag = set_message_user_flag;
-	camel_folder_class->get_message_user_tag = get_message_user_tag;
-	camel_folder_class->set_message_user_tag = set_message_user_tag;
-	camel_folder_class->get_message = get_message;
-	camel_folder_class->get_uids = get_uids;
-	camel_folder_class->free_uids = free_uids;
-	camel_folder_class->get_summary = get_summary;
-	camel_folder_class->free_summary = free_summary;
-	camel_folder_class->search_by_expression = search_by_expression;
-	camel_folder_class->search_free = search_free;
-	camel_folder_class->get_message_info = get_message_info;
-	camel_folder_class->ref_message_info = ref_message_info;
-	camel_folder_class->free_message_info = free_message_info;
-	camel_folder_class->copy_messages_to = copy_messages_to;
-	camel_folder_class->move_messages_to = move_messages_to;
-	camel_folder_class->freeze = freeze;
-	camel_folder_class->thaw = thaw;
-	camel_folder_class->is_frozen = is_frozen;
-
-	/* virtual method overload */
-	camel_object_class_declare_event (camel_object_class,
-					  "folder_changed", folder_changed);
-	camel_object_class_declare_event (camel_object_class,
-					  "message_changed", message_changed);
-}
-
-static void
-camel_folder_init (gpointer object, gpointer klass)
-{
-	CamelFolder *folder = object;
-
-	folder->priv = g_malloc0(sizeof(*folder->priv));
-	folder->priv->frozen = 0;
-	folder->priv->changed_frozen = camel_folder_change_info_new();
-#ifdef ENABLE_THREADS
-	folder->priv->lock = e_mutex_new(E_MUTEX_REC);
-	folder->priv->change_lock = e_mutex_new(E_MUTEX_SIMPLE);
-#endif
-}
-
-static void
-camel_folder_finalize (CamelObject *object)
-{
-	CamelFolder *camel_folder = CAMEL_FOLDER (object);
-
-	g_free (camel_folder->name);
-	g_free (camel_folder->full_name);
-
-	if (camel_folder->parent_store)
-		camel_object_unref (CAMEL_OBJECT (camel_folder->parent_store));
-
-	if (camel_folder->summary)
-		camel_object_unref((CamelObject *)camel_folder->summary);
-
-	camel_folder_change_info_free(camel_folder->priv->changed_frozen);
-#ifdef ENABLE_THREADS
-	e_mutex_destroy(camel_folder->priv->lock);
-	e_mutex_destroy(camel_folder->priv->change_lock);
-#endif
-	g_free(camel_folder->priv);
-}
-
-CamelType
-camel_folder_get_type (void)
-{
-	static CamelType camel_folder_type = CAMEL_INVALID_TYPE;
-
-	if (camel_folder_type == CAMEL_INVALID_TYPE)	{
-		camel_folder_type = camel_type_register (CAMEL_OBJECT_TYPE, "CamelFolder",
-							 sizeof (CamelFolder),
-							 sizeof (CamelFolderClass),
-							 (CamelObjectClassInitFunc) camel_folder_class_init,
-							 NULL,
-							 (CamelObjectInitFunc) camel_folder_init,
-							 (CamelObjectFinalizeFunc) camel_folder_finalize );
-	}
-
-	return camel_folder_type;
-}
-
-
-/**
- * camel_folder_construct:
- * @folder: folder object to construct
- * @parent_store: parent store object of the folder
- * @full_name: full name of the folder
- * @name: short name of the folder
- *
- * Initalizes the folder by setting the parent store and name.
- **/
-void
-camel_folder_construct (CamelFolder *folder, CamelStore *parent_store,
-			const char *full_name, const char *name)
-{
-	g_return_if_fail (CAMEL_IS_FOLDER (folder));
-	g_return_if_fail (CAMEL_IS_STORE (parent_store));
-	g_return_if_fail (folder->parent_store == NULL);
-	g_return_if_fail (folder->name == NULL);
-
-	folder->parent_store = parent_store;
-	if (parent_store)
-		camel_object_ref (CAMEL_OBJECT (parent_store));
-
-	folder->name = g_strdup (name);
-	folder->full_name = g_strdup (full_name);
-}
-
-
-static void
-folder_sync (CamelFolder *folder, gboolean expunge, CamelException *ex)
-{
-	g_warning ("CamelFolder::sync not implemented for `%s'",
-		   camel_type_to_name (CAMEL_OBJECT_GET_TYPE (folder)));
-}
-
-/**
- * camel_folder_sync:
- * @folder: The folder object
- * @expunge: whether or not to expunge deleted messages
- * @ex: exception object
- *
- * Sync changes made to a folder to its backing store, possibly expunging
- * deleted messages as well.
- **/
-void
-camel_folder_sync (CamelFolder *folder, gboolean expunge, CamelException *ex)
-{
-	g_return_if_fail (CAMEL_IS_FOLDER (folder));
-
-	CAMEL_FOLDER_LOCK(folder, lock);
-
-	CF_CLASS (folder)->sync (folder, expunge, ex);
-
-	CAMEL_FOLDER_UNLOCK(folder, lock);
-}
-
-
-static void
-refresh_info (CamelFolder *folder, CamelException *ex)
-{
-	/* No op */
-}
-
-/**
- * camel_folder_refresh_info:
- * @folder: The folder object
- * @ex: exception object
- *
- * Updates a folder's summary to be in sync with its backing store.
- **/
-void
-camel_folder_refresh_info (CamelFolder *folder, CamelException *ex)
-{
-	g_return_if_fail (CAMEL_IS_FOLDER (folder));
-
-	CAMEL_FOLDER_LOCK(folder, lock);
-
-	CF_CLASS (folder)->refresh_info (folder, ex);
-
-	CAMEL_FOLDER_UNLOCK(folder, lock);
-}
-
-
-static const char *
-get_name (CamelFolder *folder)
-{
-	return folder->name;
-}
-
-/**
- * camel_folder_get_name:
- * @folder: a folder
- *
- * Get the (short) name of the folder. The fully qualified name
- * can be obtained with the get_full_name method.
- *
- * Return value: name of the folder
- **/
-const char *
-camel_folder_get_name (CamelFolder * folder)
-{
-	g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL);
-
-	return CF_CLASS (folder)->get_name (folder);
-}
-
-
-static const char *
-get_full_name (CamelFolder *folder)
-{
-	return folder->full_name;
-}
-
-/**
- * camel_folder_get_full_name:
- * @folder: a folder
- *
- * Get the (full) name of the folder.
- *
- * Return value: full name of the folder
- **/
-const char *
-camel_folder_get_full_name (CamelFolder *folder)
-{
-	g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL);
-
-	return CF_CLASS (folder)->get_full_name (folder);
-}
-
-
-static CamelStore *
-get_parent_store (CamelFolder * folder)
-{
-	return folder->parent_store;
-}
-
-/**
- * camel_folder_get_parent_store:
- * @folder: folder to get the parent of
- *
- * Return value: the parent store of the folder.
- **/
-CamelStore *
-camel_folder_get_parent_store (CamelFolder *folder)
-{
-	g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL);
-
-	return CF_CLASS (folder)->get_parent_store (folder);
-}
-
-
-static void
-expunge (CamelFolder *folder, CamelException *ex)
-{
-	g_warning ("CamelFolder::expunge not implemented for `%s'",
-		   camel_type_to_name (CAMEL_OBJECT_GET_TYPE (folder)));
-}
-
-
-/**
- * camel_folder_expunge:
- * @folder: the folder
- * @ex: a CamelException
- *
- * Delete messages which have been marked as "DELETED"
- **/
-void
-camel_folder_expunge (CamelFolder *folder, CamelException *ex)
-{
-	g_return_if_fail (CAMEL_IS_FOLDER (folder));
-
-	CAMEL_FOLDER_LOCK(folder, lock);
-
-	CF_CLASS (folder)->expunge (folder, ex);
-
-	CAMEL_FOLDER_UNLOCK(folder, lock);
-}
-
-static int
-get_message_count (CamelFolder *folder)
-{
-	g_return_val_if_fail(folder->summary != NULL, -1);
-
-	return camel_folder_summary_count(folder->summary);
-}
-
-/**
- * camel_folder_get_message_count:
- * @folder: A CamelFolder object
- *
- * Return value: the number of messages in the folder, or -1 if unknown.
- **/
-int
-camel_folder_get_message_count (CamelFolder *folder)
-{
-	int ret;
-
-	g_return_val_if_fail (CAMEL_IS_FOLDER (folder), -1);
-
-	ret = CF_CLASS (folder)->get_message_count (folder);
-
-	return ret;
-}
-
-static int
-get_unread_message_count(CamelFolder *folder)
-{
-	int i, count, unread=0;
-
-	g_return_val_if_fail(folder->summary != NULL, -1);
-
-	count = camel_folder_summary_count(folder->summary);
-	for (i=0; isummary, i);
-
-		if (info && !(info->flags & CAMEL_MESSAGE_SEEN))
-			unread++;
-
-		camel_folder_summary_info_free(folder->summary, info);
-	}
-
-	return unread;
-}
-
-/**
- * camel_folder_unread_get_message_count:
- * @folder: A CamelFolder object
- *
- * Return value: the number of unread messages in the folder, or -1 if unknown.
- **/
-int
-camel_folder_get_unread_message_count (CamelFolder *folder)
-{
-	int ret;
-
-	g_return_val_if_fail (CAMEL_IS_FOLDER (folder), -1);
-	
-	ret = CF_CLASS (folder)->get_unread_message_count (folder);
-
-	return ret;
-}
-
-static void
-append_message (CamelFolder *folder, CamelMimeMessage *message,
-		const CamelMessageInfo *info, CamelException *ex)
-{
-	g_warning ("CamelFolder::append_message not implemented for `%s'",
-		   camel_type_to_name (CAMEL_OBJECT_GET_TYPE (folder)));
-	return;
-
-}
-
-/**
- * camel_folder_append_message: add a message to a folder
- * @folder: folder object to add the message to
- * @message: message object
- * @info: message info with additional flags/etc to set on
- * new message, or %NULL
- * @ex: exception object
- *
- * Add a message to a folder. Only the flag and tag data from @info
- * is used. If @info is %NULL, no flags or tags will be set.
- **/
-void
-camel_folder_append_message (CamelFolder *folder, CamelMimeMessage *message,
-			     const CamelMessageInfo *info, CamelException *ex)
-{
-	g_return_if_fail (CAMEL_IS_FOLDER (folder));
-
-	CAMEL_FOLDER_LOCK(folder, lock);
-
-	CF_CLASS (folder)->append_message (folder, message, info, ex);
-
-	CAMEL_FOLDER_UNLOCK(folder, lock);
-}
-
-
-static guint32
-get_permanent_flags (CamelFolder *folder)
-{
-	return folder->permanent_flags;
-}
-
-/**
- * camel_folder_get_permanent_flags:
- * @folder: a CamelFolder
- *
- * Return value: the set of CamelMessageFlags that can be permanently
- * stored on a message between sessions. If it includes %CAMEL_FLAG_USER,
- * then user-defined flags will be remembered.
- **/
-guint32
-camel_folder_get_permanent_flags (CamelFolder *folder)
-{
-	g_return_val_if_fail (CAMEL_IS_FOLDER (folder), 0);
-
-	return CF_CLASS (folder)->get_permanent_flags (folder);
-}
-
-static guint32
-get_message_flags(CamelFolder *folder, const char *uid)
-{
-	CamelMessageInfo *info;
-	guint32 flags;
-
-	g_return_val_if_fail(folder->summary != NULL, 0);
-
-	info = camel_folder_summary_uid(folder->summary, uid);
-	g_return_val_if_fail(info != NULL, 0);
-
-	flags = info->flags;
-	camel_folder_summary_info_free(folder->summary, info);
-
-	return flags;
-}
-
-/**
- * camel_folder_get_message_flags:
- * @folder: a CamelFolder
- * @uid: the UID of a message in @folder
- *
- * Return value: the CamelMessageFlags that are set on the indicated
- * message.
- **/
-guint32
-camel_folder_get_message_flags (CamelFolder *folder, const char *uid)
-{
-	guint32 ret;
-
-	g_return_val_if_fail (CAMEL_IS_FOLDER (folder), 0);
-
-	ret = CF_CLASS (folder)->get_message_flags (folder, uid);
-
-	return ret;
-}
-
-static void
-set_message_flags(CamelFolder *folder, const char *uid, guint32 flags, guint32 set)
-{
-	CamelMessageInfo *info;
-	guint32 new;
-
-	g_return_if_fail(folder->summary != NULL);
-
-	info = camel_folder_summary_uid(folder->summary, uid);
-	g_return_if_fail(info != NULL);
-
-	new = (info->flags & ~flags) | (set & flags);
-	if (new == info->flags) {
-		camel_folder_summary_info_free(folder->summary, info);
-		return;
-	}
-
-	info->flags = new | CAMEL_MESSAGE_FOLDER_FLAGGED;
-	camel_folder_summary_touch(folder->summary);
-	camel_folder_summary_info_free(folder->summary, info);
-
-	camel_object_trigger_event(CAMEL_OBJECT(folder), "message_changed", (char *) uid);
-}
-
-/**
- * camel_folder_set_message_flags:
- * @folder: a CamelFolder
- * @uid: the UID of a message in @folder
- * @flags: a set of CamelMessageFlag values to set
- * @set: the mask of values in @flags to use.
- *
- * Sets those flags specified by @set to the values specified by @flags
- * on the indicated message. (This may or may not persist after the
- * folder or store is closed. See camel_folder_get_permanent_flags().)
- **/
-void
-camel_folder_set_message_flags (CamelFolder *folder, const char *uid,
-				guint32 flags, guint32 set)
-{
-	g_return_if_fail (CAMEL_IS_FOLDER (folder));
-
-	CF_CLASS (folder)->set_message_flags (folder, uid, flags, set);
-}
-
-
-static gboolean
-get_message_user_flag(CamelFolder *folder, const char *uid, const char *name)
-{
-	CamelMessageInfo *info;
-	gboolean ret;
-
-	g_return_val_if_fail(folder->summary != NULL, FALSE);
-
-	info = camel_folder_summary_uid(folder->summary, uid);
-	g_return_val_if_fail(info != NULL, FALSE);
-
-	ret = camel_flag_get(&info->user_flags, name);
-	camel_folder_summary_info_free(folder->summary, info);
-
-	return ret;
-}
-
-/**
- * camel_folder_get_message_user_flag:
- * @folder: a CamelFolder
- * @uid: the UID of a message in @folder
- * @name: the name of a user flag
- *
- * Return value: whether or not the given user flag is set on the message.
- **/
-gboolean
-camel_folder_get_message_user_flag (CamelFolder *folder, const char *uid,
-				    const char *name)
-{
-	gboolean ret;
-
-	g_return_val_if_fail (CAMEL_IS_FOLDER (folder), 0);
-
-	ret = CF_CLASS (folder)->get_message_user_flag (folder, uid, name);
-
-	return ret;
-}
-
-static void
-set_message_user_flag(CamelFolder *folder, const char *uid, const char *name, gboolean value)
-{
-	CamelMessageInfo *info;
-
-	g_return_if_fail(folder->summary != NULL);
-
-	info = camel_folder_summary_uid(folder->summary, uid);
-	g_return_if_fail(info != NULL);
-
-	if (camel_flag_set(&info->user_flags, name, value)) {
-		info->flags |= CAMEL_MESSAGE_FOLDER_FLAGGED;
-		camel_folder_summary_touch(folder->summary);
-		camel_object_trigger_event(CAMEL_OBJECT(folder), "message_changed", (char *) uid);
-	}
-	camel_folder_summary_info_free(folder->summary, info);
-}
-
-/**
- * camel_folder_set_message_user_flag:
- * @folder: a CamelFolder
- * @uid: the UID of a message in @folder
- * @name: the name of the user flag to set
- * @value: the value to set it to
- *
- * Sets the user flag specified by @name to the value specified by @value
- * on the indicated message. (This may or may not persist after the
- * folder or store is closed. See camel_folder_get_permanent_flags().)
- **/
-void
-camel_folder_set_message_user_flag (CamelFolder *folder, const char *uid,
-				    const char *name, gboolean value)
-{
-	g_return_if_fail (CAMEL_IS_FOLDER (folder));
-
-	CF_CLASS (folder)->set_message_user_flag (folder, uid, name, value);
-}
-
-static const char *
-get_message_user_tag(CamelFolder *folder, const char *uid, const char *name)
-{
-	CamelMessageInfo *info;
-	const char *ret;
-
-	g_return_val_if_fail(folder->summary != NULL, NULL);
-
-	info = camel_folder_summary_uid(folder->summary, uid);
-	g_return_val_if_fail(info != NULL, FALSE);
-
-#warning "Need to duplicate tag string"
-
-	ret = camel_tag_get(&info->user_tags, name);
-	camel_folder_summary_info_free(folder->summary, info);
-
-	return ret;
-}
-
-/**
- * camel_folder_get_message_user_tag:
- * @folder: a CamelFolder
- * @uid: the UID of a message in @folder
- * @name: the name of a user tag
- *
- * Return value: Returns the value of the user tag.
- **/
-const char *
-camel_folder_get_message_user_tag (CamelFolder *folder, const char *uid,  const char *name)
-{
-	const char *ret;
-
-	g_return_val_if_fail (CAMEL_IS_FOLDER (folder), 0);
-
-#warning "get_message_user_tag() needs to copy the tag contents"
-	ret = CF_CLASS (folder)->get_message_user_tag (folder, uid, name);
-
-	return ret;
-}
-
-static void
-set_message_user_tag(CamelFolder *folder, const char *uid, const char *name, const char *value)
-{
-	CamelMessageInfo *info;
-
-	g_return_if_fail(folder->summary != NULL);
-
-	info = camel_folder_summary_uid(folder->summary, uid);
-	g_return_if_fail(info != NULL);
-
-	if (camel_tag_set(&info->user_tags, name, value)) {
-		info->flags |= CAMEL_MESSAGE_FOLDER_FLAGGED;
-		camel_folder_summary_touch(folder->summary);
-		camel_object_trigger_event(CAMEL_OBJECT(folder), "message_changed", (char *) uid);
-	}
-	camel_folder_summary_info_free(folder->summary, info);
-}
-
-/**
- * camel_folder_set_message_user_tag:
- * @folder: a CamelFolder
- * @uid: the UID of a message in @folder
- * @name: the name of the user tag to set
- * @value: the value to set it to
- *
- * Sets the user tag specified by @name to the value specified by @value
- * on the indicated message. (This may or may not persist after the
- * folder or store is closed. See camel_folder_get_permanent_flags().)
- **/
-void
-camel_folder_set_message_user_tag (CamelFolder *folder, const char *uid, const char *name, const char *value)
-{
-	g_return_if_fail (CAMEL_IS_FOLDER (folder));
-
-	CF_CLASS (folder)->set_message_user_tag (folder, uid, name, value);
-}
-
-static CamelMessageInfo *
-get_message_info (CamelFolder *folder, const char *uid)
-{
-	g_return_val_if_fail(folder->summary != NULL, NULL);
-
-	return camel_folder_summary_uid(folder->summary, uid);
-}
-
-/**
- * camel_folder_get_message_info:
- * @folder: a CamelFolder
- * @uid: the uid of a message
- *
- * Retrieve the CamelMessageInfo for the specified @uid.  This return
- * must be freed using free_message_info().
- *
- * Return value: the summary information for the indicated message, or NULL
- * if the uid does not exist.
- **/
-CamelMessageInfo *
-camel_folder_get_message_info (CamelFolder *folder, const char *uid)
-{
-	CamelMessageInfo *ret;
-
-	g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL);
-	g_return_val_if_fail (uid != NULL, NULL);
-
-	ret = CF_CLASS (folder)->get_message_info (folder, uid);
-
-	return ret;
-}
-
-static void
-free_message_info (CamelFolder *folder, CamelMessageInfo *info)
-{
-	g_return_if_fail(folder->summary != NULL);
-
-	camel_folder_summary_info_free(folder->summary, info);
-}
-
-/**
- * camel_folder_free_message_info:
- * @folder: 
- * @info: 
- * 
- * Free (unref) a CamelMessageInfo, previously obtained with get_message_info().
- **/
-void
-camel_folder_free_message_info(CamelFolder *folder, CamelMessageInfo *info)
-{
-	g_return_if_fail(CAMEL_IS_FOLDER (folder));
-	g_return_if_fail(info != NULL);
-
-	CF_CLASS (folder)->free_message_info(folder, info);
-}
-
-static void
-ref_message_info (CamelFolder *folder, CamelMessageInfo *info)
-{
-	g_return_if_fail(folder->summary != NULL);
-
-	camel_folder_summary_info_ref(folder->summary, info);
-}
-
-/**
- * camel_folder_ref_message_info:
- * @folder: 
- * @info: 
- * 
- * Ref a CamelMessageInfo, previously obtained with get_message_info().
- **/
-void
-camel_folder_ref_message_info(CamelFolder *folder, CamelMessageInfo *info)
-{
-	g_return_if_fail(CAMEL_IS_FOLDER (folder));
-	g_return_if_fail(info != NULL);
-
-	CF_CLASS (folder)->ref_message_info(folder, info);
-}
-
-/* TODO: is this function required anyway? */
-gboolean
-camel_folder_has_summary_capability (CamelFolder *folder)
-{
-	g_return_val_if_fail (CAMEL_IS_FOLDER (folder), FALSE);
-
-	return folder->has_summary_capability;
-}
-
-
-/* UIDs stuff */
-
-static CamelMimeMessage *
-get_message (CamelFolder *folder, const gchar *uid, CamelException *ex)
-{
-	g_warning ("CamelFolder::get_message not implemented for `%s'",
-		   camel_type_to_name (CAMEL_OBJECT_GET_TYPE (folder)));
-	return NULL;
-}
-
-/**
- * camel_folder_get_message:
- * @folder: the folder object
- * @uid: the UID
- * @ex: a CamelException
- *
- * Get a message from its UID in the folder. Messages are cached
- * within a folder, that is, asking twice for the same UID returns the
- * same message object. (FIXME: is this true?)
- *
- * Return value: Message corresponding to the UID
- **/
-CamelMimeMessage *
-camel_folder_get_message (CamelFolder *folder, const gchar *uid, CamelException *ex)
-{
-	CamelMimeMessage *ret;
-
-	g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL);
-
-	CAMEL_FOLDER_LOCK(folder, lock);
-
-	ret = CF_CLASS (folder)->get_message (folder, uid, ex);
-
-	CAMEL_FOLDER_UNLOCK(folder, lock);
-
-	return ret;
-}
-
-static GPtrArray *
-get_uids(CamelFolder *folder)
-{
-	GPtrArray *array;
-	int i, count;
-
-	array = g_ptr_array_new();
-
-	g_return_val_if_fail(folder->summary != NULL, array);
-
-	count = camel_folder_summary_count(folder->summary);
-	g_ptr_array_set_size(array, count);
-	for (i=0; isummary, i);
-
-		if (info) {
-			array->pdata[i] = g_strdup(camel_message_info_uid(info));
-			camel_folder_summary_info_free(folder->summary, info);
-		} else {
-			array->pdata[i] = g_strdup("xx unknown uid xx");
-		}
-	}
-
-	return array;
-}
-
-/**
- * camel_folder_get_uids:
- * @folder: folder object
- *
- * Get the list of UIDs available in a folder. This routine is useful
- * for finding what messages are available when the folder does not
- * support summaries. The returned array shoudl not be modified, and
- * must be freed by passing it to camel_folder_free_uids().
- *
- * Return value: GPtrArray of UIDs corresponding to the messages
- * available in the folder.
- **/
-GPtrArray *
-camel_folder_get_uids (CamelFolder *folder)
-{
-	GPtrArray *ret;
-
-	g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL);
-
-	ret = CF_CLASS (folder)->get_uids (folder);
-
-	return ret;
-}
-
-static void
-free_uids (CamelFolder *folder, GPtrArray *array)
-{
-	int i;
-
-	for (i=0; ilen; i++)
-		g_free(array->pdata[i]);
-	g_ptr_array_free(array, TRUE);
-}
-
-/**
- * camel_folder_free_uids:
- * @folder: folder object
- * @array: the array of uids to free
- *
- * Frees the array of UIDs returned by camel_folder_get_uids().
- **/
-void
-camel_folder_free_uids (CamelFolder *folder, GPtrArray *array)
-{
-	g_return_if_fail (CAMEL_IS_FOLDER (folder));
-
-	CF_CLASS (folder)->free_uids (folder, array);
-}
-
-static GPtrArray *
-get_summary(CamelFolder *folder)
-{
-	g_assert(folder->summary != NULL);
-
-	return camel_folder_summary_array(folder->summary);
-}
-
-/**
- * camel_folder_get_summary:
- * @folder: a folder object
- *
- * This returns the summary information for the folder. This array
- * should not be modified, and must be freed with
- * camel_folder_free_summary().
- *
- * Return value: an array of CamelMessageInfo
- **/
-GPtrArray *
-camel_folder_get_summary (CamelFolder *folder)
-{
-	GPtrArray *ret;
-
-	g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL);
-
-	ret = CF_CLASS (folder)->get_summary (folder);
-
-	return ret;
-}
-
-static void
-free_summary(CamelFolder *folder, GPtrArray *summary)
-{
-	g_assert(folder->summary != NULL);
-
-	camel_folder_summary_array_free(folder->summary, summary);
-}
-
-/**
- * camel_folder_free_summary:
- * @folder: folder object
- * @array: the summary array to free
- *
- * Frees the summary array returned by camel_folder_get_summary().
- **/
-void camel_folder_free_summary(CamelFolder * folder, GPtrArray * array)
-{
-	g_return_if_fail(CAMEL_IS_FOLDER(folder));
-
-	CF_CLASS(folder)->free_summary(folder, array);
-}
-
-/**
- * camel_folder_has_search_capability:
- * @folder: Folder object
- *
- * Checks if a folder supports searching.
- *
- * Return value: %TRUE if the folder supports searching
- **/
-gboolean
-camel_folder_has_search_capability (CamelFolder *folder)
-{
-	g_return_val_if_fail (CAMEL_IS_FOLDER (folder), FALSE);
-
-	return folder->has_search_capability;
-}
-
-static GPtrArray *
-search_by_expression (CamelFolder *folder, const char *expression,
-		      CamelException *ex)
-{
-	g_warning ("CamelFolder::search_by_expression not implemented for "
-		   "`%s'", camel_type_to_name (CAMEL_OBJECT_GET_TYPE (folder)));
-	return NULL;
-}
-
-/**
- * camel_folder_search_by_expression:
- * @folder: Folder object
- * @expression: a search expression
- * @ex: a CamelException
- *
- * Searches the folder for messages matching the given search expression.
- *
- * Return value: a list of uids of matching messages. The caller must
- * free the list and each of the elements when it is done.
- **/
-GPtrArray *
-camel_folder_search_by_expression (CamelFolder *folder, const char *expression,
-				   CamelException *ex)
-{
-	GPtrArray *ret;
-
-	g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL);
-	g_return_val_if_fail (folder->has_search_capability, NULL);
-
-	/* NOTE: that it is upto the callee to lock */
-
-	ret = CF_CLASS (folder)->search_by_expression (folder, expression, ex);
-
-	return ret;
-}
-
-static void
-search_free (CamelFolder *folder, GPtrArray *result)
-{
-	int i;
-
-	for (i = 0; i < result->len; i++)
-		g_free (g_ptr_array_index (result, i));
-	g_ptr_array_free (result, TRUE);
-}
-
-/**
- * camel_folder_search_free:
- * @folder: 
- * @result: 
- * 
- * Free the result of a search.
- **/
-void 
-camel_folder_search_free (CamelFolder *folder, GPtrArray *result)
-{
-	g_return_if_fail (CAMEL_IS_FOLDER (folder));
-	g_return_if_fail (folder->has_search_capability);
-
-	/* NOTE: upto the callee to lock */
-	CF_CLASS (folder)->search_free (folder, result);
-}
-
-
-static void
-copy_message_to (CamelFolder *source, const char *uid, CamelFolder *dest, CamelException *ex)
-{
-	CamelMimeMessage *msg;
-	CamelMessageInfo *info = NULL;
-	
-	/* Default implementation. */
-	
-	/* we alredy have the lock, dont deadlock */
-	msg = CF_CLASS (source)->get_message (source, uid, ex);
-	if (!msg)
-		return;
-	
-	if (source->has_summary_capability)
-		info = CF_CLASS (source)->get_message_info (source, uid);
-	else
-		info = camel_message_info_new_from_header (((CamelMimePart *)msg)->headers);
-	
-	/* we don't want to retain the deleted flag */
-	if (info && info->flags & CAMEL_MESSAGE_DELETED)
-		info->flags = info->flags & ~CAMEL_MESSAGE_DELETED;
-	
-	camel_folder_append_message (dest, msg, info, ex);
-	camel_object_unref (CAMEL_OBJECT (msg));
-	if (info) {
-		if (source->has_summary_capability)
-			CF_CLASS (source)->free_message_info (source, info);
-		else
-			camel_message_info_free (info);
-	}
-}
-
-static void
-copy_messages_to (CamelFolder *source, GPtrArray *uids, CamelFolder *dest, CamelException *ex)
-{
-	int i;
-	
-	for (i = 0; i < uids->len && !camel_exception_is_set (ex); i++)
-		copy_message_to (source, uids->pdata[i], dest, ex);
-}
-
-/**
- * camel_folder_copy_messages_to:
- * @source: source folder
- * @uids: message UIDs in @source
- * @dest: destination folder
- * @ex: a CamelException
- *
- * This copies messages from one folder to another. If the @source and
- * @dest folders have the same parent_store, this may be more efficient
- * than a camel_folder_append_message().
- **/
-void
-camel_folder_copy_messages_to (CamelFolder *source, GPtrArray *uids,
-			       CamelFolder *dest, CamelException *ex)
-{
-	g_return_if_fail (CAMEL_IS_FOLDER (source));
-	g_return_if_fail (CAMEL_IS_FOLDER (dest));
-	g_return_if_fail (uids != NULL);
-	
-	if (source == dest || uids->len == 0) {
-		/* source and destination folders are the same, or no work to do, do nothing. */
-		return;
-	}
-	
-	CAMEL_FOLDER_LOCK(source, lock);
-	
-	if (source->parent_store == dest->parent_store)
-		CF_CLASS (source)->copy_messages_to (source, uids, dest, ex);
-	else
-		copy_messages_to (source, uids, dest, ex);
-	
-	CAMEL_FOLDER_UNLOCK(source, lock);
-}
-
-
-static void
-move_message_to (CamelFolder *source, const char *uid,
-		 CamelFolder *dest, CamelException *ex)
-{
-	CamelMimeMessage *msg;
-	CamelMessageInfo *info = NULL;
-	
-	/* Default implementation. */
-	
-	msg = CF_CLASS (source)->get_message (source, uid, ex);
-	if (!msg)
-		return;
-	
-	if (source->has_summary_capability)
-		info = CF_CLASS (source)->get_message_info (source, uid);
-	else
-		info = camel_message_info_new_from_header (((CamelMimePart *)msg)->headers);
-	
-	/* we don't want to retain the deleted flag */
-	if (info && info->flags & CAMEL_MESSAGE_DELETED)
-		info->flags = info->flags & ~CAMEL_MESSAGE_DELETED;
-	
-	camel_folder_append_message (dest, msg, info, ex);
-	camel_object_unref (CAMEL_OBJECT (msg));
-	if (!camel_exception_is_set (ex))
-		CF_CLASS (source)->set_message_flags (source, uid, CAMEL_MESSAGE_DELETED,
-						      CAMEL_MESSAGE_DELETED);
-	
-	if (info) {
-		if (source->has_summary_capability)
-			CF_CLASS (source)->free_message_info (source, info);
-		else
-			camel_message_info_free (info);
-	}
-}
-
-static void
-move_messages_to (CamelFolder *source, GPtrArray *uids, CamelFolder *dest, CamelException *ex)
-{
-	int i;
-	
-	for (i = 0; i < uids->len && !camel_exception_is_set (ex); i++)
-		move_message_to (source, uids->pdata[i], dest, ex);
-}
-
-/**
- * camel_folder_move_messages_to:
- * @source: source folder
- * @uids: message UIDs in @source
- * @dest: destination folder
- * @ex: a CamelException
- *
- * This moves a message from one folder to another. If the @source and
- * @dest folders have the same parent_store, this may be more efficient
- * than a camel_folder_append_message() followed by
- * camel_folder_delete_message().
- **/
-void
-camel_folder_move_messages_to (CamelFolder *source, GPtrArray *uids,
-			      CamelFolder *dest, CamelException *ex)
-{
-	g_return_if_fail (CAMEL_IS_FOLDER (source));
-	g_return_if_fail (CAMEL_IS_FOLDER (dest));
-	g_return_if_fail (uids != NULL);
-	
-	if (source == dest || uids->len == 0) {
-		/* source and destination folders are the same, or no work to do, nothing to do. */
-		return;
-	}
-	
-	CAMEL_FOLDER_LOCK(source, lock);
-	
-	if (source->parent_store == dest->parent_store)
-		CF_CLASS (source)->move_messages_to (source, uids, dest, ex);
-	else
-		move_messages_to (source, uids, dest, ex);
-	
-	CAMEL_FOLDER_UNLOCK(source, lock);
-}
-
-static void
-freeze (CamelFolder *folder)
-{
-	CAMEL_FOLDER_LOCK(folder, change_lock);
-
-	folder->priv->frozen++;
-
-	d(printf ("freeze(%p) = %d\n", folder, folder->priv->frozen));
-	CAMEL_FOLDER_UNLOCK(folder, change_lock);
-}
-
-/**
- * camel_folder_freeze:
- * @folder: a folder
- *
- * Freezes the folder so that a series of operation can be performed
- * without "message_changed" and "folder_changed" signals being emitted.
- * When the folder is later thawed with camel_folder_thaw(), the
- * suppressed signals will be emitted.
- **/
-void
-camel_folder_freeze (CamelFolder * folder)
-{
-	g_return_if_fail (CAMEL_IS_FOLDER (folder));
-
-	CF_CLASS (folder)->freeze (folder);
-}
-
-static void
-thaw (CamelFolder * folder)
-{
-	int i;
-	CamelFolderChangeInfo *info;
-
-	CAMEL_FOLDER_LOCK(folder, change_lock);
-
-	folder->priv->frozen--;
-
-	d(printf ("thaw(%p) = %d\n", folder, folder->priv->frozen));
-
-	if (folder->priv->frozen == 0) {
-		/* If we have more or less messages, do a folder changed, otherwise just
-		   do a message changed for each one.
-		   TODO: message_changed is now probably irrelevant and not required */
-		info = folder->priv->changed_frozen;
-		if (info->uid_added->len > 0 || info->uid_removed->len > 0 || info->uid_changed->len > 10) {
-			camel_object_trigger_event(CAMEL_OBJECT(folder), "folder_changed", info);
-		} else if (info->uid_changed->len > 0) {
-			for (i=0;iuid_changed->len;i++) {
-				camel_object_trigger_event(CAMEL_OBJECT(folder), "message_changed", info->uid_changed->pdata[i]);
-			}
-		}
-		camel_folder_change_info_clear(info);
-	}
-
-	CAMEL_FOLDER_UNLOCK(folder, change_lock);
-}
-
-/**
- * camel_folder_thaw:
- * @folder: a folder
- *
- * Thaws the folder and emits any pending folder_changed or
- * message_changed signals.
- **/
-void
-camel_folder_thaw (CamelFolder *folder)
-{
-	g_return_if_fail (CAMEL_IS_FOLDER (folder));
-	g_return_if_fail (folder->priv->frozen != 0);
-
-	CF_CLASS (folder)->thaw (folder);
-}
-
-static gboolean
-is_frozen (CamelFolder *folder)
-{
-	return folder->priv->frozen != 0;
-}
-
-/**
- * camel_folder_is_frozen:
- * @folder: a folder
- *
- * Return value: whether or not the folder is frozen.
- **/
-gboolean
-camel_folder_is_frozen (CamelFolder *folder)
-{
-	g_return_val_if_fail (CAMEL_IS_FOLDER (folder), FALSE);
-
-	return CF_CLASS (folder)->is_frozen (folder);
-}
-
-
-/* Event hooks that block emission when frozen */
-static gboolean
-folder_changed (CamelObject *obj, gpointer event_data)
-{
-	CamelFolder *folder = CAMEL_FOLDER (obj);
-	CamelFolderChangeInfo *changed = event_data;
-	gboolean ret = TRUE;
-
-	d(printf ("folder_changed(%p, %p), frozen=%d\n", obj, event_data, folder->priv->frozen));
-
-	if (folder->priv->frozen) {
-		CAMEL_FOLDER_LOCK(folder, change_lock);
-
-		if (changed != NULL)
-			camel_folder_change_info_cat(folder->priv->changed_frozen, changed);
-		else
-			g_warning("Class %s is passing NULL to folder_changed event",
-				  camel_type_to_name (CAMEL_OBJECT_GET_TYPE (folder)));
-		ret = FALSE;
-
-		CAMEL_FOLDER_UNLOCK(folder, change_lock);
-	}
-
-	return ret;
-}
-
-static gboolean
-message_changed (CamelObject *obj, /*const char *uid*/gpointer event_data)
-{
-	CamelFolder *folder = CAMEL_FOLDER (obj);
-	gboolean ret = TRUE;
-
-	d(printf ("message_changed(%p, %p), frozen=%d\n", folder, event_data, folder->priv->frozen));
-
-	if (folder->priv->frozen) {
-		CAMEL_FOLDER_LOCK(folder, change_lock);
-	
-		camel_folder_change_info_change_uid(folder->priv->changed_frozen, (char *)event_data);
-		ret = FALSE;
-
-		CAMEL_FOLDER_UNLOCK(folder, change_lock);
-	}
-
-	return ret;
-}
-
-
-/**
- * camel_folder_free_nop:
- * @folder: a folder
- * @array: an array of uids or CamelMessageInfo
- *
- * "Frees" the provided array by doing nothing. Used by CamelFolder
- * subclasses as an implementation for free_uids, or free_summary when
- * the returned array is "static" information and should not be freed.
- **/
-void
-camel_folder_free_nop (CamelFolder *folder, GPtrArray *array)
-{
-	;
-}
-
-/**
- * camel_folder_free_shallow:
- * @folder: a folder
- * @array: an array of uids or CamelMessageInfo
- *
- * Frees the provided array but not its contents. Used by CamelFolder
- * subclasses as an implementation for free_uids or free_summary when
- * the returned array needs to be freed but its contents come from
- * "static" information.
- **/
-void
-camel_folder_free_shallow (CamelFolder *folder, GPtrArray *array)
-{
-	g_ptr_array_free (array, TRUE);
-}
-
-/**
- * camel_folder_free_deep:
- * @folder: a folder
- * @array: an array of uids
- *
- * Frees the provided array and its contents. Used by CamelFolder
- * subclasses as an implementation for free_uids when the provided
- * information was created explicitly by the corresponding get_ call.
- **/
-void
-camel_folder_free_deep (CamelFolder *folder, GPtrArray *array)
-{
-	int i;
-
-	for (i = 0; i < array->len; i++)
-		g_free (array->pdata[i]);
-	g_ptr_array_free (array, TRUE);
-}
-
-struct _CamelFolderChangeInfoPrivate {
-	GHashTable *uid_stored;	/* what we have stored, which array they're in */
-	GHashTable *uid_source;	/* used to create unique lists */
-	struct _EMemPool *uid_pool;	/* pool used to store copies of uid strings */
-};
-
-/**
- * camel_folder_change_info_new:
- * @void: 
- * 
- * Create a new folder change info structure.
- *
- * Change info structures are not MT-SAFE and must be
- * locked for exclusive access externally.
- * 
- * Return value: 
- **/
-CamelFolderChangeInfo *
-camel_folder_change_info_new(void)
-{
-	CamelFolderChangeInfo *info;
-
-	info = g_malloc(sizeof(*info));
-	info->uid_added = g_ptr_array_new();
-	info->uid_removed = g_ptr_array_new();
-	info->uid_changed = g_ptr_array_new();
-	info->priv = g_malloc0(sizeof(*info->priv));
-	info->priv->uid_stored = g_hash_table_new(g_str_hash, g_str_equal);
-	info->priv->uid_source = NULL;
-	info->priv->uid_pool = e_mempool_new(512, 256, E_MEMPOOL_ALIGN_BYTE);
-
-	return info;
-}
-
-/**
- * camel_folder_change_info_add_source:
- * @info: 
- * @uid: 
- * 
- * Add a source uid for generating a changeset.
- **/
-void
-camel_folder_change_info_add_source(CamelFolderChangeInfo *info, const char *uid)
-{
-	struct _CamelFolderChangeInfoPrivate *p;
-	
-	g_assert(info != NULL);
-	
-	p = info->priv;
-	
-	if (p->uid_source == NULL)
-		p->uid_source = g_hash_table_new(g_str_hash, g_str_equal);
-
-	if (g_hash_table_lookup(p->uid_source, uid) == NULL)
-		g_hash_table_insert(p->uid_source, e_mempool_strdup(p->uid_pool, uid), (void *)1);
-}
-
-/**
- * camel_folder_change_info_add_source_list:
- * @info: 
- * @list: 
- * 
- * Add a list of source uid's for generating a changeset.
- **/
-void
-camel_folder_change_info_add_source_list(CamelFolderChangeInfo *info, const GPtrArray *list)
-{
-	struct _CamelFolderChangeInfoPrivate *p;
-	int i;
-	
-	g_assert(info != NULL);
-	g_assert(list != NULL);
-	
-	p = info->priv;
-
-	if (p->uid_source == NULL)
-		p->uid_source = g_hash_table_new(g_str_hash, g_str_equal);
-
-	for (i=0;ilen;i++) {
-		char *uid = list->pdata[i];
-
-		if (g_hash_table_lookup(p->uid_source, uid) == NULL)
-			g_hash_table_insert(p->uid_source, e_mempool_strdup(p->uid_pool, uid), (void *)1);
-	}
-}
-
-/**
- * camel_folder_change_info_add_update:
- * @info: 
- * @uid: 
- * 
- * Add a uid from the updated list, used to generate a changeset diff.
- **/
-void
-camel_folder_change_info_add_update(CamelFolderChangeInfo *info, const char *uid)
-{
-	struct _CamelFolderChangeInfoPrivate *p;
-	char *key;
-	int value;
-	
-	g_assert(info != NULL);
-	
-	p = info->priv;
-	
-	if (p->uid_source == NULL) {
-		camel_folder_change_info_add_uid(info, uid);
-		return;
-	}
-
-	if (g_hash_table_lookup_extended(p->uid_source, uid, (void **)&key, (void **)&value)) {
-		g_hash_table_remove(p->uid_source, key);
-	} else {
-		camel_folder_change_info_add_uid(info, uid);
-	}
-}
-
-/**
- * camel_folder_change_info_add_update_list:
- * @info: 
- * @list: 
- * 
- * Add a list of uid's from the updated list.
- **/
-void
-camel_folder_change_info_add_update_list(CamelFolderChangeInfo *info, const GPtrArray *list)
-{
-	int i;
-	
-	g_assert(info != NULL);
-	g_assert(list != NULL);
-	
-	for (i=0;ilen;i++)
-		camel_folder_change_info_add_update(info, list->pdata[i]);
-}
-
-static void
-change_info_remove(char *key, void *value, CamelFolderChangeInfo *info)
-{
-	struct _CamelFolderChangeInfoPrivate *p = info->priv;
-	GPtrArray *olduids;
-	char *olduid;
-
-	if (g_hash_table_lookup_extended(p->uid_stored, key, (void **)&olduid, (void **)&olduids)) {
-		/* if it was added/changed them removed, then remove it */
-		if (olduids != info->uid_removed) {
-			g_ptr_array_remove_fast(olduids, olduid);
-			g_ptr_array_add(info->uid_removed, olduid);
-			g_hash_table_insert(p->uid_stored, olduid, info->uid_removed);
-		}
-		return;
-	}
-
-	/* we dont need to copy this, as they've already been copied into our pool */
-	g_ptr_array_add(info->uid_removed, key);
-	g_hash_table_insert(p->uid_stored, key, info->uid_removed);
-}
-
-/**
- * camel_folder_change_info_build_diff:
- * @info: 
- * 
- * Compare the source uid set to the updated uid set and generate the differences
- * into the added and removed lists.
- **/
-void
-camel_folder_change_info_build_diff(CamelFolderChangeInfo *info)
-{
-	struct _CamelFolderChangeInfoPrivate *p;
-	
-	g_assert(info != NULL);
-	
-	p = info->priv;
-	
-	if (p->uid_source) {
-		g_hash_table_foreach(p->uid_source, (GHFunc)change_info_remove, info);
-		g_hash_table_destroy(p->uid_source);
-		p->uid_source = NULL;
-	}
-}
-
-static void
-change_info_cat(CamelFolderChangeInfo *info, GPtrArray *source, void (*add)(CamelFolderChangeInfo *info, const char *uid))
-{
-	int i;
-
-	for (i=0;ilen;i++)
-		add(info, source->pdata[i]);
-}
-
-/**
- * camel_folder_change_info_cat:
- * @info: 
- * @source: 
- * 
- * Concatenate one change info onto antoher.  Can be used to copy
- * them too.
- **/
-void
-camel_folder_change_info_cat(CamelFolderChangeInfo *info, CamelFolderChangeInfo *source)
-{
-	g_assert(info != NULL);
-	g_assert(source != NULL);
-	
-	change_info_cat(info, source->uid_added, camel_folder_change_info_add_uid);
-	change_info_cat(info, source->uid_removed, camel_folder_change_info_remove_uid);
-	change_info_cat(info, source->uid_changed, camel_folder_change_info_change_uid);
-}
-
-/**
- * camel_folder_change_info_add_uid:
- * @info: 
- * @uid: 
- * 
- * Add a new uid to the changeinfo.
- **/
-void
-camel_folder_change_info_add_uid(CamelFolderChangeInfo *info, const char *uid)
-{
-	struct _CamelFolderChangeInfoPrivate *p;
-	GPtrArray *olduids;
-	char *olduid;
-	
-	g_assert(info != NULL);
-	
-	p = info->priv;
-	
-	if (g_hash_table_lookup_extended(p->uid_stored, uid, (void **)&olduid, (void **)&olduids)) {
-		/* if it was removed then added, promote it to a changed */
-		/* if it was changed then added, leave as changed */
-		if (olduids == info->uid_removed) {
-			g_ptr_array_remove_fast(olduids, olduid);
-			g_ptr_array_add(info->uid_changed, olduid);
-			g_hash_table_insert(p->uid_stored, olduid, info->uid_changed);
-		}
-		return;
-	}
-
-	olduid = e_mempool_strdup(p->uid_pool, uid);
-	g_ptr_array_add(info->uid_added, olduid);
-	g_hash_table_insert(p->uid_stored, olduid, info->uid_added);
-}
-
-/**
- * camel_folder_change_info_remove_uid:
- * @info: 
- * @uid: 
- * 
- * Add a uid to the removed uid list.
- **/
-void
-camel_folder_change_info_remove_uid(CamelFolderChangeInfo *info, const char *uid)
-{
-	struct _CamelFolderChangeInfoPrivate *p;
-	GPtrArray *olduids;
-	char *olduid;
-	
-	g_assert(info != NULL);
-	
-	p = info->priv;
-	
-	if (g_hash_table_lookup_extended(p->uid_stored, uid, (void **)&olduid, (void **)&olduids)) {
-		/* if it was added/changed them removed, then remove it */
-		if (olduids != info->uid_removed) {
-			g_ptr_array_remove_fast(olduids, olduid);
-			g_ptr_array_add(info->uid_removed, olduid);
-			g_hash_table_insert(p->uid_stored, olduid, info->uid_removed);
-		}
-		return;
-	}
-
-	olduid = e_mempool_strdup(p->uid_pool, uid);
-	g_ptr_array_add(info->uid_removed, olduid);
-	g_hash_table_insert(p->uid_stored, olduid, info->uid_removed);
-}
-
-/**
- * camel_folder_change_info_change_uid:
- * @info: 
- * @uid: 
- * 
- * Add a uid to the changed uid list.
- **/
-void
-camel_folder_change_info_change_uid(CamelFolderChangeInfo *info, const char *uid)
-{
-	struct _CamelFolderChangeInfoPrivate *p;
-	GPtrArray *olduids;
-	char *olduid;
-	
-	g_assert(info != NULL);
-	
-	p = info->priv;
-	
-	if (g_hash_table_lookup_extended(p->uid_stored, uid, (void **)&olduid, (void **)&olduids)) {
-		/* if we have it already, leave it as that */
-		return;
-	}
-
-	olduid = e_mempool_strdup(p->uid_pool, uid);
-	g_ptr_array_add(info->uid_changed, olduid);
-	g_hash_table_insert(p->uid_stored, olduid, info->uid_changed);
-}
-
-/**
- * camel_folder_change_info_changed:
- * @info: 
- * 
- * Return true if the changeset contains any changes.
- *
- * Return Value:
- **/
-gboolean
-camel_folder_change_info_changed(CamelFolderChangeInfo *info)
-{
-	g_assert(info != NULL);
-	
-	return (info->uid_added->len || info->uid_removed->len || info->uid_changed->len);
-}
-
-/**
- * camel_folder_change_info_clear:
- * @info: 
- * 
- * Empty out the change info; called after changes have been processed.
- **/
-void
-camel_folder_change_info_clear(CamelFolderChangeInfo *info)
-{
-	struct _CamelFolderChangeInfoPrivate *p;
-	
-	g_assert(info != NULL);
-	
-	p = info->priv;
-	
-	g_ptr_array_set_size(info->uid_added, 0);
-	g_ptr_array_set_size(info->uid_removed, 0);
-	g_ptr_array_set_size(info->uid_changed, 0);
-	if (p->uid_source) {
-		g_hash_table_destroy(p->uid_source);
-		p->uid_source = NULL;
-	}
-	g_hash_table_destroy(p->uid_stored);
-	p->uid_stored = g_hash_table_new(g_str_hash, g_str_equal);
-	e_mempool_flush(p->uid_pool, TRUE);
-}
-
-/**
- * camel_folder_change_info_free:
- * @info: 
- * 
- * Free memory associated with the folder change info lists.
- **/
-void
-camel_folder_change_info_free(CamelFolderChangeInfo *info)
-{
-	struct _CamelFolderChangeInfoPrivate *p;
-
-	g_assert(info != NULL);
-	
-	p = info->priv;
-	
-	if (p->uid_source)
-		g_hash_table_destroy(p->uid_source);
-
-	g_hash_table_destroy(p->uid_stored);
-	e_mempool_destroy(p->uid_pool);
-	g_free(p);
-
-	g_ptr_array_free(info->uid_added, TRUE);
-	g_ptr_array_free(info->uid_removed, TRUE);
-	g_ptr_array_free(info->uid_changed, TRUE);
-	g_free(info);
-}
diff --git a/camel/camel-folder.h b/camel/camel-folder.h
deleted file mode 100644
index cc4bf78a0f..0000000000
--- a/camel/camel-folder.h
+++ /dev/null
@@ -1,310 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * camel-folder.h: Abstract class for an email folder
- *
- * Authors: Bertrand Guiheneuf 
- *	    Michael Zucchi 
- *
- * Copyright 1999, 2000 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#ifndef CAMEL_FOLDER_H
-#define CAMEL_FOLDER_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-#include 
-#include 
-
-#define CAMEL_FOLDER_TYPE     (camel_folder_get_type ())
-#define CAMEL_FOLDER(obj)     (CAMEL_CHECK_CAST((obj), CAMEL_FOLDER_TYPE, CamelFolder))
-#define CAMEL_FOLDER_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_FOLDER_TYPE, CamelFolderClass))
-#define CAMEL_IS_FOLDER(o)    (CAMEL_CHECK_TYPE((o), CAMEL_FOLDER_TYPE))
-
-typedef struct _CamelFolderChangeInfo CamelFolderChangeInfo;
-
-struct _CamelFolderChangeInfo {
-	GPtrArray *uid_added;
-	GPtrArray *uid_removed;
-	GPtrArray *uid_changed;
-
-	struct _CamelFolderChangeInfoPrivate *priv;
-};
-
-struct _CamelFolder
-{
-	CamelObject parent_object;
-
-	struct _CamelFolderPrivate *priv;
-
-	char *name;
-	char *full_name;
-	CamelStore *parent_store;
-	CamelFolderSummary *summary;
-
-	guint32 permanent_flags;
-	gboolean has_summary_capability:1;
-	gboolean has_search_capability:1;
-
-};
-
-typedef struct {
-	CamelObjectClass parent_class;
-
-	/* Virtual methods */	
-	void   (*refresh_info) (CamelFolder *folder, CamelException *ex);
-
-	void   (*sync) (CamelFolder *folder, gboolean expunge, 
-			CamelException *ex);
-
-	const char *  (*get_name)  (CamelFolder *folder);
-	const char *  (*get_full_name)   (CamelFolder *folder);
-
-	CamelStore *  (*get_parent_store) (CamelFolder *folder);
-
-	void (*expunge)  (CamelFolder *folder, 
-			  CamelException *ex);
-
-	int   (*get_message_count)   (CamelFolder *folder);
-
-	int   (*get_unread_message_count) (CamelFolder *folder);
-
-	void (*append_message)  (CamelFolder *folder, 
-				 CamelMimeMessage *message,
-				 const CamelMessageInfo *info,
-				 CamelException *ex);
-	
-	guint32 (*get_permanent_flags) (CamelFolder *folder);
-	guint32 (*get_message_flags)   (CamelFolder *folder,
-					const char *uid);
-	void    (*set_message_flags)   (CamelFolder *folder,
-					const char *uid,
-					guint32 flags, guint32 set);
-
-	gboolean (*get_message_user_flag) (CamelFolder *folder,
-					   const char *uid,
-					   const char *name);
-	void     (*set_message_user_flag) (CamelFolder *folder,
-					   const char *uid,
-					   const char *name,
-					   gboolean value);
-
-	const char * (*get_message_user_tag) (CamelFolder *folder,
-					      const char *uid,
-					      const char *name);
-	void     (*set_message_user_tag) (CamelFolder *folder,
-					  const char *uid,
-					  const char *name,
-					  const char *value);
-
-	CamelMimeMessage * (*get_message)  (CamelFolder *folder, 
-					    const char *uid, 
-					    CamelException *ex);
-
-	GPtrArray * (*get_uids)       (CamelFolder *folder);
-	void (*free_uids)             (CamelFolder *folder,
-				       GPtrArray *array);
-
-	GPtrArray * (*get_summary)    (CamelFolder *folder);
-	void (*free_summary)          (CamelFolder *folder,
-				       GPtrArray *summary);
-
-	gboolean (*has_search_capability) (CamelFolder *folder);
-
-	GPtrArray * (*search_by_expression) (CamelFolder *folder,
-					     const char *expression,
-					     CamelException *ex);
-
-	void (*search_free) (CamelFolder *folder, GPtrArray *result);
-
-	CamelMessageInfo * (*get_message_info) (CamelFolder *, const char *uid);
-	void (*ref_message_info) (CamelFolder *, CamelMessageInfo *);
-	void (*free_message_info) (CamelFolder *, CamelMessageInfo *);
-
-	void (*copy_messages_to) (CamelFolder *source,
-				  GPtrArray *uids,
-				  CamelFolder *destination,
-				  CamelException *ex);
-	
-	void (*move_messages_to) (CamelFolder *source,
-				  GPtrArray *uids,
-				  CamelFolder *destination,
-				  CamelException *ex);
-
-	void     (*freeze)    (CamelFolder *folder);
-	void     (*thaw)      (CamelFolder *folder);
-	gboolean (*is_frozen) (CamelFolder *folder);
-} CamelFolderClass;
-
-/* Standard Camel function */
-CamelType camel_folder_get_type (void);
-
-
-/* public methods */
-void               camel_folder_construct              (CamelFolder *folder,
-							CamelStore *parent_store,
-							const char *full_name,
-							const char *name);
-
-void               camel_folder_refresh_info           (CamelFolder * folder, 
-							CamelException * ex);
-void               camel_folder_sync                   (CamelFolder *folder, 
-							gboolean expunge, 
-							CamelException *ex);
-
-CamelStore *       camel_folder_get_parent_store       (CamelFolder *folder);
-
-
-/* delete operations */
-void		   camel_folder_expunge                (CamelFolder *folder, 
-							CamelException *ex);
-
-
-/* folder name operations */
-const char *      camel_folder_get_name                (CamelFolder *folder);
-const char *      camel_folder_get_full_name           (CamelFolder *folder);
-
-
-/* various properties accessors */
-guint32		   camel_folder_get_permanent_flags    (CamelFolder *folder);
-
-guint32		   camel_folder_get_message_flags      (CamelFolder *folder,
-							const char *uid);
-
-void		   camel_folder_set_message_flags      (CamelFolder *folder,
-							const char *uid,
-							guint32 flags,
-							guint32 set);
-
-gboolean	   camel_folder_get_message_user_flag  (CamelFolder *folder,
-							const char *uid,
-							const char *name);
-
-void		   camel_folder_set_message_user_flag  (CamelFolder *folder,
-							const char *uid,
-							const char *name,
-							gboolean value);
-const char *	   camel_folder_get_message_user_tag  (CamelFolder *folder,
-						       const char *uid,
-						       const char *name);
-
-void		   camel_folder_set_message_user_tag  (CamelFolder *folder,
-						       const char *uid,
-						       const char *name,
-						       const char *value);
-
-
-
-/* message manipulation */
-void               camel_folder_append_message         (CamelFolder *folder, 
-							CamelMimeMessage *message,
-							const CamelMessageInfo *info,
-							CamelException *ex);
-
-
-/* summary related operations */
-gboolean           camel_folder_has_summary_capability (CamelFolder *folder);
-
-
-int                camel_folder_get_message_count     (CamelFolder *folder);
-
-int                camel_folder_get_unread_message_count (CamelFolder *folder);
-
-GPtrArray *        camel_folder_get_summary           (CamelFolder *folder);
-void               camel_folder_free_summary          (CamelFolder *folder,
-						       GPtrArray *array);
-
-/* uid based access operations */
-CamelMimeMessage * camel_folder_get_message           (CamelFolder *folder, 
-						       const char *uid, 
-						       CamelException *ex);
-#define camel_folder_delete_message(folder, uid) \
-	camel_folder_set_message_flags (folder, uid, CAMEL_MESSAGE_DELETED, CAMEL_MESSAGE_DELETED)
-
-GPtrArray *        camel_folder_get_uids              (CamelFolder *folder);
-void               camel_folder_free_uids             (CamelFolder *folder,
-						       GPtrArray *array);
-
-/* search api */
-gboolean           camel_folder_has_search_capability (CamelFolder *folder);
-GPtrArray *	   camel_folder_search_by_expression  (CamelFolder *folder,
-						       const char *expression,
-						       CamelException *ex);
-void		   camel_folder_search_free	      (CamelFolder *folder, GPtrArray *);
-
-/* summary info */
-CamelMessageInfo *camel_folder_get_message_info		(CamelFolder *folder, const char *uid);
-void		  camel_folder_free_message_info	(CamelFolder *folder, CamelMessageInfo *info);
-void		  camel_folder_ref_message_info		(CamelFolder *folder, CamelMessageInfo *info);
-
-void               camel_folder_copy_messages_to       (CamelFolder *source,
-							GPtrArray *uids,
-							CamelFolder *dest,
-							CamelException *ex);
-
-void               camel_folder_move_messages_to       (CamelFolder *source,
-							GPtrArray *uids,
-							CamelFolder *dest,
-							CamelException *ex);
-
-/* stop/restart getting events */
-void               camel_folder_freeze                (CamelFolder *folder);
-void               camel_folder_thaw                  (CamelFolder *folder);
-gboolean           camel_folder_is_frozen             (CamelFolder *folder);
-
-#if 0
-/* lock/unlock at the thread level, NOTE: only used internally */
-void		   camel_folder_lock		      (CamelFolder *folder);
-void		   camel_folder_unlock		      (CamelFolder *folder);
-#endif
-
-/* For use by subclasses (for free_{uids,summary,subfolder_names}) */
-void camel_folder_free_nop     (CamelFolder *folder, GPtrArray *array);
-void camel_folder_free_shallow (CamelFolder *folder, GPtrArray *array);
-void camel_folder_free_deep    (CamelFolder *folder, GPtrArray *array);
-
-/* update functions for change info */
-CamelFolderChangeInfo *	camel_folder_change_info_new		(void);
-void			camel_folder_change_info_clear		(CamelFolderChangeInfo *info);
-void			camel_folder_change_info_free		(CamelFolderChangeInfo *info);
-gboolean		camel_folder_change_info_changed	(CamelFolderChangeInfo *info);
-
-/* for building diff's automatically */
-void			camel_folder_change_info_add_source	(CamelFolderChangeInfo *info, const char *uid);
-void			camel_folder_change_info_add_source_list(CamelFolderChangeInfo *info, const GPtrArray *list);
-void			camel_folder_change_info_add_update	(CamelFolderChangeInfo *info, const char *uid);
-void			camel_folder_change_info_add_update_list(CamelFolderChangeInfo *info, const GPtrArray *list);
-void			camel_folder_change_info_build_diff	(CamelFolderChangeInfo *info);
-
-/* for manipulating diff's directly */
-void			camel_folder_change_info_cat		(CamelFolderChangeInfo *info, CamelFolderChangeInfo *s);
-void			camel_folder_change_info_add_uid	(CamelFolderChangeInfo *info, const char *uid);
-void			camel_folder_change_info_remove_uid	(CamelFolderChangeInfo *info, const char *uid);
-void			camel_folder_change_info_change_uid	(CamelFolderChangeInfo *info, const char *uid);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_FOLDER_H */
-
diff --git a/camel/camel-html-parser.c b/camel/camel-html-parser.c
deleted file mode 100644
index 9169f97318..0000000000
--- a/camel/camel-html-parser.c
+++ /dev/null
@@ -1,807 +0,0 @@
-/*
- *  Copyright (C) 2001 Ximian Inc.
- *
- *  Authors: Michael Zucchi 
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Library General Public License
- *  as published by the Free Software Foundation; either version 2 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU Library General Public License for more details.
- *
- *  You should have received a copy of the GNU Library General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-/** WARNING
- **
- ** DO NOT USE THIS CODE OUTSIDE OF CAMEL
- **
- ** IT IS SUBJECT TO CHANGE OR MAY VANISH AT ANY TIME
- **/
-
-#include "camel-html-parser.h"
-
-#include 
-#include 
-
-#include 
-#include 
-
-/* if defined, must also compile in dump_tag() below somewhere */
-#define d(x)
-
-static void camel_html_parser_class_init (CamelHTMLParserClass *klass);
-static void camel_html_parser_init       (CamelObject *o);
-static void camel_html_parser_finalize   (CamelObject *o);
-
-static CamelObjectClass *camel_html_parser_parent;
-
-/* Parser definitions, see below object code for details */
-
-typedef struct _CamelHTMLParserPrivate CamelHTMLParserPrivate;
-
-struct _CamelHTMLParserPrivate {
-	char *inbuf,
-		*inptr,
-		*inend,
-		*start;
-	enum _camel_html_parser_t state;
-	char *charset;
-	int eof;
-	GString *tag;
-	GString *ent;
-	char ent_utf8[8];
-	int attr;
-	GPtrArray *attrs;
-	GPtrArray *values;
-	int quote;
-};
-
-static void tokenise_setup(void);
-static CamelHTMLParserPrivate *tokenise_init(void);
-static void tokenise_free(CamelHTMLParserPrivate *p);
-static int tokenise_step(CamelHTMLParserPrivate *p, char **datap, int *lenp);
-
-/* ********************************************************************** */
-
-CamelType
-camel_html_parser_get_type (void)
-{
-	static CamelType type = CAMEL_INVALID_TYPE;
-	
-	if (type == CAMEL_INVALID_TYPE) {
-		type = camel_type_register (camel_object_get_type (), "CamelHTMLParser",
-					    sizeof (CamelHTMLParser),
-					    sizeof (CamelHTMLParserClass),
-					    (CamelObjectClassInitFunc) camel_html_parser_class_init,
-					    NULL,
-					    (CamelObjectInitFunc) camel_html_parser_init,
-					    (CamelObjectFinalizeFunc) camel_html_parser_finalize);
-	}
-	
-	return type;
-}
-
-static void
-camel_html_parser_finalize(CamelObject *o)
-{
-	CamelHTMLParser *f = (CamelHTMLParser *)o;
-
-	tokenise_free(f->priv);
-}
-
-static void
-camel_html_parser_init       (CamelObject *o)
-{
-	CamelHTMLParser *f = (CamelHTMLParser *)o;
-
-	f->priv = tokenise_init();
-}
-
-static void
-camel_html_parser_class_init (CamelHTMLParserClass *klass)
-{
-	camel_html_parser_parent = CAMEL_OBJECT_CLASS (camel_type_get_global_classfuncs (camel_object_get_type ()));
-
-	tokenise_setup();
-}
-
-/**
- * camel_html_parser_new:
- *
- * Create a new CamelHTMLParser object.
- * 
- * Return value: A new CamelHTMLParser widget.
- **/
-CamelHTMLParser *
-camel_html_parser_new (void)
-{
-	CamelHTMLParser *new = CAMEL_HTML_PARSER ( camel_object_new (camel_html_parser_get_type ()));
-	return new;
-}
-
-
-void camel_html_parser_set_data(CamelHTMLParser *hp, const char *start, int len, int last)
-{
-	CamelHTMLParserPrivate *p = hp->priv;
-
-	p->inptr = p->inbuf = (char *)start;
-	p->inend = (char *)start+len;
-	p->eof = last;
-}
-
-camel_html_parser_t camel_html_parser_step(CamelHTMLParser *hp, const char **datap, int *lenp)
-{
-	return tokenise_step(hp->priv, (char **)datap, lenp);
-}
-
-const char *camel_html_parser_left(CamelHTMLParser *hp, int *lenp)
-{
-	CamelHTMLParserPrivate *p = hp->priv;
-
-	if (lenp)
-		*lenp = p->inend - p->inptr;
-
-	return p->inptr;
-}
-
-const char *camel_html_parser_tag(CamelHTMLParser *hp)
-{
-	return hp->priv->tag->str;
-}
-
-const char *camel_html_parser_attr(CamelHTMLParser *hp, const char *name)
-{
-	int i;
-	CamelHTMLParserPrivate *p = hp->priv;
-
-	for (i=0;iattrs->len;i++) {
-		if (!strcasecmp(((GString *)p->attrs->pdata[i])->str, name)) {
-			return ((GString *)p->values->pdata[i])->str;
-		}
-	}
-
-	return NULL;
-}
-
-const GPtrArray *camel_html_parser_attr_list(CamelHTMLParser *hp, const GPtrArray **values)
-{
-	if (values)
-		*values = hp->priv->values;
-
-	return hp->priv->attrs;
-}
-
-/* this map taken out of libxml */
-static struct {
-	unsigned int val;
-	const char *name;
-} entity_map[] = {
-/*
- * the 4 absolute ones,
- */
-	{ 34,	"quot",	/* quotation mark = APL quote, U+0022 ISOnum */ },
-	{ 38,	"amp",	/* ampersand, U+0026 ISOnum */ },
-	{ 60,	"lt",	/* less-than sign, U+003C ISOnum */ },
-	{ 62,	"gt",	/* greater-than sign, U+003E ISOnum */ },
-
-/*
- * A bunch still in the 128-255 range
- * Replacing them depend really on the charset used.
- */
-	{ 39,	"apos",	/* single quote */ },
-	{ 160,	"nbsp",	/* no-break space = non-breaking space, U+00A0 ISOnum */ },
-	{ 161,	"iexcl",/* inverted exclamation mark, U+00A1 ISOnum */ },
-	{ 162,	"cent",	/* cent sign, U+00A2 ISOnum */ },
-	{ 163,	"pound",/* pound sign, U+00A3 ISOnum */ },
-	{ 164,	"curren",/* currency sign, U+00A4 ISOnum */ },
-	{ 165,	"yen",	/* yen sign = yuan sign, U+00A5 ISOnum */ },
-	{ 166,	"brvbar",/* broken bar = broken vertical bar, U+00A6 ISOnum */ },
-	{ 167,	"sect",	/* section sign, U+00A7 ISOnum */ },
-	{ 168,	"uml",	/* diaeresis = spacing diaeresis, U+00A8 ISOdia */ },
-	{ 169,	"copy",	/* copyright sign, U+00A9 ISOnum */ },
-	{ 170,	"ordf",	/* feminine ordinal indicator, U+00AA ISOnum */ },
-	{ 171,	"laquo",/* left-pointing double angle quotation mark = left pointing guillemet, U+00AB ISOnum */ },
-	{ 172,	"not",	/* not sign, U+00AC ISOnum */ },
-	{ 173,	"shy",	/* soft hyphen = discretionary hyphen, U+00AD ISOnum */ },
-	{ 174,	"reg",	/* registered sign = registered trade mark sign, U+00AE ISOnum */ },
-	{ 175,	"macr",	/* macron = spacing macron = overline = APL overbar, U+00AF ISOdia */ },
-	{ 176,	"deg",	/* degree sign, U+00B0 ISOnum */ },
-	{ 177,	"plusmn",/* plus-minus sign = plus-or-minus sign, U+00B1 ISOnum */ },
-	{ 178,	"sup2",	/* superscript two = superscript digit two = squared, U+00B2 ISOnum */ },
-	{ 179,	"sup3",	/* superscript three = superscript digit three = cubed, U+00B3 ISOnum */ },
-	{ 180,	"acute",/* acute accent = spacing acute, U+00B4 ISOdia */ },
-	{ 181,	"micro",/* micro sign, U+00B5 ISOnum */ },
-	{ 182,	"para",	/* pilcrow sign = paragraph sign, U+00B6 ISOnum */ },
-	{ 183,	"middot",/* middle dot = Georgian comma Greek middle dot, U+00B7 ISOnum */ },
-	{ 184,	"cedil",/* cedilla = spacing cedilla, U+00B8 ISOdia */ },
-	{ 185,	"sup1",	/* superscript one = superscript digit one, U+00B9 ISOnum */ },
-	{ 186,	"ordm",	/* masculine ordinal indicator, U+00BA ISOnum */ },
-	{ 187,	"raquo",/* right-pointing double angle quotation mark right pointing guillemet, U+00BB ISOnum */ },
-	{ 188,	"frac14",/* vulgar fraction one quarter = fraction one quarter, U+00BC ISOnum */ },
-	{ 189,	"frac12",/* vulgar fraction one half = fraction one half, U+00BD ISOnum */ },
-	{ 190,	"frac34",/* vulgar fraction three quarters = fraction three quarters, U+00BE ISOnum */ },
-	{ 191,	"iquest",/* inverted question mark = turned question mark, U+00BF ISOnum */ },
-	{ 192,	"Agrave",/* latin capital letter A with grave = latin capital letter A grave, U+00C0 ISOlat1 */ },
-	{ 193,	"Aacute",/* latin capital letter A with acute, U+00C1 ISOlat1 */ },
-	{ 194,	"Acirc",/* latin capital letter A with circumflex, U+00C2 ISOlat1 */ },
-	{ 195,	"Atilde",/* latin capital letter A with tilde, U+00C3 ISOlat1 */ },
-	{ 196,	"Auml",	/* latin capital letter A with diaeresis, U+00C4 ISOlat1 */ },
-	{ 197,	"Aring",/* latin capital letter A with ring above = latin capital letter A ring, U+00C5 ISOlat1 */ },
-	{ 198,	"AElig",/* latin capital letter AE = latin capital ligature AE, U+00C6 ISOlat1 */ },
-	{ 199,	"Ccedil",/* latin capital letter C with cedilla, U+00C7 ISOlat1 */ },
-	{ 200,	"Egrave",/* latin capital letter E with grave, U+00C8 ISOlat1 */ },
-	{ 201,	"Eacute",/* latin capital letter E with acute, U+00C9 ISOlat1 */ },
-	{ 202,	"Ecirc",/* latin capital letter E with circumflex, U+00CA ISOlat1 */ },
-	{ 203,	"Euml",	/* latin capital letter E with diaeresis, U+00CB ISOlat1 */ },
-	{ 204,	"Igrave",/* latin capital letter I with grave, U+00CC ISOlat1 */ },
-	{ 205,	"Iacute",/* latin capital letter I with acute, U+00CD ISOlat1 */ },
-	{ 206,	"Icirc",/* latin capital letter I with circumflex, U+00CE ISOlat1 */ },
-	{ 207,	"Iuml",	/* latin capital letter I with diaeresis, U+00CF ISOlat1 */ },
-	{ 208,	"ETH",	/* latin capital letter ETH, U+00D0 ISOlat1 */ },
-	{ 209,	"Ntilde",/* latin capital letter N with tilde, U+00D1 ISOlat1 */ },
-	{ 210,	"Ograve",/* latin capital letter O with grave, U+00D2 ISOlat1 */ },
-	{ 211,	"Oacute",/* latin capital letter O with acute, U+00D3 ISOlat1 */ },
-	{ 212,	"Ocirc",/* latin capital letter O with circumflex, U+00D4 ISOlat1 */ },
-	{ 213,	"Otilde",/* latin capital letter O with tilde, U+00D5 ISOlat1 */ },
-	{ 214,	"Ouml",	/* latin capital letter O with diaeresis, U+00D6 ISOlat1 */ },
-	{ 215,	"times",/* multiplication sign, U+00D7 ISOnum */ },
-	{ 216,	"Oslash",/* latin capital letter O with stroke latin capital letter O slash, U+00D8 ISOlat1 */ },
-	{ 217,	"Ugrave",/* latin capital letter U with grave, U+00D9 ISOlat1 */ },
-	{ 218,	"Uacute",/* latin capital letter U with acute, U+00DA ISOlat1 */ },
-	{ 219,	"Ucirc",/* latin capital letter U with circumflex, U+00DB ISOlat1 */ },
-	{ 220,	"Uuml",	/* latin capital letter U with diaeresis, U+00DC ISOlat1 */ },
-	{ 221,	"Yacute",/* latin capital letter Y with acute, U+00DD ISOlat1 */ },
-	{ 222,	"THORN",/* latin capital letter THORN, U+00DE ISOlat1 */ },
-	{ 223,	"szlig",/* latin small letter sharp s = ess-zed, U+00DF ISOlat1 */ },
-	{ 224,	"agrave",/* latin small letter a with grave = latin small letter a grave, U+00E0 ISOlat1 */ },
-	{ 225,	"aacute",/* latin small letter a with acute, U+00E1 ISOlat1 */ },
-	{ 226,	"acirc",/* latin small letter a with circumflex, U+00E2 ISOlat1 */ },
-	{ 227,	"atilde",/* latin small letter a with tilde, U+00E3 ISOlat1 */ },
-	{ 228,	"auml",	/* latin small letter a with diaeresis, U+00E4 ISOlat1 */ },
-	{ 229,	"aring",/* latin small letter a with ring above = latin small letter a ring, U+00E5 ISOlat1 */ },
-	{ 230,	"aelig",/* latin small letter ae = latin small ligature ae, U+00E6 ISOlat1 */ },
-	{ 231,	"ccedil",/* latin small letter c with cedilla, U+00E7 ISOlat1 */ },
-	{ 232,	"egrave",/* latin small letter e with grave, U+00E8 ISOlat1 */ },
-	{ 233,	"eacute",/* latin small letter e with acute, U+00E9 ISOlat1 */ },
-	{ 234,	"ecirc",/* latin small letter e with circumflex, U+00EA ISOlat1 */ },
-	{ 235,	"euml",	/* latin small letter e with diaeresis, U+00EB ISOlat1 */ },
-	{ 236,	"igrave",/* latin small letter i with grave, U+00EC ISOlat1 */ },
-	{ 237,	"iacute",/* latin small letter i with acute, U+00ED ISOlat1 */ },
-	{ 238,	"icirc",/* latin small letter i with circumflex, U+00EE ISOlat1 */ },
-	{ 239,	"iuml",	/* latin small letter i with diaeresis, U+00EF ISOlat1 */ },
-	{ 240,	"eth",	/* latin small letter eth, U+00F0 ISOlat1 */ },
-	{ 241,	"ntilde",/* latin small letter n with tilde, U+00F1 ISOlat1 */ },
-	{ 242,	"ograve",/* latin small letter o with grave, U+00F2 ISOlat1 */ },
-	{ 243,	"oacute",/* latin small letter o with acute, U+00F3 ISOlat1 */ },
-	{ 244,	"ocirc",/* latin small letter o with circumflex, U+00F4 ISOlat1 */ },
-	{ 245,	"otilde",/* latin small letter o with tilde, U+00F5 ISOlat1 */ },
-	{ 246,	"ouml",	/* latin small letter o with diaeresis, U+00F6 ISOlat1 */ },
-	{ 247,	"divide",/* division sign, U+00F7 ISOnum */ },
-	{ 248,	"oslash",/* latin small letter o with stroke, = latin small letter o slash, U+00F8 ISOlat1 */ },
-	{ 249,	"ugrave",/* latin small letter u with grave, U+00F9 ISOlat1 */ },
-	{ 250,	"uacute",/* latin small letter u with acute, U+00FA ISOlat1 */ },
-	{ 251,	"ucirc",/* latin small letter u with circumflex, U+00FB ISOlat1 */ },
-	{ 252,	"uuml",	/* latin small letter u with diaeresis, U+00FC ISOlat1 */ },
-	{ 253,	"yacute",/* latin small letter y with acute, U+00FD ISOlat1 */ },
-	{ 254,	"thorn",/* latin small letter thorn with, U+00FE ISOlat1 */ },
-	{ 255,	"yuml",	/* latin small letter y with diaeresis, U+00FF ISOlat1 */ },
-
-/*
- * Anything below should really be kept as entities references
- */
-	{ 402,	"fnof",	/* latin small f with hook = function = florin, U+0192 ISOtech */ },
-
-	{ 913,	"Alpha",/* greek capital letter alpha, U+0391 */ },
-	{ 914,	"Beta",	/* greek capital letter beta, U+0392 */ },
-	{ 915,	"Gamma",/* greek capital letter gamma, U+0393 ISOgrk3 */ },
-	{ 916,	"Delta",/* greek capital letter delta, U+0394 ISOgrk3 */ },
-	{ 917,	"Epsilon",/* greek capital letter epsilon, U+0395 */ },
-	{ 918,	"Zeta",	/* greek capital letter zeta, U+0396 */ },
-	{ 919,	"Eta",	/* greek capital letter eta, U+0397 */ },
-	{ 920,	"Theta",/* greek capital letter theta, U+0398 ISOgrk3 */ },
-	{ 921,	"Iota",	/* greek capital letter iota, U+0399 */ },
-	{ 922,	"Kappa",/* greek capital letter kappa, U+039A */ },
-	{ 923,	"Lambda"/* greek capital letter lambda, U+039B ISOgrk3 */ },
-	{ 924,	"Mu",	/* greek capital letter mu, U+039C */ },
-	{ 925,	"Nu",	/* greek capital letter nu, U+039D */ },
-	{ 926,	"Xi",	/* greek capital letter xi, U+039E ISOgrk3 */ },
-	{ 927,	"Omicron",/* greek capital letter omicron, U+039F */ },
-	{ 928,	"Pi",	/* greek capital letter pi, U+03A0 ISOgrk3 */ },
-	{ 929,	"Rho",	/* greek capital letter rho, U+03A1 */ },
-	{ 931,	"Sigma",/* greek capital letter sigma, U+03A3 ISOgrk3 */ },
-	{ 932,	"Tau",	/* greek capital letter tau, U+03A4 */ },
-	{ 933,	"Upsilon",/* greek capital letter upsilon, U+03A5 ISOgrk3 */ },
-	{ 934,	"Phi",	/* greek capital letter phi, U+03A6 ISOgrk3 */ },
-	{ 935,	"Chi",	/* greek capital letter chi, U+03A7 */ },
-	{ 936,	"Psi",	/* greek capital letter psi, U+03A8 ISOgrk3 */ },
-	{ 937,	"Omega",/* greek capital letter omega, U+03A9 ISOgrk3 */ },
-
-	{ 945,	"alpha",/* greek small letter alpha, U+03B1 ISOgrk3 */ },
-	{ 946,	"beta",	/* greek small letter beta, U+03B2 ISOgrk3 */ },
-	{ 947,	"gamma",/* greek small letter gamma, U+03B3 ISOgrk3 */ },
-	{ 948,	"delta",/* greek small letter delta, U+03B4 ISOgrk3 */ },
-	{ 949,	"epsilon",/* greek small letter epsilon, U+03B5 ISOgrk3 */ },
-	{ 950,	"zeta",	/* greek small letter zeta, U+03B6 ISOgrk3 */ },
-	{ 951,	"eta",	/* greek small letter eta, U+03B7 ISOgrk3 */ },
-	{ 952,	"theta",/* greek small letter theta, U+03B8 ISOgrk3 */ },
-	{ 953,	"iota",	/* greek small letter iota, U+03B9 ISOgrk3 */ },
-	{ 954,	"kappa",/* greek small letter kappa, U+03BA ISOgrk3 */ },
-	{ 955,	"lambda",/* greek small letter lambda, U+03BB ISOgrk3 */ },
-	{ 956,	"mu",	/* greek small letter mu, U+03BC ISOgrk3 */ },
-	{ 957,	"nu",	/* greek small letter nu, U+03BD ISOgrk3 */ },
-	{ 958,	"xi",	/* greek small letter xi, U+03BE ISOgrk3 */ },
-	{ 959,	"omicron",/* greek small letter omicron, U+03BF NEW */ },
-	{ 960,	"pi",	/* greek small letter pi, U+03C0 ISOgrk3 */ },
-	{ 961,	"rho",	/* greek small letter rho, U+03C1 ISOgrk3 */ },
-	{ 962,	"sigmaf",/* greek small letter final sigma, U+03C2 ISOgrk3 */ },
-	{ 963,	"sigma",/* greek small letter sigma, U+03C3 ISOgrk3 */ },
-	{ 964,	"tau",	/* greek small letter tau, U+03C4 ISOgrk3 */ },
-	{ 965,	"upsilon",/* greek small letter upsilon, U+03C5 ISOgrk3 */ },
-	{ 966,	"phi",	/* greek small letter phi, U+03C6 ISOgrk3 */ },
-	{ 967,	"chi",	/* greek small letter chi, U+03C7 ISOgrk3 */ },
-	{ 968,	"psi",	/* greek small letter psi, U+03C8 ISOgrk3 */ },
-	{ 969,	"omega",/* greek small letter omega, U+03C9 ISOgrk3 */ },
-	{ 977,	"thetasym",/* greek small letter theta symbol, U+03D1 NEW */ },
-	{ 978,	"upsih",/* greek upsilon with hook symbol, U+03D2 NEW */ },
-	{ 982,	"piv",	/* greek pi symbol, U+03D6 ISOgrk3 */ },
-
-	{ 8226,	"bull",	/* bullet = black small circle, U+2022 ISOpub */ },
-	{ 8230,	"hellip",/* horizontal ellipsis = three dot leader, U+2026 ISOpub */ },
-	{ 8242,	"prime",/* prime = minutes = feet, U+2032 ISOtech */ },
-	{ 8243,	"Prime",/* double prime = seconds = inches, U+2033 ISOtech */ },
-	{ 8254,	"oline",/* overline = spacing overscore, U+203E NEW */ },
-	{ 8260,	"frasl",/* fraction slash, U+2044 NEW */ },
-
-	{ 8472,	"weierp",/* script capital P = power set = Weierstrass p, U+2118 ISOamso */ },
-	{ 8465,	"image",/* blackletter capital I = imaginary part, U+2111 ISOamso */ },
-	{ 8476,	"real",	/* blackletter capital R = real part symbol, U+211C ISOamso */ },
-	{ 8482,	"trade",/* trade mark sign, U+2122 ISOnum */ },
-	{ 8501,	"alefsym",/* alef symbol = first transfinite cardinal, U+2135 NEW */ },
-	{ 8592,	"larr",	/* leftwards arrow, U+2190 ISOnum */ },
-	{ 8593,	"uarr",	/* upwards arrow, U+2191 ISOnum */ },
-	{ 8594,	"rarr",	/* rightwards arrow, U+2192 ISOnum */ },
-	{ 8595,	"darr",	/* downwards arrow, U+2193 ISOnum */ },
-	{ 8596,	"harr",	/* left right arrow, U+2194 ISOamsa */ },
-	{ 8629,	"crarr",/* downwards arrow with corner leftwards = carriage return, U+21B5 NEW */ },
-	{ 8656,	"lArr",	/* leftwards double arrow, U+21D0 ISOtech */ },
-	{ 8657,	"uArr",	/* upwards double arrow, U+21D1 ISOamsa */ },
-	{ 8658,	"rArr",	/* rightwards double arrow, U+21D2 ISOtech */ },
-	{ 8659,	"dArr",	/* downwards double arrow, U+21D3 ISOamsa */ },
-	{ 8660,	"hArr",	/* left right double arrow, U+21D4 ISOamsa */ },
-
-
-	{ 8704,	"forall",/* for all, U+2200 ISOtech */ },
-	{ 8706,	"part",	/* partial differential, U+2202 ISOtech */ },
-	{ 8707,	"exist",/* there exists, U+2203 ISOtech */ },
-	{ 8709,	"empty",/* empty set = null set = diameter, U+2205 ISOamso */ },
-	{ 8711,	"nabla",/* nabla = backward difference, U+2207 ISOtech */ },
-	{ 8712,	"isin",	/* element of, U+2208 ISOtech */ },
-	{ 8713,	"notin",/* not an element of, U+2209 ISOtech */ },
-	{ 8715,	"ni",	/* contains as member, U+220B ISOtech */ },
-	{ 8719,	"prod",	/* n-ary product = product sign, U+220F ISOamsb */ },
-	{ 8721,	"sum",	/* n-ary sumation, U+2211 ISOamsb */ },
-	{ 8722,	"minus",/* minus sign, U+2212 ISOtech */ },
-	{ 8727,	"lowast",/* asterisk operator, U+2217 ISOtech */ },
-	{ 8730,	"radic",/* square root = radical sign, U+221A ISOtech */ },
-	{ 8733,	"prop",	/* proportional to, U+221D ISOtech */ },
-	{ 8734,	"infin",/* infinity, U+221E ISOtech */ },
-	{ 8736,	"ang",	/* angle, U+2220 ISOamso */ },
-	{ 8743,	"and",	/* logical and = wedge, U+2227 ISOtech */ },
-	{ 8744,	"or",	/* logical or = vee, U+2228 ISOtech */ },
-	{ 8745,	"cap",	/* intersection = cap, U+2229 ISOtech */ },
-	{ 8746,	"cup",	/* union = cup, U+222A ISOtech */ },
-	{ 8747,	"int",	/* integral, U+222B ISOtech */ },
-	{ 8756,	"there4",/* therefore, U+2234 ISOtech */ },
-	{ 8764,	"sim",	/* tilde operator = varies with = similar to, U+223C ISOtech */ },
-	{ 8773,	"cong",	/* approximately equal to, U+2245 ISOtech */ },
-	{ 8776,	"asymp",/* almost equal to = asymptotic to, U+2248 ISOamsr */ },
-	{ 8800,	"ne",	/* not equal to, U+2260 ISOtech */ },
-	{ 8801,	"equiv",/* identical to, U+2261 ISOtech */ },
-	{ 8804,	"le",	/* less-than or equal to, U+2264 ISOtech */ },
-	{ 8805,	"ge",	/* greater-than or equal to, U+2265 ISOtech */ },
-	{ 8834,	"sub",	/* subset of, U+2282 ISOtech */ },
-	{ 8835,	"sup",	/* superset of, U+2283 ISOtech */ },
-	{ 8836,	"nsub",	/* not a subset of, U+2284 ISOamsn */ },
-	{ 8838,	"sube",	/* subset of or equal to, U+2286 ISOtech */ },
-	{ 8839,	"supe",	/* superset of or equal to, U+2287 ISOtech */ },
-	{ 8853,	"oplus",/* circled plus = direct sum, U+2295 ISOamsb */ },
-	{ 8855,	"otimes",/* circled times = vector product, U+2297 ISOamsb */ },
-	{ 8869,	"perp",	/* up tack = orthogonal to = perpendicular, U+22A5 ISOtech */ },
-	{ 8901,	"sdot",	/* dot operator, U+22C5 ISOamsb */ },
-	{ 8968,	"lceil",/* left ceiling = apl upstile, U+2308 ISOamsc */ },
-	{ 8969,	"rceil",/* right ceiling, U+2309 ISOamsc */ },
-	{ 8970,	"lfloor",/* left floor = apl downstile, U+230A ISOamsc */ },
-	{ 8971,	"rfloor",/* right floor, U+230B ISOamsc */ },
-	{ 9001,	"lang",	/* left-pointing angle bracket = bra, U+2329 ISOtech */ },
-	{ 9002,	"rang",	/* right-pointing angle bracket = ket, U+232A ISOtech */ },
-	{ 9674,	"loz",	/* lozenge, U+25CA ISOpub */ },
-
-	{ 9824,	"spades",/* black spade suit, U+2660 ISOpub */ },
-	{ 9827,	"clubs",/* black club suit = shamrock, U+2663 ISOpub */ },
-	{ 9829,	"hearts",/* black heart suit = valentine, U+2665 ISOpub */ },
-	{ 9830,	"diams",/* black diamond suit, U+2666 ISOpub */ },
-
-	{ 338,	"OElig",/* latin capital ligature OE, U+0152 ISOlat2 */ },
-	{ 339,	"oelig",/* latin small ligature oe, U+0153 ISOlat2 */ },
-	{ 352,	"Scaron",/* latin capital letter S with caron, U+0160 ISOlat2 */ },
-	{ 353,	"scaron",/* latin small letter s with caron, U+0161 ISOlat2 */ },
-	{ 376,	"Yuml",	/* latin capital letter Y with diaeresis, U+0178 ISOlat2 */ },
-	{ 710,	"circ",	/* modifier letter circumflex accent, U+02C6 ISOpub */ },
-	{ 732,	"tilde",/* small tilde, U+02DC ISOdia */ },
-
-	{ 8194,	"ensp",	/* en space, U+2002 ISOpub */ },
-	{ 8195,	"emsp",	/* em space, U+2003 ISOpub */ },
-	{ 8201,	"thinsp",/* thin space, U+2009 ISOpub */ },
-	{ 8204,	"zwnj",	/* zero width non-joiner, U+200C NEW RFC 2070 */ },
-	{ 8205,	"zwj",	/* zero width joiner, U+200D NEW RFC 2070 */ },
-	{ 8206,	"lrm",	/* left-to-right mark, U+200E NEW RFC 2070 */ },
-	{ 8207,	"rlm",	/* right-to-left mark, U+200F NEW RFC 2070 */ },
-	{ 8211,	"ndash",/* en dash, U+2013 ISOpub */ },
-	{ 8212,	"mdash",/* em dash, U+2014 ISOpub */ },
-	{ 8216,	"lsquo",/* left single quotation mark, U+2018 ISOnum */ },
-	{ 8217,	"rsquo",/* right single quotation mark, U+2019 ISOnum */ },
-	{ 8218,	"sbquo",/* single low-9 quotation mark, U+201A NEW */ },
-	{ 8220,	"ldquo",/* left double quotation mark, U+201C ISOnum */ },
-	{ 8221,	"rdquo",/* right double quotation mark, U+201D ISOnum */ },
-	{ 8222,	"bdquo",/* double low-9 quotation mark, U+201E NEW */ },
-	{ 8224,	"dagger",/* dagger, U+2020 ISOpub */ },
-	{ 8225,	"Dagger",/* double dagger, U+2021 ISOpub */ },
-	{ 8240,	"permil",/* per mille sign, U+2030 ISOtech */ },
-	{ 8249,	"lsaquo",/* single left-pointing angle quotation mark, U+2039 ISO proposed */ },
-	{ 8250,	"rsaquo",/* single right-pointing angle quotation mark, U+203A ISO proposed */ },
-	{ 8364,	"euro",	/* euro sign, U+20AC NEW */ }
-};
-
-static GHashTable *entities;
-
-/* this cannot be called in a thread context */
-static void tokenise_setup(void)
-{
-	int i;
-
-	if (entities == NULL) {
-		entities = g_hash_table_new(g_str_hash, g_str_equal);
-		for (i=0;istate = CAMEL_HTML_PARSER_DATA;
-
-	p->attr = 0;
-	p->attrs = g_ptr_array_new();
-	p->values = g_ptr_array_new();
-	p->tag = g_string_new("");
-	p->ent = g_string_new("");
-	p->charset = NULL;
-	
-	if (entities == NULL)
-		tokenise_setup();
-
-	return p;
-}
-
-static void tokenise_free(CamelHTMLParserPrivate *p)
-{
-	int i;
-
-	g_string_free(p->tag, TRUE);
-	g_string_free(p->ent, TRUE);
-	g_free(p->charset);
-
-	for (i=0;iattrs->len;i++)
-		g_string_free(p->attrs->pdata[i], TRUE);
-
-	for (i=0;ivalues->len;i++)
-		g_string_free(p->values->pdata[i], TRUE);
-
-	g_free(p);
-}
-
-static int convert_entity(const char *e, char *ent)
-{
-	unsigned int val;
-
-	if (e[0] == '#')
-		return g_unichar_to_utf8(atoi(e+1), ent);
-
-	val = (unsigned int)g_hash_table_lookup(entities, e);
-	if (ent)
-		return g_unichar_to_utf8(val, ent);
-	else
-		return 0;
-}
-
-#if 0
-static void dump_tag(CamelHTMLParserPrivate *p)
-{
-	int i;
-
-	printf("got tag: %s\n", p->tag->str);
-	printf("%d attributes:\n", p->attr);
-	for (i=0;iattr;i++) {
-		printf(" %s = '%s'\n", ((GString *)p->attrs->pdata[i])->str, ((GString *)p->values->pdata[i])->str);
-	}
-}
-#endif
-
-static int tokenise_step(CamelHTMLParserPrivate *p, char **datap, int *lenp)
-{
-	char *in = p->inptr;
-	char *inend = p->inend;
-	char c;
-	int state = p->state, ret, len;
-	char *start = p->inptr;
-
-	d(printf("Tokenise step\n"));
-
-	while (in < inend) {
-		c = *in++;
-		switch (state) {
-		case CAMEL_HTML_PARSER_DATA:
-			if (c == '<') {
-				ret = state;
-				state = CAMEL_HTML_PARSER_TAG;
-				p->attr = 0;
-				g_string_truncate(p->tag, 0);
-				d(printf("got data '%.*s'\n", in-start-1, start));
-				*datap = start;
-				*lenp = in-start-1;
-				goto done;
-			} else if (c=='&') {
-				ret = state;
-				state = CAMEL_HTML_PARSER_ENT;
-				g_string_truncate(p->ent, 0);
-				g_string_append_c(p->ent, c);
-				d(printf("got data '%.*s'\n", in-start-1, start));
-				*datap = start;
-				*lenp = in-start-1;
-				goto done;
-			}
-			break;
-		case CAMEL_HTML_PARSER_ENT:
-			if (c==';') {
-				len = convert_entity(p->ent->str+1, p->ent_utf8);
-				if (len == 0) {
-					/* handle broken entity */
-					g_string_append_c(p->ent, c);
-					ret = state = CAMEL_HTML_PARSER_DATA;
-					*datap = p->ent->str;
-					*lenp = p->ent->len;
-					goto done;
-				} else {
-					d(printf("got entity: %s = %s\n", p->ent->str, p->ent_utf8));
-					ret = state;
-					state = CAMEL_HTML_PARSER_DATA;
-					*datap = p->ent_utf8;
-					*lenp = len;
-					goto done;
-				}
-			} else if (isalnum(c) || c=='#') { /* FIXME: right type */
-				g_string_append_c(p->ent, c);
-			} else {
-				/* handle broken entity */
-				g_string_append_c(p->ent, c);
-				ret = state = CAMEL_HTML_PARSER_DATA;
-				*datap = p->ent->str;
-				*lenp = p->ent->len;
-				goto done;
-			}
-			break;
-		case CAMEL_HTML_PARSER_TAG:
-			if (c == '!') {
-				state = CAMEL_HTML_PARSER_COMMENT0;
-				g_string_append_c(p->tag, c);
-			} else if (c == '>') {
-				d(dump_tag(p));
-				ret = CAMEL_HTML_PARSER_ELEMENT;
-				state = CAMEL_HTML_PARSER_DATA;
-				goto done;
-			} else if (c == ' ' || c=='\n' || c=='\t') {
-				state = CAMEL_HTML_PARSER_ATTR0;
-			} else {
-				g_string_append_c(p->tag, c);
-			}
-			break;
-			/* check for