Enable GUI option for 'custom command' connection. Don't g_free strings in
[platform/upstream/evolution-data-server.git] / camel / ChangeLog.pre-1-4
1 2003-06-01  Jeffrey Stedfast  <fejj@ximian.com>
2
3         * broken-date-parser.c (d): Turn off debugging.
4
5         * providers/pop3/camel-pop3-engine.c (get_capabilities): Move the
6         code that prepends the 'password' authtype to the auth list so
7         that we don't add it again when regetting the capabilities.
8
9 2003-05-30  Jeffrey Stedfast  <fejj@ximian.com>
10
11         * camel-filter-driver.c (run_only_once): Turned off a debugging
12         printf.
13
14 2003-05-27  Jeffrey Stedfast  <fejj@ximian.com>
15
16         This should finish fixing all variations of bug #42854, which,
17         funnily enough specified "copying" as the scenario for reproducing
18         this bug, but somehow I found/fixed it only for expunging for some
19         reason? I can't even guess as to how this happened. Oh well,
20         expunging needed fixing either way.
21
22         * providers/imap/camel-imap-folder.c (imap_transfer_online): Sort
23         the uids here too (just like I had fixed for expunge a week or so
24         ago).
25         (imap_transfer_resyncing): Sort them here too.
26         (imap_search_by_uids): Sort here too, even though I don't think it
27         is necessary. Can't hurt.
28         (imap_expunge_uids_offline): Might as well sort here too.
29
30 2003-05-22  Jeffrey Stedfast  <fejj@ximian.com>
31
32         * camel-object.c (camel_object_bag_destroy): Lets try this
33         again. We don't actually want to free the key here, because
34         camel_object_bag_remove() does that for us. This should fix bug
35         #43406 properly.
36
37 2003-05-20  Jeffrey Stedfast  <fejj@ximian.com>
38
39         * camel-object.c (camel_object_bag_destroy): Create a second
40         GPtrArray for the keys. We don't want to use bag->free_key() on
41         the object. Fixes bug #43406.
42
43 2003-05-19  Jeffrey Stedfast  <fejj@ximian.com>
44
45         * camel-folder-summary.c (camel_folder_summary_load): Only display
46         a warning if errno != EINVAL (EINVAL means there was a version
47         mismatch, so we don't really need to warn here since we are
48         supposed to be able to handle this situation).
49         (perform_content_info_load): Turn off debugging message.
50         (summary_assign_uid): Turn off uid-clash warning.
51         (camel_folder_summary_decode_token): Turn off debug messages.
52         (summary_header_load): Turn off version-mismatch warning.
53
54 2003-05-16  Jeremy Katz  <katzj@redhat.com>
55
56         * providers/smtp/camel-smtp-transport.c (smtp_helo): Ensure cmdbuf
57         is initialized to avoid compiler warning.
58
59         * providers/local/camel-mbox-summary.c (summary_header_load): Cast
60         folder_size to uint32 to fix warning.
61         (camel_mbox_summary_sync_mbox): Update for new API.
62
63         * providers/imap/camel-imap-utils.c (parse_params):
64         imap_parse_nstring expects size_t, not int
65         (imap_body_decode): Likewise.
66
67         * camel-stream-filter.c (do_read): presize needs to be size_t
68         instead of int.
69         (do_write): Likewise.
70
71         * camel-seekable-substream.c (stream_read): Return ssize_t instead
72         of int to match prototypes.
73         (stream_write): Likewise.
74
75         * camel-mime-part.c (construct_from_parser): len needs to be
76         size_t instead of int.
77
78         * camel-mime-parser.c (folder_scan_step): datalength needs to be a
79         size_t* instead of an int* to make dependent APIs safe.
80         (camel_mime_parser_step): Likewise.
81         (folder_scan_content): Likewise.
82         * camel-mime-parser.h: Likewise.
83
84         * camel-mime-message.c (camel_mime_message_class_init): Use glib
85         macro for pointer/int conversions.
86         (construct_from_parser): Update for new API.
87
88         * camel-folder-summary.c
89         (camel_folder_summary_info_new_from_parser): Update len to be
90         size_t for new API.
91         (summary_build_content_info): Likewise.
92         * camel-http-stream.c (http_get_headers): Likewise.
93         * camel-mime-part-utils.c
94         (simple_data_wrapper_construct_from_parser): Likewise.
95         * camel-multipart-signed.c (signed_construct_from_parser): Likewise.
96         * camel-multipart.c (construct_from_parser): Likewise.
97
98         * camel-folder-search.c (match_words_index): Use glib macros for
99         pointer/int conversions.
100         * camel-html-parser.c (tokenise_setup): Likewise.
101         (convert_entity): Likewise.
102         * camel-block-file.c (block_hash_func): Likewise.
103         (camel_block_file_get_block): Likewise.
104         (camel_block_file_get_block): Likewise.
105         (camel_block_file_detach_block): Likewise.
106         * camel-session.c (session_thread_msg_new): Likewise.
107         (session_thread_msg_free): Likewise.
108         (session_thread_wait): Likewise.
109         * camel-text-index.c (text_index_compress_nosync): Likewise.
110         (text_index_compress_nosync): Likewise.
111         (camel_text_index_validate): Likewise.
112         * camel-vee-folder.c (vee_folder_remove_folder): Likewise.
113         (unmatched_check_uid): Likewise.
114         (folder_added_uid): Likewise.
115         (vee_folder_build_folder): Likewise.
116         (folder_changed_add_uid): Likewise.
117         (folder_changed_remove_uid): Likewise.
118         * providers/imap/camel-imap-search.c (imap_body_contains): Likewise.
119         * providers/pop3/camel-pop3-folder.c (cmd_list): Likewise.
120         (cmd_uidl): Likewise.
121
122         * camel-data-cache.c (data_cache_init): Cast to CamelCopyFunc.
123         Fixes a warning.
124
125 2003-05-15  Not Zed  <NotZed@Ximian.com>
126
127         * camel-mime-utils.c (header_decode_word): Simplistic quick-fix
128         for #42710.  Add a charset argument.  If the data is 8 bit, try to
129         decode into the passed in charset (i.e. the message header?), at
130         worst, fall back to latin1, similarly to header_decode_text.
131         Fixed all callers to pass in a charset if available, or NULL.
132
133 2003-05-14  Not Zed  <NotZed@Ximian.com>
134
135         ** See bug #42540
136         
137         * camel-service.c (camel_gethostbyname): pre-initialise the error
138         return to invalid, so if we cancel, we definetly get a bad result.
139         Also, for a valid return against result, not herr.
140         (camel_gethostbyaddr): Likewise.
141
142 2003-05-13  Jeffrey Stedfast  <fejj@ximian.com>
143
144         * providers/local/camel-local-folder.c (local_delete): Only delete
145         the index if it is non-NULL. Fixes bug #42763.
146
147 2003-05-13  Jeffrey Stedfast  <fejj@ximian.com>
148
149         * providers/imap/camel-imap-utils.c (imap_uid_array_to_set): Added
150         a note to the comment block for this function noting that uids
151         MUST be in sorted order.
152
153         * providers/imap/camel-imap-folder.c (imap_expunge_uids_online):
154         Sort the uids before splitting them into UID set chunks. The code
155         that splits the uid array into sets expects the uids to be in
156         sorted order. Fixes bug #42854.
157
158         * providers/imap/camel-imap-command.c (imap_command_start):
159         Re-enable camel_verbose_debug logging.
160
161 2003-05-12  Jeffrey Stedfast  <fejj@ximian.com>
162
163         * providers/smtp/camel-smtp-transport.c (smtp_helo): If
164         host->h_name is NULL or an empty string, default back to using the
165         IP address rather than the hostname in the EHLO command.
166
167 2003-05-13  Ettore Perazzoli  <ettore@ximian.com>
168
169         * providers/imap/camel-imap-folder.c (d): Disable debugging.
170
171         * providers/imap/camel-imap-command.c (d): Disable debugging.
172
173         * providers/imap/camel-imap-search.c (d): Disable debugging.
174
175 2003-05-02  Dan Winship  <danw@ximian.com>
176
177         * camel-mime-part-utils.c
178         (simple_data_wrapper_construct_from_parser): Don't call
179         g_utf8_validate on an empty message. Fixes a warning.
180
181 2003-05-01  Jeffrey Stedfast  <fejj@ximian.com>
182
183         Workaround for POS mailers like the one in bug #42045.
184
185         * camel-mime-utils.c (header_decode_date): Make sure the numeric
186         timezone is between -1200 and 1200, otherwise it is invalid.
187
188         * broken-date-parser.c (get_tzone): Make sure the numeric timezone
189         is between -1200 and 1200, otherwise it is invalid.
190
191 2003-04-29  Dan Winship  <danw@ximian.com>
192
193         * Makefile.am (camel_lock_helper_SOURCES): Remove camel-lock.c
194         from here because it upsets automake 1.6 for some reason
195         (camel_lock_helper_LDADD): Add camel-lock.o here
196
197 2003-04-29  Jeremy Katz  <katzj@redhat.com>
198
199         * providers/imap/camel-imap-folder.c (parse_fetch_response):
200         body_len needs to be a size_t instead of int
201
202 2003-04-22  Jeffrey Stedfast  <fejj@ximian.com>
203
204         * providers/imap/camel-imap-utils.c: Disable debugging printfs.
205
206         * providers/imap/camel-imap-store.c (imap_connect_online): #if 0
207         out some code that parsed the namespaces since the results aren't
208         used and they generate debugging output.
209
210 2003-04-23  Not Zed  <NotZed@Ximian.com>
211
212         * providers/smtp/camel-smtp-transport.c (smtp_helo): only free the
213         host if it was set.  removes a run-time warning.
214
215         * camel-session.c (get_service): oops, the service owns the url
216         after we construct it.
217
218 2003-04-22  Not Zed  <NotZed@Ximian.com>
219
220         ** Should fix #41629, #41448, et al.
221         
222         * tests/folder/test10.c: a new torture test for object bag
223         creation/unreffing.
224
225         * camel-url.c (camel_url_copy): new function to copy a url.
226
227         * camel-object.c (camel_object_bag_new): add arguments for key
228         copy and key free functions.  Fixed all callers.
229         (camel_object_bag_destroy): fix a memleak, free the bag key.
230         (camel_object_bag_get, camel_object_bag_reserve)
231         (camel_object_bag_abort, save_bag, save_object): Make the key a
232         void type, rather than char *.
233         (camel_object_bag_add): As above, and also copy the key.
234         (camel_object_bag_remove_unlocked): free the key using
235         bag->free_key.
236
237         * camel-session.c (register_provider)
238         (camel_session_destroy_provider, get_service): Changed to use an
239         object bag instead of a hash table for the service 'cache'.
240         (service_cache_remove): Removed, no longer required.
241
242 2003-04-21  Jeffrey Stedfast  <fejj@ximian.com>
243
244         * camel-gpg-context.c (gpg_ctx_parse_status): Don't set seen_eof1
245         here anymore once we get a trust metric.
246         (gpg_ctx_new): Init seen_eof1 to TRUE here.
247         (gpg_ctx_set_ostream): Change seen_eof1 to FALSE here this way we
248         only ever have to set this if we are expecting output.
249         (gpg_ctx_parse_status): Don't set seen_eof1 for importing either.
250         (gpg_ctx_op_step): Only FD_SET() those fd's that we have not yet
251         finished reading.
252
253 2003-04-16  Jeffrey Stedfast  <fejj@ximian.com>
254
255         * camel-url-scanner.c (camel_url_web_end): Urls are unlikely to
256         end with punctuation or closing braces, so strip any of those off
257         the end of the url. Fixes bug #41461.
258
259         * tests/mime-filter/data/html.1.out: Removed a trailing \n at the
260         end of the file, this is incorrect (since out input file does not
261         contain one).
262
263         * camel-mime-filter-tohtml.c (html_convert): Only output a <br> if
264         we found an eoln in the input. Along the same lines, don't write a
265         '\n' to the output buffer unless we've encountered that eoln in
266         the input. Fixes bug #41407.
267
268 2003-04-17  Not Zed  <NotZed@Ximian.com>
269
270         ** for #40989
271
272         * camel-text-index.c (text_index_delete): delete the block
273         file/key file directly, not just its files.
274
275         * providers/local/camel-local-folder.c (local_delete): implement,
276         just delete the index file if it exists.
277         camel-store-delete-folder will delete other data (maybe it all
278         should be done here).
279
280         * camel-block-file.c (camel_key_file_finalise): keep lock around
281         decrementing key file use count.
282         (camel_key_file_delete): new function to delete the key file (&
283         close it off).
284         (key_file_use): if we've been deleted, always fail.
285         (camel_block_file_finalise): only close the file if its a valid
286         fd.
287         (block_file_use): if we've been deleted, always fail.
288         (camel_block_file_delete): delete the block file & close.
289         (struct _CamelBlockFilePrivate): fix the !ENABLE_THREADS case to
290         still compile this.
291
292         ** for #41163
293
294         * camel-multipart-signed.c (parse_content): Dont assume adding 1
295         to line length will go to the next line.  e.g. for dos lines that
296         end in \r\n.  Fix for #41163.
297         (parse_boundary): util function to help above.
298
299 2003-04-15  Jeffrey Stedfast  <fejj@ximian.com>
300
301         * camel-gpg-context.c (gpg_verify): The gpg child process exiting
302         does not necessarily mean that we've ready everything that we can
303         from its pipes, so don't use gpg_ctx_op_exited() as a loop-exit
304         condition. If for some reason the gpg child process does exit (due
305         to an error), gpg_ctx_op_step() will eventually fail (as soon as
306         it has finished reading any data in the pipes) and cause the loop
307         to be terminated anyway. This fixes truncation of the gpg --verify
308         stderr output that Evolution displays as the "validity report"
309         (for lack of a better description).
310         (gpg_ctx_op_step): Removed some debugging printf's
311         (gpg_ctx_get_diagnostics): Use a bitfield to decide if we've
312         already flushed the diagnostics stream, much simpler (plus we have
313         plenty of bits to spare so might as well use them).
314         (gpg_ctx_new): Fixed another logic bug which determined whether or
315         not we should convert the gpg output from the locale charset into
316         UTF-8.
317
318 2003-04-10  Jeffrey Stedfast  <fejj@ximian.com>
319
320         * providers/smtp/camel-smtp-transport.c: Turn off debugging if
321         CAMEL_VERBOSE_DEBUG isn't set.
322
323 2003-04-10  Not Zed  <NotZed@Ximian.com>
324
325         * tests/mime-filter/data: filter data test cases.
326
327         * tests/mime-filter/test-tohtml.c: New test for html filter.
328
329         ** See bug #40969
330
331         * camel-mime-filter-tohtml.c (html_convert): Change the logic
332         slightly, scan a whole line within the main loop.
333
334 2003-04-09  Jeffrey Stedfast  <fejj@ximian.com>
335
336         * camel-gpg-context.c (gpg_ctx_get_utf8_diagnostics): Removed. I
337         just realised that we ALWAYS want to get gpg's stderr in UTF-8, so
338         the better solution (plus less code duplication) is to just have
339         the diagnostics buffer be a CamelStreamMem with a charset filter.
340         (gpg_ctx_new): Setup a filter stream to convert our gpg stderr
341         diagnostics into UTF-8 if needed.
342         (gpg_ctx_free): Unref the diagnostcis stream.
343         (gpg_ctx_parse_status): Flush the diagnostics stream if we are
344         going to use the data in an exception.
345         (gpg_ctx_op_step): Use camel_stream_write() to append to the
346         diagnostics stream rather than appending the buffer to a
347         GByteArray like we used to do.
348         (gpg_ctx_op_step): Flush the diagnostics stream here too.
349         (gpg_verify): Use a const char *diagnostics string here, forcing a
350         slight rearrangement of calls - use the const char *dignostics
351         before we gpg_ctx_free, otherwise we'll be passing free'd memory
352         off to the cipher_validity.
353         (gpg_ctx_get_diagnostics): Do the work here to flush the
354         diagnostics stream and nul-terminate the buffer. Also return const
355         now, instead of strdupping. No need for that.
356         (gpg_ctx_parse_status): Convert the user hint to UTF-8.
357
358 2003-04-09  Jeffrey Stedfast  <fejj@ximian.com>
359
360         * camel-gpg-context.c (gpg_ctx_get_utf8_diagnostics): Changed my
361         mind a bit on how I wanted this to work. Instead of aborting on an
362         illegal sequence, do like we do with camel-mime-filter-charset and
363         just skip over invalid sequences. Also, in the noop failure case,
364         close the iconv_t so we don't leak it.
365
366 2003-04-09  Jeffrey Stedfast  <fejj@ximian.com>
367
368         * providers/imap/camel-imap-utils.c (imap_body_decode): Save the
369         content size in a temp variable until after we've successfully
370         parsed all of the body_type_1part expr. Also fixed a type-o in the
371         body_type_mpart case that caused the parser to fail.
372         (imap_parse_body): On failure to parse the body, as we iterate
373         through the child nodes, set their children/parent/next nodes to
374         NULL so that content_info_free() won't double-free any of the
375         other nodes we have already free'd (or are about to free).
376
377         * camel-gpg-context.c (gpg_ctx_get_utf8_diagnostics): New function
378         to get the UTF-8 version of the diagnostics (if the locale isn't
379         already UTF-8 safe).
380         (gpg_verify): Use the utf-8 diagnostics here. Also fixed a memleak
381         in the exception case.
382
383         * camel-mime-filter-charset.c
384         (camel_mime_filter_charset_new_convert): NULL-protect the to/from
385         charsets in the g_warning call.
386
387 2003-04-08  Jeffrey Stedfast  <fejj@ximian.com>
388
389         Fixes for bug #40778. Probably others as well.
390
391         * providers/imap/camel-imap-utils.c (parse_params): Return 0 on
392         success, or -1 on fail. The other small utility functions should
393         probably do the same, but I was too lazy to fix them. Setting
394         inptr to NULL is just lame.
395         (imap_body_decode): New function to correctly parse a BODY
396         response.
397         (imap_parse_body): Rewritten to use the above function.
398
399 2003-04-08  Jeffrey Stedfast  <fejj@ximian.com>
400
401         * providers/smtp/camel-smtp-transport.c (smtp_helo): Make sure
402         host->h_name is not an empty string too? Apparently for one user
403         his resolved hostname is "". Go figure. Probably a broken system,
404         but easy enough to work around.
405
406         * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): If
407         store->engine->line is NULL, use _("Unknown error") as the error
408         string instead.
409
410 2003-04-08  Not Zed  <NotZed@Ximian.com>
411
412         * camel-folder-summary.c (camel_folder_summary_load): use
413         g_strerror, and use errno directly rather than ferrno().
414         (summary_header_load): set errno when we get a version mismatch.
415
416 2003-04-07  Jeffrey Stedfast  <fejj@ximian.com>
417
418         * camel-gpg-context.c: Disable debug printf's
419
420 2003-03-28  Jeffrey Stedfast  <fejj@ximian.com>
421
422         * camel-sasl-gssapi.c (gssapi_challenge): If we are using the
423         heimdal krb5 implementation, don't free outbuf ever. Seems to
424         segfault if we do.
425
426 2003-03-31  Jeffrey Stedfast  <fejj@ximian.com>
427
428         * camel-mime-filter-enriched.c (enriched_to_html): Use strncasecmp
429         for matching the nofill and /nofill tags. Also fixed to handle
430         enriched tags that require <param> tags.
431
432 2003-03-28  Not Zed  <NotZed@Ximian.com>
433
434         * providers/local/camel-spool-store.c (get_folder): remove unused
435         var.
436
437         * providers/imap/camel-imap-utils.c (imap_parse_list_response):
438         moved an unused var to the #if 0'd out block.
439
440         * providers/imap/camel-imap-store.c
441         (parse_list_response_as_folder_info): remove unused vars.
442
443         * camel-index-control.c (main): deifne camel_init() before using
444         it.
445
446         * camel-vee-store.c (vee_get_folder): removed unused var.
447
448         * camel-stream-mem.c (stream_write): warning -> fixme.
449
450         * camel-stream-filter.c (_CamelStreamFilterPrivate): Add a ; to
451         the end of the struct definition.
452
453         * camel-store.c (camel_store_delete_folder): remove unused var.
454         (camel_store_rename_folder): "
455         (camel_store_unsubscribe_folder): "
456
457         * camel-mime-part.c (write_to_stream): Changed warning into a
458         TODO.
459         (construct_from_parser): removed warning, the code was fixed.
460
461         * camel-mime-message.c (construct_from_parser): Remove the
462         warning, the code was fixed.
463
464         * camel-mime-filter-enriched.c (camel_mime_filter_enriched_new):
465         Remove unused var.
466
467         * camel-medium.c (camel_medium_get_header): Removed warning, and
468         changed docs to reflect it.
469
470         * camel-gpg-context.c (gpg_ctx_parse_status): handle MODE_EXPORT
471         as a noop (warning).
472
473         * camel-folder.c (get_message_user_tag): changed a warning into a
474         fixme (its not that important).
475         (camel_folder_get_message_user_tag): "
476
477         * camel-data-cache.c (data_cache_finalise): removed unused vars.
478         (data_cache_expire): "
479
480 2003-03-27  Jeffrey Stedfast  <fejj@ximian.com>
481
482         * camel-sasl-gssapi.c (gssapi_challenge): Get rid of debug
483         printf's that are no longer needed. In the case of errors, don't
484         release the outbuf gss_buffer_t since it shouldn't be set. Also
485         g_free (str) when we are done with it.
486
487         * camel-mime-utils.c (header_encode_phrase_merge_words): When we
488         remove a node from the list, make sure to g_list_free_1().
489         (header_encode_phrase_merge_words): Don't use
490         CAMEL_FOLD_PREENCODED as the upper-bound for merged-word length if
491         the merged-word will not be an rfc2047 encoded word. Instead, use
492         CAMEL_FOLD_SIZE-8 (which is the value we use in other places for
493         determining upper-bound lengths). Solves bug #38659.
494
495 2003-03-27  Dan Winship  <danw@ximian.com>
496
497         * camel-url.c (append_url_encoded): Like camel_url_encode, but
498         works directly on an existing GString.
499         (camel_url_to_string, output_param): Use it.
500         (camel_url_encode): Likewise. Remove "escape_unsafe" arg since the
501         "unsafe" chars are the ones that should *always* be escaped, and
502         the places we were passing FALSE were wrong.
503         (camel_url_decode): replace with a new version
504
505         * camel-file-utils.c (camel_file_util_safe_filename): Remove extra
506         arg to camel_url_encode.
507
508         * tests/misc/url.c (main): Add tests of basic URL parsing and
509         unparsing
510
511 2003-03-28  Not Zed  <NotZed@Ximian.com>
512
513         *
514         camel-mime-part-utils.c (simple_data_wrapper_construct_from_parser):
515         Do a more thorough check for html marked as text/plain.  Check
516         that the text starts with <html or <!doctype.  More complete fix
517         for #16817.
518
519 2003-03-26  Jeffrey Stedfast  <fejj@ximian.com>
520
521         * camel-sasl-gssapi.c (camel_sasl_gssapi_finalize): Pass in the
522         addresses of the second args to the delete/release functions.
523
524 2003-03-27  Not Zed  <NotZed@Ximian.com>
525
526         * camel-object.c (camel_object_bag_list): Ignore whether or not
527         the bag is currently reserved.  We'll miss the new potential
528         object, but only 1.  Should address #40103.
529
530 2003-03-25  Jeffrey Stedfast  <fejj@ximian.com>
531
532         * camel-service.c (camel_gethostbyaddr): Don't use setv when we
533         don't need the stdarg interface.
534         (camel_gethostbyname): Same.
535
536 2003-03-24  Jeffrey Stedfast  <fejj@ximian.com>
537
538         * camel-folder-search.c (search_user_tag): This expression can
539         never return an array. We must always return a string value.
540
541 2003-03-24  Timo Sirainen  <tss@iki.fi>
542
543         * camel-imap-command.c (imap_read_untagged) Integer overflow fix.
544         If server sent a huge literal length, only a few bytes of memory
545         was allocated to it, but server could write as much data there as
546         it wanted.
547
548 2003-03-21  Jeffrey Stedfast  <fejj@ximian.com>
549
550         Camel part of the fix for Lewing's bug #39204. Second half of the
551         patch should also fix it so that text/plain parts that are
552         detected as being text/html are rendered as html (not that I agree
553         with this mind you, but corporate customers want this "feature").
554
555         * camel-mime-part-utils.c
556         (simple_data_wrapper_construct_from_parser): If the part is
557         text/html and doesn't have a charset and we are able to find a
558         charset in the meta tags of the html content, set the charset
559         param on the content-type.
560         (camel_mime_part_construct_content_from_parser): After setting the
561         content object on the mime part, re-set the content-type of the
562         content object back to the one from the parser (as it may contain
563         changes from the original - see changes made to the ct in
564         simple_data_wrapper_construct_from_parser for details).
565
566 2003-03-21  Jeffrey Stedfast  <fejj@ximian.com>
567
568         * camel-tcp-stream-ssl.c (camel_certdb_nss_cert_get): continue
569         reading the cert file until we've read it all or get a non-EINTR
570         errno.
571
572 2003-03-21  Jeffrey Stedfast  <fejj@ximian.com>
573
574         * camel-sasl-gssapi.c: #include <com_err.h> instead of
575         #include <et/com_err.h>
576
577 2003-03-20  Jeffrey Stedfast  <fejj@ximian.com>
578
579         * camel-sasl.c: Plug in GSSAPI support.
580
581         * camel-sasl-gssapi.[c,h]: Various fixes to make it compile (fixed
582         type-o's mostly).
583
584 2003-03-20  Dan Winship  <danw@ximian.com>
585
586         Handle raw 8-bit From data "correctly". (The same way we handle
587         raw 8-bit Subject data.)
588
589         * camel-mime-utils.c (header_decode_mailbox): Take a charset arg
590         and pass it to header_decode_string.
591         (header_decode_address): Take a charset arg and pass it to
592         header_decode_mailbox.
593         (header_mailbox_decode): Likewise.
594         (header_address_decode): Take a charset arg and pass it to
595         header_decode_address.
596
597         * camel-folder-summary.c (summary_format_address): Take a charset
598         arg and pass to header_address_decode.
599         (message_info_new, camel_message_info_new_from_header): Pass
600         charset to summary_format_address
601
602         * camel-internet-address.c (internet_decode): Update for
603         header_address_decode change. (Unfortunately we don't have a
604         charset to pass here.)
605
606         * camel-mime-message.c (camel_mime_message_build_mbox_from): Move
607         this here from camel-mbox-summary since the same functionality is
608         needed by evolution-mail too (and update for header_address_decode
609         change)
610
611         * providers/local/camel-mbox-summary.c
612         (camel_mbox_summary_build_from): Moved to CamelMimeMessage
613
614 2003-03-17  Jeffrey Stedfast  <fejj@ximian.com>
615
616         * camel-mime-part.c (process_header): Removed unused variable left
617         over from my previous fix.
618
619         * providers/smtp/camel-smtp-transport.c (smtp_send_to): Don't pass
620         'has_8bit_parts' to smtp_data() anymore.
621         (smtp_data): No longer takes 'has_8bit_parts' argument. Ignore
622         whether or not the message has 8bit parts when deciding what the
623         required encoding type we need to enforce. Fixes bug #39744.
624
625 2003-03-13  Jeffrey Stedfast  <fejj@ximian.com>
626
627         * camel-mime-part.c (process_header): Use
628         header_contentid_decode() as this new function should be safer
629         than the hack that we had before.
630
631         * camel-mime-utils.c (header_contentid_decode): New function to
632         try and parse a content-id string in such a way as to work around
633         some of the known bugs in other MIME implementations. Try to be as
634         "safe" as we can - ie. don't allow for more than 1 @ (since the
635         mailer uses "@@@%d" as a fake content-id value for parts without
636         content-ids) and don't allow for invalid content-type chars.
637
638 2003-03-13  Jeffrey Stedfast  <fejj@ximian.com>
639
640         * camel-folder.c (get_uids): Don't add bogus uids to the uid
641         array. Might fix bug #38868 (it's the only way I can figure that
642         camel_folder_get_message_info() could possibly return NULL for the
643         Outbox folder).
644
645 2003-03-12  Not Zed  <NotZed@Ximian.com>
646
647         * camel-object.c (remove_bag): removed, it was double-freeing the
648         key.
649         (save_object): Just save the object in an array.
650         (camel_object_bag_destroy): first save the object bag's objects in
651         a list, then remove them one at a time from the bag since we can't
652         remove hash table entries while we're in a foreach (PITA glib
653         shit).  For #39486.
654         (camel_object_bag_*): killed some warnings.
655
656 2003-03-09  Jeffrey Stedfast  <fejj@ximian.com>
657
658         * camel-url-scanner.c (camel_url_addrspec_end): Doh! If inptr ==
659         pos + 1, then return FALSE (before it was checking for inptr ==
660         pos, but it will never be pos).
661
662 2003-03-07  Not Zed  <NotZed@Ximian.com>
663
664         * camel-vee-folder.c (vee_search_by_expression): handle a null
665         return from search_by_expression, for bug #33786.
666
667 2003-03-06  Jeffrey Stedfast  <fejj@ximian.com>
668
669         * providers/imap/camel-imap-utils.c (imap_next_word):
670         s/g_strncasecmp/strncasecmp/g
671
672         * camel-iconv.c: Updated to be an exact copy of e-iconv (except
673         names changed). We don't use this yet, but we may in the future.
674
675         * camel-url.c (camel_url_new_with_base): Here too.
676
677         * camel-sasl-kerberos4.c (krb4_challenge): Use camel_strdown()
678         here instead of g_strdown() since the latter has been deprecated.
679
680         * providers/imap/camel-imap-utils.c (imap_parse_body): Use
681         camel_strdown() since g_ascii_strdown() does not do what we
682         thought.
683
684         * providers/imap/camel-imap-store.c:
685         s/strstrcase/camel_strstrcase/g
686
687         * providers/imap/camel-imap-folder.c (do_append):
688         s/strstrcase/camel_strstrcase/
689         (handle_copyuid): Same.
690
691         * string-utils.c (camel_strdown): New function because the
692         g_ascii_strdown interface sucks.
693         (camel_strstrcase): Renamed from strstrcase.
694
695 2003-03-06  Jeffrey Stedfast  <fejj@ximian.com>
696
697         * camel-text-index.c (camel_utf8_next): Same as below.
698
699         * camel-search-private.c (camel_utf8_getc): Updated since not all
700         platforms/compiles support __inline__.
701
702 2003-03-06  Jeffrey Stedfast  <fejj@ximian.com>
703
704         * camel-mime-part.c (camel_mime_part_get_encoding): Get rid of the
705         const return - it mismatches the prototype and we don't need it
706         anyway. Fixes bug #39173.
707
708 2003-03-06  Jeffrey Stedfast  <fejj@ximian.com>
709
710         Fixes for bug #39170
711
712         * camel-store-summary.c (camel_store_info_set_string): Remove
713         return keyword.
714
715         * camel-session.c (camel_session_thread_msg_free): Remove return
716         keyword.
717         (camel_session_thread_wait): Same.
718
719         * camel-index.c (camel_index_cursor_reset): Remove return keyword.
720
721 2003-03-06  Jeffrey Stedfast  <fejj@ximian.com>
722
723         Fixes for bug #39168
724
725         * providers/local/camel-spool-summary.c: Get rid of the empty
726         private struct.
727
728         * providers/local/camel-mbox-summary.c: Get rid of the empty
729         private struct.
730
731         * camel-vee-store.c: Get rid of the empty private struct.
732
733         * camel-mime-filter-from.c: Get rid of the empty private struct.
734
735 2003-03-05  Jeffrey Stedfast  <fejj@ximian.com>
736
737         * providers/sendmail/camel-sendmail-transport.c
738         (sendmail_send_to): Add a CRLF filter to the output stream to
739         convert any CRLF sequences into plain old line-feeds to work
740         around a bug in some local transport programs.
741
742 2003-03-04  Jeffrey Stedfast  <fejj@ximian.com>
743
744         * camel-object.h: s/class/klass in one place so that the header is
745         c++-safe.
746
747 2003-03-03  Jeffrey Stedfast  <fejj@ximian.com>
748
749         * camel-tcp-stream-openssl.c (camel_tcp_stream_ssl_new): Updated
750         to use the new API from a fe commits ago for the NSS stream. This
751         is just to make it compile, but does not update the behaviour to
752         act like the NSS stream. Note that people shouldn't be using
753         OpenSSL anyway.
754         (camel_tcp_stream_ssl_new_raw): Same.
755
756         * camel-process.[c,h]: New source file containing convenience
757         functions for process creation/termination mainly for use with
758         Pipe filters but should be usable for anything we want.
759
760         * camel-io.[c,h]: New source files implementing read/write system
761         calls with proper error checking and cancellation
762         (ie. StreamFs::read/write and CamelTcpStreamRaw::read/write). No
763         sense duplicating the same code over and over. Now I can use this
764         same code easily in other i/o code (such as Pipe filters and gpg
765         code?).
766
767 2003-03-03  Not Zed  <NotZed@Ximian.com>
768
769         * camel-store.c (camel_store_unsubscribe_folder): Do similar
770         folder != NULL checking as for delete_folder before passing a NULL
771         to object_bag_remove.
772
773 2003-02-28  Jeffrey Stedfast  <fejj@ximian.com>
774
775         * camel-http-stream.c (http_connect): Here too.
776
777         * providers/smtp/camel-smtp-transport.c (connect_to_server): Same
778         as IMAP and POP.
779
780         * providers/imap/camel-imap-store.c (connect_to_server): Same as
781         the POP3 code.
782
783         * providers/pop3/camel-pop3-store.c (connect_to_server): Pass in
784         appropriate flags for camel_tcp_stream_ssl_new*() functions.
785
786         * camel-tcp-stream-ssl.c (enable_ssl): Not all ssl/tls streams
787         will want to allow each of SSLv2, SSLv3 and TLSv1 so use flags to
788         decide which to enable/disable.
789         (camel_tcp_stream_ssl_new): Now takes a flags argument to mask out
790         which SSL/TLS versions the stream should be compatable with.
791         (camel_tcp_stream_ssl_new_raw): Same.
792
793 2003-02-27  Jeffrey Stedfast  <fejj@ximian.com>
794
795         * camel-stream-filter.c: Add a 'flushed' state variable to the
796         private struct.
797         (do_read): Set p->flushed to TRUE after we call
798         camel_mime_filter_complete() on all the filters.
799         (do_reset): Set p->flushed to FALSE.
800         (do_eos): Make sure the filters have been flushed before returning
801         that the stream is at EOS.
802
803         * camel-mime-filter-canon.c (complete): Don't add a eol -
804         otherwise we will fail to verify some mutt signatures that do not
805         have a blank line before the boundary line (and note that the last
806         \n before the boundary really belongs to the boundary anyway) so
807         #if 0 this code out for now.
808
809 2003-02-27  Not Zed  <NotZed@Ximian.com>
810
811         * camel-multipart-signed.c: Undo jeff's changes.
812
813         * providers/local/camel-spool-store.c (scan_dir): Fix a paste-o in
814         the object_bag_get key.
815
816 2003-02-26  Jeffrey Stedfast  <fejj@ximian.com>
817
818         * camel-multipart-signed.c: Updated to use g_alloca instead of
819         alloca so that we can skip all the #ifdef checks and skip checking
820         for alloca in configure.in and all that foo.
821
822         * camel-store.c (camel_store_delete_folder): Make sure the folder
823         is non-NULL before trying to remove it from the store's
824         object-bag.
825
826 2003-02-25  Jeffrey Stedfast  <fejj@ximian.com>
827
828         * camel-mime-part-utils.c
829         (simple_data_wrapper_construct_from_parser): canonicalise the
830         charset name (if it is an iso charset) so that our strncasecmp to
831         see if it is an iso-8859-# charset will be guarenteed to work on
832         all systems.
833         (canon_charset_name): New function to return the canonical iso
834         charset name.
835         (simple_data_wrapper_construct_from_parser): If the charset is
836         NULL *or* the charset == "us-ascii" then check that it is 7bit
837         clean to decide if it is rawtext (we did not check the case where
838         charset was "us-ascii" before).
839
840 2003-02-25  Jeffrey Stedfast  <fejj@ximian.com>
841
842         * camel-mime-message.c: Same as the ones below.
843
844         * camel-mime-part.c: Reverted back to pre-camel-iconv
845
846         * camel-filter-search.c: Same as below.
847
848         * camel-folder-summary.c: Reverted back to pre-camel-iconv
849
850         * camel.c (camel_init): Reverted to pre-camel-iconv
851
852         * camel-charset-map.c (camel_charset_locale_name): Removed (part
853         of the revert).
854         (camel_charset_canonical_name): Same.
855
856         * camel-mime-filter-charset.c: Revert back to using e_iconv from GAL.
857
858         * camel-mime-part-utils.c: Revert back to using e_iconv from GAL.
859
860         * camel-mime-utils.c: Revert back to using e_iconv from GAL.
861
862         * camel-sasl-digest-md5.c: Revert back to using e-iconv from GAL.
863
864 2003-02-24  Jeffrey Stedfast  <fejj@ximian.com>
865
866         * camel-charset-map.c (camel_charset_canonical_name): g_alloca
867         (strlen (charset) + 1) so we don't overflow the buffer.
868
869         * providers/pop3/camel-pop3-stream.c (stream_write): Don't write
870         the passwd, fixes "bug" #38601.
871
872         * camel-iconv.c: Make bucket->refcount 31 bits and bucket->used 1
873         bit instead of having each use their own 32bit int.
874         (iconv_cache_bucket_expire): Use g_iconv_close() here, missed this
875         before.
876         (camel_iconv): Might as well call g_iconv here even though it just
877         calls iconv directly.
878
879 2003-02-21  Jeffrey Stedfast  <fejj@ximian.com>
880
881         * camel-iconv.c (camel_iconv_charset_name): New function...back
882         from the depths of hell from whence it came originally. Turns out
883         that g_iconv_open() is lame and can't handle all the stuff we used
884         to handle in e_iconv_charset_name().
885         (camel_iconv_open): Use camel_iconv_charset_name() on the to/from
886         charsets rather than camel_charset_canonical_name(). Now maybe
887         g_iconv_open will work for charsets such as "ks_c_5601-1987".
888
889         * providers/pop3/camel-pop3-store.c (pop3_connect): Reget the
890         capabilities after a successful authentication.
891
892         * providers/pop3/camel-pop3-engine.c (get_capabilities): If we are
893         in the TRANSACTION state and CAPA did not list UIDL as a supported
894         command, try checking for it the hard way.
895
896 2003-02-23  Jeffrey Stedfast  <fejj@ximian.com>
897
898         * providers/smtp/camel-smtp-transport.c (smtp_data): Do it the
899         same way we just made the sendmail code do it.
900
901         * providers/sendmail/camel-sendmail-transport.c
902         (sendmail_send_to): My last change but in a better way.
903
904 2003-02-22  Jeffrey Stedfast  <fejj@ximian.com>
905
906         * providers/smtp/camel-smtp-transport.c (smtp_data): Remove all
907         Bcc headers before sending to the smtp server.
908
909         * providers/sendmail/camel-sendmail-transport.c
910         (sendmail_send_to): Remove all Bcc headers before sending to
911         sendmail.
912
913 2003-02-20  Jeffrey Stedfast  <fejj@ximian.com>
914
915         * camel.c (camel_init): Call camel_iconv_init().
916         (camel_shutdown): Call camel_iconv_shutdown().
917
918         * camel-sasl-digest-md5.c (digest_response): Updated to use
919         camel-iconv and the new camel-charset-map functions.
920
921         * camel-mime-utils.c: Updated to use camel-iconv and the new
922         camel-charset-map functions.
923
924         * camel-mime-part-utils.c (check_html_charset): Use
925         camel_charset_canonical_name() instead of e_iconv_charset_name()
926         which is longer available.
927         (convert_buffer): Use camel-iconv.
928         (simple_data_wrapper_construct_from_parser): Since
929         camel_charset_iso_to_windows() returns the charset in it's
930         canonical format, no need to re-canonicalise it.
931
932         * camel-mime-part.c (process_header): Use
933         camel_charset_canonical_name() instead of e_iconv_charset_name()
934         which is longer available.
935
936         * camel-mime-message.c (process_header): Use
937         camel_charset_canonical_name() instead of e_iconv_charset_name()
938         which is longer available.
939
940         * camel-mime-filter-charset.c: Use camel-iconv.
941
942         * camel-folder-summary.c (message_info_new): Use
943         camel_charset_canonical_name() instead of e_iconv_charset_name()
944         which is longer available.
945         (content_info_new): Use camel_charset_locale_name().
946         (camel_message_info_new_from_header): Same as message_info_new().
947
948         * camel-search-private.c: Use g_alloca() instead of alloca().
949
950         * camel-filter-search.c (check_header): Use
951         camel_charset_canonical_name() instead of e_iconv_charset_name()
952         which is longer available.
953
954         * camel-charset-map.c (camel_charset_locale_name): New function,
955         replaces e_iconv_locale_charset().
956         (camel_charset_canonical_name): New function, similar to
957         e_iconv_charset_name() but instead of returning the iconv-friendly
958         name, it returns the canonical name. (g_iconv will do the
959         iconv-friendly name conversions for us).
960
961 2003-02-20  Jeffrey Stedfast  <fejj@ximian.com>
962
963         * camel-filter-search.c (run_command): Redirect program's stdout
964         and stderr to /dev/null
965
966         * camel-filter-driver.c (pipe_to_system): Redirect the program's
967         stderr to /dev/null
968         (pipe_to_system): Write the pipe to a mem stream and use the mem
969         stream in the parser. Also, when setting an exception get the
970         errno from the parser so we can give more info about the error to
971         the user.
972
973 2003-02-19  Jeffrey Stedfast  <fejj@ximian.com>
974
975         * camel-tcp-stream-ssl.c (stream_connect): Fixed a type-o in the
976         ENABLE_IPv6 ifdef section.
977
978 2003-02-19  Jeffrey Stedfast  <fejj@ximian.com>
979
980         * camel-filter-driver.c (pipe_message): New filter action that
981         pipes the message source to the user-program and reads back the
982         modified message and replaces driver->priv->message with the new
983         message object.
984         (do_copy): Check p->modified to make sure the message hasn't been
985         modified by the pipe-message action - if it has been modified,
986         default to the slower camel_folder_append_message() way of
987         copying.
988         (do_move): Same.
989         (pipe_to_system): Set p->modified to TRUE if the user-program gave
990         us back a message stream and we were able to parse it.
991         (camel_filter_driver_filter_message): If the message has been
992         modified, always use camel_folder_append_message() when appending
993         it to the default folder.
994
995 2003-02-14  Jeffrey Stedfast  <fejj@ximian.com>
996
997         * camel-folder-search.c: Added a (get-size ) function to fix bug
998         #38073.
999         (search_get_size): Implemented.
1000
1001 2003-02-14  Jeffrey Stedfast  <fejj@ximian.com>
1002
1003         * camel-url-scanner.c (url_scanner_table_init): Mark chars with
1004         the high-bit set as CTRL chars.
1005         (camel_url_web_end): If the char before the start of the url is an
1006         open-brace, watch out for the matching close-brace.
1007         (camel_url_file_end): Same.
1008
1009 2003-02-14  Jeffrey Stedfast  <fejj@ximian.com>
1010
1011         * camel-smime-context.c (smime_get_password): Same as the gpg and
1012         pkcs7 contexts.
1013
1014         * camel-sasl-popb4smtp.c (popb4smtp_challenge): Updated for
1015         camel_session_get_password().
1016
1017         * camel-pkcs7-context.c (get_password): Same as the gpg code.
1018
1019         * camel-gpg-context.c (gpg_ctx_parse_status): Updated for
1020         camel_session_get_password().
1021
1022         * providers/smtp/camel-smtp-transport.c (smtp_connect): No need to
1023         set USER_CANCEL exception here as it is done by
1024         camel_session_get_password(). Also updated for the new
1025         get_password() API change.
1026
1027         * providers/imap/camel-imap-store.c (imap_auth_loop): Updated for
1028         camel_session_get_password() changes. We don't need to play the
1029         "bad passwd" game here too, do we? Bah, probably should but I
1030         don't feel like it for now. Maybe when we rewrite the IMAP
1031         provider.
1032
1033         * camel-session.c (camel_session_get_password): Now takes a
1034         'reprompt' argument that will force user-input to be given even if
1035         we have the passwd cached.
1036
1037         * providers/pop3/camel-pop3-store.c (pop3_connect): Instead of
1038         uncaching the passwd after we receive a -ERR from the POP server,
1039         set 'reprompt' to TRUE to force user-input for the next password
1040         prompt (ie, make sure the front-end knows not to just return the
1041         cached value). The front-end can then decide to fill-in the
1042         user-input field with the last passwd that the user supplied.
1043         (pop3_try_authenticate): Now takes a reprompt argument which we
1044         pass into camel_session_get_password().
1045
1046 2003-02-05  Dan Winship  <danw@ximian.com>
1047
1048         * Makefile.am (libcamelincludedir): Define in terms of
1049         privincludedir.
1050         (camellibexecdir): Define in terms of privlibexecdir
1051         (libcamel_la_LDFLAGS): Remove -rpath. (automake will add that)
1052
1053         * providers/imap/Makefile.am (libcamelimapincludedir): Define in
1054         terms of privincludedir.
1055         (INCLUDES): Remove -I$(includedir)
1056         * providers/local/Makefile.am: Likewise
1057         * providers/nntp/Makefile.am: Likewise
1058         * providers/pop3/Makefile.am: Likewise
1059         * providers/sendmail/Makefile.am: Likewise
1060         * providers/smtp/Makefile.am: Likewise
1061
1062 2003-02-04  Not Zed  <NotZed@Ximian.com>
1063
1064         * camel-object.c (camel_object_bag_new): Init bag->owner to 0.
1065
1066 2003-01-31  Not Zed  <NotZed@Ximian.com>
1067
1068         * camel-object.c (camel_object_bag_*): Changed to use a posix
1069         semaphore instead of a condition variable + flag to reserve the
1070         object bag because e_mutex_cond is broken.
1071
1072 2003-02-04  Jeffrey Stedfast  <fejj@ximian.com>
1073
1074         * providers/imap/camel-imap-utils.c (imap_parse_body): Use
1075         g_ascii_strdown() instead of g_strdown, since g_strdown is
1076         deprecated.
1077         (imap_parse_body): Same.
1078
1079         * providers/imap/camel-imap-folder.c (decode_internaldate): Use
1080         strncasecmp() here too.
1081         (parse_fetch_response): And here.
1082         (camel_imap_folder_selected): Here too.
1083
1084         * providers/imap/camel-imap-utils.c (imap_namespace_decode): Use
1085         strncasecmp() instead of g_strncasecmp() because the latter is
1086         deprecated.
1087
1088         * providers/imap/camel-imap-store.c (imap_get_capability): Again here.
1089         (hash_folder_name): Here too.
1090         (compare_folder_name): And here.
1091         (get_folder_online): Again.
1092         (get_folder_offline): And again.
1093
1094         * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
1095         Same as below again.
1096
1097         * providers/imap/camel-imap-command.c (camel_imap_response_free):
1098         Same as below.
1099
1100         * providers/smtp/camel-smtp-transport.c (smtp_data): Use
1101         strcasecmp() because g_strcasecmp() is deprecated.
1102
1103         * camel-url.c (camel_url_new_with_base): Use g_ascii_strdown()
1104         instead of g_strdown, since g_strdown is deprecated.
1105
1106 2003-01-28  Jeffrey Stedfast  <fejj@ximian.com>
1107
1108         * camel-sasl-gssapi.c (gssapi_challenge): Pass in some default
1109         flags to gss_init_sec_context() (these default flags are defined
1110         as a MUST in rfc1964).
1111
1112 2003-01-22  Hans Petter Jansson  <hpj@ximan.com>
1113
1114         * Makefile.am: $(libexec) -> $(libexecdir)
1115
1116 2003-01-22  Ettore Perazzoli  <ettore@ximian.com>
1117
1118         * providers/imap/Makefile.am (libcamelimapincludedir): Update to
1119         the new $(BASE_VERSION)-versioned path.
1120         * providers/smtp/Makefile.am (libcamelsmtpincludedir): Likewise.
1121         * providers/sendmail/Makefile.am (libcamelsendmailincludedir):
1122         Likewise.
1123         * providers/pop3/Makefile.am (libcamelpop3includedir): Likewise.
1124         * providers/nntp/Makefile.am (libcamelnntpincludedir): Likewise.
1125         * providers/local/Makefile.am (libcamellocalincludedir): Likewise.
1126
1127         * camel-lock-client.c (camel_lock_helper_init): Use
1128         CAMEL_LIBEXECDIR instead of CAMEL_SBINDIR to find
1129         camel-lock-helper.
1130
1131         * Makefile.am: Install camel-lock-helper and camel-index-control
1132         in $(libexec)/evolution/$(BASE_VERSION)/camel.  Install
1133         libcamel.la in $privlibdir.
1134         (install-exec-hook): Update for the new location of
1135         camel-lock-helper.
1136         (libcamelincludedir): Version using $(BASE_VERSION).
1137         (INCLUDES): Define CAMEL_LIBEXECDIR.
1138
1139 2003-01-21  Jeffrey Stedfast  <fejj@ximian.com>
1140
1141         * camel-mime-filter-canon.c (complete): Set the backbuflen to 0 so
1142         that calling us again won't re-flush the same data.
1143
1144 2003-01-17  Larry Ewing  <lewing@ximian.com>
1145
1146         * camel-mime-filter-enriched.c (enriched_to_html): only grow the
1147         buffer when we are out of space.
1148
1149 2003-01-14  Not Zed  <NotZed@Ximian.com>
1150
1151         * camel-mime-parser.c (folder_scan_step): If we have no
1152         content-type header, set it to text/plain explcitly, rather than
1153         NULL, because some code doesn't handle NULL.
1154
1155 2003-01-14  Jeffrey Stedfast  <fejj@ximian.com>
1156
1157         * camel-sasl-gssapi.[c,h]: New source files implementing the
1158         GSSAPI SASL mechanism.
1159
1160 2003-01-13  Not Zed  <NotZed@Ximian.com>
1161
1162         * camel-mime-filter-tohtml.c: fix header include order.
1163         
1164         * camel-object.c (camel_object_bag_reserve): Add an assert to
1165         check we're not trying to reserve the bag more than once in a
1166         given thread.
1167         (camel_object_bag_list): If we have reserved the bag, dont try and
1168         cond wait.  Fixes a deadlock.
1169
1170         * camel-mime-filter-tohtml.c (writeln): Read the characters as
1171         utf8, rather than as 8 bit bytes.  Remove the PRESERVE_8BIT as it
1172         has no meaning.  Also change the default logic slightly so that 8
1173         bit or greater characters are properly converted to entities.
1174
1175         * camel-utf8.c (camel_utf8_getc_limit): new function, gets a utf8
1176         char, bounded by an end pointer.
1177
1178 2003-01-07  Dan Winship  <danw@ximian.com>
1179
1180         * camel-provider.h (CamelProvider): add a "translation_domain"
1181         field. (NULL for all providers in the camel source tree itself).
1182
1183         * camel-session.c (register_provider): Translate provider strings
1184         in the correct domain
1185
1186 2003-01-06  Not Zed  <NotZed@Ximian.com>
1187
1188         * camel-store.c (store_sync): init local exception before doing
1189         anything.  fixes a crash.
1190
1191 2003-01-04  Jeffrey Stedfast  <fejj@ximian.com>
1192
1193         * providers/smtp/camel-smtp-transport.c (smtp_send_to): Instead of
1194         checking recipients != NULL, check that camel_address_length
1195         (recipients) != 0 since it is illegal for recipients to be NULL
1196         (camel_transport_send_to already checks this).
1197
1198 2002-12-17  Jeffrey Stedfast  <fejj@ximian.com>
1199
1200         * providers/imap/camel-imap-utils.c: Replace calls to
1201         g_string_sprintfa() with g_string_append_printf() since the former
1202         seems to have been deprecated.
1203
1204         * providers/imap/camel-imap-search.c: Same.
1205
1206         * providers/imap/camel-imap-folder.c: Here too.
1207
1208         * providers/local/camel-mbox-summary.c: And here.
1209
1210         * providers/local/camel-local-summary.c: Replace
1211         g_string_sprintf() with g_string_printf().
1212
1213         * camel-data-cache.c (data_cache_expire): Replace
1214         g_string_sprintf() with g_string_printf().
1215
1216         * camel-url.c: Replace calls to g_string_sprintfa() with
1217         g_string_append_printf() since the former seems to have been
1218         deprecated.
1219
1220         * camel-service.c: Same.
1221
1222         * camel-mime-utils.c: Here too.
1223
1224 2002-12-16  Jeffrey Stedfast  <fejj@ximian.com>
1225
1226         * camel-mime-part-utils.c
1227         (simple_data_wrapper_construct_from_parser): Detect text/html
1228         parts that were marked as text/plain and re-tag them as text/html
1229         parts. Note: currently just checks if the first non-lwsp char is a
1230         '<' - but we might need to be smarter about this? *sigh* Stupid
1231         Windows mailers.
1232
1233         * camel-mime-filter-tohtml.c (camel_text_to_html): New convenience
1234         function to replace calls to e_text_to_html() in the
1235         mailer/composer etc.
1236
1237         * camel.h: #include some headers we had forgotten to add
1238         previously, also added camel-mime-filter-enriched.h.
1239
1240         * camel-mime-filter-enriched.[c,h]: New stream filter to convert
1241         text/enriched and text/richtext into HTML.
1242
1243 2002-12-15  Jeffrey Stedfast  <fejj@ximian.com>
1244
1245         * camel-multipart-signed.c (camel_multipart_signed_verify): Don't
1246         apply the CANON_STRIP filter here, since we are verifying whatever
1247         raw data we received (all we want to do is convert o the canonical
1248         CRLF format).
1249
1250 2002-12-10  Jeffrey Stedfast  <fejj@ximian.com>
1251
1252         * camel-mime-filter-tohtml.c (html_convert): Use camel-url-scanner
1253         instead of regex.
1254
1255 2002-12-09  Jeffrey Stedfast  <fejj@ximian.com>
1256
1257         * camel-url-scanner.c (camel_url_addrspec_end): Fixed to not be
1258         fooled in the case where the address is followed immediately by a
1259         period.
1260         (camel_url_web_end): Made more robust.
1261         (camel_url_scanner_scan): Oops. We need to set the match->pattern
1262         string pointer to the correct pattern before executing the
1263         start/end methods (as some of them rely on this info).
1264
1265 2002-12-09  Jeffrey Stedfast  <fejj@ximian.com>
1266
1267         * camel-url-scanner.c: New code to scan for patterns (used only
1268         for url pattern matching atm, but we may find other uses for this
1269         and thus rename it? I dunno). Uses ETrie.
1270
1271 2002-12-07  Not Zed  <NotZed@Ximian.com>
1272
1273         * camel-data-cache.c (data_cache_init): Use a bag instead of a
1274         hashtable to track the cache streams.
1275         (data_cache_finalise): Same.
1276         (free_busy): No longer needed.
1277         (data_cache_expire): use bag instead of hashtable.
1278         (stream_finalised): No longer required.
1279         (camel_data_cache_add): objectbagise
1280         (camel_data_cache_get): "
1281         (camel_data_cache_remove): "
1282         (data_cache_path): Set the now expired date before running expiry,
1283         so it plays better with multiple threads.  Still a couple of
1284         harmless races.
1285
1286 2002-12-06  Not Zed  <NotZed@Ximian.com>
1287
1288         * providers/local/camel-spool-store.c (scan_dir): folders ->
1289         object bag.
1290         (get_folder_info_mbox): folders -> object bag.
1291
1292         * providers/local/camel-mh-store.c (folder_info_new): folders ->
1293         object bag.
1294
1295         * providers/local/camel-maildir-store.c (scan_dir): folders ->
1296         object bag.
1297
1298         * providers/local/camel-local-store.c (rename_folder): folders ->
1299         object bag.
1300
1301         * camel-private.h (CamelStorePrivate): Remove 'cache' lock,
1302         handled by the objectbag.
1303
1304         * providers/imap/camel-imap-store.c (copy_folder): Removed.
1305         (imap_store_refresh_folders): folders -> object bag.
1306         (get_folder_counts): folders -> object bag.
1307
1308         * camel-vee-store.c (vee_get_folder): changes for folders
1309         objectbag.
1310         (vee_get_folder_info): Change to use folders objectbag.  Also,
1311         dont refresh the base folder if we're in FAST mode.
1312         (build_info): Removed, no longer needed.
1313         (vee_rename_folder): Fixed for folders objectbag.
1314
1315         * camel-store.c (camel_store_init): init the folders objectbag.
1316         (camel_store_finalize): Destroy the folders object bag.
1317         (folder_matches): 
1318         (folder_finalize): Removed, now handled implicitly by the
1319         objectbag.
1320         (camel_store_get_folder): object bag changes.
1321         (camel_store_delete_folder): "
1322         (get_subfolders): Removed, now handled without a callback.
1323         (camel_store_rename_folder): Changed to use object bag of folders.      
1324         (trash_add_folder): Removed.
1325         (init_trash): use folders object bag.
1326         (copy_folder_cache): 
1327         (sync_folder): Removed, no longer needed.  Weird arsed code anyway.
1328         (store_sync): Use folder object bag instead of hashtable.
1329         (camel_store_unsubscribe_folder): "
1330         (camel_store_init): remove cache_lock init, no longer used.
1331         (camel_store_finalize): Same for cleanup.
1332
1333 2002-12-05  Not Zed  <NotZed@Ximian.com>
1334
1335         * camel-store.h (struct _CamelStore): change folders from a
1336         hashtable into a CamelObjectBag.
1337
1338         * camel-object.c (camel_object_ref): Use type_lock instead of
1339         class lock for ref counting.
1340         (camel_object_unref): Use type_lock instead of class lock for
1341         unref.
1342         (camel_object_unref): If the object is 'bagged', then also look
1343         hooks, and remove it from any bags.
1344         (camel_object_bag_new):
1345         (camel_object_bag_destroy):
1346         (camel_object_bag_add):
1347         (camel_object_bag_get):
1348         (camel_object_bag_remove_unlocked):
1349         (camel_object_bag_list): 
1350         (camel_object_bag_abort): 
1351         (camel_object_bag_remove): New functions to implement a utility
1352         object which can manage a 'bag' of weakly ref'd children in an
1353         atomic & threadsafe way.
1354
1355 2002-12-04  Jeffrey Stedfast  <fejj@ximian.com>
1356
1357         * providers/imap/camel-imap-store-summary.c
1358         (camel_imap_store_summary_add_from_full): Properly handle the case
1359         where the namespace is "". Fixes bug #34975
1360
1361 2002-12-03  Jeffrey Stedfast  <fejj@ximian.com>
1362
1363         * broken-date-parser.c (get_tzone): Fixed to not get false
1364         positives when the token is shorter than the actual timezone
1365         string (but matches the first little bit of it).
1366         (datetok): Modified to properly handle when the first char of a
1367         token is a special char (such as a '-') that is also used as a
1368         token delimiter.
1369
1370 2002-11-21  Jeffrey Stedfast  <fejj@ximian.com>
1371
1372         * camel-tcp-stream-ssl.c (stream_read): Use the new
1373         camel_operation_cancel_prfd() function to get the cancellation fd
1374         so we can poll on it for cancellation stuff.
1375         (stream_write): Same.
1376
1377 2002-11-22  Not Zed  <NotZed@Ximian.com>
1378
1379         * camel-operation.c (camel_operation_cancel_prfd): Implement, gets
1380         a nspr pr filedesc to poll/wait on
1381         (struct _CamelOperation): include a pr filedesc.
1382
1383 2002-11-21  Not Zed  <NotZed@Ximian.com>
1384
1385         * providers/imap/camel-imap-store-summary.c
1386         (camel_imap_store_summary_namespace_find_path): If we have a
1387         namespace of "", then always match any path.
1388         (camel_imap_store_summary_namespace_find_full): Same, for full
1389         names. Should address #33309 & friends.
1390
1391 2002-11-19  Radek Doulik  <rodo@ximian.com>
1392
1393         * camel-mime-filter-tohtml.c (html_convert): added
1394         CAMEL_MIME_FILTER_TOHTML_PRESERVE_8BIT flag
1395
1396 2002-11-18  Rodney Dawes  <dobey@ximian.com>
1397
1398         * tests/*/Makefile.am: Removed $(GNOME_LIBDIR) and $(GNOMEUI_LIBS)
1399         
1400 2002-11-15  Jeffrey Stedfast  <fejj@ximian.com>
1401
1402         * providers/imap/camel-imap-store.c (imap_connect_online): If the
1403         namespace is at/below INBOX, check for the INBOX explicitly (since
1404         it obviously won't show up in a LSUB INBOX.*). If either INBOX is
1405         not returned in the response or if the folder flags contain
1406         \NoSelect, subscribe to INBOX and then try LSUB again.
1407
1408 2002-11-11  Jeffrey Stedfast  <fejj@ximian.com>
1409
1410         * camel-mime-filter-tohtml.c (html_convert): Rewritten. Much much
1411         much cleaner implementation now, though uses malloc/free more
1412         often than I'd like.
1413
1414 2002-11-11  Jeffrey Stedfast  <fejj@ximian.com>
1415
1416         * providers/imap/camel-imap-folder.c (get_message_simple): Use
1417         g_strerror when setting an exception string (we need it to be in
1418         UTF-8).
1419
1420         * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): Use
1421         g_strerror when setting an exception string (we need it to be in
1422         UTF-8).
1423
1424         * providers/pop3/camel-pop3-folder.c (pop3_refresh_info): Use
1425         g_strerror when setting an exception string (we need it to be in
1426         UTF-8).
1427         (pop3_get_message): Same.
1428
1429         * providers/local/camel-spool-summary.c (spool_summary_sync_full):
1430         Use g_strerror when setting an exception string (we need it to be
1431         in UTF-8).
1432         (spool_summary_check): Here too.
1433
1434         * providers/local/camel-spool-store.c (construct): Use g_strerror
1435         when setting an exception string (we need it to be in UTF-8).
1436         (get_folder): Same.
1437         (scan_dir): Here too.
1438
1439         * providers/local/camel-spool-folder.c (spool_lock): Use
1440         g_strerror when setting an exception string (we need it to be in
1441         UTF-8).
1442
1443         * providers/local/camel-mh-summary.c (mh_summary_check): Use
1444         g_strerror when setting an exception string (we need it to be in
1445         UTF-8).
1446
1447         * providers/local/camel-mh-store.c (delete_folder): Use g_strerror
1448         when setting an exception string (we need it to be in UTF-8).
1449
1450         * providers/local/camel-mbox-summary.c (summary_update): Use
1451         g_strerror when setting an exception string (we need it to be in
1452         UTF-8).
1453         (mbox_summary_sync_full): Here too.
1454         (mbox_summary_sync_quick): Same.
1455         (mbox_summary_sync): Also here.
1456         (camel_mbox_summary_sync_mbox): Again here.
1457
1458         * providers/local/camel-mbox-folder.c (mbox_lock): Use g_strerror
1459         when setting an exception string (we need it to be in UTF-8).
1460         (mbox_append_message): Same.
1461         (mbox_get_message): Here too.
1462
1463         * providers/local/camel-maildir-summary.c (maildir_summary_load):
1464         Use g_strerror when setting an exception string (we need it to be
1465         in UTF-8).
1466         (maildir_summary_check): Same.
1467
1468         * providers/local/camel-maildir-store.c (get_folder): Use
1469         g_strerror when setting an exception string (we need it to be in
1470         UTF-8).
1471         (delete_folder): Same.
1472         (delete_folder): Here too.
1473
1474         * providers/local/camel-local-summary.c (local_summary_sync): Use
1475         g_strerror when setting an exception string (we need it to be in
1476         UTF-8).
1477
1478         * providers/local/camel-local-store.c (get_folder): Use g_strerror
1479         when setting an exception string (we need it to be in UTF-8).
1480         (create_folder): Same.
1481         (xrename): Here too.
1482         (rename_folder): And here.
1483         (delete_folder): Also here.
1484
1485         * camel-provider.c (camel_provider_init): For debugging printfs,
1486         we want to use normal strerror (we want locale charset, not
1487         UTF-8).
1488
1489         * camel-movemail.c (camel_movemail): Use g_strerror when setting
1490         an exception string (we need it to be in UTF-8).
1491         (movemail_external): Same.
1492         (camel_movemail_copy_file): Here too.
1493         (camel_movemail_solaris): Also here.
1494
1495         * camel-mime-utils.c (rfc2047_decode_word): For debugging printfs,
1496         we want to use normal strerror (we want locale charset, not
1497         UTF-8).
1498         (header_encode_param): Same.
1499
1500         * camel-mime-part-utils.c (convert_buffer): For debugging printfs,
1501         we want to use normal strerror (we want locale charset, not
1502         UTF-8).
1503
1504         * camel-lock-client.c (camel_lock_helper_init): Use g_strerror
1505         when setting an exception string (we need it to be in UTF-8).
1506
1507         * camel-data-cache.c (camel_data_cache_remove): Use g_strerror
1508         when setting an exception string (we need it to be in UTF-8).
1509
1510         * camel-tcp-stream-raw.c (flaky_tcp_write): For debugging printfs,
1511         we want to use normal strerror (we want locale charset, not
1512         UTF-8).
1513         (flaky_tcp_read): Same.
1514
1515         * camel-gpg-context.c (gpg_ctx_op_step): For debugging printfs, we
1516         want to use normal strerror (we want locale charset, not UTF-8).
1517
1518         * camel-service.c (camel_gethostbyname): Use g_strerror when
1519         setting an exception string (we need it to be in UTF-8).
1520
1521         * camel-lock.c (camel_lock_dot): Use g_strerror when setting an
1522         exception string (we need it to be in UTF-8).
1523         (camel_lock_fcntl): Same.
1524
1525 2002-11-07  Not Zed  <NotZed@Ximian.com>
1526
1527         * camel-mime-part.c (camel_mime_part_set_content_type): constify
1528         the content_type.
1529
1530 2002-11-07  Jeffrey Stedfast  <fejj@ximian.com>
1531
1532         * camel-i18n.h: Added.
1533
1534         * camel-object.h: #include camel-i18n.h instead of gnome-i18n.h
1535
1536         * camel-lock.c: Same.
1537
1538 2002-11-07  Rodrigo Moya <rodrigo@ximian.com>
1539
1540         * camel-object.h: removed gnome-defs.h, it does not exist.
1541
1542 2002-11-05  Not Zed  <NotZed@Ximian.com>
1543
1544         * Makefile.am (camel_lock_helper_LDADD): Created temporary link
1545         list, we need to link with something for gettext.
1546
1547         * camel.h: Remove gstring-util.h and hash-table-utils.h.
1548
1549         * camel-text-index.c: 
1550         (text_index_normalise): Changed for g_utf8_strdown api change.
1551
1552         * camel-search-private.c:
1553         * camel-mime-utils.c:
1554         * camel-mime-part-utils.c:
1555         * camel-html-parser.c:
1556         * camel-charset-map.c: Include glib/gunicode.h from glib instead
1557         of gal.
1558
1559         * camel-filter-driver.c: Remove include of gtk/gtk.h, should never
1560         have been there.
1561
1562 2002-11-01  Jeffrey Stedfast  <fejj@ximian.com>
1563
1564         * camel-mime-utils.c (g_string_append_len): Removed. Glib2 has
1565         this function.
1566
1567         * providers/local/camel-local-store.c (delete_folder): Use
1568         g_path_get_basename instead of g_strdup (g_basename (filename)).
1569
1570         * camel-uid-cache.c (camel_uid_cache_new): Use g_path_get_dirname
1571         since g_dirname has been deprecated.
1572
1573 2002-10-31  Jeffrey Stedfast  <fejj@ximian.com>
1574
1575         * camel-gpg-context.c (camel_gpg_context_class_init): Set the
1576         virtual method pointers to the import/export methods.
1577         (camel_gpg_context_init): Set the key_protocol string.
1578         (gpg_hash_to_id): Handle 2 more hash types.
1579         (gpg_id_to_hash): Same.
1580         (gpg_ctx_op_step): Slight fixes to support import/export.
1581         (gpg_ctx_parse_status): Fix to hack around the fact that importing
1582         keys doesn't write to stdout.
1583         (gpg_import_keys): Implemented.
1584         (gpg_export_keys): Implemented.
1585
1586         * camel-cipher-context.c (camel_cipher_context_class_init): Hook
1587         up default virtual methods for import/export.
1588         (camel_cipher_import_keys): Implemented.
1589         (camel_cipher_export_keys): Implemented.
1590
1591 2002-10-31  Jeffrey Stedfast  <fejj@ximian.com>
1592
1593         * Makefile.am: Removed hash-table-utils.[c,h] from the build.
1594
1595         * hash-table-utils.[c,h]: Removed.
1596
1597         * string-util.c: Imported g_strcase[hash,equal] into here so we
1598         can remove hash-table-utils.[c,h].
1599
1600         * camel-medium.c: Removed #include "hash-table-utils.h"
1601
1602         * camel-mime-message.c: Same here.
1603
1604         * camel-mime-part.c: And here.
1605
1606         * camel-session.c: Here too.
1607
1608         * providers/imap/camel-imap-store-summary.c: #include
1609         string-utils.h instead of hash-table-utils.h
1610
1611         * camel-charset-map.c: Same.
1612
1613         * camel-folder-summary.c: Here too.
1614
1615         * camel-provider.c: Again here.
1616
1617         * camel-store-summary.c: And again...
1618
1619 2002-10-31  Jeffrey Stedfast  <fejj@ximian.com>
1620
1621         Remove a ton of useless snot.
1622
1623         * Makefile.am: Remove gstring-util.[c,h] from the build.
1624
1625         * gstring-util.[c,h]: Removed.
1626
1627         * string-utils.c (string_equal_for_glist): Removed.
1628         (string_split): Removed.
1629         (string_trim): Removed.
1630         (string_prefix): Removed.
1631         (string_unquote): Removed.
1632         (strip): Removed.
1633
1634         * hash-table-utils.c (g_hash_table_generic_free): Removed.
1635
1636         g_str[n]casecmp functions are deprecated in glib2.
1637
1638         * string-utils.c (strstrcase): Use strncasecmp instead of
1639         g_strncasecmp.
1640
1641         * hash-table-utils.c (g_strcase_equal): Use strcasecmp
1642         instead of g_strcasecmp.
1643
1644         * camel-smime-utils.c (camel_smime_is_smime_v3_signed): Same.
1645         (camel_smime_is_smime_v3_encrypted): Here too.
1646
1647         * camel-sasl-digest-md5.c (decode_data_type): And here.
1648         (parse_server_challenge): Again here.
1649
1650         * camel-pgp-mime.c (camel_pgp_mime_is_rfc2015_signed): Same.
1651         (camel_pgp_mime_is_rfc2015_encrypted): Same
1652
1653         * camel-mime-part-utils.c (check_html_charset): Here too.
1654
1655         * camel-folder-summary.c (camel_system_flag): Same.
1656
1657 2002-10-25  Jeffrey Stedfast  <fejj@ximian.com>
1658
1659         * camel-gpg-context.c (gpg_ctx_parse_status): Don't prematurely
1660         set gpg->complete to TRUE. Let gpg_ctx_op_step () set it to TRUE
1661         when gpg closes the status-fd instead.
1662
1663 2002-10-24  Not Zed  <NotZed@Ximian.com>
1664
1665         ** For bug #31647 and bug #31456.
1666         
1667         * camel-store-summary.c (store_info_string): for STORE_INFO_NAME,
1668         skip the leading /.
1669
1670         * providers/imap/camel-imap-store.c
1671         (parse_list_response_as_folder_info): Remove jeff's last patch,
1672         and use the store summary to create the name and path of the
1673         folderinfo so it manages namespace issues.
1674         (get_folder_info_online): Just pass @top directly to
1675         build_folder_info always, since namespace is mapped to 1 tree
1676         level.
1677         (imap_build_folder_info): Remove jeff's last patch, dont strip
1678         leading /'s, they shouldn't exist.
1679         (imap_connect_online): Remove adding the INBOX here, we add it
1680         later.
1681         (get_subscribed_folders): Make sure INBOX is always in the list.
1682         some imap servers dont seem to let you subscribe to it(?), so
1683         always have it act as subscribed.
1684
1685         * camel-store.c (camel_folder_info_build): back out the last 2
1686         patches from Jeff (for #31456) to get the original behaviour.
1687         (camel_folder_info_build): When creating a fake
1688         parent, dont strip the namespace from the full_name.  malloc keys
1689         in hash since we dont have them anymore.
1690         (free_name): Helper to free names.
1691
1692         * providers/imap/camel-imap-store-summary.c
1693         (camel_imap_store_summary_namespace_new): Canonicalise the
1694         namespace (strip trailing dir_sep), and change the path to remove
1695         any /'s.
1696         (camel_imap_store_summary_namespace_find_path):
1697         (camel_imap_store_summary_namespace_find_full): new, find
1698         namespace by path/full name.
1699         (camel_imap_store_summary_full_from_path): Changed to a simple
1700         wrapper around path_to_full, after checking namespace.
1701         (camel_imap_store_summary_add_from_full): map the namespace if
1702         present.
1703         (camel_imap_store_summary_path_to_full): If namespace exists,
1704         unmap it.
1705
1706 2002-10-18  Jeffrey Stedfast  <fejj@ximian.com>
1707
1708         * camel-filter-driver.c (camel_filter_driver_filter_folder):
1709         Canonicalise the source_uri to not have a path. Fixes bug #32268.
1710
1711 2002-10-17  Jeffrey Stedfast  <fejj@ximian.com>
1712
1713         Possible fix for bug #32270
1714
1715         * providers/pop3/camel-pop3-store.c (try_sasl): If we get an I/O
1716         error, we should not be setting the CANT_AUTH exception but should
1717         instead be setting the SYSTEM exception. Also check for EINTR
1718         which signifies a USER_CANCEL exception.
1719         (pop3_try_authenticate): If the auth mechanism isn't supported,
1720         don't set the CANT_AUTH exception since then we will loop and try
1721         again with the same data which will just cause an infinite loop.
1722         (pop3_connect): Simplified a bit.
1723
1724 2002-10-17  Jeffrey Stedfast  <fejj@ximian.com>
1725
1726         * camel-tcp-stream-ssl.c (camel_certdb_nss_cert_set): If
1727         ~/.camel_certs doesn't exist, create it.
1728
1729 2002-10-15  Not Zed  <NotZed@Ximian.com>
1730
1731         * camel-tcp-stream-ssl.c (cert_fingerprint): helper, build
1732         fingerprint.
1733         (camel_certdb_nss_cert_get): Helper for nss certs.  Lookup cert.
1734         As well as fingerprint, the whole raw cert is checked for
1735         validity.
1736         (camel_certdb_nss_cert_add): Add an nss cert to a certdb, also
1737         saves the cert by fingerprint in ~/.camel_certs/.
1738         (ssl_bad_cert): Changed to use above functions to simplify logic.
1739         (ssl_bad_cert): Also added non-compiled code which mimics what
1740         mozilla does, but it doesn't work right :-/
1741         (camel_certdb_nss_cert_set): Save the raw cert associated with a
1742         cert.
1743
1744         * camel-certdb.c (certdb_cert_free): Free the raw cert data if
1745         set.
1746
1747 2002-10-14  Not Zed  <NotZed@Ximian.com>
1748
1749         * camel-file-utils.c (camel_file_util_encode_string): Encode a
1750         length of 0 as 1, not 0, to match the decode code.
1751
1752 2002-10-03  Not Zed  <NotZed@Ximian.com>
1753
1754         * camel-folder.c (filter_filter): Do the filtering ourselves.
1755         This is so a problem like a missing uid (which can happen
1756         legitemitely) doesn't prematurely abort filtering.  Stop on all
1757         other errors.  See #31667.
1758
1759 2002-10-16  Jeffrey Stedfast  <fejj@ximian.com>
1760
1761         * camel-gpg-context.c (camel_gpg_context_new): No longer takes a
1762         path argument.
1763         (camel_gpg_context_fianlise): No need to free ctx->path.
1764         (gpg_ctx_new): No longer takes a path argument either.
1765         (gpg_ctx_free): No need to free ctx->path, it's no longer used.
1766         (gpg_ctx_op_start): Don't stat the path anymore and change the
1767         first arg to execvp to "gpg" so that we use the shell's
1768         environment to find gpg.
1769         (gpg_sign): Updated.
1770         (gpg_verify): Updated.
1771         (gpg_encrypt): Updated.
1772         (gpg_decrypt): Updated.
1773         (gpg_ctx_get_argv): Removed some debug printfs.
1774
1775 2002-10-15  Jeffrey Stedfast  <fejj@ximian.com>
1776
1777         * camel-gpg-context.c (gpg_id_to_hash): If the hash id is NULL,
1778         return CAMEL_CIPHER_HASH_DEFAULT. Fixes bug #32229.
1779
1780 2002-10-08  Jeffrey Stedfast  <fejj@ximian.com>
1781
1782         * providers/imap/camel-imap-command.c (imap_read_response): If the
1783         response from the IMAP server is "No", don't set the
1784         SERVICE_UNAVAILABLE exception, this makes error reporting in the
1785         UI for deleting IMAP folders that cannot be deleted inaccurate
1786         (ie, it reports "Cannot delete in offline mode" which is not the
1787         problem).
1788
1789 2002-10-07  Jeffrey Stedfast  <fejj@ximian.com>
1790
1791         Fixes bug #31752
1792
1793         * providers/smtp/camel-smtp-transport.c (connect_to_server): Don't
1794         forget to send another EHLO command to the server once we toggle
1795         into STARTTLS mode.
1796         (smtp_helo): Reset any flags set using the EHLO response and also
1797         any authtypes.
1798
1799 2002-10-06  Jeffrey Stedfast  <fejj@ximian.com>
1800
1801         Fixes bug #31681
1802
1803         * camel-mime-utils.c: Fix all mailing list regex patterns to allow
1804         any number of spaces *or* tabs as pre-padding for the header
1805         values.
1806
1807 2002-10-03  Jeffrey Stedfast  <fejj@ximian.com>
1808
1809         * camel-mime-part.c (write_to_stream): Use the content-object's
1810         rawtext flag to decide if it needs to be filtered through the
1811         charset filter instead of using the mime part's rawtext flag since
1812         this will never be set. Partial fix for bug #31655.
1813
1814 2002-10-03  Not Zed  <NotZed@Ximian.com>
1815
1816         * camel-folder.c (folder_changed): Dont get the filter driver
1817         inside the change_lock.  Its not necessary, and can cause deadlock
1818         with the way the mailer gets the filter driver via g_mainloop.
1819         Should fix #31572.
1820
1821 2002-10-02  Jeffrey Stedfast  <fejj@ximian.com>
1822
1823         * camel-charset-map.c (camel_charset_iso_to_windows): Map us-ascii
1824         to windows-1252 also.
1825
1826 2002-10-02  Not Zed  <NotZed@Ximian.com>
1827
1828         * providers/imap/camel-imap-folder.c (get_matching): Set *set to
1829         NULL if we dont get any matches.
1830         (imap_sync_online): If we get no matches, skip any work, also
1831         reorder some code to make it easier to skip.  See #31031.
1832
1833         * providers/imap/camel-imap-store.c
1834         (imap_check_folder_still_extant): Default to "TRUE", if the list
1835         command failed, it probably means a server problem, assume the
1836         worst.  This makes imap_refresh_info not clear the exception and
1837         crash.  Fixes crash of #31000.
1838
1839 2002-10-01  Not Zed  <NotZed@Ximian.com>
1840
1841         * providers/imap/camel-imap-folder.c (imap_refresh_info): Make
1842         sure we pass the exception to imap_folder_selected(), otherwise
1843         failures can be lost.  See bug #31000.
1844
1845 2002-10-01  Not Zed  <NotZed@Ximian.com>
1846
1847         * camel-folder.c (thaw): Add an assertion that the frozen count>0.
1848         (freeze): Same for >= 0.
1849
1850         * camel-vee-folder.c (camel_vee_folder_remove_folder): Use the
1851         unmatched freeze_count when thawing folders removed from
1852         unmatched, rather than the folder's freeze_count.  Might be
1853         related to #27391.
1854
1855 2002-10-01  Jeffrey Stedfast  <fejj@ximian.com>
1856
1857         * providers/imap/camel-imap-folder.c (decode_internaldate): Use
1858         strtol when decoding the timezone (since it can be negative) and
1859         don't forget to increment inptr to the start of the time (ie,
1860         don't leave inptr pointing to the year when decoding the
1861         hour:min:sec).
1862
1863 2002-09-30  Jeffrey Stedfast  <fejj@ximian.com>
1864
1865         Fixes bug #31456.
1866
1867         * providers/imap/camel-imap-store.c (imap_connect_online): Don't
1868         LSUB "" "*", instead get both an LSUB containing the subfolders of
1869         the namespace and an LSUB of INBOX (assuming namespace was
1870         non-empty). This fix really has nothing to do with bug #31456 but
1871         is what should have been done in the first place.
1872         (parse_list_response_as_folder_info): Simplify a tad and strip
1873         extra leading /'s from fi->path.
1874         (imap_build_folder_info): Strip extra leading /'s from fi->path.
1875
1876         * camel-store.c (camel_folder_info_build): Don't strip the
1877         namespace from the fi->full_name when hashing or creating fake
1878         parent folder-infos. Fixes a bug I found while trying to reproduce
1879         bug #31456.
1880         (camel_folder_info_build_path): Strip off extra leading dir_sep
1881         chars from the path.
1882
1883 2002-09-30  Not Zed  <NotZed@Ximian.com>
1884
1885         * providers/imap/camel-imap-folder.c (imap_get_message): Remove
1886         debug content_info_dump, could cause a crash, and not really
1887         needed anymore.
1888
1889         * camel-folder-summary.c (camel_content_info_dump): Check ci->type
1890         != NULL before dereferencing it.  Should fix crash #31331.
1891
1892 2002-09-27  Jeffrey Stedfast  <fejj@ximian.com>
1893
1894         * providers/imap/camel-imap-folder.c (decode_internaldate): New
1895         function to decode the INTERNALDATE response from an IMAP server
1896         so we don't have to use my broken-date-parser routines.
1897
1898 2002-09-27  Jeffrey Stedfast  <fejj@ximian.com>
1899
1900         * providers/imap/camel-imap-store.c (connect_to_server):
1901         NULL-check the streams before unreffing them in the case of a
1902         failure during ssl negotiations.
1903
1904         * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_enable_ssl): Check
1905         SSL_ResetHandshake() for errors. Also force a handshake after
1906         we've reset the handshake state on the socket.
1907
1908 2002-09-27  Not Zed  <NotZed@Ximian.com>
1909
1910         * providers/imap/camel-imap-folder.c (imap_update_summary): Use
1911         the summary's last uid as the one to fetch from, ignoring the
1912         cache.  Use strtoul instead of atoi as well.
1913
1914         * providers/imap/camel-imap-store.c (get_folder_counts): If we
1915         have the folder open, and the unread count has changed, refresh
1916         it.  Should fix #30399 enough.  Also in non-check-all mode, if we
1917         have the folder open, use it anyway.
1918
1919 2002-09-26  Not Zed  <NotZed@Ximian.com>
1920
1921         * tests/folder/test2.c (main): Treat spool as a local folder, so
1922         the ref checks work right.
1923
1924         * providers/local/camel-spool-store.c (get_folder): Implement
1925         FOLDER_CREATE flag.
1926         (scan_dir): Dont free name on exception, its alloca'd.
1927         (scan_dir): If we start scanning from a file, just add that
1928         directly.
1929         (scan_dir): Allow empty files to also show up in folder list, as
1930         well as files starting with "From ".
1931         (get_folder): Use creat() instead of open() to create file.
1932
1933         * providers/local/camel-spool-folder.c (camel_spool_folder_new):
1934         Check folder != NULL before writing to it.
1935
1936         * providers/local/camel-local-store.c (create_folder): Handle a
1937         parent of NULL for creating top-level dirs.  Part of #31186.
1938         
1939         * providers/imap/camel-imap-store.c
1940         (parse_list_response_as_folder_info): Store the folder flags in
1941         the store summary.
1942         (get_one_folder_offline): Set the noselect url parameter if this
1943         is a noselect folder, from the stored summary flags.  #30877.
1944
1945 2002-09-23  Jeffrey Stedfast  <fejj@ximian.com>
1946
1947         * camel-mime-filter-charset.c (complete): Handle EILSEQ by eating
1948         bytes in the input buffer until conversion is successful. The old
1949         behaviour aborted when it got EILSEQ and just dumped the raw data.
1950         (filter): Same. Fixes bug #30873.
1951
1952 2002-09-24  Not Zed  <NotZed@Ximian.com>
1953
1954         * camel-mime-utils.c (mail_list_magic[]): Changed the Mailing-List
1955         rule to get the complete domain (* in wrong spot).  #31087.
1956
1957         * camel-text-index.c (text_index_compress_nosync): If we have no
1958         data written to a key, dont add it, or its partition header.
1959
1960 2002-09-23  Not Zed  <NotZed@Ximian.com>
1961
1962         * camel-block-file.c (sync_nolock): Mark root block dirty if we're
1963         going to sync it.
1964         (camel_key_file_finalise): de-count the active list if we close
1965         it.
1966
1967         * camel-text-index.c (text_index_delete): Implement.
1968         (text_index_compress_nosync): Use index_delete when we're finished
1969         with the old one, so it is properly deactivated.
1970
1971         * camel-index.c (camel_index_delete): Remove api call.  Mark index
1972         deleted in new state variable.
1973         (camel_index_*): Wrap all calls in check for deleted state.
1974
1975 2002-09-23  Jeffrey Stedfast  <fejj@ximian.com>
1976
1977         * camel-folder.c (transfer_message_to): If the original message is
1978         deleted, reset the deleted flag when we're done. Fixes bug #30876.
1979
1980         * providers/imap/camel-imap-folder.c (add_message_from_data):
1981         Decode the INTERNALDATE if we've got one.
1982         (imap_update_summary): Instead of requesting a list of specific
1983         headers, request HEADER.FIELDS.NOT (RECEIVED) to reduce bandwidth
1984         usage even more.
1985         (parse_fetch_response): Change slightly to allow HEADER.FIELDS or
1986         HEADER.FIELDS.NOT so that we can make changes in
1987         imap_update_summary and not need to keep changing this function to
1988         match. Also parse an INTERNALDATE response.
1989
1990 2002-09-22  Dan Winship  <danw@ximian.com>
1991
1992         * camel-mime-parser.c (folder_scan_drop_step): fix non-ANSI switch
1993         statement.
1994
1995         * camel-service.c (service_getv): Likewise.
1996
1997         * providers/imap/camel-imap-store.c (imap_getv): Likewise.
1998
1999         * providers/pop3/camel-pop3-folder.c (cmd_builduid): Likewise.
2000
2001 2002-09-20  Not Zed  <NotZed@Ximian.com>
2002
2003         * tests/misc/split.c: New regression test for word
2004         splitting/search input parsing code.
2005
2006         * tests/folder/test9.c (main): Fix for filter_driver api change.
2007
2008         * camel-search-private.c (camel_search_words_split): Handle "'s
2009         and \'s to escape characters.  For fat, lazy, slobs who dont like
2010         anything changing.
2011
2012 2002-09-19  Not Zed  <NotZed@Ximian.com>
2013
2014         * camel-filter-search.c (camel_filter_search_match): Take new
2015         session arg.  Update callers.
2016         (symbols[]): changed get-source to header-source
2017         (header_source): Changed from get_source.  Now a boolean, returns
2018         true if source matches one of the arguments.  Uses the provider
2019         url comparison directly for accurate checking.  Makes 'filter on
2020         source' work.
2021
2022         * camel-filter-driver.c (camel_filter_driver_new): Take new arg,
2023         session.
2024         (camel_filter_driver_finalise): Free session.
2025
2026 2002-09-19  Jeffrey Stedfast  <fejj@ximian.com>
2027
2028         * providers/imap/camel-imap-folder.c (parse_fetch_response): Don't
2029         increment the response pointer when deciding what type of header
2030         response we got, this screws up the string that we strdup into the
2031         part_spec string later. Also, instead of using the entire blob of
2032         HEADER.FIELDS that we get in the response, shorten it to just
2033         HEADER.FIELDS to use as the part_spec key.
2034
2035 2002-09-18  Jeffrey Stedfast  <fejj@ximian.com>
2036
2037         * providers/imap/camel-imap-folder.c (CAMEL_MESSAGE_INFO_HEADERS):
2038         Include MIME-VERSION and CONTENT-TYPE.
2039
2040 2002-09-18  Not Zed  <NotZed@Ximian.com>
2041
2042         * providers/imap/camel-imap-command.c
2043         (camel_imap_command_response): If we get an ALERT, pass it to the
2044         user.  An rfc2060 MUST, and bug #22496.
2045
2046 2002-09-17  Jeffrey Stedfast  <fejj@ximian.com>
2047
2048         * providers/imap/camel-imap-folder.c (parse_fetch_response):
2049         Handle when the response is from a HEADER.FIELDS (if so, we don't
2050         want to cache the result).
2051         (imap_update_summary): Request specific headers when building the
2052         CamelMessageInfo's rather than fetching the full headers.
2053
2054 2002-09-13  Jeffrey Stedfast  <fejj@ximian.com>
2055
2056         * camel-mime-part.c (process_header): If header_msgid_decode fails
2057         for the content-id field, just grab whatever is between the <>'s
2058         (yes, this means that the content-id is invalid - but what can ya
2059         do?). Addresses bug #21027.
2060
2061 2002-09-11  Jeffrey Stedfast  <fejj@ximian.com>
2062
2063         * camel-mime-utils.c (header_encode_string): Revert a patch that I
2064         had not meant to commit that was aimed at fixing bug #29234.
2065
2066 2002-09-10  Jeffrey Stedfast  <fejj@ximian.com>
2067
2068         * camel-store-summary.c (camel_store_summary_load): Same as
2069         below. Also save errno before closing the file so our caller can
2070         figure out why we failed.
2071         (camel_store_summary_save): Same here, but also flush the output
2072         stream to disk.
2073
2074         * camel-folder-summary.c (camel_folder_summary_load): s/fclose(in)
2075         == -1/fclose(in) != 0/ since fclose doesn't necessarily return -1
2076         on fail, all we really know is that it returns 0 on success and
2077         non-zero on fail.
2078
2079         * camel-certdb.c (camel_certdb_save): fsync() the stream after we
2080         fflush it.
2081
2082         * camel-folder-summary.c (perform_content_info_save): Do proper
2083         error checking and return -1 on fail.
2084         (camel_folder_summary_save): Check the return of
2085         perform_content_info_save and a few other output calls within the
2086         message_info_save loop. If any of them fail, save errno, close the
2087         file, and return -1. If we finish the loop without fail, fflush
2088         the stream and then fsync (fflush only flushes user-space buffers,
2089         you still need to fsync afterward to flush the data to disk). If
2090         either fail, treat it as an exception by saving errno, closing the
2091         stream, and returning -1. I suspect that this also fixes bug
2092         #30150 because the old code would fclose if fflush or fclose
2093         failed in the check after the loop (man fclose(3) states that any
2094         further calls using the stream (even another call to fclose) will
2095         have undefined behaviour no matter what the first fclose call
2096         returned).
2097
2098         * providers/local/camel-local-summary.c
2099         (camel_local_summary_init): Don't malloc a private struct of 0
2100         size.
2101
2102         * providers/imap/camel-imap-folder.c
2103         (camel_imap_folder_fetch_data): Clear the exception even if we
2104         failed to get the message (part) from the imap-message-cache if we
2105         are online and able to try fetching it from the IMAP server.
2106
2107 2002-09-10  Not Zed  <NotZed@Ximian.com>
2108
2109         * camel-data-cache.c (data_cache_expire): Remove the hash table
2110         entry using the right path.  Related to #29731.
2111         (camel_data_cache_remove): "
2112
2113 2002-09-09  Jeffrey Stedfast  <fejj@ximian.com>
2114
2115         Fixes bug #4224
2116
2117         * providers/imap/camel-imap-folder.c
2118         (camel_imap_folder_fetch_data): Pass ex into
2119         camel_imap_message_cache_get().
2120
2121         * providers/imap/camel-imap-message-cache.c
2122         (camel_imap_message_cache_get): Now takes an exception and sets it
2123         on fail.
2124         (camel_imap_message_cache_copy): Updated to properly handle
2125         cache_get error conditions.
2126
2127 2002-09-04  Dan Winship  <danw@ximian.com>
2128
2129         * camel-mime-utils.c (header_decode_date): Use e_mktime_utc.
2130
2131         * camel-mime-message.c (camel_mime_message_set_date): Use
2132         e_localtime_with_offset.
2133
2134         * broken-date-parser.c (decode_broken_date): Use e_mktime_utc.
2135
2136 2002-09-04  Not Zed  <NotZed@Ximian.com>
2137
2138         * tests/folder/test4.c (main): clear nonfatal stuff.
2139
2140         * tests/folder/test6.c (main): check inbox and 'another folder'
2141         because some servers do different things w/ inbox.
2142
2143         * providers/imap/camel-imap-message-cache.c
2144         (camel_imap_message_cache_get): Dont try to open the directory
2145         instead of an empty "" uid.
2146
2147         * providers/imap/camel-imap-folder.c (imap_get_message): we dont
2148         want to g_return_if_fail, we need to set an exception and always
2149         handle the case.
2150         (get_message_simple): Set an exception if we get a construct
2151         failure.
2152         (imap_refresh_info): if we're refreshing inbox, force a reselect.
2153         this is required for at least cyrus.  CHECK doesnt work either :(
2154
2155         * tests/lib/folders.c (test_folder_basic): for non-local stores,
2156         the folder will have an extra ref for selection, take this into
2157         account when checking ref leaks.
2158         (test_folder_message_ops): Dont try to delete folder with messages
2159         in it, it works generally with imap.  also, change params so we
2160         can test different mailbox types.
2161         (test_folder_message_ops): disconnect remote services before
2162         finishing off.  doesn't need to stricly but makes ref count
2163         checking more accurate.
2164         (test_folder_message_ops): removed explicit remote sync, imap does
2165         it itself now ...
2166
2167         * providers/imap/camel-imap-store.c:
2168         (camel_imap_store_finalize): call service_disconnect, so it isn't
2169         called later in the finalise chain, to properly cleanup on exit.
2170
2171         * camel-mime-parser.c (folder_scan_content): If we fake the from
2172         eof file boundary, also make sure we say we matched nothing.  Also
2173         make the end case a little more robust to make sure we expired all
2174         hope of finding a sub-boundary.
2175
2176         * providers/imap/camel-imap-store.c,
2177         providers/imap/camel-imap-folder.c: Lots of changes, too numerous
2178         to list.  Changed to use camel-imap-store-summary to cache list
2179         requests.  Changed to use a canonicalised url path with / instead
2180         of per-store directory separator.  Indirects folder name so
2181         invalid folder names can still be accessed.  Summary now stored in
2182         a new expandable format in .ev-store-summary.
2183
2184 2002-08-29  Not Zed  <NotZed@Ximian.com>
2185
2186         * tests/folder/test3.c: Change the case sensitive search of
2187         subject to expect case insensitive results, as the behaviour has
2188         changed.
2189         (main): Made the search content before sync nonfatal.  its
2190         something that needs to be fixed but not practical concern in
2191         evolution.
2192
2193         * camel-block-file.c (block_file_validate_root): Only spit out the
2194         invalid root warnings if the file isn't empty.
2195
2196         * camel-text-index.c (text_index_compress_nosync): Swap the path
2197         as well when we compress.
2198
2199         * camel-mime-parser.c (folder_scan_content): Treat the end of file
2200         as a boundary if we're scanning From lines, and drop the last \n.
2201         (folder_scan_init_with_fd): Dont pre-read from the fd, and init eof.
2202         (folder_scan_init_with_stream): Similar.
2203         (folder_read): Handle eof, and set eof on 0 read.
2204         (folder_seek): Dont pre-read after a seek, and reset eof flag.
2205         (camel_mime_parser_init_with_fd): Fix doco, no pre-read occurs
2206         anymore.
2207         (camel_mime_parser_init_with_stream): Same.
2208
2209         * providers/local/camel-mbox-summary.c
2210         (camel_mbox_summary_sync_mbox): Add a \n to end of content of each
2211         message, not at start.
2212
2213         * providers/local/camel-mbox-folder.c (mbox_append_message):
2214         Instead of appending "\nFrom " to a mailbox, start with "From ",
2215         and append a \n after the message always.  For better mutt/elm
2216         compatability.  Also, unlock after we've stat'd.
2217         (mbox_append_message): Set the message's from_pos exactly as the
2218         mbox size.
2219
2220 2002-08-28  Jeffrey Stedfast  <fejj@ximian.com>
2221
2222         * camel-tcp-stream-openssl.c (stream_setsockopt): Fixed `set' to
2223         hold the correct value when setting the flags.
2224
2225         * camel-tcp-stream-raw.c (stream_setsockopt): Fixed `set' to hold
2226         the correct value when setting the flags.
2227
2228         * camel-mime-filter-tohtml.c (is_protocol): Match file: urls too.
2229
2230 2002-08-28  Not Zed  <NotZed@Ximian.com>
2231
2232         * tests/folder/test8.c (test_add_message): Change message number
2233         to use hex, so its properly unique.
2234         (worker): Same here.
2235
2236         * tests/misc/utf7.c: some utf7/utf8 tests.
2237
2238         * providers/imap/camel-imap-utils.c (imap_mailbox_encode): Changed
2239         to use camel_utf8_utf7 code.
2240         (imap_mailbox_decode): As above, using camel_utf8_utf7.  'UTF-7'
2241         isn't a widely support iconv() codeset, and besides the new code
2242         is simpler.
2243
2244         * camel-utf8.[ch]: robust utilities for working with utf8 and utf7.
2245
2246 2002-08-27  Jeffrey Stedfast  <fejj@ximian.com>
2247
2248         * camel-folder-thread.c (camel_folder_thread_messages_new): Now
2249         takes a third argument to specify whether or not to group messages
2250         by subject when threading. It seems some people don't want this
2251         feature (see bug #22791 for details).
2252         (thread_summary): If thread_by_subject is enabled, group
2253         un-threaded messages by subject otherwise don't bother.
2254
2255 2002-08-26  Jeffrey Stedfast  <fejj@ximian.com>
2256
2257         * providers/imap/camel-imap-command.c
2258         (camel_imap_response_free_without_processing): If the response is
2259         NULL, just return. (now works the same way as imap_response_free
2260         which allowed a NULL response argument). Fixes bug #25491.
2261
2262 2002-08-26  Jeffrey Stedfast  <fejj@ximian.com>
2263
2264         * providers/imap/camel-imap-store.c:
2265
2266         * providers/imap/camel-imap-folder.c:
2267
2268         * providers/imap/camel-imap-command.c: Lock the
2269         CamelService->priv->connect_lock instead of using our own
2270         command_lock. This fixes bug #28177.
2271
2272 2002-08-23  Jeffrey Stedfast  <fejj@ximian.com>
2273
2274         * providers/smtp/camel-smtp-transport.c (smtp_helo): If we fail to
2275         send the EHLO/HELO command successfully, set transport->connected
2276         to FALSE when we close the tcp connection. Also updated to work on
2277         an IPv6 network.
2278         (smtp_connect): transport->authtypes can be NULL, so NULL-protect
2279         the call to g_hash_table_size() - this should fix a warning that
2280         was reported on the evolution@ximian.com mailing list.
2281         (smtp_set_exception): If the status message is multi-line, add a
2282         \n between lines.
2283         (connect_to_server): If we are going to ignore the EHLO/HELO error
2284         as if it were non-fatal, then we should clear the exception.
2285
2286 2002-08-22  Jeffrey Stedfast  <fejj@ximian.com>
2287
2288         * providers/imap/camel-imap-store.c (imap_noop): If current_folder
2289         is not NULL and the summary for that folder is dirty, sync the
2290         flags rather than sending a NOOP.
2291
2292         * providers/imap/camel-imap-utils.c (imap_parse_list_response):
2293         Workaround for Courier imap's brokeness when LSUBing the INBOX
2294         folder when it isn't subscribed to. Fixes bug #28929.
2295
2296 2002-08-21  Jeffrey Stedfast  <fejj@ximian.com>
2297
2298         * providers/imap/camel-imap-store.c (connect_to_server): If
2299         imap_get_capability() fails, after unlocking the command_lock,
2300         disconnect the service.
2301
2302 2002-08-21  Jeffrey Stedfast  <fejj@ximian.com>
2303
2304         * camel-session.c (get_service): Don't register the noop timeout
2305         here anymore, we're gonna handle all this in the mailer now.
2306         (camel_session_register_timeout): Removed.
2307         (camel_session_remove_timeout): Removed.
2308
2309 2002-08-28  Not Zed  <NotZed@Ximian.com>
2310
2311         * providers/imap/camel-imap-store.c (construct): Load store
2312         summary if it exists.
2313         (can_work_offline): Just see if we have any folders to say whether
2314         we can work offline or not.  Should probably always just return
2315         true.
2316
2317 2002-08-27  Not Zed  <NotZed@Ximian.com>
2318
2319         * providers/imap/camel-imap-store-summary.[ch]: New files to
2320         handle offline definition of folders, etc.
2321
2322         * camel-url.h: Define CamelURL to be struct _CamelURL rather than
2323         anonymous struct.
2324
2325         * camel-store-summary.[ch]: a few api tweaks.  Also, the summary
2326         header is versioned separately at each level, so that version
2327         upgrades can be handled separately.  Renamed FolderInfo ->
2328         StoreInfo to avoid namespace with current FolderInfo code.  This
2329         should be reversed when the FolderInfo code is rationalised to
2330         this new base.
2331
2332 2002-08-23  Not Zed  <NotZed@Ximian.com>
2333
2334         * providers/imap/camel-imap-command.c (camel_imap_command): domt
2335         encode folder name.
2336
2337         * providers/imap/camel-imap-folder.c (do_copy): dont encode folder
2338         name.
2339         (do_append): dont encode folder name.
2340
2341         * providers/imap/camel-imap-store.c (get_folder_status): don
2342         encode folder name in imap request.
2343         (get_folder_online): here too for creating folder.
2344         (rename_folder): Assume the incoming 'new name' is a utf8 path,
2345         whereas the 'old name' is as from get folder info (raw).
2346         (create_folder): Dont encode parent_name, assume its the raw
2347         thing.
2348
2349 2002-08-22  Not Zed  <NotZed@Ximian.com>
2350
2351         * providers/imap/camel-imap-store.c (get_folder_online): Select
2352         based on unconverted name.
2353         (imap_build_folder_info): New function to create a folderinfo
2354         properly based on raw name.
2355         (subscribe_folder): Use above helper.
2356         (imap_folder_effectively_unsubscribed): Same here.
2357         (imap_forget_folder): Same here.
2358         (get_one_folder_offline): "
2359
2360 2002-08-21  Not Zed  <NotZed@Ximian.com>
2361
2362         * providers/imap/camel-imap-store.c
2363         (parse_list_response_as_folder_info): Setup path properly, as
2364         decoded path with / separator.  Setup full_name as non-decoded raw
2365         name.  Keep url as decoded path but with server separator
2366         ... (ick).
2367         (create_folder): Dont call build_path anymore, get_folders() does
2368         it for us.
2369         (subscribe_folder): Build the path ourself.
2370         (imap_folder_effectively_unsubscribed): Same here.
2371         (get_subscribed_folders): list using %S not %F, we're using the
2372         raw server provided name directly.
2373         (subscribe_folder): As above, for SUBSCRIBE.
2374         (unsubscribe_folder): Same here.
2375         (delete_folder): Same.
2376         (rename_folder_info): Same here for source name.
2377         (rename_folder): And here?
2378         (get_folders_online): Amd here.
2379
2380         * providers/imap/camel-imap-utils.c:
2381         (imap_parse_list_response): Dont decode the mailbox.
2382
2383         * camel-utf8.[ch]: some new utf8 & utf7 utilities.
2384
2385         * providers/imap/camel-imap-utils.c (imap_mailbox_encode):
2386         (imap_mailbox_decode): use camel_utf7/8* functions instead.
2387         : Add config.h and alloca.h headers.
2388
2389 2002-08-20  Jeffrey Stedfast  <fejj@ximian.com>
2390
2391         * providers/imap/camel-imap-store.c (imap_noop): Override the
2392         default noop implementation.
2393
2394         * camel-store.c (camel_store_noop): New virtual method to ping a
2395         store.
2396
2397         * camel-session.c (get_service): Register a timeout that calls
2398         camel_store_noop() every 10 minutes.
2399
2400 2002-08-19  Peter Williams  <peterw@ximian.com>
2401
2402         Plug some large leaks in the indexing code.
2403
2404         * camel-mime-filter-index.c (camel_mime_filter_index_set_index): Unref
2405         the old index if necessary.
2406
2407         * camel-text-index.c (camel_text_index_get_type): Give it the correct
2408         parent type so that finalize handlers chain.
2409         (camel_text_index_name_get_type): Here too.
2410         (camel_text_index_cursor_get_type): Here too.
2411         (camel_text_index_key_cursor_get_type): Here too.
2412
2413 2002-08-20  Jeffrey Stedfast  <fejj@ximian.com>
2414
2415         * providers/imap/camel-imap-store.c (get_folders): Don't let the
2416         minimum recursive depth be negative.
2417         (get_folders): Pass flags & CAMEL_FOLDER_INFO_SUBSCRIBED as the
2418         `lsub' argument to get_folders_online() otherwise we'll end up
2419         doing a LIST when we really wanted to do an LSUB.
2420
2421         * camel-session.c: Set CAMEL_URL_NEED_PATH for the vFolder
2422         provider.
2423
2424 2002-08-19  Jeffrey Stedfast  <fejj@ximian.com>
2425
2426         * providers/imap/camel-imap-store.c: Changed the STOREINFO_VERSION
2427         - should fix bug #28571, but if it doesn't - oh well, I don't
2428         care. I'm considering it fixed no matter what.
2429
2430         * camel-gpg-context.c (gpg_sign): If the diagnostics are empty,
2431         just explain that gpg failed to execute.
2432         (gpg_encrypt): Same.
2433         (gpg_decrypt): And here too.
2434
2435         * tests/lib/camel-test.c (camel_test_init): Updated to pass the
2436         needed arguments to camel_init() and to init gthreads before camel
2437         (since camel expectes it to be initialised already).
2438
2439         * tests/lib/session.c: #include <config.h> needed for
2440         ENABLE_THREADS so that sizeof (CamelSessionClass) gives the
2441         correct size.
2442
2443         * tests/*: Updated to work with camel API changes.
2444
2445 2002-08-16  Dan Winship  <danw@ximian.com>
2446
2447         * camel-session.c (get_service): If the passed-in URL contains a
2448         path, but the service doesn't allow paths, then the path part must
2449         be a folder name, and we should ignore it here. #29010
2450
2451 2002-08-16  Chris Toshok  <toshok@ximian.com>
2452
2453         * camel-arg.h: remove the outer parens from the expansion of
2454         camel_argv_{start,end} since at least on freebsd va_end is
2455         #defined to be nothing, so (va_end(..)) causes a syntax error.
2456
2457 2002-08-16  Not Zed  <NotZed@Ximian.com>
2458
2459         * providers/imap/camel-imap-store.c (get_folders): Fix the logic
2460         check for working out if we add inbox or not, we do it if we
2461         listed the namespace.
2462
2463 2002-08-15  Not Zed  <NotZed@Ximian.com>
2464
2465         * camel-store.h (CamelFolderInfo): added a flags field, defined
2466         some flags, currently only used by imap.  This and below is first
2467         step to getting incremental folder tree loading.
2468
2469         * providers/imap/camel-imap-store.c (get_subscribed_folders): If
2470         the subscribed list is empty, always add inbox.
2471         (imap_connect_offline): If the 'storeinfo' namespace isn't the
2472         same as our own (if its set), then ignore it, assume we changed
2473         settings.  Otherwise you can't change the namespace ...
2474         (get_folders): allow the env variable CAMEL_IMAP_MAX_DEPTH to
2475         override the default maximum recursion depth if 10 levels.
2476         (camel_imap_store_readline): Dont depend the log debug on d(x)
2477         being defined.
2478         (get_folder_info_online): changed to use new functions/names.
2479
2480 2002-08-14  Not Zed  <NotZed@Ximian.com>
2481
2482         * providers/imap/camel-imap-store.c (get_subscribed_folders):
2483         Removed the by_hand sillyness.  Return an array instead.
2484         (get_folders): New method to get folders recursively without
2485         having to use '*'.  Uses '%', and stops if it gets too deep
2486         (current max of 10).
2487         (get_folder_counts): New method to fill out unread counts on
2488         folderinfo tree.
2489         (get_subscribed_folders): Fix some failure logic.
2490
2491         * providers/imap/camel-imap-utils.[ch]: Changed IMAP_LIST_FLAGS to
2492         use the new CamelFolderInfoFlags directly.
2493
2494 2002-08-09  Peter Williams  <peterw@ximian.com>
2495
2496         * providers/imap/camel-imap-folder.c (get_temp_uid): New function,
2497         generate a UID that has better chances of being unique.
2498         (imap_append_offline): Use it here.
2499         (imap_transfer_offline): And here.
2500
2501 2002-08-09 Peter Williams <peterw@ximian.com>
2502  
2503         * providers/imap/camel-imap-store.c
2504         (get_folder_info_online): Tweak how we build the tree based on whether
2505         a full tree or a subtree is being requested. Fixes subscribe dialog
2506         on UW servers.
2507         (get_one_folder_offline): Don't add folders that we're not subscribed
2508         to; fixes UW folders that weren't being marked as NoSelect because
2509         the storeinfo doesn't record that information.
2510         
2511 2002-08-09  Peter Williams  <peterw@ximian.com>
2512
2513         * providers/imap/camel-imap-folder.c (imap_rename): When renaming our
2514         cache, add the "/folders" to the path.
2515
2516 2002-08-08  Jeffrey Stedfast  <fejj@ximian.com>
2517
2518         * providers/imap/camel-imap-folder.c (camel_imap_folder_init): Set
2519         some default permanent_flags. This is the other cause of bug
2520         #28038.
2521         (imap_refresh_info): After calling camel_imap_command() with a
2522         NULL format value (this is a shortcut to change the current_folder
2523         by SELECTing it), call camel_imap_folder_selected(). This may have
2524         been why permanent_flags never got set on the folder even after
2525         going online in bug #28038.
2526         (imap_update_summary): Same here. Also NULL-guard
2527         camel_imap_response_free().
2528
2529 2002-08-07  Jeffrey Stedfast  <fejj@ximian.com>
2530
2531         * camel-mime-utils.c (header_encode_param): Oops - outbuf pointed
2532         to alloca'd memory but we were g_free'ing it after using
2533         it. Instead use g_malloc for this outbuf buffer since it may be
2534         kinda large. Also don't depend on a single byte to nul-terminate
2535         the outbuf buffer so as to be safe with charsets such as UCS2 and
2536         UCS4, instead keep a pointer to the end of the buffer.
2537
2538         * providers/imap/camel-imap-folder.c (parse_fetch_response): Only
2539         add the stream to the gdatalist if it is non-NULL.
2540
2541 2002-08-06  Jeffrey Stedfast  <fejj@ximian.com>
2542
2543         * providers/sendmail/camel-sendmail-transport.c
2544         (sendmail_send_to): If writing to the sendmail pipe fails, wait
2545         for the sendmail process to exit before returning. Fixes bug
2546         #19636.
2547
2548 2002-08-06  Not Zed  <NotZed@Ximian.com>
2549
2550         * providers/pop3/camel-pop3-folder.c (cmd_list): Add messageinfo
2551         to id table, and store array index in messageinfo too.
2552         (fi_to_index): Removed, use index member of messageinfo, fixed
2553         callers.
2554         (cmd_builduid): Parse the headers of the data, and ignore any
2555         status or x-status headers.
2556         (uid_to_fi): Removed, use the hashtable instead.
2557         (id_to_fi): Same.
2558         (cmd_uidl): Add messageinfo to uid table.
2559         (pop3_refresh_info): Setup hash tables, and fill out uid table for
2560         nonuid capable servers.
2561         (pop3_finalize): Destroy hash tables.  Only free resources if the
2562         uids table is not null (if finalised before we ran refresh info).
2563         (id_to_fi): Removed.  Use id hash table instead, fixed caller.
2564
2565 2002-08-05  Jeffrey Stedfast  <fejj@ximian.com>
2566
2567         * camel.c (camel_init): Always set a g_atexit handler to
2568         flush/save the camel-certdb.
2569
2570         * providers/imap/camel-imap-store.c (get_folder_info_online): If
2571         we are asking for the toplevel folders, use the IMAP store's
2572         namespace as the toplevel folder rather than an empty
2573         string. Fixes bug #28574.
2574         (imap_forget_folder): Rearrange the code so that name can never be
2575         used uninitialised.
2576
2577         * providers/imap/camel-imap-utils.c (imap_namespace_concat):
2578         Removed.
2579
2580 2002-08-05  Dan Winship  <danw@ximian.com>
2581
2582         * camel-folder-summary.h (CamelMessageFlags): Add
2583         CAMEL_MESSAGE_ANSWERED_ALL, for folders that can distinguish a
2584         reply-to-sender from a reply-to-all. (eg, Exchange)
2585
2586         * providers/local/camel-local-folder.c (local_init): Add
2587         ANSWERED_ALL to permanent_flags too.
2588
2589 2002-08-02  Jeffrey Stedfast  <fejj@ximian.com>
2590
2591         Fixes bug #26237.
2592
2593         * providers/imap/camel-imap-command.c
2594         (imap_command_strdup_vprintf): Don't prepend any namespace shit in
2595         the %F case.
2596
2597         * providers/imap/camel-imap-utils.c (imap_parse_list_response):
2598         Don't strip off the namespace.
2599
2600 2002-08-01  Peter Williams  <peterw@ximian.com>
2601
2602         * providers/imap/camel-imap-store.c (create_folder): If the folder
2603         name contains the directory separator, reject it.
2604
2605 2002-08-02  Not Zed  <NotZed@Ximian.com>
2606
2607         * providers/local/camel-mbox-summary.c (mbox_summary_check): Clear
2608         the summary after building the 'removed uid' list.
2609
2610         * camel-folder-summary.c (message_info_load): revert jeff's patch
2611         below, and do it slightly differently, and stop the auto-reformatting
2612         bullshit.
2613
2614 2002-08-02  Not Zed  <NotZed@Ximian.com>
2615
2616         * providers/local/camel-maildir-summary.c (message_info_new): If
2617         we get a duplicate, just re-use the old info.
2618         (remove_summary): Add any removed to a change list.
2619         (maildir_summary_check): If we find new ones in 'cur' track them
2620         in the change list.  Removed FIXME about it.  For #18348.
2621
2622 2002-08-01  Jeffrey Stedfast  <fejj@ximian.com>
2623
2624         * camel-folder-summary.c (message_info_load): Do more error
2625         checking to prevent crashing if we fail to read a string for
2626         example.
2627
2628 2002-07-29  Peter Williams  <peterw@ximian.com>
2629
2630         Fix bug #28238
2631         
2632         * providers/imap/camel-imap-store.c (imap_forget_folder): New
2633         function, breaking out the code in delete_folder() to handle when
2634         a folder is removed.
2635         (imap_folder_effectively_unsubscribed): New function, breaking out
2636         the code in unsubscribe_folder() to handle when a folder is
2637         unsubscribed.
2638         (imap_check_folder_still_extant): New function, check whether a
2639         folder exists by LIST'ing it.
2640         (imap_store_refresh_folders): Add code here to check if the folder
2641         still exists if we're unable to refresh its info. If so, pretend
2642         that it was unsubscribed (to get the mailer to remove it from 
2643         the tree) and delete its cache. If somehow this goofs up, the 
2644         worst that can happen is that we must redownload the headers.
2645         (get_folder_status): If we can't get the status, behave as above.
2646         (delete_folder): Call imap_forget_folder() where the bulk of this
2647         code has gone.
2648         (unsubscribe_folder): Call imap_folder_effectively_unsubscribed()
2649         where the bulk of this code has gone.
2650
2651 2002-07-31  Jeffrey Stedfast  <fejj@ximian.com>
2652
2653         * providers/imap/camel-imap-folder.c (parse_fetch_response):
2654         Disable my fix to not cache headers as it means that each time we
2655         load the message, we've got to re-fecth the headers.
2656
2657         * camel-mime-filter-tohtml.c (is_addr_char): Don't use
2658         "isprint(c)" to mean "c >= 32 && c < 128" since it doesn't in most
2659         locales.
2660         (is_url_char): Same.
2661         (is_trailing_garbage): Same.
2662         (is_domain_name_char): New macro for dns-valid characters
2663         (email_address_extract): Use is_domain_name_char rather than
2664         is_addr_char for the part after the @.
2665
2666 2002-07-30  Jeffrey Stedfast  <fejj@ximian.com>
2667
2668         * camel-tcp-stream.c (camel_tcp_address_new): Update the comment.
2669
2670         * camel-tcp-stream-raw.c (socket_connect): If building with IPv6
2671         support and the address is an IPv6 address, connect using a
2672         sockaddr_in6 otherwise use the standard IPv4 sockaddr_in
2673         structure.
2674         (stream_get_local_address): Fix to work with IPv6 addresses.
2675         (stream_get_remote_address): Same.
2676
2677         * camel-tcp-stream-openssl.c (socket_connect): Same as above.
2678         (stream_get_local_address): Fix to work with IPv6 addresses.
2679         (stream_get_remote_address): Same.
2680
2681         * camel-tcp-stream-ssl.c (stream_connect): If building with IPv6
2682         support and the address is an IPv6 address, initialise the
2683         PRNetAddr accordingly.
2684         (stream_get_local_address): Fix to work with IPv6 addresses.
2685         (stream_get_remote_address): Same.
2686
2687 2002-07-30  Jeffrey Stedfast  <fejj@ximian.com>
2688
2689         * camel-tcp-stream-openssl.c (ssl_verify): X509_digest() needs a
2690         pointer to an int len. Also fixed some other compiler errors.
2691
2692         * camel-certdb.h: #include <stdio.h>
2693
2694 2002-07-30  Jeffrey Stedfast  <fejj@ximian.com>
2695
2696         * camel-certdb.c: New source file implementing a very basic
2697         certificate database. This is mostly just here because the Mozilla
2698         NSS certdb seems to not be working for everyone's Evolution
2699         install (works fine for me and Ettore but not many other people).
2700
2701         * camel-tcp-stream-ssl.c (ssl_bad_cert): If we have this
2702         certificate in our own CamelCertDB, then get the trust value from
2703         that and only prompt the user if the trust is unknown.
2704
2705         * camel-tcp-stream-openssl.c (ssl_verify): Same.
2706
2707         * camel.c (camel_init): Create our default certdb.
2708
2709 2002-07-30  Peter Williams  <peterw@ximian.com>
2710
2711         * providers/imap/camel-imap-folder.c (imap_transfer_offline): Use
2712         the same command-counter mojo that the append code uses in case
2713         the use tries to copy the same message to the folder repeatedly.
2714
2715 2002-07-29  Jeffrey Stedfast  <fejj@ximian.com>
2716
2717         * camel-filter-driver.c (unset_flag): New filter action to unset a
2718         system flag. The exact opposite of set_flag.
2719
2720 2002-07-26  Jeffrey Stedfast  <fejj@ximian.com>
2721
2722         * providers/local/camel-local-store.c (get_folder): If the path
2723         exists and is a directory, return non-NULL. Missed this before
2724         which is how we could return NULL even on success. Oops.
2725
2726 2002-07-26  Peter Williams  <peterw@ximian.com>
2727
2728         * providers/imap/camel-imap-summary.c
2729         (camel_imap_summary_add_offline_uncached): The flags'n'tags
2730         copy was unnecessary. Removed it.
2731
2732 2002-07-25  Jeffrey Stedfast  <fejj@ximian.com>
2733
2734         If we're gonna do an elite hack, lets do it right.
2735
2736         * providers/local/camel-local-store.c (get_folder): On success,
2737         return non-NULL so that our caller doesn't have to depend on 'ex'
2738         being non-NULL in order to work correctly.
2739
2740         * providers/local/camel-mbox-store.c (get_folder): Don't bother
2741         checking if an exception was set, just use the return value of
2742         camel-local-store's get_folder.
2743
2744         * providers/local/camel-maildir-store.c (get_folder): Same as the
2745         mbox change.
2746
2747         * providers/local/camel-mh-store.c (get_folder): Here too.
2748
2749 2002-07-25  Peter Williams  <peterw@ximian.com>
2750
2751         * providers/imap/camel-imap-summary.h
2752         (camel_imap_summary_add_offline_uncached): Prototype.
2753
2754         * providers/imap/camel-imap-summary.c
2755         (camel_imap_summary_add_offline_uncached): New function to add an
2756         uncached message to the summary while offline.
2757
2758         * providers/imap/camel-imap-store.c (imap_connect_online): Only
2759         refresh the folders if the disco diary is empty (ie, we're not
2760         resyncing.)
2761
2762         * providers/imap/camel-imap-folder.c (imap_transfer_offline): Emit
2763         an event for the source if deleting its originals. Also, if we
2764         can't load the message, still process it, using the new imap
2765         summary function.
2766
2767 2002-07-25  Jeffrey Stedfast  <fejj@ximian.com>
2768
2769         * providers/smtp/camel-smtp-transport.c: Remove "possibly
2770         non-fatal" exception strings, all exceptions are fatal unless
2771         their caller decides otherwise.
2772         (connect_to_server): If smtp_helo() fails due to us getting
2773         disconnected, treat the exception as fatal.
2774         (smtp_connect): Abort if smtp_helo() fails and we got
2775         disconnected.
2776         (smtp_send_to): If smtp_mail() fails, abort the send operation.
2777         (smtp_set_exception): If respbuf was NULL, then we got
2778         disconnected and so update our state accordingly.
2779         (smtp_disconnect): Only send a QUIT if we are still in the
2780         connected state (or, at least think we are).
2781
2782 2002-07-24  Peter Williams  <peterw@ximian.com>
2783
2784         * providers/imap/camel-imap-folder.c
2785         (imap_expunge_uids_resyncing): It would help to mark the UIDs as
2786         deleted before we try to expunge them
2787         (in the case when no other UIDs were marked deleted this didn't
2788         happen.)  Also fix an FMR.
2789         (imap_expunge_uids_offline): Trigger a folder_changed event with
2790         our own changeinfo because camel_imap_response_free won't be able
2791         to do that for us.
2792
2793 2002-07-25  Jeffrey Stedfast  <fejj@ximian.com>
2794
2795         * camel-filter-driver.c (do_shell): Renamed from
2796         shell_exec(). Also, we now want to pass argc/argv on to the
2797         CamelFilterDriverShellFunc.
2798         (camel_filter_driver_set_shell_func): Renamed a bit.
2799
2800         * camel-filter-search.c (pipe_message): Renamed from shell_exec().
2801
2802 2002-07-25  Not Zed  <NotZed@Ximian.com>
2803
2804         * camel-folder-summary.c (camel_folder_summary_save): When writing
2805         the summary, use TRUNC flag, duh.  Also, write to a temp file
2806         first, and rename when closed successfully, and check ferror() and
2807         fclose() against 0 rather than -1.
2808
2809         * providers/local/camel-mbox-summary.c (summary_update): Decrement
2810         i if we remove the summary item so we dont skip every 2nd one.
2811
2812         * camel-mime-utils.c (header_decode_mailbox): Use
2813         rfc2047_decode_word explicitly incase we just found an encoded
2814         word.  Stops us re-decoding the string twice, which fixes memory
2815         corruption in #26330 when the HUGE string is used later.
2816
2817 2002-07-24  Not Zed  <NotZed@Ximian.com>
2818
2819         * camel-partition-table.c (camel_key_table_next): Didn't unlock if
2820         we exited on an empty key list.
2821
2822         * providers/imap/camel-imap-folder.c (imap_expunge_uids_online):
2823         Sync before doing an expunge if we dont have uidplus.  See #25766.
2824         (imap_expunge_uids_resyncing): Same here.
2825
2826         * providers/imap/camel-imap-store.c (get_folder_info_online):
2827         Duplicated the very much hack in imap_store_refresh_folders() to
2828         avoid a deadlock in #27959.  A decent fix has to wait for a
2829         rewrite.
2830         (get_folder_online): Move folders to a subdirectory of
2831         storage_path, rather than in it.  Bye bye everyones settings.  See
2832         24947.
2833         (get_folder_offline): And here too.
2834         (delete_folder): And here too.
2835         (rename_folder): and here too.
2836         (get_folder_info_offline): And here too.  I love code reuse.
2837
2838 2002-07-23  Jeffrey Stedfast  <fejj@ximian.com>
2839
2840         * camel-tcp-stream.c: #include <string.h> for memcpy.
2841
2842 2002-07-22  Not Zed  <NotZed@Ximian.com>
2843
2844         * camel-vee-folder.c (vee_set_message_user_tag): Oops, forgot to
2845         implement this.  Fixes #24604.
2846
2847 2002-07-21  Jeffrey Stedfast  <fejj@ximian.com>
2848
2849         * camel-mime-filter-crlf.c (filter): Only add a \r if the
2850         character before the \n wasn't already a \r - this covers for when
2851         people add DOS files as attachments. Fixes bug #28056.
2852
2853 2002-07-19  Not Zed  <NotZed@Ximian.com>
2854
2855         * camel-mime-part-utils.c (convert_buffer): Changed to use a
2856         different length calculator.
2857
2858 2002-07-17  Jeffrey Stedfast  <fejj@ximian.com>
2859
2860         * camel-lock.c: Add the appropriate #include for the _() macro.
2861
2862 2002-07-17  Not Zed  <NotZed@Ximian.com>
2863
2864         * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): Got
2865         rid of the stupid "tryagain" semantics, which didn't work.
2866         (pop3_connect): Fixed here to only retry under proper conditions.
2867
2868 2002-07-16  Jeffrey Stedfast  <fejj@ximian.com>
2869
2870         * camel-mime-filter-canon.c (filter): When CRLF encoding, "empty"
2871         (after stripping trailing whitespace characters) lines need to end
2872         in CRLF also, not just lines with data in them.
2873
2874 2002-07-16  Peter Williams  <peterw@ximian.com>
2875
2876         * providers/imap/camel-imap-folder.c (imap_sync_online): Clean
2877         up some improper usage of CamelExceptions (looking at
2878         camel_exception_is_set when ex = NULL).
2879
2880         * providers/imap/camel-imap-store.c (get_folder_online): Here too.
2881
2882         * providers/imap/camel-imap-message-cache.c
2883         (camel_imap_message_cache_new): Nothing sets the exception so
2884         don't bother to check it at the end of this function. Prevents
2885         a warning about checking a NULL exception's value.
2886
2887 2002-07-16  Jeffrey Stedfast  <fejj@ximian.com>
2888
2889         * providers/smtp/camel-smtp-transport.c (smtp_helo): Make the
2890         standard AUTH format take priority over the AUTH= priority, since
2891         sometimes servers only list a subset of the supported authtypes in
2892         the AUTH= response while they list all authtypes in the standard
2893         AUTH response. Fixes "bug" #27841.
2894
2895 2002-07-15  Peter Williams  <peterw@ximian.com>
2896
2897         * providers/imap/camel-imap-folder.c (imap_get_message): If we're
2898         not online and the message isn't in our cache, give up.
2899
2900 2002-07-15  Not Zed  <NotZed@Ximian.com>
2901
2902         * camel-filter-search.c (get_label): Removed.
2903         (get_score): Removed.  Labels & scores are stored in tags, we
2904         already have a function to get tags.
2905         (user_tag): Fail if we dont get valid arguments, it must be a
2906         string type.
2907         (system_flag): Same here.
2908
2909 2002-07-15  Jeffrey Stedfast  <fejj@ximian.com>
2910
2911         * camel-mime-utils.c (header_msgid_generate): Try to get the FQDN
2912         from the results of gethostname(). If that fails, then fall back
2913         to the results gotten from gethostname() or if that fails just use
2914         "localhost.localdomain". Addresses bug #17416.
2915         (header_decode_param): Protect against a NULL value.
2916
2917         * providers/smtp/camel-smtp-transport.c (smtp_data): Get rid of
2918         the constant 'required' variable, just use the value when calling
2919         set_best_encoding.
2920
2921         * providers/local/camel-local-provider.c: Changed the mbox and
2922         spool provider descriptions to try and be more clear. I'm not sure
2923         I like the mention of Evolution in the mbox provider description,
2924         but there was no other way to make it clear that it MOVED mail out
2925         of the mbox folder into a folder managed by Evolution without
2926         mentioning Evolution. *sigh* Anyways, to me "retrieve" means move,
2927         but apparently this isn't clear to the weak minded.
2928
2929 2002-07-15  Peter Williams  <peterw@ximian.com>
2930
2931         * providers/imap/camel-imap-folder.c (imap_rescan): >= is not
2932         appropriate here because the sequences are 1-based; so seq =
2933         summary_len is valid.  Hopefully addresses 15646, because this
2934         caused the last message in a folder to be reloaded, replacing its
2935         CamelMessageInfo, and the tree view was using the old
2936         CamelMessageInfo.
2937
2938 2002-07-13  Not Zed  <NotZed@Ximian.com>
2939
2940         * camel-folder-summary.c
2941         (camel_folder_summary_info_new_from_message): Only assign a uid if
2942         indexing is enabled.  This stops us always assigning a uid in the
2943         imap folder and disco folder?
2944
2945         * providers/imap/camel-imap-folder.c (imap_update_summary): Also
2946         check the uid is set at all, another bit of a fix for #15667.
2947
2948 2002-07-09  Not Zed  <NotZed@Ximian.com>
2949
2950         * providers/imap/camel-imap-folder.c (imap_update_summary): Check
2951         for existing messages of the same uid before doing anything.  If
2952         it exists, do nothing (perhaps it should merge?).  A dirty hack for
2953         #15667.
2954
2955 2002-07-12  Jeffrey Stedfast  <fejj@ximian.com>
2956
2957         * camel-multipart-encrypted.c (camel_multipart_encrypted_decrypt):
2958         On error, do not unref the parts gotten using
2959         camel_multipart_get_part() since that function does not ref the
2960         parts. Also don't forget to reset the decrypted stream before
2961         trying to parse it ;-)
2962
2963 2002-07-12  Jeffrey Stedfast  <fejj@ximian.com>
2964
2965         * camel-multipart.c (camel_multipart_class_init): Updated to not
2966         use camel_type_get_global_classfuncs() since this is just a cast
2967         macro now.
2968
2969         * providers/imap/camel-imap-folder.c (get_content): Handle
2970         multipart/encrypted parts too.
2971
2972         * camel-mime-part-utils.c
2973         (camel_mime_part_construct_content_from_parser): Handle
2974         multipart/encrypted types too.
2975
2976 2002-07-11  Jeffrey Stedfast  <fejj@ximian.com>
2977
2978         * providers/smtp/camel-smtp-transport.c (smtp_data): Don't let any
2979         parts have a binary encoding.
2980
2981 2002-07-11  Jeffrey Stedfast  <fejj@ximian.com>
2982
2983         Fixes bug #27672
2984
2985         * camel-mime-filter-bestenc.c: Conditionally #include <config.h>
2986
2987         * camel-mime-filter-linewrap.c: Same here... although we could
2988         probably just get rid of this filter? We don't seem to use it
2989         anywhere since we try to QP/Base64 encode any text parts with long
2990         lines. Besides, we couldn't use this filter for SMTP anyway since
2991         we can't risk possibly linewrapping a binary mime part. I dunno,
2992         maybe this could be useful in the composer though? *shrug*
2993
2994         * providers/smtp/camel-smtp-transport.c (smtp_data): Always call
2995         camel_mime_message_set_best_encoding() even if the server allows
2996         8BITMIME and even if we don't have any 8bit parts because we may
2997         have parts with long lines (>998 octets) which also need to be
2998         encoded.
2999
3000         * camel-mime-message.c (check_8bit): Don't forget to check for the
3001         binary encoding here as well.
3002
3003 2002-07-11  Jeffrey Stedfast  <fejj@ximian.com>
3004
3005         * providers/imap/camel-imap-folder.c (parse_fetch_response): If we
3006         are fetching HEADERs, don't cache the stream - instead just create
3007         a mem-stream and return that. This reduces a significant amount of
3008         overhead due to disk i/o.
3009
3010         * camel-multipart-encrypted.c (camel_multipart_encrypted_decrypt):
3011         Don't forget to set an appropriate exception before returning
3012         NULL.
3013
3014 2002-07-10  Jeffrey Stedfast  <fejj@ximian.com>
3015
3016         * camel-filter-driver.c (get_message_cb): Make sure message is
3017         non-NULL before setting the source on it.
3018
3019         * camel-gpg-context.c: Renamed stdin to stdin_fd, stdout to
3020         stdout_fd, and stderr to stderr_fd in struct _GpgCtx since
3021         Solaris' stdin/stdout/etderr variables seem to be macros and are
3022         thus breaking the compilation.
3023
3024 2002-07-04  Jeffrey Stedfast  <fejj@ximian.com>
3025
3026         * providers/nntp/camel-nntp-provider.c: Set the IS_SOURCE provider
3027         flag.
3028
3029         * providers/pop3/camel-pop3-store.c: Change all exceptions to
3030         report which POP server failed (and tried to make a few of the
3031         exceptions a bit more clear).
3032
3033 2002-07-03  Not Zed  <NotZed@Ximian.com>
3034
3035         * camel-vee-folder.c (vee_sync): If we get an exception from the
3036         child sync, update the exception string so we know where it really
3037         was.
3038
3039         * camel-vee-store.c (change_folder): Util to emit created/deleted
3040         events.
3041         (vee_get_folder): If the folder has path elements, and its parents
3042         dont exist, create dummy no-select nodes.  This is for bug #4246.
3043         (vee_delete_folder): Use change_folder() to save code.
3044
3045         * providers/local/camel-mbox-folder.c (mbox_set_message_flags):
3046         Only set xevchange if we're storing status headers in pine format,
3047         so we dont do a full sync every time any flag changes.
3048
3049 2002-06-27  Not Zed  <NotZed@Ximian.com>
3050
3051         * camel-object.c (camel_object_hook_event): Take a void object arg.
3052         (camel_object_remove_event): "
3053         (camel_object_unhook_event): "
3054         (camel_object_trigger_event): ", also, execute events in the same
3055         order they were added, i.e. reverse hook-list order.
3056
3057 2002-06-28  Jeffrey Stedfast  <fejj@ximian.com>
3058
3059         * camel-gpg-context.c (gpg_ctx_get_argv): Don't use
3060         --no-auto-key-retrieve, this option has apparently been deprecated
3061         in gpg 1.0.7.
3062
3063 2002-06-27  Jeffrey Stedfast  <fejj@ximian.com>
3064
3065         * camel-gpg-context.c (gpg_ctx_op_step): Loop on our reads while
3066         errno is EINTR or EAGAIN. Also make sure to completely read stdout
3067         and stderr by keeping better state.
3068         (gpg_ctx_parse_status): In the case of a NODATA response from gpg,
3069         try to use the diagnostics that gpg may have written to its
3070         stderr.
3071         (gpg_verify): Check that the gpg process has not exited.
3072         (gpg_ctx_op_wait): Make sure we haven't already exited (as by
3073         gpg_ctx_op_is_exited()) and if we have, retrieve the exit status
3074         from the gpg context.
3075
3076 2002-06-26  Jeffrey Stedfast  <fejj@ximian.com>
3077
3078         * camel-pgp-context.[c,h]: Removed.
3079
3080         * camel-pgp-mime.c (pgp_mime_part_sign_restore_part): Removed.
3081         (pgp_mime_part_sign_prepare_part): Removed.
3082         (camel_pgp_mime_part_sign): Removed.
3083         (camel_pgp_mime_part_verify): Removed.
3084         (camel_pgp_mime_part_encrypt): Removed.
3085         (camel_pgp_mime_part_decrypt): Removed.
3086         (camel_pgp_mime_is_rfc2015_signed): Documented.
3087         (camel_pgp_mime_is_rfc2015_encrypted): Same.
3088
3089 2002-06-26  Jeffrey Stedfast  <fejj@ximian.com>
3090
3091         * camel-multipart-encrypted.c (camel_multipart_encrypted_encrypt):
3092         Oops, this needs to take a userid argument.
3093
3094         * camel-gpg-context.c (gpg_clearsign): Removed (never did anything
3095         anyway).
3096
3097         * camel-pgp-context.c (pgp_clearsign): Removed.
3098
3099         * camel-cipher-context.c (camel_cipher_clearsign): Removed unused
3100         method.
3101
3102         * camel-multipart-encrypted.[c,h]: New class implementing the
3103         multipart/encrypted content type. Contains methods for encrypting
3104         and decrypting a multipart/encrypted MIME object.
3105
3106         * camel-gpg-context.c (gpg_ctx_parse_status): Check for NODATA
3107         too.
3108
3109 2002-06-25  Jeffrey Stedfast  <fejj@ximian.com>
3110
3111         * providers/local/camel-local-provider.c: Remove the #include for
3112         camel-spoold-store.h
3113
3114 2002-06-26  Not Zed  <NotZed@Ximian.com>
3115
3116         * camel-gpg-context.c: Include <sys/time.h> for struct timeval.
3117
3118         * providers/local/camel-local-provider.c
3119         (camel_provider_module_init): Removed spoold provider.  The spool
3120         provider does it now.
3121         (): Spoold doesn't exist anymore, remove its header.
3122
3123 2002-06-25  Not Zed  <NotZed@Ximian.com>
3124
3125         * providers/local/camel-spool-folder.c (camel_spool_folder_new):
3126         Support a new xstatus option - folders update/honour the
3127         Status/X-Status headers in addition to X-Evolution.
3128
3129         * providers/local/camel-local-summary.c
3130         (camel_local_summary_write_headers): If supplied with an
3131         additional status or xstatus arg, write a Status header and/or
3132         X-Status.  Also fix the case of properly terminating the headers
3133         if an xev line isn't supplied.
3134
3135         * providers/local/Makefile.am (libcamellocalinclude_HEADERS,SOURCES):
3136         Removed spoold-store.[ch].
3137
3138         * providers/local/camel-local-provider.c
3139         (camel_provider_module_init): For the spoold type, just use the
3140         spool store instead.
3141
3142         * providers/local/camel-spool-store.h: Added a type field, so the
3143         1 store can implement different types without having to subclass.
3144
3145         * providers/local/camel-spool-store.c
3146         (camel_spool_store_get_toplevel_dir): Removed, inherits from local
3147         store now.
3148         (construct): If we're pointing to a file, treat it as mbox mode,
3149         otherwise treat it as 'elm' mode.
3150         (get_folder): Only test for INBOX in mbox mode.
3151         (get_folder_info_elm): 
3152         (get_folder_info_mbox): Two alternatives for getting folder info,
3153         depending on the type of folder we're looking at.
3154         (get_folder_info_mbox): Make the url include the protocol.
3155         (scan_dir): "
3156
3157         * providers/local/camel-spoold-store.c
3158         (camel_spoold_store_get_toplevel_dir): Removed, inherits from
3159         local store now.
3160
3161         * camel-folder.c (get_message_user_tag): Dont use a
3162         g_return_if_fail for info==NULL.  This is not an error.
3163         (set_message_user_tag): And same here.
3164         (set_message_user_flag): Sigh, and here.
3165         (get_message_user_flag): And here.
3166         (set_message_flags): and here ...
3167         (get_message_flags): Dum de dum, de done at last.
3168
3169         * providers/local/camel-mbox-folder.c (mbox_get_message): Check
3170         for new messages whenever we retrieve one.  In the common
3171         no-update case, this is a single stat.
3172         (mbox_get_message): If we need to rescan, then force a full rescan
3173         to make sure it does the right thing.
3174         (mbox_get_message): Cleanup the exception handling a bit, if we do
3175         get an error, propagate any folder changes anyway as well.
3176         (mbox_set_message_user_flag): Argh more of these stupid g_returns
3177         taht shouldn't be.
3178         (mbox_set_message_user_tag): Here too.
3179         (mbox_set_message_flags): If the read flag is being changed, mark
3180         it as an xevchange (i.e. Status line change).
3181
3182         * providers/local/camel-mbox-summary.c (summary_rebuild): Merged
3183         into summary_update.
3184         (summary_update): Changed to allow it to update existing lists of
3185         messages without clearing out the summary.
3186         (mbox_summary_check): Dont clear the summary, just re-scan.
3187         (message_info_new): Attempt to support the 'Status: RO' elm/pine
3188         thing.
3189         (camel_mbox_summary_encode_status): 
3190         (camel_mbox_summary_decode_status): Util functions for
3191         creating/parsing the Status line.
3192         (camel_mbox_summary_sync_mbox): Write out the status line if we're
3193         going to try support it.
3194         (camel_mbox_summary_xstatus): Implement option to control
3195         read/write of (x-)status.
3196         (message_info_new): Do x-status stuff based on run-time option.
3197         (camel_mbox_summary_sync_mbox): "
3198         (mbox_summary_add): If x-status enabled, then always add
3199         status/x-status headers to message.
3200
3201         * camel-folder-summary.c (summary_assign_uid): If the messageinfo
3202         is already in the summary, AND is the same messageinfo, dont do
3203         anything, return a value to indicate this.
3204         (camel_folder_summary_add): Do nothing if this info already in the
3205         summary, so we can perform updates.
3206
3207 2002-06-24  Not Zed  <NotZed@Ximian.com>
3208
3209         * providers/local/camel-local-summary.c
3210         (camel_local_summary_check_force): New method to force the next
3211         summary check to be a full check, set if a mismatch occurs.
3212
3213         * camel-folder-summary.c (camel_folder_summary_load): If we have
3214         no summary path set, dont do any i/o, rather than abort.
3215         (camel_folder_summary_save): "
3216         (camel_folder_summary_header_load): "
3217
3218         * providers/local/camel-spool-store.h: Inherit from camel mbox
3219         store, even if we override almost everything.
3220
3221         * providers/local/camel-local-folder.c
3222         (camel_local_folder_construct): If the base path points to a file,
3223         use that as the folder path as well.
3224
3225         * providers/local/camel-spool-folder.h: Inherit from
3226         camel-mbox-folder.
3227
3228         * providers/local/camel-spool-summary.c (spool_summary_sync_full):
3229         Use camel_mbox_summary_sync_mbox to do most of the work.
3230
3231         * providers/local/camel-spool-summary.[ch]: Make spool-summary
3232         inherit from mbox summary rather than foldersummary.
3233
3234         * providers/local/camel-mbox-summary.c (mbox_summary_sync): Make
3235         sync_full/quick virtual methods.
3236         (camel_mbox_summary_sync_mbox): The full sync method put into a
3237         simple function that sync's from fd to fd.
3238         (mbox_summary_sync_full): Use summary_sync_mbox to do the real
3239         work.
3240         (mbox_summary_check): Create removed events if the folder gets
3241         cleared.  Also, dont clear the summary before a rebuild, try to
3242         merge.
3243
3244 2002-06-25  Jeffrey Stedfast  <fejj@ximian.com>
3245
3246         * camel-gpg-context.c: #include <sys/time.h>
3247
3248 2002-06-25  Jeffrey Stedfast  <fejj@ximian.com>
3249
3250         * camel-gpg-context.c (gpg_hash_str): Return the option as
3251         --digest-algo=<micalg>
3252         (gpg_ctx_parse_status): Decode more status information and keep
3253         track of trust and such.
3254         (gpg_ctx_op_complete): Make sure we aren't waiting for gpg to
3255         write data to stdout (such as encrypted/decrypted data or a
3256         signature).
3257         (gpg_encrypt): Remove the fejj@stampede.org hard-coded value
3258         (which had only meant to be for testing).
3259
3260 2002-06-24  Jeffrey Stedfast  <fejj@ximian.com>
3261
3262         * camel-gpg-context.c (gpg_ctx_get_argv): Use --command-fd rather
3263         than --passphrase-fd since what we really want is an interactive
3264         mode (besides, --passphrase-fd requires a passphrase to be sent
3265         before --status-fd will send a NEED_PASSPHRASE status message).
3266         (gpg_ctx_parse_status): When we encounter a BAD_PASSPHRASE, tell
3267         the session to uncache it.
3268         (camel_gpg_context_set_always_trust): Implemented.
3269
3270 2002-06-23  Jeffrey Stedfast  <fejj@ximian.com>
3271
3272         * camel-gpg-context.c (gpg_ctx_parse_status): Check for ERRSIG
3273         also.
3274         (gpg_ctx_op_step): Don't try writing a passphrase unless our
3275         operation requires it.
3276
3277 2002-06-22  Jeffrey Stedfast  <fejj@ximian.com>
3278
3279         * camel-gpg-context.c (gpg_encrypt): Return -1 on error.
3280         (gpg_decrypt): Same.
3281         (gpg_sign): Again here.
3282         (gpg_ctx_op_step): Only attenmpt to read from the status-fd if we
3283         are not already 'complete'.
3284
3285         * camel-pgp-mime.c (camel_pgp_mime_part_encrypt): Flush the
3286         filtered stream.
3287
3288 2002-06-21  Jeffrey Stedfast  <fejj@ximian.com>
3289
3290         * camel-gpg-context.[c,h]: New source files implementing the
3291         CamelCipherContext class for gnupg.
3292
3293         * camel-pgp-context.c (camel_pgp_context_new): Return a
3294         CamelCipherContext.
3295
3296         * camel-pgp-mime.c (camel_pgp_mime_part_decrypt): Take a
3297         CamelCipherContext argument rather than a CamelPgpContext since we
3298         now have a CamelGpgContext also.
3299         (camel_pgp_mime_part_encrypt): Same.
3300         (camel_pgp_mime_part_verify): Same.
3301         (camel_pgp_mime_part_sign): Same.
3302
3303 2002-06-20  Jeffrey Stedfast  <fejj@ximian.com>
3304
3305         * camel-digest-folder.c: Updated to support searching as well as
3306         making it use CamelDigestSummary.
3307
3308         * camel-digest-summary.[c,h]: New class to handle the summary for
3309         CamelDigestFolder.
3310
3311         * camel-tcp-stream-ssl.c (set_errno): PR_IO_TIMEOUT_ERROR should
3312         map to ETIMEDOUT and not EAGAIN.
3313         (stream_connect): Reset the PR_Poll() timeout back to 2 minutes as
3314         this wasn't the problem afterall.
3315
3316 2002-06-19  Not Zed  <NotZed@Ximian.com>
3317
3318         * camel-mime-parser.c (folder_scan_drop_step): Drop back to
3319         initial state if we came from eof state.
3320
3321 2002-06-19  Jeffrey Stedfast  <fejj@ximian.com>
3322
3323         * camel-tcp-stream-ssl.c (stream_connect): Set the poll timeout to
3324         be PR_INTERVAL_MIN, this one shouldn't need to be 2 minutes (plus
3325         it blocks my connection at home for far too long).
3326
3327         * providers/imap/camel-imap-folder.c (imap_refresh_info): Make
3328         sure we hold the command_lock before accessing current_folder.
3329         (imap_append_online): Same.
3330         (imap_transfer_online): Same.
3331
3332         * providers/imap/camel-imap-store.c (delete_folder): We need to
3333         hold the command_lock before we can set the current_folder to
3334         NULL.
3335         (rename_folder): Same.
3336         (get_folder_info_online): We need to make sure we hold the
3337         command_lock in order to use current_folder.
3338         (everywhere): Same.
3339
3340 2002-06-19  Jeffrey Stedfast  <fejj@ximian.com>
3341
3342         * providers/smtp/camel-smtp-transport.c (smtp_connect): Don't
3343         bother trying to authenticate (and thus don't throw up an error
3344         dialog) unless the server is an ESMTP server and supports
3345         authentication.
3346
3347         * camel-sasl-plain.c: Change the user-friendly name to PLAIN, this
3348         is what it should be. Not "Password" because user's immediately
3349         think that they need authentication when they see "Password" even
3350         if they don't need it at all.
3351
3352 2002-06-17  Jeffrey Stedfast  <fejj@ximian.com>
3353
3354         * camel-vee-folder.c (camel_vee_folder_add_folder): Update the
3355         freeze state of the new source folder.
3356         (camel_vee_folder_remove_folder): Undo any freeze state that we
3357         have imposed on this source folder.
3358
3359 2002-06-14  Jeffrey Stedfast  <fejj@ximian.com>
3360
3361         * camel-vee-folder.c (vee_freeze): Freeze source folders.
3362         (vee_thaw): Thaw all source folders. Fixes bug #24317.
3363
3364         * providers/imap/camel-imap-folder.c (imap_sync_online): Unlock
3365         the command_lock after each UID STORE command so that other
3366         (probably more important) threads can send their requests.
3367
3368         * camel-arg.c:
3369         * camel-disco-diary.c:
3370         * camel-index-control.c:
3371         * camel-mime-part.c:
3372         * camel-pgp-mime.c:
3373         * camel-store.c:
3374         * camel-tcp-stream-ssl.c:
3375         * camel-text-index.c: Fixed compiler warnings.
3376
3377         * camel-multipart-signed.c: Updated to use ctx->sign_protocol
3378         rather than ctx->protocol.
3379
3380         * camel-cipher-context.h: Add an ecnryption protocol member.
3381
3382         * camel-pgp-context.c (camel_pgp_context_init): Set the encryption
3383         protocol.
3384
3385 2002-06-11  Not Zed  <NotZed@Ximian.com>
3386
3387         * camel-vtrash-folder.c (camel_vtrash_folder_class_init): Our
3388         parent class is camel_vee_folder, not camel_folder, fix setting of
3389         parent folder (unused anyway, but removes a run-time warning).
3390
3391 2002-06-07  Not Zed  <NotZed@Ximian.com>
3392
3393         * camel-pgp-context.c (camel_pgp_context_init): Duh!  The protocol
3394         is application/pgp-signature.  TODO: need to have a signed and an
3395         encrypted protocol specified separately.
3396
3397 2002-06-06  Not Zed  <NotZed@Ximian.com>
3398
3399         * camel-folder-thread.c (thread_summary): Do the work here.
3400         (camel_folder_thread_messages_remove): Implement.  Remove some
3401         uid's from the tree.   Disalbe from build, for now.
3402         (remove_uid_node_rec): Actually do the work.
3403         (camel_folder_thread_messages_add): Implement.  Add some summary
3404         items to the tree.  Disable from build though.
3405         (camel_folder_thread_messages_apply): Make a thread tree built
3406         using camel_folder_thread_new() map to a new set of uids,
3407         preserving some order.  Meant primarily to manage deleted + added
3408         uids in a user-friendly manner.
3409
3410 2002-06-09  Jeffrey Stedfast  <fejj@ximian.com>
3411
3412         * camel-multipart-signed.c (camel_multipart_signed_verify): Use
3413         CAMEL_EXCEPTION_SYSTEM rather than '1' for clarity.
3414
3415 2002-06-07  Jeffrey Stedfast  <fejj@ximian.com>
3416
3417         * camel-tcp-stream-ssl.c (stream_connect): Up the timeout on the
3418         connect code to 2 minutes.
3419
3420 2002-06-05  Dan Winship  <danw@ximian.com>
3421
3422         * camel-mime-utils.c (header_decode_mailbox): Parse
3423         "From: Dan Winship <danw>" (with no domain) in the way the sender
3424         meant it, even though it's completely wrong.
3425
3426 2002-06-04  Not Zed  <NotZed@Ximian.com>
3427
3428         * providers/local/camel-local-provider.c: Remove the
3429         CONF_DEFAULT_PATH entry, as this is handled by the url config
3430         stuff.  This made it basically impossible to configure any local
3431         folder from the gui.
3432
3433         * providers/local/camel-local-folder.c (local_refresh_info): Force
3434         a refresh.  Should work for all local folders to force them to
3435         refresh.
3436
3437         * providers/local/camel-maildir-folder.c (maildir_refresh_info):
3438         Removed, moved into camel-local-folder.
3439
3440         * providers/local/camel-mh-summary.c (mh_summary_next_uid_string):
3441         Once we assign or get a uid, tell the summary of this, so the next
3442         uid we get will be higher than any previously.
3443
3444         * camel-object.c (camel_object_ref, camel_object_unref): I got
3445         sick of casting, these now take void * like they should, and
3446         perform their own run-time type checking.
3447
3448         * providers/local/camel-mh-store.c (recursive_scan): Changed to
3449         use stat, not lstat (*shrug* maybe someone wants to softlink their
3450         maildir tree?).
3451         (inode_hash):
3452         (inode_equal):
3453         (inode_free): Copied from camel-maildir store (should put into
3454         camel-local-store or utils?).
3455         (recursive_scan): Changed to check for re-visiting inodes.  Also,
3456         it builds the tree itself, rather than using folder_info_build.
3457         (add_folder): Changed to folder_info_new.
3458         (recursive_scan): Properly honour the recursive flag.  Also,
3459         lookup unread count from folder.
3460         (folder_info_new): Init unread message count to -1, since we dont
3461         know yet.
3462         (folder_info_new): Take the name as an argument, and perform the
3463         merging here.
3464         (folders_update): Util func to add/remove folders from .folders
3465         file.  I'm assuming its sorted.
3466         (get_folder): Add the folder to .folders if we created a new one,
3467         and if it exists.
3468         (delete_folder): Remove from .folders, etc.
3469         (folders_scan): If we have a .folders file, read and use that
3470         instead.
3471         (recursive_scan): Handle scanning from a particular directory
3472         properly.
3473         (rename_folder): Implement so we can track any changes to the
3474         .folders file if its turned on.
3475
3476         ** Applied patch below from Greg Hudson.
3477         
3478 2002-05-10  Greg Hudson  <ghudson@mit.edu>
3479
3480         * camel-mh-store.c (get_inbox, get_folder_info, recursive_scan,
3481         add_folder): Implement support for MH stores.
3482
3483         * camel-mh-summary.c (mh_summary_check, sort_uid_cmp): Sort MH
3484         messages by message number (uid), like we sort maildir messages by
3485         date.
3486
3487         * camel-local-provider.c (mh_provider): Turn on source and store
3488         flags.
3489
3490 2002-06-03  Not Zed  <NotZed@Ximian.com>
3491
3492         * camel-vee-folder.c (camel_vee_folder_add_folder):
3493         (folder_changed_change):
3494         (folder_changed_remove_uid):
3495         (folder_changed_add_uid):
3496         (vee_folder_build_folder): Check that any unmatched operation is
3497         not concerning any vfolder.  Other vfolders should never be part of any
3498         unmatched handling.  For #24615, and others probably.
3499
3500 2002-06-02  Not Zed  <NotZed@Ximian.com>
3501
3502         * camel-sasl.c (camel_sasl_new): 
3503         (camel_sasl_finalize): setup/free the mech string.
3504
3505         * camel-sasl.h: Added 'mech' mechanism string.
3506
3507 2002-06-01  Not Zed  <NotZed@Ximian.com>
3508
3509         * providers/imap/camel-imap-folder.c (imap_getv): Implement.  Only
3510         the object_description arg.
3511         (camel_imap_folder_get_type): Init parent_class holder.
3512
3513         * providers/local/camel-local-folder.c (local_getv): Implement,
3514         object_description arg.
3515
3516         * camel-folder.c (folder_getv): Implement, add a bunch of args you
3517         can get -> camel_folder_get_unread_count etc will be going RSN i
3518         hope.
3519         (camel_folder_finalize): Free cached description string.
3520
3521         * camel-object.c (cobject_getv): Implement
3522         CAMEL_OBJECT_ARG_DESCRIPTION, just return the classname of the
3523         object.
3524         (camel_object_getv): 
3525         (camel_object_get): 
3526         (camel_object_setv): 
3527         (camel_object_set): Take object = void *, to simplify usage.
3528         (camel_object_setv): Removed unecessary locals.
3529         (camel_object_getv): Same.
3530         (camel_object_free): New method, free an arg, upto implementations
3531         whether args are static/const or not.
3532         (cobject_free): Implement a dummy do nothing free.
3533
3534 2002-05-31  Not Zed  <NotZed@Ximian.com>
3535
3536         * camel-vee-folder.c (camel_vee_folder_get_location): new function
3537         to get the real location (folder) (and uid) of a vfolder object.
3538         Using the folderinfo, since we already have it, maybe it should
3539         use the uid.
3540
3541 2002-05-31  Jeffrey Stedfast  <fejj@ximian.com>
3542
3543         * providers/imap/camel-imap-folder.c (get_content): When the part
3544         is a multipart/signed, make sure to free the part_spec before
3545         returning (the other types already did this properly).
3546
3547         * providers/imap/camel-imap-message-cache.c
3548         (camel_imap_message_cache_get): Free the path buffer when we're
3549         done with it.
3550
3551         * providers/imap/camel-imap-folder.c (imap_update_summary): Free
3552         the final tagged response buffer.
3553
3554         * providers/imap/camel-imap-command.c (imap_read_untagged): If we
3555         fail to read a literal, free the temporary string buffer.
3556
3557         * providers/imap/camel-imap-folder.c (imap_rescan): Revert my fix
3558         from the other day since camel_imap_command_response() doesn't
3559         guarentee that resp will be set to NULL on error.
3560
3561         * camel-data-cache.c (camel_data_cache_get): If we fail to be able
3562         to create a stream to insert into the cache, then free the 'real'
3563         path.
3564
3565 2002-05-30  Not Zed  <NotZed@Ximian.com>
3566
3567         * camel-cipher-context.h: Added a protocol field for users to use.
3568
3569         * camel-stream-filter.c (do_read): Sigh, the pre-size is READ_PAD
3570         not READ_SIZE.  Big difference.
3571         (READ_PAD): Bumped upto 128 from 64, so we can fit a typical line
3572         in full.
3573
3574         * providers/imap/camel-imap-folder.c (get_content): Changed to
3575         load multipart/signed as an opaque block into the right kind of
3576         object.
3577
3578         * camel-multipart.h (struct _CamelMultipart): Removed the boundary
3579         field.  It wans't actually used anywhere.
3580
3581         * camel-seekable-substream.c
3582         (camel_seekable_substream_new_with_seekable_stream_and_bounds):
3583         Shortened this stupidly long name to just :new(), its the only way
3584         its ever used.  Fixed all callers.
3585
3586         * camel-multipart-signed.[ch]: new wrapper for multipart/signed
3587         types.  We need to treat the entire content as a blob of data for
3588         transport purposes.  This also cleans up a lot of the sign/verify
3589         handling.
3590
3591         * camel-mime-part-utils.c
3592         (camel_mime_part_construct_content_from_parser): Just call
3593         camel_multipart_construct_from_parser for multipart parts, also
3594         use a multipart_signed for multipart/signed types.
3595
3596         * camel-multipart.c (camel_multipart_construct_from_parser): New
3597         virtual function for multiparts to buld themselves.
3598         (construct_from_parser): Implement for normal multiparts.
3599         (toplevel): Got rid of a warning, it'll never be an abstract
3600         class.
3601
3602         * camel-pgp-context.c (pgp_hash_to_id): 
3603         (pgp_id_to_hash): Implement.
3604         (camel_pgp_context_init): Init the pgp protocol specifier.
3605
3606         * camel-cipher-context.c (camel_cipher_id_to_hash): 
3607         (camel_cipher_hash_to_id): Util virtual methods to handle the
3608         cipher id string.
3609
3610         * camel-mime-filter-canon.[ch]: A new filter, end/start of line
3611         canonicalisation filter.  Can escape "From " and strip trailing
3612         whitespace, and canonicalise the end of line to crlf or to lf.
3613
3614 2002-05-29  Not Zed  <NotZed@Ximian.com>
3615
3616         * camel-multipart.h (struct _CamelMultipart): Removed the
3617         'parent', nothing used it, anywhere.  Cleaned up some formatting
3618         slightly.
3619
3620 2002-05-30  Jeffrey Stedfast  <fejj@ximian.com>
3621
3622         * providers/imap/camel-imap-store.c (camel_imap_store_readline):
3623         On error, don't leak the GByteArray buffer.
3624
3625         * providers/imap/camel-imap-folder.c (imap_rescan): Free the
3626         response before checking for errors. I'm not sure this'll actually
3627         fix the memory leak here, but it might? Certainly can't hurt.
3628
3629         * camel-block-file.c (camel_block_file_finalise): Destroy the
3630         blocks hash table.
3631
3632 2002-05-29  Jeffrey Stedfast  <fejj@ximian.com>
3633
3634         * providers/imap/camel-imap-store.c (connect_to_server): Only free
3635         the LOGOUT response if it is non-NULL.
3636
3637 2002-05-28  Not Zed  <NotZed@Ximian.com>
3638
3639         * providers/local/camel-maildir-folder.c (maildir_refresh_info):
3640         Implement.  Run a summary check to update for any newly arrived
3641         messages.
3642
3643         * providers/local/camel-maildir-store.c (scan_dir): If we have a
3644         folder, execute a refresh_info on it, to suck in any new stuff.
3645
3646 2002-05-28  Jeffrey Stedfast  <fejj@ximian.com>
3647
3648         * camel-filter-driver.c (camel_filter_driver_log): Use the
3649         CamelMessageInfo rather than the CamelMimeMessage because the
3650         message may not have been loaded (thus NULL).
3651
3652 2002-05-27  Jeffrey Stedfast  <fejj@ximian.com>
3653
3654         * providers/smtp/camel-smtp-transport.c (connect_to_server): On
3655         connection failure, unref the tcp stream.
3656
3657         * providers/pop3/camel-pop3-store.c (connect_to_server): On
3658         connection failure, unref the tcp stream.
3659
3660         * providers/imap/camel-imap-store.c (connect_to_server): On
3661         connection failure, unref the tcp stream.
3662
3663         * providers/nntp/camel-nntp-store.c (nntp_store_query_auth_types):
3664         Our parent class is no longer CamelRemoteStore.
3665         (nntp_store_init): Same.
3666         (camel_nntp_store_get_type): Here too.
3667         (nntp_connect): Rewritten to try to connect via SSL. Also remove
3668         code using CamelRemoteStore.
3669         (camel_nntp_command): Don't call camel_remote_store_connected().
3670
3671 2002-05-24  Jeffrey Stedfast  <fejj@ximian.com>
3672
3673         * providers/imap/camel-imap-folder.c (content_info_get_part_spec):
3674         Helps if we allocate enough space here. Also, start smoking the
3675         same purple flavoured IMAP crack when counting parts (parts don't
3676         count if their parent part is a message/* part with a parent
3677         part). Fixes bug #25260.
3678
3679 2002-05-24  Jeffrey Stedfast  <fejj@ximian.com>
3680
3681         * providers/imap/camel-imap-command.c (imap_read_untagged): Use
3682         the new readline function.
3683
3684         * providers/imap/camel-imap-store.c (connect_to_server): Use the
3685         new camel_imap_store_readline() function which doesn't suck quite
3686         as bad as the original camel_remote_store_recv_line() function.
3687         (camel_imap_store_readline): New function to replace
3688         camel_remote_store_recv_line(). This function is at least safe
3689         with embedded nul chars. Not that any of our callers use it
3690         *sigh*.
3691
3692 2002-05-24  Jeffrey Stedfast  <fejj@ximian.com>
3693
3694         * providers/imap/camel-imap-store.c (connect_to_server): Added
3695         some NULL protection fixes.
3696
3697 2002-05-22  Jeffrey Stedfast  <fejj@ximian.com>
3698
3699         * camel-remote-store.c: Removed from the build. Glory glory
3700         hallelujah.
3701
3702         * camel-disco-store.c: Updated to inherit from
3703         CamelStore rather than CamelRemoteStore.
3704
3705         * providers/imap/camel-imap-command.c (imap_command_start): Don't
3706         use the camel-remote-store shit to send a string. Just use
3707         camel_stream_printf for chrissakes.
3708
3709         * providers/imap/camel-imap-store.c: Updated to not depend on
3710         CamelRemoteStore and to handle STARTTLS.
3711         (imap_disconnect_online): Unref the streams.
3712         (imap_keepalive): Removed.
3713         (camel_imap_store_connected): New function to replace
3714         camel_remote_store_connected().
3715         (camel_imap_store_finalize): Unref the streams.
3716         (camel_imap_store_recv_line): New function to replace
3717         camel_remote_store_recv_line().
3718         (imap_get_capability): Renamed from connect_to_server
3719         (connect_to_server): New function to try and connect to the
3720         server.
3721         (connect_to_server_wrapper): New wrapper function around
3722         connect_to_server that takes the ssl modes into consideration.
3723         (query_auth_types): Don't bother calling our parent's
3724         implementation of query_auth_types() since CamelDiscoStore doesn't
3725         have any anyway.
3726         (imap_get_name): New method to implement CamelService::get_name
3727
3728 2002-05-18  Not Zed  <NotZed@Ximian.com>
3729
3730         * camel-search-private.c (camel_utf8_getc): If we get an invalid
3731         start char, just ignore it and goto the next character.
3732
3733 2002-05-16  Jeffrey Stedfast  <fejj@ximian.com>
3734
3735         * providers/imap/camel-imap-store.c (get_folder_offline): Don't
3736         call some retarded function to simply set an exception.
3737
3738         * camel-filter-search.c (get_label): New e-sexp callback function
3739         to get a user_tag label value.
3740
3741 2002-05-15  Jeffrey Stedfast  <fejj@ximian.com>
3742
3743         * providers/imap/camel-imap-utils.c
3744         (imap_parse_namespace_response): New function to parse a NAMESPACE
3745         response properly.
3746         (imap_namespaces_destroy): New function to destroy the returned
3747         structure from the above function.
3748
3749 2002-05-15  Jeffrey Stedfast  <fejj@ximian.com>
3750
3751         * camel-service.c (service_setv): Only reconnect if we are already
3752         connected, if we are in a disconnected state then no need to
3753         reconnect.
3754
3755         * providers/imap/camel-imap-folder.c (get_content): If the
3756         part_spec is an empty string for a leaft part, use "1" since we
3757         don't actually want to get the raw message headers too.
3758
3759 2002-05-15  Not Zed  <NotZed@Ximian.com>
3760
3761         * providers/imap/camel-imap-store.c (refresh_folder_info): removed.
3762         (imap_store_refresh_folders): Copy the folders first, then refresh
3763         them, outside of the cache_lock, which could cause deadlocks
3764         because of a workaround for crappo exchange.
3765         (imap_disconnect_online): Dont pass an exception to LOGOUT
3766         command.  The required response 'BYE' always sets an exception
3767         when we call LOGOUT.  This also interfered with a lot of other
3768         processing causing partial failures and messed up offline/online
3769         state.
3770
3771         * camel-disco-folder.c (disco_prepare_for_offline): Do progress
3772         reporting.
3773
3774 2002-05-14  Jeffrey Stedfast  <fejj@ximian.com>
3775
3776         Fixes bug #24136.
3777
3778         * providers/imap/camel-imap-folder.c (content_info_get_part_spec):
3779         New function to take a CamelMessageContentInfo and generate a
3780         part-specification string.
3781         (get_content): Stop passing around part_spec strings and use
3782         content_info_get_part_spec instead.
3783
3784         * camel-folder-summary.c (camel_content_info_dump): Made this into
3785         a public debugging function.
3786
3787         * providers/imap/camel-imap-utils.c (imap_parse_body): Make sure
3788         to set the parent of any message/rfc822 subparts.
3789
3790 2002-05-13  Jeffrey Stedfast  <fejj@ximian.com>
3791
3792         * providers/imap/camel-imap-folder.c (imap_get_message): Previous
3793         fix reverted.
3794
3795 2002-05-13  Jeffrey Stedfast  <fejj@ximian.com>
3796
3797         * providers/imap/camel-imap-store.c (camel_imap_store_class_init):
3798         Overload the setv/getv CamelObject virtual methods.
3799         (imap_setv): Implemented.
3800         (imap_getv): Implemented.
3801
3802 2002-05-13  Dan Winship  <danw@ximian.com>
3803
3804         * camel-folder.c (camel_folder_append_message): Add a "char
3805         **appended_uid" argument, for the caller to optionally pass in a
3806         variable to receive the UID of the appended message (if the
3807         provider knows it).
3808         (camel_folder_transfer_messages_to): Likewise, add "GPtrArray
3809         **transferred_uids"
3810         (transfer_messages_to): Update default implementation to handle
3811         transferred_uids.
3812
3813         * camel-disco-folder.c (disco_append_message,
3814         disco_transfer_messages_to): Update for API changes.
3815
3816         * camel-disco-diary.c (camel_disco_diary_replay): Update the
3817         diary's temporary uid->real uid map when replaying appends and
3818         transfers.
3819
3820         * providers/imap/camel-imap-folder.c (imap_append_offline,
3821         imap_append_online, imap_transfer_offline): Pass back the new
3822         UIDs, when requested and available.
3823         (imap_append_resyncing): Pass back the new UIDs when requested and
3824         available. Remove the diary uidmap managing code since
3825         CamelDiscoDiary can handle that itself now.
3826         (imap_transfer_online, imap_transfer_resyncing): Update for new
3827         APIs, but don't actually pass back the new UIDs yet. (It's tricky
3828         since the COPYUID response may not be in the same order as the
3829         input uids.)
3830         
3831         * providers/local/camel-maildir-folder.c (maildir_append_message):
3832         Pass back the new UID if requested.
3833
3834         * providers/local/camel-mbox-folder.c (mbox_append_message):
3835         Likewise.
3836
3837         * providers/local/camel-mh-folder.c (mh_append_message): Likewise.
3838
3839         * providers/local/camel-spool-folder.c (spool_append_message):
3840         Likewise.
3841
3842         * camel-digest-folder.c (digest_append_message,
3843         digest_transfer_messages_to): Update for API changes.
3844
3845         * camel-filter-driver.c (camel_filter_driver_filter_message,
3846         do_copy, do_move): Update for API changes.
3847
3848         * camel-vee-folder.c (vee_append_message,
3849         vee_transfer_messages_to): Likewise.
3850
3851         * camel-vtrash-folder.c (vtrash_append_message,
3852         vtrash_transfer_messages_to): Likewise. 
3853
3854 2002-05-13  Not Zed  <NotZed@Ximian.com>
3855
3856         * camel-folder-thread.c
3857         (camel_folder_thread_messages_new_summary):
3858         (camel_folder_thread_messages_new): Since the fix for #3357 uses
3859         'order=0' to indicate tree structure nodes, make sure we dont
3860         actually set order=0 for valid messages, otherwise we silently
3861         lose duplicates of the first message (i==0).  Fixes #19920.
3862
3863 2002-05-10  Jeffrey Stedfast  <fejj@ximian.com>
3864
3865         * providers/imap/camel-imap-folder.c (imap_get_message): Fetch the
3866         BODYSTRUCTURE rather than BODY since BODY seems to be lacking some
3867         of the data we need. This fixes bug #24136.
3868
3869         * camel-transport.c (camel_transport_get_type): Might help if we
3870         called camel_transport_class_init.
3871
3872 2002-05-10  Dan Winship  <danw@ximian.com>
3873
3874         * camel-folder.c (camel_folder_transfer_messages_to): Replace
3875         copy_messages_to and move_messages_to with a single function that
3876         just takes a "delete_originals" flag. Also, use the vtrash
3877         implementation if *either* folder is a vtrash.
3878         (transfer_messages_to): Make this use camel_operation_progress
3879         (previously move_messages_to did but copy_messages_to didn't), and
3880         freeze/thaw the folder(s) if doing multiple messages.
3881
3882         * camel-vtrash-folder.c (vtrash_transfer_messages_to): Update for
3883         move/copy merge. Move the "move messages into vtrash" code here
3884         from mail-ops.c. Now all of the vtrash move/copy special casing is
3885         in camel instead of half of it being here and half in mail/. (This
3886         should also make it so that "Move to Trash" will work in filter
3887         rules.)
3888
3889         * camel-vee-folder.c (vee_transfer_messages_to): Make this just
3890         return an exception, since it will only be called when trying to
3891         move/copy messages from one vfolder to another.
3892         (vee_append_message): Add this too so we get a nicer error message
3893         than the default "unimplemented" one in camel-folder.c.
3894
3895         * camel-digest-folder.c: Replace copy_messages_to and
3896         move_messages_to with transfer_messages_to.
3897
3898         * camel-disco-folder.c: Likewise
3899
3900         * camel-disco-diary.c (camel_disco_diary_log,
3901         camel_disco_diary_replay): replace MOVE/COPY with TRANSFER.
3902
3903         * providers/imap/camel-imap-folder.c (imap_transfer_offline,
3904         imap_transfer_online, imap_transfer_resyncing): Update for
3905         changes. (This ends up being a bit more complicated than it was
3906         before for now, but later disconnected operation changes should
3907         resimplify it.)
3908
3909         * camel-filter-driver.c (camel_filter_driver_filter_message,
3910         do_copy, do_move): Use transfer_messages_to instead of copy.
3911
3912 2002-05-09  Jeffrey Stedfast  <fejj@ximian.com>
3913
3914         * camel-filter-search.c (shell_exec): New filter function to pipe
3915         a message to another program.
3916         (run_command): Fixed some bugs to make this work.
3917
3918 2002-05-09  Not Zed  <NotZed@Ximian.com>
3919
3920         * camel-service.c (camel_service_disconnect): Instead of testing
3921         for SERVICE_CONNECTED, we need to also handle SERVICE_CONNECTING
3922         too, as it will often have setup some details before it failed.
3923         Make it !DISCONNECTED (and !DISCONNECTING for recursive calls,
3924         which happen).  Fixes #23782, and maybe also #21604 and many other
3925         random crashes.
3926
3927 2002-05-08  Jeffrey Stedfast  <fejj@ximian.com>
3928
3929         * camel-digest-store.c (digest_setv): Implemented.
3930         (digest_getv): Implemented.
3931
3932         * camel-disco-store.c (disco_setv): Implemented.
3933         (disco_getv): Implemented.
3934
3935         * camel-remote-store.c (remote_store_setv): Implemented.
3936         (remote_store_getv): Implemented.
3937
3938         * camel-transport.c (camel_transport_class_init): Implemented.
3939         (transport_setv): Implemented.
3940         (transport_getv): Implemented.
3941
3942         * camel-store.c (store_setv): Implemented.
3943         (store_getv): Implemented.
3944
3945         * camel-service.c (service_setv): Implemented.
3946         (service_getv): Implemented.
3947
3948         * providers/pop3/camel-pop3-store.c (pop3_try_authenticate):
3949         camel_pop3_engine_iterate doesn't return the state, it returns -1
3950         on fail, 0 when finished processing request or >0 if more ops are
3951         in the queue, so don't check status against CAMEL_POP3_STATE_OK,
3952         instead check pcp->state against that.
3953
3954 2002-05-07  Jeffrey Stedfast  <fejj@ximian.com>
3955
3956         * camel-object.h: s/class/klass for arguments so that c++
3957         developers don't complain later.
3958
3959 2002-05-07  Dan Winship  <danw@ximian.com>
3960
3961         * camel-object.c (camel_object_class_cast): Fix a crash in a
3962         g_warning.
3963
3964 2002-05-07  Not Zed  <NotZed@Ximian.com>
3965
3966         * camel-remote-store.c (remote_send_string): Check for LOGIN xxxx
3967         as well if debug is on, so we dont print passwords to evolution
3968         logs.
3969
3970         * providers/imap/camel-imap-utils.c (imap_is_atom_char): This was
3971         really broken.  1. isprint() is locale dependent, and 2. it looked
3972         up an 8 bit value in a 7 bit table without truncating it.  I've
3973         removed the isprint() stuff and just put it directly into the
3974         special table, which i've expanded to the right size too.
3975
3976         * providers/imap/*: Applied patch from Preston Elder
3977         <prez@magick.tm> to make camel only use literals if it needs to
3978         for simple strings.  Changed slightly to use imap_is_atom() and
3979         more consistent formatting.
3980         * providers/imap/camel-imap-utils.c (imap_is_atom): Changed from
3981         imap_needs_quoting().
3982
3983         ** Merged in camel-object2 branch.  Simpler camelobject
3984         implementation + object args interface.
3985
3986         * camel.c (camel_init): Call camel_object_get_type() to make sure
3987         camel_object_type is initialised.
3988
3989         * camel-object.h (CAMEL_OBJECT_TYPE): Changed to return global
3990         camel_object_type pointer, not call camel_object_get_type.
3991         
3992 2002-05-06  Jeffrey Stedfast  <fejj@ximian.com>
3993
3994         * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): If
3995         the pop3 command status is -1, then we probably have a TCP error
3996         (?) so set a SYSTEM exception so our caller can distinguish
3997         between a "bad password" and a "tcp error".
3998         (pop3_connect): Only uncache the password on "bad password"
3999         errors.
4000
4001         * camel-pgp-mime.c (pgp_mime_part_sign_prepare_part): Use
4002         CamelMimeFilterBestenc to get a more appropriate encoding rather
4003         than just blindling assigning QP.
4004
4005         * providers/imap/camel-imap-folder.c (do_append): Call
4006         camel_mime_message_encode_8bit_parts() which fixes bug #10885.
4007
4008         * camel-tcp-stream-raw.c (socket_connect): Don't bother with
4009         counting down the timeout.
4010
4011 2002-05-02  Jeffrey Stedfast  <fejj@ximian.com>
4012
4013         * camel-stream-fs.c (stream_read): Same fix as the tcp stream.
4014         (stream_write): Again here. Just like tcp stream's stream_write(),
4015         also make sure to save errno before calling fcntl to restore the
4016         fd flags.
4017
4018         * camel-tcp-stream-raw.c (stream_read): Handle EINTR errors for
4019         select().
4020         (stream_write): Same and also preserve errno when setting the fd
4021         flags back. If w == -1, return -1.
4022
4023 2002-05-02  Jeffrey Stedfast  <fejj@ximian.com>
4024
4025         * camel-mime-utils.c (header_decode_mailbox): Fixed the fix for
4026         stupidly-broken-mailer bug #5 to work when multiple unescaped
4027         characters were in a row. Fixes bug #24140.
4028
4029         * camel-tcp-stream-raw.c (socket_connect): Check select() for
4030         EINTR errors.
4031
4032         * camel-pgp-context.c (crypto_exec_with_passwd): Change the order
4033         of some code so that we check if the select() failed before we
4034         check for user-cancellation.
4035
4036         * camel-service.c (camel_gethostbyname): Check for EINTR when
4037         select()ing.
4038         (camel_gethostbyaddr): Same.
4039
4040 2002-04-29  Jeffrey Stedfast  <fejj@ximian.com>
4041
4042         * camel-provider.c (camel_provider_auto_detect): Now takes a
4043         CamelURL argument rather than a GHashTable *settings argument.
4044
4045 2002-04-29  Not Zed  <NotZed@Ximian.com>
4046
4047         * providers/local/camel-spool-store.c (get_folder_info): We want
4048         to set unread_count to get_unread_message_count, not
4049         get_message_count().  Might fix #17174.  Also removed FIXME: as it
4050         was fixed.
4051
4052 2002-04-26  Jeffrey Stedfast  <fejj@ximian.com>
4053
4054         * providers/local/Makefile.am: Don't link to libibex.a anymore.
4055
4056         * providers/nntp/Makefile.am: Same.
4057
4058         * providers/imap/Makefile.am: And again here.
4059
4060         * camel-store-summary.h: No longer want to #include
4061         <libibex/ibex.h>
4062
4063         * camel-provider.c (camel_provider_auto_detect): New function to
4064         auto-detect configuration settings.
4065
4066 2002-04-26  Not Zed  <NotZed@Ximian.com>
4067
4068         * camel-block-file.c (block_file_validate_root): Remove the
4069         excessive \n's, after printfs.
4070
4071         * camel-text-index.c (text_index_compress_nosync): @!#$@#$!@$#!.
4072         Since the rename op was fixed, this broke compression's rename,
4073         resulting in the index 'vanishing' after every compress
4074         (i.e. after every reindex).  Fix this code to account for the
4075         fixed rename operation.
4076
4077 2002-04-25  Jeffrey Stedfast  <fejj@ximian.com>
4078
4079         * providers/smtp/camel-smtp-transport.c (smtp_rcpt): Don't put a
4080         space between the "RCPT TO:" and the "<recipient>" strings -
4081         rfc0821 was not clear on this but it seems rfc2821 defines a
4082         grammar excluding that SP.
4083         (smtp_mail): Same.
4084
4085 2002-04-24  Jeffrey Stedfast  <fejj@ximian.com>
4086
4087         * providers/local/camel-local-provider.c
4088         (camel_provider_module_init): Configure the default paths for mh,
4089         mbox, maildir, spools, etc.
4090
4091         * camel-provider.h: Add a CAMEL_PROVIDER_CONF_LABEL enum and
4092         define some default CamelProviderConfEntry macros.
4093
4094 2002-04-19  Jeffrey Stedfast  <fejj@ximian.com>
4095
4096         * providers/pop3/camel-pop3-folder.c (pop3_refresh_info): Free the
4097         LIST pop3 command.
4098
4099         * camel-data-cache.c (data_cache_finalise): Free the cdc->path.
4100
4101         * camel-multipart.c (write_to_stream): Don't g_return_val_if_fail
4102         here if the boundary is an empty string. See bug #23676 for
4103         details. The way I see it, we have 2 options: 1) leave this fix
4104         the way it is, thus allowing multipart boundaries to be
4105         empty-strings; or 2) make camel_multipart_get_boundary() change
4106         the boundary to something legal if the boundary is an
4107         empty-string. Since the parser should be able to handle an
4108         empty-string boundary *and* more importantly because we want to
4109         keep the same boundaries as the original raw message so as to be
4110         able to verify multipart/signed parts, I vote for solution #1.
4111
4112 2002-04-19  Not Zed  <NotZed@Ximian.com>
4113
4114         * devel-docs/camel-index.txt: Start of a white-paperish document
4115         describing camel-index and older libibex.
4116
4117 2002-04-18  Not Zed  <NotZed@Ximian.com>
4118
4119         * providers/local/camel-local-store.c (rename_folder): If we get a
4120         failure, make sure we set an exception.
4121
4122         * camel-text-index.c (camel_text_index_rename): If the file
4123         doesn't exist, just assume it never did, dont return failure.
4124         (text_index_rename): Add '.index' to the path name we're using,
4125         since we dont get it passed in.
4126
4127         * camel-folder-search.c (check_header): When doing a contains
4128         match, split the words and perform an and on it.
4129         (match_words_messages): If we have an index, but were forced to do
4130         a full search, first lookup a subset of messages using
4131         the index and a simplified word set.  Only do a manual search of
4132         this subset.
4133
4134 2002-04-17  Not Zed  <NotZed@Ximian.com>
4135
4136         * camel-folder-search.c (match_message_index): Changed to take a
4137         utf8 string not a regex pattern.
4138         (match_words_index): Matches against a camel_search_words list.
4139         (match_words_1message): Matches a single message against a
4140         camel_search_words list.
4141         (match_words_message): Same, but gets the message from the folder
4142         for you.
4143         (match_words_messages): Matches a list of messages against a words
4144         list.
4145         (search_body_contains): Rewritten to handle multiple word
4146         searches.  For #23371.
4147
4148         * providers/imap/camel-imap-search.c (sync_match): Split words
4149         when searching, to support multiple search words.  Also, try
4150         searching specifying charset of utf8 if we can, if that fails,
4151         fall back to not specifying charset.  TODO: It should translate
4152         the strings into the locale default charset?
4153
4154         * providers/imap/camel-imap-store.c (connect_to_server): Added new
4155         cap - utf8_search, if set, we tell the server we're searching
4156         using utf8, otherwise we dont (incorrectly, since we always use
4157         utf8 to search).
4158
4159         * camel-search-private.c (camel_ustrstrcase): Make this class public.
4160         (camel_search_words_split): Split a word into multiple words based
4161         on whitespace, and keep track of whether the word is simple
4162         (indexable directly), or not.
4163         (camel_search_words_free): Free 'em.
4164
4165 2002-04-17  Jeffrey Stedfast  <fejj@ximian.com>
4166
4167         * camel-vee-folder.c (vee_search_by_expression): If the vee-folder
4168         is the unmatched, we don't have our own expression so we cannot
4169         merge them. Instead, just use the expression passed in. This fixes
4170         a Null-Pointer-Read crash on Solaris systems at least.
4171
4172 2002-04-16  Jeffrey Stedfast  <fejj@ximian.com>
4173
4174         * camel-filter-driver.c (camel_filter_driver_filter_folder): Get
4175         rid of an unused variable.
4176
4177         * providers/smtp/camel-smtp-transport.c (smtp_helo): Use
4178         camel_gethostbyaddr since gethostbyaddr is not reentrant.
4179
4180         * camel-http-stream.c (http_connect): Updated after the rename of
4181         camel_get_host_byname.
4182
4183         * camel-service.c (camel_gethostbyname): Renamed.
4184         (camel_gethostbyaddr): New cancellable/reentrant version of
4185         gethostbyaddr.
4186
4187 2002-04-14  Jeffrey Stedfast  <fejj@ximian.com>
4188
4189         * providers/local/camel-spoold-store.c: Added #include
4190         <sys/types.h> for dirent.h which needs it on MacOS X.
4191
4192         * providers/local/camel-maildir-store.c: Same.
4193
4194         * providers/nntp/camel-nntp-store.c: Same.
4195
4196         * providers/imap/camel-imap-message-cache.c: Same.
4197
4198         * camel-provider.c: Same.
4199
4200         * camel-data-cache.c: Same.
4201
4202 2002-04-12  Jeffrey Stedfast  <fejj@ximian.com>
4203
4204         * broken-date-parser.c (datetok): Treat commas as token
4205         delimeters.
4206         (WEEKDAY_CHARS): Use full weekday names in case the broken mailer
4207         used the full names.
4208         (MONTH_CHARS): Same as above but for months.
4209
4210 2002-04-15  Not Zed  <NotZed@Ximian.com>
4211
4212         * *.c: Fix callers for api changes to camel-object, mainly
4213         declare_event->add_event, and classfuncs->klass, and a couple
4214         of missing #include <config.h>'s
4215
4216         * camel-arg.[ch], Makefile.am: New support code for
4217         camel_object_get/set arg.
4218
4219         * *.h: Fixed all uses of get_type to return a CamelType rather
4220         than a guint (now a pointer).
4221
4222         * camel-object.[ch]: Major cleanup of object implementation.  Also
4223         added a get/set interface, and some debugging options.
4224
4225 2002-04-11  Not Zed  <NotZed@Ximian.com>
4226
4227         * providers/local/camel-spool-summary.c (spool_summary_sync_full):
4228         If the last message(s) were deleted, and we had any messages
4229         output, account for the lost \n of the following From line by
4230         adding an extra \n. fix for #8214.
4231
4232 2002-04-10  Not Zed  <NotZed@Ximian.com>
4233
4234         * camel-mime-part-utils.c (convert_buffer): If we get a 0 length
4235         input, return a 0 lenght output as valid - fixes bugs with some
4236         iconv impl and its simpler anyway.
4237
4238 2002-04-11  Jeffrey Stedfast  <fejj@ximian.com>
4239
4240         * providers/imap/camel-imap-folder.c: Set the UID_SET_LIMIT value
4241         to 4096. I ran into an issue tonight where apparently the IMAP
4242         server changed the UIDVALIDITY and so Evo needed to re-fetch all
4243         headers and it was trying to send a uid set of some 25k (yes, I
4244         have a very large INBOX). Anyways, it was set to unlimited
4245         before. Courier IMAPd can safely handle up to ~16k per token, but
4246         UW IMAPd can only handle 8k per command-line, so I set it to 4k
4247         just to be safe.
4248
4249 2002-04-10  Jeffrey Stedfast  <fejj@ximian.com>
4250
4251         * camel-mime-part-utils.c (convert_buffer): Fixed a bug that would
4252         miscalculate how much data to copy into the GByteArray (negative
4253         value) thus causing a segfault. Also optimized it while I was at
4254         it.
4255
4256 2002-04-09  Jeffrey Stedfast  <fejj@ximian.com>
4257
4258         * camel-store.c (camel_store_init): Make the folder_lock
4259         recursive. See bug #22363 for details. Basically,
4260         get_folder_info() is requesting a diary folder which in turn
4261         connects which requests then calls get_folder() but deadlocks
4262         because get_folder_info already holds the lock.
4263
4264         * camel-mime-message.c (camel_mime_message_set_date): Don't adjust
4265         the timezone offset if we used tm.tm_gmtoff because it is already
4266         adjusted.
4267
4268 2002-04-09  Not Zed  <NotZed@Ximian.com>
4269
4270         * camel-mime-part.c (construct_from_parser): If we get multiple
4271         Content-Type header values, change subsequent headers to
4272         X-Invalid-Content-Type so it doesn't wreck processing.  This fixes
4273         the reported case in #18929, but i dont know if it fixes the
4274         original posters problems.
4275
4276 2002-04-08  Not Zed  <NotZed@Ximian.com>
4277
4278         * camel-vtrash-folder.c (vtrash_move_messages_to): If we find
4279         we're moving from the vtrash to another folder, we need to convert
4280         the uid from a vfolder uid to the source uid (+8).  Fix for
4281         #20886.  Also changed to batch multiple moves to different folders
4282         so they are done as efficiently as possible rather than one at a
4283         time.
4284
4285         * camel-mime-utils.c (base64_decode_step): If we only get passed
4286         '=', we back track only if we actually output any data.  Fix for
4287         #21716.
4288         (quoted_decode): Pass out size_t instead of int, and use 0 instead
4289         of -1 for error since its not signed.  This will fix similar bug
4290         to above in different circumstances since the result is taken as
4291         unsigned.  This is only an internal func.
4292         (quoted_encode): Return size_t just for consistency.
4293
4294         * camel-block-file.c (block_file_validate_root): Comment out the
4295         debug and move it into a warning when the validation fails.
4296
4297 2002-04-08  Jeffrey Stedfast  <fejj@ximian.com>
4298
4299         * camel-mime-utils.c (uuencode_close): Don't count our filler when
4300         encoding our line-length octet.
4301
4302 2002-04-05  Jeffrey Stedfast  <fejj@ximian.com>
4303
4304         * camel-http-stream.c (http_get_headers): Don't get the statuscode
4305         here anymore.
4306         (http_method_invoke): Use a User-Agent header and do basic proxy
4307         authentication.
4308         (stream_read): Handle redirects.
4309         (camel_http_stream_set_user_agent): New function to allow client
4310         to set the User-Agent string.
4311         (camel_http_stream_set_proxy): New function for setting the proxy
4312         server.
4313         (camel_http_stream_set_proxy_authrealm): New function for setting
4314         the proxy auth realm.
4315         (camel_http_stream_set_proxy_authpass): New function for setting
4316         the proxy auth password.
4317
4318 2002-04-04  Jeffrey Stedfast  <fejj@ximian.com>
4319
4320         * camel-folder-summary.c (message_info_new): Simplified since we
4321         can now decode in-reply-to without getting extra cruft. Get rid of
4322         the FIXME about having to check scan->id because of the
4323         possibility of it being NULL, this can no longer happen.
4324
4325         * camel-mime-utils.c (header_references_inreplyto_decode): New
4326         function to decode in-reply-to headers. Only grabs the first thing
4327         that looks like a message-id and then returns.
4328         (header_references_decode): Loop calling
4329         header_references_decode_single (a new internal function).
4330
4331 2002-04-04  Not Zed  <NotZed@Ximian.com>
4332
4333         * providers/imap/camel-imap-search.c (imap_body_contains): If
4334         (body-contains) is not passed any arguments, return empty/false.
4335         Fixes a crash exposed by #15001.
4336
4337         * camel-remote-store.c (remote_connect): Reset the keepalive
4338         timeout to 10 minutes rather than the 30 seconds I was using for
4339         testing.
4340
4341 2002-04-03  Dan Winship  <danw@ximian.com>
4342
4343         * camel-provider.h (CamelProvider): make service_cache be an array
4344         of CAMEL_NUM_PROVIDER_TYPES elements so you can have a single
4345         provider offer both stores and transports. (Eg, Exchange, NNTP)
4346
4347         * providers/imap/camel-imap-provider.c: Don't initialize
4348         service_cache here. (The session code can do it itself since the
4349         url_hash and url_equal functions are stored as part of the
4350         provider.)
4351
4352         * providers/nntp/camel-nntp-provider.c: Likewise.
4353
4354         * providers/local/camel-local-provider.c: Likewise.
4355
4356         * providers/pop3/camel-pop3-provider.c: Likewise.
4357
4358         * providers/sendmail/camel-sendmail-provider.c: Likewise.
4359
4360         * providers/smtp/camel-smtp-provider.c: Likewise.
4361
4362         * camel-session.c (register_provider): Initialize the provider's
4363         service cache(s) here.
4364         (camel_session_class_init): Don't initialize.
4365         vee_provider.service_cache here.
4366         (camel_session_destroy_provider): Update to destroy multiple
4367         service_caches.
4368         (service_cache_remove, get_service): Tweak these a bit to deal
4369         with multiple service_caches.
4370
4371 2002-04-02  Jeffrey Stedfast  <fejj@ximian.com>
4372
4373         * camel-tcp-stream-ssl.c (set_errno): Handle a ton more nspr i/o
4374         errno's.
4375         (stream_connect): Act as if we are doing a non-blocking
4376         connect. This is to try and work around bug #15120 where users get
4377         an EINPROGRESS error. Maybe importing a PRFileDesc into SSL mode
4378         automagically makes it non-blocking? I dunno.
4379
4380 2002-04-01  Jeffrey Stedfast  <fejj@ximian.com>
4381
4382         * camel-folder-summary.c (message_info_new): Updated the
4383         construction of the references to match JWZ's updated algorithm
4384         initialization (ie, append any In-Reply-To reference onto any
4385         References header and never take more than a single message-id
4386         from the In-Reply-To header since anything after the first will
4387         probably just be email addresses). Fixes bug #1336.
4388
4389 2002-04-03  Not Zed  <NotZed@Ximian.com>
4390
4391         * providers/local/camel-local-folder.c
4392         (camel_local_folder_construct): Turn indexing back on, fingers
4393         crossed ...
4394
4395         * camel-block-file.c (sync_nolock): #!@$@$#@~#$
4396         DF@#$!Q@$#!@$#!#%.  Well it helps if we're iterating a list to
4397         iterate the node pointer ...
4398
4399         * camel-text-index.c (text_index_sync): Sync the key tables
4400         explcitly.
4401         (text_index_sync): Debug out frag info.
4402         (camel_text_index_dump): Added a (rather large, but optional) raw
4403         dumping mode for debugging purposes.
4404
4405         * camel-partition-table.c (camel_key_table_finalise): Sync root
4406         block when done.
4407         (camel_key_table_sync): New function, sync key table (root) explicitly.
4408         (camel_partition_table_sync): Method to explicitly sync the
4409         partition table.
4410
4411 2002-04-02  Not Zed  <NotZed@Ximian.com>
4412
4413         * camel-block-file.c (camel_block_file_free_block): Mark root
4414         block dirty when we change it (this function isn't used yet
4415         anyway).
4416
4417         * camel-text-index.c (text_index_add_name_to_word): Touch the root
4418         block when we modify the counts.  Also, abort processing on any
4419         errors.
4420         (text_index_sync): Fix typo in comments.  Sync the block file
4421         inside the lock.
4422         (text_index_compress_nosync): Lock the old index while we're
4423         compressing.
4424         (text_index_compress_nosync): Remove the bogus while() at the end
4425         of the while() loops!  Also plug a memleak - records weren't
4426         freed.
4427         (text_index_rename): Lock around rename op.
4428         (text_index_add_name): More typos.
4429         (text_index_sync): Touch root when changing it.
4430         (text_index_add_name): "
4431         (text_index_delete_name): "
4432         (camel_text_index_new): Touch root if we change it.
4433         (text_index_cursor_reset): Make sure we NULL pointers after we
4434         free them (nothing uses this yet).
4435
4436         * camel-partition-table.c (hash_key): Remove some debug
4437         accidentally left in.
4438         (camel_partition_table_add): When linking in the next block list,
4439         set the right previous pointer.
4440         (camel_key_table_add): Simplify the 'left' calculation (it was
4441         already ok though).
4442         (camel_key_table_next): Initialise returns before processing.
4443         Broaden the lock slightly, and simplify validity calculations.
4444
4445         * providers/imap/camel-imap-store.c (imap_keepalive): Put back in
4446         the exception setup stuff i disabled for debugging.
4447
4448         * providers/local/camel-local-folder.c
4449         (camel_local_folder_construct): Temporarily disable indexing.
4450
4451 2002-03-28  Not Zed  <NotZed@Ximian.com>
4452
4453         * camel-partition-table.c (camel_key_table_lookup): Change range
4454         checking assert to a warning.
4455
4456         * providers/pop3/camel-pop3-folder.c (pop3_finalize): Make sure we
4457         flush out all outstanding commands before finalising, stops being
4458         finalised while outsanding requests are processed by the store
4459         finalise.
4460         (pop3_get_message): Instead of pre-fetching all messages, just
4461         pre-fetch a maxiumum number at any one time, stops us running out
4462         of cache fd's.
4463         
4464         * providers/nntp/camel-nntp-folder.c (nntp_folder_init/finalise):
4465         Setup priv data + locks, & free.
4466
4467         * providers/imap/camel-imap-folder.c (imap_rescan): Batch all
4468         message_chagned events into a single folder_changed event
4469         (otherwise updates can be >>> expensive, like >5 hours for 80K
4470         messages changing!).  Alternately it could use folder
4471         freeze/unfreeze perhaps.
4472
4473 2002-03-27  Not Zed  <NotZed@Ximian.com>
4474
4475         * providers/imap/camel-imap-store.c (imap_keepalive): Pass an
4476         exception to called code so it behaves properly since it uses the
4477         passed exception to check returns.
4478
4479 2002-04-01  Dan Winship  <danw@ximian.com>
4480
4481         * providers/imap/Makefile.am (libcamelimap_la_LDFLAGS): Use
4482         -avoid-version instead of -version-info 0:0:0, and specify
4483         -module. (From Max Horn <max@quendi.de>).
4484
4485         * providers/local/Makefile.am (libcamellocal_la_LDFLAGS): Likewise.
4486
4487         * providers/nntp/Makefile.am (libcamelnntp_la_LDFLAGS): Likewise.
4488
4489         * providers/sendmail/Makefile.am (libcamelsendmail_la_LDFLAGS):
4490         Likewise.
4491
4492         * providers/smtp/Makefile.am (libcamelsmtp_la_LDFLAGS): Likewise.
4493
4494         * providers/pop3/Makefile.am (libcamelpop3_la_LDFLAGS): Likewise.
4495         Also remove $(KRB4_LDFLAGS) since KPOP is gone.
4496         (INCLUDES): and $(KRB4_CFLAGS)
4497
4498 2002-03-28  Jeffrey Stedfast  <fejj@ximian.com>
4499
4500         * camel-filter-driver.c (do_copy): We now have to check to make
4501         sure that p->message is non-NULL because we only load the message
4502         when we have to.
4503         (do_move): Same here.
4504
4505 2002-03-28  Dan Winship  <danw@ximian.com>
4506
4507         * camel-transport.c (camel_transport_send_to): Change the message
4508         arg to a CamelMimeMessage instead of a CamelMedium. Even the NNTP
4509         provider returns CamelMimeMessages, and we're never going to
4510         support anything more exotic than that. Also do a few more
4511         g_return_if_fails here instead of in the providers.
4512         (camel_transport_can_send): No longer needed.
4513         (camel_transport_send): Remove this too. It wasn't being used any
4514         more, and it doesn't behave exactly the same in sendmail and smtp.
4515
4516         * providers/smtp/camel-smtp-transport.c (smtp_send,
4517         smtp_can_send): Gone.
4518         (smtp_send_to): Update for arg change.
4519         (smtp_data): Make this take a CamelMimeMessage too.
4520
4521         * providers/sendmail/camel-sendmail-transport.c (sendmail_send,
4522         sendmail_can_send): Gone.
4523         (sendmail_send_to): Update for arg change, and merge in the part
4524         that used to be shared with sendmail_send.
4525
4526 2002-03-27  Jeffrey Stedfast  <fejj@ximian.com>
4527
4528         * camel-filter-driver.c (camel_filter_driver_filter_folder):
4529         Construct the source_url the right way. The previous way was
4530         generating urls like pop://fejj@ximian.com;keep_on_server/inbox
4531         which is wrong.
4532
4533 2002-03-26  Not Zed  <NotZed@Ximian.com>
4534
4535         * camel-text-index.c (text_index_normalise): Changed to use just
4536         g_utf8_strdown instead of utf8_normalise, to match the indexing
4537         code.  utf8_normalise is just far too expensive (saves approx 25%
4538         total processing).
4539
4540 2002-03-25  Not Zed  <NotZed@Ximian.com>
4541
4542         * camel-text-index.c (text_index_add_name): When we add a new
4543         name, up all of the cache limits, because we're probably going to
4544         be adding more.
4545         (text_index_sync): Drop the cache limits back down again, we dont
4546         need them when looking words up.
4547
4548         ** MERGE camel_index branch.
4549
4550         * camel-text-index.[ch]: Added files i forgot to add (eep nearly
4551         lost all this work!)
4552
4553         * camel-block-file.c (sync_nolock): Fix an infinite loop in syncing.
4554
4555 2002-03-21  Jeffrey Stedfast  <fejj@ximian.com>
4556
4557         * camel-folder-summary.c (camel_message_info_new_from_header): Use
4558         the date in the received header for the received_date.
4559
4560 2002-03-22  Not Zed  <NotZed@Ximian.com>
4561
4562         * providers/local/camel-local-folder.c
4563         (camel_local_folder_construct): Use the right option to remove the
4564         index file and reset the index file on creation.
4565         (camel_local_folder_construct): Remove any existing '.ibex' files
4566         - these are the old format index files.
4567
4568         * camel-block-file.c (camel_block_file_rename): Lock io lock while
4569         renaming.
4570         (camel_key_file_rename): Lock around rename.
4571         (block_file_validate_root): Implement sync flag checking.
4572         (camel_block_file_touch_block): Turn off the sync flag if we're
4573         touching any non-root block and write it to disk.  Shoudl this
4574         fsync()?
4575         (sync_nolock): sync the root block only if we need to.
4576
4577         * providers/local/camel-local-store.c (rename_folder): Re-enable
4578         index rename code.  Not sure how race-free it is though.
4579         (delete_folder): Delete the index file properly.
4580
4581         * camel-partition-table.c (camel_key_table_lookup): Initialise
4582         output values to 0 before doing anything.
4583         (camel_key_table_add): Do some range-checking on values.
4584
4585         * camel-text-index.c (text_index_compress): Changed to call sync here.
4586         (text_index_compress_nolock): and not here - stops a recursive
4587         sync call when sync performs a compress also.
4588         (text_index_compress_nolock): Change to _nosync, since the locking
4589         is irrelevent (recursive lock).  Fixed callers.
4590         (text_index_add_name_to_word): If we get a failure with key table
4591         ops, fail immediately.
4592         (text_index_compress_nosync): Likewise.
4593         (text_index_write_name): If the nameid is 0, do nothing.
4594         (text_index_add_name): If we can't get a keyid, dont add it to the
4595         partition table.
4596         (camel_text_index_remove): Function to delete an index file.
4597         (text_index_compress_nosync): Clean up temp files when done.
4598
4599         * camel-folder-search.c (match_messages_index): New function,
4600         split from body_contains, matches a regex against all words in an
4601         index.
4602         (match_message_index): Similar to above but matches against an
4603         individual message.
4604         (search_body_contains): Changed to use above functions for
4605         matching - substring matches should now work on indexed data.
4606
4607 2002-03-21  Not Zed  <NotZed@Ximian.com>
4608
4609         * camel-index.c (camel_index_words/names): New virtual
4610         methods/stubs to get a cursor of all words and names.
4611
4612         * camel-text-index.c (text_index_compress_nolock): Split from
4613         text_index_compress, so we can call the compressor while locked
4614         also, removed lock calls.
4615         (text_index_compress): Changed to stub which calls
4616         text_index_compress_nolock.
4617         (camel_text_index_key_cursor_new): New object to iterate through
4618         a key table.
4619         (text_index_words, text_index_names): Implement virtual functions
4620         for iterating through all words or names.
4621
4622         * camel-block-file.c: Turn off some debug.
4623
4624 2002-03-20  Not Zed  <NotZed@Ximian.com>
4625
4626         ** New body index implementation.
4627
4628         * camel-index*: Code for camel index, a new class to replace ibex.
4629
4630         * camel-block-file.[ch]: block-based and link based
4631         filesystem-in-a-file classes.
4632
4633         * camel-partition-table.[ch]: An implementation of a partition
4634         table (automatically extending on-disk hash-table using ideal
4635         hash), and a key-table, a key<>name mapping table.  Used by
4636         camelindex.
4637
4638         * providers/local/*, camel-folder-summary.[ch]: Changed to use
4639         camel-index interface rather than ibex.
4640
4641 2002-03-05  Not Zed  <NotZed@Ximian.com>
4642
4643         * providers/local/camel-maildir-summary.c (maildir_summary_check):
4644         Do progress reporting of operations.
4645         (maildir_summary_sync): Same here.
4646
4647 2002-03-04  Not Zed  <NotZed@Ximian.com>
4648
4649         * providers/local/camel-spoold-store.c (scan_dir): Kill a warning
4650         with a cast.
4651
4652         * providers/local/camel-*.c: Changed for ibex->camelindex.
4653
4654         * camel-folder-search.c (camel_folder_search_set_summary): Init
4655         summary_hash to point to 'static' uid strings.
4656         (search_body_contains): Use the static uid memory to return
4657         results rather than the values from the index library.
4658
4659         * camel-folder-search.[ch]: Changed to use camelindex object.
4660
4661         * camel-folder-summary.c (summary_build_content_info_message):
4662         Use a stream to index content, also filter html mail first.
4663         (camel_folder_summary_info_new_from_message): Use a stream
4664         filtered to index content.
4665         (main): Removed the test main code.  Added headers for open call
4666         (ibex must've had them before).
4667
4668         * camel-folder-summary.[ch]: Changed from ibex to CamelIndex.
4669
4670         * camel-mime-filter-index.c (camel_mime_filter_index_finalize):
4671         Unref index.
4672
4673         * camel-mime-filter-index.[ch]: Changed from ibex to CamelIndex.
4674
4675 2002-03-19  Jeffrey Stedfast  <fejj@ximian.com>
4676
4677         * camel-mime-utils.c (header_encode_param): Fix this to work
4678         right. We need to convert the input buffer to the charset we claim
4679         in the encoded param (duh).
4680
4681 2002-03-18  Jeffrey Stedfast  <fejj@ximian.com>
4682
4683         * providers/smtp/camel-smtp-transport.c
4684         (connect_to_server_wrapper): Updated to use the same logic as the
4685         POP code.
4686
4687         * providers/pop3/camel-pop3-store.c (connect_to_server): No longer
4688         takes a stls_supported argument since we no longer need it with
4689         the new logic.
4690         (connect_to_server_wrapper): New logic: First try connecting to
4691         the SSL port (995 by default), if that fails with
4692         SERVICE_UNAVAILABLE, then we attempt to connect (to port 110 by
4693         default) and try to use STARTTLS.
4694
4695 2002-03-15  Jeffrey Stedfast  <fejj@ximian.com>
4696
4697         * camel-folder.h: 
4698
4699         * camel-private.h: Don't allow any empty structs. If
4700         !ENABLE_THREADS, provide a gpointer dummy member. Fixes bug #6382.
4701
4702 2002-03-13  Jeffrey Stedfast  <fejj@ximian.com>
4703
4704         * providers/smtp/camel-smtp-transport.c (smtp_auth): Added a
4705         work-around for SMTP servers that can't read the RFCs and thus
4706         implement SASL incorrectly. Oh well, that's life in the world of
4707         mail clients I guess.
4708
4709 2002-03-12  Jeffrey Stedfast  <fejj@ximian.com>
4710
4711         * camel-digest-store.c (camel_digest_store_new): Now takes a url
4712         argument.
4713
4714         * camel-digest-folder.c (digest_add_multipart): Fixed some memory
4715         corruption and also modified to use CAMEL_IS_MIME_MESSAGE() rather
4716         than comparing content-type strings.
4717         (digest_get_message): Fixed a logic blooper.
4718
4719         * camel-folder-summary.c (camel_message_info_new_from_header): Set
4720         the date fields of the CamelMessageInfo as well. This may even fix
4721         some filter-related bugs where the user was trying to compare
4722         dates.
4723
4724 2002-03-11  Jeffrey Stedfast  <fejj@ximian.com>
4725
4726         * camel-digest-store.c: A pretty empty store implementation to be
4727         the parent store of a CamelDigestFolder.
4728
4729         * camel-digest-folder.c: Updated to reference it's parent store.
4730
4731 2002-03-11  Jeffrey Stedfast  <fejj@ximian.com>
4732
4733         * camel-digest-folder.c (camel_digest_folder_new): Allow any leaf
4734         part to be a message/rfc822 part.
4735         (digest_get_uids): Recurse the mime structure and add all
4736         message/rfc822 parts and use a uid scheme similar to IMAP's mime
4737         part naming convention.
4738         (digest_get_message): Decode the uid to get the correct mime part.
4739
4740 2002-03-11  Ettore Perazzoli  <ettore@ximian.com>
4741
4742         * camel-mime-utils.c: Change the order of the mailing list magic
4743         patterns so that the more mailing-list specific ones are on the
4744         top.
4745
4746 2002-03-11  Jeffrey Stedfast  <fejj@ximian.com>
4747
4748         These fixes should fix bug #21737.
4749
4750         * providers/smtp/camel-smtp-transport.c
4751         (connect_to_server_wrapper): Same as with the POP code.
4752
4753         * providers/pop3/camel-pop3-store.c (connect_to_server_wrapper):
4754         Slight restructuring of the if-statements for the USE_SSL_ALWAYS
4755         case so that we can't possibly return TRUE unless we really did
4756         connect successfully.
4757
4758 2002-03-10  Dan Winship  <danw@ximian.com>
4759
4760         Rename the OpenSSL implementation of things to match the NSS
4761         implementation so that callers don't need to care which one is
4762         being used.
4763
4764         * camel-tcp-stream-openssl.c: Implement CamelTcpStreamSSL, not
4765         CamelTcpStreamOpenSSL. Rename methods as well. Replace the
4766         camel-tcp-stream-openssl.h include with camel-tcp-stream-ssl.h.
4767
4768         * camel-tcp-stream-openssl.h: Gone.
4769
4770         * camel-tcp-stream-ssl.c: Add a note explaining that this
4771         implementation is only used for NSS, and that OpenSSL's
4772         implementation is in another file. (Should probably do some CVS
4773         renaming magic at some point.)
4774
4775         * camel-http-stream.c (http_connect): Remove OpenSSL refs; the
4776         previously-NSS-specific code works for both now.
4777
4778         * camel-remote-store.c: Likewise.
4779
4780         * providers/smtp/camel-smtp-transport.c: Likewise.
4781
4782         * providers/pop3/camel-pop3-store.c: Likewise.
4783
4784         * Makefile.am (libcamelinclude_HEADERS): Remove
4785         camel-tcp-stream-openssl.h
4786
4787 2002-03-10  Dan Winship  <danw@ximian.com>
4788
4789         * camel-tcp-stream.c (camel_tcp_stream_get_socket): Remove this:
4790         it couldn't be generically used, because different subclasses
4791         returned entirely different types of data.
4792         (camel_tcp_stream_get_local_address,
4793         camel_tcp_stream_get_remote_address): Add these to replace what
4794         get_socket was being used for.
4795         (camel_tcp_address_new, camel_tcp_address_free): Utility functions
4796         for get_{local,remote}_address.
4797
4798         * providers/smtp/camel-smtp-transport.c: Change localaddr to a
4799         CamelTcpAddress *.
4800         (connect_to_server): Call camel_tcp_stream_get_local_address to
4801         get the local IP address.
4802         (smtp_disconnect): free localaddr.
4803         (smtp_helo): Update for localaddr change.
4804
4805         * camel-tcp-stream-raw.c (stream_get_socket): Remove
4806         (stream_get_local_address, stream_get_remote_address): Implement.
4807
4808         * camel-tcp-stream-ssl.c (stream_get_socket): Remove
4809         (stream_get_local_address, stream_get_remote_address): Implement.
4810
4811         * camel-tcp-stream-openssl.c (stream_get_socket): Remove
4812         (stream_get_local_address, stream_get_remote_address): Implement.
4813
4814 2002-03-08  Jeffrey Stedfast  <fejj@ximian.com>
4815
4816         * providers/pop3/camel-pop3-provider.c
4817         (camel_provider_module_init): Don't call
4818         camel_remote_store_get_authtypes since we no longer subclass
4819         camel-remote-store.
4820
4821         * providers/pop3/camel-pop3-engine.c: Added STARTTLS to the
4822         capabilities to look for.
4823         (camel_pop3_engine_reget_capabilities): New function to re-get
4824         capabilities.
4825
4826         * providers/pop3/camel-pop3-store.c: Updated to not subclass
4827         CamelRemoteStore.
4828         (connect_to_server): Rewritten to not depend on CamelRemoteStore's
4829         connect implementation. Also added support for STLS (aka
4830         STARTTLS).
4831
4832 2002-03-07  Jeffrey Stedfast  <fejj@ximian.com>
4833
4834         * camel-pgp-mime.c (camel_pgp_mime_part_sign): Add support for
4835         hash type RIPEMD160.
4836
4837         * camel-cipher-context.h: Add RIPEMD160 hash type.
4838
4839         * camel-pgp-context.c (pgp_sign): Updated to consider hash
4840         function for pgp5 and pgp6.
4841         (pgp_clearsign): Same.
4842
4843         * camel-tcp-stream-openssl.c (stream_read): Add a timeout on the
4844         select.
4845         (stream_write): Same.
4846
4847 2002-03-06  Jeffrey Stedfast  <fejj@ximian.com>
4848
4849         * providers/smtp/camel-smtp-transport.c (connect_to_server): Fix
4850         to work with OpenSSL.
4851
4852         * camel-tcp-stream-openssl.c: compile fixes.
4853         (camel_tcp_stream_openssl_enable_ssl): Check to make sure that the
4854         sockfd != -1, it's not enough to check that it is non-zero. Also
4855         set the sockfd to -1 on fail (open_ssl_connection will close the
4856         sockfd on fail).
4857
4858 2002-03-06  Dan Winship  <danw@ximian.com>
4859
4860         * providers/smtp/camel-smtp-transport.c (smtp_construct): Make
4861         this compile.
4862
4863 2002-03-05  Jeffrey Stedfast  <fejj@ximian.com>
4864
4865         * camel-tcp-stream-ssl.c (save_ssl_cert): Removed. Glory glory
4866         hallelujah!
4867         (ssl_bad_cert): No longer calls ssl_save_cert or
4868         ssl_cert_is_saved.
4869
4870 2002-03-05  Jeffrey Stedfast  <fejj@ximian.com>
4871
4872         * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_new_raw):
4873         Start the ssl stream off in non-ssl mode (useful for STARTTLS).
4874         (camel_tcp_stream_openssl_enable_ssl): New function to toggle an
4875         ssl stream into ssl mode.
4876         (open_ssl_connection): Close the sockfd on fail so our caller
4877         doesn't have to - this also allows us to save the original errno.
4878         (stream_connect): If we want ssl mode, do our ssl stuff.
4879         (camel_tcp_stream_openssl_class_init): Init some SSL stuff here
4880         instead of in open_ssl_connection since these only ever need to be
4881         called once.
4882         (stream_read): Only use SSL_read if we are in ssl mode.
4883         (stream_write): Only use SSL_write if we are in ssl mode.
4884
4885         * providers/smtp/camel-smtp-transport.c (smtp_helo): Check for the
4886         STARTTLS extension.
4887         (connect_to_server): Try to use STARTTLS whenever possible rather
4888         than the old way of doing things.
4889         (connect_to_server_wrapper): Wrapper around connect_to_server() to
4890         first try STARTTLS and then attempt normal SSL mode if we can't
4891         connect via STARTTLS.
4892
4893         * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_enable_ssl): New
4894         function to toggle an ssl stream into ssl mode.
4895         (camel_tcp_stream_ssl_new_raw): Start the ssl stream off in
4896         non-ssl mode (useful for STARTTLS).
4897         (stream_connect): Only connect in SSL mode if required.
4898
4899 2002-03-01  Jeffrey Stedfast  <fejj@ximian.com>
4900
4901         * camel-vtrash-folder.h: 
4902         * camel-vee-store.h: 
4903         * camel-vee-folder.h: 
4904         * camel-stream-null.h: 
4905         * camel-stream-filter.h: 
4906         * camel-store-summary.h: 
4907         * camel-news-address.h: 
4908         * camel-mime-utils.h: 
4909         * camel-mime-parser.h: 
4910         * camel-mime-filter-save.h: 
4911         * camel-mime-filter-linewrap.h: 
4912         * camel-mime-filter-index.h: 
4913         * camel-mime-filter-html.h: 
4914         * camel-mime-filter.h: 
4915         * camel-mime-filter-from.h: 
4916         * camel-mime-filter-crlf.h: 
4917         * camel-mime-filter-chomp.h: 
4918         * camel-mime-filter-charset.h: 
4919         * camel-mime-filter-bestenc.h: 
4920         * camel-mime-filter-basic.h: 
4921         * camel-internet-address.h: 
4922         * camel-folder-thread.h: 
4923         * camel-folder-summary.h: 
4924         * camel-folder-search.h: 
4925         * camel-filter-driver.h: 
4926         * camel-charset-map.h: 
4927         * camel-address.h: Add c++ armoring.
4928
4929         * camel-object.h: s/class/klass
4930
4931 2002-03-01  Jeffrey Stedfast  <fejj@ximian.com>
4932
4933         * camel-mime-part-utils.c
4934         (camel_mime_part_construct_content_from_parser): Reverted my
4935         pgp/mime fixes here too.
4936
4937         * camel-mime-part.c (write_to_stream): Removed my pgp/mime raw
4938         stream hack, this is causing problems such as some messages to not
4939         displaying, view->source not working at all, etc.
4940
4941 2002-02-28  Jeffrey Stedfast  <fejj@ximian.com>
4942
4943         * camel-mime-parser.c: Changed offset variables from int's to
4944         off_t's since the system may support large files.
4945
4946         * camel-mime-part-utils.c
4947         (camel_mime_part_construct_content_from_parser): Rearrange the
4948         save filter stuff so that we save raw streams for all mime
4949         parts. If the mime part turns out to be a multupart, then don't
4950         bother saving the raw stream, we only need to save the raw stream
4951         for leaf parts.
4952
4953 2002-02-27  Jeffrey Stedfast  <fejj@ximian.com>
4954
4955         * camel-folder-summary.h: Don't #include camel-mime-filter-save.h,
4956         we don't use it.
4957
4958         * camel-file-utils.c: Fixed a few 'might be used uninitialized'
4959         warnings which were real problems.
4960
4961         * camel-mime-part-utils.c
4962         (camel_mime_part_construct_content_from_parser): Save the raw mime
4963         stream for any/all signed parts.
4964
4965         * camel-mime-part.c (camel_mime_part_init): Initialize our raw
4966         stream to NULL.
4967         (camel_mime_part_finalize): Unref our raw stream, if we have one.
4968         (write_to_stream): If we have a raw stream, write that out instead
4969         of re-encoding.
4970
4971         * camel-mime-filter-save.[c,h]: Rewritten to save to a stream
4972         rather than a file.
4973
4974 2002-02-28  Not Zed  <NotZed@Ximian.com>
4975
4976         * camel-mime-utils.c (header_fold): Use the FOLD_SIZE as a
4977         recommended folding size, but add a new FOLD_MAX_SIZE (=998, the
4978         smtp max line size) as the hard limit for any output.
4979
4980 2002-02-27  Jeffrey Stedfast  <fejj@ximian.com>
4981
4982         * camel-mime-filter-chomp.c (camel_mime_filter_chomp_new): New
4983         stream filter that chomps excess trailing whitespace from the end
4984         of the stream. This is needed to update the PGP/MIME code to
4985         comply with rfc3156.
4986
4987         * camel-pgp-mime.c (camel_pgp_mime_part_verify): Don't attach a
4988         from filter, if it ain't from-filtered already, then we'll just be
4989         breaking stuff. To become rfc3156 compliant, add a chomp filter
4990         here.
4991         (camel_pgp_mime_part_sign): Add a chomp filter here too.
4992
4993 2002-02-27  Not Zed  <NotZed@Ximian.com>
4994
4995         * camel-mime-part.c (init_header_name_table): Changed header
4996         formatted table to contain a pointer to an output function, and
4997         added in-reply-to and references headers.
4998         (write_references): New function to write out references header,
4999         folded properly.  It only approximates based on the last >, but it
5000         should be adequate and will also handle invalid headers.
5001         (write_fold): Function to write out headers folded.  Since this is
5002         the default it isn't required.
5003         (write_raw): Write out an already formatted header, e.g. most of
5004         the rest.
5005         (write_to_stream): Lookup header output function, if we have one,
5006         use that, otherwise fold header using basic (dumb) function.
5007
5008         This is all for #14779.  A better fix is probably do have the
5009         headers always stored formatted, but that can wait.
5010
5011 2002-02-25  Jeffrey Stedfast  <fejj@ximian.com>
5012
5013         * camel-digest-folder.c (camel_digest_folder_new): Allow all
5014         multiparts that contain message/rfc822 attachments.
5015         (digest_get_uids): Only assign uids to message parts.
5016
5017 2002-02-22  Jeffrey Stedfast  <fejj@ximian.com>
5018
5019         * camel-mime-part.c (camel_mime_part_set_filename): Set the 'name'
5020         parameter on the Content-Type too. Fixes bug #20779.
5021
5022 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
5023
5024         * camel-pgp-context.c (pgp_sign): Pass --always-trust to gpg
5025         (requested by users).
5026         (pgp_clearsign): Same.
5027         (pgp_encrypt): Here too.
5028
5029 2002-02-12  Jeffrey Stedfast  <fejj@ximian.com>
5030
5031         * providers/smtp/camel-smtp-transport.c (smtp_helo): Since the
5032         AUTH token sometimes uses '=' instead of whitespace, don't use
5033         smtp_token_next here.
5034
5035 2002-02-09  Not Zed  <NotZed@Ximian.com>
5036
5037         * providers/pop3/camel-pop3-engine.c (get_capabilities): Duh, when
5038         we grab the apop stamp it needs to include the <> as well, I even
5039         read the rfc, silly me.
5040
5041         * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): Doh,
5042         when iterating the authtype list, it helps to goto the next node.
5043         Found with help from miles.
5044
5045 2002-02-08  Not Zed  <NotZed@Ximian.com>
5046
5047         * providers/local/camel-spool-summary.c
5048         (camel_spool_summary_build_from): The day number has to be 2 chars
5049         wide, space filled to work properly with pine, etc.
5050
5051         * providers/local/camel-spoold-store.[ch]: new type of provider
5052         'spool directory', which lets you view external mbox dirs without
5053         adding any extra cruft.  Perhaps it should use . files to store
5054         summaries?  Still a bit experimental, there's a warning when you
5055         select it in the account editor.  Finished off most of #1185.
5056         Can't rename or move folders.
5057
5058         * camel-mime-utils.c (header_decode_date): If the date is
5059         100->1900 then we actually want to use it as the year in the tm
5060         struct, not year+100.  e.g. year 102 -> 2002, not 2102.
5061
5062 2002-02-07  Not Zed  <NotZed@Ximian.com>
5063
5064         * providers/local/camel-spool-store.c (get_folder): Pass path into
5065         spool_folder_new.
5066
5067         * providers/local/camel-spool-folder.c (camel_spool_folder_new): 
5068         (camel_spool_folder_construct): Take the full path to the folder
5069         and use that as the file path, independent of the full_name we
5070         use.
5071
5072 2002-02-07  Not Zed  <NotZed@Ximian.com>
5073
5074         * providers/local/camel-local-provider.c: Added new type, spoold
5075         provider, spoold: for local directories.
5076
5077         * providers/imap/camel-imap-store.c (get_one_folder_offline):
5078         Create offline uri's in a compatible manner to online ones.
5079
5080 2002-02-07  Dan Winship  <danw@ximian.com>
5081
5082         * camel-sasl-ntlm.c: Implementation of NTLM (aka "Secure Password
5083         Authentication") auth, taken from soup.
5084
5085         * Makefile.am (libcamel_la_SOURCES, libcamel_la_HEADERS): Add
5086         camel-sasl-ntlm.
5087
5088         * camel-sasl.c: Add refs to camel-sasl-ntlm.
5089
5090         * providers/imap/camel-imap-store.c (try_auth): Use
5091         imap_next_word() to skip over the "+ " of the continuation rather
5092         than just "resp + 2" since Exchange (incorrectly) returns "+"
5093         instead of "+ " for an empty continuation response.
5094
5095 2002-02-06  Jeffrey Stedfast  <fejj@ximian.com>
5096
5097         * camel-folder-summary.h: Remove the CAMEL_MESSAGE_NEEDS_REPLY
5098         flag, we no longer will be using this.
5099
5100 2002-02-04  Jeffrey Stedfast  <fejj@ximian.com>
5101
5102         * camel-http-stream.c (stream_read): Use camel_mime_parser_read to
5103         read internal parser data.
5104         (camel_http_stream_get_content_type): Implemented.
5105         (http_method_invoke): Use HTTP/1.0 instead of 1.1
5106
5107         * camel-mime-utils.c (header_decode_int): Made public.
5108
5109         * camel-http-stream.[c,h]: Added. New stream for HTTP requests
5110         (currently supported are GET and HEAD).
5111
5112         * camel-tcp-stream-ssl.c (stream_connect): Call set_errno
5113         appropriately.
5114
5115 2002-01-31  Not Zed  <NotZed@Ximian.com>
5116
5117         * camel-mime-utils.c (header_decode_domain): Oops, this was
5118         converting foo@[blah] to foo@[ blah ], fixed.
5119
5120 2002-01-30  Jeffrey Stedfast  <fejj@ximian.com>
5121
5122         * providers/pop3/camel-pop3-provider.c: Use "pop" instead of
5123         "pop3" so current configurations continue to work.
5124
5125 2002-01-30  Not Zed  <NotZed@Ximian.com>
5126
5127         * camel-sasl-login.c: Changed name from "NT Login" to simply
5128         "Login".
5129
5130         * providers/pop3/*: Entirely new pop implmentation, supporting
5131         pipelining.
5132
5133 2002-01-29  Not Zed  <NotZed@Ximian.com>
5134
5135         * camel-data-cache.c (free_busy): We dont want to unref the
5136         stream, instead, stop listening to the finalised events, and free
5137         the path only.
5138
5139 2002-01-25  Not Zed  <NotZed@Ximian.com>
5140
5141         * camel-data-cache.c (stream_finalised): Remove the object from
5142         the busy_stream hashtable, not the busy_path hashtable.
5143
5144 2002-01-29  Jeffrey Stedfast  <fejj@ximian.com>
5145
5146         * providers/imap/camel-imap-folder.c (imap_update_summary): Added
5147         more kludge to an existing Exchange IMAP 5.5 kludge to work around
5148         it returning multiple messages with the same UIDs.
5149
5150 2002-01-28  Jeffrey Stedfast  <fejj@ximian.com>
5151
5152         * camel-mime-message.c (process_header): Handle Resent headers
5153         too.
5154
5155         * camel-mime-message.h: Added Resent-* #defines.
5156
5157         * camel-filter-driver.c (camel_filter_driver_remove_rule_by_name):
5158         Use while (node->next) instead of while (node)
5159
5160         * providers/smtp/camel-smtp-transport.c (smtp_decode_status_code):
5161         New function to decode an enhanced status code.
5162         (smtp_set_exception): Sets an exception based on the
5163         Enhanced-Status-Code.
5164         (esmtp_get_authtypes): Don't diplicate the key in the hash since
5165         the key and value are the same.
5166         (smtp_rcpt): Include the failed recipient in the error message to
5167         be more helpful to the user.
5168
5169         * camel-mime-utils.c (hex_decode): Make sure to allocate enough
5170         for the NUL byte.
5171
5172 2002-01-28  Jeffrey Stedfast  <fejj@ximian.com>
5173
5174         * providers/smtp/camel-smtp-transport.c (smtp_construct):
5175         (connect_to_server): Use flags rather than a bunch of gboolean
5176         variables.
5177         (smtp_connect): Same.
5178         (smtp_mail): Here too. Use the enhanced status codes if available.
5179         (smtp_data): And again here.
5180         (smtp_helo): Finally here. Also detect the ENHANCEDSTATUSCODES
5181         extension.
5182         (smtp_rcpt): Use the enhanced status codes if available.
5183         (smtp_rset): Here too.
5184         (smtp_quit): And finally here.
5185
5186         * camel-transport.h: Removed gboolean supports_8bit since this is
5187         pretty local to only SMTP for now.
5188
5189 2002-01-24  Ettore Perazzoli  <ettore@ximian.com>
5190
5191         * Makefile.am: Remove some old cruft.
5192
5193 2002-01-24  Ettore Perazzoli  <ettore@ximian.com>
5194
5195         * tests/folder/Makefile.am: s/MAILER_LIBS/EVOLUTION_MAIL_LIBS/.
5196         * tests/message/Makefile.am: Likewise.
5197         * tests/mime-filter/Makefile.am: Likewise.
5198         * tests/misc/Makefile.am: Likewise.
5199         * tests/smime/Makefile.am: Likewise.
5200         * tests/stream/Makefile.am: Likewise.
5201
5202 2002-01-24  Jeffrey Stedfast  <fejj@ximian.com>
5203
5204         * camel-filter-driver.c (do_beep): Call the beep callback
5205         function.
5206         (camel_filter_driver_set_system_beep_func): New function to set
5207         the beep callback.
5208
5209 2002-01-22  Jeffrey Stedfast  <fejj@ximian.com>
5210
5211         * camel-filter-driver.c (camel_filter_driver_remove_rule_by_name):
5212         New function to remove a filter rule by name.
5213
5214 2002-01-21  Jeffrey Stedfast  <fejj@ximian.com>
5215
5216         * camel-filter-driver.c (do_beep): As a temporary solution, just
5217         printf ("\a"); to make a beep :-)
5218
5219         * providers/imap/camel-imap-command.c
5220         (imap_command_strdup_vprintf): Encode the mailbox to UTF-7 here.
5221
5222         * providers/imap/camel-imap-utils.c (imap_parse_list_response):
5223         Decode the mailbox name as we parse the list response.
5224         (imap_mailbox_decode): It's only an illegal mailbox name if it
5225         didn't switch back to US-ASCII mode.
5226
5227 2002-01-18  Jeffrey Stedfast  <fejj@ximian.com>
5228
5229         * providers/imap/camel-imap-utils.c (imap_mailbox_decode): New
5230         function to decode an IMAP mailbox name from modified UTF-7
5231         encoding to UTF-8.
5232         (imap_mailbox_encode): New function to convert a mailbox name from
5233         UTF-8 to IMAP's modified UTF-7 encoding.
5234
5235 2002-01-17  Jeffrey Stedfast  <fejj@ximian.com>
5236
5237         * camel-mime-filter-basic.c (filter): Stop uudecoding once the
5238         CAMEL_UUDECODE_STATE_END state bit gets set. Set the
5239         CAMEL_UUDECODE_STATE_BEGIN state bit once we find the begin line.
5240         (reset): No longer have uu_begin or uulen state variables, these
5241         are now stuffed into a single state variable.
5242
5243         * camel-mime-utils.c (uudecode_step): No longer needs a uulen
5244         argument and also keeps track of whether or not the end of the
5245         encoded data has been found in 'state'.
5246         (uuencode_step): Now stuffs uulen into state so that the uulen
5247         argument is no longer needed.
5248         (uuencode_close): Same.
5249
5250 2002-01-16  Jeffrey Stedfast  <fejj@ximian.com>
5251
5252         * camel-mime-filter-basic.c (filter): If we don't want to corrupt
5253         the uuencoded data by overwriting it with base64 decoded data
5254         afterward, we need to add a break statement!
5255
5256         * camel-folder-summary.c (summary_build_content_info): Add code to
5257         add a uu filter.
5258         (camel_folder_summary_finalize): Unref the uuencode filter.
5259
5260 2002-01-16  Jeffrey Stedfast  <fejj@ximian.com>
5261
5262         * camel-mime-filter-basic.c (filter): Fixed slight logic error to
5263         find the uuencode begin line. Fixes bug #18754.
5264
5265 2002-01-15  Jeffrey Stedfast  <fejj@ximian.com>
5266
5267         * providers/smtp/camel-smtp-transport.c (smtp_send_to): Updated to
5268         match the new send_to API.
5269         (smtp_send): Get the from address and pass that along to
5270         smtp_send_to().
5271
5272         * providers/sendmail/camel-sendmail-transport.c
5273         (sendmail_send_to): Updated to match the new send_to API.
5274
5275         * camel-transport.c (camel_transport_send_to): Now takes a from
5276         argument too.
5277
5278         * providers/imap/camel-imap-folder.c (imap_update_summary): Sort
5279         the needheaders UID array and fixed to respect the
5280         UID_SET_LIMIT. This should now finish the fixification of bug
5281         #2529. There's still the possible issue that a command-line (The
5282         only command-line I can think of that can still be too long is a
5283         SEARCH command, but this can't possibly be fixed until we rewrite
5284         the imap code to use Zucchi's ImapEngine idea).
5285
5286 2002-01-14  Jeffrey Stedfast  <fejj@ximian.com>
5287
5288         * providers/imap/camel-imap-folder.c (imap_expunge_uids_online):
5289         Move the command-lock outside the loop.
5290
5291 2002-01-14  Jeffrey Stedfast  <fejj@ximian.com>
5292
5293         * providers/imap/camel-imap-folder.c (imap_expunge_uids_online):
5294         Updated to use the new imap_uid_array_to_set() interface.
5295         (imap_expunge_uids_resyncing): Same.
5296         (do_copy): Here too.
5297         (imap_update_summary): Added a FIXME comment to rewrite allowing
5298         for a uid-set limitation.
5299         (get_matching): Copy some of the logic over from
5300         imap_uid_adday_to_set() to limit the length of the uid-set string.
5301         (imap_sync_online): Added a comment to explain what is going on
5302         with get_matching() since the behavior has changed slightly.
5303
5304         * providers/imap/camel-imap-utils.c (imap_uid_array_to_set):
5305         Modify the interface so that we can limit the size of the uid set
5306         string returned.
5307
5308 2002-01-14  Not Zed  <NotZed@Ximian.com>
5309
5310         * providers/imap/camel-imap-search.c (imap_body_contains):
5311         Rewritten to use a cache for body searches when online.  Will need
5312         some heavy testing but so far seems to be beneficial.
5313
5314         * providers/imap/camel-imap-folder.c (imap_search_by_expression,
5315         search_by_uids): dont initialise search object here.
5316         (camel_imap_folder_new): Setup search object here with pointer to
5317         cache dir.
5318
5319 2001-12-01  Not Zed  <NotZed@Ximian.com>
5320
5321         * camel-store-summary.[ch]: New class to store a store's folder
5322         list in.  Not yet completed.
5323
5324 2002-01-11  Jeffrey Stedfast  <fejj@ximian.com>
5325
5326         * providers/imap/camel-imap-folder.c (imap_update_summary): Kludge
5327         around a bug in Exchange 5.5 that reports 2 messages with the same
5328         UID. Fixes bug #17694. Replaces the fix from yesterday.
5329
5330 2002-01-10  Jeffrey Stedfast  <fejj@ximian.com>
5331
5332         * providers/local/camel-local-folder.c: If PATH_MAX doesn't exist,
5333         use _POSIX_PATH_MAX.
5334
5335         * providers/imap/camel-imap-folder.c (imap_update_summary): If mi
5336         is NULL, don't bother updating it. Should fix bug #17694.
5337
5338 2002-01-10  Jeffrey Stedfast  <fejj@ximian.com>
5339
5340         * camel.h: #include camel-mime-filter-tohtml.h
5341
5342         * providers/imap/camel-imap-folder.c (imap_update_summary): Kludge
5343         around Microsoft Exchange 5.5 (bug #5348) by forgetting our
5344         currently selected folder and re-SELECTing it so that the Exchange
5345         server has a chance to realise it has new messages.
5346
5347 2002-01-09  Jeffrey Stedfast  <fejj@ximian.com>
5348
5349         * providers/local/camel-local-folder.c
5350         (camel_local_folder_construct): If the mbox file is a symlink,
5351         follow the symlink and get the One True Path so that we can
5352         rewrite the mbox later without worrying about clobbering the
5353         symlink.
5354
5355 2002-01-08  Jeffrey Stedfast  <fejj@ximian.com>
5356
5357         * camel-filter-search.c (TODO): There are a few sexp callbacks
5358         that could be modified to use fms->info rather than using a
5359         message object (like date and possibly mlist stuff) but *only* if
5360         the date exists on the CamelMessageInfo object (since it may be
5361         blank except for message flags).
5362         (camel_filter_search_get_message): New internal convenience
5363         function to make sure that the FilterMessageSearch has loaded the
5364         message (and to load the message if this isn't the case).
5365         (check_header): Call camel_filter_search_get_message().
5366         (header_exists): Same.
5367         (header_regex): Here too.
5368         (header_full_regex): And here.
5369         (body_contains): Again here.
5370         (body_regex): Here too.
5371         (get_sent_date): Here also.
5372         (get_received_date): Same.
5373         (get_source): Here if we need to.
5374         (camel_filter_search_match): Now takes a callback function/data
5375         pair for on-demand message loading so that we don't necessarily
5376         have to load the message if the defined filter rules don't require
5377         it.
5378
5379         * camel-filter-driver.c (camel_filter_driver_filter_folder): Don't
5380         bother fetching the message here, let
5381         camel_filter_driver_filter_message() worry about this.
5382         (get_message_cb): New utility callback to fetch a message.
5383         (camel_filter_driver_filter_message): Only fetch the message if we
5384         absolutely need it to get a CamelMessageInfo. Instead of passing a
5385         message object to camel_filter_search_match(), pass get_message_cb
5386         and some user_data so that the matching code can fetch the message
5387         on demand.
5388
5389 2002-01-07  Jeffrey Stedfast  <fejj@ximian.com>
5390
5391         * camel-folder.c (filter_filter): Flush the only-once actions.
5392
5393         * camel-filter-driver.c (camel_filter_driver_filter_message):
5394         Don't increment a filtered_count here any longer.
5395         (camel_filter_driver_reset_filtered_count): Removed.
5396         (camel_filter_driver_get_filtered_count): Removed.
5397         (do_beep): New action.
5398         (play_sound): New action to play a sound
5399         (do_only_once): Another new action.
5400         (camel_filter_driver_finalise): Free the only_once hash if the
5401         driver has not been "flushed".
5402         (camel_filter_driver_flush): Flush all of the only-once actions.
5403
5404         * camel-charset-map.c: Moved windows-1251 to the end of the list
5405         since it contains the euro and we'd prefer to use iso-8859-15 when
5406         the euro is requested than a windows charset if possible.
5407
5408         * camel-charset-map-private.h: Regenerated.
5409
5410 2001-12-12  Jeffrey Stedfast  <fejj@ximian.com>
5411
5412         * camel-folder-summary.c (content_info_load): Don't try setting a
5413         content-type parameter if either the name or value is NULL.
5414
5415         * camel-mime-utils.c (header_set_param): NULL-protection.
5416
5417 2002-01-02  Jeffrey Stedfast  <fejj@ximian.com>
5418
5419         * camel-tcp-stream-ssl.c (ssl_bad_cert): Do more like what mutt
5420         does so hopefully this'll fix bug #16363 and #16300.
5421
5422 2001-12-21  Jeffrey Stedfast  <fejj@ximian.com>
5423
5424         * broken-date-parser.c (parse_broken_date): Completely
5425         rewritten. It is now a load faster and a heck of a lot more
5426         accurate, also now returns a time_t and sets the saveoffset
5427         variable rather than returning a new char* buffer for the normal
5428         camel date parser to re-parse. This saves a fair number of cpu
5429         cycles :-)
5430
5431         * camel-mime-utils.c (header_decode_date): Cleanup the broken date
5432         parsing code.
5433
5434 2001-12-20  Jeffrey Stedfast  <fejj@ximian.com>
5435
5436         * camel-address.h: Change the prototype for camel_address_get_type
5437         to return a CamelType (since internally this is what it returns
5438         and also in case we decide to write a replacement for the current
5439         CamelObject it'd be easier to drop in).
5440
5441         * camel-internet-address.h: Same but for
5442         camel_internet_address_get_type()
5443
5444         * providers/smtp/camel-smtp-transport.c (smtp_send_to): Updated to
5445         use a CamelAddress of recipients.
5446         (smtp_send): Since smtp_send_to now takes a CamelAddress
5447         recipients argument, our lives have been simplified and we can now
5448         just concat To/Cc/Bcc into a recipients addr and send away.
5449
5450         * providers/sendmail/camel-sendmail-transport.c
5451         (sendmail_send_to): Updated to use a CamelAddress of recipients.
5452
5453         * camel-transport.c (camel_transport_send_to): Now takes a
5454         CamelAddress argument for the recipient list rather than a GList.
5455
5456 2001-12-19  Jeffrey Stedfast  <fejj@ximian.com>
5457
5458         * providers/smtp/Makefile.am: Remove the providerdir variable.
5459
5460         * providers/sendmail/Makefile.am: Same.
5461
5462 2001-12-17  Jeffrey Stedfast  <fejj@ximian.com>
5463
5464         * camel-charset-map.c (camel_charset_iso_to_windows): New function
5465         to map ISO charsets to the Windows charsets.
5466
5467         * camel-mime-part-utils.c (broken_windows_charset): Detect Windows
5468         charsets.
5469         (simple_data_wrapper_construct_from_parser): Simplify a tad and
5470         also check for iso-8859-* charsets that are really Windows
5471         charsets. Fixes bug #12631.
5472
5473 2001-12-17  Dan Winship  <danw@ximian.com>
5474
5475         * Makefile.am (INCLUDES): define CAMEL_PROVIDERDIR to be the
5476         configure.in-defined camel_providerdir.
5477
5478         * providers/Makefile.am: Remove some outdated comments
5479
5480         * providers/imap/Makefile.am (camel_provider_LTLIBRARIES,
5481         camel_provider_DATA): renamed from provider_LTLIBRARIES,
5482         provider_DATA.  
5483
5484         * providers/local/Makefile.am: Likewise 
5485
5486         * providers/nntp/Makefile.am: Likewise 
5487
5488         * providers/pop3/Makefile.am: Likewise 
5489
5490         * providers/sendmail/Makefile.am: Likewise 
5491
5492         * providers/smtp/Makefile.am: Likewise
5493
5494 2001-12-16  Jeffrey Stedfast  <fejj@ximian.com>
5495
5496         * providers/imap/camel-imap-folder.c (get_content): Reverted my
5497         previous changes here since it doesn't actually work afterall.
5498
5499         * providers/imap/camel-imap-wrapper.c (imap_wrapper_hydrate):
5500         Update to do uudecoding when appropriate.
5501
5502 2001-12-16  Jeffrey Stedfast  <fejj@ximian.com>
5503
5504         * providers/imap/camel-imap-folder.c (get_content): Try to use the
5505         original boundary so luis will stop bugging me about "data
5506         corruption". Also preserve other params in the multipart
5507         content-type by dumping it to a string and setting it on the mime
5508         part.
5509
5510 2001-12-14  Jeffrey Stedfast  <fejj@ximian.com>
5511
5512         * camel-filter-driver.c
5513         (camel_filter_driver_reset_filtered_count): Reset the
5514         filtered_count to zero.
5515         (camel_filter_driver_get_filtered_count): Return the private
5516         filtered_count value.
5517         (camel_filter_driver_filter_message): Increment the
5518         filtered_count.
5519         (camel_filter_driver_set_shell_exec_func): New function to set the
5520         shell-exec func.
5521         (shell_exec): New ESExp filter action callback.
5522
5523 2001-12-14  Jeffrey Stedfast  <fejj@ximian.com>
5524
5525         * camel-pgp-mime.c (camel_pgp_mime_part_verify): Removed
5526         x-inline-pgp-hack kludge because it doesn't work.
5527         (camel_pgp_mime_part_decrypt): Same.
5528
5529 2001-12-13  Chris Toshok  <toshok@ximian.com>
5530
5531         * camel-data-cache.c: include stdlib.h (for alloca on freebsd) and
5532         only include alloca.h if HAVE_ALLOCA_H is defined.
5533
5534 2001-12-11  Zbigniew Chyla  <cyba@gnome.pl>
5535
5536         Fixes #17085
5537
5538         * camel-charset-map.c: Added #include <errno.h>.
5539
5540         * camel-charset-map-private.h:
5541         Recreated (following instructions from camel-charset-map.c)
5542
5543 2001-12-11  Jeffrey Stedfast  <fejj@ximian.com>
5544
5545         * camel-object.c (camel_type_register): Keep a name-to-type hash
5546         so that we can make sure that the type has not yet been registered
5547         (prevents a race condition such as the one in bug #16559).
5548
5549         * camel-service.c (camel_service_connect): Make sure that the
5550         connect_op is non-NULL before unregistering/unreffing it.
5551
5552 2001-12-04  Jeffrey Stedfast  <fejj@ximian.com>
5553
5554         * camel-mime-utils.c (header_content_type_simple): Protect against
5555         either of the types being NULL.
5556
5557 2001-12-05  Jeffrey Stedfast  <fejj@ximian.com>
5558
5559         * camel-mime-filter-basic.c (filter): If complete() allocates
5560         len+2 bytes for the out buffer, so should this. See bug #16371 for
5561         an example case.
5562
5563 2001-12-05  Jeffrey Stedfast  <fejj@ximian.com>
5564
5565         * camel-sasl-digest-md5.c: iconv() returns a size_t, not an int.
5566
5567         * camel-pgp-context.c: The return value of iconv() is a size_t,
5568         not an int.
5569
5570         * camel-mime-part-utils.c (convert_buffer): Always use size_t args
5571         for iconv().
5572
5573         * camel-mime-filter-charset.c (complete): Always use size_t args
5574         for iconv().
5575         (filter): Same.
5576
5577         * camel-mime-utils.c (header_address_fold): Make headerlen a
5578         size_t instead of an int.
5579         (header_fold): Same.
5580         (base64_encode_close): We should be returning a size_t and inlen
5581         should also be a size_t.
5582         (base64_encode_step): Same here.
5583         (base64_decode_step): Here too.
5584         (base64_encode_simple): And here...
5585         (base64_decode_simple): Same.
5586         (uuencode_close): We should also use size_t's here...
5587         (uuencode_step): And here too.
5588         (uudecode_step): And also here.
5589         (quoted_encode_close): Same idea here.
5590         (quoted_encode_step): Again here.
5591         (quoted_decode_step): Here too.
5592         (quoted_encode): Input length should be a size_t.
5593         (rfc2047_decode_word): Same.
5594         (g_string_append_len): Here too.
5595         (append_8bit): "
5596         (rfc2047_encode_word): "
5597         (quote_word): "
5598         (hex_decode): "
5599         (rfc2184_decode): Use size_t's with iconv().
5600         (header_decode_param): Same.
5601
5602 2001-12-09  Jon Trowbridge  <trow@ximian.com>
5603
5604         * camel-folder-summary.c: Add "NeedsReply" to the flag_names array
5605         for CAMEL_MESSAGE_NEEDS_REPLY.
5606
5607         * camel-folder-summary.h: Added CAMEL_MESSAGE_NEEDS_REPLY flag.
5608
5609 2001-12-07  Dan Winship  <danw@ximian.com>
5610
5611         * camel-mime-message.c (camel_mime_message_set_date): Fix the
5612         tm_gmtoff case (its sign is the opposite of "timezone"). Fixes
5613         #14678
5614
5615 2001-11-29  Jeffrey Stedfast  <fejj@ximian.com>
5616
5617         * camel-folder-search.c (search_body_contains): Don't use regex
5618         matching. Fixes bug #16227.
5619
5620         * camel-mime-message.c (best_encoding): Check the content-object's
5621         mime type, not the mime part types. Should fix bug #15843.
5622
5623 2001-11-27  Jeffrey Stedfast  <fejj@ximian.com>
5624
5625         * providers/imap/camel-imap-folder.c (get_content): Return NULL if
5626         construct_from_stream fails.
5627         (get_message): Same.
5628         (get_message_simple): Here too.
5629         (add_message_from_data): And here.
5630
5631 2001-11-14  Not Zed  <NotZed@Ximian.com>
5632
5633         * camel-vee-folder.c (folder_changed_remove_uid): Use the uid
5634         rather than vuid for unmatched.  Also add the uid to unmatched if
5635         it wasn't in the unmatched_uids table at all.
5636         (folder_changed_change): If checking for added, if the new ones
5637         dont match, then try to add them to unmatched.  Fixes #6893.
5638
5639         * camel-folder-summary.c (camel_folder_summary_index): Change lock
5640         order, always summary_lock before ref_lock.
5641         (camel_folder_summary_array): "
5642         (camel_folder_summary_uid): "
5643         (camel_folder_summary_remove_uid): " Fixes a deadlock.
5644
5645 2001-11-30  Not Zed  <NotZed@Ximian.com>
5646   
5647         * providers/nntp/camel-nntp-*.c: Completely new implementation of
5648         NNTP.
5649         
5650         Doesn't support subscriptions yet (lists all folders), but should
5651         be more reliable (faster?), and has an integrated cache.
5652
5653         * camel-exception.c (camel_exception_new): Use e_memchunks for
5654         exception blocks.
5655         (camel_exception_free): Same.
5656
5657         * camel-data-cache.[ch]: New object for managing on-disk caches of
5658         anything that can be stored in a camel-stream.
5659
5660         * camel-file-utils.c (camel_file_util_mkdir): New function, just a
5661         nicer place to put this (than camel-store), should be removed from
5662         camel-store.
5663         (camel_file_util_safe_filename): New function to url-encode a
5664         filename.
5665
5666         * camel-mime-parser.c (drop_states): New func to drop the parser
5667         state to initial state.
5668         (folder_scan_init_with_fd): 
5669         (folder_scan_init_with_stream): Call above func to reset state if
5670         the stream is changed on us so we can change streams to reuse a
5671         parser object.
5672
5673 2001-11-25  Not Zed  <NotZed@Ximian.com>
5674
5675         * providers/nntp/camel-nntp-folder.c (nntp_folder_get_message): If
5676         the uid doesn't have a ',' in it, fail to crash.
5677
5678         * providers/nntp/camel-nntp-newsrc.c
5679         (camel_nntp_newsrc_article_is_read): check group != NULL before
5680         scanning.
5681         (camel_nntp_newsrc_get_highest_article_read): "
5682         (camel_nntp_newsrc_get_num_articles_read): "
5683         (camel_nntp_newsrc_mark_range_read): "
5684
5685         * providers/nntp/camel-nntp-store.c
5686         (camel_nntp_store_get_overview_fmt): IF we dont have
5687         nntp_list_follows, dont try and get a list response.
5688         (nntp_store_get_folder_info): Set path part of folderinfo.
5689
5690 2001-11-20  Jeffrey Stedfast  <fejj@ximian.com>
5691
5692         * providers/smtp/camel-smtp-transport.c (get_smtp_error_string):
5693         Check to see that errno is non-zero before returning
5694         g_strerror. If it's 0, then we have an unknown error.
5695
5696 2001-11-26  Jeffrey Stedfast  <fejj@ximian.com>
5697
5698         * camel-mime-filter-basic.c: For the uudecoding mode, garble up
5699         the "begin <mode> <filename>" line before decoding.
5700
5701         * camel-mime-part-utils.c
5702         (simple_data_wrapper_construct_from_parser): Add a uudecoder if
5703         the transfer encoding is x-uuencode.
5704
5705         * camel-mime-part.c (write_to_stream): Handle x-uuencoded content
5706         too.
5707
5708 2001-11-19  Jeffrey Stedfast  <fejj@ximian.com>
5709
5710         * camel-tcp-stream-ssl.c (stream_read): Added a check to see if
5711         the operation has been cancelled.
5712         (stream_write): Same.
5713
5714 2001-11-19  Jeffrey Stedfast  <fejj@ximian.com>
5715
5716         Updates for compliance with rfc2231
5717
5718         * camel-mime-utils.c (header_encode_param):
5719         camel_mime_special_table[c] & IS_ESAFE should have been
5720         !(camel_mime_special_table[c] & IS_ESAFE). Also added a few
5721         comments for how to improve the code at some future date.
5722         (header_decode_param): Now takes an argument rfc2184_part so our
5723         caller can get this information as well.
5724         (header_decode_param_list): Pass an rfc2184_part argument to
5725         header_decode_param and also added a few comments on where to
5726         improve on rfc2184/rfc2231 compliance.
5727         (rfc2047_decode_word): Updated to respect the updated ABNF syntax
5728         of rfc2047 encoded words, yay.
5729
5730 2001-11-16  Jeffrey Stedfast  <fejj@ximian.com>
5731
5732         * providers/imap/camel-imap-utils.c (imap_parse_body): Abort if
5733         body == NULL.
5734
5735         * camel-mime-filter-tohtml.c (camel_mime_filter_tohtml_new): New
5736         mime filter to convert plain text to html.
5737
5738 2001-11-16  Jeffrey Stedfast  <fejj@ximian.com>
5739
5740         Since some mail clients like Outlook are broken, we need to set a
5741         name parameter on pgp signed and encrypted parts.
5742
5743         * camel-pgp-mime.c (camel_pgp_mime_part_encrypt): Set a name
5744         parameter.
5745         (camel_pgp_mime_part_sign): Same.
5746
5747 2001-11-14  Jeffrey Stedfast  <fejj@ximian.com>
5748
5749         * providers/imap/camel-imap-command.c
5750         (camel_imap_command_response): If we get a BYE response, call
5751         camel_service_disconnect() and set an exception. Also do the check
5752         for "* BYE" first instead of passing it off imap_read_untagged()
5753         since we'll just waste time in there mallocing left and right only
5754         to arrive at the single response line "* BYE" again :-)
5755
5756 2001-11-13  Not Zed  <NotZed@Ximian.com>
5757
5758         * camel-filter-search.c (get_source): If we have no source string,
5759         then use undefined, which should always evaluate to FALSE.  Fix
5760         for #15267.
5761
5762 2001-11-12  Jeffrey Stedfast  <fejj@ximian.com>
5763
5764         * camel-store.c (camel_store_get_folder): Added a
5765         g_return_val_if_fail for folder_name != NULL.
5766
5767 2001-11-08  Jeffrey Stedfast  <fejj@ximian.com>
5768
5769         * camel-pgp-context.c (crypto_exec_with_passwd): If any of the
5770         pipe()'s fail, clean up any pipes that may have succeeded. Also
5771         close the password fds.
5772
5773 2001-11-09  Not Zed  <NotZed@Ximian.com>
5774
5775         * providers/imap/camel-imap-store.c (imap_auth_loop): If we get a
5776         user cancel and that causes us to fail to authenticate, abort
5777         rather than loop forever.  Fix for #14951.
5778
5779 2001-11-06  Jeffrey Stedfast  <fejj@ximian.com>
5780
5781         * providers/imap/camel-imap-command.c
5782         (camel_imap_command_continuation): Now takes a command-length
5783         argument so we can 1) avoid duping the command string yet again,
5784         yay. 2) we now don't have to worry about embedded nul-chars
5785         screwing us over (we still need to avoid allowing them into the
5786         string but at least now it won't mess us up).
5787
5788         * providers/imap/camel-imap-folder.c (do_append): Instead of
5789         appending a nul char to the end of the byte array and then passing
5790         that off as if it were a string to
5791         camel_imap_command_continuation, instead pass the byte-array
5792         length since that function now takes a length argument. Yay.  Also
5793         encode any 8bit parts to avoid the possibility of sending embedded
5794         nul chars to the imap server.
5795
5796         * providers/imap/camel-imap-store.c (try_auth): Updated to pass a
5797         command-length argument to camel_imap_command_continuation().
5798
5799 2001-11-07  Jeffrey Stedfast  <fejj@ximian.com>
5800
5801         * camel-tcp-stream-ssl.c (save_ssl_cert): Oops, pass a mode
5802         argument to the open() call.
5803
5804         * camel-tcp-stream-openssl.c (save_ssl_cert): Oops, pass a mode
5805         argument to the open() call.
5806
5807 2001-11-07  Jeffrey Stedfast  <fejj@ximian.com>
5808
5809         * camel-pgp-mime.c (camel_pgp_mime_part_decrypt): Add code to
5810         kludge around any x-inline-pgp-hacks by prepending some content
5811         headers to the decrypted data.
5812
5813 2001-11-02  Jeffrey Stedfast  <fejj@ximian.com>
5814
5815         * camel-data-wrapper.c (camel_data_wrapper_init): Initialize our
5816         private mutex.
5817         (camel_data_wrapper_finalize): Destroy our private mutex.
5818         (write_to_stream): Lock around camel_stream_write_to_stream() so
5819         that we don't get 2 threads trying to read from our stream at the
5820         same time.
5821
5822 2001-11-01  Not Zed  <NotZed@Ximian.com>
5823
5824         * camel-vee-folder.c (folder_changed_change): Move all searching
5825         operations outside of any locks except subfolder lock, same as
5826         build_folder.  Fix for #14294.
5827
5828 2001-10-31  Not Zed  <NotZed@Ximian.com>
5829
5830         * providers/local/camel-spool-folder.c (spool_get_message): Same
5831         as below.
5832
5833         * providers/local/camel-maildir-folder.c (maildir_get_message):
5834         Same as below.
5835
5836         * providers/local/camel-mbox-folder.c (mbox_get_message): Set
5837         USER_CANCEL if failed due to EINTR.
5838
5839         * camel-filter-driver.c (camel_filter_driver_filter_mbox): If
5840         construct from parser fails due to user cancel, set USER_CANCEL on
5841         exception.
5842
5843         * camel-mime-part.c (construct_from_parser): Return error if the
5844         parser had an io error.
5845
5846         * camel-mime-message.c (construct_from_parser): Check error on
5847         parser/return error.
5848
5849         * camel-mime-parser.c (folder_scan_init): Init error number.
5850         (camel_mime_parser_errno): New function, return errno of any io
5851         failures.
5852         (folder_read): Set errno if a failure occured.
5853         (folder_seek): Same.
5854         (folder_scan_init_with_fd): Setup errno depeding on ok/failure.
5855         (folder_scan_init_with_stream): Same.
5856
5857 2001-10-30  Not Zed  <NotZed@Ximian.com>
5858
5859         * camel-operation.c (camel_operation_new): Dont setup cancel_fd.
5860         (camel_operation_cancel_fd): If cancel_fd not created, set it up.
5861         (camel_operation_cancel): Set cancel flag before sending message.
5862         (cancel_thread): Same.
5863
5864         * camel-filter-driver.c (camel_filter_driver_filter_mbox): Make
5865         sure we unref the mimeparse when we're done (successfully).  This
5866         was leaking an fd every get-mail! :(
5867
5868         * camel-lock-client.c (camel_lock_helper_init): Close all fd's
5869         above 2.
5870
5871         * providers/local/camel-mbox-folder.c (mbox_get_message): Remove
5872         the X-Evolution header before anyone else gets to see this private
5873         thing.  Shoudl fix 11676 since we were inheriting flags from
5874         X-Evolution headers we didn't want to.
5875
5876         * camel-folder-search.c (match_message): If we can't retrieve the
5877         message, ignore it, it can't match.
5878
5879         * providers/imap/camel-imap-search.c
5880         (camel_imap_search_class_init): Setup parent class pointer.
5881         (imap_body_contains): If offline, just use the parent
5882         body_contains method which will get the messages and search them
5883         manually.
5884
5885         * providers/imap/camel-imap-folder.c (imap_search_by_expression,
5886         imap_search_by_uids): Remove offline check.
5887
5888 2001-10-30  Dan Winship  <danw@ximian.com>
5889
5890         * camel-mime-part.c (free_headers): Fix this to match get_headers.
5891
5892 2001-10-30  Not Zed  <NotZed@Ximian.com>
5893
5894         * providers/local/camel-local-store.c (rename_folder): Dont try to
5895         move ibex if we have none.
5896
5897         * camel-tcp-stream-openssl.c (stream_write): Fixed compilation
5898         errors.
5899
5900 2001-10-29  Jeffrey Stedfast  <fejj@ximian.com>
5901
5902         * camel-mime-utils.c (camel_mime_utils_init): Removed unused
5903         variable.
5904
5905 2001-10-30  Not Zed  <NotZed@Ximian.com>
5906
5907         * camel-mime-utils.c (header_decode_mailbox): w(x) out some warnings.
5908
5909         * providers/local/camel-local-summary.c
5910         (camel_local_summary_load): Remove the warning about not loading
5911         summary file - its a valid case for new folders.
5912
5913 2001-10-29  Jeffrey Stedfast  <fejj@ximian.com>
5914
5915         * camel-tcp-stream-openssl.c (my_SSL_write): Removed.
5916         (stream_write): Keep looping (non-blocking case) if errno is
5917         EAGAIN, EINTR or EWOULDBLOCK. For NONBLOCKing I/O, sync up with
5918         CamelTcpStreamRaw. As with CamelTcpStreamRaw/SSL - make sure to
5919         write out everything before returning.
5920         (my_SSL_read): Removed.
5921         (stream_read): Just call ssl_error_to_errno() and check the errno
5922         values that we care about so we can keep the general look of all
5923         this stream code the same. Also when checking the return value of
5924         SSL_read, check for <0 instead of ==-1 since the man page for
5925         SSL_read doesn't say it will return -1 on fail, it just says <0.
5926         (stream_flush): Don't fsync() since syncing on a socket is a Bad
5927         Thing (tm).
5928
5929         * camel-tcp-stream-ssl.c (stream_write): Make sure we write out
5930         everything just like in camel-tcp-stream-raw.c.
5931
5932         * camel-stream-buffer.c (camel_stream_buffer_gets): If
5933         camel_stream_read() returns -1, don't necessarily return -1 to our
5934         caller since it's possible that we did actually "read" some data
5935         (ie, we copied some pre-buffered data into the out buffer).
5936
5937         * camel-stream-buffer.h: Removed CAMEL_STREAM_BUFFER_NEWLINE since
5938         it never got used anywhere and it isn't supported anyway.
5939
5940 2001-10-30  Not Zed  <NotZed@Ximian.com>
5941
5942         * providers/imap/camel-imap-store.c
5943         (parse_list_response_as_folder_info): If we get an empty name,
5944         then mark that as NoSelect.  Workaround fix for #13239.
5945
5946 2001-10-29  Dan Winship  <danw@ximian.com>
5947
5948         * providers/imap/camel-imap-folder.c (get_message_simple, 
5949         imap_get_message): Set an X-Evolution-Source header on the
5950         returned message so replies come from the right identity.
5951
5952 2001-10-29  Not Zed  <NotZed@Ximian.com>
5953
5954         * camel-vee-folder.c (folder_changed_change): If we're not going
5955         to search on a changed uid, make sure we change out copy still.
5956         Fixes #13916.
5957
5958 2001-10-29  Jeffrey Stedfast  <fejj@ximian.com>
5959
5960         * providers/imap/camel-imap-store.c (subscribe_folder): Don't emit
5961         a folder_subscribed signal if we are in the process of renaming
5962         folders.
5963         (unsubscribe_folder): Same here but for the unsubscribe signal.
5964         (rename_folder): Unsubscribe from the folder being renamed and any
5965         subfolders it may have before actually renaming. Once the folder
5966         has been renamed, re-subscribe to it and it's subfolders with the
5967         new name.
5968
5969         * camel-store.c (camel_folder_info_build): Sort the folder info's
5970         before constructing the tree.
5971
5972         * camel-mime-utils.c (header_decode_param): Minor fix - should
5973         have been using a strNcmp when checking if it was an rfc2047
5974         encoded word.
5975
5976         * camel-pgp-context.c (pgp_sign): Notify the user that PGP 2.6.x
5977         is no longer supported and use camel_exception_set() instead of
5978         setv() where appropriate.
5979         (pgp_clearsign): Same.
5980         (pgp_verify): And again here.
5981         (pgp_encrypt): Here too.
5982         (pgp_decrypt): And finally here.
5983
5984 2001-10-29  Dan Winship  <danw@ximian.com>
5985
5986         * providers/imap/camel-imap-store.c (unsubscribe_folder): Don't
5987         free the hash table key if the folder wasn't found in the hash
5988         table. I'm not sure where the bug is/was that made it possible to
5989         add a folder to the tree after creating it failed, but now if that
5990         happens, it won't crash if you try to delete it again. (#11492)
5991
5992         * camel-disco-store.c (camel_disco_store_status): if the service
5993         is being connected and thinks it's online, but the session is
5994         offline, then mark the service offline as well. Fixes 13683.
5995
5996 2001-10-29  Not Zed  <NotZed@Ximian.com>
5997
5998         * camel-mime-utils.c: Turn off w() -> warnings.
5999
6000         * providers/imap/camel-imap-store.c (rename_folder): Also rename
6001         the message cache.
6002         (rename_folder): Fix subscribed folders table with rename(s).
6003
6004         * providers/imap/camel-imap-folder.c (imap_rename): Implement,
6005         rename the cache dir pointer.
6006
6007         * providers/imap/camel-imap-message-cache.c
6008         (camel_imap_message_cache_set_path): New method to set the path
6009         used by a message cache.
6010
6011         * camel-vee-store.c (build_info): Fix the 'is this a matching
6012         subfolder or subfolder' logic to match camel-store
6013         get_subfolders'.
6014
6015         * camel-store.c (get_subfolders): Fix the 'is this a matching
6016         folder or subfolder' logic.
6017
6018 2001-10-28  Not Zed  <NotZed@Ximian.com>
6019
6020         * providers/local/camel-local-store.c (rename_folder): Changed to
6021         call ibex_move to rename it internally.
6022
6023         * camel-store.c (camel_store_rename_folder): Use the right
6024         variable, not info.
6025
6026 2001-10-28  Jeffrey Stedfast  <fejj@ximian.com>
6027
6028         * camel-stream-buffer.c (camel_stream_buffer_read_line): Make sure
6029         we've actually read data before checking if p[-] is '\r' or not.
6030
6031         * camel-tcp-stream-raw.c (stream_write): Same.
6032
6033         * camel-stream-fs.c (stream_write): If errno isn't EAGAIN, just
6034         exit with -1 and instead of using continue (which doesn't go to
6035         the top of the do-while thus making our logic suck), just set w to
6036         0. Still seems to be a bug in select() if it's telling us the
6037         socket is ready for data when it really isn't but oh well.
6038
6039 2001-10-28  Not Zed  <NotZed@Ximian.com>
6040
6041         * providers/local/camel-local-folder.c
6042         (camel_local_folder_construct): Use path not protocol as the path
6043         part of the uri of the folder_created event.
6044
6045         * providers/local/camel-maildir-store.c (scan_dir): If FAST is
6046         set, dont try and scan for unread counts.
6047
6048         * providers/local/camel-local-store.c (create_folder): Implement,
6049         just return the folderinfo of the folder matched, not all of it.
6050
6051         * camel-store.c (camel_store_rename_folder): Rename the
6052         camelfolders before emitting the folderchanged event (otherwise
6053         vstore fails to pick up change.
6054
6055 2001-10-27  Not Zed  <NotZed@Ximian.com>
6056
6057         * camel-store.c (camel_store_init): Always use a default dir_sep
6058         of '/'.
6059
6060         * camel-store.h (struct _CamelStore): Added a dir_sep to the base
6061         store so rename and whatnot can work, temporary fix for mixed dir
6062         separator in folder name api's.
6063
6064         * providers/imap/camel-imap-store.c (rename_folder): Finished
6065         implementation.
6066         (imap_connect_online): Also set the store's dir_sep here.
6067         (imap_connect_offline): "
6068
6069         * providers/local/camel-local-folder.c (local_rename): Implement
6070         local rename of folder objects.
6071
6072 2001-10-26  Not Zed  <NotZed@Ximian.com>
6073
6074         * camel-vee-folder.c (camel_vee_folder_class_init): Hook into
6075         rename function.
6076         (vee_rename): Implement the veefolder rename function.
6077         (camel_vee_folder_class_init): 
6078         (folder_changed_change): Kill a warning with a cast.
6079
6080         * camel-vee-store.c (vee_rename_folder): Emit a folder_renamed
6081         event properly, also call parent to do some rename stuff.
6082
6083         * camel-store.h: Added a CamelRenameInfo for the rename event.
6084
6085         * camel-folder.c (camel_folder_rename): New function to rename a
6086         folder object.
6087         (camel_folder_class_init): Added a renamed event.
6088         (folder_rename): Default impl, set full_name, and set name
6089         assuming the dir separator is '/'.
6090
6091         * camel-store.c (camel_store_class_init): Added folder_renamed
6092         event.
6093         (camel_store_rename_folder): Rename an active folder object if we
6094         have one, and update the folder table.
6095         (rename_folder): Make a default implementation that handles
6096         updating the folder tree.
6097
6098 2001-10-26  Jeffrey Stedfast  <fejj@ximian.com>
6099
6100         * providers/imap/camel-imap-store.c (delete_folder): Don't bother
6101         checking ex since we can rely on the response being NULL on error.
6102         (rename_folder): Implemented.
6103
6104 2001-10-26  Jeffrey Stedfast  <fejj@ximian.com>
6105
6106         * providers/imap/camel-imap-folder.c (imap_get_message): Check to
6107         make sure that the dataset is non-NULL before using and/or
6108         freeing.
6109
6110         * camel-tcp-stream-raw.c (stream_write): Check for EWOULDBLOCK
6111         too?
6112         (stream_read): Same.
6113         (stream_flush): Return 0 always, fsync() and tcp sockets don't
6114         play nice :-)
6115
6116         * providers/imap/camel-imap-message-cache.c
6117         (camel_imap_message_cache_get): Lets try putting a
6118         camel_stream_reset() here. Logic being that the stream may have
6119         been read from since it was cached and thus our caller may try
6120         reading from it and get no data from it since it is already at the
6121         EOS. This may fix bug #12943.
6122
6123 2001-10-25  Not Zed  <NotZed@Ximian.com>
6124
6125         * camel-search-private.c (utf8_get): Remove the stupid warning
6126         that should never have been there in the first place.
6127
6128         * camel-sasl-digest-md5.c (digest_response): s/iconv/e_iconv/
6129
6130         * camel-pgp-context.c (pgp_verify): "
6131
6132         * camel-mime-utils.c (rfc2047_decode_word, rfc2047_decode_word,
6133         append_8bit, rfc2047_encode_word, rfc2184_decode,
6134         header_decode_param): "
6135
6136         * camel-mime-part-utils.c (convert_buffer, convert_buffer): "
6137
6138         * camel-mime-filter-charset.c (reset, complete, filter): "
6139
6140 2001-10-24  Not Zed  <NotZed@Ximian.com>
6141
6142         * camel-mime-filter-basic.c (complete): For qp decoding, if the
6143         data isn't really qp encoded, we could possible grow the buffer by
6144         upto 2 bytes above the input size, fix allocations/assertions
6145         appropraitely.
6146
6147         * camel-vee-folder.c (folder_changed_change): If we're not
6148         autoupdate, only search for new matches against changed uid's that
6149         we dont already have.
6150
6151 2001-10-24  Dan Winship  <danw@ximian.com>
6152
6153         * providers/imap/camel-imap-store.c (unsubscribe_folder): Don't
6154         let fi->name be NULL.
6155
6156 2001-10-24  Jeffrey Stedfast  <fejj@ximian.com>
6157
6158         * camel-stream-fs.c (stream_read): Same as in the TcpStreamRaw code.
6159         (stream_write): And again here...
6160
6161         * camel-tcp-stream-raw.c (stream_read): Handle the EAGAIN error
6162         case as well.
6163         (stream_write): Same here, this might fix the SMTP truncation
6164         thing? I hope?
6165
6166 2001-10-23  Dan Winship  <danw@ximian.com>
6167
6168         * camel-mime-utils.c (mail_list_magic): Remove an extra * in one
6169         of the regexps that glibc apparently doesn't mind but bsd does.
6170
6171 2001-10-23  Not Zed  <NotZed@Ximian.com>
6172
6173         * providers/local/camel-mbox-summary.c: made d(x) x recompile again.
6174
6175 2001-10-22  Not Zed  <NotZed@Ximian.com>
6176
6177         * providers/local/camel-spool-summary.c (summary_rebuild): No, use
6178         Storing, as the other code does :p
6179         (spool_summary_check): Check for consistency.
6180
6181 2001-10-22  Jon Trowbridge  <trow@ximian.com>
6182
6183         * providers/local/camel-spool-summary.c (summary_rebuild):
6184         s/summarising/summarizing/.
6185         (spool_summary_check): s/summarise/summarize/.
6186
6187 2001-10-22  Jeffrey Stedfast  <fejj@ximian.com>
6188
6189         * camel-pgp-mime.c (camel_pgp_mime_part_verify): If we are
6190         kludging around a inline-pgp signed part, do some charset
6191         conversion to protect any 8bit text.
6192
6193 2001-10-22  Not Zed  <NotZed@Ximian.com>
6194
6195         * camel-filter-search.c, camel-folder-search.c (check_header): Use
6196         search_type_mlist for mailing list searches.
6197
6198         * camel.c (camel_init): call camel-mime-utils-init func.
6199
6200         * camel-mime-utils.c: Changed mail mail_list_magic to include a
6201         domain part, also pre-compile all the patterns.  They are all
6202         backward compatible except List-Id: which now uses the
6203         mail-address-like <list-name.host.name> part rather than the
6204         plain-text part (which might've been blank anyway).
6205         (camel_mime_utils_init): Initialisation function to setup any
6206         static data required by camel-mime-utils at run-time.  We now
6207         setup the base64/charset class tables here, so it doesn't need to
6208         be done statically.
6209         (camel_mime_special_table, camel_mime_base64_rank): No longer
6210         statically initialise these.
6211         (main): Removed + the tests at the end of the file.
6212         (header_raw_check_mailing_list): Dont compile regex's here,
6213         already compiled in utils_init.  Use the regex patterns to remove
6214         leading <'s from addresses.  Also, if there is a domain part
6215         matched, add that after a '@' is added.
6216
6217         * camel-search-private.c (camel_search_header_match): Match check
6218         against all addresses in a multiple address match.  Should fix
6219         #13051.
6220         (camel_search_header_match): Oops, missing i=0.
6221         (camel_search_header_match): Added SEARCH_TYPE_MLIST for mlist
6222         search types.  It ignores the domain part if either (but not both)
6223         of the values dont have it.
6224
6225 2001-10-22  Dan Winship  <danw@ximian.com>
6226
6227         * camel-pgp-mime.c (camel_pgp_mime_part_verify): Add a hack: if
6228         the multipart/signed part has a "x-inline-pgp-hack" parameter in
6229         its Content-Type, don't pass the MIME headers as part of the data
6230         to be verified.
6231
6232 2001-10-22  Rodrigo Moya <rodrigo@ximian.com>
6233
6234         * Makefile.am: added $GNOME_INCLUDEDIR to INCLUDES, needed for latest
6235         libgnome, which install headers in $(prefix)/gnome-1.0
6236
6237 2001-10-21  Jeffrey Stedfast  <fejj@ximian.com>
6238
6239         * camel-mime-part-utils.c
6240         (simple_data_wrapper_construct_from_parser): Only do the rawtext
6241         checks if the part is a text part, otherwise don't bother wasting
6242         cpu cycles.
6243
6244         * camel-store.c (camel_folder_info_build): Updated comments to
6245         make the code a bit more clear.
6246
6247 2001-10-21  Not Zed  <NotZed@Ximian.com>
6248
6249         * camel-store.c (CS_CLASS): Dont do the macro stuff - basically so
6250         you can actually debug calls.
6251         (camel_store_uri_cmp): New function to compare store objects.
6252
6253         * camel-vee-folder.c (vee_folder_add_info): oops, dont free the
6254         vuid, since its alloca'd now.
6255         (folder_changed_change): Kill a compile warning.
6256
6257 2001-10-20  Not Zed  <NotZed@Ximian.com>
6258
6259         * camel-folder.c (move_messages_to): If no exception supplied, use
6260         a local one.
6261         (move_message_to): Set the seen flag also when we delete it.
6262
6263 2001-10-19  Jeffrey Stedfast  <fejj@ximian.com>
6264
6265         * camel-vtrash-folder.c (vtrash_move_messages_to): If the
6266         destination folder is the vfolder source folder, then
6267         set_message_flags on it.
6268
6269 2001-10-19  Not Zed  <NotZed@Ximian.com>
6270
6271         * camel-session.c (register_provider): When registering provider,
6272         translate all strings.
6273
6274         * camel-vee-folder.c (camel_vee_folder_remove_folder): Lock the
6275         right lock for unmatched subfolder list stuff.  If the sub folder
6276         is deleted & part of unmatched, or the last ref to the sub folder
6277         is gone from unmatched, blow it away completely from unmatched,
6278         but only do it once.
6279         (vee_folder_remove_folder): Added arg to kill unmatched
6280         unconditionally.  Also handle deleted folders, always remove
6281         stuff.
6282         (folder_changed_change): Lock subfolder lock for entirety of
6283         operation, and also check to see if the subfolder is still there
6284         before doing any fancy work (incase it got removed while we were
6285         waiting to execute).
6286         (folder_changed_change_uid): Use alloca for vuid, and not
6287         sprintf(".lengths")
6288         (vee_search_by_expression): Dont use sprintf for vuid.
6289         (vee_search_by_uids): "
6290         (vee_folder_add_info): "
6291         (folder_changed_remove_uid): "
6292         (folder_changed_change): "
6293         (folder_changed_change_uid): Also check folder_unmatched for
6294         changed uid's so we properly update/propagate unmatched changes.
6295         (folder_changed_change): Ok, so dont hold the subfolder lock for
6296         the whole duration of the changed event, although we probably
6297         should, requires a recursive mutex.
6298         (folder_changed_change): Change logic, we always add changed stuff
6299         if it now matches, but dont remove it unless its auto-remove, only
6300         propagate changes for it.
6301         (vee_set_message_flags): Call parent method after doing our work.
6302         (vee_set_message_user_flag): Same here.
6303
6304 2001-10-18  Jeffrey Stedfast  <fejj@ximian.com>
6305
6306         * camel-mime-part-utils.c
6307         (simple_data_wrapper_construct_from_parser): If a charset isn't
6308         specified or claims to be utf-8, check the validity of the text
6309         and if it's invalid, set the rawtext bit to TRUE. If the charset
6310         is x-unknown or some other x- charset, always set the rawtext bit
6311         to TRUE.
6312
6313 2001-10-18  Not Zed  <NotZed@Ximian.com>
6314
6315         * camel-store.c (camel_store_unsubscribe_folder): If we are
6316         unsubscribing from a folder we have loaded, set the folder
6317         deleted, as with the delete_folder case.
6318
6319         * providers/(imap|local|pop3|sendmail|smtp)/Makefile.am: Added
6320         CAMEL_CFLAGS so we get the right iconv stuff, patch from Yanko
6321         Kaneti <yaneti@declera.com>
6322
6323 2001-10-18  Jeffrey Stedfast  <fejj@ximian.com>
6324
6325         * camel-pgp-context.c (crypto_exec_with_passwd): Make sure the
6326         cancel_fd isn't -1.
6327
6328 2001-10-18  Jeffrey Stedfast  <fejj@ximian.com>
6329
6330         * providers/imap/camel-imap-message-cache.c (insert_finish): Flush
6331         the stream here, not sure it really matters but it might
6332         (hopefully) fix bug #12943.
6333
6334         * camel-pgp-context.c (crypto_exec_with_passwd): Make
6335         user-cancellable.
6336
6337         * providers/local/camel-local-provider.c: String cleanup for bug
6338         #6640.
6339
6340         * providers/imap/camel-imap-folder.c (imap_sync_online): Fix my
6341         Cyrus imapd workaround...instead of checking to see if info->flags
6342         == FLAGGED, just check to see if it contains any IMAP flags.
6343
6344 2001-10-17  Not Zed  <NotZed@Ximian.com>
6345
6346         * providers/local/camel-maildir-folder.c
6347         (camel_maildir_folder_new): Use '.' as the inbox name for filter
6348         new messages test.
6349
6350         * camel-store.c (camel_folder_info_clone): New function to clone a
6351         folderinfo tree.
6352
6353 2001-10-17  Jeffrey Stedfast  <fejj@ximian.com>
6354
6355         * providers/local/camel-mh-folder.c (mh_append_message): Same as
6356         maildir and mbox append-message.
6357
6358         * providers/local/camel-maildir-folder.c (maildir_append_message):
6359         Same as mbox append.
6360
6361         * camel-exception.c (camel_exception_set): Make sure the new
6362         description isn't the same as the old description pointer before
6363         freeing the old one.
6364         (camel_exception_setv): Don't free the old description until we
6365         set the new one this way we can reuse the old description in the
6366         new description.
6367
6368         * providers/local/camel-mbox-folder.c (mbox_append_message): If
6369         errno == EINTR, then we got a user-cancel so set the exception
6370         appropriately so that we don't make the user shit his pants.
6371
6372         * camel-filter-driver.c (do_copy): Add an optimization for when
6373         destination folder is the same as the source folder.
6374
6375 2001-10-17  Not Zed  <NotZed@Ximian.com>
6376
6377         * providers/imap/camel-imap-store.c (get_folder_info_online):
6378         (parse_list_response_as_folder_info): Patch from Danw, Use unread
6379         count of -1 to mark unflagged messages.  Make sure any folder we
6380         dont lookup explicitly is marked as -1.  Should fix #9947 and
6381         friends.
6382
6383         * providers/local/camel-mbox-summary.c (mbox_summary_sync): Only
6384         touch the summary if the timestamp or size changed.
6385
6386 2001-10-17  Jeffrey Stedfast  <fejj@ximian.com>
6387
6388         * camel-filter-driver.c (camel_filter_driver_filter_message): Set
6389         the DELETED flag on directly on the info if the source folder
6390         doesn't have summary capability.
6391
6392 2001-10-17  Not Zed  <NotZed@Ximian.com>
6393
6394         * camel-tcp-stream-raw.c (stream_write): As below.
6395
6396         * camel-stream-fs.c (stream_write): If not checking cancellation,
6397         make sure we write out everything asked of us.
6398
6399 2001-10-16  Jeffrey Stedfast  <fejj@ximian.com>
6400
6401         * camel-pgp-context.c (pgp_verify): Rearange the order of the gpg
6402         options slightly otherwise it might try to use "--no-tty" as the
6403         filename to verify :-)
6404
6405         * camel-object.[c,h]: If CAMEL_DEBUG is defined, print some useful
6406         ref/unref info.
6407
6408         * providers/imap/camel-imap-store.c (delete_folder): Fixed an
6409         assignment warning.
6410
6411         * camel-uid-cache.c (camel_uid_cache_new): Make sure that the
6412         parent directory exists before trying to open the filename, if it
6413         doesn't, create it.
6414
6415 2001-10-16  Not Zed  <NotZed@Ximian.com>
6416
6417         * camel-mime-utils.c (header_address_decode): If no content, dont
6418         try and decode further and spit meaningless warnings.
6419
6420 2001-10-16  Jeffrey Stedfast  <fejj@ximian.com>
6421
6422         * camel-filter-driver.c (do_flag): Only perform the operation on
6423         the folder if the folder has summary capability, else just poke
6424         the info directly. Fixes the "Filters don't work" bug.
6425         (do_score): Same.
6426         (do_colour): And here too.
6427
6428 2001-10-15  Jeffrey Stedfast  <fejj@ximian.com>
6429
6430         * camel-stream-fs.c (stream_read): Save the errno before calling
6431         fcntl so fcntl doesn't overwrite errno in case of a previous
6432         error.
6433         (stream_write): Same.
6434
6435 2001-10-13  Jeffrey Stedfast  <fejj@ximian.com>
6436
6437         * providers/smtp/camel-smtp-transport.c (smtp_data): Replace the
6438         Bcc headers in a single location and don't flush the data unless
6439         the write was successful.
6440
6441 2001-10-12  Jeffrey Stedfast  <fejj@ximian.com>
6442
6443         * Makefile.am: Remove the stripheader filter from the build.
6444
6445         * camel-mime-filter-stripheader.[c,h]: Removed.
6446
6447         * providers/smtp/camel-smtp-transport.c (smtp_data): Check the
6448         return value of camel_stream_flush to make sure it flushed the
6449         data successfully before continuing. Don't use the stripheader
6450         filter, it was completely broken - instead remove the header and
6451         set it again after we send.
6452
6453 2001-10-12  Not Zed  <NotZed@Ximian.com>
6454
6455         * camel-vee-folder.c (camel_vee_folder_remove_folder): Unhook from
6456         all events before removing folder.
6457         (camel_vee_folder_add_folder): Hook onto delete event.
6458         (camel_vee_folder_finalise): Unhook from deleted event for suibfolder.
6459         (subfolder_deleted): When the folder is deleted, remove it from
6460         the vfolder automagically.
6461
6462 2001-10-11  Not Zed  <NotZed@Ximian.com>
6463
6464         * camel-vee-folder.c (vee_search_by_uids): convert the uids list
6465         to a subset appropriate for each subfolder before trying to search
6466         on it.
6467
6468         * camel-charset-map.[ch]: Removed charset/locale charset lookup
6469         and iconv_open/close functions, moved to gal.  Fixed all callers.
6470
6471 2001-10-11  Jeffrey Stedfast  <fejj@ximian.com>
6472
6473         * camel-tcp-stream-ssl.c (ssl_cert_is_saved): Same.
6474
6475         * camel-tcp-stream-openssl.c (ssl_cert_is_saved): Instead of
6476         opening the file, stat it and make sure that it belongs to us.
6477
6478 2001-10-10  Jeffrey Stedfast  <fejj@ximian.com>
6479
6480         * camel-tcp-stream-openssl.c (ssl_verify): Same hack as below.
6481
6482         * camel-tcp-stream-ssl.c (ssl_bad_cert): Hack around the fact that
6483         adding a cert to nss's certdb seems to not work.
6484
6485 2001-10-10  Not Zed  <NotZed@Ximian.com>
6486
6487         * camel-vee-folder.c (vee_sync): Only re-build the folder if we're
6488         expunging.  Also only clear out the changed folders list if we're
6489         expungung and everything worked.
6490
6491 2001-10-10  Jeffrey Stedfast  <fejj@ximian.com>
6492
6493         * camel-charset-map.c (camel_charset_map_init): Added a hack for
6494         Solaris systems.
6495
6496 2001-10-10  Not Zed  <NotZed@Ximian.com>
6497
6498         * providers/local/camel-maildir-store.c (scan_dir): oops, we want
6499         get_unread_message_count, not get_message_count!
6500
6501 2001-10-09  Not Zed  <NotZed@Ximian.com>
6502
6503         * camel-service.c (camel_service_disconnect): Duplicate connect
6504         code that unregisters a cancel op if we created one.
6505
6506         * camel-operation.c (camel_operation_progress): Another go at
6507         getting the logic right again.  Make transients only update after
6508         5 seconds (CAMEL_OPERATION_TRANSIENT_DELAY)
6509         (camel_operation_end): Likewise.
6510
6511         * providers/local/camel-spool-folder.c (spool_search_by_uids):
6512         Implement.
6513
6514         * providers/imap/camel-imap-search.c (imap_body_contains): If
6515         searching a sub-set of the total message count, then use a UID
6516         range to search only specific messages.
6517
6518         * camel-vee-folder.c (vee_folder_change_match): Removed.
6519         (folder_changed_add_uid): Helper func for changed code.
6520         (folder_changed_remove_uid): "
6521         (folder_changed_change_uid): "
6522         (folder_changed): Rewritten.  Supports proper auto-updating of
6523         changes, but not removals till a sync occurs.
6524         (vee_search_by_uids): Implement.
6525         (folder_changed): Changed to call an async threaded function to do
6526         the actual folder updating.
6527
6528         * camel-folder-summary.c (camel_flag_list_copy): New func to copy
6529         a whole list of flags.
6530         (camel_tag_list_copy): New func to copy a whole list of flags.
6531
6532         * providers/imap/camel-imap-folder.c (imap_search_by_uids):
6533         Implement.
6534
6535         * providers/local/camel-local-folder.c (local_search_by_uids):
6536         Implement.
6537
6538         * camel-folder.c (camel_folder_search_by_uids): New function,
6539         search a subset of uid's.
6540         (search_by_uids): Default impl, return error.
6541
6542 2001-10-08  Dan Winship  <danw@ximian.com>
6543
6544         * camel-folder.h (struct _CamelFolder): replace the ever-growing
6545         list of gbooleans with a single guint32 for flags.
6546
6547         * camel-folder.c: Update folder flag setting/checking.
6548
6549         * providers/pop3/camel-pop3-folder.c (camel_pop3_folder_init):
6550         * providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new): 
6551         * providers/local/camel-spool-folder.c (spool_init,
6552         camel_spool_folder_new): 
6553         * providers/local/camel-maildir-folder.c (camel_maildir_folder_new): 
6554         * providers/local/camel-local-folder.c (local_init): 
6555         * providers/imap/camel-imap-folder.c (camel_imap_folder_init,
6556         camel_imap_folder_new): 
6557         * camel-vtrash-folder.c (camel_vtrash_folder_init): 
6558         * camel-vee-folder.c (camel_vee_folder_init): 
6559         * camel-digest-folder.c (camel_digest_folder_init): update folder
6560         flag setting.
6561
6562 2001-10-07  Dan Winship  <danw@ximian.com>
6563
6564         * providers/imap/camel-imap-store.c (get_folder_online): Unlock
6565         the store before returning error. (noted by NotZed)
6566
6567 2001-10-06  Jeffrey Stedfast  <fejj@ximian.com>
6568
6569         * camel-mime-utils.c (header_decode_text): Fix a slight error in
6570         logic. Just because the last word was an encoded word doesn't mean
6571         we ignore the lwsp padding, we only ignore it if the last word and
6572         *this* word are encoded.
6573
6574 2001-10-06  Jeffrey Stedfast  <fejj@ximian.com>
6575
6576         * camel-mime-filter-basic.c (filter): Implemented uuencoding and
6577         decoding.
6578         (complete): Implemented uuencoding and decoding.
6579
6580         * camel-mime-utils.c (uuencode_close): New function to flush the
6581         uu encoder.
6582         (uuencode_step): New function to uuencode a block of data.
6583
6584 2001-10-05  Not Zed  <NotZed@Ximian.com>
6585
6586         * providers/imap/camel-imap-store.c (subscribe_folder): Use a
6587         folder_subscribed event rather than a folder_created one.
6588         (unsubscribe_folder): Similarly for unsubscribed/deleted.
6589         (create_folder): Emit a folder_created event on the folders we
6590         added.  Not sure hsould probably check which ones are new and
6591         which ones are just existing ones?
6592         (delete_folder): Emit a folder_deletd event when we've deleted the
6593         folder.  Part of fix for #11831.
6594
6595         * camel-store.c (camel_store_class_init): Added
6596         folder_subscribed/unsubscribed events.
6597
6598 2001-10-05  Jeffrey Stedfast  <fejj@ximian.com>
6599
6600         * camel-service.c (camel_service_finalize): Turn off warnings.
6601         (get_name): Same.
6602
6603         * camel-sasl.c (sasl_challenge): Turn off warnings.
6604
6605         * camel-tcp-stream.c (tcp_connect): Turn off warnings.
6606         (tcp_getsockopt): Same.
6607         (tcp_setsockopt): Here too.
6608         (tcp_get_socket): And here.
6609
6610         * camel-folder.c (folder_sync): Turn off warnings.
6611         (expunge): Same.
6612         (append_message): Here too.
6613         (get_message): And here.
6614         (search_by_expression): And again here.
6615         (folder_changed): Here too.
6616
6617         * camel-store.c (get_folder): Set an exception and turn off
6618         debugging g_warnings.
6619         (create_folder): Same.
6620         (delete_folder): Here too.
6621         (rename_folder): And here.
6622         (get_trash): And here.
6623         (get_folder_info): Same.
6624         (free_folder_info): And again here.
6625         (camel_folder_info_build): Here too.
6626         (folder_subscribed): Same.
6627         (subscribe_folder): Here too.
6628         (unsubscribe_folder): And here.
6629
6630 2001-10-05  Not Zed  <NotZed@Ximian.com>
6631
6632         * camel-mime-utils.c (header_decode_mailbox): Try harder to get
6633         broken names out of addresses.  Unencoded ,'s in names will still
6634         break it, but well what can you do eh?
6635         (header_decode_mailbox): Always add .'s into address we've scanned
6636         past a '.', even if we can't decode the next part.  Fix for some
6637         annoying bug #.
6638
6639 2001-10-04  Not Zed  <NotZed@Ximian.com>
6640
6641         * camel-store.c (camel_store_delete_folder): Change the order of
6642         execution slightly.  We delete the folder first, then call the
6643         classes delete folder, then cleanup the hashtable afterwards.
6644         This is so deletes of vfolders work, since vee-store uses the
6645         folder hashtable to store all of is vfolders :-/
6646
6647 2001-10-04  Jeffrey Stedfast  <fejj@ximian.com>
6648
6649         * camel-service.c (camel_service_connect): Unregister the
6650         operation before unreffing it.
6651
6652 2001-10-03  Not Zed  <NotZed@Ximian.com>
6653
6654         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
6655         Remove now unused 'recents' array/freeing func.
6656
6657         * camel-object.c (camel_object_trigger_event): Oops, always run
6658         the prep function, even if we have no hooks listening.  Causes
6659         incoming imap recents to get ignored bythe camel-folder filter
6660         inbox code.
6661
6662         * providers/local/camel-local-folder.c (local_sync): Dont
6663         explicitly save metadata, its saved in summary_sync.
6664
6665         * providers/local/camel-mh-summary.c: Call superclass.
6666         (mh_summary_check): Dont save ibex.
6667
6668         * providers/local/camel-maildir-summary.c: Call superclass method.
6669         (maildir_summary_check): Dont save ibex explictly.
6670
6671         * providers/local/camel-mbox-summary.c: Call super-class sync when
6672         done, saves summary/ibex, etc.
6673         (mbox_summary_check): Dont save ibex.
6674         (mbox_summary_sync): Call summary_check rather than trying to
6675         update from our known position.
6676
6677         * providers/local/camel-local-summary.c
6678         (camel_local_summary_check): Dont save the summary or index here.
6679         (local_summary_sync): Save the summary/index here.
6680
6681         * camel-search-private.c (camel_search_build_match_regex): Added
6682         MATCH_NEWLINE flag, -> REG_NEWLINE.
6683
6684         * camel-lock-helper.c: Include <string.h> to kill some warnings.
6685
6686         * camel-filter-search.c (get_full_header): Put \n's between each
6687         line we generate.
6688         (header_full_regex): Dont drop the first argument to the command
6689         -> empty matches!
6690         (header_full_regex): Set match_newline for building regex.
6691         (body_regex): And here too.  These all fix #9877.
6692
6693 2001-10-03  Jeffrey Stedfast  <fejj@ximian.com>
6694
6695         * camel-store.c (camel_store_delete_folder): Call
6696         camel_folder_delete() on the folder if it's "alive".
6697
6698         * camel-folder.c (camel_folder_delete): Mark the folder as
6699         deleted, perform any folder specific cleanup and emit the deleted
6700         event.
6701         (camel_folder_sync): Only sync the folder if it hasn't been
6702         deleted.
6703         (camel_folder_expunge): Same.
6704
6705 2001-10-03  Dan Winship  <danw@ximian.com>
6706
6707         * providers/local/camel-local-provider.c (local_url_equal):
6708         Strange are the ways of alloca. Fixes 11543.
6709
6710 2001-10-02  Jeffrey Stedfast  <fejj@ximian.com>
6711
6712         * camel-tcp-stream-ssl.c (ssl_bad_cert): Import the certificate if
6713         the user accepts it.
6714
6715 2001-10-02  Not Zed  <NotZed@Ximian.com>
6716
6717         * providers/local/camel-local-provider.c (local_url_hash,
6718         local_url_equal): for hashing/comparing local url's, we ignore
6719         trailing /'s in paths (maybe shuld handle multiple /'s too).
6720         (camel_provider_module_init): Use local_url_hash/equal for all
6721         functions.
6722
6723         * camel-sasl-digest-md5.c (digest_response): Change to
6724         camel_charset_iconv_open/close.
6725
6726         * camel-pgp-context.c (pgp_verify): Change to
6727         camel_charset_iconv_open/close.
6728
6729         * camel-mime-part-utils.c (convert_buffer): Change to
6730         camel_charset_iconv_open().
6731
6732         * camel-mime-filter-charset.c
6733         (camel_mime_filter_charset_new_convert, finalise): Change to
6734         camel_charset_iconv_open, etc.
6735
6736         * camel-mime-utils.c: Use the camel_charset_iconv_open/close()
6737         functions to open/close it.
6738
6739         * camel-charset-map.c (camel_charset_iconv_open): New function,
6740         wrap iconv_open, so we can cache ic's.
6741         (camel_charset_iconv_close): Likewise for close.
6742         (camel_charset_map_init,shutdown): Init/free iconv cache.
6743
6744 2001-10-02  Jeffrey Stedfast  <fejj@ximian.com>
6745
6746         * camel-charset-map.c (camel_charset_to_iconv): Revert my
6747         x-unknown special-case hack - this may mask other problems.
6748
6749         * camel-mime-utils.c (rfc2047_decode_word): If the iconv
6750         conversion fails, for whatever reason, retry using the user's
6751         locale charset.
6752
6753 2001-10-02  Not Zed  <NotZed@Ximian.com>
6754
6755         * providers/local/camel-maildir-store.c (get_folder_info): Go back
6756         to using the store url's path, not the toplevel_dir thing.
6757
6758         * camel-operation.c (camel_operation_progress): Fix the progress
6759         logic, so we dont update too often.
6760
6761         * camel-object.c (camel_object_get_hooks): Change the lock to a
6762         recursive e-mutex.
6763         (camel_object_hook_event): Maintain list length of hook list.
6764         (camel_object_unhook_event): "
6765         (camel_object_unhook_event): If we are in an event, just mark the
6766         pair as removed, without removing it.
6767         (camel_object_trigger_event): Before running events, copy the
6768         list, and also ignore 'removed' events.  After running events, if
6769         we're all out of events, then free up any pending-removed events.
6770         (camel_object_free_hooks): Add some new assertions on the state of
6771         the hook structure.
6772         Removed the #error if threads not defined.  It _should_ actually
6773         work without threads.
6774         (camel_object_free_hooks): Free mutex when done.
6775
6776 2001-10-01  Jeffrey Stedfast  <fejj@ximian.com>
6777
6778         * providers/imap/camel-imap-store.c (delete_folder): Remove any
6779         cached messages that belonged to the deleted folder.
6780         (subscribe_folder): Don't ever let the info->name be NULL and
6781         don't use the stupid concat kludge to generate the URL, just use a
6782         CamelURL to do it. This way we don't risk breaking stuff by having
6783         a url like imap://fejj@imap//folder
6784
6785         * camel-charset-map.c (camel_charset_to_iconv): If the charset is
6786         x-unknown, return the locale_charset.
6787
6788 2001-10-01  Dan Winship  <danw@ximian.com>
6789
6790         * camel-provider.h: Fix up the provider flags to specify things
6791         more completely so we don't have to hardcode provider names in the
6792         mailer.
6793
6794         * providers/local/camel-local-provider.c: MH, mbox, and Maildir
6795         are LOCAL. MH and mbox are no longer STORAGE by the new
6796         definition.
6797
6798         * camel-session.c (vee_provider): The vfolder store is a STORAGE.
6799
6800 2001-10-01  Dan Winship  <danw@ximian.com>
6801
6802         * providers/local/camel-local-store.c (construct): Don't munge the
6803         URL; CamelSession's caching relies on it not changing. Instead,
6804         add a toplevel_dir field to CamelLocalStore, and set that to the
6805         path, but always ending with /.
6806         (camel_local_store_finalize): Free toplevel_dir
6807         (camel_local_store_get_toplevel_dir): Return toplevel_dir rather
6808         than url->path.
6809
6810         * providers/local/*: Lots of s/url->path/toplevel_dir/
6811
6812         * providers/local/camel-spool-store.c (construct): Likewise, don't
6813         try to strip a trailing / from url->path here, but I didn't make
6814         the corresponding toplevel_dir change, because there's no good
6815         reason someone should expect "/var/spool/mail/danw/" to work since
6816         that's not a directory.
6817
6818         * providers/pop3/camel-pop3-folder.c (pop3_refresh_info): if STAT
6819         returns 0, don't bother sending UIDL. Speeds things up slightly
6820         and also works around a bug in a particular random POP server.
6821         (ximian bug 11369).
6822
6823 2001-09-29  Jeffrey Stedfast  <fejj@ximian.com>
6824
6825         * camel-pgp-context.c (pgp_sign): Add --no-secmem-warning and
6826         --no-greeting to the gpg command-line options.
6827         (pgp_clearsign): Same.
6828         (pgp_verify): Here too.
6829         (pgp_encrypt): And here.
6830         (pgp_decrypt): And finally here.
6831
6832 2001-09-28  Jeffrey Stedfast  <fejj@ximian.com>
6833
6834         * camel-filter-search.c (get_source): Same here.
6835
6836         * camel-mime-message.c (camel_mime_message_set_source): Don't use
6837         the e_url_shroud hack, use CamelURL functions instead.
6838
6839 2001-09-28  Jeffrey Stedfast  <fejj@ximian.com>
6840
6841         * providers/nntp/camel-nntp-provider.c
6842         (camel_provider_module_init): Init the nntp url hash and url_equal
6843         functions.
6844
6845         * providers/sendmail/camel-sendmail-provider.c
6846         (camel_provider_module_init): Init the sendmail url hash and
6847         url_equal functions.
6848
6849         * providers/smtp/camel-smtp-provider.c
6850         (camel_provider_module_init): Init the smtp url hash and url_equal
6851         functions.
6852
6853         * providers/pop3/camel-pop3-provider.c
6854         (camel_provider_module_init): Init the pop3 url hash and url_equal
6855         functions.
6856
6857         * providers/imap/camel-imap-provider.c
6858         (camel_provider_module_init): Init the imap url hash and url_equal
6859         functions.
6860
6861         * providers/local/camel-local-provider.c
6862         (camel_provider_module_init): Init the local url hash and
6863         url_equal functions.
6864
6865         * camel-session.c (camel_session_class_init): Init the vfolder url
6866         hash and url_equal functions.
6867
6868         * camel-provider.h: Added url_hash and url_equal function pointers
6869         to the structure.
6870
6871         * camel-vtrash-folder.c (vtrash_move_messages_to): Oops, a
6872         CamelFolder is not a CamelFolderClass.
6873
6874 2001-09-28  Dan Winship  <danw@ximian.com>
6875
6876         * camel-tcp-stream-openssl.c (ssl_error_to_errno): Make this take
6877         an SSL * instead of a CamelTcpStreamSSL *, since it can get called
6878         from open_ssl_connection, when the CamelTcpStreamSSL isn't set up
6879         right yet. Fixes a crash on connection failure.
6880
6881 2001-09-27  Dan Winship  <danw@ximian.com>
6882
6883         * providers/imap/camel-imap-folder.c
6884         (camel_imap_folder_fetch_data): Grab the store's command_lock
6885         before grabbing the folder's cache_lock to prevent deadlock if
6886         another thread is processing an EXPUNGE response.
6887
6888         * providers/imap/camel-imap-folder.c
6889         (imap_expunge_uids_resyncing): Fix a compiler warning that might
6890         point out a real bug...
6891
6892         * providers/imap/camel-imap-folder.c (get_content): and one that
6893         doesn't
6894
6895 2001-09-27  Not Zed  <NotZed@Ximian.com>
6896
6897         * camel-service.c (camel_service_connect): Dont re-register the
6898         connect_op if we got it by calling 'operation_registered', which
6899         returns an already-registered one.
6900         (camel_service_disconnect): Likewise here.  This removes all the
6901         re-registered warnings.
6902
6903         * camel-object.c (camel_object_unref): Fill the finalised data
6904         with nonsense, rather than 0's - more easily detect bad data.
6905         (camel_object_new): Clear instance data when we retrieve it off
6906         the list.
6907
6908         * camel-object.h (_CamelObject): Added an event lock pointer for
6909         uh, locking event stuff.  Also change the hooklist hashtable into
6910         a list.  Changed all the code to handle it.  Result: thread-safe
6911         events, event-hooks, and save memory too, and SHOULD FINALLY FIX
6912         THAT UNREAD COUNT PROBLEM.
6913
6914 2001-09-27  Jeffrey Stedfast  <fejj@ximian.com>
6915
6916         * camel-pgp-mime.c (camel_pgp_mime_part_decrypt): CRLF decode the
6917         stream before parsing it into a MIME part. This fixes bug #10521.
6918
6919         * camel-store.c: Remove the old folder from the vTrash folder.
6920
6921 2001-09-27  Dan Winship  <danw@ximian.com>
6922
6923         * camel-service.c: Change "gboolean connected" to
6924         "CamelServiceConnectionStatus status", which can be disconnected,
6925         connecting, connected, or disconnecting.
6926         (camel_service_init, camel_service_finalize): create/destroy the
6927         connect_op_lock. Refer to service->status rather than
6928         service->connected.
6929         (camel_service_connect): When connecting, note the current
6930         operation (and create a new one if there's none registered) and
6931         mark the connection "connecting" until we succeed or fail.
6932         (camel_service_disconnect): Likewise in reverse.
6933         (camel_service_cancel_connect): New function to cancel a
6934         connection attempt.
6935         (cancel_connect): Default implementation: Call
6936         camel_operation_cancel on the connect_op.
6937
6938         * camel-disco-store.c (disco_connect): Only call
6939         CamelRemoteStore's connect func if we're online.
6940         (disco_cancel_connect): Fall back to offline if a connection gets
6941         cancelled.
6942         (disco_get_folder_info): Kludge: call connect explicitly before
6943         deciding whether to do the online or offline version, so if the
6944         connect fails, we fall back correctly.
6945
6946         * camel-session.c (camel_session_get_service_connected):
6947         s/svc->connected/svc->status/
6948
6949         * camel-remote-store.c (camel_remote_store_finalise):
6950         Change service->connected check to service->status check.
6951         (remote_connect): Don't set service->connected here:
6952         camel_service_connect() itself does that.
6953
6954         * camel-operation.c (camel_operation_registered): Deal with the
6955         possibility that there's no registered op.
6956
6957 2001-09-26  Not Zed  <NotZed@Ximian.com>
6958
6959         * camel-filter-driver.c (camel_filter_driver_filter_message): If
6960         we get a search error, just abort, dont try and fall back and copy
6961         to inbox.
6962         (camel_filter_driver_filter_message): Make sure we ALWAYS use
6963         exceptions for important things - like moving messages to inbox!
6964         (camel_filter_driver_filter_message): If we have the source
6965         folder, use camel_folder_set_message_flags rather then poking the
6966         info directly, which skips changed events.  This means filtering
6967         immediate doesn't lose changed events.
6968         (do_flag): Same here.
6969         (do_colour): Same thing but using set_tag.
6970         (do_score): Same again.
6971         (camel_filter_driver_filter_folder): Use ~0 as the 'set' arg to
6972         set_flags, just saves typing.
6973         (open_folder): We cache folders that we couldn't open as well as
6974         those ones we could.  Use magic token FOLDER_INVALID =
6975         (void *)~0 as the marker.
6976         (close_folder): Handle FOLDER_INVALID case properly.
6977
6978 2001-09-26  Jeffrey Stedfast  <fejj@ximian.com>
6979
6980         * camel-mime-message.c
6981         (camel_mime_message_get_part_by_content_id): New function to
6982         convenience Larry ;-)
6983         (check_content_id): Oops, return !found instead of found. This
6984         callback has to return whether or not to keep searching, not
6985         whether or not it found what it's looking for. Do'h!
6986
6987         * camel-pgp-mime.c (camel_pgp_mime_is_rfc2015_signed): block out
6988         some code if ENABLE_PEDANTIC_PGPMIME is not defined.
6989
6990 2001-09-26  Not Zed  <NotZed@Ximian.com>
6991
6992         * camel-vee-store.c: Emptied VeeStorePrivate, member wasn't used.
6993
6994         * camel-vee-folder.c (camel_vee_folder_set_expression): Lock
6995         changed list separately.
6996         (camel_vee_folder_remove_folder): "
6997         (camel_vee_folder_set_folders): Use changed_lock for changed list.
6998         (vee_refresh_info): Use changed_lock, also just grab the list,
6999         reset it in the lock, and do the work unlocked.
7000         (vee_sync): Use changed lock for changed list.
7001         (folder_changed): ".  All this kills a deadlock with sync/expunge.
7002         
7003         * camel-private.h (CamelVeeFolderPrivate): Added a new lock for
7004         the folders-changed list.
7005         (CamelVeeStorePrivate): Removed, defined in camel-vee-store.c,
7006         thanks to a pedantic.
7007
7008 2001-09-26  Jeffrey Stedfast  <fejj@ximian.com>
7009
7010         * Makefile.am: Fix Ettore's fix.
7011
7012 2001-09-25  Jeffrey Stedfast  <fejj@ximian.com>
7013
7014         * camel-pgp-context.c (camel_pgp_context_new): No longer takes a
7015         remember argument.
7016         (pgp_sign): Only uncache the passphrase on failure.
7017         (pgp_clearsign): Same.
7018         (pgp_encrypt): Here too.
7019         (pgp_decrypt): And here.
7020         (pass_free): New function to zero the passphrase before freeing
7021         it.
7022
7023 2001-09-25  Ettore Perazzoli  <ettore@ximian.com>
7024
7025         [Patch for Automake 1.5 compatibility pointed out by Richard
7026         Boulton <richard@tartarus.org>, as per #9258.]
7027
7028         * providers/nntp/Makefile.am: Remove some commented parts that
7029         make Automake 1.5 choke.
7030
7031         * Makefile.am (camel-lock-helper): Add $(EXEEXT) for Automake 1.5
7032         compatibility.
7033
7034 2001-09-25  Not Zed  <NotZed@Ximian.com>
7035
7036         * camel-folder.c (get_unread_message_count): Only unref info if we
7037         got it.
7038
7039         * camel-operation.c (camel_operation_unref): Fix for !threads
7040         enabled not ccompiling.
7041         (camel_operation_ref): Assert refcount > 0.
7042         (struct _CamelOperation): Removed the lock.  On further
7043         investigation, I dont think this will always work, the
7044         registration operations assume that a lookup in the
7045         operation_active table will return a ref, that will remain valid
7046         until we ref it, which needn't be the case.  So now i'm using a
7047         single global lock, since we'd need to do that for unref anyway,
7048         and every operation is fast & memory-bound.  Changed all the code
7049         to handle this.
7050         (camel_operation_progress_count): Since the code is identical,
7051         just call progress() for now.
7052         (camel_operation_register): No longer refcount, use unref to
7053         check/clear the active table.
7054         (camel_operation_unregister): Same here.
7055         (camel_operation_unref): Check if operation is in active table, if
7056         so, warn, remove.
7057
7058 2001-09-25  Dan Winship  <danw@ximian.com>
7059
7060         * camel-tcp-stream-openssl.c (my_SSL_read, my_SSL_write): call
7061         SSL_read/write, looping on SSL_ERROR_WANT_READ/WRITE. I'm sure
7062         there's a perfectly good reason that the API works this way. No,
7063         really.
7064         (stream_read, stream_write): use my_SSL_read and my_SSL_write.
7065         Fixes at least ximian 8593, and probably 6024 and maybe 10366,
7066         at least for OpenSSL. There may be a parallel NSS bug?
7067
7068 2001-09-25  Not Zed  <NotZed@Ximian.com>
7069
7070         * camel-stream-buffer.c (stream_write_all): A "safe write"
7071         function that always writes out all data asked of it, till
7072         finished.
7073         (stream_write): Rewritten.  What was i on when i wrote that
7074         originally, how did it ever work with tcp streams ...
7075
7076 2001-09-24  Not Zed  <NotZed@Ximian.com>
7077
7078         * camel-folder.c (append_message): Set the exception to
7079         FOLDER_INVALID rather than making out it worked.  A fix for #7025.
7080         (search_by_expression): Here too.
7081
7082         * providers/imap/camel-imap-folder.c (imap_update_summary): In the
7083         'lose' case, free messages, not fetch_data twice!
7084
7085         * camel-filter-search.c (check_header): If the type is encoded,
7086         get the fallback charset from the message content-type.
7087
7088         * camel-mime-part-utils.c (check_html_charset): Dont check for
7089         charset==null before calling charset_to_iconv.
7090         (simple_data_wrapper_construct_from_parser): "
7091
7092         * camel-mime-message.c (process_header): Try use content-type
7093         charset param as the fallback charset.
7094
7095         * camel-charset-map.c (camel_charset_to_iconv): Handle name ==
7096         NULL, return NULL.
7097
7098         * camel-folder-summary.c (camel_folder_summary_format_address):
7099         (camel_folder_summary_format_string): Made private again, removed
7100         #warning about it.  Renamed to s/camel_folder//.
7101         (summary_format_string): Take default charset param.
7102         (camel_message_info_new_from_header, message_info_new): Decode
7103         content-type field to get the charset parameter to use as the
7104         default charset for decoding strings.
7105
7106         * camel-search-private.c (camel_search_header_match): Pass NULL as
7107         the charset, the locale charset is always tried.
7108         (camel_search_header_match): Supply a default_charset parameter to
7109         be used with TYPE_ENCODED params.
7110
7111         * camel-mime-utils.c
7112         (header_param): get rid of the g_strcasecmp crap.
7113         (header_set_param): Same here.
7114         (header_decode_param_list): And here.
7115         (header_decode_text): Totally rewritten.  30% of its size.  If the
7116         word is not rfc2047 encoded, always try default_charset if
7117         supplied, if that fails, try locale charset if it exists, if that
7118         fails then assume latin1/7 bit ascii.
7119         (append_8bit): Changed to return FALSE if we can't convert for
7120         whatever reason, and dont append anything.
7121
7122         * camel-mime-part.h (struct _CamelMimePart): Move content_type and
7123         headers out of the 'private' section.
7124
7125         * camel-mime-part.c (get_headers): Dont do any conversion on the
7126         header.
7127         (process_header): Get the content-type charset as the fallback
7128         charset for decode_string.
7129         (construct_from_parser): IF we have a content-type header, process
7130         it before doing anything else, so we have access to a fallback
7131         charset for invalid headers.
7132
7133 2001-09-23  Jeffrey Stedfast  <fejj@ximian.com>
7134
7135         * camel-tcp-stream-openssl.c (ssl_verify): Don't even try to alert
7136         the user if the session isn't interactive.
7137         (errlib_error_to_errno): Make the default errno EINTR so that we
7138         act just like CamelTcpStreamSSL.
7139
7140         * camel-pgp-context.c (pgp_sign): When the password is not
7141         provided, set the exception to USER_CANCEL.
7142         (pgp_clearsign): Same.
7143         (pgp_encrypt): And here.
7144         (pgp_decrypt): Here too.
7145
7146 2001-09-21  Not Zed  <NotZed@Ximian.com>
7147
7148         * camel-store.c (create_folder): Set the exception if
7149         create_folder isn't implemented.
7150
7151 2001-09-21  Jeffrey Stedfast  <fejj@ximian.com>
7152
7153         * providers/imap/camel-imap-store.c (create_folder): Go back to
7154         not using camel_folder_info_build() here because this seems to
7155         break folder creation (returning nodes from the root path when it
7156         shouldn't be?).
7157
7158 2001-09-21  Not Zed  <NotZed@Ximian.com>
7159
7160         * camel-vee-store.c (vee_get_folder_info): Force a refresh of
7161         vfolders before storing their count.  This essentially makes
7162         'get_folderinfo' refresh all vfolders, so that get-mail works as
7163         expected.
7164
7165         * camel-vee-folder.c (camel_vee_folder_finalise): Clear lists.
7166         (folder_changed): If we're not autoupdating the folder, then
7167         add this folder to the list of 'changed' folders for this vfolder.
7168         (camel_vee_folder_set_expression): Reset the folders_changed list.
7169         (camel_vee_folder_remove_folder): Remove the folder from the
7170         folders_changed list.
7171         (camel_vee_folder_set_folders): If we have a folder already, but
7172         its changed, use this opportunity to update it.
7173         (vee_sync): Remove any synced folders from the folders_changed
7174         list.
7175         (vee_refresh_info): Refresh folder, re-run queries on any changed
7176         folders.
7177
7178 2001-09-20  Not Zed  <NotZed@Ximian.com>
7179
7180         * camel-folder-summary.c (camel_folder_summary_header_load): New
7181         function to just load the summary.  Not much use yet, until unread
7182         counts are stored in the summary (which now looks like too much
7183         work!).
7184
7185         * camel-mime-utils.c (header_decode_mailbox): Crappy fix for
7186         stupid mailers.  If we get 'name b. name <foo>' then treat it as
7187         '"name b. name" <foo>'.  See 8147.
7188         (header_decode_mailbox): Another fix for really broken mailers
7189         that have things that look like addresses followed by <address>
7190         bits.
7191         (rfc2047_encode_word): Escape ??= to avoid some bizarre warning
7192         about trigraphs.
7193
7194         * providers/local/camel-local-folder.c
7195         (camel_local_folder_construct): Setup unread count properly, and
7196         also setup the url properly.
7197
7198         * providers/local/camel-maildir-store.c (camel_folder_info_new):
7199         Build the path on the folderinfo.
7200         (scan_dir): Dont include empty host part in url for folder.
7201         (scan_dir): Lookup folder counts for any folders we currenty have
7202         open.
7203         (scan_dir): If we dont have the folder open, then scan the 'new'
7204         and 'cur' folders for new and unread messages to count instead.
7205
7206         * providers/local/camel-spool-store.c (get_folder_info): If we
7207         have this folder open, then set unread from the folder itself.
7208         (get_folder_info): Change the INBOX path to not include the
7209         leading /.
7210
7211         * providers/local/camel-spool-folder.c
7212         (camel_spool_folder_construct): Fix path.
7213         (camel_spool_folder_construct): Properly setup the url field when
7214         we say we've got a new folder created.
7215
7216         * providers/imap/camel-imap-store.c (unsubscribe_folder): Build
7217         path on folderinfo.
7218
7219         * camel-store.c (camel_folder_info_build_path): Prepend / to path.
7220
7221         * camel-vee-folder.c (camel_vee_folder_construct): Use macro for
7222         unmatched folder name.
7223         (camel_vee_folder_new): "
7224
7225         * camel-vee-store.c (vee_get_folder_info): Use macro for unmatched
7226         folder name.
7227         (vee_delete_folder): "
7228         (vee_rename_folder): "
7229         (vee_get_folder): Prepend / onto path.
7230         (vee_delete_folder): Setup path in folderinfo.
7231         (vee_get_folder_info): Fix path in folderinfo.
7232
7233         * camel-vee-folder.h (CAMEL_UNMATCHED_NAME): New define for
7234         unmatched (internal) name.
7235
7236 2001-09-20  Jeffrey Stedfast  <fejj@ximian.com>
7237
7238         * providers/local/camel-spool-folder.c
7239         (camel_spool_folder_construct): And finally here.
7240
7241         * providers/local/camel-local-folder.c
7242         (camel_local_folder_construct): And here.
7243
7244         * camel-vee-store.c (vee_get_folder): ANd here too.
7245         (vee_get_folder_info): And here.
7246
7247         * providers/imap/camel-imap-store.c (create_folder): Use
7248         camel_folder_info_build() and do better error checking.
7249         (subscribe_folder): Set the path on the folder info.
7250
7251         * camel-store.c (camel_folder_info_build): Set the folder-info
7252         path if it hasn't already been set by the caller.
7253         (camel_folder_info_free): Free the path.
7254
7255         * camel-store.h: Added a path member to the FolderInfo type.
7256
7257 2001-09-20  Dan Winship  <danw@ximian.com>
7258
7259         * camel-charset-map.c (camel_charset_to_iconv): Nuke debug warning.
7260
7261 2001-09-19  Jeffrey Stedfast  <fejj@ximian.com>
7262
7263         * camel-pgp-context.c: Updated exception strings to be more clear.
7264
7265         * camel-pgp-mime.c (pgp_mime_part_sign_restore_part): Stupid
7266         mistake, fixes bug #9975.
7267
7268         * camel-tcp-stream-ssl.c (ssl_bad_cert): Oops, don't fail if
7269         `data' isn't a CamelService...cuz it's not supposed to be! It's a
7270         CamelTcpStreamSSL object...doh!
7271
7272 2001-09-19  Not Zed  <NotZed@Ximian.com>
7273
7274         * General cleanup of camel debug printfs.
7275         
7276         * camel-lock.c (camel_lock_fcntl): Changed to return 'success' if
7277         the error indicates file locking isn't supported on this
7278         filesystem.  Still return a warning just incase (if its the first
7279         time).  Might fix a lot of reported bugs.
7280
7281         * providers/local/camel-spool-store.c (get_folder_info): Dont
7282         include the empty // host part in the uri.  This 'breaks' the
7283         service lookup.
7284
7285 2001-09-18  Jeffrey Stedfast  <fejj@ximian.com>
7286
7287         * camel-mime-utils.c: Match mailing-list header List-Owner.
7288
7289 2001-09-18  Not Zed  <NotZed@Ximian.com>
7290
7291         * camel-vee-store.c (vee_get_folder): Fix the uri genereated for
7292         the folderinfo for the folder_created event.
7293
7294         * camel-store.h: Added 'total' to CamelFolderInfo.
7295
7296 2000-09-18  Not Zed  <NotZed@Ximian.com>
7297
7298         * providers/local/camel-maildir-folder.c
7299         (camel_maildir_folder_new): If filter inbox is set on the store,
7300         and we're opening inbox '', then enable filtering on new messages.
7301
7302         * providers/local/camel-local-folder.c
7303         (camel_local_folder_construct): After loading the summary, check
7304         it, and only abort if that fails.  Also maintain the changes
7305         count.
7306
7307         * providers/local/camel-local-summary.c
7308         (camel_local_summary_load): Remove summary_check code from here.
7309         (camel_local_summary_check): Sync index/summary here, if we were
7310         successful.
7311
7312         * providers/local/camel-spool-folder.c
7313         (camel_spool_folder_new): If we have filter-new-messages-on-inbox
7314         set and we just opened inbox, turn on filtering on this folder.
7315         (camel_spool_folder_construct): Keep track of changes for the
7316         folder, so that filter-new-messages works right (?)
7317
7318         * providers/local/camel-spool-store.c (get_folder): Pass 'INBOX'
7319         as the folder name, not the path.
7320
7321         * camel-folder-search.c (search_not): Modified patch from
7322         <peterw@ximian.com> since the summary is messageinfo's, not
7323         strings.
7324
7325         ** Ok so the problem with the stuff below is that maildir/spool
7326         'summary_load' throws away all events, including recents, joy eh?
7327         
7328         * providers/local/camel-maildir-summary.c (maildir_summary_check):
7329         Add new messages to the recent changeinfo.
7330
7331         * providers/local/camel-spool-summary.c: Mark 'new' message as
7332         recent, for later processing if required (i.e. 'filter new
7333         messages').
7334
7335         * camel-store.c (construct): new function, cascade up construct
7336         method and check for 'filter' param, and set accordingly for any
7337         one that might want it.
7338
7339         * providers/imap/camel-imap-store.c (construct): map the
7340         param_filter_inbox flag to the store->flags as
7341         CAMEL_STORE_FILTER_INBOX.
7342
7343         * camel-store.h (CAMEL_STORE_FILTER_INBOX): new flag to tell it to
7344         filter inbox.
7345
7346         * providers/imap/camel-imap-folder.h: Removed do_filtering flag
7347         from CamelImapFolder.
7348
7349         * providers/imap/camel-imap-folder.c (imap_update_summary): Remove
7350         the 'recents' parameter, use the 'changes' parameter instead to
7351         convey this info.
7352         (camel_imap_folder_changed): Changed for update_summary api
7353         change.  Now always just emit the changed event if we have any
7354         changes to report, filtering code removed, handled upstream.
7355         (filter_proc): 
7356         (filter_free): Removed old filtering code.
7357         (camel_imap_folder_new): Set the filter_recent flag on the folder
7358         if we're the inbox and filtering of inbox is enabled.
7359
7360         * camel-folder.c (folder_changed): If we have 'recent' messages,
7361         and are set to filter recents, then freeze the folder and launch a
7362         thread to do the processing (or similar if threading not enabled).
7363         (thaw): Make sure we emit the changed signal outside of owning the
7364         lock and if things have changed.  Also, no longer bother
7365         downgrading folder_changed events to message_changed events.
7366
7367         * camel-folder.h (struct _CamelFolder): Added filter_recent flag
7368         -> signifies all recent messages in folder should be filtered.
7369
7370         * camel-session.c: (camel_session_thread_msg_new,
7371         camel_session_thread_msg_free, camel_session_thread_queue,
7372         camel_session_thread_wait): code to handle async operations as
7373         part of camel processing.
7374         (camel_session_finalise): free thread_lock, destroy thread, active
7375         hash, etc.
7376         (camel_session_init): init thread, active hash, etc.
7377         (camel_session_class_init): Init virtual functions.
7378         (session_thread_msg_new, session_thread_msg_free,
7379         session_thread_destroy, session_thread_received,
7380         session_thread_queue, session_thread_wait): default implementation
7381         of session threads stuff.
7382
7383 2001-09-17  Not Zed  <NotZed@Ximian.com>
7384
7385         * camel-folder.c (camel_folder_change_info_recent_uid): New
7386         function to add a 'recent' uid to the change info.
7387         (camel_folder_change_info_clear): Clear recent list.
7388         (camel_folder_change_info_free): Free recent list.
7389         (camel_folder_change_info_new): Setup recent list.
7390
7391         * camel-folder.h: Added a uid_recent item to the folder_changed
7392         event data.
7393
7394         * providers/local/camel-maildir-store.c (scan_dir): Free new in
7395         the right block.
7396
7397         * providers/local/camel-local-provider.c: Add local config entries
7398         to filter on new messages in spool and maildir provider.
7399
7400         * camel-vee-folder.c (vee_folder_construct): Remove the assertion
7401         which stops ? in names from being allowed.
7402
7403 2001-09-18  Dan Winship  <danw@ximian.com>
7404
7405         * camel-data-wrapper.c (camel_data_wrapper_is_offline): Virtualize
7406         this.
7407
7408         * camel-medium.c (is_offline): A medium is offline if its content
7409         object is offline.
7410
7411         * camel-multipart.c (is_offline): A multipart is offline if any of
7412         its subparts are offline.
7413
7414 2001-09-18  Jeffrey Stedfast  <fejj@ximian.com>
7415
7416         * camel-charset-map.c: Added korean charset conversion.
7417
7418 2001-09-17  Jeffrey Stedfast  <fejj@ximian.com>
7419
7420         * providers/imap/camel-imap-store.c (delete_folder): Don't process
7421         the ImapResponse data, we don't want to block forever on data we
7422         don't care about...
7423         (create_folder): Use get_folders_online() instead of
7424         get_folder_info_online().
7425
7426         * camel-folder.c: Reverted previous changes.
7427
7428 2001-09-17  JP Rosevear  <jpr@ximian.com>
7429
7430         * Makefile.am: Helpful install-exec-hook debugging output
7431
7432 2001-09-16  Jeffrey Stedfast  <fejj@ximian.com>
7433
7434         * camel-folder.c (camel_folder_get_uri): New function to get the
7435         URI of a folder.
7436         (get_uri): Default implementation.
7437
7438 2001-09-14  Not Zed  <NotZed@Ximian.com>
7439
7440         * camel-vee-folder.c (camel_vee_folder_set_folders): New function,
7441         set the complete list of folders on a vfolder, all at once.
7442         (camel_vee_folder_set_expression): If we set the query to be the
7443         same thing, dont do anything.
7444
7445         * camel-vee-store.c (camel_vee_store_init): Turn off vtrash for
7446         this store.
7447
7448         * camel-store.c (camel_store_init): Enable vtrash by default via
7449         flags.
7450         (camel_store_get_trash): REturn NULL if the store doesn't support
7451         vtrash.
7452         (init_trash): Dont init if store doesn't support vtrash.
7453
7454         * camel-store.h: Add a new flags CAMEL_STORE_VTRASH -> store
7455         supports vtrash.
7456
7457 2001-09-13  Not Zed  <NotZed@Ximian.com>
7458
7459         * camel-vee-store.c (vee_get_folder_info): Implement.
7460         (build_info): Used to build a folder record from the folders
7461         hashtable.
7462         (vee_delete_folder): Implemented, remove folder from hashtable.
7463         (vee_rename_folder): Implemented, remove old folder from
7464         hashtable, add new one and rename its guts too.
7465
7466         * camel-store.c (camel_store_rename_folder): Do nothing if we're
7467         not asked to actually change names.  Also dont do the renamed
7468         cache check till after we've called the subclass.
7469         (camel_store_delete_folder): Call the subclass delete firs,t then
7470         make sure the cache is right.
7471
7472         * camel-vee-folder.c (vee_folder_construct): Remove support for
7473         name?query syntax to setup vfolder.  Abort if such syntax is used.
7474         (camel_vee_folder_new): Removed code that handles ? syntax, etc.
7475         (vee_folder_build_folder): Handle unset expression, treat it as an
7476         empty search.
7477         (camel_vee_folder_set_expression): Oops, actually set the
7478         expression.
7479
7480         * camel-vtrash-folder.c (camel_vtrash_folder_new): Dont use
7481         name?query syntax to setup vfolder, but set the expression
7482         directly.  Also fixes a small memleak.
7483
7484 2001-09-12  Not Zed  <NotZed@Ximian.com>
7485
7486         * camel-store.c (camel_store_delete_folder): Fixed warnings with a
7487         cast.
7488         (camel_store_rename_folder): "
7489
7490 2001-09-14  Jeffrey Stedfast  <fejj@ximian.com>
7491
7492         * camel-url.c (camel_url_set_param): Use g_datalist_set_data_full
7493         so that the data will be free'd when we clear the list.
7494
7495 2001-09-14  Dan Winship  <danw@ximian.com>
7496
7497         * camel-file-utils.c (camel_file_util_encode_string,
7498         camel_file_util_decode_string): Don't claim failure when
7499         reading/writing the empty string.
7500
7501 2001-09-14  JP Rosevear  <jpr@ximian.com>
7502
7503         * Makefile.am: use install hook instead of install rule to
7504         guarantee we run after installation
7505
7506 2001-09-13  Jeffrey Stedfast  <fejj@ximian.com>
7507
7508         * camel-filter-driver.c (camel_filter_driver_filter_folder): Don't
7509         reuse the exception if it has already been set.
7510         (camel_filter_driver_filter_message): Same here. Also use the new
7511         return value from camel_filter_search_match().
7512
7513         * camel-filter-search.c (camel_filter_search_match): Return an
7514         integer (matched, no-match, or error).
7515
7516         * providers/local/camel-mbox-folder.c (mbox_append_message): Do
7517         error-checking based on function return values rather than
7518         exceptions as it's possible for them to be NULL.
7519         (mbox_get_message): Same.
7520
7521         * providers/imap/camel-imap-folder.c (imap_append_offline): Pass
7522         an exception to the cache.
7523         (imap_append_online): Same.
7524         (imap_append_resyncing): Here too.
7525         (imap_copy_offline): And here.
7526         (handle_copyuid): Pass NULL as the exception here...
7527         (parse_fetch_response): And finally here.
7528
7529         * providers/imap/camel-imap-message-cache.c
7530         (camel_imap_message_cache_insert):
7531         (insert_setup):
7532         (camel_imap_message_cache_insert_stream):
7533         (camel_imap_message_cache_insert_wrapper):
7534         (camel_imap_message_cache_copy): Take an exception argument and
7535         set it on error.
7536
7537         * camel-mime-part-utils.c
7538         (simple_data_wrapper_construct_from_parser): Convert the charset
7539         to the iconv-friendly name.
7540
7541         * camel-charset-map.c (camel_charset_to_iconv): Add code to
7542         convert windows-[cp]#### charsets to their iconv-friendly format
7543         of cp####.
7544
7545         * camel-pgp-context.c (crypto_exec_with_passwd): Return -1 on
7546         failure.
7547
7548 2001-09-12  Larry Ewing  <lewing@ximian.com>
7549
7550         * camel-filter-driver.c (camel_filter_driver_filter_mbox): free
7551         the source url in the nonfailure case.
7552
7553 2001-09-12  Not Zed  <NotZed@Ximian.com>
7554
7555         * camel-folder-search.h: Change the 'not' virtual method from an
7556         immediate e-sexp function to a non-immediate one, which is what it
7557         should be.
7558
7559         * camel-folder-search.c (search_not): Implement a 'not' function
7560         ourselves.  If 'not' on a vector value, then not over all items
7561         in the summary.
7562         (builtings[]): Change the 'not' builtin to be a non-immediate
7563         function.
7564
7565 2001-09-12  Jeffrey Stedfast  <fejj@ximian.com>
7566
7567         * camel-filter-driver.c (camel_filter_driver_filter_mbox): Unref
7568         the message info.
7569
7570 2001-09-10  Not Zed  <NotZed@Ximian.com>
7571
7572         * providers/local/camel-maildir-store.c (get_folder_info): Pass in
7573         a hashtalbe used for finding visited nodes.
7574         (inode_hash): 
7575         (inode_equal): 
7576         (inode_free): Helper functions for visited node checks, hashes on
7577         inode + device number.
7578         (scan_dir): Dont re-visited directories we've already visited, use
7579         inodes + device number.
7580         Also, if the folder doesn't contain cur/tmp/new, mark it as
7581         noselect, but continue to recurse folders, if asked.
7582
7583         * camel-folder.c (move_messages_to): Progress reporting while
7584         moving messages.
7585
7586         * camel-store.c (camel_store_delete_folder): Make sure we remove
7587         the folder from our vtrash, if we have it in our opened set, and
7588         also remove it from our hashtable.
7589         (camel_store_rename_folder): Remove the old folder name from the
7590         folder cahce, if it is there.
7591
7592 2001-09-10  Jeffrey Stedfast  <fejj@ximian.com>
7593
7594         * camel-charset-map.c (camel_charset_to_iconv): Get rid of the
7595         g_warning, we no longer really need that.
7596
7597 2001-09-10  Not Zed  <NotZed@Ximian.com>
7598
7599         * providers/imap/camel-imap-store.c (camel_imap_msg_new): Forgot
7600         to return the newly allocated msg.
7601
7602 2001-09-08  Not Zed  <NotZed@Ximian.com>
7603
7604         * providers/local/camel-spool-summary.c (spool_summary_sync_full):
7605         Likewise.
7606
7607         * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
7608         Fix the wording.
7609
7610         * camel-tcp-stream-raw.c (stream_read): Save errno around fcntl
7611         call in cancellable read case.  Also, loop while we get EINTR.
7612         This might fix some weird reconnect behaviour with pop.
7613         (stream_write): "
7614
7615 2001-09-07  Jeffrey Stedfast  <fejj@ximian.com>
7616
7617         * camel-tcp-stream-ssl.c (ssl_bad_cert): #if 0 out the code that
7618         was hopefully going to fix bug #5325 because the functions I used
7619         seem to have been deprecated. *sigh*.
7620
7621         * camel-remote-store.c (camel_remote_store_finalise): Disconnect
7622         from the service here otherwise the locks will be destroyed and by
7623         the time CamelService finalizes we'll crash or hang.
7624
7625         * providers/smtp/camel-smtp-transport.c (smtp_data): Make sure to
7626         unref the mime filters when we finish with them.
7627
7628 2001-09-07  Ettore Perazzoli  <ettore@ximian.com>
7629
7630         * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
7631         s/Synchronising/Synchronizing/.
7632         (mbox_summary_sync_quick): Likewise.
7633         (summary_rebuild): s/Summarising/Summarizing/.
7634
7635 2001-09-07  Jeffrey Stedfast  <fejj@ximian.com>
7636
7637         * camel-multipart.c (camel_multipart_set_boundary): Take a const
7638         char * instead of a char *.
7639
7640         * camel-mime-part-utils.c
7641         (camel_mime_part_construct_content_from_parser): Reuse the
7642         original boundary instead of generating our own.
7643
7644 2001-09-06  Not Zed  <NotZed@Ximian.com>
7645
7646         * providers/imap/camel-imap-folder.c (filter_proc): Thread
7647         function to perform filtering.
7648         (filter_free): Free the filter object.
7649         (camel_imap_folder_changed): If we have threads enabled, then
7650         queue up a request to perform filtering.  For bug #4422.
7651
7652         * providers/imap/camel-imap-store.c (camel_imap_msg_new): Create a
7653         new 'imap msg'.
7654         (camel_imap_msg_queue): Queue an 'imap msg'.
7655         (async_received): Handle receiving of imap msg in async thread.
7656         (async_destroy): Handle destroying of imap msg.
7657         (camel_imap_store_finalize): Destroy thread when done.
7658         (camel_imap_store_init): Setup thread.
7659
7660         * providers/imap/camel-imap-store.h: Added an ethread to the
7661         store, for async processing.
7662
7663 2001-09-06  Jeffrey Stedfast  <fejj@ximian.com>
7664
7665         * camel-remote-store.c (remote_recv_line): Use
7666         camel_stream_buffer_read_line() instead of duplicationing the
7667         functionality. Also, the previous way was broken anyway. What if a
7668         line was the same length as our buffer? Then we'd go and read a
7669         second line and a third and so on until they weren't the same
7670         length, leaving \r's in the middle of the buffer.
7671
7672 2001-09-06  Dan Winship  <danw@ximian.com>
7673
7674         * providers/pop3/camel-pop3-store.c (pop3_get_response): Fix this
7675         to always set an exception if it returns POP3_FAIL, as documented.
7676
7677         * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
7678         Revert.
7679
7680 2001-09-06  Jeffrey Stedfast  <fejj@ximian.com>
7681
7682         * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
7683         Set an exception on POP3_FAIL as well.
7684
7685 2001-09-06  Dan Winship  <danw@ximian.com>
7686
7687         * providers/pop3/camel-pop3-provider.c: #ifdef out the "delete
7688         after N days" option in pop3_conf_entries, since it won't be done
7689         for 1.0.
7690
7691 2001-09-04  Jeffrey Stedfast  <fejj@ximian.com>
7692
7693         * camel-remote-store.c (remote_disconnect): Too late to sync the
7694         folders here... if this is gonna happen at all it should be done
7695         in the provider.
7696
7697         * camel-service.c (camel_service_finalize): Do a clean disconnect.
7698
7699 2001-08-30  Jeffrey Stedfast  <fejj@ximian.com>
7700
7701         * providers/local/camel-spool-store.c (get_inbox): Return the
7702         default folder (ie. INBOX) rather than saying we don't support an
7703         inbox.
7704
7705         * camel-tcp-stream-ssl.c: #include pk11func.h.
7706         (ssl_bad_cert): Use CERT_GetDefaultCertDB.
7707
7708 2001-08-29  Jeffrey Stedfast  <fejj@ximian.com>
7709
7710         * camel-smime-context.c (smime_sign_prepare): Do the same here as
7711         what we did in the pgp code a moment ago.
7712         (smime_sign_restore): And again here.
7713         (smime_sign): And update thise code to pass in the address of the
7714         encodings list when restoring parts.
7715
7716         * camel-pgp-mime.c (pgp_mime_part_sign_prepare_part): Special-case
7717         message/rfc822 mime parts - don't set an encoding on these,
7718         instead traverse into their subparts and set the encodings for
7719         those.
7720         (pgp_mime_part_sign_restore_part): Reverse any operations done to
7721         message/rfc822 parts in the above prepare_part() function and also
7722         take a pointer to a GSList of encodings instead of just a GSList
7723         so we can properly keep track of which encoding we are on.
7724         (camel_pgp_mime_part_sign): Pass in the address to the encodings
7725         list when restoring parts.
7726
7727 2001-08-29  Not Zed  <NotZed@Ximian.com>
7728
7729         * providers/pop3/camel-pop3-folder.c (pop3_sync): Add progress
7730         reporting to deleting messages.  Dont change the calculation to a
7731         bloody float.  Bug #6189.
7732
7733 2001-08-28  Jeffrey Stedfast  <fejj@ximian.com>
7734
7735         * camel-pgp-context.c (crypto_exec_with_passwd): Initialize buf
7736         and diag_buf to NULL, hopefully this fixes the crash if the
7737         select() times out.
7738         (pgp_encrypt): Argh. What was I thinking? Don't use "-r recipient"
7739         as an argument, instead use "-r" and "recipient" as 2 separate
7740         arguments to pgp. This might fix the "gpg only encrypts to my
7741         private key" bug?
7742
7743 2001-08-28  Peter Williams  <peterw@ximian.com>
7744
7745         * providers/imap/camel-imap-store.c (create_folder): Whoops.
7746         Double-free and FMR = bad.
7747
7748         * camel-remote-store.c (remote_send_string): Don't reveal the
7749         user's IMAP password if their server supports LITERALPLUS. Also
7750         add some more dashes to make it line up nicely :-)
7751
7752 2001-08-28  Jeffrey Stedfast  <fejj@ximian.com>
7753
7754         * camel-tcp-stream-ssl.c (ssl_bad_cert): If the user accepts the
7755         certificate, add it to the database as a trusted CA.
7756
7757 2001-08-28  Peter Williams  <peterw@ximian.com>
7758
7759         * camel-object.c (camel_object_unref): Make the locking more
7760         fine-grained on destruction; specifically, don't hold the
7761         type lock while calling the finalize functions.
7762
7763 2001-08-27  Jeffrey Stedfast  <fejj@ximian.com>
7764
7765         * providers/local/camel-local-provider.c: Changed the
7766         description/names of some of the local providers to try and
7767         clarify the meanings.
7768
7769         * providers/pop3/camel-pop3-provider.c: Simplify the POP
7770         description - we want short but sweet.
7771
7772         * providers/imap/camel-imap-provider.c: s/IMAPv4/IMAP
7773
7774 2001-08-27  Not Zed  <NotZed@Ximian.com>
7775
7776         * camel-mime-part-utils.c (convert_buffer): re-read the iconv man
7777         page, and treat the return value properly.  It returns the number
7778         of non-reversible conversions performed, not the number of output
7779         characters, sigh.
7780         (check_html_charset): Changed to just take a buffer of data, and
7781         not the mime parser.
7782         (simple_data_wrapper_construct_from_parser): Since we dont need
7783         the charset till we have all the data, search for the charset
7784         after we've read the data, if we have html data with no charset in
7785         the header.
7786         (simple_data_wrapper_construct_from_parser): Remove the
7787         seekable_source stuff.
7788
7789         * Re-apply patches from before.
7790
7791 2001-08-25  Not Zed  <NotZed@Ximian.com>
7792
7793         ["Summarising" and "Synchronising" are spelt with a "s" in
7794         ENGLISH]
7795
7796         * providers/local/camel-mbox-summary.c (mbox_summary_sync_quick):
7797         s/Synchronizing/Synchronising/.
7798
7799         * providers/local/camel-mbox-summary.c (summary_rebuild):
7800         s/Summarizing/Summarising/
7801
7802 2001-08-24  Jeffrey Stedfast  <fejj@ximian.com>
7803
7804         * camel-disco-diary.c (camel_disco_diary_replay): Use fseek
7805         instead of fseeko since we want to be portable and use ftell
7806         rather than ftello for the same reason.
7807         (camel_disco_diary_empty): Same here.
7808
7809 2001-08-24  Peter Williams  <peterw@ximian.com>
7810
7811         * Revert Not Zed's previous commits as they apparently can cause
7812         serious data loss for POP3 users.
7813         
7814 2001-08-24  Ettore Perazzoli  <ettore@ximian.com>
7815
7816         ["Summarizing" and "Synchronizing" are spelt with a "z" in the
7817         default locale, that happens to be "en_US".]
7818
7819         * providers/local/camel-mbox-summary.c (mbox_summary_sync_quick):
7820         s/Synchronising/Synchronizing/.
7821
7822         * providers/local/camel-mbox-summary.c (summary_rebuild):
7823         s/Summarising/Summarizing/
7824
7825 2001-08-24  Not Zed  <NotZed@Ximian.com>
7826
7827         * camel-mime-part-utils.c (convert_buffer): Limit the maximum
7828         output buffer size.  iconv bugs?  returns E2BIG forever on some
7829         (valid) data?
7830
7831         * providers/local/camel-spool-summary.c (summary_rebuild):
7832         Likewise.
7833
7834         * providers/local/camel-mbox-summary.c (summary_rebuild):
7835         Summarising is spelt with an s.
7836
7837 2001-08-23  Not Zed  <NotZed@Ximian.com>
7838
7839         * camel-mime-part.c (write_to_stream): If we have rawtext, then
7840         dont do any charset conversion, only encoding/crlf conversion.
7841
7842         * camel-data-wrapper.h (struct _CamelDataWrapper): Added 'rawtext'
7843         member, says the character encoding is raw, not utf8.
7844
7845         * providers/local/camel-spool-summary.c
7846         (spool_summary_sync_quick): Synchronising is spelt with an s, not
7847         a z.
7848         (spool_summary_sync_full): "
7849
7850         * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
7851         No, synchronising is spelt with an s.
7852         (mbox_summary_sync_quick): "
7853
7854         * camel-mime-part-utils.c
7855         (camel_mime_part_construct_content_from_parser): Remove the
7856         warnings which aren't going anywhere fast.
7857         (convert_buffer): Function to convert a bytearray of textual
7858         content from one charset to another.  If the charset doesn't exist
7859         or fails, then do no conversion.
7860         (simple_data_wrapper_construct_from_parser): First, read in data,
7861         then try and convert it using the specified charset if supplied.
7862         If that fails, then dont do any conversion, and leave as raw.
7863         Also, if we have any x-* charsets, then dont do any processing.
7864
7865 2001-08-23  Peter Williams  <peterw@ximian.com>
7866
7867         * providers/local/camel-mbox-summary.c (summary_rebuild): Add a
7868         missing \n to the end of a printf.
7869
7870         * providers/local/camel-spool-summary.c (summary_rebuild): Same.
7871
7872 2001-08-22  Jeffrey Stedfast  <fejj@ximian.com>
7873
7874         * providers/pop3/camel-pop3-folder.c (pop3_generate_uids):
7875         Oops. Fixed a mis-use of GPtrArray. If we set_size, then using
7876         g_ptr_array_add will assume `size' elements have already been
7877         initialized and will start appending on to the end.
7878
7879 2001-08-21  Jeffrey Stedfast  <fejj@ximian.com>
7880
7881         * camel-pgp-context.c (pgp_verify): Turn on --batch and reenable
7882         gpg keyserver lookups.
7883         (pgp_decrypt): Disable keyserver lookups if we are disconnected.
7884
7885 2001-08-21  Dan Winship  <danw@ximian.com>
7886
7887         * camel-folder-thread.c
7888         (camel_folder_thread_messages_new_summary): Fix the duplicate
7889         message check so it doesn't mess up threading when a reply appears
7890         in the folder before the message it's a reply to. Fixes bug #3357.
7891         (camel_folder_thread_messages_new): Likewise, although I don't
7892         think this function is used any more.
7893
7894 2001-08-20  JP Rosevear  <jpr@ximian.com>
7895
7896         * Makefile.am: build a static camel for the addressbook conduit
7897
7898 2001-08-20  Ettore Perazzoli  <ettore@ximian.com>
7899
7900         * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
7901         s/Synchronising/Synchronizing/.
7902         (mbox_summary_sync_quick): Likewise.  *
7903         providers/local/camel-spool-summary.c (spool_summary_sync_full):
7904         Likewise.
7905         (spool_summary_sync_quick): Likewise.
7906
7907 2001-08-20  Jeffrey Stedfast  <fejj@ximian.com>
7908
7909         * providers/imap/camel-imap-store.c (create_folder): Get the
7910         entire directory structure for the folder we just created, meaning
7911         if we created a folder named "test.mailbox" where test didn't
7912         previously exist, get the listing for "test" and "test.mailbox".
7913
7914         * providers/imap/camel-imap-utils.c (imap_parse_folder_name): New
7915         function.
7916
7917 2001-08-19  Chris Toshok  <toshok@ximian.com>
7918
7919         * camel-store.h: #include <sys/types.h> for mode_t on freebsd.
7920
7921 2001-08-19  Jeffrey Stedfast  <fejj@ximian.com>
7922
7923         * providers/pop3/camel-pop3-folder.c (pop3_generate_uids): Make
7924         sure the generated UID is non-NULL before appending it to the
7925         array of UIDs. How would this even happen? I have no clue...
7926
7927 2001-08-17  Jeffrey Stedfast  <fejj@ximian.com>
7928
7929         * providers/imap/camel-imap-folder.c (imap_update_summary): Start
7930         scanning new messages at maxuid + 1 rather than uidval + 1? Maybe
7931         I'm missing the logic, but anyways...this might fix bug #5348.
7932
7933 2001-08-16  Jeffrey Stedfast  <fejj@ximian.com>
7934
7935         * providers/imap/camel-imap-store.c (imap_keepalive): If we are
7936         online and message flags have changed in the current folder, sync
7937         the flags else do a NOOP. This fixes bug #4666. Also lock around
7938         the NOOP command.
7939
7940         * providers/imap/camel-imap-folder.c (imap_sync_online): Don't
7941         ever send "STORE FLAGS.SILENT ()" since Cyrus imapd doesn't like
7942         this (and maybe others too?) so what we'll do instead is to send
7943         "STORE -FLAGS.SILENT (\Seen \Answered \Deleted \Marked)" to clear
7944         all the flags (since this is in essence what we want to do
7945         anyway).
7946
7947 2001-08-16  Peter Williams  <peterw@ximian.com>
7948
7949         * providers/imap/camel-imap-store.c (imap_connect_online): Fix
7950         this again. Sigh. Problem of namespace = "" may not yet be
7951         completely solved.
7952
7953 2001-08-15  Peter Williams  <peterw@ximian.com>
7954
7955         * camel-tcp-stream-openssl.c (ssl_error_to_errno): New
7956         function. Try to approximate the SSL error into errno.
7957         (errlib_error_to_errno): New function, try to approximate
7958         OpenSSl's error library's error (ERR_*) into errno.
7959         (stream_read): Try to set errno using ssl_error_to_errno.
7960         (stream_write): Same.
7961         (open_ssl_connection): Same.
7962
7963         * providers/imap/camel-imap-store.c (imap_connect_online): Oh
7964         crap, huge killer typo.
7965
7966 2001-08-14  Peter Williams  <peterw@ximian.com>
7967
7968         * providers/imap/camel-imap-store.c (imap_connect_online):
7969         Canonicalize store->namespace to end in store->dir_sep, once both
7970         values are known. The %F-related code makes this
7971         assumption. Probably fixes a bug reported on the mailing list.
7972
7973 2001-08-13  Jeffrey Stedfast  <fejj@ximian.com>
7974
7975         * camel-store.c (camel_store_get_folder): After talking to NotZed,
7976         it turns out I was wrong after all.
7977         (store_sync): Create a copy of the folder-cache that owns a ref on
7978         each of the folders so that if one of the folders get's finalized
7979         inside store_sync(), we don't run into any locking issues. This is
7980         mostly meant to solve a problem in IMAP (#6089).
7981
7982 2001-08-13  Peter Williams  <peterw@ximian.com>
7983
7984         * providers/imap/camel-imap-store.c (delete_folder): Fix a leak.
7985
7986         * providers/imap/camel-imap-utils.c (imap_namespace_concat): Bleah,
7987         handle when namespace = NULL (can happen upon initial open of mailbox.)
7988
7989         * providers/imap/camel-imap-command.c (imap_command_strdup_vprintf): 
7990         Don't crash when %F'ing with an empty folder name and NULL namespace.
7991
7992 2001-08-13  Jeffrey Stedfast  <fejj@ximian.com>
7993
7994         * camel-store.c (camel_store_get_folder): We need to be ref'ing
7995         the folder if/when we add it to the hash. This may fix bug #6089?
7996         (camel_store_get_folder): Nevermind, reverted the fix.
7997         (camel_store_get_folder): No, I wasn't on crack before after
7998         all...if we don't ref here, then we're open to a race condition
7999         later.
8000
8001 2001-08-11  Ettore Perazzoli  <ettore@ximian.com>
8002
8003         * providers/local/camel-spool-summary.c (summary_rebuild):
8004         s/summarising/summarizing/.
8005         (summary_rebuild): Likewise.
8006
8007         * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
8008         s/summarise/summarize/.
8009         (mbox_summary_sync_quick): Likewise.
8010         (summary_rebuild): Likewise.
8011         (mbox_summary_check): Likewise.
8012
8013 2001-08-10  Jeffrey Stedfast  <fejj@ximian.com>
8014
8015         * providers/imap/camel-imap-utils.c (imap_quote_string): Added an
8016         assert - at this point a backtrace would be more useful than a
8017         transaction log for debugging.
8018
8019         * providers/imap/camel-imap-command.c (imap_command_start): Return
8020         FALSE here, not NULL.
8021         
8022         * providers/imap/camel-imap-folder.c (imap_rescan): Don't
8023         g_strdup() the uid into the trigger_event call.
8024
8025         * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
8026         Set the total bytes expected to 0 if the response is empty too.
8027         (pop3_refresh_info): Return of there was an error generating pop3
8028         uids.
8029
8030         * camel-mime-utils.c (header_raw_check_mailing_list): regfree the
8031         pattern before continue'ing. This was showing up quite a bit under
8032         purify.
8033
8034 2001-08-09  Jeffrey Stedfast  <fejj@ximian.com>
8035
8036         * providers/imap/camel-imap-utils.c (imap_parse_string_generic): A
8037         quoted string cannot contain \n's so check for those as well.
8038         (imap_atom_specials): Update this to fix bug #6553.
8039
8040 2001-08-08  Jon Trowbridge  <trow@ximian.com>
8041
8042         * camel-filter-search.c (get_source): Remove trailing stuff from
8043         URLs before returning.  (Done in an evil way, not in the good way
8044         suggested by fejj. :)) (Bug #4876)
8045
8046 2001-08-08  jacob berkman  <jacob@ximian.com>
8047
8048         * camel-search-private.c (camel_search_header_match): check for
8049         NULL name and addr (fixes a bug i was about to report)
8050
8051 2001-08-08  Not Zed  <NotZed@Ximian.com>
8052
8053         * camel-filter-search.c (check_header): Properly determine match
8054         type to pass to header_match.
8055         (address_matches_exactly): Removed, effectively added to
8056         camel_search_header_match.
8057
8058         * camel-folder-search.c (check_header): Properly determine the
8059         match type to pass to header_match.
8060
8061         * camel-search-private.c (camel_search_header_match): Add a new
8062         parameter 'type' which is the type of header we're matching
8063         against.  ASIS means utf8 format, ADDRESS means an internet
8064         address ('formatted'), ADDRESS_ENCODED means a raw address header,
8065         ENCODED means rfc 2047 encoded text.
8066         (header_match): Move original logic here, have search_header_match
8067         call it as appropriate for the 'type' of match.
8068
8069 2001-08-07  Not Zed  <NotZed@Ximian.com>
8070
8071         * camel-session.c (camel_session_class_init): Only init the vee
8072         provider struct once (if we're subclassed this will get called
8073         multiple times).
8074
8075         * camel-object.c (obj_finalize): Removed a bit of a debug that
8076         crept in with jacob's poolv patch (?).
8077
8078 2001-08-07  Jeffrey Stedfast  <fejj@ximian.com>
8079
8080         * camel-filter-search.c (address_matches_exactly): New function to
8081         do danw's address "is" comparison (as specified in bug #5886.
8082         (check_header): Special-case address-type headers when we are
8083         doing an exact match to use the address_matches_exactly function.
8084
8085 2001-08-06  Jeffrey Stedfast  <fejj@ximian.com>
8086
8087         * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
8088         Modify to take a headers_only argument which will then only fetch
8089         message headers.
8090         (pop3_generate_uids): Pass in TRUE for headers_only.
8091         (pop3_get_message): Pass in FALSE for headers_only and move the
8092         camel_operation() stuff out of get_message_stream and in to here
8093         instead.
8094         (pop3_generate_uids): We also need to be using i+ 1 as the id
8095         since we are starting at 0.
8096
8097 2001-08-06  Jeffrey Stedfast  <fejj@ximian.com>
8098
8099         * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
8100         New internal function to get a message stream by message sequence
8101         id (so that we can share code between pop3_get_message and
8102         pop3_generate_uids).
8103         (pop3_get_message): Use pop3_get_message_stream.
8104         (pop3_generate_uids): New function to generate UIDs based on the
8105         message - this fixes bug #1256.
8106         (pop3_refresh_info): If the server doesn't support UIDL, call
8107         pop3_generate_uids to get our list of UIDs.
8108
8109         * providers/imap/camel-imap-store.c (get_folder_info_online):
8110         Don't strstr for noselect=yes, that's just plain broken.
8111
8112 2001-08-06  Dan Winship  <danw@ximian.com>
8113
8114         * providers/imap/camel-imap-folder.c (imap_rescan): Fix off-by-one
8115         error in cleaning up deleted messages at the end of the folder.
8116         Fixes bug #5585 and maybe others.
8117
8118         * providers/imap/camel-imap-store.c (get_folder_info_online): Do a
8119         refresh_info on the selected folder before looking at its unread
8120         count. Should fix bug #4944.
8121
8122 2001-08-06  Peter Williams  <peterw@ximian.com>
8123
8124         Completely hide the namespace from everything external to the IMAP
8125         code, which Dan W says is the way it should be.
8126         
8127         * providers/imap/camel-imap-command.c
8128         (imap_command_strdup_vprintf): Add a new %F argument, which is like
8129         %S but will add the namespace (for folder names).
8130         (camel_imap_command): Use %F here.
8131
8132         * providers/imap/camel-imap-utils.c (imap_parse_list_response):
8133         Changed to strip out the namespec when returning *folder. In order
8134         to do this we need to be passed the CamelImapStore.
8135         (imap_concat): Move to here from camel-imap-store.c, un-static
8136         (imap_namespace_concat): New function, adds the namespace to the 
8137         folder name, unless it's INBOX.
8138         
8139         * providers/imap/camel-imap-utils.h: Prototypes.
8140
8141         * providers/imap/camel-imap-store.c (imap_connect_online): Extra
8142         arg to imap_parse_list_response.
8143         (imap_connect_offline): Here too.
8144         (get_folder_status): Use %F.
8145         (get_folder_online): Here too.
8146         (delete_folder): Here too.
8147         (create_folder): Here too, and arg to imap_parse_list_response.
8148         (parse_list_response_as_folder_info): Arg to i_p_l_r.
8149         (get_subscribed_folders_by_hand): Use %F.
8150         (get_folders_online): Here too.
8151         (get_folder_info_online): Instead of checking for NULL @name, check
8152         for name = NULL or "", and set to "" instead of namespace. Pass ""
8153         instead of namespace to camel_folder_info_build.
8154         (subscribe_folder): Use %F.
8155         (unsubscribe_folder): Here too.
8156
8157         * providers/imap/camel-imap-folder.c (imap_get_full_name): This
8158         now just returns folder->full_name.
8159         (do_append): Use %F
8160         (do_copy): Here too.
8161
8162 2001-08-06  Jeffrey Stedfast  <fejj@ximian.com>
8163
8164         * camel-pgp-context.c (pgp_verify): Always do --no-auto-key-retrieve.
8165
8166 2001-08-03  Jeffrey Stedfast  <fejj@ximian.com>
8167
8168         * camel-pgp-context.c (pgp_verify): Minor changes to the iconv
8169         code so that it does the check in the return value of iconv() just
8170         like the code in camel-mime-utils.c in case this fixes Bo Rosen's
8171         gpg bugs (but I doubt this will change anything?).
8172
8173 2001-08-03  Jeffrey Stedfast  <fejj@ximian.com>
8174
8175         * providers/smtp/camel-smtp-transport.c (smtp_connect): First
8176         check to make sure that service->url->authmech is non-NULL before
8177         passing it into strcmp to avoid a segfault.
8178
8179         * camel-pgp-context.c (pgp_decrypt): Sigh, if gpg returns '1' it
8180         means that the key is bad but it did succeede in decrypting the
8181         block so to make users happy (even though I find this a
8182         questionable action) we are going to ignore the error and show it
8183         to the user anyway. This fixes bug #6136.
8184
8185 2001-08-03  Not Zed  <NotZed@Ximian.com>
8186
8187         * providers/smtp/camel-smtp-transport.c (smtp_connect): special
8188         case popb4smtp auth before we try and connect, and do the magic
8189         here first.
8190
8191 2001-08-02  Not Zed  <NotZed@Ximian.com>
8192
8193         * providers/smtp/camel-smtp-transport.c (smtp_connect): Check for
8194         POPB4SMTP separate to the esmtp auth list.
8195         (smtp_auth): If creating the sasl object means it is
8196         already authenticated, then exit early.  Sort of 'clean hack' to
8197         help popb4smtp work.
8198         (smtp_auth): Unref the sasl object, clean up a memleak i think.
8199
8200         * providers/smtp/camel-smtp-provider.c
8201         (camel_provider_module_init): Added POPB4SMTP auth type.
8202
8203         * camel-sasl.c (camel_sasl_authtype): Added POPB4SMTP type.
8204
8205         * camel-sasl-popb4smtp.c: New file for pop before smtp
8206         'authentication'.
8207
8208         * Makefile.am (libcamel_la_SOURCES, HEADERS): Add
8209         camel-sasl-popb4smtp.[ch].
8210
8211 2001-08-01  Not Zed  <NotZed@Ximian.com>
8212
8213         * providers/local/camel-mbox-folder.c (mbox_lock): If we fail to
8214         get the lock, make sure we close our locking fd, and reset it.
8215         Fixes the crash part of 5095.
8216
8217         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
8218         Slightly re-arranged filter/change notification logic.  If we;re
8219         filtering, freeze the folder till we're finished to smooth the ui
8220         for new mail.
8221
8222 2001-07-31  Not Zed  <NotZed@Ximian.com>
8223
8224         * camel-folder.c (camel_folder_init): Changed mutexes to
8225         e_mutexes, folder lock recursive.  This fixes the imap filtering
8226         bug, or at least some cases of it.
8227         (camel_folder_finalize): Free mutexes.
8228
8229         * camel-private.h (CamelFolderPrivate): Changed mutexes to
8230         e_mutexes.
8231
8232 2001-07-25  Not Zed  <NotZed@Ximian.com>
8233
8234         * camel-folder.c (camel_folder_change_info_*): Change the
8235         return if fail's into asserts.
8236         (camel_folder_change_info_free): Don't let it accept a NULL
8237         argument.  This isn't g_lib so we dont have to.
8238
8239 2001-07-27  Jeffrey Stedfast  <fejj@ximian.com>
8240
8241         * camel-mime-utils.c (header_decode_param): Fix the fix that fixes
8242         broken mailer behavior. We want to make sure that the user's
8243         locale charset is non-NULL before we pass it off to
8244         iconv_open(). If it *is* NULL, we want to use iso-8859-1.
8245
8246 2001-07-26  Jeffrey Stedfast  <fejj@ximian.com>
8247
8248         * camel-url.c (camel_url_free): Allow the url to be NULL just like
8249         the libc free convention.
8250
8251 2001-07-26  Dan Winship  <danw@ximian.com>
8252
8253         * providers/imap/camel-imap-command.c (camel_imap_command_start):
8254         Send an IMAP command, but don't wait for responses.
8255         (camel_imap_command_response): Read a single line of response from
8256         the server.
8257         (camel_imap_command, etc): Reimplement in terms of the new code.
8258
8259         * providers/imap/camel-imap-folder.c (imap_rescan): Use
8260         camel_imap_command_start and camel_imap_command_response, and
8261         call camel_operation_progress after each line read from the
8262         server.
8263         (imap_update_summary): Likewise, although with more fudging on the
8264         precentages... Also, fix this so that if none of the new messages
8265         are cached, it only does a single FETCH, and if some of them are
8266         cached, it does two FETCHes (one to get the UIDs, FLAGS, and
8267         SIZEs, and another to get the bodies of all of the messages that
8268         aren't cached now that it knows the relevant UIDs). This should
8269         speed up startup a bunch (especially if you have high bandwidth
8270         but also high latency to the IMAP server).
8271
8272 2001-07-25  Dan Winship  <danw@ximian.com>
8273
8274         * camel-mime-utils.c (mail_mlist_magic): Add another Sender
8275         pattern.
8276
8277 2001-07-24  Not Zed  <NotZed@Ximian.com>
8278
8279         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
8280         Change the break into a continue, we should process as many as we
8281         can find.
8282
8283         * camel-folder.c (camel_folder_move_messages_to): If we have no
8284         uid's to copy, exit here before going any further.  Some code
8285         internally [imap] assumes there are uids to copy otherwise it can
8286         segfault.
8287         (camel_folder_copy_messages_to): Same.
8288
8289 2001-07-24  Jeffrey Stedfast  <fejj@ximian.com>
8290
8291         * camel-mime-utils.c (header_decode_param): Handle broken mailers
8292         that send unencoded 8bit header params. And there was much
8293         rejoicing. Rah.
8294
8295         * camel-url.h (CAMEL_URL_HIDE_ALL): New #define, and there was
8296         much rejoicing. Rah.
8297
8298 2001-07-24  Not Zed  <NotZed@Ximian.com>
8299
8300         * camel-operation.c (camel_operation_register, unregister): Added
8301         some warnings for bad cases.
8302
8303 2001-07-23  Not Zed  <NotZed@Ximian.com>
8304
8305         * camel-operation.c (camel_operation_register): Only insert a hash
8306         entry if we haven't already.
8307         (camel_operation_unregister): Only remove the has entry if the id
8308         is a real thread.
8309
8310 2001-07-23  Jeffrey Stedfast  <fejj@ximian.com>
8311
8312         * camel-filter-driver.c (do_move): Slight fix for when source ==
8313         destination (we don't want to do this action because on-demand
8314         filtering would then delete the messages it supposedly "moved").
8315
8316 2001-07-23  Not Zed  <NotZed@Ximian.com>
8317
8318         * providers/smtp/camel-smtp-transport.c (smtp_auth, smtp_helo,
8319         send_to): Added some operation progress reporting.  Actual data
8320         transfer is 'tricky' because of the layers used.
8321         (smtp_auth): Instead of checking exception_is_set, use
8322         challenge==NULL to test if sasl_challenge_base64 failed.
8323
8324         * providers/local/camel-mbox-summary.c (mbox_summary_sync): Remove
8325         peters changes below and put in a better fix.  These functions
8326         already return -1 on error, just use that, and not worry about
8327         building our own exception redundantly.
8328
8329         * camel-service.c (camel_get_host_byname): Turn the progress into
8330         a transient event.
8331
8332 2001-07-20  Peter Williams  <peterw@ximian.com>
8333
8334         * providers/local/camel-mbox-summary.c (mbox_summary_sync): More
8335         usage fixes for CamelException. Check our own exception for
8336         summary_update and xfer it out if an error occurred.
8337
8338 2001-07-20  JP Rosevear  <jpr@ximian.com>
8339
8340         * Pull up test fixes to get them building again
8341
8342 2001-07-20  Not Zed  <NotZed@Ximian.com>
8343
8344         * camel-charset-map.c (camel_charset_get_iconv_friendly_name):
8345         renamed to camel_charset_to_iconv() to make it just a little more
8346         consistent and not so long & fixed callers.
8347
8348 2001-07-19  Jeffrey Stedfast  <fejj@ximian.com>
8349
8350         * camel-mime-filter-charset.c
8351         (camel_mime_filter_charset_new_convert): Convert to the
8352         iconv-friendly charset names.
8353
8354         * providers/imap/camel-imap-store.c (create_folder): Fixed a
8355         compiler warning about returning without a value in a non-void
8356         function. Blah.
8357
8358         * camel-mime-part.c (process_header): Pass the locale charset as
8359         the default_charset to header_decode_string().
8360
8361         * camel-folder-summary.c (camel_folder_summary_format_string):
8362         Pass the locale charset as the default_charset to
8363         header_decode_string().
8364         (content_info_new): Same.
8365
8366         * camel-mime-message.c (process_header): Pass the locale charset
8367         as the default_charset to header_decode_string().
8368
8369         * camel-mime-utils.c (append_8bit): New helper function who's
8370         purpose is similar to append_latin1() but for 8bit text that we
8371         are assuming is not latin1.
8372         (header_decode_text): Now takes a default_charset parameter and
8373         calls append_8bit when appropriate.
8374         (header_decode_string): Also takes a default_charset parameter
8375         now.
8376         (header_decode_mailbox): Pass NULL as the default_charset to
8377         header_decode_string().
8378
8379 2001-07-19  Jeffrey Stedfast  <fejj@ximian.com>
8380
8381         * camel-pgp-context.c (pgp_verify): Modified to treat the return
8382         value from camel_charset_locale_name() as a const char*.
8383
8384         * camel-sasl-digest-md5.c (digest_response): Modified to treat the
8385         return value from camel_charset_locale_name() as a const char*.
8386
8387         * camel-charset-map.c (camel_charset_locale_name): Modify to
8388         return const char* by returning the static locale_charset which is
8389         created inside of camel_charset_map_init().
8390         (camel_charset_map_init): Find the locale charset here and set the
8391         static variable.
8392
8393 2001-07-19  Peter Williams  <peterw@ximian.com>
8394
8395         Policy change: NULL url's are no longer allowed in
8396         CamelFolderInfos. They used to signify that the folder was, in
8397         IMAP jargon, NoSelect; now the same effect is achieved by adding a
8398         "noselect=yes" parameter to the end of the URL. As far as I know,
8399         IMAP is the only affected provider.
8400         
8401         * providers/imap/camel-imap-store.c (delete_folder): New
8402         function. Implement folder deletion.
8403         (camel_imap_store_class_init): Set the delete_folder class
8404         function here.
8405         (get_folder_status): New function. Utility wrapper around the
8406         STATUS command.
8407         (create_folder): If the parent folder is NoSelect but is empty,
8408         delete it and recreate it as a a subfolder-containing folder. If
8409         it is NoSelect but contains messages, set an exception.
8410         (parse_list_response_as_folder_info): Always set the FolderInfo's
8411         URL, but add a NoSelect parameter if it isn't selectable.
8412         (get_folder_info_online): Change logic of removing the namespace
8413         to reflect URL change. Same for logic of checking unread counts.
8414         (get_folder_info_online): Use get_folder_status to simplify this.
8415
8416         * camel-store.c (camel_folder_info_build): When creating dummy
8417         parents, copy the child's URL and set the NoSelect parameter.
8418
8419 2001-07-19  Jeffrey Stedfast  <fejj@ximian.com>
8420
8421         * camel-mime-part-utils.c
8422         (simple_data_wrapper_construct_from_parser): No need for
8423         `acharset' anymore.
8424         (check_html_charset): Return a const char* and also use
8425         camel_charset_get_iconv_friendly_name() internally.
8426
8427         * camel-mime-utils.c (rfc2047_decode_word): Remove my iso8859-1 ->
8428         iso-8859-1 hack and use camel_charset_get_iconv_friendly_name()
8429         instead.
8430         (rfc2184_decode): Use camel_charset_get_iconv_friendly_name()
8431
8432         * camel.c (camel_init): Call camel_charset_map_init().
8433
8434         * camel-charset-map.c (camel_charset_map_init): New function to
8435         initialize the charset-equivalent lookup table. To be called by
8436         camel_init().
8437         (camel_charset_get_iconv_friendly_name): New function to try and
8438         convert a charset into something that iconv is more likely to
8439         accept.
8440
8441 2001-07-19  Peter Williams  <peterw@ximian.com>
8442
8443         * Revert 7/11/2001 patch for IMAP INBOX filtering at NotZed's 
8444         request.
8445
8446 2001-07-17  Peter Williams  <peterw@ximian.com>
8447
8448         Clean up some exception misusage.
8449
8450         * providers/imap/camel-imap-command.c (camel_imap_command): Use
8451         our own internal exception for sending the string and transfer it
8452         to @ex if anything goes wrong.
8453         (imap_read_response): Use our own internal exception for reading
8454         the untagged responses and blah blah blah.
8455
8456         * camel-session.c (get_service): Use our own internal exception
8457         when constructing the service and transfer it to @ex if anything
8458         goes wrong.
8459
8460         * camel-remote-store.c (remote_recv_line): Instead of having
8461         gboolean exception, use our own internal exception and copy
8462         it to @ex if anything goes wrong.
8463
8464         * camel-store.c (store_sync): Create an internal exception
8465         because sync_folder() checks it for validity. Transfer it to
8466         @ex when done.
8467
8468         * camel-exception.c (camel_exception_get_description): If @ex is
8469         NULL, complain - passing NULL exceptions to Camel is okay, but
8470         there should be no circumstances under which they're then
8471         examined.
8472         (camel_exception_get_id): Same here,
8473         (camel_exception_xfer): NULL-protect and warn if transferring from
8474         a NULL exception.
8475         
8476 2001-07-17  Jeffrey Stedfast  <fejj@ximian.com>
8477
8478         * camel-store.c (init_trash): Use CAMEL_VTRASH_NAME.
8479
8480         * camel-vtrash-folder.h: #define CAMEL_VTRASH_NAME
8481
8482 2001-07-16  Dan Winship  <danw@ximian.com>
8483
8484         * providers/imap/camel-imap-command.c (camel_imap_response_free):
8485         Given:
8486                 * 4 EXISTS
8487                 * 1 EXPUNGE
8488         We have to pass 3, not 4 to camel_imap_folder_changed for the
8489         exists count. Fixes ximian bug #2112 (finally!).
8490
8491 2001-07-14  Jeffrey Stedfast  <fejj@ximian.com>
8492
8493         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
8494         If the message info for an expunged message is NULL, then just
8495         break out - maybe a message was expunged that we were never
8496         notified even existed?
8497
8498 2001-07-13  Jeffrey Stedfast  <fejj@ximian.com>
8499
8500         * camel-mime-utils.c (rfc2047_decode_word): Added a hack to
8501         convert charsets in the format iso8859-1 to iso-8859-1 because it
8502         seems to be more iconv friendly. It has been reported that on some
8503         systems, iconv doesn't know about iso8859-1 while it *does* know
8504         about iso-8859-1. See bug #4530.
8505
8506 2001-07-13  Peter Williams  <peterw@ximian.com>
8507
8508         * Makefile.am (install-exec-local): Let people install as
8509         non-root, but give them a bigass warning so they're not allowed to
8510         complain when it doesn't work right.
8511
8512         * camel-remote-store.c (sync_remote_folder): New function: hash
8513         table callback.
8514         (remote_disconnect): If cleanly disconnecting, sync our
8515         folders. Fixes deadlocks on exit (folders syncing after store
8516         disconnects) and also makes sense.
8517
8518 2001-07-13  Jeffrey Stedfast  <fejj@ximian.com>
8519
8520         * camel-uid-cache.c (camel_uid_cache_new): We now use a structure
8521         as the bucket data rather than just a cache level so set the save
8522         state to TRUE.
8523         (maybe_write_uid): We only save the uid if the cache levels are
8524         the same *and* if the save state is TRUE.
8525         (free_uid): Free the state value.
8526         (camel_uid_cache_get_new_uids): New uids that get added to the
8527         cache start with a save state of FALSE.
8528         (camel_uid_cache_save_uid): Set the save state of the uid to
8529         TRUE. What should we do if the uid isn't already in the cache?
8530         Currently I make it add the uid, but maybe it shouldn't?
8531
8532         * providers/imap/camel-imap-folder.c (imap_filter_timeout): Update
8533         to reflect CamelFilterDriver API changes.
8534
8535         * camel-filter-driver.c (camel_filter_driver_filter_folder): Take
8536         a cache argument so we can tell the cache whether or not the uid
8537         should be saved (meaning we have successfully filtered it).
8538
8539 2001-07-12  Jeffrey Stedfast  <fejj@ximian.com>
8540
8541         * camel-filter-driver.c (camel_filter_driver_filter_message):
8542         Okay, I've decided that that user is just on crack. We don't want
8543         to allow filtering of deleted messages or we could get some
8544         unexpected behavior.
8545         (do_move): Oops. My last fix needs to be after the if-statement,
8546         not inside it.
8547         (do_copy): And here too.
8548
8549 2001-07-12  Jeffrey Stedfast  <fejj@ximian.com>
8550
8551         * camel-filter-driver.c (do_move): Only set p->copied and
8552         p->deleted if the messages are copied without an exception.
8553         (do_copy): Same - but obviously we don't set the p->deleted here
8554         at all.
8555         (camel_filter_driver_filter_message): Since users complained that
8556         they couldn't filter deleted messages for "safe keeping" (WTF?
8557         safe keeping? why were they deleted in the first place then??), I
8558         have taken out the code that optimized filtering by not allowing
8559         deleted messages to be filtered. This fixes bug #4473.
8560
8561         Note: Users have a warped sense of logic.
8562
8563 2001-07-12  Not Zed  <NotZed@Ximian.com>
8564
8565         * camel-mime-part-utils.c (extract_metatag_charset): Removed.
8566         (check_html_charset): Replaced with this.
8567         (simple_data_wrapper_construct_from_parser): Call
8568         check_html_charset if we dont have a charset on the content-type,
8569         and we have text/html data.
8570         (check_html_charset): We also need to do qp/base64 decoding
8571         ourselves, sigh.
8572
8573         * camel-mime-utils.c (html_meta_param_list_decode): Removed.  This
8574         was very wrong, the rules for mail headers vastly different from
8575         rules for decoding html elements.
8576         (rfc2184_decode): Move the malloc inside the iconv_open worked,
8577         otherwise we have a memleak.
8578
8579         * camel-mime-filter-html.c (camel_mime_filter_html_finalize, init,
8580         run, reset): Changed to use camelhtmlparser, and fixed a tiny
8581         memleak.
8582
8583         * camel-html-parser.c: Made the html indexer tokeniser re-usable.
8584         ONLY TO BE USED INTERNAL TO CAMEL HOWEVER.
8585         (tokenise_step): Slight fix to non-quoted values.
8586
8587         * camel-folder-summary.c
8588         (camel_folder_summary_info_new_from_message): Removed some code i
8589         wasn't supposed to commit.
8590
8591         * providers/local/camel-local-summary.c (local_summary_add): Only
8592         set info->size if it is not zero.
8593         (local_summary_add): If we dont get a size from the info passed
8594         in, calculate it using a null stream write.  Should do #4392.
8595
8596 2001-07-11  Jeffrey Stedfast  <fejj@ximian.com>
8597
8598         * camel-mime-part-utils.c (extract_metatag_charset): New function
8599         to extract a meta-tag charset value if it exists.
8600         (simple_data_wrapper_construct_from_parser): Along the same lines
8601         as the code I previously ripped out, but this time use the
8602         mime-parser's seek ability to help us along. Currently I read up
8603         to a 2k buffer size - this is probably overkill, 1k is probably
8604         plenty.
8605
8606         * camel-mime-utils.c (html_meta_param_list_decode): When we get to
8607         an `=', we must skip past it before trying to grab the param
8608         value. duh.
8609
8610 2001-07-11  Jeffrey Stedfast  <fejj@ximian.com>
8611
8612         * camel-mime-part-utils.c
8613         (simple_data_wrapper_construct_from_parser): Ripped out my code
8614         since it was never being used since the mime parser is not using a
8615         seekable stream (ever?) which pretty much means my code needs to
8616         be done someplace else.
8617
8618 2001-07-11  Peter Williams  <peterw@ximian.com>
8619
8620         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed): 
8621         Run the filter in its own thread to prevent locking issues.
8622         (imap_filter_timeout): New function that does the filtering called
8623         as a CamelSession timeout.
8624
8625 2001-07-11  Not Zed  <NotZed@Ximian.com>
8626
8627         * camel-filter-driver.c (camel_filter_driver_filter_mbox): Create
8628         the messageinfo itself, so we can properly set the size.
8629
8630         * camel-movemail.c (camel_movemail_solaris): Write out the from
8631         line between each message.
8632
8633 2001-07-10  Not Zed  <NotZed@Ximian.com>
8634
8635         * providers/local/camel-local-summary.c (local_summary_add): Copy
8636         the size across from the source message info if supplied.
8637
8638         * camel-stream-null.c: Added a 'written' member which keeps track
8639         of how much has been written to the stream.
8640
8641         * camel-movemail.c (camel_movemail): If we have BROKEN_SPOOL
8642         defined, then use the solaris movemail to quote from lines that
8643         sendmail didn't.
8644         (camel_movemail_solaris): Compile this in if BROKEN_SPOOL defined.
8645
8646 2001-07-10  Jeffrey Stedfast  <fejj@ximian.com>
8647
8648         * camel-mime-utils.c (html_meta_param_list_decode): New function
8649         to parse an HTML meta-tag.
8650
8651         * camel-mime-part-utils.c
8652         (simple_data_wrapper_construct_from_parser): If the Content-Type
8653         did not contain a charset parameter and it's also a text/html
8654         part, we have 1 last place to look - in the META html tags. *sigh*
8655
8656         * camel-mime-message.c (camel_mime_message_get_source):
8657         s/gint/unsigned since that's what it should be.
8658
8659 2001-07-09  Jeffrey Stedfast  <fejj@ximian.com>
8660
8661         * camel-pgp-context.c (pgp_sign): Forget the passphrase if the
8662         user has set that option.
8663         (pgp_clearsign): Same.
8664         (pgp_encrypt): And here...
8665         (pgp_decrypt): And finally here.
8666         (camel_pgp_context_new): Take a `remember' argument.
8667
8668 2001-07-09  Not Zed  <NotZed@Ximian.com>
8669
8670         * providers/local/camel-maildir-summary.c (maildir_summary_sync):
8671         Oops, e_poolv_set free's it for us, so dont double-free here.
8672
8673 2001-07-06  Not Zed  <NotZed@Ximian.com>
8674
8675         * camel-vee-folder.c (camel_vee_folder_finalise): Changed so we
8676         dont have the list changing under us, just going to the next node
8677         before we call a function that might change the list is
8678         potentially dangerous (slight mod of peters fix).  Hmm, i think it
8679         would've double-unref'd it too(?)
8680
8681 2001-07-08  Chris Toshok  <toshok@ximian.com>
8682
8683         * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_finalize):
8684         openssl_table is gone.  we now store/get the stream from the
8685         SSL_CTX's app_data.
8686         (stream_read): rework the non-blocking case to account for SSL
8687         possibly buffering data (in which case select will block even
8688         though data is ready to be read), and to account for FreeBSD's
8689         strange behavior of returning -1/EAGAIN even though select said
8690         the fd was ready to be read.
8691         (ssl_verify): openssl_table is gone.
8692         (open_ssl_connection): set the SSL_CTX's app_data to be the
8693         stream, remove the openssl_table code.
8694
8695 2001-07-06  Jeffrey Stedfast  <fejj@ximian.com>
8696
8697         * camel-mime-utils.c (header_encode_param): Don't allow in to be
8698         NULL, so instead of doing if (in == NULL) return;, make it a
8699         g_return_val_if_fail and later we can make it an assert or
8700         something.
8701
8702         * providers/local/camel-maildir-store.c (get_inbox): Fixes bug
8703         #1138.
8704
8705         * providers/local/camel-mbox-summary.c
8706         (camel_mbox_summary_build_from): Make the `day-of-month' digit
8707         take up 2 chars by using "%2d". Fixes bug #3989 for lame mailers
8708         like Pine.
8709
8710         * camel-pgp-context.c (crypto_exec_with_passwd): Set the pipe fd's
8711         to nonblocking.
8712
8713 2001-07-06  Peter Williams  <peterw@ximian.com>
8714
8715         * camel-object.c (camel_object_unref): Make sure that after the
8716         finalization event has happened and the finalization functions
8717         have been called that the object still has a zero refcount.
8718
8719 2001-07-06  Joe Shaw  <joe@ximian.com>
8720
8721         * providers/nntp/camel-nntp-grouplist.c: Add locking to
8722         camel_nntp_get_grouplist_from_server().
8723
8724         * providers/nntp/camel-nntp-resp-codes.h: Added
8725         NNTP_EXTENSIONS_SUPPORTED (202).
8726
8727         * providers/nntp/camel-nntp-store.c (camel_nntp_store_get_extensions):
8728         Check for both NNTP_LIST_FOLLOWS and NNTP_EXTENSIONS_SUPPORTED from
8729         a LIST EXTENSIONS request. (Dunno if NNTP_LIST_FOLLOWS ever comes
8730         out of this, but that's what was already there...) Also, put some
8731         locking around it.
8732         (finalize): e_mutex_destroy() the command lock
8733         (camel_nntp_store_init): e_mutex_new() the command lock.
8734
8735         * providers/nntp/camel-nntp-store.h: Add locking macros.
8736
8737 2001-07-05  Jeffrey Stedfast  <fejj@ximian.com>
8738
8739         * camel-folder-summary.c (camel_message_info_string): Added an
8740         assert to make sure that `mi' isn't NULL.
8741         (camel_message_info_set_string): Same.
8742
8743         * providers/imap/camel-imap-command.c (camel_imap_response_free):
8744         Create and use a temporary CamelException for use with
8745         camel_imap_folder_changed.
8746
8747 2001-07-05  Jeffrey Stedfast  <fejj@ximian.com>
8748
8749         * camel-pgp-context.c (pgp_verify): Send the
8750         --no-auto-key-retrieve argument to gpg if we are in offline mode
8751         so that we don't have to worry about gpg hanging if it can't
8752         connect to the key servers, because now it shouldn't even attempt
8753         to.
8754
8755 2001-07-05  Chris Toshok  <toshok@ximian.com>
8756
8757         * camel-tcp-stream-openssl.c (ssl_verify): use
8758         X509_STORE_CTX_get_ex_data to get at the SSL* - don't use the
8759         X509_STORE_CTX to look up our stream, since it's not what we used
8760         to insert our stream into the hashtable.
8761         (open_ssl_connection): insert the stream into the hashtable before
8762         calling SSL_connect, as this can cause ssl_verify to be called,
8763         and we need to look up the stream there.  remove the stream from
8764         the hashtable if there's an error connecting.
8765         (stream_connect): pass the CamelTcpStreamOpenSSL* to
8766         open_ssl_connection since it handles the hashtable stuff.  remove
8767         hashtable stuff from here.
8768
8769 2001-07-05  Jeffrey Stedfast  <fejj@ximian.com>
8770
8771         * camel-folder.c (camel_folder_copy_messages_to): if source ==
8772         dest, just no-op.
8773
8774 2001-07-05  Peter Williams  <peterw@ximian.com>
8775
8776         * camel-vee-folder.c (camel_vee_folder_finalise): Move this before the
8777         camel_vee_folder_remove_folder because that function modifies p->folders
8778         messing up our iteration.
8779         (camel_vee_folder_finalise): Don't unref our summary; camel-folder now
8780         does this.
8781
8782         * camel-object.h (CamelObject): Add a 'destroying' flag to CamelObject.
8783
8784         * camel-object.c (obj_init): Clear 'destroying'.
8785         (camel_object_unref): If 'destroying' then do not send the finalize
8786         event and do not call finalize functions. Otherwise, set destroying
8787         so just in case we get refed (eg event code) we don't get doubly
8788         finalized.
8789
8790 2001-07-05  Not Zed  <NotZed@Ximian.com>
8791
8792         * camel-mime-filter-basic.c (filter): Fix the assertion slightly,
8793         if we have a little bit of input the output size could be larger,
8794         since we store upto 3 chars in the state.
8795
8796         * camel-folder-summary.c
8797         (camel_folder_summary_info_new_from_message): When indexing a new
8798         record, create a pseudo word 'ibexindexed' so we can always tell
8799         that a message has already been idnexed, even if it contains no
8800         words of its own.  Things like maildir use this check to see if
8801         its already been processed, and it matters if it is incorrect in
8802         this case (not just wasted cycles).
8803         (camel_message_info_dup_to): Assign the to->strings from the
8804         e_poolv_cpy() call, since it may allocaote a new poolv if the
8805         lengths do not match.
8806
8807         (camel_folder_summary_info_new_from_parser): And same here.
8808
8809         * providers/local/camel-maildir-summary.c (maildir_summary_sync):
8810         Changed the logicfor epoolv code to be different, we dont need to
8811         update hash references or any tricky stuff.
8812         (maildir_summary_check): Samehere.
8813
8814         * camel-folder-summary.h: Removed include of e-memory.h.
8815
8816 2001-07-03  Joe Shaw  <joe@ximian.com>
8817
8818         * providers/nntp/camel-nntp-resp-codes.h: Added NNTP_NO_PERMISSION
8819         (502) to the list of response codes.
8820
8821         * providers/nntp/camel-nntp-store.c (nntp_store_connect): If we
8822         receive a NNTP_NO_PERMISSION, don't get into an infinite loop trying
8823         to reconnect, get extensions, etc. Just give up and return FALSE.
8824
8825 2001-07-03  Dan Winship  <danw@ximian.com>
8826
8827         * providers/imap/camel-imap-message-cache.c
8828         (camel_imap_message_cache_clear): Doh. Don't remove things from
8829         the hash table while foreach'ing it. (And can't use foreach_remove
8830         either because we have to remove them in a weird order). Fixes
8831         #3618.
8832
8833         * providers/imap/camel-imap-folder.c (imap_get_message): If the
8834         server returns OK from the FETCH BODY, but there's no parseable
8835         BODY response, it's probably because there's an UN-parseable BODY
8836         response, implying the message is badly formatted, MIMEwise. In
8837         that case, fall back to fetching the message as a single part.
8838
8839 2001-07-02  Sam Creasey <sammy@oh.verio.com>
8840
8841         * providers/nntp/camel-nntp-folder.c: Implemented
8842         nntp_folder_search_by_expression and
8843         nntp_folder_search_free.  Basic search functionality e.g. unread
8844         marking now works for NNTP folders.
8845
8846         * camel_filter_search.c (get_size): Added get-size sexp directive
8847         to get the size of a message for filters.
8848
8849         * providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new):
8850         Always check with the NNTP server after summary load -- this
8851         function now always expires old summary entries and syncs with
8852         the news server.
8853
8854         * providers/nntp/camel-nntp-utils.c (camel_nntp_get_headers):
8855         Only fetch headers for articles not already logged in 
8856         the summary file.
8857         
8858         * providers/nntp/camel-nntp-grouplist.c 
8859         (camel_nntp_get_grouplist_from_*): change from g_list_append()
8860         to g_list_prepend() + g_list_reverse.  Traversing 40,000 
8861         element linked lists sucks.
8862
8863         * providers/nntp/camel-nntp-store.c (camel_nntp_command):
8864         Should the NNTP connection die with 
8865         CAMEL_EXCEPTION_SERVICE_NOT_CONNECTED, make a single retry 
8866         attempt.  Timing out the NNTP link is less painful this way.
8867
8868 2001-07-02  Peter Williams  <peterw@ximian.com>
8869
8870         * README (Introduction): Add comment noting that Camel actually
8871         exists now :-)
8872
8873 2001-07-02  Dan Winship  <danw@ximian.com>
8874
8875         * camel-session.c (camel_session_get_filter_driver): new method to
8876         get an application-initialized filter driver.
8877
8878         * camel-filter-driver.c (camel_filter_driver_new): Remove the
8879         get_folder function and data args from here...
8880         (camel_filter_driver_set_folder_func): ...and add this function to
8881         set/change them.
8882
8883         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): If
8884         this folder is INBOX and we're filtering INBOX, set a flag on the
8885         folder for later.
8886         (imap_update_summary): Add another argument (GPtrArray *recents),
8887         and if it's non-NULL, add the uids of any \Recent new messages to
8888         it.
8889         (camel_imap_folder_changed): If doing filtering in this folder,
8890         create a recents array and pass it to imap_update_summary. Then
8891         get a filter driver and use it to filter the recent messages.
8892
8893         * providers/imap/camel-imap-summary.h: 
8894         * providers/imap/camel-imap-utils.c (imap_parse_flag_list): Add
8895         support for the \Recent flag.
8896
8897         * providers/imap/camel-imap-provider.c (imap_conf_entries): enable
8898         the "filter" option.
8899
8900         * camel-types.h: add CamelFilterDriver typedef here
8901
8902 2001-07-02  Not Zed  <NotZed@Ximian.com>
8903
8904         * camel-lock-client.c (camel_lock_helper_init): properly return
8905         error if we can't create pipes.
8906
8907         * camel-folder-summary.c (summary_build_content_info): re-enable
8908         html indexing.
8909
8910         * camel-mime-filter-html.c: Completely re-implemented using a
8911         custom parser.
8912
8913 2001-07-02  Dan Winship  <danw@ximian.com>
8914
8915         * tests/misc/url.c (main): Change a camel_exception_clear to
8916         camel_exception_init to fix a sometimes-crash
8917
8918 2001-06-29  Jeffrey Stedfast  <fejj@ximian.com>
8919
8920         * camel-mime-utils.c: Added Originator: header as a header to look
8921         for when looking for the mailing list.
8922
8923         * tests/mime-filter/Makefile.am: Build the test-crlf test program.
8924
8925         * tests/mime-filter/test-crlf.c: New test suite for the crlf
8926         filter.
8927
8928         * camel-mime-filter-crlf.c (filter): Fixed to correctly encode and
8929         decode dots.
8930
8931 2001-06-28  Peter Williams  <peterw@ximian.com>
8932
8933         * camel-mime-filter-stripheader.c: New file. Filter that strips a
8934         header from mime output.
8935
8936         * camel-mime-filter-stripheader.h: New file. Header for the above.
8937
8938         * providers/smtp/camel-smtp-transport.c (smtp_data): Use the
8939         stripheader filter to remove the "Bcc" header.
8940
8941         * Makefile.am: Add the stripheader files.
8942
8943         * tests/lib/Makefile.am (INCLUDES): Get this to compile again.
8944
8945         * tests/mime-filter/test-stripheader.c: New file. Test suite for
8946         the CamelMimeFilterStripHeader.
8947
8948         * tests/mime-filter/Makefile.am: New test section: mime filters.
8949
8950 2001-06-28  Jeffrey Stedfast  <fejj@ximian.com>
8951
8952         * camel-mime-utils.c (header_decode_param_list): Fix a memory
8953         leak. Also if the decoded value is NULL, that means it wasn't
8954         encoded so we don't want to toss the old value.
8955         (header_param_list_format_append): Correctly wrap long parameter
8956         values according to rfc2184.
8957
8958 2001-06-28  Dan Winship  <danw@ximian.com>
8959
8960         * providers/imap/camel-imap-folder.c (imap_refresh_info): If the
8961         folder is frozen, don't refresh, just record that we need to do it
8962         later.
8963         (imap_append_online): If the APPEND doesn't trigger an immediate
8964         EXISTS response (because the folder isn't the selected folder, or
8965         because the server doesn't do that until the next command), call
8966         imap_refresh_info on the folder.
8967         (imap_copy_online): Likewise. (Replacing the unconditional NOOP
8968         that was there before, which absolutely killed filter performance
8969         by forcing the IMAP provider to switch back and forth between
8970         folders after every copy or move.)
8971         (imap_thaw): If the folder needs a refresh, do it.
8972
8973         * camel-folder.c (camel_folder_is_frozen): New method
8974
8975 2001-06-27  Jeffrey Stedfast  <fejj@ximian.com>
8976
8977         * camel-transport.c (camel_transport_init): Initialize the private
8978         send_lock.
8979         (camel_transport_finalize): Free the private send_lock.
8980         (camel_transport_get_type): Set the init and finalize functions.
8981         (camel_transport_send): Lock the transport.
8982         (camel_transport_send_to): Same.
8983
8984         * camel-private.h: Add CAMEL_TRANSPORT_(UN)LOCK macros.
8985
8986 2001-06-27  Jeffrey Stedfast  <fejj@ximian.com>
8987
8988         * tests/folder/test9.c (main): Updated to match the current API.
8989
8990         * tests/folder/test3.c: #include <gtk/gtk.h> since we use
8991         gtk_init().
8992
8993         * camel-internet-address.c
8994         (camel_internet_address_encode_address): Use the new
8995         header_address_fold.
8996
8997         * camel-mime-utils.c: Removed some old #if 0'd code of mine.
8998         (rfc2047_encode_word): If enclen is 0, don't write an encoded word
8999         token (=?iso-8859-7?Q??= would be an invalid token).
9000         (header_address_fold): New function to wrap address headers -
9001         header_fold() was force-wrapping rfc2047 encoded words which was
9002         making the test suite fail. The *real* solution, however, is to
9003         not create rfc2047 encoded words longer than 72 chars.
9004
9005 2001-06-26  Jeffrey Stedfast  <fejj@ximian.com>
9006
9007         * camel-filter-driver.c (open_folder): Since we want an error
9008         opening a folder to result in the message being copied to Inbox
9009         (assuming no other filters get a chance to `move` it), don't
9010         record any exceptions that may occur in this function.
9011
9012 2001-06-26  Dan Winship  <danw@ximian.com>
9013
9014         * providers/imap/camel-imap-folder.c (camel_imap_folder_selected,
9015         imap_append_offline, imap_append_online,
9016         camel_imap_folder_changed): lock the cache around accesses
9017
9018         * providers/imap/camel-imap-store.c (get_folder_online): ref the
9019         newly-created folder (as current_folder) before calling
9020         camel_imap_folder_selected, in case that needs to do something
9021         that causes another folder to become current...
9022
9023         * camel-service.c (camel_service_get_url): D'oh.
9024         s/FALSE/CAMEL_URL_HIDE_PASSWORD/
9025
9026 2001-06-25  Jeffrey Stedfast  <fejj@ximian.com>
9027
9028         * camel-filter-search.c (get_source): g_strdup() the message
9029         source here or we will have problems later when we go to free the
9030         result ;-)
9031
9032 2001-06-25  Dan Winship  <danw@ximian.com>
9033
9034         * providers/imap/camel-imap-store.c (try_auth): Fix this: IMAP
9035         doesn't allow an extra argument to AUTHENTICATE to avoid a useless
9036         round trip like some other SASL bindings do.
9037
9038         * providers/imap/camel-imap-command.c (imap_read_response): Deal
9039         with IMAP servers that (incorrectly) return "+\r\n" rather than
9040         "+ \r\n" for an empty continuation response.
9041         (camel_imap_response_extract_continuation): Likewise.
9042
9043 2001-06-21  Jeffrey Stedfast  <fejj@ximian.com>
9044
9045         * camel-mime-utils.c (word_types_compatable): New function that
9046         decides if 2 word types are mergeable. An atom and a qstring are
9047         mergeable; 2 qstrings are mergeable; and 2 encoded words are
9048         mergeable.
9049         (header_encode_phrase_merge_words): If 2 words are merged, the new
9050         word type is the MAX of the combined types. This means that if we
9051         merge a qstring and an atom, the resulting word type is a
9052         qstring.
9053
9054         * camel-internet-address.c (internet_format):
9055         s/g_string_sprintfa/g_string_append since this makes more sense in
9056         this particular case.
9057         (internet_encode): Same here.
9058
9059 2001-06-21  Jeffrey Stedfast  <fejj@ximian.com>
9060
9061         * providers/smtp/camel-smtp-transport.c (smtp_send): Use
9062         camel_address_length() rather than casting and accessing data
9063         members.
9064
9065 2001-06-20  Jeffrey Stedfast  <fejj@ximian.com>
9066
9067         * camel-mime-utils.c (header_raw_check_mailing_list): If the first
9068         char of the mailing-list name is '<', chop it off to make Ettore
9069         happy. Fixes bug #2153.
9070
9071 2001-06-19  Not Zed  <NotZed@Ximian.com>
9072
9073         * camel-lock-helper.c (unlock_id): Fixed a bug when not running
9074         setuid it wouldn't unlock.
9075
9076         * camel-movemail.c (camel_movemail): use new
9077         locking daemon, also return an error code.
9078
9079 2001-06-18  Jeffrey Stedfast  <fejj@ximian.com>
9080
9081         Note: Except for the info_free(), the NULL checks are
9082         g_return's. I felt that since g_free() handles NULL that our
9083         _free() functions should also.
9084         
9085         * camel-folder.c (camel_folder_change_info_free): Check to make
9086         sure that the info pointer isn't NULL.
9087         (camel_folder_change_info_change_uid): Same.
9088         (camel_folder_change_info_changed): Same.
9089         (camel_folder_change_info_remove_uid): Same.
9090         (camel_folder_change_info_add_uid): Same.
9091         (camel_folder_change_info_build_diff): Same.
9092         (camel_folder_change_info_cat): Same.
9093         (camel_folder_change_info_add_source): Same.
9094         (camel_folder_change_info_add_source_list): Same.
9095         (camel_folder_change_info_add_update): Same.
9096         (camel_folder_change_info_add_update_list): Same.
9097
9098 2001-06-18  Dan Winship  <danw@ximian.com>
9099
9100         * tests/stream/Makefile.am (LDADD): 
9101         * tests/smime/Makefile.am (LDADD): 
9102         * tests/misc/Makefile.am (LDADD): 
9103         * tests/message/Makefile.am (LDADD): 
9104         * tests/folder/Makefile.am (LDADD): Remove DB3_LDADD
9105
9106         * Makefile.am (install-exec-local): Set camel-lock-help setgid or
9107         setuid as needed
9108
9109 2001-06-18  Not Zed  <NotZed@Ximian.com>
9110
9111         * camel-folder-summary.c
9112         (camel_folder_summary_info_new_from_parser): Only create a missing
9113         uid if we have indexing turned on.
9114
9115         * camel-lock-helper.c (setup_process): Function to setup
9116         process/sanity/security checks.  Change to the real uid as soon as
9117         we can.
9118         (lock_path): First try to lock as the real uid, if that fails, try
9119         the root uid.
9120         (unlock_id): Unlock as the uid we created the lock as.
9121
9122         * Makefile.am (INCLUDES): Added -DCAMEL_SBINDIR for lock helper
9123         location.
9124
9125         * providers/local/camel-spool-folder.c (spool_lock): Implemented,
9126         using lock helper locking.  Need to work out if the locking
9127         requires a root created lock?
9128         (spool_unlock): Likewise.
9129
9130 2001-06-15  Not Zed  <NotZed@Ximian.com>
9131
9132         * camel-lock-helper.c: Setuid Lock helper process.  Creates and manages
9133         .locks, keeping them active, removing them, etc.  What real perms it
9134         needs is a little system dependent.
9135
9136 2001-06-14  Not Zed  <NotZed@Ximian.com>
9137
9138         * providers/local/camel-maildir-store.c (get_folder_info): Implement.
9139         (scan_dir): Does the work of scanning for maildir directories.
9140
9141 2001-06-13  Not Zed  <NotZed@Ximian.com>
9142
9143         * providers/local/camel-spool-store.c (get_folder_info):
9144         Implemented, just returns a hardcoded INBOX folder.
9145         (free_folder_info): implemented, free's the 1 possible level of
9146         folder info.
9147
9148         * providers/local/camel-spool-folder.c
9149         (camel_spool_folder_construct): Set the real unread message
9150         count on the folder_created thing.
9151
9152 2001-06-15  Dan Winship  <danw@ximian.com>
9153
9154         * providers/imap/camel-imap-message-cache.c
9155         (camel_imap_message_cache_max_uid): Return the largest real UID in
9156         the cache (as an integer). Eventually to be used for an
9157         optimization in the new-message fetch code.
9158         (cache_put): Keep track of max_uid.
9159
9160 2001-06-14  Jeffrey Stedfast  <fejj@ximian.com>
9161
9162         * camel-mime-utils.c: Added Mailing-List header regex so that we
9163         can do mlist magic on that header.
9164
9165 2001-05-28  Jeffrey Stedfast  <fejj@ximian.com>
9166
9167         * camel-mime-utils.c (header_decode_param): Properly handle
9168         correct and incorrect (for the common case, ie Outlook and
9169         Netscape/Mozilla) rfc2184 values.
9170         (header_decode_rfc2184_param): Get the param name and see if we
9171         should expect a rfc2184 parameter value.
9172         (rfc2184_decode): Decode a rfc2184 value.
9173         (hex_decode): hex decode a string.
9174         (header_decode_param_list): Handle rfc2184 encoded parameters (ie
9175         parameters that have been split and perhaps encoded).
9176         (header_param_list_format_append): Encode the value before seeing
9177         if it will fit on the line. If the value does get encoded, be sure
9178         to put a '*' before the equal-sign.
9179         (header_encode_param): New function to rfc2184 encode a parameter
9180         value (maybe it should be renamed?)
9181
9182 2001-06-14  Jeffrey Stedfast  <fejj@ximian.com>
9183
9184         * camel-mime-part.c (init_header_name_table): Don't try to format
9185         the Reply-To header - we don't want to wrap the reply-to address.
9186
9187 2001-06-12  Not Zed  <NotZed@Ximian.com>
9188
9189         * providers/local/camel-spool-*.[ch]: A new provider, for spool
9190         mailboxes.  Mostly a cut and paste of the mbox code, but not a
9191         subclass CamelLocal*.  Not tested a lot, doesn't lock yet, use
9192         with extreme caution.
9193
9194         * tests/lib/folders.c (test_folder_message_ops): Added spool arg,
9195         spool folders can't be deleted, renamed, etc.
9196         (test_folder_basic): Same.
9197
9198         * tests/folder/test2.c (main): Added checks for spool type.
9199
9200         * tests/[message|stream|folder|misc|smime]/Makefile.am (LDADD):
9201         Added db3 flags, so make check compiles, doesn't run though.
9202
9203 2001-05-24  Not Zed  <NotZed@Ximian.com>
9204
9205         * providers/local/camel-local-provider.c
9206         (camel_provider_module_init): Added spool provider.
9207
9208 2001-06-07  Jon Trowbridge  <trow@ximian.com>
9209
9210         * camel-filter-driver.c (camel_filter_driver_filter_folder): Add a
9211         separator between the service url and the folder name, if needed.
9212
9213         * camel-filter-driver.c (camel_filter_driver_filter_mbox): Added
9214         an argument, so that the original source URI of the mbox can be
9215         passed in.  This is needed because this function is called
9216         post-movemail, so we are never reading from the original mbox
9217         anymore.  Without the original mbox URI, the X-Evolution-Source
9218         tag gets set incorrectly and filter-on-source will fail to work.
9219         (camel_filter_driver_filter_message): Also take an extra arg
9220         for the original source URI.  It is the original URI, not the
9221         source URI, that is used for filtering and for setting the
9222         X-Evolution-Source tag.
9223
9224 2001-06-05  Dan Winship  <danw@ximian.com>
9225
9226         * providers/imap/camel-imap-folder.c (imap_rescan): Don't fetch
9227         the UID and FLAGS of messages we don't know about yet, since
9228         they'll just get discarded.
9229
9230 2001-06-01  Jeffrey Stedfast  <fejj@ximian.com>
9231
9232         * tests/smime/pgp.c: Fix to not get into a recursive loop in
9233         get_type().
9234
9235         * tests/smime/pgp-mime.c: Same.
9236
9237 2001-05-31  Jeffrey Stedfast  <fejj@ximian.com>
9238
9239         * camel-smime-context.c: Numerous fixes to get it to compile.
9240
9241         * camel.h: Added camel-cipher-context.h, camel-cms-context.h,
9242         camel-smime-context.h, and camel-smime-utils.h
9243
9244         * camel-cms-context.[c,h]: New virtual class for manipulating
9245         cryptographic message syntax messages (like S/MIME).
9246
9247         * camel-smime-context.[c,h]: Modified to inherit from the
9248         CamelCMSContext class rather than the CamelCipherContext class.
9249
9250         * camel-smime.[c,h]: Removed - just use camel-smime-context
9251         directly.
9252
9253         * camel-smime-utils.[c,h]: New source files. Moved the 2 useful
9254         functions from camel-smime.[c,h] into here.
9255
9256 2001-05-30  Dan Winship  <danw@ximian.com>
9257
9258         * camel-charset-map.c: Redo the BUILD_MAP code to not depend on
9259         libunicode. Now it only generates a map of "popular" 8bit
9260         encodings. (It's not worthwhile to support obscure encodings,
9261         because any mailer that supports them will support UTF8 too. And
9262         Chinese and Japanese use mostly the same UTF8 characters so you
9263         need to decide between those encodings based on the locale or
9264         the charset of the message you're replying to or the input
9265         method you used. So this is sufficient for camel_charset_best's
9266         use.)
9267
9268         * camel-charset-map-private.h: Regenerated.
9269
9270         * camel.c (camel_shutdown): Move #ifdefs around to prevent a
9271         warning.
9272
9273 2001-05-29  Dan Winship  <danw@ximian.com>
9274
9275         * camel-disco-diary.c: Code for logging and replaying offline
9276         operations.
9277
9278         * camel-disco-store.c (disco_construct): Set disco->status here
9279         (where we can base it on the session's offline status) rather than
9280         at init time.
9281         (disco_connect): If we connect online and have a non-empty diary,
9282         switch to RESYNCING mode and replay the diary to the server.
9283         (disco_get_folder, disco_get_folder_info): Add _resyncing
9284         variants.
9285
9286         * camel-disco-folder.c (disco_sync, disco_expunge_uids,
9287         disco_append_message, disco_copy_messages_to,
9288         disco_move_messages_to): Add _resyncing variants to switches.
9289         (disco_expunge_uids, disco_append_message, disco_copy_messages_to,
9290         disco_move_messages_to): Remove #ifdef'ed out diary code: let the
9291         provider do it.
9292         (disco_append_message): Redo the append methods to no longer
9293         return the UID, since we're no longer doing the logging from here.
9294
9295         * providers/imap/camel-imap-store.c (imap_connect_online,
9296         imap_connect_offline): Create a CamelDiscoDiary.
9297         (imap_disconnect_offline): And free it.
9298
9299         * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
9300         If RESYNCING, don't do any sort of checking that the remote folder
9301         matches the summary, beyond making sure that the UIDVALIDITY is
9302         correct.
9303         (imap_rescan): Add a missing camel_folder_summary_info_free when
9304         removing a UID from the summary.
9305         (imap_expunge_uids_offline): Implement. Fairly simple.
9306         (imap_expunge_uids_resyncing): Implement. If the store supports
9307         UIDPLUS, we can just use imap_expunge_uids_online. If not, we need
9308         to temporarily undelete any messages marked deleted on the server
9309         that aren't supposed to get expunged.
9310         (imap_append_offline): Implement, using cache and summary
9311         operations, and triggering the folder_changed event by hand.
9312         (imap_append_resyncing): Implement. Redo imap_append_online a bit
9313         in the process to make them able to share more code.
9314         (imap_copy_offline): Implement.
9315         (imap_copy_online): Move parts of this out into a helper.
9316         (imap_copy_resyncing): Implement. In most cases this is just like
9317         imap_copy_online, but if you are copying a message that was itself
9318         copied or appended into the folder, and the server doesn't do
9319         UIDPLUS, it will be necessary to replace at least part of the copy
9320         operation with one or more appends.
9321
9322         * providers/imap/camel-imap-command.c (imap_read_response): Don't
9323         record the current folder in the response when in RESYNCING mode.
9324         (This means that EXISTS and EXPUNGE responses won't be processed,
9325         which is needed because the summary may not match the folder at
9326         this point.)
9327         (imap_read_response): On error, call
9328         camel_imap_response_free_without_processing, not
9329         camel_imap_response_free.
9330
9331         * providers/imap/camel-imap-utils.c (imap_uid_array_to_set): Make
9332         this work better when operating on UIDs that aren't in the summary.
9333
9334         * providers/imap/camel-imap-summary.c
9335         (camel_imap_summary_add_offline): New routine used by
9336         imap_append_offline and imap_copy_offline to create new summary
9337         entries.
9338
9339 2001-05-28  Jeffrey Stedfast  <fejj@ximian.com>
9340
9341         * camel-mime-utils.c (header_set_param): Use g_strcasecmp()
9342         because some systems don't have strcasecmp(). Also, when removing
9343         a param, make sure to free the param->name too.
9344
9345 2001-05-27  Dan Winship  <danw@ximian.com>
9346
9347         * tests/lib/messages.c (test_message_read_file): Fix an fd leak
9348
9349         * tests/lib/session.c, tests/lib/session.h: a CamelSession
9350         subclass for the test programs.
9351
9352         * tests/lib/Makefile.am: include session.[ch]
9353
9354         * tests/folder/test*.c: Use a CamelTestSession from libcameltest
9355         instead of cut+pasting everywhere.
9356
9357         * tests/misc/url.c (main): Update for a camel_url_new change at
9358         some point.
9359
9360         * tests/*/.cvsignore: Add stuff.
9361
9362         * camel-mime-utils.c (rfc2047_encode_word): Fix a silly ==/!=
9363         mixup.
9364
9365 2001-05-26  Dan Winship  <danw@ximian.com>
9366
9367         * providers/imap/camel-imap-folder.c: Add a "need_rescan" flag
9368         saying if we want to rescan the entire folder for flag changes
9369         next time it's selected.
9370         (camel_imap_folder_init): Set need_rescan TRUE.
9371         (camel_imap_folder_selected): If need_rescan is TRUE, call
9372         imap_rescan.
9373         (imap_refresh_info): Only do a full rescan if need_rescan is TRUE.
9374         Otherwise just do a NOOP, making this a MUCH more lightweight
9375         operation. Also, don't call imap_rescan directly if the folder
9376         isn't selected, since that could end up causing the folder to be
9377         scanned *twice* (imap_rescan -> camel_imap_command ->
9378         camel_imap_folder_selected -> imap_rescan).
9379         (imap_rescan): Set need_rescan FALSE.
9380         (imap_sync_online): Don't NOOP if no changes were pushed: the
9381         caller will call refresh_info if it wants to poll for changes.
9382         Fixes evolution-mail doing lots of unnecessary extra work at
9383         quit time.
9384
9385         * providers/imap/camel-imap-store.c (refresh_folder_info): Set
9386         need_rescan on each folder before calling refresh_info.
9387
9388 2001-05-25  Jeffrey Stedfast  <fejj@ximian.com>
9389
9390         * providers/smtp/camel-smtp-transport.c (smtp_auth): Oops. Use a
9391         strNcmp to make sure the response begins with a 334 code, not a
9392         strcmp. Duh.
9393
9394         * providers/local/camel-maildir-folder.c (maildir_append_message):
9395         remove the summary info so we are not out-of-sync with the maildir
9396         folder.
9397
9398         * providers/local/camel-mh-folder.c (mh_append_message): remove
9399         the summary info so we are not out-of-sync with the mh folder.
9400
9401         * providers/local/camel-mbox-folder.c (mbox_append_message):
9402         remove the summary info so we are not out-of-sync with the mbox.
9403
9404 2001-05-24  Jeffrey Stedfast  <fejj@ximian.com>
9405
9406         * camel-smime-context.c (camel_smime_context_new): Oops, I spelled
9407         the get-default-db function name wrong.
9408
9409 2001-05-23  Jeffrey Stedfast  <fejj@ximian.com>
9410
9411         * providers/local/camel-local-folder.c
9412         (camel_local_folder_construct): s/folder_deleted/folder_created -
9413         result of a bad copy/paste.
9414
9415         * providers/imap/camel-imap-search.c (imap_body_contains):
9416         Optimize the match "" case.
9417
9418 2001-05-21  Jeffrey Stedfast  <fejj@ximian.com>
9419
9420         * providers/imap/camel-imap-store.c (get_folder_info_online):
9421         Store the CamelFolderInfo tree that was returned from
9422         camel_folder_info_build() in a new variable, 'tree', rather than
9423         'fi' since we later use 'fi' when syncing folders. Not only does
9424         this fix a memory leak, but it also fixes the bug where the user
9425         would only see the last folder in the folder list and/or it's
9426         subfolders.
9427
9428 2001-05-16  Jeffrey Stedfast  <fejj@ximian.com>
9429
9430         * camel-session.c (camel_session_forget_password): The service can
9431         be NULL here too, thanks to Wayne Davis for pointing this out.
9432
9433         * camel-smime-context.c (camel_smime_context_new): We don't need
9434         to be passed the certdb path anymore.
9435
9436 2001-05-16  Dan Winship  <danw@ximian.com>
9437
9438         * camel-medium.c (camel_medium_get_headers): New function to
9439         return an array of all headers.
9440         (camel_medium_free_headers): And free them.
9441
9442         * camel-mime-part.c (get_headers, free_headers): Implement this
9443         for CamelMimePart. (Works for CamelMimeMessage too.)
9444
9445 2001-05-15  Jeffrey Stedfast  <fejj@ximian.com>
9446
9447         * camel-smime-context.c (camel_smime_context_finalise): Don't
9448         close or free (it wasn't allocated) the certdb.
9449         (camel_smime_context_new): If we get a NULL certdb handle, then
9450         don't bother trying to create a new certdb handle since NSS_Init*
9451         should have done that.
9452
9453 2001-05-15  Jeffrey Stedfast  <fejj@ximian.com>
9454
9455         * Makefile.am: Don't use EXTRA_GNOME_*, use the new CAMEL_*
9456         variables so we don't link in tons of extra cruft that we don't
9457         need.
9458
9459         * tests/smime/pkcs7.c: Added to the test suite - tests the S/MIME
9460         pkcs7 functions.
9461
9462 2001-05-14  Jeffrey Stedfast  <fejj@ximian.com>
9463
9464         * camel-smime-context.c: Lots of fixes to get this to compile.
9465
9466         * camel-smime.c (camel_smime_part_verify): Updated to pass in a
9467         hash argument to camel_smime_verify().
9468
9469         * camel-pgp-mime.c (camel_pgp_mime_part_verify): Update according
9470         to the changes in the context API.
9471
9472         * camel-pgp-context.c (pgp_verify): Updated to take a
9473         CamelCipherHash argument.
9474
9475         * camel-cipher-context.c (camel_cipher_verify): Now takes a hash
9476         argument since the S/MIME code needs this.
9477
9478         * Makefile.am: Add camel-smime-context.[c,h] and camel-smime.[c,h]
9479         to the build.
9480         
9481         * camel-smime.[c,h]: New source files for manipulating S/MIME
9482         message parts.
9483
9484 2001-05-14  Jon Trowbridge  <trow@ximian.com>
9485
9486         * camel-search-private.c (utf8_get): Replicate the semantics of
9487         the libunicode utf8 functions by returning NULL in the arg
9488         on invalid utf8.
9489
9490         * camel-pgp-context.c (pgp_verify): Check for valid utf8,
9491         terminate loop if something looks wrong.
9492
9493         * camel-mime-utils.c (header_encode_phrase_get_words): Properly
9494         check for invalid utf8.
9495         (header_encode_string): Properly check for invalid utf8.
9496
9497         * camel-charset-map.c (camel_charset_step): Properly check for
9498         invalid utf8.
9499
9500 2001-05-14  Jeffrey Stedfast  <fejj@ximian.com>
9501
9502         * tests/folder/test9.c: 
9503         * tests/folder/test8.c:
9504         * tests/folder/test7.c: 
9505         * tests/folder/test6.c: 
9506         * tests/folder/test5.c: 
9507         * tests/folder/test4.c:
9508         * tests/folder/test3.c: 
9509         * tests/folder/test2.c: 
9510         * tests/folder/test1.c: 
9511         * tests/smime/pgp-mime.c: 
9512         * tests/smime/pgp.c: Subclass CamelSession since we can no longer
9513         specify the passwd callback any other way and update code
9514         accordingly.
9515
9516 2001-05-11  Dan Winship  <danw@ximian.com>
9517
9518         * camel-mime-utils.c (header_location_decode): Decode
9519         Content-Location, either correctly or Netscape-generated-brokenly.
9520
9521         * camel-mime-part.c (camel_mime_part_set_content_location,
9522         camel_mime_part_get_content_location, etc): Deal with
9523         Content-Location header.
9524
9525 2001-05-11  Jeffrey Stedfast  <fejj@ximian.com>
9526
9527         * providers/smtp/camel-smtp-transport.c (smtp_auth): Don't check
9528         the initial auth response until we get into the while-loop
9529         otherwise we have problems if the SASL mechanism supported a
9530         client initiated challenge (like PLAIN and LOGIN do).
9531
9532 2001-05-11  Dan Winship  <danw@ximian.com>
9533
9534         * camel-stream-null.c (camel_stream_null_new): Make this return
9535         CamelStream * (like the other stream new functions) instead of
9536         CamelStreamNull *
9537
9538 2001-05-10  Chris Toshok  <toshok@ximian.com>
9539
9540         * camel-tcp-stream-ssl.c (stream_connect): call SSL_Enable after
9541         the SSL_ImportFD and before PR_Connect.  Otherwise, NSS aborts
9542         during the connect.
9543
9544 2001-05-10  Jeffrey Stedfast  <fejj@ximian.com>
9545
9546         * camel-session.c (camel_session_get_password): Don't abort if the
9547         Service is NULL, this is perfectly valid for cipher contexts.
9548
9549 2001-05-09  Peter Williams  <peterw@ximian.com>
9550
9551         * providers/imap/camel-imap-folder.c (imap_move_messages_to): Pass
9552         appropriate parameters to CF_CLASS and add comment explaining why
9553         my initial attempt at a solution didn't work.
9554
9555 2001-05-09  Dan Winship  <danw@ximian.com>
9556
9557         * camel-disco-store.c (camel_disco_set_status): Set the
9558         disconnected status.
9559         (camel_disco_store_can_work_offline): Return whether or not a
9560         given CamelDiscoStore can work offline or not.
9561
9562         * camel-disco-folder.c (camel_disco_folder_cache_message):
9563         Explicitly tell a folder to cache a message. (Better than using
9564         get_message, because for IMAP that doesn't guarantee you'll get
9565         all the message parts.)
9566         (camel_disco_folder_prepare_for_offline): Prepare a folder for
9567         offline use by caching all messages meeting given search criteria
9568         (and doing anything else the particular folder implementation
9569         needs).
9570
9571         * camel-session.c (camel_session_set_online,
9572         camel_session_is_online): A session-wide online/offline toggle.
9573         (camel_session_init): Set online to TRUE.
9574
9575         * providers/imap/camel-imap-store.c (can_work_offline):
9576         Implementation of CamelDiscoStore::can_work_offline. (Checks that
9577         the store has been used online at least once.)
9578         (imap_get_folder_online, imap_get_folder_offline): Deal with
9579         request for "inbox" properly. ("Don't you mean... 'INBOX'?").
9580
9581         * providers/imap/camel-imap-folder.c (imap_cache_message):
9582         Implementation of CamelDiscoFolder::cache_message.
9583
9584         * camel.h: Add camel-disco-store.h and camel-disco-folder.h
9585
9586 2001-05-09  Jeffrey Stedfast  <fejj@ximian.com>
9587
9588         * camel-mime-part.c (camel_mime_part_set_content_id): Wrap the
9589         content-id with <>'s.
9590
9591 2001-05-04  Jeffrey Stedfast  <fejj@ximian.com>
9592
9593         * providers/smtp/camel-smtp-transport.c (connect_to_server): Add
9594         support for using OpenSSL.
9595
9596         * camel-remote-store.c (remote_connect): Add support for using the
9597         OpenSSL implementation.
9598
9599         * camel-tcp-stream-ssl.c (ssl_bad_cert): Hmmmm, don't pass in a
9600         NULL as the last argument to alert_user - prototype doesn't take
9601         that argument anymore?
9602
9603         * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_finalize):
9604         (ssl_verify): Use a global hash table to try and lookup the
9605         CamelTcpStreamOpenSSL object given the ssl context since OpenSSL
9606         doesn't think one needs to pass data around, we should all be
9607         living in a world of global variables, duh!
9608
9609 2001-05-06  Dan Winship  <danw@ximian.com>
9610
9611         * Makefile.am (libcamelinclude_HEADERS): Fix another build
9612         problem. (Um, anyone else could have done this...)
9613
9614 2001-05-04  Dan Winship  <danw@ximian.com>
9615
9616         * providers/imap/camel-imap-store.c (get_folder_online): Fix up
9617         refcounting on current_folder.
9618
9619         * camel-disco-folder.c, camel-disco-store.h: Remove
9620         CamelDiscoDiary refs that weren't supposed to escape yet.
9621
9622 2001-05-03  Dan Winship  <danw@ximian.com>
9623
9624         * camel-disco-store.c: new abstract class for disconnectable
9625         remote stores
9626
9627         * camel-disco-folder.c: new abstract class for folders on
9628         disconnectable stores.
9629
9630         * Makefile.am: Add camel-disco-folder.[ch] and
9631         camel-disco-store.[ch].
9632
9633         * providers/imap/camel-imap-store.c: Make this a subclass of
9634         CamelDiscoStore, and fix up the offline interfaces for the changes
9635         since they were first written (particularly the fact that some
9636         IMAP stores don't just use subscribed folders).
9637
9638         * providers/imap/camel-imap-folder.c: Make this a subclass of
9639         CamelDiscoFolder, although most ops still fail in disconnected
9640         mode.
9641
9642         * camel-store.c (camel_store_get_folder_info): Change gboolean,
9643         gboolean, gboolean to guint32 in the prototype for this function.
9644
9645         * providers/local/camel-local-store.c (get_folder_info): Update
9646         for prototype change.
9647
9648 2001-05-02  Dan Winship  <danw@ximian.com>
9649
9650         * providers/imap/camel-imap-store.h: Clean this up a bit. Add a
9651         "tag_prefix" member. Move "useful_lsub" into capabilities.
9652
9653         * providers/imap/camel-imap-store.c (camel_imap_store_init):
9654         Initialize the tag_prefix, based on a static variable.
9655
9656         * providers/imap/camel-imap-command.c (camel_imap_command): Use
9657         the store's tag_prefix character rather than "A" at the start of
9658         the tag. Makes the verbose debug output easier to parse when
9659         connected to multiple IMAP servers. (Well, unless you're connected
9660         to more than 26 servers...)
9661
9662         * providers/imap/camel-imap-utils.c (imap_uid_array_to_set): Fix
9663         this up... it was losing count in some cases and giving a more
9664         verbose answer than it needed to.
9665
9666         * providers/pop3/camel-pop3-store.c: Rescue the KPOP code from bit
9667         rot.
9668
9669 2001-05-01  Dan Winship  <danw@ximian.com>
9670
9671         * providers/imap/camel-imap-command.c (camel_imap_command): Redo
9672         command locking. Since command_lock is recursive, we can just get
9673         a lock here, and release it either on error, or when the caller
9674         frees the response data. (This simplifies a lot of stuff, and
9675         fixes some problems with camel_imap_folder_changed being called
9676         without the command_lock locked because of the 2001-03-22 change.)
9677
9678         (camel_imap_response_free): 
9679         (camel_imap_response_free_without_processing): 
9680         (camel_imap_response_extract): 
9681         (camel_imap_response_extract_continuation): These all take a
9682         CamelImapStore now as well, to deal with locking.
9683
9684         * providers/imap/camel-imap-private.h: Add
9685         CAMEL_IMAP_STORE_ASSERT_LOCKED, which defaults to a noop, but can
9686         be made to call e_mutex_assert_locked.
9687
9688         * providers/imap/camel-imap-folder.c, camel-imap-search.c,
9689         camel-imap-store.c: Simplify using new locking stuff. Add a few
9690         CAMEL_IMAP_STORE_ASSERT_LOCKED checks.
9691
9692 2001-05-01  Dan Winship  <danw@ximian.com>
9693
9694         Support the IMAP UIDPLUS extension (RFC 2359), which lets you
9695         resync after disconnected operation more efficiently, but also
9696         makes it possible to do appends and moves/copies more efficiently
9697         now.
9698
9699         * providers/imap/camel-imap-folder.c (imap_append_message): If the
9700         server supports UIDPLUS, grab the APPENDUID response and cache the
9701         message into the folder's message cache.
9702         (imap_copy_messages_to): Likewise, for COPYUID, copy any message
9703         parts we have cached between the source and destination folder
9704         caches.
9705         (imap_get_message): If the entire message is already in the cache,
9706         just return that rather than building it from parts.
9707         (imap_update_summary): Fetch just the "UID FLAGS RFC822.SIZE" of
9708         the new messages first, then only fetch the headers for messages
9709         where we don't already have the headers cached.
9710
9711         * providers/imap/camel-imap-message-cache.c: Add gtk-doc comments.
9712         (cache_put): Fix refcounting stuff here.
9713         (camel_imap_message_cache_insert_stream,
9714         camel_imap_message_cache_insert_wrapper): New.
9715         (camel_imap_message_cache_get): Fix a bug here so the memory
9716         caching actually works.
9717         (camel_imap_message_cache_copy): New routine, used by
9718         imap_copy_messages_to.
9719
9720         * providers/imap/camel-imap-utils.c (imap_uid_set_to_array):
9721         Inverse operation of imap_uid_array_to_set. Used to parse COPYUID
9722         response.
9723
9724 2001-04-30  Dan Winship  <danw@ximian.com>
9725
9726         * providers/imap/camel-imap-utils.c (imap_uid_array_to_set):
9727         New-and-improved version of get_uid_set() from
9728         camel-imap-folder.c. Looks at the summary as it goes so that if
9729         you ask for messages 5, 6, 8, and 9, and there is no message 7,
9730         then you get "5:9" instead of "5:6,8:9"
9731
9732         * providers/imap/camel-imap-folder.c (imap_copy_messages_to): Use
9733         imap_uid_array_to_set() rather than get_uid_set().
9734         (get_uid_set): Gone
9735
9736 2001-04-27  Dan Winship  <danw@ximian.com>
9737
9738         * camel-session.c: Redo this a lot so that instead of having a
9739         class full of callbacks, we have a subclassable class. Also,
9740         replace the increasingly horrifying
9741         camel_session_query_authenticator with three new routines,
9742         camel_session_get_password, camel_session_forget_password, and
9743         camel_session_alert_user.
9744
9745         * camel-pgp-context.c:
9746         * camel-pkcs7-context.c:
9747         * camel-smime-context.c: 
9748         * providers/imap/camel-imap-store.c: 
9749         * providers/pop3/camel-pop3-store.c: 
9750         * providers/smtp/camel-smtp-transport.c: 
9751         Use camel_session_get_password / camel_session_forget_password.
9752
9753         * camel-tcp-stream-ssl.c (ssl_bad_cert): Use
9754         camel_session_alert_user.
9755
9756 2001-04-26  Jeffrey Stedfast  <fejj@ximian.com>
9757
9758         * camel.c (camel_init): Automagically call camel_shutdown()
9759         atexit() ;-)
9760         (camel_init): Also initialize NSS databases as read/write for
9761         S/MIME and if NSS fails to init, try initializing with volatile
9762         databases.
9763
9764         * camel-file-utils.h: #include <sys/types.h> for off_t.
9765
9766 2001-04-26  Dan Winship  <danw@ximian.com>
9767
9768         * camel-file-utils.c: New file, with the int, string, time_t, and
9769         off_t encode/decode routines from camel-folder-summary.c moved
9770         here and renamed, for the enjoyment of non-CamelFolderSummary
9771         subclasses.
9772
9773         * Makefile.am (libcamel_la_SOURCES): Add camel-file-utils.c
9774         (libcamelinclude_HEADERS): and camel-file-utils.h
9775
9776         * camel-folder-summary.c: Remove functions that were moved to
9777         camel-file-utils.c, update uses of them for the new names.
9778         (camel_folder_summary_{en,de}code_token are still here.)
9779
9780         * providers/local/camel-mbox-summary.c: Use camel_file_util_*
9781         names
9782
9783         * providers/imap/camel-imap-summary.c: Use camel_file_util_* names
9784
9785         * providers/imap/camel-imap-store.c (imap_store_setup_online,
9786         imap_store_setup_offline): Use camel_file_util_* names, which
9787         makes much more sense since this isn't folder summary stuff.
9788
9789 2001-04-26  Dan Winship  <danw@ximian.com>
9790
9791         * Makefile.am (INCLUDES): Remove UNICODE_CFLAGS (and some other
9792         stuff that's redundant with EXTRA_GNOME_CFLAGS)
9793         (libcamel_la_LIBADD): Replace UNICODE_LIBS with GAL_LIBS.
9794
9795         * camel-search-private.c: 
9796         * camel-pgp-context.c: 
9797         * camel-mime-utils.c: Use gunicode interfaces rather than
9798         libunicode.
9799
9800         * camel-charset-map.c: Use gunicode rather than libunicode. (The
9801         charmap-regen code still depends on libunicode though.)
9802
9803         * camel-mime-filter-charset.h: 
9804         * tests/message/test2.c (convert): Use iconv rather than
9805         unicode_iconv.
9806
9807         * providers/smtp/Makefile.am (libcamelsmtp_la_LIBADD): 
9808         * providers/pop3/Makefile.am (libcamelpop3_la_LIBADD): 
9809         * providers/local/Makefile.am (libcamellocal_la_LIBADD): Remove
9810         UNICODE_LIBS.
9811
9812         * camel.c (camel_init): Remove call to unicode_init.
9813
9814         * camel-mime-parser.c: Remove unused unicode.h include.
9815
9816 2001-04-26  Dan Winship  <danw@ximian.com>
9817
9818         * camel-service.c (get_host): Use e_gethostbyname_r.
9819         (camel_service_gethost): Remove unused var.
9820
9821 2001-04-26  Not Zed  <NotZed@Ximian.com>
9822
9823         * Applied jacob's patches for e-poolv stuff.
9824
9825 2001-04-23  Jeffrey Stedfast  <fejj@ximian.com>
9826
9827         * camel.h: Add camel-vee-folder.h and camel-digest-folder.h
9828
9829         * camel-digest-folder.[c,h]: New class that can be used to browse
9830         a multipart/digest message as if it were a CamelFolder.
9831
9832 2001-04-22  Jeffrey Stedfast  <fejj@ximian.com>
9833
9834         * camel-pgp-context.c (pgp_verify): Oops, don't use the return
9835         value of iconv() as a string length, it only tells us the number
9836         of non-reversable character conversions. This fixes it so we
9837         actually see the gpg output in the message viewer.
9838
9839 2001-04-23  Mikael Hallendal  <micke@codefactory.se>
9840
9841         * providers/nntp/Makefile.am (INCLUDES): 
9842         Changed GTK_INCLUDEDIR to EXTRA_GNOME_CFLAGS.
9843
9844 2001-04-20  Jeffrey Stedfast  <fejj@ximian.com>
9845
9846         * camel-smime-context.c (smime_sign): Implemented using the
9847         secmime.h convenience functions.
9848         (smime_clearsign): We just error our here, there is no clearsign
9849         for smime.
9850         (smime_verify): Copied code over from the pkcs7 verify - same
9851         state, ugly and unknown :-)
9852         (smime_encrypt): Implemented using the secmime.h convenience
9853         functions.
9854         (smime_decrypt): Same as the code in pkcs7-context.
9855
9856 2001-04-19  Jeffrey Stedfast  <fejj@ximian.com>
9857
9858         * camel-pkcs7-context.c (pkcs7_sign): Implemented.
9859         (pkcs7_clearsign): Implemented.
9860         (get_zero_len_passwd): Convenience function to try a 0-length key
9861         on the certificate db - if this works then there is no need to
9862         prompt the user.
9863         (get_password): Callback to get the password.
9864         (camel_cipher_hash_to_nss): Convenience function to convert a
9865         CamelCipherHash to an NSS HASH_HashType.
9866         (nss_hash_to_sec_oid): Converts a HASH_HashType to a SecOidTag.
9867         (pkcs7_digest): Digest function for use with pkcs7_sign().
9868         (sign_encode_cb): Callback to write the signed data to the output
9869         stream.
9870         (pkcs7_verify): Hacked on a bit more but am still a bit on the
9871         confused side. This might work but I wouldn't hold my breath. The
9872         sign/clearsign should be close if not correct, but this one...god
9873         only knows.
9874         (pkcs7_decrypt): Implemented.
9875         (pkcs7_encrypt): Implemented (mostly, still need to handle when
9876         'sign' is TRUE).
9877
9878 2001-04-18  Dan Winship  <danw@ximian.com>
9879
9880         * providers/imap/camel-imap-store.c (camel_imap_store_finalize):
9881         Free base_url and storage_path.
9882
9883         * providers/pop3/camel-pop3-store.c (finalize): Free the
9884         implementation string.
9885         (camel_pop3_command): Clarify documentation to mention that
9886         @ex isn't set (and *@ret is) on CAMEL_POP3_ERR.
9887         (connect_to_server): Set @ex properly on CAMEL_POP3_ERR.
9888
9889         * providers/pop3/camel-pop3-folder.c (pop3_refresh_info,
9890         pop3_get_message): Set @ex properly on CAMEL_POP3_ERR.
9891
9892 2001-04-17  Jeffrey Stedfast  <fejj@ximian.com>
9893
9894         * camel-pkcs7-context.[c,h]: New source files to handle Pkcs7
9895         encryption, decryption, signing, and verifying. Not yet
9896         complete. I'm sensing this is going to take a while seeing as how
9897         NSS is just so well documented.
9898
9899 2001-04-17  Dan Winship  <danw@ximian.com>
9900
9901         * camel-filter-driver.c (camel_filter_driver_filter_message): Fix
9902         a memory leak in the error case.
9903
9904 2001-04-16  Jeffrey Stedfast  <fejj@ximian.com>
9905
9906         * providers/local/camel-mbox-summary.c (summary_rebuild): Don't we
9907         want to tell where we are by using the start of the message? I
9908         think this should be using camel_mime_parser_tell_start_from()
9909         instead. Also divide by the size *before* multiplying by 100 so
9910         that we don't overflow the int which was giving us negative values
9911         for our progress status (oops).
9912
9913 2001-04-16  Jeffrey Stedfast  <fejj@ximian.com>
9914
9915         * camel-operation.c: Added a prototype for stamp().
9916
9917         * camel-charset-map.c (camel_charset_locale_name): #include
9918         string.h so we don't get a warning about strchr being undefined
9919         and also init charset to NULL.
9920
9921         * camel-pgp-context.c (pgp_verify): Go back to doing the utf8
9922         conversion by hand so that we don't depend on gal.
9923
9924         * Makefile.am: Remove the EXTRA_GNOME_CFLAGS include.
9925
9926         * camel-store.c (camel_mkdir_hier): Convenience function that it
9927         seems a number of camel-store implementations used gal for.
9928
9929         * providers/nntp/camel-nntp-store.c (ensure_news_dir_exists): Lets
9930         not depend on gal for just e_mkdir_hier() - use camel_mkdir_hier()
9931         instead.
9932
9933         * providers/nntp/camel-imap-store.c: Lets not depend on gal for
9934         just e_mkdir_hier() - use camel_mkdir_hier() instead.
9935
9936         * camel-session.c (camel_session_get_storage_path): Don't depend
9937         on e_mkdir_heir() anymore, use the CamelStore version.
9938
9939         * camel-folder-search.h: Removed gal dependency, why was this even
9940         there in the first place?
9941
9942         * providers/imap/camel-imap-folder.c: Don't need gal/util/e-util.h
9943         here, so remove it.
9944
9945         * string-utils.c (strstrcase): New function, well more like old
9946         function brought back to life so we don't have to depend on gal.
9947
9948         * providers/imap/camel-imap-store.c (imap_store_setup_online): Use
9949         strstrcase rather than e_strstrcase so we don't depend on gal.
9950         (get_unread_online): Same here.
9951
9952         * providers/smtp/camel-smtp-transport.c (smtp_helo): Use
9953         strstrcase.
9954
9955 2001-04-15  Jeffrey Stedfast  <fejj@ximian.com>
9956
9957         * camel-mime-utils.c (header_raw_check_mailing_list): regex
9958         doesn't set errno and regcomp returns 0 on success and any other
9959         value for an error (so don't *just* check for -1).
9960
9961 2001-04-14  Jeffrey Stedfast  <fejj@ximian.com>
9962
9963         * camel-cipher-context.c: Check to make sure the context is a
9964         valid context in all the user functions.
9965
9966 2001-04-13  Jon Trowbridge  <trow@ximian.com>
9967
9968         * providers/imap/camel-imap-store.c (imap_disconnect):
9969         s/imap_store/store/, fixing a typo that was causing the build to
9970         fail.
9971
9972         * camel-filter-search.c (get_source): Make the (previously unused)
9973         get-source command actually do the right thing, properly shrouding
9974         any passed-in source and falling back to use the source attached
9975         to the mime message.
9976
9977 2001-04-13  Dan Winship  <danw@ximian.com>
9978
9979         * camel-object.c (camel_object_hook_event):
9980         * camel-uid-cache.c (camel_uid_cache_get_new_uids):
9981         * camel-url.c (camel_url_new_with_base): Plug leaks.
9982
9983         * camel-remote-store.c (camel_remote_store_init): Don't
9984         re-initialize the folders hash table.
9985
9986         * providers/imap/camel-imap-store.c (imap_disconnect): Free
9987         authtypes since they'll be re-read on re-connect.
9988         (get_folder_info): Free folderinfos that we're discarding from the
9989         list.
9990
9991 2001-04-12  Jeffrey Stedfast  <fejj@ximian.com>
9992
9993         * camel-pgp-context.c (camel_pgp_context_get_type): Oops, lets not
9994         get into a recursive call here ;-)
9995
9996         * tests/smime/pgp.c: Updated to reflect changes to the PGP code.
9997
9998         * tests/smime/pgp-mime.c: Same.
9999
10000 2001-04-12  Jeffrey Stedfast  <fejj@ximian.com>
10001
10002         * camel-pgp-mime.c: Updated to reflect the few changes made to the
10003         CamelPgpContext class.
10004
10005         * camel-pgp-context.c: Updated to subclass of CamelCipherContext.
10006
10007         * camel-cipher-context.[c,h]: New base class for
10008         CamelPgpContext. Also contains the replacement for
10009         CamelPgpValidity, CamelCipherValidity.
10010
10011 2001-04-12  Dan Winship  <danw@ximian.com>
10012
10013         * camel-mime-filter-crlf.c (filter): Fix a pair of array bounds
10014         reads noted by purify
10015
10016 2001-04-12  Jeffrey Stedfast  <fejj@ximian.com>
10017
10018         * camel.h: #include the pgp stuff.
10019
10020 2001-04-12  Dan Winship  <danw@ximian.com>
10021
10022         * providers/imap/camel-imap-message-cache.c
10023         (camel_imap_message_cache_remove): 
10024         * camel-url.c (camel_url_to_string): Plug memory leaks.
10025
10026 2001-04-11  Dan Winship  <danw@ximian.com>
10027
10028         * providers/imap/camel-imap-utils.c (imap_parse_string_generic):
10029         Simplify peterw's imap_is_atom_char fix.
10030
10031 2001-04-11  Jeffrey Stedfast  <fejj@ximian.com>
10032
10033         * tests/smime/Makefile.am: Added pgp-mime.c to the tests.
10034
10035         * tests/smime/pgp-mime.c: Test suite for camel-pgp-mime.c functions.
10036
10037         * Makefile.am: Add camel-pgp-mime.[c,h] to the build.
10038
10039         * camel-pgp-mime.c: Made a number of fixes to get it to compile
10040         and also fixed a few logic errors (mostly forgetting to reset
10041         streams) so that it worked (thanks to the pgp-mime test program).
10042
10043 2001-04-11  JP Rosevear  <jpr@ximian.com>
10044
10045         * providers/imap/Makefile.am: user GNOME_INCLUDEDIR since gnome
10046         files are included in the top level camel headers and the gtk
10047         include dir is now versioned and such
10048
10049         * providers/local/Makefile.am: ditto
10050
10051         * providers/pop3/Makefile.am: ditto
10052
10053         * providers/smtp/Makefile.am: ditto
10054
10055         * providers/sendmail/Makefile.am: ditto
10056
10057         * camel-service.c: use five arg version of gethostbyname_r if
10058         appropriate
10059         (camel_get_host_byname): check if msg->herr is non-zero instead of
10060         checking if msg->hp is null since we may not always have msg->hp
10061
10062 2001-04-11  Jeffrey Stedfast  <fejj@ximian.com>
10063
10064         * camel-sasl-digest-md5.c (digest_response): Use
10065         camel_charset_locale_name() to get the locale charset rather than
10066         checking the CHARSET environment variable. This is a much less
10067         ugly hack. Also: If we fail to be able to convert to UTF8, then
10068         disavow all knowledge of the charset parameter.
10069
10070         * camel-charset-map.c (camel_charset_locale_name): New function to
10071         return the locale charset (or NULL if US-ASCII).
10072
10073 2001-04-11  Jeffrey Stedfast  <fejj@ximian.com>
10074
10075         * camel-pgp-context.c (camel_pgp_verify): Use
10076         e_utf8_from_locale_string() rather than trying to do it manually
10077         since Lauris's version works much better.
10078
10079 2001-04-06  Jeffrey Stedfast  <fejj@ximian.com>
10080
10081         * Makefile.am: Added camel-pgp-context.[c,h] to the build. Also
10082         added tests/smime/pgp.c and Makefile.am
10083
10084         * tests/smime/pgp.c: New test suite for PGP functions.
10085
10086         * camel-pgp-context.c: Various fixes to get it to build.
10087
10088 2001-04-07  Peter Williams  <peterw@ximian.com>
10089
10090         * providers/imap/camel-imap-utils.c (imap_parse_string_generic): It
10091         would be a good idea to recognize '\0'. Before, this code was running
10092         off the ends of strings and intermittently coredumping (if it didn't
10093         hit an imap_atom_char first) -- whoops!
10094
10095 2001-04-05  Not Zed  <NotZed@Ximian.com>
10096
10097         * merge from evolution-0-10-branch to evolution-0-10-merge-0
10098
10099 2001-04-03  Jeffrey Stedfast  <fejj@ximian.com>
10100
10101         * Makefile.am: Added tests/ back in
10102
10103         * camel-mime-utils.c (header_decode_text): Ignore whitespace
10104         between encoded words (there were a few cases where it didn't
10105         before).
10106         (header_encode_string): Preserve whitespace between words that are
10107         to be encoded by encoding them too.
10108         (header_encode_phrase): Same here but with phrases.
10109
10110 2001-04-03  Dan Winship  <danw@ximian.com>
10111
10112         * providers/imap/camel-imap-folder.c (imap_sync): If we don't
10113         change any flags or expunge, send a NOOP to give the server a
10114         chance to send EXISTS, etc, messages.
10115         (imap_get_message): If the server_level < IMAP4rev1, always fetch
10116         messages all-at-once, since they don't support the [#.MIME]
10117         syntax.
10118         (imap_update_summary): When reading message flags, set the
10119         server_flags field as well, and don't overwrite any flags set by
10120         camel_folder_summary_info_new_from_message. Might help with some
10121         of the flag problems...
10122
10123 2001-04-02  Dan Winship  <danw@ximian.com>
10124
10125         * camel-service.h: Remove the "quick_login" member, which is
10126         unnecessary.
10127
10128         * providers/smtp/camel-smtp-transport.c (smtp_auth): Remove the
10129         references to quick_login and fix this to use the CamelSasl
10130         interfaces correctly to do the same thing.
10131         (connect_to_server): Split this out of smtp_connect
10132         (smtp_connect): Use connect_to_server. When re-EHLO'ing after
10133         auth, ignore errors.
10134         (query_auth_types): Use connect_to_server rather than
10135         smtp_connect, so it doesn't try to authenticate. Add LOGIN
10136         authtype to the list of authtypes to check for.
10137
10138         * providers/smtp/camel-smtp-provider.c
10139         (camel_provider_module_init): Add LOGIN authtype to the authtypes
10140         list explicitly.
10141
10142         * camel-sasl.c (camel_sasl_authtype_list): Don't list LOGIN here:
10143         it's not a real SASL authtype and is only used for SMTP.
10144         
10145         * camel-sasl-plain.c: 
10146         * camel-sasl-login.c: 
10147         * camel-sasl-kerberos4.c: 
10148         * camel-sasl-cram-md5.c: 
10149         * camel-sasl-anonymous.c: 
10150         * providers/pop3/camel-pop3-provider.c: Remove "quick_login"
10151         argument from authtypes.
10152
10153 2001-04-02  Gediminas Paulauskas <menesis@delfi.lt>
10154
10155         * camel-filter-driver.c: marked missing report status' for translation.
10156
10157 2001-04-02  Jeffrey Stedfast  <fejj@ximian.com>
10158
10159         * camel-pgp-context.c (camel_pgp_sign): mutex lock & unlock the
10160         context.
10161         (camel_pgp_clearsign): Same.
10162         (camel_pgp_verify): Same.
10163         (camel_pgp_encrypt): Same.
10164         (camel_pgp_decrypt): And finally here...
10165
10166         * camel-pgp-context.h: Update the function prototypes to match
10167         those found in camel-pgp-context.c.
10168
10169         * camel-pgp-context.c: Updated.
10170
10171         * camel-pgp-mime.c (camel_pgp_mime_part_sign): Implemented.
10172         (camel_pgp_mime_part_verify): Implemented.
10173         (camel_pgp_mime_part_encrypt): Implemented.
10174         (camel_pgp_mime_part_decrypt): Implemented.
10175
10176 2001-04-01  Jeffrey Stedfast  <fejj@ximian.com>
10177
10178         * camel-sasl-login.[c,h]: New files to handle the LOGIN SASL
10179         mechanism.
10180         
10181         * camel-sasl-plain.c: Removed the definition of
10182         camel_sasl_login_authtype.
10183
10184         * camel-sasl.c (camel_sasl_new): Oops. I thought LOGIN was an
10185         alias to PLAIN. I was wrong. These two SASL objects have to be
10186         separate.
10187
10188         * providers/smtp/camel-smtp-transport.c (smtp_auth): Updated to
10189         check for and use authmech->quick_login when available.
10190
10191 2001-04-01  Jeffrey Stedfast  <fejj@ximian.com>
10192
10193         * providers/pop3/camel-pop3-provider.c: Updated the authtypes here
10194         too.
10195
10196         * camel-sasl-plain.c: 
10197         * camel-sasl-anonymous.c: 
10198         * camel-sasl-digest-md5.c: 
10199         * camel-sasl-cram-md5.c: 
10200         * camel-sasl-kerberos4.c: Updated the authtype values.
10201
10202         * camel-service.h: Added another field to CamelServiceAuthType
10203         that specifies whether or not the mechanism supports "quick auth"
10204         which means that the client can send the initial challenge in the
10205         AUTH request.
10206
10207         * camel-sasl.c (camel_sasl_new): Add support for LOGIN.
10208         (camel_sasl_authtype_list): Here too.
10209         (camel_sasl_authtype): And finally here.
10210
10211         * camel-sasl-plain.c: Define camel_sasl_login_authtype.
10212
10213         * providers/smtp/camel-smtp-transport.c (smtp_auth): Only unref
10214         the SASL object if it exists.
10215
10216 2001-03-30  Dan Winship  <danw@ximian.com>
10217
10218         * providers/pop3/camel-pop3-store.c (connect_to_server,
10219         query_auth_types, pop3_connect): Move things around here to make
10220         this all work right again (so you don't get prompted for a
10221         password when checking the supported authtypes.)
10222
10223 2001-03-30  Jon Trowbridge  <trow@ximian.com>
10224
10225         * camel-mime-message.c (camel_mime_message_set_source): Shrould
10226         our source URL before putting it into X-Evolution-Source.
10227
10228 2001-03-29  Jeffrey Stedfast  <fejj@ximian.com>
10229
10230         * providers/imap/camel-imap-store.c (get_folder_info): Don't
10231         blindly append "/INBOX", construct a CamelURL and set the path
10232         that way.
10233         (parse_list_response_as_folder_info): Don't blindly append
10234         "/<foldername>", construct a CamelURL and set the path that way
10235         instead.
10236         (get_folders_offline): And again here.
10237
10238 2001-03-30  Not Zed  <NotZed@Ximian.com>
10239
10240         * camel-service.c (camel_get_host_byname): Dont overwrite an
10241         exception if we got one already.  Added camel_operation status to
10242         it, and comment out some debug.
10243
10244 2001-03-29  Not Zed  <NotZed@Ximian.com>
10245
10246         * providers/smtp/camel-smtp-transport.c (smtp_connect): Free host
10247         name info when done ... blah blah.
10248
10249         * camel-sasl-kerberos4.c (krb4_challenge): Free host name info
10250         after we're done with it.
10251
10252         * camel-sasl-digest-md5.c (digest_md5_challenge): Free host name
10253         info after we're done with it.
10254
10255         * camel-remote-store.c (remote_connect): Free the host name info
10256         from get_host after we're finished with it.
10257
10258         * camel-service.c (camel_get_host_byname): New function to
10259         lookup a name, and still be cancellable.
10260         (camel_free_host): And a function to free the structure
10261         returned.
10262         (camel_service_gethost): Call get_host_byname for this.
10263
10264 2001-03-29  Jon Trowbridge  <trow@ximian.com>
10265
10266         * camel-filter-driver.c (camel_filter_driver_filter_message): Save
10267         the source URL using camel_mime_message_set_source.
10268
10269         * camel-mime-message.c (camel_mime_message_set_source): Renamed
10270         camel_mime_message_set_identity to this.  Sets the X-Evolution-Source
10271         header.
10272         (camel_mime_message_get_source): Returns the X-Evolution-Source
10273         header.
10274
10275 2001-03-29  Kjartan Maraas  <kmaraas@gnome.org>
10276
10277         * broken-date-parser.c: #include <stdio.h>, <stdlib.h> and <string.h>
10278         * broken-date-parser.h: Remove all includes but <glib.h>
10279         * camel-address.h: Added #include <glib.h>
10280         * camel-data-wrapper.c: Move system includes to the top.
10281         * camel-data-wrapper.h: #include <glib.h>
10282         * camel-exception.c: #ifdef HAVE_CONFIG_H
10283         * camel-exception.h: Remove #include <glib.h>
10284         * camel-filter-driver.c: #ifdef HAVE_CONFIG_H and move system
10285         headers to top. Mark strings in camel_exception_set*() for i18n.
10286         * camel-filter-driver.h: #include <glib.h>
10287         * camel-filter-search.c: #ifdef HAVE_CONFIG_H
10288         * camel-folder-search.c: #include <config.h>
10289         * camel-folder-search.h: Header shuffling
10290         * camel-folder-summary.h: Same here
10291         * camel-folder-thread.c: #ifdef HAVE_CONFIG_H
10292         * camel-folder.c: Here too.
10293         * camel-folder.h: #include <glib.h>
10294         * camel-internet-address.c: Move system headers up
10295         * camel-lock.c: #ifdef HAVE_CONFIG_H
10296         * camel-medium.c: Same here
10297         * camel-mime-filter-bestenc.c: Move system headers up
10298         * camel-mime-filter-from.c: Same here
10299         * camel-mime-filter-linewrap.c: And here
10300         * camel-mime-filter.c: #include <string.h> to fix warnings from new gcc
10301         * camel-mime-filter.h: System headers moved up
10302         * camel-mime-message.c: Here too. #ifdef HAVE_CONFIG_H added
10303         * camel-mime-part-utils.c: #ifdef HAVE_CONFIG_H added
10304         * camel-mime-part.c: Here too, and shuffle headers
10305         * camel-mime-utils.c: #ifdef HAVE_CONFIG_H. Remove const from two
10306         variables to remove warning.
10307         * camel-mime-utils.h: Shuffle headers
10308         * camel-movemail.c: #ifdef HAVE_CONFIG_H. Mark string in camel_exception_set
10309         * camel-multipart.c: #ifdef HAVE_CONFIG_H. Added includes to remove
10310         warnings from new gcc
10311         * camel-object.c: #ifdef HAVE_CONFIG_H
10312         * camel-object.h: Shuffle headers
10313         * camel-operation.c: #ifdef HAVE_CONFIG_H
10314         * camel-provider.c: #ifdef HAVE_CONFIG_H. Shuffle headers. Mark a string
10315         * camel-remote-store.c: #ifdef HAVE_CONFIG_H
10316         * camel-sasl-anonymous.c: #ifdef HAVE_CONFIG_H. #include <string.h>
10317         * camel-sasl-cram-md5.c: #ifdef HAVE_CONFIG_H. #include <string.h> and
10318         <stdio.h> to remove warnings.
10319         * camel-sasl-digest-md5.c: #ifdef HAVE_CONFIG_H. shuffle headers
10320         * camel-sasl-digest-md5.h: Shuffle headers.
10321         * camel-sasl-kerberos4.c: #ifdef HAVE_CONFIG_H. Shuffle headers.
10322         * camel-sasl-kerberos4.h: Shuffle headers.
10323         * camel-sasl-plain.c: #ifdef HAVE_CONFIG_H. Shuffle
10324         * camel-sasl.c: #ifdef HAVE_CONFIG_H. #include <string.h>
10325         * camel-search-private.c: #include <config.h>
10326         * camel-seekable-stream.c: #ifdef HAVE_CONFIG_H
10327         * camel-seekable-stream.h: Shuffle
10328         * camel-seekable-substream.c: #ifdef HAVE_CONFIG_H
10329         * camel-service.c: Same
10330         * camel-service.h: Shuffle
10331         * camel-session.c: #ifdef HAVE_CONFIG_H
10332         * camel-store.c: Same
10333         * camel-stream-buffer.c: Here too
10334         * camel-stream-buffer.h: Shuffle
10335         * camel-stream-filter.c: #include <string.h>
10336         * camel-stream-fs.c: #ifdef HAVE_CONFIG_H
10337         * camel-stream-fs.h: Shuffle headers
10338         * camel-stream-mem.c: Same as above
10339         * camel-stream-mem.h: Here too
10340         * camel-stream-null.c: #ifdef HAVE_CONFIG_H
10341         * camel-stream.c: Here too
10342         * camel-stream.h: Shuffle
10343         * camel-tcp-stream-openssl.c: #ifdef HAVE_CONFIG_H
10344         * camel-tcp-stream-raw.c: Same here. and move local includes down
10345         * camel-tcp-stream-ssl.c: Same as above
10346         * camel-tcp-stream.c: #ifdef HAVE_CONFIG_H
10347         * camel-tcp-stream.h: move local include down
10348         * camel-transport.c: #ifdef HAVE_CONFIG_H
10349         * camel-transport.h: #include <glib.h>
10350         * camel-uid-cache.c: #ifdef HAVE_CONFIG_H. Shuffle headers
10351         * camel-uid-cache.h: Shuffle
10352         * camel-url.c: #ifdef HAVE_CONFIG_H
10353         * camel-vee-folder.c: #ifdef HAVE_CONFIG_H. Shuffle headers
10354         * camel-vee-folder.h: #include <glib.h>
10355         * camel-vee-store.h: Same here
10356         * camel.c: #ifdef HAVE_CONFIG_H
10357         * gstring-util.c: Here too
10358         * hash-table-utils.c: Remove #include <glib.h>
10359         * hash-table-utils.h: #include it here instead.
10360         * string-utils.c: #ifdef HAVE_CONFIG_H
10361         * providers/cache/camel-cache-map.c: #ifdef HAVE_CONFIG_H, shuffle
10362         headers and mark strings in camel_exception_set*()
10363         * providers/cache/camel-cache-provider.c: #ifdef HAVE_CONFIG_H
10364         * providers/cache/camel-cache-store.c: Same here, and mark a string.
10365         * providers/imap/camel-imap-command.c: #ifdef HAVE_CONFIG_H
10366         * providers/imap/camel-imap-command.h: Shuffle header
10367         * providers/imap/camel-imap-folder.c: #ifdef HAVE_CONFIG_H
10368         * providers/imap/camel-imap-message-cache.c: #ifdef HAVE_CONFIG_H
10369         * providers/imap/camel-imap-provider.c: #ifdef HAVE_CONFIG_H and
10370         #include <string.h>
10371         * providers/imap/camel-imap-search.c: #ifdef HAVE_CONFIG_H
10372         * providers/imap/camel-imap-store.c: #ifdef HAVE_CONFIG_H and mark
10373         a string.
10374         * providers/imap/camel-imap-summary.c: Shuffle headers
10375         * providers/imap/camel-imap-wrapper.c: #ifdef HAVE_CONFIG_H. Shuffle
10376         * providers/local/camel-local-folder.c: #ifdef HAVE_CONFIG_H
10377         * providers/local/camel-local-provider.c: #ifdef HAVE_CONFIG_H
10378         * providers/local/camel-local-store.c: Same here
10379         * providers/local/camel-local-summary.c: Here too, shuffle, mark a string
10380         * providers/local/camel-maildir-folder.c: #ifdef HAVE_CONFIG_H
10381         * providers/local/camel-maildir-store.c: Same
10382         * providers/local/camel-maildir-summary.c: Here too
10383         * providers/local/camel-mbox-summary.c: And here
10384         * providers/local/camel-mbox-store.c: And here
10385         * providers/local/camel-mbox-summary.c: #include <config.h>
10386         * providers/local/camel-mh-folder.c: #ifdef HAVE_CONFIG_H
10387         * providers/local/camel-mh-store.c: same
10388         * providers/local/camel-mh-summary.c: #ifdef HAVE_CONFIG_H, shuffle headers
10389         and mark a string for translation.
10390         * providers/nntp/camel-nntp-auth.c: #include <config.h>
10391         * providers/nntp/camel-nntp-store.c: Remove superfluous arg to 
10392         CAMEL_SERVICE_CLASS to make it compile
10393         * providers/pop3/camel-pop3-provider.c: #ifdef HAVE_CONFIG_H
10394         * providers/pop3/camel-pop3-store.c: Same here
10395         * providers/sendmail/camel-sendmail-provider.c: Here too
10396         * providers/sendmail/camel-sendmail-transport.c: Here too
10397         * providers/smtp/camel-smtp-provider.c: Same
10398         * providers/smtp/camel-smtp-transport.c: #ifdef HAVE_CONFIG_H, mark
10399         strings for translations.
10400
10401 2001-03-29  Dan Winship  <danw@ximian.com>
10402
10403         * camel-url.c (camel_url_to_string): change "gboolean show_passwd"
10404         to "guint32 flags".
10405
10406         * tests/misc/url.c (main): Update calls to camel_url_to_string
10407
10408         * providers/imap/camel-imap-store.c (construct): Call
10409         camel_url_to_string with flags to hide password, authtype, and
10410         params to create the base_url.
10411         (etc): Update for the fact that the base_url no longer has the "/"
10412         at the end.
10413
10414         * camel-service.c (construct): Update calls to camel_url_to_string
10415         (pass CAMEL_URL_HIDE_PASSWORD)
10416
10417 2001-04-03  Jeffrey Stedfast  <fejj@ximian.com>
10418
10419         * camel-mime-utils.c (header_decode_text): Ignore whitespace
10420         between encoded words (there were a few cases where it didn't
10421         before).
10422         (header_encode_string): Preserve whitespace between words that are
10423         to be encoded by encoding them too.
10424         (header_encode_phrase): Same here but with phrases.
10425
10426 2001-04-04  Kjartan Maraas  <kmaraas@gnome.org>
10427
10428         * camel-filter-driver.c: Added #include <config.h>. Marked
10429         a bunch of strings for translation.
10430         * camel-folder-search.c: Added #include <config.h>.
10431         * camel-folder-summary.c: Same here.
10432         * camel-movemail.c: Marked strings for translation.
10433         * camel-provider.c: Same here.
10434         * camel-search-private.c: #include <config.h>
10435         * camel-vee-folder.c: Mark string for translation.
10436         * providers/local/camel-mbox-summary.c: #include <config.h>
10437
10438 2001-04-03  Dan Winship  <danw@ximian.com>
10439
10440         * providers/imap/camel-imap-folder.c (imap_sync): If we don't
10441         change any flags or expunge, send a NOOP to give the server a
10442         chance to send EXISTS, etc, messages.
10443         (imap_get_message): If the server_level < IMAP4rev1, always fetch
10444         messages all-at-once, since they don't support the [#.MIME]
10445         syntax.
10446
10447 2001-04-01  Jeffrey Stedfast  <fejj@ximian.com>
10448
10449         * providers/imap/camel-imap-store.c (get_folder_info): Don't
10450         blindly append "/INBOX", construct a CamelURL and set the path
10451         that way.
10452         (parse_list_response_as_folder_info): Don't blindly append
10453         "/<foldername>", construct a CamelURL and set the path that way
10454         instead.
10455         (get_folders_offline): And again here.
10456
10457 2001-03-31  Not Zed  <NotZed@Ximian.com>
10458
10459         * camel-operation.c (struct _status_stack): change stamp to
10460         unsigned to avoid overflow.
10461         (camel_operation_end):
10462         (camel_operation_progress_count):
10463         (camel_operation_progress): Double the delay before transient
10464         events start showing their own progress.
10465
10466 2001-03-30  Not Zed  <NotZed@Ximian.com>
10467
10468         * providers/pop3/camel-pop3-folder.c (pop3_get_message): Change
10469         the pop download into a transient event.
10470
10471         * camel-operation.c (stamp): Get a timestamp that changes 4x a
10472         second (or rather, arbitrarily more often than 1/second).
10473         (camel_operation_progress): Use stamp() for time updates.
10474         (camel_operation_progress_count): "
10475         (camel_operation_start): Store the status as a struct status_stack
10476         item.
10477         (camel_operation_start_transient): New function to start a
10478         transient event, which is only reported if it runs for too
10479         long/and is reset afterwards.
10480         (camel_operation_progress):
10481         (camel_operation_progress_count): Fix for status_stack changes,
10482         and account for transient updates. 
10483
10484         * camel-filter-driver.c (camel_filter_driver_filter_folder): When
10485         we remove things (set deleted), always set seen too, to mirror
10486         interface behaviour when you delete.
10487         (camel_filter_driver_filter_message): And same here too.
10488
10489 2001-03-30  Dan Winship  <danw@ximian.com>
10490
10491         * providers/pop3/camel-pop3-store.c (connect_to_server,
10492         query_auth_types, pop3_connect): Move things around here to make
10493         this all work right again (so you don't get prompted for a
10494         password when checking the supported authtypes.)
10495
10496 2001-03-29  Dan Winship  <danw@ximian.com>
10497
10498         * camel-url.c (camel_url_to_string): change "gboolean show_passwd"
10499         to "guint32 flags".
10500
10501         * tests/misc/url.c (main): Update calls to camel_url_to_string
10502
10503         * providers/imap/camel-imap-store.c (construct): Call
10504         camel_url_to_string with flags to hide password, authtype, and
10505         params to create the base_url.
10506         (etc): Update for the fact that the base_url no longer has the "/"
10507         at the end.
10508
10509         * camel-service.c (construct): Update calls to camel_url_to_string
10510         (pass CAMEL_URL_HIDE_PASSWORD)
10511
10512 2001-03-28  Jeffrey Stedfast  <fejj@ximian.com>
10513
10514         * camel-pgp-context.[c,h]: New class for PGP encrypting,
10515         decrypting, signing and verifying. Next I'll be moving the
10516         contents of mail/mail-crypto into Camel. These files will
10517         basically replace mail/openpgp-utils.[c,h].
10518
10519 2001-03-29  Not Zed  <NotZed@Ximian.com>
10520
10521         * camel-folder-search.c (search_body_contains): Optimise the match
10522         "" case, just match everything in the folder (if we have it).
10523
10524         * camel-vtrash-folder.c (vtrash_move_messages_to): Access the
10525         folder directly from the message info.
10526         (vtrash_move_messages_to): I think we also need to call the real
10527         move_messages_to, and not try and bypass the lock, since we dont
10528         have the lock for that folder.
10529
10530         * camel-vee-folder.h: Move CamelVeeMessageInfo to public, so
10531         subclasses can get to it.
10532
10533         * camel-vee-folder.c (camel_vee_folder_add_folder): Dont let you
10534         add a vfolder to itself.
10535         (folder_changed): 
10536         (vee_folder_remove_folder): 
10537         (vee_folder_build_folder): Copy changes before triggering changed
10538         events, so we can do them outside of locks.
10539         (camel_vee_folder_get_message_folder): Removed function.
10540         (camel_vee_folder_hash_folder): Made public (renamed from
10541         hash_folder), simply for subclasses (probably not needed).
10542         (vee_expunge): Oops, call the class sync, not superclass sync.
10543         (vee_sync): Remove some accidental debug.
10544
10545 2001-03-27  Jeffrey Stedfast  <fejj@ximian.com>
10546
10547         * camel-service.c (get_path): Add the port (if user defined) to
10548         the path to fix bug #1996.
10549
10550         Danw: I'm iffy on the "fix" so I'd like you to comment.
10551
10552 2001-03-27  Jeffrey Stedfast  <fejj@ximian.com>
10553
10554         * providers/pop3/camel-pop3-folder.c (pop3_sync): If we aren't
10555         going to even check the resp/free buffer that gets returned from
10556         camel_pop3_command, don't even bother using it. Send in NULL
10557         instead.
10558         (pop3_get_message): Check to make sure that the `result' string is
10559         non-NULL. It's possible that some POP servers may return with
10560         "+OK\r\n<message>..." rather than the expected 
10561         "+OK ### octets\r\n<message>..."
10562
10563 2001-03-27  Not Zed  <NotZed@Ximian.com>
10564
10565         * camel-folder-summary.c (camel_folder_summary_finalize): Unref
10566         the html filter when done.
10567         (summary_build_content_info): Disable using the html parser to
10568         help index html mails until it gets sorted out.
10569
10570         * camel-vee-folder.c (folder_changed): Fix a cut n paste bug, we
10571         want uid_removed not uid_changed deref, fixes bug #1999.
10572
10573 2001-03-27  Dan Winship  <danw@ximian.com>
10574
10575         * camel-sasl.c (camel_sasl_authtype_list): add an argument to say
10576         whether or not you want "PLAIN" in the list (so you don't end up
10577         with "Password" twice in the config dialog).
10578
10579         * providers/imap/camel-imap-provider.c (camel_provider_module_init): 
10580         * providers/imap/camel-imap-store.c (query_auth_types): We don't
10581         want PLAIN.
10582
10583         * providers/smtp/camel-smtp-provider.c (camel_provider_module_init): 
10584         * providers/smtp/camel-smtp-transport.c (query_auth_types): But we
10585         do.
10586
10587 2001-03-27  Dan Winship  <danw@ximian.com>
10588
10589         * camel-provider.h: Add an "extra_conf" field to CamelProvider
10590         with structures and defines and stuff, for providers to specify
10591         additional configuration options that they want. Also add a
10592         "supports ssl" flag to the provider flags.
10593
10594         * camel-url.c (camel_url_new_with_base): Fix parsing of params.
10595         (output_param): And unparsing...
10596
10597         * camel-remote-store.c: add a "default_ssl_port" field.
10598         (remote_construct): If the URL has the "use_ssl" parameter, set
10599         the store's use_ssl flag.
10600         (remote_connect): If using SSL and no port specified, use the
10601         default_ssl_port rather than the default_port.
10602
10603         * providers/smtp/camel-smtp-provider.c (smtp_provider): add
10604         CAMEL_PROVIDER_SUPPORTS_SSL and CAMEL_URL_ALLOW_USER. (The config
10605         gui code knows that the ALLOW_USER and ALLOW_AUTH go together.)
10606         (ssmtp_provider): gone
10607
10608         * providers/smtp/camel-smtp-transport.c (smtp_construct): Set a
10609         flag if "use_ssl" param is set.
10610         (smtp_connect): Check the CamelSmtpTransport use_ssl flag rather
10611         than checking if this is smtp or ssmtp.
10612
10613         * providers/imap/camel-imap-provider.c (imap_conf_entries): Add a
10614         bunch of IMAP-specific configuration options, like "check for new
10615         mail in all folders" (default TRUE), "show only subscribed
10616         folders" (default TRUE), "ignore server-supplied namespace", and
10617         "apply filters to INBOX" (not yet implemented).
10618         (imap_provider): We support SSL and we no longer allow a path in
10619         the URL. (namespace is handled via extra_conf)
10620         (simap_provider): Gone
10621
10622         * providers/imap/camel-imap-store.c (camel_imap_store_init): Set
10623         default_ssl_port, don't set CAMEL_STORE_SUBSCRIPTIONS here
10624         (construct): remove simap stuff, deal with "use_lsub",
10625         "namespace", "check_all", and "filter" parameters. Set base_url
10626         to not include params.
10627         (imap_store_setup_online): Don't ask for the namespace if it was
10628         set explicitly. Don't get subscribed folders if !use_lsub.
10629         (imap_concat): Fix a bug.
10630         (get_folder_info): Support for not checking all folders.
10631
10632         * providers/imap/camel-imap-folder.c (imap_get_full_name): Rewrite
10633         to use imap_store->namespace, not service->url->path
10634
10635         * providers/pop3/camel-pop3-provider.c (pop3_conf_entries): "keep
10636         on server" (currently still implemented by the mailer code, not
10637         here), "delete after N days" (not yet implemented).
10638         (pop3_provider): we support SSL
10639         (spop_provider): gone
10640
10641         * providers/pop3/camel-pop3-store.c (camel_pop3_store_init): Set
10642         default_ssl_port
10643         (pop3_connect): Remove spop code
10644
10645 2001-03-26  Jeffrey Stedfast  <fejj@ximian.com>
10646
10647         * camel-vee-folder.c (vee_folder_construct): Move all of the
10648         camel_vee_folder_construct() internals here.
10649         (camel_vee_folder_construct): This function basically becomes a
10650         wrapper for vee_folder_construct and also checks to make sure that
10651         the UNMATCHED vfodler is constructed otherwise constructs it.
10652         (camel_vee_folder_new): Call vee_folder_construct() instead so
10653         that we don't get into a dead-lock.
10654
10655 2001-03-26  Jeffrey Stedfast  <fejj@ximian.com>
10656
10657         * camel-store.c (init_trash): Use camel_vtrash_folder_new() to
10658         create the vtrash folder now.
10659
10660         * camel-vtrash-folder.[c,h]: New subclass of CamelVeeFolder for
10661         our vTrash folders.
10662
10663         * camel-folder.c (camel_folder_copy_messages_to): Don't watch for
10664         vtrash folders anymore.
10665         (camel_folder_move_messages_to): Same.
10666
10667         * camel-vee-folder.c (camel_vee_folder_class_init): Update.
10668         (vee_move_messages_to): Rewrite to use the new move API.
10669
10670         * camel-filter-driver.c (do_copy): Updated to reflect
10671         copy_message_to changes. Create a temporary uid array and use
10672         that.
10673         (do_move): Same.
10674         (camel_filter_driver_filter_message): And again, here...
10675
10676         * providers/imap/camel-imap-folder.c (imap_copy_messages_to):
10677         Update to the new API.
10678         (imap_move_messages_to): Same.
10679         (get_uid_set): New function to create a `set' string based on an
10680         array of UIDs for use with imap_copy_messages_to.
10681
10682         * camel-folder.c (camel_folder_copy_messages_to): Replaces
10683         camel_folder_copy_message_to
10684         (camel_folder_move_message_to): Replaces
10685         camel_folder_move_message_to.
10686
10687 2001-03-27  Not Zed  <NotZed@Ximian.com>
10688
10689         * camel-vee-store.c (vee_get_folder): Added folder_created event
10690         here.
10691         
10692         * camel-vee-folder.c (unmatched_finalise): Removed, moved into
10693         main finalise code.
10694         (message_changed): Just create a new change entry and promote it
10695         to a folder_changed thing.
10696         (vee_sync): Always rebuild folder on sync, even when not expunge.
10697         (folder_changed): If not autoupdating, make sure we remove any
10698         removed entries.
10699         (vee_folder_build_folder):
10700         (vee_folder_remove_folder): NOP if we're called on
10701         folder_unmatched.
10702         (vee_search_by_expression): Only search each folder once.  Should
10703         we also order the result in summary order?
10704
10705 2001-03-20  Not Zed  <NotZed@Ximian.com>
10706
10707         * camel-store.c (init_trash): Fix calling for vee_folder_new().
10708
10709         * camel-folder-summary.c (camel_folder_summary_remove_index):
10710         Optimise slightly, use ptr_array_remove_index rather than have to
10711         search for the index by using summary_remove.
10712
10713         * camel-vee-folder.h: Removed local member from VeeFolder, since
10714         it was never used.
10715
10716         * camel-vee-store.c (camel_vee_store_finalise): Setup finalise
10717         function.
10718
10719         * camel-vee-folder.c (camel_vee_folder_set_expression): New
10720         function to set the query of an existing vfolder.
10721         (camel_vee_folder_construct): New function for
10722         convenience/subclasses.
10723         (camel_vee_folder_new): Removed exception parameter, no longer
10724         needed (since we dont search yet).
10725         (camel_vee_folder_new): Changed to use folder_construct, and no
10726         longer raise the folder created signal.
10727         (vee_folder_build_folder): Make it return error on exception, so
10728         we can work without exceptions.
10729         (vee_folder_remove_folder): Use remove index rather than
10730         remove_uid, this is ok since we have the summary locked for our
10731         own access.
10732         (camel_vee_folder_add_folder): Only add the folder to the
10733         unmatched private if it is not a private folder.
10734         (camel_vee_folder_remove_folder): Only remove the folder from
10735         unmatched if it is not private.
10736         (vee_expunge): Just call sync with expunge set.
10737         (vee_sync): If expunging, also refresh the search.
10738         (vee_folder_build_folder): We do our own locking now, removed from
10739         callers, also trigger changed events here too (within locks),
10740         fixed callers appropriately.
10741         (vee_folder_remove_folder): Do our own locking, and trigger
10742         changed events.
10743         (vee_folder_add_info): Renamed of vee_folder_add, we now take a
10744         hash of the folder name, rather than use the folders address.
10745         (hash_folder): Convert a folder name into an 8 character hash.
10746         (vee_get_message, vee_search_by_expression, vee_set_message_flags,
10747         vee_set_message_user_flag, vee_move_message_to): Changed the uid
10748         to be an 8 byte hash + original uid, with no ':' anymore.
10749
10750 2001-03-26  Jeffrey Stedfast  <fejj@ximian.com>
10751
10752         * camel-mime-utils.c (header_decode_text): When writing the last
10753         token (if not rfc2047 encoded), don't use g_string_append_len, use
10754         append_latin1.
10755
10756         * camel-mime-message.c (write_to_stream): Don't spew a warning if
10757         the message-id wasn't set by the application, not a big deal since
10758         we create one right here.
10759
10760 2001-03-26  Dan Winship  <danw@ximian.com>
10761
10762         * providers/imap/camel-imap-command.c (camel_imap_command): keep a
10763         reference on the store's current_folder.
10764
10765         * providers/imap/camel-imap-store.c (camel_imap_store_finalize): 
10766         (imap_disconnect): unref the current_folder before clearing it.
10767
10768         * camel-url.c (camel_url_get_param): Add missing accessor.
10769
10770         * camel-session.c (camel_session_get_provider): New. Return
10771         the provider for a URL.
10772
10773 2001-03-25  Dan Winship  <danw@ximian.com>
10774
10775         * camel-url.c (camel_url_new_with_base): New URL parser with full
10776         RFC1808 relative URL support. Yum.
10777         (camel_url_new): Wrapper around camel_url_new_with_base now.
10778
10779         * tests/Makefile.am: add misc subdir
10780
10781         * tests/misc/url.c: relative URL test cases from RFC 1808
10782
10783 2001-03-25  Jeffrey Stedfast  <fejj@ximian.com>
10784
10785         * camel-filter-driver.c (do_copy): Don't use copy_to if the source
10786         folder doesn't support summary info's.
10787         (do_move): Same.
10788         (camel_filter_driver_filter_message): And again here.  I think
10789         this will fix the problem of "colour" tags not staying with the
10790         message when it's copied to a folder during the filter process.
10791
10792 2001-03-24  Jeffrey Stedfast  <fejj@ximian.com>
10793
10794         * camel-sasl-digest-md5.c (digest_response): Do charset conversion
10795         on the username param here if needed.
10796         (parse_server_challenge): Protect against possibly empty-string
10797         charset values.
10798
10799 2001-03-23  Jon Trowbridge  <trow@ximian.com>
10800
10801         * camel-filter-driver.c (camel_filter_driver_filter_message):
10802         Don't call camel_mime_message_set_identity.  (The call is
10803         commented out, left over from some earlier experimentation that I
10804         want to be able to remember later...)
10805
10806         * camel-mime-message.c (camel_mime_message_set_identity): Added.
10807         A function to set the X-Evolution-Identity header.
10808         
10809 2001-03-22  Dan Winship  <danw@ximian.com>
10810
10811         * providers/imap/camel-imap-command.c (imap_read_response): Don't
10812         look at untagged responses other than "* BYE"...
10813         (camel_imap_response_free): ...do it here instead...
10814         (camel_imap_response_free_without_processing): ...but not here.
10815
10816         * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
10817         Remove the "EXISTS" line from the response so
10818         camel_imap_response_free won't try to process it.
10819         (camel_imap_folder_selected): If we get an EXISTS response mixed
10820         in with the FETCH responses, record the new EXISTS value.
10821         Use camel_imap_response_free_without_processing so that an EXISTS
10822         response won't cause a loop.
10823         (imap_rescan): Use camel_imap_response_free_without_processing.
10824         (imap_update_summary): Use
10825         camel_imap_response_free_without_processing. If an EXISTS response
10826         shows up, call imap_update_summary again to get the new messages.
10827         (imap_protocol_get_summary_specifier): Use BODY.PEEK[0], not
10828         RFC822.HEADER for prev IMAP4rev1, since the FETCH parser won't
10829         deal with RFC822.HEADER responses.
10830
10831         * providers/imap/camel-imap-store.c (get_folder_info): Fix an
10832         uninitialized variable
10833
10834 2001-03-21  Dan Winship  <danw@ximian.com>
10835
10836         * camel-provider.h: (CamelProvider) add a "GList *authtypes", so
10837         you can get the list of authtypes used by a provider without
10838         needing to have an actual CamelService object handy. (Will be
10839         needed by the new config druid.)
10840         (CAMEL_PROVIDER_ALLOWS, CAMEL_PROVIDER_NEEDS): New macros to test
10841         the URL part stuff, since the way it works is too complicated and
10842         everyone always does it wrong.
10843
10844         * camel-service.c (camel_service_query_auth_types): Remove the
10845         @connected arg again: if you don't want to connect, you can just
10846         get the list of authtypes off the provider.
10847         (camel_service_free_auth_types): Remove this. All existing
10848         implementations do authtypes the same way, so just say the caller
10849         should "g_list_free" the list. (Oh, look, removing this function
10850         doesn't actually cause the mailer to not build. How 'bout that.)
10851         (construct, get_path): Use the new URL part macros.
10852
10853         * camel-remote-store.c (remote_query_auth_types): Update
10854         (remote_free_auth_types): Nuke
10855         (camel_remote_store_authtype_list): New function for use by
10856         subclasses.
10857
10858         * providers/imap/camel-imap-provider.c:
10859         * providers/pop3/camel-pop3-provider.c:
10860         * providers/smtp/camel-smtp-provider.c: Update CamelProvider
10861         structures.
10862         (camel_provider_module_init): Put all the SSL parts together so
10863         there's only 1 #ifdef. Set up the provider authtypes field using
10864         the SASL, CamelRemoteStore, and standard authtypes, as
10865         appropriate. Copy that from the normal provider to the SSL
10866         provider.
10867
10868         * providers/local/camel-local-provider.c:
10869         * providers/sendmail/camel-sendmail-provider.c:
10870         * camel-session.c: Update CamelProvider structures.
10871
10872         * providers/imap/camel-imap-store.c (query_auth_types):
10873         * providers/pop3/camel-pop3-store.c (query_auth_types): Update
10874
10875         * providers/smtp/camel-smtp-store.c (query_auth_types): Update.
10876         Remove the no_authtype, because that's what "ALLOW_AUTH" rather
10877         than "NEED_AUTH" means.
10878         (free_auth_types): Nuke.
10879
10880 2001-03-21  Jeffrey Stedfast  <fejj@ximian.com>
10881
10882         * camel-filter-driver.c (camel_filter_driver_filter_message):
10883         Return -1 on fail.
10884         (camel_filter_driver_filter_folder): Same.
10885         (camel_filter_driver_filter_mbox): Same.
10886         (camel_filter_driver_filter_folder): Return -1 if an exception was
10887         set as well.
10888
10889 2001-03-19  Jeffrey Stedfast  <fejj@ximian.com>
10890
10891         * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_finalize):
10892         Free the expected host.
10893         (camel_tcp_stream_openssl_new): Now takes a Service and an
10894         expected_host. Set them.
10895
10896 2001-03-20  Dan Winship  <danw@ximian.com>
10897
10898         * providers/imap/camel-imap-store.c
10899         (camel_imap_store_check_online): Function to check if the store is
10900         online and set an exception if not. Currently controlled by an
10901         environment variable, but eventually there will be both a global
10902         (session-level) setting and a per-store setting.
10903         (construct): Set up storage_path and base_url here rather than at
10904         connect-time.
10905         (imap_auth_loop): Split out from imap_connect.
10906         (imap_setup_online): Split out from imap_connect. Do the
10907         post-authentication connection setup, and cache the results to
10908         disk.
10909         (imap_setup_offline): Set up a CamelImapStore with information
10910         saved from a previous imap_setup_online.
10911         (imap_connect): If online, do connect_to_server(),
10912         imap_auth_loop(), and imap_setup_online(). Otherwise, do
10913         imap_setup_offline().
10914         (get_folder, get_folder_info): Add offline support.
10915         (create_folder, subscribe_folder, unsubscribe_folder): Disable
10916         these when offline (for now).
10917
10918         * providers/imap/camel-imap-folder.c (camel_imap_folder_new):
10919         Remove the sync'ing-with-server stuff... it's done by
10920         camel_imap_folder_selected now, which only gets called if the
10921         store is online.
10922         (camel_imap_folder_selected): add the code removed from
10923         camel_imap_folder_new. Besides simplifying the folder_new and
10924         summary_new code, this also means now that we'll DTRT if a
10925         folder's UIDVALIDITY changes while we're connected. Also, when
10926         that happens, clear the message cache explicitly.
10927         (imap_refresh_info, imap_sync): These are no-ops when offline.
10928         (imap_expunge, imap_append_message, imap_copy_message_to,
10929         imap_search_by_expression): These don't yet work offline.
10930         (imap_get_message, camel_imap_folder_fetch_data): Return an error
10931         when trying to fetch a non-cached body part when we're offline.
10932
10933         * providers/imap/camel-imap-summary.c (camel_imap_summary_new):
10934         Rewrite to not check the validity here. (We'll do it from
10935         camel_imap_folder_selected instead.)
10936
10937         * providers/imap/camel-imap-command.c (camel_imap_command): Call
10938         camel_imap_folder_selected even when the selection is all we're
10939         doing, to match the changes in camel-imap-folder.c.
10940
10941         * providers/imap/camel-imap-message-cache.c
10942         (camel_imap_message_cache_clear): New function to clear out a
10943         message cache.
10944
10945 2001-03-19  Christopher James Lahey  <clahey@ximian.com>
10946
10947         * Makefile.am (INCLUDES): Added $(EXTRA_GNOME_CFLAGS)
10948
10949 2001-03-19  Jeffrey Stedfast  <fejj@ximian.com>
10950
10951         * providers/pop3/camel-pop3-store.c (pop3_connect): Set the errbuf
10952         to NULL after freeing it? I don't think this should fix bug #1801
10953         but I guess it can't hurt.
10954
10955 2001-03-18  Jeffrey Stedfast  <fejj@ximian.com>
10956
10957         * camel-remote-store.c (remote_recv_line): Protect against a
10958         possibly NULL exception.
10959
10960         * camel-filter-driver.c (camel_filter_driver_filter_message):
10961         Document and modify to return a boolean value denoting whether or
10962         not errors occured during processing.
10963         (camel_filter_driver_filter_mbox): Same as above and also modified
10964         to check return codes of filter_message rather than relying only
10965         on whether or not the exception was set (as it's possible to pass
10966         in NULL for the exception).
10967         (camel_filter_driver_filter_folder): Same as above.
10968
10969         * camel-mime-utils.c (header_param_list_format_append): Quote the
10970         param value if it contains whitespace as well.
10971
10972 2001-03-17  Jeffrey Stedfast <fejj@ximian.com>
10973
10974         * Makefile.am: Don't include system include dir.
10975
10976         * camel.c: Use quotes around the nss.h include so it doesn't try
10977         to use the systen nss.h file.
10978
10979         * camel-tcp-stream-ssl.c: Same here.
10980
10981 2001-03-17  Not Zed  <NotZed@Ximian.com>
10982
10983         * providers/local/camel-maildir-summary.c (maildir_summary_sync): 
10984         Modified patch from Dan Berger <dberger@ix.netcom.com> to re-check
10985         the maildir directory for new/updated messages at sync time.
10986
10987         * camel-folder.c (camel_folder_ref_message_info): Implemented.
10988         (ref_message_info): And default implementation.
10989
10990         * camel-folder.h: Added ref_message_info virtual method.
10991
10992 2001-03-16  Not Zed  <NotZed@Ximian.com>
10993
10994         * camel-folder-thread.c
10995         (camel_folder_thread_messages_new_summary): New function to create
10996         a thread tree from a supplied summary array.
10997         (camel_folder_thread_messages_destroy): Handle thread trees
10998         generated by the above function properly.
10999
11000 2001-03-16  Jeffrey Stedfast  <fejj@ximian.com>
11001
11002         * camel-private.h: Same.
11003
11004         * camel-remote-store.h: Fixed #include to use <>'s instead of ""'s
11005
11006 2001-03-16  Jeffrey Stedfast  <fejj@ximian.com>
11007
11008         * camel-tcp-stream-ssl.c (ssl_bad_cert): Print info about the
11009         issuer of the certificate.
11010
11011         * providers/smtp/camel-smtp-transport.c (smtp_connect): Use
11012         camel_tcp_stream_get_socket().
11013
11014         * camel-tcp-stream-openssl.c (stream_get_socket): Implemented.
11015
11016         * camel-tcp-stream-ssl.c (stream_get_socket): Implemented.
11017
11018         * camel-tcp-stream-raw.c (stream_get_socket): Implemented.
11019
11020         * camel-tcp-stream.c (camel_tcp_stream_get_socket): New function.
11021
11022 2001-03-16  Kjartan Maraas  <kmaraas@gnome.org>
11023
11024         * providers/pop3/camel-pop3-folder.c: Added #include <config.h>
11025
11026 2001-03-16  Dan Winship  <danw@ximian.com>
11027
11028         * camel-mime-utils.c (header_msgid_generate): Don't use
11029         getdomainname: it's NIS crap, not DNS.
11030
11031 2001-03-15  Jeffrey Stedfast  <fejj@ximian.com>
11032
11033         * camel.c (camel_init): Don't use the hardcoded cert db directory,
11034         use the one passed in.
11035
11036         * camel-tcp-stream-ssl.c (ssl_get_client_auth): Wrote the default
11037         implementation. Not that we'll use this though, since this is the
11038         default implementation provided by NSS anyway. This more or less
11039         serves as a reference in case we want to change anything.
11040         (ssl_auth_cert): Same.
11041         (ssl_bad_cert): Changed the prompt string and free it when we're
11042         done.
11043
11044 2001-03-15  Dan Winship  <danw@ximian.com>
11045
11046         First batch of disconnected IMAP-related stuff. This adds local
11047         caching of message parts, but NOT any actual disconnected support.
11048         (But it should speed up IMAP use.)
11049
11050         * providers/imap/camel-imap-message-cache.c: New class for caching
11051         message data to disk, and removing it when it's no longer
11052         relevant. Will eventually also support merging message parts
11053         together to save on files. Or maybe using a db instead of files?
11054
11055         * providers/imap/camel-imap-private.h: Add a cache_lock to
11056         CamelImapFolderPrivate. This lock must be recursive, so make both
11057         locks EMutexes rather than GMutex.
11058
11059         * providers/imap/camel-imap-folder.c (parse_fetch_response): "The
11060         only FETCH response parser you need!" Replaces the various
11061         almost-correct bits of code formerly scattered throughout this
11062         file with a single fully-correct function that can handle any
11063         FETCH response at any time, so we don't get confused by seeing a
11064         flags update when we were only expecting a message body, etc.
11065         (camel_imap_folder_fetch_data): FETCH a message body part either
11066         from the cache or the server
11067         (camel_imap_folder_changed): Remove expunged messages from the
11068         message cache.
11069         (camel_imap_folder_new): Change to take a directory instead of a
11070         summary file name. Create a CamelImapMessageCache for the folder.
11071         (imap_finalize): Unref the message cache.
11072         (camel_imap_folder_selected, imap_rescan, get_content,
11073         get_message, imap_get_message, imap_update_summary): Redone a
11074         bunch to use parse_fetch_data, CamelImapMessageCache, etc.
11075
11076         * providers/imap/camel-imap-store.c (get_folder): Pass directory
11077         name to camel_imap_folder_new, not summary filename. Use
11078         e_path_to_physical to generate a path with /subfolders/ inserted
11079         between directory components.
11080
11081         * providers/imap/camel-imap-wrapper.c (camel_imap_wrapper_new):
11082         Call camel_imap_folder_fetch_data (with cache_only TRUE) and if
11083         the data is cached, return an online datawrapper rather than an
11084         offline one.
11085         (write_to_stream): Use camel_imap_folder_fetch_data (with
11086         cache_only FALSE) here too
11087
11088         * providers/imap/camel-imap-utils.c (imap_skip_list): Renamed from
11089         skip_list and made non-static.
11090
11091 2001-03-15  Jeffrey Stedfast  <fejj@ximian.com>
11092
11093         * camel-tcp-stream-ssl.h: Uninclude prnetdb.h since it's not
11094         needed here.
11095
11096         * providers/smtp/camel-smtp-transport.c: #include prnetdb.h here
11097         instead of making camel-tcp-stream-ssl.h include it. Prevents some
11098         header bloat.
11099
11100         * providers/smtp/Makefile.am: Include the NSPR_CFLAGS and
11101         NSS_CFLAGS.
11102
11103 2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>
11104
11105         * providers/smtp/camel-smtp-transport.c (smtp_connect): Update for
11106         using CamelTcpStreams and also for using SSL.
11107
11108         * providers/smtp/libcamelsmtp.urls: defined "ssmtp"
11109
11110         * providers/smtp/camel-smtp-provider.c: Defined the Secure SMTP
11111         provider.
11112         (camel_provider_module_init): Register the Secure SMTP provider.
11113
11114 2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>
11115
11116         * providers/imap/camel-imap-store.c (imap_connect): Check for
11117         "simap" instead of "imaps".
11118
11119         * providers/pop3/camel-pop3-store.c (pop3_connect): Change the
11120         port to be 995 for spop.
11121
11122         * providers/pop3/libcamelpop3.urls: Change to "spop".
11123
11124         * providers/imap/libcamelimap.urls: Change "imaps" to "simap" to
11125         correspond to /etc/services.
11126
11127 2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>
11128
11129         * providers/pop3/camel-pop3-store.c (pop3_connect): Check to see
11130         if we are using "pops" and then set the appropriate SSL settings.
11131
11132         * providers/pop3/libcamelpop3.urls: Add "pops"
11133
11134         * providers/pop3/camel-pop3-provider.c: Defined the pops provider.
11135         (camel_provider_module_init): Register the pops provider.
11136
11137 2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>
11138
11139         * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_new): Ya know what?
11140         Lets not ref the service because otherwise we'll start having the
11141         same problems we had back with vtrash. Besides, since the store
11142         owns the stream, it's not like the store is going anywhere without
11143         the stream anyway.
11144         (camel_tcp_stream_ssl_finalize): No need to unref the service.
11145
11146 2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>
11147
11148         * camel-remote-store.c (remote_connect): Pass the service into the
11149         SSL stream, not the session.
11150
11151         * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_init): Set the
11152         service to NULL.
11153         (camel_tcp_stream_ssl_finalize): Unref the service.
11154         (camel_tcp_stream_ssl_new): Takes a CamelService arg now rather
11155         than a CamelSession arg.
11156
11157 2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>
11158
11159         * camel.c (camel_init): So it turns out that NSS_Init *isn't*
11160         idempotent, so we have to protect against initializing it more
11161         than once(contrary to what their design specs suggest).
11162
11163         * camel-session.c (camel_session_get_service): Use
11164         camel_exception_is_set() - Makes no difference but it's more
11165         consistant with how we normally do it.
11166
11167         * camel-provider.h (CAMEL_URL_ALLOW_SSL): We don't need this.
11168
11169         * providers/imap/camel-imap-provider.c: Define the imaps provider.
11170         (camel_provider_module_init): Register the imaps provider.
11171
11172         * camel-provider.c (camel_provider_init): Only add the protocol to
11173         the hash table if it's non empty. Also, g_strdup() the filename
11174         into the hash table.
11175
11176         * providers/imap/camel-imap-store.c (camel_imap_store_init): Eek!
11177         So the service's URL isn't set until after this is
11178         initialized. This means we can't check for SSL here.
11179         (imap_connect): Set the SSL options here instead.
11180
11181 2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>
11182
11183         * camel-tcp-stream-ssl.c: Numerous fixes to get it to build
11184         correctly with NSS enabled.
11185
11186         * camel-remote-store.c (remote_connect): Pass in the session and
11187         expected host args, oops.
11188
11189         * camel-provider.h (CAMEL_URL_ALLOW_SSL): Defined.
11190
11191         * providers/imap/camel-imap-store.c (camel_imap_store_init): Check
11192         to see if we are supposed to use SSL and set the options
11193         accordingly.
11194         (imap_connect): Return FALSE here instead of NULL.
11195
11196         * providers/imap/camel-imap-provider.c: Add CAMEL_URL_ALLOW_SSL.
11197
11198         * providers/imap/libcamelimap.urls: Add "imaps" which is the
11199         protocol for Secure IMAP.
11200
11201 2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>
11202
11203         * camel-tcp-stream-openssl.[c,h]: Added
11204
11205         * Makefile.am: Added camel-tcp-stream-openssl.[c,h] to the build.
11206
11207         * camel-types.h: Added CamelTcpStreamSSL and CamelTcpStreamOpenSSL
11208
11209 2001-03-14  Not Zed  <NotZed@Ximian.com>
11210
11211         * camel-mime-filter-charset.c (filter, complete): re-constify
11212         inbuf, to remove a warning.
11213
11214         * camel-mime-parser.c (folder_scan_step): When we're out of data,
11215         run the filter_complete.  For some reason the logic that was there
11216         was never being run, always try it now, i think it was to work
11217         around a buggy filter, rather than fix it the right way.
11218
11219         * camel-folder-summary.c (summary_build_content_info): If indexing
11220         html parts, use the html filter to convert it to some indexable
11221         format.
11222         (summary_build_content_info): Reset the filters before adding them
11223         back to the stream, if they get re-used in a given instance
11224         (likely).
11225
11226         * Makefile.am (libcamelinclude_HEADERS): Added
11227         camel-mime-filter-html.[ch].
11228         (INCLUDES): Added xml clags
11229
11230 2001-03-05  Not Zed  <NotZed@Ximian.com>
11231
11232         * camel-folder-search.c (camel_folder_search_class_init): Setup a
11233         new function, "uid" which matches uids.
11234         (search_uid): Implement the "match uid" command.
11235
11236 2001-03-13  Jeffrey Stedfast  <fejj@ximian.com>
11237
11238         * camel-mime-utils.c: Check for a new type of mailing list header.
11239
11240 2001-03-13  Jeffrey Stedfast  <fejj@ximian.com>
11241
11242         * camel-tcp-stream-raw.c (stream_read): Made cancellable.
11243         (stream_write): Same.
11244         (stream_connect): Removed checks for DIVINE_INTERVENTION as the
11245         code worked fine.
11246
11247         * camel-tcp-stream-ssl.c (stream_write): get rid of 'w' as it
11248         wasn't really needed.
11249         (set_errno): New function to set errno based on the NSPR error
11250         code.
11251         (stream_read): If an error occured, call set_errno().
11252         (stream_write): Same.
11253
11254 2001-03-13  Jeffrey Stedfast  <fejj@ximian.com>
11255
11256         * Makefile.am: Added camel-tcp-stream-ssl to the build.
11257
11258         * camel-remote-store.h: Add a use_ssl member to the
11259         CamelRemoteStore object.
11260
11261 2001-03-13  Jeffrey Stedfast  <fejj@ximian.com>
11262
11263         * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_get_type):
11264         Oops. Make this a subclass of CamelTcpStream, not CamelStream.
11265
11266         * camel-types.h: Add the defs for CamelTcpStream and
11267         CamelTcpStreamRaw
11268
11269         * Makefile.am: Add camel-tcp-stream and camel-tcp-stream-raw to
11270         the build.
11271
11272         * camel-remote-store.c (remote_connect): Update to use
11273         CamelTcpStreams.
11274
11275         * camel-tcp-stream-raw.c (stream_connect): Made cancellable by
11276         copying the currently used code in camel-remote-store.c.
11277         (stream_setsockopt): Oops, flags = fcntl (..., GET_FL);
11278         (camel_tcp_stream_raw_get_type): Oops. Make this a subclass of
11279         CamelTcpStream, not CamelStream.
11280
11281 2001-03-13  Jeffrey Stedfast  <fejj@ximian.com>
11282
11283         * camel.c (camel_init): Since all of the Mozilla libs (including
11284         NSPR and NSS) correctly handle reinitializations, we might as well
11285         init both NSPR and NSS in camel_init so we can be sure of that
11286         these libs have been initialized.
11287         (camel_shutdown): New function to call the NSS cleanup stuff.
11288
11289 2001-03-13  Jeffrey Stedfast  <fejj@ximian.com>
11290
11291         * camel-folder.c (camel_folder_copy_message_to): Don't allow the
11292         user to copy a message to or from the vtrash folder. Set an
11293         exception if they try.
11294         (camel_folder_move_message_to): This one is a bit more
11295         complicated: 1) If the user tried to move a message from the
11296         vtrash into the original folder, just undelete the message. 2) If
11297         the user tries to move the message to the vtrash folder, then just
11298         mark the message as deleted. 3) If the user tries to move the
11299         message from the vTrash to a folder other than the original, use
11300         the original folder as the source. As another optimization, I've
11301         made it so that if the user tries to move a message to the same
11302         folder, just no-op.
11303         (move_message_to): Unset the deleted flag before moving (assuming
11304         it's there).
11305         (copy_message_to): Same.
11306
11307         * camel-vee-folder.c (camel_vee_folder_get_message_folder): New
11308         convenience function to get the folder from which the message uid
11309         is derived from.
11310
11311 2001-03-13  Dan Winship  <danw@ximian.com>
11312
11313         * providers/imap/camel-imap-store.c (imap_connect): When trying
11314         again after a failed password attempt, check if the connection got
11315         dropped (which Courier will do) and deal accordingly.
11316
11317         * providers/sendmail/camel-sendmail-transport.c (sendmail_send_to,
11318         sendmail_send): More fixing for exim: It can't deal with "-tif",
11319         you need to say "-t -i -f".
11320
11321 2001-03-12  Jeffrey Stedfast  <fejj@ximian.com>
11322
11323         * camel-store.c (init_trash): Rename the folder to "Trash" and
11324         i18nify it.
11325
11326 2001-03-09  Jeffrey Stedfast  <fejj@ximian.com>
11327
11328         * camel-tcp-stream-ssl.h: Comment out everything unless HAVE_NSS
11329         is defined.
11330
11331         * camel-tcp-stream-ssl.c (stream_read): Don't use errno, use
11332         nspr's error code stuff.
11333         (stream_write): Same.
11334
11335 2001-03-09  Jeffrey Stedfast  <fejj@ximian.com>
11336
11337         * camel-session.c (camel_session_query_authenticator): Created a
11338         new mode (CAMEL_AUTHENTICATOR_ACCEPT) which is a Yes/No prompt to
11339         the user. This will be needed by the SSL/TLS code to come. Also
11340         changed the return value to a gpointer rather than a char* to
11341         allow the returning of TRUE/FALSE values.
11342
11343         * camel.c: Wrap stuff with HAVE_NSS
11344
11345 2001-03-09  Dan Winship  <danw@ximian.com>
11346
11347         * providers/sendmail/camel-sendmail-transport.c (sendmail_send,
11348         sendmail_send_to): Remove the "-U" for now, because it breaks
11349         exim's "sendmail" wrapper. (And it doesn't actually do all that
11350         much to sendmail's behavior, and it was working fine before
11351         anyway.)
11352
11353         * camel-mime-utils.c (header_fold): Fix a bug that could make this
11354         walk off the end of a string. (The bug has been there since
11355         December... maybe this will fix some unreproduceable crashes?)
11356
11357 2001-03-08  Jeffrey Stedfast  <fejj@ximian.com>
11358
11359         * camel-store.c (camel_store_get_folder): Changes so that the
11360         folder gets added to the vtrash reguardless of whether or not the
11361         store is holding it's own folder lookup hash.
11362         (init_trash): Oops, lets try locking the cache before we go and
11363         add all the cached folders to the vtrash.
11364
11365 2001-03-08  Jeffrey Stedfast  <fejj@ximian.com>
11366         These fixes make it so that the CamelStore does not actually hold
11367         a ref on it's vTrash folder. The vTrash folder is now created ONLY
11368         when it is requested. This solves the problem of not being able to
11369         unref a Store and have it disconnect/finalize like we expect it to.
11370
11371         * camel-store.c (init_trash): When we create the vtrash, add all
11372         previously opened folders to it and hook on to the finalize event
11373         so that we can then set the store->vtrash to NULL.
11374         (get_trash): If a vtrash folder for the store doesn't exist,
11375         init_trash() and then try.
11376         (construct): No longer need this.
11377         (camel_store_class_init): Don't override the construct method.
11378         (camel_store_finalize): We no longer hold a ref on the vtrash so
11379         don't unref it.
11380
11381 2001-03-07  Jeffrey Stedfast  <fejj@ximian.com>
11382
11383         * providers/pop3/camel-pop3-store.c (init_trash): Implement.
11384         (get_trash): Implement.
11385         (camel_pop3_store_class_init): Override the default init_trash and
11386         get_trash virtual functions. Hopefully this should fix the problem
11387         of pop3 sotre's not disconnecting after the send&recv code
11388         finishes downloading mail.
11389
11390         Wonder if I should override the default implementation for the
11391         mbox, mh, and maildir too?
11392
11393 2001-03-07  Dan Winship  <danw@ximian.com>
11394
11395         * camel-remote-store.c (camel_remote_store_connected): Return the
11396         return value of camel_service_connect rather than returning
11397         !camel_exception_is_set(), since that will be wrong if ex==NULL...
11398         Fixes a crash in the IMAP keepalive code, but this same problem
11399         probably exists in other places too...
11400         (remote_recv_line): Fix another problem...
11401
11402         * providers/local/camel-mbox-provider.c:
11403         * providers/vee/.cvsignore:
11404         * providers/vee/libcamelvee.urls: Remove some unused stuff
11405         
11406 2001-03-06  Jeffrey Stedfast  <fejj@ximian.com>
11407
11408         * camel-sasl-digest-md5.c (compute_response): Redone so as to save
11409         on memory allocations and speed.
11410
11411 2001-03-05  Jeffrey Stedfast  <fejj@ximian.com>
11412
11413         * camel-sasl-plain.c (plain_challenge): Don't return NULL if the
11414         token is non-NULL. This is why:
11415
11416         sending : AUTH PLAIN
11417         received: 334 ok. go on.                 <-- this is why
11418         sending : ZGZPaQpAZ214Lm5ldBBnb29jYXI=
11419         received: 235 {mp005-rz3} go ahead
11420
11421         * camel-sasl.c (camel_sasl_authtype): Add the PLAIN type here.
11422         (camel_sasl_authtype_list): And here too.
11423
11424         * camel-sasl-plain.c: Initialize the camel_sasl_plain_authtype.
11425
11426         * camel-sasl-plain.h: extern the camel_sasl_plain_authtype.
11427
11428 2001-03-05  Jeffrey Stedfast  <fejj@ximian.com>
11429
11430         * providers/imap/camel-imap-store.c (imap_connect): i18n'd some
11431         strings in here.
11432
11433         * providers/smtp/camel-smtp-transport.c (smtp_connect): Keep
11434         trying to authenticate until either we succeed or until the user
11435         cancels.
11436
11437 2001-03-04  Jeffrey Stedfast  <fejj@ximian.com>
11438
11439         * camel-mime-utils.c: Wrote a new version of header_fold() that
11440         takes a 'force' option and uses another new function called
11441         header_fold_next_space() in place of strchr(inptr, ' ') to get the
11442         next whitespace char. The idea of header_fold_next_space() is to
11443         not treat spaces between a set of quotes as a space - this way it
11444         will be possible to fold (for example) the Content-Type MIME
11445         header without worrying about breaking up a boundary string.
11446         Note: This code is #if 0'd out until Zucchi approves of the patch.
11447         Another Note: We will probably still want to use the "don't fold
11448         this header" hash lookup for headers like the Message-Id and
11449         possibly a few others.
11450
11451 2001-03-04  Jeffrey Stedfast  <fejj@ximian.com>
11452
11453         * camel-internet-address.c
11454         (camel_internet_address_encode_address): Make sure there is a
11455         space between the name and the address tokens.
11456
11457         * camel-mime-utils.c (rfc2047_decode_word): encoded string
11458         segments need to be at least 8 chars (7 doesn't leave room for an
11459         ecoding value. To be more realistic, even 8 chars isn't enough as
11460         this assumes there is no charset nor any encoded text. If the
11461         encoding value is not 'Q' or 'B', then return NULL. This fixes bug
11462         #1689.
11463
11464 2001-03-03  Not Zed  <NotZed@Ximian.com>
11465
11466         * camel-vee-folder.c (vee_folder_remove_folder): New function to
11467         remove a folder from a vfolder.
11468         (camel_vee_folder_remove_folder): New public function to remove a
11469         folder from a vfolder.
11470
11471 2001-03-02  Jeffrey Stedfast  <fejj@ximian.com>
11472
11473         * providers/smtp/camel-smtp-provider.c: Doh! Set the
11474         CAMEL_URL_ALLOW_AUTH flag.
11475
11476         * providers/smtp/camel-smtp-transport.c (get_smtp_error_string):
11477         Updated with the extended AUTH return codes.
11478
11479 2001-03-02  Jeffrey Stedfast  <fejj@ximian.com>
11480         
11481         * providers/imap/camel-imap-store.c (try_auth): Don't forget to
11482         unref the SASL object.
11483
11484         * providers/smtp/camel-smtp-transport.c (query_auth_types):
11485         Implemented.
11486         (smtp_auth): Implemented.
11487         (smtp_helo): Don't bother parsing the authtypes if we already have
11488         them.
11489         (smtp_connect): call smtp_auth() here if we found any authtypes.
11490         (smtp_disconnect): Updated as I now use a hash table for the
11491         supported authtypes rather than a linked list.
11492         (esmtp_get_authtypes): modify to use a hash table instead of a
11493         linked list and also use isspace() rather than == ' '.
11494
11495 2001-03-02  Dan Winship  <danw@ximian.com>
11496
11497         * providers/sendmail/camel-sendmail-transport.c (sendmail_send_to,
11498         sendmail_send): Use "-f" to set the envelope from address so
11499         bounces go to the right place. Also, pass "-U" since the man page
11500         says we're supposed to...
11501
11502 2001-03-01  Jeffrey Stedfast  <fejj@ximian.com>
11503         
11504         * camel-sasl.c: #include "camel-sasl-digest-md5.h"
11505         (camel_sasl_authtype_list): add DIGEST-MD5 stuff here.
11506         (camel_sasl_authtype): And here too.
11507         (camel_sasl_new): And here...
11508
11509         * camel-sasl-digest-md5.[c,h]: new SASL class for DIGEST-MD5 (has
11510         been tested and proven to work).
11511
11512 2001-03-01  Dan Winship  <danw@ximian.com>
11513
11514         * camel-sasl.c (camel_sasl_challenge): Take a GByteArray as input
11515         as well. Comment that you can pass %NULL for @token to get the
11516         initial auth data for mechanisms that are client-initiated.
11517         (camel_sasl_challenge_base64): Convenience function for protocols
11518         that use base64-encoded SASL.
11519         (camel_sasl_authenticated): Implement this... (it was prototyped
11520         already)
11521         (camel_sasl_new): Function to take a service name, a mechanism
11522         name, and a CamelService, and return a CamelSasl for it.
11523         (camel_sasl_authtype, camel_sasl_authtype_list): Functions to
11524         return CamelServiceAuthType information about SASL mechanisms, to
11525         allow providers to deal with them generically.
11526
11527         * camel-sasl-anonymous.c, camel-sasl-plain.c: Update/simplify for
11528         CamelSasl changes. Both of these are single-round
11529         (client-initiated) mechanisms, so they don't need to keep state.
11530         (camel_sasl_plain_new): Removed; use camel_sasl_new instead.
11531         (Can't get rid of camel_sasl_anonymous_new though...)
11532
11533         * camel-sasl-cram-md5.c: Update/simplify for CamelSasl changes.
11534         (camel_sasl_cram_md5_new): Removed; use camel_sasl_new instead.
11535         (cram_md5_challenge): Use md5_get_digest where possible, and
11536         various other minor simplifications. CRAM-MD5 only has a single
11537         round, so there's no need to keep track of state. This code is now
11538         tested (against Cyrus IMAPd) and known to work.
11539
11540         * camel-sasl-kerberos4.h: Update/simplify for CamelSasl changes.
11541         Make only a single #ifdef HAVE_KRB4. Remove stuff from priv that
11542         isn't needed between rounds.
11543         (camel_sasl_kerberos4_new): Removed; use camel_sasl_new instead
11544         (krb4_challenge): Fix up the logic I broke in my previous "at
11545         least make it compile" fixes, update to match other changes, and
11546         remove IMAP-isms that shouldn't be in the generic code. This still
11547         isn't tested, because we're stuck behind a NAT right now...
11548
11549         * providers/imap/camel-imap-store.c: Add an "authtypes" hash table
11550         to CamelImapStore recording the supported authtypes.
11551         (connect_to_server): Record supported authtypes in the authtypes
11552         hash rather than the capabilities bitmask, since now the IMAP code
11553         is no longer responsible for keeping track of which authtypes we
11554         support.
11555         (query_auth_types): Use camel_sasl_authtype_list to get the
11556         SASL-supported authtypes.
11557         (try_auth): New function to try a SASL auth mechanism. Sort of
11558         formerly imap_try_kerberos_v4_auth.
11559         (imap_connect): Get rid of the krb4-specific bits and genericize
11560         them for any SASL authtype.
11561
11562         * providers/imap/Makefile.am: Remove camel-imap-auth.[ch] (moved
11563         into camel-imap-store.c since it's now constant size) and the
11564         KRB4_CFLAGS and KRB4_LDFLAGS references.
11565
11566 2001-03-01  Jeffrey Stedfast  <fejj@ximian.com>
11567
11568         * camel-sasl-anonymous.c (anon_challenge): Don't base64 encode the
11569         data, leave that up to the provider to do if it needs to. Also
11570         save on some memory allocations and stuff.
11571
11572         * camel-sasl-cram-md5.c (cram_md5_challenge): Same here. Also get
11573         rid of the need for the temp buf as we can just write it to the
11574         GByteArray.
11575
11576 2001-03-02  Not Zed  <NotZed@Ximian.com>
11577
11578         * camel-mime-utils.c (rfc2047_encode_word, rfc2047_decode_word):
11579         Reconstify variables to match iconv.
11580
11581         * camel-search-private.c (camel_ustrstrcase): Change some
11582         assertions back into valid returns.
11583
11584 2001-03-01  Dan Winship  <danw@ximian.com>
11585
11586         * Makefile.am (libcamel_la_LIBADD, INCLUDES): camel depends on
11587         krb4 now (where available), for camel-sasl-kerberos4.c
11588
11589         * camel-sasl-kerberos4.[ch]: Make this at least compile. Dunno if
11590         it works yet.
11591
11592 2001-03-01  Peter Williams  <peterw@ximian.com>
11593
11594         * camel-url.c (camel_url_new): Assert url_string != NULL.
11595
11596 2001-02-28  Jeffrey Stedfast  <fejj@ximian.com>
11597
11598         * Makefile.am: Added camel-sasl-anonymous.[c,h] to the build.
11599
11600         * camel-sasl-anonymous.[c,h]: new SASL class for ANONYMOUS
11601
11602         * camel-sasl-plain.c (plain_challenge): Oops, have a state for
11603         setting sasl->authenticated = TRUE;
11604
11605         * camel-sasl-cram-md5.c (cram_md5_challenge): Same here.
11606
11607 2001-02-28  Jeffrey Stedfast  <fejj@ximian.com>
11608
11609         * camel-mime-utils.c (header_decode_date): A fix for broken
11610         mailers that send 2-digit years (ie "Wed, 28 Feb 01
11611         04:59:41"). Fixes bug #1633.
11612
11613         * camel-filter-driver.c (camel_filter_driver_filter_folder): Check
11614         to make sure message isn't NULL.
11615
11616 2001-02-28  Dan Winship  <danw@ximian.com>
11617
11618         * camel-remote-store.c (remote_recv_line): If we get back 0 bytes
11619         from camel_stream_buffer_gets, that means the socket got
11620         disconnected, so set an exception. (Noticed because of a message
11621         that crashes our IMAP server when you try to look at it. :)
11622
11623 2001-02-28  Jeffrey Stedfast  <fejj@ximian.com>
11624
11625         * Makefile.am: Added camel-sasl*.[c,h] to the build.
11626
11627         * camel-sasl.[c,h]: new "abstract" SASL class
11628
11629         * camel-sasl-kerberos4.[c,h]: new SASL class for KERBEROS_V4
11630
11631         * camel-sasl-cram-md5.[c,h]: new SASL class for CRAM-MD5
11632
11633         * camel-sasl-plain.[c,h]: new SASL class for PLAIN
11634
11635         * providers/imap/camel-imap-auth.c: Removed the base64 functions.
11636
11637         * camel-mime-utils.c (base64_encode_simple): Moved here from
11638         camel-imap-auth.c
11639         (base64_decode_simple): Same.
11640
11641 2001-02-26  Dan Winship  <danw@ximian.com>
11642
11643         * providers/imap/camel-imap-folder.c (imap_sync): Group messages
11644         into sets with the same flags and use the IMAP message set
11645         notation rather than doing a separate STORE FLAGS for each one.
11646         This cuts the network traffic down to just a handful of commands
11647         per sync rather than one per changed message. Removed the progress
11648         notification stuff since it's no longer meaningful and should
11649         hopefully be unnecessary.
11650         (imap_copy_message_to): move the former sync_message function
11651         into here, since it's no longer shared with imap_sync.
11652
11653 2001-02-26  Jeffrey Stedfast  <fejj@ximian.com>
11654
11655         * camel-mime-utils.c: Made thread-safe and moved to above the test
11656         code.
11657
11658         * camel-mime-message.c (camel_mime_message_init): Set the
11659         message_id to NULL.
11660         (camel_mime_message_finalize): Free the message_id.
11661         (camel_mime_message_set_message_id): New function to set the
11662         Message-Id.
11663         (camel_mime_message_get_message_id): New function to get the
11664         Message-Id.
11665         (process_header): Decode the message-id.
11666
11667 2001-02-24  Jeffrey Stedfast  <fejj@ximian.com>
11668
11669         * camel-store.c (construct): init the vTrash folder here instead
11670         of in store_init.
11671         (camel_store_class_init): init service_class->construct.
11672         (camel_store_finalize): We only need to unref the vtrash folder.
11673         (init_trash): don't create a vstore since we don't need it.
11674
11675 2001-02-23  Jeffrey Stedfast  <fejj@ximian.com>
11676
11677         * camel-store.c (camel_store_class_init): init get_trash and
11678         init_trash.
11679         (camel_store_init): call the virtual init_trash function.
11680         (camel_store_finalize): unref the vtrash folder/store if present.
11681         (camel_store_get_folder): Add the new folder to the vtrash
11682         vfolder.
11683         (init_trash): default implementation of init_trash.
11684         (get_trash): default implementation of get_trash.
11685
11686         * camel-vee-store.c (vee_init_trash): No-op.
11687         (vee_get_trash): return NULL
11688
11689 2001-02-23  Not Zed  <NotZed@Ximian.com>
11690
11691         * camel-folder-summary.c (camel_message_info_new_from_header):
11692         Doh, cut and paste problem, use mlist not cc.
11693
11694         * camel-folder.c (move_message_to): 
11695         (copy_message_to): If the source folder doesn't support a
11696         summary, dont try and get the message info from it.
11697
11698         * camel-filter-search.c (check_header): Implement a pseudo-header
11699         "x-camel-mlist" which just looks up in the message info for a
11700         match.
11701
11702         * camel-folder-search.c (check_header): Add pseudo-header
11703         "x-camel-mlist" which can be used to match on mailing list.
11704
11705         * providers/imap/camel-imap-folder.c (imap_sync): Add some
11706         internal progress reporting.
11707         (imap_rescan): Do some progress reporting.
11708
11709         * camel-mime-part.c (init_header_name_table): Add the message-id
11710         to the formatted table, so we dont try and wrap it, and break it.
11711
11712 2001-02-22  Jeffrey Stedfast  <fejj@ximian.com>
11713
11714         * camel-folder.h: Remove the 'FIXME: remove because this isn't
11715         required...' comment for copy_message_to since we now need and
11716         cherish its existance in the filter-driver code ;-)
11717
11718         * camel-filter-driver.c (camel_filter_driver_filter_message): Now
11719         takes a UID and CamelFolder arguments (which can be NULL) to allow
11720         for possible optimizations when copying messages between folders
11721         on the same store.
11722         (camel_filter_driver_filter_mbox): Updated (passes NULL for both
11723         since this case can't be optimized anyway).
11724         (camel_filter_driver_filter_folder): Updated to pass in the uid
11725         and folder of the message.
11726
11727 2001-02-22  Dan Winship  <danw@ximian.com>
11728
11729         * providers/imap/camel-imap-summary.h (CAMEL_IMAP_SERVER_FLAGS):
11730         #define this as the set of all IMAP system flags
11731
11732         * providers/imap/camel-imap-folder.c (sync_message): after syncing
11733         flags, set server_flags to (flags & CAMEL_IMAP_SERVER_FLAGS)
11734         rather than just "flags", since any other flags won't have been
11735         synced. Prevents the CAMEL_MESSAGE_ATTACHMENTS flag from getting
11736         lost.
11737
11738 2001-02-22  Not Zed  <NotZed@Ximian.com>
11739
11740         * providers/vee/*: Removed all files.
11741         
11742         * camel-private.h: Move camel-vee-private.h stuff into here.
11743
11744         * camel-session.c: Move the vee_provider here, and initialise it
11745         always as part of a session.  The vfolder provider is always
11746         available.
11747
11748         * providers/Makefile.am: Remove "vee" from the build list, now
11749         built as part of the main library.
11750
11751         * Makefile.am (libcamelinclude_HEADERS): 
11752         (libcamel_la_SOURCES): Added camel-vee-store.[ch],
11753         camel-vee-folder.[ch].
11754
11755         * providers/vee/camel-vee-folder.c (vee_folder_build): Removed,
11756         not used.
11757         (camel_vee_folder_new): Removed call to build_folder.
11758         (vee_get_message): Dont try and free the mi if we didn't get it.
11759
11760         * camel-folder.c (camel_folder_change_info_new): Added a hash
11761         table of what we have in the lists, plus moved private things into
11762         private pointer.
11763         (camel_folder_change_info_add_source): Fixed up private accesses.
11764         (camel_folder_change_info_add_uid): Changed to use a hashtable to
11765         see if we already have the uid, etc.
11766         (camel_folder_change_info_remove_uid): Similar.
11767         (change_info_remove): Likewise.
11768         (camel_folder_change_info_clear): Fixes for privatisations.
11769         (camel_folder_change_info_free): "
11770
11771 2001-02-21  Dan Winship  <danw@ximian.com>
11772
11773         * providers/imap/camel-imap-folder.c (fetch_medium): Fixes for
11774         IMAP4-pre-rev1 from Torsten Schulz.
11775
11776 2001-02-20  Not Zed  <NotZed@Ximian.com>
11777
11778         * camel-mime-utils.c (mail_list_magic): Take the ^Header: part out
11779         of the expression, since we look that up ourselves.
11780         (header_raw_check_mailing_list): When getting the match, get match
11781         1, not match 0, we dont want the full string match.
11782
11783         * camel-folder-summary.c (CAMEL_FOLDER_SUMMARY_VERSION): Bumped
11784         for summary change.
11785         (message_info_new): Extract the mlist info from the headers.
11786         (message_info_load): Load mlist from summary.
11787         (message_info_save): Save mlist to summary.
11788         (message_info_free): Save the mlist entry.
11789         (camel_message_info_new_from_header): Extract mailing list header.
11790         (camel_message_info_dup_to): Copy the mlist entry.
11791         (camel_message_info_free): Free mlist.
11792         (message_info_dump): Dump the mlist.
11793
11794         * camel-folder-summary.h: Add an mlist (mailing list) string to
11795         the summary.
11796
11797 2001-02-19  Not Zed  <NotZed@Ximian.com>
11798
11799         * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Added
11800         flags argument.
11801         (message_changed): Add support for the auto-update flag, in which
11802         case we auto-match the content as it changes.
11803         (camel_vee_folder_init): Remoive "DYNAMIC" optionality
11804         (camel_vee_folder_finalise): "
11805         (vee_expunge): As we expunge folders, re-sync their content by
11806         rerunning the query.
11807
11808         * providers/vee/camel-vee-store.c (vee_get_folder): Pass flags to
11809         folder new.
11810
11811 2001-02-18  Not Zed  <NotZed@Ximian.com>
11812
11813         * providers/vee/Makefile.am (noinst_HEADERS): Added
11814         camel-vee-private.h.
11815
11816         * providers/vee/camel-vee-private.h: New file to add locking stuff
11817         for vee folders.
11818
11819         * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Add
11820         locking around unmatched setup.
11821         (camel_vee_folder_init): Setup lock.
11822         (camel_vee_folder_finalise): Free locks.
11823         (folder_changed): Add locking.
11824         (unmatched_finalise): "
11825         (message_changed): "
11826         (vee_folder_build): "
11827
11828 2001-02-17  Not Zed  <NotZed@Ximian.com>
11829
11830         * providers/vee/camel-vee-folder.c (vee_folder_add): Check uid
11831         doesn't exist before adding it.
11832
11833 2001-02-16  Not Zed  <NotZed@Ximian.com>
11834
11835         * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Create
11836         a new virtual virtual folder UNMATCHED, to store all messages that
11837         dont match other vfolders.
11838         (unmatched_folder_changed): When a vfolder issues a changed event,
11839         use its info to update the unmatched folder info.
11840         (unmatched_finalise): When a vfolder is finalised, remove any uids
11841         it has as if we had a removed event for it.
11842
11843 2001-02-16  Jeffrey Stedfast  <fejj@ximian.com>
11844
11845         * camel-filter-driver.c (camel_filter_driver_finalise): Thaw the
11846         defaultfolder.
11847         (camel_filter_driver_set_default_folder): Thaw the defaultfolder
11848         we're about to replace, and freeze the new defaultfolder.
11849
11850 2001-02-15  Jeffrey Stedfast  <fejj@ximian.com>
11851
11852         * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Emit
11853         the folder_created signal here.
11854
11855         * providers/local/camel-local-folder.c
11856         (camel_local_folder_construct): Emit the folder_created signal.
11857
11858         * providers/local/camel-local-store.c (delete_folder): On error,
11859         free the 'name' string so we don't leak. Also emit the
11860         folder_deleted signal.
11861
11862         * providers/imap/camel-imap-store.c (subscribe_folder): Emit the
11863         folder_created signal.
11864         (unsubscribe_folder): Emit the folder_deleted signal.
11865
11866         * camel-store.c (camel_store_class_init): Added folder_created and
11867         folder_deleted signal defs.
11868
11869 2001-02-15  Dan Winship  <danw@ximian.com>
11870
11871         * camel-folder-thread.c (container_parent_child): Deal with
11872         out-of-order References headers so they don't cause messages to
11873         disappear in threaded view.
11874
11875         * providers/imap/camel-imap-folder.c (fetch_medium): IMAP4
11876         (pre-rev1) doesn't allow BODY.PEEK[], so use RFC822.PEEK instead
11877         in that case.
11878
11879 2001-02-14  Christopher James Lahey  <clahey@ximian.com>
11880
11881         * camel-mime-filter-charset.c (complete, filter),
11882         camel-mime-utils.c (rfc2047_decode_word, rfc2047_encode_word):
11883         Changed this code to match the glibc iconv signature.
11884
11885 2001-02-14  Dan Winship  <danw@ximian.com>
11886
11887         * camel-store.c (camel_store_create_folder): New method to create
11888         a folder when you don't know its full name.
11889
11890         * providers/imap/camel-imap-store.c (create_folder): Implement.
11891         (create_folder): Oops, and fix bug involving namespaces
11892         
11893 2001-02-12  Not Zed  <NotZed@Ximian.com>
11894
11895         * camel-mime-part.c (init_header_name_table): Add address headers
11896         to list that we dont fold when writing.  The are properly
11897         formatted as we build them.
11898         (write_to_stream): DOH, lookup the header name in the formatted
11899         hash table, not the value, that would never have worked.
11900
11901         * camel-internet-address.c
11902         (camel_internet_address_encode_address): Changed to take a
11903         parameter saying how much we've printed so far.  We now fold the
11904         header as we format it.  We dont fold addresses, even if they are
11905         too long, we simply put them on another line by themselves: this
11906         should make the result more parsable by mailers that can't handle
11907         split up addresses (which are legal).
11908         (internet_encode): Fix for changes to above.
11909
11910 2001-02-12  Jeffrey Stedfast  <fejj@ximian.com>
11911
11912         * providers/local/camel-local-provider.c: mbox, mh, and maildir
11913         camel-url's need absolute paths.
11914
11915         * camel-provider.h (CAMEL_URL_PATH_IS_ABSOLUTE): New flaggy flag.
11916
11917 2001-02-08  Dan Winship  <danw@ximian.com>
11918
11919         * camel-store.c: Rewrite a bunch. Replace the existing folder
11920         cache stuff with much simpler code that still handles all the
11921         existing cases. Now the folder hash table is always created by the
11922         base class, using hash and compare functions provided by the class
11923         implementation. (If they are set to NULL, CamelStore won't cache
11924         folders.) lookup_folder, cache_folder, and uncache_folder are no
11925         longer class methods, and get_name is gone completely.
11926
11927         (camel_store_get_inbox): Renamed from
11928         camel_store_get_default_folder, since that wasn't being used, and
11929         this is what we actually need.
11930         (camel_store_get_root_folder): Removed, since it's not needed for
11931         anything given get_folder_info.
11932
11933         * camel-remote-store.c:
11934         * providers/local/camel-local-store.c:
11935         * providers/local/camel-mbox-store.c:
11936         * providers/local/camel-mh-store.c:
11937         * providers/local/camel-maildir-store.c:
11938         * providers/nntp/camel-nntp-store.c:
11939         * providers/pop3/camel-pop3-store.c:
11940         * providers/vee/camel-vee-store.c: Minor updates for CamelStore
11941         changes
11942
11943         * providers/imap/camel-imap-store.c (camel_imap_store_class_init):
11944         Update for CamelStore changes.
11945         (hash_folder_name, compare_folder_name): treat INBOX
11946         case-insensitively, otherwise use g_str_hash and g_str_equal.
11947
11948         * camel-service.c (camel_service_construct): Remove
11949         camel_service_new and create camel_service_construct (as a class
11950         method) in its place.
11951
11952         * camel-session.c (camel_session_get_service): Use
11953         camel_object_new and camel_service_construct to replace
11954         camel_service_new.
11955
11956         * providers/local/camel-local-store.c (construct): Append a '/' to
11957         the URL path if it doesn't end with one
11958
11959 2001-01-31  Jeffrey Stedfast  <fejj@helixcode.com>
11960
11961         * camel-tcp-stream-ssl.c: Oops, include the camel-tcp-stream-ssl
11962         header instead of the raw one.
11963
11964 2001-02-07  Not Zed  <NotZed@Ximian.com>
11965
11966         * camel-operation.c (camel_operation_start): Changed to push the
11967         operation into a status stack.
11968         (camel_operation_progress): Changed to only accept % complete.
11969         (camel_operation_reset): Free status stack as well.
11970
11971         * providers/pop3/camel-pop3-folder.c (pop3_get_message): Get the
11972         octect count from the return line, and pass it to
11973         get_additional_data().
11974         (pop3_refresh_info): Added status stuff.
11975
11976         * providers/pop3/camel-pop3-store.c
11977         (camel_pop3_command_get_additional_data): Added a total bytes
11978         expected argument for progress reporting & fixed callers.
11979         (camel_pop3_command_get_additional_data): Added progress
11980         reporting.
11981
11982         * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
11983         (mbox_summary_sync_quick):
11984         (summary_rebuild): Added progress reporting stuff.
11985
11986 2001-02-07  Jeffrey Stedfast  <fejj@ximian.com>
11987
11988         * camel-search-private.c (CAMEL_SEARCH_COMPARE): Macro for making
11989         comparisons easy.
11990         (camel_ustrcasecmp): Use CAMEL_SEARCH_COMPARE and check for
11991         end-of-string before the utf-8 error check.
11992         (camel_ustrncasecmp): Same.
11993         (camel_search_header_match): Strip leading spaces before doing
11994         anything else. Also use vlen and mlen so as to not need to do 500
11995         strlen()'s.
11996         (camel_ustrcasecmp): Don't get_utf8() for the 2 strings in the
11997         comparison part of the loop because of short-circuit expression
11998         evaluation. (blame JPR if this is the wrong term!)
11999         (camel_ustrncasecmp): Same.
12000
12001 2001-02-06  Jeffrey Stedfast  <fejj@ximian.com>
12002
12003         * camel-search-private.c (utf8_get): Rewrote using unicode_get_utf8().
12004         (camel_ustrcasecmp): Use unicode_char_t
12005         (camel_ustrncasecmp): Same.
12006
12007 2001-02-06  Christopher James Lahey  <clahey@ximian.com>
12008
12009         * camel-mime-filter-charset.c (complete, filter),
12010         camel-mime-utils.c (rfc2047_decode_word, rfc2047_encode_word):
12011         Made these pass char ** as the second parameter to iconv.
12012
12013 2001-02-06  Not Zed  <NotZed@Ximian.com>
12014
12015         * camel-session.c: Removed all the camel_cancel stuff.
12016
12017         * camel-stream-fs.c (stream_read): Change to use camel_operation.       
12018         (stream_write): "
12019
12020         * camel-remote-store.c (socket_connect): Change to use
12021         camel_operation rather than camel_cancel stuff.
12022         Removed gal include, WTF is that doing there anyway?
12023
12024         * Makefile.am (libcamel_la_SOURCES): 
12025         (libcamelinclude_HEADERS): Added camel-operation.[ch], stuff to
12026         handle notification and cancellation.
12027
12028         * camel-search-private.c: Removed unwanted header.  It was never
12029         put in for a reason.  Stop fixing irrelevant warnings.
12030         
12031         (camel_ustrstrcase): Our own strstrcase impl for utf8 strings.
12032         (camel_ustrcasecmp): Ditto for strcasecmp.
12033         (camel_ustrncasecmp): And strncasecmp.
12034         (utf8_get): Simpler interface to utf8 string processing.
12035         (camel_search_header_match): Use the new things.
12036
12037 2001-02-05  Not Zed  <NotZed@Ximian.com>
12038
12039         * camel-folder.c (get_summary): Removed some old variables/a small
12040         memleak.
12041         (free_summary): Removed old variables.
12042
12043         * camel-mime-utils.c (header_raw_check_mailing_list): New utility
12044         function to get the mailing list (if any) that a set of headers
12045         came from.
12046
12047 2001-02-05  Christopher James Lahey  <clahey@helixcode.com>
12048
12049         * camel-stream-fs.c: Added a missing #include.
12050
12051         * camel-search-private.c: Added a missing #include.
12052
12053 2001-02-05  Jeffrey Stedfast  <fejj@ximian.com>
12054
12055         * camel-remote-store.c (remote_query_auth_types): Oops. Change
12056         this too.
12057
12058         * providers/smtp/camel-smtp-transport.c (query_auth_types): Updated.
12059
12060         * providers/nntp/camel-nntp-store.c (nntp_store_query_auth_types):
12061         Updated.
12062
12063         * providers/pop3/camel-pop3-store.c (query_auth_types): Updated.
12064
12065         * providers/imap/camel-imap-store.c (query_auth_types): Updated.
12066
12067         * camel-service.c (camel_service_query_auth_types): Now takes a
12068         boolean value to specify whether or not to connect when
12069         constructing a supported authtype list.
12070
12071 2001-02-05  Not Zed  <NotZed@Ximian.com>
12072
12073         * camel-stream-filter.c (do_write): Revert jeff's earlier change,
12074         the change below is the more-correct fix.  All his was doing was
12075         ignoring the return code & looping actually :)
12076
12077         * camel-stream-fs.c (stream_write): Since we are non-blocking on
12078         the outgoing fd, keep looping if writing out large blocks, so we
12079         can keep checking for cancel, etc.
12080
12081 2001-02-02  Not Zed  <NotZed@Ximian.com>
12082
12083         * camel-folder-thread.c (camel_folder_thread_messages_new): When
12084         we drop a fake node, dont skip checking the next in the list.
12085         (camel_folder_thread_messages_new): Add an assertion check just to
12086         make sure we dont get any pseudo nodes, and spit a warning if we
12087         do.
12088
12089 2001-02-04  Jeffrey Stedfast  <fejj@ximian.com>
12090
12091         * camel-stream-filter.c (do_write): Make do_write loop until the
12092         entire buffer is written.
12093
12094 2001-02-02  Not Zed  <NotZed@Ximian.com>
12095
12096         * camel-stream-fs.c: Add missing header for cancel check stuff.
12097
12098         * camel-session.c (camel_cancel_cancel): Fix a wrong cast.
12099
12100         * camel-mime-part.c (init_header_name_table): Setup a new table
12101         header_formatted_table, that lists headers that we dont want to
12102         fold (they've already been folded).
12103         (write_to_stream): Check for already formatted headers, and dont
12104         try and fold them.  This is a fix for bug #1097.
12105
12106 2001-02-01  Not Zed  <NotZed@Ximian.com>
12107
12108         * camel-mime-utils.c (header_fold): If we are folding, drop the
12109         space at the end of the line.
12110
12111 2001-01-30  Not Zed  <NotZed@Ximian.com>
12112
12113         * camel-remote-store.c (timeout_cb): Remvoe the stream locking
12114         here.  I think this was leading to a deadlock when a keepalive is
12115         being sent, in imap.
12116
12117 2001-01-29  Not Zed  <NotZed@Ximian.com>
12118
12119         * providers/imap/camel-imap-command.c
12120         (imap_command_strdup_vprintf): Include the terminating NUL in the
12121         calculated string length.  This hit memcheck.
12122
12123 2001-01-25  Not Zed  <NotZed@Ximian.com>
12124
12125         * tests/folder/test3.c: Changed the subject search to handle case
12126         sensitive when it is mixed case.
12127
12128         * Makefile.am (libcamel_la_SOURCES): Added camel-ssearch-private.c
12129         (noinst_HEADERS): Added camel-search-private.h
12130
12131         * camel-folder-search.c (check_header): New function to do the
12132         work of the various header checks.
12133         (search_header_matches): 
12134         (search_header_starts_with): 
12135         (search_header_ends_with): 
12136         (search_header_contains): Use check_header to do the work.
12137         (build_match_regex): Removed.
12138
12139         * camel-search-private.c (header_soundex):  New
12140         function to match words to phrases using soundex algorithm.
12141
12142         * camel-filter-search.c (soundexcmp): Removed.
12143         (check_match): Moved to search-private.h
12144
12145 2001-01-24  Not Zed  <NotZed@Ximian.com>
12146
12147         * camel-search-private.c (camel_search_build_match_regex): Added
12148         extra flags, so the same function can be used for
12149         start/end/whole/partial matches.
12150         (camel_search_header_match): Convenience function to check a
12151         single header against all sorts of different matches.
12152
12153         * providers/imap/camel-imap-search.c (imap_body_contains): Fix for
12154         e_sexp api changes.
12155
12156         * camel-folder-search.c: Fix for e_sexp api changes.
12157         (search_header_contains): Free args/quit on unknown header.
12158         (search_header_matches): "
12159         (search_header_starts_with): "
12160         (search_header_ends_with): "
12161         (match_message): Add an exception argument.
12162         (search_body_contains): Free args/quit on fatal error.
12163         (message_body_contains): Removed (moved to
12164         camel-search-private.c), fixed callers.
12165
12166         * camel-filter-search.c: Fix for e_sexp api changes.
12167         (build_match_regex, message_body_contains): Moved into
12168         camel-filter-private.c  Fixed callers.
12169         (check_header): moved guts to camel-search-private, and
12170         changed to use regex's for everything.  Just calls that with the
12171         right args.
12172         (check_header): GEts the header, decodes it, and checks for
12173         failure, and whatnot.
12174         (check_match): Removed.
12175         (header_soundex): Changed significantly.  Now it soundexes each
12176         word in the header separately, and compares it to the first
12177         argument.
12178
12179         * tests/folder/test9.c (main): Fix for api changes.
12180         (main): Added tests to see that invalid match and action
12181         rules are properly detected.
12182
12183         * camel-filter-driver.c (camel_filter_driver_filter_mbox): Remove
12184         the 'finished message' bit.
12185         (camel_filter_driver_filter_message): Remove an accidentally
12186         checked in debug.
12187         (camel_filter_driver_filter_message): Fix for e-sexp api changes.
12188
12189 2001-01-23  Dan Winship  <danw@ximian.com>
12190
12191         * providers/imap/camel-imap-wrapper.c: Add a lock around the
12192         delayed loading, so two threads won't try to do it at the same
12193         time.
12194
12195 2001-01-22  Dan Winship  <danw@ximian.com>
12196
12197         * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Set the
12198         CamelFolder::name to just the base part of the vfolder name (the
12199         non-query part)
12200
12201 2001-01-23  Not Zed  <NotZed@Ximian.com>
12202
12203         * camel-filter-search.c (camel_filter_search_match): Perform error
12204         checking on parsing/execution.
12205
12206         * camel-folder-search.c (camel_folder_search_execute_expression):
12207         Perform error handling on search expression.
12208         (CamelFolderSearchPrivate): Add a camelexception for error
12209         returns.
12210         (camel_folder_search_execute_expression): Setup exception pointer.
12211         (search_match_all): Quit on error.
12212
12213         * providers/imap/camel-imap-summary.c (message_info_load): Removed
12214         some debug 'warnings', as they should now be displayed at the
12215         toplevel loader, and just made the code match similar code
12216         elsewhere.
12217
12218         * providers/local/camel-mbox-summary.c (message_info_load): Error
12219         handling.
12220         (message_info_save): more error handling.
12221
12222         * camel-folder-summary.c (message_info_load): Add error handling
12223         and sanity checking.
12224         (camel_folder_summary_load): Add error checks.
12225         (perform_content_info_load): Error + sanity checks.
12226         (content_info_load): error + sanity checks.
12227
12228         * camel-filter-driver.c (close_folder): avoid /0 by updating after
12229         we've done the sync.
12230         (close_folders): Setup the first progress report to start it off.
12231         (camel_filter_driver_filter_message): Fix a fixme, check errors in
12232         e_sexp parsing, etc.
12233
12234 2001-01-22  Christopher James Lahey  <clahey@helixcode.com>
12235
12236         * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
12237         Initialize the value of the variable exists here.
12238
12239 2001-01-22  Not Zed  <NotZed@Ximian.com>
12240
12241         * .cvsignore */*/.cvsignore: Added profiling temp
12242         files.
12243
12244         * camel-folder-thread.c (camel_folder_thread_messages_new): When
12245         removing phantom nodes, check for the end node too.
12246
12247         * camel-filter-driver.[ch]: Changed status vars to be
12248         CAMEL_FILTER_STATUS_ etc.
12249
12250 2001-01-21  Jeffrey Stedfast  <fejj@ximian.com>
12251
12252         * camel-mime-utils.c (header_param_list_format_append): Make the
12253         output a little prettier. Okay, so I'm anal...
12254
12255 2001-01-21  Not Zed  <NotZed@Ximian.com>
12256
12257         * camel-filter-driver.h: Added an exception to
12258         CamelFilterGetFolderFunc.
12259
12260         * camel-filter-driver.c (camel_filter_driver_filter_message):
12261         Remove source parameter, as it is determined elsewhere now.
12262         (camel_filter_driver_filter_folder): Same here.
12263         (camel_filter_driver_filter_mbox): And here.
12264         (do_move): If we cannot open a folder, quit, rather than ignoring
12265         it.
12266         (do_copy): Here too.
12267         (open_folder): Pass an exception into get_folder callback.
12268         (camel_filter_driver_filter_folder): Report that we're syncing,
12269         when we are.
12270         (camel_filter_driver_filter_mbox): And here too.
12271         (close_folder): And here.
12272
12273 2001-01-19  Jeffrey Stedfast  <fejj@ximian.com>
12274
12275         * camel-filter-driver.c (camel_filter_driver_filter_message): Set
12276         the deleted bit *before* copying to the default folder, this way
12277         if they are importing mail and have a rule to delete it, it
12278         doesn't get copied to the default folder un-deleted.
12279
12280 2001-01-19  Dan Winship  <danw@ximian.com>
12281
12282         * providers/imap/camel-imap-store.c
12283         (get_subscribed_folders_by_hand): If LISTing a subscribed folder
12284         doesn't return a LIST response, just ignore that folder. Yay
12285         RFC2060.
12286         (subscribe_folder): add a missing UNLOCK
12287
12288 2001-01-19  Kjartan Maraas  <kmaraas@gnome.org>
12289
12290         * providers/smtp/camel-smtp-provider.c: Mark strings for translation.
12291
12292 2001-01-19  Not Zed  <NotZed@Ximian.com>
12293
12294         * camel-filter-driver.c (report_status): Add a percentage complete
12295         indicator to the status thing.
12296         (camel_filter_driver_filter_mbox): Add percentage complete to
12297         reporting.      
12298         (camel_filter_driver_filter_folder): Same.
12299
12300 2001-01-18  Dan Winship  <danw@ximian.com>
12301
12302         * camel-store.c (camel_folder_info_build): More tweaking... skip
12303         separator characters after the namespace character. (Gets rid of
12304         the shell folder registration warning some people have had with
12305         IMAP)
12306
12307         * providers/imap/camel-imap-store.c (imap_connect): I'm sure there
12308         was some clever reason I was storing the flags of the folder in
12309         the hash table rather than just "1", but I don't remember what it
12310         was now. Anyway, since we only ever test NULL/non-NULL, store 1,
12311         since flags is sometimes 0.
12312
12313         * providers/imap/camel-imap-folder.c (imap_update_summary): Oops.
12314         Somewhere in one of the reorgs, the code to add new messages to
12315         the CamelFolderChangeInfo structure got removed. Fix that.
12316
12317 2001-01-17  Jeffrey Stedfast  <fejj@ximian.com>
12318
12319         * providers/imap/camel-imap-summary.c (message_info_load): Add
12320         some g_warnings() to help debug later if I ever get the segfaults
12321         I was getting earlier. Can't seem to reproduce them after my
12322         previous "fix".
12323
12324         * camel-folder-summary.c (camel_folder_summary_load): Undid my
12325         change here, NotZed said it was wrong and that if it gets a NULL
12326         mi then it should abort and not continue.
12327
12328 2001-01-17  Jeffrey Stedfast  <fejj@ximian.com>
12329
12330         * camel-folder-summary.c (camel_folder_summary_load): Make sure
12331         that the message-info is non-null before we go accessing inner
12332         parts of it and/or adding it to the summary array. I may not have
12333         handled the error correctly, but it does seem to work
12334         correctly. If NotZed could double-check this it'd be great.
12335
12336         * providers/smtp/camel-smtp-transport.c (get_smtp_error_string):
12337         New smtp error-code to string mapping function.
12338         (smtp_connect): Use the new error->string function for reporting
12339         useful errors.
12340         (smtp_helo): Same. Also use a case-insensitive strstr for 8BITMIME
12341         as it seems Exchange sends back lowercase for that one single SMTP
12342         extension. Everything else is uppercase. I'm seeing a lack of love
12343         for that extension by Microsoft dudes...
12344         (smtp_mail): Use get_smtp_error_string.
12345         (smtp_rcpt): Same.
12346         (smtp_data): Same.
12347         (smtp_quit): Same.
12348         (smtp_rset): Same.
12349
12350 2001-01-16  Jeffrey Stedfast  <fejj@ximian.com>
12351
12352         * camel-folder-summary.c (camel_folder_summary_array): Add an int
12353         i so this code will compile. Should I be worried about how well
12354         this code will work? ;-)
12355
12356 2001-01-17  Not Zed  <NotZed@Ximian.com>
12357
12358         * camel-folder.c (free_summary): Call
12359         camel_folder_summary_array_free() to do the work.
12360         (get_summary): Use camel_folder_summary_array() to get the array
12361         atomically.  These fixes allow folder/test8 to work again, and fix
12362         a sort of race where the summary size can change while we were
12363         making a copy of it.
12364
12365         * camel-folder-summary.c (camel_folder_summary_array): Get the
12366         summary array atomically, so it can't contain empty records.
12367         (camel_folder_summary_array_free): And free it.
12368
12369         * tests/lib/camel-test.c (die): If we are verbose & in threads,
12370         then goto sleep so we can debug.
12371
12372         * tests/folder/test8.c (worker): Add a missing pull() for
12373         comnparing content.
12374
12375         * camel-filter-search.c: Fix the symbol table, so match-all is an
12376         immediate function, as it should be.
12377
12378         * tests/folder/test9.c (main): New test, tests some filtering
12379         things.
12380
12381         * tests/message/test3.c (main): Dont use a boundary string with
12382         spaces in it.  Folding can corrupt it.  Maybe the folding isn't
12383         working entirely right, but anyway.
12384
12385         * camel-session.c: Debug out the debug.
12386
12387         * camel-filter-driver.c (camel_filter_driver_filter_folder): Plug
12388         a messageinfo leak.
12389
12390 2001-01-16  Dan Winship  <danw@ximian.com>
12391
12392         Delayed loading of IMAP message parts.
12393
12394         * camel-types.h: typedef CamelMessageInfo and
12395         CamelMessageContentInfo here
12396
12397         * camel-folder-summary.h: Add a "size" field to
12398         CamelMessageContentInfo.
12399
12400         * camel-folder-summary.c (camel_folder_summary_content_info_new,
12401         camel_folder_summary_content_info_free): Renamed and made
12402         non-static for providers that construct their own content info.
12403         (content_info_load, content_info_save): load/save size
12404
12405         * camel-data-wrapper.c (camel_data_wrapper_is_offline): New
12406         function to return if a data wrapper's contents are "offline". (So
12407         that, for example, we don't make thumbnails of images that haven't
12408         been loaded off the IMAP server yet.) Defaults to FALSE.
12409
12410         * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
12411         Fix a bug in re-selecting a folder when messages have been
12412         expunged from it by another client in the meantime.
12413         (imap_get_message): Rewrite. If the message is larger than a
12414         certain size, just create a skeleton message containing
12415         CamelImapWrappers that will read parts as needed. This way, large
12416         attachments only need to be downloaded if the user looks at them,
12417         and multipart/alternative alternatives that aren't used will never
12418         be downloaded at all.
12419         (imap_update_summary): Rewrite this a bunch too to make the
12420         parsing more robust.
12421
12422         * providers/imap/camel-imap-summary.c
12423         (CAMEL_IMAP_SUMMARY_VERSION): bump.
12424         (camel_imap_summary_new): Set build_content to TRUE.
12425         (content_info_load, content_info_save): Only save/load the content
12426         for messages that have it. (The content info gets created as a
12427         side effect of imap_get_message.)
12428
12429         * providers/imap/camel-imap-utils.c (imap_parse_body): New routine
12430         (and helpers) to parse an IMAP 'body' FETCH response and fill in a
12431         CamelMessageContentInfo from it.
12432
12433         * providers/imap/Makefile.am (libcamelimap_la_SOURCES,
12434         libcamelimap_la_HEADERS): add camel-imap-wrapper.
12435
12436 2001-01-16  Dan Winship  <danw@ximian.com>
12437
12438         * camel-tcp-stream-raw.c (stream_getsockopt, stream_setsockopt):
12439         * camel-stream-fs.c (stream_read, stream_write): 
12440         * camel-remote-store.c (socket_connect): fcntl(fd, F_GETFL)
12441         returns the flags as the return value, not via a passed in
12442         pointer. And F_SETFL looks for an int, not a long, and you have to
12443         pass it what it's expecting because it's a va_arg parameter. (Yes,
12444         the man page lies on Linux. But check the UNIX98 spec or the glibc
12445         source.) Also, fix another bug in socket_connect: if we manage to
12446         connect right away, unset O_NONBLOCK so it doesn't mess us up
12447         later.
12448
12449         Fixes a bunch of problems with non-blocking I/O being done in the
12450         allegedly-blocking case and then returning EWOULDBLOCK.
12451
12452 2001-01-16  Chris Toshok  <toshok@ximian.com>
12453
12454         * providers/Makefile.am (NNTP_DIR): set to nntp if ENABLE_NNTP
12455         (SUBDIRS): use $(NNTP_DIR)
12456
12457 2001-01-16  Jeffrey Stedfast  <fejj@ximian.com>
12458
12459         * providers/smtp/camel-smtp-transport.c (smtp_rcpt): Don't check
12460         errno as it's not being set. Fixes bug #1150.
12461
12462 2001-01-16  Jeffrey Stedfast  <fejj@ximian.com>
12463
12464         Ugh, this design is ugly like my butt.
12465
12466         * camel-session.c (camel_session_query_cert_authenticator): New
12467         function which will be useful when we integrate SSL.
12468
12469         * camel-tcp-stream-ssl.c (ssl_auth_cert): Callback to authenticate
12470         a certificate.
12471         (ssl_bad_cert): Callback that gets the reason the certificate is
12472         bad and then calls camel's cert-authenticator callback to notify
12473         the user and to allow the user to override the check.
12474         (stream_connect): Set the URL we expect to connect with and setup
12475         the auth_cert and bad_cert callbacks.
12476         (camel_tcp_stream_ssl_new): Now takes a CamelSession and a
12477         expected_host argument that it will use for certificate
12478         authentication.
12479         (camel_tcp_stream_ssl_finalize): Unref the session and free the
12480         expected_host.
12481
12482 2001-01-16  Not Zed  <NotZed@Ximian.com>
12483
12484         * camel-filter-search.c (header_exists): Changed to support
12485         multiple args (or'd together).
12486         (header_contains): Cleaned up to match the search code.  Why did
12487         fejj change it? I'll never know.
12488         (header_matches): 
12489         (header_starts_with): 
12490         (header_ends_with): Big cleanup of fejj's "i'm the cut & paste
12491         king" code.  Also properly handle or'ing of additional args to
12492         match what the folder-search code should do.
12493         (check_match): New function which does the annoying matching
12494         stuff (for header matches).
12495         (check_header): Similarly, handles or'ing of the matches together.
12496         (header_contains):
12497         (header_matches): 
12498         (header_starts_with): 
12499         (header_ends_with): Call check_header to do the actual work.
12500         (header_soundex): And here too.
12501         (match_all): Yeah like match-all isn't passed expression results,
12502         its passed expression terms.  Fix this so match-all works like it
12503         should, by executing the contained expression.
12504         (message_body_contains): Copied directly from
12505         camel-folder-search.c, a more robust/faster/simpler body search
12506         code.
12507         (mime_part_matches): Removed entirely.
12508         (handle_multipart): Removed entirely.
12509         (build_match_regex): Copied from camel-folder-search.  Builds a
12510         set of simple strings into a regex pattern that matches any of
12511         them (for faster & simpler matching).  Expanded to accept regex
12512         patterns itself, so it can merge them together.
12513         (body_contains): Use build match/match message to match using a
12514         built regex.
12515         (body_regex): Likewise, this time we tell it we're building a
12516         regex though.
12517         (header_full_regex): Use build_match_regex to take the drudgery
12518         out of it, and expand it to handle multiple regex's at once.
12519         (get_full_header): slightly cleaner (well i dunno, the sprintf
12520         stuff just got to me).
12521         (header_regex): Cleaned up to use build_match_Regex too, and to
12522         properly check types.
12523         (filter_message_search): Just allocate 'fms' on the stack.
12524
12525         * camel-filter-driver.c (camel_filter_driver_finalise): 
12526         (camel_filter_driver_init): 
12527         (camel_filter_driver_class_init): 
12528         (camel_filter_driver_get_type): Changed from gtk object to camel
12529         object.
12530         (camel_filter_driver_add_rule): New function to add a rule to be
12531         processed in sexp form.
12532         (camel_filter_driver_init): Init the rules list.
12533         (camel_filter_driver_finalise): Clear the rules/rules list.
12534         (camel_filter_driver_filter_message): Scan rules list directly
12535         rather than creating on the fly.
12536
12537         * Makefile.am (libcamelinclude_HEADERS): Added camel-filter-driver.h
12538         (libcamel_la_SOURCES): Added camel-filter-driver.c, code taken
12539         from filter-driver, which can drive, uh, filters based on sexp's.
12540         (libcamelinclude_HEADERS): 
12541         (libcamel_la_SOURCES): Added camel-filter-search.[ch]
12542
12543         * camel-folder-summary.c (camel_folder_summary_decode_string):
12544         Chganged len back to be unsigned.  And do a simple range check on
12545         the string value to try and detect corrupted summary files.
12546
12547         * providers/imap/camel-imap-command.c (imap_read_untagged): Handle
12548         cancelled stream reads with an appropriate exception.
12549
12550         * providers/imap/camel-imap-private.h: Fix the include-once
12551         macro.  Doh, confliced with camel-private.h.
12552
12553         * providers/imap/camel-imap-store.c (imap_store_refresh_folders):
12554         A copy of camel_remote_store_refresh_folders.  We avoid locking
12555         each folder when we call it though.  This should be removed when i
12556         can work out how to remove the folder lock from this function
12557         easily.
12558
12559         * camel-stream-fs.c (stream_write): Fix n' argument of select.
12560         (stream_read): Likewise.
12561
12562         * camel-remote-store.c (socket_connect): Bump the connect timeout
12563         upto 4 minutes.
12564         (socket_connect): Oops, fix the 'n' argument of select.
12565
12566         * camel-session.c (camel_cancel_cancel): If we are given no
12567         cancellation node, then do it for all active ones.
12568
12569 2001-01-15  Jeffrey Stedfast  <fejj@ximian.com>
12570
12571         * camel-stream-fs.c (stream_close): If the close() is successful,
12572         set the fd to -1.
12573
12574         * camel-tcp-stream-raw.c: Removed the disconnect() method.
12575         (stream_close): If the close() is successful, set the sockfd to
12576         -1.
12577
12578         * camel-tcp-stream-ssl.c: Removed the disconnect() method.
12579         (stream_close): If the close() is successful, set the sockfd to
12580         NULL.
12581
12582         * camel-tcp-stream.c (camel_tcp_stream_disconnect): Removed,
12583         easier to just use the close() method as it did the same thing
12584         anyway.
12585
12586 2001-01-15  Jeffrey Stedfast  <fejj@ximian.com>
12587
12588         * camel-tcp-stream-raw.c (stream_getsockopt): Updated to be able
12589         to get the CAMEL_SOCKOPT_NONBLOCKING socket opt.
12590         (stream_setsockopt): Updated to be able to set the
12591         CAMEL_SOCKOPT_NONBLOCKING socket opt.
12592
12593 2001-01-15  Peter Williams  <peterw@ximian.com>
12594
12595         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Lock
12596         around the imap_rescan, which needs it.
12597
12598 2001-01-15  Not Zed  <NotZed@Ximian.com>
12599
12600         * camel-remote-store.c (socket_connect): A cancellable connection
12601         routine.
12602         (remote_send_string): Return cancelled exception if we were.
12603         (remote_send_stream): "
12604         (remote_recv_line): "
12605
12606         * camel-stream-fs.c (stream_read): First cut at cancellation
12607         stuff.  Its looking a bit ugly.
12608
12609 2001-01-15  Jeffrey Stedfast  <fejj@ximian.com>
12610
12611         * camel-tcp-stream-ssl.c (stream_connect): Uses an SSL socket now
12612         although there's still a few things missing (like certificate
12613         handling and such).
12614
12615         * camel.c (camel_ssl_init): A replacement function for
12616         camel_init() that also initializes SSL.
12617
12618 2001-01-14  Jeffrey Stedfast  <fejj@ximian.com>
12619
12620         * camel-tcp-stream-ssl.c (stream_getsockopt): Implemented.
12621         (stream_setsockopt): Implemented.
12622
12623         * camel-tcp-stream-raw.c (stream_getsockopt): Implemented.
12624         (stream_setsockopt): Implemented.
12625
12626         * camel-tcp-stream.c (camel_tcp_stream_getsockopt): New method.
12627         (camel_tcp_stream_setsockopt): Another new method. I think you get
12628         the idea of what these are for so I won't explain them.
12629
12630 2001-01-14  Jeffrey Stedfast  <fejj@helixcode.com>
12631
12632         * camel-tcp-stream-ssl.[c,h]: New CamelTcpStream class that
12633         implements nspr sockets and eventually will use nss for
12634         SSL/TLS. Currently doesn't do any SSL/TLS but it should still
12635         work. It's functionally equivalent to CamelTcpStreamRaw at the
12636         moment only it uses nspr i/o.
12637
12638         * camel-tcp-stream-raw.[c,h]: New CamelTcpStream class that
12639         implements native sockets. Should be usable but may have some bugs
12640         yet.
12641
12642 2001-01-13  Jeffrey Stedfast  <fejj@ximian.com>
12643
12644         * camel-tcp-stream.[c,h]: New abstract class for TCP streams. The
12645         next step is to write child classes (CamelTcpStreamBSD and
12646         CamelTcpStreamSSL). The BSD stream will use normal BSD sockets
12647         while SSL will use Mozilla's NSPR and NSS libraries to do Secure
12648         Socket Layers which wille ventually replace CamelStreamSSL which I
12649         just commit'd. Oh well.
12650
12651 2001-01-13  Jeffrey Stedfast  <fejj@ximian.com>
12652
12653         * camel-stream-ssl.[c,h]: New stream for handling SSL/TLS
12654         connections.
12655
12656 2001-01-12  Not Zed  <NotZed@Ximian.com>
12657
12658         * camel-folder-thread.c (camel_folder_thread_messages_new):
12659         Perform a final pass, removing any pseudo nodes we added earlier.
12660         Quick patch to test the idea.
12661         (camel_folder_thread_messages_new): Added casts to rmeove some
12662         warnings for the analites out there.
12663
12664 2001-01-11  Dan Winship  <danw@ximian.com>
12665
12666         * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
12667         Fix a bug in previous commit: don't check for deleted messages if
12668         there are no known messages in the folder (because it would end up
12669         sending "FETCH 0 ...").
12670         (imap_copy_message_to): Fix this up: sync flags to the server
12671         before copying so that they end up correct in the remote folder.
12672         And poke the destination folder after doing the copy so it notices
12673         the new message right away.
12674         (imap_move_message_to): Call imap_copy_message_to for most of the
12675         work rather than duplicating the code (since it's much more
12676         complicated now).
12677
12678 2001-01-11  Dan Winship  <danw@ximian.com>
12679
12680         * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
12681         New function to check for added/deleted messages when re-selecting
12682         a folder.
12683         (imap_refresh_info, imap_rescan, imap_update_summary): Various
12684         locking tweaks that turn out to be irrelevant since command_lock
12685         is recursive, but whatever.
12686
12687         * providers/imap/camel-imap-command.c (camel_imap_command): When
12688         selecting a new folder, call camel_imap_folder_selected on it.
12689
12690         * camel-folder.c (camel_folder_copy_message_to): Fix a locking
12691         problem. (One branch of an if statement was returning with the
12692         lock still locked.) Also remove the deprecation comments, to match
12693         move_message_to.
12694
12695 2001-01-10  Jeffrey Stedfast  <fejj@helixcode.com>
12696
12697         * providers/local/camel-local-provider.c: Changed the descriptions
12698         for mh, mbox, and maildir to be more "user-friendly".
12699
12700 2001-01-10  Dan Winship  <danw@helixcode.com>
12701
12702         * providers/imap/camel-imap-types.h: New header to prevent
12703         recursive #include problems
12704
12705         * providers/imap/*.h: Replace some #includes with #include
12706         "camel-imap-types.h", remove typedefs that were moved to
12707         camel-imap-types.h
12708
12709         * providers/imap/*.c: Add #includes to make up for #includes
12710         removed from .h files
12711
12712         * providers/imap/Makefile.am (libcamelimapinclude_HEADERS): Add
12713         camel-imap-types.h
12714
12715 2001-01-10  Dan Winship  <danw@helixcode.com>
12716
12717         * camel-store.c (camel_store_sync): New class function, parallel
12718         to camel_folder_sync. (The default implementation just calls
12719         camel_folder_sync on each cached folder.)
12720
12721         * providers/imap/camel-imap-store.c (get_folder_info): Call
12722         camel_store_sync before doing anything else so that the IMAP
12723         server and Camel are working from the same data. Don't ask the
12724         server for the unread message count of the current folder, since
12725         UW will return often-incorrect cached data, and we can calculate
12726         it without talking to the server anyway.
12727
12728 2001-01-09  Dan Winship  <danw@helixcode.com>
12729
12730         Mostly IMAP changes. Use the NAMESPACE extension (where
12731         available). Deal with servers that don't return LIST flags in
12732         response to LSUB (like UW) to get rid of the "not a selectable
12733         folder" error messages in the UI. Take advantage of the \Marked
12734         and \Unmarked flags to try to speed up the folder scan by not
12735         doing STATUS on unmarked folders. Some further tweaks on the shape
12736         of the resulting folder tree in various situations...
12737
12738         * camel-store.h: Remove the (read) message_count, since nothing
12739         uses it, and we can speed up IMAP a bit this way.
12740
12741         * camel-store.c (camel_folder_info_build): Redo this a bit to make
12742         it more useful for IMAP since that's the only thing that uses it.
12743
12744         * camel-remote-store.c (camel_remote_store_connected): Public
12745         function to check if the store is connected, and try to connect it
12746         if it's not.
12747         (remote_send_string, remote_send_stream, remote_recv_line): Use
12748         that.
12749
12750         * providers/imap/camel-imap-store.c (camel_imap_store_finalize):
12751         fix up for changes.
12752         (camel_imap_store_init): Initialize subscribed_folders to NULL
12753         rather than an empty hash table.
12754         (imap_connect): Get the list of subscribed folders here. If the
12755         server doesn't claim that any of them are either Marked or
12756         Unmarked, then assume that it doesn't do that for LSUB and
12757         remember that for later. If the server supports the NAMESPACE
12758         extension and the user didn't specify a namespace, use the
12759         server-provided one.
12760         (imap_disconnect): Free the list of subscribed folders, and the
12761         namespace.
12762         (get_folder): check camel_remote_store_connected
12763         (get_folder_info): check camel_remote_store_connected. Add a bunch
12764         of new cleverness. If we learned that the server doesn't do LSUB
12765         usefully, do a bunch of LISTs by hand. Then, if we're getting
12766         unread counts, only do it for folders that weren't listed as
12767         Unmarked. Also, deal with namespaces that end with the separator
12768         character, and update for changes to camel_folder_info_build.
12769         (folder_subscribed): Add a g_return_val_if_fail.
12770         (subscribe_folder, unsubscribe_folder): check
12771         camel_remote_store_connected.
12772
12773         * providers/nntp/camel-nntp-store.c (build_folder_info,
12774         build_folder_info_from_grouplist, nntp_store_get_folder_info):
12775         Don't fill in message_count since it doesn't exist any more.
12776
12777 2001-01-09  Dan Winship  <danw@helixcode.com>
12778
12779         Kill off a long-hated Camel kludge: "empty" URLs and
12780         query_auth_types_generic.
12781
12782         * camel-url.c: Remove "empty" from CamelURL.
12783         (camel_url_new): No longer set it.
12784         (camel_url_to_string): Treat "" as equivalent to NULL for
12785         authmech. (Unrelated change, but it simplifies some stuff with the
12786         new config dialog.)
12787
12788         * camel-service.c (camel_service_new): Remove url->empty check: if
12789         the URL isn't valid, we don't create the service.
12790         (camel_service_query_auth_types): No longer need to switch between
12791         generic and connected variants.
12792
12793         * providers/smtp/camel-smtp-transport.c (query_auth_types): 
12794         * providers/pop3/camel-pop3-store.c (query_auth_types): 
12795         * providers/nntp/camel-nntp-store.c (nntp_store_query_auth_types): 
12796         * providers/imap/camel-imap-store.c (query_auth_types): 
12797         * camel-remote-store.c (remote_query_auth_types): Remove generic
12798         version, rename connected version.
12799
12800 2001-01-06  Not Zed  <NotZed@HelixCode.com>
12801
12802         * providers/vee/camel-vee-folder.c (vee_folder_build_folder): Dont
12803         try and unref a messageinfo that wasn't there, and use the right
12804         free function too.  Modified patch from Iain.
12805         (vee_move_message_to): New method, call the real folders'
12806         move_message_to method.
12807
12808 2001-01-04  JP Rosevear  <jpr@helixcode.com>
12809
12810         * tests/lib/Makefile.am: fix includes for compilation
12811
12812         * tests/message/Makefile.am: Build test3 again
12813
12814         * tests/message/test2.c: Kill warnings with header includes
12815
12816         * tests/message/test3.c: ditto
12817
12818         * tests/lib/streams.c: ditto
12819
12820         * tests/lib/camel-test.c: ditto
12821
12822         * tests/lib/messages.c: ditto
12823
12824         * tests/lib/folders.c: ditto
12825
12826 2001-01-04  Dan Winship  <danw@helixcode.com>
12827
12828         * providers/imap/camel-imap-folder.c (imap_rescan): Fix two
12829         problems in figuring out server-expunged messages.
12830
12831 2001-01-04  Not Zed  <NotZed@HelixCode.com>
12832
12833         * camel-folder.c (thaw): If we have a lot of messages changed,
12834         promote it to a folder changed event.
12835
12836 2000-01-03  Jeffrey Stedfast  <fejj@helixcode.com>
12837
12838         * camel-folder-search.c (search_header_matches): Implemented.
12839         (search_header_exists): Implemented.
12840         (search_header_starts_with): Implemented.
12841         (search_header_ends_with): Implemented.
12842
12843 2001-01-03  Christopher James Lahey  <clahey@helixcode.com>
12844
12845         * providers/imap/camel-imap-folder.c (camel_imap_folder_new):
12846         Initialize the exists variable so that we don't do random things
12847         if the imap server misbehaves.
12848
12849 2000-12-29  Not Zed  <NotZed@HelixCode.com>
12850
12851         * camel-folder.c (camel_folder_move_message_to): REmove warning,
12852         this isn't really deprecated, sigh.
12853
12854         * camel-mime-utils.c (header_fold): Comment out some debug.
12855
12856 2001-01-02  Christopher James Lahey  <clahey@helixcode.com>
12857
12858         * providers/maildir/, providers/mbox/, providers/mh/: Removed
12859         these directories since they're unused.
12860
12861 2001-01-02  Dan Winship  <danw@helixcode.com>
12862
12863         IMAP randomness.
12864
12865         * providers/imap/camel-imap-stream.[ch]: Remove. To be replaced.
12866
12867         * providers/imap/Makefile.am (libcamelimapinclude_HEADERS): Remove
12868         camel-imap-stream.h
12869
12870         * providers/imap/camel-imap-utils.c (imap_parse_flag_list): Take a
12871         char ** instead of char *, to return the position at the end of
12872         parsing like the string parsing functions.
12873         (imap_parse_string_generic): New function to parse a string,
12874         nstring, or astring.
12875         (imap_parse_nstring, imap_parse_astring): Now macros
12876         (imap_parse_string): Added
12877
12878         * providers/imap/camel-imap-folder.h: Remove the "exists" field
12879         from CamelImapFolder.
12880
12881         * providers/imap/camel-imap-folder.c: Remove unused include of
12882         camel-imap-stream.h.
12883         (camel_imap_folder_init): Remove no-longer-relevant summary
12884         initialization.
12885         (camel_imap_folder_new): Update for imap_parse_flag_list change,
12886         exists removal, and imap_rescan.
12887         (imap_rescan): New function that does most of the work of the old
12888         imap_refresh_info, but taking "exists" as an argument instead of
12889         getting it from the folder. Also calls camel_imap_folder_changed
12890         to do the summary updating and signalling, rather than duplicating
12891         that code.
12892         (imap_refresh_info): Just call imap_rescan (using the size of the
12893         folder summary as "exists").
12894         (imap_update_summary): Update for imap_parse_flag_list change
12895         (camel_imap_folder_changed): Update for "exists" change.
12896
12897 2001-01-02  Dan Winship  <danw@helixcode.com>
12898
12899         * camel-mime-utils.c (header_content_type_simple): New function to
12900         return just foo/bar with no parameters.
12901
12902         * camel-data-wrapper.c (get_mime_type): Use
12903         header_content_type_simple rather than header_content_type_format.
12904
12905 2000-12-28  Dan Winship  <danw@helixcode.com>
12906
12907         * gmime-content-field.[ch]: Remove this. It was only a thin
12908         wrapper around struct _header_content_type anyway, and didn't
12909         match the naming scheme of anything else.
12910
12911         * Makefile.am: Remove gmime-content-field.[ch]
12912
12913         * camel.h: Remove gmime-content-field.h
12914
12915         * camel-types.h: Add CamelContentType as a typedef for struct
12916         _header_content_type (especially for use outside of camel).
12917
12918         * camel-multipart.c: 
12919         * camel-mime-part.c: 
12920         * camel-mime-message.c: 
12921         * camel-folder-summary.c:
12922         * camel-folder-search.c: 
12923         * camel-data-wrapper.[ch]: Use CamelContentType and
12924         header_content_type_* functions rather than the GMime stuff. 
12925
12926         * camel-mime-part-utils.c: 
12927         * camel-medium.c: Remove unused gmime-content-field.h include.
12928
12929 2000-12-27  Dan Winship  <danw@helixcode.com>
12930
12931         * providers/pop3/camel-pop3-store.c (connect_to_server): Fix the
12932         APOP check to not crash on servers that don't return any
12933         information on the +OK greeting line.
12934
12935 2000-12-24  Not Zed  <NotZed@HelixCode.com>
12936
12937         * providers/imap/camel-imap-search.c (imap_body_contains): Lock
12938         the command channel while searching.
12939         (imap_body_contains): If performing a whole uid search, then add
12940         references to our own summary items, dont look it up in the
12941         folder.  This way they can't vanish unexpectedly.
12942
12943         * providers/imap/camel-imap-folder.h (CamelImapFolder): Added a
12944         private field.
12945         (CamelImapFolder): Removed summary again from here.
12946
12947         * providers/imap/camel-imap-private.h: Added lock for imap
12948         searches.
12949
12950         * Merge from camel-mt-branch.
12951         
12952         * providers/imap/camel-imap-folder.c (imap_update_summary): Merge
12953         fix, use the folder->summary.
12954         (imap_get_message_flags, imap_set_message_flags,
12955         imap_get_message_user_flag, imap_set_message_user_flag): Removed
12956         again.
12957         (camel_imap_folder_init): Setup private data/lock.
12958         (imap_finalize): Free private data/search lock.
12959         (imap_search_free): Lock the search_lock.
12960         (imap_search_by_expression): Lock the search lock when using the
12961         search object.  Also copy/ref hte summary, rather than getting it
12962         directly.
12963         (imap_refresh_info): Free any info lookups.  Use folder->summary
12964         not imap_folder->summary.  And lock around commands.
12965         (camel_imap_folder_changed): Use folder->summary again.
12966         (camel_imap_folder_changed): Make sure we unref the summary lookup.
12967
12968 2000-12-22  Dan Winship  <danw@helixcode.com>
12969
12970         * providers/imap/camel-imap-store.c (get_folder_info): When
12971         getting the top-level folder list, include INBOX even if it's not
12972         subscribed. Don't show subscribed folders outside of the given
12973         namespace. Do a better job of pruning the namespace from the
12974         returned folder tree.
12975
12976 2000-12-21  Dan Winship  <danw@helixcode.com>
12977
12978         * providers/imap/camel-imap-search.c: New CamelFolderSearch
12979         subclass that just reimplements body_contains (using the IMAP
12980         SEARCH command). All other kinds of searching are done against the
12981         local summary.
12982
12983         * providers/imap/camel-imap-folder.c (imap_search_by_expression):
12984         Use a CamelImapSearch to do searching.
12985
12986         * providers/imap/camel-imap-utils.c (imap_translate_sexp, etc): No
12987         longer needed.
12988
12989         * camel-folder-search.h: Add missing CAMEL_FOLDER_SEARCH_TYPE
12990         #define
12991
12992 2000-12-21  Dan Winship  <danw@helixcode.com>
12993
12994         * camel-stream-buffer.c (camel_stream_buffer_gets): Update the
12995         doc comment: since it always NUL-terminates the buffer, it reads
12996         at most @max-1 bytes, not @max.
12997
12998         * camel-remote-store.c (remote_recv_line): Fix the "did
12999         camel_stream_buffer_gets fill the whole buffer" check. Fixes a bug
13000         when reading lines longer than 1024 characters (eg, IMAP SEARCH
13001         responses in very large folders).
13002
13003 2000-12-19  Dan Winship  <danw@helixcode.com>
13004
13005         * providers/imap/camel-imap-folder.c (imap_refresh_info): Oops.
13006         Don't do "FETCH 1:0" when the folder is empty.
13007         (imap_protocol_get_summary_specifier): Request RFC822.SIZE too.
13008         (imap_update_summary): Parse RFC822.SIZE and add it to the
13009         summary.
13010
13011 2000-12-18  Dan Winship  <danw@helixcode.com>
13012
13013         * providers/imap/camel-imap-summary.c: Add "guint32 server_flags"
13014         to CamelImapMessageInfo to keep track of the last known message
13015         flag state on the server.
13016         (message_info_save, message_info_load): Save/load the
13017         server_flags.
13018
13019         * providers/imap/camel-imap-folder.c: Make this use
13020         CamelFolderChangeInfo and emit folder_changed notifications as it
13021         gets them rather than only on refresh_info.
13022         (imap_refresh_info): Notice flags that get cleared on the server
13023         as well as flags that get set.
13024         (imap_update_summary): Remove a comment that never actually
13025         applied to the committed code.
13026
13027 2000-12-15  Dan Winship  <danw@helixcode.com>
13028
13029         * providers/imap/camel-imap-command.c (camel_imap_command): Change
13030         the semantics of fmt: Now %S (capital S) means an IMAP "string",
13031         (which can be sent as either a quoted string or a literal). If
13032         the server supports LITERAL+, these will be sent as extended
13033         literals (which don't require any special escaping). Otherwise
13034         they'll be sent as quoted strings (and it now properly deals with
13035         " or \ in the string).
13036         (imap_command_strdup_vprintf): Utility routine that does the real
13037         work for the functionality mentioned above.
13038
13039         * providers/imap/camel-imap-utils.c (imap_quote_string): Turns a
13040         string into a proper IMAP "quoted string".
13041
13042         * providers/imap/camel-imap-store.c: 
13043         * providers/imap/camel-imap-folder.c: Use %S instead of "%s" where
13044         appropriate.
13045
13046 2000-12-22  Not Zed  <NotZed@HelixCode.com>
13047
13048         * camel-folder-summary.c (GLOBAL_INFO_UNLOCK): Doh, cut and paste
13049         victim again, call unlock instead of lock!
13050         (summary_assign_uid): Unlock around trying to get a new uid, if we
13051         have a clash.
13052
13053 2000-12-21  Not Zed  <NotZed@HelixCode.com>
13054
13055         * tests/folder/Makefile.am (TESTS): reenabled the tests here.
13056
13057         * providers/nntp/camel-nntp-newsrc.c (CamelNNTPNewsrc): Add a
13058         lock.  Made completely mt-safe.  Sigh, this is all so i can
13059         support snooping of the set_flags stuff inside camel-nntp-folder,
13060         since i've removed the global folder lock from all of the other
13061         folder summary operations.
13062         (camel_nntp_newsrc_read_for_server): Setup lock.
13063         (camel_nntp_newsrc_get_highest_article_read): Lock internal access.
13064         (camel_nntp_newsrc_get_num_articles_read): 
13065         (camel_nntp_newsrc_mark_article_read): 
13066         (camel_nntp_newsrc_mark_range_read): 
13067         (camel_nntp_newsrc_article_is_read): 
13068         (camel_nntp_newsrc_group_is_subscribed): 
13069         (camel_nntp_newsrc_unsubscribe_group): 
13070         (camel_nntp_newsrc_subscribe_group): 
13071         (camel_nntp_newsrc_get_subscribed_group_names): 
13072         (camel_nntp_newsrc_get_all_group_names): "
13073         (camel_nntp_newsrc_write_to_file): Lock internal accesses.
13074         (camel_nntp_newsrc_write): Lock around diry stuff.
13075
13076         * providers/local/camel-maildir-summary.c (maildir_summary_check):
13077         Lock around our internal poking of the summary hashtable/array.
13078         (maildir_summary_sync): And the same here too.
13079
13080         * camel-folder-summary.c: Moved the summaryprivate data into
13081         camel-private.h.  Only needed for the locks really.
13082         (camel_folder_summary_init): Setup locks.
13083         (camel_folder_summary_set_filename): Lock.
13084         (camel_folder_summary_index): lock
13085         (camel_folder_summary_uid): Lock
13086         (camel_folder_summary_next_uid): "
13087         (camel_folder_summary_set_uid): "
13088         (camel_folder_summary_load): Lock around whole load.  Hrm,
13089         probably not required.
13090         (camel_folder_summary_save): Lock around whole save, this is
13091         reqwuired, unless we ref/copy the whole list first, and i couldn't
13092         be bothreed.
13093         (camel_folder_summary_add): lock
13094         (summary_assign_uid): Lock around internal accesses.
13095         (camel_folder_summary_info_new_from_parser): Lock around filtr stuff.
13096         (camel_folder_summary_info_ref): Add locking.  Could probably use
13097         its own lock?
13098         (camel_folder_summary_touch): Add locking, likewise.
13099         (camel_folder_summary_clear): Lock.  If the preiovus two are
13100         changed, then so this will need mroe locking.
13101         (camel_folder_summary_info_free): Lock around refcounting.
13102         (camel_folder_summary_remove): Locking.
13103         (camel_folder_summary_remove_uid): Lock ref, unlock, unref.  Also
13104         fixed a bug that would have made this never work, freeing the key,
13105         which isn't allocated.
13106         (camel_folder_summary_remove_index): lock, ref, unlock unref also.
13107         (camel_message_info_ref): Lock using a separate global lock, since
13108         we have no context here.
13109         (camel_message_info_free): Here too.
13110         (content_info_alloc): Use an alocation lock here.  avoids races
13111         with setting up content_info_chunks, etc.
13112         (camel_folder_summary_info_new): And here too.
13113         (camel_folder_summary_load): Changed to use a differnet lock for
13114         loading/saving.
13115         (camel_folder_summary_init): Doh, i do need a reflock afterall,
13116         set one up.
13117         (camel_folder_summary_finalize): Free it.
13118         (camel_folder_summary_index): Add a reflock.
13119         (camel_folder_summary_uid): And here too.
13120         (camel_folder_summary_info_free): Use reflock instead of
13121         summary_lock.
13122         (camel_folder_summary_info_ref): Likewise.
13123         (camel_folder_summary_remove_uid): Add reflocking.
13124         (camel_folder_summary_remove_index): And here too.
13125
13126         * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Setup a
13127         summary object.
13128         (vee_folder_build): Build each item into the real summary object.
13129         (vee_folder_add, vee_folder_add_uid, vee_folder_add_change): New
13130         functions to add a single record to the vfolder summary.
13131         (vee_folder_build_folder): Use a real summary.
13132         (vee_get_uids): Removed, use default impl.
13133         (vee_free_message_info): "
13134         (vee_get_message_info): "
13135         (vee_get_summary): "
13136         (vee_get_unread_message_count): "
13137         (vee_get_message_count): "
13138         (vee_sync): Make vee-folder-sync sync all subordinate folders.
13139         Well i dont think this is right, but enough peopl ehave aksed for
13140         it.
13141         (vee_expunge): Same for expunge.
13142         (vee_set_message_flags): Call parent class, then mirror flags to
13143         subfolder.
13144         (vee_get_message_user_flag): Removed, we just use the default
13145         impl, and our flags should always match.
13146         (vee_set_message_user_flag): Snoop the set and set on subfolder.
13147         (vee_get_message_flags): Removed, jsut use parent impl, assume our
13148         copy matches the real ones.
13149         (get_real_message): Removed.  We sort ofneed to keep the
13150         summaryitem refed while we use it, so this doesn't make as much
13151         sense as it did once.
13152         (camel_vee_folder_finalise): Unhook listening events as we unref
13153         folders.
13154         (camel_vee_folder_new): Set the summary messageinfo data size
13155         properly.
13156         (vfolder_remove_match): Fixed for summary change.
13157         (folder_changed): ditto.  Also stopped changed items from being
13158         re-searched and possibly removed.  Might have to resort to the old
13159         whole-search idea again.
13160         (message_changed): Similarly.  Might be easier just not to bother
13161         with a whole search.
13162
13163         * providers/vee/camel-vee-folder.h: Removes summary
13164         hashtable/array, and use a real summary object.  Sigh, more work.
13165
13166         * providers/nntp/camel-nntp-folder.c (nntp_folder_sync): Move
13167         summary to folder object.
13168         (nntp_folder_get_message_count): Removed, use default impl.
13169         (nntp_folder_set_message_flags): Call parent impl to do the work,
13170         but snoop for newsrc.
13171         (nntp_folder_get_uids): Removed, use default impl.
13172         (nntp_folder_get_summary): "
13173         (nntp_folder_get_message_info): "
13174         (nntp_folder_free_message_info): "
13175         (camel_nntp_folder_new): moved summary to folder class
13176         
13177         * providers/imap/camel-imap-folder.c (camel_imap_folder_init):
13178         Move summary to folder object.
13179         (camel_imap_folder_new): "
13180         (imap_finalize): No longer unref the summary (or infact, do
13181         anything else either).
13182         (imap_refresh_info): move summary to folder object.
13183         (imap_sync): "
13184         (imap_get_message_count): Removed, use default impl.
13185         (imap_get_unread_message_count): "
13186         (imap_get_uids): "
13187         (imap_get_summary): "
13188         (imap_free_summary): "
13189         (imap_get_message_info): "
13190         (imap_free_message_info): "
13191         (imap_get_message_flags): "
13192         (imap_set_message_flags): "
13193         (imap_get_message_user_flag): ", this changes functionality, but
13194         only by providing non-permanent flags.
13195         (imap_set_message_user_flag): "
13196         (imap_update_summary): move summary to folder object, and use
13197         camel_folder_summary_info_new_from_header, instead of calling the
13198         virtual function directly.
13199
13200         * providers/local/camel-maildir-folder.c (maildir_append_message):
13201         move summary to folder object, again.
13202         (maildir_get_message): "
13203
13204         * providers/local/camel-mh-folder.c (mh_append_message): move
13205         summary to folder object.
13206         (mh_get_message): "
13207
13208         * providers/local/camel-mbox-folder.c (mbox_append_message): Move
13209         summary to folder object
13210         (mbox_get_message): "
13211         (mbox_set_message_user_flag): We need our own copy of this, sigh,
13212         so we can track if the xev needs a rewrite (probably, its only a
13213         guide anyway).
13214         (mbox_set_message_user_tag): Same same with this one.
13215         (camel_mbox_folder_class_init): Link in these new virtual functions.
13216
13217         * providers/local/camel-local-folder.h (CamelLocalFolder): removed
13218         summary.
13219
13220         * providers/local/camel-local-folder.c (local_get_message_count): 
13221         (local_get_unread_message_count): 
13222         (local_get_uids): 
13223         (local_get_summary): 
13224         (local_free_summary): 
13225         (local_get_message_info): 
13226         (local_free_message_info): 
13227         (local_get_message_flags): 
13228         (local_set_message_flags): 
13229         (local_get_message_user_flag): 
13230         (local_set_message_user_flag): 
13231         (local_get_message_user_tag): 
13232         (local_set_message_user_tag): Removed, all now use default
13233         implementation.
13234         (camel_local_folder_class_init): Removed overrides.
13235         (local_init): Clear folder->summary.
13236         (local_finalize): move summary to folder.
13237         (camel_local_folder_construct): "
13238         (local_sync): "
13239
13240         * camel-folder.c (free_summary): Provide a real impl.
13241         (get_summary): "
13242         (free_uids): "
13243         (get_uids): "
13244         (free_message_info): "
13245         (get_message_info): "
13246         (set_message_user_tag): "
13247         (get_message_user_tag): "
13248         (set_message_user_flag): "
13249         (get_message_user_flag): "  Sigh, the last so far.
13250         (get_message_flags): Sigh, 1 more afterall.
13251         (get_unread_message_count): And and this.
13252         (get_message_count): and this!
13253         (set_message_flags): Sigh, and this.
13254         (camel_folder_finalize): Unref the summary if we have it.
13255         (camel_folder_free_uids): Remove locking.
13256         (camel_folder_get_message_flags): Remove locks, since the summary
13257         is now mt-safe.
13258         (camel_folder_set_message_flags): "
13259         (camel_folder_get_message_user_flag): "
13260         (camel_folder_set_message_user_flag): "
13261         (camel_folder_get_message_user_tag): "
13262         (camel_folder_set_message_user_tag): "
13263         (camel_folder_get_message_info): "
13264         (camel_folder_free_message_info): "
13265         (camel_folder_get_uids): "
13266         (camel_folder_free_summary): "
13267         (camel_folder_get_unread_message_count): "
13268         (get_unread_message_count): Check we got info, no big deal, but
13269         the summary might change while we're counting, and upset the count
13270         slightly.
13271         (camel_folder_get_message_count): Remove locks.
13272
13273         * camel-folder.h (struct _CamelFolder): Added CamelFolderSummary
13274         to the base folder object.  Sigh, this is going to be a lot of
13275         work ...
13276
13277         * camel-service.c (camel_service_init, finalise): changed
13278         connect_lock to be recursive e_mutex.
13279
13280         * camel-remote-store.c (camel_remote_store_init, finalise): Changed
13281         stream_lock to recursive e_mutex.
13282
13283         * camel-private.h (RemoteStorePrivate, ServicePrivate): Use
13284         recursive mutexes for connect_lock & stream_lock.  Ick.  Because
13285         of the imap code.
13286
13287         * providers/imap/camel-imap-private.h: Change the command_lock to
13288         be an EMutex.
13289
13290         * providers/imap/camel-imap-store.c (connect_to_server): Removed
13291         the command_lock stuff.  If we are just connected again, it should
13292         be safe to assume we have exclusive access at this point without
13293         it (and yes, removes a deadlock).
13294         (imap_create): Remove a lock that wasn't even supposed to be
13295         there.
13296         (camel_imap_store_finalize, init): g_mutex->e_mutex(E_MUTEX_REC).
13297         Use a recursive mutex since the imap code is multiply recursivly
13298         calling some functions (sigh, it would be nice to fix this).
13299
13300 2000-12-20  Not Zed  <NotZed@HelixCode.com>
13301
13302         * camel-folder.c (folder_changed): Change the locks to inside the
13303         if.  Stops a deadloc,k and we dont need a lock to read a value.
13304         (message_changed): Likewise.
13305
13306         * camel.c (camel_init): Blah, comment out g_thread_init, leave it
13307         to the caller, since it can only ever be done once.
13308
13309         * camel-folder-thread.c (camel_folder_thread_messages_new): Ref
13310         and save the folder in the thread return.  Also get the summary
13311         once, and access that for the messageinfo's.  Added bonus that now
13312         threads should come out in a similar order.  We need to do this so
13313         that the messageinfo's dont get unref'd under us, and using the
13314         summary directly simplifies memory management.
13315         (camel_folder_thread_messages_destroy): Free the summary/unref the
13316         folder.
13317
13318         * camel-folder-thread.h: Add a folder to CamelFolderThread struct.
13319
13320 2000-12-19  Not Zed  <NotZed@HelixCode.com>
13321
13322         * providers/imap/camel-imap-utils.c (imap_translate_sexp): Unref
13323         using e_sexp_unref, since it is no longer an object.
13324
13325         * tests/lib/camel-test.c: Added a global lock, and made it
13326         thread-aware.
13327
13328         * camel-exception.c: Add a global lock.  Not sure its really
13329         needed here, but it doesn't really hurt.
13330         (camel_exception_clear): Lock around access.
13331         (camel_exception_set): Same.
13332         (camel_exception_setv): "
13333         (camel_exception_xfer): "
13334
13335         * providers/local/Makefile.am (noinst_HEADERS): Added, for
13336         camel-local-private.h
13337
13338         * camel-folder.c (camel_folder_search_by_expression): Removed
13339         locking here, now upto the implementing class to lock.
13340         (camel_folder_search_free): Removed the folder lock here too, for
13341         consistency really, and the locking probably wasn't needed.
13342
13343         * providers/local/camel-local-folder.c (local_get_summary):
13344         Changed to copy/ref the summary items.
13345         (local_free_summary): Unref the summary items/free the array.
13346         (local_get_unread_message_count): Free info lookups.
13347         (local_search_by_expression): Perform more fine-grained locking,
13348         and dont lock the whole folder while searching, just the search
13349         object.  Dum de dum, it *would* be possible to not even have to
13350         lock the search, by using our own copy of the search object each
13351         time.  Could be investigated.
13352         (local_init): Init priaate data/lock.
13353         (local_finalize): Free private data/lock.
13354         (local_search_free): Also lock around the search object, because
13355         it accesses global data inside.
13356
13357         * README.mt: Some info about the mt code development.
13358
13359         * camel-folder-search.c (match_message): Put in a warning, this
13360         plain deadlocks so far, but i'm going to bed now.
13361         (camel_folder_search_finalize): Use e_sexp_unref() since its no
13362         longer an object.
13363
13364         * camel-session.c (camel_session_init): Init private data/lock.
13365         (camel_session_finalise): Free private data/lock.
13366         (camel_session_register_provider): Lock hash insert.
13367         (service_cache_remove): Lock.
13368         (camel_session_list_providers): "
13369         (camel_session_get_service): Lock the whole function.
13370
13371         * camel-session.h (struct _CamelSession): Added private data.
13372
13373         * providers/imap/camel-imap-store.c (camel_imap_store_init): Setup
13374         private data.
13375         (camel_imap_store_finalize): Free private data.
13376         (connect_to_server): Lock around command calls.  I dont think its
13377         needed, but it shouldn't hurt either.
13378         (imap_connect): Lock around command calls.  Again, I don think it
13379         is needed, but wont hurt.
13380         (imap_disconnect): ditto for this one.
13381         (imap_create): Lock around command.
13382         (get_folder): "
13383         (get_folder_info): "
13384         (subscribe_folder): "
13385         (unsubscribe_folder): "
13386         (imap_keepalive): "
13387
13388         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Lock
13389         around calling a command.
13390         (imap_refresh_info): Likewise.
13391         (imap_sync): "
13392         (imap_append_message): "
13393         (imap_copy_message_to): "
13394         (imap_move_message_to): "
13395         (imap_get_message): "
13396         (imap_update_summary): "
13397         (imap_search_by_expression): ", also minor logic cleanup.
13398         (imap_get_summary): Copy/ref the summary items.
13399         (imap_free_summary): And free it now too.
13400
13401         * providers/imap/camel-imap-auth.c (imap_try_kerberos_v4_auth):
13402         Lock the command stream for the command session.
13403
13404         * providers/imap/camel-imap-private.h: Private (locking info)
13405         stuff for imap provider.
13406         (CAMEL_IMAP_STORE_UNLOCK): Fix to call unlock, rather than lock!
13407
13408         * camel-service.c (camel_service_query_auth_types): Lock also for
13409         the connection here, incase the service needs to connect.
13410
13411         * camel-remote-store.c (camel_remote_store_init): Init private
13412         data/lock.
13413         (camel_remote_store_finalise): Readded, free private data/lock.
13414         (remote_send_stream): Changed to return the number of bytes
13415         written, like a good little stream function should.
13416         (camel_remote_store_send_string): Lock for stream access.
13417         (camel_remote_store_send_stream): Same here.
13418         (camel_remote_store_recv_line): And here.
13419         (camel_remote_store_refresh_folders): Lock the store for cache
13420         access.
13421         (timeout_cb): Lock for stream access.
13422
13423 2000-12-18  Not Zed  <NotZed@HelixCode.com>
13424
13425         * camel-service.c (camel_service_init): Init private data.
13426         (camel_service_finalise): Free private data.
13427         (camel_service_connect): Lock around connection access.
13428         (camel_service_disconnect): "
13429
13430         * camel-service.h (struct _CamelService): Added private field.
13431
13432         * camel-store.c (camel_store_init): Init private data/lock.
13433         (camel_store_finalize): Free private data/lock.
13434         (camel_store_get_folder): Lock internal calls.
13435         (camel_store_delete_folder): "
13436         (camel_store_rename_folder): "
13437         (camel_store_get_root_folder): "
13438         (camel_store_get_default_folder): "
13439         (camel_store_get_folder_info): "
13440         (camel_store_folder_subscribed): "
13441         (camel_store_subscribe_folder): "
13442         (camel_store_unsubscribe_folder): "
13443         (lookup_folder): Lock accesses to the folder cache.
13444         (cache_folder): "
13445         (uncache_folder): And here too.
13446
13447         * camel-store.h (struct _CamelStore): Added a private field.
13448
13449         * Makefile.am (noinst_HEADERS): Add camel-private.h.  There is a
13450         comment in that header as to why it ins't installed.
13451
13452         * camel-private.h: New header for private data, that subclasses
13453         can get to.
13454
13455         * tests/lib/camel-test.c (camel_test_init): If we do have threads
13456         enabled already, dont call g_thread_init().
13457         
13458         * tests/lib/folders.c (test_folder_counts): Add free of info.
13459         (test_folder_message): And here too.
13460
13461         * providers/local/camel-maildir-summary.c (remove_summary): Free
13462         info.
13463         (maildir_summary_check): Free info lookups.
13464
13465         * providers/local/camel-mh-summary.c (message_info_new): Removed,
13466         didn't add value.
13467         (remove_summary): free info after being used.
13468         (mh_summary_check): Free info lookups.
13469         (mh_summary_sync): and here too.
13470
13471         * providers/local/camel-mbox-summary.c (summary_update): Free info
13472         lookups.
13473         (mbox_summary_sync_full): Likewise.
13474         (mbox_summary_sync_quick): And here.
13475         (mbox_summary_sync):  ... and here.
13476
13477         * providers/local/camel-maildir-folder.c (maildir_get_message):
13478         Free messageinfo lookups.
13479
13480         * providers/local/camel-mh-folder.c (mh_get_message): Free
13481         messageinfo lookups.
13482
13483         * providers/local/camel-mbox-folder.c (mbox_get_message): Free
13484         messageinfo lookups.
13485
13486         * providers/local/camel-local-summary.c
13487         (message_info_new_from_message): Removed, since it wasn't doing
13488         anything useful.
13489         (message_info_new_from_parser): Same.  And some other dead code.
13490
13491         * providers/local/camel-local-folder.c (local_get_message_info):
13492         deconstify.
13493         (local_free_message_info):new func to free info.
13494         (local_get_uids): 
13495         (local_get_message_flags): 
13496         (local_set_message_flags): 
13497         (local_get_message_user_flag): 
13498         (local_set_message_user_flag): 
13499         (local_get_message_user_tag): 
13500         (local_set_message_user_tag): Free all info lookups.
13501         (local_expunge): Dont call camel_folder_* functions, to avoid a deadlock.
13502
13503         * providers/nntp/camel-nntp-folder.c
13504         (nntp_folder_get_message_info): deconstify.
13505         (nntp_folder_free_message_info): Free summary item.
13506         (nntp_folder_get_message_flags): Free summary lookup.
13507         (nntp_folder_set_message_flags): and here.
13508         (nntp_folder_get_uids): And here.
13509
13510         * providers/imap/camel-imap-auth.c: Make base64_*_simple optional
13511         with the HAVE_KRB4 flag.
13512
13513         * providers/imap/camel-imap-folder.c (imap_free_message_info):
13514         Added a free of the message info.
13515         (imap_refresh_info): 
13516         (imap_sync): 
13517         (imap_refresh_info): 
13518         (imap_get_unread_message_count): 
13519         (imap_get_uids): 
13520         (imap_get_message_flags): 
13521         (imap_set_message_flags): Free any summary lookups.
13522         (imap_get_message_flags): Get the message info directly from the
13523         summary, not via the folder interface.
13524         (imap_move_message_to): Dont call folder functions directly
13525         (delete_message), as it will deadlock since we already have the
13526         lock.
13527
13528         * providers/vee/camel-vee-folder.c (vee_free_message_info): Free/unref
13529         the messageinfo.
13530         (vee_get_message_info): First ref the internal copy, then return it.
13531         (folder_changed): Free all got message info's.
13532         (message_changed): And here.
13533         (get_real_message): And here.
13534         (vee_folder_build): and here.
13535         (vee_folder_build_folder): ... and here.
13536
13537         * camel-folder-summary.c (camel_folder_summary_info_new):
13538         Initialise the messageinfo refcount to 1.
13539         (camel_folder_summary_info_free): Down the refcount till we need
13540         to free.
13541         (camel_folder_summary_info_ref): New function to up the refcount.
13542         (camel_message_info_dup_to): Sewt the refcount of the dest to 1.
13543         (camel_message_info_new): Set refcount to 1.
13544         (camel_message_info_new_from_header): Dont allocate the mi
13545         ourselves.
13546         (camel_message_info_free): Handle refcounting.
13547         (camel_message_info_ref): New function.
13548         (camel_folder_summary_index): Ref the messageinfo before returning
13549         it.
13550         (camel_folder_summary_uid): Likewise.
13551         (camel_folder_summary_save): Access the messageinfo array
13552         directly, rather than through accessors (saves ref/unref).
13553         (camel_folder_summary_clear): Likewise.
13554         (camel_folder_summary_remove_index): Likewise.
13555         (main): Free lookups.
13556
13557         * camel-folder-summary.h (CamelMessageInfo): Added a refcount
13558         value.
13559
13560         * camel-folder.c (camel_folder_free_message_info): New function to
13561         'free' a message info.
13562         (camel_folder_get_message_info): Deconstify return.
13563         (camel_folder_lock): New (internal) function to thread-lock the
13564         folder.
13565         (camel_folder_unlock): Likewise for unlocking.
13566         (freeze): 
13567         (thaw): Lock around access to folder->frozen/changed_frozen.
13568         (folder_changed): Likewise.
13569         (message_changed): Likewise.
13570         (camel_folder_init): Init private data, locks and moved frozen
13571         info.
13572         (camel_folder_finalize): Free new private data, locks and moved
13573         frozen info.
13574         (copy_message_to): Free the messageinfo after we've used it.
13575         (move_message_to): And here too.
13576         (camel_folder_sync): Lock around virtual method invocation.  Just
13577         locking around any virtual method that is known to need it.  This
13578         is the first cut at locking.
13579         (camel_folder_refresh_info): "
13580         (camel_folder_expunge): "
13581         (camel_folder_get_message_count): "
13582         (camel_folder_get_unread_message_count): "
13583         (camel_folder_append_message): "
13584         (camel_folder_set_message_flags): "
13585         (camel_folder_get_message_flags): "
13586         (camel_folder_get_message_user_flag): "
13587         (camel_folder_set_message_user_flag): "
13588         (camel_folder_get_message_user_tag): "
13589         (camel_folder_set_message_user_tag): "
13590         (camel_folder_get_message): "
13591         (camel_folder_get_uids): "
13592         (camel_folder_free_uids): "
13593         (camel_folder_get_summary): "
13594         (camel_folder_search_by_expression): "
13595         (camel_folder_free_summary): "
13596         (camel_folder_search_free): "
13597         (camel_folder_move_message_to): "
13598         (camel_folder_copy_message_to): "
13599         (copy_message_to): Dont call any of our own folder functions
13600         directly, otherwise we will deadlock.
13601         (move_message_to): Likewise.
13602
13603         * camel-folder.h (CamelFolder): Added free_message_info() function
13604         & deconstify get_message_info()'s return.
13605         (CamelFolder): Add a private field (for locks).
13606         (struct _CamelFolder): Moved changed_changed/frozen into private
13607         data, since it really is private and now needs locked access.
13608
13609 2000-12-15  Jeffrey Stedfast  <fejj@helixcode.com>
13610
13611         * camel-mime-utils.c (header_fold): When checking to see if we
13612         need to fold the header, when we come accross a \n, make sure to
13613         start at p + 1 the next time through the loop or else we get into
13614         an infinite loop.
13615
13616 2000-12-13  Dan Winship  <danw@helixcode.com>
13617
13618         * Namespace cleanup: change a bunch of IS_CAMEL_* macros to
13619         CAMEL_IS_*
13620
13621 2000-12-13  Chris Toshok  <toshok@helixcode.com>
13622
13623         * providers/imap/camel-imap-auth.c: add #include <sys/types.h> for
13624         freebsd.
13625
13626 2000-12-12  Christopher James Lahey  <clahey@helixcode.com>
13627
13628         * camel-folder-summary.c, camel-folder-summary.h: Added #ifndef
13629         NO_WARNINGS around a #warning.  Added (void) to the prototype and
13630         declaration of camel_message_info_new.
13631
13632         * camel-mime-message.h: Added an include for
13633         camel-mime-filter-bestenc.h.  Added a prototype for
13634         camel_mime_message_set_best_encoding.  Reformatted prototypes to
13635         line up.
13636
13637         * camel-mime-parser.c: Added #if d(!)0 around the states string
13638         lookup table since it's only used in debugging output.
13639
13640         * camel-seekable-substream.c (stream_flush): Added a cast.
13641
13642         * providers/imap/camel-imap-auth.c: Added #include <netinet/in.h>.
13643
13644         * providers/imap/camel-imap-folder.c (imap_refresh_info): Made uid
13645         and flags const to fix warnings here.
13646
13647         * providers/imap/camel-imap-store.c (get_folder_info): Made p
13648         const to fix warnings here.
13649
13650 2000-12-12  Dan Winship  <danw@helixcode.com>
13651
13652         * tests/lib/Makefile.am: Add missing .h file. (From campd.)
13653
13654 2000-12-11  Not Zed  <NotZed@HelixCode.com>
13655
13656         * providers/smtp/camel-smtp-transport.c (smtp_data): Remove use of
13657         linewrap filter.  Headers are now wrapped.  encode_8bit already
13658         enforces a 998 octet line limit.
13659         (smtp_data): Also fixed a memleak, we always have to unref our own
13660         copy of the filters.  We also dont need to remove them manually,
13661         so dont bother.  The type's an int too ...
13662
13663         * camel-internet-address.c (internet_unformat): When scanning past
13664         quotes, remove them also.
13665         (camel_internet_address_format_address): If the name contains "'s,
13666         or ','s then strip and quotes and wrap the whole lot in one set of
13667         quotes.
13668         
13669         * Makefile.am (noinst_HEADERS): We dont want to install
13670         camel-charset-map-private.h, ever.  There are probably other
13671         similar files ..?
13672
13673         * camel-mime-part.c (write_to_stream): Fold header lines
13674         appropriately as we're writing them out.
13675
13676         * camel-mime-utils.c (header_fold): Add a new argument, headerlen,
13677         tells it how long the associated header token is.
13678         (header_fold): Also,k check to see if we need to fold first, using
13679         a better algorithm, and also accept already-folded lines, and
13680         re-process accordingly.
13681         (rfc2047_decode_word): Add a little buffer space to iconv output
13682         for shifting overheads?
13683         (rfc2047_decode_word): finish the iconv with a null call, to flush
13684         shift state, etc.
13685         (rfc2047_encode_word): Attempt to break up long words into
13686         appropriately sized, independent, chunks.  See rfc2047, section 2.
13687         (header_decode_mailbox): Dont add in extra spaces into the output
13688         if we are decoding adjacent encoded words.  We can only guess this
13689         case, as some broken mailers put encoded words inside quoted
13690         words.
13691         (header_encode_phrase): Dont merge words if they are going to end
13692         up too long.  Also change back ot only merge consecutive words of
13693         the same type.  e.g. 'foo. blah fum.' -> "foo." blah "fum."  or
13694         'iam an. idiot' -> iam "an." idiot
13695
13696         * camel-medium.c (camel_medium_set_header): Hrm, we actually want
13697         to call set_header, not add_header here, probably explains some
13698         duplicate X-Evolution headers i was trying to track down.  Also
13699         changed the api to handle a NULL value == remove the header.
13700
13701         * providers/local/camel-maildir-summary.c
13702         (maildir_summary_decode_x_evolution): Always return error, we dont
13703         use x-evolution for maildir.
13704         (maildir_summary_encode_x_evolution): Always return a NULL string,
13705         likewise.
13706         (maildir_summary_add): Hook in here, since the _new function
13707         doesn't have access to any flags from the caller.  If we have
13708         flags, then update the filename again.  Not ideal, but should
13709         work.
13710
13711 2000-12-08  JP Rosevear  <jpr@helixcode.com>
13712
13713         * tests/message/Makefile.am: Remove test3 from build until the files
13714         show up
13715         
13716 2000-12-09  Not Zed  <NotZed@HelixCode.com>
13717
13718         * camel-mime-message.c (camel_mime_message_set_date): Change the
13719         sign of the default date offset when none is supplied.
13720         (camel_mime_message_set_date): Also do dst if its dst (forward 1
13721         hour).  Fixes #928 + some.
13722
13723 2000-12-06  Not Zed  <NotZed@HelixCode.com>
13724
13725         * tests/lib/camel-test.h (check): Change line no format so that
13726         emacs can detect it.
13727
13728 2000-12-06  Jeffrey Stedfast  <fejj@helixcode.com>
13729
13730         * providers/imap/camel-imap-folder.c (imap_refresh_info): We want
13731         to bitwise-or the server and cached flags here so that we keep the
13732         flags that we have set locally and set any additional flags that a
13733         parallel connection may have set.
13734
13735 2000-12-05  Jeffrey Stedfast  <fejj@helixcode.com>
13736
13737         * providers/smtp/camel-smtp-transport.c (smtp_data): If the data
13738         wrapper fails to be written to the stream, unref it and the
13739         filters before returning.
13740
13741 2000-12-05  Dan Winship  <danw@helixcode.com>
13742
13743         * providers/imap/camel-imap-folder.c (imap_get_message): use
13744         BODY.PEEK[] rather than RFC822, so the message doesn't get marked
13745         as \Seen.
13746         (imap_refresh_info): Fix a really really really dumb bug.
13747
13748 2000-12-05  Dan Winship  <danw@helixcode.com>
13749
13750         * providers/imap/camel-imap-folder.c (imap_set_message_flags): Fix
13751         the check for "flags aren't actually changing".
13752
13753         * providers/local/camel-local-folder.c (local_set_message_flags,
13754         local_set_message_user_flag, local_set_message_user_tag): Don't
13755         emit message_changed unless the flags actually changed.
13756
13757         * providers/nntp/camel-nntp-folder.c
13758         (nntp_folder_set_message_flags): Don't emit message_changed unless
13759         the flags actually changed. Fix the check for marked as seen.
13760
13761 2000-12-05  Not Zed  <NotZed@HelixCode.com>
13762
13763         * camel-seekable-substream.c (stream_flush): stream_flush does
13764         make sense for a substream afterall (if you have a stream_write).
13765         (stream_write): Implement this.
13766         (stream_seek): Change the STREAM_END behaviour to be more sane.
13767         if bounded go from the end of the bound, if unbounded, go from the
13768         end of the parent stream.
13769
13770         * camel-stream-mem.c (stream_read): Dont return error if reading
13771         past the end of data, just return 0.
13772
13773         * camel-stream-fs.c (camel_stream_fs_init): Initialise the stream
13774         to be unbound.
13775         (stream_seek): Fix the logic when seeking from the end of an
13776         unbounded stream.
13777         (camel_stream_fs_new_with_fd): If the fd is invalid (-1), then
13778         return NULL immediately.
13779         (stream_seek): Range check a SEEK_END so it fits within
13780         bound_start.
13781
13782 2000-12-01  Not Zed  <NotZed@HelixCode.com>
13783
13784         * tests/lib/folders.c (test_folder_basic): New test to perform
13785         basic store operations on folders (taken from folders/test1).
13786         (test_folder_message_ops): Tkane the guts out of folders/test2.
13787
13788 2000-12-04  Jeffrey Stedfast  <fejj@helixcode.com>
13789
13790         * providers/smtp/camel-smtp-transport.c (smtp_connect): i18n-ize
13791         exception strings.
13792         (get_name): And here.
13793         (_send_to): Here too.
13794         (smtp_helo): And here and there...
13795         (smtp_mail): And around the square...
13796         (smtp_rcpt): Saying catch me if you can...
13797         (smtp_data): And here three.
13798         (smtp_rset): And here.
13799         (smtp_quit): And finally here.
13800
13801 2000-12-01  Jeffrey Stedfast  <fejj@helixcode.com>
13802
13803         * camel-folder-search.h: Added system_flag to CamelFolderSearchClass
13804
13805         * camel-folder-summary.c (camel_system_flag_get): Convenience
13806         function to return whether or not a flag is set using a string as
13807         the flag name.
13808         (camel_system_flag): Return the integer value of the flag string.
13809
13810         * camel-folder-search.c (search_system_flag): New ESExp callback
13811         for allowing vfoldering on CamelMessageInfo flags.
13812
13813 2000-12-01  Dan Winship  <danw@helixcode.com>
13814
13815         * camel-service.c (camel_service_disconnect): Don't
13816         g_return_if_fail if the service is already disconnected. Just
13817         return.
13818
13819         * providers/pop3/camel-pop3-store.c (pop3_try_authenticate):
13820         Return FALSE (don't try again) if we get CAMEL_POP3_FAIL.
13821         (pop3_connect): If we don't succeed, disconnect.
13822
13823 2000-11-30  Jeffrey Stedfast  <fejj@helixcode.com>
13824
13825         * providers/imap/camel-imap-store.c
13826         (parse_list_response_as_folder_info): Fix a possible bug where
13827         'name' could be uninitialized.
13828
13829         * camel-folder-summary.c (camel_message_info_new): New convenience
13830         function, doesn't do much but it sure makes code cleaner to read.
13831         (camel_message_info_new_from_header): This one makes my life heaven.
13832
13833 2000-11-30  Jeffrey Stedfast  <fejj@helixcode.com>
13834
13835         * providers/imap/camel-imap-summary.c (camel_imap_summary_new):
13836         Handle the case where the summary failed to load - clear the
13837         summary and then set the dirty bit so that it is sure to save
13838         later. Is this the right fix?
13839
13840 2000-11-30  Dan Winship  <danw@helixcode.com>
13841
13842         * camel-exception.c (camel_exception_setv): Remove unused
13843         variable.
13844
13845 2000-11-30  Not Zed  <NotZed@HelixCode.com>
13846
13847         * providers/local/camel-mbox-folder.c (mbox_get_message): Remove
13848         assertion that content is there, when it no longer can be.
13849
13850         * camel-folder-summary.h: Removed pos/bodypos/endpos from
13851         camelmeessagecontentinfo.
13852         (CamelMessageFlags): Added an attachments flag.
13853
13854         * providers/local/camel-local-summary.h: Added load virtual
13855         function.
13856
13857         * tests/lib/folders.c (test_message_info): Accessors.
13858         (test_folder_message): "
13859
13860         * camel-folder-thread.c (get_root_subject): Fix accessors.
13861         (dump_tree_rec): "
13862
13863         * camel-folder-search.c (camel_folder_search_execute_expression):
13864         Accessors for messageinfo.
13865         (search_match_all): "
13866         (search_header_contains): "
13867         (search_header_contains): "
13868         (search_body_contains): "
13869         (camel_folder_search_execute_expression): Use mepool_strdup.
13870
13871         * providers/local/camel-mbox-summary.c (summary_update): Accessors
13872         for messageinfo.
13873         (mbox_summary_sync_full): "
13874
13875         * providers/local/camel-mh-summary.c (remove_summary): Accessors
13876         for messageinfo.
13877         (mh_summary_check): "
13878         (mh_summary_sync_message): "
13879         (mh_summary_sync): "
13880
13881         * providers/local/camel-mh-folder.c (mh_append_message): Use
13882         accessor for uid.
13883
13884         * providers/local/camel-local-summary.c
13885         (local_summary_decode_x_evolution): Use accessor to uid.
13886         (local_summary_encode_x_evolution): Likewise.
13887         (message_info_new): And here.
13888         (camel_local_summary_load): Call virtual load function.
13889         (local_summary_load): Default load function, load summary.
13890         (camel_local_summary_load): Check file exists before trying to
13891         load.
13892         (camel_local_summary_construct): Turn off building content info!
13893         (CAMEL_LOCAL_SUMMARY_VERSION): Bump, since we dont build content
13894         info anymore.
13895         (camel_local_summary_load): After a successful load/check, do a
13896         save too so we dont have to go through it again randomly.
13897
13898         * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): Use
13899         accessors for messageinfo.
13900
13901         * providers/nntp/camel-nntp-folder.c (nntp_folder_get_uids): Use
13902         accessors for uid.
13903
13904         * providers/imap/camel-imap-folder.c (imap_refresh_info): Use
13905         accessor for uid.
13906         (imap_sync): Likewise.
13907         (imap_get_uids): Likewise.
13908         (imap_update_summary): And here.
13909
13910         * providers/vee/camel-vee-folder.c (vfolder_remove_match): Use
13911         accessor for uid.
13912         (vfolder_add_match): Handle estrv stuff.
13913         (vfolder_change_match): Accessor for uid.
13914         (get_real_message): "
13915         (vee_get_uids): "
13916         (vee_folder_build): " + estrv.
13917         (vee_folder_build_folder): "
13918
13919         * providers/local/camel-maildir-folder.c (maildir_append_message):
13920         Use acccessors for uid's.
13921         (maildir_get_message): Here too.
13922
13923         * providers/local/camel-maildir-summary.c
13924         (camel_maildir_summary_init): Setup the string count for us.
13925         (message_info_new): Access the string array directly.
13926         (message_info_free): No need to free string if using array.
13927         (camel_maildir_summary_info_to_name): Use accessor to get to uid.
13928         (remove_summary): And here.
13929         (maildir_summary_check): Likewise.
13930         (maildir_summary_sync): And here.
13931         (maildir_summary_load): Load up a cache of uid->filename mappings
13932         before loading the actual summary file.  This saves us having to
13933         waste the diskspace storing the filenames in the summary itself,
13934         and also helps us sync the summary better on load.
13935         (message_info_load): If we have the load_map setup, and the uid
13936         exists, then set the filename cache from it, and update the flags
13937         from the name, incase our summary mismatches it.
13938
13939         * camel-folder-summary.c (camel_folder_summary_init): Setup string
13940         count for compressed info record.  An optional compile mode which
13941         stores all strings for a given messageinfo into a packed array,
13942         which should save 36-50 bytes/record.
13943         (camel_folder_summary_info_new): Init the string array.
13944         (message_info_new): Set the string array items, as required.
13945         (message_info_load): And here too.
13946         (message_info_save): Use accessors to get to strings.
13947         (message_info_free): Free strings as one.
13948         (camel_message_info_dup_to): Handle packed array case.
13949         (camel_folder_summary_add): Use accessors.  And pack the strv
13950         before storing it.
13951         (summary_assign_uid): New function to assign a unique uid to a
13952         message, if it doesn't have one.
13953         (camel_folder_summary_add): Call assign_uid instead of doing it
13954         ourselves.
13955         (camel_folder_summary_info_new_from_parser): "
13956         (camel_folder_summary_info_new_from_message): "
13957         (camel_folder_summary_encode_string): constify.
13958         (camel_folder_summary_encode_token): "
13959         (summary_build_content_info_message): Fix accessors to messageinfo.
13960         (CAMEL_FOLDER_SUMMARY_VERSION): Bumped, for removal of
13961         contentinfo->pos data.
13962         (camel_folder_summary_info_new_from_parser): Calculate the size
13963         based on the parser position, not the removed contentinfo stuff.
13964         (camel_folder_summary_info_new_from_message): Remove size stuff.
13965         (camel_folder_summary_offset_content): Removed, no longer means anything.
13966         (content_info_new): 
13967         (content_info_load): 
13968         (content_info_save): 
13969         (summary_build_content_info): Remove stuff for contentinfo->pos*.
13970         (summary_build_content_info): Take a msginfo argument, set
13971         attachments flag if we find any attachments.
13972         (summary_build_content_info_message): set attachments flag if we
13973         find any attachments.
13974         (camel_folder_summary_info_new_from_parser): Always scan the
13975         content info, even if we dont save it.
13976         (camel_folder_summary_info_new_from_message): And here too.
13977         (summary_build_content_info): Only create the contentinfo stuff if
13978         we have it turned on, otherwise just parse and discard.
13979         (summary_build_content_info_message): Likewise.
13980
13981 2000-11-29  Jeffrey Stedfast  <fejj@helixcode.com>
13982
13983         * camel-store.c (camel_store_get_folder): Updated the gtk-doc
13984         comment.
13985
13986 2000-11-29  Dan Winship  <danw@helixcode.com>
13987
13988         * camel-mime-utils.c: 
13989         * camel-mime-filter-charset.c: Use iconv instead of unicode_iconv.
13990
13991         * providers/imap/camel-imap-command.c (imap_read_untagged): Fix
13992         some off-by-one-ness.
13993
13994         * camel-stream-buffer.c (stream_read): Fix another bug found in
13995         previously-unused code here.
13996
13997 2000-11-29  Ettore Perazzoli  <ettore@helixcode.com>
13998
13999         * tests/lib/Makefile.am (INCLUDES): `$(top_srcdir)' for builddir
14000         != srcdir compilation.
14001
14002 2000-11-29  Not Zed  <NotZed@HelixCode.com>
14003
14004         * tests/message/test2.c (main): Add a missed unref.
14005
14006         * camel-stream-mem.c (camel_stream_mem_set_buffer): We must set
14007         ourselves as the owner of the byte-array.
14008         Weird, someone has modified this file (its been reindented), but i
14009         can't see any changelogs ...
14010
14011         * tests/lib/messages.c (content_finalise): Fix memleak in tester,
14012         free byte array when our content object is deleted.
14013
14014         * camel-folder-search.c (camel_folder_search_finalize): Yeah
14015         great, so the sexp is a gtk object, not a camel object.  Isn't
14016         that going to be fun to fix?
14017
14018         * camel-session.c (camel_session_finalise): Free the storage path.
14019
14020         * providers/local/camel-local-store.c (camel_local_store_init): If
14021         store->folders is setup, free it first, then overwrite.  Hmm,
14022         this seems a bit crappy to me.
14023
14024         * camel-store.c (camel_store_init): Dont setup store->folders if
14025         its already setup.
14026
14027         * camel-exception.c (camel_exception_setv): Removed a memleak.  no
14028         need to strdup after a strdup_printf!!!
14029
14030         * camel-address.c (camel_address_finalize): Free the address
14031         ptrarray, once finished.
14032
14033         * providers/local/camel-local-folder.c (local_finalize): Make sure
14034         we dont leave the folder locked on close.
14035         (local_finalize): Free summary/search.
14036
14037         * providers/local/camel-mh-summary.c (mh_summary_next_uid_string):
14038         Small memleak, always free name after using it.
14039
14040         * camel-mime-part.c (set_content_object): Free txt after setting
14041         the header.
14042
14043         * providers/local/camel-maildir-summary.c (maildir_summary_check):
14044         Fix a memleak, close the dir after scanning new.
14045         (message_info_free): Added so we can free the filename cached in
14046         the messageinfo.
14047         (camel_maildir_summary_finalise): Free the hostname.
14048
14049         * tests/folder/test[12].c (main): Clear out camel-test before
14050         starting.
14051
14052         * providers/local/camel-mbox-summary.c (mbox_summary_sync_quick):
14053         Because encode_x_evolution folds the line (sigh, because
14054         encode_param does, unlike every other function in
14055         camel-mime-utils), unfold the encoded result before comparing.
14056         (mbox_summary_sync_quick): Another small memleak, free xevnew once
14057         finished with it.
14058
14059         * camel-mime-utils.c (header_decode_quoted_string): Removed a
14060         redundant check for c=0.
14061         (header_unfold): New function to un-fold headers.
14062
14063         * providers/local/camel-local-summary.c
14064         (local_summary_encode_x_evolution): some problems with encoding
14065         tags, using the wrong output strings.
14066         (local_summary_encode_x_evolution): We dont need to append a ;
14067         either, param_list_format_append() will do it for us.
14068
14069 2000-11-28  JP Rosevear  <jpr@helixcode.com>
14070
14071         * camel-lock.c: No longer hard code the enabled lock types
14072
14073 2000-11-28  Dan Winship  <danw@helixcode.com>
14074
14075         * camel-remote-store.c (remote_recv_line): Don't set exception to
14076         g_strerror (errno) when nread == 0, because it won't have been
14077         set.
14078
14079         * providers/pop3/camel-pop3-folder.c (pop3_finalize): Don't try to
14080         free things if they haven't been set yet.
14081
14082 2000-11-28  Jeffrey Stedfast  <fejj@helixcode.com>
14083
14084         * providers/smtp/camel-smtp-transport.c (smtp_connect): Clear the
14085         exception if EHLO fails before trying HELO in the cases where the
14086         SMTP provider doesn't announce its ESMTPness.
14087
14088 2000-11-28  Not Zed  <NotZed@HelixCode.com>
14089
14090         * providers/local/camel-maildir-summary.c
14091         (camel_maildir_summary_init): Set the info size's properly, oops!
14092
14093         * tests/lib/folders.[ch]: Folder testing helpers.
14094
14095         * tests/folder/test2.c: Test basic message ops on folders.
14096
14097         * tests/folder/test1.c (main): Test basic folder ops on (local)
14098         stores.
14099
14100         * providers/local/camel-local-provider.c
14101         (camel_provider_module_init): Removed some debug.
14102
14103         * providers/local/camel-maildir-folder.c
14104         (camel_maildir_folder_class_init): fix parent class.
14105
14106         * providers/local/camel-mh-folder.c (camel_mh_folder_class_init):
14107         Fix parent class (damn cut & paste).
14108
14109         * providers/local/camel-maildir-store.c (get_folder): Call parent
14110         impl.
14111         (camel_maildir_store_class_init): Fix parent class setup.
14112         (delete_folder): Check the folder exists before trying to delete
14113         it.
14114         (delete_folder): Try and make the delete operation atomic/rollback
14115         failures.  e.g. if one directory isn't empty, then create the
14116         other empty ones back.  Also clear the tmp directory fully first.
14117
14118         * providers/local/camel-mbox-store.c (get_folder): Call parent
14119         impl.
14120         (camel_mbox_store_class_init): parent class is camel_local_store,
14121         not camel_folder, oops.
14122         (delete_folder): Return an error if it doesn't exist, rather than
14123         covering it up.
14124
14125         * providers/local/camel-mh-store.c (get_folder): Call parent impl.
14126         (camel_mh_store_class_init): fix parent class setup.
14127         (delete_folder): Error if it doesn't exist now.
14128
14129         * camel-folder.c (camel_folder_move_message_to):
14130         (camel_folder_copy_message_to): Added warnings as these functions
14131         are going to be removed later.
14132
14133         * camel-store.c (camel_store_get_root_folder): Fix for an early
14134         api change.  We want CAMEL_STORE_FOLDER_CREATE, not TRUE, since
14135         its a flag.
14136         (camel_store_get_default_folder): And here too.
14137
14138         * providers/local/camel-local-store.c (xrename): Handle renaming
14139         folders differently to renaming files.
14140         (get_default_folder_name): local stores dont have a default
14141         folder, so make it so.  Or at least, it doesn't seem to make sense
14142         to have one.
14143         (get_root_folder_name): Same for root.
14144         (get_folder): Added parent implementation, that makes sure the
14145         service path exists, if we are creating a new folder (but doesn't
14146         create the folder).
14147
14148 2000-11-27  Not Zed  <NotZed@HelixCode.com>
14149
14150         * providers/local/camel-local-store.c (xrename): Fixed races.  Use
14151         link/unlink, rather than rename, to properly detect overwriting
14152         another file.  And allow some files to be missing.
14153
14154 2000-11-28  Radek Doulik  <rodo@helixcode.com>
14155
14156         * providers/local/camel-local-summary.c
14157         (local_summary_decode_x_evolution): add scan = scan->next; to
14158         avoid infinite loop
14159
14160 2000-11-27  Dan Winship  <danw@helixcode.com>
14161
14162         * providers/imap/camel-imap-command.c (imap_read_untagged): Make
14163         this gratuitously more complicated. No wait, I mean, fix bugs. Now
14164         fully handles NULs in the data stream (which "can't happen" but
14165         do) and also handles responses containing multiple literals. Also
14166         does less copying than the original code.
14167
14168         * camel-stream-buffer.c (stream_read): Fix a bug that could make
14169         it lose sync and/or overrun buffers.
14170
14171 2000-11-27  JP Rosevear  <jpr@helixcode.com>
14172
14173         * providers/local/.cvsignore: shush
14174
14175 2000-11-27  Not Zed  <NotZed@HelixCode.com>
14176
14177         * providers/Makefile.am: Removed mh, mbox, added local, to the default.
14178
14179 2000-11-24  Not Zed  <NotZed@HelixCode.com>
14180
14181         * tests/data/getaddr.pl: little util to scan mailboxes for any and
14182         every address they contain.
14183
14184         * tests/message/test2.c (main): Added a bunch of stuff to test
14185         decoding/reencoding/etc of internationalised addresses.
14186
14187         * tests/message/lib/address-data.h: Copy of some unicode/other
14188         testing data.  **Beware** of editing this file in emacs, it'll
14189         probably try and convert all the characters to something
14190         unusable.
14191
14192         * tests/lib/camel-test.c (camel_test_break): Add a debugger hook
14193         point.
14194
14195         * camel-mime-utils.c (quoted_encode): Check for space and convert
14196         to _ separately.
14197         (header_decode_mailbox): Fixed the 'check comments for realname'
14198         code, problem was the domain getting code was skipping all
14199         whitespace/comments before we could get a look-in.  This is
14200         approximate but fairly robust.
14201         (header_decode_text): Dont use the c-type isspace func here, we
14202         want a specific whitespace only.
14203         (header_decode_text): If we have decoded words next to each other,
14204         do not insert whitespaces between them, which is what rfc2047 requires.
14205         (header_decode_text): Make c unsigned too.
14206
14207         * tests/README: Added at least some explanation of all this stuff.
14208
14209         * tests/lib/camel-test.h (check_msg): Added a non-gcc version of
14210         the fail command, we dont get the expression that failed, but no
14211         matter.  Should be (more) portable now.
14212         (check, check_msg): Put the file/lineno in the default message.
14213
14214         * Makefile.am (SUBDIRS): Add tests.
14215
14216         * camel-mime-filter-basic.c (filter): Well, I'll add the extra
14217         bytes here too, lathough not strictly needed, might save a
14218         re-malloc when we get to complete().
14219
14220         * camel-mime-filter-charset.c (filter): Make sure we have room if
14221         we only convert very short data.
14222         (complete): and here too.
14223
14224         * tests/Makefile.am: Initial test harness & tests.  Requires gcc
14225         for this.
14226
14227         * camel-internet-address.c (d): Turn off debug.
14228
14229         * camel-charset-map.c (camel_charset_step): Oops, & masks for set
14230         intersection, not | them.  Dunno how this got even close to
14231         working.
14232
14233 2000-11-23  Not Zed  <NotZed@HelixCode.com>
14234
14235         * camel-mime-filter-basic.c (filter): For base64 encoding, the
14236         output size for 0, 1, or 2 bytes of input can exceed input*2, so
14237         make sure we account for that as well.
14238         (complete): And here.
14239         (complete): Similarly for qp encoding, if we have a trailing
14240         space, we need some extra bytes (not needed for 'filter()', as any
14241         such bytes are stored in state/save).
14242
14243         * camel-mime-utils.c (quoted_decode_step): Removed fixme not required.
14244         (quoted_encode_close): Dont append a trailing afterall.  Otherwise
14245         a pass through the encode/decode will grow the message each time.
14246
14247 2000-11-22  Radek Doulik  <rodo@helixcode.com>
14248
14249         * camel-mime-utils.c (header_msgid_generate): check for return
14250         values
14251
14252 2000-11-21  Dan Winship  <danw@helixcode.com>
14253
14254         * camel-lock.c: 
14255         * camel-movemail.c: add #ifdef HAVE_ALLOCA_H
14256
14257 2000-11-21  Not Zed  <NotZed@HelixCode.com>
14258
14259         * providers/local/camel-mh-summary.c (mh_summary_sync_message):
14260         Shite, -1 on error, >=0 on success.  So i've just been truncating
14261         all the messages I touched, good one zed.
14262         (mh_summary_sync_message): Sigh, and write to the right damn fd as
14263         well.
14264         (mh_summary_sync_message): Argh, and we need to compare the length
14265         of the old xev -1 to the new xev, to check if we can optimise it.
14266
14267         * camel-folder.c (camel_folder_change_info_new): Init the pool.
14268         (camel_folder_change_info_add_source): Allocate string in the
14269         pool.
14270         (camel_folder_change_info_add_source_list): 
14271         (camel_folder_change_info_add_update): No longer free the key, as
14272         it cannot be yet.
14273         (change_info_add_uid): Add a new arg, copy, telling it whether to
14274         copy the uid argument or not, and copy using mempool_strdup.
14275         (change_info_cat): Tell add_uid to copy the string.
14276         (camel_folder_change_info_add_update): Call add_uid directly.
14277         (change_info_remove): Call add_uid directly, with no copy, and
14278         dont free the key.
14279         (change_info_free_update): No longer required since we dont malloc
14280         the keys.
14281         (camel_folder_change_info_add_uid): Fix for add_uid change.
14282         (camel_folder_change_info_remove_uid): 
14283         (camel_folder_change_info_change_uid): 
14284         (change_info_clear): No longer needed, just set the size to 0 on
14285         the array directly.
14286         (camel_folder_change_info_clear): Empty the arrays directly, and
14287         flush the mempool too, and also clear uid_source, incase anyone
14288         was silly enough to call us in the wrong order.
14289         (camel_folder_change_info_free): Dont bother clearing the array's
14290         contents, just free the pool and throw away all the indexes.
14291
14292         * camel-folder.h: Added a mempool to CamelFolderChangeInfo to
14293         store the uid's we get.
14294
14295         * camel-folder-search.c (search_match_all): If we are only
14296         matching a single info, just use that/do the search.
14297         (camel_folder_search_match_expression): New function.  Matches a
14298         single message info against an expression.
14299         (camel_folder_search_init): Init a hash table used to map the
14300         returned gptrarrays' to mempools.
14301         (camel_folder_search_execute_expression): Store all of the string
14302         data in a mempool, slightly faster, less wasted space (usually),.
14303         (camel_folder_search_free_result): Check for the mempool that
14304         stores the data for the list, and free that if we have it,
14305         otherwise assume we need to use g_free() (which should only happen
14306         if the list is empty at the moment).
14307         : commented out the debugging prints.  Got sick of 'executing
14308         header search' crap.
14309
14310         * providers/vee/camel-vee-folder.c (camel_vee_folder_init): Init
14311         changes.
14312         (camel_vee_folder_finalise): Free changes.
14313         (vfolder_add_match): Simple helper to add a new matching info
14314         record.
14315         (camel_vee_folder_add_folder): Only trigger a changed event if we
14316         have changes.
14317         (vfolder_change_match): New function, changes our local vfolder
14318         info to match the source.
14319         (vfolder_add_match): Add a new info to the vfolder list.
14320         (vfolder_remove_match): Remove a no-longer matching info from the
14321         vfolder summary.
14322         (message_changed): check if the message still matches, and
14323         remove/etc as required.
14324         (camel_vee_folder_finalise, init): init/free search object.
14325         (vee_folder_build_folder): Build the changes to the folder into
14326         the changes data, as we go.
14327         (folder_changed): If the folder gave us an explicit list of
14328         changes, then process each one separately (unless there's a lot
14329         added/changed).
14330
14331         * providers/vee/camel-vee-folder.h: Added a changes field to the
14332         folder.
14333
14334         * Makefile.am (libcamel_la_SOURCES): Added
14335         camel-folder-thread.[ch].
14336
14337         * camel-folder-thread.c: message-threading algorithm, taken from
14338         evolutions' mail component, as it is generally more useful than
14339         just for evolution itself.  Changed to use e-memchunks as well to
14340         speed it up a little and use less mem.
14341
14342 2000-11-20  Jeffrey Stedfast  <fejj@helixcode.com>
14343
14344         * camel-remote-store.c (remote_recv_line): Fixed to return the
14345         correct bytecount in all cases which is the real fix to
14346         imap_parse_nstring.
14347
14348         * providers/imap/camel-imap-command.c (imap_read_untagged): Again,
14349         don't use strlen for the post-data, use 'n'.
14350
14351         * providers/imap/camel-imap-utils.c (imap_parse_nstring): Undo my
14352         previous temp-fix.
14353
14354 2000-11-20  Not Zed  <NotZed@HelixCode.com>
14355
14356         * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): Fixes for
14357         the summary messageid changes.  Hash the messageid and store it.
14358         (get_XOVER_headers): Use camel_folder_summary_info_new() to create
14359         the summary item before adding it.
14360
14361         * camel-folder-summary.h (CamelMessageInfo): Changed the
14362         messgae-id to be an 8 byte md5 hash, and the references list to be
14363         an array of these.
14364
14365         * providers/local/camel-mh-summary.c (mh_summary_sync_message):
14366         New function, sync out the message info stuff.  Only updates the
14367         X-Ev header if it can get away with it, otherwise writes out a
14368         whole new message.
14369         (mh_summary_sync): Added more functionality.  All summary info is
14370         now written to the X-Ev header, etc, and new messages re-written
14371         if required during the sync process.
14372
14373         * providers/local/camel-local-folder.c
14374         (local_set_message_user_flag): Set the XEVCHANGE flag.
14375         (local_set_message_user_tag): And here too.
14376
14377         * providers/local/camel-local-summary.h: New flag
14378         CAMEL_MESSAGE_FOLDER_XEVCHANGE to indicate the XEV header has
14379         probably changed size and needs to be rewritten in whole.
14380
14381         * camel-folder-summary.c (next_uid_string): Want this static, not
14382         const.
14383         (message_info_new): Store the references and message-id values as
14384         64 bit, binary hashes.
14385         (message_info_load): fix for message-id/references changes.
14386         (message_info_save): Likewise.
14387         (camel_message_info_dup_to): And here.
14388         (camel_message_info_free): And here too.  No longer free
14389         message_id, and simple free for references array.
14390         (CAMEL_FOLDER_SUMMARY_VERSION): Bumped file revision.
14391         (camel_folder_summary_init): Init memchunk allocators to empty.
14392         (camel_folder_summary_finalize): Free memchunk allocators if
14393         there.
14394         (message_info_new): Use the chunk allocator to allocate message
14395         info's. 
14396         (camel_folder_summary_info_new): New helper to allocate the
14397         message info, and setup the memchunk if required.
14398         (content_info_alloc): Likewise for content info's.
14399         (message_info_load): Use summary_info_new_empty.
14400         (content_info_new): Use content_info_alloc.
14401         (content_info_load): "
14402         (content_info_free): Free the content info as a memchunk.
14403         (message_info_free): Free everything directly and the base as a
14404         memchunk, rather than calling camel_message_info_free(), which
14405         assumes a malloc'd array.
14406
14407         * providers/local/camel-local-summary.c: Include ctype.h, kill a
14408         warning.
14409         (local_summary_decode_x_evolution): If we get a NULL message info,
14410         then dont try and set anything, just check for validity.
14411         (camel_local_summary_write_headers): New function to write a set
14412         of headers to an fd.
14413         (camel_local_summary_check): Added some statistic generation
14414         stuff for memory profiling.
14415
14416         * providers/local/camel-mbox-summary.c (header_write): Changed to
14417         use stdoi functions to write out the header to a buffered stream,
14418         instead of using writev, which is apparently slow (and writing
14419         each line separately is slow anyway).
14420         (mbox_summary_sync_full): New implementation.  Does things
14421         differently, doesn't use or require the content info stuff.
14422         (summary_rebuild): Dont return an error if we start scanning at
14423         the end of file.
14424         (mbox_summary_sync_full): If we are not writing out new headers,
14425         make sure we copy the From line as we go, and update frompos
14426         appropriately.
14427         (mbox_summary_sync_full): Always copy the From line from the
14428         existing one, rather than trying to make one up ourselves.
14429         (mbox_summary_sync): If we can get by with a quick-sync, then try
14430         it, if that fails, then try a full sync anyway.
14431         (mbox_summary_sync_quick): Quick sync.  Only update system flags,
14432         etc.
14433         (mbox_summary_sync_full): Use the proper local summary encode_xev
14434         function.
14435         (header_evolution_decode): Removed, no longer needed.
14436         (header_evolution_encode): Same.
14437         (copy_block): No longer needed, removed.
14438         (header_write): Removed, replaced with
14439         camel_local_summary_write_headers.
14440         (mbox_summary_sync_full): Fixed for header_write change.
14441
14442         * camel-mime-parser.c (folder_scan_step): Implement the new
14443         optional parser state HSCAN_PRE_FROM, that returns the (currently
14444         unfiltered) input data.
14445         (folder_scan_drop_step): Do the right thing for the PRE_FROM
14446         state.
14447         (camel_mime_parser_scan_from): Update the doco.
14448         (camel_mime_parser_scan_pre_from): Ok, make this behaviour
14449         optional, it simplifies a lot of loops that dont otherwise need to
14450         know about it.
14451         (folder_scan_step): Made the PRE_FROM state optional.
14452         (struct _header_scan_state): Made the bool vars 1 bit.
14453         (folder_pull_part): Free the from_line buffer if it is there.
14454         (folder_scan_skip_line): Added a new arg, can save the skpped data
14455         to a byte_array, as we go.
14456         (folder_scan_step): Fixed calls to skip_line approrpiately.  Now
14457         we save the from line as we parse it.
14458         (camel_mime_parser_read): New function to read from the mime
14459         parser buffer directly.  Useful if you use the parser to read the
14460         first/some headers, then need to scan the rest of the data,
14461         without needing to use a seek(), or allocate your own buffers.
14462
14463         * camel-mime-parser.h (struct _header_state): Added a new parser state,
14464         pre-from which returns any data found before a from line during
14465         parsing (all other data can be retrieved by the caller except
14466         this).
14467
14468 2000-11-17  Jeffrey Stedfast  <fejj@helixcode.com>
14469
14470         * providers/imap/camel-imap-utils.c (imap_parse_nstring): When
14471         extracting a literal string, capture up until the end of the last
14472         line - this we we don't lose any data if the byte count is off.
14473
14474         * providers/imap/camel-imap-command.c (imap_read_untagged): Use
14475         the byte-read count to decrement the number of bytes left to read
14476         rather than using strlen. Not only does this protect against a DoS
14477         (embedded NUL chars in the literal string would make strlen
14478         inaccurate) but it also improves performace a little.
14479
14480         * camel-remote-store.c (remote_recv_line): *Sigh* Return the
14481         number of bytes read on success rather than 0. Also don't use
14482         camel_stream_buffer_read_line since we can't get an accurate octet
14483         count.
14484
14485 2000-11-17  Not Zed  <NotZed@HelixCode.com>
14486
14487         * providers/local/camel-local-summary.c (local_summary_add): Clear
14488         the NOXEV/FLAGGED bits, since we do have an xev header.  um m,
14489         maybe this is right, this assumes a write is following.  Maybe
14490         this should be done in folder::append() instead ...
14491
14492         * camel-stream-buffer.c (camel_stream_buffer_gets): We should
14493         always terminate the string.  No need to check outptr is in range,
14494         its already been checked.
14495
14496         * providers/local/camel-mbox-summary.c (mbox_summary_sync): When
14497         we update the summary, do it from mbox_summary->folder_size, not
14498         the content info endpos (which isn't any good anymore anyway).
14499
14500         * providers/local/camel-mbox-folder.c (mbox_append_message): Set
14501         the frompos from the current folder size, since summary_add wont
14502         have initialised it to anything useful.
14503
14504 2000-11-16  Not Zed  <NotZed@HelixCode.com>
14505
14506         * providers/local/camel-local-summary.c
14507         (local_summary_encode_x_evolution): Check the uid string is all
14508         digits before trying to write a 'standard' x-ev header.
14509
14510         * providers/local/camel-maildir-summary.c
14511         (camel_maildir_summary_info_to_name): Convert an info into a
14512         maildir name:info filename.
14513         (camel_maildir_summary_name_to_info): Convert a name:info filename
14514         into an info, and tell us if it didn't match it.
14515         (message_info_new): When creating a new filename, gets its info
14516         from the flags field.  Likewise if creating from an existing file,
14517         extract the flags.
14518         (maildir_summary_sync): Remove a small memleak.  Also, if our
14519         flags and that requires a filename change, perform that here.
14520         (message_info_new): Get the received date from the filename.
14521         Also, dont overwirte the uid if we have one.
14522         (maildir_summary_check): Sort the summary in received order before
14523         completion.
14524         (maildir_summary_next_uid_string): Test the name for collusions
14525         before we give it out.  Retry, and if that fails, well, I guess we
14526         collide :(
14527
14528         * providers/local/camel-mbox-folder.c (mbox_lock): Implement mbox
14529         locking.
14530         (mbox_unlock): And unlocking.
14531         (mbox_append_message): Lock the folder for write before doing
14532         anything.
14533         (mbox_get_message): Lock the folder for read before doing
14534         anything.
14535
14536         * providers/local/camel-local-folder.c (camel_local_folder_lock):
14537         Implement something here.  We handle the recursive ability but
14538         pass the locking to the folder itself.
14539         (camel_local_folder_unlock): Likewise for unlocking.
14540         (local_lock): Default - do nothing, return success.
14541         (local_unlock): Same.
14542         (local_sync): Changed slightly for locking api changes, and also,
14543         only lock around the sync process itself.
14544
14545         * camel-lock.c: New file - utility functions for locking using
14546         different strategies and/or for locking folders safely.
14547
14548         * Makefile.am (libcamel_la_SOURCES): Adde camel-lock.[ch]
14549
14550 2000-11-15  Radek Doulik  <rodo@helixcode.com>
14551
14552         * camel-mime-utils.c: mime_guess_type_from_file_name moved back to
14553         composer as it introduced unwanted VFS dependency
14554         removed  #include <libgnomevfs/gnome-vfs.h>
14555
14556 2000-11-15  Not Zed  <NotZed@HelixCode.com>
14557
14558         * providers/Makefile.am: Removed local again, not quite ready.
14559
14560 2000-11-14  Not Zed  <NotZed@HelixCode.com>
14561
14562         * camel-folder-summary.c (message_info_new_from_message): Use
14563         message_info_new to create the summary from headers, instead of
14564         getting directly from the message.
14565         (format_recipients): No longer required.
14566
14567         * providers/Makefile.am (SUBDIRS): Added local.
14568
14569 2000-11-11  Not Zed  <NotZed@HelixCode.com>
14570
14571         * camel-mime-parser.c (folder_push_part): Make sure 'atleast' is
14572         at least 1, always.  This is possibly a temporary fix for a
14573         bad failure mode on bad multipart messages.
14574         (folder_scan_content): Go until inend, not inend+1.  Changed the
14575         continuation and retry logic to be simpler and more robust.  If we
14576         can't find a marker within
14577         the atleast we need, just set it to 1, and try again, rather than
14578         just going to the next smaller limit (boundary check checks the
14579         length anyway).
14580         (header_append): streamline the empty line case.  And strip
14581         trailing \r's if there are any (\n's already stripped).
14582         (folder_scan_header): Reordered and cleaned up a lot.  Check for
14583         continuation only once, and compress lwsp then. Assume the header
14584         buffer already has end of line's stripped, and simplify some things:
14585                 Only check for end of headers once and easier.
14586                 Dont check to remove end of line character
14587         Dont bother testing inptr-start if we get a boundary match - it is
14588         always zero.
14589         (folder_scan_header): Removed the unused part variable, and a few
14590         pointless assignments.
14591         (folder_scan_header): Change the end limit to be 1 higher, to make
14592         sure we get all content.
14593         (folder_scan_content): And here too.
14594         (folder_scan_header): Killed a warning.
14595         (folder_push_part): Removed a bad comment.  Actually
14596         boundarylenfinal can be zero for a new message not in a
14597         multipart.  So we fix that here.
14598
14599 2000-11-09  Not Zed  <NotZed@HelixCode.com>
14600
14601         * camel-mime-utils.c (header_decode_param_list): Renamed from
14602         header_param_list_decode.
14603         (header_param_list_decode): New external function to decode a
14604         parameter list.
14605         (header_param_list_format_append): Made public.
14606         (header_param_list_format): Another new public helper function for
14607         formatting just a param list.
14608
14609         * camel-folder-summary.c (next_uid_string): Default implementation
14610         is the same as before.
14611         (camel_folder_summary_class_init): And set it up.
14612
14613         * camel-folder-summary.h: Make next_uid_string a virtual function.
14614
14615         * camel-folder.c (camel_folder_change_info_changed): New function
14616         to return true if the changeset contains any changes.
14617
14618 2000-11-14  Jeffrey Stedfast  <fejj@helixcode.com>
14619
14620         * camel-stream.c (camel_stream_printf): Don't cast an int to a
14621         ssize_t.
14622
14623 2000-11-10  Dan Winship  <danw@helixcode.com>
14624
14625         * providers/mbox/camel-mbox-summary.c
14626         (camel_mbox_summary_build_from): put a space before a single-digit
14627         day of the month since it seems some mailers are fantastically
14628         picky about this. (bugs.gnome.org #27232)
14629
14630 2000-11-10  Radek Doulik  <rodo@helixcode.com>
14631
14632         * camel-mime-utils.c (header_msgid_generate): fix ids ending with '.'
14633
14634 2000-11-09  Dan Winship  <danw@helixcode.com>
14635
14636         * providers/imap/camel-imap-auth.c (imap_try_kerberos_v4_auth):
14637         Fix error handling. (Only send a "*" to bail out of authentication
14638         if the server hasn't already bailed on us.)
14639
14640 2000-11-08  Radek Doulik  <rodo@helixcode.com>
14641
14642         * camel-mime-utils.c (mime_guess_type_from_file_name): new
14643         function, moved from composer
14644
14645 2000-11-08  Not Zed  <NotZed@HelixCode.com>
14646
14647         * camel-mime-message.c (find_best_encoding): Keep track of the
14648         caller bestenc flags that make sense.
14649         
14650         * camel-mime-filter-bestenc.c (filter): Added code to detect when
14651         we have "^From " lines in the sequence of text.
14652         (camel_mime_filter_bestenc_get_best_encoding): Added a new flag
14653         CAMEL_BESTENC_NO_FROM: if set, it will not allow any lines
14654         matching "^From " to appear in the output - currently forcing
14655         base64 encoding to achieve this.
14656
14657         * camel-mime-parser.c (folder_scan_step): Call
14658         camel_mime-filter_complete() once we're done, rather than
14659         filter_filter().
14660         (folder_scan_content): Some fixes for state changing; so that when
14661         we do find another boundary it is properly flagged.  Since we
14662         strip the last \n off all data, we must take that into account
14663         too.  Sigh.  Fixes a rather nasty set of bugs where multipart
14664         messages could start including following messages as parts, etc.
14665         (struct _header_scan_stack): Added new parameter,
14666         boundarylenfinal, which holds the length of the final boundary, if
14667         it is different (e.g. for From lines, whihc aren't)
14668         (folder_scan_step): Setup teh boundarylenfinal value when creating
14669         a new boundary.
14670         (folder_scan_content): Hmm, if we hit the end-of-buffer sentinal,
14671         reset the scanner back to leave 'atleast' chars in the buffer
14672         still, dump that content, and retry again.  Stops us losing a
14673         check for a boundary on some data we haven't really looked at yet!
14674         (folder_scan_content): Use boundarylenfinal to calculate
14675         'atleast'.
14676         (folder_scan_header): And here too.
14677         (folder_boundary_check): Use the atleast value directly, dont
14678         truncate it.  Use the boundarylen/boundarylenfinal values directly
14679         too.
14680         (struct _header_scan_stack): Add an atleast parameter to cache the
14681         atleast info.
14682         (folder_push_part): Determine/set 'atleast', every time we add a
14683         new part.
14684         (folder_scan_header): Get the cached atleast info from the current
14685         part.
14686         (folder_scan_content): And here too.
14687         (folder_scan_header): Fix a problem where a part starting with
14688         " text" would be interpreted as a followon header wrongly.
14689
14690         * camel-mime-filter-charset.c (complete): Add some assertions to
14691         find a bug.
14692
14693 2000-11-07  Ettore Perazzoli  <ettore@helixcode.com>
14694
14695         * camel-service.c (get_name): Strdup the "???" string you return,
14696         so that the expected semantics for `::get_name()' is respected.
14697
14698 2000-11-07  Dan Winship  <danw@helixcode.com>
14699
14700         * camel-stream-filter.c (d): Kill debugging, as it causes lots of
14701         evolution-mail spewage.
14702
14703 2000-11-07  Not Zed  <NotZed@HelixCode.com>
14704
14705         * camel-mime-filter-bestenc.c (complete): Implement a complete()
14706         function, now we need one.
14707         (filter): Upgraded to match rfrc2045 properly.  Checks also for
14708         length of line and valid CRLF sequences.
14709         (camel_mime_filter_bestenc_get_best_encoding): Do the work of
14710         working out what is the best encoding given what we found about
14711         the stream.
14712
14713         * camel-mime-part.c (camel_mime_part_encoding_to_string): Use a
14714         lookup table to get the encoding naem, and add the binary type.
14715         (camel_mime_part_encoding_from_string): Likewise for the reverse.
14716
14717         * camel-mime-part.h: Added the binary encoding type, see rfc2045.
14718
14719         * camel-mime-utils.c (header_param_list_format_append): Dont put a
14720         space before ;'s in parameter lists, makes them more
14721         readable/consistent.
14722
14723         * camel-mime-message.c (multipart_has_8bit_parts): Cleaned up the
14724         old stuff, well removed it.
14725         (camel_mime_message_set_best_encoding): Added another argument
14726         that lets you select what you want to set the best of.  i.e. for
14727         smtp transport we only need 7 bit, and dont need to optimise the
14728         charset (although of course, we should always).
14729         (find_best_encoding): Implement this feature, if we are not
14730         getting the best charset, use the one we have.
14731         (best_encoding): Set the charset on the part appropriately.  Sigh,
14732         the interfaces for this are nonexistant.
14733         (find_best_encoding): Tell the bestenc filter that lf should be
14734         treated as crlf for the purposes of determining encodings.
14735
14736 2000-11-06  Not Zed  <NotZed@HelixCode.com>
14737
14738         * camel-charset-map.c (camel_charset_init): Init function for an
14739         iterative charset determinator.
14740         (camel_charset_step): Iterate another buffer.
14741         (camel_charset_mask): Removed, since it couldn't have worked.
14742         (camel_charset_best): Use the iterative interface to do the work.
14743         (camel_charset_best_name): Get the best name for a charset so far.
14744
14745         * camel-mime-filter-bestenc.c: New class, a stream
14746         filter that can be used to memory-efficiently determine the best
14747         encoding and/or charset to use for a given stream of bytes.
14748
14749         * Makefile.am (libcamelinclude_HEADERS): Added stream-null*.
14750         (libcamel_la_SOURCES): Added bestenc*
14751
14752         * camel-stream-null.c: New class, a null-stream, that always
14753         succeeds, and never has any contents.
14754
14755         * camel-stream.c: Minor pointless changes.  Was going to do
14756         something else but changed my mind.  Added trivial default
14757         implementations for all callbacks.
14758
14759         * camel-mime-message.h: Cleaned up some old cruft.
14760
14761         * camel-folder-summary.c (camel_folder_summary_format_address):
14762         address_list_format() no longer encodes, so we dont need to decode
14763         it.
14764
14765         * camel-address.c (camel_address_unformat): New function, attempts
14766         to reverse the formatting process on display addresses.
14767         (camel_address_length): New function to get the number of
14768         addresses, without having to peek the structure.
14769
14770         * camel-mime-message.c (camel_mime_message_set_from): Fix a typo.
14771         (camel_mime_message_finalize): Only unref from/reply_to if we have
14772         it.
14773         (camel_mime_message_set_recipients): New function - set the
14774         recipients as a CamelInternetAddress.  This function effectively
14775         deprecates the older recipient setting functions.
14776         (camel_mime_message_add_recipient): What the hell, i'll bite the
14777         bullet.  Terminate this function.  The old api was ambiguious and
14778         inefficient and didn't work right anyway.
14779         (camel_mime_message_remove_recipient_address): And this one.
14780         (camel_mime_message_remove_recipient_name): And this one too.
14781         (camel_mime_message_set_recipients): If we set an empty header,
14782         then remove it from the header list.  Allow a null receipient
14783         object to clear a header.
14784         (camel_mime_message_set_from): Likewise, if setting an empty from
14785         address.
14786         (camel_mime_message_encode_8bit_parts): Eeek!!
14787         camel_stream_mem_new_with_byte_array owns the byte_array we give
14788         it, so make sure we dont free any of it!
14789         (camel_mime_message_encode_8bit_parts):  Infact, i'll just rewrite
14790         the whole lot, its a bit of a mess.  Should really rename it and
14791         make it a little more useful too, lets see ...
14792         (best_encoding): This has a string interface?  Oh boy.
14793         (camel_mime_message_foreach_part): New experimental function to
14794         iterate over all message parts.  Might not remain.
14795         (camel_mime_message_has_8bit_parts): New implementation using
14796         foreach_part.  Fixed a couple of problems.
14797         (find_best_encoding): New function, that finds the best encoding
14798         for a given part (will probably be moved to camel-mime-part), and
14799         also the best charset to use if it is a text part.  Since one
14800         affects the other it is a two pass process, but uses streams and
14801         not memory to achieve this.
14802         (camel_mime_message_set_best_encoding): Uses the function above to
14803         configure an entire message for the best encoding possible given
14804         transport constraints.
14805         (camel_mime_message_encode_8bit_parts): Reimplemented to use the
14806         function above to perform the work.
14807
14808         * camel-internet-address.c
14809         (camel_internet_address_format_address): Dont put <> around a lone
14810         address with no real name.
14811         (camel_internet_address_encode_address): Similarly.
14812         (internet_decode): Actually return the count of decoded addresses.
14813         (internet_unformat): Implement the unformatting routine.
14814
14815 2000-11-05  Not Zed  <NotZed@HelixCode.com>
14816
14817         * providers/smtp/camel-smtp-transport.c (_send_to): Changed to get
14818         the internetaddress directly, rather than having to parse it
14819         itself.
14820
14821         * camel-address.c (camel_address_format): Added a new function
14822         which will format address, suitable for display.
14823         (camel_address_cat): Concatentate 1 camel address onto another.
14824         It is upto the caller to ensure the addresses are of compatible
14825         types.
14826         (camel_address_new_clone): New function to create a new address by
14827         copying an existing one of the same type.
14828         (camel_address_copy): New helper function to copy an address.
14829
14830         * camel-mime-message.h (struct _CamelMimeMessage): Removed cached
14831         copy of date string.
14832         (struct _CamelMimeMessage): Added date_received info.
14833
14834         * camel-mime-message.c (camel_mime_message_get_date_string):
14835         Removed.  Nothing uses it anyway, and it is redundant.
14836         (camel_mime_message_finalize): No more date_str.
14837         (camel_mime_message_init): No more date_str, initialise
14838         date_received*
14839         (write_to_stream): Change the check for a date header.
14840         (process_header): No longer track the date_str.
14841         (camel_mime_message_get_received_date): Removed.  totally invalid
14842         anyway.
14843         (camel_mime_message_get_sent_date): Removed.  Redundant.  The only
14844         'date' is the sent date, the received date is just made up.
14845         (camel_mime_message_get_date): Args changed to be more consistent
14846         with utility functions.
14847         (camel_mime_message_get_date): Dont set the date when we're asked
14848         for it (if its not set by the time its written, it'll be set
14849         then).
14850         (camel_mime_message_get_date_received): Actually do 'the right
14851         thing' here, if we have a received header, use that to determine
14852         the received date.  And return the data in the same format as
14853         get_date.
14854         (camel_mime_message_set_from): Changed the api to better match
14855         what we should be doing.  Pass a camelinternetaddress, etc.
14856         (camel_mime_message_set_reply_to): Cahnged similarly to take an
14857         internetaddress.
14858         (camel_mime_message_get_reply_to): Likewise.
14859         (camel_mime_message_finalize): Unref the from/reply_to objects.
14860         (format_address): Removed, no longer needed.
14861         (process_header): Changed to store the from/reply_to as
14862         internetaddress's.
14863         (write_to_stream): Set the from header directly to empty, if we
14864         dont have one.  Maybe we should just abort, and/or create one
14865         based on the current user.
14866
14867         * camel-mime-utils.c (header_address_list_format): Renamed to
14868         header_address_list_encode, which is what it is actually doing.
14869         (header_address_list_format_append): Similarly.
14870         (encoding_map[]): Removed, no longer used.
14871         (header_address_list_encode_append): Take another arg, do we
14872         encode the address (for internet), or not (for display - utf8
14873         only).
14874         (header_address_list_format): Re-added this function, but now it
14875         generates a display version only.  Surprise surprise, that is all
14876         anythign needs to generate anyway.  Sigh.
14877
14878         * camel-internet-address.c (camel_internet_address_get): Return
14879         false if we get an invalid index only.
14880         (camel_internet_address_encode_address): Helper function to encode
14881         a single address for mailing.
14882         (internet_encode): Use the above function to format it.
14883         (camel_internet_address_format_address): Format a single address
14884         for display.
14885         (internet_format): Implement the display version.
14886         (camel_internet_address_class_init): Init the internet_format
14887         virtual function.
14888         (internet_cat): Implement virtual function to concatenate
14889         addresses.
14890
14891         * camel-folder-summary.c
14892         (camel_folder_summary_info_new_from_header): new function, only
14893         build the summary info, dont add it.
14894         (camel_folder_summary_info_new_from_parser): Likewise, for new
14895         info from parser.
14896         (camel_folder_summary_add_from_parser): Cahnged to call function
14897         above to build info.
14898         (camel_folder_summary_add_from_header): Changed to call function
14899         above, to build info.
14900         (camel_folder_summary_info_free): New function to free the summary
14901         message info.
14902         (camel_folder_summary_clear): Changed to clal above to free info.
14903         (camel_folder_summary_remove): Likewise.
14904         (camel_folder_summary_add): Cleaned up the clashing uid
14905         re-assignment logic a little bit.
14906         (camel_folder_summary_decode_uint32): Fixed a typo, 01 != -1.
14907         (camel_folder_summary_decode_time_t): Return -1 on error.
14908         (camel_folder_summary_encode_off_t): New function to encode an
14909         off_t type.
14910         (camel_folder_summary_decode_off_t): And likewise for the reverse.
14911         (CAMEL_FOLDER_SUMMARY_VERSION): Bumped the summary version, since
14912         we're now encoding time/off_t's right.
14913         (summary_header_save): Use time_t encoder to save the timestamp.
14914         (summary_header_load): Likewise for decoding the timestamp.
14915         (content_info_load): Decode off_t types directly, now we can.
14916         (content_info_save): And likewise for encoding.
14917         (camel_folder_summary_add_from_message): New function, create a
14918         summary item from an existing message and add it.
14919         (camel_folder_summary_info_new_from_message): New function, create
14920         a summary item from an existing message.
14921         (summary_build_content_info_message): New function to do the dirty
14922         work of building the conent info/indexing, from a message source.
14923         (format_recipients): Format an internetaddress suitable for the
14924         summary.
14925         (message_info_new_from_message): Build a new summary item from a
14926         mime message.
14927         (content_info_new_from_message): Build a new conent info from a
14928         mime part.
14929         (camel_folder_summary_class_init): Init the new class functions.
14930         (message_info_new_from_message): Fixed for message api change.
14931
14932         Added documentation to the functions.
14933         
14934 2000-11-03  Radek Doulik  <rodo@helixcode.com>
14935
14936         * camel-mime-utils.c (header_msgid_generate): new function,
14937         generates simple message/content id
14938
14939 2000-11-04  Not Zed  <NotZed@HelixCode.com>
14940
14941         * camel-mime-part-utils.c
14942         (camel_mime_part_construct_content_from_parser): Set the
14943         preface/postface from the parser into the multipart object.
14944
14945         * camel-multipart.c (camel_multipart_set_postface): Function to
14946         set the postface text on a multipart.
14947         (camel_multipart_set_preface): Similarly for preface text.
14948
14949         * camel-mime-parser.c (folder_scan_content): If we scan until a
14950         boundary, then we do not include the \n that starts the boundary
14951         line in the content.
14952         (struct _header_scan_stack): Added a ByteArray to store the
14953         multipart pre/post-text as we're scanning.
14954         (folder_pull_part): Free pre/posttext if they are allocated.
14955         (folder_scan_step): Build into the pre/posttext arrays as we
14956         encounter data.
14957         (camel_mime_parser_preface): REturn the multipart preface text, if
14958         there is any scanned.
14959         (camel_mime_parser_postface): Likewise for postface text.
14960         (byte_array_to_string): helper function for above.
14961
14962         * providers/mbox/camel-mbox-folder.c (mbox_append_message): Change
14963         the from line to be "\nFrom ..." always, so no need to
14964         check/append a \n to messages.
14965         (mbox_append_message): Open the output stream with append mode
14966         [assuming this is more efficient than seeking to the end]
14967         And dont prepend \n  on the From line if its the first in the
14968         mbox.
14969         (mbox_append_message): Pass the offset of the real start of the
14970         "From " line when we perform the update (which may != 'seek')
14971
14972         * camel-mime-filter-charset.c (complete): Removed the terminating
14973         NUL 'fix'.
14974
14975         * camel-stream-filter.c (do_read): Added some debug.
14976         (do_flush): And here.
14977         (do_write): And here too.
14978         (do_write): ARGH!!! ARGH!  Ok, so the filter stream was writing a
14979         different number of bytes than the requester was asking it to
14980         write (because of filtering, of course!).  So instead of returning
14981         the true number of written bytes, we'll return what they asked us
14982         to write - unless there is an error in which case we return -1.
14983
14984         * camel-mime-utils.c (base64_encode_close): Sigh, forgot to make
14985         it unsigned.  I think this is actually a gcc bug as (48 >> 2)
14986         somehow ended up negative, when it obviously should not, even if
14987         the data load was signed.
14988
14989 2000-11-03  Jeffrey Stedfast  <fejj@helixcode.com>
14990
14991         * camel-url.c: Undo my incorrect fix - I misunderstood danw -
14992         sorry!
14993
14994 2000-11-03  Dan Winship  <danw@helixcode.com>
14995
14996         * providers/pop3/camel-pop3-store.c (camel_pop3_store_expunge):
14997         Unbreak this.
14998
14999 2000-11-03  Jeffrey Stedfast  <fejj@helixcode.com>
15000
15001         * camel-url.c (camel_url_to_string): If show_pass, then base64 the
15002         password before writing it to the output string.
15003         (camel_url_new): Assume password has been base64 encoded and
15004         decode accordingly.
15005
15006 2000-11-03  Dan Winship  <danw@helixcode.com>
15007
15008         * camel-provider.h: Add an "url_flags" field to CamelProvider.
15009         Move the CAMEL_SERVICE_URL_* defines here and remove the SERVICE_
15010         part of the name.
15011
15012         * camel-service.h: Remove CAMEL_SERVICE_URL_* flags and
15013         service->url_flags field.
15014
15015         * camel-service.c (check_url, get_path): Get URL flags from
15016         service->provider, update for changed flag names.
15017
15018         * providers/*/camel-*-provider.c: Add URL flags to provider
15019         structures.
15020
15021         * providers/*/camel-*-{store,transport}.c, camel-remote-store.c:
15022         Remove service->url_flags initialization.
15023
15024 2000-11-02  Jeffrey Stedfast  <fejj@helixcode.com>
15025
15026         * providers/imap/camel-imap-store.c (get_folder_info): Quote
15027         foldernames when sending to the IMAP server because the folder
15028         name might contain spaces.
15029
15030 2000-11-02  Not Zed  <NotZed@HelixCode.com>
15031
15032         * Merged in camel-incremental-branch.
15033
15034 2000-11-01  Dan Winship  <danw@helixcode.com>
15035
15036         * providers/imap/camel-imap-store.c (get_folder_info): Remove old
15037         subbed folders from hash table after freeing them.
15038
15039         * providers/imap/camel-imap-folder.c (imap_get_full_name): Deal
15040         correctly with namespace == ""
15041
15042 2000-11-01  Gediminas Paulauskas  <menesis@delfi.lt>
15043
15044         * camel-charset-map.c, camel-charset-map-private.h: synced all charsets
15045         with ones found in libunicode. Just include more "iso/*.h" and rebuild
15046         ...private.h with this.
15047
15048 2000-10-31  Dan Winship  <danw@helixcode.com>
15049
15050         * camel-service.c (service_disconnect): Add a new argument, clean,
15051         that says whether or not to try to disconnect cleanly.
15052
15053         * camel-remote-store.c (remote_send_string, remote_send_stream,
15054         remote_recv_line): disconnect uncleanly on failure to prevent
15055         infinite loops when providers would normally send commands from
15056         disconnect(). Remove some unneeded CamelException goo.
15057
15058         * providers/smtp/camel-smtp-transport.c (smtp_disconnect): 
15059         * providers/pop3/camel-pop3-store.c (pop3_disconnect): 
15060         * providers/nntp/camel-nntp-store.c (nntp_store_disconnect):
15061         * providers/imap/camel-imap-store.c (imap_disconnect): Don't send
15062         QUIT/LOGOUT if !clean.
15063
15064 2000-10-30  Dan Winship  <danw@helixcode.com>
15065
15066         * providers/imap/camel-imap-auth.c: New file with code for IMAP
15067         authentication mechanisms. (Currently just krb4, and without
15068         integrity/privacy protection).
15069
15070         * providers/imap/Makefile.am: Add camel-imap-auth.[ch] and krb4
15071         CFLAGS/LDFLAGS
15072
15073         * providers/imap/camel-imap-store.c (connect_to_server): Split out
15074         from imap_connect. Just does the basic connect and CAPABILITY
15075         check. Redo the CAPABILITY code more robustly.
15076         (query_auth_types_connected): Do this right rather than punting to
15077         query_auth_types_generic. Check for KERBEROS_V4 if compiled with
15078         krb4 support.
15079         (query_auth_types_generic): Mention KERBEROS_V4 if compiled with
15080         krb4 support.
15081         (imap_connect): Use connect_to_server().
15082
15083         * camel-mime-utils.c (base64_encode_step, base64_encode_close):
15084         Take an additional argument, "break_lines", saying whether or not
15085         to add '\n's to the output.
15086
15087         * camel-multipart.c (set_boundary): 
15088         * camel-mime-filter-basic.c (filter, complete): Update for base64
15089         api change.
15090
15091 2000-10-30  Peter Williams  <peterw@helixcode.com>
15092
15093         * providers/imap/camel-imap-store.c (unsubscribe_folder): Correct
15094         parameters to g_hash_table_lookup_extended.
15095
15096 2000-10-29  Dan Winship  <danw@helixcode.com>
15097
15098         Improved IMAP namespace handling: leave the namespace in the
15099         folder names rather than constantly prepending it and stripping it
15100         off. Also some subscription fixes.
15101
15102         * camel-store.c (camel_folder_info_build): Fix for the case where
15103         @top isn't in @folders.
15104
15105         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Add
15106         a "short_name" argument rather than figuring it out ourselves.
15107         (imap_get_full_name): Implementation of CamelFolder::get_full_name
15108         that strips off namespace so the user doesn't have to see it.
15109         (imap_append_message, imap_copy_message_to, imap_move_message_to):
15110         Use folder->full_name rather than calling
15111         camel_imap_store_get_folder_path.
15112
15113         * providers/imap/camel-imap-utils.c (imap_parse_list_response):
15114         Update this: make @flags a bitmask and @sep a char rather than a
15115         string. Make all of the out arguments optional. Handle literals in
15116         the server response.
15117
15118         * providers/imap/camel-imap-store.c (imap_connect): Do a better
15119         job of getting the correct dir_sep for the namespace we're using.
15120         Construct a base_url here that will be used by get_folder_info.
15121         (camel_imap_store_folder_path): Removed
15122         (imap_folder_exists): Add an argument to return the short name of
15123         the folder (parsed out of the LIST response). Update for
15124         imap_parse_list_response change.
15125         (get_folder): Update for the various other changes.
15126         (get_folder_info): Update for the various other changes. Be more
15127         consistent about the returned layout: put everything underneath
15128         the "namespace" directory, including INBOX, even if it doesn't
15129         belong there. Don't destroy the list of subscribed folders until
15130         we've actually gotten the new list.
15131         (folder_subscribed, subscribe_folder, unsubscribe_folder): Use
15132         folder_name directly rather than camel_imap_store_folder_Path.
15133
15134         * providers/imap/camel-imap-command.c (camel_imap_command): Update
15135         for folder name changes.
15136
15137 2000-10-29  Dan Winship  <danw@helixcode.com>
15138
15139         * camel.h: Remove md5-utils.h include since it's not part of Camel
15140         any more.
15141
15142         * camel-charset-map.c: Kill some warnings.
15143
15144         * providers/nntp/camel-nntp-grouplist.c
15145         (camel_nntp_get_grouplist_from_file, camel_nntp_grouplist_save):
15146         Clean up warnings about time_t casts.
15147
15148         * providers/smtp/camel-smtp-transport.c: Remove unused md5-utils.h
15149         include.
15150
15151         * providers/pop3/camel-pop3-store.c: Undefine the "_" macro
15152         defined by krb4's des.h when compiling with krb support.
15153         Fix md5-utils.h include.
15154
15155 2000-10-27  Dan Winship  <danw@helixcode.com>
15156
15157         * camel-mime-utils.c (header_param_list_format_append): Only quote
15158         Content-type parameters when the quoting is mandatory, and deal
15159         with embedded quotes/backslashes when quoting.
15160
15161 2000-10-27  JPR  <jpr@helixcode.com>
15162
15163         * providers/pop3/Makefile.am: Tidy up build
15164
15165         * providers/smtp/Makefile.am: ditto     
15166         
15167         * Makefile.am:  Move md5-utils.[hc] to e-util because the 
15168         addressbook is going to use md5 hashes for pilot syncing.
15169         Maybe the calendar conduits as well because this is a good idea
15170         Chris had.
15171
15172 2000-10-26  Kjartan Maraas  <kmaraas@gnome.org>
15173
15174         * camel-exceptions-list.def: Add newline to kill warnings.
15175
15176 2000-10-25  Dan Winship  <danw@helixcode.com>
15177
15178         * providers/imap/camel-imap-store.c (get_folder_info): Fix folder
15179         listing code infinite loop.
15180
15181         * camel-store.h: Add a "parent" field to CamelFolderInfo.
15182
15183         * camel-store.c (camel_folder_info_build): Deal with "parent"
15184         (camel_store_folder_subscribed, camel_store_subscribe_folder,
15185         camel_store_unsubscribe_folder): Add g_return_if_fails checking
15186         that the folder supports subscriptions.
15187
15188         * providers/imap/camel-imap-store.c (folder_subscribed,
15189         subscribe_folder, unsubscribe_folder): Remove "+ 1"s since the
15190         mail subscribe UI won't prepend / to the folder names now.
15191         (get_folder_info): Clear the "parent" field of the folderinfos
15192         when removing an empty top level.
15193
15194         * providers/nntp/camel-nntp-store.c (nntp_store_folder_subscribed,
15195         nntp_store_subscribe_folder, nntp_store_unsubscribe_folder):
15196         Remove "+ 1"s since the mail subscribe UI won't prepend / to the
15197         folder names now.
15198
15199 2000-10-24  Chris Toshok  <toshok@helixcode.com>
15200
15201         * providers/imap/camel-imap-store.h: add subscribed_folders.
15202
15203         * providers/imap/camel-imap-store.c (camel_imap_store_class_init):
15204         fill in vtable entries for subscription functions.
15205         (camel_imap_store_finalize): new function, so we can free up our
15206         subscribed_folders hashtable.
15207         (camel_imap_store_init): set CAMEL_STORE_SUBSCRIPTIONS in the
15208         CamelStore flags, and create our subscribed_folders hashtable.
15209         (camel_imap_store_get_type): camel_imap_store_finalize is our
15210         finalize function.
15211         (get_folder_info): if we're looking at subscribed_only, clear out
15212         the subscribed_folders hashtable, use LSUB instead of LIST, and
15213         insert folder paths (prepended by their namespace if there is one)
15214         into subscribed_folders.  INBOX subscription support needs work,
15215         since we always show it, regardless of it's subscribed state.
15216         (folder_subscribed): new function.  just look up the folder_path
15217         in the hashtable.
15218         (subscribe_folder): new function.  use the imap SUBSCRIBE command,
15219         and if successful add it to the hashtable.
15220         (unsubscribe_folder): new function.  use the imap UNSUBSCRIBE
15221         command, and if successful remove it from the hashtable.
15222
15223 2000-10-24  Dan Winship  <danw@helixcode.com>
15224
15225         * providers/imap/camel-imap-store.c (get_folder_info): Fill in the
15226         message_count and unread_message_count flags (if !fast).
15227
15228 2000-10-23  Dan Winship  <danw@helixcode.com>
15229
15230         * camel-object.h: #include gnome-i18n.h (and gnome-defs.h since
15231         the former depends on it.)
15232
15233         * *: Add lots of _() and N_().
15234
15235 2000-10-23  Chris Toshok  <toshok@helixcode.com>
15236
15237         * providers/nntp/Makefile.am (libcamelnntpinclude_HEADERS): add
15238         camel-nntp-types.h.
15239
15240 2000-10-23  Dan Winship  <danw@helixcode.com>
15241
15242         * providers/imap/camel-imap-command.c (imap_read_untagged): Fix a
15243         "how could this have been working before" memory overrun bug
15244         found by Vlad.
15245
15246         * camel-op-queue.[ch], camel-thread-proxy.[ch]: These should have
15247         gone away a long time ago.
15248
15249 2000-10-20  Chris Toshok  <toshok@helixcode.com>
15250
15251         * providers/Makefile.am (SUBDIRS): re-enable the nntp provider.
15252
15253 2000-10-20  Chris Toshok  <toshok@helixcode.com>
15254
15255         * providers/nntp/camel-nntp-store.c (build_folder_info): add
15256         function to build a tree from the nntp group names (using '.' as a
15257         heirarchy separator.)  #ifdefed INFO_AS_TREE only.
15258         (build_folder_info_from_grouplist): if INFO_AS_TREE is selected,
15259         call build_folder_info instead of appending a new CamelFolderInfo
15260         to our list.
15261         (ensure_news_dir_exists): use e_mkdir_hier instead of failing if a
15262         parent directory (~/evolution/news generally) isn't there.
15263
15264 2000-10-19  Chris Toshok  <toshok@helixcode.com>
15265
15266         * camel-folder-search.c: #include <sys/types.h> before <regex.h>
15267
15268 2000-10-19  Dan Winship  <danw@helixcode.com>
15269
15270         * providers/imap/camel-imap-utils.c (imap_parse_list_response):
15271         Fix a bug with "INBOX" (or anything else with NIL hierarchy
15272         separator) as the namespace.
15273
15274         * providers/imap/camel-imap-folder.c (imap_refresh_info): Emit
15275         message_changed and folder_changed as appropriate.
15276
15277 2000-10-19  Dan Winship  <danw@helixcode.com>
15278
15279         * camel-folder.c (camel_folder_refresh_info): Update comment here
15280         so refresh_info isn't just for reconnects any more. Make the
15281         default implementation a no-op rather than an error.
15282
15283         * providers/nntp/camel-nntp-folder.c: Move refresh_info impl into
15284         camel_nntp_folder_new, since it would have leaked memory and not
15285         done anything useful if it was called later.
15286
15287         * providers/mbox/camel-mbox-folder.c: Remove no-longer-necessary
15288         refresh_info impl.
15289
15290         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
15291         Update imap_folder->exists, but don't actually load the new
15292         messages. This is a temporary workaround to deal with the IMAP
15293         provider stealing the message list focus at annoying times.
15294         (imap_copy_message_to, imap_move_message_to): Emit a
15295         folder_changed by hand, for now.
15296
15297 2000-10-19  Ettore Perazzoli  <ettore@helixcode.com>
15298
15299         * providers/imap/Makefile.am (libcamelimapinclude_HEADERS): Add
15300         `camel-imap-stream.h'.
15301
15302         * Makefile.am (libcamelinclude_HEADERS): Add `camel-charset-map.h'
15303         and `camel-charset-map-private.h'.
15304
15305 2000-10-18  Jeffrey Stedfast  <fejj@helixcode.com>
15306
15307         * camel-mime-part.c (camel_mime_part_set_description): The correct
15308         fix this time - the description should be encoded here and not in
15309         the camel-medium layer.
15310
15311 2000-10-30  Not Zed  <NotZed@HelixCode.com>
15312
15313         * camel-folder.c (camel_folder_change_info_add_update): Fixed the
15314         changeset logic, which was completely wrong.
15315
15316 2000-10-27  Not Zed  <NotZed@HelixCode.com>
15317
15318         * camel-mime-utils.c (quoted_encode_step): Removed is_blank() stuff.
15319         (header_decode_init): When we set the 'space' bit, dont clear all
15320         the others.
15321         (quoted_encode): Put back the safemask.  Yes we totally need it,
15322         see rfc 2047 section 5, parts (1) and (3).
15323         (CHARS_PSPECIAL): Remove '=' and '_' from the list of allowed
15324         characters (this is an allowed list, not a not-allowed list, like
15325         the ESPECIAL).
15326         (camel_mime_special_table): Updated for fixes to definitions.
15327         (CHARS_ESPECIAL): Added '_' to list of characters that should be
15328         encoded.
15329
15330 2000-10-26  Not Zed  <NotZed@HelixCode.com>
15331
15332         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_update):
15333         Use the new camel_folder_change_info_* stuff to build the update
15334         diff, rather than doing it ourselves.
15335
15336         * camel-folder.c (camel_folder_change_info_add_source): Add a
15337         'source' list, used to create change lists.
15338         (camel_folder_change_info_add_source_list): Add a list of uid's,
15339         convenience function.
15340         (camel_folder_change_info_add_update): Add a uid to the list of
15341         uid's in the new updated list.
15342         (camel_folder_change_info_add_update_list): Add a bunch of uid's
15343         at once for the same purpose.
15344         (camel_folder_change_info_build_diff): Take the source list, the
15345         update list, and find the differences, building on the added or
15346         removed list as appropriate.
15347
15348 2000-10-20  Not Zed  <NotZed@HelixCode.com>
15349
15350         * providers/mbox/camel-mbox-summary.c (removed_uids): REnamed from
15351         add_uid.
15352         (camel_mbox_summary_update): Oops, fix the reversed logic for
15353         determining the uid changesets.
15354
15355         * camel-folder.c (message_changed): Oops, we want to change the
15356         uid, not add it.
15357
15358 2000-10-19  Not Zed  <NotZed@HelixCode.com>
15359
15360         * providers/mh/camel-mh-summary.c (camel_mh_summary_sync): Added a
15361         change list argument, and add expunged uid's to it.
15362
15363         * providers/mh/camel-mh-folder.c (mh_init): Setup the change list.
15364         (mh_finalize): And free it.
15365         (mh_sync): Track changes, and send a folder_changed signal as
15366         appropriate.
15367         (mh_expunge): Likewise.
15368         (mh_append_message): Add the new uid to the change list and
15369         trigger a folder_changed event.
15370
15371         * providers/mbox/camel-mbox-folder.c (camel_mbox_folder_new):
15372         Setup a mbox list of changes structure.
15373         (mbox_finalize): And free it.
15374         (mbox_expunge): Include the change list with the folder_changed
15375         event, and clear it off.
15376         (mbox_sync): And the same for when we are just syncing the folder.
15377         (mbox_append_message): And do the same here, after we've updated
15378         the folder.
15379
15380         * providers/mbox/camel-mbox-summary.c
15381         (camel_mbox_summary_build_from): Use gmtime_r to get the time
15382         thread-safely.
15383         (camel_mbox_summary_sync): Added a changeinfo argument.  Add any
15384         removed or changed messages to the changelists as appropriate.
15385         (camel_mbox_summary_update): Added a changeinfo argument.
15386         Genereate a list of added/removed uid's based on the difference
15387         before and after rebuilding the summary.
15388
15389         * camel-folder.c (camel_folder_change_info_new):
15390         (camel_folder_change_info_add_uid): 
15391         (change_info_add_uid): 
15392         (camel_folder_change_info_remove_uid): 
15393         (camel_folder_change_info_change_uid): 
15394         (change_info_clear): 
15395         (camel_folder_change_info_clear): 
15396         (camel_folder_change_info_free):
15397         (change_info_cat): 
15398         (camel_folder_change_info_cat):  Bunch of utility functions for
15399         working with change info lists.
15400         (camel_folder_init): Init the change info list.
15401         (camel_folder_finalize): And free it.
15402         (thaw): Changed to pass through a list of changes, or to get the
15403         changed message uids from the camelfolderchangeinfo struct, and
15404         reset it.
15405         (folder_changed): Add the changed lists to the frozen change list
15406         if we are frozen.
15407         (message_changed): Add the message to the changed list if we are
15408         in the frozen state.
15409
15410         * camel-folder.h (CamelFolderChangeInfo): New structure to hold
15411         information for the folder_changed event.
15412
15413 2000-10-18  Ettore Perazzoli  <ettore@helixcode.com>
15414
15415         * camel-mime-filter-charset.c (complete): Put a zero at the start
15416         of the outbuf.
15417
15418 2000-10-18  Not Zed  <NotZed@HelixCode.com>
15419
15420         * camel-mime-part.c (add_header): No, we must not encode the
15421         headers here.  These interfaces ARE raw interfaces as they are
15422         defined in camel_medium.  Also removed a bogus/meaningless FIXME.
15423         (set_header): Likewise here, we must not.
15424         (process_header): Removed another bogus comment.
15425
15426         * camel-object.c (shared_is_of_type): Comment out the spitting of
15427         a big warning when we're trying to determine types from code.
15428
15429         * providers/mbox/camel-mbox-summary.c
15430         (message_info_new_from_parser): Only call ibex funcitons if we
15431         have an index.
15432
15433         * providers/mh/camel-mh-summary.c (camel_mh_summary_add): Only
15434         call ibex functions if we have an index.
15435         (remove_summary): Likewise.
15436         (camel_mh_summary_check): Likewise.
15437
15438         * providers/nntp/camel-nntp-store.c (nntp_store_get_folder):
15439         get_folder -> flags argument.
15440
15441         * providers/vee/camel-vee-store.c (vee_get_folder): create->flags.
15442
15443         * providers/pop3/camel-pop3-store.c (get_folder): Changed create
15444         -> flags.
15445
15446         * providers/imap/camel-imap-store.c (get_folder): Added flags
15447         argument.
15448
15449         * providers/mh/camel-mh-folder.c (camel_mh_folder_new): Added
15450         flags argument, and fixed code appropriately.
15451
15452         * providers/mh/camel-mh-store.c (get_folder): Added flags argument.
15453
15454         * camel-folder-search.c (message_body_contains): Perform a regex
15455         match on the contents of messages.  This wont quite work yet as
15456         message contents are encoded when written to a stream.
15457         (build_match_regex): Converts a number of strings into a regex
15458         matching pattern, escaping special chars.
15459         (match_message): match a single message from a folder, by uid.
15460         Slow.
15461         (search_body_contains): Changed to support matching where no index
15462         is supplied.  Matches are performed by retrieving message
15463         contents, etc.
15464         () WTF?  camel should not be including any widget headers.
15465         
15466         * providers/mbox/camel-mbox-folder.c (camel_mbox_folder_new):
15467         Added flags argument.
15468         (mbox_refresh_info): Changed into a NOP, the refresh info code
15469         moved into the new function.
15470         (camel_mbox_folder_new): If we have an index requested, build one,
15471         otherwise, remove an old one, or just dont do anything.
15472
15473         * providers/mbox/camel-mbox-store.c (get_folder): Changed create
15474         to flags, changed code to suit.
15475
15476         * camel-store.c (camel_store_get_folder): Changed create to flags.
15477         (get_folder_internal): And here.
15478         (get_folder): And here too.
15479
15480         * camel-store.h (camel_store_get_folder): Change the create
15481         argument to be a flags argument.
15482
15483 2000-10-17  Dan Winship  <danw@helixcode.com>
15484
15485         * providers/imap/camel-imap-folder.c (imap_refresh_info): Remove
15486         cached info at the end of the summary when the folder shrinks
15487         between sessions. Also remove an untrue comment.
15488         (camel_imap_folder_new): Move the summary creation to after the
15489         folder selection again, since it depends on the uidvalidity
15490         having been set.
15491
15492         * providers/imap/camel-imap-store.c (get_folder): Fix up
15493         summary_file to not include the namespace twice.
15494
15495 2000-10-17  Jeffrey Stedfast  <fejj@helixcode.com>
15496
15497         * camel-mime-part.c (set_header): Encode the header value.
15498         (add_header): Same.
15499
15500 2000-10-17  Not Zed  <NotZed@HelixCode.com>
15501
15502         * camel-mime-filter.c: Added some malloc check debugging stuff.
15503
15504         * camel-mime-parser.c
15505         (struct _header_scan_state): Removed top_part, top_start, and
15506         pending.  I can't even remember why they were there, and they're
15507         not used anymore.
15508
15509         * camel-mime-filter-basic.c (filter): Forgot to up the space here
15510         too.
15511
15512 2000-10-14  Not Zed  <NotZed@HelixCode.com>
15513
15514         * camel-mime-filter-basic.c (complete): Ok, so we hit a fixme, 3x
15515         just wasn't enough for some sequences.
15516
15517 2000-10-16  Jeffrey Stedfast  <fejj@helixcode.com>
15518
15519         * providers/imap/camel-imap-command.c
15520         (imap_read_response): Don't imap_next_word(respbuf + 2), instead
15521         use imap_next_word(respbuf) or else we'll skip over the second
15522         token.
15523
15524 2000-10-16  Jeffrey Stedfast  <fejj@helixcode.com>
15525
15526         * providers/imap/camel-imap-command.c
15527         (camel_imap_response_extract): Don't free 'resp' as it doesn't
15528         point to the beginning of the allocated data, instead free
15529         response->untagged->pdata[i]. Also, if '*resp' is equal to a space
15530         character, then set resp = imap_next_word (resp) rather than
15531         expecting resp++ to work (there's a list broken IMAP daemons that
15532         like to put extra spaces between tokens).
15533         (imap_read_response): Don't expect 'respbuf+2' to be where the
15534         untagged number response to start (see above fix for an
15535         explanation).
15536
15537 2000-10-16  Chris Toshok  <toshok@helixcode.com>
15538
15539         * camel-service.c (get_path): when using the construct (flags &
15540         CAMEL_SERVICE_URL_NEED_*) make sure to do ((flags &
15541         CAMEL_SERVICE_URL_NEED_*) == CAMEL_SERVICE_URL_NEED_*)
15542         (check_url): same.
15543
15544 2000-10-16  Jeffrey Stedfast  <fejj@helixcode.com>
15545
15546         * providers/imap/camel-imap-store.c (imap_disconnect): Only send
15547         the LOGOUT command if the store is connected.
15548         (imap_connect): Set the 'connected' state to TRUE when we
15549         successfully connect.
15550         (get_folder_info): if (!topfi), 'topfi' was allocated but then
15551         'fi' was set. I think Dan meant to set topfi since fi is an
15552         uninitialized value at this point.
15553
15554         * providers/imap/camel-imap-command.c (imap_read_response): Check
15555         for the untagged BYE response and set the 'connected' state to
15556         FALSE if we receive the BYE response. Return NULL if we get a BYE
15557         response.
15558
15559 2000-10-16  Dan Winship  <danw@helixcode.com>
15560
15561         * providers/imap/camel-imap-store.c (get_folder_info): Deal with
15562         the possibility of not getting a LIST response back for the top
15563         level.
15564
15565 2000-10-12  Dan Winship  <danw@helixcode.com>
15566
15567         * providers/imap/camel-imap-summary.c: Simple subclass of
15568         CamelFolderSummary that also keeps a UIDVALIDITY value (and
15569         doesn't, for the moment, build content info).
15570
15571         * providers/imap/camel-imap-folder.c:
15572         (various): Use a CamelImapSummary to store/fetch summary info.
15573         (camel_imap_folder_new): Take a path to a file to use for the
15574         summary. Set the folder's permanent_flags correctly according to
15575         the server response. Read in the summary (checking the
15576         UIDVALIDITY) and update it if it's out of date.
15577         (imap_refresh_info): Just fetch UIDs and flags. If the UIDs all
15578         match, update the flags as needed and be done with it. Otherwise,
15579         delete messages that have been expunged from the server and fetch
15580         full summary info for any new messages.
15581         (imap_sync): Save the summary to disk.
15582         (imap_update_summary): Renamed from imap_get_summary_internal. Can
15583         now be told to get summary for only a subset of messages. Use
15584         camel-mime-utils functions rather than rolling our own header
15585         parsing.
15586         (imap_get_message_info_internal): Merged into imap_update_summary.
15587         (imap_set_message_flags): Don't marked the message FOLDER_FLAGGED
15588         if we're not actually changing the value of any of the flags.
15589         (camel_imap_folder_changed): Deal with EXISTS rather than RECENT.
15590         
15591         * providers/imap/camel-imap-store.c (imap_connect): Call
15592         camel_session_get_storage_path and save the value.
15593         (get_folder): Create a local directory to store summary
15594         information and pass a summary file name to camel_imap_folder_new.
15595         Don't call camel_folder_refresh_info from here any more since
15596         camel_imap_folder_new does it again.
15597
15598         * providers/imap/camel-imap-command.c (camel_imap_command): Add a
15599         special case to this to make it possible to get the repsonses from
15600         a SELECT and still have store->current_folder be updated
15601         correctly.
15602         (imap_read_response): parse EXISTS rather than RECENT
15603
15604         * camel-session.c (camel_session_get_storage_path): Use
15605         e_mkdir_hier.
15606
15607         * camel-folder-summary.c (camel_folder_summary_remove_index): New
15608         function.
15609
15610         * camel-mime-utils.c (header_raw_append_parse): fix this.
15611         (camel-mime-parser.c doesn't use this code because of the MEMPOOL
15612         optimization, so nothing was ever actually calling it before.)
15613
15614 2000-10-11  Not Zed  <NotZed@HelixCode.com>
15615
15616         * camel-mime-part.h (struct _CamelMimePart): Removed
15617         temp_message_buffer, and content_input_stream fields which seem to
15618         have come from nowhere, and are unused.
15619
15620         * camel-mime-utils.c: Added a note about touching this file.
15621         Nobody is to touch it without asking me first.  That goes for you
15622         too Jeff.
15623         (header_decode_text): In what way is this broken?
15624
15625 2000-10-10  Not Zed  <NotZed@HelixCode.com>
15626
15627         * providers/imap/camel-imap-folder.c (imap_get_summary_internal):
15628         Fix camel_summary_* function rename
15629         (imap_get_message_info_internal): Likewise.
15630
15631         * camel-mime-parser.c (camel_mime_parser_finalise): Fixed a spelling mistake.
15632
15633         * camel-folder-summary.c (camel_summary_format_address): Uh, why
15634         do we encode and then decode here ... sigh.  This is not the way
15635         to fix this.
15636         (camel_folder_summary_format_address): Renamed to a proper name,
15637         this was only supposed to be a private function.
15638         (camel_folder_summary_format_string): Likewise.  Oh i see why it
15639         was made public, code reuse by cut & paste.  Joy.
15640
15641 2000-10-11  Chris Toshok  <toshok@helixcode.com>
15642
15643         * providers/nntp/camel-nntp-store.c (nntp_store_unsubscribe_folder): remove the leading '/'.
15644         (nntp_store_subscribe_folder): same.
15645         (nntp_store_folder_subscribed): same.
15646
15647 2000-10-11  Jeffrey Stedfast  <fejj@helixcode.com>
15648
15649         * providers/imap/camel-imap-folder.c (imap_move_message_to): Quote
15650         the mailbox name as it may contain spaces.
15651         (imap_copy_message_to): Same.
15652
15653 2000-10-10  Chris Toshok  <toshok@helixcode.com>
15654
15655         * providers/nntp/camel-nntp-store.c
15656         (build_folder_info_from_grouplist): fill in message_count and
15657         unread_message_count properly.
15658
15659         * providers/nntp/camel-nntp-newsrc.h: reformat.
15660
15661         * providers/nntp/camel-nntp-grouplist.c
15662         (camel_nntp_get_grouplist_from_file): remove spew.
15663
15664         * providers/nntp/camel-nntp-newsrc.c
15665         (camel_nntp_newsrc_group_get_num_articles_read): new function.
15666         (camel_nntp_newsrc_group_get_highest_article_read): robustification.
15667
15668 2000-10-10  Joe Shaw  <joe@helixcode.com>
15669
15670         * providers/imap/camel-imap-store.c 
15671         (parse_list_response_as_folder_info): Check before dereferencing the
15672         sep pointer.
15673
15674 2000-10-10  Jacob "Ulysses" Berkman  <jacob@helixcode.com>
15675
15676         * camel-*.c: teach camel about "its" vs. "it's"
15677
15678 2000-10-09  Chris Toshok  <toshok@helixcode.com>
15679
15680         * providers/nntp/camel-nntp-store.c (finalize): write out the
15681         newsrc.
15682         (nntp_store_get_name): if @brief, just return host.
15683
15684         * providers/nntp/camel-nntp-newsrc.c: robustification and bug
15685         fixes.
15686
15687 2000-10-06  Jeffrey Stedfast  <fejj@helixcode.com>
15688
15689         * camel-folder-summary.c (camel_summary_format_address): Decode
15690         the resulting string.
15691
15692 2000-10-06  Chris Toshok  <toshok@helixcode.com>
15693
15694         * providers/nntp/camel-nntp-grouplist.c: new file.
15695
15696         * providers/nntp/camel-nntp-grouplist.h: new file.
15697
15698         * providers/nntp/camel-nntp-types.h: new file.
15699
15700 2000-10-06  Jeffrey Stedfast  <fejj@helixcode.com>
15701
15702         * camel-mime-utils.c (quoted_encode): Fix so that we don't encode
15703         every single char in the word. Also, do we need a safemask? I
15704         don't see why we would.
15705         (header_encode_string): Don't strip off the last char!!
15706
15707 2000-10-06  Chris Toshok  <toshok@helixcode.com>
15708
15709         * providers/nntp/Makefile.am (libcamelnntpinclude_HEADERS): add
15710         camel-nntp-grouplist.h
15711         (libcamelnntp_la_SOURCES): add camel-nntp-grouplist.c
15712
15713         * providers/nntp/camel-nntp-provider.c: add our own hash functions
15714         for nntp urls.
15715
15716         * providers/nntp/camel-nntp-newsrc.c
15717         (camel_nntp_newsrc_group_is_subscribed): new function.
15718         (camel_nntp_newsrc_subscribe_group): new function.
15719         (camel_nntp_newsrc_unsubscribe_group): new function.
15720
15721         * providers/nntp/camel-nntp-newsrc.h: add prototypes for
15722         _group_is_subscribed, _subscribe_group, and _unsubscribe_group.
15723
15724         * providers/nntp/camel-nntp-store.c
15725         (build_folder_info_from_grouplist): new function.
15726         (nntp_store_get_folder_info): add subscribed_only_parameter.  if
15727         it's FALSE, load the grouplist and call
15728         build_folder_info_from_grouplist.
15729         (nntp_store_folder_subscribed): implement.
15730         (nntp_store_subscribe_folder): implement.
15731         (nntp_store_unsubscribe_folder): implement.
15732         (camel_nntp_store_init): add CAMEL_STORE_SUBSCRIPTIONS to the
15733         store's flags.
15734
15735         * providers/mh/camel-mh-store.c (get_folder_info): add
15736         subscribed_only parameter.
15737
15738         * providers/mbox/camel-mbox-store.c (get_folder_info): add
15739         subscribed_only parameter.
15740
15741         * providers/imap/camel-imap-store.c (get_folder_info): add
15742         subscribed_only parameter.
15743
15744         * camel-store.c (camel_store_supports_subscriptions): new function.
15745         (camel_store_folder_subscribed): new function.
15746         (camel_store_subscribe_folder): new function.
15747         (camel_store_unsubscribe_folder): new function.
15748
15749         * camel-store.h: add prototypes and virtual functions for the
15750         subscribe implementation.  also, add a subscribed_only argument to
15751         camel_store_get_folder_info.
15752
15753 2000-10-05  Jeffrey Stedfast  <fejj@helixcode.com>
15754
15755         * camel-mime-utils.c (header_address_list_format_append): Encode
15756         the name part of the address and don't quote the name.
15757         (header_decode_text): Rewrote from scratch, the old code was badly
15758         broken.
15759
15760 2000-10-05  Jeffrey Stedfast  <fejj@helixcode.com>
15761
15762         * camel-mime-message.c (camel_mime_message_set_reply_to): Use the
15763         camel_address_encode function again.
15764         (camel_mime_message_set_from): Same.
15765
15766 2000-10-05  Jeffrey Stedfast  <fejj@helixcode.com>
15767
15768         * camel-mime-utils.c (quoted_encode_step): Modified to not encode
15769         space chars in the middle of a line.
15770         (isblank): New macro if we're not on a system with the GNU isblank
15771         extension.
15772
15773         * camel-mime-message.c (camel_mime_message_set_from): Reversed my
15774         changes, don't header_encode_phrase - it generates broken headers.
15775         (camel_mime_message_set_reply_to): Same.
15776
15777 2000-10-04  Chris Toshok  <toshok@helixcode.com>
15778
15779         * providers/nntp/camel-nntp-utils.c (camel_nntp_get_headers):
15780         revert to old method (only use XOVER if OVER is supported.)
15781
15782         * providers/nntp/camel-nntp-store.c
15783         (camel_nntp_store_get_overview_fmt): handle the case where the
15784         OVER extension isn't listed but LIST OVERVIEW.FMT works (again,
15785         INN 2.2).  enable the OVER extension in this case.
15786
15787 2000-10-04  Chris Toshok  <toshok@helixcode.com>
15788
15789         * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): return a
15790         gboolean so we can tell if this command worked.  we can't key off
15791         the OVER extension being present because at least one server (INN
15792         2.2) doesn't report the OVER extension but implements the XOVER
15793         command.  This could of course just be because I'm a loser for
15794         thinking they were related in the first place.
15795         (camel_nntp_get_headers): always try XOVER first, and if it fails
15796         revert to the slow method.
15797
15798 2000-10-04  Dan Winship  <danw@helixcode.com>
15799
15800         * providers/mbox/camel-mbox-store.c (get_folder): Fix a case where
15801         a variable was free'd and then possibly used in an error message.
15802
15803 2000-10-04  Chris Toshok  <toshok@helixcode.com>
15804
15805         * providers/nntp/camel-nntp-provider.c
15806         (camel_provider_module_init): news: -> nntp:.
15807
15808 2000-10-04  Chris Toshok  <toshok@helixcode.com>
15809
15810         * providers/nntp/camel-nntp-store.c (nntp_store_get_folder_info):
15811         use "nntp:" instead of "news:" since "news:" urls aren't supposed
15812         to have host/user/port info in them.  also, if there's a user
15813         defined in the url, put it in the urls for our folders.
15814
15815 2000-10-04  Chris Toshok  <toshok@helixcode.com>
15816
15817         * providers/nntp/camel-nntp-auth.c (camel_nntp_auth_authenticate):
15818         borrow some code from the imap provider to query the user for
15819         their password, and pass the user/passwd to nntp.  be extra
15820         paranoid and zero out the password before freeing it.
15821
15822         * providers/nntp/camel-nntp-store.c (camel_nntp_store_init): add
15823         ALLOW_USER/ALLOW_PASSWORD/ALLOW_AUTH to the url flags.
15824         (nntp_store_query_auth_types_generic): return our list of
15825         auth_types.
15826         (nntp_store_query_auth_types_connected): broken, return same as in
15827         query_auth_types_generic.
15828
15829 2000-10-04  Dan Winship  <danw@helixcode.com>
15830
15831         * providers/imap/camel-imap-store.c (imap_connect): IMAP4
15832         (pre-rev1) doesn't support the 'LIST "" ""' idiom, so don't use
15833         it. Just assume the dir_sep is '/'. Shrug.
15834
15835 2000-10-04  Jeffrey Stedfast  <fejj@helixcode.com>
15836
15837         * camel-mime-message.c (camel_mime_message_set_reply_to): Use
15838         header_encode_phrase instead.
15839         (camel_mime_message_set_from): Same.
15840
15841 2000-10-04  Not Zed  <NotZed@HelixCode.com>
15842
15843         * camel-mime-utils.c (header_content_type_is): Handle the case
15844         where ct != NULL, but type and subtype are, and also match that
15845         against text/plain.
15846
15847         * camel-folder-summary.c: Bump summary file version.
15848         (message_info_save): Save the size from the messageinfo.
15849         (message_info_load): Load the size from the summary file.
15850         (message_info_load): Fixed up the time_t saving/loading.  There
15851         was a reason the warning was left there ... obviously nobody could
15852         read the comment "/* warnings, leave them here */", why do i even
15853         bother.
15854         (camel_folder_summary_decode_time_t): Decode a time_t value from
15855         the summary file.
15856         (camel_folder_summary_encode_time_t): Encode a time_t value to the
15857         summary file.
15858
15859 2000-10-03  Jeffrey Stedfast  <fejj@helixcode.com>
15860
15861         * providers/imap/camel-imap-command.c (camel_imap_command): Quote
15862         the mailbox name when sending a SELECT request otherwise mailboxes
15863         with spaces in their names will cause problems.
15864
15865         * camel-mime-message.c (camel_mime_message_set_reply_to): encode
15866         before setting.
15867         (camel_mime_message_set_from): Same.
15868
15869 2000-10-03  Dan Winship  <danw@helixcode.com>
15870
15871         * providers/imap/camel-imap-command.c: New file containing
15872         camel_imap_command and friends. Major camel_imap_command rewrite
15873         to remove duplicated code, make the parsing of literals be
15874         more safe/correct, deal with RECENT/EXPUNGE responses more
15875         consistently, and make it possible to implement the AUTHENTICATE
15876         command.
15877
15878         * providers/imap/camel-imap-utils.c (imap_parse_nstring): New
15879         function, to parse an IMAP "nstring".
15880
15881         * providers/imap/camel-imap-store.c: Move command stuff to
15882         camel-imap-command.c. Update for camel_imap_command changes.
15883
15884         * providers/imap/camel-imap-folder.c: Update for
15885         camel_imap_command changes.
15886         (imap_append_message): CRLF filter the message before sending it.
15887
15888         * providers/imap/Makefile.am: Add camel-imap-command.[ch], remove
15889         camel-imap-stream.[ch] for now.
15890
15891 2000-10-02  Jeffrey Stedfast  <fejj@helixcode.com>
15892
15893         * camel-mime-message.c (camel_mime_message_has_8bit_parts): New
15894         convenience function to determine if there are any 8bit mime parts
15895         in a mime message.
15896         (camel_mime_message_encode_8bit_parts): New convenience function
15897         to recursively reencode all 8bit mime parts to either
15898         quoted-printable or base64 depending on which would be the best
15899         encoding for that part.
15900
15901         * providers/smtp/camel-smtp-transport.c (smtp_data): If the mime
15902         message contains 8bit parts and the server doesn't support 8bit
15903         transfers, reencode those parts before proceding with the send.
15904         (smtp_mail): If the mime message contains 8bit parts and the
15905         server supports the 8BITMIME extension to SMTP, notify the server
15906         that we'll be sending it 8bit mime parts.
15907         (_send_to): Find out if the message contains 8bit parts.
15908
15909 2000-10-02  Jeffrey Stedfast  <fejj@helixcode.com>
15910
15911         * providers/smtp/camel-smtp-transport.c (_send_to): Use the
15912         CamelInternetAddress parser.
15913         (smtp_get_email_addr_from_text): deprecated.
15914
15915 2000-10-02  Dan Winship  <danw@helixcode.com>
15916
15917         * camel-provider.h: Remove default_ports.
15918
15919         * camel-remote-store.c (remote_connect): Get default_port from
15920         CamelRemoteStore rather than CamelProvider.
15921
15922         * providers/{imap,nntp,pop3}/camel-*-store.c: Initialize
15923         CamelRemoteStore::default_port
15924
15925         * providers/*/camel-*-provider.c: Remove default_ports.
15926
15927 2000-10-02  Dan Winship  <danw@helixcode.com>
15928
15929         * camel-folder.[ch]: Remove
15930         camel_folder_{get,free}_subfolder_info, as we want to be able to
15931         scan the whole subfolder tree without having to open any folders,
15932         so this needs to be in CamelStore. Remove can_hold_folders and
15933         can_hold_messages flags; things that don't hold messages are no
15934         longer considered CamelFolders.
15935
15936         * camel-folder-summary.[ch]: Remove CamelFolderInfo stuff.
15937
15938         * camel-store.[ch]: Add camel_store_{get,free}_folder_info, as
15939         well as camel_store_free_folder_info_full and ..._nop for default
15940         implementations, and camel_folder_info_free and
15941         camel_folder_info_build as convenience functions. Turn
15942         CamelFolderInfo into a tree structure and also add an "url"
15943         member.
15944
15945         * providers/*/camel-*-folder.c: Remove subfolder_info and can_hold
15946         stuff.
15947         * providers/*/camel-*-store.c: Add folder_info stuff.
15948
15949         * providers/imap/camel-imap-folder.c (imap_summary_free): Free the
15950         summary elements with camel_message_info_free, not
15951         camel_folder_info_free. Oops.
15952
15953         * providers/imap/camel-imap-utils.c: const poison
15954
15955 2000-09-28  Jeffrey Stedfast  <fejj@helixcode.com>
15956
15957         * providers/smtp/camel-smtp-transport.c: Fixed some memory leaks.
15958         (camel_smtp_transport_init): Initialize supports_8bit to FALSE.
15959         (smtp_helo): If server supports 8bit, set supports_8bit to TRUE.
15960
15961         * camel-transport.h (struct _CamelTransport): Added variable
15962         gboolean supports_8bit (we'll need this eventually? - see bugzilla
15963         bug #53)
15964
15965         * providers/smtp/camel-smtp-transport.c
15966         (smtp_get_email_addr_from_text): Ugh, no wonder people were
15967         getting illegal seek warnings *sigh*. I guess I can only blame
15968         myself for this one though :-(
15969
15970 2000-09-28  Jeffrey Stedfast  <fejj@helixcode.com>
15971
15972         * providers/smtp/camel-smtp-transport.c (_send_to): Don't send the
15973         recipient data through smtp_get_email_addr_from_text - this is a
15974         complete waste. In fact, we don't want to have to use that
15975         function ever.
15976
15977         * camel-internet-address.c, camel-address.c: Added some gtk-doc
15978         comments.
15979         
15980 2000-09-28  Jeffrey Stedfast  <fejj@helixcode.com>
15981         
15982         * camel-mime-utils.c (header_encode_string): Make sure to add the
15983         space char after an encoded word when the encoding is iso-8859-1.
15984
15985 2000-09-28  Jeffrey Stedfast  <fejj@helixcode.com>
15986
15987         * providers/imap/camel-imap-folder.c (imap_get_message): When
15988         getting a literal string response, don't include the \r\n after
15989         the closing } (as in: "... {798}\r\n...")
15990         
15991         * providers/imap/camel-imap-stream.c (stream_read): Same.
15992
15993 2000-09-28  Not Zed  <NotZed@HelixCode.com>
15994
15995         * camel-mime-utils.c (header_fold): New function to fold headers.
15996
15997 2000-09-27  Not Zed  <NotZed@HelixCode.com>
15998
15999         * camel-mime-parser.c (folder_scan_header): If we had an empty
16000         header, then it must be end of the headers too.
16001         (folder_scan_init): No we dont need to init the outbuf with a nul
16002         terminator.
16003
16004         * camel-folder-summary.c (camel_folder_summary_set_uid): New
16005         function to reset the uid to a higher value.
16006
16007         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
16008         "something failed (yo!)" what sort of crap is this?  Fixed all the
16009         indenting again, what wanker keeps running stuff through indent?
16010         (message_info_new): Check the uid we loaded off the disk, if it
16011         existed already, assign a new one.  If it didn't then make sure
16012         the nextuid is higher.
16013
16014         * camel-charset-map.c: New file, used to build a large unicode
16015         decoding mapping table, and use it to determine what is the
16016         lowest charset a given word can be encoded with.  Uses tables from
16017         libunicode's source.
16018
16019         * camel-internet-address.c (internet_encode): Use
16020         header_phrase_encode to properly encode the fullname, as required.
16021         refixed indenting.  Who keeps doing that?
16022         (camel_internet_address_find_address): Changed fatal return/warnings
16023         into assertions.
16024
16025         * camel-mime-utils.c (header_raw_append_parse): Check : explicitly
16026         (removed from is_fieldname() macro).
16027         (camel_mime_special_table): Changed to short, so we can represent
16028         more bit types.
16029         (quoted_encode): Take a mask of the safe chars for this encoding.
16030         (header_address_decode): Removed a #warning that makes no sense
16031         anymore.
16032         (header_decode_date): Fixed the 'broken date' parser code, if it
16033         ever decoded it it just threw away the result.
16034         (header_encode_string): Use better charset matching for encoding
16035         strings as well.
16036
16037 2000-08-31  Not Zed  <NotZed@HelixCode.com>
16038
16039         * providers/mh/camel-mh-summary.c (camel_mh_summary_sync): Save
16040         the index if we do a sync.
16041         (camel_mh_summary_check): Save the index here too.  Probably.
16042
16043 2000-09-27  Dan Winship  <danw@helixcode.com>
16044
16045         * providers/imap/camel-imap-store.c (camel_imap_command_extended):
16046         Return untagged data in a GPtrArray rather than a string, since it
16047         saves processing time and is much easier to deal with for several
16048         commands. Update for camel_imap_folder_changed change.
16049         (camel_imap_fetch_command): Update for camel_imap_folder_changed
16050         change.
16051         (imap_connect, imap_folder_exists): Update for
16052         camel_imap_command_extended change.
16053
16054         * providers/imap/camel-imap-folder.c
16055         (imap_get_message_count_internal,
16056         imap_get_subfolder_info_internal, imap_search_by_expression):
16057         Update for camel_imap_command_extended change.
16058
16059         (imap_get_summary_internal, imap_get_message_info_internal): Use
16060         camel_imap_fetch_command here now to get around the
16061         camel_imap_command_extended change.
16062
16063         (camel_imap_folder_changed): turn expunged into a GArray of ints
16064         rather than a GPtrArray of strings representing ints.
16065
16066 2000-09-26  Jeffrey Stedfast  <fejj@helixcode.com>
16067
16068         * providers/imap/camel-imap-folder.c
16069         (imap_get_message_count_internal): Quote the folder name as it may
16070         contain spaces.
16071         (imap_get_subfolder_info_internal): Same.
16072
16073         * providers/imap/camel-imap-utils.c (imap_parse_list_response): Do
16074         proper unquoting for folder names.
16075         (func_get_current_date): Implemented.
16076
16077         * providers/imap/camel-imap-store.c
16078         (imap_folder_exists): Quote the folder name as it may have spaces.
16079         (imap_create): Same.
16080         (check_current_folder): Same.
16081
16082 2000-09-22  Dan Winship  <danw@helixcode.com>
16083
16084         * providers/imap/camel-imap-folder.c
16085         (imap_get_subfolder_info_internal): The root folder's name is "",
16086         not the namespace.
16087         (camel_imap_folder_new): constify folder_name.
16088
16089         * providers/imap/camel-imap-store.c (get_folder): Create the
16090         folder with folder_name, not folder_path.
16091         (camel_imap_command_preliminary): Don't free cmdid here.
16092
16093 2000-09-21  Dan Winship  <danw@helixcode.com>
16094
16095         * providers/imap/camel-imap-utils.c (imap_create_flag_list): New
16096         function to convert Camel flags to an IMAP flag_list.
16097         (imap_parse_flag_list): Contrariwise.
16098
16099         * providers/imap/camel-imap-store.c (camel_imap_command_*): Make
16100         the @ret arg actually optional, as (mostly) documented.
16101         (various): Don't pass "&result" to camel_imap_command_* if we're
16102         just going to immediately free it. Don't record status if we're
16103         not going to look at it.
16104
16105         * providers/imap/camel-imap-folder.c: Likewise.
16106         (imap_summary_free): Use camel_folder_info_free.
16107         (imap_sync): Use imap_create_flag_list. Clear
16108         CAMEL_MESSAGE_FOLDER_FLAGGED after syncing so we don't keep
16109         re-syncing.
16110         (imap_append_message): Use imap_create_flag_list. Don't leak the
16111         memstream if the append fails.
16112         (imap_move_message_to): Use camel_folder_delete_message rather
16113         than doing it by hand.
16114         (imap_get_summary_internal, imap_get_message_info_internal): Use
16115         imap_parse_flag_list and header_raw_clear.
16116         (camel_imap_folder_changed): Use camel_message_info_free.
16117
16118 2000-09-21  Dan Winship  <danw@helixcode.com>
16119
16120         * providers/imap/camel-imap-store.c (get_folder_name): INBOX is
16121         case-insensitive.
16122         (get_root_folder_name): Make the root folder "" rather than "/".
16123         (get_folder): Update for root folder name change.
16124         (camel_imap_store_get_toplevel_dir): Removed. (Unused, unneeded.)
16125         (camel_imap_store_folder_path): New function to turn a Camel
16126         folder name into the corresponding namespaced IMAP path.
16127         (imap_folder_exists): Make this take a store and a path rather
16128         than a folder.
16129         (imap_create): Likewise
16130         (get_folder): Update for camel_imap_store_folder_path and other
16131         changes.
16132         (check_current_folder): Likewise.
16133
16134         * providers/imap/camel-imap-folder.c: Change a bunch of CamelStore
16135         variables to CamelImapStore (and add a few more) to prevent excess
16136         gratuitous casting. Use camel_imap_store_folder_path where
16137         appropriate.
16138         (camel_imap_folder_new): Update for root folder name change.
16139
16140 2000-09-19  Jeffrey Stedfast  <fejj@helixcode.com>
16141
16142         * providers/smtp/camel-smtp-transport.c (smtp_data): Use the
16143         linewrap filter to achieve full RFC0821 compliance.
16144
16145         * camel-mime-filter-linewrap.[c,h]: New mime-filter to word-wrap.
16146
16147 2000-09-19  Jeffrey Stedfast  <fejj@helixcode.com>
16148
16149         * camel-internet-address.c (internet_encode): When encoding the
16150         internet address, quote the name as the name may have commas or
16151         any other token which may later confuse our address parser.
16152
16153 2000-09-19  Dan Winship  <danw@helixcode.com>
16154
16155         * providers/imap/camel-imap-folder.c
16156         (imap_get_subfolder_info_internal): Fix the case where INBOX
16157         isn't returned in the folder listing.
16158
16159 2000-09-19  Dan Winship  <danw@helixcode.com>
16160
16161         * camel-folder.c: (init): Removed
16162         (camel_folder_init, camel_folder_construct): New object init
16163         function and public object constructor to replace the old init
16164         method in a more Gtk-like fashion.
16165
16166         (get_parent_folder, camel_folder_get_parent_folder): Removed. No
16167         CamelFolder subclass was ever setting the parent_folder member, no
16168         code has ever needed to look at it, and fixing it would actually
16169         be pretty hard.
16170
16171         (get_subfolder_info, camel_folder_get_subfolder_info): Renamed
16172         from ..._names. Deals in CamelFolderInfo now.
16173         (free_subfolder_info, camel_folder_free_subfolder_info): Likewise.
16174
16175         (get_subfolder, camel_folder_get_subfolder): Removed.
16176         CamelFolderInfo contains the subfolder's full name, so this is
16177         unnecessary now, and removing it lets us get rid of the
16178         CamelFolder separator member, which is needed for the default
16179         implementation of this function, but not otherwise needed for most
16180         providers.
16181
16182         Also, lots of code style fixes.
16183
16184         * providers/*: Update CamelFolder subclasses for changes, although
16185         none of them fill in the message counts in the CamelFolderInfo
16186         yet.
16187
16188 2000-09-18  Christopher James Lahey  <clahey@helixcode.com>
16189
16190         * camel-folder-search.c, camel-folder-search.h,
16191         camel-remote-store.c, providers/imap/camel-imap-folder.c,
16192         providers/imap/camel-imap-store.c: Fixed the #include lines to
16193         deal properly with gal.
16194
16195 2000-09-17  Dan Winship  <danw@helixcode.com>
16196
16197         * camel-folder-summary.h: update CamelFolderInfo
16198         * camel-folder-summary.c (camel_folder_info_free): New function to
16199         free the contents of a CamelFolderInfo
16200
16201 2000-09-15  Dan Winship  <danw@helixcode.com>
16202
16203         * camel.c (camel_init): Set camel_verbose_debug to TRUE if
16204         CAMEL_VERBOSE_DEBUG is set in the environment.
16205
16206         * camel-remote-store.c (remote_send_line, remote_recv_line): only
16207         log if camel_verbose_debug is TRUE.
16208
16209 2000-09-14  Jeffrey Stedfast  <fejj@helixcode.com>
16210
16211         * providers/imap/camel-imap-store.c (get_folder): Don't use
16212         dir_sep as top-level directory, use "/".
16213
16214         * providers/imap/camel-imap-folder.c (imap_expunge): Get rid of
16215         unused variable.
16216
16217 2000-09-13  Dan Winship  <danw@helixcode.com>
16218
16219         * providers/imap/camel-imap-folder.c (imap_expunge): Don't look at
16220         the response of the command. camel_imap_command_extended()
16221         processes EXPUNGE responses itself, so if we do it here too we
16222         remove twice as many summary items as we should.
16223
16224 2000-09-13  Jeffrey Stedfast  <fejj@helixcode.com>
16225
16226         * providers/imap/camel-imap-store.c (imap_folder_exists): Rewrote
16227         to take a third argument (gboolean *selectable) so that we can
16228         find out if the folder is selectable or not as we look to see if
16229         it exists. Also, don't use EXAMINE because that will not work on
16230         non-selectable folders, so use LIST instead.
16231         (get_folder): Check to see if the folder exists even vefore
16232         calling imap_create as this will save time. If the folder does
16233         exist, find out if it's selectable. Moved the call to refresh_info
16234         here.
16235
16236         * providers/imap/camel-imap-folder.c (imap_get_uids): Check for a
16237         NULL summary.
16238         (camel_imap_folder_new): Don't call refresh_info here - call it in
16239         get_folder() because we don't know if this folder even exists on
16240         the server yet! And even if it does, we don't know if it can hold
16241         messages or not yet.
16242
16243 2000-09-12  Jeffrey Stedfast  <fejj@helixcode.com>
16244
16245         * camel-mime-parser.c (folder_scan_step): Make sure *datalength is
16246         > 0 before calling camel_mime_filter_filter otherwise we will get
16247         a segfault if the filter calls iconv().
16248
16249 2000-09-08  Christopher James Lahey  <clahey@helixcode.com>
16250
16251         * providers/nntp/camel-nntp-auth.c,
16252         providers/nntp/camel-nntp-auth.h: Fixed a warning.
16253
16254 2000-09-07  Dan Winship  <danw@helixcode.com>
16255
16256         * camel-session.c (camel_session_get_storage_path): Make this not
16257         leak.
16258         
16259 2000-09-07  Dan Winship  <danw@helixcode.com>
16260
16261         * camel-session.c (camel_session_new): Make this take a path to a
16262         directory that Camel can use for its own nefarious purposes.
16263         (camel_session_get_storage_path): New function to return a path
16264         that a service can use for its own nefarious sub-purposes.
16265
16266         * camel-service.c (camel_service_get_path): New method (and
16267         useful default implementation) to get a (relative) pathname
16268         corresponding to the service.
16269
16270 2000-09-06  Dan Winship  <danw@helixcode.com>
16271
16272         * providers/pop3/camel-pop3-store.c (connect_to_server): Make KPOP
16273         work again.
16274
16275 2000-09-06  Jeffrey Stedfast  <fejj@helixcode.com>
16276
16277         * camel-mime-message.c (camel_mime_message_get_received_date):
16278         Implemented (someone added these to camel-mime-message.h but never
16279         implemented them!!) - though it may not be right.
16280         (camel_mime_message_get_sent_date): Same.
16281
16282 2000-09-05  Dan Winship  <danw@helixcode.com>
16283
16284         * camel-mime-part.c (camel_mime_part_get_filename): If a MIME part
16285         has no Content-Disposition, but does have a "name" on the
16286         Content-Type, return that as the filename.
16287         (process_header): strstrip the Content-Description
16288
16289 2000-09-05  Chris Toshok  <toshok@helixcode.com>
16290
16291         * providers/nntp/camel-nntp-utils.c (get_OVER_headers): care about
16292         response code.
16293         (get_HEAD_headers): same.
16294         (camel_nntp_get_headers): same.
16295
16296         * providers/nntp/camel-nntp-store.h: get rid of
16297         CAMEL_NNTP_OK/ERR/FAIL.
16298
16299         * providers/nntp/camel-nntp-store.c
16300         (camel_nntp_store_get_extensions): take CamelException arg and
16301         pass along to camel_nntp_command.
16302         (camel_nntp_store_get_overview_fmt): same.
16303         (nntp_store_connect): convert to using constants in
16304         camel-nntp-resp-codes.h
16305         (nntp_store_get_folder): make use of camel_nntp_folder_new.
16306         (camel_nntp_command_send_recv): new function to deal with auth
16307         challenge.
16308         (camel_nntp_command): split out most of this function into
16309         camel_nntp_command_send_recv.  also, return the actual response
16310         code instead of CAMEL_NNTP_OK/ERR/FAIL.
16311
16312         * providers/nntp/camel-nntp-resp-codes.h: new file.
16313
16314         * providers/nntp/camel-nntp-folder.h: prototype for
16315         camel_nntp_folder_new.
16316
16317         * providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new): new
16318         convenience function.
16319         (nntp_folder_get_message): care more about the actual response
16320         code.
16321
16322         * providers/nntp/Makefile.am (libcamelnntp_la_SOURCES): add
16323         camel-nntp-auth.c.
16324         (libcamelnntpinclude_HEADERS): add camel-nntp-auth.h.
16325
16326         * providers/nntp/camel-nntp-auth.h: new file.
16327
16328         * providers/nntp/camel-nntp-auth.c: new file.
16329
16330 2000-09-05  Peter Williams  <peterw@helixcode.com>
16331
16332         * providers/imap/camel-imap-store.c (imap_folder_exists): Don't free the
16333         result on error; the exception will have the relevant info.
16334
16335         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Check for
16336         exceptions here.
16337
16338         * providers/imap/camel-imap-store.c (imap_connect): Check the exception
16339         on the refresh_folders call.
16340
16341         * providers/imap/camel-imap-store.h: Clean up some now-unused fields.
16342
16343         * camel.c (camel_init): Call unicode_init again, now that libunicode
16344         will not initialize itself twice.
16345
16346 2000-09-02  Lauris Kaplinski  <lauris@helixcode.com>
16347
16348         * camel-folder-search (search_header_contains): Use e_utf8_strstrcase
16349
16350 2000-09-01  Christopher James Lahey  <clahey@helixcode.com>
16351
16352         * providers/imap/camel-imap-utils.c: Removed some unused
16353         functions.
16354
16355 2000-09-01  Peter Williams  <peterw@helixcode.com>
16356
16357         * providers/nntp/camel-nntp-store.c (camel_nntp_command): Initialize
16358         the statically-allocated CamelException so that it doesn't contain
16359         junk data that camel_exception_set() may try to free.
16360         (camel_nntp_store_get_extensions): Same.
16361         (camel_nntp_store_get_overview_fmt): Same.
16362
16363         * providers/pop3/camel-pop3-store.c (camel_pop3_command): Typo
16364         fix (if (*ret) -> if (ret)).
16365
16366         * providers/pop3/camel-pop3-store.c (pop3_connect): Set the
16367         port # back to what was specified ASAP, so that the hash of
16368         the URL doesn't change (which causes a failure in
16369         service_cache_remove that leads to a segfault).
16370
16371         * providers/imap/camel-imap-store.c (imap_connect): Clear the 
16372         exception after a failed LOGIN so that it doesn't pass through
16373         to the upper level and make mail think that the login failed.
16374
16375         * providers/pop3/camel-pop3-store.c (pop3_connect): As above.
16376
16377 2000-08-31  Peter Williams  <peterw@helixcode.com>
16378
16379         * providers/pop3/camel-pop3-store.c (camel_pop3_store_get_type):
16380         Implement POP3 with the CamelRemoteStore now.
16381         (connect_to_server): Hack this a bit to get KPOP to work. Obey
16382         the new connection semantics of the remote store (implicitly).
16383         (query_auth_types_connected): Clear exceptions after attempts
16384         to connect; the code at the bottom will catch hard errors.
16385         Use camel_service_connect.
16386         (camel_pop3_command): Take a CamelException; now, when an error
16387         occurs, ret is set to NULL and the exception passes back the
16388         appropriate information.
16389         (pop3_get_response): Same as above.
16390         (pop3_try_authenticate): Give camel_pop3_command its exception
16391         and handle it properly.
16392         (pop3_connect): Call the parent classfuncs. Don't disconnect
16393         on error (done for us).
16394
16395         * providers/pop3/camel-pop3-folder.c: Obey the camel_pop3_command
16396         semantics.
16397
16398         * camel-remote-store.c (remote_query_auth_types_connected): Don't
16399         warn; just return NULL.
16400         (remote_query_auth_types_generic): Same.
16401         (remote_send_string): Filter out passwords in debugging output.
16402
16403         * providers/pop3/camel-pop3-store.c (camel_pop3_store_init): Also
16404         set the ALLOW_AUTH flag.
16405
16406         * providers/imap/camel-imap-store.c (camel_imap_store_init): Same.
16407
16408 2000-08-31  Chris Toshok  <toshok@helixcode.com>
16409
16410         * providers/nntp/camel-nntp-store.c (camel_nntp_store_class_init):
16411         remove get_folder_name.
16412         (nntp_store_get_folder_name): remove.
16413
16414 2000-08-31  Lauris Kaplinski  <lauris@helixcode.com>
16415
16416         * camel-mime-part.c (write_to-stream): Use filter only if we have one
16417         
16418 2000-08-31  Chris Toshok  <toshok@helixcode.com>
16419
16420         * providers/nntp/camel-nntp-utils.c (get_OVER_headers): use
16421         camel_remote_store_recv_line.
16422
16423         * providers/nntp/camel-nntp-folder.c (nntp_folder_get_message):
16424         use camel_remote_store_recv_line to build message.  also, free our
16425         buffer so we don't leak like mad.
16426
16427         * providers/nntp/camel-nntp-store.c:
16428         (camel_nntp_store_get_additional_data) remove.
16429         (camel_nntp_store_get_extensions): use
16430         camel_remote_store_recv_line.
16431         (camel_nntp_store_get_overview_fmt): same.  also, don't rely on
16432         _get_additional_data anymore since it's easier to parse without.
16433         (camel_nntp_command): use camel_remote_store_send_string and
16434         camel_remote_store_recv_line.
16435
16436         * providers/nntp/camel-nntp-store.h: CamelRemoteStore is the
16437         parent class now.  remove istream/ostream since CamelRemoteStore
16438         takes care of that for us.  also remove the prototype for
16439         camel_nntp_store_get_additional_data.
16440
16441         * providers/nntp/camel-nntp-newsrc.c (camel_nntp_newsrc_write):
16442         make sure to clear dirty bit.
16443         (camel_nntp_newsrc_read_for_server): don't worry about continually
16444         trying to open the file - if it fails we just return an
16445         unpopulated .newsrc file.
16446
16447 2000-08-31  Chris Toshok  <toshok@helixcode.com>
16448
16449         * providers/nntp/camel-nntp-newsrc.c
16450         (camel_nntp_newsrc_read_for_server): make this a bit more robust.
16451         try to create an empty .newsrc file for the server if we can't
16452         open it for reading.  also, don't allocate everything until we've
16453         opened the file.
16454
16455         * providers/nntp/camel-nntp-utils.c (get_OVER_headers): make use
16456         of our overview field indices.
16457         (camel_nntp_get_headers): only call get_OVER_headers if the
16458         extension is present.  warn if it's not - since get_HEAD_headers
16459         needs work before it works.
16460
16461         * providers/nntp/camel-nntp-store.c
16462         (camel_nntp_store_get_extensions): new function - query the server
16463         for it's extensions.
16464         (camel_nntp_store_get_overview_fmt): new function - query the
16465         server for the overview format and build our table of the indices
16466         we care about.  support the "full" suffix on fields.
16467         (nntp_store_connect): call camel_nntp_store_get_extensions and
16468         camel_nntp_store_get_overview_fmt.
16469
16470         * providers/nntp/camel-nntp-store.h: add codes for extensions
16471         found on news.mozilla.org.  only one that we care about is OVER.
16472         also, add CamelNNTPOverField and an enum of the overview fields
16473         that we care about.
16474
16475 2000-08-31  Jeffrey Stedfast  <fejj@helixcode.com>
16476
16477         * providers/imap/camel-imap-utils.c (imap_translate_sexp):
16478         Reimplemented. It should now work correctly for most possible
16479         VFolder rules.
16480
16481 2000-08-31  Jeffrey Stedfast  <fejj@helixcode.com>
16482
16483         * providers/imap/camel-imap-store.c (camel_imap_command_extended):
16484         Don't save any exceptions caused by camel_imap_folder_changed
16485         (camel_imap_fetch_command): Same.
16486         
16487         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
16488         Using a new way of calculating the first recent message that seems
16489         more accurate. Also added code to make sure we don't accidently
16490         add a duplicate summary.
16491
16492 2000-08-31  Not Zed  <NotZed@HelixCode.com>
16493
16494         * camel-mime-part.c (write_to_stream): Use the proper type
16495         checking function to check for text types.
16496         (write_to_stream): If we have a charset on a text type that
16497         isn't us-ascii or utf-8, then we need to reencode it, so add a
16498         filter to do that too.
16499         (write_to_stream): Fix some warnings/use the right constructor,
16500         oops.
16501         (write_to_stream): Rearrange the logic so it always does charset
16502         conversion, and not just if we have a qp/base64 block.
16503
16504         * camel-mime-utils.c (append_latin1): New function - even though
16505         its broken, we'll assume mailers send latin1 headers instead of
16506         us-ascii.  We just have to encode high chars into utf-8.
16507         (header_decode_text): Call append_latin1 for appending unencoded
16508         text segments.
16509         (append_latin1): Do an additional mask for account for c's
16510         undefined behaviour for sign extension whilst shifting right.
16511
16512 2000-08-30  Jeffrey Stedfast  <fejj@helixcode.com>
16513
16514         * providers/imap/camel-imap-store.c (camel_imap_fetch_command):
16515         Rewrote to ignore strings that look like server responses until it
16516         is sure that it has finished reading the literal string response.
16517
16518 2000-08-30  Jeffrey Stedfast  <fejj@helixcode.com>
16519         
16520         * camel-remote-store.c (remote_send_string): Don't wrap printed
16521         strings in quotes, makes things messy
16522         
16523         * providers/imap/camel-imap-folder.c (imap_get_message): Updated
16524         to use the camel_imap_fetch_command
16525         
16526         * providers/imap/camel-imap-stream.c (stream_read): Updated to use
16527         camel_imap_fetch_command
16528
16529         * providers/imap/camel-imap-store.c (camel_imap_command_extended):
16530         No longer handles FETCH requests so no longer needs to be
16531         concerned with checking to make sure that server responses are
16532         valid (they have to be).
16533         (camel_imap_fetch_command): New convenience function that handles
16534         all FETCH requests
16535
16536 2000-08-30  Peter Williams  <peterw@helixcode.com>
16537
16538         * camel-remote-store.c (remote_connect): Unify with remote_post_connect.
16539         (remote_disconnect): Unify with remote_pre_disconnect.
16540         (camel_remote_store_class_init): Don't use the post_connect and
16541         pre_disconnect classfuncs anymore ; they weren't especially useful.
16542
16543         * providers/imap/camel-imap-store.c (imap_connect): Use this again
16544         instead of implementing post_connect.
16545         (imap_disconnect): Analogous to above.
16546
16547         * camel-session.c (camel_session_get_service_connected): New function.
16548         Like camel_session_get_service() but also connects to the service
16549         if needed. camel_session_get_{store,transport} (defined in the header)
16550         used this now, preventing annoying when-to-connect problems.
16551
16552         * camel-service.c (camel_service_new): Revert to the old behavior
16553         of not connecting until told to do so. Otherwise doing auth
16554         testing correctly is really hard.
16555         (camel_service_connect): Fix behavior here (set the connected
16556         flag).
16557         (camel_service_disconnect): Unset the connected flag.
16558
16559 2000-08-30  Jeffrey Stedfast  <fejj@helixcode.com>
16560
16561         * providers/imap/camel-imap-store.c: General cleanup / moving
16562         stuff around to make things easier to follow.
16563
16564 2000-08-30  Jeffrey Stedfast  <fejj@helixcode.com>
16565         
16566         * camel-remote-store.c: Prevent exceptions from being overwritten
16567
16568         * providers/imap/camel-imap-folder.c (imap_expunge): Beautified
16569         (imap_get_subfolder_names_internal): Removed old code as the
16570         replacement code has now been tested and proven to work
16571
16572 2000-08-29  Jeffrey Stedfast  <fejj@helixcode.com>
16573
16574         * providers/imap/camel-imap-utils.c: Removed old code that will
16575         never be needed again
16576
16577         * providers/imap/camel-imap-store.c: Removed old code for
16578         try_connect - will never need this code
16579         (slurp_response): Update to make sure we aren't falsely detecting
16580         EXPUNGE flags
16581
16582 2000-08-29  Peter Williams  <peterw@helixcode.com>
16583
16584         * camel-service.c (camel_service_connect): Uncomment this.
16585         (camel_service_disconnect): Same.
16586
16587         * camel-remote-store.[ch]: New files. Abstract remote storages
16588         (IMAP, POP3, NNTP) and hides the lower-level networky stuff.
16589         
16590         * camel-service.c (camel_service_new): Take an extra argument, the
16591         provider that created us, cause it's useful.
16592         (camel_service_finalize): Unref our new provider member.
16593
16594         * camel-session.c (camel_session_get_service): Pass the proper number of
16595         arguments to camel_service_new().
16596
16597         * camel-imap-store.c: Massive update: 1) use the CamelRemoteService to
16598         make our life Very Easy (TM). 2) Change the semantics of all 
16599         camel_imap_command* functions to take exceptions, centralize tons of
16600         duplicate code, and use the handy RemoteStore utility functions
16601
16602         * camel-imap-folder.c: Use the new semantics of camel_imap_command*
16603
16604         * camel-imap-stream.c: Same.
16605         
16606 2000-08-29  Jeffrey Stedfast  <fejj@helixcode.com>
16607
16608         * providers/imap/camel-imap-store.c (camel_imap_command_extended):
16609         Updated to check for EXPUNGE notifications
16610
16611         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
16612         Updated to account for messages which have been expunged (now
16613         takes a new arg, a GPtrArray of message id's that have been
16614         expunged)
16615         (imap_expunge): Updated (we may want to just use the code in
16616         folder_changed now instead of doing our own summary
16617         expunging...but that can be fixed later)
16618         (imap_append_message): Updated.
16619         (imap_copy_message_to): Updated.
16620         (imap_move_message_to): Updated.
16621
16622 2000-08-28  Peter Williams  <peterw@helixcode.com>
16623
16624         * camel-folder.c (camel_folder_refresh_info): New member function,
16625         refresh_info, used for rereading folder state after its state has
16626         somehow become unknown. Tries to preserve last-known status of
16627         messages.
16628
16629         * providers/mbox/camel-mbox-folder.c (mbox_refresh_info): Implement
16630         ::refresh_info (split up ::init)
16631
16632         * providers/mbox/camel-mbox-store.c (get_folder): Call ::refresh_info.
16633
16634         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Call
16635         ::refresh_info once initialized.
16636         (imap_refresh_info): New member function; reads the summary from
16637         the server (used to be in camel_imap_folder_new; split out).
16638
16639         * providers/imap/camel-imap-store.c (imap_connect): Set
16640         CamelService::connected a little early so that 
16641         camel_imap_command won't try to connect while already
16642         connnecting.
16643         (camel_imap_command*): Try to connect if not connected already.
16644         
16645         * providers/pop3/camel-pop3-folder.c (pop3_refresh_info): Same as above.
16646
16647         * providers/pop3/camel-pop3-folder.c (camel_pop3_folder_new): Same
16648         as above.
16649
16650         * providers/pop3/camel-pop3-store.c (pop3_connect): Set 
16651         CamelService::connected a little early so that
16652         camel_pop3_command won't try to connect while already
16653         connecting
16654         (connect_to_server): Same.
16655
16656         * providers/nntp/camel-nntp-folder.c (nntp_folder_refresh_info): Same
16657         as above.
16658
16659 2000-08-28  Jeffrey Stedfast  <fejj@helixcode.com>
16660
16661         * providers/imap/camel-imap-folder.c (imap_get_message): Fixed the
16662         hack around quoted string responses - should now handle them
16663         according to the specifications in the RFC
16664         
16665         * providers/imap/camel-imap-stream.c (stream_read): Updated to
16666         match the code currently used in camel-imap-folder.c
16667
16668 2000-08-28  Ettore Perazzoli  <ettore@helixcode.com>
16669
16670         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
16671         Never ever free `tmpname' as it comes from `alloca()'!
16672
16673 2000-08-26  Ettore Perazzoli  <ettore@helixcode.com>
16674
16675         * camel-mime-utils.c (header_decode_text): Use `g_free()', not
16676         `free()', to free `decword'.
16677
16678 2000-08-25  Peter Williams  <peterw@helixcode.com>
16679
16680         * camel.c (camel_init): Don't call unicode_init; code in e-util
16681         will do it, and if unicode_init is called twice, you get an
16682         infinite loop when looking up nonexistant encodings (patch
16683         has been submitted to libunicode's maintainer).
16684         
16685         * camel-provider.h: Add a new field, default_ports, which
16686         helps the configuration code guess about how to make CamelURL's
16687         from providers.
16688         
16689         * providers/*/camel-*-provider.c: Specify default ports.
16690
16691 2000-08-25  Jeffrey Stedfast  <fejj@helixcode.com>
16692
16693         * providers/imap/camel-imap-folder.c
16694         (imap_get_subfolder_names_internal): If the url path is "/" and
16695         the folder path is "/", just LIST "" "*" (this should fix some
16696         cyrus imapd problems). Also, INBOX is case insensitive so use
16697         g_strcasecmp
16698
16699 2000-08-24  Lauris Kaplinski  <lauris@helixcode.com>
16700
16701         * camel-folder-summary.c (summary_build_content_info):
16702         Use UTF-8 as default
16703         * camel-mime-part-utils.c (simple_data_wrapper_construct_from_parser):
16704         Use UTF-8 as default
16705         * camel-mime-utils.c (rfc2047_decode_word): Use UTF-8
16706         
16707 2000-08-17  Not Zed  <NotZed@HelixCode.com>
16708
16709         * providers/mh/camel-mh-folder.c (mh_finalize): And here too.
16710
16711         * providers/mbox/camel-mbox-folder.c (mbox_finalize): Close index
16712         on exit.
16713
16714 2000-08-23  Dan Winship  <danw@helixcode.com>
16715
16716         * camel-mime-utils.c (header_address_list_format_append): put
16717         commas between addresses.
16718
16719 2000-08-22  Dan Winship  <danw@helixcode.com>
16720
16721         * providers/imap/camel-imap-folder.c
16722         (imap_protocol_get_summary_specifier): use BODY.PEEK, not BODY, so
16723         we don't set the message \Seen.
16724
16725 2000-08-22  Christopher James Lahey  <clahey@helixcode.com>
16726
16727         * providers/pop3/camel-pop3-store.c: Fixed a small warning.
16728
16729 2000-08-22  Peter Williams  <peterw@helixcode.com>
16730
16731         * camel-service.c (camel_service_new): Connect automatically if the
16732         URL is not empty.
16733         (finalize): Disconnect automatically if connected.
16734         (camel_service_query_auth_types): Split into two functions; one to
16735         be called if we're connected to an actual server (_connected), one
16736         to be called if we're just gauging the general authtypes supported
16737         (_generic).
16738         (is_connected): Remove.
16739
16740         * camel-store.c (camel_store_get_folder): Don't connect explicitly to
16741         the service.
16742
16743         * providers/nntp/camel-nntp-store.c (query_auth_types_generic): Split
16744         the query_auth_types function. Hook it up in _new.
16745         (finalize): Don't try to disconnect here.
16746         
16747         * providers/pop3/camel-pop3-store.c (query_auth_types_generic): Same.
16748         (finalize): Don't try to disconnect here.
16749
16750         * providers/imap/camel-imap-store.c (query_auth_types_generic): Same.
16751         (finalize): Don't try to disconnect here.
16752
16753         * providers/smtp/camel-smtp-transport.c (query_auth_types_generic): Split
16754         the query_auth_types (dummy, in this case) function. Hook it up in _new.
16755         (finalize): Don't try to disconnect here.
16756
16757 2000-08-21  JP Rosevear  <jpr@helixcode.com>
16758         
16759         * providers/nntp/camel-nntp-folder.c (nntp_folder_get_subfolder_names):
16760         Make sure newsrc is not null
16761         (nntp_folder_get_subfolder_names): ditto
16762
16763         * providers/nntp/camel-nntp-newsrc.c 
16764         (camel_nntp_newsrc_get_subscribed_group_names): Programming check
16765         for newsrc == NULL
16766         (camel_nntp_newsrc_get_all_group_names): ditto
16767         (camel_nntp_newsrc_write_to_file): ditto
16768         (camel_nntp_newsrc_write): ditto
16769
16770 2000-08-21  JP Rosevear  <jpr@helixcode.com>
16771
16772         * providers/nntp/camel-nntp-store.c (camel_nntp_command): 
16773         Make sure respbuffer is not null before manipulating it.
16774         If it is null, return CAMEL_NNTP_FAIL and a decent error
16775         message.
16776         
16777 2000-08-18  Peter Williams  <peterw@helixcode.com>
16778
16779         * camel-internet-address.c (internet_encode): If the name is "" we
16780         weren't outputting anything; output the address at least.
16781
16782 2000-08-16  Peter Williams  <peterw@helixcode.com>
16783
16784         * camel-internet-address.c (internet_encode): Fix a leak when
16785         name = "". It's a single-byte leak, but it's the little things
16786         that count.
16787
16788         * camel-object.c (camel_type_lock_up): Don't leave the type
16789         system locked when a bad unlock happens.
16790
16791         * providers/mbox/camel-mbox-store.c (get_folder): Fix a leak.
16792
16793 2000-08-15  Peter Williams  <peterw@helixcode.com>
16794
16795         * providers/imap/camel-imap-folder.c (imap_copy_message_to): Typo fix.
16796
16797 2000-08-14  Peter Williams  <peterw@helixcode.com>
16798
16799         * camel-folder-search.c (search_get_sent_date): New search function;
16800         returns the time_t when the message was sent.
16801         (search_get_receive_date): Same for when it was received.
16802         (search_get_current_date): Gets the current time for use with the
16803         above two. Is this in the right place?
16804
16805         * camel-folder-search.h: Add the new functions above to the class.
16806
16807 2000-08-13  Dan Winship  <danw@helixcode.com>
16808
16809         * providers/nntp/Makefile.am (libcamelnntpinclude_HEADERS): Add
16810         camel-nntp-utils.h
16811
16812         * providers/imap/camel-imap-folder.c
16813         (imap_get_subfolder_names_internal): do a strcasecmp rather than
16814         just a strcmp when checking if a folder is "INBOX", since it is
16815         a case-insensitive name.
16816
16817 2000-08-12  Dan Winship  <danw@helixcode.com>
16818
16819         * providers/imap/camel-imap-folder.c (imap_get_summary_internal):
16820         Don't assume the FETCH results will come back in the order they
16821         were requested.
16822         (imap_get_subfolder_names_internal): Add "INBOX" to the list as
16823         g_malloc'ed memory, not a static string.
16824
16825 2000-08-12  Jeffrey Stedfast  <fejj@helixcode.com>
16826
16827         * providers/imap/camel-imap-store.c
16828         (camel_imap_command_continuation): Now takes a char * parameter
16829         rather than a stream
16830         (camel_imap_command_continuation_with_stream): Same function as
16831         above but takes a stream parameter instead
16832
16833         * providers/imap/camel-imap-folder.c (imap_append_message): Use
16834         camel_imap_command_continuation_with_stream
16835
16836 2000-08-12  Dan Winship  <danw@helixcode.com>
16837
16838         * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): New
16839         function to do one round of attempted authentication.
16840         (pop3_connect): Move a bunch of code out into
16841         pop3_try_authenticate and fix some bugs in the edge cases.
16842
16843 2000-08-12  Jeffrey Stedfast  <fejj@helixcode.com>
16844
16845         * providers/imap/camel-imap-store.c (query_auth_types): No longer
16846         calls try_connect() to get authtypes
16847
16848 2000-08-11  Jeffrey Stedfast  <fejj@helixcode.com>
16849
16850         * providers/imap/camel-imap-store.c
16851         (camel_imap_command_continuation): Changed param order a bit and
16852         fixed some logic
16853
16854         * providers/imap/camel-imap-folder.c (imap_append_message): Use
16855         the new multi-transactional convenience functions
16856
16857 2000-08-11  Jeffrey Stedfast  <fejj@helixcode.com>
16858         
16859         * providers/imap/camel-imap-store.c
16860         (camel_imap_command_preliminary): New convenience function for
16861         multi-transactional commands (opening request)
16862         (camel_imap_command_continuation): New convenience function for
16863         multi-transactional commands (followup data)
16864
16865 2000-08-11  Christopher James Lahey  <clahey@helixcode.com>
16866
16867         * providers/mh/camel-mh-folder.c: Fixed a warning.
16868
16869 2000-08-11  Chris Toshok  <toshok@helixcode.com>
16870
16871         * providers/nntp/camel-nntp-folder.c
16872         (camel_nntp_folder_class_init): remove get_name and get_full_name
16873         assignments, since the camel-folder.c implementation does what we
16874         need.
16875
16876 2000-08-11  Chris Toshok  <toshok@helixcode.com>
16877
16878         * providers/nntp/camel-nntp-store.c
16879         (camel_nntp_store_get_toplevel_dir): use g_get_home_dir, since
16880         evolution_dir isn't available in the providers.
16881
16882 2000-08-11  Peter Williams  <peterw@helixcode.com>
16883
16884         * camel-folder.c (thaw): Fix a bug where the message_changed
16885         signal wasn't being emitted.
16886
16887 2000-08-11  Not Zed  <NotZed@HelixCode.com>
16888
16889         * providers/mh/camel-mh-folder.c (mh_set_message_user_tag):
16890         Implement.
16891         (mh_get_message_user_tag): Implement.
16892
16893         * providers/mbox/camel-mbox-folder.c (mbox_get_message_user_tag):
16894         (mbox_set_message_user_tag): Implement.
16895
16896         * camel-folder.c (move_message_to): Yay so lets fix an already
16897         fixed fix, again.
16898         (copy_message_to): and here too ... update for api change to append().
16899         And removed another warning.
16900         (camel_folder_set_message_user_tag): Routine to set message tags.
16901         (camel_folder_get_message_user_tag): And accessor.
16902
16903 2000-08-10  Christopher James Lahey  <clahey@helixcode.com>
16904
16905         * camel-folder-search.c, camel-folder-summary.c, camel-medium.c,
16906         camel-mime-filter-charset.c, camel-mime-filter.c,
16907         camel-mime-filter.h, camel-mime-message.c, camel-mime-parser.c,
16908         camel-mime-part-utils.c, camel-mime-part.c, camel-mime-utils.c,
16909         camel-movemail.c, camel-multipart.c, camel-object.c,
16910         camel-stream-mem.c, providers/mbox/camel-mbox-folder.c,
16911         providers/mbox/camel-mbox-summary.c,
16912         providers/mh/camel-mh-folder.c,
16913         providers/smtp/camel-smtp-transport.c: Fixed some warnings.
16914
16915 2000-08-11  Not Zed  <NotZed@HelixCode.com>
16916
16917         * providers/vee/camel-vee-folder.c (vee_folder_build_folder): Free
16918         the search properly.
16919         (vee_folder_build): And here too.
16920
16921 2000-08-10  Jeffrey Stedfast  <fejj@helixcode.com>
16922
16923         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
16924         If we go over the max number of messages, don't keep requesting
16925         new message summaries, just break.
16926
16927 2000-08-11  Not Zed  <NotZed@HelixCode.com>
16928
16929         * camel-mime-parser.c (folder_scan_header): A better way to
16930         compress leading whitespace.  The code is probably invalid anyway,
16931         I dont think it will work across buffer boundaries.
16932
16933         * providers/mbox/camel-mbox-folder.c (mbox_append_message): And
16934         write out proper format From lines here too.
16935
16936         * providers/mbox/camel-mbox-summary.c
16937         (camel_mbox_summary_build_from): New function to build a more
16938         compatible mbox "From " line.
16939         (camel_mbox_summary_sync): Write From lines in the proper format.
16940
16941 2000-08-10  Not Zed  <NotZed@HelixCode.com>
16942
16943         * providers/mh/camel-mh-store.c (get_folder): Remove warnin g.
16944
16945         * providers/mbox/camel-mbox-store.c (xrename): Kill some warnings
16946         with constification.
16947
16948         * providers/imap/camel-imap-folder.c (imap_append_message): Fixed
16949         for append api change.  Eek this routine seriously wastes memory.
16950
16951         * providers/mh/camel-mh-folder.c (mh_search_free): Impelemnt.
16952         (mh_append_message): Fix for api change, and include user flags
16953         and tags in new message.
16954
16955         * providers/vee/camel-vee-folder.c (vee_search_by_expression): Fix
16956         for search api change.
16957
16958         * camel-folder.c (camel_folder_search_free): New function for
16959         freeing search results.
16960         (search_free): Changed my mind, implement a default that actually
16961         does something.  Free as to the old interface.
16962         (camel_folder_append_message): Changed to accept a
16963         camelmessageinfo rather than flags, which just doesn't have enough
16964         info in it.
16965         (copy_message_to): Change for append_message api change.
16966         (move_message_to): Likewise.
16967
16968         * providers/mbox/camel-mbox-folder.c (mbox_search_free):
16969         Implement.
16970         (mbox_append_message): Fix for api change, and also copy user
16971         flags/tags across to new summary.
16972
16973         * camel-folder-search.c (search_user_tag): A search expression
16974         that returns the current use flag by name.
16975         (camel_folder_search_free_result): New function to free the result
16976         of a search.
16977
16978         * camel-folder-summary.c: Bump summary version.
16979         (message_info_new): 
16980         (message_info_load): 
16981         (message_info_save): 
16982         (camel_message_info_dup_to): 
16983         (camel_message_info_free): Added support for arbitrary tag/value
16984         pairs (CamelTag's).
16985         (camel_tag_get): 
16986         (camel_tag_set):
16987         (camel_tag_list_size):
16988         (camel_tag_list_free): Operations for working with CamelTags.
16989
16990 2000-08-09  Peter Williams  <peterw@helixcode.com>
16991
16992         * camel-store.c (camel_store_get_folder): Connect beforehand, if
16993         necessary.
16994
16995         * providers/imap/camel-imap-store.c (camel_imap_store_init): Default
16996         the dir_sep to "/" so that certain functions can safely assume that
16997         dir_sep is valid (at least, nonnull).
16998
16999 2000-08-09  Ettore Perazzoli  <ettore@helixcode.com>
17000
17001         * providers/nntp/camel-nntp-folder.c
17002         (nntp_folder_set_message_flags): Get rid of an unused variable.
17003
17004         * providers/nntp/Makefile.am (INCLUDES): Fix includes so that we
17005         don't use installed headers anymore.  [I copied this over from the
17006         IMAP provider, that does not seem to have this problem.]
17007
17008 2000-08-09  Not Zed  <NotZed@HelixCode.com>
17009
17010         * camel-folder-search.c (camel_folder_search_execute_expression):
17011         Reorder search result in summary order if we searched with a
17012         summary.
17013
17014 2000-08-08  Dan Winship  <danw@helixcode.com>
17015
17016         * camel-uid-cache.c: New code to keep an on-disk cache of what
17017         UIDs have been seen in a folder.
17018
17019         * camel-provider.h: Add new flags CAMEL_PROVIDER_IS_SOURCE (mail
17020         can arrive in it by non-Camel means) and CAMEL_PROVIDER_IS_STORAGE
17021         (you can work with mail directly without needing to copy it local).
17022
17023         * providers/*/camel-*-provider.c: Add flags as needed: imap and
17024         mbox are SOURCE and STORAGE. mh and nntp are just STORAGE, pop3 is
17025         just SOURCE.
17026
17027         * camel-mime-message.c (process_header): Add another subject
17028         g_strstrip that fejj's earlier commit missed.
17029
17030 2000-08-08  Peter Williams  <peterw@helixcode.com>
17031
17032         * camel-provider.h: Remove some GTK stuff that I missed.
17033
17034         * providers/imap/camel-imap-store.c (imap_noop): Turn this
17035         back on with the new timeout interface in CamelSession.
17036
17037         * camel-session.[ch] (camel_session_register_timeout): New
17038         interface for Camel to register timeouts. Basically the
17039         GTK timeout interface is copied. We do this because Camel isn't
17040         allowed to use GTK anymore.
17041         
17042 2000-08-07  Not Zed  <NotZed@HelixCode.com>
17043
17044         * providers/mh/camel-mh-folder.c (mh_append_message): Only retry
17045         another uid if we had a name clash, otherwise fail.
17046
17047 2000-08-07  Jeffrey Stedfast  <fejj@helixcode.com>
17048
17049         * providers/imap/camel-imap-folder.c
17050         (imap_get_subfolder_names_internal): If we are trying to get a
17051         subfolder listing of the root folder, always make sure INBOX is
17052         there...
17053
17054         * providers/imap/camel-imap-utils.c (imap_parse_list_response): 
17055         Check for NIL as a directory separator.
17056
17057 2000-08-07  Peter Williams  <peterw@helixcode.com>
17058
17059         * providers/nntp/Makefile.am: Reorder the INCLUDES to pull
17060         in the camel headers from the local source tree before
17061         the ones in $(includedir). This was causing compile problems
17062         because the installed, Gtk-based camel-object.h was included
17063         before the uninstall Camel-based one.
17064
17065 2000-08-07  Jeffrey Stedfast  <fejj@helixcode.com>
17066
17067         * providers/imap/camel-imap-utils.c (imap_translate_sexp): Strip
17068         all \n's from the expression
17069
17070         * string-utils.c (strip): New convenience function to strip
17071         occurences of a single char from a string
17072
17073         * camel-mime-message.c (camel_mime_message_set_subject): Do a
17074         g_strstrip on the subject so we can stop getting those annoying
17075         leading spaces
17076
17077 2000-08-07  Dan Winship  <danw@helixcode.com>
17078
17079         * camel-folder.c (camel_folder_free_deep): Fix this to not require
17080         NULL-termination of the array.
17081
17082 2000-08-04  Jeffrey Stedfast  <fejj@helixcode.com>
17083
17084         * providers/imap/camel-imap-store.c (imap_connect): If we fail to
17085         get a dir_sep, then supply the default of "/".
17086         (get_folder): Undo changes by Peter
17087
17088 2000-08-04  Peter Williams  <peterw@helixcode.com>
17089
17090         * providers/imap/camel-imap-store.c (get_folder): Prevent a coredump
17091         when get_folder()ing from a store with dir_sep = NULL.
17092
17093 2000-08-04  Peter Williams  <peterw@helixcode.com>
17094
17095         * camel-store.h: Include camel-object.h. Ettore said this wasn't
17096         compiling.
17097
17098 2000-08-04  Not Zed  <NotZed@HelixCode.com>
17099
17100         * camel-url.c (camel_url_set_protocol): 
17101         (camel_url_set_host): 
17102         (camel_url_set_path): 
17103         (camel_url_set_port): Url editing functions.
17104
17105 2000-08-04  Dan Winship  <danw@helixcode.com>
17106
17107         * providers/pop3/camel-pop3-folder.c (pop3_set_message_flags): 
17108         (pop3_sync): Indexes into the flags array are message_number minus
17109         1, not just message_number.
17110
17111         * providers/pop3/camel-pop3-store.c: add a debugging macro for
17112         doing protocol tracing.
17113
17114 2000-08-03  Jeffrey Stedfast  <fejj@helixcode.com>
17115
17116         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Only
17117         call imap_get_summary_internal if the folder can hold messages
17118
17119         * providers/nntp/camel-nntp-provider.c (camel_provider_module_init): 
17120         Initialize the service_cache for the news/nntp providers
17121
17122 2000-08-03  Peter Williams  <peterw@helixcode.com>
17123
17124         * providers/nntp/Makefile.am (INCLUDES): Add -I$(top_srcdir) to
17125         pull in libibex/ibex.h
17126
17127 2000-08-02  Not Zed  <NotZed@HelixCode.com>
17128
17129         * providers/mh/camel-mh-summary.c (camel_mh_summary_sync): Expunge
17130         from the end, so the index isn't messed up when you remove a
17131         message.
17132
17133         * providers/mh/camel-mh-folder.c (mh_append_message): Fix a bug
17134         where it would never open an output file/uid.
17135
17136         * providers/mbox/camel-mbox-store.c (rename_folder):
17137         Implementation for mbox as well.
17138
17139         * camel-store.c (camel_store_rename_folder): New method to rename folders.
17140         (rename_folder): Default implementation.
17141
17142         * providers/mh/camel-mh-store.c (delete_folder): Implement this.
17143         (rename_folder): Implement a rename operation.
17144
17145 2000-08-02  Dan Winship  <danw@helixcode.com>
17146
17147         * providers/MH: Kill this. It doesn't have any code to do anything
17148         the new mh provider doesn't do better.
17149
17150         * providers/Makefile.am: Remove reference to MH subdir, and
17151         promote nntp to fully-supported status, since it does compile and
17152         all.
17153
17154         * camel-mime-message.c (camel_mime_message_set_subject): Trim
17155         trailing space from the subject. I've now seen replies from two
17156         different people that tricked the threading code by (a) not having
17157         References/In-Reply-To, and (b) adding an extra space to the end
17158         of the subject line so the subject-based threading fails too. Who
17159         writes these broken mailers anyway?
17160
17161 2000-08-01  Jeffrey Stedfast  <fejj@helixcode.com>
17162
17163         * providers/smtp/camel-smtp-transport.c (smtp_helo): When forced
17164         to use the IP, place it in square brackets.
17165
17166         * providers/imap/camel-imap-utils.c (imap_translate_sexp): New and
17167         improved sexp parser. An honest try at using e-sexp is wrapped in
17168         a #ifdef at the bottom of the file but is currently not used
17169
17170         * providers/imap/camel-imap-folder.c (imap_search_by_expression):
17171         We want to do a UID SEARCH so we get UIDs back instead of sequence
17172         numbers
17173
17174 2000-08-01  Not Zed  <NotZed@HelixCode.com>
17175
17176         * providers/mh: New mh provider implementation.
17177
17178         * providers/Makefile.am (SUBDIRS): Added mh provider.
17179
17180 2000-07-31  Jeffrey Stedfast  <fejj@helixcode.com>
17181
17182         * providers/imap/camel-imap-folder.c (imap_get_message_info_internal): 
17183         Some IMAP servers don't wrap the UID in ()'s so don't depend on that
17184         (imap_get_summary_internal): Same
17185
17186         * providers/imap/camel-imap-utils.c (free_sexp_node): Oops, forgot to
17187         free node->function - not good.
17188
17189 2000-07-31  Peter Williams  <peterw@helixcode.com>
17190
17191         * providers/vee/camel-vee-folder.c (vee_search_by_expression): Add
17192         a NULL to the matches pointer array so that g_strfreev knows where
17193         the end is.
17194
17195 2000-07-31  Jeffrey Stedfast  <fejj@helixcode.com>
17196
17197         * providers/imap/camel-imap-utils.c (imap_translate_sexp): New
17198         convenience function to translate a Camel sexp into the equivalent
17199         IMAP sexp.
17200
17201         * providers/imap/camel-imap-store.c: More places now use
17202         imap_next_word
17203
17204         * providers/imap/camel-imap-folder.c (imap_search_by_expression):
17205         Implemented initial version (this may or may not work quite right)
17206
17207 2000-07-28  Jeffrey Stedfast  <fejj@helixcode.com>
17208
17209         * providers/imap/camel-imap-folder.c (imap_expunge): Make sure
17210         the third word/token (whatever) is "EXPUNGE" and not something
17211         else like "EXISTS" or "RECENT". When removing the message from
17212         the summary also make sure to free that data to avoid leakage.
17213         Also make sure to subtract 1 from the 'id' since IMAP starts
17214         at 1 and our summary starts at 0 :-)
17215
17216 2000-07-28  Jeffrey Stedfast  <fejj@helixcode.com>
17217         
17218         * providers/imap/camel-imap-store.c (camel_imap_status): Cleaned
17219         up a bit, now uses imap_next_word()
17220         (camel_imap_command_extended): Now uses imap_next_word(). When
17221         checking for RECENT, allow the first digit of the recent-count
17222         be between 0 and 9 inclusive instead of exclusive.
17223
17224         * providers/imap/camel-imap-folder.c (imap_expunge): Optimized.
17225         No longer will it need to reload the summary as it now instead
17226         removes the appropriate message summaries from the cache.
17227         (camel_imap_folder_changed): If recent == 0 then return. If 
17228         recent < 0 then just emit the folder_changed signal, don't reload
17229         summaries.
17230
17231 2000-07-28  Jeffrey Stedfast  <fejj@helixcode.com>
17232
17233         * providers/imap/camel-imap-folder.c
17234         (imap_get_message_count_internal): Get message count when STATUS
17235         is not available.
17236         (imap_init): folder->has_search_capability is required for IMAP so
17237         should always be set to TRUE (is currently being set to FALSE as
17238         I've not yet implemented SEARCH support).
17239         (camel_imap_folder_changed): Seem to have fixed my optimization
17240         hack
17241
17242 2000-07-28  Jon K Hellan  <hellan@acm.org>
17243
17244         * providers/imap/camel-imap-store.h (CamelImapServerLevel): New
17245         enum.
17246         (CamelImapStore): Added server_level and has_status_capability
17247         members.
17248
17249         * providers/imap/camel-imap-store.c (imap_connect): Detect
17250         IMAP4REV1, IMAP4 and STATUS in capability response.
17251
17252         * providers/imap/camel-imap-folder.c
17253         (imap_get_message_count_internal): Use STATUS only if server
17254         supports it. TODO: Get message count when STATUS not supported.
17255         (imap_get_message, imap_get_summary_internal,
17256         imap_get_message_info_internal): Handle IMAP4 as well.
17257         (imap_protocol_get_summary_specifier): New function: Make a data
17258         item specifier for the header lines we need, appropriate to the
17259         server level.
17260
17261 2000-07-27  Peter Williams <peterw@helixcode.com>
17262
17263         * camel-mime-utils.c (header_decode_lwsp): More
17264         checks for end of string.
17265
17266         * providers/imap/camel-imap-store.c:
17267         (imap_command_extended): Free the elements of our
17268         array (huge mem leak)
17269
17270         * providers/imap/camel-imap-folder.c:
17271         (summary_get_internal): Same as above.
17272
17273 2000-07-27  Jeffrey Stedfast  <fejj@helixcode.com>
17274
17275         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
17276         Fixed my routine to only fetch new headers, my IDs were off by 1
17277         on the high end, so when it would fetch the last newly arrived
17278         message it would fail and end up fetching all of the summaries
17279         because of the corruption.
17280
17281 2000-07-27  Jeffrey Stedfast  <fejj@helixcode.com>
17282
17283         * camel-url.c (camel_url_to_string): If the path doesn't begin
17284         with a / and there is a host, prepend a / to the path.
17285
17286 2000-07-27  Jeffrey Stedfast  <fejj@helixcode.com>
17287         
17288         * providers/imap/Makefile.am: Added camel-imap-utils.[c,h]
17289         
17290         * providers/imap/camel-imap-utils.[c,h]: Utilities for parsing
17291         server responses for use in both camel-imap-store.c and
17292         camel-imap-folder.c
17293         
17294         * providers/imap/camel-imap-folder.c (imap_get_summary_internal):
17295         Free all the pointers in the headers array.
17296         (imap_get_subfolder_names_internal): Updated to use
17297         imap_parse_list_response
17298         (imap_parse_subfolder_list): Removed in favor of
17299         imap_parse_list_response
17300
17301         * providers/imap/camel-imap-store.c (camel_imap_command_extended):
17302         Free all the pointers in the data array.
17303         (imap_connect): Updated to use imap_parse_list_response and fixed
17304         a leak
17305         (folder_is_selectable): Updated.
17306
17307 2000-07-27  Jeffrey Stedfast  <fejj@helixcode.com>
17308         
17309         * providers/imap/camel-imap-folder.c (imap_get_message_info): Now
17310         uses a hash table for looking up message info rather than a linear
17311         search :)
17312
17313 2000-07-27  Peter Williams  <peterw@helixcode.com>
17314
17315         * providers/*/Makefile.am: Don't specify SUBDIRS =
17316         [nothing]. Messes up distcheck.
17317         
17318 2000-07-26  Peter Williams  <peterw@helixcode.com>
17319         
17320         * camel-mime-parser.c (folder_scan_init): Initialize
17321         outbuf to be "" -- it's not guaranteed to be zeroed.
17322         
17323         * camel-mime-utils.c (header_references_decode): Return
17324         if the header is NULL -> or "" <-. Don't do our stupid
17325         mailer trick if we point to \0.
17326         (header_decode_quoted_string): Don't rip past end of 
17327         string!
17328         
17329 2000-07-26  Dan Winship  <danw@helixcode.com>
17330
17331         * camel-movemail.c (movemail_external): routine to call an
17332         external movemail program.
17333         (camel_movemail): Nuke return value, use movemail_external when
17334         available and useful, and don't delete "dest" on errors, since
17335         it might have started non-empty.
17336
17337 2000-07-26  Jeffrey Stedfast  <fejj@helixcode.com>
17338
17339         * camel-url.c (camel_url_to_string): Should now always prepend a '/'
17340         before the path if it doesn't already exist.
17341
17342         * providers/imap/camel-imap-folder.c: Fixed a few compiler warnings
17343
17344 2000-07-25  Jeffrey Stedfast  <fejj@helixcode.com>
17345
17346         * providers/imap/camel-imap-folder.c (imap_summary_free): Fixed the
17347         real problem that Peter was running into.
17348
17349 2000-07-25  Dan Winship  <danw@helixcode.com>
17350
17351         * camel-mime-message.c (write_to_stream): Don't add a Mime-Version
17352         header to a message that already has one.
17353
17354         * camel-internet-address.c (internet_encode): Don't put <>s around
17355         addresses with no name part.
17356
17357 2000-07-25  Peter Williams  <peterw@helixcode.com>
17358
17359         * providers/imap/camel-imap-folder.c (imap_expunge): Set 
17360         imap_folder->summary to NULL after calling imap_summary_free,
17361         so we don't get stuck with a junk summary pointer. Should
17362         we free it at all?
17363
17364 2000-07-25  Jeffrey Stedfast  <fejj@helixcode.com>
17365
17366         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
17367         Optimized to try and get the new message headers without reloading
17368         the entire summary from scratch.
17369         (imap_get_summary_internal): Will now sync() before attempting to
17370         reload the summary so that flags are set in the reloaded summary
17371         as well.
17372
17373 2000-07-24  Jeffrey Stedfast  <fejj@helixcode.com>
17374
17375         * providers/imap/camel-imap-store.c (get_folder): Updated to give
17376         special attention to the root folder.
17377
17378         * providers/imap/camel-imap-folder.c
17379         (imap_get_subfolder_names_internal): Updated to handle the root
17380         folder
17381         (imap_get_message_count_internal): return 0 if folder can't hold
17382         messages
17383         (camel_imap_folder_new): Change so that root folder gets special
17384         attention and always gets can_hold_messages set to FALSE
17385
17386 2000-07-24  Dan Winship  <danw@helixcode.com>
17387
17388         * camel-folder.c: Remove exceptions from a number of methods that
17389         work on what ought to be static data: get_parent_folder,
17390         get_parent_store, get_message_count, get_unread_message_count,
17391         get_permanent_flags, get_message_flags, set_message_flags,
17392         get_message_user_flag, set_message_user_flag, get_uids,
17393         get_summary, get_subfolder_names. Turn camel_folder_delete_message
17394         into a macro. (Mostly a pull-up from the camel-async branch.)
17395
17396         * providers/{imap,mbox,nntp,pop3,vee}: Update for CamelFolder
17397         changes
17398
17399 2000-07-24  Jeffrey Stedfast  <fejj@helixcode.com>
17400
17401         * providers/imap/camel-imap-folder.c (imap_get_message_info): Updated
17402         to port easily to the new Camel API
17403         (imap_init): Don't SELECT INBOX, we don't need to do that
17404
17405 2000-07-24  Jeffrey Stedfast  <fejj@helixcode.com>
17406
17407         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): 
17408         Initialize the summary and subfolder listing.
17409         (imap_summary_free): Now takes a GPtrArray arg rather than a 
17410         CamelImapFolder as it increases it's usefullness for free()'ing
17411         temporary summaries.
17412         (imap_get_message_count_internal): A new convenience function for
17413         getting the actual message count on a server to be used by 
17414         imap_get_summary_internal)
17415         (imap_get_message_count): Since the Camel API is on the move again, 
17416         the future version of this function will not be able to make a
17417         call to the store, it must only access previously fetched data (thus 
17418         the creation of the _internal function)
17419         (imap_get_subfolder_names_internal): Again, because the future version
17420         of imap_get_subfolder_names will not take an exception, we must rename
17421         this function which will be called by camel_imap_folder_new()
17422         (imap_get_subfolder_names): We now return the previously collected
17423         subfolder listing that the _internal function fetched previously
17424         (imap_get_summary_internal): Again, same idea as the previous _internal
17425         functions...
17426         (imap_get_summary): Again... now returns a previously aquired summary
17427
17428         * providers/imap/camel-imap-store.c (imap_noop): This will hopefully
17429         prevent the imap store from disconnecting.
17430         (imap_connect): Modified to add a gtk timeout event that will call
17431         imap_noop() every 10 minutes (we may want to change this time value)
17432         (imap_disconnect): Modified to remove the NOOP timeout event from the
17433         store.
17434         (camel_imap_command_extended): Commented out the code that would try
17435         and detect if the store was disconnected and then reconnect if it was
17436         needed.
17437
17438 2000-07-24  Dan Winship  <danw@helixcode.com>
17439
17440         * camel-folder.[ch]: Remove camel_folder_get_message_uid, which
17441         was not used, and not implemented by any provider.
17442
17443         * providers/nntp/camel-nntp-folder.c: Remove get_message_uid
17444         non-implementation.
17445
17446         * camel-folder-pt-proxy.[ch], camel-arg-collector.c,
17447         camel-marshal-utils.[ch]: Bye bye bye.
17448
17449         * Makefile.am: remove reference to camel-arg-collector.c
17450
17451 2000-07-23  Jeffrey Stedfast  <fejj@helixcode.com>
17452
17453         * providers/imap/camel-imap-store.c (imap_disconnect): Made it a
17454         little more forgiving. Also set current_folder to NULL as there is
17455         no selected folder after a disconnect.
17456         (stream_is_alive): Detects whether or not a socket is "alive"
17457         (camel_imap_command_extended): Use stream_is_alive() to aid in the
17458         detection of a disconnected state.
17459
17460 2000-07-22  Jeffrey Stedfast  <fejj@helixcode.com>
17461
17462         * providers/imap/camel-imap-store.c (get_folder): Clear
17463         CamelExceptions when appropriate (eg when folder is marked as
17464         \NoSelect). Still needs some cleanup and perhaps Dan will have a
17465         better way of doing this as this seems like a messy way of
17466         handling this.
17467
17468         * providers/imap/camel-imap-folder.c (imap_get_uids): Took out
17469         some debug statements as they are no longer needed.
17470
17471 2000-07-21  Jeffrey Stedfast  <fejj@helixcode.com>
17472
17473         * providers/imap/camel-imap-folder.c (imap_get_subfolder_names):
17474         Updated to not strip out subfolders that are marked as \NoSelect
17475         because this will be correctly handled in store->get_folder from
17476         now on.
17477
17478         * providers/imap/camel-imap-store.c (folder_is_selectable): New
17479         convenience function for use in get_folder().
17480         (parse_list_response): Now takes a char **flags argument which is
17481         needed by folder_is_selectable().
17482         (imap_connect): Updated to reflect changes to
17483         parse_list_response().
17484
17485 2000-07-21  Jeffrey Stedfast  <fejj@helixcode.com>
17486         
17487         * providers/imap/camel-imap-stream.c (stream_read): Updated with
17488         some of the same fixes I've made to camel-imap-folder.c like
17489         recalculating message part lengths.
17490
17491         * providers/imap/camel-imap-store.c (camel_imap_command_extended):
17492         Rewrote the code to check for "* %d RECENT". Still needs to be
17493         modified, but should no longer cause an infinite loop by detecting
17494         mis-detecting RECENT messages.
17495
17496 2000-07-20  Jeffrey Stedfast  <fejj@helixcode.com>
17497
17498         * providers/imap/camel-imap-folder.c (imap_get_summary):
17499         (imap_get_message_info): Oops. Fix UID parser to allow 0 and 9 to
17500         be in the range of valid UID chars.
17501
17502 2000-07-20  Peter Williams  <peterw@helixcode.com>
17503
17504         * camel-object.c (camel_object_unref): Add a new global mutex
17505         'refcount' held when refcounting operations occur.
17506
17507 2000-07-19  Peter Williams  <peterw@helixcode.com>
17508
17509         * camel-object.c (camel_type_lock_up): Correct the recursiveness;
17510         the locklevel is stored as a private, so each thread has its own
17511         idea of the locklevel. Thus one thread can relock, but a different
17512         one will think that it's a level 0 and try to lock the type_system
17513         mutex.
17514
17515 2000-07-19  Jeffrey Stedfast  <fejj@helixcode.com>
17516
17517         * providers/imap/camel-imap-folder.c: General cleanup working
17518         towards getting Actions->Expunge working correctly.
17519
17520         * providers/imap/camel-imap-store.c
17521         (cammel_imap_command_extended): Added code to look for "* %d
17522         RECENT" and to emit the folder_changed signal if there are any
17523         recent messages. Note: this is a hack and needs to be rewritten
17524         badly.
17525
17526 2000-07-19  Jeffrey Stedfast  <fejj@helixcode.com>
17527
17528         * providers/imap/camel-imap-folder.c (imap_get_summary): If the
17529         folder's message count is not the same as the number of summaries,
17530         free the old summary and create a new summary.
17531
17532 2000-07-18  Jeffrey Stedfast  <fejj@helixcode.com>
17533
17534         * providers/imap/camel-imap-folder.c
17535         (camel_imap_folder_class_init): Added in
17536         imap_[g,s]et_message_user_flag() methods
17537         (imap_get_message_info): Rewrote to use the more efficient way of
17538         downloading summary information and also added a UID comparison so
17539         that if the UID requested doesn't match the UID received, it
17540         returns NULL.  FIXME: When the mailer gets NULL when it requested
17541         message info, it seems that it displays a row for that message and
17542         when you try and select the blank row, it segfaults.
17543
17544         * providers/imap/camel-imap-store.c (get_folder): Oops, this
17545         should not be checking against "/", it should be checking against
17546         dir_sep.
17547
17548         * providers/imap/camel-imap-folder.c (imap_parse_subfolder_line):
17549         Updated to trim out the leading namespace.
17550         (imap_get_subfolder_names): Let the subfolder parser trim the
17551         namespace off the folder name.
17552
17553 2000-07-17  Peter Williams  <peterw@helixcode.com>
17554
17555         * camel-object.c (camel_type_lock_up): New function; the
17556         Camel type_system lock is now fakey-recursive, being controlled
17557         by a semaphore that goes up and down and is protected by another
17558         lock. Theoretically all we need is the lock on the semaphore,
17559         but this we catch exceptions "better" (by deadlocking).
17560         (camel_type_lock_down): Corresponding to above.
17561         (all functions): s,G_LOCK,camel_type_lock_up, etc.
17562
17563 2000-07-17  Jeffrey Stedfast  <fejj@helixcode.com>
17564
17565         * providers/imap/camel-imap-store.c (imap_disconnect): Send a
17566         "LOGOUT" command.
17567
17568         * providers/imap/camel-imap-folder.c (imap_get_message): Hacks to
17569         get IMAP code to work with CommunigatePro and MS Exchange (and any
17570         other servers that send back a UID at the end of each FETCH inside
17571         of the main body of the message part).
17572         (imap_sync): Un-#if 0 the code that sets the flags on the IMAP
17573         server for messages that have changed. Oops, don't mask with
17574         DELETED to find out if the message has been answered ;-)
17575         (imap_expunge): sync before expunging.
17576
17577 2000-07-16  Jeffrey Stedfast  <fejj@helixcode.com>
17578
17579         * providers/imap/camel-imap-store.c: All SELECT calls now pass
17580         a NULL folder argument to camel_imap_command_extended() since it's
17581         not needed.
17582         (imap_connect): Moved service_class->connect() to the point right
17583         after a connection is established with the server rather than
17584         waiting until the end of the function.
17585         (camel_imap_command): Updated the documentation comment
17586         (camel_imap_command_extended): Before sending a command, first
17587         check to make sure we are connected; if we aren't, then reconnect.
17588         Don't strncmp() command with "SELECT" as it's redundant.
17589
17590         * providers/imap/camel-imap-folder.c: All SELECT calls now pass
17591         a NULL folder argument to camel_imap_command_extended() since it's
17592         not needed. Also s/camel_imap_command/camel_imap_command_extended as
17593         I will probably be doing away with camel_imap_command() or at least
17594         only using it for LOGIN and similar commands where the server won't
17595         notify us of any recent messages.
17596
17597 2000-07-15  Jeffrey Stedfast  <fejj@helixcode.com>
17598
17599         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): 
17600         One last fix to get rid of hard-coded "/" directory separators
17601
17602 2000-07-14  Peter Williams  <peterw@helixcode.com>
17603
17604         * camel-object.c : Implement 'events', which are suspiciously
17605         like signals except without all the marshalling baggage, and
17606         with quasi-thread-safety.
17607         (camel_object_class_declare_event): New func.
17608         (camel_object_hook_event): Ditto.
17609         (camel_object_trigger_event): Ditto.
17610         (obj_class_init): Declare the "finalize" event.
17611         (obj_class_finalize): Free the hashtable of events->preps
17612         (obj_finalize): Free the hashtable of events->hooklists
17613         (camel_object_unref): Trigger the finalize event (ourselves,
17614         to prevent massively unpleasant looping things.)
17615         
17616 2000-07-14  Peter Williams  <peterw@helixcode.com>
17617         
17618         * camel-object.c (make_global_classfuncs): Change to return
17619         a CamelObjectClass. Change parents to a GSList and free it
17620         when done.
17621         (camel_object_new): Don't allocate a classfuncs for every object;
17622         merely give it a reference to the global_classfuncs. Convert
17623         parents to a GSList and free it when done.
17624         (camel_object_unref): Don't free the classfuncs. Free the parents
17625         list, which is changed to a GSList.
17626
17627 2000-07-14  Jeffrey Stedfast  <fejj@helixcode.com>
17628
17629         * string-utils.c (string_unquote): New convenience function
17630         to unquote a string if it's encapsulated by "'s
17631         
17632         * providers/imap/camel-imap-folder.c:
17633         * providers/imap/camel-imap-store.c: Made the necessary changes
17634         to stop using hard coded directory separators.
17635
17636 2000-07-13  Dan Winship  <danw@helixcode.com>
17637
17638         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_load):
17639         If the summary is for a smaller mbox, and rebuilding from the
17640         last-known end position fails, try rebuilding from the beginning.
17641         Deals with the case where the user edits the mbox and makes it
17642         bigger, without adding new messages.
17643
17644 2000-07-13  Peter Williams  <peterw@helixcode.com>
17645
17646         * camel-object.c: Rewritten to not be based on GtkObject,
17647         but a tiny threadsafe ripoff thereof. Objects still cannot
17648         be shared across threads, but ref/unref/destroy/new/etc
17649         will work. Signals are not implemented because doing it
17650         robustly would be a major pain in the butt, but class
17651         functions are. There's a small demonstration that it doesn't
17652         crash in ./temp-test.c: build it with ./make-test.sh.
17653         * camel-stream.c, camel-seekable-stream.c, camel-stream-mem.c:
17654         moved over to CamelObject. Proof of concept: two levels of
17655         subclass and class functions, all working without coredumps.
17656         To port to CamelObject:
17657         - s,GTK_,CAMEL_,g in the cast checks
17658         - s,gtk_type_new,camel_object_new,g
17659         - s,GtkType,CamelType,g
17660         - Change get_type function over to camel_type_declare
17661         - instead of hooking to finalize function, it goes into the
17662           type declaration.
17663         - remove signals.
17664         - instead of GTK_OBJECT(so)->klass, CAMEL_OBJECT_GET_CLASS(so)
17665         - s,gtk_type_class,camel_type_get_global_classfuncs,g
17666         - don't chain finalize handlers; it will be done for you
17667         
17668 2000-07-13  Jeffrey Stedfast  <fejj@helixcode.com>
17669
17670         * providers/imap/camel-imap-folder.c: 
17671         * providers/imap/camel-imap-store.c: If a SELECT fails, set
17672         imap_store->current_folder to NULL so a SELECT is forced before
17673         any message/folder operations are requested. Also, because some
17674         users don't use a namespace, make sure that if the url->path is 
17675         "/" we don't use it when creating the folder_path.
17676         (camel_imap_command[_extended]): Since we allow the passing of
17677         a NULL folder which we can use to bypass a forced SELECT, no need
17678         to check for the individual commands that don't require a folder
17679         to be selected.
17680
17681 2000-07-13  Jeffrey Stedfast  <fejj@helixcode.com>
17682
17683         * providers/imap/camel-imap-folder.c: 
17684         * providers/imap/camel-imap-store.c: Updated to use CAMEL_IMAP_OK, 
17685         CAMEL_IMAP_NO, CAMEL_IMAP_BAD, and CAMEL_IMAP_FAIL rather than the 
17686         ones copied from the POP3 provider. 
17687
17688 2000-07-13  Jeffrey Stedfast  <fejj@helixcode.com>
17689
17690         * providers/imap/camel-imap-folder.c (imap_get_summary): Oops.
17691         If the number of messages in the folder is 0, don't fetch
17692         summaries 1 thru 0, just return an empty summary.
17693         (imap_copy_message_to): Fixed to use message UID and also send
17694         the source folder as an arg to camel_imap_command rather than NULL.
17695         (imap_move_message_to): Same.
17696         (imap_init): If SELECT is successful, we need to set the current
17697         folder to the one selected, this was causing problems with move/copy
17698
17699 2000-07-13  Dan Winship  <danw@helixcode.com>
17700
17701         * camel-service.h: define a set of CAMEL_SERVICE_URL_ALLOW_* flags
17702         parallel to the _NEED_* flags, and make the _NEED_* flags imply
17703         the _ALLOW_* ones.
17704
17705         * providers/imap/camel-imap-store.c (camel_imap_store_init): imap
17706         urls ALLOW_PATH
17707
17708 2000-07-13  Jeffrey Stedfast  <fejj@helixcode.com>
17709
17710         * providers/imap/camel-imap-folder.c (imap_get_summary): New
17711         and improved approach to fetching an entire folder summary
17712         that should be much much faster than the old way as it gets
17713         the entire folder summary in 1 shot rather than requesting
17714         message by message. As with the last update, this version
17715         also only fetches the minimum number of header fields.
17716         (imap_get_summary): Oops, forgot to free the temp 
17717         GPtrArray *headers
17718
17719 2000-07-13  Jeffrey Stedfast  <fejj@helixcode.com>
17720
17721         * providers/imap/camel-imap-folder.c (imap_get_summary): Don't
17722         fetch the entire RFC822 header, just fetch the fields we want.
17723         (imap_get_message_info): Same.
17724
17725 2000-07-13  Not Zed  <NotZed@HelixCode.com>
17726
17727         * camel-mime-filter-basic.c (camel_mime_filter_basic_new_type):
17728         Reset filter on setup.
17729         (reset): When resetting qp encoding, set the state to -1, instead
17730         of 0.
17731
17732         * camel-mime-utils.c (quoted_encode_step): Actually count the
17733         characters output sofar (it never counted any).  Bunch of other
17734         fixes.
17735         (quoted_encode_close): Also flush out final character, if there's
17736         one.
17737
17738 2000-07-12  Jeffrey Stedfast  <fejj@helixcode.com>
17739
17740         Chris forgot to add #include <e-util/e-util.h> to the source files
17741         
17742         * providers/imap/camel-imap-store.c (imap_connect): Fixed Peter's 
17743         fix, we don't want to send a string to a %d.
17744
17745 2000-07-12  Christopher James Lahey  <clahey@helixcode.com>
17746
17747         * camel-folder-search.c, providers/imap/camel-imap-store.c:
17748         Changed from strstrcase to e_strstrcase.
17749
17750         * string-utils.c, string-utils.h: Removed strstrcase (in favor of
17751         e_strstrcase in e-util/e-util.c.)
17752
17753 2000-07-12  Chris Toshok  <toshok@helixcode.com>
17754
17755         * providers/nntp/camel-nntp-folder.c
17756         (nntp_folder_set_message_flags): get the article num out of our
17757         uid and mark it read in the newsrc.
17758         (nntp_folder_get_message): get the message id out of the uid to
17759         fetch the article.
17760
17761         * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): the uid
17762         is now <article-num>,<messageid>
17763         (get_HEAD_headers): same.
17764
17765         * camel-mime-parser.c (folder_scan_step): go to HSCAN_MESSAGE
17766         state when ct->subtype is "news" as well as "rfc822".  this makes
17767         attachments of type "message/news" display properly.
17768
17769 2000-07-12  Dan Winship  <danw@helixcode.com>
17770
17771         * camel-folder.c (camel_folder_free_deep,
17772         camel_folder_free_shallow, camel_folder_free_nop): Useful default
17773         implementations for free_{uids,subfolder_names,summary}.
17774         (free_subfolder_names, free_uids): Make these g_warning-ing
17775         default implementations.
17776
17777         * providers/*/camel-*-folder.c: Use the new functions where
17778         appropriate, remove duplicated code.
17779
17780 2000-07-12  Peter Williams  <peterw@helixcode.com>
17781
17782         * providers/imap/camel-imap-store.c (query_auth_types): Check for
17783         NULL parameters when setting the exception so as to not crash on
17784         Solaris (can't handle a %s passed NULL).
17785         (imap_connect): Same.
17786         
17787 2000-07-12  Jeffrey Stedfast  <fejj@helixcode.com>
17788
17789         * providers/mbox/camel-mbox-folder.c (mbox_delete_message): Use
17790         mbox_set_message_flags () instead of setting the flags by hand. This
17791         fixes the problem of the "message_changed" signal not being emitted
17792         at the correct time.
17793
17794         * providers/imap/camel-imap-folder.c: "folder_changed" signals should
17795         pass a third argument (which is ignored).
17796
17797         * camel-folder.c: Undo gtk signal emits done in set_flags and 
17798         expunge.
17799         (move_message_to): 
17800         (copy_message_to): Create info as a const CamelMessageInfo
17801
17802 2000-07-12  Chris Toshok  <toshok@helixcode.com>
17803
17804         * providers/nntp/Makefile.am: don't add test-newsrc to the build
17805         since it needs libcamel (which isn't built at the time test-newsrc
17806         needs linking.)
17807
17808         * providers/nntp/camel-nntp-utils.c (get_HEAD_headers): fill in
17809         MessageInfo->message_id.
17810         (get_XOVER_headers): same.
17811
17812         * providers/nntp/camel-nntp-folder.c (nntp_folder_init): move
17813         summary loading here.
17814         (nntp_folder_sync): summary/newsrc changes should be stored here.
17815         put a comment to that effect.
17816         (nntp_folder_set_message_flags): don't save the newsrc here.
17817         (nntp_folder_get_uids): use g_ptr_array_index instead of the
17818         cast/addition.
17819         (nntp_folder_get_summary): no need to check if we should generate
17820         the summary here.  already done.
17821         (nntp_folder_get_message_info): implement.
17822
17823         * providers/nntp/camel-nntp-store.c
17824         (camel_nntp_store_get_toplevel_dir): use evolution_dir instead of
17825         computing it ourselves.
17826         (nntp_store_disconnect): call camel_nntp_newsrc_write.
17827         (ensure_news_dir_exists): new function to create the news/<news
17828         server> subdir.
17829         (camel_nntp_store_class_init): hook up connect/disconnect and
17830         finalize.
17831         (nntp_store_connect): if ensure_news_dir_exists fails throw an
17832         exception.
17833
17834 2000-07-12  Peter Williams  <peterw@helixcode.com>
17835
17836         * camel-folder.c (camel_folder_set_message_flags): Emit a message_changed
17837         signal once the flags are set on the message.
17838         (camel_folder_set_user_flag): Ditto.
17839         (camel_folder_expunge): Emit a folder_changed if no exception.
17840
17841 2000-07-12  Jeffrey Stedfast  <fejj@helixcode.com>
17842
17843         * camel-stream.c: Use size_t and ssize_t for read/write methods
17844         
17845         * providers/imap/camel-imap-folder.c (imap_set_message_flags): 
17846         Updated to emit the message_changed signal.
17847         (imap_delete_message): Updated to use imap_set_message_flags ().
17848         (imap_move_message_to): Updated to use imap_set_message_flags ()
17849         and to emit the folder_changed signal on the destination folder.
17850         (imap_copy_message_to): Updated to emit the folder_changed signal 
17851         on the destination folder.
17852         (imap_append_message): Updated to emit the folder_changed signal 
17853         on the destination folder.
17854
17855 2000-07-11  Jeffrey Stedfast  <fejj@helixcode.com>
17856
17857         * camel-folder.c (camel_folder_append_message): Now takes a
17858         flags argument to specify the flags to be set on the message
17859         since we might not necessarily want the flags to be wiped clean.
17860         (move_message_to):
17861         (copy_message_to): Updated to send a flags argument to 
17862         append_message (); currently sends the original message's flags.
17863
17864         * providers/mbox/camel-mbox-folder.c (mbox_append_message): 
17865         * providers/imap/camel-imap-folder.c (imap_append_message): 
17866         Updated.
17867
17868 2000-07-11  Dan Winship  <danw@helixcode.com>
17869
17870         * camel-folder.c: Remove exceptions from a number of methods
17871         that work on what ought to be static data: get_parent_folder,
17872         get_parent_store, get_message_count, get_unread_message_count,
17873         get_permanent_flags, get_message_flags, set_message_flags,
17874         get_message_user_flag, set_message_user_flag, get_message_uid,
17875         get_uids, get_summary, get_subfolder_names. Turn
17876         camel_folder_delete_message into a macro.
17877
17878         * providers/{mbox,pop3,vee}: Update for CamelFolder changes
17879
17880         * providers/Makefile.am: Disable imap and nntp for now
17881
17882 2000-07-11  Jeffrey Stedfast  <fejj@helixcode.com>
17883
17884         * providers/imap/camel-imap-folder.c (imap_search_by_expression): 
17885         This shouldn't return NULL, it should return g_ptr_array_new ()
17886         so the mailer gets what it expects.
17887
17888 2000-07-10  Jeffrey Stedfast  <fejj@helixcode.com>
17889
17890         * camel-folder-summary.c (camel_folder_summary_decode_string): 
17891         Oops, an unsigned integer can never be < 0
17892
17893 2000-07-10  Dan Winship  <danw@helixcode.com>
17894
17895         * providers/vee/camel-vee-folder.c (vee_search_by_expression):
17896         Initialize a variable to make this not crash again. And fix a bug
17897         so it actually does something.
17898
17899 2000-07-10  Jeffrey Stedfast  <fejj@helixcode.com>
17900
17901         * camel-folder-summary.c: Cleaned up a bunch of compile warnings
17902
17903 2000-07-10  Dan Winship  <danw@helixcode.com>
17904
17905         * providers/vee: kill more debugging messages
17906
17907 2000-07-10  Jeffrey Stedfast  <fejj@helixcode.com>
17908
17909         * providers/mbox/camel-mbox-folder.c (mbox_get_unread_message_count): 
17910         * providers/vee/camel-vee-folder.c (vee_get_unread_message_count): 
17911         * providers/imap/camel-imap-folder.c (imap_get_unread_message_count):
17912         Implemented.
17913
17914         * camel-folder.c (camel_folder_get_unread_message_count): New
17915         convenience function to allow the mailer to query the number
17916         of unread messages in a folder (for displaying message stats
17917         in a folder tree?).
17918
17919 2000-07-09  Dan Winship  <danw@helixcode.com>
17920
17921         * camel-mime-utils.c (header_references_dup): New function to copy
17922         a header_references structure.
17923
17924         * camel-folder-summary.c (camel_message_info_dup_to): New function
17925         to (deep) copy the data from one CamelMessageInfo into another.
17926         (camel_message_info_free): And free the data.
17927
17928         * providers/vee/camel-vee-folder.c (vee_sync): Implement. (empty).
17929         (vee_search_by_expression): belatedly update for
17930         camel_folder_search change.
17931         (vee_folder_build): belatedly update for camel_folder_search
17932         change. Use camel_message_info_dup_to and camel_message_info_free
17933         (in particular, so that we get message_id and references info so
17934         vfolders can be threaded).
17935         (vee_folder_build_folder): Ditto.
17936
17937 2000-07-08  Jeffrey Stedfast  <fejj@helixcode.com>
17938
17939         * providers/nntp/camel-nntp-folder.c: 
17940         * providers/nntp/camel-nntp-utils.c: 
17941         * providers/nntp/camel-nntp-store.c: Update to reflect past changes
17942         in the Camel API. Use gtk macro casts wherever possible and use glib's
17943         memory functions instead of standard c's (since they are not 
17944         compatable)
17945
17946         * providers/smtp/camel-smtp-transport.c: 
17947         * providers/imap/camel-imap-store.c: Wrap debug print statements
17948         in a macro
17949
17950         * providers/imap/camel-imap-stream.c (stream_read): Make sure
17951         that we get up to and including the last \n of the mime part.
17952
17953         * providers/imap/camel-imap-folder.c (imap_get_message): Make sure
17954         that we get up to and including the last \n of the mime part.
17955         Wrap debug print statements in a macro.
17956
17957         * providers/imap/camel-imap-stream.c (stream_read): Only cache
17958         the important data (aka the mime part requested and no extra
17959         server response stuff)
17960
17961 2000-07-07  Dan Winship  <danw@helixcode.com>
17962
17963         * camel-mime-utils.c (header_references_decode): Work around
17964         In-Reply-To's with unquoted punctuation. So many broken mailers.
17965
17966         * camel-folder.c (camel_folder_search_by_expression): Make this
17967         return a GPtrArray rather than a GList.
17968
17969         * camel-folder-search.c (camel_folder_search_execute_expression):
17970         * providers/imap/camel-imap-folder.c (imap_search_by_expression):
17971         * providers/mbox/camel-mbox-folder.c (mbox_search_by_expression):
17972         * providers/nntp/camel-nntp-folder.c (nntp_search_by_expression):
17973         Update to return a GPtrArray rather than a GList.
17974
17975 2000-07-07  Jeffrey Stedfast  <fejj@helixcode.com>
17976
17977         * providers/smtp/camel-smtp-transport.c (esmtp_get_authtypes): 
17978         Fixed the parser to actually work
17979
17980 2000-07-06  Dan Winship  <danw@helixcode.com>
17981
17982         * camel-mime-utils.c (header_references_decode): Make this deal
17983         with the full RFC822 References/In-Reply-To format rather than
17984         just the more-nicely-behaved RFC1036 version. (Needed to parse
17985         In-Reply-To headers with extra junk in them.)
17986
17987 2000-07-06  Jeffrey Stedfast  <fejj@helixcode.com>
17988
17989         * providers/imap/camel-imap-folder.c (imap_get_summary): Parse for
17990         more header information to allow message threading in IMAP.
17991         (imap_get_message_info): Same.
17992
17993         * camel-folder-summary.c: Renamed summary_format_* to
17994         camel_summary_format_* and moved them into public scope.
17995
17996         * providers/smtp/camel-smtp-transport.c (smtp_connect): Oops. Don't
17997         pass port # as a string in the error code (if it fails to connect).
17998
17999         * providers/imap/camel-imap-folder.c (imap_append_message): Changed
18000         over to camel_imap_command_extended as that was the source of the
18001         problems - apparently appending replies with more than just 1 line.
18002
18003 2000-07-05  Dan Winship  <danw@helixcode.com>
18004
18005         * camel-folder-search.c (search_header_contains): make header
18006         matching case-insensitive
18007
18008         * camel-folder-summary.c:
18009         * camel-session.c:
18010         * providers/mbox/camel-mbox-folder.c:
18011         * providers/mbox/camel-mbox-summary.c: Remove some non-error case
18012         debugging-type messages.
18013
18014 2000-07-05  Ettore Perazzoli  <ettore@helixcode.com>
18015
18016         * providers/mbox/camel-mbox-summary.c (d): Define to empty so that
18017         we get rid of a ton of debugging messages.
18018
18019 2000-07-05  Jeffrey Stedfast  <fejj@helixcode.com>
18020
18021         * camel-mime-utils.h: Added prototype for uudecode_step
18022
18023         * camel-mime-utils.c (uudecode_step): Cleaned up some junk that
18024         should have been cleaned up when debugging printf's were taken out.
18025
18026 2000-07-05  Ettore Perazzoli  <ettore@helixcode.com>
18027
18028         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
18029         Update the X-Evolution: header even if the in-memory UID and the
18030         saved UID are not the same.  Otherwise mboxes with clashing UIDs
18031         can never be fixed.
18032
18033         * camel-folder-summary.c
18034         (camel_folder_summary_add_from_parser): Add the message to the
18035         summary before doing any ibex stuff.  In fact, this might also
18036         have the side effect of reassigning the UID so it needs to be done
18037         before we start using the UID.
18038
18039         * providers/mbox/camel-mbox-folder.c (mbox_append_message): Add
18040         debugging message to keep track of the UIDs we add.
18041
18042 2000-07-05  Dan Winship  <danw@helixcode.com>
18043
18044         * camel-folder-summary.c: Add "Cc" to summary and bump summary
18045         version number.
18046
18047         * camel-folder-search.c (search_header_contains): make "Cc" a
18048         searchable header.
18049
18050 2000-07-03  Ettore Perazzoli  <ettore@helixcode.com>
18051
18052         * camel-folder-summary.c (camel_folder_summary_next_uid_string):
18053         New.
18054         (camel_folder_summary_add): Use
18055         `camel_folder_summary_next_uid_string()' instead of recomputing
18056         the UID manually here.
18057         (camel_folder_summary_add_from_parser): Likewise.
18058
18059 2000-07-03  Ettore Perazzoli  <ettore@helixcode.com>
18060
18061         * camel-folder-summary.c (camel_folder_summary_set_uid): Removed.
18062
18063 2000-07-03  Dan Winship  <danw@helixcode.com>
18064
18065         * camel-folder-summary.c (message_info_new): Parse In-Reply-To
18066         with header_references_decode, not header_msgid_decode.
18067
18068         * camel-mime-message.c (camel_mime_message_class_init): message
18069         headers are case-insensitive.
18070
18071         * providers/pop3/camel-pop3-store.c (camel_pop3_command): Fix a
18072         bug in error-setting code.
18073         (pop3_connect): Don't re-prompt for password in the KPOP case.
18074         (pop3_get_response): New function, split out from
18075         camel_pop3_command.
18076         (connect_to_server): Use pop3_get_response to parse the greeting
18077         message, and error out appropriately if it's -ERR.
18078
18079 2000-07-02  Dan Winship  <danw@helixcode.com>
18080
18081         * camel-folder.c (camel_folder_freeze, camel_folder_thaw): New
18082         functions to freeze and thaw a folder (to prevent message/folder
18083         changed signals in the middle of a long series of operations).
18084         (camel_folder_class_init): Change signals to GTK_RUN_FIRST.
18085         (message_changed, folder_changed): Add default implementations
18086         that stop the emission and record info for later if the folder is
18087         frozen.
18088
18089         * providers/mbox/camel-mbox-folder.c (mbox_sync): leftover fixes
18090         from the close->sync change: don't destroy the ibex, summary, and
18091         search when syncing.
18092         (append_message): emit "folder_changed" on a successful append.
18093
18094 2000-07-02  Jeffrey Stedfast  <fejj@helixcode.com>
18095
18096         * camel-mime-utils.c (uudecode_step): A rather complex uudecoder
18097         written in the spirit of Zucchi-ness, is it up to par? Only the 
18098         Z-man can tell us :-)
18099
18100 2000-07-01  Dan Winship  <danw@helixcode.com>
18101
18102         * camel-service.c (camel_service_get_name): New method, to return
18103         an end-user-friendly name corresponding to a service. (eg, "POP
18104         service for danw on trna.helixcode.com").
18105
18106         * providers/imap/camel-imap-store.c,
18107         providers/mbox/camel-mbox-store.c,
18108         providers/nntp/camel-nntp-store.c,
18109         providers/pop3/camel-pop3-store.c,
18110         providers/sendmail/camel-sendmail-transport.c,
18111         providers/smtp/camel-smtp-transport.c: Implement.
18112
18113         * providers/imap/Makefile.am: remove unneeded
18114         libcamelimap_la_LDADD.
18115
18116         * providers/pop3/camel-pop3-store.c (connect_to_server): fix the
18117         CAPA-parsing code to not get into an infinite loop.
18118
18119 2000-07-01  Jeffrey Stedfast  <fejj@helixcode.com>
18120
18121         * providers/imap/camel-imap-folder.c (imap_get_message): Fixed
18122         the bug that would sometimes leave part of the server response
18123         tacked on to the end of the message.
18124
18125         * camel-folder.c: Renamed _by_uid methods. Since we no longer
18126         have get-by-number methods, no need to have the _by_uid 
18127         extensions. 
18128         (get_message_by_uid): Renamed to get_message
18129         (delete_message_by_uid): Renamed to delete_message
18130         (summary_get_by_uid): Renamed to get_message_info
18131
18132         * providers/mbox/camel-mbox-folder.c: 
18133         * providers/pop3/camel-pop3-folder.c:
18134         * providers/imap/camel-imap-folder.c:
18135         * providers/vee/camel-vee-folder.c: Updated to reflect
18136         camel-folder changes.
18137
18138 2000-06-30  Jeffrey Stedfast  <fejj@helixcode.com>
18139
18140         * camel-folder.c (camel_folder_copy_message_to): New function, to
18141         copy a message from one folder to another. The default
18142         implementation just uses append_message, but providers can 
18143         implement more efficient versions for use when both folders are on 
18144         the same store.
18145
18146         * broken-date-parser.[c,h]: Utilities for parsing broken
18147         date strings.
18148         
18149         * providers/imap/camel-imap-folder.c (imap_move_message_to): 
18150         (imap_copy_message_to): Implemented.
18151
18152         * camel-mime-utils.c (header_decode_date): Wrote some code to try
18153         and un-mangle broken date formats and then parse that new string 
18154         instead.
18155
18156 2000-06-30  Dan Winship  <danw@helixcode.com>
18157
18158         * camel-folder.c (camel_folder_move_message_to): New function, to
18159         move a message from one folder to another. The default
18160         implementation just uses append_message and delete_message, but
18161         providers can implement more efficient versions for use when both
18162         folders are on the same store.
18163
18164 2000-06-29  Jeffrey Stedfast  <fejj@helixcode.com>
18165
18166         * providers/imap/camel-imap-folder.c (imap_expunge): Should now
18167         print a meaningful error message when it doesn't succeed
18168
18169 2000-06-28  Jeffrey Stedfast  <fejj@helixcode.com>
18170
18171         * providers/imap/camel-imap-store.c (imap_connect): Changed to
18172         keep prompting user for a valid password until it either
18173         authenticates or until Canceled by the user.
18174         (camel_imap_command_extended): Improved speed (replaced the
18175         g_strjoinv call with a faster implementation)
18176
18177         * providers/pop3/camel-pop3-store.c 
18178         (camel_pop3_command_get_additional_data): Fixed.
18179         (pop3_connect): Changed to keep prompting the user for a
18180         password until it either works or until Canceled by the user.
18181
18182         * providers/mbox/camel-mbox-summary.c: General cleanup
18183         (camel_mbox_summary_sync): Fixed a memory leak and added
18184         CamelException handling.
18185
18186         * providers/mbox/camel-mbox-store.c (delete_folder): Fixed a 
18187         memory leak
18188
18189         * providers/mbox/camel-mbox-folder.c (mbox_append_message): 
18190         Default 'off_t seek' to -1 so as to make sure it's initialized
18191         before it's used in the case of a bad stat() call.
18192         (mbox_sync): Updated
18193         (mbox_expunge): Updated
18194
18195 2000-06-27  Jeffrey Stedfast  <fejj@helixcode.com>
18196
18197         * providers/imap/camel-imap-store.c (imap_connect): Move the 
18198         CAPABILITY command here so we don't have to keep checking
18199         each time we open a folder.
18200         (camel_imap_command_extended): If we are doing an EXAMINE,
18201         don't bother doing a SELECT first.
18202
18203         * providers/imap/camel-imap-folder.c (imap_init): Update so
18204         folder->has_search_capability depends on the parent IMAP store
18205         (since this is really dependant on the IMAP implementation and
18206         not the folder)
18207
18208 2000-06-27  Christopher James Lahey  <clahey@helixcode.com>
18209
18210         * providers/smtp/camel-smtp-transport.c: Don't close the filter
18211         stream when done with it (this causes the source stream to close);
18212         Instead, just flush it when done.
18213
18214 2000-06-27  Michael Zucchi  <zucchi@zedzone.mmc.com.au>
18215
18216         * camel-folder-search.c (search_header_contains): Make header
18217         search 'to' match 'to', and not 'from', small typo, fixes #317.
18218
18219 2000-06-26  Christopher James Lahey  <clahey@helixcode.com>
18220
18221         * providers/mbox/camel-mbox-summary.c: Added debugging
18222         information.
18223
18224 2000-06-23  Jeffrey Stedfast  <fejj@helixcode.com>
18225
18226         * providers/imap/camel-imap-store.c: 
18227         * providers/imap/camel-imap-folder.c: Improved folder parsing.
18228         Not specifying a namespace should no longer list the entire
18229         filesystem.
18230
18231 2000-06-22  Chris Toshok  <toshok@helixcode.com>
18232
18233         * providers/nntp/.cvsignore: ignore test-newsrc
18234
18235         * providers/nntp/camel-nntp-store.c,
18236         providers/nntp/camel-nntp-store.h,
18237         providers/nntp/camel-nntp-folder.c,
18238         providers/nntp/camel-nntp-folder.h,
18239         providers/nntp/camel-nntp-utils.c: Bring the nntp provider up to a
18240         state where it builds and is usable with the current camel.  there
18241         are still warts (semi-broken .newsrc file handling, and a lack of
18242         a subscribe ui -- in fact no way to add a new server, really), but
18243         it'll display news messages.
18244
18245         * providers/nntp/Makefile.am (libcamelnntp_la_SOURCES): add
18246         camel-nntp-newsrc.c
18247         (libcamelnntpinclude_HEADERS): add camel-nntp-newsrc.h
18248         also, add test-newsrc stuff.
18249         
18250         * providers/nntp/test-newsrc.c: new file that tests the newsrc
18251         stuff by parsing and regurgitating a .newsrc file for a particular
18252         server.
18253
18254         * providers/nntp/camel-nntp-newsrc.c,
18255         providers/nntp/camel-nntp-newsrc.h: new files, initial support for .newsrc files.
18256
18257 2000-06-22  Jeffrey Stedfast  <fejj@helixcode.com>
18258
18259         * providers/imap/camel-imap-folder.c (imap_get_message_count): 
18260         Oops. Now appends the namespace to the folder before querying
18261         for the number of messages.
18262
18263         * providers/imap/camel-imap-store.c (imap_folder_exists): New
18264         convenience function for use by imap_create().
18265         (get_folder): If folder is specified as "/", we really want
18266         "INBOX".
18267
18268         * providers/sendmail/camel-sendmail-provider.c:
18269         * providers/vee/camel-vee-provider.c:
18270         * providers/smtp/camel-smtp-provider.c:
18271         * providers/mbox/camel-mbox-provider.c:
18272         * providers/pop3/camel-pop3-provider.c:
18273         * providers/imap/camel-imap-provider.c: Updated
18274         
18275         * camel-session.c: Moved service_cache hash table into the
18276         providers.
18277         (service_cache_remove): Updated.
18278         (camel_session_get_service): Updated.
18279
18280         * camel-url.c (camel_url_hash): Took out the hashing of
18281         url->passwd. We don't want this anymore.
18282
18283         * providers/imap/camel-imap-folder.c (imap_init): Took out
18284         references to 'namespace'
18285         (camel_imap_folder_init): Same
18286
18287         * providers/imap/camel-imap-folder.h: No more namespace. We are
18288         instead going to use url->path as the namespace.
18289
18290 2000-06-21  Jeffrey Stedfast  <fejj@helixcode.com>
18291
18292         * providers/imap/camel-imap-store.c (imap_create): Modified to
18293         use the "namespace" (url->path) if it exists.
18294
18295         * providers/imap/camel-imap-folder.c (imap_delete_message_by_uid):
18296         Now just sets the deleted flag on the summary rather than speaking 
18297         directly to the IMAP server. This is both faster and cleaner.
18298
18299 2000-06-21  Dan Winship  <danw@helixcode.com>
18300
18301         * providers/pop3/camel-pop3-store.c (query_auth_types): Fix dumb
18302         bug.
18303
18304 2000-06-21  Jeffrey Stedfast  <fejj@helixcode.com>
18305
18306         * providers/imap/camel-imap-folder.c (imap_get_message_by_uid): 
18307         We are getting mail in IMAP now!! whoo-hoo!. Stripped out the 
18308         filtering so messages may have some dot-stuffing, but the 
18309         filtering can always be added back in later when we know it 
18310         works and isn't the problem.
18311
18312 2000-06-21  Peter Williams  <peterw@curious-george.helixcode.com>
18313
18314         * providers/mbox/camel-mbox-folder.c (mbox_init): Use the basename
18315         of the mailbox so we don't get pathnames like ~/evolution/inbox///movemail.ibex
18316
18317 2000-06-21  Dan Winship  <danw@helixcode.com>
18318
18319         * camel-folder-summary.c (message_info_new): Set date_received
18320         based on the first (most recent) "Received" header.
18321
18322 2000-06-20  Dan Winship  <danw@helixcode.com>
18323
18324         * camel-mime-part.c (write_to_stream): flush the filter stream
18325         before unreffing it, so it will camel_mime_filter_complete.
18326
18327         * camel-stream-filter.c (camel_stream_filter_class_init): Fix a
18328         braino so camel_stream_flush works here.
18329
18330         * camel-stream-mem.c (stream_seek): Fix a bug that resulted in
18331         large attachments being silently dropped.
18332
18333         * providers/pop3/camel-pop3-store.c
18334         (camel_pop3_command_get_additional_data): Don't use g_strjoinv
18335         here, since it is O(n^2) on the length of the output string, and
18336         we can do O(n).
18337
18338         * camel-mime-part-utils.c
18339         (simple_data_wrapper_construct_from_parser): add a CRLF decoder
18340         after the QP/B64 decoder if it's text.
18341
18342 2000-06-20  Jeffrey Stedfast  <fejj@helixcode.com>
18343
18344         * providers/imap/camel-imap-folder.c (imap_get_summary): Only
18345         fetch the summary if the folder summary doesn't already exist.
18346         When the summary *does* exist, start fetching from 1, not 0.
18347         (imap_free_summary): Don't do anything here.
18348         (imap_finalize): Free the summary here instead of in
18349         imap_free_summary().
18350         (imap_set_message_flags): Implemented
18351         (imap_sync): Added code to set flags on messages that have had
18352         their flags changed (however I #if'd it out until we are more
18353         confidant in the IMAP code :)
18354         (imap_summary_get_by_uid): Now parese flags correctly.
18355         (imap_get_summary): Now parese flags correctly. Also correctly
18356         parses the UID correctly.
18357
18358         * camel-url.c (check_equal): No need to check s1 if s2 is NULL
18359         (camel_url_equal): Don't check the passwd component of the url.
18360
18361 2000-06-20  Dan Winship  <danw@helixcode.com>
18362
18363         * camel-folder-summary.c (camel_folder_summary_add): mark the
18364         message info with CAMEL_MESSAGE_FOLDER_FLAGGED if we change the
18365         uid, so the folder will know that it's dirty.
18366
18367 2000-06-20  Jeffrey Stedfast  <fejj@helixcode.com>
18368
18369         * providers/imap/camel-imap-store.c (camel_imap_command_extended): 
18370         Now returns the last line of data that the server sends back as
18371         well. This is needed for commands like SELECT (like Peter pointed
18372         out).
18373         (camel_imap_command): No longer checks for SELECT (no need)
18374
18375         * providers/imap/camel-imap-folder.c: Added namespace stuff
18376         which we will need later on...
18377         (imap_parse_subfolder_line): Convenience function for use in
18378         get_subfolder_names()
18379         (imap_get_subfolder_names): Updated. Also changed it to use LIST
18380         instead of LSUB (temporary change).
18381
18382 2000-06-19  Jeffrey Stedfast  <fejj@helixcode.com>
18383
18384         * providers/imap/camel-imap-folder.c (camel_imap_folder_init): Set
18385         summary equal to NULL.
18386         (imap_get_summary): Store the summary in the ImapFolder
18387         (imap_summary_get_by_uid): If we have a summary cache in the
18388         ImapFolder, first check to see if that message info is in the
18389         cached summary first, if not fetch it directly from the IMAP
18390         server and append it to the summary cache.
18391         (imap_get_message_flags): Don't free the message info that we get
18392         back from summary_get_by_uid as we don't want to be corrupting our
18393         cached summary.
18394
18395 2000-06-19  Peter Williams  <peterw@curious-george.helixcode.com>
18396
18397         * providers/imap/camel-imap-store.c (camel_imap_command{,_extended}): When
18398         SELECT'ing a folder for an IMAP command, use _extended to grab the entire
18399         response (before we just used camel_imap_command and missed the OK codes)
18400
18401 2000-06-18  Jeffrey Stedfast  <fejj@helixcode.com>
18402
18403         * providers/imap/camel-imap-folder.c (imap_summary_get_by_uid): 
18404         Now gets the message flags as it should.
18405         (imap_get_summary): Same as imap_summary_get_by_uid
18406         (imap_get_permanent_flags): Return the permanent flags stored
18407         on the folder.
18408         (imap_get_message_flags): Return message flags associated with
18409         given uid. Note: we may want to somehow cache summary info so
18410         that we don't have to keep querying the IMAP provider in
18411         imap_summary_get_by_uid().
18412
18413 2000-06-17  Jeffrey Stedfast  <fejj@helixcode.com>
18414
18415         * providers/imap/camel-imap-folder.c (imap_free_summary): We were
18416         leaking memory - but not anymore!
18417         (imap_get_summary): We now get the UIDs and the beginnings of the
18418         code to get the message flags as well.
18419
18420 2000-06-17  Dan Winship  <danw@helixcode.com>
18421
18422         * camel-mime-parser.c (folder_scan_header): Don't copy newlines
18423         into the parsed header text, and turn any number of tabs and
18424         spaces after a newline into a single space.
18425
18426 2000-06-17  Jeffrey Stedfast  <fejj@helixcode.com>
18427
18428         * providers/imap/camel-imap-folder.c (imap_init): Should now
18429         correctly do CAPABILITY.
18430
18431 2000-06-17  Dan Winship  <danw@helixcode.com>
18432
18433         * providers/mbox/camel-mbox-summary.c: Add some debugging printfs
18434         when rebulding summary to help figure out why people's summaries
18435         are always being rebuilt.
18436
18437 2000-06-17  Jeffrey Stedfast  <fejj@helixcode.com>
18438
18439         * providers/imap/camel-imap-folder.c (imap_search_by_expression):
18440         Began to implement, need to get information on how to
18441         deconstruct @expression into an IMAP search expression and
18442         parse the results.
18443         (imap_init): Now queries the IMAP provider for CAPABILITY to
18444         determine if SEARCH is implemented or not.
18445
18446         * providers/imap/imap.c: Removed - no longer a need to have
18447         this as an example for anyone interesting to help mecode IMAP
18448         support.
18449         
18450 2000-06-16  Jeffrey Stedfast  <fejj@helixcode.com>
18451
18452         * providers/imap/camel-imap-folder.c (imap_sync): Added code
18453         to expunge if called for (still need to finish coding this).
18454         (imap_get_uids): Implemented.
18455         (imap_get_summary): Found a way to get the date
18456         (imap_summary_get_by_uid): Same.
18457         (imap_free_summary): Implemented.
18458
18459         * string-utils.c (strstrcase): Fixed a compile warning
18460
18461         * providers/imap/camel-imap-summary.c: Removed - we don't
18462         need a CamelImapSummary structure.
18463
18464 2000-06-16  Dan Winship  <danw@helixcode.com>
18465
18466         Move flag handling from CamelMimeMessage to CamelFolder. This
18467         simplifies several flag-handling pieces of code in the mailer, and
18468         lets you change a message's flags without having to fetch the
18469         message body. It also means that fully-constructed
18470         CamelMimeMessages are now essentially constant, which will help
18471         simplify locking issues later since it means two threads
18472         interested in the same message can just work with separate copies
18473         of it.
18474
18475         * camel-mime-message.h (struct _CamelMimeMessage): Removed flags
18476         and user_flags (moved to summary). Removed expunged and
18477         message_number which were unused. Removed message_uid and folder
18478         which are no longer needed in the new scheme.
18479         (struct CamelMimeMessageClass): Removed message_changed signal and
18480         get/set_message_number methods.
18481
18482         * camel-mime-message.c: Updates for CamelMimeMessage changes.
18483         (camel_mime_message_get/set_flags,
18484         camel_mime_message_get/set_user_flag): Replaced with methods in
18485         CamelFolder.
18486         (camel_flag_get, camel_flag_set, camel_flag_list_size,
18487         camel_flag_list_free): Moved verbatim to camel-folder-summary.c
18488         
18489         * camel-folder.c (camel_folder_get/set_message_flags,
18490         camel_folder_get/set_message_user_flag): New methods (and
18491         corresponding useless default implementations)
18492         (camel_folder_class_init): add a message_changed signal
18493
18494         * camel-folder-summary.c (camel_flag_get, camel_flag_set,
18495         camel_flag_list_size, camel_flag_list_free): Moved here from
18496         camel-mime-message.c
18497
18498         * providers/mbox/camel-mbox-folder.c (message_changed): Removed.
18499         (mbox_get_message_flags, mbox_set_message_flags,
18500         mbox_get_message_user_flag, mbox_set_message_user_flag): Tweak
18501         summary bits as appropriate. (Functionality moved here from
18502         message_changed.)
18503         (mbox_get_message_by_uid): Update for CamelMimeMessage changes
18504         (less stuff to initialize).
18505
18506         * providers/imap/camel-imap-folder.c (message_changed): Remove
18507         this. It was just copied from the mbox provider and doesn't deal
18508         with the real IMAP flag stuff anyway. (So there's currently no
18509         flag support in the IMAP provider.)
18510         (imap_get_message_by_uid): Update for CamelMimeMessage changes.
18511
18512         * providers/vee/camel-vee-folder.c: (message_changed): Remove old
18513         one. Add a new one to listen for message_changed on each folder
18514         and re-emit message_changed signals that correspond to messages in
18515         the vfolder.
18516         (vee_get/set_message_flags, vee_get/set_message_user_flag): Proxy
18517         flag setting to the underlying real messages.
18518         (vee_append_message): Removed for now; there's no way to translate
18519         this into the new CamelMimeMessage/CamelFolder scheme, but (a)
18520         there's also no code which would ever call it and (b) we're
18521         probably going want a better interface than append_message for
18522         message drag and drop to work anyway. To be revisited.
18523
18524 2000-06-16  Dan Winship  <danw@helixcode.com>
18525
18526         * camel-mime-utils.c (rfc2047_decode_word): 
18527         * camel-mime-part-utils.c (simple_data_wrapper_construct_from_parser): 
18528         * camel-folder-summary.c (summary_build_content_info): 
18529         KLUDGE! Since neither ETable nor GtkHTML supports UTF-8 yet,
18530         output ISO-8859-1 instead, so Ettore can read his Italian mail. :)
18531         This will be reverted later.
18532
18533 2000-06-15  Jeffrey Stedfast  <fejj@helixcode.com>
18534
18535         * providers/imap/camel-imap-folder.c (imap_get_summary): Started to 
18536         implement - may want to use ENVELOPE instead of BODY.PEEK[HEADER]
18537         (imap_summary_get_by_uid): Started to code, I've got to find a way to 
18538         get the date in time_t format and also get the flags
18539
18540         * string-utils.c (strstrcase): Added this convenience function - I
18541         know about strcasestr() but it's not portable.
18542
18543 2000-06-15  Dan Winship  <danw@helixcode.com>
18544
18545         * camel-service.c: Remove camel_service_connect_with_url. (URLs
18546         must be specified when the service is requested from the session,
18547         so that there can only ever be one service for any URL.)
18548
18549         * camel-folder.c: (camel_folder_open, camel_folder_is_open,
18550         camel_folder_get_mode): Kill. Folders are now always open, and
18551         handle "closing" sorts of operations at sync or finalize time.
18552         (camel_folder_sync): renamed from camel_folder_close. Syncs state
18553         to the store but doesn't necessarily close/disconnect.
18554
18555         * providers/*/camel-*-folder.c: Merge "open" methods into "init"
18556         methods. Rename close to sync and update appropriately.
18557
18558         * providers/imap/camel-imap-store.c: Remove camel_imap_store_open
18559         and camel_imap_store_close, which should not have been copied from
18560         the POP provider (where the exist to work around limitations of
18561         the POP protocol).
18562
18563         * providers/mbox/camel-mbox-summary.c: fix a bug. (don't expunge
18564         deleted messages if called with expunge == FALSE)
18565         
18566         * providers/pop3/camel-pop3-store.c (connect_to_server): Check
18567         server for various interesting extensions.
18568
18569         * providers/pop3/camel-pop3-folder.c (get_uids): If the server
18570         supports UIDL, use real UIDs rather than fake ones.
18571         (etc): Map uids back to numbers appropriately
18572
18573         * providers/mbox/camel-mbox-folder.c (mbox_append_message): Fix to
18574         previous change: make sure the "seek" variable ends up with the
18575         value it should.
18576
18577         * providers/mbox/camel-mbox-summary.c (summary_rebuild): Update
18578         summary mtime as well as size.
18579
18580 2000-06-14  Dan Winship  <danw@helixcode.com>
18581
18582         * providers/mbox/camel-mbox-folder.c (mbox_append_message): if the
18583         mbox doesn't end with a '\n', write one before appending the new
18584         message.
18585
18586 2000-06-14  Jeffrey Stedfast  <fejj@helixcode.com>
18587
18588         * camel-mime-filter-crlf.c (filter): Updated the encoder to allocate 
18589         more memory (since we are also now adding dots). Also updated the
18590         decoder as we have found that it sometimes passes the end of the 
18591         buffer.
18592
18593         * providers/pop3/camel-pop3-folder.c (get_message_by_uid): Took out the
18594         filter code (we already filter in 
18595         camel_pop3_command_get_additional_data)
18596
18597         * camel-folder.c (init): Updated: a separator is now a char* rather 
18598         than a single char because IMAP can have a string for a directory 
18599         separator. Also, since IMAP does not begin with a directory separator,
18600         there is a new argument (path_begins_with_sep) which decides if a 
18601         directory should begin with a directory separator.
18602
18603         * providers/imap/camel-imap-store.c (imap_create): Since, on connect,
18604         Camel tries to create INBOX (which already exists on every IMAP 
18605         provider) we can return TRUE when the folder name is "INBOX".
18606
18607         * providers/vee/camel-vee-folder.c (vee_init): Updated.
18608
18609         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Updated.
18610
18611         * providers/mbox/camel-mbox-store.c (get_folder): Updated.
18612
18613         * providers/mbox/camel-mbox-folder.c (mbox_init): Updated.
18614
18615         * providers/pop3/camel-pop3-folder.c (camel_pop3_folder_new): Updated.
18616
18617 2000-06-14  Dan Winship  <danw@helixcode.com>
18618
18619         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
18620         Renamed from camel_mbox_summary_expunge. Takes a gboolean saying
18621         whether to expunge or just sync the mbox file. Change some
18622         g_errors to g_warning so we don't abort. Make the quick
18623         X-Evolution updating code lseek around correctly. Update the
18624         mbox mtime in the summary file even in the quick case.
18625
18626         * providers/mbox/camel-mbox-summary.h: make
18627         CAMEL_MESSAGE_FOLDER_NOXEV not conflict with
18628         CAMEL_MESSAGE_FOLDER_FLAGGED defined in camel-mime-message.h
18629
18630         * providers/mbox/camel-mbox-folder.c (mbox_close): call
18631         camel_mbox_summary_sync to save flag state if not expunging.
18632         (mbox_expunge): Update for camel_mbox_summary_expunge rename.
18633
18634 2000-06-13  Jeffrey Stedfast  <fejj@helixcode.com>
18635
18636         * providers/imap/camel-imap-store.c (camel_imap_store_open): 
18637         (camel_imap_store_close): Added.
18638         (camel_imap_command_extended): Fixed a segfault and updated
18639         to use camel_imap_status()
18640         (camel_imap_command): Updated to use camel_imap_status()
18641         (camel_imap_status): New convenience function for parsing
18642         the return status of an IMAP command
18643
18644 2000-06-12  Jeffrey Stedfast  <fejj@helixcode.com>
18645
18646         * providers/imap/camel-imap-folder.c (imap_get_message_by_uid): 
18647         Works like the POP fetch code, should work temporarily until
18648         we get around to coding it the way it "Should Be".
18649
18650         * providers/pop3/camel-pop3-folder.c (get_message_by_uid): Now uses
18651         the camel-mime-filter-crlf decoder when retrieving messages.
18652
18653         * camel-mime-filter-smtp.c: Deprecated.
18654
18655         * providers/smtp/camel-smtp-transport.c (smtp_data): Updated to use
18656         camel-mime-filter-crlf with my 'dot' extension in place of
18657         camel-mime-filter-smtp
18658
18659         * camel-mime-part.c (write_to_stream): Updated to reflect changes
18660         made to camel-mime-filter-crlf.c
18661
18662         * camel-mime-filter-crlf.c (filter): Modified to be able to
18663         encode/decode dots ("\n.\n"<->"\n..\n"). Also fixed the decoder
18664         so that it should no longer get caught in an infinite loop.
18665
18666 2000-06-12  Dan Winship  <danw@helixcode.com>
18667
18668         * providers/*/Makefile.am: don't pass a second (incorrect) -rpath
18669         in addition to the (correct) one automatically provided by
18670         automake.
18671
18672         * camel-mime-filter-crlf.c: New filter to do CRLF<->LF conversion.
18673         (Currently only tested in the LF->CRLF direction.)
18674
18675         * camel-mime-part.c (write_to_stream): if content-type is text,
18676         and it's QP or B64 encoded, pass through the CRLF filter before
18677         the other filter to satisfy the "canonical encoding" rules in the
18678         MIME spec.
18679
18680 2000-06-09  Dan Winship  <danw@helixcode.com>
18681
18682         * camel-session.c (camel_session_query_authenticator): Add another
18683         argument, "mode", which can be CAMEL_AUTHENTICATOR_ASK or
18684         CAMEL_AUTHENTICATOR_TELL, so callers can get the app to un-cache
18685         bad info.
18686
18687         * providers/pop3/camel-pop3-store.c (pop3_connect): uncache the
18688         password if it doesn't work.
18689
18690 2000-06-09  Jeffrey Stedfast  <fejj@helixcode.com>
18691
18692         * providers/imap/camel-imap-stream.c (stream_read): Updated to reflect
18693         changes made in camel-imap-store.c
18694
18695         * providers/imap/camel-imap-store.c (imap_create): No longer checks to
18696         make sure a folder doesn't already exists (as this is no longer needed)
18697         (camel_imap_command): Now takes a CamelFolder argument so it can detect
18698         whether or not it needs to SELECT a folder or not
18699         (camel_imap_command_extended): Same.
18700
18701         * providers/smtp/camel-smtp-transport.c (smtp_connect): Will now always
18702         send EHLO first, if that fails it will fall back on HELO.
18703         (esmtp_get_authtypes): Should now correctly parse authtypes.
18704
18705 2000-06-07  Jeffrey Stedfast  <fejj@helixcode.com>
18706
18707         * providers/imap/camel-imap-summary.c: Now builds (not that it's worth
18708         much yet).
18709         
18710         * providers/imap/camel-imap-folder.c (imap_get_uids): Now uses the 
18711         correct cast to a CamelImapMessageInfo structure (should get rid of 
18712         compile warnings).
18713
18714         * providers/imap/Makefile.am: Added rules to build 
18715         camel-imap-stream
18716         
18717         * providers/imap/camel-imap-store.c (get_folder): Update.
18718         Moved imap_create here.
18719
18720         * providers/imap/camel-imap-folder.c (delete_messages): Remove.
18721         (imap_create): Removed.
18722         (imap_delete): Removed.
18723         (imap_exists): Removed.
18724
18725         * providers/imap/camel-imap-stream.h: Added typedef's for the stream
18726
18727         * providers/imap/camel-imap-stream.c: Modified to build cleanly
18728
18729 2000-06-07  Not Zed  <NotZed@HelixCode.com>
18730
18731         * camel-mime-utils.c (header_msgid_decode_internal): Properly
18732         dereference warning/debug messages.
18733         (header_references_decode): Check we actually have msgid stuff
18734         before trying to decode it ...
18735
18736 2000-06-06  Jeffrey Stedfast  <fejj@helixcode.com>
18737
18738         * camel-imap-stream.[c,h]: Removed
18739
18740         * providers/imap/camel-imap-stream.[c,h]: Relocated to this
18741         location
18742
18743         * providers/imap/camel-imap-summary.c: Added
18744
18745 2000-06-06  Dan Winship  <danw@helixcode.com>
18746
18747         * camel-folder.c: Remove exists, create, delete. A CamelFolder
18748         now always references an existing folder. Remove delete_messages
18749         too since it wasn't being used. Add a "create" flag to
18750         get_subfolder saying whether or not to create the subfolder if it
18751         doesn't yet exist.
18752
18753         * camel-store.c (camel_store_get_folder): Add a "create" flag to
18754         say whether or not to create the folder if it doesn't yet exist.
18755         (camel_store_delete_folder): New method, moved from CamelFolder.
18756         (cache_folder, uncache_folder): Fix up a bit.
18757         (get_folder_name): Explain what this is for.
18758
18759         * providers/mbox/camel-mbox-folder.c: 
18760         * providers/mbox/camel-mbox-store.c: Update. Remove support for
18761         hierarchical folders to simplify this for now, since we're not
18762         using it, and it's not completely clear how they should work in an
18763         ELocalStorage world. Needs to be revisited.
18764
18765         * providers/pop3/camel-pop3-folder.c (delete_messages): Remove.
18766         * providers/pop3/camel-pop3-store.c (get_folder): Update.
18767
18768         * providers/vee/camel-vee-folder.c (exists): Remove.
18769         * providers/vee/camel-vee-store.c (vee_get_folder): Update.
18770
18771 2000-06-06  Jeffrey Stedfast  <fejj@helixcode.com>
18772
18773         * providers/imap/camel-imap-*.[c,h]: Started on getting 
18774         imap to build cleanly (tho some work has not been completed
18775         so it still won't build until camel-imap-summary is finished
18776         along with a few methods in camel-imap-folder)
18777
18778         * camel-stream.[c,h]: Changed the read and write method prototypes
18779         to return an ssize_t type rather than an int and also changed
18780         the 'number of bytes' to read or write to a size_t type
18781
18782         * camel-stream-fs.c: same as above
18783
18784         * camel-stream-mem.c: again, same as above
18785
18786         * camel-stream-buffer.c: same
18787
18788         * camel-imap-stream.[c,h]: Added this new stream, cache's previously 
18789         read data so each successive call will instead read from the cache
18790         
18791 2000-06-05  Dan Winship  <danw@helixcode.com>
18792
18793         * camel-mime-part.c (camel_mime_part_set_disposition): fix
18794         typo/braino (set "Content-Disposition", not "Content-Description")
18795         (camel_mime_part_set_filename): const poison
18796
18797 2000-06-02  Not Zed  <NotZed@HelixCode.com>
18798
18799         * camel-mime-utils.c (base64_encode_step): Ick, damn signs!  Fix a
18800         bug with sign extended bytes.
18801
18802         * camel-mime-filter-smtp.c (filter): Changed layout/logic slightly
18803         (to match From filter)
18804
18805 2000-06-02  Jeffrey Stedfast  <fejj@helixcode.com>
18806
18807         * camel-mime-filter-smtp.c (filter): Fixed the filter so that it 
18808         wouldn't insert garbage under certain conditions.
18809
18810 2000-06-02  Christopher James Lahey  <clahey@helixcode.com>
18811
18812         * camel-session.c: Don't ref the services in the cache.
18813
18814 2000-06-02  Jeffrey Stedfast  <fejj@helixcode.com>
18815
18816         * providers/smtp/camel-smtp-transport.c: Rearanged where debug
18817         fprintf statements we placed so that any data the server sends 
18818         back is printed out before an exception is set and the function
18819         returns.
18820
18821 2000-06-02  Not Zed  <NotZed@HelixCode.com>
18822
18823         * camel-mime-utils.c (header_decode_date): If we get a funny
18824         result, just throw it out.  Basically a fix for the one true
18825         broken TradeClient.
18826
18827 2000-06-01  Not Zed  <NotZed@HelixCode.com>
18828
18829         * camel-folder-summary.c (message_info_free): Free
18830         references/messsage id.
18831         (message_info_save): Save them.
18832         (message_info_load): Load them.
18833         (message_info_new): And get them from the new message.
18834         (CAMEL_FOLDER_SUMMARY_VERSION): Bumped for new changes.
18835
18836         * camel-folder-summary.h: Added references and messageid to
18837         summary.
18838
18839 2000-06-02  Christopher James Lahey  <clahey@helixcode.com>
18840
18841         * camel-session.c: Ref and unref objects in the service cache
18842         properly.
18843
18844         * camel-store.c: Ref the folder when returning it using
18845         lookup_folder.  Used the folder's full name for the key for the
18846         folder cache since that's used to uncache it.
18847
18848 2000-06-02  Dan Winship  <danw@helixcode.com>
18849
18850         Fun with purify.
18851
18852         * providers/pop3/camel-pop3-store.c (pop3_connect): free msg on
18853         success as well as failure.
18854         (camel_pop3_command_get_additional_data): free buf after reading
18855         the last line (".").
18856
18857         * providers/pop3/camel-pop3-folder.c (get_message_by_uid): free
18858         body data after creating the memstream from it (which will copy
18859         the data).
18860
18861         * providers/mbox/camel-mbox-folder.c (mbox_finalize): free summary
18862         and index paths.
18863
18864         * camel-data-wrapper.c (finalize): unref the stream, if it exists.
18865
18866 2000-06-01  Not Zed  <NotZed@HelixCode.com>
18867
18868         * camel-mime-part.c (construct_from_parser): For a message part,
18869         set the default content-type to message/rfc822.  Maybe needs to be
18870         done for multiparts too?
18871
18872 2000-05-31  Not Zed  <NotZed@HelixCode.com>
18873
18874         * camel-mime-message.c (construct_from_parser): Typo in assersion.
18875
18876         * camel-mime-parser.c (folder_scan_step): Use a default type of
18877         message/rfc822 for multipart/digest.  Bug Z192.
18878         (folder_scan_drop_step): Remove warning.
18879
18880 2000-05-30  Not Zed  <NotZed@HelixCode.com>
18881
18882         * providers/mbox/camel-mbox-folder.c (mbox_append_message): Init
18883         filter_from to NULL, for exception case.
18884         (mbox_get_message_by_uid): Cast off_t to long int for diagnostics.
18885
18886         * camel-url.c (camel_url_hash): Hash funciton for using camel
18887         url's as hash keys.
18888         (camel_url_equal): equal function for same.
18889
18890         * camel-session.c (camel_session_finalise): Free cached services.
18891         (camel_session_init): Init service cache.
18892         (service_cache_remove): destroy callback to remove a service from
18893         the cache.
18894
18895         * camel-store.c (get_folder_internal): Remove the extra ref of the
18896         folder.  That seems the right behaviour ...?
18897         (camel_store_get_type): Doh, actually call store init, so the
18898         cache works.
18899         (cache_folder): strdup the folder name!  no wonder it never found
18900         it again.
18901
18902 2000-05-30  Jeffrey Stedfast  <fejj@helixcode.com>
18903
18904         * providers/imap/camel-imap-folder.c: Implemented a few more
18905         methods like imap_append and 1 or 2 others
18906
18907 2000-05-29  Not Zed  <NotZed@HelixCode.com>
18908
18909         * camel-store.c (camel_store_init): Move it to here.  If this
18910         level is going to maintain it, it should set it up.  Lets see what
18911         caching folders breaks :(
18912
18913         * providers/pop3/camel-pop3-store.c (camel_pop3_store_init): Dont
18914         init folder cache here.
18915
18916         * providers/mbox/camel-mbox-summary.c
18917         (camel_mbox_summary_expunge): Make sure we copy messages which are
18918         still intact to the new folder.
18919         (camel_mbox_summary_expunge): Update the frompos as well when
18920         moving the content.
18921         (camel_mbox_summary_expunge): Remove some debug, and dont offset
18922         frompos?
18923
18924         * providers/vee/camel-vee-folder.c (vee_folder_build): Check the
18925         searched folder is open before trying to search it.
18926         (message_changed): Track changes to the source message in the
18927         summary.
18928         (folder_changed): Track folder changes, re-query the folder that
18929         changed, and cascade the changed event as well.
18930         (camel_vee_folder_finalise): Free subfolder and subfolder summary.
18931
18932 2000-05-29  Dan Winship  <danw@helixcode.com>
18933
18934         * camel-service.c (camel_service_new): Fix up some glib
18935         precondition stuff. Try to set the URL in camel_service_new before
18936         checking whether or not it's "empty" so that you can successfully
18937         set "sendmail:" as a URL.
18938
18939 2000-05-28  Dan Winship  <danw@helixcode.com>
18940
18941         * camel-provider.h: Add a domain field to CamelProvider, to say
18942         what kind of data it provides.
18943
18944         * providers/imap/camel-imap-provider.c: 
18945         * providers/mbox/camel-mbox-provider.c: 
18946         * providers/pop3/camel-pop3-provider.c: 
18947         * providers/sendmail/camel-sendmail-provider.c: 
18948         * providers/smtp/camel-smtp-provider.c: Set domain to "mail".
18949
18950         * providers/nntp/camel-nntp-provider.c: Set domain to "news".
18951
18952         * providers/vee/camel-vee-provider.c: Set domain to "vfolder". (So
18953         it doesn't end up being listed as a potential mail source in the
18954         mail config wizard.)
18955
18956         * providers/pop3/camel-pop3-store.c: Split apart password and APOP
18957         auth, since some servers seem to do both, but don't really.
18958         (connect_to_server): Renamed from try_connect. Now actually does
18959         the connection up to the point of checking the greeting for APOP
18960         support.
18961         (query_auth_types): Return APOP, if appropriate. Call
18962         pop3_disconnect after connect_to_server since we don't really want
18963         to be connected.
18964         (pop3_connect): Use connect_to_server rather than duplicating
18965         code. Fix a one-byte buffer overrun in the APOP code.
18966         (pop3_disconnect): Make this able to clean up after a partial
18967         connect.
18968         (connect_to_server): Remove port number from error message since
18969         it's not terribly useful and we were getting it from the wrong
18970         place anyway.
18971
18972         * camel-mime-utils.c (header_address_list_format_append): Use
18973         `foo@bar' rather than `"" <foo@bar>' for email addresses with no
18974         name component.
18975
18976 2000-05-27  Jeffrey Stedfast  <fejj@helixcode.com>
18977
18978         * providers/imap/camel-imap-store.c: Removed 
18979         camel_imap_command_get_additional_data() as it was
18980         completely useless, replaced with 
18981         camel_imap_command_extended() which may eventually replace
18982         camel_imap_command() as well.
18983
18984         * providers/imap/camel-imap-store.h: Modified to reflect
18985         changes made to camel-imap-store.c
18986
18987         * providers/imap/camel-imap-folder.c: Wrote the first of many
18988         methods: camel_imap_init(), imap_open(), imap_expunge(), 
18989         imap_get_message_count(), and imap_get_subfolder_names()
18990
18991 2000-05-26  Dan Winship  <danw@helixcode.com>
18992
18993         * camel-multipart.c (camel_multipart_init): Don't set a default
18994         boundary. Require the caller to do that.
18995         (set_boundary): if boundary is NULL, generate a "random" boundary.
18996
18997         * camel-mime-part-utils.c
18998         (camel_mime_part_construct_content_from_parser): Add a call to
18999         camel_multipart_set_boundary after creating a new multipart.
19000
19001 2000-05-25  Jeffrey Stedfast  <fejj@helixcode.com>
19002
19003         * providers/imap/camel-imap-store.c (try_connect): Removed
19004         Exception code - Pop doesn't seem to set exceptions
19005
19006         * providers/imap/camel-imap-folder.c: Initial code, mostly
19007         just a template for future code
19008
19009         * providers/imap/imap.[c,h]: Source code from my personal
19010         mailer - for reference only!
19011
19012 2000-05-25  NotZed  <NotZed@HelixCode.com>
19013
19014         * camel-mime-part-utils.c
19015         (camel_mime_part_construct_content_from_parser): Replace simple
19016         data wrapper here too, oops.
19017
19018         * Makefile.am (libcamel_la_SOURCES): Removed
19019         camel-simple-data-wrapper again.  Less code to maintain == better
19020         code.
19021         
19022         * camel-data-wrapper.c (construct_from_stream): Fixes for bug
19023         where text attachments dont work.  Made data-wrapper concrete for
19024         the second time.
19025
19026 2000-05-23  NotZed  <NotZed@HelixCode.com>
19027
19028         * providers/vee/camel-vee-folder.c (vee_folder_build_folder):
19029         Update the vfolder details for a single folder.
19030
19031 2000-05-25  Jeffrey Stedfast  <fejj@helixcode.com>
19032
19033         * providers/smtp/camel-smtp-transport.c (_send_to): Took out code
19034         that had been there to reconnect to the server if it was not
19035         already connected - Mailer code was fixed so that this should not
19036         be needed.
19037
19038         * providers/imap/camel-imap-store.[c,h]: Initial code.
19039
19040 2000-05-24  Dan Winship  <danw@helixcode.com>
19041
19042         * camel.h: Re-add camel-simple-data-wrapper.h, which was removed
19043         for some reason.
19044
19045 2000-05-24  Jeffrey Stedfast  <fejj@helixcode.com>
19046
19047         * providers/smtp/camel-smtp-transport.[c,h]: Moved global
19048         variables into struct CamelSmtpTransport to make SMTP
19049         thread-safe
19050
19051         * providers/imap/camel-imap-*.h: Stolen from Mbox. Rough structure
19052         for Imap.
19053         
19054 2000-05-23  Jeffrey Stedfast  <fejj@helixcode.com>
19055
19056         * providers/imap: Added some initial code to the camel tree
19057         for IMAPv4
19058
19059         * providers/imap/.cvsignore: Added to repository
19060
19061         * providers/smtp/camel-smtp-transport.c: Added debug fprintf's
19062         so that testers can provide more information. Tested with simple
19063         messages and a reply to the hello@helixcode.com default message
19064         but should really be tested more.
19065         (smtp_data): Fixed to use data_wrapper_write_to_stream.
19066
19067         * camel-mime-filter-smtp.c (filter): Modified to escape all lines
19068         beginning with a '.' and to place a \r before each \n if one did
19069         not previously exist. Removed code to escape "From " as it was
19070         found to not be needed for SMTP.
19071
19072 2000-05-22  Jeffrey Stedfast  <fejj@helixcode.com>
19073
19074         * providers/smtp/camel-smtp-transport.c (smtp_data): Fixed the 
19075         filtered stream. Fixes for stream changes, updated to use 
19076         camel-mime-filter-smtp.
19077
19078         * Makefile.am: Added camel-mime-filter-smtp.c
19079         
19080         * camel-mime-filter-smtp.[c,h]: Added to camel tree
19081         Smtp filter used to change \n into \r\n, escape lone dots,
19082         and escape "From "'s.
19083
19084 2000-05-19  NotZed  <NotZed@HelixCode.com>
19085
19086         * camel-simple-data-wrapper.c (construct_from_stream): If we
19087         already have been constructed, unref our content.
19088         (write_to_stream): Check we've been constructued, and change for
19089         stream api changes.
19090
19091         * camel-mime-parser.c: Removed exception stuff.
19092
19093         * md5-utils.c (md5_get_digest_from_stream): repaired.
19094
19095         * camel-mime-message.c: Remove exception from write_to_stream, and
19096         fix, and fix formatting.
19097
19098         * providers/sendmail/camel-sendmail-transport.c (_send_internal):
19099         Fix for stream changes.
19100
19101         * providers/pop3/camel-pop3-store.c (camel_pop3_command): Fixes
19102         for stream changes.
19103
19104         * providers/mbox/camel-mbox-folder.c, and elsewhere, fix all
19105         stream api changes.
19106         (mbox_append_message): Use stream_close() now its back.
19107         (mbox_append_message): unref the from filter.
19108
19109         * camel-stream-mem.c: And here.
19110
19111         * camel-stream-fs.[ch]: Here too.
19112
19113         * camel-stream-filter.c: Likewise.  This is getting tedious.
19114
19115         * camel-stream-buffer.c (stream_write): Fix a few little problems.
19116         (stream_close): Reimplement.
19117         (camel_stream_buffer_read_line): Slightly more efficient version,
19118         that also only allocates the right amount of memory for strings.
19119
19120         * camel-seekable-substream.c: Likewise.
19121
19122         * camel-seekable-stream.[ch]: Remove exceptions, fix formatting,
19123         changes for stream (re)fixes.  set_bounds returns an error.
19124
19125         * camel-stream.[ch]: Remove exceptions.  Make flush and reset return
19126         an error code, repair all the screwed up formatting, and put back
19127         close.
19128
19129         * camel-mime-part-utils.c
19130         (camel_mime_part_construct_content_from_parser): And here.
19131
19132         * camel-mime-part.c (camel_mime_part_set_content): And this too.
19133         (write_to_stream): Fixed for stream changes.
19134
19135         * camel.h: Fixed.
19136
19137         * providers/vee/camel-vee-folder.c (vee_search_by_expression):
19138         Implement.  Performs an intersection of the two searches.
19139         (camel_vee_folder_finalise): Unref search folders.
19140         (vee_append_message): Implement append.
19141
19142 2000-05-18  Dan Winship  <danw@helixcode.com>
19143
19144         * camel-folder.c: remove message_number_capability and require uid
19145         capatibility.
19146         (camel_folder_list_subfolders, camel_folder_get_uid_list,
19147         camel_folder_get_subfolder_info, camel_folder_get_message_info):
19148         removed
19149         (camel_folder_get_subfolder_names,
19150         camel_folder_free_subfolder_names): new subfolder interfaces.
19151         (camel_folder_get_uids, camel_folder_free_uids): new uid
19152         interfaces
19153         (camel_folder_get_summary, camel_folder_free_summary): new summary
19154         interfaces
19155
19156         * providers/mbox/camel-mbox-folder.c,
19157         * providers/nntp/camel-nntp-folder.c:
19158         * providers/vee/camel-vee-folder.c: Update for changes
19159
19160         * providers/pop3/camel-pop3-folder.c: Implement get_uids, update
19161         for other changes.
19162
19163 2000-05-18  NotZed  <NotZed@HelixCode.com>
19164
19165         * providers/vee/camel-vee-folder.c: Guess!
19166
19167         * camel-folder-search.c (search_user_flag): Implement user_flag
19168         search term.
19169
19170         * camel-folder-search.h: Added user_flag search capability
19171         (user-flag "blah")
19172
19173         * providers/mbox/camel-mbox-folder.c (mbox_init): Set USER flag in
19174         permanent flags for the folder.
19175
19176 2000-05-17  Dan Winship  <danw@helixcode.com>
19177
19178         * camel-folder.c: Remove unused async open/close and
19179         copy_message_to functions.
19180         Rename functions without initial _. Fix glib preconditions and
19181         gtk-doc comments.
19182
19183 2000-05-17  Dan Winship  <danw@helixcode.com>
19184
19185         * camel-data-wrapper.c: remove get/set_output_stream operations.
19186         They're redundant with write_to_stream, and CamelMimePart and
19187         CamelMimeMessage only implement the latter, meaning that trying to
19188         get_output_stream on a CamelMimeMessage that was built from pieces
19189         rather than being parsed from a stream doesn't work. Anything that
19190         uses get_output_stream can be rewritten to use write_to_stream, so
19191         we'll standardize on that.
19192         (camel_data_wrapper_new): remove this: CamelDataWrapper is
19193         supposed to be an abstract class.
19194         (write_to_stream): remove default implementation. (Moved to
19195         CamelSimpleDataWrapper)
19196         
19197         * camel-simple-data-wrapper.c: resurrect, although it's not really
19198         the same thing it was before. A simple data wrapper, which is
19199         backed by a CamelStream.
19200
19201         * camel-mime-part-utils.c
19202         (simple_data_wrapper_construct_from_parser): Use
19203         construct_from_stream rather than set_output_stream.
19204         (camel_mime_part_construct_content_from_parser): Change
19205         camel_data_wrapper_new to camel_simple_data_wrapper_new.
19206
19207         * camel-mime-part.c (camel_mime_part_set_content): Change
19208         camel_data_wrapper_new to camel_simple_data_wrapper_new.
19209
19210 2000-05-17  Darin Adler  <darin@eazel.com>
19211
19212         * camel-folder-summary.c: (message_info_load):
19213         Quick fix to get it to compile. I hope I don't get into trouble.
19214
19215 2000-05-17  Dan Winship  <danw@helixcode.com>
19216
19217         * camel.h: Don't include the no-longer-distributed
19218         possibly-to-be-removed headers.
19219
19220         * providers/smtp/camel-smtp-transport.c
19221         (smtp_get_email_addr_from_text): fix an off-by-one error in
19222         address parsing
19223         (smtp_data): use camel_data_wrapper_get_output_stream rather than
19224         data_wrapper->output_stream
19225
19226 2000-05-17  NotZed  <NotZed@HelixCode.com>
19227
19228         * providers/mbox/camel-mbox-folder.c (message_changed): Snoop
19229         changes to user flags on the message into the summary as well.
19230
19231         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_init):
19232         Changed version init to include the parent class version info
19233         (i.e. add it not overwrite it).
19234
19235         * camel-folder-summary.c (message_info_new): Initialise user_flags
19236         to empty.
19237         (message_info_load): And load user flags.
19238         (message_info_save): And save user flags.
19239         (message_info_free): And free them.
19240         (CAMEL_FOLDER_SUMMARY_VERSION): Bumped file revision.
19241
19242         * camel-folder-summary.h: Added user-flags to summary.
19243
19244         * camel-mime-message.c (camel_mime_message_set_user_flag): Dont
19245         use a hashtable for user flags.
19246         (camel_mime_message_get_user_flag): And changed here too.
19247         (camel_flag_get): New interface to get a flag from a flag
19248         list.  Flag lists are easier to work with than hash tables, and
19249         save memory too.
19250         (camel_flag_set): And set.
19251         (camel_flag_list_free): And free.
19252         (free_key_only): Discard.
19253         (finalize): Remove the flag list.
19254
19255 2000-05-17  Jeffrey Stedfast  <fejj@stampede.org>
19256
19257         * providers/smtp/camel-smtp-transport.c: (smtp_helo): Error
19258         checking on gethostbyaddr() eliminating a possible segfault.
19259
19260 2000-05-16  NotZed  <NotZed@HelixCode.com>
19261
19262         * providers/mbox/camel-mbox-folder.c (mbox_delete_message_by_uid):
19263         Implement.
19264
19265 2000-05-12  NotZed  <NotZed@HelixCode.com>
19266
19267         * camel-movemail.c (camel_movemail): Open the destination with
19268         O_APPEND, so we dont blow away a partially transferred mbox.
19269         (camel_movemail): Loop if we get errno=INTR, and not fail.
19270
19271 2000-05-11  NotZed  <NotZed@HelixCode.com>
19272
19273         * providers/mbox/camel-mbox-summary.c (summary_rebuild): Update
19274         the summarised file size, if everything went ok.
19275         (camel_mbox_summary_expunge): Clear header flags after updating.
19276
19277 2000-05-16  Chris Toshok  <toshok@helixcode.com>
19278
19279         * providers/nntp/camel-nntp-folder.c:
19280         * providers/nntp/camel-nntp-folder.h:
19281         * providers/nntp/camel-nntp-provider.c: 
19282         * providers/nntp/camel-nntp-store.c: 
19283         * providers/nntp/camel-nntp-utils.c: 
19284         * providers/nntp/camel-nntp-utils.h: 
19285         get things working with new camel summary stuff.
19286
19287         * providers/nntp/camel-nntp-summary.c: 
19288         * providers/nntp/camel-nntp-summary.h: 
19289         removed files since camel-folder-summary does all we need.
19290
19291 2000-05-15  Jeffrey Stedfast  <fejj@stampede.org>
19292
19293         * providers/smtp/camel-smtp-transport.c: Added some preliminary
19294         AUTH support.
19295
19296 2000-05-15  Dan Winship  <danw@helixcode.com>
19297
19298         * camel-folder.h: Remove camel_folder_get_summary, which no longer
19299         exists.
19300
19301 2000-05-11  Dan Winship  <danw@helixcode.com>
19302
19303         * Makefile.am: remove some cruft that we're not currently using.
19304
19305         * camel-stream-mem.c (camel_stream_mem_new_with_buffer): Change
19306         to match prototype (size_t vs unsigned int) so it works on 64-bit
19307         machines. Noted by msw.
19308
19309 2000-05-11  NotZed  <NotZed@HelixCode.com>
19310
19311         * providers/mbox/camel-mbox-folder.c (message_changed): Indicate
19312         the summary changed also.
19313
19314 2000-05-11  Jeffrey Stedfast  <fejj@stampede.org>
19315
19316         * providers/smtp/camel-smtp-transport.c: (smtp_helo): 
19317         Updated to more closely comply with RFC 821 standards
19318
19319 2000-05-11  NotZed  <NotZed@HelixCode.com>
19320
19321         * camel-mime-part.c (write_to_stream): Unref the filter after
19322         adding it to the filtering stream.
19323
19324         * providers/mbox/camel-mbox-summary.c
19325         (camel_mbox_summary_finalise): Free the folder path.
19326         (camel_mbox_summary_update): Also save summary when done.
19327         (camel_mbox_summary_expunge): Unindex items when deleting them.
19328         (camel_mbox_summary_expunge): Save the index as well as the
19329         summary.
19330
19331         * camel-folder-summary.c (camel_folder_summary_finalise): Free the
19332         summary path.
19333         (camel_folder_summary_touch): New function, indicate the summary
19334         info changed.
19335         (camel_folder_summary_remove): Dirty here.
19336
19337         * camel-internet-address.c (internet_decode): Free multiple entry
19338         addresses properly.
19339
19340         * camel-mime-utils.c (header_decode_mailbox): Plugged another
19341         memleak, free text after converting it.
19342         (header_decode_addrspec): More leaks plugged.
19343
19344         * camel-mime-message.c (finalize): Free message_uid.
19345         (finalize): Free the recipients hashtable.
19346
19347 2000-05-11  NotZed  <notzed@helixcode.com>
19348
19349         * camel-folder-summary.c (camel_folder_summary_finalise): Free
19350         summary items and charset filters.
19351
19352 2000-05-10  NotZed  <notzed@helixcode.com>
19353
19354         * camel-folder-summary.c (camel_folder_summary_finalise): Don't
19355         free stuff in p, after we've free'd p.
19356
19357         * providers/mbox/camel-mbox-folder.c (mbox_append_message): Unref
19358         the stream we created for appending.
19359
19360 2000-05-10  Jeffrey Stedfast  <fejj@stampede.org>
19361
19362         * providers/smtp/camel-smtp-transport.c: (camel_smtp_transport_class_init):
19363         Added initialization for service_class
19364
19365 2000-05-10  Dan Winship  <danw@helixcode.com>
19366
19367         * camel-multipart.c (write_to_stream): fix a stupid typo. Thank
19368         you, C.
19369
19370         * camel-mime-part.c (write_to_stream): don't ref the stream before
19371         wrapper a filter around it, since nothing will ever unref it.
19372
19373 2000-05-10  Christopher James Lahey  <clahey@helixcode.com>
19374
19375         * Makefile.am: Added camel-types.h, camel-folder-pt-proxy.h, and
19376         camel-thread-proxy.h.
19377
19378 2000-05-09  Dan Winship  <danw@helixcode.com>
19379
19380         * providers/sendmail/camel-sendmail-transport.c (_send_internal):
19381         Bleah. Can't fsync a pipe. As a quick kludge, just don't
19382         stream_flush it. The right fix will require bringing back
19383         stream_close though.
19384
19385 2000-05-09  Jeffrey Stedfast  <fejj@stampede.org>
19386         * camel-internet-address.[c,h]: Undid my changes (moved
19387         struct _address back into came-internet-address.c)
19388         * providers/smtp/camel-smtp-transport.c: (_send): changed
19389         from using it's own address manipulation (using struct _address)
19390         to using camel_internet_address_get(). Also some format changes
19391         to keep consistant with the rest of Camel
19392
19393 2000-05-09  Jeffrey Stedfast  <fejj@stampede.org>
19394
19395         * camel-internet-address.[c,h]: Moved struct _address from
19396         camel-internet-address.c to camel-internet-address.h
19397         (hopefully this doesn't break anything...)
19398         * providers/smtp/camel-smtp-transport.c: (_send): now
19399         populates the recipient list with To, Cc, and Bcc addresses.
19400         Should now be able to use this module.
19401
19402 2000-05-09  Dan Winship  <danw@helixcode.com>
19403
19404         * providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid):
19405         one more refcounting fix I missed before.
19406
19407 2000-05-08  Jeffrey Stedfast  <fejj@stampede.org>
19408
19409         * providers/smtp/camel-smtp-transport.c: no longer frees memory it
19410         shouldn't, updated to reflect camel-stream changes involving
19411         CamelException (perhaps it should use a different CamelException
19412         variable than is passed to the camel smtp module?)
19413
19414 2000-05-08  Dan Winship  <danw@helixcode.com>
19415
19416         * camel-stream.c (camel_stream_read, camel_stream_write,
19417         camel_stream_flush, camel_stream_reset, camel_stream_printf,
19418         camel_stream_write_to_stream): Use CamelException to signal
19419         failure.
19420         (camel_stream_write_strings): Remove. camel_stream_printf is more
19421         useful in most of the places that used this.
19422         (camel_stream_write_string): Change from macro to function to
19423         prevent problems with double-evaluation.
19424
19425         * camel-seekable-stream.c (camel_seekable_stream_seek,
19426         camel_seekable_stream_set_bounds): Use CamelException.
19427         (reset): Update.
19428
19429         * camel-seekable-substream.c, camel-stream-buffer.c,
19430         camel-stream-filter.c, camel-stream-fs.c, camel-stream-mem.c:
19431         Update.
19432
19433         * camel-stream-fs.c: Remove the virtual init functions and move
19434         the code into the creator functions. Add CamelExceptions to
19435         creation functions that could fail.
19436
19437         * camel-data-wrapper.c (camel_data_wrapper_write_to_stream): Use
19438         CamelException.
19439         * camel-mime-message.c, camel-mime-part.c, camel-multipart.c
19440         (write_to_stream): Update.
19441
19442         * camel-mime-parser.c: add an exception to the mime parser private
19443         data and pass that to stream functions as needed.
19444         
19445         * gmime-content-field.c, md5-utils.c: Update (badly) for stream
19446         changes.
19447         
19448         * camel-exception.h (camel_exception_is_set): convenience macro.
19449
19450         * providers/Makefile.am: disable SMTP for now
19451
19452         * providers/mbox/camel-mbox-folder.c (mbox_append_message): Pass
19453         CamelException to the functions that now need it. Check the
19454         exception after calling camel_stream_flush, and fail if it fails.
19455         (mbox_get_message_by_uid): More updates.
19456
19457         * providers/pop/camel-pop3-folder.c,
19458         providers/pop/camel-pop3-store.c,
19459         providers/sendmail/camel-sendmail/transport.c: Update.
19460
19461
19462 2000-05-08  NotZed  <NotZed@HelixCode.com>
19463
19464         * camel-mime-message.c (process_header): Format From and Reply-To
19465         to at least a decoded string.  Should probably store them as an
19466         camelinternetaddress.
19467
19468         * Merged NEW_SUMMARY branch back to trunk, and resolved conflicts.
19469         
19470         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_update):
19471         Return status.
19472         (camel_mbox_summary_expunge): Force an update of the summary
19473         before we do anything.
19474         (camel_mbox_summary_expunge): Build new xev line in xevnew, and
19475         free that, and consify xev.
19476         (camel_mbox_summary_load): If we are rebuilding from scratch, make
19477         sure we clear the summary content.
19478
19479         * camel-stream-filter.c (do_close): We NEED a stream close.
19480
19481 2000-05-07  Dan Winship  <danw@helixcode.com>
19482
19483         Make camel not leak like a sieve.
19484
19485         * camel-object.c: New subclass of GtkObject which is now the base
19486         of the Camel object hierarchy. Currently the only difference
19487         between CamelObject and GtkObject is that CamelObjects don't start
19488         out floating.
19489
19490         * *.h: Move a bunch of typedefs to camel-types.h. Standardize on
19491         using <camel/foo.h> in header files rather than <foo.h>, "foo.h",
19492         or "camel/foo.h". Remove some unneeded includes.
19493
19494         * camel-address.c, camel-data-wrapper.c, camel-folder-search.c,
19495         camel-folder-summary.c, camel-folder.c, camel-mime-filter.c,
19496         camel-mime-parser.c, camel-service.c, camel-session.c,
19497         camel-stream.c: These are now subclasses of CamelObject.
19498
19499         * camel-data-wrapper.c (set_output_stream):
19500         * camel-medium.c (set_content_object):
19501         * camel-seekable-substream.c
19502         (init_with_seekable_stream_and_bounds):
19503         * providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid): 
19504         remove gtk_object_sink calls.
19505
19506         * camel-stream-buffer.c (init_vbuf): 
19507         * camel-stream-filter.c (camel_stream_filter_new_with_stream):
19508         ref the original stream.
19509
19510         * camel-folder-summary.c (camel_folder_summary_finalise): unref
19511         the filters when finalizing.
19512
19513         * camel-mime-part-utils.c
19514         (simple_data_wrapper_construct_from_parser,
19515         camel_mime_part_construct_content_from_parser):
19516         * camel-mime-part.c (camel_mime_part_set_content): Unref objects
19517         that are created only to be handed off to other objects. If
19518         they're going to be needed later, they will have been additionally
19519         ref'ed by the object that needs them.
19520
19521         * providers/pop3/camel-pop3-folder.c (get_message_by_number):
19522         unref the message stream after creating the data from it.
19523
19524         * camel-stream.c, camel-stream-buffer.c, camel-stream-filter.c,
19525         camel-stream-fs.c, camel-stream-mem.c: Remove camel_stream_close,
19526         since its semantics are dubious (what happens when you close a
19527         stream other people still have references on?).
19528
19529         * providers/nntp/camel-nntp-store.c:
19530         * providers/smtp/camel-smtp-transport.c:
19531         * providers/pop3/camel-pop3-store.c:
19532         replace camel_stream_close calls with gtk_object_unref.
19533
19534         * providers/mbox/camel-mbox-folder.c:
19535         * providers/nntp/camel-nntp-folder.c:
19536         * providers/sendmail/camel-sendmail-transport.c:
19537         replace camel_stream_close with camel_stream_flush +
19538         gtk_object_unref
19539
19540 2000-05-06  Dan Winship  <danw@helixcode.com>
19541
19542         * providers/pop3/camel-pop3-store.c (query_auth_types): A machine
19543         which serves neither POP nor KPOP is not a POP server.
19544
19545         * providers/smtp/camel-smtp-provider.c: Note in the description
19546         that this provider is not yet tested.
19547
19548 2000-05-08  NotZed  <notzed@helixcode.com>
19549
19550         * camel-mime-part.c (write_to_stream): Free the filter stream when
19551         done.
19552
19553         * camel-mime-parser.c (folder_seek): Make sure we add the \n
19554         terminal when we seek as well (frob!).
19555
19556         * camel-mime-utils.c (header_decode_addrspec): Plug minor memleak.
19557
19558         * camel-mime-part.c (finalize): Free header tables once finished.
19559
19560         * camel-folder-summary.c (camel_folder_summary_remove): Dont try
19561         to access info after its free'd.
19562
19563 2000-05-07  NotZed  <NotZed@HelixCode.com>
19564
19565         * camel-mime-part.c (write_to_stream): Apply encoding to content
19566         part, when writing to a stream *sigh*.
19567
19568         * camel-stream-filter.c (do_write): implement write for the
19569         filtering stream.  Writes shouldn't be mixed with reads.
19570         (do_flush): Implemented flush.  Again write/flush shouldn't be
19571         mixed with reads.  Only flushes if the last op was write.
19572         (do_close): Force flush on close.
19573
19574         * camel-mime-filter.c (filter_run): Oops, make sure we include the
19575         backlen in the total length before passing onto the filter.
19576
19577         * camel-mime-filter-from.c: New filter, munges 'From ' lines into
19578         '>From ', for mbox.
19579
19580         * camel-mime-parser.c (camel_mime_parser_header_remove): New
19581         function to remove the parser's raw header, rather than
19582         manipulating the header directly (wich doesn't work with
19583         mempools).
19584
19585         * camel-mime-utils.c (header_address_list_clear): Fixed some
19586         broken(tm) logic, which would leak entries on multivalued lists.
19587
19588         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_load):
19589         Use ibex_save() to save the ibex.  Makes a big difference to
19590         startup times for very large mailboxes.
19591         (camel_mbox_summary_expunge): Dum de dum, reimplemented.  Designed
19592         to be much more robust, and to stop immediately if anything awry
19593         happens.
19594         (copy_block): Utility function to copy n bytes from one fd to
19595         another.
19596         (header_write): Utility function to write out raw headers to an
19597         fd.
19598         (camel_mbox_summary_update): Incremental summary updater.
19599
19600         * providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid):
19601         Dont unref the stream, because of the broken(tm) ref model of gtk
19602         widget that for some odd reason is being perpetuated in camel.  
19603         (mbox_expunge): Reenable expunge again.
19604         (mbox_append_message): Removed the optimised mbox append.  If its
19605         an issue, it can go back later.  Cleaned up a lot, checks error
19606         returns, and automagically translates 'From ' into '>From' as
19607         necessary.
19608
19609 2000-05-07  NotZed  <notzed@helixcode.com>
19610
19611         * camel-mime-filter.c (filter_run): Oops, forgot to add the
19612         backlen to the pre-buffer (*poof*).
19613
19614 2000-05-07  NotZed  <NotZed@HelixCode.com>
19615
19616         * camel-mime-message.c (construct_from_parser): Allow
19617         HSCAN_FROM_END to terminate the processing of a message.
19618
19619         * camel-folder-summary.c (perform_content_info_load): Ick, dont
19620         try and append a node onto its own list.
19621         (camel_folder_summary_clear): Actually clear the indexes after
19622         we've removed the messages.
19623         (camel_folder_summary_clear): Set dirty if it changes.
19624         (camel_folder_summary_load): Clear dirty.
19625         (camel_folder_summary_save): Only save if dirty.
19626
19627         * providers/mbox/camel-mbox-summary.c (summary_header_load): Oops,
19628         remember to call that parent class first ...
19629         (summary_header_save): Here too.
19630         (camel_mbox_summary_load): Do more checking to verify the index
19631         contents as well as teh summary contents, against the mbox
19632         contents.
19633         (camel_mbox_summary_load): Removed some fo that checking, it needs
19634         more code to work reliably.
19635
19636 2000-05-07  NotZed  <notzed@helixcode.com>
19637
19638         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_load):
19639         Set the size and mtime of the mbox we indexed once done.
19640
19641         * camel-folder-summary.c (camel_folder_summary_set_index): Dont
19642         write the index if it changes - let the claler fix it (uh, kind of
19643         impacts performance).
19644         (camel_folder_summary_load): close in.
19645
19646         * camel-folder-summary.c (summary_format_string): Check header
19647         exists before trying to strip its leading spaces.
19648
19649 2000-05-06  NotZed  <NotZed@HelixCode.com>
19650
19651         * camel-folder.h: Removed summary info from here, and include
19652         camel-folder-summary.h as well.
19653         
19654         * camel-mime-parser.c (camel_mime_parser_step): Allow it to accept
19655         a NULL databuffer.
19656
19657         * providers/mbox/camel-mbox-summary.c: Totally new file, now
19658         subclasses camel-folder-summary.
19659
19660         * camel-folder-summary.c (message_info_load): Load the uid as a
19661         string.
19662         (message_info_save): And save too.
19663         (camel_folder_summary_clear): New function, clears the contents of
19664         the summary.
19665
19666         * providers/mbox/camel-mbox-folder.c: Fixes for summary changes.
19667         (mbox_get_message_by_uid): Completely redone.  Now cross-checks
19668         the summary information to make sure we get a real message.
19669         (mbox_append_message): Disabled the copy version of append for
19670         now.
19671         (mbox_expunge): Temporarily disabled the expunge function, until
19672         it is put back in camel-mbox-summary.c
19673
19674 2000-05-05  NotZed  <NotZed@HelixCode.com>
19675
19676         * camel-folder-summary.c: And same here ...
19677         (camel_folder_summary_encode_fixed_int32): Ugh, fwrite doesn't
19678         return -1 on error ..
19679         (camel_folder_summary_decode_fixed_int32): Neither deos fread.
19680         (camel_folder_summary_encode_token): Fix here too.
19681         (summary_build_content_info): Use start-headers to get the pos of
19682         the message, not parser_tell(), which might not be what we
19683         expected because of parser_unstep().
19684         (camel_folder_summary_encode_token): Use bserch() to tokenise the
19685         values, rather than a linear search.
19686
19687         * camel-mime-utils.c: Defined out some memory profiling stuff I
19688         left there by mistake.
19689         (header_decode_mailbox): Dont try to append the word part of a
19690         local address if we ran out of words.
19691
19692         * camel-mime-parser.c (folder_scan_content): Apply the fix from
19693         the header scanner to here too.
19694         (folder_scan_header): Only check for end of header if we have
19695         space for it (didn't end the read with a newline)
19696         (folder_scan_header): inptr is the only real thing we need
19697         registerised for performance.  Try to help the compiler be smart
19698         about it ..
19699         (folder_scan_header): Simplified the save header case a tad.
19700
19701         Commented out some memory profiling stuff.
19702
19703 2000-05-05  NotZed  <notzed@helixcode.com>
19704
19705         * camel-mime-utils.c (header_decode_mailbox): Plug a memory leak.
19706         (header_decode_text): Fixed memory leaks with g_string_append().
19707         (header_encode_string): And here too, and a few other places.  The
19708         glib api is so awful ...
19709         (header_content_type_decode): More memory leaks.
19710
19711 2000-05-05  NotZed  <notzed@helixcode.com>
19712
19713         * camel-mime-parser.c (folder_scan_init_with_fd): Make sure we
19714         init the end of buffer sentinal!
19715         (folder_scan_init_with_stream): And here too ...
19716
19717 2000-05-04  NotZed  <NotZed@HelixCode.com>
19718
19719         * providers/mbox/camel-mbox-folder.c (summary_get_message_info):
19720         Maxcount is minimum of the max and the requested count, not the
19721         maximum :)
19722
19723         * camel-mime-parser.c (folder_scan_content): Properly set midline,
19724         so we dont falsely catch offset boundary markers (i.e. From inside
19725         content).
19726         (folder_read): Set a sentinal on the end of the read data (\n) so
19727         we dont have to check the buffer boundary in the inner loop.
19728         (mempool_*): New experimental memory management routines, speed
19729         up simple structure parsing by about 25% ... not compiled in by
19730         default.  Something similar may be needed for camel-mime-utils to
19731         address performance issues with g_malloc and friends.
19732
19733         * camel-mime-utils.c: Added a macro w(x) used to wrap all warnings
19734         about mime/rfc violations, so they can be turned off.
19735
19736         * camel-folder-summary.c (summary_build_content_info): Step after
19737         the end of a message ...
19738         Turn into a stand-alone program for testing and profiling.
19739
19740 2000-05-04  Dan Winship  <danw@helixcode.com>
19741
19742         * providers/pop3/camel-pop3-store.c (pop3_connect): Don't fall
19743         back to plaintext passwords if APOP fails, since it should also
19744         fail.
19745
19746 2000-05-04  Dan Winship  <danw@helixcode.com>
19747
19748         * camel-session.c (camel_session_list_providers): New function to
19749         replace camel_provider_scan. Returns a list of either (a) all
19750         currently-loaded providers, or (b) all available providers.
19751
19752         * camel-url.[ch]: Add an "empty" flag to CamelURL (indicating that
19753         it contains only a protocol).
19754
19755         * camel-service.c (camel_service_query_auth_types): Make this take
19756         a CamelException (since it may have to try to connect to the
19757         server, and it might not able to.)
19758
19759         * providers/pop3/camel-pop3-store.c: add KPOP (Kerberized POP)
19760         support. This is mostly so I have two kinds of authmech to play
19761         with instead of just one. (But it does actually work.)
19762
19763         * providers/smtp/camel-smtp-transport.c (query_auth_types): update
19764         for prototype change, but disable the functionality, since it
19765         doesn't really support any auth types yet.
19766         (camel_smtp_transport_get_type): add an object init function to
19767         set the service url_flags.
19768
19769 2000-05-04  NotZed  <NotZed@HelixCode.com>
19770
19771         * providers/mbox/camel-mbox-summary.c: Yes, and anotherone.
19772
19773         * camel-mime-utils.c: And another one.
19774
19775         * camel-mime-part.c: And another one.
19776
19777         * camel-mime-part-utils.c: And another one.
19778
19779         * camel-folder-search.c: And another one.
19780
19781         * camel-mime-parser.c: Reverted a change wihtout a ChangeLog entry.
19782
19783 2000-05-04  NotZed  <NotZed@HelixCode.com>
19784
19785         * camel-folder-summary.[hc]: Yes, CamelFolderSummary is back ...
19786         ... re-usable class to summarise and index any stream or message
19787         and to manage/load/save the created summaries.
19788         
19789         * camel-folder.c: Include string.h to kill a warning.
19790
19791 2000-05-03  Jason Leach  <leach@wam.umd.edu>
19792
19793         * Makefile.am (INCLUDES): add $(UNICODE_CFLAGS) to the INCLUDES,
19794         people who installed libunicde in non-standard include paths need
19795         this.
19796
19797 2000-05-03  NotZed  <NotZed@HelixCode.com>
19798
19799         * camel-folder.h: Added pos/bodypos/endpos to the basic message
19800         content info object.  Size to be removed?  Moved the
19801         messageconentinfo and messageinfo back to camel-folder-summary.h.
19802
19803         * camel-mime-filter-index.c (camel_mime_filter_index_set_ibex):
19804         New function to (re)set the index to use on a filter.
19805
19806         * camel-mime-parser.c (camel_mime_parser_scan_from): Whole bunch
19807         of inline docs.
19808         (camel_mime_parser_drop_step): New function to drop a state from
19809         the parser.  Needs more testing.
19810
19811         * camel-mime-utils.c (rfc2047_decode_word): If the iconv handle is
19812         -1, then dont try and convert (crashes unicode_iconv?).
19813         (rfc2047_decode_word): Use alloca for variables instead of
19814         g_malloc - by the rfc they should always be short.
19815         (rfc2047_decode_word): If we can't do the charset conversion, undo
19816         the quoted-printable/base64 at least?  Should probably convert
19817         unknown characters to the utf-8 unknown character.
19818
19819 2000-05-02  Larry Ewing  <lewing@helixcode.com>
19820
19821         * camel-mime-utils.c (header_decode_date): fix typo when
19822         dereferencing saveoffset.
19823
19824 2000-05-02  NotZed  <NotZed@HelixCode.com>
19825
19826         * camel-folder-search.c: Added some header doco.
19827
19828         * camel.h: REmove gmime-utils.h from here.
19829
19830         * providers/mbox/camel-mbox-search.[ch]: Removed.  Functionally
19831         redundant.
19832
19833         * providers/mbox/camel-mbox-folder.c (mbox_search_by_expression):
19834         Use the new CamelFolderSearch class to do the actual searching,
19835         just setup the search here.
19836
19837         * camel-folder-search.[ch]: A helper class that providers may
19838         subclass to provide their own search functionality, or they can
19839         simply use as is, it supports body searches if an ibex is
19840         supplied, and header searches if a summary is supplied.
19841
19842 2000-05-02  Matt Loper  <matt@helixcode.com>
19843
19844         * Makefile.am: set G_LOG_DOMAIN.
19845         * providers/MH/Makefile.am: same.
19846         * providers/maildir/Makefile.am: same.
19847         * providers/mbox/Makefile.am: same.
19848         * providers/nntp/Makefile.am: same.
19849         * providers/pop3/Makefile.am: same.
19850         * providers/sendmail/Makefile.am: same. 
19851         * providers/smtp/Makefile.am: same.             
19852
19853 2000-05-02  NotZed  <NotZed@HelixCode.com>
19854
19855         * providers/mbox/camel-mbox-search.c
19856         (camel_mbox_folder_search_by_expression): Dont store/remove
19857         current search from the search list.
19858         
19859         * providers/mbox/camel-mbox-folder.h: Removed searches list,
19860         searches are all sync now.
19861
19862         * gmime-utils.[ch]: What the hell, remove it.  This will break the
19863         nntp provider.  The mime parser can be used instead though.
19864         Removed from all code including it (but none were using it).
19865
19866         * gmime-utils.c (_store_header_pair_from_string): Removed bizarre
19867         string_dichotomy version of this.  This code is somewhat redundant
19868         now, and is headed for death anyway.
19869
19870         * gstring-util.c (g_string_dichotomy): Same with this one.
19871         (g_string_clone): Removed a memory leak, g_string_new() allocates
19872         its own memory.
19873         (g_string_append_g_string): Allow to append an empty gstring onto
19874         another gstring, dont abort()!
19875
19876         * string-utils.c (string_dichotomy): Removed this incredibly weird
19877         function.
19878
19879         * camel-folder.c (_create): Replaced the rather obtuse use of
19880         "string_dichotomy" function with a simple strrchr().  Still not
19881         sure it'll work.
19882
19883         * camel-folder-summary.c: cvs removed a long-removed file.
19884
19885         * camel-mime-parser.c (folder_scan_header): Fix the previous
19886         overflow problem properly (can happen in 2 places).
19887         (header_append): A new macro to include the code changed above, so
19888         it only appears in one place.
19889         (folder_scan_step): Change the content type to text/plain if the
19890         multipart is broken.  Doesn't actually change the header though.
19891         (header_append): Also move the header-start tracking stuff here.
19892         Could be a static function to save code.
19893
19894 2000-05-02  NotZed  <notzed@helixcode.com>
19895
19896         * camel-mime-part-utils.c
19897         (simple_data_wrapper_construct_from_parser): Dont use autofill on
19898         these fucking long function anmes!!!!!!
19899
19900 2000-05-02  NotZed  <NotZed@HelixCode.com>
19901
19902         * providers/mbox/camel-mbox-summary.c
19903         (camel_mbox_summary_expunge): Fix the offset for the summary when
19904         an item is expunged to take account of the From line.
19905
19906 2000-05-01  NotZed  <NotZed@HelixCode.com>
19907
19908         * providers/mbox/camel-mbox-folder.h (CamelMboxFolder): Removed
19909         search_id.
19910
19911         * providers/mbox/camel-mbox-search.c
19912         (camel_mbox_folder_search_cancel): Remove.d
19913         (camel_mbox_folder_search_complete): Removed.
19914         (camel_mbox_folder_search_by_expression): Changed back to sync
19915         api.
19916         (struct _searchcontext): Removed cancelled flag.
19917         (find_context): Removed.
19918         (func_header_contains): Debug out some search stuff.
19919
19920         * providers/mbox/camel-mbox-search.h
19921         (camel_mbox_folder_search_by_expression): Moved back to sync api.
19922
19923         * providers/mbox/camel-mbox-summary.c
19924         (camel_mbox_summary_set_flags_by_uid): New function to update the
19925         flags in the summary.
19926         (camel_mbox_summary_expunge): Expunge messages from a folder.
19927         (offset_content): Re-align offsets of summary when messages
19928         added/removed to an existing summary.
19929         (camel_mbox_summary_remove_uid): Remove a message summary entry by
19930         uid.
19931         (index_folder): Restore flags from X-Evolution header, if they are set.
19932         (index_folder): Make sure we index using a decimal uid, since
19933         thats what everything else indexes off (oops).
19934         Upped SUMMARY_VERSION as a result.
19935         (camel_mbox_summary_expunge): Oops, my wrong, use the string uid
19936         to unindex on.
19937
19938         * providers/mbox/camel-mbox-folder.c (_get_message_by_uid):
19939         Connect to the message_changed signal.
19940         (_init): Set permanent flags to something reasonable.  No user
19941         flags yet ...
19942         (message_changed): If the flags of the message change, update the
19943         flags in the summary.
19944         (mbox_expunge): Implement the expunge.
19945         (camel_mbox_folder_class_init): Renamed all leading _'s to mbox_'s
19946         (mbox_expunge): Emit a folder_changed signal on expunge (uh, even
19947         if it didn't ...)
19948
19949         * camel-folder.c (_finalize): Uh, dont free permanent_flags
19950         anymore (this wouldn't failed anyway, it was a GList !!!)
19951         (camel_folder_search_complete): Removed.
19952         (camel_folder_search_cancel): Removed.
19953         (camel_folder_expunge): Changed to only allow expunge on an open
19954         folder.  It doesn't make sense for mbox, otherwise (?)
19955         (camel_folder_class_init): Added a folder_changed signal.
19956
19957         * camel-folder.h (struct _CamelFolder): Change permanent_flags to
19958         a bitfield.
19959         (list_permanent_flags): Renamed to get_permanent_flags, and
19960         returns a bitfield.
19961         (camel_folder_expunge): Changed expunge to a void type.  The
19962         messages would no longer be useful after they have been removed
19963         ...
19964         (CamelFolderClass): New function summary_get_by_uid() to get a single
19965         summary.
19966         (*search*): Moved back to synchronous search api ... *sigh*
19967         
19968         * camel-folder.h: Removed CamelSearchFunc.
19969
19970         * camel-mime-message.c (set_flag): Removed.
19971         (camel_mime_message_set_flag): Removed.
19972         (get_flag): Removed.
19973         (camel_mime_message_get_flag): Removed.
19974         (add_flag_to_list): Removed.
19975         (get_flag_list): Removed.
19976         (camel_mime_message_get_flag_list): Removed.
19977         (camel_mime_message_get_flags): New interface to get system flags.
19978         (camel_mime_message_set_flags):  " to set ".
19979         (camel_mime_message_get_user_flag): To get a user flag.
19980         (camel_mime_message_set_user_flag): To set a user flag.
19981         (finalize): Hmm, the old one free'd the key and data, not good
19982         when the data is a boolean ...
19983
19984 2000-04-30  Dan Winship  <danw@helixcode.com>
19985
19986         * camel-provider.h: Tweak the definition of CamelProvider. Among
19987         other things, a provider may now be both a store and a transport.
19988
19989         * camel-provider.c: Remove a lot of code we had no intention of
19990         using. This now only contains two functions: camel_provider_init
19991         to read the installed .urls files, and camel_provider_load to
19992         load and register a new provider.
19993
19994         * camel-session.c: Remove more unused code and simplify some of
19995         the remaining code. The list of available provider modules is now
19996         stored in the session, and it handles calling camel_provider_load
19997         to load them as needed. Provider registration is now done by
19998         calling back from the module init routine, which allows a single
19999         module to register providers for multiple URL types.
20000
20001         * providers/*: Update provider structures and init routines for
20002         the new stuff. Add a .urls file to each provider specifying what
20003         urls it handles, and install that with the library.
20004
20005         * providers/nntp/camel-nntp-provider.c: Add hints towards
20006         supporting both news: and nntp: URLs, and using nntp as both a
20007         store and a transport.
20008
20009 2000-04-29  Dan Winship  <danw@helixcode.com>
20010
20011         * camel-internet-address.c (camel_internet_address_get): const
20012         poison
20013
20014         * camel-mime-part-utils.c
20015         (simple_data_wrapper_construct_from_parser):
20016         camel_mime_parser_tell() returns an offset from where it started
20017         parsing, not necessarily from the start of data. Since we're
20018         parsing a bounded seekable_stream, we need to add the stream's
20019         starting bound to camel_mime_parser_tell's return value to
20020         create the substream in the right place.
20021
20022         * camel-seekable-substream.c
20023         (camel_seekable_substream_new_with_seekable_stream_and_bounds):
20024         say CAMEL_STREAM_UNBOUND rather than -1 in doc.
20025
20026         * camel-seekable-stream.c (camel_seekable_stream_seek): Add more
20027         info to docs.
20028
20029 2000-04-28  Dan Winship  <danw@helixcode.com>
20030
20031         * camel-mime-parser.c (folder_scan_header): fix a bug that would
20032         cause corruption with very long headers.
20033
20034 2000-04-27  Ettore Perazzoli  <ettore@helixcode.com>
20035
20036         * providers/pop3/Makefile.am (INCLUDES): Add `-I$(srcdir)/../../..'
20037         to pick the Camel includes.
20038         * providers/sendmail/Makefile.am (INCLUDES): Likewise.
20039
20040         * camel.h: Don't #include <camel/data-wrapper-repository.h> anymore.
20041
20042 2000-04-27  NotZed  <NotZed@HelixCode.com>
20043
20044         * camel-mime-utils.c (check_header): Dont try and check a NULL
20045         header.
20046
20047         * camel-recipient.[ch]: Dead.  Its not pining.
20048
20049         * camel-mime-message.h: Dont include recipients.h anymore.
20050
20051         * camel-mime-message.c (camel_mime_message_add_recipient): Accept
20052         name/address separately, and store in an CamelInternetAddress.
20053         (add_recipient): Removed.
20054         (remove_recipient): Removed.
20055         (remove_recipient_address): Renamed from remove_receipient, works
20056         via address.
20057         (camel_mime_message_remove_recipient_name): New function to remove
20058         by name.
20059         (get_recipients): Removed.
20060         (camel_mime_message_get_recipients): Return a camel-internet-address.
20061         (write_to_stream): No longer write receipients directly.
20062         (write_recipients_to_stream): Removed.
20063         (write_one_recipient_to_stream): Removed.
20064         (camel_mime_message_init): Setup recipients hashtable, rather than
20065         usign the recipients stuff.
20066         (set_recipient_list_from_string): Killed, a violent and lengthy
20067         death.
20068         (process_header): Simplified recipient handling code a lot.
20069         (received_date_str, sent_date_str, reply_to_str, subject_str,
20070         from_str): Removed some oddly-defined global statics.
20071         (camel_mime_message_class_init): Dont initialise above variables
20072         anymore.
20073         (init_header_name_table): Removed, use a table to init this, and
20074         do it in class init (2 lines of code ...).
20075
20076         * camel-news-address.c: Class to represent news addresses -
20077         currently empty, and not built.
20078
20079         * camel-internet-address.h: Class to represent internet (email)
20080         addresses.
20081
20082         * camel-address.h: Abstract class to represent (lists of)
20083         addresses.
20084
20085 2000-04-27  Dan Winship  <danw@helixcode.com>
20086
20087         * camel-mime-part.c (write_to_stream): Revert previous change. I
20088         was confused.
20089
20090         * camel-url.[ch] (camel_url_encode, camel_url_decode): expose
20091         these routines.
20092
20093 2000-04-26  Dan Winship  <danw@helixcode.com>
20094
20095         * camel-mime-part.c (write_to_stream): Only write a newline
20096         between the headers and the content object if the content object
20097         is not a CamelMedium. (If the content is a medium, it may have its
20098         own headers, which then need to go before the blank line.)
20099
20100         * camel-mime-body-part.[ch]: Remove. We weren't using the fields
20101         that made this different from camel-mime-part, so it basically
20102         just forced us to do lots of gratuitous typecasting.
20103
20104         * camel-multipart.[ch]: Use CamelMimePart. Remove the multipart
20105         parent stuff, since we weren't using that either.
20106
20107         * etc: update for CamelMimeBodyPart -> CamelMimePart
20108
20109 2000-04-26  Dan Winship  <danw@helixcode.com>
20110
20111         * camel-medium.c (set_content_object): sink the content object
20112         after referencing it.
20113
20114         * camel-mime-part.c: fix various little things in the handling
20115         of CamelMedium methods. Change camel_mime_part_set_text to the
20116         more generic camel_mime_part_set_content.
20117
20118         * camel.h: sync to current reality
20119
20120         * camel-folder-utils.[ch]: removed
20121
20122         * camel-mime-utils.c (header_format_date): fix format specifier
20123         for time zone. Fix typo in month names array.
20124
20125 2000-04-26  NotZed  <NotZed@HelixCode.com>
20126
20127         * camel-seekable-substream.c (stream_seek): Changed to have
20128         absolute seek semantics, not relative to the bounds.
20129
20130         * camel-seekable-stream.c (reset): When we reset, seek to the
20131         start of the bound, if there is one.
20132         (stream_tell): Make tell virtual.
20133
20134         * camel-stream-filter.c (do_available): Removed.
20135
20136         * camel-stream-buffer.c: Remove leading _'s from static functions.
20137         (stream_read): Renamed from read().  Fancy that conflicting!  (my
20138         boo!)  Others too.
20139
20140         * providers/pop3/camel-pop3-folder.c (get_message_by_number):
20141         Changed to stream_mem interface.
20142
20143         * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): Fixed
20144         for streamfs interface changes, and implement a failure case.
20145         (_append_message): Changed for fs stream interface change.
20146
20147         * camel-multipart.c (print_part): Iterate rahter than callback.  I
20148         hate glists's interface (hence, move this to write_to_stream).
20149         (write_to_stream): Return an error (yuck, this is a royal PITA to
20150         do with the stream write interface).
20151
20152         * camel-mime-message.c: Removed leading _ from static names.
20153
20154         * camel-mime-part.h: construct_from_parser() now returns an error
20155         code.
20156
20157         * camel-mime-part-utils.c
20158         (camel_mime_part_construct_content_from_parser): Changed to use a
20159         camel-data-wrapper instead of a camel-simple-data-wrapper (no
20160         change needed elsewhere?).
20161         (simple_data_wrapper_construct_from_parser): Fixes for stream-mem
20162         interface changes.
20163
20164         * camel-simple-data-wrapper.[ch],
20165         camel-simple-data-wrapper-stream.[ch],
20166         camel-stream-data-wrapper.[ch], removed.  Fixed including of these
20167         files.
20168         
20169         * camel-mime-part.c (camel_mime_part_set_text): Remove the use of
20170         the camel-simple-data-wrapper-stream, just use a mem stream.
20171         (write_to_stream): Renamed from my_*
20172         (construct_from_stream): Return an error on error.
20173
20174         * camel-stream-mem.c (camel_stream_mem_new*): Remove mode
20175         parameter.
20176
20177         * camel-stream-mem.h (enum CamelStreamMemMode): Removed.  It
20178         wasn't used at all.
20179
20180         * camel-data-wrapper.h: Add camel_data_wrapper_new() to create
20181         these.
20182         (write_to_stream, construct_from_stream): Return an error
20183         indicator for success.  Fixed all methods to match (ICK).
20184
20185         * Makefile.am (libcamel_la_SOURCES): Remove
20186         camel-simple-data-wrapper.c, camel-simple-data-wrapper-stream.c,
20187         camel-stream-data-wrapper.c.  Obsoleted by code re-use!
20188
20189         * camel-data-wrapper.c (construct_from_stream): Change the default
20190         implementation to just set the output stream == construction
20191         stream.  Well, this lets me get rid of both simple-data-wrapper
20192         and stream-data-wrapper (unused anyway), and
20193         simple-data-wrapper-stream in one hit.  CamelDataWrapper is now
20194         also a concrete class.
20195         (write_to_stream): Use camel_stream_write_to_stream() to
20196         calculate/return values (and save code).
20197         Include <errno.h> for obvious reasons.
20198
20199         * camel-stream.c (eos): Provide a default implementation of .eos().
20200         (camel_stream_write_to_stream): Make it return an error code on
20201         error.
20202         (camel_stream_printf): Changed to return the number of bytes
20203         written/error.
20204         (camel_stream_available): Removed.
20205
20206         * camel-stream-fs.h (enum CamelStreamFsMode): Removed.  Changed to
20207         use unix modes and so forth (wasn't used for anything but new file
20208         creation and didn't work well either).
20209
20210         * camel-stream-fs.c: Removed leading _'s for names.  And removed
20211         some virtual method 'documentation'.
20212         (destroy): Dont try and close a closed/error fd.  Only report
20213         error if close returns -1.  Moved all the code to finalise(), and
20214         killed this function.
20215         (init_with_fd): Properly setup the seek offset, if it is a
20216         valid and seekable file descriptor.
20217         (init_with_fd_and_bounds): Use off_t for bounds, set bounds on the
20218         seekable stream.
20219         (init_with_name): Return error codes.
20220         (init_with_name_and_bounds): Ditto.
20221         (camel_stream_fs_new_with_name): REturn NULL object if it failed.
20222         (camel_stream_fs_new_with_name_and_bounds): Return NULL object on
20223         failure.  Changed with_name* api's to take unix open style args
20224         and flags.
20225         (read): The bounded stream bounds checking seemed off, simplified
20226         code a bit.
20227         (write): Implement bounds checking for writing, the comment was
20228         wrong, it could make sense to bound writing.  Cleaned up a little.
20229         (available): Gone.
20230         (eos): Removed.  Use CamelStream's implementation now.
20231         (close): Reset the fd to -1, provide a warning for bad usage.
20232         (seek): Cleaned up.  Changed the behaviour a little, the returned
20233         offset is the absolute position in the file, even in bounded
20234         streams.        
20235         (seek): Seek from end mirrors lseek() behaviour (reverse seeking).
20236
20237 2000-04-25  NotZed  <NotZed@HelixCode.com>
20238
20239         * camel-stream-fs.h (struct _CamelStreamFs): Moved bounds and eof
20240         indicator to other parent classes.
20241
20242         * camel-stream.c (camel_stream_printf): New utility
20243         function.  Obvious use.
20244
20245         * camel-stream-mem.c: Removed leading _'s from static func's.
20246         (camel_stream_mem_new_with_byte_array): Fixed for api changes, set
20247         the owner for the byte array to us.
20248         : Removed A bunch of gtk doc stuff for static (implementation) functions.
20249         (available): Removed.
20250         (write): Fixed the write implementation so that seek() works on a
20251         seekable memory stream, as expected.  Seeking past the end of the
20252         buffer has unix semantics (filling with 0).
20253         (available): Removed.
20254         (write): Implement seekable stream bounded stream.
20255         (read): Implement seekable stream bounded stream.
20256         (close): Dont free the stream_mem if we're not the owner.
20257         (seek): Allow to seek beyond the end of memory area,
20258         implement bounds checking.
20259         (seek): Set errno on bad policy.
20260
20261         * camel-stream-mem.h (struct _CamelStreamMem): Changed position to off_t.
20262         (new_with_buffer): Changed len to be a size_t.
20263         (set_buffer, set_byte_array): New interface functions.
20264         (struct _CamelStreamMem): Removed position, it is stored in the
20265         superclass.
20266
20267         * camel-stream.h: Removed some of the seemingly random
20268         whitespace.  Removed the available method (its not
20269         impelemented/useful enough).
20270
20271         * camel-seekable-substream.c
20272         (init_with_seekable_stream_and_bounds): Remove the data_available
20273         stuff, it hasn't been properly implemented/finished, and may never
20274         work (unfortunately *sigh).
20275         (reemit_parent_signal): Removed part of the above change.
20276         (set_bounds): Removed (moved to seekable-stream).
20277         : Fixed up some of the generally unreadable indenting (sorry,
20278         wrapping at 80 characters with
20279         camels_really_long_function_names()
20280         just_doesnt_work_very_well_does_it().
20281         (available): Removed.
20282         (stream_seek): Fixup for object changes.  Make sure we return -1
20283         if the parent stream can't seek.
20284
20285         * camel-seekable-stream.c (ccamel_seekable_stream_set_bounds): New
20286         function to bound any seekable stream.
20287         : Removed _'s.
20288         (camel_seekable_stream_class_init): Implement an init function, to
20289         setup the stream bounds to unbound.
20290
20291         * camel-seekable-stream.h (CamelSeekableStreamClass): New virtual
20292         method set_bounds for seekable streams.
20293         (CAMEL_STREAM_UNBOUND): New define for no bound.
20294
20295         * camel-seekable-substream.h (struct _CamelSeekableSubstream):
20296         Removed sup_bound and inf_bound, moved to CamelSeekableStream (and
20297         renamed, and changed to off_t's).
20298         (new_with_seekable_stream_and_bounds): Use off_t as the bounds.
20299         (CamelSeekableSubstreamClass): Uh, why was the intialiser virtual?
20300         Removed.
20301
20302         * camel-seekable-stream.[ch] (CamelSeekableStreamClass): Changed seek
20303         to accept an off_t as the offset.
20304         (struct _CamelSeekableStream): Renamed cur_pos to position and
20305         changed it to an off_t type.
20306         (enum CamelStreamSeekPolicy): Set to match the SEEK_* constants
20307         from lseek().
20308         (get_current_position): Renamed to tell().
20309
20310         * camel-stream-buffer.h: Commented out set_vbuf - never implemented.
20311
20312 2000-04-25  Dan Winship  <danw@helixcode.com>
20313
20314         * camel-stream-buffer.c (_eos): only return TRUE if the parent is
20315         at eos AND the buffer has been exhausted
20316
20317         * camel-mime-message.c: fix some incorrect macro usage that
20318         resulted in bogus casts
20319
20320 2000-04-24  Dan Winship  <danw@helixcode.com>
20321
20322         * camel-mime-part-utils.c
20323         (simple_data_wrapper_construct_from_parser): fix a cut-and-pasto.
20324
20325         * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): ref
20326         (and sink) the message stream if we're going to unref it later.
20327         Otherwise it could get destroyed while there are still substreams
20328         attached to it. This needs a cleaner solution.
20329
20330         * camel.h: remove data-wrapper-repository.h include(s)
20331
20332 2000-04-24  NotZed  <NotZed@HelixCode.com>
20333
20334         * camel-mime-message.c (construct_from_parser): Allow MESSAGE_END
20335         _or_ EOF as valid termination conditions.
20336
20337         * providers/mbox/camel-mbox-summary.c (message_struct_new): Decode
20338         and then re-encode the addresses, so they are consistently
20339         formatted.
20340
20341         * camel-mime-utils.c (header_decode_mailbox): Store the address in
20342         a _header_address.  And try to get a comment-stored name if there
20343         is one.
20344         (header_decode_address): Actually return an address.
20345         (header_to_decode): Renamed to header_address_decode()
20346         (header_mailbox_decode): New function to get a single mailbox.
20347         (header_mime_decode): Return the major/minor value, as
20348         appropriate.
20349         (header_address_new, and friends): Whole bunch of utility
20350         functions for working with the address thingies.
20351         (header_decode_domain): Free the string header, and dont expand
20352         '.' into ' . '.
20353
20354         * camel.c (camel_init): No longer call
20355         data_wrapper_repository_init.
20356
20357         * camel-medium.c (write_to_stream): Moved (back) to
20358         camel-mime-part.
20359         (add_header):
20360         (set_header):
20361         (remove_header): 
20362         (get_header): Make all these abstract, and spit warnings if
20363         called.  I guess it could manage the list, but well, it doesn't.
20364
20365         * camel-medium.h (struct _CamelMedium): Dont store headers here,
20366         the implementor is the only one who knows their format.
20367         (CamelMediumClass): Changed header values to be void *'s.  They
20368         need not be strings?
20369
20370         * camel-simple-data-wrapper.c (construct_from_stream): And we're
20371         back.  Set the output stream.
20372         (construct_from_parser): Moved to camel-mime-part-utils.
20373
20374         * camel-mime-part-utils.c
20375         (camel_mime_part_construct_content_from_parser): Create the
20376         contents of multipart and simple messages.
20377         (camel_mime_part_construct_content_from_parser): Oops, this was
20378         totally screwed up, try creating the right cotnent on the right
20379         object.
20380
20381         * camel-multipart.c (construct_from_parser): Moved to
20382         camel-mime-part-utils.
20383         (separate_part): Removed.
20384
20385         * camel-mime-part.c (construct_from_stream): Back again!  This now
20386         switches over to using a mime parser for any mime parts, only.
20387         (my_write_to_stream): Write our headers and so forth here.
20388         (add_header): Add header directly, parent class is abstract.
20389         (remove_header): Ditto.
20390         (set_header): Ditto.
20391
20392         * camel-data-wrapper.c (camel_data_wrapper_construct_from_stream):
20393         Remade abstract.
20394         (camel_data_wrapper_construct_from_parser): Moved to
20395         camel_mime_part.
20396
20397         * camel-data-wrapper.h: Put back construct_from_stream.
20398
20399         * camel-mime-part.h: Put construct_from_parser in here, the
20400         data-wrapper shouldn't know about mime.  Ok, so now to undo half
20401         of the last hours changes ... duh.
20402         
20403 2000-04-23  Dan Winship  <danw@helixcode.com>
20404
20405         * camel-mime-utils.c (header_to_decode, header_mime_decode): fix
20406         some obvious minor bugs noted by -Wall.
20407
20408 2000-04-23  NotZed  <NotZed@HelixCode.com>
20409
20410         * providers/pop3/camel-pop3-folder.c (get_message_by_number): Use
20411         construct_from_stream instead of set_input_stream().
20412
20413         * camel-simple-data-wrapper-stream.c
20414         (camel_simple_data_wrapper_stream_construct): REmoved the destroy
20415         callback code.
20416         (wrapper_destroy_cb): Removed.
20417
20418         * camel-simple-data-wrapper.h: Add prototype for _construct()
20419         method.
20420
20421         * camel.c: Include unicode.h to kill a warning.
20422
20423         * camel-data-wrapper.h (CameldataWrapperClass): Removed
20424         construct_from_stream virtual method.
20425         Removed get/set input stream.
20426
20427         * data-wrapper-repository.[ch]: Removed&from build.  Obsoleted?
20428         The justification as is follows: It is mixing storage
20429         protocol/format with message architecture.  It really just doesn't
20430         serve any purpose, as each medium implementor will have to have its
20431         own type->handler mapping, and the only current implementor,
20432         mimepart has a very simple structure and no need for this.
20433
20434         * camel-medium.c (write_to_stream): Moved here from most of the
20435         stuff in camel-mime-part.  Well, the MEDIUM is the one that knows
20436         what the headers are, and the content is, let it write it out.
20437
20438         * camel-mime-part-utils.c (camel_mime_part_construct_content):
20439         Copied from camel-mime-part.c, removed handling of message
20440         followon state (moved to camel-mime-message).
20441         (camel_mime_part_construct_content_from_parser): Renamed from
20442         construct_content.
20443         (camel_mime_part_construct_headers_from_stream):
20444         (camel_mime_part_construct_content_from_stream):
20445         (camel_mime_part_store_stream_in_buffer): Removed.  Replaced by
20446         the new construct from parser stuff.
20447
20448         * camel-mime-message.c (construct_from_parser): Do
20449         construct_from_parser for mime-message.
20450         (_write_to_stream): Set the mime-version header for medium to
20451         write out, rather than writing it out ourselves.
20452
20453         * camel-data-wrapper.c (set_mime_type_field): Ref the
20454         content_field when we get it?
20455         (construct_from_stream): Removed.
20456         (camel_data_wrapper_construct_from_stream): Changed to a helper
20457         function, creates a mime_parser, and constructs from that.
20458         (set_input_stream): Removed.
20459         (camel_data_wrapper_set_input_stream): Removed.
20460         (get_input_stream): Removed.
20461         (camel_data_wrapper_get_input_stream): Removed.
20462
20463         * camel-mime-parser.c (camel_mime_parser_unstep): New function.
20464         Cause a subsequent call to mime_parser_step() to return the same
20465         state over again.
20466
20467         * providers/mbox/camel-mbox-folder.c (_get_message_by_uid):
20468         Initial test code using the mime parser to construct the message.
20469         (_get_message_by_uid): Use construct_from_stream() instead of
20470         creating our own parser.
20471
20472         * camel-mime-part.c (construct_from_parser): part constructor.
20473         (camel_mime_part_construct_content): Basically a simpler
20474         replacement for the datawrapper repository.
20475         (camel_mime_part_init): Set the default type to text/plain.
20476         (camel_mime_part_construct_content): Removed to
20477         camel-mime-part-utils.c
20478         (my_get_output_stream): Removed.  The streeam is in the
20479         data-wrapper.
20480         (my_get_content_object): Removed.  The content object is stored in
20481         the medium.  If none is there, the object wasn't created properly.
20482         (my_write_content_to_stream): Removed.  The content object is the
20483         one that knows how to write itself out!!!!!!!!
20484         (my_write_to_stream): Remove the base header writing stuff - has
20485         been moved to camel-medium, where it belongs.  This can just be
20486         used to check for mandatory headers.
20487         (my_construct_from_stream): Removed.
20488         (my_set_input_stream): What the hell, i'll remove this too.
20489         Nobody seems to understand how it differs from create from stream,
20490         and they both seem to serve the same purpose ...
20491
20492         * camel-simple-data-wrapper.c (construct_from_parser): Initial
20493         implementation of a content constructor.
20494         (construct_from_stream): Removed!  Job taken over by
20495         construct_from_parser.
20496
20497         * camel-multipart.c (construct_from_parser): Multipart
20498         construction routine.
20499         (camel_multipart_init): Set the default multipart type to
20500         multipart/mixed.  Duh, no subtype is not allowed anyway.
20501         (set_input_stream): REmoved.  Replaced by construct_from_parser.
20502
20503 2000-04-22  Dan Winship  <danw@helixcode.com>
20504
20505         * camel-multipart.[ch]: clean, document, etc.
20506         (camel_multipart_init): pick a prettier default boundary. Still
20507         need to deal with the larger problem
20508
20509 2000-04-22  NotZed  <NotZed@HelixCode.com>
20510
20511         * camel-mime-message.h (struct _CamelMimeMessage): Removed
20512         send_date, and received_date, and replaced it with a time_t
20513         'date' (this is what the header is called), and date_offset to
20514         store the GMT offset of the date.
20515
20516         * camel-mime-message.c (camel_mime_message_set_from): Update raw
20517         header as we go.
20518         (_set_from): Removed.
20519         (_get_from): Removed.
20520         (camel_mime_message_get_from): Moved implementation here.
20521         (camel_mime_message_get_subject): Move implementation here.
20522         (_get_subject): Nuked.
20523         (camel_mime_message_set_subject): Handle utf-8 input, and also
20524         update raw header when changed.
20525         (_set_subject): Removed.
20526         (_set_received_date): Removed.
20527         (camel_mime_message_set_received_date): Removed.
20528         (_get_received_date): Removed.
20529         (camel_mime_message_get_received_date): Removed.
20530         (_get_sent_date): Removed.
20531         (camel_mime_message_get_sent_date): Removed.
20532         (camel_mime_message_get_date): New function to get the date as a
20533         time_t/offset.
20534         (camel_mime_message_set_date): Set the date as a time_t/offset.
20535         (camel_mime_message_get_date_string): Get the date as a string.
20536         (camel_mime_message_init): Initialise the current date as
20537         'CMAEL_MESSAGE_DATE_CURRENT'.
20538         (_set_reply_to): Removed.
20539         (camel_mime_message_set_reply_to): Moved implementation here.
20540         This is still broken, reply-to can have multiple addresses.
20541         (_get_reply_to): Removed.
20542         (_set_field): Removed, no longer used anywhere.
20543         (_get_field): Also removed.
20544         (_init_header_name_table): Add the Date header.
20545         (process_header): Also handle snooping of Date header here.
20546
20547         * camel-stream-filter.c (finalise): Unref the source stream on
20548         finalise, and also call the parent class (oops).
20549
20550         * camel-mime-parser.c (camel_mime_parser_state): New function to
20551         get the current parser state.
20552         (camel_mime_parser_stream): Allow you to get the stream back from
20553         the mime_parser.
20554         (camel_mime_parser_fd): Alternative to allow you to get the fd
20555         back from the mime_parser.
20556         (folder_scan_init_with_stream): Properly ref/unref the stream.
20557         (folder_scan_close): Properly unref the stream/close the fd on
20558         exit.
20559         (folder_scan_init_with_fd): Close the old fd if there is one.
20560
20561         * camel-data-wrapper.c (camel_data_wrapper_construct_from_parser):
20562         New method, construct a data wrapper from an initialised parser.
20563         (construct_from_parser): Empty implementation.
20564         
20565         * providers/mbox/camel-mbox-summary.c (message_struct_new):
20566         Convert subject line to unicode, before storing in the summary.
20567         (strdup_trim): Removed, no longer needed.
20568
20569         * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): Ref
20570         the folder after setting it in the new message.
20571
20572         * camel-mime-part.c (my_set_content_object): Have the headers
20573         follow the content-type change here too.
20574         (my_write_to_stream): Dont write content-type here, automatically
20575         stored in the headers ...
20576         (my_write_to_stream): Use header_disposition_format() to format
20577         the content-disposition header.
20578         (my_write_to_stream): Removed old code, all headers are now stored
20579         in the camel-medium level, always.  Need to do the same with
20580         camel-mime-message i suppose ...
20581         (my_write_to_stream): Write the content using the parent class,
20582         not some weird function.
20583         (camel_mime_part_class_init): Dont override get_output_stream.
20584         (camel_mime_part_encoding_from_string): Bleh, make it
20585         case-insensitive.
20586
20587         * camel-mime-utils.c (header_content_type_is): Handle empty types.
20588         (header_encode_string): Start of an implementation of the rfc2047
20589         encoder.  It does iso-8859-1, and us-ascii, and utf-8 (others get
20590         tricky *sigh*)
20591         (rfc2047_encode_word): Convert a single word/string into rfc2047
20592         encoding.
20593         (quoted_encode): Different quoted-printable encoding for rfc2047
20594         encoding of headers.
20595
20596         * gmime-content-field.c (gmime_content_field_write_to_stream): Use
20597         header_content_type_format() to format it.
20598
20599 2000-04-21  NotZed  <NotZed@HelixCode.com>
20600
20601         * camel-mime-utils.h: Add prototype for header_param_list_free.
20602
20603         * camel-recipient.c: New function to remove all the types of a
20604         recipient list.  I think this whole object needs a major review.
20605
20606         * camel-mime-message.c (camel_mime_message_class_init): Removed
20607         parse_header_pair override, override add_header instead.
20608         (_parse_header_pair): Renamed to add_header.
20609         (remove_header): Add this method, to make sure we keep upto date
20610         with removed headers too.
20611         (_set_field): If given a NULL value, clear it out.
20612         (_set_recipient_list_from_string): Constify.
20613         (set_header): Override set_header from camel_medium.
20614         (process_header): Local function to handle set/add/remove of each
20615         header we know about.
20616
20617         * camel-mime-part.c (camel_mime_part_class_init): Removed
20618         parse_header_pair setup.
20619         (my_parse_header_pair): Moved into add_header(), removed.
20620         (my_set_disposition): Allow a NULL disposition to clear it.
20621         (my_set_content_id): Allow NULL content id to clear it.
20622         (remove_header): Track removed headers.
20623         (my_set_description): Allow NULL description to clear it.
20624         (my_set_content_MD5): Make sure we copy the md5 value, and allow a
20625         NULL value to reset it.
20626         (my_set_filename): Copy the filename.
20627         (my_set_header_lines): Removed.  Nothing uses it, it doesn't
20628         actually serve any purpose.
20629         (camel_mime_part_set_header_lines): Ditto.
20630         (my_get_header_lines): Ditto.
20631         (camel_mime_part_get_header_lines): Ditto.
20632         (camel_mime_part_class_init): Remove *_header_lines setup.
20633         (camel_mime_part_init): Remove header_lines init.
20634         (my_finalize): Remove header_lines finalise.
20635         (my_write_to_stream): Write the headers here.  This is just WRONG,
20636         camel_medium should be doing this.
20637         (my_get_output_stream): Kill a warning.
20638         (camel_mime_part_encoding_to_string): Ditto.
20639         (camel_mime_part_set_description): Unvirtualiase, use add_header()
20640         to do the processing.
20641         (my_set_description): Removed.
20642         (set_disposition): Renamed from my_set_disposition.
20643         (camel_mime_part_get_description): Get the descriptionf rom the
20644         get_header method.
20645         (my_get_description): Removed.
20646         (my_set_filename): Removed.
20647         (camel_mime_part_get_filename): Get the parameter from the
20648         disposition.
20649         (camel_mime_part_encoding_from_string): Handle NULL string.
20650         (camel_mime_part_init): Remove reference to filename.
20651         (my_finalize): Dont free filename.
20652
20653         * camel-mime-part.h (CamelMimePartClass): Removed
20654         parse_header_pair() method, it doesn't add anything that
20655         add_header() can't be used for.
20656         (CamelMimePartClass): Remove *_header_lines methods.
20657         (struct _CamelMimePart): Remove header_lines list.
20658         (struct _CamelMimePart): Removed filename attribute.
20659
20660         * camel-medium.c (camel_medium_init): Init headers to null, not a
20661         hashtable.
20662         (add_header): Append the headers as a list.
20663         (remove_header): Remove headers as a list.
20664         (get_header): Likewise for lookup.
20665         (free_header): Removed, no longer needed.
20666         (finalize): Free headers using header_raw_clear().
20667         (camel_medium_set_header): New function, to reset and override all
20668         values of a header with a new value.
20669
20670         * camel-medium.h (struct _CamelMedium): Changed to use a
20671         header_raw struct rather than a hash table, to store headers
20672         (many headers can occur multiple times).
20673
20674         * camel-mime-utils.c (header_raw_find_next): New function, allows
20675         you to find multi-valued header fields.
20676         (header_disposition_format): New function to format/create
20677         content-disposition header string.
20678         (header_param_list_format_append): Function to format parameter
20679         lists into a GString.
20680         (header_content_type_format): Function to format content-type into
20681         a usable format.
20682         (header_set_param): allow NULL value to remove the parameter.
20683         (decode_token): Renamed from header_decode_token.
20684         (header_decode_token): New interface for external use.
20685         (quoted_decode): Made static to kill annoying warnings.
20686         (g_strdup_len): Killed, replaced with calls to g_strndup().
20687         (rfc2047_decode_word): Made static to kill warnings.
20688         (decode_coded_string): Terminated.
20689         (g_string_append_len): Made static to kill warnings.
20690         (header_decode_text): Made static to kill warnings.
20691         (header_decode_text): Constify.
20692         (rfc2047_decode_word): Constify.
20693         (header_param): Constify.
20694         (header_content_type_new): Copy the type/subtype strings.
20695         (header_param_list_decode): Made static.
20696         (header_param_list_format_append): Made static.
20697         (quoted_decode): Constify.
20698         (g_string_append_len): Constify.
20699         (header_token_decode): New function to decode a single token.
20700
20701         * providers/mbox/camel-mbox-summary.c (header_write): Append a
20702         trailing \n when writing headers.
20703         (strdup_trim): Killed a warning.
20704         (camel_mbox_summary_set_uid): Make sure the next uid is at least 1
20705         higher than any existing one.
20706         (header_evolution_decode): Use header_token_decode to get the
20707         token.
20708
20709         * camel-mime-parser.c (folder_scan_header): Strip the trailing \n
20710         of the end of all header lines.
20711
20712 2000-04-20  NotZed  <NotZed@HelixCode.com>
20713
20714         * providers/mbox/camel-mbox-utils.[ch]: Removed.
20715
20716         * providers/mbox/camel-mbox-parser.[ch]: Removed.  Removed
20717         references to it.
20718
20719 2000-04-20  Dan Winship  <danw@helixcode.com>
20720
20721         * camel-mime-utils.c (rfc2047_decode_word): use libunicode iconv
20722         functions rather than libc ones (since libc might not have them).
20723         (header_decode_date): add autoconfiscation on timezone code
20724
20725         * camel.c (camel_init): call unicode_init ()
20726
20727 2000-04-20  NotZed  <NotZed@HelixCode.com>
20728
20729         * providers/mbox/camel-mbox-summary.c (message_struct_new): Trim
20730         leading/trailing spaces off the raw headers.
20731
20732         * MERGE NEW_PARSER branch into HEAD, fixed conflicts.
20733         
20734         * gmime-content-field.c (_print_parameter): Duh, removed again
20735         (@@#$@ cvs merge).
20736
20737         * camel-mime-utils.c (header_content_type_is): Constify.
20738         (header_content_type_unref): Killed a couple warnings.
20739
20740         * camel-folder.c (_init): Removed more log crap.
20741
20742         * providers/Makefile.am (SUBDIRS): Removed nntp, pending fixes for
20743         summary changes.
20744
20745         * providers/mbox/camel-mbox-folder.c (_get_message_by_number):
20746         Fixed for new summary interface.  Added a warning for using this
20747         broken api.
20748         (_get_message_by_uid): Fixed for message new with session
20749         vanishing.
20750
20751 2000-04-19  Dan Winship  <danw@helixcode.com>
20752
20753         * camel-simple-data-wrapper-stream.c
20754         (camel_simple_data_wrapper_stream_get_type): This is a subtype of
20755         CamelSeekableStream, not CamelStream.
20756
20757         * camel-seekable-substream.c: clean up a lot.
20758         (eos): When testing for end-of-stream, reset the parent position
20759         before testing if it is at end-of-stream, since either (a) it may
20760         have been seek'ed to eos by someone else, or (b) we may have been
20761         seek'ed away from eos and it hasn't been synced yet.
20762
20763         * camel-medium.[ch] (camel_medium_add_header): const poison.
20764         (Belatedly goes with my change of 2000-02-23.)
20765         (camel_medium_init): Use g_strcase_{hash,equal} on the header
20766         array.
20767         
20768 2000-04-18  Dan Winship  <danw@helixcode.com>
20769
20770         * camel-mime-part.c (my_set_input_stream): 
20771         * camel-data-wrapper.c (set_input_stream, set_output_stream): do
20772         better reference counting of streams so they actually go away
20773         when they should.
20774
20775         * camel-log.[ch], *: Nuke camel log stuff. Replace calls to
20776         CAMEL_LOG_WARNING with calls to g_warning.
20777
20778         * camel-data-wrapper.[ch]:
20779         * camel-simple-data-wrapper.[ch]:
20780         * camel-medium.[ch]: Clean, polish, document. Most of the gtk-doc
20781         comments added to camel-data-wrapper.c note serious problems that
20782         need to be fixed.
20783
20784 2000-04-17  Dan Winship  <danw@helixcode.com>
20785
20786         * camel-mime-message.[ch]: Remove the "session" field from
20787         CamelMimeMessage. Nothing uses it, about half of the existing
20788         calls to camel_mime_message_new_with_session pass NULL, and
20789         there's no obvious reason for it to be there.
20790
20791         * providers/MH/camel-mh-folder.c:
20792         * providers/maildir/camel-maildir-folder.c:
20793         * providers/mbox/camel-mbox-folder.c:
20794         * providers/mbox/camel-mbox-utils.c:
20795         * providers/nntp/camel-nntp-folder.c:
20796         * providers/pop3/camel-pop3-folder.c: Use camel_mime_message_new
20797         instead of camel_mime_message_new_with_session.
20798
20799         * camel-session.c (get_store_for_protocol_with_url): Set the
20800         exception if no provider is found.
20801
20802         * camel-url.c: Add code to encode and decode %-escapes in URLs,
20803         and do some additional correctness-checking on URL syntax. From
20804         Tiago Antào with modifications by me.
20805
20806 2000-04-14  Chris Toshok  <toshok@helixcode.com>
20807
20808         * providers/Makefile.am (SUBDIRS): add nntp
20809
20810 2000-04-14  Christopher James Lahey  <clahey@helixcode.com>
20811
20812         * providers/mbox/camel-mbox-folder.c: Fix switch statement.
20813
20814 2000-04-14  Chris Toshok  <toshok@helixcode.com>
20815
20816         * providers/nntp/camel-nntp-folder.c (_exists): always return TRUE
20817         for now.  we need to check the server response to make sure the
20818         group exists.
20819         (_get_message_by_uid): make sure to account for the \n we add to
20820         the string after every line.
20821
20822         * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): function
20823         to get the headers using the XOVER command.
20824         (get_HEAD_headers): function to get the headers using the HEAD
20825         command on each message. slooooooow.
20826         (camel_nntp_get_headers): make this function use either XOVER or HEAD
20827         versions depending on whether or not the server extension is present.
20828
20829 2000-04-14  Dan Winship  <danw@helixcode.com>
20830
20831         * camel-formatter.[ch]: This didn't belong in Camel. Move to mail/
20832
20833         * Makefile.am, camel-types.h: remove references to
20834         camel-formatter.
20835
20836 2000-04-12  Matt Loper  <matt@helixcode.com>
20837
20838         * camel-folder-pt-proxy.c (_folder_open_cb): Print warning message
20839         for broken function.
20840         (_folder_close_cb): Same.
20841
20842 2000-04-12  Miguel de Icaza  <miguel@gnu.org>
20843
20844         * Makefile.am (pthread_SRC): Use correct names for the pthread
20845         source variables.
20846
20847 2000-04-10  Dan Winship  <danw@helixcode.com>
20848
20849         * providers/pop3/camel-pop3-store.c (pop3_connect): fix various
20850         bugs in APOP code (still untested) and some of the error cases.
20851
20852         * camel-provider.h: Clarify what provider.protocol, provider.name,
20853         and provider.description should be.
20854
20855         * providers/mbox/camel-mbox-provider.c: 
20856         * providers/pop3/camel-pop3-provider.c: 
20857         * providers/sendmail/camel-sendmail-provider.c: 
20858         * providers/smtp/camel-smtp-provider.c: update protocols, names,
20859         and descriptions
20860
20861         * providers/mbox/camel-mbox-folder.c (_get_message_by_number):
20862         implement get_message_by_number for the mail fetch code.
20863
20864 2000-04-09  Jeffrey Stedfast  <fejj@stampede.org>
20865
20866         * providers/smtp/camel-smtp-transport.c: reformatted to fit
20867         the standard indent format used by helix code
20868
20869 2000-04-09  Dan Winship  <danw@helixcode.com>
20870
20871         * camel-movemail.c: New file with new function to dot-lock an mbox
20872         file and copy it to a safe private directory.
20873
20874 2000-04-08  Christopher James Lahey  <clahey@helixcode.com>
20875
20876         * providers/smtp/.cvsignore: Added a .cvsignore file.
20877
20878 2000-04-08  Dan Winship  <danw@helixcode.com>
20879
20880         * providers/sendmail/camel-sendmail-transport.c (_send_internal):
20881         actually record the pid returned by fork(). Noticed by clahey.
20882
20883         * providers/smtp/camel-smtp-transport.c: #include <sys/param.h>
20884         for MAXHOSTNAMELEN. (This is a stopgap: some of the uses of
20885         MAXHOSTNAMELEN are wrong anyway...)
20886
20887 2000-04-07  Jeffrey Stedfast  <fejj@stampede.org>
20888
20889         * providers/smtp/camel-smtp-transport.c: fixes to numerous bugs;
20890         should now build fine.
20891         * providers/Makefile.am: Readded smtp now that smtp builds without
20892         error.
20893
20894 2000-04-20  NotZed  <NotZed@HelixCode.com>
20895
20896         * providers/mbox/camel-mbox-summary.c
20897         (camel_mbox_summary_next_uid): Public function to get the next
20898         uid, makes sure its saved to disk too.
20899
20900         * camel-mime-part.c (my_finalize): Fix disposition crap with a
20901         real disposition.
20902         (my_set_disposition): Likewise.
20903         (my_get_disposition): And here.
20904         (my_write_to_stream): And here, needs more cleanup.
20905
20906         * providers/mbox/camel-mbox-folder.c (_append_message): Assign a
20907         new uid at this point.
20908
20909         * gmime-content-field.c (gmime_content_field_write_to_stream):
20910         Make something up if we have an invalid/missing content type
20911         (i.e. text/plain).
20912
20913 2000-04-19  NotZed  <NotZed@HelixCode.com>
20914
20915         * providers/mbox/camel-mbox-folder.c (_delete): Fixed completely
20916         broken switch() syntax, only compiled because errno is a macro on
20917         some systems.
20918         (_list_subfolders): Likewise.
20919
20920 2000-04-18  NotZed  <NotZed@HelixCode.com>
20921
20922         * camel-mime-parser.c (folder_scan_init): init stream to null.
20923
20924         * providers/mbox/camel-mbox-summary.c
20925         (CAMEL_MBOX_SUMMARY_VERSION): Moved to .c file, incremented.
20926         (index_folder): Changed to have index passed via the summary.
20927         (decode_string): Do a sanity check on the string size, so we dont
20928         visit g_malloc()'s friendly abort().
20929
20930         * camel-folder-pt-proxy.c (camel_folder_pt_proxy_class_init):
20931         Removed reference to set_name.
20932         (_set_name): Removed.
20933
20934         * providers/mbox/camel-mbox-utils.c
20935         (parsed_information_to_mbox_summary): Removed.  Most of this file
20936         is about to be binned.
20937
20938         * providers/mbox/camel-mbox-search.c (func_header_contains): Fixes
20939         for changes to summary interface.
20940         (struct _searchcontext): Remove pointer to message info, get it
20941         straight from the mboxsummary.
20942         (camel_mbox_folder_search_by_expression): New summary interface.
20943         (camel_mbox_folder_search_by_expression): Uh, the summary is not
20944         an object anymore (well not yet).
20945
20946         * providers/mbox/camel-mbox-folder.c
20947         (camel_mbox_folder_class_init): Removed set_name init.
20948         (_set_name): Removed.
20949         (_open): Call new summary interface.
20950         (_close): Use new summary interface.
20951         (_create): Removed a summary object leak.
20952         (_get_message_count): New summary interface.
20953         (_get_uid_list): Use new summary interface. FIXME: this is leaky.
20954         (_get_message_by_uid): Use the new summary interface, some
20955         cleanup.
20956         (_append_message): Totally changed, basically just appends the
20957         message directly, ignores the summary (for now), the summary will
20958         fix itself up if it needs to.
20959         (_check_get_or_maybe_generate_summary_file): Bye bye old code.
20960         (summary_get_message_info): Implement get_message_info again, for
20961         folder.
20962
20963         * camel-folder.c (camel_folder_class_init): Removed set_name
20964         setup.
20965         (_set_name): Moved contents into _init.
20966         (_init): Perform the old functions of set_name here.
20967
20968         * camel-folder.h: Removed the set_name internal interface.
20969
20970 2000-04-14  NotZed  <NotZed@HelixCode.com>
20971
20972         * providers/mbox/camel-mbox-summary.[ch]: Completely replaced with
20973         new code.
20974
20975         * Makefile.am (libcamel_la_SOURCES): Removed
20976         camel-folder-summary.[ch].
20977
20978         * camel-folder.h (struct _CamelFolder): Removed summary.
20979         (struct _CamelFolder): Changed flags to be 1 bit bitfields.
20980
20981         * camel-folder-summary.[ch]: Class removed entirely.
20982
20983         * camel-folder.c (camel_folder_get_summary): Removed.
20984         (camel_folder_summary_get_message_info): Moved from
20985         camel-folder-summary.c
20986         (camel_folder_summary_get_subfolder_info): Moved from
20987         camel-folder-summary.c
20988
20989         * camel-mime-parser.c (folder_scan_step): Store the start of
20990         headers and start of from in the scan state.
20991         (camel_mime_parser_tell_start_headers): Query the start of the
20992         headers.
20993         (camel_mime_parser_tell_start_from): Query the cached start of
20994         from marker.
20995
20996 2000-04-13  NotZed  <NotZed@HelixCode.com>
20997
20998         * gmime-content-field.c (gmime_content_field_free): Removed this
20999         function.  If its too dangerous to use, it shouldn't be here.
21000         (gmime_content_field_ref): Also ref the embedded content-type.
21001         (gmime_content_field_unref): Ditto to unref it.
21002
21003         * camel-mime-utils.h: Add a refcount for content-type header.
21004
21005         * camel-mime-utils.c (header_content_type_unref): Implement unref
21006         for content-type.
21007         (header_content_type_ref): Implement ref for header content type.
21008
21009 2000-04-12  NotZed  <NotZed@HelixCode.com>
21010
21011         * gmime-content-field.h: Changed to use a _header_content_type.
21012         Added type/subtype back for compatability with clients.
21013         
21014         * gmime-content-field.c: Basically a total rewrite, and now just a
21015         thin wrapper ontop of header_content_type.
21016         (_free_parameter): Got rid of it.
21017         (gmime_content_field_new): Use header_content_type_* functions.
21018         (gmime_content_field_set_parameter): Likewise.
21019         (_print_parameter): Blow away.
21020         (gmime_content_field_write_to_stream): Get details from the
21021         content_type field.  Should check if it needs to escape chars in
21022         the paramter value.
21023         (gmime_content_field_get_mime_type): Likewise.
21024         (___debug_print_parameter): Get rid of this rather annoyingly
21025         named function.
21026         (gmime_content_field_get_parameter): Simplified function.
21027         (gmime_content_field_construct_from_string): Fixed this to use a
21028         real parser.
21029         (gmime_content_field_is_type): New function to test if a type matches.
21030         (gmime_content_field_construct_from_string): Track type/subtype
21031         from subordinate content_type header struct.
21032
21033         * gmime-rfc2047.[ch]: Removed.  Unused.
21034
21035         * camel-stream-b64.[ch]: Blown away more duplicated code.
21036
21037         * Makefile.am: Removed camel-stream-b64.[ch], and
21038         gmime-base64.[ch].
21039
21040         * camel-mime-part.c (my_get_content_object): Replaced
21041         camel-stream-b64 with camel-stream-filter/camel-mime-filter-basic.
21042         (my_write_content_to_stream): Replaced camel-stream-b64 with the
21043         camel-stream-filter with an encoder.
21044         (my_get_content_object): Also implement quoted-printable decoding.
21045         (my_write_content_to_stream): Also implement quoted-printable
21046         encoding.
21047         (my_get_output_stream): Took out stream-b64 code (nothing's being
21048         executed yet anyway).
21049
21050         * gmime-base64.[ch]: Blown away.  Not used, dont need it.
21051
21052         * camel-mime-utils.h: Added offset for this header.  Records where
21053         it is in the source.
21054
21055         * camel-mime-utils.c (header_raw_append_parse): Add offset
21056         parameter, to store where the header is stored in the stream.
21057         (header_raw_append): Added offset param.
21058         (header_raw_find): Return offset, if a pointer supplied for it.
21059         (header_raw_replace): Add offset param.
21060         (header_content_type_new): New function, to create an empty
21061         content type.
21062         (header_content_type_set_param): Set a parameter in the
21063         content-type.
21064         (header_set_param): Generic header parameter setting function.
21065         (header_decode_string): Handle NULL input.
21066
21067         * camel-mime-parser.c (camel_mime_parser_headers_raw): New
21068         function to get access to all the raw headers.
21069         (folder_scan_header): Keep track of the header start position, and
21070         store it when saving the header.
21071
21072 2000-04-11  NotZed  <NotZed@HelixCode.com>
21073
21074         * camel-mime-utils.c: Moved a bunch of printf's to debug.
21075
21076         * camel-mime-parser.c: Moved a bunch of printf's to debug.
21077         (folder_scan_header): Detect end of each header line using the
21078         last scanned char, and not the last scanned position.
21079
21080         * camel-mime-filter-index.[ch]: Indexing filter.  Indexes unicode
21081         sequences into ibex files.
21082
21083 2000-04-09  NotZed  <NotZed@HelixCode.com>
21084
21085         * camel-mime-part.c: Dont include gmime-base64.h
21086
21087         * camel-mime-filter-charset.c (complete): Implement the completion
21088         function.
21089
21090         * camel-mime-parser.c (folder_scan_step): If we get to the end of
21091         the body data, check any filters for outstanding completion data.
21092         (camel_mime_parser_scan_from): Set whether we scan for "From "
21093         headers or not.
21094
21095         * camel-stream-filter.c (do_read): If we get to end of stream on
21096         the source, then call the filtering completion function to see if
21097         we have any more data to return.
21098
21099         * camel-mime-filter-basic.c (filter): Implement quoted printable
21100         encoding and decoding filters.
21101         (complete): And the complete function as well.
21102
21103         * camel-mime-utils.c (base64_encode_close): Also take an input
21104         buffer, allow closing of filters.
21105         (quoted_encode_step): First cut, simple quoted-printable encoder.
21106         Doesn't handle trailing spaces/tabs on end of line properly yet.
21107         (quoted_encode_close): Complete a quoted-encoding.
21108         (is_qpsafe): New type check, for quoted-printable safe characters
21109         (that do not need encoding).  Thats all bits used in the type
21110         table!  Rebuilt the types table.
21111         (header_content_type_is): Checks a content type against at
21112         type/subtype match.
21113         (header_content_type_param): Handle NULL content type pointer.
21114
21115 2000-04-08  NotZed  <NotZed@HelixCode.com>
21116
21117         * camel-mime-filter-basic.c (filter): Implement the base64
21118         encoder.  Problem is, there is no way to know when to close it.
21119         Close/Reset will have to provide the same args as filter, so it can
21120         flush remaining data *sigh*
21121
21122         * camel-mime-utils.c (base64_encode_step): A rather complex base64
21123         encoder, fast?
21124         (base64_step_close): Companion function to finish off the base64
21125         sequence.
21126
21127         * camel-mime-part.c (my_write_content_to_stream): Changed to use
21128         camel_stream_write_to_stream().
21129
21130         * camel-stream.[ch] (camel_stream_write_to_stream): From
21131         camel_stream_b64_write_to_stream().  Fixed some infinite loop
21132         bugs with error conditions.
21133
21134         * camel-stream-b64.[ch] (camel_stream_b64_write_to_stream): Removed.
21135         This has nothing to do with stream-b64, so i've moved it to
21136         CamelStream.
21137
21138         * camel-mime-utils.h: Add a comment about refcounting
21139         header_content_type struct.
21140
21141         * Makefile.am: Added camel-stream-filter*.[ch].
21142
21143         * camel-stream-filter.[ch]: Class to implement a generic
21144         (multipass) filter ontop of a stream.  Only implements a read-only
21145         stream.
21146
21147         * camel-mime-parser.c (camel_mime_parser_filter_add): Ref the
21148         filter we just added.
21149
21150         * Makefile.am: Added camel-mime-filter*.[ch].
21151
21152         * camel-mime-filter-charset.[ch]: A filter to preform character set
21153         conversion (uses unicode_iconv).
21154
21155         * camel-mime-filter-save.[ch]: A simple filter which will save all
21156         data directly to a file or file descriptor.
21157
21158         * camel-mime-filter-basic.[ch]: Implements the basic mime filters,
21159         base64 and quoted-printable decoding (encoding not implemented yet).
21160
21161         * camel-mime-filter.[ch]: A filtering class, which can filter streams
21162         of data without having to copy them.  Simpler than stream classes,
21163         and can be plugged into a single stream class (when i write it).
21164
21165 2000-04-07  Dan Winship  <danw@helixcode.com>
21166
21167         * providers/pop3/camel-pop3-store.c (pop3_connect): Clarify error
21168         messages.
21169         (finalize): fix a bug in camel_exception usage
21170         (pop3_connect): Remember the password after asking for it the
21171         first time.
21172
21173 2000-04-07  NotZed  <NotZed@HelixCode.com>
21174
21175         * Makefile.am: Added camel-mime-parser/camel-mime-utils.
21176
21177         * camel-mime-parser.c: Fast mime parser.
21178
21179         * camel-mime-utils.c: Mime utility functions, and email header
21180         parsers.
21181
21182 2000-04-07  NotZed  <NotZed@HelixCode.com>
21183
21184         * providers/Makefile.am: Removed smtp for now, its a long way from
21185         building.
21186         * providers/smtp/Makefile.in: Removed file that shouldn't have been
21187         checked in.
21188
21189 2000-04-06  Matt Loper  <matt@helixcode.com>
21190
21191         * camel-folder-pt-proxy.c (_get_full_name): Remove exception param
21192         from get_full_name() called, since get_full_name() was changed to
21193         not have an exception in the last param (see dan's notes below).
21194         (_get_name): same.
21195
21196 2000-04-06  Dan Winship  <danw@helixcode.com>
21197
21198         * camel-store.[ch]: Reorganize the folder-fetching methods and
21199         implement a folder cache so that multiple requests for the same
21200         folder will yield the same CamelFolder object (as long as it
21201         remains active). Includes some code to remove no-longer-active
21202         folders from the cache, but it doesn't get used since nothing is
21203         ever unref'ed in Camel right now...
21204         
21205         * providers/mbox/camel-mbox-store.c:
21206         * providers/pop3/camel-pop3-store.c: update for CamelStore
21207         changes.
21208
21209         * camel-folder.[ch]: Remove the (unused) CamelException argument
21210         from camel_folder_get_name and camel_folder_get_full_name.
21211         (camel_folder_set_name): make this go away since changing a
21212         folder's name after it has been created could result in it
21213         conflicting with a separately-issued folder.
21214         
21215 2000-04-05  Dan Winship  <danw@helixcode.com>
21216
21217         * g_url_new really wanted to take a CamelException. So, rename
21218         Gurl to CamelURL, g_url_* to camel_url_* (with camel_url_new
21219         taking an exception), and url-util.[ch] to camel-url.[ch]. Also
21220         force url->port to be numeric and remove camel_service_getport. (I
21221         was confused before: the URL RFC says the port must be numeric, so
21222         we don't want to do getportbyname.)
21223
21224 2000-04-01  Dan Winship  <danw@helixcode.com>
21225
21226         * providers/mbox/camel-mbox-folder.c
21227         (_check_get_or_maybe_generate_summary_file): Compare
21228         mbox_file_size and mbox_modtime to the results of stat()ing the
21229         mbox file, not the summary file. Duh.
21230         (_close): Update the summary's mbox_file_size and mbox_modtime
21231         before writing it to disk.
21232
21233         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_save,
21234         camel_mbox_summary_load): Wow. I must have been tired when I wrote
21235         this code. First, the comparison bug above. Second, it was using
21236         ntohs and htons instead of ntohl and htonl. Third, I was reading
21237         the status flag byte in two different places and thus getting out
21238         of sync. Fourth, it was writing out field_length bytes of each
21239         header field after having converted field_length to network byte
21240         order, resulting in lots of random crap being appended, and the
21241         summary files being huge. (Fortunately, since the size/modtime
21242         comparison was biffed, the garbage summary read from disk was
21243         always immediately discarded.)
21244
21245         * providers/mbox/camel-mbox-parser.c (camel_mbox_parse_file): fix
21246         an off-by-one error that caused the last-used UID to be reused if
21247         the summary file was regenerated. (That one wasn't my fault. :-)
21248
21249 2000-03-31  Dan Winship  <danw@helixcode.com>
21250
21251         * camel-stream-mem.c: implement unimplemented methods
21252
21253         * gmime-content-field.c
21254         (gmime_content_field_construct_from_string):
21255         * data-wrapper-repository.c
21256         (data_wrapper_repository_get_data_wrapper_type):
21257         * camel-simple-data-wrapper.c (my_write_to_stream):
21258         * camel-mime-part.c (my_set_input_stream):
21259         remove debugging printf()s that no longer seem useful.
21260
21261 2000-03-31  Matt Loper  <matt@helixcode.com>
21262
21263         * camel-formatter.c (text_to_html): Added "convert_newlines_to_br"
21264         boolean param, to give the option of not converting '\n's to <br>
21265         tags. This way, when we stick stuff in a <pre> tag, newlines stay
21266         newlines.
21267
21268 2000-03-30  Matt Loper  <matt@helixcode.com>
21269
21270         * camel-formatter.c (handle_text_plain): Use <pre> tag to force
21271         the use of monospaced fonts.
21272
21273 2000-03-30  Dan Winship  <danw@helixcode.com>
21274
21275         * camel-service.c (camel_service_getport): Add a htons in the
21276         default_number case, and document the fact that the function
21277         returns the port in network byte order.
21278
21279         * providers/pop3/camel-pop3-store.c (pop3_connect): Revert
21280         Miguel's change. The port number bug was actually somewhere
21281         else, and the IP address copying code was fine already.
21282         
21283 2000-03-29  Miguel de Icaza  <miguel@gnu.org>
21284
21285         * providers/pop3/camel-pop3-store.c (pop3_connect): Add htons
21286         (port), and only copy 4 bytes for the IP address to prevent a DNS
21287         attack. 
21288
21289 2000-03-28  Dan Winship  <danw@helixcode.com>
21290
21291         * camel-seekable-substream.c
21292         (camel_seekable_substream_new_with_seekable_stream_and_bounds):
21293         make this return a CamelStream rather than a
21294         CamelSeekableSubstream, because that's the way Gtk objects tend to
21295         work.
21296
21297         * camel-service.c (camel_service_gethost,
21298         camel_service_getport): convenience functions to canonicalize
21299         the host and port values of a service's URL.
21300         * providers/pop3/camel-pop3-store.c: use them
21301
21302         * providers/mbox/camel-mbox-folder.c
21303         (_check_get_or_maybe_generate_summary_file): Make this work when
21304         the inbox file doesn't yet exist.
21305
21306 2000-03-27  Dan Winship  <danw@helixcode.com>
21307
21308         * providers/mbox/camel-mbox-folder.c (_append_message): uncomment
21309         the call to unlink the temp file: there's no way to tell
21310         camel_stream_fs to truncate a file, so reusing the same file was
21311         resulting in junk at the ends of messages.
21312
21313         * camel-folder.[ch]: add delete_message_by_{number,uid}.
21314
21315         * providers/pop3/camel-pop3-folder.[ch]: implement
21316         delete_message_by_uid. Add a close method to do expunging
21317         of deleted messages if requested.
21318
21319         * providers/pop3/camel-pop3-store.[ch]: support for
21320         CamelPop3Folder::close. (You have to close the connection
21321         in order to expunge the folder, thus the store may be
21322         connected in the CamelService::is_connected sense when it
21323         is not actually connected to the server.) Also some bugfixes.
21324
21325 2000-03-27  NotZed  <NotZed@HelixCode.com>
21326
21327         * providers/mbox/camel-mbox-folder.c (_append_message): Unref the
21328         output_stream when done, close doesn't do it.
21329         (_append_message): Clear all uid's from the appending messages, so
21330         they are reassigned proper unique id's.
21331
21332         * gmime-utils.c (get_header_array_from_stream): Actually free the
21333         header, it is copied elsewhere.
21334
21335 2000-03-26  NotZed  <NotZed@HelixCode.com>
21336
21337         * providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev): Added
21338         folder parameter to function.  Fixed callers.
21339         (index_message): Index a message as it is assigned a unique id.
21340
21341         * camel-mime-part.c (my_set_content_id): Make sure we malloc and
21342         copy the content_id, otherwise *poof*
21343
21344 2000-03-25  NotZed  <NotZed@HelixCode.com>
21345
21346         * camel-medium.c (_finalize): Another leak, unref the content if
21347         finished with it.
21348
21349         * camel-recipient.c (camel_recipient_table_free): Plug another
21350         memory leak - actually free the recipient table.
21351
21352         * camel-mime-message.c (_finalize): Plugged a memory leak with the
21353         flags table.
21354
21355         * gmime-utils.c (_store_header_pair_from_string): A simpler, more
21356         debuggable and functionally identical header extraction function.
21357
21358 2000-03-24  NotZed  <NotZed@HelixCode.com>
21359
21360         * gmime-content-field.c (gmime_content_field_set_parameter):
21361         Remove the hash table entry before freeing its key and data.
21362
21363 2000-03-27  Dan Winship  <danw@helixcode.com>
21364
21365         * providers/Makefile.am (SUBDIRS): Add pop3.
21366
21367         * providers/pop3/camel-pop3-store.c: keep separate input and
21368         output streams so the output doesn't end up being buffered.
21369
21370         * providers/pop3/camel-pop3-folder.c (get_message_by_number):
21371         finish implementing this.
21372
21373 2000-03-27  Michael Meeks  <michael@helixcode.com>
21374
21375         * camel-mime-part.c (my_set_disposition): fix so less broken.
21376         (my_finalize): remove dodgy disposition free.
21377
21378         * camel-data-wrapper.c (my_set_mime_type_field): unref instead of
21379         free on mime_type.
21380
21381 2000-03-27  Dan Winship  <danw@helixcode.com>
21382
21383         * camel-service.c (camel_service_free_auth_types): new routine to
21384         free the data allocated by camel_service_query_auth_types.
21385
21386         * providers/pop3/camel-pop3-store.c (free_auth_types): implement
21387
21388         * camel-stream-mem.c (camel_stream_mem_new_with_buffer): rename
21389         camel_stream_mem_new_with_buffer to ..._with_byte_array and add a
21390         new ..._with_buffer that takes a char * rather than a GByteArray.
21391
21392         * Remove CamelStreamBufferedFs, since CamelStreamBuffer makes it
21393         redundant.
21394
21395 2000-03-25  Dan Winship  <danw@helixcode.com>
21396
21397         * camel-folder-summary.[ch]: change the CamelFolderSummary
21398         interfaces to allow partial summary queries (for dealing
21399         with very large folders). Remove the "extended_fields" from
21400         CamelFolderInfo and CamelMessageInfo: this is better dealt
21401         with by subtyping.
21402
21403         * providers/mbox/camel-mbox-summary.[ch]: Make CamelMboxSummary a
21404         subclass of CamelFolderSummary. Update interfaces for that. Remove
21405         the internal/external summary distinction. Remove the (unused) md5
21406         checksum in the folder summary. Change the summary file format
21407         (primarily to make it no longer byte-order dependent) and add a
21408         version number to it so it will be easier to change in the future.
21409         
21410         * providers/mbox/camel-mbox-folder.[ch]
21411         * providers/mbox/camel-mbox-search.c
21412         * providers/mbox/camel-mbox-utils.c: update for summary changes
21413
21414         * camel-exception-list.def: add
21415         CAMEL_EXCEPTION_FOLDER_SUMMARY_INVALID
21416         
21417 2000-03-23  NotZed  <NotZed@HelixCode.com>
21418
21419         * providers/mbox/camel-mbox-provider.c: Added flag to provider
21420         initialisation, to match changed structure.
21421
21422 2000-03-22  NotZed  <NotZed@HelixCode.com>
21423
21424         * camel-folder.[ch]: Added async search api.
21425
21426         * providers/mbox/camel-mbox-search.c
21427         (camel_mbox_folder_search_by_expression): Changed to use an
21428         asynchronous interface.
21429         (camel_mbox_folder_search_cancel): Cancel function for async
21430         interface.
21431
21432 2000-03-23  Dan Winship  <danw@helixcode.com>
21433
21434         * camel-stream-buffer.c (camel_stream_buffer_read_line): Function
21435         to read one line of any size from a stream and return it in
21436         allocated memory.
21437
21438 2000-03-22  Dan Winship  <danw@helixcode.com>
21439
21440         * camel-service.c (camel_service_query_auth_types): New function
21441         to query a service for the authentication protocols it supports.
21442         * providers/pop3/camel-pop3-store.c (query_auth_types): implement
21443
21444         * camel-provider.c (camel_provider_scan): New function to
21445         scan the provider dir and return a list of all providers.
21446
21447         * providers/pop3/camel-pop3-folder.c: fill this in partially
21448         * providers/pop3/camel-pop3-store.c: make camel_pop3_command
21449         return the text after "+OK"/"-ERR" and add a separate
21450         camel_pop3_get_additional_data to get the message body or
21451         whatever. Also make them take a CamelPop3Store rather than
21452         a CamelStreamBuffer.
21453
21454 2000-03-22  Matt Loper  <matt@helixcode.com>
21455
21456         * camel-formatter.c (debug): Disabled some useless debug
21457         messaging.
21458
21459 2000-03-21  Dan Winship  <danw@helixcode.com>
21460
21461         * providers/pop3: some initial bits of the POP3 provider, to
21462         make Matt happy. Incomplete, untested, etc.
21463
21464 2000-03-21  bertrand  <bertrand@helixcode.com>
21465
21466         * providers/mbox/camel-mbox-summary.c 
21467         (camel_mbox_summary_append_internal_to_external): copy the size field
21468
21469         * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): initialize 
21470         message_info to NULL
21471
21472         * camel-folder-summary.h: added the size field.
21473
21474         * providers/mbox/camel-mbox-summary.h: 
21475         added the received_date field.
21476
21477         * providers/mbox/camel-mbox-summary.c:
21478         documented all functions.
21479
21480         * camel-folder-summary.h: name change and 
21481         new fields.
21482
21483         * providers/mbox/camel-mbox-search.c: update to 
21484         conform to name change in the summary fields.
21485
21486 2000-03-10  bertrand  <bertrand@helixcode.com>
21487
21488         * camel-service.h: cosmetic changes.
21489
21490 2000-03-09  Dan Winship  <danw@helixcode.com>
21491
21492         * s/HelixCode/Helix Code, Inc./ in the copyrights
21493
21494 2000-03-07  bertrand  <bertrand@helixcode.com>
21495
21496         * camel-formatter.c (handle_mime_part): 
21497         plug mem leaks due to bad documentation
21498         of camel_content_field_get_mime_type
21499         (print_camel_body_part): idem
21500         (handle_multipart_alternative): idem
21501
21502         * gmime-content-field.c (gmime_content_field_get_mime_type): 
21503         documentation fix.
21504
21505
21506         * camel-mime-part.c (my_finalize): unref the 
21507         content_input_stream if any. 
21508
21509 2000-03-06  bertrand  <bertrand@helixcode.com>
21510
21511         * camel-stream-fs.c (_seek): fix a bogus calculation
21512         in the return position.
21513
21514 2000-03-05  bertrand  <bertrand@helixcode.com>
21515
21516         * camel-session.h: cosmetic fixes.
21517
21518         * camel-stream-fs.c (_read): 
21519         (_seek): fixed the current position so that it refers
21520         to the current position in the stream, not in its parent.
21521
21522 2000-03-04  NotZed  <NotZed@HelixCode.com>
21523
21524         * providers/mbox/camel-mbox-search.c
21525         (camel_mbox_folder_search_by_expression): Ref the summary
21526         after we have got it.
21527
21528 2000-03-04  bertrand  <bertrand@helixcode.com>
21529
21530         * camel-mime-part.c (my_write_content_to_stream): 
21531         stream the raw content instead of nothing if the encoding
21532         is not supported.
21533
21534         * camel-stream-fs.c (_seek): handle eos more
21535         properly.
21536
21537         * camel-formatter.c (get_bonobo_tag_for_object): 
21538         bonobo-goad-id is the good key to look for. 
21539         (get_bonobo_tag_for_object): close the <object> tag.
21540         (get_bonobo_tag_for_object): the correct syntax for the
21541         to set a parameter inside an <object> tag is :
21542         <object classid="..."> <param name="uid" value="..."> <param ...>
21543         </object>
21544
21545 2000-03-03  bertrand  <bertrand@helixcode.com>
21546
21547         * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): 
21548         use set_input_stream instead of construct_from_stream
21549         to feed the message object. 
21550
21551         * camel-data-wrapper.c (my_write_to_stream): reset output stream.
21552         (my_set_input_stream): unref the previous input stream.
21553         use the set_output_stream for default behaviour.
21554         (my_set_output_stream): unref previous output stream.
21555
21556         * camel-mime-part.c (my_write_content_to_stream): reset content
21557         object output stream.
21558
21559 2000-03-03  NotZed  <NotZed@HelixCode.com>
21560
21561         * providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev): Make
21562         sure we open with create with a creation mask.
21563
21564 2000-03-01  NotZed  <NotZed@HelixCode.com>
21565
21566         * camel-mime-part-utils.c
21567         (camel_mime_part_construct_content_from_stream): DO NOT assert on
21568         content type, we have fallback code 4 lines below it ... *sigh*
21569
21570 2000-02-29  NotZed  <NotZed@HelixCode.com>
21571
21572         * Makefile.am (libcamelinclude_HEADERS): Added camel-stream-buffer
21573         to build.
21574
21575         * camel-stream-buffer.[ch]: Generic buffer which can be applied to
21576         any stream.
21577
21578 2000-03-03  bertrand  <bertrand@helixcode.com>
21579
21580         * camel-formatter.c (handle_image): in the case
21581         of images, put the content object output stream
21582         in the url. This allows the message browser
21583         to show inline images.
21584
21585         * camel-stream-b64.c (my_read_encode): fixed state
21586         0 keep value. 
21587
21588 2000-03-02  bertrand  <bertrand@helixcode.com>
21589
21590         * camel-stream-b64.c (my_read_encode): don't forget to 
21591         set the state to 0 after 3.
21592         (my_read_encode): don't forget to encode, even in state 3.
21593
21594         * camel-simple-data-wrapper.c: static functions are prefixed 
21595         with my_ instead of _
21596         * camel-multipart.c: static functions are prefixed 
21597         with my_ instead of _
21598         (my_write_to_stream): commented.
21599         (my_write_to_stream): warning in case the boudary is set
21600         but is a zero length string.
21601
21602         * camel-mime-part.c (camel_mime_part_encoding_from_string): 
21603         remove debug trace. 
21604         
21605         * camel-mime-part.c: Replaced all static functions
21606         with name begining with _ by the same name begining
21607         with "my_" to prevent the possible conflicts 
21608         with system symbols Dan warned us about. 
21609         
21610         * camel-stream-b64.c (camel_stream_b64_write_to_stream): 
21611         use CamelStreamB64 type for the input stream.
21612
21613         * camel-mime-part.c (_get_content_object): remove 
21614         debugging trace
21615         (_write_content_to_stream): implement the b64 
21616         encoding the new way (that is using camel_stream_b64)
21617
21618         * camel-data-wrapper.c (my_write_to_stream): 
21619         fix implementation so that it writes properly
21620         to the output stream even.
21621
21622         * camel-stream-b64.c (camel_stream_b64_write_to_stream): 
21623         fix implementation. 
21624
21625 2000-02-29  bertrand  <bertrand@helixcode.com>
21626
21627         * camel-stream-b64.c (camel_stream_b64_write_to_stream): new
21628         utility function. 
21629
21630         * camel-data-wrapper.c (_write_to_stream): default
21631         implementation. 
21632
21633         * gmime-utils.c (_store_header_pair_from_string): 
21634         revert strange changes. 
21635
21636         * camel-stream-b64.c (my_read_decode): set eos to true when we
21637         have read the whole input stream. 
21638         (my_reset): set eos to FALSE.
21639
21640 2000-02-28  NotZed  <NotZed@HelixCode.com>
21641
21642         * camel-mime-part.c (_parse_header_pair): Dont free this either.
21643
21644         * camel-medium.c (_remove_header): Ugh, dont free the header
21645         before we actually remove it.
21646         (_add_header): Ugh, dont free hashtable entries which may be
21647         duplicated (hash_insert _will_ reference that memory).
21648
21649         * string-utils.c (string_trim): Trimming a 0-length string is not
21650         an error.
21651
21652         * camel-mime-message.c (_parse_header_pair): Fixed very broken
21653         memory handling of header_name/value.
21654
21655         * providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev):
21656         Initialise end_of_last_message always.
21657         (camel_mbox_copy_file_chunk): Stop trying to read if we run out of
21658         data, rather than looping forever.
21659         (camel_mbox_write_xev): Use an open flag when opening with create.
21660
21661         * camel-folder.c (camel_folder_search_by_expression): No, its not
21662         a fatal error to search on a non-searchable folder, you just dont
21663         get any matches.
21664         (_open): Dont open an opened folder (i dont see why this is really
21665         a bug, but what the hell ...)
21666
21667         * providers/mbox/camel-mbox-folder.c (_init): Set search cap on.
21668         (_open): Call parent class to perform open.  Remove folder-open
21669         check to parent instead.
21670         (_create): open takes a creation mask, dont use umask to try and
21671         set the open mode.
21672         (_delete): Dont bother checking folder==NULL, its already been
21673         checked on the external interface (changed to an assertion, this
21674         would have to be a camel bug).
21675         (_delete_messages): Likewise.
21676         (_create): Ditto.
21677         (_init): Dont go and clear all the paths and shit that the parent
21678         open just setup for us.
21679         (_delete_messages): Get rid of more umask stuff.
21680         (_append_message): Make sure we pass file mode to open with create.
21681         (_append_message): Cleaned up some indenting to make it readable.
21682
21683         * camel-stream-b64.c (my_read_encode): Fixed a typo.
21684
21685         * providers/mbox/camel-mbox-search.c: Changed to use e-sexp,
21686         rather than filter-sexp.
21687
21688 2000-02-28  bertrand  <bertrand@helixcode.com>
21689
21690         * camel-stream-b64.c (my_read_encode): encoding
21691         filter.
21692
21693 2000-02-23  bertrand  <Bertrand.Guiheneuf@aful.org>
21694
21695         * camel-stream-b64.c: changed the __static 
21696         suffix into a my_ prefix. 
21697         (camel_stream_b64_set_mode): reset the persistent
21698         status. 
21699         (my_read_decode): remove superfluous %
21700         
21701         * providers/mbox/camel-mbox-utils.c (camel_mbox_copy_file_chunk): 
21702         fix exception description message.
21703
21704 2000-02-24  Dan Winship  <danw@helixcode.com>
21705
21706         * camel-session.c: Add camel_session_get_transport_for_protocol.
21707
21708         * camel-transport.h:
21709         * camel-transport.c: Add an abstract CamelTransport class.
21710
21711         * providers/sendmail/*: A CamelTransport that uses sendmail
21712         to deliver mail.
21713
21714 2000-02-24  Dan Winship  <danw@helixcode.com>
21715
21716         * camel-folder.c: use CamelExceptions for run-time errors, not
21717         incorrect code. Don't bother validating that an object exists from
21718         inside one of its methods, since you couldn't have gotten there if
21719         it didn't. Fix some code style bugs.
21720
21721         (_init): Rename init_with_store to init and add parent_folder,
21722         separator, and name arguments.
21723         (_set_name): Get separator from self, not parent_store now.
21724
21725         * camel-store.h:
21726         * camel-store.c: Remove get/set_separator.
21727
21728         * providers/mbox/: Update for above.
21729
21730 2000-02-23  Dan Winship  <danw@helixcode.com>
21731
21732         * camel-medium.c (_finalize): Free the data in the headers hash
21733         table.
21734         (_add_header): g_strdup the header name and value when adding it.
21735
21736         * camel-mime-part-utils.c
21737         (camel_mime_part_construct_headers_from_stream): Free the header
21738         data after calling camel_medium_add_header, since it will have
21739         g_strdup()ed it itself.
21740
21741 2000-02-22  NotZed  <NotZed@HelixCode.com>
21742
21743         * providers/mbox/camel-mbox-search.c: Dont compile by default.
21744
21745         * providers/mbox/Makefile.am: Fuck off the filter code.
21746
21747 2000-02-22  bertrand  <Bertrand.Guiheneuf@aful.org>
21748
21749         * camel-stream-b64.c (read_decode__static): 
21750         don't read the char if we reached the length
21751         of the output buffer. Hours lost on this
21752         %$!@# bug : 3.5
21753
21754         * camel-folder.c (camel_folder_get_subfolder): 
21755         (camel_folder_create): 
21756         (camel_folder_delete): 
21757         (camel_folder_delete_messages): 
21758         (camel_folder_list_subfolders): 
21759         (camel_folder_expunge): 
21760         (camel_folder_get_message_by_number): 
21761         (camel_folder_get_message_count): 
21762         (camel_folder_append_message): 
21763         (camel_folder_copy_message_to): 
21764         (camel_folder_get_summary): 
21765         (camel_folder_get_message_uid): 
21766         (camel_folder_get_message_by_uid): 
21767         (camel_folder_get_uid_list): 
21768         Check folder state (open/close) and raise an
21769         exception if it is not ok. 
21770         
21771         * providers/mbox/camel-mbox-folder.c (_create): 
21772         create the file and the path with two different
21773         names.
21774
21775         * camel-folder.c (_create): handle the case 
21776         when the folder name starts with '/'
21777
21778         * camel-exception.c (camel_exception_new): use 
21779         (void) instead of () in decl.
21780
21781         * camel-exception.h: cosmetic fixes.
21782
21783         * camel-exception.c (camel_exception_init): new routine.
21784         Fix a bug in mail/message-list.c
21785         
21786
21787         * camel-folder.h: cosmetic changes.
21788
21789         * camel-stream-b64.c (reset__static): added a
21790         reset method. Thanks message-browser to find
21791         so much bugs :)
21792
21793         * providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): readd
21794         Unicode libs.
21795
21796 2000-02-21  bertrand  <Bertrand.Guiheneuf@aful.org>
21797
21798         * camel-formatter.c (lookup_unique_id): 
21799         awful hack to test get_output_stream.
21800         * camel-stream-b64.[ch] :
21801         b64 encoding/decoding is now implemented as
21802         a stream. 
21803
21804 2000-02-21  bertrand  <Bertrand.Guiheneuf@aful.org>
21805
21806         * camel-seekable-substream.c (_reemit_parent_signal): 
21807         emit "data_available" when parent stream emits it. 
21808
21809 2000-02-21  NotZed  <NotZed@HelixCode.com>
21810
21811         * providers/mbox/Makefile.am: Uh, fixed LIBADD again.  What was
21812         there was never ever going to work, wasn't it tested?
21813
21814 2000-02-21  Dan Winship  <danw@helixcode.com>
21815
21816         * camel-session.h: (struct _CamelSession): Add authenticator.
21817
21818         * camel-session.c (camel_session_new): Add authenticator.
21819         (camel_session_query_authenticator): New function to query the
21820         session authenticator for password, etc, information.
21821
21822 2000-02-21  Dan Winship  <danw@helixcode.com>
21823
21824         * camel-session.c: add CamelExceptions to several functions. Use
21825         camel_session_new to initialize the session and URL fields of
21826         created CamelStores as appropriate.
21827
21828         * camel-store.h:
21829         * camel-store.c
21830         * camel-service.h:
21831         * camel-service.c: Move the session and url (and associated
21832         functions) from CamelStore to CamelService. Add url_flags to
21833         CamelService so subclasses can specify which URL components
21834         are mandatory for them. Add camel_session_new for
21835         camel_session_get_store* to use.
21836
21837         * providers/mbox/camel-mbox-folder.c:
21838         * providers/mbox/camel-mbox-store.c:
21839         * providers/mbox/camel-mbox-store.h: Update for above changes.
21840
21841         * camel-exception-list.def: Once camel is being used for real,
21842         exceptions won't be renumberable. So renumber them now to make
21843         more room to add exceptions to the various categories later, and
21844         add a big warning message.
21845
21846 2000-02-20  Dan Winship  <danw@helixcode.com>
21847
21848         * providers/mbox/Makefile.am: add libibex back to
21849         libcamelmbox_la_LIBADD
21850
21851 2000-02-18  NotZed  <NotZed@HelixCode.com>
21852
21853         * providers/mbox/camel-mbox-search.h
21854         (camel_mbox_folder_search_by_expression): Added exception to call,
21855         and fixed caller.
21856
21857         * providers/mbox/camel-mbox-search.c
21858         (camel_mbox_folder_search_by_expression): Major changes, to use
21859         the sexp evaluator from filter/filter-sexp.c to implement the
21860         searching.
21861         (func_body_contains): Changed to support multiple strings in 1
21862         command (results or'd together)
21863
21864         * url-util.c (g_url_new): Fixed a typo (colon == 0 isn't right),
21865         and made it so full url's are absolute pathed (Dan, this is how it
21866         has to work!).  Also, always include a path part, even if it is an
21867         empty string.
21868
21869 2000-02-18  Dan Winship  <danw@helixcode.com>
21870
21871         * camel/camel-types.h: New header with the typedefs for all camel
21872         classes. Now the class headers can just include this and the
21873         header for the parent type. This makes it possible for
21874         CamelService to include a CamelSession without creating an
21875         #include loop.
21876
21877         * camel/*:      
21878         * composer/e-msg-composer-attachment-bar.h:
21879         * mail/folder-browser.c:
21880         * mail/message-list.c: frob #includes to match the new reality
21881
21882 2000-02-17  Dan Winship  <danw@helixcode.com>
21883
21884         * camel/camel-service.h:
21885         * camel/camel-service.c: Make camel-service us a Gurl internally.
21886         Remove the login/password interfaces and instead provide
21887         camel_service_connect_with_url. Add CamelExceptions
21888
21889 2000-02-17  bertrand  <Bertrand.Guiheneuf@aful.org>
21890
21891         * camel/camel-formatter.c (handle_text_plain): 
21892         (handle_text_html): use camel_stream_reset instead
21893         of seek. The formatter should be able to work 
21894         with all streams, not only seekable streams. 
21895         In the case where some provider implementation
21896         would not be able to provide a reset method 
21897         to their stream, implementors would have
21898         to find a workaround.
21899
21900         * camel/camel-session.c (camel_session_new): use
21901         (void) instean of () in function decl.
21902
21903         * camel/camel-folder.c: ifdef async operation 
21904         related code. 
21905
21906         * camel/camel-seekable-stream.c (_seek): added a warning.
21907         (_reset): default implementation of reset for seekable
21908         stream.
21909
21910         * camel/camel-mime-message.h: set_received_date declaration fix.
21911         cosmetic changes.
21912
21913         * camel/providers/mbox/camel-mbox-provider.c (camel_provider_module_init): 
21914         use (void) instead of ().
21915
21916         * camel/camel-stream.c (camel_stream_reset): 
21917         new method for CamelStream.
21918
21919 2000-02-17  Dan Winship  <danw@helixcode.com>
21920
21921         * camel/url-util.c (g_url_to_string): New function to convert
21922         a Gurl back into a char *.
21923
21924 2000-02-17  bertrand  <Bertrand.Guiheneuf@aful.org>
21925
21926         * camel/camel-formatter.c (handle_text_plain): 
21927         revamped so that it uses the output stream
21928         of the data wrapper
21929         (handle_text_html): ditto.
21930         
21931         
21932         * camel/camel-simple-data-wrapper.h: 
21933         * camel/camel-simple-data-wrapper.c (camel_simple_data_wrapper_new): 
21934         use (void) instead of ().
21935         (_get_output_stream): simple implementation. 
21936
21937 2000-02-16  bertrand  <Bertrand.Guiheneuf@aful.org>
21938
21939         * camel/camel-data-wrapper.c (_set_input_stream): ref input stream
21940         (_set_output_stream): ref output stream
21941         (_finalize): unref input and output streams
21942
21943         * camel/camel-seekable-substream.c (_set_bounds): don't
21944         seek the begining of the substream.
21945         (_eos): fix eos condition testing. 
21946         (_finalize): unref parent stream
21947         (_init_with_seekable_stream_and_bounds): ref parent stream
21948
21949         * camel/gstring-util.c (g_string_equal_for_hash): 
21950         (g_string_equal_for_glist): return type is int.
21951
21952         * camel/camel.h: 
21953         * camel/camel.c (camel_init): use (void) 
21954         instead of ().
21955         
21956 2000-02-16  NotZed  <NotZed@HelixCode.com>
21957
21958         * providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): Added
21959         libfilter to link line (temporarily?).  Required for
21960         filter-sexp.
21961
21962 2000-02-15  bertrand  <bertrand@helixcode.com>
21963
21964         * camel/camel-multipart.c (_localize_part): 
21965         this routine replaces the _read_part routine
21966         and does not store the part in a buffer. 
21967         (_set_input_stream): use the set_input_stream
21968         instead of the construct_from_stream.
21969         each bodypart is given an input stream. 
21970
21971         * camel/camel-mime-part-utils.c: 
21972         include the data-wrapper-repository header. 
21973         (camel_mime_part_construct_content_from_stream): 
21974         use the set_input_stream instead of the 
21975         construct_from_stream method. 
21976
21977         * camel/camel-seekable-substream.c (_set_bounds): 
21978         cur position is set to 0 not to inf_bound.
21979
21980 2000-02-15  bertrand  <Bertrand.Guiheneuf@aful.org>
21981
21982         * camel/camel-mime-part.c: include gmime-base64.h
21983         various compilation and runtime fixes.
21984         (_set_input_stream): store the input substream 
21985         for the content object.
21986
21987         * camel/camel-data-wrapper.h: declare the 
21988         set/get function on input/output stream.
21989
21990         * camel/camel-mime-part.c (_get_content_object): 
21991         don't use a temporary mem stream.
21992
21993         * camel/camel-seekable-substream.c (_seek): 
21994         (_eos): 
21995         (_read): the substream can be unlimited in length
21996
21997         * camel/camel-data-wrapper.c (camel_data_wrapper_class_init): 
21998         set the get/set_input/output_stream methods.    
21999
22000         * camel/camel-multipart.c (_construct_from_stream): 
22001         camel_stream_seek -> camel_seekable_stream_seek
22002
22003 2000-02-14  Miguel de Icaza  <miguel@gnu.org>
22004
22005         * camel/providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): Add
22006         the unicode libraries as well.
22007
22008         * camel/camel-provider.c (camel_provider_register_as_module): Add
22009         error reporting here.  Desire to use Solaris increases.  Hair loss
22010         in the last two hours: 5,400.
22011
22012         * camel/providers/mbox/camel-mbox-provider.c
22013         (camel_mbox_get_provider): Renamed function.
22014
22015         * camel/camel.h: All include files use camel/ now here.
22016
22017         * camel/providers/mbox/Makefile.am: Drop all the dynamism from
22018         Camel, and make this a standard library.
22019
22020 2000-02-14  bertrand  <Bertrand.Guiheneuf@aful.org>
22021
22022         * camel/gmime-utils.c (get_header_array_from_stream): use the 
22023         eos stream method. 
22024         (gmime_read_line_from_stream): ditto.
22025
22026         * camel/camel-stream-fs.h (struct ): add the eof field
22027         cosmetics changes. 
22028
22029         * camel/camel-stream-fs.c (camel_stream_fs_init): set eof.
22030         (_read): set eof on end of file.
22031         (_eos): implemented.
22032
22033         * camel/gmime-utils.c (get_header_array_from_stream): 
22034         make a blocking version of the header parser. 
22035         When the fs stream uses gnome-vfs, this should
22036         be changed. 
22037         (gmime_read_line_from_stream): ditto. 
22038
22039 2000-02-11  bertrand  <Bertrand.Guiheneuf@aful.org>
22040
22041         * camel/camel-stream-fs.c: 
22042         everywhere, when using the cur_pos field, do it
22043         on the CamelSeekableStream object.
22044         (_seek): small fix. 
22045
22046         * camel/camel-seekable-stream.c (camel_seekable_stream_seek): 
22047         s/camel_stream_seek/camel_seekable_stream_seek/g
22048
22049         * camel/camel-seekable-stream.h: 
22050         (struct ): added a field to store the
22051         current position.
22052
22053         * camel/camel-seekable-stream.c (camel_seekable_stream_get_current_position): 
22054         New function. Allows to get the current position 
22055         of a seekable stream.
22056         
22057
22058 2000-02-13  NotZed  <notzed@zedzone.helixcode.com>
22059
22060         * providers/mbox/camel-mbox-search.c: New file, implements the
22061         search api for mbox folders.
22062
22063         * providers/mbox/Makefile.am: Link with ibex.
22064
22065         * camel-folder.c (camel_folder_has_search_capability): Api
22066         additions.
22067         (camel_folder_search_by_expression): Ditto.
22068
22069 2000-02-12  NotZed  <notzed@zedzone.helixcode.com>
22070
22071         * providers/mbox/camel-mbox-folder.c (_set_name): Setup index
22072         filename as well.
22073         (_init_with_store): Init index filename.  Hmm, none of these
22074         names ever seem to get free'd (FIXME?)
22075
22076         * providers/mbox/camel-mbox-folder.h: Add index file name.
22077
22078 2000-02-12  NotZed  <notzed@helixcode.com>
22079
22080         * camel-folder.h: Add folder search functions.
22081
22082         ** Created ChangeLog just for camel **
22083          - refer to ../ChangeLog for changes prior to this date.