Updated to support searching as well as making it use CamelDigestSummary.
[platform/upstream/evolution-data-server.git] / camel / ChangeLog
1 2002-06-20  Jeffrey Stedfast  <fejj@ximian.com>
2
3         * camel-digest-folder.c: Updated to support searching as well as
4         making it use CamelDigestSummary.
5
6         * camel-digest-summary.[c,h]: New class to handle the summary for
7         CamelDigestFolder.
8
9         * camel-tcp-stream-ssl.c (set_errno): PR_IO_TIMEOUT_ERROR should
10         map to ETIMEDOUT and not EAGAIN.
11         (stream_connect): Reset the PR_Poll() timeout back to 2 minutes as
12         this wasn't the problem afterall.
13
14 2002-06-19  Not Zed  <NotZed@Ximian.com>
15
16         * camel-mime-parser.c (folder_scan_drop_step): Drop back to
17         initial state if we came from eof state.
18
19 2002-06-19  Jeffrey Stedfast  <fejj@ximian.com>
20
21         * camel-tcp-stream-ssl.c (stream_connect): Set the poll timeout to
22         be PR_INTERVAL_MIN, this one shouldn't need to be 2 minutes (plus
23         it blocks my connection at home for far too long).
24
25         * providers/imap/camel-imap-folder.c (imap_refresh_info): Make
26         sure we hold the command_lock before accessing current_folder.
27         (imap_append_online): Same.
28         (imap_transfer_online): Same.
29
30         * providers/imap/camel-imap-store.c (delete_folder): We need to
31         hold the command_lock before we can set the current_folder to
32         NULL.
33         (rename_folder): Same.
34         (get_folder_info_online): We need to make sure we hold the
35         command_lock in order to use current_folder.
36         (everywhere): Same.
37
38 2002-06-19  Jeffrey Stedfast  <fejj@ximian.com>
39
40         * providers/smtp/camel-smtp-transport.c (smtp_connect): Don't
41         bother trying to authenticate (and thus don't throw up an error
42         dialog) unless the server is an ESMTP server and supports
43         authentication.
44
45         * camel-sasl-plain.c: Change the user-friendly name to PLAIN, this
46         is what it should be. Not "Password" because user's immediately
47         think that they need authentication when they see "Password" even
48         if they don't need it at all.
49
50 2002-06-17  Jeffrey Stedfast  <fejj@ximian.com>
51
52         * camel-vee-folder.c (camel_vee_folder_add_folder): Update the
53         freeze state of the new source folder.
54         (camel_vee_folder_remove_folder): Undo any freeze state that we
55         have imposed on this source folder.
56
57 2002-06-14  Jeffrey Stedfast  <fejj@ximian.com>
58
59         * camel-vee-folder.c (vee_freeze): Freeze source folders.
60         (vee_thaw): Thaw all source folders. Fixes bug #24317.
61
62         * providers/imap/camel-imap-folder.c (imap_sync_online): Unlock
63         the command_lock after each UID STORE command so that other
64         (probably more important) threads can send their requests.
65
66         * camel-arg.c:
67         * camel-disco-diary.c:
68         * camel-index-control.c:
69         * camel-mime-part.c:
70         * camel-pgp-mime.c:
71         * camel-store.c:
72         * camel-tcp-stream-ssl.c:
73         * camel-text-index.c: Fixed compiler warnings.
74
75         * camel-multipart-signed.c: Updated to use ctx->sign_protocol
76         rather than ctx->protocol.
77
78         * camel-cipher-context.h: Add an ecnryption protocol member.
79
80         * camel-pgp-context.c (camel_pgp_context_init): Set the encryption
81         protocol.
82
83 2002-06-11  Not Zed  <NotZed@Ximian.com>
84
85         * camel-vtrash-folder.c (camel_vtrash_folder_class_init): Our
86         parent class is camel_vee_folder, not camel_folder, fix setting of
87         parent folder (unused anyway, but removes a run-time warning).
88
89 2002-06-07  Not Zed  <NotZed@Ximian.com>
90
91         * camel-pgp-context.c (camel_pgp_context_init): Duh!  The protocol
92         is application/pgp-signature.  TODO: need to have a signed and an
93         encrypted protocol specified separately.
94
95 2002-06-06  Not Zed  <NotZed@Ximian.com>
96
97         * camel-folder-thread.c (thread_summary): Do the work here.
98         (camel_folder_thread_messages_remove): Implement.  Remove some
99         uid's from the tree.   Disalbe from build, for now.
100         (remove_uid_node_rec): Actually do the work.
101         (camel_folder_thread_messages_add): Implement.  Add some summary
102         items to the tree.  Disable from build though.
103         (camel_folder_thread_messages_apply): Make a thread tree built
104         using camel_folder_thread_new() map to a new set of uids,
105         preserving some order.  Meant primarily to manage deleted + added
106         uids in a user-friendly manner.
107
108 2002-06-09  Jeffrey Stedfast  <fejj@ximian.com>
109
110         * camel-multipart-signed.c (camel_multipart_signed_verify): Use
111         CAMEL_EXCEPTION_SYSTEM rather than '1' for clarity.
112
113 2002-06-07  Jeffrey Stedfast  <fejj@ximian.com>
114
115         * camel-tcp-stream-ssl.c (stream_connect): Up the timeout on the
116         connect code to 2 minutes.
117
118 2002-06-05  Dan Winship  <danw@ximian.com>
119
120         * camel-mime-utils.c (header_decode_mailbox): Parse
121         "From: Dan Winship <danw>" (with no domain) in the way the sender
122         meant it, even though it's completely wrong.
123
124 2002-06-04  Not Zed  <NotZed@Ximian.com>
125
126         * providers/local/camel-local-provider.c: Remove the
127         CONF_DEFAULT_PATH entry, as this is handled by the url config
128         stuff.  This made it basically impossible to configure any local
129         folder from the gui.
130
131         * providers/local/camel-local-folder.c (local_refresh_info): Force
132         a refresh.  Should work for all local folders to force them to
133         refresh.
134
135         * providers/local/camel-maildir-folder.c (maildir_refresh_info):
136         Removed, moved into camel-local-folder.
137
138         * providers/local/camel-mh-summary.c (mh_summary_next_uid_string):
139         Once we assign or get a uid, tell the summary of this, so the next
140         uid we get will be higher than any previously.
141
142         * camel-object.c (camel_object_ref, camel_object_unref): I got
143         sick of casting, these now take void * like they should, and
144         perform their own run-time type checking.
145
146         * providers/local/camel-mh-store.c (recursive_scan): Changed to
147         use stat, not lstat (*shrug* maybe someone wants to softlink their
148         maildir tree?).
149         (inode_hash):
150         (inode_equal):
151         (inode_free): Copied from camel-maildir store (should put into
152         camel-local-store or utils?).
153         (recursive_scan): Changed to check for re-visiting inodes.  Also,
154         it builds the tree itself, rather than using folder_info_build.
155         (add_folder): Changed to folder_info_new.
156         (recursive_scan): Properly honour the recursive flag.  Also,
157         lookup unread count from folder.
158         (folder_info_new): Init unread message count to -1, since we dont
159         know yet.
160         (folder_info_new): Take the name as an argument, and perform the
161         merging here.
162         (folders_update): Util func to add/remove folders from .folders
163         file.  I'm assuming its sorted.
164         (get_folder): Add the folder to .folders if we created a new one,
165         and if it exists.
166         (delete_folder): Remove from .folders, etc.
167         (folders_scan): If we have a .folders file, read and use that
168         instead.
169         (recursive_scan): Handle scanning from a particular directory
170         properly.
171         (rename_folder): Implement so we can track any changes to the
172         .folders file if its turned on.
173
174         ** Applied patch below from Greg Hudson.
175         
176 2002-05-10  Greg Hudson  <ghudson@mit.edu>
177
178         * camel-mh-store.c (get_inbox, get_folder_info, recursive_scan,
179         add_folder): Implement support for MH stores.
180
181         * camel-mh-summary.c (mh_summary_check, sort_uid_cmp): Sort MH
182         messages by message number (uid), like we sort maildir messages by
183         date.
184
185         * camel-local-provider.c (mh_provider): Turn on source and store
186         flags.
187
188 2002-06-03  Not Zed  <NotZed@Ximian.com>
189
190         * camel-vee-folder.c (camel_vee_folder_add_folder):
191         (folder_changed_change):
192         (folder_changed_remove_uid):
193         (folder_changed_add_uid):
194         (vee_folder_build_folder): Check that any unmatched operation is
195         not concerning any vfolder.  Other vfolders should never be part of any
196         unmatched handling.  For #24615, and others probably.
197
198 2002-06-02  Not Zed  <NotZed@Ximian.com>
199
200         * camel-sasl.c (camel_sasl_new): 
201         (camel_sasl_finalize): setup/free the mech string.
202
203         * camel-sasl.h: Added 'mech' mechanism string.
204
205 2002-06-01  Not Zed  <NotZed@Ximian.com>
206
207         * providers/imap/camel-imap-folder.c (imap_getv): Implement.  Only
208         the object_description arg.
209         (camel_imap_folder_get_type): Init parent_class holder.
210
211         * providers/local/camel-local-folder.c (local_getv): Implement,
212         object_description arg.
213
214         * camel-folder.c (folder_getv): Implement, add a bunch of args you
215         can get -> camel_folder_get_unread_count etc will be going RSN i
216         hope.
217         (camel_folder_finalize): Free cached description string.
218
219         * camel-object.c (cobject_getv): Implement
220         CAMEL_OBJECT_ARG_DESCRIPTION, just return the classname of the
221         object.
222         (camel_object_getv): 
223         (camel_object_get): 
224         (camel_object_setv): 
225         (camel_object_set): Take object = void *, to simplify usage.
226         (camel_object_setv): Removed unecessary locals.
227         (camel_object_getv): Same.
228         (camel_object_free): New method, free an arg, upto implementations
229         whether args are static/const or not.
230         (cobject_free): Implement a dummy do nothing free.
231
232 2002-05-31  Not Zed  <NotZed@Ximian.com>
233
234         * camel-vee-folder.c (camel_vee_folder_get_location): new function
235         to get the real location (folder) (and uid) of a vfolder object.
236         Using the folderinfo, since we already have it, maybe it should
237         use the uid.
238
239 2002-05-31  Jeffrey Stedfast  <fejj@ximian.com>
240
241         * providers/imap/camel-imap-folder.c (get_content): When the part
242         is a multipart/signed, make sure to free the part_spec before
243         returning (the other types already did this properly).
244
245         * providers/imap/camel-imap-message-cache.c
246         (camel_imap_message_cache_get): Free the path buffer when we're
247         done with it.
248
249         * providers/imap/camel-imap-folder.c (imap_update_summary): Free
250         the final tagged response buffer.
251
252         * providers/imap/camel-imap-command.c (imap_read_untagged): If we
253         fail to read a literal, free the temporary string buffer.
254
255         * providers/imap/camel-imap-folder.c (imap_rescan): Revert my fix
256         from the other day since camel_imap_command_response() doesn't
257         guarentee that resp will be set to NULL on error.
258
259         * camel-data-cache.c (camel_data_cache_get): If we fail to be able
260         to create a stream to insert into the cache, then free the 'real'
261         path.
262
263 2002-05-30  Not Zed  <NotZed@Ximian.com>
264
265         * camel-cipher-context.h: Added a protocol field for users to use.
266
267         * camel-stream-filter.c (do_read): Sigh, the pre-size is READ_PAD
268         not READ_SIZE.  Big difference.
269         (READ_PAD): Bumped upto 128 from 64, so we can fit a typical line
270         in full.
271
272         * providers/imap/camel-imap-folder.c (get_content): Changed to
273         load multipart/signed as an opaque block into the right kind of
274         object.
275
276         * camel-multipart.h (struct _CamelMultipart): Removed the boundary
277         field.  It wans't actually used anywhere.
278
279         * camel-seekable-substream.c
280         (camel_seekable_substream_new_with_seekable_stream_and_bounds):
281         Shortened this stupidly long name to just :new(), its the only way
282         its ever used.  Fixed all callers.
283
284         * camel-multipart-signed.[ch]: new wrapper for multipart/signed
285         types.  We need to treat the entire content as a blob of data for
286         transport purposes.  This also cleans up a lot of the sign/verify
287         handling.
288
289         * camel-mime-part-utils.c
290         (camel_mime_part_construct_content_from_parser): Just call
291         camel_multipart_construct_from_parser for multipart parts, also
292         use a multipart_signed for multipart/signed types.
293
294         * camel-multipart.c (camel_multipart_construct_from_parser): New
295         virtual function for multiparts to buld themselves.
296         (construct_from_parser): Implement for normal multiparts.
297         (toplevel): Got rid of a warning, it'll never be an abstract
298         class.
299
300         * camel-pgp-context.c (pgp_hash_to_id): 
301         (pgp_id_to_hash): Implement.
302         (camel_pgp_context_init): Init the pgp protocol specifier.
303
304         * camel-cipher-context.c (camel_cipher_id_to_hash): 
305         (camel_cipher_hash_to_id): Util virtual methods to handle the
306         cipher id string.
307
308         * camel-mime-filter-canon.[ch]: A new filter, end/start of line
309         canonicalisation filter.  Can escape "From " and strip trailing
310         whitespace, and canonicalise the end of line to crlf or to lf.
311
312 2002-05-29  Not Zed  <NotZed@Ximian.com>
313
314         * camel-multipart.h (struct _CamelMultipart): Removed the
315         'parent', nothing used it, anywhere.  Cleaned up some formatting
316         slightly.
317
318 2002-05-30  Jeffrey Stedfast  <fejj@ximian.com>
319
320         * providers/imap/camel-imap-store.c (camel_imap_store_readline):
321         On error, don't leak the GByteArray buffer.
322
323         * providers/imap/camel-imap-folder.c (imap_rescan): Free the
324         response before checking for errors. I'm not sure this'll actually
325         fix the memory leak here, but it might? Certainly can't hurt.
326
327         * camel-block-file.c (camel_block_file_finalise): Destroy the
328         blocks hash table.
329
330 2002-05-29  Jeffrey Stedfast  <fejj@ximian.com>
331
332         * providers/imap/camel-imap-store.c (connect_to_server): Only free
333         the LOGOUT response if it is non-NULL.
334
335 2002-05-28  Not Zed  <NotZed@Ximian.com>
336
337         * providers/local/camel-maildir-folder.c (maildir_refresh_info):
338         Implement.  Run a summary check to update for any newly arrived
339         messages.
340
341         * providers/local/camel-maildir-store.c (scan_dir): If we have a
342         folder, execute a refresh_info on it, to suck in any new stuff.
343
344 2002-05-28  Jeffrey Stedfast  <fejj@ximian.com>
345
346         * camel-filter-driver.c (camel_filter_driver_log): Use the
347         CamelMessageInfo rather than the CamelMimeMessage because the
348         message may not have been loaded (thus NULL).
349
350 2002-05-27  Jeffrey Stedfast  <fejj@ximian.com>
351
352         * providers/smtp/camel-smtp-transport.c (connect_to_server): On
353         connection failure, unref the tcp stream.
354
355         * providers/pop3/camel-pop3-store.c (connect_to_server): On
356         connection failure, unref the tcp stream.
357
358         * providers/imap/camel-imap-store.c (connect_to_server): On
359         connection failure, unref the tcp stream.
360
361         * providers/nntp/camel-nntp-store.c (nntp_store_query_auth_types):
362         Our parent class is no longer CamelRemoteStore.
363         (nntp_store_init): Same.
364         (camel_nntp_store_get_type): Here too.
365         (nntp_connect): Rewritten to try to connect via SSL. Also remove
366         code using CamelRemoteStore.
367         (camel_nntp_command): Don't call camel_remote_store_connected().
368
369 2002-05-24  Jeffrey Stedfast  <fejj@ximian.com>
370
371         * providers/imap/camel-imap-folder.c (content_info_get_part_spec):
372         Helps if we allocate enough space here. Also, start smoking the
373         same purple flavoured IMAP crack when counting parts (parts don't
374         count if their parent part is a message/* part with a parent
375         part). Fixes bug #25260.
376
377 2002-05-24  Jeffrey Stedfast  <fejj@ximian.com>
378
379         * providers/imap/camel-imap-command.c (imap_read_untagged): Use
380         the new readline function.
381
382         * providers/imap/camel-imap-store.c (connect_to_server): Use the
383         new camel_imap_store_readline() function which doesn't suck quite
384         as bad as the original camel_remote_store_recv_line() function.
385         (camel_imap_store_readline): New function to replace
386         camel_remote_store_recv_line(). This function is at least safe
387         with embedded nul chars. Not that any of our callers use it
388         *sigh*.
389
390 2002-05-24  Jeffrey Stedfast  <fejj@ximian.com>
391
392         * providers/imap/camel-imap-store.c (connect_to_server): Added
393         some NULL protection fixes.
394
395 2002-05-22  Jeffrey Stedfast  <fejj@ximian.com>
396
397         * camel-remote-store.c: Removed from the build. Glory glory
398         hallelujah.
399
400         * camel-disco-store.c: Updated to inherit from
401         CamelStore rather than CamelRemoteStore.
402
403         * providers/imap/camel-imap-command.c (imap_command_start): Don't
404         use the camel-remote-store shit to send a string. Just use
405         camel_stream_printf for chrissakes.
406
407         * providers/imap/camel-imap-store.c: Updated to not depend on
408         CamelRemoteStore and to handle STARTTLS.
409         (imap_disconnect_online): Unref the streams.
410         (imap_keepalive): Removed.
411         (camel_imap_store_connected): New function to replace
412         camel_remote_store_connected().
413         (camel_imap_store_finalize): Unref the streams.
414         (camel_imap_store_recv_line): New function to replace
415         camel_remote_store_recv_line().
416         (imap_get_capability): Renamed from connect_to_server
417         (connect_to_server): New function to try and connect to the
418         server.
419         (connect_to_server_wrapper): New wrapper function around
420         connect_to_server that takes the ssl modes into consideration.
421         (query_auth_types): Don't bother calling our parent's
422         implementation of query_auth_types() since CamelDiscoStore doesn't
423         have any anyway.
424         (imap_get_name): New method to implement CamelService::get_name
425
426 2002-05-18  Not Zed  <NotZed@Ximian.com>
427
428         * camel-search-private.c (camel_utf8_getc): If we get an invalid
429         start char, just ignore it and goto the next character.
430
431 2002-05-16  Jeffrey Stedfast  <fejj@ximian.com>
432
433         * providers/imap/camel-imap-store.c (get_folder_offline): Don't
434         call some retarded function to simply set an exception.
435
436         * camel-filter-search.c (get_label): New e-sexp callback function
437         to get a user_tag label value.
438
439 2002-05-15  Jeffrey Stedfast  <fejj@ximian.com>
440
441         * providers/imap/camel-imap-utils.c
442         (imap_parse_namespace_response): New function to parse a NAMESPACE
443         response properly.
444         (imap_namespaces_destroy): New function to destroy the returned
445         structure from the above function.
446
447 2002-05-15  Jeffrey Stedfast  <fejj@ximian.com>
448
449         * camel-service.c (service_setv): Only reconnect if we are already
450         connected, if we are in a disconnected state then no need to
451         reconnect.
452
453         * providers/imap/camel-imap-folder.c (get_content): If the
454         part_spec is an empty string for a leaft part, use "1" since we
455         don't actually want to get the raw message headers too.
456
457 2002-05-15  Not Zed  <NotZed@Ximian.com>
458
459         * providers/imap/camel-imap-store.c (refresh_folder_info): removed.
460         (imap_store_refresh_folders): Copy the folders first, then refresh
461         them, outside of the cache_lock, which could cause deadlocks
462         because of a workaround for crappo exchange.
463         (imap_disconnect_online): Dont pass an exception to LOGOUT
464         command.  The required response 'BYE' always sets an exception
465         when we call LOGOUT.  This also interfered with a lot of other
466         processing causing partial failures and messed up offline/online
467         state.
468
469         * camel-disco-folder.c (disco_prepare_for_offline): Do progress
470         reporting.
471
472 2002-05-14  Jeffrey Stedfast  <fejj@ximian.com>
473
474         Fixes bug #24136.
475
476         * providers/imap/camel-imap-folder.c (content_info_get_part_spec):
477         New function to take a CamelMessageContentInfo and generate a
478         part-specification string.
479         (get_content): Stop passing around part_spec strings and use
480         content_info_get_part_spec instead.
481
482         * camel-folder-summary.c (camel_content_info_dump): Made this into
483         a public debugging function.
484
485         * providers/imap/camel-imap-utils.c (imap_parse_body): Make sure
486         to set the parent of any message/rfc822 subparts.
487
488 2002-05-13  Jeffrey Stedfast  <fejj@ximian.com>
489
490         * providers/imap/camel-imap-folder.c (imap_get_message): Previous
491         fix reverted.
492
493 2002-05-13  Jeffrey Stedfast  <fejj@ximian.com>
494
495         * providers/imap/camel-imap-store.c (camel_imap_store_class_init):
496         Overload the setv/getv CamelObject virtual methods.
497         (imap_setv): Implemented.
498         (imap_getv): Implemented.
499
500 2002-05-13  Dan Winship  <danw@ximian.com>
501
502         * camel-folder.c (camel_folder_append_message): Add a "char
503         **appended_uid" argument, for the caller to optionally pass in a
504         variable to receive the UID of the appended message (if the
505         provider knows it).
506         (camel_folder_transfer_messages_to): Likewise, add "GPtrArray
507         **transferred_uids"
508         (transfer_messages_to): Update default implementation to handle
509         transferred_uids.
510
511         * camel-disco-folder.c (disco_append_message,
512         disco_transfer_messages_to): Update for API changes.
513
514         * camel-disco-diary.c (camel_disco_diary_replay): Update the
515         diary's temporary uid->real uid map when replaying appends and
516         transfers.
517
518         * providers/imap/camel-imap-folder.c (imap_append_offline,
519         imap_append_online, imap_transfer_offline): Pass back the new
520         UIDs, when requested and available.
521         (imap_append_resyncing): Pass back the new UIDs when requested and
522         available. Remove the diary uidmap managing code since
523         CamelDiscoDiary can handle that itself now.
524         (imap_transfer_online, imap_transfer_resyncing): Update for new
525         APIs, but don't actually pass back the new UIDs yet. (It's tricky
526         since the COPYUID response may not be in the same order as the
527         input uids.)
528         
529         * providers/local/camel-maildir-folder.c (maildir_append_message):
530         Pass back the new UID if requested.
531
532         * providers/local/camel-mbox-folder.c (mbox_append_message):
533         Likewise.
534
535         * providers/local/camel-mh-folder.c (mh_append_message): Likewise.
536
537         * providers/local/camel-spool-folder.c (spool_append_message):
538         Likewise.
539
540         * camel-digest-folder.c (digest_append_message,
541         digest_transfer_messages_to): Update for API changes.
542
543         * camel-filter-driver.c (camel_filter_driver_filter_message,
544         do_copy, do_move): Update for API changes.
545
546         * camel-vee-folder.c (vee_append_message,
547         vee_transfer_messages_to): Likewise.
548
549         * camel-vtrash-folder.c (vtrash_append_message,
550         vtrash_transfer_messages_to): Likewise. 
551
552 2002-05-13  Not Zed  <NotZed@Ximian.com>
553
554         * camel-folder-thread.c
555         (camel_folder_thread_messages_new_summary):
556         (camel_folder_thread_messages_new): Since the fix for #3357 uses
557         'order=0' to indicate tree structure nodes, make sure we dont
558         actually set order=0 for valid messages, otherwise we silently
559         lose duplicates of the first message (i==0).  Fixes #19920.
560
561 2002-05-10  Jeffrey Stedfast  <fejj@ximian.com>
562
563         * providers/imap/camel-imap-folder.c (imap_get_message): Fetch the
564         BODYSTRUCTURE rather than BODY since BODY seems to be lacking some
565         of the data we need. This fixes bug #24136.
566
567         * camel-transport.c (camel_transport_get_type): Might help if we
568         called camel_transport_class_init.
569
570 2002-05-10  Dan Winship  <danw@ximian.com>
571
572         * camel-folder.c (camel_folder_transfer_messages_to): Replace
573         copy_messages_to and move_messages_to with a single function that
574         just takes a "delete_originals" flag. Also, use the vtrash
575         implementation if *either* folder is a vtrash.
576         (transfer_messages_to): Make this use camel_operation_progress
577         (previously move_messages_to did but copy_messages_to didn't), and
578         freeze/thaw the folder(s) if doing multiple messages.
579
580         * camel-vtrash-folder.c (vtrash_transfer_messages_to): Update for
581         move/copy merge. Move the "move messages into vtrash" code here
582         from mail-ops.c. Now all of the vtrash move/copy special casing is
583         in camel instead of half of it being here and half in mail/. (This
584         should also make it so that "Move to Trash" will work in filter
585         rules.)
586
587         * camel-vee-folder.c (vee_transfer_messages_to): Make this just
588         return an exception, since it will only be called when trying to
589         move/copy messages from one vfolder to another.
590         (vee_append_message): Add this too so we get a nicer error message
591         than the default "unimplemented" one in camel-folder.c.
592
593         * camel-digest-folder.c: Replace copy_messages_to and
594         move_messages_to with transfer_messages_to.
595
596         * camel-disco-folder.c: Likewise
597
598         * camel-disco-diary.c (camel_disco_diary_log,
599         camel_disco_diary_replay): replace MOVE/COPY with TRANSFER.
600
601         * providers/imap/camel-imap-folder.c (imap_transfer_offline,
602         imap_transfer_online, imap_transfer_resyncing): Update for
603         changes. (This ends up being a bit more complicated than it was
604         before for now, but later disconnected operation changes should
605         resimplify it.)
606
607         * camel-filter-driver.c (camel_filter_driver_filter_message,
608         do_copy, do_move): Use transfer_messages_to instead of copy.
609
610 2002-05-09  Jeffrey Stedfast  <fejj@ximian.com>
611
612         * camel-filter-search.c (shell_exec): New filter function to pipe
613         a message to another program.
614         (run_command): Fixed some bugs to make this work.
615
616 2002-05-09  Not Zed  <NotZed@Ximian.com>
617
618         * camel-service.c (camel_service_disconnect): Instead of testing
619         for SERVICE_CONNECTED, we need to also handle SERVICE_CONNECTING
620         too, as it will often have setup some details before it failed.
621         Make it !DISCONNECTED (and !DISCONNECTING for recursive calls,
622         which happen).  Fixes #23782, and maybe also #21604 and many other
623         random crashes.
624
625 2002-05-08  Jeffrey Stedfast  <fejj@ximian.com>
626
627         * camel-digest-store.c (digest_setv): Implemented.
628         (digest_getv): Implemented.
629
630         * camel-disco-store.c (disco_setv): Implemented.
631         (disco_getv): Implemented.
632
633         * camel-remote-store.c (remote_store_setv): Implemented.
634         (remote_store_getv): Implemented.
635
636         * camel-transport.c (camel_transport_class_init): Implemented.
637         (transport_setv): Implemented.
638         (transport_getv): Implemented.
639
640         * camel-store.c (store_setv): Implemented.
641         (store_getv): Implemented.
642
643         * camel-service.c (service_setv): Implemented.
644         (service_getv): Implemented.
645
646         * providers/pop3/camel-pop3-store.c (pop3_try_authenticate):
647         camel_pop3_engine_iterate doesn't return the state, it returns -1
648         on fail, 0 when finished processing request or >0 if more ops are
649         in the queue, so don't check status against CAMEL_POP3_STATE_OK,
650         instead check pcp->state against that.
651
652 2002-05-07  Jeffrey Stedfast  <fejj@ximian.com>
653
654         * camel-object.h: s/class/klass for arguments so that c++
655         developers don't complain later.
656
657 2002-05-07  Dan Winship  <danw@ximian.com>
658
659         * camel-object.c (camel_object_class_cast): Fix a crash in a
660         g_warning.
661
662 2002-05-07  Not Zed  <NotZed@Ximian.com>
663
664         * camel-remote-store.c (remote_send_string): Check for LOGIN xxxx
665         as well if debug is on, so we dont print passwords to evolution
666         logs.
667
668         * providers/imap/camel-imap-utils.c (imap_is_atom_char): This was
669         really broken.  1. isprint() is locale dependent, and 2. it looked
670         up an 8 bit value in a 7 bit table without truncating it.  I've
671         removed the isprint() stuff and just put it directly into the
672         special table, which i've expanded to the right size too.
673
674         * providers/imap/*: Applied patch from Preston Elder
675         <prez@magick.tm> to make camel only use literals if it needs to
676         for simple strings.  Changed slightly to use imap_is_atom() and
677         more consistent formatting.
678         providers/imap/camel-imap-utils.c (imap_is_atom): Chagned from
679         imap_needs_quoting().
680
681         ** Merged in camel-object2 branch.  Simpler camelobject
682         implementation + object args interface.
683
684         * camel.c (camel_init): Call camel_object_get_type() to make sure
685         camel_object_type is initialised.
686
687         * camel-object.h (CAMEL_OBJECT_TYPE): Changed to return global
688         camel_object_type pointer, not call camel_object_get_type.
689         
690 2002-05-06  Jeffrey Stedfast  <fejj@ximian.com>
691
692         * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): If
693         the pop3 command status is -1, then we probably have a TCP error
694         (?) so set a SYSTEM exception so our caller can distinguish
695         between a "bad password" and a "tcp error".
696         (pop3_connect): Only uncache the password on "bad password"
697         errors.
698
699         * camel-pgp-mime.c (pgp_mime_part_sign_prepare_part): Use
700         CamelMimeFilterBestenc to get a more appropriate encoding rather
701         than just blindling assigning QP.
702
703         * providers/imap/camel-imap-folder.c (do_append): Call
704         camel_mime_message_encode_8bit_parts() which fixes bug #10885.
705
706         * camel-tcp-stream-raw.c (socket_connect): Don't bother with
707         counting down the timeout.
708
709 2002-05-02  Jeffrey Stedfast  <fejj@ximian.com>
710
711         * camel-stream-fs.c (stream_read): Same fix as the tcp stream.
712         (stream_write): Again here. Just like tcp stream's stream_write(),
713         also make sure to save errno before calling fcntl to restore the
714         fd flags.
715
716         * camel-tcp-stream-raw.c (stream_read): Handle EINTR errors for
717         select().
718         (stream_write): Same and also preserve errno when setting the fd
719         flags back. If w == -1, return -1.
720
721 2002-05-02  Jeffrey Stedfast  <fejj@ximian.com>
722
723         * camel-mime-utils.c (header_decode_mailbox): Fixed the fix for
724         stupidly-broken-mailer bug #5 to work when multiple unescaped
725         characters were in a row. Fixes bug #24140.
726
727         * camel-tcp-stream-raw.c (socket_connect): Check select() for
728         EINTR errors.
729
730         * camel-pgp-context.c (crypto_exec_with_passwd): Change the order
731         of some code so that we check if the select() failed before we
732         check for user-cancellation.
733
734         * camel-service.c (camel_gethostbyname): Check for EINTR when
735         select()ing.
736         (camel_gethostbyaddr): Same.
737
738 2002-04-29  Jeffrey Stedfast  <fejj@ximian.com>
739
740         * camel-provider.c (camel_provider_auto_detect): Now takes a
741         CamelURL argument rather than a GHashTable *settings argument.
742
743 2002-04-29  Not Zed  <NotZed@Ximian.com>
744
745         * providers/local/camel-spool-store.c (get_folder_info): We want
746         to set unread_count to get_unread_message_count, not
747         get_message_count().  Might fix #17174.  Also removed FIXME: as it
748         was fixed.
749
750 2002-04-26  Jeffrey Stedfast  <fejj@ximian.com>
751
752         * providers/local/Makefile.am: Don't link to libibex.a anymore.
753
754         * providers/nntp/Makefile.am: Same.
755
756         * providers/imap/Makefile.am: And again here.
757
758         * camel-store-summary.h: No longer want to #include
759         <libibex/ibex.h>
760
761         * camel-provider.c (camel_provider_auto_detect): New function to
762         auto-detect configuration settings.
763
764 2002-04-26  Not Zed  <NotZed@Ximian.com>
765
766         * camel-block-file.c (block_file_validate_root): Remove the
767         excessive \n's, after printfs.
768
769         * camel-text-index.c (text_index_compress_nosync): @!#$@#$!@$#!.
770         Since the rename op was fixed, this broke compression's rename,
771         resulting in the index 'vanishing' after every compress
772         (i.e. after every reindex).  Fix this code to account for the
773         fixed rename operation.
774
775 2002-04-25  Jeffrey Stedfast  <fejj@ximian.com>
776
777         * providers/smtp/camel-smtp-transport.c (smtp_rcpt): Don't put a
778         space between the "RCPT TO:" and the "<recipient>" strings -
779         rfc0821 was not clear on this but it seems rfc2821 defines a
780         grammar excluding that SP.
781         (smtp_mail): Same.
782
783 2002-04-24  Jeffrey Stedfast  <fejj@ximian.com>
784
785         * providers/local/camel-local-provider.c
786         (camel_provider_module_init): Configure the default paths for mh,
787         mbox, maildir, spools, etc.
788
789         * camel-provider.h: Add a CAMEL_PROVIDER_CONF_LABEL enum and
790         define some default CamelProviderConfEntry macros.
791
792 2002-04-19  Jeffrey Stedfast  <fejj@ximian.com>
793
794         * providers/pop3/camel-pop3-folder.c (pop3_refresh_info): Free the
795         LIST pop3 command.
796
797         * camel-data-cache.c (data_cache_finalise): Free the cdc->path.
798
799         * camel-multipart.c (write_to_stream): Don't g_return_val_if_fail
800         here if the boundary is an empty string. See bug #23676 for
801         details. The way I see it, we have 2 options: 1) leave this fix
802         the way it is, thus allowing multipart boundaries to be
803         empty-strings; or 2) make camel_multipart_get_boundary() change
804         the boundary to something legal if the boundary is an
805         empty-string. Since the parser should be able to handle an
806         empty-string boundary *and* more importantly because we want to
807         keep the same boundaries as the original raw message so as to be
808         able to verify multipart/signed parts, I vote for solution #1.
809
810 2002-04-19  Not Zed  <NotZed@Ximian.com>
811
812         * devel-docs/camel-index.txt: Start of a white-paperish document
813         describing camel-index and older libibex.
814
815 2002-04-18  Not Zed  <NotZed@Ximian.com>
816
817         * providers/local/camel-local-store.c (rename_folder): If we get a
818         failure, make sure we set an exception.
819
820         * camel-text-index.c (camel_text_index_rename): If the file
821         doesn't exist, just assume it never did, dont return failure.
822         (text_index_rename): Add '.index' to the path name we're using,
823         since we dont get it passed in.
824
825         * camel-folder-search.c (check_header): When doing a contains
826         match, split the words and perform an and on it.
827         (match_words_messages): If we have an index, but were forced to do
828         a full search, first lookup a subset of messages using
829         the index and a simplified word set.  Only do a manual search of
830         this subset.
831
832 2002-04-17  Not Zed  <NotZed@Ximian.com>
833
834         * camel-folder-search.c (match_message_index): Changed to take a
835         utf8 string not a regex pattern.
836         (match_words_index): Matches against a camel_search_words list.
837         (match_words_1message): Matches a single message against a
838         camel_search_words list.
839         (match_words_message): Same, but gets the message from the folder
840         for you.
841         (match_words_messages): Matches a list of messages against a words
842         list.
843         (search_body_contains): Rewritten to handle multiple word
844         searches.  For #23371.
845
846         * providers/imap/camel-imap-search.c (sync_match): Split words
847         when searching, to support multiple search words.  Also, try
848         searching specifying charset of utf8 if we can, if that fails,
849         fall back to not specifying charset.  TODO: It should translate
850         the strings into the locale default charset?
851
852         * providers/imap/camel-imap-store.c (connect_to_server): Added new
853         cap - utf8_search, if set, we tell the server we're searching
854         using utf8, otherwise we dont (incorrectly, since we always use
855         utf8 to search).
856
857         * camel-search-private.c (camel_ustrstrcase): Make this class public.
858         (camel_search_words_split): Split a word into multiple words based
859         on whitespace, and keep track of whether the word is simple
860         (indexable directly), or not.
861         (camel_search_words_free): Free 'em.
862
863 2002-04-17  Jeffrey Stedfast  <fejj@ximian.com>
864
865         * camel-vee-folder.c (vee_search_by_expression): If the vee-folder
866         is the unmatched, we don't have our own expression so we cannot
867         merge them. Instead, just use the expression passed in. This fixes
868         a Null-Pointer-Read crash on Solaris systems at least.
869
870 2002-04-16  Jeffrey Stedfast  <fejj@ximian.com>
871
872         * camel-filter-driver.c (camel_filter_driver_filter_folder): Get
873         rid of an unused variable.
874
875         * providers/smtp/camel-smtp-transport.c (smtp_helo): Use
876         camel_gethostbyaddr since gethostbyaddr is not reentrant.
877
878         * camel-http-stream.c (http_connect): Updated after the rename of
879         camel_get_host_byname.
880
881         * camel-service.c (camel_gethostbyname): Renamed.
882         (camel_gethostbyaddr): New cancellable/reentrant version of
883         gethostbyaddr.
884
885 2002-04-14  Jeffrey Stedfast  <fejj@ximian.com>
886
887         * providers/local/camel-spoold-store.c: Added #include
888         <sys/types.h> for dirent.h which needs it on MacOS X.
889
890         * providers/local/camel-maildir-store.c: Same.
891
892         * providers/nntp/camel-nntp-store.c: Same.
893
894         * providers/imap/camel-imap-message-cache.c: Same.
895
896         * camel-provider.c: Same.
897
898         * camel-data-cache.c: Same.
899
900 2002-04-12  Jeffrey Stedfast  <fejj@ximian.com>
901
902         * broken-date-parser.c (datetok): Treat commas as token
903         delimeters.
904         (WEEKDAY_CHARS): Use full weekday names in case the broken mailer
905         used the full names.
906         (MONTH_CHARS): Same as above but for months.
907
908 2002-04-15  Not Zed  <NotZed@Ximian.com>
909
910         * *.c: Fix callers for api changes to camel-object, mainly
911         declare_event->add_event, and classfuncs->klass, and a couple
912         of missing #include <config.h>'s
913
914         * camel-arg.[ch], Makefile.am: New support code for
915         camel_object_get/set arg.
916
917         * *.h: Fixed all uses of get_type to return a CamelType rather
918         than a guint (now a pointer).
919
920         * camel-object.[ch]: Major cleanup of object implementation.  Also
921         added a get/set interface, and some debugging options.
922
923 2002-04-11  Not Zed  <NotZed@Ximian.com>
924
925         * providers/local/camel-spool-summary.c (spool_summary_sync_full):
926         If the last message(s) were deleted, and we had any messages
927         output, account for the lost \n of the following From line by
928         adding an extra \n. fix for #8214.
929
930 2002-04-10  Not Zed  <NotZed@Ximian.com>
931
932         * camel-mime-part-utils.c (convert_buffer): If we get a 0 length
933         input, return a 0 lenght output as valid - fixes bugs with some
934         iconv impl and its simpler anyway.
935
936 2002-04-11  Jeffrey Stedfast  <fejj@ximian.com>
937
938         * providers/imap/camel-imap-folder.c: Set the UID_SET_LIMIT value
939         to 4096. I ran into an issue tonight where apparently the IMAP
940         server changed the UIDVALIDITY and so Evo needed to re-fetch all
941         headers and it was trying to send a uid set of some 25k (yes, I
942         have a very large INBOX). Anyways, it was set to unlimited
943         before. Courier IMAPd can safely handle up to ~16k per token, but
944         UW IMAPd can only handle 8k per command-line, so I set it to 4k
945         just to be safe.
946
947 2002-04-10  Jeffrey Stedfast  <fejj@ximian.com>
948
949         * camel-mime-part-utils.c (convert_buffer): Fixed a bug that would
950         miscalculate how much data to copy into the GByteArray (negative
951         value) thus causing a segfault. Also optimized it while I was at
952         it.
953
954 2002-04-09  Jeffrey Stedfast  <fejj@ximian.com>
955
956         * camel-store.c (camel_store_init): Make the folder_lock
957         recursive. See bug #22363 for details. Basically,
958         get_folder_info() is requesting a diary folder which in turn
959         connects which requests then calls get_folder() but deadlocks
960         because get_folder_info already holds the lock.
961
962         * camel-mime-message.c (camel_mime_message_set_date): Don't adjust
963         the timezone offset if we used tm.tm_gmtoff because it is already
964         adjusted.
965
966 2002-04-09  Not Zed  <NotZed@Ximian.com>
967
968         * camel-mime-part.c (construct_from_parser): If we get multiple
969         Content-Type header values, change subsequent headers to
970         X-Invalid-Content-Type so it doesn't wreck processing.  This fixes
971         the reported case in #18929, but i dont know if it fixes the
972         original posters problems.
973
974 2002-04-08  Not Zed  <NotZed@Ximian.com>
975
976         * camel-vtrash-folder.c (vtrash_move_messages_to): If we find
977         we're moving from the vtrash to another folder, we need to convert
978         the uid from a vfolder uid to the source uid (+8).  Fix for
979         #20886.  Also changed to batch multiple moves to different folders
980         so they are done as efficiently as possible rather than one at a
981         time.
982
983         * camel-mime-utils.c (base64_decode_step): If we only get passed
984         '=', we back track only if we actually output any data.  Fix for
985         #21716.
986         (quoted_decode): Pass out size_t instead of int, and use 0 instead
987         of -1 for error since its not signed.  This will fix similar bug
988         to above in different circumstances since the result is taken as
989         unsigned.  This is only an internal func.
990         (quoted_encode): Return size_t just for consistency.
991
992         * camel-block-file.c (block_file_validate_root): Comment out the
993         debug and move it into a warning when the validation fails.
994
995 2002-04-08  Jeffrey Stedfast  <fejj@ximian.com>
996
997         * camel-mime-utils.c (uuencode_close): Don't count our filler when
998         encoding our line-length octet.
999
1000 2002-04-05  Jeffrey Stedfast  <fejj@ximian.com>
1001
1002         * camel-http-stream.c (http_get_headers): Don't get the statuscode
1003         here anymore.
1004         (http_method_invoke): Use a User-Agent header and do basic proxy
1005         authentication.
1006         (stream_read): Handle redirects.
1007         (camel_http_stream_set_user_agent): New function to allow client
1008         to set the User-Agent string.
1009         (camel_http_stream_set_proxy): New function for setting the proxy
1010         server.
1011         (camel_http_stream_set_proxy_authrealm): New function for setting
1012         the proxy auth realm.
1013         (camel_http_stream_set_proxy_authpass): New function for setting
1014         the proxy auth password.
1015
1016 2002-04-04  Jeffrey Stedfast  <fejj@ximian.com>
1017
1018         * camel-folder-summary.c (message_info_new): Simplified since we
1019         can now decode in-reply-to without getting extra cruft. Get rid of
1020         the FIXME about having to check scan->id because of the
1021         possibility of it being NULL, this can no longer happen.
1022
1023         * camel-mime-utils.c (header_references_inreplyto_decode): New
1024         function to decode in-reply-to headers. Only grabs the first thing
1025         that looks like a message-id and then returns.
1026         (header_references_decode): Loop calling
1027         header_references_decode_single (a new internal function).
1028
1029 2002-04-04  Not Zed  <NotZed@Ximian.com>
1030
1031         * providers/imap/camel-imap-search.c (imap_body_contains): If
1032         (body-contains) is not passed any arguments, return empty/false.
1033         Fixes a crash exposed by #15001.
1034
1035         * camel-remote-store.c (remote_connect): Reset the keepalive
1036         timeout to 10 minutes rather than the 30 seconds I was using for
1037         testing.
1038
1039 2002-04-03  Dan Winship  <danw@ximian.com>
1040
1041         * camel-provider.h (CamelProvider): make service_cache be an array
1042         of CAMEL_NUM_PROVIDER_TYPES elements so you can have a single
1043         provider offer both stores and transports. (Eg, Exchange, NNTP)
1044
1045         * providers/imap/camel-imap-provider.c: Don't initialize
1046         service_cache here. (The session code can do it itself since the
1047         url_hash and url_equal functions are stored as part of the
1048         provider.)
1049
1050         * providers/nntp/camel-nntp-provider.c: Likewise.
1051
1052         * providers/local/camel-local-provider.c: Likewise.
1053
1054         * providers/pop3/camel-pop3-provider.c: Likewise.
1055
1056         * providers/sendmail/camel-sendmail-provider.c: Likewise.
1057
1058         * providers/smtp/camel-smtp-provider.c: Likewise.
1059
1060         * camel-session.c (register_provider): Initialize the provider's
1061         service cache(s) here.
1062         (camel_session_class_init): Don't initialize.
1063         vee_provider.service_cache here.
1064         (camel_session_destroy_provider): Update to destroy multiple
1065         service_caches.
1066         (service_cache_remove, get_service): Tweak these a bit to deal
1067         with multiple service_caches.
1068
1069 2002-04-02  Jeffrey Stedfast  <fejj@ximian.com>
1070
1071         * camel-tcp-stream-ssl.c (set_errno): Handle a ton more nspr i/o
1072         errno's.
1073         (stream_connect): Act as if we are doing a non-blocking
1074         connect. This is to try and work around bug #15120 where users get
1075         an EINPROGRESS error. Maybe importing a PRFileDesc into SSL mode
1076         automagically makes it non-blocking? I dunno.
1077
1078 2002-04-01  Jeffrey Stedfast  <fejj@ximian.com>
1079
1080         * camel-folder-summary.c (message_info_new): Updated the
1081         construction of the references to match JWZ's updated algorithm
1082         initialization (ie, append any In-Reply-To reference onto any
1083         References header and never take more than a single message-id
1084         from the In-Reply-To header since anything after the first will
1085         probably just be email addresses). Fixes bug #1336.
1086
1087 2002-04-03  Not Zed  <NotZed@Ximian.com>
1088
1089         * providers/local/camel-local-folder.c
1090         (camel_local_folder_construct): Turn indexing back on, fingers
1091         crossed ...
1092
1093         * camel-block-file.c (sync_nolock): #!@$@$#@~#$
1094         DF@#$!Q@$#!@$#!#%.  Well it helps if we're iterating a list to
1095         iterate the node pointer ...
1096
1097         * camel-text-index.c (text_index_sync): Sync the key tables
1098         explcitly.
1099         (text_index_sync): Debug out frag info.
1100         (camel_text_index_dump): Added a (rather large, but optional) raw
1101         dumping mode for debugging purposes.
1102
1103         * camel-partition-table.c (camel_key_table_finalise): Sync root
1104         block when done.
1105         (camel_key_table_sync): New function, sync key table (root) explicitly.
1106         (camel_partition_table_sync): Method to explicitly sync the
1107         partition table.
1108
1109 2002-04-02  Not Zed  <NotZed@Ximian.com>
1110
1111         * camel-block-file.c (camel_block_file_free_block): Mark root
1112         block dirty when we change it (this function isn't used yet
1113         anyway).
1114
1115         * camel-text-index.c (text_index_add_name_to_word): Touch the root
1116         block when we modify the counts.  Also, abort processing on any
1117         errors.
1118         (text_index_sync): Fix typo in comments.  Sync the block file
1119         inside the lock.
1120         (text_index_compress_nosync): Lock the old index while we're
1121         compressing.
1122         (text_index_compress_nosync): Remove the bogus while() at the end
1123         of the while() loops!  Also plug a memleak - records weren't
1124         freed.
1125         (text_index_rename): Lock around rename op.
1126         (text_index_add_name): More typos.
1127         (text_index_sync): Touch root when changing it.
1128         (text_index_add_name): "
1129         (text_index_delete_name): "
1130         (camel_text_index_new): Touch root if we change it.
1131         (text_index_cursor_reset): Make sure we NULL pointers after we
1132         free them (nothing uses this yet).
1133
1134         * camel-partition-table.c (hash_key): Remove some debug
1135         accidentally left in.
1136         (camel_partition_table_add): When linking in the next block list,
1137         set the right previous pointer.
1138         (camel_key_table_add): Simplify the 'left' calculation (it was
1139         already ok though).
1140         (camel_key_table_next): Initialise returns before processing.
1141         Broaden the lock slightly, and simplify validity calculations.
1142
1143         * providers/imap/camel-imap-store.c (imap_keepalive): Put back in
1144         the exception setup stuff i disabled for debugging.
1145
1146         * providers/local/camel-local-folder.c
1147         (camel_local_folder_construct): Temporarily disable indexing.
1148
1149 2002-03-28  Not Zed  <NotZed@Ximian.com>
1150
1151         * camel-partition-table.c (camel_key_table_lookup): Change range
1152         checking assert to a warning.
1153
1154         * providers/pop3/camel-pop3-folder.c (pop3_finalize): Make sure we
1155         flush out all outstanding commands before finalising, stops being
1156         finalised while outsanding requests are processed by the store
1157         finalise.
1158         (pop3_get_message): Instead of pre-fetching all messages, just
1159         pre-fetch a maxiumum number at any one time, stops us running out
1160         of cache fd's.
1161         
1162         * providers/nntp/camel-nntp-folder.c (nntp_folder_init/finalise):
1163         Setup priv data + locks, & free.
1164
1165         * providers/imap/camel-imap-folder.c (imap_rescan): Batch all
1166         message_chagned events into a single folder_changed event
1167         (otherwise updates can be >>> expensive, like >5 hours for 80K
1168         messages changing!).  Alternately it could use folder
1169         freeze/unfreeze perhaps.
1170
1171 2002-03-27  Not Zed  <NotZed@Ximian.com>
1172
1173         * providers/imap/camel-imap-store.c (imap_keepalive): Pass an
1174         exception to called code so it behaves properly since it uses the
1175         passed exception to check returns.
1176
1177 2002-04-01  Dan Winship  <danw@ximian.com>
1178
1179         * providers/imap/Makefile.am (libcamelimap_la_LDFLAGS): Use
1180         -avoid-version instead of -version-info 0:0:0, and specify
1181         -module. (From Max Horn <max@quendi.de>).
1182
1183         * providers/local/Makefile.am (libcamellocal_la_LDFLAGS): Likewise.
1184
1185         * providers/nntp/Makefile.am (libcamelnntp_la_LDFLAGS): Likewise.
1186
1187         * providers/sendmail/Makefile.am (libcamelsendmail_la_LDFLAGS):
1188         Likewise.
1189
1190         * providers/smtp/Makefile.am (libcamelsmtp_la_LDFLAGS): Likewise.
1191
1192         * providers/pop3/Makefile.am (libcamelpop3_la_LDFLAGS): Likewise.
1193         Also remove $(KRB4_LDFLAGS) since KPOP is gone.
1194         (INCLUDES): and $(KRB4_CFLAGS)
1195
1196 2002-03-28  Jeffrey Stedfast  <fejj@ximian.com>
1197
1198         * camel-filter-driver.c (do_copy): We now have to check to make
1199         sure that p->message is non-NULL because we only load the message
1200         when we have to.
1201         (do_move): Same here.
1202
1203 2002-03-28  Dan Winship  <danw@ximian.com>
1204
1205         * camel-transport.c (camel_transport_send_to): Change the message
1206         arg to a CamelMimeMessage instead of a CamelMedium. Even the NNTP
1207         provider returns CamelMimeMessages, and we're never going to
1208         support anything more exotic than that. Also do a few more
1209         g_return_if_fails here instead of in the providers.
1210         (camel_transport_can_send): No longer needed.
1211         (camel_transport_send): Remove this too. It wasn't being used any
1212         more, and it doesn't behave exactly the same in sendmail and smtp.
1213
1214         * providers/smtp/camel-smtp-transport.c (smtp_send,
1215         smtp_can_send): Gone.
1216         (smtp_send_to): Update for arg change.
1217         (smtp_data): Make this take a CamelMimeMessage too.
1218
1219         * providers/sendmail/camel-sendmail-transport.c (sendmail_send,
1220         sendmail_can_send): Gone.
1221         (sendmail_send_to): Update for arg change, and merge in the part
1222         that used to be shared with sendmail_send.
1223
1224 2002-03-27  Jeffrey Stedfast  <fejj@ximian.com>
1225
1226         * camel-filter-driver.c (camel_filter_driver_filter_folder):
1227         Construct the source_url the right way. The previous way was
1228         generating urls like pop://fejj@ximian.com;keep_on_server/inbox
1229         which is wrong.
1230
1231 2002-03-26  Not Zed  <NotZed@Ximian.com>
1232
1233         * camel-text-index.c (text_index_normalise): Changed to use just
1234         g_utf8_strdown instead of utf8_normalise, to match the indexing
1235         code.  utf8_normalise is just far too expensive (saves approx 25%
1236         total processing).
1237
1238 2002-03-25  Not Zed  <NotZed@Ximian.com>
1239
1240         * camel-text-index.c (text_index_add_name): When we add a new
1241         name, up all of the cache limits, because we're probably going to
1242         be adding more.
1243         (text_index_sync): Drop the cache limits back down again, we dont
1244         need them when looking words up.
1245
1246         ** MERGE camel_index branch.
1247
1248         * camel-text-index.[ch]: Added files i forgot to add (eep nearly
1249         lost all this work!)
1250
1251         * camel-block-file.c (sync_nolock): Fix an infinite loop in syncing.
1252
1253 2002-03-21  Jeffrey Stedfast  <fejj@ximian.com>
1254
1255         * camel-folder-summary.c (camel_message_info_new_from_header): Use
1256         the date in the received header for the received_date.
1257
1258 2002-03-22  Not Zed  <NotZed@Ximian.com>
1259
1260         * providers/local/camel-local-folder.c
1261         (camel_local_folder_construct): Use the right option to remove the
1262         index file and reset the index file on creation.
1263         (camel_local_folder_construct): Remove any existing '.ibex' files
1264         - these are the old format index files.
1265
1266         * camel-block-file.c (camel_block_file_rename): Lock io lock while
1267         renaming.
1268         (camel_key_file_rename): Lock around rename.
1269         (block_file_validate_root): Implement sync flag checking.
1270         (camel_block_file_touch_block): Turn off the sync flag if we're
1271         touching any non-root block and write it to disk.  Shoudl this
1272         fsync()?
1273         (sync_nolock): sync the root block only if we need to.
1274
1275         * providers/local/camel-local-store.c (rename_folder): Re-enable
1276         index rename code.  Not sure how race-free it is though.
1277         (delete_folder): Delete the index file properly.
1278
1279         * camel-partition-table.c (camel_key_table_lookup): Initialise
1280         output values to 0 before doing anything.
1281         (camel_key_table_add): Do some range-checking on values.
1282
1283         * camel-text-index.c (text_index_compress): Changed to call sync here.
1284         (text_index_compress_nolock): and not here - stops a recursive
1285         sync call when sync performs a compress also.
1286         (text_index_compress_nolock): Change to _nosync, since the locking
1287         is irrelevent (recursive lock).  Fixed callers.
1288         (text_index_add_name_to_word): If we get a failure with key table
1289         ops, fail immediately.
1290         (text_index_compress_nosync): Likewise.
1291         (text_index_write_name): If the nameid is 0, do nothing.
1292         (text_index_add_name): If we can't get a keyid, dont add it to the
1293         partition table.
1294         (camel_text_index_remove): Function to delete an index file.
1295         (text_index_compress_nosync): Clean up temp files when done.
1296
1297         * camel-folder-search.c (match_messages_index): New function,
1298         split from body_contains, matches a regex against all words in an
1299         index.
1300         (match_message_index): Similar to above but matches against an
1301         individual message.
1302         (search_body_contains): Changed to use above functions for
1303         matching - substring matches should now work on indexed data.
1304
1305 2002-03-21  Not Zed  <NotZed@Ximian.com>
1306
1307         * camel-index.c (camel_index_words/names): New virtual
1308         methods/stubs to get a cursor of all words and names.
1309
1310         * camel-text-index.c (text_index_compress_nolock): Split from
1311         text_index_compress, so we can call the compressor while locked
1312         also, removed lock calls.
1313         (text_index_compress): Changed to stub which calls
1314         text_index_compress_nolock.
1315         (camel_text_index_key_cursor_new): New object to iterate through
1316         a key table.
1317         (text_index_words, text_index_names): Implement virtual functions
1318         for iterating through all words or names.
1319
1320         * camel-block-file.c: Turn off some debug.
1321
1322 2002-03-20  Not Zed  <NotZed@Ximian.com>
1323
1324         ** New body index implementation.
1325
1326         * camel-index*: Code for camel index, a new class to replace ibex.
1327
1328         * camel-block-file.[ch]: block-based and link based
1329         filesystem-in-a-file classes.
1330
1331         * camel-partition-table.[ch]: An implementation of a partition
1332         table (automatically extending on-disk hash-table using ideal
1333         hash), and a key-table, a key<>name mapping table.  Used by
1334         camelindex.
1335
1336         * providers/local/*, camel-folder-summary.[ch]: Changed to use
1337         camel-index interface rather than ibex.
1338
1339 2002-03-05  Not Zed  <NotZed@Ximian.com>
1340
1341         * providers/local/camel-maildir-summary.c (maildir_summary_check):
1342         Do progress reporting of operations.
1343         (maildir_summary_sync): Same here.
1344
1345 2002-03-04  Not Zed  <NotZed@Ximian.com>
1346
1347         * providers/local/camel-spoold-store.c (scan_dir): Kill a warning
1348         with a cast.
1349
1350         * providers/local/camel-*.c: Changed for ibex->camelindex.
1351
1352         * camel-folder-search.c (camel_folder_search_set_summary): Init
1353         summary_hash to point to 'static' uid strings.
1354         (search_body_contains): Use the static uid memory to return
1355         results rather than the values from the index library.
1356
1357         * camel-folder-search.[ch]: Changed to use camelindex object.
1358
1359         * camel-folder-summary.c (summary_build_content_info_message):
1360         Use a stream to index content, also filter html mail first.
1361         (camel_folder_summary_info_new_from_message): Use a stream
1362         filtered to index content.
1363         (main): Removed the test main code.  Added headers for open call
1364         (ibex must've had them before).
1365
1366         * camel-folder-summary.[ch]: Changed from ibex to CamelIndex.
1367
1368         * camel-mime-filter-index.c (camel_mime_filter_index_finalize):
1369         Unref index.
1370
1371         * camel-mime-filter-index.[ch]: Changed from ibex to CamelIndex.
1372
1373 2002-03-19  Jeffrey Stedfast  <fejj@ximian.com>
1374
1375         * camel-mime-utils.c (header_encode_param): Fix this to work
1376         right. We need to convert the input buffer to the charset we claim
1377         in the encoded param (duh).
1378
1379 2002-03-18  Jeffrey Stedfast  <fejj@ximian.com>
1380
1381         * providers/smtp/camel-smtp-transport.c
1382         (connect_to_server_wrapper): Updated to use the same logic as the
1383         POP code.
1384
1385         * providers/pop3/camel-pop3-store.c (connect_to_server): No longer
1386         takes a stls_supported argument since we no longer need it with
1387         the new logic.
1388         (connect_to_server_wrapper): New logic: First try connecting to
1389         the SSL port (995 by default), if that fails with
1390         SERVICE_UNAVAILABLE, then we attempt to connect (to port 110 by
1391         default) and try to use STARTTLS.
1392
1393 2002-03-15  Jeffrey Stedfast  <fejj@ximian.com>
1394
1395         * camel-folder.h: 
1396
1397         * camel-private.h: Don't allow any empty structs. If
1398         !ENABLE_THREADS, provide a gpointer dummy member. Fixes bug #6382.
1399
1400 2002-03-13  Jeffrey Stedfast  <fejj@ximian.com>
1401
1402         * providers/smtp/camel-smtp-transport.c (smtp_auth): Added a
1403         work-around for SMTP servers that can't read the RFCs and thus
1404         implement SASL incorrectly. Oh well, that's life in the world of
1405         mail clients I guess.
1406
1407 2002-03-12  Jeffrey Stedfast  <fejj@ximian.com>
1408
1409         * camel-digest-store.c (camel_digest_store_new): Now takes a url
1410         argument.
1411
1412         * camel-digest-folder.c (digest_add_multipart): Fixed some memory
1413         corruption and also modified to use CAMEL_IS_MIME_MESSAGE() rather
1414         than comparing content-type strings.
1415         (digest_get_message): Fixed a logic blooper.
1416
1417         * camel-folder-summary.c (camel_message_info_new_from_header): Set
1418         the date fields of the CamelMessageInfo as well. This may even fix
1419         some filter-related bugs where the user was trying to compare
1420         dates.
1421
1422 2002-03-11  Jeffrey Stedfast  <fejj@ximian.com>
1423
1424         * camel-digest-store.c: A pretty empty store implementation to be
1425         the parent store of a CamelDigestFolder.
1426
1427         * camel-digest-folder.c: Updated to reference it's parent store.
1428
1429 2002-03-11  Jeffrey Stedfast  <fejj@ximian.com>
1430
1431         * camel-digest-folder.c (camel_digest_folder_new): Allow any leaf
1432         part to be a message/rfc822 part.
1433         (digest_get_uids): Recurse the mime structure and add all
1434         message/rfc822 parts and use a uid scheme similar to IMAP's mime
1435         part naming convention.
1436         (digest_get_message): Decode the uid to get the correct mime part.
1437
1438 2002-03-11  Ettore Perazzoli  <ettore@ximian.com>
1439
1440         * camel-mime-utils.c: Change the order of the mailing list magic
1441         patterns so that the more mailing-list specific ones are on the
1442         top.
1443
1444 2002-03-11  Jeffrey Stedfast  <fejj@ximian.com>
1445
1446         These fixes should fix bug #21737.
1447
1448         * providers/smtp/camel-smtp-transport.c
1449         (connect_to_server_wrapper): Same as with the POP code.
1450
1451         * providers/pop3/camel-pop3-store.c (connect_to_server_wrapper):
1452         Slight restructuring of the if-statements for the USE_SSL_ALWAYS
1453         case so that we can't possibly return TRUE unless we really did
1454         connect successfully.
1455
1456 2002-03-10  Dan Winship  <danw@ximian.com>
1457
1458         Rename the OpenSSL implementation of things to match the NSS
1459         implementation so that callers don't need to care which one is
1460         being used.
1461
1462         * camel-tcp-stream-openssl.c: Implement CamelTcpStreamSSL, not
1463         CamelTcpStreamOpenSSL. Rename methods as well. Replace the
1464         camel-tcp-stream-openssl.h include with camel-tcp-stream-ssl.h.
1465
1466         * camel-tcp-stream-openssl.h: Gone.
1467
1468         * camel-tcp-stream-ssl.c: Add a note explaining that this
1469         implementation is only used for NSS, and that OpenSSL's
1470         implementation is in another file. (Should probably do some CVS
1471         renaming magic at some point.)
1472
1473         * camel-http-stream.c (http_connect): Remove OpenSSL refs; the
1474         previously-NSS-specific code works for both now.
1475
1476         * camel-remote-store.c: Likewise.
1477
1478         * providers/smtp/camel-smtp-transport.c: Likewise.
1479
1480         * providers/pop3/camel-pop3-store.c: Likewise.
1481
1482         * Makefile.am (libcamelinclude_HEADERS): Remove
1483         camel-tcp-stream-openssl.h
1484
1485 2002-03-10  Dan Winship  <danw@ximian.com>
1486
1487         * camel-tcp-stream.c (camel_tcp_stream_get_socket): Remove this:
1488         it couldn't be generically used, because different subclasses
1489         returned entirely different types of data.
1490         (camel_tcp_stream_get_local_address,
1491         camel_tcp_stream_get_remote_address): Add these to replace what
1492         get_socket was being used for.
1493         (camel_tcp_address_new, camel_tcp_address_free): Utility functions
1494         for get_{local,remote}_address.
1495
1496         * providers/smtp/camel-smtp-transport.c: Change localaddr to a
1497         CamelTcpAddress *.
1498         (connect_to_server): Call camel_tcp_stream_get_local_address to
1499         get the local IP address.
1500         (smtp_disconnect): free localaddr.
1501         (smtp_helo): Update for localaddr change.
1502
1503         * camel-tcp-stream-raw.c (stream_get_socket): Remove
1504         (stream_get_local_address, stream_get_remote_address): Implement.
1505
1506         * camel-tcp-stream-ssl.c (stream_get_socket): Remove
1507         (stream_get_local_address, stream_get_remote_address): Implement.
1508
1509         * camel-tcp-stream-openssl.c (stream_get_socket): Remove
1510         (stream_get_local_address, stream_get_remote_address): Implement.
1511
1512 2002-03-08  Jeffrey Stedfast  <fejj@ximian.com>
1513
1514         * providers/pop3/camel-pop3-provider.c
1515         (camel_provider_module_init): Don't call
1516         camel_remote_store_get_authtypes since we no longer subclass
1517         camel-remote-store.
1518
1519         * providers/pop3/camel-pop3-engine.c: Added STARTTLS to the
1520         capabilities to look for.
1521         (camel_pop3_engine_reget_capabilities): New function to re-get
1522         capabilities.
1523
1524         * providers/pop3/camel-pop3-store.c: Updated to not subclass
1525         CamelRemoteStore.
1526         (connect_to_server): Rewritten to not depend on CamelRemoteStore's
1527         connect implementation. Also added support for STLS (aka
1528         STARTTLS).
1529
1530 2002-03-07  Jeffrey Stedfast  <fejj@ximian.com>
1531
1532         * camel-pgp-mime.c (camel_pgp_mime_part_sign): Add support for
1533         hash type RIPEMD160.
1534
1535         * camel-cipher-context.h: Add RIPEMD160 hash type.
1536
1537         * camel-pgp-context.c (pgp_sign): Updated to consider hash
1538         function for pgp5 and pgp6.
1539         (pgp_clearsign): Same.
1540
1541         * camel-tcp-stream-openssl.c (stream_read): Add a timeout on the
1542         select.
1543         (stream_write): Same.
1544
1545 2002-03-06  Jeffrey Stedfast  <fejj@ximian.com>
1546
1547         * providers/smtp/camel-smtp-transport.c (connect_to_server): Fix
1548         to work with OpenSSL.
1549
1550         * camel-tcp-stream-openssl.c: compile fixes.
1551         (camel_tcp_stream_openssl_enable_ssl): Check to make sure that the
1552         sockfd != -1, it's not enough to check that it is non-zero. Also
1553         set the sockfd to -1 on fail (open_ssl_connection will close the
1554         sockfd on fail).
1555
1556 2002-03-06  Dan Winship  <danw@ximian.com>
1557
1558         * providers/smtp/camel-smtp-transport.c (smtp_construct): Make
1559         this compile.
1560
1561 2002-03-05  Jeffrey Stedfast  <fejj@ximian.com>
1562
1563         * camel-tcp-stream-ssl.c (save_ssl_cert): Removed. Glory glory
1564         hallelujah!
1565         (ssl_bad_cert): No longer calls ssl_save_cert or
1566         ssl_cert_is_saved.
1567
1568 2002-03-05  Jeffrey Stedfast  <fejj@ximian.com>
1569
1570         * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_new_raw):
1571         Start the ssl stream off in non-ssl mode (useful for STARTTLS).
1572         (camel_tcp_stream_openssl_enable_ssl): New function to toggle an
1573         ssl stream into ssl mode.
1574         (open_ssl_connection): Close the sockfd on fail so our caller
1575         doesn't have to - this also allows us to save the original errno.
1576         (stream_connect): If we want ssl mode, do our ssl stuff.
1577         (camel_tcp_stream_openssl_class_init): Init some SSL stuff here
1578         instead of in open_ssl_connection since these only ever need to be
1579         called once.
1580         (stream_read): Only use SSL_read if we are in ssl mode.
1581         (stream_write): Only use SSL_write if we are in ssl mode.
1582
1583         * providers/smtp/camel-smtp-transport.c (smtp_helo): Check for the
1584         STARTTLS extension.
1585         (connect_to_server): Try to use STARTTLS whenever possible rather
1586         than the old way of doing things.
1587         (connect_to_server_wrapper): Wrapper around connect_to_server() to
1588         first try STARTTLS and then attempt normal SSL mode if we can't
1589         connect via STARTTLS.
1590
1591         * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_enable_ssl): New
1592         function to toggle an ssl stream into ssl mode.
1593         (camel_tcp_stream_ssl_new_raw): Start the ssl stream off in
1594         non-ssl mode (useful for STARTTLS).
1595         (stream_connect): Only connect in SSL mode if required.
1596
1597 2002-03-01  Jeffrey Stedfast  <fejj@ximian.com>
1598
1599         * camel-vtrash-folder.h: 
1600         * camel-vee-store.h: 
1601         * camel-vee-folder.h: 
1602         * camel-stream-null.h: 
1603         * camel-stream-filter.h: 
1604         * camel-store-summary.h: 
1605         * camel-news-address.h: 
1606         * camel-mime-utils.h: 
1607         * camel-mime-parser.h: 
1608         * camel-mime-filter-save.h: 
1609         * camel-mime-filter-linewrap.h: 
1610         * camel-mime-filter-index.h: 
1611         * camel-mime-filter-html.h: 
1612         * camel-mime-filter.h: 
1613         * camel-mime-filter-from.h: 
1614         * camel-mime-filter-crlf.h: 
1615         * camel-mime-filter-chomp.h: 
1616         * camel-mime-filter-charset.h: 
1617         * camel-mime-filter-bestenc.h: 
1618         * camel-mime-filter-basic.h: 
1619         * camel-internet-address.h: 
1620         * camel-folder-thread.h: 
1621         * camel-folder-summary.h: 
1622         * camel-folder-search.h: 
1623         * camel-filter-driver.h: 
1624         * camel-charset-map.h: 
1625         * camel-address.h: Add c++ armoring.
1626
1627         * camel-object.h: s/class/klass
1628
1629 2002-03-01  Jeffrey Stedfast  <fejj@ximian.com>
1630
1631         * camel-mime-part-utils.c
1632         (camel_mime_part_construct_content_from_parser): Reverted my
1633         pgp/mime fixes here too.
1634
1635         * camel-mime-part.c (write_to_stream): Removed my pgp/mime raw
1636         stream hack, this is causing problems such as some messages to not
1637         displaying, view->source not working at all, etc.
1638
1639 2002-02-28  Jeffrey Stedfast  <fejj@ximian.com>
1640
1641         * camel-mime-parser.c: Changed offset variables from int's to
1642         off_t's since the system may support large files.
1643
1644         * camel-mime-part-utils.c
1645         (camel_mime_part_construct_content_from_parser): Rearrange the
1646         save filter stuff so that we save raw streams for all mime
1647         parts. If the mime part turns out to be a multupart, then don't
1648         bother saving the raw stream, we only need to save the raw stream
1649         for leaf parts.
1650
1651 2002-02-27  Jeffrey Stedfast  <fejj@ximian.com>
1652
1653         * camel-folder-summary.h: Don't #include camel-mime-filter-save.h,
1654         we don't use it.
1655
1656         * camel-file-utils.c: Fixed a few 'might be used uninitialized'
1657         warnings which were real problems.
1658
1659         * camel-mime-part-utils.c
1660         (camel_mime_part_construct_content_from_parser): Save the raw mime
1661         stream for any/all signed parts.
1662
1663         * camel-mime-part.c (camel_mime_part_init): Initialize our raw
1664         stream to NULL.
1665         (camel_mime_part_finalize): Unref our raw stream, if we have one.
1666         (write_to_stream): If we have a raw stream, write that out instead
1667         of re-encoding.
1668
1669         * camel-mime-filter-save.[c,h]: Rewritten to save to a stream
1670         rather than a file.
1671
1672 2002-02-28  Not Zed  <NotZed@Ximian.com>
1673
1674         * camel-mime-utils.c (header_fold): Use the FOLD_SIZE as a
1675         recommended folding size, but add a new FOLD_MAX_SIZE (=998, the
1676         smtp max line size) as the hard limit for any output.
1677
1678 2002-02-27  Jeffrey Stedfast  <fejj@ximian.com>
1679
1680         * camel-mime-filter-chomp.c (camel_mime_filter_chomp_new): New
1681         stream filter that chomps excess trailing whitespace from the end
1682         of the stream. This is needed to update the PGP/MIME code to
1683         comply with rfc3156.
1684
1685         * camel-pgp-mime.c (camel_pgp_mime_part_verify): Don't attach a
1686         from filter, if it ain't from-filtered already, then we'll just be
1687         breaking stuff. To become rfc3156 compliant, add a chomp filter
1688         here.
1689         (camel_pgp_mime_part_sign): Add a chomp filter here too.
1690
1691 2002-02-27  Not Zed  <NotZed@Ximian.com>
1692
1693         * camel-mime-part.c (init_header_name_table): Changed header
1694         formatted table to contain a pointer to an output function, and
1695         added in-reply-to and references headers.
1696         (write_references): New function to write out references header,
1697         folded properly.  It only approximates based on the last >, but it
1698         should be adequate and will also handle invalid headers.
1699         (write_fold): Function to write out headers folded.  Since this is
1700         the default it isn't required.
1701         (write_raw): Write out an already formatted header, e.g. most of
1702         the rest.
1703         (write_to_stream): Lookup header output function, if we have one,
1704         use that, otherwise fold header using basic (dumb) function.
1705
1706         This is all for #14779.  A better fix is probably do have the
1707         headers always stored formatted, but that can wait.
1708
1709 2002-02-25  Jeffrey Stedfast  <fejj@ximian.com>
1710
1711         * camel-digest-folder.c (camel_digest_folder_new): Allow all
1712         multiparts that contain message/rfc822 attachments.
1713         (digest_get_uids): Only assign uids to message parts.
1714
1715 2002-02-22  Jeffrey Stedfast  <fejj@ximian.com>
1716
1717         * camel-mime-part.c (camel_mime_part_set_filename): Set the 'name'
1718         parameter on the Content-Type too. Fixes bug #20779.
1719
1720 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
1721
1722         * camel-pgp-context.c (pgp_sign): Pass --always-trust to gpg
1723         (requested by users).
1724         (pgp_clearsign): Same.
1725         (pgp_encrypt): Here too.
1726
1727 2002-02-12  Jeffrey Stedfast  <fejj@ximian.com>
1728
1729         * providers/smtp/camel-smtp-transport.c (smtp_helo): Since the
1730         AUTH token sometimes uses '=' instead of whitespace, don't use
1731         smtp_token_next here.
1732
1733 2002-02-09  Not Zed  <NotZed@Ximian.com>
1734
1735         * providers/pop3/camel-pop3-engine.c (get_capabilities): Duh, when
1736         we grab the apop stamp it needs to include the <> as well, I even
1737         read the rfc, silly me.
1738
1739         * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): Doh,
1740         when iterating the authtype list, it helps to goto the next node.
1741         Found with help from miles.
1742
1743 2002-02-08  Not Zed  <NotZed@Ximian.com>
1744
1745         * providers/local/camel-spool-summary.c
1746         (camel_spool_summary_build_from): The day number has to be 2 chars
1747         wide, space filled to work properly with pine, etc.
1748
1749         * providers/local/camel-spoold-store.[ch]: new type of provider
1750         'spool directory', which lets you view external mbox dirs without
1751         adding any extra cruft.  Perhaps it should use . files to store
1752         summaries?  Still a bit experimental, there's a warning when you
1753         select it in the account editor.  Finished off most of #1185.
1754         Can't rename or move folders.
1755
1756         * camel-mime-utils.c (header_decode_date): If the date is
1757         100->1900 then we actually want to use it as the year in the tm
1758         struct, not year+100.  e.g. year 102 -> 2002, not 2102.
1759
1760 2002-02-07  Not Zed  <NotZed@Ximian.com>
1761
1762         * providers/local/camel-spool-store.c (get_folder): Pass path into
1763         spool_folder_new.
1764
1765         * providers/local/camel-spool-folder.c (camel_spool_folder_new): 
1766         (camel_spool_folder_construct): Take the full path to the folder
1767         and use that as the file path, independent of the full_name we
1768         use.
1769
1770 2002-02-07  Not Zed  <NotZed@Ximian.com>
1771
1772         * providers/local/camel-local-provider.c: Added new type, spoold
1773         provider, spoold: for local directories.
1774
1775         * providers/imap/camel-imap-store.c (get_one_folder_offline):
1776         Create offline uri's in a compatible manner to online ones.
1777
1778 2002-02-07  Dan Winship  <danw@ximian.com>
1779
1780         * camel-sasl-ntlm.c: Implementation of NTLM (aka "Secure Password
1781         Authentication") auth, taken from soup.
1782
1783         * Makefile.am (libcamel_la_SOURCES, libcamel_la_HEADERS): Add
1784         camel-sasl-ntlm.
1785
1786         * camel-sasl.c: Add refs to camel-sasl-ntlm.
1787
1788         * providers/imap/camel-imap-store.c (try_auth): Use
1789         imap_next_word() to skip over the "+ " of the continuation rather
1790         than just "resp + 2" since Exchange (incorrectly) returns "+"
1791         instead of "+ " for an empty continuation response.
1792
1793 2002-02-06  Jeffrey Stedfast  <fejj@ximian.com>
1794
1795         * camel-folder-summary.h: Remove the CAMEL_MESSAGE_NEEDS_REPLY
1796         flag, we no longer will be using this.
1797
1798 2002-02-04  Jeffrey Stedfast  <fejj@ximian.com>
1799
1800         * camel-http-stream.c (stream_read): Use camel_mime_parser_read to
1801         read internal parser data.
1802         (camel_http_stream_get_content_type): Implemented.
1803         (http_method_invoke): Use HTTP/1.0 instead of 1.1
1804
1805         * camel-mime-utils.c (header_decode_int): Made public.
1806
1807         * camel-http-stream.[c,h]: Added. New stream for HTTP requests
1808         (currently supported are GET and HEAD).
1809
1810         * camel-tcp-stream-ssl.c (stream_connect): Call set_errno
1811         appropriately.
1812
1813 2002-01-31  Not Zed  <NotZed@Ximian.com>
1814
1815         * camel-mime-utils.c (header_decode_domain): Oops, this was
1816         converting foo@[blah] to foo@[ blah ], fixed.
1817
1818 2002-01-30  Jeffrey Stedfast  <fejj@ximian.com>
1819
1820         * providers/pop3/camel-pop3-provider.c: Use "pop" instead of
1821         "pop3" so current configurations continue to work.
1822
1823 2002-01-30  Not Zed  <NotZed@Ximian.com>
1824
1825         * camel-sasl-login.c: Changed name from "NT Login" to simply
1826         "Login".
1827
1828         * providers/pop3/*: Entirely new pop implmentation, supporting
1829         pipelining.
1830
1831 2002-01-29  Not Zed  <NotZed@Ximian.com>
1832
1833         * camel-data-cache.c (free_busy): We dont want to unref the
1834         stream, instead, stop listening to the finalised events, and free
1835         the path only.
1836
1837 2002-01-25  Not Zed  <NotZed@Ximian.com>
1838
1839         * camel-data-cache.c (stream_finalised): Remove the object from
1840         the busy_stream hashtable, not the busy_path hashtable.
1841
1842 2002-01-29  Jeffrey Stedfast  <fejj@ximian.com>
1843
1844         * providers/imap/camel-imap-folder.c (imap_update_summary): Added
1845         more kludge to an existing Exchange IMAP 5.5 kludge to work around
1846         it returning multiple messages with the same UIDs.
1847
1848 2002-01-28  Jeffrey Stedfast  <fejj@ximian.com>
1849
1850         * camel-mime-message.c (process_header): Handle Resent headers
1851         too.
1852
1853         * camel-mime-message.h: Added Resent-* #defines.
1854
1855         * camel-filter-driver.c (camel_filter_driver_remove_rule_by_name):
1856         Use while (node->next) instead of while (node)
1857
1858         * providers/smtp/camel-smtp-transport.c (smtp_decode_status_code):
1859         New function to decode an enhanced status code.
1860         (smtp_set_exception): Sets an exception based on the
1861         Enhanced-Status-Code.
1862         (esmtp_get_authtypes): Don't diplicate the key in the hash since
1863         the key and value are the same.
1864         (smtp_rcpt): Include the failed recipient in the error message to
1865         be more helpful to the user.
1866
1867         * camel-mime-utils.c (hex_decode): Make sure to allocate enough
1868         for the NUL byte.
1869
1870 2002-01-28  Jeffrey Stedfast  <fejj@ximian.com>
1871
1872         * providers/smtp/camel-smtp-transport.c (smtp_construct):
1873         (connect_to_server): Use flags rather than a bunch of gboolean
1874         variables.
1875         (smtp_connect): Same.
1876         (smtp_mail): Here too. Use the enhanced status codes if available.
1877         (smtp_data): And again here.
1878         (smtp_helo): Finally here. Also detect the ENHANCEDSTATUSCODES
1879         extension.
1880         (smtp_rcpt): Use the enhanced status codes if available.
1881         (smtp_rset): Here too.
1882         (smtp_quit): And finally here.
1883
1884         * camel-transport.h: Removed gboolean supports_8bit since this is
1885         pretty local to only SMTP for now.
1886
1887 2002-01-24  Ettore Perazzoli  <ettore@ximian.com>
1888
1889         * Makefile.am: Remove some old cruft.
1890
1891 2002-01-24  Ettore Perazzoli  <ettore@ximian.com>
1892
1893         * tests/folder/Makefile.am: s/MAILER_LIBS/EVOLUTION_MAIL_LIBS/.
1894         * tests/message/Makefile.am: Likewise.
1895         * tests/mime-filter/Makefile.am: Likewise.
1896         * tests/misc/Makefile.am: Likewise.
1897         * tests/smime/Makefile.am: Likewise.
1898         * tests/stream/Makefile.am: Likewise.
1899
1900 2002-01-24  Jeffrey Stedfast  <fejj@ximian.com>
1901
1902         * camel-filter-driver.c (do_beep): Call the beep callback
1903         function.
1904         (camel_filter_driver_set_system_beep_func): New function to set
1905         the beep callback.
1906
1907 2002-01-22  Jeffrey Stedfast  <fejj@ximian.com>
1908
1909         * camel-filter-driver.c (camel_filter_driver_remove_rule_by_name):
1910         New function to remove a filter rule by name.
1911
1912 2002-01-21  Jeffrey Stedfast  <fejj@ximian.com>
1913
1914         * camel-filter-driver.c (do_beep): As a temporary solution, just
1915         printf ("\a"); to make a beep :-)
1916
1917         * providers/imap/camel-imap-command.c
1918         (imap_command_strdup_vprintf): Encode the mailbox to UTF-7 here.
1919
1920         * providers/imap/camel-imap-utils.c (imap_parse_list_response):
1921         Decode the mailbox name as we parse the list response.
1922         (imap_mailbox_decode): It's only an illegal mailbox name if it
1923         didn't switch back to US-ASCII mode.
1924
1925 2002-01-18  Jeffrey Stedfast  <fejj@ximian.com>
1926
1927         * providers/imap/camel-imap-utils.c (imap_mailbox_decode): New
1928         function to decode an IMAP mailbox name from modified UTF-7
1929         encoding to UTF-8.
1930         (imap_mailbox_encode): New function to convert a mailbox name from
1931         UTF-8 to IMAP's modified UTF-7 encoding.
1932
1933 2002-01-17  Jeffrey Stedfast  <fejj@ximian.com>
1934
1935         * camel-mime-filter-basic.c (filter): Stop uudecoding once the
1936         CAMEL_UUDECODE_STATE_END state bit gets set. Set the
1937         CAMEL_UUDECODE_STATE_BEGIN state bit once we find the begin line.
1938         (reset): No longer have uu_begin or uulen state variables, these
1939         are now stuffed into a single state variable.
1940
1941         * camel-mime-utils.c (uudecode_step): No longer needs a uulen
1942         argument and also keeps track of whether or not the end of the
1943         encoded data has been found in 'state'.
1944         (uuencode_step): Now stuffs uulen into state so that the uulen
1945         argument is no longer needed.
1946         (uuencode_close): Same.
1947
1948 2002-01-16  Jeffrey Stedfast  <fejj@ximian.com>
1949
1950         * camel-mime-filter-basic.c (filter): If we don't want to corrupt
1951         the uuencoded data by overwriting it with base64 decoded data
1952         afterward, we need to add a break statement!
1953
1954         * camel-folder-summary.c (summary_build_content_info): Add code to
1955         add a uu filter.
1956         (camel_folder_summary_finalize): Unref the uuencode filter.
1957
1958 2002-01-16  Jeffrey Stedfast  <fejj@ximian.com>
1959
1960         * camel-mime-filter-basic.c (filter): Fixed slight logic error to
1961         find the uuencode begin line. Fixes bug #18754.
1962
1963 2002-01-15  Jeffrey Stedfast  <fejj@ximian.com>
1964
1965         * providers/smtp/camel-smtp-transport.c (smtp_send_to): Updated to
1966         match the new send_to API.
1967         (smtp_send): Get the from address and pass that along to
1968         smtp_send_to().
1969
1970         * providers/sendmail/camel-sendmail-transport.c
1971         (sendmail_send_to): Updated to match the new send_to API.
1972
1973         * camel-transport.c (camel_transport_send_to): Now takes a from
1974         argument too.
1975
1976         * providers/imap/camel-imap-folder.c (imap_update_summary): Sort
1977         the needheaders UID array and fixed to respect the
1978         UID_SET_LIMIT. This should now finish the fixification of bug
1979         #2529. There's still the possible issue that a command-line (The
1980         only command-line I can think of that can still be too long is a
1981         SEARCH command, but this can't possibly be fixed until we rewrite
1982         the imap code to use Zucchi's ImapEngine idea).
1983
1984 2002-01-14  Jeffrey Stedfast  <fejj@ximian.com>
1985
1986         * providers/imap/camel-imap-folder.c (imap_expunge_uids_online):
1987         Move the command-lock outside the loop.
1988
1989 2002-01-14  Jeffrey Stedfast  <fejj@ximian.com>
1990
1991         * providers/imap/camel-imap-folder.c (imap_expunge_uids_online):
1992         Updated to use the new imap_uid_array_to_set() interface.
1993         (imap_expunge_uids_resyncing): Same.
1994         (do_copy): Here too.
1995         (imap_update_summary): Added a FIXME comment to rewrite allowing
1996         for a uid-set limitation.
1997         (get_matching): Copy some of the logic over from
1998         imap_uid_adday_to_set() to limit the length of the uid-set string.
1999         (imap_sync_online): Added a comment to explain what is going on
2000         with get_matching() since the behavior has changed slightly.
2001
2002         * providers/imap/camel-imap-utils.c (imap_uid_array_to_set):
2003         Modify the interface so that we can limit the size of the uid set
2004         string returned.
2005
2006 2002-01-14  Not Zed  <NotZed@Ximian.com>
2007
2008         * providers/imap/camel-imap-search.c (imap_body_contains):
2009         Rewritten to use a cache for body searches when online.  Will need
2010         some heavy testing but so far seems to be beneficial.
2011
2012         * providers/imap/camel-imap-folder.c (imap_search_by_expression,
2013         search_by_uids): dont initialise search object here.
2014         (camel_imap_folder_new): Setup search object here with pointer to
2015         cache dir.
2016
2017 2001-12-01  Not Zed  <NotZed@Ximian.com>
2018
2019         * camel-store-summary.[ch]: New class to store a store's folder
2020         list in.  Not yet completed.
2021
2022 2002-01-11  Jeffrey Stedfast  <fejj@ximian.com>
2023
2024         * providers/imap/camel-imap-folder.c (imap_update_summary): Kludge
2025         around a bug in Exchange 5.5 that reports 2 messages with the same
2026         UID. Fixes bug #17694. Replaces the fix from yesterday.
2027
2028 2002-01-10  Jeffrey Stedfast  <fejj@ximian.com>
2029
2030         * providers/local/camel-local-folder.c: If PATH_MAX doesn't exist,
2031         use _POSIX_PATH_MAX.
2032
2033         * providers/imap/camel-imap-folder.c (imap_update_summary): If mi
2034         is NULL, don't bother updating it. Should fix bug #17694.
2035
2036 2002-01-10  Jeffrey Stedfast  <fejj@ximian.com>
2037
2038         * camel.h: #include camel-mime-filter-tohtml.h
2039
2040         * providers/imap/camel-imap-folder.c (imap_update_summary): Kludge
2041         around Microsoft Exchange 5.5 (bug #5348) by forgetting our
2042         currently selected folder and re-SELECTing it so that the Exchange
2043         server has a chance to realise it has new messages.
2044
2045 2002-01-09  Jeffrey Stedfast  <fejj@ximian.com>
2046
2047         * providers/local/camel-local-folder.c
2048         (camel_local_folder_construct): If the mbox file is a symlink,
2049         follow the symlink and get the One True Path so that we can
2050         rewrite the mbox later without worrying about clobbering the
2051         symlink.
2052
2053 2002-01-08  Jeffrey Stedfast  <fejj@ximian.com>
2054
2055         * camel-filter-search.c (TODO): There are a few sexp callbacks
2056         that could be modified to use fms->info rather than using a
2057         message object (like date and possibly mlist stuff) but *only* if
2058         the date exists on the CamelMessageInfo object (since it may be
2059         blank except for message flags).
2060         (camel_filter_search_get_message): New internal convenience
2061         function to make sure that the FilterMessageSearch has loaded the
2062         message (and to load the message if this isn't the case).
2063         (check_header): Call camel_filter_search_get_message().
2064         (header_exists): Same.
2065         (header_regex): Here too.
2066         (header_full_regex): And here.
2067         (body_contains): Again here.
2068         (body_regex): Here too.
2069         (get_sent_date): Here also.
2070         (get_received_date): Same.
2071         (get_source): Here if we need to.
2072         (camel_filter_search_match): Now takes a callback function/data
2073         pair for on-demand message loading so that we don't necessarily
2074         have to load the message if the defined filter rules don't require
2075         it.
2076
2077         * camel-filter-driver.c (camel_filter_driver_filter_folder): Don't
2078         bother fetching the message here, let
2079         camel_filter_driver_filter_message() worry about this.
2080         (get_message_cb): New utility callback to fetch a message.
2081         (camel_filter_driver_filter_message): Only fetch the message if we
2082         absolutely need it to get a CamelMessageInfo. Instead of passing a
2083         message object to camel_filter_search_match(), pass get_message_cb
2084         and some user_data so that the matching code can fetch the message
2085         on demand.
2086
2087 2002-01-07  Jeffrey Stedfast  <fejj@ximian.com>
2088
2089         * camel-folder.c (filter_filter): Flush the only-once actions.
2090
2091         * camel-filter-driver.c (camel_filter_driver_filter_message):
2092         Don't increment a filtered_count here any longer.
2093         (camel_filter_driver_reset_filtered_count): Removed.
2094         (camel_filter_driver_get_filtered_count): Removed.
2095         (do_beep): New action.
2096         (play_sound): New action to play a sound
2097         (do_only_once): Another new action.
2098         (camel_filter_driver_finalise): Free the only_once hash if the
2099         driver has not been "flushed".
2100         (camel_filter_driver_flush): Flush all of the only-once actions.
2101
2102         * camel-charset-map.c: Moved windows-1251 to the end of the list
2103         since it contains the euro and we'd prefer to use iso-8859-15 when
2104         the euro is requested than a windows charset if possible.
2105
2106         * camel-charset-map-private.h: Regenerated.
2107
2108 2001-12-12  Jeffrey Stedfast  <fejj@ximian.com>
2109
2110         * camel-folder-summary.c (content_info_load): Don't try setting a
2111         content-type parameter if either the name or value is NULL.
2112
2113         * camel-mime-utils.c (header_set_param): NULL-protection.
2114
2115 2002-01-02  Jeffrey Stedfast  <fejj@ximian.com>
2116
2117         * camel-tcp-stream-ssl.c (ssl_bad_cert): Do more like what mutt
2118         does so hopefully this'll fix bug #16363 and #16300.
2119
2120 2001-12-21  Jeffrey Stedfast  <fejj@ximian.com>
2121
2122         * broken-date-parser.c (parse_broken_date): Completely
2123         rewritten. It is now a load faster and a heck of a lot more
2124         accurate, also now returns a time_t and sets the saveoffset
2125         variable rather than returning a new char* buffer for the normal
2126         camel date parser to re-parse. This saves a fair number of cpu
2127         cycles :-)
2128
2129         * camel-mime-utils.c (header_decode_date): Cleanup the broken date
2130         parsing code.
2131
2132 2001-12-20  Jeffrey Stedfast  <fejj@ximian.com>
2133
2134         * camel-address.h: Change the prototype for camel_address_get_type
2135         to return a CamelType (since internally this is what it returns
2136         and also in case we decide to write a replacement for the current
2137         CamelObject it'd be easier to drop in).
2138
2139         * camel-internet-address.h: Same but for
2140         camel_internet_address_get_type()
2141
2142         * providers/smtp/camel-smtp-transport.c (smtp_send_to): Updated to
2143         use a CamelAddress of recipients.
2144         (smtp_send): Since smtp_send_to now takes a CamelAddress
2145         recipients argument, our lives have been simplified and we can now
2146         just concat To/Cc/Bcc into a recipients addr and send away.
2147
2148         * providers/sendmail/camel-sendmail-transport.c
2149         (sendmail_send_to): Updated to use a CamelAddress of recipients.
2150
2151         * camel-transport.c (camel_transport_send_to): Now takes a
2152         CamelAddress argument for the recipient list rather than a GList.
2153
2154 2001-12-19  Jeffrey Stedfast  <fejj@ximian.com>
2155
2156         * providers/smtp/Makefile.am: Remove the providerdir variable.
2157
2158         * providers/sendmail/Makefile.am: Same.
2159
2160 2001-12-17  Jeffrey Stedfast  <fejj@ximian.com>
2161
2162         * camel-charset-map.c (camel_charset_iso_to_windows): New function
2163         to map ISO charsets to the Windows charsets.
2164
2165         * camel-mime-part-utils.c (broken_windows_charset): Detect Windows
2166         charsets.
2167         (simple_data_wrapper_construct_from_parser): Simplify a tad and
2168         also check for iso-8859-* charsets that are really Windows
2169         charsets. Fixes bug #12631.
2170
2171 2001-12-17  Dan Winship  <danw@ximian.com>
2172
2173         * Makefile.am (INCLUDES): define CAMEL_PROVIDERDIR to be the
2174         configure.in-defined camel_providerdir.
2175
2176         * providers/Makefile.am: Remove some outdated comments
2177
2178         * providers/imap/Makefile.am (camel_provider_LTLIBRARIES,
2179         camel_provider_DATA): renamed from provider_LTLIBRARIES,
2180         provider_DATA.  
2181
2182         * providers/local/Makefile.am: Likewise 
2183
2184         * providers/nntp/Makefile.am: Likewise 
2185
2186         * providers/pop3/Makefile.am: Likewise 
2187
2188         * providers/sendmail/Makefile.am: Likewise 
2189
2190         * providers/smtp/Makefile.am: Likewise
2191
2192 2001-12-16  Jeffrey Stedfast  <fejj@ximian.com>
2193
2194         * providers/imap/camel-imap-folder.c (get_content): Reverted my
2195         previous changes here since it doesn't actually work afterall.
2196
2197         * providers/imap/camel-imap-wrapper.c (imap_wrapper_hydrate):
2198         Update to do uudecoding when appropriate.
2199
2200 2001-12-16  Jeffrey Stedfast  <fejj@ximian.com>
2201
2202         * providers/imap/camel-imap-folder.c (get_content): Try to use the
2203         original boundary so luis will stop bugging me about "data
2204         corruption". Also preserve other params in the multipart
2205         content-type by dumping it to a string and setting it on the mime
2206         part.
2207
2208 2001-12-14  Jeffrey Stedfast  <fejj@ximian.com>
2209
2210         * camel-filter-driver.c
2211         (camel_filter_driver_reset_filtered_count): Reset the
2212         filtered_count to zero.
2213         (camel_filter_driver_get_filtered_count): Return the private
2214         filtered_count value.
2215         (camel_filter_driver_filter_message): Increment the
2216         filtered_count.
2217         (camel_filter_driver_set_shell_exec_func): New function to set the
2218         shell-exec func.
2219         (shell_exec): New ESExp filter action callback.
2220
2221 2001-12-14  Jeffrey Stedfast  <fejj@ximian.com>
2222
2223         * camel-pgp-mime.c (camel_pgp_mime_part_verify): Removed
2224         x-inline-pgp-hack kludge because it doesn't work.
2225         (camel_pgp_mime_part_decrypt): Same.
2226
2227 2001-12-13  Chris Toshok  <toshok@ximian.com>
2228
2229         * camel-data-cache.c: include stdlib.h (for alloca on freebsd) and
2230         only include alloca.h if HAVE_ALLOCA_H is defined.
2231
2232 2001-12-11  Zbigniew Chyla  <cyba@gnome.pl>
2233
2234         Fixes #17085
2235
2236         * camel-charset-map.c: Added #include <errno.h>.
2237
2238         * camel-charset-map-private.h:
2239         Recreated (following instructions from camel-charset-map.c)
2240
2241 2001-12-11  Jeffrey Stedfast  <fejj@ximian.com>
2242
2243         * camel-object.c (camel_type_register): Keep a name-to-type hash
2244         so that we can make sure that the type has not yet been registered
2245         (prevents a race condition such as the one in bug #16559).
2246
2247         * camel-service.c (camel_service_connect): Make sure that the
2248         connect_op is non-NULL before unregistering/unreffing it.
2249
2250 2001-12-04  Jeffrey Stedfast  <fejj@ximian.com>
2251
2252         * camel-mime-utils.c (header_content_type_simple): Protect against
2253         either of the types being NULL.
2254
2255 2001-12-05  Jeffrey Stedfast  <fejj@ximian.com>
2256
2257         * camel-mime-filter-basic.c (filter): If complete() allocates
2258         len+2 bytes for the out buffer, so should this. See bug #16371 for
2259         an example case.
2260
2261 2001-12-05  Jeffrey Stedfast  <fejj@ximian.com>
2262
2263         * camel-sasl-digest-md5.c: iconv() returns a size_t, not an int.
2264
2265         * camel-pgp-context.c: The return value of iconv() is a size_t,
2266         not an int.
2267
2268         * camel-mime-part-utils.c (convert_buffer): Always use size_t args
2269         for iconv().
2270
2271         * camel-mime-filter-charset.c (complete): Always use size_t args
2272         for iconv().
2273         (filter): Same.
2274
2275         * camel-mime-utils.c (header_address_fold): Make headerlen a
2276         size_t instead of an int.
2277         (header_fold): Same.
2278         (base64_encode_close): We should be returning a size_t and inlen
2279         should also be a size_t.
2280         (base64_encode_step): Same here.
2281         (base64_decode_step): Here too.
2282         (base64_encode_simple): And here...
2283         (base64_decode_simple): Same.
2284         (uuencode_close): We should also use size_t's here...
2285         (uuencode_step): And here too.
2286         (uudecode_step): And also here.
2287         (quoted_encode_close): Same idea here.
2288         (quoted_encode_step): Again here.
2289         (quoted_decode_step): Here too.
2290         (quoted_encode): Input length should be a size_t.
2291         (rfc2047_decode_word): Same.
2292         (g_string_append_len): Here too.
2293         (append_8bit): "
2294         (rfc2047_encode_word): "
2295         (quote_word): "
2296         (hex_decode): "
2297         (rfc2184_decode): Use size_t's with iconv().
2298         (header_decode_param): Same.
2299
2300 2001-12-09  Jon Trowbridge  <trow@ximian.com>
2301
2302         * camel-folder-summary.c: Add "NeedsReply" to the flag_names array
2303         for CAMEL_MESSAGE_NEEDS_REPLY.
2304
2305         * camel-folder-summary.h: Added CAMEL_MESSAGE_NEEDS_REPLY flag.
2306
2307 2001-12-07  Dan Winship  <danw@ximian.com>
2308
2309         * camel-mime-message.c (camel_mime_message_set_date): Fix the
2310         tm_gmtoff case (its sign is the opposite of "timezone"). Fixes
2311         #14678
2312
2313 2001-11-29  Jeffrey Stedfast  <fejj@ximian.com>
2314
2315         * camel-folder-search.c (search_body_contains): Don't use regex
2316         matching. Fixes bug #16227.
2317
2318         * camel-mime-message.c (best_encoding): Check the content-object's
2319         mime type, not the mime part types. Should fix bug #15843.
2320
2321 2001-11-27  Jeffrey Stedfast  <fejj@ximian.com>
2322
2323         * providers/imap/camel-imap-folder.c (get_content): Return NULL if
2324         construct_from_stream fails.
2325         (get_message): Same.
2326         (get_message_simple): Here too.
2327         (add_message_from_data): And here.
2328
2329 2001-11-14    <NotZed@Ximian.com>
2330
2331         * camel-vee-folder.c (folder_changed_remove_uid): Use the uid
2332         rather than vuid for unmatched.  Also add the uid to unmatched if
2333         it wasn't in the unmatched_uids table at all.
2334         (folder_changed_change): If checking for added, if the new ones
2335         dont match, then try to add them to unmatched.  Fixes #6893.
2336
2337         * camel-folder-summary.c (camel_folder_summary_index): Change lock
2338         order, always summary_lock before ref_lock.
2339         (camel_folder_summary_array): "
2340         (camel_folder_summary_uid): "
2341         (camel_folder_summary_remove_uid): " Fixes a deadlock.
2342
2343 2001-11-30  Not Zed  <NotZed@Ximian.com>
2344   
2345         * providers/nntp/camel-nntp-*.c: Completely new implementation of
2346         NNTP.
2347         
2348         Doesn't support subscriptions yet (lists all folders), but should
2349         be more reliable (faster?), and has an integrated cache.
2350
2351         * camel-exception.c (camel_exception_new): Use e_memchunks for
2352         exception blocks.
2353         (camel_exception_free): Same.
2354
2355         * camel-data-cache.[ch]: New object for managing on-disk caches of
2356         anything that can be stored in a camel-stream.
2357
2358         * camel-file-utils.c (camel_file_util_mkdir): New function, just a
2359         nicer place to put this (than camel-store), should be removed from
2360         camel-store.
2361         (camel_file_util_safe_filename): New function to url-encode a
2362         filename.
2363
2364         * camel-mime-parser.c (drop_states): New func to drop the parser
2365         state to initial state.
2366         (folder_scan_init_with_fd): 
2367         (folder_scan_init_with_stream): Call above func to reset state if
2368         the stream is changed on us so we can change streams to reuse a
2369         parser object.
2370
2371 2001-11-25  Not Zed  <NotZed@Ximian.com>
2372
2373         * providers/nntp/camel-nntp-folder.c (nntp_folder_get_message): If
2374         the uid doesn't have a ',' in it, fail to crash.
2375
2376         * providers/nntp/camel-nntp-newsrc.c
2377         (camel_nntp_newsrc_article_is_read): check group != NULL before
2378         scanning.
2379         (camel_nntp_newsrc_get_highest_article_read): "
2380         (camel_nntp_newsrc_get_num_articles_read): "
2381         (camel_nntp_newsrc_mark_range_read): "
2382
2383         * providers/nntp/camel-nntp-store.c
2384         (camel_nntp_store_get_overview_fmt): IF we dont have
2385         nntp_list_follows, dont try and get a list response.
2386         (nntp_store_get_folder_info): Set path part of folderinfo.
2387
2388 2001-11-20  Jeffrey Stedfast  <fejj@ximian.com>
2389
2390         * providers/smtp/camel-smtp-transport.c (get_smtp_error_string):
2391         Check to see that errno is non-zero before returning
2392         g_strerror. If it's 0, then we have an unknown error.
2393
2394 2001-11-26  Jeffrey Stedfast  <fejj@ximian.com>
2395
2396         * camel-mime-filter-basic.c: For the uudecoding mode, garble up
2397         the "begin <mode> <filename>" line before decoding.
2398
2399         * camel-mime-part-utils.c
2400         (simple_data_wrapper_construct_from_parser): Add a uudecoder if
2401         the transfer encoding is x-uuencode.
2402
2403         * camel-mime-part.c (write_to_stream): Handle x-uuencoded content
2404         too.
2405
2406 2001-11-19  Jeffrey Stedfast  <fejj@ximian.com>
2407
2408         * camel-tcp-stream-ssl.c (stream_read): Added a check to see if
2409         the operation has been cancelled.
2410         (stream_write): Same.
2411
2412 2001-11-19  Jeffrey Stedfast  <fejj@ximian.com>
2413
2414         Updates for compliance with rfc2231
2415
2416         * camel-mime-utils.c (header_encode_param):
2417         camel_mime_special_table[c] & IS_ESAFE should have been
2418         !(camel_mime_special_table[c] & IS_ESAFE). Also added a few
2419         comments for how to improve the code at some future date.
2420         (header_decode_param): Now takes an argument rfc2184_part so our
2421         caller can get this information as well.
2422         (header_decode_param_list): Pass an rfc2184_part argument to
2423         header_decode_param and also added a few comments on where to
2424         improve on rfc2184/rfc2231 compliance.
2425         (rfc2047_decode_word): Updated to respect the updated ABNF syntax
2426         of rfc2047 encoded words, yay.
2427
2428 2001-11-16  Jeffrey Stedfast  <fejj@ximian.com>
2429
2430         * providers/imap/camel-imap-utils.c (imap_parse_body): Abort if
2431         body == NULL.
2432
2433         * camel-mime-filter-tohtml.c (camel_mime_filter_tohtml_new): New
2434         mime filter to convert plain text to html.
2435
2436 2001-11-16  Jeffrey Stedfast  <fejj@ximian.com>
2437
2438         Since some mail clients like Outlook are broken, we need to set a
2439         name parameter on pgp signed and encrypted parts.
2440
2441         * camel-pgp-mime.c (camel_pgp_mime_part_encrypt): Set a name
2442         parameter.
2443         (camel_pgp_mime_part_sign): Same.
2444
2445 2001-11-14  Jeffrey Stedfast  <fejj@ximian.com>
2446
2447         * providers/imap/camel-imap-command.c
2448         (camel_imap_command_response): If we get a BYE response, call
2449         camel_service_disconnect() and set an exception. Also do the check
2450         for "* BYE" first instead of passing it off imap_read_untagged()
2451         since we'll just waste time in there mallocing left and right only
2452         to arrive at the single response line "* BYE" again :-)
2453
2454 2001-11-13    <NotZed@Ximian.com>
2455
2456         * camel-filter-search.c (get_source): If we have no source string,
2457         then use undefined, which should always evaluate to FALSE.  Fix
2458         for #15267.
2459
2460 2001-11-12  Jeffrey Stedfast  <fejj@ximian.com>
2461
2462         * camel-store.c (camel_store_get_folder): Added a
2463         g_return_val_if_fail for folder_name != NULL.
2464
2465 2001-11-08  Jeffrey Stedfast  <fejj@ximian.com>
2466
2467         * camel-pgp-context.c (crypto_exec_with_passwd): If any of the
2468         pipe()'s fail, clean up any pipes that may have succeeded. Also
2469         close the password fds.
2470
2471 2001-11-09    <NotZed@Ximian.com>
2472
2473         * providers/imap/camel-imap-store.c (imap_auth_loop): If we get a
2474         user cancel and that causes us to fail to authenticate, abort
2475         rather than loop forever.  Fix for #14951.
2476
2477 2001-11-06  Jeffrey Stedfast  <fejj@ximian.com>
2478
2479         * providers/imap/camel-imap-command.c
2480         (camel_imap_command_continuation): Now takes a command-length
2481         argument so we can 1) avoid duping the command string yet again,
2482         yay. 2) we now don't have to worry about embedded nul-chars
2483         screwing us over (we still need to avoid allowing them into the
2484         string but at least now it won't mess us up).
2485
2486         * providers/imap/camel-imap-folder.c (do_append): Instead of
2487         appending a nul char to the end of the byte array and then passing
2488         that off as if it were a string to
2489         camel_imap_command_continuation, instead pass the byte-array
2490         length since that function now takes a length argument. Yay.  Also
2491         encode any 8bit parts to avoid the possibility of sending embedded
2492         nul chars to the imap server.
2493
2494         * providers/imap/camel-imap-store.c (try_auth): Updated to pass a
2495         command-length argument to camel_imap_command_continuation().
2496
2497 2001-11-07  Jeffrey Stedfast  <fejj@ximian.com>
2498
2499         * camel-tcp-stream-ssl.c (save_ssl_cert): Oops, pass a mode
2500         argument to the open() call.
2501
2502         * camel-tcp-stream-openssl.c (save_ssl_cert): Oops, pass a mode
2503         argument to the open() call.
2504
2505 2001-11-07  Jeffrey Stedfast  <fejj@ximian.com>
2506
2507         * camel-pgp-mime.c (camel_pgp_mime_part_decrypt): Add code to
2508         kludge around any x-inline-pgp-hacks by prepending some content
2509         headers to the decrypted data.
2510
2511 2001-11-02  Jeffrey Stedfast  <fejj@ximian.com>
2512
2513         * camel-data-wrapper.c (camel_data_wrapper_init): Initialize our
2514         private mutex.
2515         (camel_data_wrapper_finalize): Destroy our private mutex.
2516         (write_to_stream): Lock around camel_stream_write_to_stream() so
2517         that we don't get 2 threads trying to read from our stream at the
2518         same time.
2519
2520 2001-11-01    <NotZed@Ximian.com>
2521
2522         * camel-vee-folder.c (folder_changed_change): Move all searching
2523         operations outside of any locks except subfolder lock, same as
2524         build_folder.  Fix for #14294.
2525
2526 2001-10-31    <NotZed@Ximian.com>
2527
2528         * providers/local/camel-spool-folder.c (spool_get_message): Same
2529         as below.
2530
2531         * providers/local/camel-maildir-folder.c (maildir_get_message):
2532         Same as below.
2533
2534         * providers/local/camel-mbox-folder.c (mbox_get_message): Set
2535         USER_CANCEL if failed due to EINTR.
2536
2537         * camel-filter-driver.c (camel_filter_driver_filter_mbox): If
2538         construct from parser fails due to user cancel, set USER_CANCEL on
2539         exception.
2540
2541         * camel-mime-part.c (construct_from_parser): Return error if the
2542         parser had an io error.
2543
2544         * camel-mime-message.c (construct_from_parser): Check error on
2545         parser/return error.
2546
2547         * camel-mime-parser.c (folder_scan_init): Init error number.
2548         (camel_mime_parser_errno): New function, return errno of any io
2549         failures.
2550         (folder_read): Set errno if a failure occured.
2551         (folder_seek): Same.
2552         (folder_scan_init_with_fd): Setup errno depeding on ok/failure.
2553         (folder_scan_init_with_stream): Same.
2554
2555 2001-10-30    <NotZed@Ximian.com>
2556
2557         * camel-operation.c (camel_operation_new): Dont setup cancel_fd.
2558         (camel_operation_cancel_fd): If cancel_fd not created, set it up.
2559         (camel_operation_cancel): Set cancel flag before sending message.
2560         (cancel_thread): Same.
2561
2562         * camel-filter-driver.c (camel_filter_driver_filter_mbox): Make
2563         sure we unref the mimeparse when we're done (successfully).  This
2564         was leaking an fd every get-mail! :(
2565
2566         * camel-lock-client.c (camel_lock_helper_init): Close all fd's
2567         above 2.
2568
2569         * providers/local/camel-mbox-folder.c (mbox_get_message): Remove
2570         the X-Evolution header before anyone else gets to see this private
2571         thing.  Shoudl fix 11676 since we were inheriting flags from
2572         X-Evolution headers we didn't want to.
2573
2574         * camel-folder-search.c (match_message): If we can't retrieve the
2575         message, ignore it, it can't match.
2576
2577         * providers/imap/camel-imap-search.c
2578         (camel_imap_search_class_init): Setup parent class pointer.
2579         (imap_body_contains): If offline, just use the parent
2580         body_contains method which will get the messages and search them
2581         manually.
2582
2583         * providers/imap/camel-imap-folder.c (imap_search_by_expression,
2584         imap_search_by_uids): Remove offline check.
2585
2586 2001-10-30  Dan Winship  <danw@ximian.com>
2587
2588         * camel-mime-part.c (free_headers): Fix this to match get_headers.
2589
2590 2001-10-30    <NotZed@Ximian.com>
2591
2592         * providers/local/camel-local-store.c (rename_folder): Dont try to
2593         move ibex if we have none.
2594
2595         * camel-tcp-stream-openssl.c (stream_write): Fixed compilation
2596         errors.
2597
2598 2001-10-29  Jeffrey Stedfast  <fejj@ximian.com>
2599
2600         * camel-mime-utils.c (camel_mime_utils_init): Removed unused
2601         variable.
2602
2603 2001-10-30    <NotZed@Ximian.com>
2604
2605         * camel-mime-utils.c (header_decode_mailbox): w(x) out some warnings.
2606
2607         * providers/local/camel-local-summary.c
2608         (camel_local_summary_load): Remove the warning about not loading
2609         summary file - its a valid case for new folders.
2610
2611 2001-10-29  Jeffrey Stedfast  <fejj@ximian.com>
2612
2613         * camel-tcp-stream-openssl.c (my_SSL_write): Removed.
2614         (stream_write): Keep looping (non-blocking case) if errno is
2615         EAGAIN, EINTR or EWOULDBLOCK. For NONBLOCKing I/O, sync up with
2616         CamelTcpStreamRaw. As with CamelTcpStreamRaw/SSL - make sure to
2617         write out everything before returning.
2618         (my_SSL_read): Removed.
2619         (stream_read): Just call ssl_error_to_errno() and check the errno
2620         values that we care about so we can keep the general look of all
2621         this stream code the same. Also when checking the return value of
2622         SSL_read, check for <0 instead of ==-1 since the man page for
2623         SSL_read doesn't say it will return -1 on fail, it just says <0.
2624         (stream_flush): Don't fsync() since syncing on a socket is a Bad
2625         Thing (tm).
2626
2627         * camel-tcp-stream-ssl.c (stream_write): Make sure we write out
2628         everything just like in camel-tcp-stream-raw.c.
2629
2630         * camel-stream-buffer.c (camel_stream_buffer_gets): If
2631         camel_stream_read() returns -1, don't necessarily return -1 to our
2632         caller since it's possible that we did actually "read" some data
2633         (ie, we copied some pre-buffered data into the out buffer).
2634
2635         * camel-stream-buffer.h: Removed CAMEL_STREAM_BUFFER_NEWLINE since
2636         it never got used anywhere and it isn't supported anyway.
2637
2638 2001-10-30    <NotZed@Ximian.com>
2639
2640         * providers/imap/camel-imap-store.c
2641         (parse_list_response_as_folder_info): If we get an empty name,
2642         then mark that as NoSelect.  Workaround fix for #13239.
2643
2644 2001-10-29  Dan Winship  <danw@ximian.com>
2645
2646         * providers/imap/camel-imap-folder.c (get_message_simple, 
2647         imap_get_message): Set an X-Evolution-Source header on the
2648         returned message so replies come from the right identity.
2649
2650 2001-10-29    <NotZed@Ximian.com>
2651
2652         * camel-vee-folder.c (folder_changed_change): If we're not going
2653         to search on a changed uid, make sure we change out copy still.
2654         Fixes #13916.
2655
2656 2001-10-29  Jeffrey Stedfast  <fejj@ximian.com>
2657
2658         * providers/imap/camel-imap-store.c (subscribe_folder): Don't emit
2659         a folder_subscribed signal if we are in the process of renaming
2660         folders.
2661         (unsubscribe_folder): Same here but for the unsubscribe signal.
2662         (rename_folder): Unsubscribe from the folder being renamed and any
2663         subfolders it may have before actually renaming. Once the folder
2664         has been renamed, re-subscribe to it and it's subfolders with the
2665         new name.
2666
2667         * camel-store.c (camel_folder_info_build): Sort the folder info's
2668         before constructing the tree.
2669
2670         * camel-mime-utils.c (header_decode_param): Minor fix - should
2671         have been using a strNcmp when checking if it was an rfc2047
2672         encoded word.
2673
2674         * camel-pgp-context.c (pgp_sign): Notify the user that PGP 2.6.x
2675         is no longer supported and use camel_exception_set() instead of
2676         setv() where appropriate.
2677         (pgp_clearsign): Same.
2678         (pgp_verify): And again here.
2679         (pgp_encrypt): Here too.
2680         (pgp_decrypt): And finally here.
2681
2682 2001-10-29  Dan Winship  <danw@ximian.com>
2683
2684         * providers/imap/camel-imap-store.c (unsubscribe_folder): Don't
2685         free the hash table key if the folder wasn't found in the hash
2686         table. I'm not sure where the bug is/was that made it possible to
2687         add a folder to the tree after creating it failed, but now if that
2688         happens, it won't crash if you try to delete it again. (#11492)
2689
2690         * camel-disco-store.c (camel_disco_store_status): if the service
2691         is being connected and thinks it's online, but the session is
2692         offline, then mark the service offline as well. Fixes 13683.
2693
2694 2001-10-29    <NotZed@Ximian.com>
2695
2696         * camel-mime-utils.c: Turn off w() -> warnings.
2697
2698         * providers/imap/camel-imap-store.c (rename_folder): Also rename
2699         the message cache.
2700         (rename_folder): Fix subscribed folders table with rename(s).
2701
2702         * providers/imap/camel-imap-folder.c (imap_rename): Implement,
2703         rename the cache dir pointer.
2704
2705         * providers/imap/camel-imap-message-cache.c
2706         (camel_imap_message_cache_set_path): New method to set the path
2707         used by a message cache.
2708
2709         * camel-vee-store.c (build_info): Fix the 'is this a matching
2710         subfolder or subfolder' logic to match camel-store
2711         get_subfolders'.
2712
2713         * camel-store.c (get_subfolders): Fix the 'is this a matching
2714         folder or subfolder' logic.
2715
2716 2001-10-28    <NotZed@Ximian.com>
2717
2718         * providers/local/camel-local-store.c (rename_folder): Changed to
2719         call ibex_move to rename it internally.
2720
2721         * camel-store.c (camel_store_rename_folder): Use the right
2722         variable, not info.
2723
2724 2001-10-28  Jeffrey Stedfast  <fejj@ximian.com>
2725
2726         * camel-stream-buffer.c (camel_stream_buffer_read_line): Make sure
2727         we've actually read data before checking if p[-] is '\r' or not.
2728
2729         * camel-tcp-stream-raw.c (stream_write): Same.
2730
2731         * camel-stream-fs.c (stream_write): If errno isn't EAGAIN, just
2732         exit with -1 and instead of using continue (which doesn't go to
2733         the top of the do-while thus making our logic suck), just set w to
2734         0. Still seems to be a bug in select() if it's telling us the
2735         socket is ready for data when it really isn't but oh well.
2736
2737 2001-10-28    <NotZed@Ximian.com>
2738
2739         * providers/local/camel-local-folder.c
2740         (camel_local_folder_construct): Use path not protocol as the path
2741         part of the uri of the folder_created event.
2742
2743         * providers/local/camel-maildir-store.c (scan_dir): If FAST is
2744         set, dont try and scan for unread counts.
2745
2746         * providers/local/camel-local-store.c (create_folder): Implement,
2747         just return the folderinfo of the folder matched, not all of it.
2748
2749         * camel-store.c (camel_store_rename_folder): Rename the
2750         camelfolders before emitting the folderchanged event (otherwise
2751         vstore fails to pick up change.
2752
2753 2001-10-27    <NotZed@Ximian.com>
2754
2755         * camel-store.c (camel_store_init): Always use a default dir_sep
2756         of '/'.
2757
2758         * camel-store.h (struct _CamelStore): Added a dir_sep to the base
2759         store so rename and whatnot can work, temporary fix for mixed dir
2760         separator in folder name api's.
2761
2762         * providers/imap/camel-imap-store.c (rename_folder): Finished
2763         implementation.
2764         (imap_connect_online): Also set the store's dir_sep here.
2765         (imap_connect_offline): "
2766
2767         * providers/local/camel-local-folder.c (local_rename): Implement
2768         local rename of folder objects.
2769
2770 2001-10-26    <NotZed@Ximian.com>
2771
2772         * camel-vee-folder.c (camel_vee_folder_class_init): Hook into
2773         rename function.
2774         (vee_rename): Implement the veefolder rename function.
2775         (camel_vee_folder_class_init): 
2776         (folder_changed_change): Kill a warning with a cast.
2777
2778         * camel-vee-store.c (vee_rename_folder): Emit a folder_renamed
2779         event properly, also call parent to do some rename stuff.
2780
2781         * camel-store.h: Added a CamelRenameInfo for the rename event.
2782
2783         * camel-folder.c (camel_folder_rename): New function to rename a
2784         folder object.
2785         (camel_folder_class_init): Added a renamed event.
2786         (folder_rename): Default impl, set full_name, and set name
2787         assuming the dir separator is '/'.
2788
2789         * camel-store.c (camel_store_class_init): Added folder_renamed
2790         event.
2791         (camel_store_rename_folder): Rename an active folder object if we
2792         have one, and update the folder table.
2793         (rename_folder): Make a default implementation that handles
2794         updating the folder tree.
2795
2796 2001-10-26  Jeffrey Stedfast  <fejj@ximian.com>
2797
2798         * providers/imap/camel-imap-store.c (delete_folder): Don't bother
2799         checking ex since we can rely on the response being NULL on error.
2800         (rename_folder): Implemented.
2801
2802 2001-10-26  Jeffrey Stedfast  <fejj@ximian.com>
2803
2804         * providers/imap/camel-imap-folder.c (imap_get_message): Check to
2805         make sure that the dataset is non-NULL before using and/or
2806         freeing.
2807
2808         * camel-tcp-stream-raw.c (stream_write): Check for EWOULDBLOCK
2809         too?
2810         (stream_read): Same.
2811         (stream_flush): Return 0 always, fsync() and tcp sockets don't
2812         play nice :-)
2813
2814         * providers/imap/camel-imap-message-cache.c
2815         (camel_imap_message_cache_get): Lets try putting a
2816         camel_stream_reset() here. Logic being that the stream may have
2817         been read from since it was cached and thus our caller may try
2818         reading from it and get no data from it since it is already at the
2819         EOS. This may fix bug #12943.
2820
2821 2001-10-25    <NotZed@Ximian.com>
2822
2823         * camel-search-private.c (utf8_get): Remove the stupid warning
2824         that should never have been there in the first place.
2825
2826         * camel-sasl-digest-md5.c (digest_response): s/iconv/e_iconv/
2827
2828         * camel-pgp-context.c (pgp_verify): "
2829
2830         * camel-mime-utils.c (rfc2047_decode_word, rfc2047_decode_word,
2831         append_8bit, rfc2047_encode_word, rfc2184_decode,
2832         header_decode_param): "
2833
2834         * camel-mime-part-utils.c (convert_buffer, convert_buffer): "
2835
2836         * camel-mime-filter-charset.c (reset, complete, filter): "
2837
2838 2001-10-24    <NotZed@Ximian.com>
2839
2840         * camel-mime-filter-basic.c (complete): For qp decoding, if the
2841         data isn't really qp encoded, we could possible grow the buffer by
2842         upto 2 bytes above the input size, fix allocations/assertions
2843         appropraitely.
2844
2845         * camel-vee-folder.c (folder_changed_change): If we're not
2846         autoupdate, only search for new matches against changed uid's that
2847         we dont already have.
2848
2849 2001-10-24  Dan Winship  <danw@ximian.com>
2850
2851         * providers/imap/camel-imap-store.c (unsubscribe_folder): Don't
2852         let fi->name be NULL.
2853
2854 2001-10-24  Jeffrey Stedfast  <fejj@ximian.com>
2855
2856         * camel-stream-fs.c (stream_read): Same as in the TcpStreamRaw code.
2857         (stream_write): And again here...
2858
2859         * camel-tcp-stream-raw.c (stream_read): Handle the EAGAIN error
2860         case as well.
2861         (stream_write): Same here, this might fix the SMTP truncation
2862         thing? I hope?
2863
2864 2001-10-23  Dan Winship  <danw@ximian.com>
2865
2866         * camel-mime-utils.c (mail_list_magic): Remove an extra * in one
2867         of the regexps that glibc apparently doesn't mind but bsd does.
2868
2869 2001-10-23    <NotZed@Ximian.com>
2870
2871         * providers/local/camel-mbox-summary.c: made d(x) x recompile again.
2872
2873 2001-10-22    <NotZed@Ximian.com>
2874
2875         * providers/local/camel-spool-summary.c (summary_rebuild): No, use
2876         Storing, as the other code does :p
2877         (spool_summary_check): Check for consistency.
2878
2879 2001-10-22  Jon Trowbridge  <trow@ximian.com>
2880
2881         * providers/local/camel-spool-summary.c (summary_rebuild):
2882         s/summarising/summarizing/.
2883         (spool_summary_check): s/summarise/summarize/.
2884
2885 2001-10-22  Jeffrey Stedfast  <fejj@ximian.com>
2886
2887         * camel-pgp-mime.c (camel_pgp_mime_part_verify): If we are
2888         kludging around a inline-pgp signed part, do some charset
2889         conversion to protect any 8bit text.
2890
2891 2001-10-22    <NotZed@Ximian.com>
2892
2893         * camel-filter-search.c, camel-folder-search.c (check_header): Use
2894         search_type_mlist for mailing list searches.
2895
2896         * camel.c (camel_init): call camel-mime-utils-init func.
2897
2898         * camel-mime-utils.c: Changed mail mail_list_magic to include a
2899         domain part, also pre-compile all the patterns.  They are all
2900         backward compatible except List-Id: which now uses the
2901         mail-address-like <list-name.host.name> part rather than the
2902         plain-text part (which might've been blank anyway).
2903         (camel_mime_utils_init): Initialisation function to setup any
2904         static data required by camel-mime-utils at run-time.  We now
2905         setup the base64/charset class tables here, so it doesn't need to
2906         be done statically.
2907         (camel_mime_special_table, camel_mime_base64_rank): No longer
2908         statically initialise these.
2909         (main): Removed + the tests at the end of the file.
2910         (header_raw_check_mailing_list): Dont compile regex's here,
2911         already compiled in utils_init.  Use the regex patterns to remove
2912         leading <'s from addresses.  Also, if there is a domain part
2913         matched, add that after a '@' is added.
2914
2915         * camel-search-private.c (camel_search_header_match): Match check
2916         against all addresses in a multiple address match.  Should fix
2917         #13051.
2918         (camel_search_header_match): Oops, missing i=0.
2919         (camel_search_header_match): Added SEARCH_TYPE_MLIST for mlist
2920         search types.  It ignores the domain part if either (but not both)
2921         of the values dont have it.
2922
2923 2001-10-22  Dan Winship  <danw@ximian.com>
2924
2925         * camel-pgp-mime.c (camel_pgp_mime_part_verify): Add a hack: if
2926         the multipart/signed part has a "x-inline-pgp-hack" parameter in
2927         its Content-Type, don't pass the MIME headers as part of the data
2928         to be verified.
2929
2930 2001-10-22  Rodrigo Moya <rodrigo@ximian.com>
2931
2932         * Makefile.am: added $GNOME_INCLUDEDIR to INCLUDES, needed for latest
2933         libgnome, which install headers in $(prefix)/gnome-1.0
2934
2935 2001-10-21  Jeffrey Stedfast  <fejj@ximian.com>
2936
2937         * camel-mime-part-utils.c
2938         (simple_data_wrapper_construct_from_parser): Only do the rawtext
2939         checks if the part is a text part, otherwise don't bother wasting
2940         cpu cycles.
2941
2942         * camel-store.c (camel_folder_info_build): Updated comments to
2943         make the code a bit more clear.
2944
2945 2001-10-21    <NotZed@Ximian.com>
2946
2947         * camel-store.c (CS_CLASS): Dont do the macro stuff - basically so
2948         you can actually debug calls.
2949         (camel_store_uri_cmp): New function to compare store objects.
2950
2951         * camel-vee-folder.c (vee_folder_add_info): oops, dont free the
2952         vuid, since its alloca'd now.
2953         (folder_changed_change): Kill a compile warning.
2954
2955 2001-10-20    <NotZed@Ximian.com>
2956
2957         * camel-folder.c (move_messages_to): If no exception supplied, use
2958         a local one.
2959         (move_message_to): Set the seen flag also when we delete it.
2960
2961 2001-10-19  Jeffrey Stedfast  <fejj@ximian.com>
2962
2963         * camel-vtrash-folder.c (vtrash_move_messages_to): If the
2964         destination folder is the vfolder source folder, then
2965         set_message_flags on it.
2966
2967 2001-10-19    <NotZed@Ximian.com>
2968
2969         * camel-session.c (register_provider): When registering provider,
2970         translate all strings.
2971
2972         * camel-vee-folder.c (camel_vee_folder_remove_folder): Lock the
2973         right lock for unmatched subfolder list stuff.  If the sub folder
2974         is deleted & part of unmatched, or the last ref to the sub folder
2975         is gone from unmatched, blow it away completely from unmatched,
2976         but only do it once.
2977         (vee_folder_remove_folder): Added arg to kill unmatched
2978         unconditionally.  Also handle deleted folders, always remove
2979         stuff.
2980         (folder_changed_change): Lock subfolder lock for entirety of
2981         operation, and also check to see if the subfolder is still there
2982         before doing any fancy work (incase it got removed while we were
2983         waiting to execute).
2984         (folder_changed_change_uid): Use alloca for vuid, and not
2985         sprintf(".lengths")
2986         (vee_search_by_expression): Dont use sprintf for vuid.
2987         (vee_search_by_uids): "
2988         (vee_folder_add_info): "
2989         (folder_changed_remove_uid): "
2990         (folder_changed_change): "
2991         (folder_changed_change_uid): Also check folder_unmatched for
2992         changed uid's so we properly update/propagate unmatched changes.
2993         (folder_changed_change): Ok, so dont hold the subfolder lock for
2994         the whole duration of the changed event, although we probably
2995         should, requires a recursive mutex.
2996         (folder_changed_change): Change logic, we always add changed stuff
2997         if it now matches, but dont remove it unless its auto-remove, only
2998         propagate changes for it.
2999         (vee_set_message_flags): Call parent method after doing our work.
3000         (vee_set_message_user_flag): Same here.
3001
3002 2001-10-18  Jeffrey Stedfast  <fejj@ximian.com>
3003
3004         * camel-mime-part-utils.c
3005         (simple_data_wrapper_construct_from_parser): If a charset isn't
3006         specified or claims to be utf-8, check the validity of the text
3007         and if it's invalid, set the rawtext bit to TRUE. If the charset
3008         is x-unknown or some other x- charset, always set the rawtext bit
3009         to TRUE.
3010
3011 2001-10-18    <NotZed@Ximian.com>
3012
3013         * camel-store.c (camel_store_unsubscribe_folder): If we are
3014         unsubscribing from a folder we have loaded, set the folder
3015         deleted, as with the delete_folder case.
3016
3017         * providers/(imap|local|pop3|sendmail|smtp)/Makefile.am: Added
3018         CAMEL_CFLAGS so we get the right iconv stuff, patch from Yanko
3019         Kaneti <yaneti@declera.com>
3020
3021 2001-10-18  Jeffrey Stedfast  <fejj@ximian.com>
3022
3023         * camel-pgp-context.c (crypto_exec_with_passwd): Make sure the
3024         cancel_fd isn't -1.
3025
3026 2001-10-18  Jeffrey Stedfast  <fejj@ximian.com>
3027
3028         * providers/imap/camel-imap-message-cache.c (insert_finish): Flush
3029         the stream here, not sure it really matters but it might
3030         (hopefully) fix bug #12943.
3031
3032         * camel-pgp-context.c (crypto_exec_with_passwd): Make
3033         user-cancellable.
3034
3035         * providers/local/camel-local-provider.c: String cleanup for bug
3036         #6640.
3037
3038         * providers/imap/camel-imap-folder.c (imap_sync_online): Fix my
3039         Cyrus imapd workaround...instead of checking to see if info->flags
3040         == FLAGGED, just check to see if it contains any IMAP flags.
3041
3042 2001-10-17    <NotZed@Ximian.com>
3043
3044         * providers/local/camel-maildir-folder.c
3045         (camel_maildir_folder_new): Use '.' as the inbox name for filter
3046         new messages test.
3047
3048         * camel-store.c (camel_folder_info_clone): New function to clone a
3049         folderinfo tree.
3050
3051 2001-10-17  Jeffrey Stedfast  <fejj@ximian.com>
3052
3053         * providers/local/camel-mh-folder.c (mh_append_message): Same as
3054         maildir and mbox append-message.
3055
3056         * providers/local/camel-maildir-folder.c (maildir_append_message):
3057         Same as mbox append.
3058
3059         * camel-exception.c (camel_exception_set): Make sure the new
3060         description isn't the same as the old description pointer before
3061         freeing the old one.
3062         (camel_exception_setv): Don't free the old description until we
3063         set the new one this way we can reuse the old description in the
3064         new description.
3065
3066         * providers/local/camel-mbox-folder.c (mbox_append_message): If
3067         errno == EINTR, then we got a user-cancel so set the exception
3068         appropriately so that we don't make the user shit his pants.
3069
3070         * camel-filter-driver.c (do_copy): Add an optimization for when
3071         destination folder is the same as the source folder.
3072
3073 2001-10-17    <NotZed@Ximian.com>
3074
3075         * providers/imap/camel-imap-store.c (get_folder_info_online):
3076         (parse_list_response_as_folder_info): Patch from Danw, Use unread
3077         count of -1 to mark unflagged messages.  Make sure any folder we
3078         dont lookup explicitly is marked as -1.  Should fix #9947 and
3079         friends.
3080
3081         * providers/local/camel-mbox-summary.c (mbox_summary_sync): Only
3082         touch the summary if the timestamp or size changed.
3083
3084 2001-10-17  Jeffrey Stedfast  <fejj@ximian.com>
3085
3086         * camel-filter-driver.c (camel_filter_driver_filter_message): Set
3087         the DELETED flag on directly on the info if the source folder
3088         doesn't have summary capability.
3089
3090 2001-10-17  Not Zed  <NotZed@Ximian.com>
3091
3092         * camel-tcp-stream-raw.c (stream_write): As below.
3093
3094         * camel-stream-fs.c (stream_write): If not checking cancellation,
3095         make sure we write out everything asked of us.
3096
3097 2001-10-16  Jeffrey Stedfast  <fejj@ximian.com>
3098
3099         * camel-pgp-context.c (pgp_verify): Rearange the order of the gpg
3100         options slightly otherwise it might try to use "--no-tty" as the
3101         filename to verify :-)
3102
3103         * camel-object.[c,h]: If CAMEL_DEBUG is defined, print some useful
3104         ref/unref info.
3105
3106         * providers/imap/camel-imap-store.c (delete_folder): Fixed an
3107         assignment warning.
3108
3109         * camel-uid-cache.c (camel_uid_cache_new): Make sure that the
3110         parent directory exists before trying to open the filename, if it
3111         doesn't, create it.
3112
3113 2001-10-16    <NotZed@Ximian.com>
3114
3115         * camel-mime-utils.c (header_address_decode): If no content, dont
3116         try and decode further and spit meaningless warnings.
3117
3118 2001-10-16  Jeffrey Stedfast  <fejj@ximian.com>
3119
3120         * camel-filter-driver.c (do_flag): Only perform the operation on
3121         the folder if the folder has summary capability, else just poke
3122         the info directly. Fixes the "Filters don't work" bug.
3123         (do_score): Same.
3124         (do_colour): And here too.
3125
3126 2001-10-15  Jeffrey Stedfast  <fejj@ximian.com>
3127
3128         * camel-stream-fs.c (stream_read): Save the errno before calling
3129         fcntl so fcntl doesn't overwrite errno in case of a previous
3130         error.
3131         (stream_write): Same.
3132
3133 2001-10-13  Jeffrey Stedfast  <fejj@ximian.com>
3134
3135         * providers/smtp/camel-smtp-transport.c (smtp_data): Replace the
3136         Bcc headers in a single location and don't flush the data unless
3137         the write was successful.
3138
3139 2001-10-12  Jeffrey Stedfast  <fejj@ximian.com>
3140
3141         * Makefile.am: Remove the stripheader filter from the build.
3142
3143         * camel-mime-filter-stripheader.[c,h]: Removed.
3144
3145         * providers/smtp/camel-smtp-transport.c (smtp_data): Check the
3146         return value of camel_stream_flush to make sure it flushed the
3147         data successfully before continuing. Don't use the stripheader
3148         filter, it was completely broken - instead remove the header and
3149         set it again after we send.
3150
3151 2001-10-12    <NotZed@Ximian.com>
3152
3153         * camel-vee-folder.c (camel_vee_folder_remove_folder): Unhook from
3154         all events before removing folder.
3155         (camel_vee_folder_add_folder): Hook onto delete event.
3156         (camel_vee_folder_finalise): Unhook from deleted event for suibfolder.
3157         (subfolder_deleted): When the folder is deleted, remove it from
3158         the vfolder automagically.
3159
3160 2001-10-11    <NotZed@Ximian.com>
3161
3162         * camel-vee-folder.c (vee_search_by_uids): convert the uids list
3163         to a subset appropriate for each subfolder before trying to search
3164         on it.
3165
3166         * camel-charset-map.[ch]: Removed charset/locale charset lookup
3167         and iconv_open/close functions, moved to gal.  Fixed all callers.
3168
3169 2001-10-11  Jeffrey Stedfast  <fejj@ximian.com>
3170
3171         * camel-tcp-stream-ssl.c (ssl_cert_is_saved): Same.
3172
3173         * camel-tcp-stream-openssl.c (ssl_cert_is_saved): Instead of
3174         opening the file, stat it and make sure that it belongs to us.
3175
3176 2001-10-10  Jeffrey Stedfast  <fejj@ximian.com>
3177
3178         * camel-tcp-stream-openssl.c (ssl_verify): Same hack as below.
3179
3180         * camel-tcp-stream-ssl.c (ssl_bad_cert): Hack around the fact that
3181         adding a cert to nss's certdb seems to not work.
3182
3183 2001-10-10    <NotZed@Ximian.com>
3184
3185         * camel-vee-folder.c (vee_sync): Only re-build the folder if we're
3186         expunging.  Also only clear out the changed folders list if we're
3187         expungung and everything worked.
3188
3189 2001-10-10  Jeffrey Stedfast  <fejj@ximian.com>
3190
3191         * camel-charset-map.c (camel_charset_map_init): Added a hack for
3192         Solaris systems.
3193
3194 2001-10-10    <NotZed@Ximian.com>
3195
3196         * providers/local/camel-maildir-store.c (scan_dir): oops, we want
3197         get_unread_message_count, not get_message_count!
3198
3199 2001-10-09    <NotZed@Ximian.com>
3200
3201         * camel-service.c (camel_service_disconnect): Duplicate connect
3202         code that unregisters a cancel op if we created one.
3203
3204         * camel-operation.c (camel_operation_progress): Another go at
3205         getting the logic right again.  Make transients only update after
3206         5 seconds (CAMEL_OPERATION_TRANSIENT_DELAY)
3207         (camel_operation_end): Likewise.
3208
3209         * providers/local/camel-spool-folder.c (spool_search_by_uids):
3210         Implement.
3211
3212         * providers/imap/camel-imap-search.c (imap_body_contains): If
3213         searching a sub-set of the total message count, then use a UID
3214         range to search only specific messages.
3215
3216         * camel-vee-folder.c (vee_folder_change_match): Removed.
3217         (folder_changed_add_uid): Helper func for changed code.
3218         (folder_changed_remove_uid): "
3219         (folder_changed_change_uid): "
3220         (folder_changed): Rewritten.  Supports proper auto-updating of
3221         changes, but not removals till a sync occurs.
3222         (vee_search_by_uids): Implement.
3223         (folder_changed): Changed to call an async threaded function to do
3224         the actual folder updating.
3225
3226         * camel-folder-summary.c (camel_flag_list_copy): New func to copy
3227         a whole list of flags.
3228         (camel_tag_list_copy): New func to copy a whole list of flags.
3229
3230         * providers/imap/camel-imap-folder.c (imap_search_by_uids):
3231         Implement.
3232
3233         * providers/local/camel-local-folder.c (local_search_by_uids):
3234         Implement.
3235
3236         * camel-folder.c (camel_folder_search_by_uids): New function,
3237         search a subset of uid's.
3238         (search_by_uids): Default impl, return error.
3239
3240 2001-10-08  Dan Winship  <danw@ximian.com>
3241
3242         * camel-folder.h (struct _CamelFolder): replace the ever-growing
3243         list of gbooleans with a single guint32 for flags.
3244
3245         * camel-folder.c: Update folder flag setting/checking.
3246
3247         * providers/pop3/camel-pop3-folder.c (camel_pop3_folder_init):
3248         * providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new): 
3249         * providers/local/camel-spool-folder.c (spool_init,
3250         camel_spool_folder_new): 
3251         * providers/local/camel-maildir-folder.c (camel_maildir_folder_new): 
3252         * providers/local/camel-local-folder.c (local_init): 
3253         * providers/imap/camel-imap-folder.c (camel_imap_folder_init,
3254         camel_imap_folder_new): 
3255         * camel-vtrash-folder.c (camel_vtrash_folder_init): 
3256         * camel-vee-folder.c (camel_vee_folder_init): 
3257         * camel-digest-folder.c (camel_digest_folder_init): update folder
3258         flag setting.
3259
3260 2001-10-07  Dan Winship  <danw@ximian.com>
3261
3262         * providers/imap/camel-imap-store.c (get_folder_online): Unlock
3263         the store before returning error. (noted by NotZed)
3264
3265 2001-10-06  Jeffrey Stedfast  <fejj@ximian.com>
3266
3267         * camel-mime-utils.c (header_decode_text): Fix a slight error in
3268         logic. Just because the last word was an encoded word doesn't mean
3269         we ignore the lwsp padding, we only ignore it if the last word and
3270         *this* word are encoded.
3271
3272 2001-10-06  Jeffrey Stedfast  <fejj@ximian.com>
3273
3274         * camel-mime-filter-basic.c (filter): Implemented uuencoding and
3275         decoding.
3276         (complete): Implemented uuencoding and decoding.
3277
3278         * camel-mime-utils.c (uuencode_close): New function to flush the
3279         uu encoder.
3280         (uuencode_step): New function to uuencode a block of data.
3281
3282 2001-10-05    <NotZed@Ximian.com>
3283
3284         * providers/imap/camel-imap-store.c (subscribe_folder): Use a
3285         folder_subscribed event rather than a folder_created one.
3286         (unsubscribe_folder): Similarly for unsubscribed/deleted.
3287         (create_folder): Emit a folder_created event on the folders we
3288         added.  Not sure hsould probably check which ones are new and
3289         which ones are just existing ones?
3290         (delete_folder): Emit a folder_deletd event when we've deleted the
3291         folder.  Part of fix for #11831.
3292
3293         * camel-store.c (camel_store_class_init): Added
3294         folder_subscribed/unsubscribed events.
3295
3296 2001-10-05  Jeffrey Stedfast  <fejj@ximian.com>
3297
3298         * camel-service.c (camel_service_finalize): Turn off warnings.
3299         (get_name): Same.
3300
3301         * camel-sasl.c (sasl_challenge): Turn off warnings.
3302
3303         * camel-tcp-stream.c (tcp_connect): Turn off warnings.
3304         (tcp_getsockopt): Same.
3305         (tcp_setsockopt): Here too.
3306         (tcp_get_socket): And here.
3307
3308         * camel-folder.c (folder_sync): Turn off warnings.
3309         (expunge): Same.
3310         (append_message): Here too.
3311         (get_message): And here.
3312         (search_by_expression): And again here.
3313         (folder_changed): Here too.
3314
3315         * camel-store.c (get_folder): Set an exception and turn off
3316         debugging g_warnings.
3317         (create_folder): Same.
3318         (delete_folder): Here too.
3319         (rename_folder): And here.
3320         (get_trash): And here.
3321         (get_folder_info): Same.
3322         (free_folder_info): And again here.
3323         (camel_folder_info_build): Here too.
3324         (folder_subscribed): Same.
3325         (subscribe_folder): Here too.
3326         (unsubscribe_folder): And here.
3327
3328 2001-10-05    <NotZed@Ximian.com>
3329
3330         * camel-mime-utils.c (header_decode_mailbox): Try harder to get
3331         broken names out of addresses.  Unencoded ,'s in names will still
3332         break it, but well what can you do eh?
3333         (header_decode_mailbox): Always add .'s into address we've scanned
3334         past a '.', even if we can't decode the next part.  Fix for some
3335         annoying bug #.
3336
3337 2001-10-04    <NotZed@Ximian.com>
3338
3339         * camel-store.c (camel_store_delete_folder): Change the order of
3340         execution slightly.  We delete the folder first, then call the
3341         classes delete folder, then cleanup the hashtable afterwards.
3342         This is so deletes of vfolders work, since vee-store uses the
3343         folder hashtable to store all of is vfolders :-/
3344
3345 2001-10-04  Jeffrey Stedfast  <fejj@ximian.com>
3346
3347         * camel-service.c (camel_service_connect): Unregister the
3348         operation before unreffing it.
3349
3350 2001-10-03    <NotZed@Ximian.com>
3351
3352         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
3353         Remove now unused 'recents' array/freeing func.
3354
3355         * camel-object.c (camel_object_trigger_event): Oops, always run
3356         the prep function, even if we have no hooks listening.  Causes
3357         incoming imap recents to get ignored bythe camel-folder filter
3358         inbox code.
3359
3360         * providers/local/camel-local-folder.c (local_sync): Dont
3361         explicitly save metadata, its saved in summary_sync.
3362
3363         * providers/local/camel-mh-summary.c: Call superclass.
3364         (mh_summary_check): Dont save ibex.
3365
3366         * providers/local/camel-maildir-summary.c: Call superclass method.
3367         (maildir_summary_check): Dont save ibex explictly.
3368
3369         * providers/local/camel-mbox-summary.c: Call super-class sync when
3370         done, saves summary/ibex, etc.
3371         (mbox_summary_check): Dont save ibex.
3372         (mbox_summary_sync): Call summary_check rather than trying to
3373         update from our known position.
3374
3375         * providers/local/camel-local-summary.c
3376         (camel_local_summary_check): Dont save the summary or index here.
3377         (local_summary_sync): Save the summary/index here.
3378
3379         * camel-search-private.c (camel_search_build_match_regex): Added
3380         MATCH_NEWLINE flag, -> REG_NEWLINE.
3381
3382         * camel-lock-helper.c: Include <string.h> to kill some warnings.
3383
3384         * camel-filter-search.c (get_full_header): Put \n's between each
3385         line we generate.
3386         (header_full_regex): Dont drop the first argument to the command
3387         -> empty matches!
3388         (header_full_regex): Set match_newline for building regex.
3389         (body_regex): And here too.  These all fix #9877.
3390
3391 2001-10-03  Jeffrey Stedfast  <fejj@ximian.com>
3392
3393         * camel-store.c (camel_store_delete_folder): Call
3394         camel_folder_delete() on the folder if it's "alive".
3395
3396         * camel-folder.c (camel_folder_delete): Mark the folder as
3397         deleted, perform any folder specific cleanup and emit the deleted
3398         event.
3399         (camel_folder_sync): Only sync the folder if it hasn't been
3400         deleted.
3401         (camel_folder_expunge): Same.
3402
3403 2001-10-03  Dan Winship  <danw@ximian.com>
3404
3405         * providers/local/camel-local-provider.c (local_url_equal):
3406         Strange are the ways of alloca. Fixes 11543.
3407
3408 2001-10-02  Jeffrey Stedfast  <fejj@ximian.com>
3409
3410         * camel-tcp-stream-ssl.c (ssl_bad_cert): Import the certificate if
3411         the user accepts it.
3412
3413 2001-10-02    <NotZed@Ximian.com>
3414
3415         * providers/local/camel-local-provider.c (local_url_hash,
3416         local_url_equal): for hashing/comparing local url's, we ignore
3417         trailing /'s in paths (maybe shuld handle multiple /'s too).
3418         (camel_provider_module_init): Use local_url_hash/equal for all
3419         functions.
3420
3421         * camel-sasl-digest-md5.c (digest_response): Change to
3422         camel_charset_iconv_open/close.
3423
3424         * camel-pgp-context.c (pgp_verify): Change to
3425         camel_charset_iconv_open/close.
3426
3427         * camel-mime-part-utils.c (convert_buffer): Change to
3428         camel_charset_iconv_open().
3429
3430         * camel-mime-filter-charset.c
3431         (camel_mime_filter_charset_new_convert, finalise): Change to
3432         camel_charset_iconv_open, etc.
3433
3434         * camel-mime-utils.c: Use the camel_charset_iconv_open/close()
3435         functions to open/close it.
3436
3437         * camel-charset-map.c (camel_charset_iconv_open): New function,
3438         wrap iconv_open, so we can cache ic's.
3439         (camel_charset_iconv_close): Likewise for close.
3440         (camel_charset_map_init,shutdown): Init/free iconv cache.
3441
3442 2001-10-02  Jeffrey Stedfast  <fejj@ximian.com>
3443
3444         * camel-charset-map.c (camel_charset_to_iconv): Revert my
3445         x-unknown special-case hack - this may mask other problems.
3446
3447         * camel-mime-utils.c (rfc2047_decode_word): If the iconv
3448         conversion fails, for whatever reason, retry using the user's
3449         locale charset.
3450
3451 2001-10-02    <NotZed@Ximian.com>
3452
3453         * providers/local/camel-maildir-store.c (get_folder_info): Go back
3454         to using the store url's path, not the toplevel_dir thing.
3455
3456         * camel-operation.c (camel_operation_progress): Fix the progress
3457         logic, so we dont update too often.
3458
3459         * camel-object.c (camel_object_get_hooks): Change the lock to a
3460         recursive e-mutex.
3461         (camel_object_hook_event): Maintain list length of hook list.
3462         (camel_object_unhook_event): "
3463         (camel_object_unhook_event): If we are in an event, just mark the
3464         pair as removed, without removing it.
3465         (camel_object_trigger_event): Before running events, copy the
3466         list, and also ignore 'removed' events.  After running events, if
3467         we're all out of events, then free up any pending-removed events.
3468         (camel_object_free_hooks): Add some new assertions on the state of
3469         the hook structure.
3470         Removed the #error if threads not defined.  It _should_ actually
3471         work without threads.
3472         (camel_object_free_hooks): Free mutex when done.
3473
3474 2001-10-01  Jeffrey Stedfast  <fejj@ximian.com>
3475
3476         * providers/imap/camel-imap-store.c (delete_folder): Remove any
3477         cached messages that belonged to the deleted folder.
3478         (subscribe_folder): Don't ever let the info->name be NULL and
3479         don't use the stupid concat kludge to generate the URL, just use a
3480         CamelURL to do it. This way we don't risk breaking stuff by having
3481         a url like imap://fejj@imap//folder
3482
3483         * camel-charset-map.c (camel_charset_to_iconv): If the charset is
3484         x-unknown, return the locale_charset.
3485
3486 2001-10-01  Dan Winship  <danw@ximian.com>
3487
3488         * camel-provider.h: Fix up the provider flags to specify things
3489         more completely so we don't have to hardcode provider names in the
3490         mailer.
3491
3492         * providers/local/camel-local-provider.c: MH, mbox, and Maildir
3493         are LOCAL. MH and mbox are no longer STORAGE by the new
3494         definition.
3495
3496         * camel-session.c (vee_provider): The vfolder store is a STORAGE.
3497
3498 2001-10-01  Dan Winship  <danw@ximian.com>
3499
3500         * providers/local/camel-local-store.c (construct): Don't munge the
3501         URL; CamelSession's caching relies on it not changing. Instead,
3502         add a toplevel_dir field to CamelLocalStore, and set that to the
3503         path, but always ending with /.
3504         (camel_local_store_finalize): Free toplevel_dir
3505         (camel_local_store_get_toplevel_dir): Return toplevel_dir rather
3506         than url->path.
3507
3508         * providers/local/*: Lots of s/url->path/toplevel_dir/
3509
3510         * providers/local/camel-spool-store.c (construct): Likewise, don't
3511         try to strip a trailing / from url->path here, but I didn't make
3512         the corresponding toplevel_dir change, because there's no good
3513         reason someone should expect "/var/spool/mail/danw/" to work since
3514         that's not a directory.
3515
3516         * providers/pop3/camel-pop3-folder.c (pop3_refresh_info): if STAT
3517         returns 0, don't bother sending UIDL. Speeds things up slightly
3518         and also works around a bug in a particular random POP server.
3519         (ximian bug 11369).
3520
3521 2001-09-29  Jeffrey Stedfast  <fejj@ximian.com>
3522
3523         * camel-pgp-context.c (pgp_sign): Add --no-secmem-warning and
3524         --no-greeting to the gpg command-line options.
3525         (pgp_clearsign): Same.
3526         (pgp_verify): Here too.
3527         (pgp_encrypt): And here.
3528         (pgp_decrypt): And finally here.
3529
3530 2001-09-28  Jeffrey Stedfast  <fejj@ximian.com>
3531
3532         * camel-filter-search.c (get_source): Same here.
3533
3534         * camel-mime-message.c (camel_mime_message_set_source): Don't use
3535         the e_url_shroud hack, use CamelURL functions instead.
3536
3537 2001-09-28  Jeffrey Stedfast  <fejj@ximian.com>
3538
3539         * providers/nntp/camel-nntp-provider.c
3540         (camel_provider_module_init): Init the nntp url hash and url_equal
3541         functions.
3542
3543         * providers/sendmail/camel-sendmail-provider.c
3544         (camel_provider_module_init): Init the sendmail url hash and
3545         url_equal functions.
3546
3547         * providers/smtp/camel-smtp-provider.c
3548         (camel_provider_module_init): Init the smtp url hash and url_equal
3549         functions.
3550
3551         * providers/pop3/camel-pop3-provider.c
3552         (camel_provider_module_init): Init the pop3 url hash and url_equal
3553         functions.
3554
3555         * providers/imap/camel-imap-provider.c
3556         (camel_provider_module_init): Init the imap url hash and url_equal
3557         functions.
3558
3559         * providers/local/camel-local-provider.c
3560         (camel_provider_module_init): Init the local url hash and
3561         url_equal functions.
3562
3563         * camel-session.c (camel_session_class_init): Init the vfolder url
3564         hash and url_equal functions.
3565
3566         * camel-provider.h: Added url_hash and url_equal function pointers
3567         to the structure.
3568
3569         * camel-vtrash-folder.c (vtrash_move_messages_to): Oops, a
3570         CamelFolder is not a CamelFolderClass.
3571
3572 2001-09-28  Dan Winship  <danw@ximian.com>
3573
3574         * camel-tcp-stream-openssl.c (ssl_error_to_errno): Make this take
3575         an SSL * instead of a CamelTcpStreamSSL *, since it can get called
3576         from open_ssl_connection, when the CamelTcpStreamSSL isn't set up
3577         right yet. Fixes a crash on connection failure.
3578
3579 2001-09-27  Dan Winship  <danw@ximian.com>
3580
3581         * providers/imap/camel-imap-folder.c
3582         (camel_imap_folder_fetch_data): Grab the store's command_lock
3583         before grabbing the folder's cache_lock to prevent deadlock if
3584         another thread is processing an EXPUNGE response.
3585
3586         * providers/imap/camel-imap-folder.c
3587         (imap_expunge_uids_resyncing): Fix a compiler warning that might
3588         point out a real bug...
3589
3590         * providers/imap/camel-imap-folder.c (get_content): and one that
3591         doesn't
3592
3593 2001-09-27    <NotZed@Ximian.com>
3594
3595         * camel-service.c (camel_service_connect): Dont re-register the
3596         connect_op if we got it by calling 'operation_registered', which
3597         returns an already-registered one.
3598         (camel_service_disconnect): Likewise here.  This removes all the
3599         re-registered warnings.
3600
3601         * camel-object.c (camel_object_unref): Fill the finalised data
3602         with nonsense, rather than 0's - more easily detect bad data.
3603         (camel_object_new): Clear instance data when we retrieve it off
3604         the list.
3605
3606         * camel-object.h (_CamelObject): Added an event lock pointer for
3607         uh, locking event stuff.  Also change the hooklist hashtable into
3608         a list.  Changed all the code to handle it.  Result: thread-safe
3609         events, event-hooks, and save memory too, and SHOULD FINALLY FIX
3610         THAT UNREAD COUNT PROBLEM.
3611
3612 2001-09-27  Jeffrey Stedfast  <fejj@ximian.com>
3613
3614         * camel-pgp-mime.c (camel_pgp_mime_part_decrypt): CRLF decode the
3615         stream before parsing it into a MIME part. This fixes bug #10521.
3616
3617         * camel-store.c: Remove the old folder from the vTrash folder.
3618
3619 2001-09-27  Dan Winship  <danw@ximian.com>
3620
3621         * camel-service.c: Change "gboolean connected" to
3622         "CamelServiceConnectionStatus status", which can be disconnected,
3623         connecting, connected, or disconnecting.
3624         (camel_service_init, camel_service_finalize): create/destroy the
3625         connect_op_lock. Refer to service->status rather than
3626         service->connected.
3627         (camel_service_connect): When connecting, note the current
3628         operation (and create a new one if there's none registered) and
3629         mark the connection "connecting" until we succeed or fail.
3630         (camel_service_disconnect): Likewise in reverse.
3631         (camel_service_cancel_connect): New function to cancel a
3632         connection attempt.
3633         (cancel_connect): Default implementation: Call
3634         camel_operation_cancel on the connect_op.
3635
3636         * camel-disco-store.c (disco_connect): Only call
3637         CamelRemoteStore's connect func if we're online.
3638         (disco_cancel_connect): Fall back to offline if a connection gets
3639         cancelled.
3640         (disco_get_folder_info): Kludge: call connect explicitly before
3641         deciding whether to do the online or offline version, so if the
3642         connect fails, we fall back correctly.
3643
3644         * camel-session.c (camel_session_get_service_connected):
3645         s/svc->connected/svc->status/
3646
3647         * camel-remote-store.c (camel_remote_store_finalise):
3648         Change service->connected check to service->status check.
3649         (remote_connect): Don't set service->connected here:
3650         camel_service_connect() itself does that.
3651
3652         * camel-operation.c (camel_operation_registered): Deal with the
3653         possibility that there's no registered op.
3654
3655 2001-09-26    <NotZed@Ximian.com>
3656
3657         * camel-filter-driver.c (camel_filter_driver_filter_message): If
3658         we get a search error, just abort, dont try and fall back and copy
3659         to inbox.
3660         (camel_filter_driver_filter_message): Make sure we ALWAYS use
3661         exceptions for important things - like moving messages to inbox!
3662         (camel_filter_driver_filter_message): If we have the source
3663         folder, use camel_folder_set_message_flags rather then poking the
3664         info directly, which skips changed events.  This means filtering
3665         immediate doesn't lose changed events.
3666         (do_flag): Same here.
3667         (do_colour): Same thing but using set_tag.
3668         (do_score): Same again.
3669         (camel_filter_driver_filter_folder): Use ~0 as the 'set' arg to
3670         set_flags, just saves typing.
3671         (open_folder): We cache folders that we couldn't open as well as
3672         those ones we could.  Use magic token FOLDER_INVALID =
3673         (void *)~0 as the marker.
3674         (close_folder): Handle FOLDER_INVALID case properly.
3675
3676 2001-09-26  Jeffrey Stedfast  <fejj@ximian.com>
3677
3678         * camel-mime-message.c
3679         (camel_mime_message_get_part_by_content_id): New function to
3680         convenience Larry ;-)
3681         (check_content_id): Oops, return !found instead of found. This
3682         callback has to return whether or not to keep searching, not
3683         whether or not it found what it's looking for. Do'h!
3684
3685         * camel-pgp-mime.c (camel_pgp_mime_is_rfc2015_signed): block out
3686         some code if ENABLE_PEDANTIC_PGPMIME is not defined.
3687
3688 2001-09-26    <NotZed@Ximian.com>
3689
3690         * camel-vee-store.c: Emptied VeeStorePrivate, member wasn't used.
3691
3692         * camel-vee-folder.c (camel_vee_folder_set_expression): Lock
3693         changed list separately.
3694         (camel_vee_folder_remove_folder): "
3695         (camel_vee_folder_set_folders): Use changed_lock for changed list.
3696         (vee_refresh_info): Use changed_lock, also just grab the list,
3697         reset it in the lock, and do the work unlocked.
3698         (vee_sync): Use changed lock for changed list.
3699         (folder_changed): ".  All this kills a deadlock with sync/expunge.
3700         
3701         * camel-private.h (CamelVeeFolderPrivate): Added a new lock for
3702         the folders-changed list.
3703         (CamelVeeStorePrivate): Removed, defined in camel-vee-store.c,
3704         thanks to a pedantic.
3705
3706 2001-09-26  Jeffrey Stedfast  <fejj@ximian.com>
3707
3708         * Makefile.am: Fix Ettore's fix.
3709
3710 2001-09-25  Jeffrey Stedfast  <fejj@ximian.com>
3711
3712         * camel-pgp-context.c (camel_pgp_context_new): No longer takes a
3713         remember argument.
3714         (pgp_sign): Only uncache the passphrase on failure.
3715         (pgp_clearsign): Same.
3716         (pgp_encrypt): Here too.
3717         (pgp_decrypt): And here.
3718         (pass_free): New function to zero the passphrase before freeing
3719         it.
3720
3721 2001-09-25  Ettore Perazzoli  <ettore@ximian.com>
3722
3723         [Patch for Automake 1.5 compatibility pointed out by Richard
3724         Boulton <richard@tartarus.org>, as per #9258.]
3725
3726         * providers/nntp/Makefile.am: Remove some commented parts that
3727         make Automake 1.5 choke.
3728
3729         * Makefile.am (camel-lock-helper): Add $(EXEEXT) for Automake 1.5
3730         compatibility.
3731
3732 2001-09-25    <NotZed@Ximian.com>
3733
3734         * camel-folder.c (get_unread_message_count): Only unref info if we
3735         got it.
3736
3737         * camel-operation.c (camel_operation_unref): Fix for !threads
3738         enabled not ccompiling.
3739         (camel_operation_ref): Assert refcount > 0.
3740         (struct _CamelOperation): Removed the lock.  On further
3741         investigation, I dont think this will always work, the
3742         registration operations assume that a lookup in the
3743         operation_active table will return a ref, that will remain valid
3744         until we ref it, which needn't be the case.  So now i'm using a
3745         single global lock, since we'd need to do that for unref anyway,
3746         and every operation is fast & memory-bound.  Changed all the code
3747         to handle this.
3748         (camel_operation_progress_count): Since the code is identical,
3749         just call progress() for now.
3750         (camel_operation_register): No longer refcount, use unref to
3751         check/clear the active table.
3752         (camel_operation_unregister): Same here.
3753         (camel_operation_unref): Check if operation is in active table, if
3754         so, warn, remove.
3755
3756 2001-09-25  Dan Winship  <danw@ximian.com>
3757
3758         * camel-tcp-stream-openssl.c (my_SSL_read, my_SSL_write): call
3759         SSL_read/write, looping on SSL_ERROR_WANT_READ/WRITE. I'm sure
3760         there's a perfectly good reason that the API works this way. No,
3761         really.
3762         (stream_read, stream_write): use my_SSL_read and my_SSL_write.
3763         Fixes at least ximian 8593, and probably 6024 and maybe 10366,
3764         at least for OpenSSL. There may be a parallel NSS bug?
3765
3766 2001-09-25    <NotZed@Ximian.com>
3767
3768         * camel-stream-buffer.c (stream_write_all): A "safe write"
3769         function that always writes out all data asked of it, till
3770         finished.
3771         (stream_write): Rewritten.  What was i on when i wrote that
3772         originally, how did it ever work with tcp streams ...
3773
3774 2001-09-24    <NotZed@Ximian.com>
3775
3776         * camel-folder.c (append_message): Set the exception to
3777         FOLDER_INVALID rather than making out it worked.  A fix for #7025.
3778         (search_by_expression): Here too.
3779
3780         * providers/imap/camel-imap-folder.c (imap_update_summary): In the
3781         'lose' case, free messages, not fetch_data twice!
3782
3783         * camel-filter-search.c (check_header): If the type is encoded,
3784         get the fallback charset from the message content-type.
3785
3786         * camel-mime-part-utils.c (check_html_charset): Dont check for
3787         charset==null before calling charset_to_iconv.
3788         (simple_data_wrapper_construct_from_parser): "
3789
3790         * camel-mime-message.c (process_header): Try use content-type
3791         charset param as the fallback charset.
3792
3793         * camel-charset-map.c (camel_charset_to_iconv): Handle name ==
3794         NULL, return NULL.
3795
3796         * camel-folder-summary.c (camel_folder_summary_format_address):
3797         (camel_folder_summary_format_string): Made private again, removed
3798         #warning about it.  Renamed to s/camel_folder//.
3799         (summary_format_string): Take default charset param.
3800         (camel_message_info_new_from_header, message_info_new): Decode
3801         content-type field to get the charset parameter to use as the
3802         default charset for decoding strings.
3803
3804         * camel-search-private.c (camel_search_header_match): Pass NULL as
3805         the charset, the locale charset is always tried.
3806         (camel_search_header_match): Supply a default_charset parameter to
3807         be used with TYPE_ENCODED params.
3808
3809         * camel-mime-utils.c
3810         (header_param): get rid of the g_strcasecmp crap.
3811         (header_set_param): Same here.
3812         (header_decode_param_list): And here.
3813         (header_decode_text): Totally rewritten.  30% of its size.  If the
3814         word is not rfc2047 encoded, always try default_charset if
3815         supplied, if that fails, try locale charset if it exists, if that
3816         fails then assume latin1/7 bit ascii.
3817         (append_8bit): Changed to return FALSE if we can't convert for
3818         whatever reason, and dont append anything.
3819
3820         * camel-mime-part.h (struct _CamelMimePart): Move content_type and
3821         headers out of the 'private' section.
3822
3823         * camel-mime-part.c (get_headers): Dont do any conversion on the
3824         header.
3825         (process_header): Get the content-type charset as the fallback
3826         charset for decode_string.
3827         (construct_from_parser): IF we have a content-type header, process
3828         it before doing anything else, so we have access to a fallback
3829         charset for invalid headers.
3830
3831 2001-09-23  Jeffrey Stedfast  <fejj@ximian.com>
3832
3833         * camel-tcp-stream-openssl.c (ssl_verify): Don't even try to alert
3834         the user if the session isn't interactive.
3835         (errlib_error_to_errno): Make the default errno EINTR so that we
3836         act just like CamelTcpStreamSSL.
3837
3838         * camel-pgp-context.c (pgp_sign): When the password is not
3839         provided, set the exception to USER_CANCEL.
3840         (pgp_clearsign): Same.
3841         (pgp_encrypt): And here.
3842         (pgp_decrypt): Here too.
3843
3844 2001-09-21    <NotZed@Ximian.com>
3845
3846         * camel-store.c (create_folder): Set the exception if
3847         create_folder isn't implemented.
3848
3849 2001-09-21  Jeffrey Stedfast  <fejj@ximian.com>
3850
3851         * providers/imap/camel-imap-store.c (create_folder): Go back to
3852         not using camel_folder_info_build() here because this seems to
3853         break folder creation (returning nodes from the root path when it
3854         shouldn't be?).
3855
3856 2001-09-21    <NotZed@Ximian.com>
3857
3858         * camel-vee-store.c (vee_get_folder_info): Force a refresh of
3859         vfolders before storing their count.  This essentially makes
3860         'get_folderinfo' refresh all vfolders, so that get-mail works as
3861         expected.
3862
3863         * camel-vee-folder.c (camel_vee_folder_finalise): Clear lists.
3864         (folder_changed): If we're not autoupdating the folder, then
3865         add this folder to the list of 'changed' folders for this vfolder.
3866         (camel_vee_folder_set_expression): Reset the folders_changed list.
3867         (camel_vee_folder_remove_folder): Remove the folder from the
3868         folders_changed list.
3869         (camel_vee_folder_set_folders): If we have a folder already, but
3870         its changed, use this opportunity to update it.
3871         (vee_sync): Remove any synced folders from the folders_changed
3872         list.
3873         (vee_refresh_info): Refresh folder, re-run queries on any changed
3874         folders.
3875
3876 2001-09-20    <NotZed@Ximian.com>
3877
3878         * camel-folder-summary.c (camel_folder_summary_header_load): New
3879         function to just load the summary.  Not much use yet, until unread
3880         counts are stored in the summary (which now looks like too much
3881         work!).
3882
3883         * camel-mime-utils.c (header_decode_mailbox): Crappy fix for
3884         stupid mailers.  If we get 'name b. name <foo>' then treat it as
3885         '"name b. name" <foo>'.  See 8147.
3886         (header_decode_mailbox): Another fix for really broken mailers
3887         that have things that look like addresses followed by <address>
3888         bits.
3889         (rfc2047_encode_word): Escape ??= to avoid some bizarre warning
3890         about trigraphs.
3891
3892         * providers/local/camel-local-folder.c
3893         (camel_local_folder_construct): Setup unread count properly, and
3894         also setup the url properly.
3895
3896         * providers/local/camel-maildir-store.c (camel_folder_info_new):
3897         Build the path on the folderinfo.
3898         (scan_dir): Dont include empty host part in url for folder.
3899         (scan_dir): Lookup folder counts for any folders we currenty have
3900         open.
3901         (scan_dir): If we dont have the folder open, then scan the 'new'
3902         and 'cur' folders for new and unread messages to count instead.
3903
3904         * providers/local/camel-spool-store.c (get_folder_info): If we
3905         have this folder open, then set unread from the folder itself.
3906         (get_folder_info): Change the INBOX path to not include the
3907         leading /.
3908
3909         * providers/local/camel-spool-folder.c
3910         (camel_spool_folder_construct): Fix path.
3911         (camel_spool_folder_construct): Properly setup the url field when
3912         we say we've got a new folder created.
3913
3914         * providers/imap/camel-imap-store.c (unsubscribe_folder): Build
3915         path on folderinfo.
3916
3917         * camel-store.c (camel_folder_info_build_path): Prepend / to path.
3918
3919         * camel-vee-folder.c (camel_vee_folder_construct): Use macro for
3920         unmatched folder name.
3921         (camel_vee_folder_new): "
3922
3923         * camel-vee-store.c (vee_get_folder_info): Use macro for unmatched
3924         folder name.
3925         (vee_delete_folder): "
3926         (vee_rename_folder): "
3927         (vee_get_folder): Prepend / onto path.
3928         (vee_delete_folder): Setup path in folderinfo.
3929         (vee_get_folder_info): Fix path in folderinfo.
3930
3931         * camel-vee-folder.h (CAMEL_UNMATCHED_NAME): New define for
3932         unmatched (internal) name.
3933
3934 2001-09-20  Jeffrey Stedfast  <fejj@ximian.com>
3935
3936         * providers/local/camel-spool-folder.c
3937         (camel_spool_folder_construct): And finally here.
3938
3939         * providers/local/camel-local-folder.c
3940         (camel_local_folder_construct): And here.
3941
3942         * camel-vee-store.c (vee_get_folder): ANd here too.
3943         (vee_get_folder_info): And here.
3944
3945         * providers/imap/camel-imap-store.c (create_folder): Use
3946         camel_folder_info_build() and do better error checking.
3947         (subscribe_folder): Set the path on the folder info.
3948
3949         * camel-store.c (camel_folder_info_build): Set the folder-info
3950         path if it hasn't already been set by the caller.
3951         (camel_folder_info_free): Free the path.
3952
3953         * camel-store.h: Added a path member to the FolderInfo type.
3954
3955 2001-09-20  Dan Winship  <danw@ximian.com>
3956
3957         * camel-charset-map.c (camel_charset_to_iconv): Nuke debug warning.
3958
3959 2001-09-19  Jeffrey Stedfast  <fejj@ximian.com>
3960
3961         * camel-pgp-context.c: Updated exception strings to be more clear.
3962
3963         * camel-pgp-mime.c (pgp_mime_part_sign_restore_part): Stupid
3964         mistake, fixes bug #9975.
3965
3966         * camel-tcp-stream-ssl.c (ssl_bad_cert): Oops, don't fail if
3967         `data' isn't a CamelService...cuz it's not supposed to be! It's a
3968         CamelTcpStreamSSL object...doh!
3969
3970 2001-09-19    <NotZed@Ximian.com>
3971
3972         * General cleanup of camel debug printfs.
3973         
3974         * camel-lock.c (camel_lock_fcntl): Changed to return 'success' if
3975         the error indicates file locking isn't supported on this
3976         filesystem.  Still return a warning just incase (if its the first
3977         time).  Might fix a lot of reported bugs.
3978
3979         * providers/local/camel-spool-store.c (get_folder_info): Dont
3980         include the empty // host part in the uri.  This 'breaks' the
3981         service lookup.
3982
3983 2001-09-18  Jeffrey Stedfast  <fejj@ximian.com>
3984
3985         * camel-mime-utils.c: Match mailing-list header List-Owner.
3986
3987 2001-09-18    <NotZed@Ximian.com>
3988
3989         * camel-vee-store.c (vee_get_folder): Fix the uri genereated for
3990         the folderinfo for the folder_created event.
3991
3992         * camel-store.h: Added 'total' to CamelFolderInfo.
3993
3994 2000-09-18    <NotZed@Ximian.com>
3995
3996         * providers/local/camel-maildir-folder.c
3997         (camel_maildir_folder_new): If filter inbox is set on the store,
3998         and we're opening inbox '', then enable filtering on new messages.
3999
4000         * providers/local/camel-local-folder.c
4001         (camel_local_folder_construct): After loading the summary, check
4002         it, and only abort if that fails.  Also maintain the changes
4003         count.
4004
4005         * providers/local/camel-local-summary.c
4006         (camel_local_summary_load): Remove summary_check code from here.
4007         (camel_local_summary_check): Sync index/summary here, if we were
4008         successful.
4009
4010         * providers/local/camel-spool-folder.c
4011         (camel_spool_folder_new): If we have filter-new-messages-on-inbox
4012         set and we just opened inbox, turn on filtering on this folder.
4013         (camel_spool_folder_construct): Keep track of changes for the
4014         folder, so that filter-new-messages works right (?)
4015
4016         * providers/local/camel-spool-store.c (get_folder): Pass 'INBOX'
4017         as the folder name, not the path.
4018
4019         * camel-folder-search.c (search_not): Modified patch from
4020         <peterw@ximian.com> since the summary is messageinfo's, not
4021         strings.
4022
4023         ** Ok so the problem with the stuff below is that maildir/spool
4024         'summary_load' throws away all events, including recents, joy eh?
4025         
4026         * providers/local/camel-maildir-summary.c (maildir_summary_check):
4027         Add new messages to the recent changeinfo.
4028
4029         * providers/local/camel-spool-summary.c: Mark 'new' message as
4030         recent, for later processing if required (i.e. 'filter new
4031         messages').
4032
4033         * camel-store.c (construct): new function, cascade up construct
4034         method and check for 'filter' param, and set accordingly for any
4035         one that might want it.
4036
4037         * providers/imap/camel-imap-store.c (construct): map the
4038         param_filter_inbox flag to the store->flags as
4039         CAMEL_STORE_FILTER_INBOX.
4040
4041         * camel-store.h (CAMEL_STORE_FILTER_INBOX): new flag to tell it to
4042         filter inbox.
4043
4044         * providers/imap/camel-imap-folder.h: Removed do_filtering flag
4045         from CamelImapFolder.
4046
4047         * providers/imap/camel-imap-folder.c (imap_update_summary): Remove
4048         the 'recents' parameter, use the 'changes' parameter instead to
4049         convey this info.
4050         (camel_imap_folder_changed): Changed for update_summary api
4051         change.  Now always just emit the changed event if we have any
4052         changes to report, filtering code removed, handled upstream.
4053         (filter_proc): 
4054         (filter_free): Removed old filtering code.
4055         (camel_imap_folder_new): Set the filter_recent flag on the folder
4056         if we're the inbox and filtering of inbox is enabled.
4057
4058         * camel-folder.c (folder_changed): If we have 'recent' messages,
4059         and are set to filter recents, then freeze the folder and launch a
4060         thread to do the processing (or similar if threading not enabled).
4061         (thaw): Make sure we emit the changed signal outside of owning the
4062         lock and if things have changed.  Also, no longer bother
4063         downgrading folder_changed events to message_changed events.
4064
4065         * camel-folder.h (struct _CamelFolder): Added filter_recent flag
4066         -> signifies all recent messages in folder should be filtered.
4067
4068         * camel-session.c: (camel_session_thread_msg_new,
4069         camel_session_thread_msg_free, camel_session_thread_queue,
4070         camel_session_thread_wait): code to handle async operations as
4071         part of camel processing.
4072         (camel_session_finalise): free thread_lock, destroy thread, active
4073         hash, etc.
4074         (camel_session_init): init thread, active hash, etc.
4075         (camel_session_class_init): Init virtual functions.
4076         (session_thread_msg_new, session_thread_msg_free,
4077         session_thread_destroy, session_thread_received,
4078         session_thread_queue, session_thread_wait): default implementation
4079         of session threads stuff.
4080
4081 2001-09-17    <NotZed@Ximian.com>
4082
4083         * camel-folder.c (camel_folder_change_info_recent_uid): New
4084         function to add a 'recent' uid to the change info.
4085         (camel_folder_change_info_clear): Clear recent list.
4086         (camel_folder_change_info_free): Free recent list.
4087         (camel_folder_change_info_new): Setup recent list.
4088
4089         * camel-folder.h: Added a uid_recent item to the folder_changed
4090         event data.
4091
4092         * providers/local/camel-maildir-store.c (scan_dir): Free new in
4093         the right block.
4094
4095         * providers/local/camel-local-provider.c: Add local config entries
4096         to filter on new messages in spool and maildir provider.
4097
4098         * camel-vee-folder.c (vee_folder_construct): Remove the assertion
4099         which stops ? in names from being allowed.
4100
4101 2001-09-18  Dan Winship  <danw@ximian.com>
4102
4103         * camel-data-wrapper.c (camel_data_wrapper_is_offline): Virtualize
4104         this.
4105
4106         * camel-medium.c (is_offline): A medium is offline if its content
4107         object is offline.
4108
4109         * camel-multipart.c (is_offline): A multipart is offline if any of
4110         its subparts are offline.
4111
4112 2001-09-18  Jeffrey Stedfast  <fejj@ximian.com>
4113
4114         * camel-charset-map.c: Added korean charset conversion.
4115
4116 2001-09-17  Jeffrey Stedfast  <fejj@ximian.com>
4117
4118         * providers/imap/camel-imap-store.c (delete_folder): Don't process
4119         the ImapResponse data, we don't want to block forever on data we
4120         don't care about...
4121         (create_folder): Use get_folders_online() instead of
4122         get_folder_info_online().
4123
4124         * camel-folder.c: Reverted previous changes.
4125
4126 2001-09-17  JP Rosevear  <jpr@ximian.com>
4127
4128         * Makefile.am: Helpful install-exec-hook debugging output
4129
4130 2001-09-16  Jeffrey Stedfast  <fejj@ximian.com>
4131
4132         * camel-folder.c (camel_folder_get_uri): New function to get the
4133         URI of a folder.
4134         (get_uri): Default implementation.
4135
4136 2001-09-14    <NotZed@Ximian.com>
4137
4138         * camel-vee-folder.c (camel_vee_folder_set_folders): New function,
4139         set the complete list of folders on a vfolder, all at once.
4140         (camel_vee_folder_set_expression): If we set the query to be the
4141         same thing, dont do anything.
4142
4143         * camel-vee-store.c (camel_vee_store_init): Turn off vtrash for
4144         this store.
4145
4146         * camel-store.c (camel_store_init): Enable vtrash by default via
4147         flags.
4148         (camel_store_get_trash): REturn NULL if the store doesn't support
4149         vtrash.
4150         (init_trash): Dont init if store doesn't support vtrash.
4151
4152         * camel-store.h: Add a new flags CAMEL_STORE_VTRASH -> store
4153         supports vtrash.
4154
4155 2001-09-13    <NotZed@Ximian.com>
4156
4157         * camel-vee-store.c (vee_get_folder_info): Implement.
4158         (build_info): Used to build a folder record from the folders
4159         hashtable.
4160         (vee_delete_folder): Implemented, remove folder from hashtable.
4161         (vee_rename_folder): Implemented, remove old folder from
4162         hashtable, add new one and rename its guts too.
4163
4164         * camel-store.c (camel_store_rename_folder): Do nothing if we're
4165         not asked to actually change names.  Also dont do the renamed
4166         cache check till after we've called the subclass.
4167         (camel_store_delete_folder): Call the subclass delete firs,t then
4168         make sure the cache is right.
4169
4170         * camel-vee-folder.c (vee_folder_construct): Remove support for
4171         name?query syntax to setup vfolder.  Abort if such syntax is used.
4172         (camel_vee_folder_new): Removed code that handles ? syntax, etc.
4173         (vee_folder_build_folder): Handle unset expression, treat it as an
4174         empty search.
4175         (camel_vee_folder_set_expression): Oops, actually set the
4176         expression.
4177
4178         * camel-vtrash-folder.c (camel_vtrash_folder_new): Dont use
4179         name?query syntax to setup vfolder, but set the expression
4180         directly.  Also fixes a small memleak.
4181
4182 2001-09-12    <NotZed@Ximian.com>
4183
4184         * camel-store.c (camel_store_delete_folder): Fixed warnings with a
4185         cast.
4186         (camel_store_rename_folder): "
4187
4188 2001-09-14  Jeffrey Stedfast  <fejj@ximian.com>
4189
4190         * camel-url.c (camel_url_set_param): Use g_datalist_set_data_full
4191         so that the data will be free'd when we clear the list.
4192
4193 2001-09-14  Dan Winship  <danw@ximian.com>
4194
4195         * camel-file-utils.c (camel_file_util_encode_string,
4196         camel_file_util_decode_string): Don't claim failure when
4197         reading/writing the empty string.
4198
4199 2001-09-14  JP Rosevear  <jpr@ximian.com>
4200
4201         * Makefile.am: use install hook instead of install rule to
4202         guarantee we run after installation
4203
4204 2001-09-13  Jeffrey Stedfast  <fejj@ximian.com>
4205
4206         * camel-filter-driver.c (camel_filter_driver_filter_folder): Don't
4207         reuse the exception if it has already been set.
4208         (camel_filter_driver_filter_message): Same here. Also use the new
4209         return value from camel_filter_search_match().
4210
4211         * camel-filter-search.c (camel_filter_search_match): Return an
4212         integer (matched, no-match, or error).
4213
4214         * providers/local/camel-mbox-folder.c (mbox_append_message): Do
4215         error-checking based on function return values rather than
4216         exceptions as it's possible for them to be NULL.
4217         (mbox_get_message): Same.
4218
4219         * providers/imap/camel-imap-folder.c (imap_append_offline): Pass
4220         an exception to the cache.
4221         (imap_append_online): Same.
4222         (imap_append_resyncing): Here too.
4223         (imap_copy_offline): And here.
4224         (handle_copyuid): Pass NULL as the exception here...
4225         (parse_fetch_response): And finally here.
4226
4227         * providers/imap/camel-imap-message-cache.c
4228         (camel_imap_message_cache_insert):
4229         (insert_setup):
4230         (camel_imap_message_cache_insert_stream):
4231         (camel_imap_message_cache_insert_wrapper):
4232         (camel_imap_message_cache_copy): Take an exception argument and
4233         set it on error.
4234
4235         * camel-mime-part-utils.c
4236         (simple_data_wrapper_construct_from_parser): Convert the charset
4237         to the iconv-friendly name.
4238
4239         * camel-charset-map.c (camel_charset_to_iconv): Add code to
4240         convert windows-[cp]#### charsets to their iconv-friendly format
4241         of cp####.
4242
4243         * camel-pgp-context.c (crypto_exec_with_passwd): Return -1 on
4244         failure.
4245
4246 2001-09-12  Larry Ewing  <lewing@ximian.com>
4247
4248         * camel-filter-driver.c (camel_filter_driver_filter_mbox): free
4249         the source url in the nonfailure case.
4250
4251 2001-09-12    <NotZed@Ximian.com>
4252
4253         * camel-folder-search.h: Change the 'not' virtual method from an
4254         immediate e-sexp function to a non-immediate one, which is what it
4255         should be.
4256
4257         * camel-folder-search.c (search_not): Implement a 'not' function
4258         ourselves.  If 'not' on a vector value, then not over all items
4259         in the summary.
4260         (builtings[]): Change the 'not' builtin to be a non-immediate
4261         function.
4262
4263 2001-09-12  Jeffrey Stedfast  <fejj@ximian.com>
4264
4265         * camel-filter-driver.c (camel_filter_driver_filter_mbox): Unref
4266         the message info.
4267
4268 2001-09-10    <NotZed@Ximian.com>
4269
4270         * providers/local/camel-maildir-store.c (get_folder_info): Pass in
4271         a hashtalbe used for finding visited nodes.
4272         (inode_hash): 
4273         (inode_equal): 
4274         (inode_free): Helper functions for visited node checks, hashes on
4275         inode + device number.
4276         (scan_dir): Dont re-visited directories we've already visited, use
4277         inodes + device number.
4278         Also, if the folder doesn't contain cur/tmp/new, mark it as
4279         noselect, but continue to recurse folders, if asked.
4280
4281         * camel-folder.c (move_messages_to): Progress reporting while
4282         moving messages.
4283
4284         * camel-store.c (camel_store_delete_folder): Make sure we remove
4285         the folder from our vtrash, if we have it in our opened set, and
4286         also remove it from our hashtable.
4287         (camel_store_rename_folder): Remove the old folder name from the
4288         folder cahce, if it is there.
4289
4290 2001-09-10  Jeffrey Stedfast  <fejj@ximian.com>
4291
4292         * camel-charset-map.c (camel_charset_to_iconv): Get rid of the
4293         g_warning, we no longer really need that.
4294
4295 2001-09-10    <NotZed@Ximian.com>
4296
4297         * providers/imap/camel-imap-store.c (camel_imap_msg_new): Forgot
4298         to return the newly allocated msg.
4299
4300 2001-09-08  Not Zed  <NotZed@Ximian.com>
4301
4302         * providers/local/camel-spool-summary.c (spool_summary_sync_full):
4303         Likewise.
4304
4305         * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
4306         Fix the wording.
4307
4308         * camel-tcp-stream-raw.c (stream_read): Save errno around fcntl
4309         call in cancellable read case.  Also, loop while we get EINTR.
4310         This might fix some weird reconnect behaviour with pop.
4311         (stream_write): "
4312
4313 2001-09-07  Jeffrey Stedfast  <fejj@ximian.com>
4314
4315         * camel-tcp-stream-ssl.c (ssl_bad_cert): #if 0 out the code that
4316         was hopefully going to fix bug #5325 because the functions I used
4317         seem to have been deprecated. *sigh*.
4318
4319         * camel-remote-store.c (camel_remote_store_finalise): Disconnect
4320         from the service here otherwise the locks will be destroyed and by
4321         the time CamelService finalizes we'll crash or hang.
4322
4323         * providers/smtp/camel-smtp-transport.c (smtp_data): Make sure to
4324         unref the mime filters when we finish with them.
4325
4326 2001-09-07  Ettore Perazzoli  <ettore@ximian.com>
4327
4328         * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
4329         s/Synchronising/Synchronizing/.
4330         (mbox_summary_sync_quick): Likewise.
4331         (summary_rebuild): s/Summarising/Summarizing/.
4332
4333 2001-09-07  Jeffrey Stedfast  <fejj@ximian.com>
4334
4335         * camel-multipart.c (camel_multipart_set_boundary): Take a const
4336         char * instead of a char *.
4337
4338         * camel-mime-part-utils.c
4339         (camel_mime_part_construct_content_from_parser): Reuse the
4340         original boundary instead of generating our own.
4341
4342 2001-09-06    <NotZed@Ximian.com>
4343
4344         * providers/imap/camel-imap-folder.c (filter_proc): Thread
4345         function to perform filtering.
4346         (filter_free): Free the filter object.
4347         (camel_imap_folder_changed): If we have threads enabled, then
4348         queue up a request to perform filtering.  For bug #4422.
4349
4350         * providers/imap/camel-imap-store.c (camel_imap_msg_new): Create a
4351         new 'imap msg'.
4352         (camel_imap_msg_queue): Queue an 'imap msg'.
4353         (async_received): Handle receiving of imap msg in async thread.
4354         (async_destroy): Handle destroying of imap msg.
4355         (camel_imap_store_finalize): Destroy thread when done.
4356         (camel_imap_store_init): Setup thread.
4357
4358         * providers/imap/camel-imap-store.h: Added an ethread to the
4359         store, for async processing.
4360
4361 2001-09-06  Jeffrey Stedfast  <fejj@ximian.com>
4362
4363         * camel-remote-store.c (remote_recv_line): Use
4364         camel_stream_buffer_read_line() instead of duplicationing the
4365         functionality. Also, the previous way was broken anyway. What if a
4366         line was the same length as our buffer? Then we'd go and read a
4367         second line and a third and so on until they weren't the same
4368         length, leaving \r's in the middle of the buffer.
4369
4370 2001-09-06  Dan Winship  <danw@ximian.com>
4371
4372         * providers/pop3/camel-pop3-store.c (pop3_get_response): Fix this
4373         to always set an exception if it returns POP3_FAIL, as documented.
4374
4375         * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
4376         Revert.
4377
4378 2001-09-06  Jeffrey Stedfast  <fejj@ximian.com>
4379
4380         * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
4381         Set an exception on POP3_FAIL as well.
4382
4383 2001-09-06  Dan Winship  <danw@ximian.com>
4384
4385         * providers/pop3/camel-pop3-provider.c: #ifdef out the "delete
4386         after N days" option in pop3_conf_entries, since it won't be done
4387         for 1.0.
4388
4389 2001-09-04  Jeffrey Stedfast  <fejj@ximian.com>
4390
4391         * camel-remote-store.c (remote_disconnect): Too late to sync the
4392         folders here... if this is gonna happen at all it should be done
4393         in the provider.
4394
4395         * camel-service.c (camel_service_finalize): Do a clean disconnect.
4396
4397 2001-08-30  Jeffrey Stedfast  <fejj@ximian.com>
4398
4399         * providers/local/camel-spool-store.c (get_inbox): Return the
4400         default folder (ie. INBOX) rather than saying we don't support an
4401         inbox.
4402
4403         * camel-tcp-stream-ssl.c: #include pk11func.h.
4404         (ssl_bad_cert): Use CERT_GetDefaultCertDB.
4405
4406 2001-08-29  Jeffrey Stedfast  <fejj@ximian.com>
4407
4408         * camel-smime-context.c (smime_sign_prepare): Do the same here as
4409         what we did in the pgp code a moment ago.
4410         (smime_sign_restore): And again here.
4411         (smime_sign): And update thise code to pass in the address of the
4412         encodings list when restoring parts.
4413
4414         * camel-pgp-mime.c (pgp_mime_part_sign_prepare_part): Special-case
4415         message/rfc822 mime parts - don't set an encoding on these,
4416         instead traverse into their subparts and set the encodings for
4417         those.
4418         (pgp_mime_part_sign_restore_part): Reverse any operations done to
4419         message/rfc822 parts in the above prepare_part() function and also
4420         take a pointer to a GSList of encodings instead of just a GSList
4421         so we can properly keep track of which encoding we are on.
4422         (camel_pgp_mime_part_sign): Pass in the address to the encodings
4423         list when restoring parts.
4424
4425 2001-08-29  Not Zed  <NotZed@Ximian.com>
4426
4427         * providers/pop3/camel-pop3-folder.c (pop3_sync): Add progress
4428         reporting to deleting messages.  Dont change the calculation to a
4429         bloody float.  Bug #6189.
4430
4431 2001-08-28  Jeffrey Stedfast  <fejj@ximian.com>
4432
4433         * camel-pgp-context.c (crypto_exec_with_passwd): Initialize buf
4434         and diag_buf to NULL, hopefully this fixes the crash if the
4435         select() times out.
4436         (pgp_encrypt): Argh. What was I thinking? Don't use "-r recipient"
4437         as an argument, instead use "-r" and "recipient" as 2 separate
4438         arguments to pgp. This might fix the "gpg only encrypts to my
4439         private key" bug?
4440
4441 2001-08-28  Peter Williams  <peterw@ximian.com>
4442
4443         * providers/imap/camel-imap-store.c (create_folder): Whoops.
4444         Double-free and FMR = bad.
4445
4446         * camel-remote-store.c (remote_send_string): Don't reveal the
4447         user's IMAP password if their server supports LITERALPLUS. Also
4448         add some more dashes to make it line up nicely :-)
4449
4450 2001-08-28  Jeffrey Stedfast  <fejj@ximian.com>
4451
4452         * camel-tcp-stream-ssl.c (ssl_bad_cert): If the user accepts the
4453         certificate, add it to the database as a trusted CA.
4454
4455 2001-08-28  Peter Williams  <peterw@ximian.com>
4456
4457         * camel-object.c (camel_object_unref): Make the locking more
4458         fine-grained on destruction; specifically, don't hold the
4459         type lock while calling the finalize functions.
4460
4461 2001-08-27  Jeffrey Stedfast  <fejj@ximian.com>
4462
4463         * providers/local/camel-local-provider.c: Changed the
4464         description/names of some of the local providers to try and
4465         clarify the meanings.
4466
4467         * providers/pop3/camel-pop3-provider.c: Simplify the POP
4468         description - we want short but sweet.
4469
4470         * providers/imap/camel-imap-provider.c: s/IMAPv4/IMAP
4471
4472 2001-08-27  Not Zed  <NotZed@Ximian.com>
4473
4474         * camel-mime-part-utils.c (convert_buffer): re-read the iconv man
4475         page, and treat the return value properly.  It returns the number
4476         of non-reversible conversions performed, not the number of output
4477         characters, sigh.
4478         (check_html_charset): Changed to just take a buffer of data, and
4479         not the mime parser.
4480         (simple_data_wrapper_construct_from_parser): Since we dont need
4481         the charset till we have all the data, search for the charset
4482         after we've read the data, if we have html data with no charset in
4483         the header.
4484         (simple_data_wrapper_construct_from_parser): Remove the
4485         seekable_source stuff.
4486
4487         * Re-apply patches from before.
4488
4489 2001-08-25  Not Zed  <NotZed@Ximian.com>
4490
4491         ["Summarising" and "Synchronising" are spelt with a "s" in
4492         ENGLISH]
4493
4494         * providers/local/camel-mbox-summary.c (mbox_summary_sync_quick):
4495         s/Synchronizing/Synchronising/.
4496
4497         * providers/local/camel-mbox-summary.c (summary_rebuild):
4498         s/Summarizing/Summarising/
4499
4500 2001-08-24  Jeffrey Stedfast  <fejj@ximian.com>
4501
4502         * camel-disco-diary.c (camel_disco_diary_replay): Use fseek
4503         instead of fseeko since we want to be portable and use ftell
4504         rather than ftello for the same reason.
4505         (camel_disco_diary_empty): Same here.
4506
4507 2001-08-24  Peter Williams  <peterw@ximian.com>
4508
4509         * Revert Not Zed's previous commits as they apparently can cause
4510         serious data loss for POP3 users.
4511         
4512 2001-08-24  Ettore Perazzoli  <ettore@ximian.com>
4513
4514         ["Summarizing" and "Synchronizing" are spelt with a "z" in the
4515         default locale, that happens to be "en_US".]
4516
4517         * providers/local/camel-mbox-summary.c (mbox_summary_sync_quick):
4518         s/Synchronising/Synchronizing/.
4519
4520         * providers/local/camel-mbox-summary.c (summary_rebuild):
4521         s/Summarising/Summarizing/
4522
4523 2001-08-24  Not Zed  <NotZed@Ximian.com>
4524
4525         * camel-mime-part-utils.c (convert_buffer): Limit the maximum
4526         output buffer size.  iconv bugs?  returns E2BIG forever on some
4527         (valid) data?
4528
4529         * providers/local/camel-spool-summary.c (summary_rebuild):
4530         Likewise.
4531
4532         * providers/local/camel-mbox-summary.c (summary_rebuild):
4533         Summarising is spelt with an s.
4534
4535 2001-08-23  Not Zed  <NotZed@Ximian.com>
4536
4537         * camel-mime-part.c (write_to_stream): If we have rawtext, then
4538         dont do any charset conversion, only encoding/crlf conversion.
4539
4540         * camel-data-wrapper.h (struct _CamelDataWrapper): Added 'rawtext'
4541         member, says the character encoding is raw, not utf8.
4542
4543         * providers/local/camel-spool-summary.c
4544         (spool_summary_sync_quick): Synchronising is spelt with an s, not
4545         a z.
4546         (spool_summary_sync_full): "
4547
4548         * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
4549         No, synchronising is spelt with an s.
4550         (mbox_summary_sync_quick): "
4551
4552         * camel-mime-part-utils.c
4553         (camel_mime_part_construct_content_from_parser): Remove the
4554         warnings which aren't going anywhere fast.
4555         (convert_buffer): Function to convert a bytearray of textual
4556         content from one charset to another.  If the charset doesn't exist
4557         or fails, then do no conversion.
4558         (simple_data_wrapper_construct_from_parser): First, read in data,
4559         then try and convert it using the specified charset if supplied.
4560         If that fails, then dont do any conversion, and leave as raw.
4561         Also, if we have any x-* charsets, then dont do any processing.
4562
4563 2001-08-23  Peter Williams  <peterw@ximian.com>
4564
4565         * providers/local/camel-mbox-summary.c (summary_rebuild): Add a
4566         missing \n to the end of a printf.
4567
4568         * providers/local/camel-spool-summary.c (summary_rebuild): Same.
4569
4570 2001-08-22  Jeffrey Stedfast  <fejj@ximian.com>
4571
4572         * providers/pop3/camel-pop3-folder.c (pop3_generate_uids):
4573         Oops. Fixed a mis-use of GPtrArray. If we set_size, then using
4574         g_ptr_array_add will assume `size' elements have already been
4575         initialized and will start appending on to the end.
4576
4577 2001-08-21  Jeffrey Stedfast  <fejj@ximian.com>
4578
4579         * camel-pgp-context.c (pgp_verify): Turn on --batch and reenable
4580         gpg keyserver lookups.
4581         (pgp_decrypt): Disable keyserver lookups if we are disconnected.
4582
4583 2001-08-21  Dan Winship  <danw@ximian.com>
4584
4585         * camel-folder-thread.c
4586         (camel_folder_thread_messages_new_summary): Fix the duplicate
4587         message check so it doesn't mess up threading when a reply appears
4588         in the folder before the message it's a reply to. Fixes bug #3357.
4589         (camel_folder_thread_messages_new): Likewise, although I don't
4590         think this function is used any more.
4591
4592 2001-08-20  JP Rosevear  <jpr@ximian.com>
4593
4594         * Makefile.am: build a static camel for the addressbook conduit
4595
4596 2001-08-20  Ettore Perazzoli  <ettore@ximian.com>
4597
4598         * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
4599         s/Synchronising/Synchronizing/.
4600         (mbox_summary_sync_quick): Likewise.  *
4601         providers/local/camel-spool-summary.c (spool_summary_sync_full):
4602         Likewise.
4603         (spool_summary_sync_quick): Likewise.
4604
4605 2001-08-20  Jeffrey Stedfast  <fejj@ximian.com>
4606
4607         * providers/imap/camel-imap-store.c (create_folder): Get the
4608         entire directory structure for the folder we just created, meaning
4609         if we created a folder named "test.mailbox" where test didn't
4610         previously exist, get the listing for "test" and "test.mailbox".
4611
4612         * providers/imap/camel-imap-utils.c (imap_parse_folder_name): New
4613         function.
4614
4615 2001-08-19  Chris Toshok  <toshok@ximian.com>
4616
4617         * camel-store.h: #include <sys/types.h> for mode_t on freebsd.
4618
4619 2001-08-19  Jeffrey Stedfast  <fejj@ximian.com>
4620
4621         * providers/pop3/camel-pop3-folder.c (pop3_generate_uids): Make
4622         sure the generated UID is non-NULL before appending it to the
4623         array of UIDs. How would this even happen? I have no clue...
4624
4625 2001-08-17  Jeffrey Stedfast  <fejj@ximian.com>
4626
4627         * providers/imap/camel-imap-folder.c (imap_update_summary): Start
4628         scanning new messages at maxuid + 1 rather than uidval + 1? Maybe
4629         I'm missing the logic, but anyways...this might fix bug #5348.
4630
4631 2001-08-16  Jeffrey Stedfast  <fejj@ximian.com>
4632
4633         * providers/imap/camel-imap-store.c (imap_keepalive): If we are
4634         online and message flags have changed in the current folder, sync
4635         the flags else do a NOOP. This fixes bug #4666. Also lock around
4636         the NOOP command.
4637
4638         * providers/imap/camel-imap-folder.c (imap_sync_online): Don't
4639         ever send "STORE FLAGS.SILENT ()" since Cyrus imapd doesn't like
4640         this (and maybe others too?) so what we'll do instead is to send
4641         "STORE -FLAGS.SILENT (\Seen \Answered \Deleted \Marked)" to clear
4642         all the flags (since this is in essence what we want to do
4643         anyway).
4644
4645 2001-08-16  Peter Williams  <peterw@ximian.com>
4646
4647         * providers/imap/camel-imap-store.c (imap_connect_online): Fix
4648         this again. Sigh. Problem of namespace = "" may not yet be
4649         completely solved.
4650
4651 2001-08-15  Peter Williams  <peterw@ximian.com>
4652
4653         * camel-tcp-stream-openssl.c (ssl_error_to_errno): New
4654         function. Try to approximate the SSL error into errno.
4655         (errlib_error_to_errno): New function, try to approximate
4656         OpenSSl's error library's error (ERR_*) into errno.
4657         (stream_read): Try to set errno using ssl_error_to_errno.
4658         (stream_write): Same.
4659         (open_ssl_connection): Same.
4660
4661         * providers/imap/camel-imap-store.c (imap_connect_online): Oh
4662         crap, huge killer typo.
4663
4664 2001-08-14  Peter Williams  <peterw@ximian.com>
4665
4666         * providers/imap/camel-imap-store.c (imap_connect_online):
4667         Canonicalize store->namespace to end in store->dir_sep, once both
4668         values are known. The %F-related code makes this
4669         assumption. Probably fixes a bug reported on the mailing list.
4670
4671 2001-08-13  Jeffrey Stedfast  <fejj@ximian.com>
4672
4673         * camel-store.c (camel_store_get_folder): After talking to NotZed,
4674         it turns out I was wrong after all.
4675         (store_sync): Create a copy of the folder-cache that owns a ref on
4676         each of the folders so that if one of the folders get's finalized
4677         inside store_sync(), we don't run into any locking issues. This is
4678         mostly meant to solve a problem in IMAP (#6089).
4679
4680 2001-08-13  Peter Williams  <peterw@ximian.com>
4681
4682         * providers/imap/camel-imap-store.c (delete_folder): Fix a leak.
4683
4684         * providers/imap/camel-imap-utils.c (imap_namespace_concat): Bleah,
4685         handle when namespace = NULL (can happen upon initial open of mailbox.)
4686
4687         * providers/imap/camel-imap-command.c (imap_command_strdup_vprintf): 
4688         Don't crash when %F'ing with an empty folder name and NULL namespace.
4689
4690 2001-08-13  Jeffrey Stedfast  <fejj@ximian.com>
4691
4692         * camel-store.c (camel_store_get_folder): We need to be ref'ing
4693         the folder if/when we add it to the hash. This may fix bug #6089?
4694         (camel_store_get_folder): Nevermind, reverted the fix.
4695         (camel_store_get_folder): No, I wasn't on crack before after
4696         all...if we don't ref here, then we're open to a race condition
4697         later.
4698
4699 2001-08-11  Ettore Perazzoli  <ettore@ximian.com>
4700
4701         * providers/local/camel-spool-summary.c (summary_rebuild):
4702         s/summarising/summarizing/.
4703         (summary_rebuild): Likewise.
4704
4705         * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
4706         s/summarise/summarize/.
4707         (mbox_summary_sync_quick): Likewise.
4708         (summary_rebuild): Likewise.
4709         (mbox_summary_check): Likewise.
4710
4711 2001-08-10  Jeffrey Stedfast  <fejj@ximian.com>
4712
4713         * providers/imap/camel-imap-utils.c (imap_quote_string): Added an
4714         assert - at this point a backtrace would be more useful than a
4715         transaction log for debugging.
4716
4717         * providers/imap/camel-imap-command.c (imap_command_start): Return
4718         FALSE here, not NULL.
4719         
4720         * providers/imap/camel-imap-folder.c (imap_rescan): Don't
4721         g_strdup() the uid into the trigger_event call.
4722
4723         * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
4724         Set the total bytes expected to 0 if the response is empty too.
4725         (pop3_refresh_info): Return of there was an error generating pop3
4726         uids.
4727
4728         * camel-mime-utils.c (header_raw_check_mailing_list): regfree the
4729         pattern before continue'ing. This was showing up quite a bit under
4730         purify.
4731
4732 2001-08-09  Jeffrey Stedfast  <fejj@ximian.com>
4733
4734         * providers/imap/camel-imap-utils.c (imap_parse_string_generic): A
4735         quoted string cannot contain \n's so check for those as well.
4736         (imap_atom_specials): Update this to fix bug #6553.
4737
4738 2001-08-08  Jon Trowbridge  <trow@ximian.com>
4739
4740         * camel-filter-search.c (get_source): Remove trailing stuff from
4741         URLs before returning.  (Done in an evil way, not in the good way
4742         suggested by fejj. :)) (Bug #4876)
4743
4744 2001-08-08  jacob berkman  <jacob@ximian.com>
4745
4746         * camel-search-private.c (camel_search_header_match): check for
4747         NULL name and addr (fixes a bug i was about to report)
4748
4749 2001-08-08  Not Zed  <NotZed@Ximian.com>
4750
4751         * camel-filter-search.c (check_header): Properly determine match
4752         type to pass to header_match.
4753         (address_matches_exactly): Removed, effectively added to
4754         camel_search_header_match.
4755
4756         * camel-folder-search.c (check_header): Properly determine the
4757         match type to pass to header_match.
4758
4759         * camel-search-private.c (camel_search_header_match): Add a new
4760         parameter 'type' which is the type of header we're matching
4761         against.  ASIS means utf8 format, ADDRESS means an internet
4762         address ('formatted'), ADDRESS_ENCODED means a raw address header,
4763         ENCODED means rfc 2047 encoded text.
4764         (header_match): Move original logic here, have search_header_match
4765         call it as appropriate for the 'type' of match.
4766
4767 2001-08-07  Not Zed  <NotZed@Ximian.com>
4768
4769         * camel-session.c (camel_session_class_init): Only init the vee
4770         provider struct once (if we're subclassed this will get called
4771         multiple times).
4772
4773         * camel-object.c (obj_finalize): Removed a bit of a debug that
4774         crept in with jacob's poolv patch (?).
4775
4776 2001-08-07  Jeffrey Stedfast  <fejj@ximian.com>
4777
4778         * camel-filter-search.c (address_matches_exactly): New function to
4779         do danw's address "is" comparison (as specified in bug #5886.
4780         (check_header): Special-case address-type headers when we are
4781         doing an exact match to use the address_matches_exactly function.
4782
4783 2001-08-06  Jeffrey Stedfast  <fejj@ximian.com>
4784
4785         * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
4786         Modify to take a headers_only argument which will then only fetch
4787         message headers.
4788         (pop3_generate_uids): Pass in TRUE for headers_only.
4789         (pop3_get_message): Pass in FALSE for headers_only and move the
4790         camel_operation() stuff out of get_message_stream and in to here
4791         instead.
4792         (pop3_generate_uids): We also need to be using i+ 1 as the id
4793         since we are starting at 0.
4794
4795 2001-08-06  Jeffrey Stedfast  <fejj@ximian.com>
4796
4797         * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
4798         New internal function to get a message stream by message sequence
4799         id (so that we can share code between pop3_get_message and
4800         pop3_generate_uids).
4801         (pop3_get_message): Use pop3_get_message_stream.
4802         (pop3_generate_uids): New function to generate UIDs based on the
4803         message - this fixes bug #1256.
4804         (pop3_refresh_info): If the server doesn't support UIDL, call
4805         pop3_generate_uids to get our list of UIDs.
4806
4807         * providers/imap/camel-imap-store.c (get_folder_info_online):
4808         Don't strstr for noselect=yes, that's just plain broken.
4809
4810 2001-08-06  Dan Winship  <danw@ximian.com>
4811
4812         * providers/imap/camel-imap-folder.c (imap_rescan): Fix off-by-one
4813         error in cleaning up deleted messages at the end of the folder.
4814         Fixes bug #5585 and maybe others.
4815
4816         * providers/imap/camel-imap-store.c (get_folder_info_online): Do a
4817         refresh_info on the selected folder before looking at its unread
4818         count. Should fix bug #4944.
4819
4820 2001-08-06  Peter Williams  <peterw@ximian.com>
4821
4822         Completely hide the namespace from everything external to the IMAP
4823         code, which Dan W says is the way it should be.
4824         
4825         * providers/imap/camel-imap-command.c
4826         (imap_command_strdup_vprintf): Add a new %F argument, which is like
4827         %S but will add the namespace (for folder names).
4828         (camel_imap_command): Use %F here.
4829
4830         * providers/imap/camel-imap-utils.c (imap_parse_list_response):
4831         Changed to strip out the namespec when returning *folder. In order
4832         to do this we need to be passed the CamelImapStore.
4833         (imap_concat): Move to here from camel-imap-store.c, un-static
4834         (imap_namespace_concat): New function, adds the namespace to the 
4835         folder name, unless it's INBOX.
4836         
4837         * providers/imap/camel-imap-utils.h: Prototypes.
4838
4839         * providers/imap/camel-imap-store.c (imap_connect_online): Extra
4840         arg to imap_parse_list_response.
4841         (imap_connect_offline): Here too.
4842         (get_folder_status): Use %F.
4843         (get_folder_online): Here too.
4844         (delete_folder): Here too.
4845         (create_folder): Here too, and arg to imap_parse_list_response.
4846         (parse_list_response_as_folder_info): Arg to i_p_l_r.
4847         (get_subscribed_folders_by_hand): Use %F.
4848         (get_folders_online): Here too.
4849         (get_folder_info_online): Instead of checking for NULL @name, check
4850         for name = NULL or "", and set to "" instead of namespace. Pass ""
4851         instead of namespace to camel_folder_info_build.
4852         (subscribe_folder): Use %F.
4853         (unsubscribe_folder): Here too.
4854
4855         * providers/imap/camel-imap-folder.c (imap_get_full_name): This
4856         now just returns folder->full_name.
4857         (do_append): Use %F
4858         (do_copy): Here too.
4859
4860 2001-08-06  Jeffrey Stedfast  <fejj@ximian.com>
4861
4862         * camel-pgp-context.c (pgp_verify): Always do --no-auto-key-retrieve.
4863
4864 2001-08-03  Jeffrey Stedfast  <fejj@ximian.com>
4865
4866         * camel-pgp-context.c (pgp_verify): Minor changes to the iconv
4867         code so that it does the check in the return value of iconv() just
4868         like the code in camel-mime-utils.c in case this fixes Bo Rosen's
4869         gpg bugs (but I doubt this will change anything?).
4870
4871 2001-08-03  Jeffrey Stedfast  <fejj@ximian.com>
4872
4873         * providers/smtp/camel-smtp-transport.c (smtp_connect): First
4874         check to make sure that service->url->authmech is non-NULL before
4875         passing it into strcmp to avoid a segfault.
4876
4877         * camel-pgp-context.c (pgp_decrypt): Sigh, if gpg returns '1' it
4878         means that the key is bad but it did succeede in decrypting the
4879         block so to make users happy (even though I find this a
4880         questionable action) we are going to ignore the error and show it
4881         to the user anyway. This fixes bug #6136.
4882
4883 2001-08-03  Not Zed  <NotZed@Ximian.com>
4884
4885         * providers/smtp/camel-smtp-transport.c (smtp_connect): special
4886         case popb4smtp auth before we try and connect, and do the magic
4887         here first.
4888
4889 2001-08-02  Not Zed  <NotZed@Ximian.com>
4890
4891         * providers/smtp/camel-smtp-transport.c (smtp_connect): Check for
4892         POPB4SMTP separate to the esmtp auth list.
4893         (smtp_auth): If creating the sasl object means it is
4894         already authenticated, then exit early.  Sort of 'clean hack' to
4895         help popb4smtp work.
4896         (smtp_auth): Unref the sasl object, clean up a memleak i think.
4897
4898         * providers/smtp/camel-smtp-provider.c
4899         (camel_provider_module_init): Added POPB4SMTP auth type.
4900
4901         * camel-sasl.c (camel_sasl_authtype): Added POPB4SMTP type.
4902
4903         * camel-sasl-popb4smtp.c: New file for pop before smtp
4904         'authentication'.
4905
4906         * Makefile.am (libcamel_la_SOURCES, HEADERS): Add
4907         camel-sasl-popb4smtp.[ch].
4908
4909 2001-08-01  Not Zed  <NotZed@Ximian.com>
4910
4911         * providers/local/camel-mbox-folder.c (mbox_lock): If we fail to
4912         get the lock, make sure we close our locking fd, and reset it.
4913         Fixes the crash part of 5095.
4914
4915         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
4916         Slightly re-arranged filter/change notification logic.  If we;re
4917         filtering, freeze the folder till we're finished to smooth the ui
4918         for new mail.
4919
4920 2001-07-31  Not Zed  <NotZed@Ximian.com>
4921
4922         * camel-folder.c (camel_folder_init): Chagned mutexes to
4923         e_mutexes, folder lock recursive.  This fixes the imap filtering
4924         bug, or at least some cases of it.
4925         (camel_folder_finalize): Free mutexes.
4926
4927         * camel-private.h (CamelFolderPrivate): Changed mutexes to
4928         e_mutexes.
4929
4930 2001-07-25  Not Zed  <NotZed@Ximian.com>
4931
4932         * camel-folder.c (camel_folder_change_info_*): Change the
4933         return if fail's into asserts.
4934         (camel_folder_change_info_free): Don't let it accept a NULL
4935         argument.  This isn't g_lib so we dont have to.
4936
4937 2001-07-27  Jeffrey Stedfast  <fejj@ximian.com>
4938
4939         * camel-mime-utils.c (header_decode_param): Fix the fix that fixes
4940         broken mailer behavior. We want to make sure that the user's
4941         locale charset is non-NULL before we pass it off to
4942         iconv_open(). If it *is* NULL, we want to use iso-8859-1.
4943
4944 2001-07-26  Jeffrey Stedfast  <fejj@ximian.com>
4945
4946         * camel-url.c (camel_url_free): Allow the url to be NULL just like
4947         the libc free convention.
4948
4949 2001-07-26  Dan Winship  <danw@ximian.com>
4950
4951         * providers/imap/camel-imap-command.c (camel_imap_command_start):
4952         Send an IMAP command, but don't wait for responses.
4953         (camel_imap_command_response): Read a single line of response from
4954         the server.
4955         (camel_imap_command, etc): Reimplement in terms of the new code.
4956
4957         * providers/imap/camel-imap-folder.c (imap_rescan): Use
4958         camel_imap_command_start and camel_imap_command_response, and
4959         call camel_operation_progress after each line read from the
4960         server.
4961         (imap_update_summary): Likewise, although with more fudging on the
4962         precentages... Also, fix this so that if none of the new messages
4963         are cached, it only does a single FETCH, and if some of them are
4964         cached, it does two FETCHes (one to get the UIDs, FLAGS, and
4965         SIZEs, and another to get the bodies of all of the messages that
4966         aren't cached now that it knows the relevant UIDs). This should
4967         speed up startup a bunch (especially if you have high bandwidth
4968         but also high latency to the IMAP server).
4969
4970 2001-07-25  Dan Winship  <danw@ximian.com>
4971
4972         * camel-mime-utils.c (mail_mlist_magic): Add another Sender
4973         pattern.
4974
4975 2001-07-24  Not Zed  <NotZed@Ximian.com>
4976
4977         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
4978         Change the break into a continue, we should process as many as we
4979         can find.
4980
4981         * camel-folder.c (camel_folder_move_messages_to): If we have no
4982         uid's to copy, exit here before going any further.  Some code
4983         internally [imap] assumes there are uids to copy otherwise it can
4984         segfault.
4985         (camel_folder_copy_messages_to): Same.
4986
4987 2001-07-24  Jeffrey Stedfast  <fejj@ximian.com>
4988
4989         * camel-mime-utils.c (header_decode_param): Handle broken mailers
4990         that send unencoded 8bit header params. And there was much
4991         rejoicing. Rah.
4992
4993         * camel-url.h (CAMEL_URL_HIDE_ALL): New #define, and there was
4994         much rejoicing. Rah.
4995
4996 2001-07-24  Not Zed  <NotZed@Ximian.com>
4997
4998         * camel-operation.c (camel_operation_register, unregister): Added
4999         some warnings for bad cases.
5000
5001 2001-07-23  Not Zed  <NotZed@Ximian.com>
5002
5003         * camel-operation.c (camel_operation_register): Only insert a hash
5004         entry if we haven't already.
5005         (camel_operation_unregister): Only remove the has entry if the id
5006         is a real thread.
5007
5008 2001-07-23  Jeffrey Stedfast  <fejj@ximian.com>
5009
5010         * camel-filter-driver.c (do_move): Slight fix for when source ==
5011         destination (we don't want to do this action because on-demand
5012         filtering would then delete the messages it supposedly "moved").
5013
5014 2001-07-23  Not Zed  <NotZed@Ximian.com>
5015
5016         * providers/smtp/camel-smtp-transport.c (smtp_auth, smtp_helo,
5017         send_to): Added some operation progress reporting.  Actual data
5018         transfer is 'tricky' because of the layers used.
5019         (smtp_auth): Instead of checking exception_is_set, use
5020         challenge==NULL to test if sasl_challenge_base64 failed.
5021
5022         * providers/local/camel-mbox-summary.c (mbox_summary_sync): Remove
5023         peters changes below and put in a better fix.  These functions
5024         already return -1 on error, just use that, and not worry about
5025         building our own exception redundantly.
5026
5027         * camel-service.c (camel_get_host_byname): Turn the progress into
5028         a transient event.
5029
5030 2001-07-20  Peter Williams  <peterw@ximian.com>
5031
5032         * providers/local/camel-mbox-summary.c (mbox_summary_sync): More
5033         usage fixes for CamelException. Check our own exception for
5034         summary_update and xfer it out if an error occurred.
5035
5036 2001-07-20  JP Rosevear  <jpr@ximian.com>
5037
5038         * Pull up test fixes to get them building again
5039
5040 2001-07-20  Not Zed  <NotZed@Ximian.com>
5041
5042         * camel-charset-map.c (camel_charset_get_iconv_friendly_name):
5043         renamed to camel_charset_to_iconv() to make it just a little more
5044         consistent and not so long & fixed callers.
5045
5046 2001-07-19  Jeffrey Stedfast  <fejj@ximian.com>
5047
5048         * camel-mime-filter-charset.c
5049         (camel_mime_filter_charset_new_convert): Convert to the
5050         iconv-friendly charset names.
5051
5052         * providers/imap/camel-imap-store.c (create_folder): Fixed a
5053         compiler warning about returning without a value in a non-void
5054         function. Blah.
5055
5056         * camel-mime-part.c (process_header): Pass the locale charset as
5057         the default_charset to header_decode_string().
5058
5059         * camel-folder-summary.c (camel_folder_summary_format_string):
5060         Pass the locale charset as the default_charset to
5061         header_decode_string().
5062         (content_info_new): Same.
5063
5064         * camel-mime-message.c (process_header): Pass the locale charset
5065         as the default_charset to header_decode_string().
5066
5067         * camel-mime-utils.c (append_8bit): New helper function who's
5068         purpose is similar to append_latin1() but for 8bit text that we
5069         are assuming is not latin1.
5070         (header_decode_text): Now takes a default_charset parameter and
5071         calls append_8bit when appropriate.
5072         (header_decode_string): Also takes a default_charset parameter
5073         now.
5074         (header_decode_mailbox): Pass NULL as the default_charset to
5075         header_decode_string().
5076
5077 2001-07-19  Jeffrey Stedfast  <fejj@ximian.com>
5078
5079         * camel-pgp-context.c (pgp_verify): Modified to treat the return
5080         value from camel_charset_locale_name() as a const char*.
5081
5082         * camel-sasl-digest-md5.c (digest_response): Modified to treat the
5083         return value from camel_charset_locale_name() as a const char*.
5084
5085         * camel-charset-map.c (camel_charset_locale_name): Modify to
5086         return const char* by returning the static locale_charset which is
5087         created inside of camel_charset_map_init().
5088         (camel_charset_map_init): Find the locale charset here and set the
5089         static variable.
5090
5091 2001-07-19  Peter Williams  <peterw@ximian.com>
5092
5093         Policy change: NULL url's are no longer allowed in
5094         CamelFolderInfos. They used to signify that the folder was, in
5095         IMAP jargon, NoSelect; now the same effect is achieved by adding a
5096         "noselect=yes" parameter to the end of the URL. As far as I know,
5097         IMAP is the only affected provider.
5098         
5099         * providers/imap/camel-imap-store.c (delete_folder): New
5100         function. Implement folder deletion.
5101         (camel_imap_store_class_init): Set the delete_folder class
5102         function here.
5103         (get_folder_status): New function. Utility wrapper around the
5104         STATUS command.
5105         (create_folder): If the parent folder is NoSelect but is empty,
5106         delete it and recreate it as a a subfolder-containing folder. If
5107         it is NoSelect but contains messages, set an exception.
5108         (parse_list_response_as_folder_info): Always set the FolderInfo's
5109         URL, but add a NoSelect parameter if it isn't selectable.
5110         (get_folder_info_online): Change logic of removing the namespace
5111         to reflect URL change. Same for logic of checking unread counts.
5112         (get_folder_info_online): Use get_folder_status to simplify this.
5113
5114         * camel-store.c (camel_folder_info_build): When creating dummy
5115         parents, copy the child's URL and set the NoSelect parameter.
5116
5117 2001-07-19  Jeffrey Stedfast  <fejj@ximian.com>
5118
5119         * camel-mime-part-utils.c
5120         (simple_data_wrapper_construct_from_parser): No need for
5121         `acharset' anymore.
5122         (check_html_charset): Return a const char* and also use
5123         camel_charset_get_iconv_friendly_name() internally.
5124
5125         * camel-mime-utils.c (rfc2047_decode_word): Remove my iso8859-1 ->
5126         iso-8859-1 hack and use camel_charset_get_iconv_friendly_name()
5127         instead.
5128         (rfc2184_decode): Use camel_charset_get_iconv_friendly_name()
5129
5130         * camel.c (camel_init): Call camel_charset_map_init().
5131
5132         * camel-charset-map.c (camel_charset_map_init): New function to
5133         initialize the charset-equivalent lookup table. To be called by
5134         camel_init().
5135         (camel_charset_get_iconv_friendly_name): New function to try and
5136         convert a charset into something that iconv is more likely to
5137         accept.
5138
5139 2001-07-19  Peter Williams  <peterw@ximian.com>
5140
5141         * Revert 7/11/2001 patch for IMAP INBOX filtering at NotZed's 
5142         request.
5143
5144 2001-07-17  Peter Williams  <peterw@ximian.com>
5145
5146         Clean up some exception misusage.
5147
5148         * providers/imap/camel-imap-command.c (camel_imap_command): Use
5149         our own internal exception for sending the string and transfer it
5150         to @ex if anything goes wrong.
5151         (imap_read_response): Use our own internal exception for reading
5152         the untagged responses and blah blah blah.
5153
5154         * camel-session.c (get_service): Use our own internal exception
5155         when constructing the service and transfer it to @ex if anything
5156         goes wrong.
5157
5158         * camel-remote-store.c (remote_recv_line): Instead of having
5159         gboolean exception, use our own internal exception and copy
5160         it to @ex if anything goes wrong.
5161
5162         * camel-store.c (store_sync): Create an internal exception
5163         because sync_folder() checks it for validity. Transfer it to
5164         @ex when done.
5165
5166         * camel-exception.c (camel_exception_get_description): If @ex is
5167         NULL, complain - passing NULL exceptions to Camel is okay, but
5168         there should be no circumstances under which they're then
5169         examined.
5170         (camel_exception_get_id): Same here,
5171         (camel_exception_xfer): NULL-protect and warn if transferring from
5172         a NULL exception.
5173         
5174 2001-07-17  Jeffrey Stedfast  <fejj@ximian.com>
5175
5176         * camel-store.c (init_trash): Use CAMEL_VTRASH_NAME.
5177
5178         * camel-vtrash-folder.h: #define CAMEL_VTRASH_NAME
5179
5180 2001-07-16  Dan Winship  <danw@ximian.com>
5181
5182         * providers/imap/camel-imap-command.c (camel_imap_response_free):
5183         Given:
5184                 * 4 EXISTS
5185                 * 1 EXPUNGE
5186         We have to pass 3, not 4 to camel_imap_folder_changed for the
5187         exists count. Fixes ximian bug #2112 (finally!).
5188
5189 2001-07-14  Jeffrey Stedfast  <fejj@ximian.com>
5190
5191         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
5192         If the message info for an expunged message is NULL, then just
5193         break out - maybe a message was expunged that we were never
5194         notified even existed?
5195
5196 2001-07-13  Jeffrey Stedfast  <fejj@ximian.com>
5197
5198         * camel-mime-utils.c (rfc2047_decode_word): Added a hack to
5199         convert charsets in the format iso8859-1 to iso-8859-1 because it
5200         seems to be more iconv friendly. It has been reported that on some
5201         systems, iconv doesn't know about iso8859-1 while it *does* know
5202         about iso-8859-1. See bug #4530.
5203
5204 2001-07-13  Peter Williams  <peterw@ximian.com>
5205
5206         * Makefile.am (install-exec-local): Let people install as
5207         non-root, but give them a bigass warning so they're not allowed to
5208         complain when it doesn't work right.
5209
5210         * camel-remote-store.c (sync_remote_folder): New function: hash
5211         table callback.
5212         (remote_disconnect): If cleanly disconnecting, sync our
5213         folders. Fixes deadlocks on exit (folders syncing after store
5214         disconnects) and also makes sense.
5215
5216 2001-07-13  Jeffrey Stedfast  <fejj@ximian.com>
5217
5218         * camel-uid-cache.c (camel_uid_cache_new): We now use a structure
5219         as the bucket data rather than just a cache level so set the save
5220         state to TRUE.
5221         (maybe_write_uid): We only save the uid if the cache levels are
5222         the same *and* if the save state is TRUE.
5223         (free_uid): Free the state value.
5224         (camel_uid_cache_get_new_uids): New uids that get added to the
5225         cache start with a save state of FALSE.
5226         (camel_uid_cache_save_uid): Set the save state of the uid to
5227         TRUE. What should we do if the uid isn't already in the cache?
5228         Currently I make it add the uid, but maybe it shouldn't?
5229
5230         * providers/imap/camel-imap-folder.c (imap_filter_timeout): Update
5231         to reflect CamelFilterDriver API changes.
5232
5233         * camel-filter-driver.c (camel_filter_driver_filter_folder): Take
5234         a cache argument so we can tell the cache whether or not the uid
5235         should be saved (meaning we have successfully filtered it).
5236
5237 2001-07-12  Jeffrey Stedfast  <fejj@ximian.com>
5238
5239         * camel-filter-driver.c (camel_filter_driver_filter_message):
5240         Okay, I've decided that that user is just on crack. We don't want
5241         to allow filtering of deleted messages or we could get some
5242         unexpected behavior.
5243         (do_move): Oops. My last fix needs to be after the if-statement,
5244         not inside it.
5245         (do_copy): And here too.
5246
5247 2001-07-12  Jeffrey Stedfast  <fejj@ximian.com>
5248
5249         * camel-filter-driver.c (do_move): Only set p->copied and
5250         p->deleted if the messages are copied without an exception.
5251         (do_copy): Same - but obviously we don't set the p->deleted here
5252         at all.
5253         (camel_filter_driver_filter_message): Since users complained that
5254         they couldn't filter deleted messages for "safe keeping" (WTF?
5255         safe keeping? why were they deleted in the first place then??), I
5256         have taken out the code that optimized filtering by not allowing
5257         deleted messages to be filtered. This fixes bug #4473.
5258
5259         Note: Users have a warped sense of logic.
5260
5261 2001-07-12  Not Zed  <NotZed@Ximian.com>
5262
5263         * camel-mime-part-utils.c (extract_metatag_charset): Removed.
5264         (check_html_charset): Replaced with this.
5265         (simple_data_wrapper_construct_from_parser): Call
5266         check_html_charset if we dont have a charset on the content-type,
5267         and we have text/html data.
5268         (check_html_charset): We also need to do qp/base64 decoding
5269         ourselves, sigh.
5270
5271         * camel-mime-utils.c (html_meta_param_list_decode): Removed.  This
5272         was very wrong, the rules for mail headers vastly different from
5273         rules for decoding html elements.
5274         (rfc2184_decode): Move the malloc inside the iconv_open worked,
5275         otherwise we have a memleak.
5276
5277         * camel-mime-filter-html.c (camel_mime_filter_html_finalize, init,
5278         run, reset): Changed to use camelhtmlparser, and fixed a tiny
5279         memleak.
5280
5281         * camel-html-parser.c: Made the html indexer tokeniser re-usable.
5282         ONLY TO BE USED INTERNAL TO CAMEL HOWEVER.
5283         (tokenise_step): Slight fix to non-quoted values.
5284
5285         * camel-folder-summary.c
5286         (camel_folder_summary_info_new_from_message): Removed some code i
5287         wasn't supposed to commit.
5288
5289         * providers/local/camel-local-summary.c (local_summary_add): Only
5290         set info->size if it is not zero.
5291         (local_summary_add): If we dont get a size from the info passed
5292         in, calculate it using a null stream write.  Should do #4392.
5293
5294 2001-07-11  Jeffrey Stedfast  <fejj@ximian.com>
5295
5296         * camel-mime-part-utils.c (extract_metatag_charset): New function
5297         to extract a meta-tag charset value if it exists.
5298         (simple_data_wrapper_construct_from_parser): Along the same lines
5299         as the code I previously ripped out, but this time use the
5300         mime-parser's seek ability to help us along. Currently I read up
5301         to a 2k buffer size - this is probably overkill, 1k is probably
5302         plenty.
5303
5304         * camel-mime-utils.c (html_meta_param_list_decode): When we get to
5305         an `=', we must skip past it before trying to grab the param
5306         value. duh.
5307
5308 2001-07-11  Jeffrey Stedfast  <fejj@ximian.com>
5309
5310         * camel-mime-part-utils.c
5311         (simple_data_wrapper_construct_from_parser): Ripped out my code
5312         since it was never being used since the mime parser is not using a
5313         seekable stream (ever?) which pretty much means my code needs to
5314         be done someplace else.
5315
5316 2001-07-11  Peter Williams  <peterw@ximian.com>
5317
5318         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed): 
5319         Run the filter in its own thread to prevent locking issues.
5320         (imap_filter_timeout): New function that does the filtering called
5321         as a CamelSession timeout.
5322
5323 2001-07-11  Not Zed  <NotZed@Ximian.com>
5324
5325         * camel-filter-driver.c (camel_filter_driver_filter_mbox): Create
5326         the messageinfo itself, so we can properly set the size.
5327
5328         * camel-movemail.c (camel_movemail_solaris): Write out the from
5329         line between each message.
5330
5331 2001-07-10  Not Zed  <NotZed@Ximian.com>
5332
5333         * providers/local/camel-local-summary.c (local_summary_add): Copy
5334         the size across from the source message info if supplied.
5335
5336         * camel-stream-null.c: Added a 'written' member which keeps track
5337         of how much has been written to the stream.
5338
5339         * camel-movemail.c (camel_movemail): If we have BROKEN_SPOOL
5340         defined, then use the solaris movemail to quote from lines that
5341         sendmail didn't.
5342         (camel_movemail_solaris): Compile this in if BROKEN_SPOOL defined.
5343
5344 2001-07-10  Jeffrey Stedfast  <fejj@ximian.com>
5345
5346         * camel-mime-utils.c (html_meta_param_list_decode): New function
5347         to parse an HTML meta-tag.
5348
5349         * camel-mime-part-utils.c
5350         (simple_data_wrapper_construct_from_parser): If the Content-Type
5351         did not contain a charset parameter and it's also a text/html
5352         part, we have 1 last place to look - in the META html tags. *sigh*
5353
5354         * camel-mime-message.c (camel_mime_message_get_source):
5355         s/gint/unsigned since that's what it should be.
5356
5357 2001-07-09  Jeffrey Stedfast  <fejj@ximian.com>
5358
5359         * camel-pgp-context.c (pgp_sign): Forget the passphrase if the
5360         user has set that option.
5361         (pgp_clearsign): Same.
5362         (pgp_encrypt): And here...
5363         (pgp_decrypt): And finally here.
5364         (camel_pgp_context_new): Take a `remember' argument.
5365
5366 2001-07-09  Not Zed  <NotZed@Ximian.com>
5367
5368         * providers/local/camel-maildir-summary.c (maildir_summary_sync):
5369         Oops, e_poolv_set free's it for us, so dont double-free here.
5370
5371 2001-07-06  Not Zed  <NotZed@Ximian.com>
5372
5373         * camel-vee-folder.c (camel_vee_folder_finalise): Changed so we
5374         dont have the list changing under us, just going to the next node
5375         before we call a function that might change the list is
5376         potentially dangerous (slight mod of peters fix).  Hmm, i think it
5377         would've double-unref'd it too(?)
5378
5379 2001-07-08  Chris Toshok  <toshok@ximian.com>
5380
5381         * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_finalize):
5382         openssl_table is gone.  we now store/get the stream from the
5383         SSL_CTX's app_data.
5384         (stream_read): rework the non-blocking case to account for SSL
5385         possibly buffering data (in which case select will block even
5386         though data is ready to be read), and to account for FreeBSD's
5387         strange behavior of returning -1/EAGAIN even though select said
5388         the fd was ready to be read.
5389         (ssl_verify): openssl_table is gone.
5390         (open_ssl_connection): set the SSL_CTX's app_data to be the
5391         stream, remove the openssl_table code.
5392
5393 2001-07-06  Jeffrey Stedfast  <fejj@ximian.com>
5394
5395         * camel-mime-utils.c (header_encode_param): Don't allow in to be
5396         NULL, so instead of doing if (in == NULL) return;, make it a
5397         g_return_val_if_fail and later we can make it an assert or
5398         something.
5399
5400         * providers/local/camel-maildir-store.c (get_inbox): Fixes bug
5401         #1138.
5402
5403         * providers/local/camel-mbox-summary.c
5404         (camel_mbox_summary_build_from): Make the `day-of-month' digit
5405         take up 2 chars by using "%2d". Fixes bug #3989 for lame mailers
5406         like Pine.
5407
5408         * camel-pgp-context.c (crypto_exec_with_passwd): Set the pipe fd's
5409         to nonblocking.
5410
5411 2001-07-06  Peter Williams  <peterw@ximian.com>
5412
5413         * camel-object.c (camel_object_unref): Make sure that after the
5414         finalization event has happened and the finalization functions
5415         have been called that the object still has a zero refcount.
5416
5417 2001-07-06  Joe Shaw  <joe@ximian.com>
5418
5419         * providers/nntp/camel-nntp-grouplist.c: Add locking to
5420         camel_nntp_get_grouplist_from_server().
5421
5422         * providers/nntp/camel-nntp-resp-codes.h: Added
5423         NNTP_EXTENSIONS_SUPPORTED (202).
5424
5425         * providers/nntp/camel-nntp-store.c (camel_nntp_store_get_extensions):
5426         Check for both NNTP_LIST_FOLLOWS and NNTP_EXTENSIONS_SUPPORTED from
5427         a LIST EXTENSIONS request. (Dunno if NNTP_LIST_FOLLOWS ever comes
5428         out of this, but that's what was already there...) Also, put some
5429         locking around it.
5430         (finalize): e_mutex_destroy() the command lock
5431         (camel_nntp_store_init): e_mutex_new() the command lock.
5432
5433         * providers/nntp/camel-nntp-store.h: Add locking macros.
5434
5435 2001-07-05  Jeffrey Stedfast  <fejj@ximian.com>
5436
5437         * camel-folder-summary.c (camel_message_info_string): Added an
5438         assert to make sure that `mi' isn't NULL.
5439         (camel_message_info_set_string): Same.
5440
5441         * providers/imap/camel-imap-command.c (camel_imap_response_free):
5442         Create and use a temporary CamelException for use with
5443         camel_imap_folder_changed.
5444
5445 2001-07-05  Jeffrey Stedfast  <fejj@ximian.com>
5446
5447         * camel-pgp-context.c (pgp_verify): Send the
5448         --no-auto-key-retrieve argument to gpg if we are in offline mode
5449         so that we don't have to worry about gpg hanging if it can't
5450         connect to the key servers, because now it shouldn't even attempt
5451         to.
5452
5453 2001-07-05  Chris Toshok  <toshok@ximian.com>
5454
5455         * camel-tcp-stream-openssl.c (ssl_verify): use
5456         X509_STORE_CTX_get_ex_data to get at the SSL* - don't use the
5457         X509_STORE_CTX to look up our stream, since it's not what we used
5458         to insert our stream into the hashtable.
5459         (open_ssl_connection): insert the stream into the hashtable before
5460         calling SSL_connect, as this can cause ssl_verify to be called,
5461         and we need to look up the stream there.  remove the stream from
5462         the hashtable if there's an error connecting.
5463         (stream_connect): pass the CamelTcpStreamOpenSSL* to
5464         open_ssl_connection since it handles the hashtable stuff.  remove
5465         hashtable stuff from here.
5466
5467 2001-07-05  Jeffrey Stedfast  <fejj@ximian.com>
5468
5469         * camel-folder.c (camel_folder_copy_messages_to): if source ==
5470         dest, just no-op.
5471
5472 2001-07-05  Peter Williams  <peterw@ximian.com>
5473
5474         * camel-vee-folder.c (camel_vee_folder_finalise): Move this before the
5475         camel_vee_folder_remove_folder because that function modifies p->folders
5476         messing up our iteration.
5477         (camel_vee_folder_finalise): Don't unref our summary; camel-folder now
5478         does this.
5479
5480         * camel-object.h (CamelObject): Add a 'destroying' flag to CamelObject.
5481
5482         * camel-object.c (obj_init): Clear 'destroying'.
5483         (camel_object_unref): If 'destroying' then do not send the finalize
5484         event and do not call finalize functions. Otherwise, set destroying
5485         so just in case we get refed (eg event code) we don't get doubly
5486         finalized.
5487
5488 2001-07-05  Not Zed  <NotZed@Ximian.com>
5489
5490         * camel-mime-filter-basic.c (filter): Fix the assertion slightly,
5491         if we have a little bit of input the output size could be larger,
5492         since we store upto 3 chars in the state.
5493
5494         * camel-folder-summary.c
5495         (camel_folder_summary_info_new_from_message): When indexing a new
5496         record, create a pseudo word 'ibexindexed' so we can always tell
5497         that a message has already been idnexed, even if it contains no
5498         words of its own.  Things like maildir use this check to see if
5499         its already been processed, and it matters if it is incorrect in
5500         this case (not just wasted cycles).
5501         (camel_message_info_dup_to): Assign the to->strings from the
5502         e_poolv_cpy() call, since it may allocaote a new poolv if the
5503         lengths do not match.
5504
5505         (camel_folder_summary_info_new_from_parser): And same here.
5506
5507         * providers/local/camel-maildir-summary.c (maildir_summary_sync):
5508         Changed the logicfor epoolv code to be different, we dont need to
5509         update hash references or any tricky stuff.
5510         (maildir_summary_check): Samehere.
5511
5512         * camel-folder-summary.h: Removed include of e-memory.h.
5513
5514 2001-07-03  Joe Shaw  <joe@ximian.com>
5515
5516         * providers/nntp/camel-nntp-resp-codes.h: Added NNTP_NO_PERMISSION
5517         (502) to the list of response codes.
5518
5519         * providers/nntp/camel-nntp-store.c (nntp_store_connect): If we
5520         receive a NNTP_NO_PERMISSION, don't get into an infinite loop trying
5521         to reconnect, get extensions, etc. Just give up and return FALSE.
5522
5523 2001-07-03  Dan Winship  <danw@ximian.com>
5524
5525         * providers/imap/camel-imap-message-cache.c
5526         (camel_imap_message_cache_clear): Doh. Don't remove things from
5527         the hash table while foreach'ing it. (And can't use foreach_remove
5528         either because we have to remove them in a weird order). Fixes
5529         #3618.
5530
5531         * providers/imap/camel-imap-folder.c (imap_get_message): If the
5532         server returns OK from the FETCH BODY, but there's no parseable
5533         BODY response, it's probably because there's an UN-parseable BODY
5534         response, implying the message is badly formatted, MIMEwise. In
5535         that case, fall back to fetching the message as a single part.
5536
5537 2001-07-02  Sam Creasey <sammy@oh.verio.com>
5538
5539         * providers/nntp/camel-nntp-folder.c: Implemented
5540         nntp_folder_search_by_expression and
5541         nntp_folder_search_free.  Basic search functionality e.g. unread
5542         marking now works for NNTP folders.
5543
5544         * camel_filter_search.c (get_size): Added get-size sexp directive
5545         to get the size of a message for filters.
5546
5547         * providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new):
5548         Always check with the NNTP server after summary load -- this
5549         function now always expires old summary entries and syncs with
5550         the news server.
5551
5552         * providers/nntp/camel-nntp-utils.c (camel_nntp_get_headers):
5553         Only fetch headers for articles not already logged in 
5554         the summary file.
5555         
5556         * providers/nntp/camel-nntp-grouplist.c 
5557         (camel_nntp_get_grouplist_from_*): change from g_list_append()
5558         to g_list_prepend() + g_list_reverse.  Traversing 40,000 
5559         element linked lists sucks.
5560
5561         * providers/nntp/camel-nntp-store.c (camel_nntp_command):
5562         Should the NNTP connection die with 
5563         CAMEL_EXCEPTION_SERVICE_NOT_CONNECTED, make a single retry 
5564         attempt.  Timing out the NNTP link is less painful this way.
5565
5566 2001-07-02  Peter Williams  <peterw@ximian.com>
5567
5568         * README (Introduction): Add comment noting that Camel actually
5569         exists now :-)
5570
5571 2001-07-02  Dan Winship  <danw@ximian.com>
5572
5573         * camel-session.c (camel_session_get_filter_driver): new method to
5574         get an application-initialized filter driver.
5575
5576         * camel-filter-driver.c (camel_filter_driver_new): Remove the
5577         get_folder function and data args from here...
5578         (camel_filter_driver_set_folder_func): ...and add this function to
5579         set/change them.
5580
5581         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): If
5582         this folder is INBOX and we're filtering INBOX, set a flag on the
5583         folder for later.
5584         (imap_update_summary): Add another argument (GPtrArray *recents),
5585         and if it's non-NULL, add the uids of any \Recent new messages to
5586         it.
5587         (camel_imap_folder_changed): If doing filtering in this folder,
5588         create a recents array and pass it to imap_update_summary. Then
5589         get a filter driver and use it to filter the recent messages.
5590
5591         * providers/imap/camel-imap-summary.h: 
5592         * providers/imap/camel-imap-utils.c (imap_parse_flag_list): Add
5593         support for the \Recent flag.
5594
5595         * providers/imap/camel-imap-provider.c (imap_conf_entries): enable
5596         the "filter" option.
5597
5598         * camel-types.h: add CamelFilterDriver typedef here
5599
5600 2001-07-02  Not Zed  <NotZed@Ximian.com>
5601
5602         * camel-lock-client.c (camel_lock_helper_init): properly return
5603         error if we can't create pipes.
5604
5605         * camel-folder-summary.c (summary_build_content_info): re-enable
5606         html indexing.
5607
5608         * camel-mime-filter-html.c: Completely re-implemented using a
5609         custom parser.
5610
5611 2001-07-02  Dan Winship  <danw@ximian.com>
5612
5613         * tests/misc/url.c (main): Change a camel_exception_clear to
5614         camel_exception_init to fix a sometimes-crash
5615
5616 2001-06-29  Jeffrey Stedfast  <fejj@ximian.com>
5617
5618         * camel-mime-utils.c: Added Originator: header as a header to look
5619         for when looking for the mailing list.
5620
5621         * tests/mime-filter/Makefile.am: Build the test-crlf test program.
5622
5623         * tests/mime-filter/test-crlf.c: New test suite for the crlf
5624         filter.
5625
5626         * camel-mime-filter-crlf.c (filter): Fixed to correctly encode and
5627         decode dots.
5628
5629 2001-06-28  Peter Williams  <peterw@ximian.com>
5630
5631         * camel-mime-filter-stripheader.c: New file. Filter that strips a
5632         header from mime output.
5633
5634         * camel-mime-filter-stripheader.h: New file. Header for the above.
5635
5636         * providers/smtp/camel-smtp-transport.c (smtp_data): Use the
5637         stripheader filter to remove the "Bcc" header.
5638
5639         * Makefile.am: Add the stripheader files.
5640
5641         * tests/lib/Makefile.am (INCLUDES): Get this to compile again.
5642
5643         * tests/mime-filter/test-stripheader.c: New file. Test suite for
5644         the CamelMimeFilterStripHeader.
5645
5646         * tests/mime-filter/Makefile.am: New test section: mime filters.
5647
5648 2001-06-28  Jeffrey Stedfast  <fejj@ximian.com>
5649
5650         * camel-mime-utils.c (header_decode_param_list): Fix a memory
5651         leak. Also if the decoded value is NULL, that means it wasn't
5652         encoded so we don't want to toss the old value.
5653         (header_param_list_format_append): Correctly wrap long parameter
5654         values according to rfc2184.
5655
5656 2001-06-28  Dan Winship  <danw@ximian.com>
5657
5658         * providers/imap/camel-imap-folder.c (imap_refresh_info): If the
5659         folder is frozen, don't refresh, just record that we need to do it
5660         later.
5661         (imap_append_online): If the APPEND doesn't trigger an immediate
5662         EXISTS response (because the folder isn't the selected folder, or
5663         because the server doesn't do that until the next command), call
5664         imap_refresh_info on the folder.
5665         (imap_copy_online): Likewise. (Replacing the unconditional NOOP
5666         that was there before, which absolutely killed filter performance
5667         by forcing the IMAP provider to switch back and forth between
5668         folders after every copy or move.)
5669         (imap_thaw): If the folder needs a refresh, do it.
5670
5671         * camel-folder.c (camel_folder_is_frozen): New method
5672
5673 2001-06-27  Jeffrey Stedfast  <fejj@ximian.com>
5674
5675         * camel-transport.c (camel_transport_init): Initialize the private
5676         send_lock.
5677         (camel_transport_finalize): Free the private send_lock.
5678         (camel_transport_get_type): Set the init and finalize functions.
5679         (camel_transport_send): Lock the transport.
5680         (camel_transport_send_to): Same.
5681
5682         * camel-private.h: Add CAMEL_TRANSPORT_(UN)LOCK macros.
5683
5684 2001-06-27  Jeffrey Stedfast  <fejj@ximian.com>
5685
5686         * tests/folder/test9.c (main): Updated to match the current API.
5687
5688         * tests/folder/test3.c: #include <gtk/gtk.h> since we use
5689         gtk_init().
5690
5691         * camel-internet-address.c
5692         (camel_internet_address_encode_address): Use the new
5693         header_address_fold.
5694
5695         * camel-mime-utils.c: Removed some old #if 0'd code of mine.
5696         (rfc2047_encode_word): If enclen is 0, don't write an encoded word
5697         token (=?iso-8859-7?Q??= would be an invalid token).
5698         (header_address_fold): New function to wrap address headers -
5699         header_fold() was force-wrapping rfc2047 encoded words which was
5700         making the test suite fail. The *real* solution, however, is to
5701         not create rfc2047 encoded words longer than 72 chars.
5702
5703 2001-06-26  Jeffrey Stedfast  <fejj@ximian.com>
5704
5705         * camel-filter-driver.c (open_folder): Since we want an error
5706         opening a folder to result in the message being copied to Inbox
5707         (assuming no other filters get a chance to `move` it), don't
5708         record any exceptions that may occur in this function.
5709
5710 2001-06-26  Dan Winship  <danw@ximian.com>
5711
5712         * providers/imap/camel-imap-folder.c (camel_imap_folder_selected,
5713         imap_append_offline, imap_append_online,
5714         camel_imap_folder_changed): lock the cache around accesses
5715
5716         * providers/imap/camel-imap-store.c (get_folder_online): ref the
5717         newly-created folder (as current_folder) before calling
5718         camel_imap_folder_selected, in case that needs to do something
5719         that causes another folder to become current...
5720
5721         * camel-service.c (camel_service_get_url): D'oh.
5722         s/FALSE/CAMEL_URL_HIDE_PASSWORD/
5723
5724 2001-06-25  Jeffrey Stedfast  <fejj@ximian.com>
5725
5726         * camel-filter-search.c (get_source): g_strdup() the message
5727         source here or we will have problems later when we go to free the
5728         result ;-)
5729
5730 2001-06-25  Dan Winship  <danw@ximian.com>
5731
5732         * providers/imap/camel-imap-store.c (try_auth): Fix this: IMAP
5733         doesn't allow an extra argument to AUTHENTICATE to avoid a useless
5734         round trip like some other SASL bindings do.
5735
5736         * providers/imap/camel-imap-command.c (imap_read_response): Deal
5737         with IMAP servers that (incorrectly) return "+\r\n" rather than
5738         "+ \r\n" for an empty continuation response.
5739         (camel_imap_response_extract_continuation): Likewise.
5740
5741 2001-06-21  Jeffrey Stedfast  <fejj@ximian.com>
5742
5743         * camel-mime-utils.c (word_types_compatable): New function that
5744         decides if 2 word types are mergeable. An atom and a qstring are
5745         mergeable; 2 qstrings are mergeable; and 2 encoded words are
5746         mergeable.
5747         (header_encode_phrase_merge_words): If 2 words are merged, the new
5748         word type is the MAX of the combined types. This means that if we
5749         merge a qstring and an atom, the resulting word type is a
5750         qstring.
5751
5752         * camel-internet-address.c (internet_format):
5753         s/g_string_sprintfa/g_string_append since this makes more sense in
5754         this particular case.
5755         (internet_encode): Same here.
5756
5757 2001-06-21  Jeffrey Stedfast  <fejj@ximian.com>
5758
5759         * providers/smtp/camel-smtp-transport.c (smtp_send): Use
5760         camel_address_length() rather than casting and accessing data
5761         members.
5762
5763 2001-06-20  Jeffrey Stedfast  <fejj@ximian.com>
5764
5765         * camel-mime-utils.c (header_raw_check_mailing_list): If the first
5766         char of the mailing-list name is '<', chop it off to make Ettore
5767         happy. Fixes bug #2153.
5768
5769 2001-06-19  Not Zed  <NotZed@Ximian.com>
5770
5771         * camel-lock-helper.c (unlock_id): Fixed a bug when not running
5772         setuid it wouldn't unlock.
5773
5774         * camel-movemail.c (camel_movemail): use new
5775         locking daemon, also return an error code.
5776
5777 2001-06-18  Jeffrey Stedfast  <fejj@ximian.com>
5778
5779         Note: Except for the info_free(), the NULL checks are
5780         g_return's. I felt that since g_free() handles NULL that our
5781         _free() functions should also.
5782         
5783         * camel-folder.c (camel_folder_change_info_free): Check to make
5784         sure that the info pointer isn't NULL.
5785         (camel_folder_change_info_change_uid): Same.
5786         (camel_folder_change_info_changed): Same.
5787         (camel_folder_change_info_remove_uid): Same.
5788         (camel_folder_change_info_add_uid): Same.
5789         (camel_folder_change_info_build_diff): Same.
5790         (camel_folder_change_info_cat): Same.
5791         (camel_folder_change_info_add_source): Same.
5792         (camel_folder_change_info_add_source_list): Same.
5793         (camel_folder_change_info_add_update): Same.
5794         (camel_folder_change_info_add_update_list): Same.
5795
5796 2001-06-18  Dan Winship  <danw@ximian.com>
5797
5798         * tests/stream/Makefile.am (LDADD): 
5799         * tests/smime/Makefile.am (LDADD): 
5800         * tests/misc/Makefile.am (LDADD): 
5801         * tests/message/Makefile.am (LDADD): 
5802         * tests/folder/Makefile.am (LDADD): Remove DB3_LDADD
5803
5804         * Makefile.am (install-exec-local): Set camel-lock-help setgid or
5805         setuid as needed
5806
5807 2001-06-18  Not Zed  <NotZed@Ximian.com>
5808
5809         * camel-folder-summary.c
5810         (camel_folder_summary_info_new_from_parser): Only create a missing
5811         uid if we have indexing turned on.
5812
5813         * camel-lock-helper.c (setup_process): Function to setup
5814         process/sanity/security checks.  Change to the real uid as soon as
5815         we can.
5816         (lock_path): First try to lock as the real uid, if that fails, try
5817         the root uid.
5818         (unlock_id): Unlock as the uid we created the lock as.
5819
5820         * Makefile.am (INCLUDES): Added -DCAMEL_SBINDIR for lock helper
5821         location.
5822
5823         * providers/local/camel-spool-folder.c (spool_lock): Implemented,
5824         using lock helper locking.  Need to work out if the locking
5825         requires a root created lock?
5826         (spool_unlock): Likewise.
5827
5828 2001-06-15  Not Zed  <NotZed@Ximian.com>
5829
5830         * camel-lock-helper.c: Setuid Lock helper process.  Creates and manages
5831         .locks, keeping them active, removing them, etc.  What real perms it
5832         needs is a little system dependent.
5833
5834 2001-06-14  Not Zed  <NotZed@Ximian.com>
5835
5836         * providers/local/camel-maildir-store.c (get_folder_info): Implement.
5837         (scan_dir): Does the work of scanning for maildir directories.
5838
5839 2001-06-13  Not Zed  <NotZed@Ximian.com>
5840
5841         * providers/local/camel-spool-store.c (get_folder_info):
5842         Implemented, just returns a hardcoded INBOX folder.
5843         (free_folder_info): implemented, free's the 1 possible level of
5844         folder info.
5845
5846         * providers/local/camel-spool-folder.c
5847         (camel_spool_folder_construct): Set the real unread message
5848         count on the folder_created thing.
5849
5850 2001-06-15  Dan Winship  <danw@ximian.com>
5851
5852         * providers/imap/camel-imap-message-cache.c
5853         (camel_imap_message_cache_max_uid): Return the largest real UID in
5854         the cache (as an integer). Eventually to be used for an
5855         optimization in the new-message fetch code.
5856         (cache_put): Keep track of max_uid.
5857
5858 2001-06-14  Jeffrey Stedfast  <fejj@ximian.com>
5859
5860         * camel-mime-utils.c: Added Mailing-List header regex so that we
5861         can do mlist magic on that header.
5862
5863 2001-05-28  Jeffrey Stedfast  <fejj@ximian.com>
5864
5865         * camel-mime-utils.c (header_decode_param): Properly handle
5866         correct and incorrect (for the common case, ie Outlook and
5867         Netscape/Mozilla) rfc2184 values.
5868         (header_decode_rfc2184_param): Get the param name and see if we
5869         should expect a rfc2184 parameter value.
5870         (rfc2184_decode): Decode a rfc2184 value.
5871         (hex_decode): hex decode a string.
5872         (header_decode_param_list): Handle rfc2184 encoded parameters (ie
5873         parameters that have been split and perhaps encoded).
5874         (header_param_list_format_append): Encode the value before seeing
5875         if it will fit on the line. If the value does get encoded, be sure
5876         to put a '*' before the equal-sign.
5877         (header_encode_param): New function to rfc2184 encode a parameter
5878         value (maybe it should be renamed?)
5879
5880 2001-06-14  Jeffrey Stedfast  <fejj@ximian.com>
5881
5882         * camel-mime-part.c (init_header_name_table): Don't try to format
5883         the Reply-To header - we don't want to wrap the reply-to address.
5884
5885 2001-06-12  Not Zed  <NotZed@Ximian.com>
5886
5887         * providers/local/camel-spool-*.[ch]: A new provider, for spool
5888         mailboxes.  Mostly a cut and paste of the mbox code, but not a
5889         subclass CamelLocal*.  Not tested a lot, doesn't lock yet, use
5890         with extreme caution.
5891
5892         * tests/lib/folders.c (test_folder_message_ops): Added spool arg,
5893         spool folders can't be deleted, renamed, etc.
5894         (test_folder_basic): Same.
5895
5896         * tests/folder/test2.c (main): Added checks for spool type.
5897
5898         * tests/[message|stream|folder|misc|smime]/Makefile.am (LDADD):
5899         Added db3 flags, so make check compiles, doesn't run though.
5900
5901 2001-05-24  Not Zed  <NotZed@Ximian.com>
5902
5903         * providers/local/camel-local-provider.c
5904         (camel_provider_module_init): Added spool provider.
5905
5906 2001-06-07  Jon Trowbridge  <trow@ximian.com>
5907
5908         * camel-filter-driver.c (camel_filter_driver_filter_folder): Add a
5909         separator between the service url and the folder name, if needed.
5910
5911         * camel-filter-driver.c (camel_filter_driver_filter_mbox): Added
5912         an argument, so that the original source URI of the mbox can be
5913         passed in.  This is needed because this function is called
5914         post-movemail, so we are never reading from the original mbox
5915         anymore.  Without the original mbox URI, the X-Evolution-Source
5916         tag gets set incorrectly and filter-on-source will fail to work.
5917         (camel_filter_driver_filter_message): Also take an extra arg
5918         for the original source URI.  It is the original URI, not the
5919         source URI, that is used for filtering and for setting the
5920         X-Evolution-Source tag.
5921
5922 2001-06-05  Dan Winship  <danw@ximian.com>
5923
5924         * providers/imap/camel-imap-folder.c (imap_rescan): Don't fetch
5925         the UID and FLAGS of messages we don't know about yet, since
5926         they'll just get discarded.
5927
5928 2001-06-01  Jeffrey Stedfast  <fejj@ximian.com>
5929
5930         * tests/smime/pgp.c: Fix to not get into a recursive loop in
5931         get_type().
5932
5933         * tests/smime/pgp-mime.c: Same.
5934
5935 2001-05-31  Jeffrey Stedfast  <fejj@ximian.com>
5936
5937         * camel-smime-context.c: Numerous fixes to get it to compile.
5938
5939         * camel.h: Added camel-cipher-context.h, camel-cms-context.h,
5940         camel-smime-context.h, and camel-smime-utils.h
5941
5942         * camel-cms-context.[c,h]: New virtual class for manipulating
5943         cryptographic message syntax messages (like S/MIME).
5944
5945         * camel-smime-context.[c,h]: Modified to inherit from the
5946         CamelCMSContext class rather than the CamelCipherContext class.
5947
5948         * camel-smime.[c,h]: Removed - just use camel-smime-context
5949         directly.
5950
5951         * camel-smime-utils.[c,h]: New source files. Moved the 2 useful
5952         functions from camel-smime.[c,h] into here.
5953
5954 2001-05-30  Dan Winship  <danw@ximian.com>
5955
5956         * camel-charset-map.c: Redo the BUILD_MAP code to not depend on
5957         libunicode. Now it only generates a map of "popular" 8bit
5958         encodings. (It's not worthwhile to support obscure encodings,
5959         because any mailer that supports them will support UTF8 too. And
5960         Chinese and Japanese use mostly the same UTF8 characters so you
5961         need to decide between those encodings based on the locale or
5962         the charset of the message you're replying to or the input
5963         method you used. So this is sufficient for camel_charset_best's
5964         use.)
5965
5966         * camel-charset-map-private.h: Regenerated.
5967
5968         * camel.c (camel_shutdown): Move #ifdefs around to prevent a
5969         warning.
5970
5971 2001-05-29  Dan Winship  <danw@ximian.com>
5972
5973         * camel-disco-diary.c: Code for logging and replaying offline
5974         operations.
5975
5976         * camel-disco-store.c (disco_construct): Set disco->status here
5977         (where we can base it on the session's offline status) rather than
5978         at init time.
5979         (disco_connect): If we connect online and have a non-empty diary,
5980         switch to RESYNCING mode and replay the diary to the server.
5981         (disco_get_folder, disco_get_folder_info): Add _resyncing
5982         variants.
5983
5984         * camel-disco-folder.c (disco_sync, disco_expunge_uids,
5985         disco_append_message, disco_copy_messages_to,
5986         disco_move_messages_to): Add _resyncing variants to switches.
5987         (disco_expunge_uids, disco_append_message, disco_copy_messages_to,
5988         disco_move_messages_to): Remove #ifdef'ed out diary code: let the
5989         provider do it.
5990         (disco_append_message): Redo the append methods to no longer
5991         return the UID, since we're no longer doing the logging from here.
5992
5993         * providers/imap/camel-imap-store.c (imap_connect_online,
5994         imap_connect_offline): Create a CamelDiscoDiary.
5995         (imap_disconnect_offline): And free it.
5996
5997         * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
5998         If RESYNCING, don't do any sort of checking that the remote folder
5999         matches the summary, beyond making sure that the UIDVALIDITY is
6000         correct.
6001         (imap_rescan): Add a missing camel_folder_summary_info_free when
6002         removing a UID from the summary.
6003         (imap_expunge_uids_offline): Implement. Fairly simple.
6004         (imap_expunge_uids_resyncing): Implement. If the store supports
6005         UIDPLUS, we can just use imap_expunge_uids_online. If not, we need
6006         to temporarily undelete any messages marked deleted on the server
6007         that aren't supposed to get expunged.
6008         (imap_append_offline): Implement, using cache and summary
6009         operations, and triggering the folder_changed event by hand.
6010         (imap_append_resyncing): Implement. Redo imap_append_online a bit
6011         in the process to make them able to share more code.
6012         (imap_copy_offline): Implement.
6013         (imap_copy_online): Move parts of this out into a helper.
6014         (imap_copy_resyncing): Implement. In most cases this is just like
6015         imap_copy_online, but if you are copying a message that was itself
6016         copied or appended into the folder, and the server doesn't do
6017         UIDPLUS, it will be necessary to replace at least part of the copy
6018         operation with one or more appends.
6019
6020         * providers/imap/camel-imap-command.c (imap_read_response): Don't
6021         record the current folder in the response when in RESYNCING mode.
6022         (This means that EXISTS and EXPUNGE responses won't be processed,
6023         which is needed because the summary may not match the folder at
6024         this point.)
6025         (imap_read_response): On error, call
6026         camel_imap_response_free_without_processing, not
6027         camel_imap_response_free.
6028
6029         * providers/imap/camel-imap-utils.c (imap_uid_array_to_set): Make
6030         this work better when operating on UIDs that aren't in the summary.
6031
6032         * providers/imap/camel-imap-summary.c
6033         (camel_imap_summary_add_offline): New routine used by
6034         imap_append_offline and imap_copy_offline to create new summary
6035         entries.
6036
6037 2001-05-28  Jeffrey Stedfast  <fejj@ximian.com>
6038
6039         * camel-mime-utils.c (header_set_param): Use g_strcasecmp()
6040         because some systems don't have strcasecmp(). Also, when removing
6041         a param, make sure to free the param->name too.
6042
6043 2001-05-27  Dan Winship  <danw@ximian.com>
6044
6045         * tests/lib/messages.c (test_message_read_file): Fix an fd leak
6046
6047         * tests/lib/session.c, tests/lib/session.h: a CamelSession
6048         subclass for the test programs.
6049
6050         * tests/lib/Makefile.am: include session.[ch]
6051
6052         * tests/folder/test*.c: Use a CamelTestSession from libcameltest
6053         instead of cut+pasting everywhere.
6054
6055         * tests/misc/url.c (main): Update for a camel_url_new change at
6056         some point.
6057
6058         * tests/*/.cvsignore: Add stuff.
6059
6060         * camel-mime-utils.c (rfc2047_encode_word): Fix a silly ==/!=
6061         mixup.
6062
6063 2001-05-26  Dan Winship  <danw@ximian.com>
6064
6065         * providers/imap/camel-imap-folder.c: Add a "need_rescan" flag
6066         saying if we want to rescan the entire folder for flag changes
6067         next time it's selected.
6068         (camel_imap_folder_init): Set need_rescan TRUE.
6069         (camel_imap_folder_selected): If need_rescan is TRUE, call
6070         imap_rescan.
6071         (imap_refresh_info): Only do a full rescan if need_rescan is TRUE.
6072         Otherwise just do a NOOP, making this a MUCH more lightweight
6073         operation. Also, don't call imap_rescan directly if the folder
6074         isn't selected, since that could end up causing the folder to be
6075         scanned *twice* (imap_rescan -> camel_imap_command ->
6076         camel_imap_folder_selected -> imap_rescan).
6077         (imap_rescan): Set need_rescan FALSE.
6078         (imap_sync_online): Don't NOOP if no changes were pushed: the
6079         caller will call refresh_info if it wants to poll for changes.
6080         Fixes evolution-mail doing lots of unnecessary extra work at
6081         quit time.
6082
6083         * providers/imap/camel-imap-store.c (refresh_folder_info): Set
6084         need_rescan on each folder before calling refresh_info.
6085
6086 2001-05-25  Jeffrey Stedfast  <fejj@ximian.com>
6087
6088         * providers/smtp/camel-smtp-transport.c (smtp_auth): Oops. Use a
6089         strNcmp to make sure the response begins with a 334 code, not a
6090         strcmp. Duh.
6091
6092         * providers/local/camel-maildir-folder.c (maildir_append_message):
6093         remove the summary info so we are not out-of-sync with the maildir
6094         folder.
6095
6096         * providers/local/camel-mh-folder.c (mh_append_message): remove
6097         the summary info so we are not out-of-sync with the mh folder.
6098
6099         * providers/local/camel-mbox-folder.c (mbox_append_message):
6100         remove the summary info so we are not out-of-sync with the mbox.
6101
6102 2001-05-24  Jeffrey Stedfast  <fejj@ximian.com>
6103
6104         * camel-smime-context.c (camel_smime_context_new): Oops, I spelled
6105         the get-default-db function name wrong.
6106
6107 2001-05-23  Jeffrey Stedfast  <fejj@ximian.com>
6108
6109         * providers/local/camel-local-folder.c
6110         (camel_local_folder_construct): s/folder_deleted/folder_created -
6111         result of a bad copy/paste.
6112
6113         * providers/imap/camel-imap-search.c (imap_body_contains):
6114         Optimize the match "" case.
6115
6116 2001-05-21  Jeffrey Stedfast  <fejj@ximian.com>
6117
6118         * providers/imap/camel-imap-store.c (get_folder_info_online):
6119         Store the CamelFolderInfo tree that was returned from
6120         camel_folder_info_build() in a new variable, 'tree', rather than
6121         'fi' since we later use 'fi' when syncing folders. Not only does
6122         this fix a memory leak, but it also fixes the bug where the user
6123         would only see the last folder in the folder list and/or it's
6124         subfolders.
6125
6126 2001-05-16  Jeffrey Stedfast  <fejj@ximian.com>
6127
6128         * camel-session.c (camel_session_forget_password): The service can
6129         be NULL here too, thanks to Wayne Davis for pointing this out.
6130
6131         * camel-smime-context.c (camel_smime_context_new): We don't need
6132         to be passed the certdb path anymore.
6133
6134 2001-05-16  Dan Winship  <danw@ximian.com>
6135
6136         * camel-medium.c (camel_medium_get_headers): New function to
6137         return an array of all headers.
6138         (camel_medium_free_headers): And free them.
6139
6140         * camel-mime-part.c (get_headers, free_headers): Implement this
6141         for CamelMimePart. (Works for CamelMimeMessage too.)
6142
6143 2001-05-15  Jeffrey Stedfast  <fejj@ximian.com>
6144
6145         * camel-smime-context.c (camel_smime_context_finalise): Don't
6146         close or free (it wasn't allocated) the certdb.
6147         (camel_smime_context_new): If we get a NULL certdb handle, then
6148         don't bother trying to create a new certdb handle since NSS_Init*
6149         should have done that.
6150
6151 2001-05-15  Jeffrey Stedfast  <fejj@ximian.com>
6152
6153         * Makefile.am: Don't use EXTRA_GNOME_*, use the new CAMEL_*
6154         variables so we don't link in tons of extra cruft that we don't
6155         need.
6156
6157         * tests/smime/pkcs7.c: Added to the test suite - tests the S/MIME
6158         pkcs7 functions.
6159
6160 2001-05-14  Jeffrey Stedfast  <fejj@ximian.com>
6161
6162         * camel-smime-context.c: Lots of fixes to get this to compile.
6163
6164         * camel-smime.c (camel_smime_part_verify): Updated to pass in a
6165         hash argument to camel_smime_verify().
6166
6167         * camel-pgp-mime.c (camel_pgp_mime_part_verify): Update according
6168         to the changes in the context API.
6169
6170         * camel-pgp-context.c (pgp_verify): Updated to take a
6171         CamelCipherHash argument.
6172
6173         * camel-cipher-context.c (camel_cipher_verify): Now takes a hash
6174         argument since the S/MIME code needs this.
6175
6176         * Makefile.am: Add camel-smime-context.[c,h] and camel-smime.[c,h]
6177         to the build.
6178         
6179         * camel-smime.[c,h]: New source files for manipulating S/MIME
6180         message parts.
6181
6182 2001-05-14  Jon Trowbridge  <trow@ximian.com>
6183
6184         * camel-search-private.c (utf8_get): Replicate the semantics of
6185         the libunicode utf8 functions by returning NULL in the arg
6186         on invalid utf8.
6187
6188         * camel-pgp-context.c (pgp_verify): Check for valid utf8,
6189         terminate loop if something looks wrong.
6190
6191         * camel-mime-utils.c (header_encode_phrase_get_words): Properly
6192         check for invalid utf8.
6193         (header_encode_string): Properly check for invalid utf8.
6194
6195         * camel-charset-map.c (camel_charset_step): Properly check for
6196         invalid utf8.
6197
6198 2001-05-14  Jeffrey Stedfast  <fejj@ximian.com>
6199
6200         * tests/folder/test9.c: 
6201         * tests/folder/test8.c:
6202         * tests/folder/test7.c: 
6203         * tests/folder/test6.c: 
6204         * tests/folder/test5.c: 
6205         * tests/folder/test4.c:
6206         * tests/folder/test3.c: 
6207         * tests/folder/test2.c: 
6208         * tests/folder/test1.c: 
6209         * tests/smime/pgp-mime.c: 
6210         * tests/smime/pgp.c: Subclass CamelSession since we can no longer
6211         specify the passwd callback any other way and update code
6212         accordingly.
6213
6214 2001-05-11  Dan Winship  <danw@ximian.com>
6215
6216         * camel-mime-utils.c (header_location_decode): Decode
6217         Content-Location, either correctly or Netscape-generated-brokenly.
6218
6219         * camel-mime-part.c (camel_mime_part_set_content_location,
6220         camel_mime_part_get_content_location, etc): Deal with
6221         Content-Location header.
6222
6223 2001-05-11  Jeffrey Stedfast  <fejj@ximian.com>
6224
6225         * providers/smtp/camel-smtp-transport.c (smtp_auth): Don't check
6226         the initial auth response until we get into the while-loop
6227         otherwise we have problems if the SASL mechanism supported a
6228         client initiated challenge (like PLAIN and LOGIN do).
6229
6230 2001-05-11  Dan Winship  <danw@ximian.com>
6231
6232         * camel-stream-null.c (camel_stream_null_new): Make this return
6233         CamelStream * (like the other stream new functions) instead of
6234         CamelStreamNull *
6235
6236 2001-05-10  Chris Toshok  <toshok@ximian.com>
6237
6238         * camel-tcp-stream-ssl.c (stream_connect): call SSL_Enable after
6239         the SSL_ImportFD and before PR_Connect.  Otherwise, NSS aborts
6240         during the connect.
6241
6242 2001-05-10  Jeffrey Stedfast  <fejj@ximian.com>
6243
6244         * camel-session.c (camel_session_get_password): Don't abort if the
6245         Service is NULL, this is perfectly valid for cipher contexts.
6246
6247 2001-05-09  Peter Williams  <peterw@ximian.com>
6248
6249         * providers/imap/camel-imap-folder.c (imap_move_messages_to): Pass
6250         appropriate parameters to CF_CLASS and add comment explaining why
6251         my initial attempt at a solution didn't work.
6252
6253 2001-05-09  Dan Winship  <danw@ximian.com>
6254
6255         * camel-disco-store.c (camel_disco_set_status): Set the
6256         disconnected status.
6257         (camel_disco_store_can_work_offline): Return whether or not a
6258         given CamelDiscoStore can work offline or not.
6259
6260         * camel-disco-folder.c (camel_disco_folder_cache_message):
6261         Explicitly tell a folder to cache a message. (Better than using
6262         get_message, because for IMAP that doesn't guarantee you'll get
6263         all the message parts.)
6264         (camel_disco_folder_prepare_for_offline): Prepare a folder for
6265         offline use by caching all messages meeting given search criteria
6266         (and doing anything else the particular folder implementation
6267         needs).
6268
6269         * camel-session.c (camel_session_set_online,
6270         camel_session_is_online): A session-wide online/offline toggle.
6271         (camel_session_init): Set online to TRUE.
6272
6273         * providers/imap/camel-imap-store.c (can_work_offline):
6274         Implementation of CamelDiscoStore::can_work_offline. (Checks that
6275         the store has been used online at least once.)
6276         (imap_get_folder_online, imap_get_folder_offline): Deal with
6277         request for "inbox" properly. ("Don't you mean... 'INBOX'?").
6278
6279         * providers/imap/camel-imap-folder.c (imap_cache_message):
6280         Implementation of CamelDiscoFolder::cache_message.
6281
6282         * camel.h: Add camel-disco-store.h and camel-disco-folder.h
6283
6284 2001-05-09  Jeffrey Stedfast  <fejj@ximian.com>
6285
6286         * camel-mime-part.c (camel_mime_part_set_content_id): Wrap the
6287         content-id with <>'s.
6288
6289 2001-05-04  Jeffrey Stedfast  <fejj@ximian.com>
6290
6291         * providers/smtp/camel-smtp-transport.c (connect_to_server): Add
6292         support for using OpenSSL.
6293
6294         * camel-remote-store.c (remote_connect): Add support for using the
6295         OpenSSL implementation.
6296
6297         * camel-tcp-stream-ssl.c (ssl_bad_cert): Hmmmm, don't pass in a
6298         NULL as the last argument to alert_user - prototype doesn't take
6299         that argument anymore?
6300
6301         * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_finalize):
6302         (ssl_verify): Use a global hash table to try and lookup the
6303         CamelTcpStreamOpenSSL object given the ssl context since OpenSSL
6304         doesn't think one needs to pass data around, we should all be
6305         living in a world of global variables, duh!
6306
6307 2001-05-06  Dan Winship  <danw@ximian.com>
6308
6309         * Makefile.am (libcamelinclude_HEADERS): Fix another build
6310         problem. (Um, anyone else could have done this...)
6311
6312 2001-05-04  Dan Winship  <danw@ximian.com>
6313
6314         * providers/imap/camel-imap-store.c (get_folder_online): Fix up
6315         refcounting on current_folder.
6316
6317         * camel-disco-folder.c, camel-disco-store.h: Remove
6318         CamelDiscoDiary refs that weren't supposed to escape yet.
6319
6320 2001-05-03  Dan Winship  <danw@ximian.com>
6321
6322         * camel-disco-store.c: new abstract class for disconnectable
6323         remote stores
6324
6325         * camel-disco-folder.c: new abstract class for folders on
6326         disconnectable stores.
6327
6328         * Makefile.am: Add camel-disco-folder.[ch] and
6329         camel-disco-store.[ch].
6330
6331         * providers/imap/camel-imap-store.c: Make this a subclass of
6332         CamelDiscoStore, and fix up the offline interfaces for the changes
6333         since they were first written (particularly the fact that some
6334         IMAP stores don't just use subscribed folders).
6335
6336         * providers/imap/camel-imap-folder.c: Make this a subclass of
6337         CamelDiscoFolder, although most ops still fail in disconnected
6338         mode.
6339
6340         * camel-store.c (camel_store_get_folder_info): Change gboolean,
6341         gboolean, gboolean to guint32 in the prototype for this function.
6342
6343         * providers/local/camel-local-store.c (get_folder_info): Update
6344         for prototype change.
6345
6346 2001-05-02  Dan Winship  <danw@ximian.com>
6347
6348         * providers/imap/camel-imap-store.h: Clean this up a bit. Add a
6349         "tag_prefix" member. Move "useful_lsub" into capabilities.
6350
6351         * providers/imap/camel-imap-store.c (camel_imap_store_init):
6352         Initialize the tag_prefix, based on a static variable.
6353
6354         * providers/imap/camel-imap-command.c (camel_imap_command): Use
6355         the store's tag_prefix character rather than "A" at the start of
6356         the tag. Makes the verbose debug output easier to parse when
6357         connected to multiple IMAP servers. (Well, unless you're connected
6358         to more than 26 servers...)
6359
6360         * providers/imap/camel-imap-utils.c (imap_uid_array_to_set): Fix
6361         this up... it was losing count in some cases and giving a more
6362         verbose answer than it needed to.
6363
6364         * providers/pop3/camel-pop3-store.c: Rescue the KPOP code from bit
6365         rot.
6366
6367 2001-05-01  Dan Winship  <danw@ximian.com>
6368
6369         * providers/imap/camel-imap-command.c (camel_imap_command): Redo
6370         command locking. Since command_lock is recursive, we can just get
6371         a lock here, and release it either on error, or when the caller
6372         frees the response data. (This simplifies a lot of stuff, and
6373         fixes some problems with camel_imap_folder_changed being called
6374         without the command_lock locked because of the 2001-03-22 change.)
6375
6376         (camel_imap_response_free): 
6377         (camel_imap_response_free_without_processing): 
6378         (camel_imap_response_extract): 
6379         (camel_imap_response_extract_continuation): These all take a
6380         CamelImapStore now as well, to deal with locking.
6381
6382         * providers/imap/camel-imap-private.h: Add
6383         CAMEL_IMAP_STORE_ASSERT_LOCKED, which defaults to a noop, but can
6384         be made to call e_mutex_assert_locked.
6385
6386         * providers/imap/camel-imap-folder.c, camel-imap-search.c,
6387         camel-imap-store.c: Simplify using new locking stuff. Add a few
6388         CAMEL_IMAP_STORE_ASSERT_LOCKED checks.
6389
6390 2001-05-01  Dan Winship  <danw@ximian.com>
6391
6392         Support the IMAP UIDPLUS extension (RFC 2359), which lets you
6393         resync after disconnected operation more efficiently, but also
6394         makes it possible to do appends and moves/copies more efficiently
6395         now.
6396
6397         * providers/imap/camel-imap-folder.c (imap_append_message): If the
6398         server supports UIDPLUS, grab the APPENDUID response and cache the
6399         message into the folder's message cache.
6400         (imap_copy_messages_to): Likewise, for COPYUID, copy any message
6401         parts we have cached between the source and destination folder
6402         caches.
6403         (imap_get_message): If the entire message is already in the cache,
6404         just return that rather than building it from parts.
6405         (imap_update_summary): Fetch just the "UID FLAGS RFC822.SIZE" of
6406         the new messages first, then only fetch the headers for messages
6407         where we don't already have the headers cached.
6408
6409         * providers/imap/camel-imap-message-cache.c: Add gtk-doc comments.
6410         (cache_put): Fix refcounting stuff here.
6411         (camel_imap_message_cache_insert_stream,
6412         camel_imap_message_cache_insert_wrapper): New.
6413         (camel_imap_message_cache_get): Fix a bug here so the memory
6414         caching actually works.
6415         (camel_imap_message_cache_copy): New routine, used by
6416         imap_copy_messages_to.
6417
6418         * providers/imap/camel-imap-utils.c (imap_uid_set_to_array):
6419         Inverse operation of imap_uid_array_to_set. Used to parse COPYUID
6420         response.
6421
6422 2001-04-30  Dan Winship  <danw@ximian.com>
6423
6424         * providers/imap/camel-imap-utils.c (imap_uid_array_to_set):
6425         New-and-improved version of get_uid_set() from
6426         camel-imap-folder.c. Looks at the summary as it goes so that if
6427         you ask for messages 5, 6, 8, and 9, and there is no message 7,
6428         then you get "5:9" instead of "5:6,8:9"
6429
6430         * providers/imap/camel-imap-folder.c (imap_copy_messages_to): Use
6431         imap_uid_array_to_set() rather than get_uid_set().
6432         (get_uid_set): Gone
6433
6434 2001-04-27  Dan Winship  <danw@ximian.com>
6435
6436         * camel-session.c: Redo this a lot so that instead of having a
6437         class full of callbacks, we have a subclassable class. Also,
6438         replace the increasingly horrifying
6439         camel_session_query_authenticator with three new routines,
6440         camel_session_get_password, camel_session_forget_password, and
6441         camel_session_alert_user.
6442
6443         * camel-pgp-context.c:
6444         * camel-pkcs7-context.c:
6445         * camel-smime-context.c: 
6446         * providers/imap/camel-imap-store.c: 
6447         * providers/pop3/camel-pop3-store.c: 
6448         * providers/smtp/camel-smtp-transport.c: 
6449         Use camel_session_get_password / camel_session_forget_password.
6450
6451         * camel-tcp-stream-ssl.c (ssl_bad_cert): Use
6452         camel_session_alert_user.
6453
6454 2001-04-26  Jeffrey Stedfast  <fejj@ximian.com>
6455
6456         * camel.c (camel_init): Automagically call camel_shutdown()
6457         atexit() ;-)
6458         (camel_init): Also initialize NSS databases as read/write for
6459         S/MIME and if NSS fails to init, try initializing with volatile
6460         databases.
6461
6462         * camel-file-utils.h: #include <sys/types.h> for off_t.
6463
6464 2001-04-26  Dan Winship  <danw@ximian.com>
6465
6466         * camel-file-utils.c: New file, with the int, string, time_t, and
6467         off_t encode/decode routines from camel-folder-summary.c moved
6468         here and renamed, for the enjoyment of non-CamelFolderSummary
6469         subclasses.
6470
6471         * Makefile.am (libcamel_la_SOURCES): Add camel-file-utils.c
6472         (libcamelinclude_HEADERS): and camel-file-utils.h
6473
6474         * camel-folder-summary.c: Remove functions that were moved to
6475         camel-file-utils.c, update uses of them for the new names.
6476         (camel_folder_summary_{en,de}code_token are still here.)
6477
6478         * providers/local/camel-mbox-summary.c: Use camel_file_util_*
6479         names
6480
6481         * providers/imap/camel-imap-summary.c: Use camel_file_util_* names
6482
6483         * providers/imap/camel-imap-store.c (imap_store_setup_online,
6484         imap_store_setup_offline): Use camel_file_util_* names, which
6485         makes much more sense since this isn't folder summary stuff.
6486
6487 2001-04-26  Dan Winship  <danw@ximian.com>
6488
6489         * Makefile.am (INCLUDES): Remove UNICODE_CFLAGS (and some other
6490         stuff that's redundant with EXTRA_GNOME_CFLAGS)
6491         (libcamel_la_LIBADD): Replace UNICODE_LIBS with GAL_LIBS.
6492
6493         * camel-search-private.c: 
6494         * camel-pgp-context.c: 
6495         * camel-mime-utils.c: Use gunicode interfaces rather than
6496         libunicode.
6497
6498         * camel-charset-map.c: Use gunicode rather than libunicode. (The
6499         charmap-regen code still depends on libunicode though.)
6500
6501         * camel-mime-filter-charset.h: 
6502         * tests/message/test2.c (convert): Use iconv rather than
6503         unicode_iconv.
6504
6505         * providers/smtp/Makefile.am (libcamelsmtp_la_LIBADD): 
6506         * providers/pop3/Makefile.am (libcamelpop3_la_LIBADD): 
6507         * providers/local/Makefile.am (libcamellocal_la_LIBADD): Remove
6508         UNICODE_LIBS.
6509
6510         * camel.c (camel_init): Remove call to unicode_init.
6511
6512         * camel-mime-parser.c: Remove unused unicode.h include.
6513
6514 2001-04-26  Dan Winship  <danw@ximian.com>
6515
6516         * camel-service.c (get_host): Use e_gethostbyname_r.
6517         (camel_service_gethost): Remove unused var.
6518
6519 2001-04-26  Not Zed  <NotZed@Ximian.com>
6520
6521         * Applied jacob's patches for e-poolv stuff.
6522
6523 2001-04-23  Jeffrey Stedfast  <fejj@ximian.com>
6524
6525         * camel.h: Add camel-vee-folder.h and camel-digest-folder.h
6526
6527         * camel-digest-folder.[c,h]: New class that can be used to browse
6528         a multipart/digest message as if it were a CamelFolder.
6529
6530 2001-04-22  Jeffrey Stedfast  <fejj@ximian.com>
6531
6532         * camel-pgp-context.c (pgp_verify): Oops, don't use the return
6533         value of iconv() as a string length, it only tells us the number
6534         of non-reversable character conversions. This fixes it so we
6535         actually see the gpg output in the message viewer.
6536
6537 2001-04-23  Mikael Hallendal  <micke@codefactory.se>
6538
6539         * providers/nntp/Makefile.am (INCLUDES): 
6540         Changed GTK_INCLUDEDIR to EXTRA_GNOME_CFLAGS.
6541
6542 2001-04-20  Jeffrey Stedfast  <fejj@ximian.com>
6543
6544         * camel-smime-context.c (smime_sign): Implemented using the
6545         secmime.h convenience functions.
6546         (smime_clearsign): We just error our here, there is no clearsign
6547         for smime.
6548         (smime_verify): Copied code over from the pkcs7 verify - same
6549         state, ugly and unknown :-)
6550         (smime_encrypt): Implemented using the secmime.h convenience
6551         functions.
6552         (smime_decrypt): Same as the code in pkcs7-context.
6553
6554 2001-04-19  Jeffrey Stedfast  <fejj@ximian.com>
6555
6556         * camel-pkcs7-context.c (pkcs7_sign): Implemented.
6557         (pkcs7_clearsign): Implemented.
6558         (get_zero_len_passwd): Convenience function to try a 0-length key
6559         on the certificate db - if this works then there is no need to
6560         prompt the user.
6561         (get_password): Callback to get the password.
6562         (camel_cipher_hash_to_nss): Convenience function to convert a
6563         CamelCipherHash to an NSS HASH_HashType.
6564         (nss_hash_to_sec_oid): Converts a HASH_HashType to a SecOidTag.
6565         (pkcs7_digest): Digest function for use with pkcs7_sign().
6566         (sign_encode_cb): Callback to write the signed data to the output
6567         stream.
6568         (pkcs7_verify): Hacked on a bit more but am still a bit on the
6569         confused side. This might work but I wouldn't hold my breath. The
6570         sign/clearsign should be close if not correct, but this one...god
6571         only knows.
6572         (pkcs7_decrypt): Implemented.
6573         (pkcs7_encrypt): Implemented (mostly, still need to handle when
6574         'sign' is TRUE).
6575
6576 2001-04-18  Dan Winship  <danw@ximian.com>
6577
6578         * providers/imap/camel-imap-store.c (camel_imap_store_finalize):
6579         Free base_url and storage_path.
6580
6581         * providers/pop3/camel-pop3-store.c (finalize): Free the
6582         implementation string.
6583         (camel_pop3_command): Clarify documentation to mention that
6584         @ex isn't set (and *@ret is) on CAMEL_POP3_ERR.
6585         (connect_to_server): Set @ex properly on CAMEL_POP3_ERR.
6586
6587         * providers/pop3/camel-pop3-folder.c (pop3_refresh_info,
6588         pop3_get_message): Set @ex properly on CAMEL_POP3_ERR.
6589
6590 2001-04-17  Jeffrey Stedfast  <fejj@ximian.com>
6591
6592         * camel-pkcs7-context.[c,h]: New source files to handle Pkcs7
6593         encryption, decryption, signing, and verifying. Not yet
6594         complete. I'm sensing this is going to take a while seeing as how
6595         NSS is just so well documented.
6596
6597 2001-04-17  Dan Winship  <danw@ximian.com>
6598
6599         * camel-filter-driver.c (camel_filter_driver_filter_message): Fix
6600         a memory leak in the error case.
6601
6602 2001-04-16  Jeffrey Stedfast  <fejj@ximian.com>
6603
6604         * providers/local/camel-mbox-summary.c (summary_rebuild): Don't we
6605         want to tell where we are by using the start of the message? I
6606         think this should be using camel_mime_parser_tell_start_from()
6607         instead. Also divide by the size *before* multiplying by 100 so
6608         that we don't overflow the int which was giving us negative values
6609         for our progress status (oops).
6610
6611 2001-04-16  Jeffrey Stedfast  <fejj@ximian.com>
6612
6613         * camel-operation.c: Added a prototype for stamp().
6614
6615         * camel-charset-map.c (camel_charset_locale_name): #include
6616         string.h so we don't get a warning about strchr being undefined
6617         and also init charset to NULL.
6618
6619         * camel-pgp-context.c (pgp_verify): Go back to doing the utf8
6620         conversion by hand so that we don't depend on gal.
6621
6622         * Makefile.am: Remove the EXTRA_GNOME_CFLAGS include.
6623
6624         * camel-store.c (camel_mkdir_hier): Convenience function that it
6625         seems a number of camel-store implementations used gal for.
6626
6627         * providers/nntp/camel-nntp-store.c (ensure_news_dir_exists): Lets
6628         not depend on gal for just e_mkdir_hier() - use camel_mkdir_hier()
6629         instead.
6630
6631         * providers/nntp/camel-imap-store.c: Lets not depend on gal for
6632         just e_mkdir_hier() - use camel_mkdir_hier() instead.
6633
6634         * camel-session.c (camel_session_get_storage_path): Don't depend
6635         on e_mkdir_heir() anymore, use the CamelStore version.
6636
6637         * camel-folder-search.h: Removed gal dependency, why was this even
6638         there in the first place?
6639
6640         * providers/imap/camel-imap-folder.c: Don't need gal/util/e-util.h
6641         here, so remove it.
6642
6643         * string-utils.c (strstrcase): New function, well more like old
6644         function brought back to life so we don't have to depend on gal.
6645
6646         * providers/imap/camel-imap-store.c (imap_store_setup_online): Use
6647         strstrcase rather than e_strstrcase so we don't depend on gal.
6648         (get_unread_online): Same here.
6649
6650         * providers/smtp/camel-smtp-transport.c (smtp_helo): Use
6651         strstrcase.
6652
6653 2001-04-15  Jeffrey Stedfast  <fejj@ximian.com>
6654
6655         * camel-mime-utils.c (header_raw_check_mailing_list): regex
6656         doesn't set errno and regcomp returns 0 on success and any other
6657         value for an error (so don't *just* check for -1).
6658
6659 2001-04-14  Jeffrey Stedfast  <fejj@ximian.com>
6660
6661         * camel-cipher-context.c: Check to make sure the context is a
6662         valid context in all the user functions.
6663
6664 2001-04-13  Jon Trowbridge  <trow@ximian.com>
6665
6666         * providers/imap/camel-imap-store.c (imap_disconnect):
6667         s/imap_store/store/, fixing a typo that was causing the build to
6668         fail.
6669
6670         * camel-filter-search.c (get_source): Make the (previously unused)
6671         get-source command actually do the right thing, properly shrouding
6672         any passed-in source and falling back to use the source attached
6673         to the mime message.
6674
6675 2001-04-13  Dan Winship  <danw@ximian.com>
6676
6677         * camel-object.c (camel_object_hook_event):
6678         * camel-uid-cache.c (camel_uid_cache_get_new_uids):
6679         * camel-url.c (camel_url_new_with_base): Plug leaks.
6680
6681         * camel-remote-store.c (camel_remote_store_init): Don't
6682         re-initialize the folders hash table.
6683
6684         * providers/imap/camel-imap-store.c (imap_disconnect): Free
6685         authtypes since they'll be re-read on re-connect.
6686         (get_folder_info): Free folderinfos that we're discarding from the
6687         list.
6688
6689 2001-04-12  Jeffrey Stedfast  <fejj@ximian.com>
6690
6691         * camel-pgp-context.c (camel_pgp_context_get_type): Oops, lets not
6692         get into a recursive call here ;-)
6693
6694         * tests/smime/pgp.c: Updated to reflect changes to the PGP code.
6695
6696         * tests/smime/pgp-mime.c: Same.
6697
6698 2001-04-12  Jeffrey Stedfast  <fejj@ximian.com>
6699
6700         * camel-pgp-mime.c: Updated to reflect the few changes made to the
6701         CamelPgpContext class.
6702
6703         * camel-pgp-context.c: Updated to subclass of CamelCipherContext.
6704
6705         * camel-cipher-context.[c,h]: New base class for
6706         CamelPgpContext. Also contains the replacement for
6707         CamelPgpValidity, CamelCipherValidity.
6708
6709 2001-04-12  Dan Winship  <danw@ximian.com>
6710
6711         * camel-mime-filter-crlf.c (filter): Fix a pair of array bounds
6712         reads noted by purify
6713
6714 2001-04-12  Jeffrey Stedfast  <fejj@ximian.com>
6715
6716         * camel.h: #include the pgp stuff.
6717
6718 2001-04-12  Dan Winship  <danw@ximian.com>
6719
6720         * providers/imap/camel-imap-message-cache.c
6721         (camel_imap_message_cache_remove): 
6722         * camel-url.c (camel_url_to_string): Plug memory leaks.
6723
6724 2001-04-11  Dan Winship  <danw@ximian.com>
6725
6726         * providers/imap/camel-imap-utils.c (imap_parse_string_generic):
6727         Simplify peterw's imap_is_atom_char fix.
6728
6729 2001-04-11  Jeffrey Stedfast  <fejj@ximian.com>
6730
6731         * tests/smime/Makefile.am: Added pgp-mime.c to the tests.
6732
6733         * tests/smime/pgp-mime.c: Test suite for camel-pgp-mime.c functions.
6734
6735         * Makefile.am: Add camel-pgp-mime.[c,h] to the build.
6736
6737         * camel-pgp-mime.c: Made a number of fixes to get it to compile
6738         and also fixed a few logic errors (mostly forgetting to reset
6739         streams) so that it worked (thanks to the pgp-mime test program).
6740
6741 2001-04-11  JP Rosevear  <jpr@ximian.com>
6742
6743         * providers/imap/Makefile.am: user GNOME_INCLUDEDIR since gnome
6744         files are included in the top level camel headers and the gtk
6745         include dir is now versioned and such
6746
6747         * providers/local/Makefile.am: ditto
6748
6749         * providers/pop3/Makefile.am: ditto
6750
6751         * providers/smtp/Makefile.am: ditto
6752
6753         * providers/sendmail/Makefile.am: ditto
6754
6755         * camel-service.c: use five arg version of gethostbyname_r if
6756         appropriate
6757         (camel_get_host_byname): check if msg->herr is non-zero instead of
6758         checking if msg->hp is null since we may not always have msg->hp
6759
6760 2001-04-11  Jeffrey Stedfast  <fejj@ximian.com>
6761
6762         * camel-sasl-digest-md5.c (digest_response): Use
6763         camel_charset_locale_name() to get the locale charset rather than
6764         checking the CHARSET environment variable. This is a much less
6765         ugly hack. Also: If we fail to be able to convert to UTF8, then
6766         disavow all knowledge of the charset parameter.
6767
6768         * camel-charset-map.c (camel_charset_locale_name): New function to
6769         return the locale charset (or NULL if US-ASCII).
6770
6771 2001-04-11  Jeffrey Stedfast  <fejj@ximian.com>
6772
6773         * camel-pgp-context.c (camel_pgp_verify): Use
6774         e_utf8_from_locale_string() rather than trying to do it manually
6775         since Lauris's version works much better.
6776
6777 2001-04-06  Jeffrey Stedfast  <fejj@ximian.com>
6778
6779         * Makefile.am: Added camel-pgp-context.[c,h] to the build. Also
6780         added tests/smime/pgp.c and Makefile.am
6781
6782         * tests/smime/pgp.c: New test suite for PGP functions.
6783
6784         * camel-pgp-context.c: Various fixes to get it to build.
6785
6786 2001-04-07  Peter Williams  <peterw@ximian.com>
6787
6788         * providers/imap/camel-imap-utils.c (imap_parse_string_generic): It
6789         would be a good idea to recognize '\0'. Before, this code was running
6790         off the ends of strings and intermittently coredumping (if it didn't
6791         hit an imap_atom_char first) -- whoops!
6792
6793 2001-04-05  Not Zed  <NotZed@Ximian.com>
6794
6795         * merge from evolution-0-10-branch to evolution-0-10-merge-0
6796
6797 2001-04-03  Jeffrey Stedfast  <fejj@ximian.com>
6798
6799         * Makefile.am: Added tests/ back in
6800
6801         * camel-mime-utils.c (header_decode_text): Ignore whitespace
6802         between encoded words (there were a few cases where it didn't
6803         before).
6804         (header_encode_string): Preserve whitespace between words that are
6805         to be encoded by encoding them too.
6806         (header_encode_phrase): Same here but with phrases.
6807
6808 2001-04-03  Dan Winship  <danw@ximian.com>
6809
6810         * providers/imap/camel-imap-folder.c (imap_sync): If we don't
6811         change any flags or expunge, send a NOOP to give the server a
6812         chance to send EXISTS, etc, messages.
6813         (imap_get_message): If the server_level < IMAP4rev1, always fetch
6814         messages all-at-once, since they don't support the [#.MIME]
6815         syntax.
6816         (imap_update_summary): When reading message flags, set the
6817         server_flags field as well, and don't overwrite any flags set by
6818         camel_folder_summary_info_new_from_message. Might help with some
6819         of the flag problems...
6820
6821 2001-04-02  Dan Winship  <danw@ximian.com>
6822
6823         * camel-service.h: Remove the "quick_login" member, which is
6824         unnecessary.
6825
6826         * providers/smtp/camel-smtp-transport.c (smtp_auth): Remove the
6827         references to quick_login and fix this to use the CamelSasl
6828         interfaces correctly to do the same thing.
6829         (connect_to_server): Split this out of smtp_connect
6830         (smtp_connect): Use connect_to_server. When re-EHLO'ing after
6831         auth, ignore errors.
6832         (query_auth_types): Use connect_to_server rather than
6833         smtp_connect, so it doesn't try to authenticate. Add LOGIN
6834         authtype to the list of authtypes to check for.
6835
6836         * providers/smtp/camel-smtp-provider.c
6837         (camel_provider_module_init): Add LOGIN authtype to the authtypes
6838         list explicitly.
6839
6840         * camel-sasl.c (camel_sasl_authtype_list): Don't list LOGIN here:
6841         it's not a real SASL authtype and is only used for SMTP.
6842         
6843         * camel-sasl-plain.c: 
6844         * camel-sasl-login.c: 
6845         * camel-sasl-kerberos4.c: 
6846         * camel-sasl-cram-md5.c: 
6847         * camel-sasl-anonymous.c: 
6848         * providers/pop3/camel-pop3-provider.c: Remove "quick_login"
6849         argument from authtypes.
6850
6851 2001-04-02  Gediminas Paulauskas <menesis@delfi.lt>
6852
6853         * camel-filter-driver.c: marked missing report status' for translation.
6854
6855 2001-04-02  Jeffrey Stedfast  <fejj@ximian.com>
6856
6857         * camel-pgp-context.c (camel_pgp_sign): mutex lock & unlock the
6858         context.
6859         (camel_pgp_clearsign): Same.
6860         (camel_pgp_verify): Same.
6861         (camel_pgp_encrypt): Same.
6862         (camel_pgp_decrypt): And finally here...
6863
6864         * camel-pgp-context.h: Update the function prototypes to match
6865         those found in camel-pgp-context.c.
6866
6867         * camel-pgp-context.c: Updated.
6868
6869         * camel-pgp-mime.c (camel_pgp_mime_part_sign): Implemented.
6870         (camel_pgp_mime_part_verify): Implemented.
6871         (camel_pgp_mime_part_encrypt): Implemented.
6872         (camel_pgp_mime_part_decrypt): Implemented.
6873
6874 2001-04-01  Jeffrey Stedfast  <fejj@ximian.com>
6875
6876         * camel-sasl-login.[c,h]: New files to handle the LOGIN SASL
6877         mechanism.
6878         
6879         * camel-sasl-plain.c: Removed the definition of
6880         camel_sasl_login_authtype.
6881
6882         * camel-sasl.c (camel_sasl_new): Oops. I thought LOGIN was an
6883         alias to PLAIN. I was wrong. These two SASL objects have to be
6884         separate.
6885
6886         * providers/smtp/camel-smtp-transport.c (smtp_auth): Updated to
6887         check for and use authmech->quick_login when available.
6888
6889 2001-04-01  Jeffrey Stedfast  <fejj@ximian.com>
6890
6891         * providers/pop3/camel-pop3-provider.c: Updated the authtypes here
6892         too.
6893
6894         * camel-sasl-plain.c: 
6895         * camel-sasl-anonymous.c: 
6896         * camel-sasl-digest-md5.c: 
6897         * camel-sasl-cram-md5.c: 
6898         * camel-sasl-kerberos4.c: Updated the authtype values.
6899
6900         * camel-service.h: Added another field to CamelServiceAuthType
6901         that specifies whether or not the mechanism supports "quick auth"
6902         which means that the client can send the initial challenge in the
6903         AUTH request.
6904
6905         * camel-sasl.c (camel_sasl_new): Add support for LOGIN.
6906         (camel_sasl_authtype_list): Here too.
6907         (camel_sasl_authtype): And finally here.
6908
6909         * camel-sasl-plain.c: Define camel_sasl_login_authtype.
6910
6911         * providers/smtp/camel-smtp-transport.c (smtp_auth): Only unref
6912         the SASL object if it exists.
6913
6914 2001-03-30  Dan Winship  <danw@ximian.com>
6915
6916         * providers/pop3/camel-pop3-store.c (connect_to_server,
6917         query_auth_types, pop3_connect): Move things around here to make
6918         this all work right again (so you don't get prompted for a
6919         password when checking the supported authtypes.)
6920
6921 2001-03-30  Jon Trowbridge  <trow@ximian.com>
6922
6923         * camel-mime-message.c (camel_mime_message_set_source): Shrould
6924         our source URL before putting it into X-Evolution-Source.
6925
6926 2001-03-29  Jeffrey Stedfast  <fejj@ximian.com>
6927
6928         * providers/imap/camel-imap-store.c (get_folder_info): Don't
6929         blindly append "/INBOX", construct a CamelURL and set the path
6930         that way.
6931         (parse_list_response_as_folder_info): Don't blindly append
6932         "/<foldername>", construct a CamelURL and set the path that way
6933         instead.
6934         (get_folders_offline): And again here.
6935
6936 2001-03-30  Not Zed  <NotZed@Ximian.com>
6937
6938         * camel-service.c (camel_get_host_byname): Dont overwrite an
6939         exception if we got one already.  Added camel_operation status to
6940         it, and comment out some debug.
6941
6942 2001-03-29  Not Zed  <NotZed@Ximian.com>
6943
6944         * providers/smtp/camel-smtp-transport.c (smtp_connect): Free host
6945         name info when done ... blah blah.
6946
6947         * camel-sasl-kerberos4.c (krb4_challenge): Free host name info
6948         after we're done with it.
6949
6950         * camel-sasl-digest-md5.c (digest_md5_challenge): Free host name
6951         info after we're done with it.
6952
6953         * camel-remote-store.c (remote_connect): Free the host name info
6954         from get_host after we're finished with it.
6955
6956         * camel-service.c (camel_get_host_byname): New function to
6957         lookup a name, and still be cancellable.
6958         (camel_free_host): And a function to free the structure
6959         returned.
6960         (camel_service_gethost): Call get_host_byname for this.
6961
6962 2001-03-29  Jon Trowbridge  <trow@ximian.com>
6963
6964         * camel-filter-driver.c (camel_filter_driver_filter_message): Save
6965         the source URL using camel_mime_message_set_source.
6966
6967         * camel-mime-message.c (camel_mime_message_set_source): Renamed
6968         camel_mime_message_set_identity to this.  Sets the X-Evolution-Source
6969         header.
6970         (camel_mime_message_get_source): Returns the X-Evolution-Source
6971         header.
6972
6973 2001-03-29  Kjartan Maraas  <kmaraas@gnome.org>
6974
6975         * broken-date-parser.c: #include <stdio.h>, <stdlib.h> and <string.h>
6976         * broken-date-parser.h: Remove all includes but <glib.h>
6977         * camel-address.h: Added #include <glib.h>
6978         * camel-data-wrapper.c: Move system includes to the top.
6979         * camel-data-wrapper.h: #include <glib.h>
6980         * camel-exception.c: #ifdef HAVE_CONFIG_H
6981         * camel-exception.h: Remove #include <glib.h>
6982         * camel-filter-driver.c: #ifdef HAVE_CONFIG_H and move system
6983         headers to top. Mark strings in camel_exception_set*() for i18n.
6984         * camel-filter-driver.h: #include <glib.h>
6985         * camel-filter-search.c: #ifdef HAVE_CONFIG_H
6986         * camel-folder-search.c: #include <config.h>
6987         * camel-folder-search.h: Header shuffling
6988         * camel-folder-summary.h: Same here
6989         * camel-folder-thread.c: #ifdef HAVE_CONFIG_H
6990         * camel-folder.c: Here too.
6991         * camel-folder.h: #include <glib.h>
6992         * camel-internet-address.c: Move system headers up
6993         * camel-lock.c: #ifdef HAVE_CONFIG_H
6994         * camel-medium.c: Same here
6995         * camel-mime-filter-bestenc.c: Move system headers up
6996         * camel-mime-filter-from.c: Same here
6997         * camel-mime-filter-linewrap.c: And here
6998         * camel-mime-filter.c: #include <string.h> to fix warnings from new gcc
6999         * camel-mime-filter.h: System headers moved up
7000         * camel-mime-message.c: Here too. #ifdef HAVE_CONFIG_H added
7001         * camel-mime-part-utils.c: #ifdef HAVE_CONFIG_H added
7002         * camel-mime-part.c: Here too, and shuffle headers
7003         * camel-mime-utils.c: #ifdef HAVE_CONFIG_H. Remove const from two
7004         variables to remove warning.
7005         * camel-mime-utils.h: Shuffle headers
7006         * camel-movemail.c: #ifdef HAVE_CONFIG_H. Mark string in camel_exception_set
7007         * camel-multipart.c: #ifdef HAVE_CONFIG_H. Added includes to remove
7008         warnings from new gcc
7009         * camel-object.c: #ifdef HAVE_CONFIG_H
7010         * camel-object.h: Shuffle headers
7011         * camel-operation.c: #ifdef HAVE_CONFIG_H
7012         * camel-provider.c: #ifdef HAVE_CONFIG_H. Shuffle headers. Mark a string
7013         * camel-remote-store.c: #ifdef HAVE_CONFIG_H
7014         * camel-sasl-anonymous.c: #ifdef HAVE_CONFIG_H. #include <string.h>
7015         * camel-sasl-cram-md5.c: #ifdef HAVE_CONFIG_H. #include <string.h> and
7016         <stdio.h> to remove warnings.
7017         * camel-sasl-digest-md5.c: #ifdef HAVE_CONFIG_H. shuffle headers
7018         * camel-sasl-digest-md5.h: Shuffle headers.
7019         * camel-sasl-kerberos4.c: #ifdef HAVE_CONFIG_H. Shuffle headers.
7020         * camel-sasl-kerberos4.h: Shuffle headers.
7021         * camel-sasl-plain.c: #ifdef HAVE_CONFIG_H. Shuffle
7022         * camel-sasl.c: #ifdef HAVE_CONFIG_H. #include <string.h>
7023         * camel-search-private.c: #include <config.h>
7024         * camel-seekable-stream.c: #ifdef HAVE_CONFIG_H
7025         * camel-seekable-stream.h: Shuffle
7026         * camel-seekable-substream.c: #ifdef HAVE_CONFIG_H
7027         * camel-service.c: Same
7028         * camel-service.h: Shuffle
7029         * camel-session.c: #ifdef HAVE_CONFIG_H
7030         * camel-store.c: Same
7031         * camel-stream-buffer.c: Here too
7032         * camel-stream-buffer.h: Shuffle
7033         * camel-stream-filter.c: #include <string.h>
7034         * camel-stream-fs.c: #ifdef HAVE_CONFIG_H
7035         * camel-stream-fs.h: Shuffle headers
7036         * camel-stream-mem.c: Same as above
7037         * camel-stream-mem.h: Here too
7038         * camel-stream-null.c: #ifdef HAVE_CONFIG_H
7039         * camel-stream.c: Here too
7040         * camel-stream.h: Shuffle
7041         * camel-tcp-stream-openssl.c: #ifdef HAVE_CONFIG_H
7042         * camel-tcp-stream-raw.c: Same here. and move local includes down
7043         * camel-tcp-stream-ssl.c: Same as above
7044         * camel-tcp-stream.c: #ifdef HAVE_CONFIG_H
7045         * camel-tcp-stream.h: move local include down
7046         * camel-transport.c: #ifdef HAVE_CONFIG_H
7047         * camel-transport.h: #include <glib.h>
7048         * camel-uid-cache.c: #ifdef HAVE_CONFIG_H. Shuffle headers
7049         * camel-uid-cache.h: Shuffle
7050         * camel-url.c: #ifdef HAVE_CONFIG_H
7051         * camel-vee-folder.c: #ifdef HAVE_CONFIG_H. Shuffle headers
7052         * camel-vee-folder.h: #include <glib.h>
7053         * camel-vee-store.h: Same here
7054         * camel.c: #ifdef HAVE_CONFIG_H
7055         * gstring-util.c: Here too
7056         * hash-table-utils.c: Remove #include <glib.h>
7057         * hash-table-utils.h: #include it here instead.
7058         * string-utils.c: #ifdef HAVE_CONFIG_H
7059         * providers/cache/camel-cache-map.c: #ifdef HAVE_CONFIG_H, shuffle
7060         headers and mark strings in camel_exception_set*()
7061         * providers/cache/camel-cache-provider.c: #ifdef HAVE_CONFIG_H
7062         * providers/cache/camel-cache-store.c: Same here, and mark a string.
7063         * providers/imap/camel-imap-command.c: #ifdef HAVE_CONFIG_H
7064         * providers/imap/camel-imap-command.h: Shuffle header
7065         * providers/imap/camel-imap-folder.c: #ifdef HAVE_CONFIG_H
7066         * providers/imap/camel-imap-message-cache.c: #ifdef HAVE_CONFIG_H
7067         * providers/imap/camel-imap-provider.c: #ifdef HAVE_CONFIG_H and
7068         #include <string.h>
7069         * providers/imap/camel-imap-search.c: #ifdef HAVE_CONFIG_H
7070         * providers/imap/camel-imap-store.c: #ifdef HAVE_CONFIG_H and mark
7071         a string.
7072         * providers/imap/camel-imap-summary.c: Shuffle headers
7073         * providers/imap/camel-imap-wrapper.c: #ifdef HAVE_CONFIG_H. Shuffle
7074         * providers/local/camel-local-folder.c: #ifdef HAVE_CONFIG_H
7075         * providers/local/camel-local-provider.c: #ifdef HAVE_CONFIG_H
7076         * providers/local/camel-local-store.c: Same here
7077         * providers/local/camel-local-summary.c: Here too, shuffle, mark a string
7078         * providers/local/camel-maildir-folder.c: #ifdef HAVE_CONFIG_H
7079         * providers/local/camel-maildir-store.c: Same
7080         * providers/local/camel-maildir-summary.c: Here too
7081         * providers/local/camel-mbox-summary.c: And here
7082         * providers/local/camel-mbox-store.c: And here
7083         * providers/local/camel-mbox-summary.c: #include <config.h>
7084         * providers/local/camel-mh-folder.c: #ifdef HAVE_CONFIG_H
7085         * providers/local/camel-mh-store.c: same
7086         * providers/local/camel-mh-summary.c: #ifdef HAVE_CONFIG_H, shuffle headers
7087         and mark a string for translation.
7088         * providers/nntp/camel-nntp-auth.c: #include <config.h>
7089         * providers/nntp/camel-nntp-store.c: Remove superfluous arg to 
7090         CAMEL_SERVICE_CLASS to make it compile
7091         * providers/pop3/camel-pop3-provider.c: #ifdef HAVE_CONFIG_H
7092         * providers/pop3/camel-pop3-store.c: Same here
7093         * providers/sendmail/camel-sendmail-provider.c: Here too
7094         * providers/sendmail/camel-sendmail-transport.c: Here too
7095         * providers/smtp/camel-smtp-provider.c: Same
7096         * providers/smtp/camel-smtp-transport.c: #ifdef HAVE_CONFIG_H, mark
7097         strings for translations.
7098         
7099 2001-03-29  Dan Winship  <danw@ximian.com>
7100
7101         * camel-url.c (camel_url_to_string): change "gboolean show_passwd"
7102         to "guint32 flags".
7103
7104         * tests/misc/url.c (main): Update calls to camel_url_to_string
7105
7106         * providers/imap/camel-imap-store.c (construct): Call
7107         camel_url_to_string with flags to hide password, authtype, and
7108         params to create the base_url.
7109         (etc): Update for the fact that the base_url no longer has the "/"
7110         at the end.
7111
7112         * camel-service.c (construct): Update calls to camel_url_to_string
7113         (pass CAMEL_URL_HIDE_PASSWORD)
7114
7115 2001-04-03  Jeffrey Stedfast  <fejj@ximian.com>
7116
7117         * camel-mime-utils.c (header_decode_text): Ignore whitespace
7118         between encoded words (there were a few cases where it didn't
7119         before).
7120         (header_encode_string): Preserve whitespace between words that are
7121         to be encoded by encoding them too.
7122         (header_encode_phrase): Same here but with phrases.
7123
7124 2001-04-04  Kjartan Maraas  <kmaraas@gnome.org>
7125
7126         * camel-filter-driver.c: Added #include <config.h>. Marked
7127         a bunch of strings for translation.
7128         * camel-folder-search.c: Added #include <config.h>.
7129         * camel-folder-summary.c: Same here.
7130         * camel-movemail.c: Marked strings for translation.
7131         * camel-provider.c: Same here.
7132         * camel-search-private.c: #include <config.h>
7133         * camel-vee-folder.c: Mark string for translation.
7134         * providers/local/camel-mbox-summary.c: #include <config.h>
7135         
7136 2001-04-03  Dan Winship  <danw@ximian.com>
7137
7138         * providers/imap/camel-imap-folder.c (imap_sync): If we don't
7139         change any flags or expunge, send a NOOP to give the server a
7140         chance to send EXISTS, etc, messages.
7141         (imap_get_message): If the server_level < IMAP4rev1, always fetch
7142         messages all-at-once, since they don't support the [#.MIME]
7143         syntax.
7144
7145 2001-04-01  Jeffrey Stedfast  <fejj@ximian.com>
7146
7147         * providers/imap/camel-imap-store.c (get_folder_info): Don't
7148         blindly append "/INBOX", construct a CamelURL and set the path
7149         that way.
7150         (parse_list_response_as_folder_info): Don't blindly append
7151         "/<foldername>", construct a CamelURL and set the path that way
7152         instead.
7153         (get_folders_offline): And again here.
7154
7155 2001-03-31  Not Zed  <NotZed@Ximian.com>
7156
7157         * camel-operation.c (struct _status_stack): change stamp to
7158         unsigned to avoid overflow.
7159         (camel_operation_end):
7160         (camel_operation_progress_count):
7161         (camel_operation_progress): Double the delay before transient
7162         events start showing their own progress.
7163
7164 2001-03-30  Not Zed  <NotZed@Ximian.com>
7165
7166         * providers/pop3/camel-pop3-folder.c (pop3_get_message): Change
7167         the pop download into a transient event.
7168
7169         * camel-operation.c (stamp): Get a timestamp that changes 4x a
7170         second (or rather, arbitrarily more often than 1/second).
7171         (camel_operation_progress): Use stamp() for time updates.
7172         (camel_operation_progress_count): "
7173         (camel_operation_start): Store the status as a struct status_stack
7174         item.
7175         (camel_operation_start_transient): New function to start a
7176         transient event, which is only reported if it runs for too
7177         long/and is reset afterwards.
7178         (camel_operation_progress):
7179         (camel_operation_progress_count): Fix for status_stack changes,
7180         and account for transient updates. 
7181
7182         * camel-filter-driver.c (camel_filter_driver_filter_folder): When
7183         we remove things (set deleted), always set seen too, to mirror
7184         interface behaviour when you delete.
7185         (camel_filter_driver_filter_message): And same here too.
7186
7187 2001-03-30  Dan Winship  <danw@ximian.com>
7188
7189         * providers/pop3/camel-pop3-store.c (connect_to_server,
7190         query_auth_types, pop3_connect): Move things around here to make
7191         this all work right again (so you don't get prompted for a
7192         password when checking the supported authtypes.)
7193
7194 2001-03-29  Dan Winship  <danw@ximian.com>
7195
7196         * camel-url.c (camel_url_to_string): change "gboolean show_passwd"
7197         to "guint32 flags".
7198
7199         * tests/misc/url.c (main): Update calls to camel_url_to_string
7200
7201         * providers/imap/camel-imap-store.c (construct): Call
7202         camel_url_to_string with flags to hide password, authtype, and
7203         params to create the base_url.
7204         (etc): Update for the fact that the base_url no longer has the "/"
7205         at the end.
7206
7207         * camel-service.c (construct): Update calls to camel_url_to_string
7208         (pass CAMEL_URL_HIDE_PASSWORD)
7209
7210 2001-03-28  Jeffrey Stedfast  <fejj@ximian.com>
7211
7212         * camel-pgp-context.[c,h]: New class for PGP encrypting,
7213         decrypting, signing and verifying. Next I'll be moving the
7214         contents of mail/mail-crypto into Camel. These files will
7215         basically replace mail/openpgp-utils.[c,h].
7216
7217 2001-03-29  Not Zed  <NotZed@Ximian.com>
7218
7219         * camel-folder-search.c (search_body_contains): Optimise the match
7220         "" case, just match everything in the folder (if we have it).
7221
7222         * camel-vtrash-folder.c (vtrash_move_messages_to): Access the
7223         folder directly from the message info.
7224         (vtrash_move_messages_to): I think we also need to call the real
7225         move_messages_to, and not try and bypass the lock, since we dont
7226         have the lock for that folder.
7227
7228         * camel-vee-folder.h: Move CamelVeeMessageInfo to public, so
7229         subclasses can get to it.
7230
7231         * camel-vee-folder.c (camel_vee_folder_add_folder): Dont let you
7232         add a vfolder to itself.
7233         (folder_changed): 
7234         (vee_folder_remove_folder): 
7235         (vee_folder_build_folder): Copy changes before triggering changed
7236         events, so we can do them outside of locks.
7237         (camel_vee_folder_get_message_folder): Removed function.
7238         (camel_vee_folder_hash_folder): Made public (renamed from
7239         hash_folder), simply for subclasses (probably not needed).
7240         (vee_expunge): Oops, call the class sync, not superclass sync.
7241         (vee_sync): Remove some accidental debug.
7242
7243 2001-03-27  Jeffrey Stedfast  <fejj@ximian.com>
7244
7245         * camel-service.c (get_path): Add the port (if user defined) to
7246         the path to fix bug #1996.
7247
7248         Danw: I'm iffy on the "fix" so I'd like you to comment.
7249
7250 2001-03-27  Jeffrey Stedfast  <fejj@ximian.com>
7251
7252         * providers/pop3/camel-pop3-folder.c (pop3_sync): If we aren't
7253         going to even check the resp/free buffer that gets returned from
7254         camel_pop3_command, don't even bother using it. Send in NULL
7255         instead.
7256         (pop3_get_message): Check to make sure that the `result' string is
7257         non-NULL. It's possible that some POP servers may return with
7258         "+OK\r\n<message>..." rather than the expected 
7259         "+OK ### octets\r\n<message>..."
7260
7261 2001-03-27  Not Zed  <NotZed@Ximian.com>
7262
7263         * camel-folder-summary.c (camel_folder_summary_finalize): Unref
7264         the html filter when done.
7265         (summary_build_content_info): Disable using the html parser to
7266         help index html mails until it gets sorted out.
7267
7268         * camel-vee-folder.c (folder_changed): Fix a cut n paste bug, we
7269         want uid_removed not uid_changed deref, fixes bug #1999.
7270
7271 2001-03-27  Dan Winship  <danw@ximian.com>
7272
7273         * camel-sasl.c (camel_sasl_authtype_list): add an argument to say
7274         whether or not you want "PLAIN" in the list (so you don't end up
7275         with "Password" twice in the config dialog).
7276
7277         * providers/imap/camel-imap-provider.c (camel_provider_module_init): 
7278         * providers/imap/camel-imap-store.c (query_auth_types): We don't
7279         want PLAIN.
7280
7281         * providers/smtp/camel-smtp-provider.c (camel_provider_module_init): 
7282         * providers/smtp/camel-smtp-transport.c (query_auth_types): But we
7283         do.
7284
7285 2001-03-27  Dan Winship  <danw@ximian.com>
7286
7287         * camel-provider.h: Add an "extra_conf" field to CamelProvider
7288         with structures and defines and stuff, for providers to specify
7289         additional configuration options that they want. Also add a
7290         "supports ssl" flag to the provider flags.
7291
7292         * camel-url.c (camel_url_new_with_base): Fix parsing of params.
7293         (output_param): And unparsing...
7294
7295         * camel-remote-store.c: add a "default_ssl_port" field.
7296         (remote_construct): If the URL has the "use_ssl" parameter, set
7297         the store's use_ssl flag.
7298         (remote_connect): If using SSL and no port specified, use the
7299         default_ssl_port rather than the default_port.
7300
7301         * providers/smtp/camel-smtp-provider.c (smtp_provider): add
7302         CAMEL_PROVIDER_SUPPORTS_SSL and CAMEL_URL_ALLOW_USER. (The config
7303         gui code knows that the ALLOW_USER and ALLOW_AUTH go together.)
7304         (ssmtp_provider): gone
7305
7306         * providers/smtp/camel-smtp-transport.c (smtp_construct): Set a
7307         flag if "use_ssl" param is set.
7308         (smtp_connect): Check the CamelSmtpTransport use_ssl flag rather
7309         than checking if this is smtp or ssmtp.
7310
7311         * providers/imap/camel-imap-provider.c (imap_conf_entries): Add a
7312         bunch of IMAP-specific configuration options, like "check for new
7313         mail in all folders" (default TRUE), "show only subscribed
7314         folders" (default TRUE), "ignore server-supplied namespace", and
7315         "apply filters to INBOX" (not yet implemented).
7316         (imap_provider): We support SSL and we no longer allow a path in
7317         the URL. (namespace is handled via extra_conf)
7318         (simap_provider): Gone
7319
7320         * providers/imap/camel-imap-store.c (camel_imap_store_init): Set
7321         default_ssl_port, don't set CAMEL_STORE_SUBSCRIPTIONS here
7322         (construct): remove simap stuff, deal with "use_lsub",
7323         "namespace", "check_all", and "filter" parameters. Set base_url
7324         to not include params.
7325         (imap_store_setup_online): Don't ask for the namespace if it was
7326         set explicitly. Don't get subscribed folders if !use_lsub.
7327         (imap_concat): Fix a bug.
7328         (get_folder_info): Support for not checking all folders.
7329
7330         * providers/imap/camel-imap-folder.c (imap_get_full_name): Rewrite
7331         to use imap_store->namespace, not service->url->path
7332
7333         * providers/pop3/camel-pop3-provider.c (pop3_conf_entries): "keep
7334         on server" (currently still implemented by the mailer code, not
7335         here), "delete after N days" (not yet implemented).
7336         (pop3_provider): we support SSL
7337         (spop_provider): gone
7338
7339         * providers/pop3/camel-pop3-store.c (camel_pop3_store_init): Set
7340         default_ssl_port
7341         (pop3_connect): Remove spop code
7342
7343 2001-03-26  Jeffrey Stedfast  <fejj@ximian.com>
7344
7345         * camel-vee-folder.c (vee_folder_construct): Move all of the
7346         camel_vee_folder_construct() internals here.
7347         (camel_vee_folder_construct): This function basically becomes a
7348         wrapper for vee_folder_construct and also checks to make sure that
7349         the UNMATCHED vfodler is constructed otherwise constructs it.
7350         (camel_vee_folder_new): Call vee_folder_construct() instead so
7351         that we don't get into a dead-lock.
7352
7353 2001-03-26  Jeffrey Stedfast  <fejj@ximian.com>
7354
7355         * camel-store.c (init_trash): Use camel_vtrash_folder_new() to
7356         create the vtrash folder now.
7357
7358         * camel-vtrash-folder.[c,h]: New subclass of CamelVeeFolder for
7359         our vTrash folders.
7360
7361         * camel-folder.c (camel_folder_copy_messages_to): Don't watch for
7362         vtrash folders anymore.
7363         (camel_folder_move_messages_to): Same.
7364
7365         * camel-vee-folder.c (camel_vee_folder_class_init): Update.
7366         (vee_move_messages_to): Rewrite to use the new move API.
7367
7368         * camel-filter-driver.c (do_copy): Updated to reflect
7369         copy_message_to changes. Create a temporary uid array and use
7370         that.
7371         (do_move): Same.
7372         (camel_filter_driver_filter_message): And again, here...
7373
7374         * providers/imap/camel-imap-folder.c (imap_copy_messages_to):
7375         Update to the new API.
7376         (imap_move_messages_to): Same.
7377         (get_uid_set): New function to create a `set' string based on an
7378         array of UIDs for use with imap_copy_messages_to.
7379
7380         * camel-folder.c (camel_folder_copy_messages_to): Replaces
7381         camel_folder_copy_message_to
7382         (camel_folder_move_message_to): Replaces
7383         camel_folder_move_message_to.
7384
7385 2001-03-27  Not Zed  <NotZed@Ximian.com>
7386
7387         * camel-vee-store.c (vee_get_folder): Added folder_created event
7388         here.
7389         
7390         * camel-vee-folder.c (unmatched_finalise): Removed, moved into
7391         main finalise code.
7392         (message_changed): Just create a new change entry and promote it
7393         to a folder_changed thing.
7394         (vee_sync): Always rebuild folder on sync, even when not expunge.
7395         (folder_changed): If not autoupdating, make sure we remove any
7396         removed entries.
7397         (vee_folder_build_folder):
7398         (vee_folder_remove_folder): NOP if we're called on
7399         folder_unmatched.
7400         (vee_search_by_expression): Only search each folder once.  Should
7401         we also order the result in summary order?
7402
7403 2001-03-20  Not Zed  <NotZed@Ximian.com>
7404
7405         * camel-store.c (init_trash): Fix calling for vee_folder_new().
7406
7407         * camel-folder-summary.c (camel_folder_summary_remove_index):
7408         Optimise slightly, use ptr_array_remove_index rather than have to
7409         search for the index by using summary_remove.
7410
7411         * camel-vee-folder.h: Removed local member from VeeFolder, since
7412         it was never used.
7413
7414         * camel-vee-store.c (camel_vee_store_finalise): Setup finalise
7415         function.
7416
7417         * camel-vee-folder.c (camel_vee_folder_set_expression): New
7418         function to set the query of an existing vfolder.
7419         (camel_vee_folder_construct): New function for
7420         convenience/subclasses.
7421         (camel_vee_folder_new): Removed exception parameter, no longer
7422         needed (since we dont search yet).
7423         (camel_vee_folder_new): Changed to use folder_construct, and no
7424         longer raise the folder created signal.
7425         (vee_folder_build_folder): Make it return error on exception, so
7426         we can work without exceptions.
7427         (vee_folder_remove_folder): Use remove index rather than
7428         remove_uid, this is ok since we have the summary locked for our
7429         own access.
7430         (camel_vee_folder_add_folder): Only add the folder to the
7431         unmatched private if it is not a private folder.
7432         (camel_vee_folder_remove_folder): Only remove the folder from
7433         unmatched if it is not private.
7434         (vee_expunge): Just call sync with expunge set.
7435         (vee_sync): If expunging, also refresh the search.
7436         (vee_folder_build_folder): We do our own locking now, removed from
7437         callers, also trigger changed events here too (within locks),
7438         fixed callers appropriately.
7439         (vee_folder_remove_folder): Do our own locking, and trigger
7440         changed events.
7441         (vee_folder_add_info): Renamed of vee_folder_add, we now take a
7442         hash of the folder name, rather than use the folders address.
7443         (hash_folder): Convert a folder name into an 8 character hash.
7444         (vee_get_message, vee_search_by_expression, vee_set_message_flags,
7445         vee_set_message_user_flag, vee_move_message_to): Changed the uid
7446         to be an 8 byte hash + original uid, with no ':' anymore.
7447
7448 2001-03-26  Jeffrey Stedfast  <fejj@ximian.com>
7449
7450         * camel-mime-utils.c (header_decode_text): When writing the last
7451         token (if not rfc2047 encoded), don't use g_string_append_len, use
7452         append_latin1.
7453
7454         * camel-mime-message.c (write_to_stream): Don't spew a warning if
7455         the message-id wasn't set by the application, not a big deal since
7456         we create one right here.
7457
7458 2001-03-26  Dan Winship  <danw@ximian.com>
7459
7460         * providers/imap/camel-imap-command.c (camel_imap_command): keep a
7461         reference on the store's current_folder.
7462
7463         * providers/imap/camel-imap-store.c (camel_imap_store_finalize): 
7464         (imap_disconnect): unref the current_folder before clearing it.
7465
7466         * camel-url.c (camel_url_get_param): Add missing accessor.
7467
7468         * camel-session.c (camel_session_get_provider): New. Return
7469         the provider for a URL.
7470
7471 2001-03-25  Dan Winship  <danw@ximian.com>
7472
7473         * camel-url.c (camel_url_new_with_base): New URL parser with full
7474         RFC1808 relative URL support. Yum.
7475         (camel_url_new): Wrapper around camel_url_new_with_base now.
7476
7477         * tests/Makefile.am: add misc subdir
7478
7479         * tests/misc/url.c: relative URL test cases from RFC 1808
7480
7481 2001-03-25  Jeffrey Stedfast  <fejj@ximian.com>
7482
7483         * camel-filter-driver.c (do_copy): Don't use copy_to if the source
7484         folder doesn't support summary info's.
7485         (do_move): Same.
7486         (camel_filter_driver_filter_message): And again here.  I think
7487         this will fix the problem of "colour" tags not staying with the
7488         message when it's copied to a folder during the filter process.
7489
7490 2001-03-24  Jeffrey Stedfast  <fejj@ximian.com>
7491
7492         * camel-sasl-digest-md5.c (digest_response): Do charset conversion
7493         on the username param here if needed.
7494         (parse_server_challenge): Protect against possibly empty-string
7495         charset values.
7496
7497 2001-03-23  Jon Trowbridge  <trow@ximian.com>
7498
7499         * camel-filter-driver.c (camel_filter_driver_filter_message):
7500         Don't call camel_mime_message_set_identity.  (The call is
7501         commented out, left over from some earlier experimentation that I
7502         want to be able to remember later...)
7503
7504         * camel-mime-message.c (camel_mime_message_set_identity): Added.
7505         A function to set the X-Evolution-Identity header.
7506         
7507 2001-03-22  Dan Winship  <danw@ximian.com>
7508
7509         * providers/imap/camel-imap-command.c (imap_read_response): Don't
7510         look at untagged responses other than "* BYE"...
7511         (camel_imap_response_free): ...do it here instead...
7512         (camel_imap_response_free_without_processing): ...but not here.
7513
7514         * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
7515         Remove the "EXISTS" line from the response so
7516         camel_imap_response_free won't try to process it.
7517         (camel_imap_folder_selected): If we get an EXISTS response mixed
7518         in with the FETCH responses, record the new EXISTS value.
7519         Use camel_imap_response_free_without_processing so that an EXISTS
7520         response won't cause a loop.
7521         (imap_rescan): Use camel_imap_response_free_without_processing.
7522         (imap_update_summary): Use
7523         camel_imap_response_free_without_processing. If an EXISTS response
7524         shows up, call imap_update_summary again to get the new messages.
7525         (imap_protocol_get_summary_specifier): Use BODY.PEEK[0], not
7526         RFC822.HEADER for prev IMAP4rev1, since the FETCH parser won't
7527         deal with RFC822.HEADER responses.
7528
7529         * providers/imap/camel-imap-store.c (get_folder_info): Fix an
7530         uninitialized variable
7531
7532 2001-03-21  Dan Winship  <danw@ximian.com>
7533
7534         * camel-provider.h: (CamelProvider) add a "GList *authtypes", so
7535         you can get the list of authtypes used by a provider without
7536         needing to have an actual CamelService object handy. (Will be
7537         needed by the new config druid.)
7538         (CAMEL_PROVIDER_ALLOWS, CAMEL_PROVIDER_NEEDS): New macros to test
7539         the URL part stuff, since the way it works is too complicated and
7540         everyone always does it wrong.
7541
7542         * camel-service.c (camel_service_query_auth_types): Remove the
7543         @connected arg again: if you don't want to connect, you can just
7544         get the list of authtypes off the provider.
7545         (camel_service_free_auth_types): Remove this. All existing
7546         implementations do authtypes the same way, so just say the caller
7547         should "g_list_free" the list. (Oh, look, removing this function
7548         doesn't actually cause the mailer to not build. How 'bout that.)
7549         (construct, get_path): Use the new URL part macros.
7550
7551         * camel-remote-store.c (remote_query_auth_types): Update
7552         (remote_free_auth_types): Nuke
7553         (camel_remote_store_authtype_list): New function for use by
7554         subclasses.
7555
7556         * providers/imap/camel-imap-provider.c:
7557         * providers/pop3/camel-pop3-provider.c:
7558         * providers/smtp/camel-smtp-provider.c: Update CamelProvider
7559         structures.
7560         (camel_provider_module_init): Put all the SSL parts together so
7561         there's only 1 #ifdef. Set up the provider authtypes field using
7562         the SASL, CamelRemoteStore, and standard authtypes, as
7563         appropriate. Copy that from the normal provider to the SSL
7564         provider.
7565
7566         * providers/local/camel-local-provider.c:
7567         * providers/sendmail/camel-sendmail-provider.c:
7568         * camel-session.c: Update CamelProvider structures.
7569
7570         * providers/imap/camel-imap-store.c (query_auth_types):
7571         * providers/pop3/camel-pop3-store.c (query_auth_types): Update
7572
7573         * providers/smtp/camel-smtp-store.c (query_auth_types): Update.
7574         Remove the no_authtype, because that's what "ALLOW_AUTH" rather
7575         than "NEED_AUTH" means.
7576         (free_auth_types): Nuke.
7577
7578 2001-03-21  Jeffrey Stedfast  <fejj@ximian.com>
7579
7580         * camel-filter-driver.c (camel_filter_driver_filter_message):
7581         Return -1 on fail.
7582         (camel_filter_driver_filter_folder): Same.
7583         (camel_filter_driver_filter_mbox): Same.
7584         (camel_filter_driver_filter_folder): Return -1 if an exception was
7585         set as well.
7586
7587 2001-03-19  Jeffrey Stedfast  <fejj@ximian.com>
7588
7589         * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_finalize):
7590         Free the expected host.
7591         (camel_tcp_stream_openssl_new): Now takes a Service and an
7592         expected_host. Set them.
7593
7594 2001-03-20  Dan Winship  <danw@ximian.com>
7595
7596         * providers/imap/camel-imap-store.c
7597         (camel_imap_store_check_online): Function to check if the store is
7598         online and set an exception if not. Currently controlled by an
7599         environment variable, but eventually there will be both a global
7600         (session-level) setting and a per-store setting.
7601         (construct): Set up storage_path and base_url here rather than at
7602         connect-time.
7603         (imap_auth_loop): Split out from imap_connect.
7604         (imap_setup_online): Split out from imap_connect. Do the
7605         post-authentication connection setup, and cache the results to
7606         disk.
7607         (imap_setup_offline): Set up a CamelImapStore with information
7608         saved from a previous imap_setup_online.
7609         (imap_connect): If online, do connect_to_server(),
7610         imap_auth_loop(), and imap_setup_online(). Otherwise, do
7611         imap_setup_offline().
7612         (get_folder, get_folder_info): Add offline support.
7613         (create_folder, subscribe_folder, unsubscribe_folder): Disable
7614         these when offline (for now).
7615
7616         * providers/imap/camel-imap-folder.c (camel_imap_folder_new):
7617         Remove the sync'ing-with-server stuff... it's done by
7618         camel_imap_folder_selected now, which only gets called if the
7619         store is online.
7620         (camel_imap_folder_selected): add the code removed from
7621         camel_imap_folder_new. Besides simplifying the folder_new and
7622         summary_new code, this also means now that we'll DTRT if a
7623         folder's UIDVALIDITY changes while we're connected. Also, when
7624         that happens, clear the message cache explicitly.
7625         (imap_refresh_info, imap_sync): These are no-ops when offline.
7626         (imap_expunge, imap_append_message, imap_copy_message_to,
7627         imap_search_by_expression): These don't yet work offline.
7628         (imap_get_message, camel_imap_folder_fetch_data): Return an error
7629         when trying to fetch a non-cached body part when we're offline.
7630
7631         * providers/imap/camel-imap-summary.c (camel_imap_summary_new):
7632         Rewrite to not check the validity here. (We'll do it from
7633         camel_imap_folder_selected instead.)
7634
7635         * providers/imap/camel-imap-command.c (camel_imap_command): Call
7636         camel_imap_folder_selected even when the selection is all we're
7637         doing, to match the changes in camel-imap-folder.c.
7638
7639         * providers/imap/camel-imap-message-cache.c
7640         (camel_imap_message_cache_clear): New function to clear out a
7641         message cache.
7642
7643 2001-03-19  Christopher James Lahey  <clahey@ximian.com>
7644
7645         * Makefile.am (INCLUDES): Added $(EXTRA_GNOME_CFLAGS)
7646
7647 2001-03-19  Jeffrey Stedfast  <fejj@ximian.com>
7648
7649         * providers/pop3/camel-pop3-store.c (pop3_connect): Set the errbuf
7650         to NULL after freeing it? I don't think this should fix bug #1801
7651         but I guess it can't hurt.
7652
7653 2001-03-18  Jeffrey Stedfast  <fejj@ximian.com>
7654
7655         * camel-remote-store.c (remote_recv_line): Protect against a
7656         possibly NULL exception.
7657
7658         * camel-filter-driver.c (camel_filter_driver_filter_message):
7659         Document and modify to return a boolean value denoting whether or
7660         not errors occured during processing.
7661         (camel_filter_driver_filter_mbox): Same as above and also modified
7662         to check return codes of filter_message rather than relying only
7663         on whether or not the exception was set (as it's possible to pass
7664         in NULL for the exception).
7665         (camel_filter_driver_filter_folder): Same as above.
7666
7667         * camel-mime-utils.c (header_param_list_format_append): Quote the
7668         param value if it contains whitespace as well.
7669
7670 2001-03-17  Jeffrey Stedfast <fejj@ximian.com>
7671
7672         * Makefile.am: Don't include system include dir.
7673
7674         * camel.c: Use quotes around the nss.h include so it doesn't try
7675         to use the systen nss.h file.
7676
7677         * camel-tcp-stream-ssl.c: Same here.
7678
7679 2001-03-17  Not Zed  <NotZed@Ximian.com>
7680
7681         * providers/local/camel-maildir-summary.c (maildir_summary_sync): 
7682         Modified patch from Dan Berger <dberger@ix.netcom.com> to re-check
7683         the maildir directory for new/updated messages at sync time.
7684
7685         * camel-folder.c (camel_folder_ref_message_info): Implemented.
7686         (ref_message_info): And default implementation.
7687
7688         * camel-folder.h: Added ref_message_info virtual method.
7689
7690 2001-03-16  Not Zed  <NotZed@Ximian.com>
7691
7692         * camel-folder-thread.c
7693         (camel_folder_thread_messages_new_summary): New function to create
7694         a thread tree from a supplied summary array.
7695         (camel_folder_thread_messages_destroy): Handle thread trees
7696         generated by the above function properly.
7697
7698 2001-03-16  Jeffrey Stedfast  <fejj@ximian.com>
7699
7700         * camel-private.h: Same.
7701
7702         * camel-remote-store.h: Fixed #include to use <>'s instead of ""'s
7703
7704 2001-03-16  Jeffrey Stedfast  <fejj@ximian.com>
7705
7706         * camel-tcp-stream-ssl.c (ssl_bad_cert): Print info about the
7707         issuer of the certificate.
7708
7709         * providers/smtp/camel-smtp-transport.c (smtp_connect): Use
7710         camel_tcp_stream_get_socket().
7711
7712         * camel-tcp-stream-openssl.c (stream_get_socket): Implemented.
7713
7714         * camel-tcp-stream-ssl.c (stream_get_socket): Implemented.
7715
7716         * camel-tcp-stream-raw.c (stream_get_socket): Implemented.
7717
7718         * camel-tcp-stream.c (camel_tcp_stream_get_socket): New function.
7719
7720 2001-03-16  Kjartan Maraas  <kmaraas@gnome.org>
7721
7722         * providers/pop3/camel-pop3-folder.c: Added #include <config.h>
7723         
7724 2001-03-16  Dan Winship  <danw@ximian.com>
7725
7726         * camel-mime-utils.c (header_msgid_generate): Don't use
7727         getdomainname: it's NIS crap, not DNS.
7728
7729 2001-03-15  Jeffrey Stedfast  <fejj@ximian.com>
7730
7731         * camel.c (camel_init): Don't use the hardcoded cert db directory,
7732         use the one passed in.
7733
7734         * camel-tcp-stream-ssl.c (ssl_get_client_auth): Wrote the default
7735         implementation. Not that we'll use this though, since this is the
7736         default implementation provided by NSS anyway. This more or less
7737         serves as a reference in case we want to change anything.
7738         (ssl_auth_cert): Same.
7739         (ssl_bad_cert): Changed the prompt string and free it when we're
7740         done.
7741
7742 2001-03-15  Dan Winship  <danw@ximian.com>
7743
7744         First batch of disconnected IMAP-related stuff. This adds local
7745         caching of message parts, but NOT any actual disconnected support.
7746         (But it should speed up IMAP use.)
7747
7748         * providers/imap/camel-imap-message-cache.c: New class for caching
7749         message data to disk, and removing it when it's no longer
7750         relevant. Will eventually also support merging message parts
7751         together to save on files. Or maybe using a db instead of files?
7752
7753         * providers/imap/camel-imap-private.h: Add a cache_lock to
7754         CamelImapFolderPrivate. This lock must be recursive, so make both
7755         locks EMutexes rather than GMutex.
7756
7757         * providers/imap/camel-imap-folder.c (parse_fetch_response): "The
7758         only FETCH response parser you need!" Replaces the various
7759         almost-correct bits of code formerly scattered throughout this
7760         file with a single fully-correct function that can handle any
7761         FETCH response at any time, so we don't get confused by seeing a
7762         flags update when we were only expecting a message body, etc.
7763         (camel_imap_folder_fetch_data): FETCH a message body part either
7764         from the cache or the server
7765         (camel_imap_folder_changed): Remove expunged messages from the
7766         message cache.
7767         (camel_imap_folder_new): Change to take a directory instead of a
7768         summary file name. Create a CamelImapMessageCache for the folder.
7769         (imap_finalize): Unref the message cache.
7770         (camel_imap_folder_selected, imap_rescan, get_content,
7771         get_message, imap_get_message, imap_update_summary): Redone a
7772         bunch to use parse_fetch_data, CamelImapMessageCache, etc.
7773
7774         * providers/imap/camel-imap-store.c (get_folder): Pass directory
7775         name to camel_imap_folder_new, not summary filename. Use
7776         e_path_to_physical to generate a path with /subfolders/ inserted
7777         between directory components.
7778
7779         * providers/imap/camel-imap-wrapper.c (camel_imap_wrapper_new):
7780         Call camel_imap_folder_fetch_data (with cache_only TRUE) and if
7781         the data is cached, return an online datawrapper rather than an
7782         offline one.
7783         (write_to_stream): Use camel_imap_folder_fetch_data (with
7784         cache_only FALSE) here too
7785
7786         * providers/imap/camel-imap-utils.c (imap_skip_list): Renamed from
7787         skip_list and made non-static.
7788
7789 2001-03-15  Jeffrey Stedfast  <fejj@ximian.com>
7790
7791         * camel-tcp-stream-ssl.h: Uninclude prnetdb.h since it's not
7792         needed here.
7793
7794         * providers/smtp/camel-smtp-transport.c: #include prnetdb.h here
7795         instead of making camel-tcp-stream-ssl.h include it. Prevents some
7796         header bloat.
7797
7798         * providers/smtp/Makefile.am: Include the NSPR_CFLAGS and
7799         NSS_CFLAGS.
7800
7801 2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>
7802
7803         * providers/smtp/camel-smtp-transport.c (smtp_connect): Update for
7804         using CamelTcpStreams and also for using SSL.
7805
7806         * providers/smtp/libcamelsmtp.urls: defined "ssmtp"
7807
7808         * providers/smtp/camel-smtp-provider.c: Defined the Secure SMTP
7809         provider.
7810         (camel_provider_module_init): Register the Secure SMTP provider.
7811
7812 2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>
7813
7814         * providers/imap/camel-imap-store.c (imap_connect): Check for
7815         "simap" instead of "imaps".
7816
7817         * providers/pop3/camel-pop3-store.c (pop3_connect): Change the
7818         port to be 995 for spop.
7819
7820         * providers/pop3/libcamelpop3.urls: Change to "spop".
7821
7822         * providers/imap/libcamelimap.urls: Change "imaps" to "simap" to
7823         correspond to /etc/services.
7824
7825 2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>
7826
7827         * providers/pop3/camel-pop3-store.c (pop3_connect): Check to see
7828         if we are using "pops" and then set the appropriate SSL settings.
7829
7830         * providers/pop3/libcamelpop3.urls: Add "pops"
7831
7832         * providers/pop3/camel-pop3-provider.c: Defined the pops provider.
7833         (camel_provider_module_init): Register the pops provider.
7834
7835 2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>
7836
7837         * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_new): Ya know what?
7838         Lets not ref the service because otherwise we'll start having the
7839         same problems we had back with vtrash. Besides, since the store
7840         owns the stream, it's not like the store is going anywhere without
7841         the stream anyway.
7842         (camel_tcp_stream_ssl_finalize): No need to unref the service.
7843
7844 2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>
7845
7846         * camel-remote-store.c (remote_connect): Pass the service into the
7847         SSL stream, not the session.
7848
7849         * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_init): Set the
7850         service to NULL.
7851         (camel_tcp_stream_ssl_finalize): Unref the service.
7852         (camel_tcp_stream_ssl_new): Takes a CamelService arg now rather
7853         than a CamelSession arg.
7854
7855 2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>
7856
7857         * camel.c (camel_init): So it turns out that NSS_Init *isn't*
7858         idempotent, so we have to protect against initializing it more
7859         than once(contrary to what their design specs suggest).
7860
7861         * camel-session.c (camel_session_get_service): Use
7862         camel_exception_is_set() - Makes no difference but it's more
7863         consistant with how we normally do it.
7864
7865         * camel-provider.h (CAMEL_URL_ALLOW_SSL): We don't need this.
7866
7867         * providers/imap/camel-imap-provider.c: Define the imaps provider.
7868         (camel_provider_module_init): Register the imaps provider.
7869
7870         * camel-provider.c (camel_provider_init): Only add the protocol to
7871         the hash table if it's non empty. Also, g_strdup() the filename
7872         into the hash table.
7873
7874         * providers/imap/camel-imap-store.c (camel_imap_store_init): Eek!
7875         So the service's URL isn't set until after this is
7876         initialized. This means we can't check for SSL here.
7877         (imap_connect): Set the SSL options here instead.
7878
7879 2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>
7880
7881         * camel-tcp-stream-ssl.c: Numerous fixes to get it to build
7882         correctly with NSS enabled.
7883
7884         * camel-remote-store.c (remote_connect): Pass in the session and
7885         expected host args, oops.
7886
7887         * camel-provider.h (CAMEL_URL_ALLOW_SSL): Defined.
7888
7889         * providers/imap/camel-imap-store.c (camel_imap_store_init): Check
7890         to see if we are supposed to use SSL and set the options
7891         accordingly.
7892         (imap_connect): Return FALSE here instead of NULL.
7893
7894         * providers/imap/camel-imap-provider.c: Add CAMEL_URL_ALLOW_SSL.
7895
7896         * providers/imap/libcamelimap.urls: Add "imaps" which is the
7897         protocol for Secure IMAP.
7898
7899 2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>
7900
7901         * camel-tcp-stream-openssl.[c,h]: Added
7902
7903         * Makefile.am: Added camel-tcp-stream-openssl.[c,h] to the build.
7904
7905         * camel-types.h: Added CamelTcpStreamSSL and CamelTcpStreamOpenSSL
7906
7907 2001-03-14  Not Zed  <NotZed@Ximian.com>
7908
7909         * camel-mime-filter-charset.c (filter, complete): re-constify
7910         inbuf, to remove a warning.
7911
7912         * camel-mime-parser.c (folder_scan_step): When we're out of data,
7913         run the filter_complete.  For some reason the logic that was there
7914         was never being run, always try it now, i think it was to work
7915         around a buggy filter, rather than fix it the right way.
7916
7917         * camel-folder-summary.c (summary_build_content_info): If indexing
7918         html parts, use the html filter to convert it to some indexable
7919         format.
7920         (summary_build_content_info): Reset the filters before adding them
7921         back to the stream, if they get re-used in a given instance
7922         (likely).
7923
7924         * Makefile.am (libcamelinclude_HEADERS): Added
7925         camel-mime-filter-html.[ch].
7926         (INCLUDES): Added xml clags
7927
7928 2001-03-05  Not Zed  <NotZed@Ximian.com>
7929
7930         * camel-folder-search.c (camel_folder_search_class_init): Setup a
7931         new function, "uid" which matches uids.
7932         (search_uid): Implement the "match uid" command.
7933
7934 2001-03-13  Jeffrey Stedfast  <fejj@ximian.com>
7935
7936         * camel-mime-utils.c: Check for a new type of mailing list header.
7937
7938 2001-03-13  Jeffrey Stedfast  <fejj@ximian.com>
7939
7940         * camel-tcp-stream-raw.c (stream_read): Made cancellable.
7941         (stream_write): Same.
7942         (stream_connect): Removed checks for DIVINE_INTERVENTION as the
7943         code worked fine.
7944
7945         * camel-tcp-stream-ssl.c (stream_write): get rid of 'w' as it
7946         wasn't really needed.
7947         (set_errno): New function to set errno based on the NSPR error
7948         code.
7949         (stream_read): If an error occured, call set_errno().
7950         (stream_write): Same.
7951
7952 2001-03-13  Jeffrey Stedfast  <fejj@ximian.com>
7953
7954         * Makefile.am: Added camel-tcp-stream-ssl to the build.
7955
7956         * camel-remote-store.h: Add a use_ssl member to the
7957         CamelRemoteStore object.
7958
7959 2001-03-13  Jeffrey Stedfast  <fejj@ximian.com>
7960
7961         * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_get_type):
7962         Oops. Make this a subclass of CamelTcpStream, not CamelStream.
7963
7964         * camel-types.h: Add the defs for CamelTcpStream and
7965         CamelTcpStreamRaw
7966
7967         * Makefile.am: Add camel-tcp-stream and camel-tcp-stream-raw to
7968         the build.
7969
7970         * camel-remote-store.c (remote_connect): Update to use
7971         CamelTcpStreams.
7972
7973         * camel-tcp-stream-raw.c (stream_connect): Made cancellable by
7974         copying the currently used code in camel-remote-store.c.
7975         (stream_setsockopt): Oops, flags = fcntl (..., GET_FL);
7976         (camel_tcp_stream_raw_get_type): Oops. Make this a subclass of
7977         CamelTcpStream, not CamelStream.
7978
7979 2001-03-13  Jeffrey Stedfast  <fejj@ximian.com>
7980
7981         * camel.c (camel_init): Since all of the Mozilla libs (including
7982         NSPR and NSS) correctly handle reinitializations, we might as well
7983         init both NSPR and NSS in camel_init so we can be sure of that
7984         these libs have been initialized.
7985         (camel_shutdown): New function to call the NSS cleanup stuff.
7986
7987 2001-03-13  Jeffrey Stedfast  <fejj@ximian.com>
7988
7989         * camel-folder.c (camel_folder_copy_message_to): Don't allow the
7990         user to copy a message to or from the vtrash folder. Set an
7991         exception if they try.
7992         (camel_folder_move_message_to): This one is a bit more
7993         complicated: 1) If the user tried to move a message from the
7994         vtrash into the original folder, just undelete the message. 2) If
7995         the user tries to move the message to the vtrash folder, then just
7996         mark the message as deleted. 3) If the user tries to move the
7997         message from the vTrash to a folder other than the original, use
7998         the original folder as the source. As another optimization, I've
7999         made it so that if the user tries to move a message to the same
8000         folder, just no-op.
8001         (move_message_to): Unset the deleted flag before moving (assuming
8002         it's there).
8003         (copy_message_to): Same.
8004
8005         * camel-vee-folder.c (camel_vee_folder_get_message_folder): New
8006         convenience function to get the folder from which the message uid
8007         is derived from.
8008
8009 2001-03-13  Dan Winship  <danw@ximian.com>
8010
8011         * providers/imap/camel-imap-store.c (imap_connect): When trying
8012         again after a failed password attempt, check if the connection got
8013         dropped (which Courier will do) and deal accordingly.
8014
8015         * providers/sendmail/camel-sendmail-transport.c (sendmail_send_to,
8016         sendmail_send): More fixing for exim: It can't deal with "-tif",
8017         you need to say "-t -i -f".
8018
8019 2001-03-12  Jeffrey Stedfast  <fejj@ximian.com>
8020
8021         * camel-store.c (init_trash): Rename the folder to "Trash" and
8022         i18nify it.
8023
8024 2001-03-09  Jeffrey Stedfast  <fejj@ximian.com>
8025
8026         * camel-tcp-stream-ssl.h: Comment out everything unless HAVE_NSS
8027         is defined.
8028
8029         * camel-tcp-stream-ssl.c (stream_read): Don't use errno, use
8030         nspr's error code stuff.
8031         (stream_write): Same.
8032
8033 2001-03-09  Jeffrey Stedfast  <fejj@ximian.com>
8034
8035         * camel-session.c (camel_session_query_authenticator): Created a
8036         new mode (CAMEL_AUTHENTICATOR_ACCEPT) which is a Yes/No prompt to
8037         the user. This will be needed by the SSL/TLS code to come. Also
8038         changed the return value to a gpointer rather than a char* to
8039         allow the returning of TRUE/FALSE values.
8040
8041         * camel.c: Wrap stuff with HAVE_NSS
8042
8043 2001-03-09  Dan Winship  <danw@ximian.com>
8044
8045         * providers/sendmail/camel-sendmail-transport.c (sendmail_send,
8046         sendmail_send_to): Remove the "-U" for now, because it breaks
8047         exim's "sendmail" wrapper. (And it doesn't actually do all that
8048         much to sendmail's behavior, and it was working fine before
8049         anyway.)
8050
8051         * camel-mime-utils.c (header_fold): Fix a bug that could make this
8052         walk off the end of a string. (The bug has been there since
8053         December... maybe this will fix some unreproduceable crashes?)
8054
8055 2001-03-08  Jeffrey Stedfast  <fejj@ximian.com>
8056
8057         * camel-store.c (camel_store_get_folder): Changes so that the
8058         folder gets added to the vtrash reguardless of whether or not the
8059         store is holding it's own folder lookup hash.
8060         (init_trash): Oops, lets try locking the cache before we go and
8061         add all the cached folders to the vtrash.
8062
8063 2001-03-08  Jeffrey Stedfast  <fejj@ximian.com>
8064         These fixes make it so that the CamelStore does not actually hold
8065         a ref on it's vTrash folder. The vTrash folder is now created ONLY
8066         when it is requested. This solves the problem of not being able to
8067         unref a Store and have it disconnect/finalize like we expect it to.
8068
8069         * camel-store.c (init_trash): When we create the vtrash, add all
8070         previously opened folders to it and hook on to the finalize event
8071         so that we can then set the store->vtrash to NULL.
8072         (get_trash): If a vtrash folder for the store doesn't exist,
8073         init_trash() and then try.
8074         (construct): No longer need this.
8075         (camel_store_class_init): Don't override the construct method.
8076         (camel_store_finalize): We no longer hold a ref on the vtrash so
8077         don't unref it.
8078
8079 2001-03-07  Jeffrey Stedfast  <fejj@ximian.com>
8080
8081         * providers/pop3/camel-pop3-store.c (init_trash): Implement.
8082         (get_trash): Implement.
8083         (camel_pop3_store_class_init): Override the default init_trash and
8084         get_trash virtual functions. Hopefully this should fix the problem
8085         of pop3 sotre's not disconnecting after the send&recv code
8086         finishes downloading mail.
8087
8088         Wonder if I should override the default implementation for the
8089         mbox, mh, and maildir too?
8090
8091 2001-03-07  Dan Winship  <danw@ximian.com>
8092
8093         * camel-remote-store.c (camel_remote_store_connected): Return the
8094         return value of camel_service_connect rather than returning
8095         !camel_exception_is_set(), since that will be wrong if ex==NULL...
8096         Fixes a crash in the IMAP keepalive code, but this same problem
8097         probably exists in other places too...
8098         (remote_recv_line): Fix another problem...
8099
8100         * providers/local/camel-mbox-provider.c:
8101         * providers/vee/.cvsignore:
8102         * providers/vee/libcamelvee.urls: Remove some unused stuff
8103         
8104 2001-03-06  Jeffrey Stedfast  <fejj@ximian.com>
8105
8106         * camel-sasl-digest-md5.c (compute_response): Redone so as to save
8107         on memory allocations and speed.
8108
8109 2001-03-05  Jeffrey Stedfast  <fejj@ximian.com>
8110
8111         * camel-sasl-plain.c (plain_challenge): Don't return NULL if the
8112         token is non-NULL. This is why:
8113
8114         sending : AUTH PLAIN
8115         received: 334 ok. go on.                 <-- this is why
8116         sending : ZGZPaQpAZ214Lm5ldBBnb29jYXI=
8117         received: 235 {mp005-rz3} go ahead
8118
8119         * camel-sasl.c (camel_sasl_authtype): Add the PLAIN type here.
8120         (camel_sasl_authtype_list): And here too.
8121
8122         * camel-sasl-plain.c: Initialize the camel_sasl_plain_authtype.
8123
8124         * camel-sasl-plain.h: extern the camel_sasl_plain_authtype.
8125
8126 2001-03-05  Jeffrey Stedfast  <fejj@ximian.com>
8127
8128         * providers/imap/camel-imap-store.c (imap_connect): i18n'd some
8129         strings in here.
8130
8131         * providers/smtp/camel-smtp-transport.c (smtp_connect): Keep
8132         trying to authenticate until either we succeed or until the user
8133         cancels.
8134
8135 2001-03-04  Jeffrey Stedfast  <fejj@ximian.com>
8136
8137         * camel-mime-utils.c: Wrote a new version of header_fold() that
8138         takes a 'force' option and uses another new function called
8139         header_fold_next_space() in place of strchr(inptr, ' ') to get the
8140         next whitespace char. The idea of header_fold_next_space() is to
8141         not treat spaces between a set of quotes as a space - this way it
8142         will be possible to fold (for example) the Content-Type MIME
8143         header without worrying about breaking up a boundary string.
8144         Note: This code is #if 0'd out until Zucchi approves of the patch.
8145         Another Note: We will probably still want to use the "don't fold
8146         this header" hash lookup for headers like the Message-Id and
8147         possibly a few others.
8148
8149 2001-03-04  Jeffrey Stedfast  <fejj@ximian.com>
8150
8151         * camel-internet-address.c
8152         (camel_internet_address_encode_address): Make sure there is a
8153         space between the name and the address tokens.
8154
8155         * camel-mime-utils.c (rfc2047_decode_word): encoded string
8156         segments need to be at least 8 chars (7 doesn't leave room for an
8157         ecoding value. To be more realistic, even 8 chars isn't enough as
8158         this assumes there is no charset nor any encoded text. If the
8159         encoding value is not 'Q' or 'B', then return NULL. This fixes bug
8160         #1689.
8161
8162 2001-03-03  Not Zed  <NotZed@Ximian.com>
8163
8164         * camel-vee-folder.c (vee_folder_remove_folder): New function to
8165         remove a folder from a vfolder.
8166         (camel_vee_folder_remove_folder): New public function to remove a
8167         folder from a vfolder.
8168
8169 2001-03-02  Jeffrey Stedfast  <fejj@ximian.com>
8170
8171         * providers/smtp/camel-smtp-provider.c: Doh! Set the
8172         CAMEL_URL_ALLOW_AUTH flag.
8173
8174         * providers/smtp/camel-smtp-transport.c (get_smtp_error_string):
8175         Updated with the extended AUTH return codes.
8176
8177 2001-03-02  Jeffrey Stedfast  <fejj@ximian.com>
8178         
8179         * providers/imap/camel-imap-store.c (try_auth): Don't forget to
8180         unref the SASL object.
8181
8182         * providers/smtp/camel-smtp-transport.c (query_auth_types):
8183         Implemented.
8184         (smtp_auth): Implemented.
8185         (smtp_helo): Don't bother parsing the authtypes if we already have
8186         them.
8187         (smtp_connect): call smtp_auth() here if we found any authtypes.
8188         (smtp_disconnect): Updated as I now use a hash table for the
8189         supported authtypes rather than a linked list.
8190         (esmtp_get_authtypes): modify to use a hash table instead of a
8191         linked list and also use isspace() rather than == ' '.
8192
8193 2001-03-02  Dan Winship  <danw@ximian.com>
8194
8195         * providers/sendmail/camel-sendmail-transport.c (sendmail_send_to,
8196         sendmail_send): Use "-f" to set the envelope from address so
8197         bounces go to the right place. Also, pass "-U" since the man page
8198         says we're supposed to...
8199
8200 2001-03-01  Jeffrey Stedfast  <fejj@ximian.com>
8201         
8202         * camel-sasl.c: #include "camel-sasl-digest-md5.h"
8203         (camel_sasl_authtype_list): add DIGEST-MD5 stuff here.
8204         (camel_sasl_authtype): And here too.
8205         (camel_sasl_new): And here...
8206
8207         * camel-sasl-digest-md5.[c,h]: new SASL class for DIGEST-MD5 (has
8208         been tested and proven to work).
8209
8210 2001-03-01  Dan Winship  <danw@ximian.com>
8211
8212         * camel-sasl.c (camel_sasl_challenge): Take a GByteArray as input
8213         as well. Comment that you can pass %NULL for @token to get the
8214         initial auth data for mechanisms that are client-initiated.
8215         (camel_sasl_challenge_base64): Convenience function for protocols
8216         that use base64-encoded SASL.
8217         (camel_sasl_authenticated): Implement this... (it was prototyped
8218         already)
8219         (camel_sasl_new): Function to take a service name, a mechanism
8220         name, and a CamelService, and return a CamelSasl for it.
8221         (camel_sasl_authtype, camel_sasl_authtype_list): Functions to
8222         return CamelServiceAuthType information about SASL mechanisms, to
8223         allow providers to deal with them generically.
8224
8225         * camel-sasl-anonymous.c, camel-sasl-plain.c: Update/simplify for
8226         CamelSasl changes. Both of these are single-round
8227         (client-initiated) mechanisms, so they don't need to keep state.
8228         (camel_sasl_plain_new): Removed; use camel_sasl_new instead.
8229         (Can't get rid of camel_sasl_anonymous_new though...)
8230
8231         * camel-sasl-cram-md5.c: Update/simplify for CamelSasl changes.
8232         (camel_sasl_cram_md5_new): Removed; use camel_sasl_new instead.
8233         (cram_md5_challenge): Use md5_get_digest where possible, and
8234         various other minor simplifications. CRAM-MD5 only has a single
8235         round, so there's no need to keep track of state. This code is now
8236         tested (against Cyrus IMAPd) and known to work.
8237
8238         * camel-sasl-kerberos4.h: Update/simplify for CamelSasl changes.
8239         Make only a single #ifdef HAVE_KRB4. Remove stuff from priv that
8240         isn't needed between rounds.
8241         (camel_sasl_kerberos4_new): Removed; use camel_sasl_new instead
8242         (krb4_challenge): Fix up the logic I broke in my previous "at
8243         least make it compile" fixes, update to match other changes, and
8244         remove IMAP-isms that shouldn't be in the generic code. This still
8245         isn't tested, because we're stuck behind a NAT right now...
8246
8247         * providers/imap/camel-imap-store.c: Add an "authtypes" hash table
8248         to CamelImapStore recording the supported authtypes.
8249         (connect_to_server): Record supported authtypes in the authtypes
8250         hash rather than the capabilities bitmask, since now the IMAP code
8251         is no longer responsible for keeping track of which authtypes we
8252         support.
8253         (query_auth_types): Use camel_sasl_authtype_list to get the
8254         SASL-supported authtypes.
8255         (try_auth): New function to try a SASL auth mechanism. Sort of
8256         formerly imap_try_kerberos_v4_auth.
8257         (imap_connect): Get rid of the krb4-specific bits and genericize
8258         them for any SASL authtype.
8259
8260         * providers/imap/Makefile.am: Remove camel-imap-auth.[ch] (moved
8261         into camel-imap-store.c since it's now constant size) and the
8262         KRB4_CFLAGS and KRB4_LDFLAGS references.
8263
8264 2001-03-01  Jeffrey Stedfast  <fejj@ximian.com>
8265
8266         * camel-sasl-anonymous.c (anon_challenge): Don't base64 encode the
8267         data, leave that up to the provider to do if it needs to. Also
8268         save on some memory allocations and stuff.
8269
8270         * camel-sasl-cram-md5.c (cram_md5_challenge): Same here. Also get
8271         rid of the need for the temp buf as we can just write it to the
8272         GByteArray.
8273
8274 2001-03-02  Not Zed  <NotZed@Ximian.com>
8275
8276         * camel-mime-utils.c (rfc2047_encode_word, rfc2047_decode_word):
8277         Reconstify variables to match iconv.
8278
8279         * camel-search-private.c (camel_ustrstrcase): Change some
8280         assertions back into valid returns.
8281
8282 2001-03-01  Dan Winship  <danw@ximian.com>
8283
8284         * Makefile.am (libcamel_la_LIBADD, INCLUDES): camel depends on
8285         krb4 now (where available), for camel-sasl-kerberos4.c
8286
8287         * camel-sasl-kerberos4.[ch]: Make this at least compile. Dunno if
8288         it works yet.
8289
8290 2001-03-01  Peter Williams  <peterw@ximian.com>
8291
8292         * camel-url.c (camel_url_new): Assert url_string != NULL.
8293
8294 2001-02-28  Jeffrey Stedfast  <fejj@ximian.com>
8295
8296         * Makefile.am: Added camel-sasl-anonymous.[c,h] to the build.
8297
8298         * camel-sasl-anonymous.[c,h]: new SASL class for ANONYMOUS
8299
8300         * camel-sasl-plain.c (plain_challenge): Oops, have a state for
8301         setting sasl->authenticated = TRUE;
8302
8303         * camel-sasl-cram-md5.c (cram_md5_challenge): Same here.
8304
8305 2001-02-28  Jeffrey Stedfast  <fejj@ximian.com>
8306
8307         * camel-mime-utils.c (header_decode_date): A fix for broken
8308         mailers that send 2-digit years (ie "Wed, 28 Feb 01
8309         04:59:41"). Fixes bug #1633.
8310
8311         * camel-filter-driver.c (camel_filter_driver_filter_folder): Check
8312         to make sure message isn't NULL.
8313
8314 2001-02-28  Dan Winship  <danw@ximian.com>
8315
8316         * camel-remote-store.c (remote_recv_line): If we get back 0 bytes
8317         from camel_stream_buffer_gets, that means the socket got
8318         disconnected, so set an exception. (Noticed because of a message
8319         that crashes our IMAP server when you try to look at it. :)
8320
8321 2001-02-28  Jeffrey Stedfast  <fejj@ximian.com>
8322
8323         * Makefile.am: Added camel-sasl*.[c,h] to the build.
8324
8325         * camel-sasl.[c,h]: new "abstract" SASL class
8326
8327         * camel-sasl-kerberos4.[c,h]: new SASL class for KERBEROS_V4
8328
8329         * camel-sasl-cram-md5.[c,h]: new SASL class for CRAM-MD5
8330
8331         * camel-sasl-plain.[c,h]: new SASL class for PLAIN
8332
8333         * providers/imap/camel-imap-auth.c: Removed the base64 functions.
8334
8335         * camel-mime-utils.c (base64_encode_simple): Moved here from
8336         camel-imap-auth.c
8337         (base64_decode_simple): Same.
8338
8339 2001-02-26  Dan Winship  <danw@ximian.com>
8340
8341         * providers/imap/camel-imap-folder.c (imap_sync): Group messages
8342         into sets with the same flags and use the IMAP message set
8343         notation rather than doing a separate STORE FLAGS for each one.
8344         This cuts the network traffic down to just a handful of commands
8345         per sync rather than one per changed message. Removed the progress
8346         notification stuff since it's no longer meaningful and should
8347         hopefully be unnecessary.
8348         (imap_copy_message_to): move the former sync_message function
8349         into here, since it's no longer shared with imap_sync.
8350
8351 2001-02-26  Jeffrey Stedfast  <fejj@ximian.com>
8352
8353         * camel-mime-utils.c: Made thread-safe and moved to above the test
8354         code.
8355
8356         * camel-mime-message.c (camel_mime_message_init): Set the
8357         message_id to NULL.
8358         (camel_mime_message_finalize): Free the message_id.
8359         (camel_mime_message_set_message_id): New function to set the
8360         Message-Id.
8361         (camel_mime_message_get_message_id): New function to get the
8362         Message-Id.
8363         (process_header): Decode the message-id.
8364
8365 2001-02-24  Jeffrey Stedfast  <fejj@ximian.com>
8366
8367         * camel-store.c (construct): init the vTrash folder here instead
8368         of in store_init.
8369         (camel_store_class_init): init service_class->construct.
8370         (camel_store_finalize): We only need to unref the vtrash folder.
8371         (init_trash): don't create a vstore since we don't need it.
8372
8373 2001-02-23  Jeffrey Stedfast  <fejj@ximian.com>
8374
8375         * camel-store.c (camel_store_class_init): init get_trash and
8376         init_trash.
8377         (camel_store_init): call the virtual init_trash function.
8378         (camel_store_finalize): unref the vtrash folder/store if present.
8379         (camel_store_get_folder): Add the new folder to the vtrash
8380         vfolder.
8381         (init_trash): default implementation of init_trash.
8382         (get_trash): default implementation of get_trash.
8383
8384         * camel-vee-store.c (vee_init_trash): No-op.
8385         (vee_get_trash): return NULL
8386
8387 2001-02-23  Not Zed  <NotZed@Ximian.com>
8388
8389         * camel-folder-summary.c (camel_message_info_new_from_header):
8390         Doh, cut and paste problem, use mlist not cc.
8391
8392         * camel-folder.c (move_message_to): 
8393         (copy_message_to): If the source folder doesn't support a
8394         summary, dont try and get the message info from it.
8395
8396         * camel-filter-search.c (check_header): Implement a pseudo-header
8397         "x-camel-mlist" which just looks up in the message info for a
8398         match.
8399
8400         * camel-folder-search.c (check_header): Add pseudo-header
8401         "x-camel-mlist" which can be used to match on mailing list.
8402
8403         * providers/imap/camel-imap-folder.c (imap_sync): Add some
8404         internal progress reporting.
8405         (imap_rescan): Do some progress reporting.
8406
8407         * camel-mime-part.c (init_header_name_table): Add the message-id
8408         to the formatted table, so we dont try and wrap it, and break it.
8409
8410 2001-02-22  Jeffrey Stedfast  <fejj@ximian.com>
8411
8412         * camel-folder.h: Remove the 'FIXME: remove because this isn't
8413         required...' comment for copy_message_to since we now need and
8414         cherish its existance in the filter-driver code ;-)
8415
8416         * camel-filter-driver.c (camel_filter_driver_filter_message): Now
8417         takes a UID and CamelFolder arguments (which can be NULL) to allow
8418         for possible optimizations when copying messages between folders
8419         on the same store.
8420         (camel_filter_driver_filter_mbox): Updated (passes NULL for both
8421         since this case can't be optimized anyway).
8422         (camel_filter_driver_filter_folder): Updated to pass in the uid
8423         and folder of the message.
8424
8425 2001-02-22  Dan Winship  <danw@ximian.com>
8426
8427         * providers/imap/camel-imap-summary.h (CAMEL_IMAP_SERVER_FLAGS):
8428         #define this as the set of all IMAP system flags
8429
8430         * providers/imap/camel-imap-folder.c (sync_message): after syncing
8431         flags, set server_flags to (flags & CAMEL_IMAP_SERVER_FLAGS)
8432         rather than just "flags", since any other flags won't have been
8433         synced. Prevents the CAMEL_MESSAGE_ATTACHMENTS flag from getting
8434         lost.
8435
8436 2001-02-22  Not Zed  <NotZed@Ximian.com>
8437
8438         * providers/vee/*: Removed all files.
8439         
8440         * camel-private.h: Move camel-vee-private.h stuff into here.
8441
8442         * camel-session.c: Move the vee_provider here, and initialise it
8443         always as part of a session.  The vfolder provider is always
8444         available.
8445
8446         * providers/Makefile.am: Remove "vee" from the build list, now
8447         built as part of the main library.
8448
8449         * Makefile.am (libcamelinclude_HEADERS): 
8450         (libcamel_la_SOURCES): Added camel-vee-store.[ch],
8451         camel-vee-folder.[ch].
8452
8453         * providers/vee/camel-vee-folder.c (vee_folder_build): Removed,
8454         not used.
8455         (camel_vee_folder_new): Removed call to build_folder.
8456         (vee_get_message): Dont try and free the mi if we didn't get it.
8457
8458         * camel-folder.c (camel_folder_change_info_new): Added a hash
8459         table of what we have in the lists, plus moved private things into
8460         private pointer.
8461         (camel_folder_change_info_add_source): Fixed up private accesses.
8462         (camel_folder_change_info_add_uid): Changed to use a hashtable to
8463         see if we already have the uid, etc.
8464         (camel_folder_change_info_remove_uid): Similar.
8465         (change_info_remove): Likewise.
8466         (camel_folder_change_info_clear): Fixes for privatisations.
8467         (camel_folder_change_info_free): "
8468
8469 2001-02-21  Dan Winship  <danw@ximian.com>
8470
8471         * providers/imap/camel-imap-folder.c (fetch_medium): Fixes for
8472         IMAP4-pre-rev1 from Torsten Schulz.
8473
8474 2001-02-20  Not Zed  <NotZed@Ximian.com>
8475
8476         * camel-mime-utils.c (mail_list_magic): Take the ^Header: part out
8477         of the expression, since we look that up ourselves.
8478         (header_raw_check_mailing_list): When getting the match, get match
8479         1, not match 0, we dont want the full string match.
8480
8481         * camel-folder-summary.c (CAMEL_FOLDER_SUMMARY_VERSION): Bumped
8482         for summary change.
8483         (message_info_new): Extract the mlist info from the headers.
8484         (message_info_load): Load mlist from summary.
8485         (message_info_save): Save mlist to summary.
8486         (message_info_free): Save the mlist entry.
8487         (camel_message_info_new_from_header): Extract mailing list header.
8488         (camel_message_info_dup_to): Copy the mlist entry.
8489         (camel_message_info_free): Free mlist.
8490         (message_info_dump): Dump the mlist.
8491
8492         * camel-folder-summary.h: Add an mlist (mailing list) string to
8493         the summary.
8494
8495 2001-02-19  Not Zed  <NotZed@Ximian.com>
8496
8497         * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Added
8498         flags argument.
8499         (message_changed): Add support for the auto-update flag, in which
8500         case we auto-match the content as it changes.
8501         (camel_vee_folder_init): Remoive "DYNAMIC" optionality
8502         (camel_vee_folder_finalise): "
8503         (vee_expunge): As we expunge folders, re-sync their content by
8504         rerunning the query.
8505
8506         * providers/vee/camel-vee-store.c (vee_get_folder): Pass flags to
8507         folder new.
8508
8509 2001-02-18  Not Zed  <NotZed@Ximian.com>
8510
8511         * providers/vee/Makefile.am (noinst_HEADERS): Added
8512         camel-vee-private.h.
8513
8514         * providers/vee/camel-vee-private.h: New file to add locking stuff
8515         for vee folders.
8516
8517         * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Add
8518         locking around unmatched setup.
8519         (camel_vee_folder_init): Setup lock.
8520         (camel_vee_folder_finalise): Free locks.
8521         (folder_changed): Add locking.
8522         (unmatched_finalise): "
8523         (message_changed): "
8524         (vee_folder_build): "
8525
8526 2001-02-17  Not Zed  <NotZed@Ximian.com>
8527
8528         * providers/vee/camel-vee-folder.c (vee_folder_add): Check uid
8529         doesn't exist before adding it.
8530
8531 2001-02-16  Not Zed  <NotZed@Ximian.com>
8532
8533         * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Create
8534         a new virtual virtual folder UNMATCHED, to store all messages that
8535         dont match other vfolders.
8536         (unmatched_folder_changed): When a vfolder issues a changed event,
8537         use its info to update the unmatched folder info.
8538         (unmatched_finalise): When a vfolder is finalised, remove any uids
8539         it has as if we had a removed event for it.
8540
8541 2001-02-16  Jeffrey Stedfast  <fejj@ximian.com>
8542
8543         * camel-filter-driver.c (camel_filter_driver_finalise): Thaw the
8544         defaultfolder.
8545         (camel_filter_driver_set_default_folder): Thaw the defaultfolder
8546         we're about to replace, and freeze the new defaultfolder.
8547
8548 2001-02-15  Jeffrey Stedfast  <fejj@ximian.com>
8549
8550         * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Emit
8551         the folder_created signal here.
8552
8553         * providers/local/camel-local-folder.c
8554         (camel_local_folder_construct): Emit the folder_created signal.
8555
8556         * providers/local/camel-local-store.c (delete_folder): On error,
8557         free the 'name' string so we don't leak. Also emit the
8558         folder_deleted signal.
8559
8560         * providers/imap/camel-imap-store.c (subscribe_folder): Emit the
8561         folder_created signal.
8562         (unsubscribe_folder): Emit the folder_deleted signal.
8563
8564         * camel-store.c (camel_store_class_init): Added folder_created and
8565         folder_deleted signal defs.
8566
8567 2001-02-15  Dan Winship  <danw@ximian.com>
8568
8569         * camel-folder-thread.c (container_parent_child): Deal with
8570         out-of-order References headers so they don't cause messages to
8571         disappear in threaded view.
8572
8573         * providers/imap/camel-imap-folder.c (fetch_medium): IMAP4
8574         (pre-rev1) doesn't allow BODY.PEEK[], so use RFC822.PEEK instead
8575         in that case.
8576
8577 2001-02-14  Christopher James Lahey  <clahey@ximian.com>
8578
8579         * camel-mime-filter-charset.c (complete, filter),
8580         camel-mime-utils.c (rfc2047_decode_word, rfc2047_encode_word):
8581         Changed this code to match the glibc iconv signature.
8582
8583 2001-02-14  Dan Winship  <danw@ximian.com>
8584
8585         * camel-store.c (camel_store_create_folder): New method to create
8586         a folder when you don't know its full name.
8587
8588         * providers/imap/camel-imap-store.c (create_folder): Implement.
8589         (create_folder): Oops, and fix bug involving namespaces
8590         
8591 2001-02-12  Not Zed  <NotZed@Ximian.com>
8592
8593         * camel-mime-part.c (init_header_name_table): Add address headers
8594         to list that we dont fold when writing.  The are properly
8595         formatted as we build them.
8596         (write_to_stream): DOH, lookup the header name in the formatted
8597         hash table, not the value, that would never have worked.
8598
8599         * camel-internet-address.c
8600         (camel_internet_address_encode_address): Changed to take a
8601         parameter saying how much we've printed so far.  We now fold the
8602         header as we format it.  We dont fold addresses, even if they are
8603         too long, we simply put them on another line by themselves: this
8604         should make the result more parsable by mailers that can't handle
8605         split up addresses (which are legal).
8606         (internet_encode): Fix for changes to above.
8607
8608 2001-02-12  Jeffrey Stedfast  <fejj@ximian.com>
8609
8610         * providers/local/camel-local-provider.c: mbox, mh, and maildir
8611         camel-url's need absolute paths.
8612
8613         * camel-provider.h (CAMEL_URL_PATH_IS_ABSOLUTE): New flaggy flag.
8614
8615 2001-02-08  Dan Winship  <danw@ximian.com>
8616
8617         * camel-store.c: Rewrite a bunch. Replace the existing folder
8618         cache stuff with much simpler code that still handles all the
8619         existing cases. Now the folder hash table is always created by the
8620         base class, using hash and compare functions provided by the class
8621         implementation. (If they are set to NULL, CamelStore won't cache
8622         folders.) lookup_folder, cache_folder, and uncache_folder are no
8623         longer class methods, and get_name is gone completely.
8624
8625         (camel_store_get_inbox): Renamed from
8626         camel_store_get_default_folder, since that wasn't being used, and
8627         this is what we actually need.
8628         (camel_store_get_root_folder): Removed, since it's not needed for
8629         anything given get_folder_info.
8630
8631         * camel-remote-store.c:
8632         * providers/local/camel-local-store.c:
8633         * providers/local/camel-mbox-store.c:
8634         * providers/local/camel-mh-store.c:
8635         * providers/local/camel-maildir-store.c:
8636         * providers/nntp/camel-nntp-store.c:
8637         * providers/pop3/camel-pop3-store.c:
8638         * providers/vee/camel-vee-store.c: Minor updates for CamelStore
8639         changes
8640
8641         * providers/imap/camel-imap-store.c (camel_imap_store_class_init):
8642         Update for CamelStore changes.
8643         (hash_folder_name, compare_folder_name): treat INBOX
8644         case-insensitively, otherwise use g_str_hash and g_str_equal.
8645
8646         * camel-service.c (camel_service_construct): Remove
8647         camel_service_new and create camel_service_construct (as a class
8648         method) in its place.
8649
8650         * camel-session.c (camel_session_get_service): Use
8651         camel_object_new and camel_service_construct to replace
8652         camel_service_new.
8653
8654         * providers/local/camel-local-store.c (construct): Append a '/' to
8655         the URL path if it doesn't end with one
8656
8657 2001-01-31  Jeffrey Stedfast  <fejj@helixcode.com>
8658
8659         * camel-tcp-stream-ssl.c: Oops, include the camel-tcp-stream-ssl
8660         header instead of the raw one.
8661
8662 2001-02-07  Not Zed  <NotZed@Ximian.com>
8663
8664         * camel-operation.c (camel_operation_start): Changed to push the
8665         operation into a status stack.
8666         (camel_operation_progress): Changed to only accept % complete.
8667         (camel_operation_reset): Free status stack as well.
8668
8669         * providers/pop3/camel-pop3-folder.c (pop3_get_message): Get the
8670         octect count from the return line, and pass it to
8671         get_additional_data().
8672         (pop3_refresh_info): Added status stuff.
8673
8674         * providers/pop3/camel-pop3-store.c
8675         (camel_pop3_command_get_additional_data): Added a total bytes
8676         expected argument for progress reporting & fixed callers.
8677         (camel_pop3_command_get_additional_data): Added progress
8678         reporting.
8679
8680         * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
8681         (mbox_summary_sync_quick):
8682         (summary_rebuild): Added progress reporting stuff.
8683
8684 2001-02-07  Jeffrey Stedfast  <fejj@ximian.com>
8685
8686         * camel-search-private.c (CAMEL_SEARCH_COMPARE): Macro for making
8687         comparisons easy.
8688         (camel_ustrcasecmp): Use CAMEL_SEARCH_COMPARE and check for
8689         end-of-string before the utf-8 error check.
8690         (camel_ustrncasecmp): Same.
8691         (camel_search_header_match): Strip leading spaces before doing
8692         anything else. Also use vlen and mlen so as to not need to do 500
8693         strlen()'s.
8694         (camel_ustrcasecmp): Don't get_utf8() for the 2 strings in the
8695         comparison part of the loop because of short-circuit expression
8696         evaluation. (blame JPR if this is the wrong term!)
8697         (camel_ustrncasecmp): Same.
8698
8699 2001-02-06  Jeffrey Stedfast  <fejj@ximian.com>
8700
8701         * camel-search-private.c (utf8_get): Rewrote using unicode_get_utf8().
8702         (camel_ustrcasecmp): Use unicode_char_t
8703         (camel_ustrncasecmp): Same.
8704
8705 2001-02-06  Christopher James Lahey  <clahey@ximian.com>
8706
8707         * camel-mime-filter-charset.c (complete, filter),
8708         camel-mime-utils.c (rfc2047_decode_word, rfc2047_encode_word):
8709         Made these pass char ** as the second parameter to iconv.
8710
8711 2001-02-06  Not Zed  <NotZed@Ximian.com>
8712
8713         * camel-session.c: Removed all the camel_cancel stuff.
8714
8715         * camel-stream-fs.c (stream_read): Change to use camel_operation.       
8716         (stream_write): "
8717
8718         * camel-remote-store.c (socket_connect): Change to use
8719         camel_operation rather than camel_cancel stuff.
8720         Removed gal include, WTF is that doing there anyway?
8721
8722         * Makefile.am (libcamel_la_SOURCES): 
8723         (libcamelinclude_HEADERS): Added camel-operation.[ch], stuff to
8724         handle notification and cancellation.
8725
8726         * camel-search-private.c: Removed unwanted header.  It was never
8727         put in for a reason.  Stop fixing irrelevant warnings.
8728         
8729         (camel_ustrstrcase): Our own strstrcase impl for utf8 strings.
8730         (camel_ustrcasecmp): Ditto for strcasecmp.
8731         (camel_ustrncasecmp): And strncasecmp.
8732         (utf8_get): Simpler interface to utf8 string processing.
8733         (camel_search_header_match): Use the new things.
8734
8735 2001-02-05  Not Zed  <NotZed@Ximian.com>
8736
8737         * camel-folder.c (get_summary): Removed some old variables/a small
8738         memleak.
8739         (free_summary): Removed old variables.
8740
8741         * camel-mime-utils.c (header_raw_check_mailing_list): New utility
8742         function to get the mailing list (if any) that a set of headers
8743         came from.
8744
8745 2001-02-05  Christopher James Lahey  <clahey@helixcode.com>
8746
8747         * camel-stream-fs.c: Added a missing #include.
8748
8749         * camel-search-private.c: Added a missing #include.
8750
8751 2001-02-05  Jeffrey Stedfast  <fejj@ximian.com>
8752
8753         * camel-remote-store.c (remote_query_auth_types): Oops. Change
8754         this too.
8755
8756         * providers/smtp/camel-smtp-transport.c (query_auth_types): Updated.
8757
8758         * providers/nntp/camel-nntp-store.c (nntp_store_query_auth_types):
8759         Updated.
8760
8761         * providers/pop3/camel-pop3-store.c (query_auth_types): Updated.
8762
8763         * providers/imap/camel-imap-store.c (query_auth_types): Updated.
8764
8765         * camel-service.c (camel_service_query_auth_types): Now takes a
8766         boolean value to specify whether or not to connect when
8767         constructing a supported authtype list.
8768
8769 2001-02-05  Not Zed  <NotZed@Ximian.com>
8770
8771         * camel-stream-filter.c (do_write): Revert jeff's earlier change,
8772         the change below is the more-correct fix.  All his was doing was
8773         ignoring the return code & looping actually :)
8774
8775         * camel-stream-fs.c (stream_write): Since we are non-blocking on
8776         the outgoing fd, keep looping if writing out large blocks, so we
8777         can keep checking for cancel, etc.
8778
8779 2001-02-02  Not Zed  <NotZed@Ximian.com>
8780
8781         * camel-folder-thread.c (camel_folder_thread_messages_new): When
8782         we drop a fake node, dont skip checking the next in the list.
8783         (camel_folder_thread_messages_new): Add an assertion check just to
8784         make sure we dont get any pseudo nodes, and spit a warning if we
8785         do.
8786
8787 2001-02-04  Jeffrey Stedfast  <fejj@ximian.com>
8788
8789         * camel-stream-filter.c (do_write): Make do_write loop until the
8790         entire buffer is written.
8791
8792 2001-02-02  Not Zed  <NotZed@Ximian.com>
8793
8794         * camel-stream-fs.c: Add missing header for cancel check stuff.
8795
8796         * camel-session.c (camel_cancel_cancel): Fix a wrong cast.
8797
8798         * camel-mime-part.c (init_header_name_table): Setup a new table
8799         header_formatted_table, that lists headers that we dont want to
8800         fold (they've already been folded).
8801         (write_to_stream): Check for already formatted headers, and dont
8802         try and fold them.  This is a fix for bug #1097.
8803
8804 2001-02-01  Not Zed  <NotZed@Ximian.com>
8805
8806         * camel-mime-utils.c (header_fold): If we are folding, drop the
8807         space at the end of the line.
8808
8809 2001-01-30  Not Zed  <NotZed@Ximian.com>
8810
8811         * camel-remote-store.c (timeout_cb): Remvoe the stream locking
8812         here.  I think this was leading to a deadlock when a keepalive is
8813         being sent, in imap.
8814
8815 2001-01-29  Not Zed  <NotZed@Ximian.com>
8816
8817         * providers/imap/camel-imap-command.c
8818         (imap_command_strdup_vprintf): Include the terminating NUL in the
8819         calculated string length.  This hit memcheck.
8820
8821 2001-01-25  Not Zed  <NotZed@Ximian.com>
8822
8823         * tests/folder/test3.c: Changed the subject search to handle case
8824         sensitive when it is mixed case.
8825
8826         * Makefile.am (libcamel_la_SOURCES): Added camel-ssearch-private.c
8827         (noinst_HEADERS): Added camel-search-private.h
8828
8829         * camel-folder-search.c (check_header): New function to do the
8830         work of the various header checks.
8831         (search_header_matches): 
8832         (search_header_starts_with): 
8833         (search_header_ends_with): 
8834         (search_header_contains): Use check_header to do the work.
8835         (build_match_regex): Removed.
8836
8837         * camel-search-private.c (header_soundex):  New
8838         function to match words to phrases using soundex algorithm.
8839
8840         * camel-filter-search.c (soundexcmp): Removed.
8841         (check_match): Moved to search-private.h
8842
8843 2001-01-24  Not Zed  <NotZed@Ximian.com>
8844
8845         * camel-search-private.c (camel_search_build_match_regex): Added
8846         extra flags, so the same function can be used for
8847         start/end/whole/partial matches.
8848         (camel_search_header_match): Convenience function to check a
8849         single header against all sorts of different matches.
8850
8851         * providers/imap/camel-imap-search.c (imap_body_contains): Fix for
8852         e_sexp api changes.
8853
8854         * camel-folder-search.c: Fix for e_sexp api changes.
8855         (search_header_contains): Free args/quit on unknown header.
8856         (search_header_matches): "
8857         (search_header_starts_with): "
8858         (search_header_ends_with): "
8859         (match_message): Add an exception argument.
8860         (search_body_contains): Free args/quit on fatal error.
8861         (message_body_contains): Removed (moved to
8862         camel-search-private.c), fixed callers.
8863
8864         * camel-filter-search.c: Fix for e_sexp api changes.
8865         (build_match_regex, message_body_contains): Moved into
8866         camel-filter-private.c  Fixed callers.
8867         (check_header): moved guts to camel-search-private, and
8868         changed to use regex's for everything.  Just calls that with the
8869         right args.
8870         (check_header): GEts the header, decodes it, and checks for
8871         failure, and whatnot.
8872         (check_match): Removed.
8873         (header_soundex): Changed significantly.  Now it soundexes each
8874         word in the header separately, and compares it to the first
8875         argument.
8876
8877         * tests/folder/test9.c (main): Fix for api changes.
8878         (main): Added tests to see that invalid match and action
8879         rules are properly detected.
8880
8881         * camel-filter-driver.c (camel_filter_driver_filter_mbox): Remove
8882         the 'finished message' bit.
8883         (camel_filter_driver_filter_message): Remove an accidentally
8884         checked in debug.
8885         (camel_filter_driver_filter_message): Fix for e-sexp api changes.
8886
8887 2001-01-23  Dan Winship  <danw@ximian.com>
8888
8889         * providers/imap/camel-imap-wrapper.c: Add a lock around the
8890         delayed loading, so two threads won't try to do it at the same
8891         time.
8892
8893 2001-01-22  Dan Winship  <danw@ximian.com>
8894
8895         * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Set the
8896         CamelFolder::name to just the base part of the vfolder name (the
8897         non-query part)
8898
8899 2001-01-23  Not Zed  <NotZed@Ximian.com>
8900
8901         * camel-filter-search.c (camel_filter_search_match): Perform error
8902         checking on parsing/execution.
8903
8904         * camel-folder-search.c (camel_folder_search_execute_expression):
8905         Perform error handling on search expression.
8906         (CamelFolderSearchPrivate): Add a camelexception for error
8907         returns.
8908         (camel_folder_search_execute_expression): Setup exception pointer.
8909         (search_match_all): Quit on error.
8910
8911         * providers/imap/camel-imap-summary.c (message_info_load): Removed
8912         some debug 'warnings', as they should now be displayed at the
8913         toplevel loader, and just made the code match similar code
8914         elsewhere.
8915
8916         * providers/local/camel-mbox-summary.c (message_info_load): Error
8917         handling.
8918         (message_info_save): more error handling.
8919
8920         * camel-folder-summary.c (message_info_load): Add error handling
8921         and sanity checking.
8922         (camel_folder_summary_load): Add error checks.
8923         (perform_content_info_load): Error + sanity checks.
8924         (content_info_load): error + sanity checks.
8925
8926         * camel-filter-driver.c (close_folder): avoid /0 by updating after
8927         we've done the sync.
8928         (close_folders): Setup the first progress report to start it off.
8929         (camel_filter_driver_filter_message): Fix a fixme, check errors in
8930         e_sexp parsing, etc.
8931
8932 2001-01-22  Christopher James Lahey  <clahey@helixcode.com>
8933
8934         * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
8935         Initialize the value of the variable exists here.
8936
8937 2001-01-22  Not Zed  <NotZed@Ximian.com>
8938
8939         * .cvsignore */*/.cvsignore: Added profiling temp
8940         files.
8941
8942         * camel-folder-thread.c (camel_folder_thread_messages_new): When
8943         removing phantom nodes, check for the end node too.
8944
8945         * camel-filter-driver.[ch]: Changed status vars to be
8946         CAMEL_FILTER_STATUS_ etc.
8947
8948 2001-01-21  Jeffrey Stedfast  <fejj@ximian.com>
8949
8950         * camel-mime-utils.c (header_param_list_format_append): Make the
8951         output a little prettier. Okay, so I'm anal...
8952
8953 2001-01-21  Not Zed  <NotZed@Ximian.com>
8954
8955         * camel-filter-driver.h: Added an exception to
8956         CamelFilterGetFolderFunc.
8957
8958         * camel-filter-driver.c (camel_filter_driver_filter_message):
8959         Remove source parameter, as it is determined elsewhere now.
8960         (camel_filter_driver_filter_folder): Same here.
8961         (camel_filter_driver_filter_mbox): And here.
8962         (do_move): If we cannot open a folder, quit, rather than ignoring
8963         it.
8964         (do_copy): Here too.
8965         (open_folder): Pass an exception into get_folder callback.
8966         (camel_filter_driver_filter_folder): Report that we're syncing,
8967         when we are.
8968         (camel_filter_driver_filter_mbox): And here too.
8969         (close_folder): And here.
8970
8971 2001-01-19  Jeffrey Stedfast  <fejj@ximian.com>
8972
8973         * camel-filter-driver.c (camel_filter_driver_filter_message): Set
8974         the deleted bit *before* copying to the default folder, this way
8975         if they are importing mail and have a rule to delete it, it
8976         doesn't get copied to the default folder un-deleted.
8977
8978 2001-01-19  Dan Winship  <danw@ximian.com>
8979
8980         * providers/imap/camel-imap-store.c
8981         (get_subscribed_folders_by_hand): If LISTing a subscribed folder
8982         doesn't return a LIST response, just ignore that folder. Yay
8983         RFC2060.
8984         (subscribe_folder): add a missing UNLOCK
8985
8986 2001-01-19  Kjartan Maraas  <kmaraas@gnome.org>
8987
8988         * providers/smtp/camel-smtp-provider.c: Mark strings for translation.
8989         
8990 2001-01-19  Not Zed  <NotZed@Ximian.com>
8991
8992         * camel-filter-driver.c (report_status): Add a percentage complete
8993         indicator to the status thing.
8994         (camel_filter_driver_filter_mbox): Add percentage complete to
8995         reporting.      
8996         (camel_filter_driver_filter_folder): Same.
8997
8998 2001-01-18  Dan Winship  <danw@ximian.com>
8999
9000         * camel-store.c (camel_folder_info_build): More tweaking... skip
9001         separator characters after the namespace character. (Gets rid of
9002         the shell folder registration warning some people have had with
9003         IMAP)
9004
9005         * providers/imap/camel-imap-store.c (imap_connect): I'm sure there
9006         was some clever reason I was storing the flags of the folder in
9007         the hash table rather than just "1", but I don't remember what it
9008         was now. Anyway, since we only ever test NULL/non-NULL, store 1,
9009         since flags is sometimes 0.
9010
9011         * providers/imap/camel-imap-folder.c (imap_update_summary): Oops.
9012         Somewhere in one of the reorgs, the code to add new messages to
9013         the CamelFolderChangeInfo structure got removed. Fix that.
9014
9015 2001-01-17  Jeffrey Stedfast  <fejj@ximian.com>
9016
9017         * providers/imap/camel-imap-summary.c (message_info_load): Add
9018         some g_warnings() to help debug later if I ever get the segfaults
9019         I was getting earlier. Can't seem to reproduce them after my
9020         previous "fix".
9021
9022         * camel-folder-summary.c (camel_folder_summary_load): Undid my
9023         change here, NotZed said it was wrong and that if it gets a NULL
9024         mi then it should abort and not continue.
9025
9026 2001-01-17  Jeffrey Stedfast  <fejj@ximian.com>
9027
9028         * camel-folder-summary.c (camel_folder_summary_load): Make sure
9029         that the message-info is non-null before we go accessing inner
9030         parts of it and/or adding it to the summary array. I may not have
9031         handled the error correctly, but it does seem to work
9032         correctly. If NotZed could double-check this it'd be great.
9033
9034         * providers/smtp/camel-smtp-transport.c (get_smtp_error_string):
9035         New smtp error-code to string mapping function.
9036         (smtp_connect): Use the new error->string function for reporting
9037         useful errors.
9038         (smtp_helo): Same. Also use a case-insensitive strstr for 8BITMIEM
9039         as it seems Exchange sends back lowercase for that one single SMTP
9040         extension. Everything else is uppercase. I'm seeing a lack of love
9041         for that extension by Microsoft dudes...
9042         (smtp_mail): Use get_smtp_error_string.
9043         (smtp_rcpt): Same.
9044         (smtp_data): Same.
9045         (smtp_quit): Same.
9046         (smtp_rset): Same.
9047
9048 2001-01-16  Jeffrey Stedfast  <fejj@ximian.com>
9049
9050         * camel-folder-summary.c (camel_folder_summary_array): Add an int
9051         i so this code will compile. Should I be worried about how well
9052         this code will work? ;-)
9053
9054 2001-01-17  Not Zed  <NotZed@Ximian.com>
9055
9056         * camel-folder.c (free_summary): Call
9057         camel_folder_summary_array_free() to do the work.
9058         (get_summary): Use camel_folder_summary_array() to get the array
9059         atomically.  These fixes allow folder/test8 to work again, and fix
9060         a sort of race where the summary size can change while we were
9061         making a copy of it.
9062
9063         * camel-folder-summary.c (camel_folder_summary_array): Get the
9064         summary array atomically, so it can't contain empty records.
9065         (camel_folder_summary_array_free): And free it.
9066
9067         * tests/lib/camel-test.c (die): If we are verbose & in threads,
9068         then goto sleep so we can debug.
9069
9070         * tests/folder/test8.c (worker): Add a missing pull() for
9071         comnparing content.
9072
9073         * camel-filter-search.c: Fix the symbol table, so match-all is an
9074         immediate function, as it should be.
9075
9076         * tests/folder/test9.c (main): New test, tests some filtering
9077         things.
9078
9079         * tests/message/test3.c (main): Dont use a boundary string with
9080         spaces in it.  Folding can corrupt it.  Maybe the folding isn't
9081         working entirely right, but anyway.
9082
9083         * camel-session.c: Debug out the debug.
9084
9085         * camel-filter-driver.c (camel_filter_driver_filter_folder): Plug
9086         a messageinfo leak.
9087
9088 2001-01-16  Dan Winship  <danw@ximian.com>
9089
9090         Delayed loading of IMAP message parts.
9091
9092         * camel-types.h: typedef CamelMessageInfo and
9093         CamelMessageContentInfo here
9094
9095         * camel-folder-summary.h: Add a "size" field to
9096         CamelMessageContentInfo.
9097
9098         * camel-folder-summary.c (camel_folder_summary_content_info_new,
9099         camel_folder_summary_content_info_free): Renamed and made
9100         non-static for providers that construct their own content info.
9101         (content_info_load, content_info_save): load/save size
9102
9103         * camel-data-wrapper.c (camel_data_wrapper_is_offline): New
9104         function to return if a data wrapper's contents are "offline". (So
9105         that, for example, we don't make thumbnails of images that haven't
9106         been loaded off the IMAP server yet.) Defaults to FALSE.
9107
9108         * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
9109         Fix a bug in re-selecting a folder when messages have been
9110         expunged from it by another client in the meantime.
9111         (imap_get_message): Rewrite. If the message is larger than a
9112         certain size, just create a skeleton message containing
9113         CamelImapWrappers that will read parts as needed. This way, large
9114         attachments only need to be downloaded if the user looks at them,
9115         and multipart/alternative alternatives that aren't used will never
9116         be downloaded at all.
9117         (imap_update_summary): Rewrite this a bunch too to make the
9118         parsing more robust.
9119
9120         * providers/imap/camel-imap-summary.c
9121         (CAMEL_IMAP_SUMMARY_VERSION): bump.
9122         (camel_imap_summary_new): Set build_content to TRUE.
9123         (content_info_load, content_info_save): Only save/load the content
9124         for messages that have it. (The content info gets created as a
9125         side effect of imap_get_message.)
9126
9127         * providers/imap/camel-imap-utils.c (imap_parse_body): New routine
9128         (and helpers) to parse an IMAP 'body' FETCH response and fill in a
9129         CamelMessageContentInfo from it.
9130
9131         * providers/imap/Makefile.am (libcamelimap_la_SOURCES,
9132         libcamelimap_la_HEADERS): add camel-imap-wrapper.
9133
9134 2001-01-16  Dan Winship  <danw@ximian.com>
9135
9136         * camel-tcp-stream-raw.c (stream_getsockopt, stream_setsockopt):
9137         * camel-stream-fs.c (stream_read, stream_write): 
9138         * camel-remote-store.c (socket_connect): fcntl(fd, F_GETFL)
9139         returns the flags as the return value, not via a passed in
9140         pointer. And F_SETFL looks for an int, not a long, and you have to
9141         pass it what it's expecting because it's a va_arg parameter. (Yes,
9142         the man page lies on Linux. But check the UNIX98 spec or the glibc
9143         source.) Also, fix another bug in socket_connect: if we manage to
9144         connect right away, unset O_NONBLOCK so it doesn't mess us up
9145         later.
9146
9147         Fixes a bunch of problems with non-blocking I/O being done in the
9148         allegedly-blocking case and then returning EWOULDBLOCK.
9149
9150 2001-01-16  Chris Toshok  <toshok@ximian.com>
9151
9152         * providers/Makefile.am (NNTP_DIR): set to nntp if ENABLE_NNTP
9153         (SUBDIRS): use $(NNTP_DIR)
9154
9155 2001-01-16  Jeffrey Stedfast  <fejj@ximian.com>
9156
9157         * providers/smtp/camel-smtp-transport.c (smtp_rcpt): Don't check
9158         errno as it's not being set. Fixes bug #1150.
9159
9160 2001-01-16  Jeffrey Stedfast  <fejj@ximian.com>
9161
9162         Ugh, this design is ugly like my butt.
9163
9164         * camel-session.c (camel_session_query_cert_authenticator): New
9165         function which will be useful when we integrate SSL.
9166
9167         * camel-tcp-stream-ssl.c (ssl_auth_cert): Callback to authenticate
9168         a certificate.
9169         (ssl_bad_cert): Callback that gets the reason the certificate is
9170         bad and then calls camel's cert-authenticator callback to notify
9171         the user and to allow the user to override the check.
9172         (stream_connect): Set the URL we expect to connect with and setup
9173         the auth_cert and bad_cert callbacks.
9174         (camel_tcp_stream_ssl_new): Now takes a CamelSession and a
9175         expected_host argument that it will use for certificate
9176         authentication.
9177         (camel_tcp_stream_ssl_finalize): Unref the session and free the
9178         expected_host.
9179
9180 2001-01-16  Not Zed  <NotZed@Ximian.com>
9181
9182         * camel-filter-search.c (header_exists): Changed to support
9183         multiple args (or'd together).
9184         (header_contains): Cleaned up to match the search code.  Why did
9185         fejj change it? I'll never know.
9186         (header_matches): 
9187         (header_starts_with): 
9188         (header_ends_with): Big cleanup of fejj's "i'm the cut & paste
9189         king" code.  Also properly handle or'ing of additional args to
9190         match what the folder-search code should do.
9191         (check_match): New function which does the annoying matching
9192         stuff (for header matches).
9193         (check_header): Similarly, handles or'ing of the matches together.
9194         (header_contains):
9195         (header_matches): 
9196         (header_starts_with): 
9197         (header_ends_with): Call check_header to do the actual work.
9198         (header_soundex): And here too.
9199         (match_all): Yeah like match-all isn't passed expression results,
9200         its passed expression terms.  Fix this so match-all works like it
9201         should, by executing the contained expression.
9202         (message_body_contains): Copied directly from
9203         camel-folder-search.c, a more robust/faster/simpler body search
9204         code.
9205         (mime_part_matches): Removed entirely.
9206         (handle_multipart): Removed entirely.
9207         (build_match_regex): Copied from camel-folder-search.  Builds a
9208         set of simple strings into a regex pattern that matches any of
9209         them (for faster & simpler matching).  Expanded to accept regex
9210         patterns itself, so it can merge them together.
9211         (body_contains): Use build match/match message to match using a
9212         built regex.
9213         (body_regex): Likewise, this time we tell it we're building a
9214         regex though.
9215         (header_full_regex): Use build_match_regex to take the drudgery
9216         out of it, and expand it to handle multiple regex's at once.
9217         (get_full_header): slightly cleaner (well i dunno, the sprintf
9218         stuff just got to me).
9219         (header_regex): Cleaned up to use build_match_Regex too, and to
9220         properly check types.
9221         (filter_message_search): Just allocate 'fms' on the stack.
9222
9223         * camel-filter-driver.c (camel_filter_driver_finalise): 
9224         (camel_filter_driver_init): 
9225         (camel_filter_driver_class_init): 
9226         (camel_filter_driver_get_type): Changed from gtk object to camel
9227         object.
9228         (camel_filter_driver_add_rule): New function to add a rule to be
9229         processed in sexp form.
9230         (camel_filter_driver_init): Init the rules list.
9231         (camel_filter_driver_finalise): Clear the rules/rules list.
9232         (camel_filter_driver_filter_message): Scan rules list directly
9233         rather than creating on the fly.
9234
9235         * Makefile.am (libcamelinclude_HEADERS): Added camel-filter-driver.h
9236         (libcamel_la_SOURCES): Added camel-filter-driver.c, code taken
9237         from filter-driver, which can drive, uh, filters based on sexp's.
9238         (libcamelinclude_HEADERS): 
9239         (libcamel_la_SOURCES): Added camel-filter-search.[ch]
9240
9241         * camel-folder-summary.c (camel_folder_summary_decode_string):
9242         Chganged len back to be unsigned.  And do a simple range check on
9243         the string value to try and detect corrupted summary files.
9244
9245         * providers/imap/camel-imap-command.c (imap_read_untagged): Handle
9246         cancelled stream reads with an appropriate exception.
9247
9248         * providers/imap/camel-imap-private.h: Fix the include-once
9249         macro.  Doh, confliced with camel-private.h.
9250
9251         * providers/imap/camel-imap-store.c (imap_store_refresh_folders):
9252         A copy of camel_remote_store_refresh_folders.  We avoid locking
9253         each folder when we call it though.  This should be removed when i
9254         can work out how to remove the folder lock from this function
9255         easily.
9256
9257         * camel-stream-fs.c (stream_write): Fix n' argument of select.
9258         (stream_read): Likewise.
9259
9260         * camel-remote-store.c (socket_connect): Bump the connect timeout
9261         upto 4 minutes.
9262         (socket_connect): Oops, fix the 'n' argument of select.
9263
9264         * camel-session.c (camel_cancel_cancel): If we are given no
9265         cancellation node, then do it for all active ones.
9266
9267 2001-01-15  Jeffrey Stedfast  <fejj@ximian.com>
9268
9269         * camel-stream-fs.c (stream_close): If the close() is successful,
9270         set the fd to -1.
9271
9272         * camel-tcp-stream-raw.c: Removed the disconnect() method.
9273         (stream_close): If the close() is successful, set the sockfd to
9274         -1.
9275
9276         * camel-tcp-stream-ssl.c: Removed the disconnect() method.
9277         (stream_close): If the close() is successful, set the sockfd to
9278         NULL.
9279
9280         * camel-tcp-stream.c (camel_tcp_stream_disconnect): Removed,
9281         easier to just use the close() method as it did the same thing
9282         anyway.
9283
9284 2001-01-15  Jeffrey Stedfast  <fejj@ximian.com>
9285
9286         * camel-tcp-stream-raw.c (stream_getsockopt): Updated to be able
9287         to get the CAMEL_SOCKOPT_NONBLOCKING socket opt.
9288         (stream_setsockopt): Updated to be able to set the
9289         CAMEL_SOCKOPT_NONBLOCKING socket opt.
9290
9291 2001-01-15  Peter Williams  <peterw@ximian.com>
9292
9293         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Lock
9294         around the imap_rescan, which needs it.
9295
9296 2001-01-15  Not Zed  <NotZed@Ximian.com>
9297
9298         * camel-remote-store.c (socket_connect): A cancellable connection
9299         routine.
9300         (remote_send_string): Return cancelled exception if we were.
9301         (remote_send_stream): "
9302         (remote_recv_line): "
9303
9304         * camel-stream-fs.c (stream_read): First cut at cancellation
9305         stuff.  Its looking a bit ugly.
9306
9307 2001-01-15  Jeffrey Stedfast  <fejj@ximian.com>
9308
9309         * camel-tcp-stream-ssl.c (stream_connect): Uses an SSL socket now
9310         although there's still a few things missing (like certificate
9311         handling and such).
9312
9313         * camel.c (camel_ssl_init): A replacement function for
9314         camel_init() that also initializes SSL.
9315
9316 2001-01-14  Jeffrey Stedfast  <fejj@ximian.com>
9317
9318         * camel-tcp-stream-ssl.c (stream_getsockopt): Implemented.
9319         (stream_setsockopt): Implemented.
9320
9321         * camel-tcp-stream-raw.c (stream_getsockopt): Implemented.
9322         (stream_setsockopt): Implemented.
9323
9324         * camel-tcp-stream.c (camel_tcp_stream_getsockopt): New method.
9325         (camel_tcp_stream_setsockopt): Another new method. I think you get
9326         the idea of what these are for so I won't explain them.
9327
9328 2001-01-14  Jeffrey Stedfast  <fejj@helixcode.com>
9329
9330         * camel-tcp-stream-ssl.[c,h]: New CamelTcpStream class that
9331         implements nspr sockets and eventually will use nss for
9332         SSL/TLS. Currently doesn't do any SSL/TLS but it should still
9333         work. It's functionally equivalent to CamelTcpStreamRaw at the
9334         moment only it uses nspr i/o.
9335
9336         * camel-tcp-stream-raw.[c,h]: New CamelTcpStream class that
9337         implements native sockets. Should be usable but may have some bugs
9338         yet.
9339
9340 2001-01-13  Jeffrey Stedfast  <fejj@ximian.com>
9341
9342         * camel-tcp-stream.[c,h]: New abstract class for TCP streams. The
9343         next step is to write child classes (CamelTcpStreamBSD and
9344         CamelTcpStreamSSL). The BSD stream will use normal BSD sockets
9345         while SSL will use Mozilla's NSPR and NSS libraries to do Secure
9346         Socket Layers which wille ventually replace CamelStreamSSL which I
9347         just commit'd. Oh well.
9348
9349 2001-01-13  Jeffrey Stedfast  <fejj@ximian.com>
9350
9351         * camel-stream-ssl.[c,h]: New stream for handling SSL/TLS
9352         connections.
9353
9354 2001-01-12  Not Zed  <NotZed@Ximian.com>
9355
9356         * camel-folder-thread.c (camel_folder_thread_messages_new):
9357         Perform a final pass, removing any pseudo nodes we added earlier.
9358         Quick patch to test the idea.
9359         (camel_folder_thread_messages_new): Added casts to rmeove some
9360         warnings for the analites out there.
9361
9362 2001-01-11  Dan Winship  <danw@ximian.com>
9363
9364         * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
9365         Fix a bug in previous commit: don't check for deleted messages if
9366         there are no known messages in the folder (because it would end up
9367         sending "FETCH 0 ...").
9368         (imap_copy_message_to): Fix this up: sync flags to the server
9369         before copying so that they end up correct in the remote folder.
9370         And poke the destination folder after doing the copy so it notices
9371         the new message right away.
9372         (imap_move_message_to): Call imap_copy_message_to for most of the
9373         work rather than duplicating the code (since it's much more
9374         complicated now).
9375
9376 2001-01-11  Dan Winship  <danw@ximian.com>
9377
9378         * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
9379         New function to check for added/deleted messages when re-selecting
9380         a folder.
9381         (imap_refresh_info, imap_rescan, imap_update_summary): Various
9382         locking tweaks that turn out to be irrelevant since command_lock
9383         is recursive, but whatever.
9384
9385         * providers/imap/camel-imap-command.c (camel_imap_command): When
9386         selecting a new folder, call camel_imap_folder_selected on it.
9387
9388         * camel-folder.c (camel_folder_copy_message_to): Fix a locking
9389         problem. (One branch of an if statement was returning with the
9390         lock still locked.) Also remove the deprecation comments, to match
9391         move_message_to.
9392
9393 2001-01-10  Jeffrey Stedfast  <fejj@helixcode.com>
9394
9395         * providers/local/camel-local-provider.c: Changed the descriptions
9396         for mh, mbox, and maildir to be more "user-friendly".
9397
9398 2001-01-10  Dan Winship  <danw@helixcode.com>
9399
9400         * providers/imap/camel-imap-types.h: New header to prevent
9401         recursive #include problems
9402
9403         * providers/imap/*.h: Replace some #includes with #include
9404         "camel-imap-types.h", remove typedefs that were moved to
9405         camel-imap-types.h
9406
9407         * providers/imap/*.c: Add #includes to make up for #includes
9408         removed from .h files
9409
9410         * providers/imap/Makefile.am (libcamelimapinclude_HEADERS): Add
9411         camel-imap-types.h
9412
9413 2001-01-10  Dan Winship  <danw@helixcode.com>
9414
9415         * camel-store.c (camel_store_sync): New class function, parallel
9416         to camel_folder_sync. (The default implementation just calls
9417         camel_folder_sync on each cached folder.)
9418
9419         * providers/imap/camel-imap-store.c (get_folder_info): Call
9420         camel_store_sync before doing anything else so that the IMAP
9421         server and Camel are working from the same data. Don't ask the
9422         server for the unread message count of the current folder, since
9423         UW will return often-incorrect cached data, and we can calculate
9424         it without talking to the server anyway.
9425
9426 2001-01-09  Dan Winship  <danw@helixcode.com>
9427
9428         Mostly IMAP changes. Use the NAMESPACE extension (where
9429         available). Deal with servers that don't return LIST flags in
9430         response to LSUB (like UW) to get rid of the "not a selectable
9431         folder" error messages in the UI. Take advantage of the \Marked
9432         and \Unmarked flags to try to speed up the folder scan by not
9433         doing STATUS on unmarked folders. Some further tweaks on the shape
9434         of the resulting folder tree in various situations...
9435
9436         * camel-store.h: Remove the (read) message_count, since nothing
9437         uses it, and we can speed up IMAP a bit this way.
9438
9439         * camel-store.c (camel_folder_info_build): Redo this a bit to make
9440         it more useful for IMAP since that's the only thing that uses it.
9441
9442         * camel-remote-store.c (camel_remote_store_connected): Public
9443         function to check if the store is connected, and try to connect it
9444         if it's not.
9445         (remote_send_string, remote_send_stream, remote_recv_line): Use
9446         that.
9447
9448         * providers/imap/camel-imap-store.c (camel_imap_store_finalize):
9449         fix up for changes.
9450         (camel_imap_store_init): Initialize subscribed_folders to NULL
9451         rather than an empty hash table.
9452         (imap_connect): Get the list of subscribed folders here. If the
9453         server doesn't claim that any of them are either Marked or
9454         Unmarked, then assume that it doesn't do that for LSUB and
9455         remember that for later. If the server supports the NAMESPACE
9456         extension and the user didn't specify a namespace, use the
9457         server-provided one.
9458         (imap_disconnect): Free the list of subscribed folders, and the
9459         namespace.
9460         (get_folder): check camel_remote_store_connected
9461         (get_folder_info): check camel_remote_store_connected. Add a bunch
9462         of new cleverness. If we learned that the server doesn't do LSUB
9463         usefully, do a bunch of LISTs by hand. Then, if we're getting
9464         unread counts, only do it for folders that weren't listed as
9465         Unmarked. Also, deal with namespaces that end with the separator
9466         character, and update for changes to camel_folder_info_build.
9467         (folder_subscribed): Add a g_return_val_if_fail.
9468         (subscribe_folder, unsubscribe_folder): check
9469         camel_remote_store_connected.
9470
9471         * providers/nntp/camel-nntp-store.c (build_folder_info,
9472         build_folder_info_from_grouplist, nntp_store_get_folder_info):
9473         Don't fill in message_count since it doesn't exist any more.
9474
9475 2001-01-09  Dan Winship  <danw@helixcode.com>
9476
9477         Kill off a long-hated Camel kludge: "empty" URLs and
9478         query_auth_types_generic.
9479
9480         * camel-url.c: Remove "empty" from CamelURL.
9481         (camel_url_new): No longer set it.
9482         (camel_url_to_string): Treat "" as equivalent to NULL for
9483         authmech. (Unrelated change, but it simplifies some stuff with the
9484         new config dialog.)
9485
9486         * camel-service.c (camel_service_new): Remove url->empty check: if
9487         the URL isn't valid, we don't create the service.
9488         (camel_service_query_auth_types): No longer need to switch between
9489         generic and connected variants.
9490
9491         * providers/smtp/camel-smtp-transport.c (query_auth_types): 
9492         * providers/pop3/camel-pop3-store.c (query_auth_types): 
9493         * providers/nntp/camel-nntp-store.c (nntp_store_query_auth_types): 
9494         * providers/imap/camel-imap-store.c (query_auth_types): 
9495         * camel-remote-store.c (remote_query_auth_types): Remove generic
9496         version, rename connected version.
9497
9498 2001-01-06  Not Zed  <NotZed@HelixCode.com>
9499
9500         * providers/vee/camel-vee-folder.c (vee_folder_build_folder): Dont
9501         try and unref a messageinfo that wasn't there, and use the right
9502         free function too.  Modified patch from Iain.
9503         (vee_move_message_to): New method, call the real folders'
9504         move_message_to method.
9505
9506 2001-01-04  JP Rosevear  <jpr@helixcode.com>
9507
9508         * tests/lib/Makefile.am: fix includes for compilation
9509
9510         * tests/message/Makefile.am: Build test3 again
9511
9512         * tests/message/test2.c: Kill warnings with header includes
9513
9514         * tests/message/test3.c: ditto
9515
9516         * tests/lib/streams.c: ditto
9517
9518         * tests/lib/camel-test.c: ditto
9519
9520         * tests/lib/messages.c: ditto
9521
9522         * tests/lib/folders.c: ditto
9523
9524 2001-01-04  Dan Winship  <danw@helixcode.com>
9525
9526         * providers/imap/camel-imap-folder.c (imap_rescan): Fix two
9527         problems in figuring out server-expunged messages.
9528
9529 2001-01-04  Not Zed  <NotZed@HelixCode.com>
9530
9531         * camel-folder.c (thaw): If we have a lot of messages changed,
9532         promote it to a folder changed event.
9533
9534 2000-01-03  Jeffrey Stedfast  <fejj@helixcode.com>
9535
9536         * camel-folder-search.c (search_header_matches): Implemented.
9537         (search_header_exists): Implemented.
9538         (search_header_starts_with): Implemented.
9539         (search_header_ends_with): Implemented.
9540
9541 2001-01-03  Christopher James Lahey  <clahey@helixcode.com>
9542
9543         * providers/imap/camel-imap-folder.c (camel_imap_folder_new):
9544         Initialize the exists variable so that we don't do random things
9545         if the imap server misbehaves.
9546
9547 2000-12-29  Not Zed  <NotZed@HelixCode.com>
9548
9549         * camel-folder.c (camel_folder_move_message_to): REmove warning,
9550         this isn't really deprecated, sigh.
9551
9552         * camel-mime-utils.c (header_fold): Comment out some debug.
9553
9554 2001-01-02  Christopher James Lahey  <clahey@helixcode.com>
9555
9556         * providers/maildir/, providers/mbox/, providers/mh/: Removed
9557         these directories since they're unused.
9558
9559 2001-01-02  Dan Winship  <danw@helixcode.com>
9560
9561         IMAP randomness.
9562
9563         * providers/imap/camel-imap-stream.[ch]: Remove. To be replaced.
9564
9565         * providers/imap/Makefile.am (libcamelimapinclude_HEADERS): Remove
9566         camel-imap-stream.h
9567
9568         * providers/imap/camel-imap-utils.c (imap_parse_flag_list): Take a
9569         char ** instead of char *, to return the position at the end of
9570         parsing like the string parsing functions.
9571         (imap_parse_string_generic): New function to parse a string,
9572         nstring, or astring.
9573         (imap_parse_nstring, imap_parse_astring): Now macros
9574         (imap_parse_string): Added
9575
9576         * providers/imap/camel-imap-folder.h: Remove the "exists" field
9577         from CamelImapFolder.
9578
9579         * providers/imap/camel-imap-folder.c: Remove unused include of
9580         camel-imap-stream.h.
9581         (camel_imap_folder_init): Remove no-longer-relevant summary
9582         initialization.
9583         (camel_imap_folder_new): Update for imap_parse_flag_list change,
9584         exists removal, and imap_rescan.
9585         (imap_rescan): New function that does most of the work of the old
9586         imap_refresh_info, but taking "exists" as an argument instead of
9587         getting it from the folder. Also calls camel_imap_folder_changed
9588         to do the summary updating and signalling, rather than duplicating
9589         that code.
9590         (imap_refresh_info): Just call imap_rescan (using the size of the
9591         folder summary as "exists").
9592         (imap_update_summary): Update for imap_parse_flag_list change
9593         (camel_imap_folder_changed): Update for "exists" change.
9594
9595 2001-01-02  Dan Winship  <danw@helixcode.com>
9596
9597         * camel-mime-utils.c (header_content_type_simple): New function to
9598         return just foo/bar with no parameters.
9599
9600         * camel-data-wrapper.c (get_mime_type): Use
9601         header_content_type_simple rather than header_content_type_format.
9602
9603 2000-12-28  Dan Winship  <danw@helixcode.com>
9604
9605         * gmime-content-field.[ch]: Remove this. It was only a thin
9606         wrapper around struct _header_content_type anyway, and didn't
9607         match the naming scheme of anything else.
9608
9609         * Makefile.am: Remove gmime-content-field.[ch]
9610
9611         * camel.h: Remove gmime-content-field.h
9612
9613         * camel-types.h: Add CamelContentType as a typedef for struct
9614         _header_content_type (especially for use outside of camel).
9615
9616         * camel-multipart.c: 
9617         * camel-mime-part.c: 
9618         * camel-mime-message.c: 
9619         * camel-folder-summary.c:
9620         * camel-folder-search.c: 
9621         * camel-data-wrapper.[ch]: Use CamelContentType and
9622         header_content_type_* functions rather than the GMime stuff. 
9623
9624         * camel-mime-part-utils.c: 
9625         * camel-medium.c: Remove unused gmime-content-field.h include.
9626
9627 2000-12-27  Dan Winship  <danw@helixcode.com>
9628
9629         * providers/pop3/camel-pop3-store.c (connect_to_server): Fix the
9630         APOP check to not crash on servers that don't return any
9631         information on the +OK greeting line.
9632
9633 2000-12-24  Not Zed  <NotZed@HelixCode.com>
9634
9635         * providers/imap/camel-imap-search.c (imap_body_contains): Lock
9636         the command channel while searching.
9637         (imap_body_contains): If performing a whole uid search, then add
9638         references to our own summary items, dont look it up in the
9639         folder.  This way they can't vanish unexpectedly.
9640
9641         * providers/imap/camel-imap-folder.h (CamelImapFolder): Added a
9642         private field.
9643         (CamelImapFolder): Removed summary again from here.
9644
9645         * providers/imap/camel-imap-private.h: Added lock for imap
9646         searches.
9647
9648         * Merge from camel-mt-branch.
9649         
9650         * providers/imap/camel-imap-folder.c (imap_update_summary): Merge
9651         fix, use the folder->summary.
9652         (imap_get_message_flags, imap_set_message_flags,
9653         imap_get_message_user_flag, imap_set_message_user_flag): Removed
9654         again.
9655         (camel_imap_folder_init): Setup private data/lock.
9656         (imap_finalize): Free private data/search lock.
9657         (imap_search_free): Lock the search_lock.
9658         (imap_search_by_expression): Lock the search lock when using the
9659         search object.  Also copy/ref hte summary, rather than getting it
9660         directly.
9661         (imap_refresh_info): Free any info lookups.  Use folder->summary
9662         not imap_folder->summary.  And lock around commands.
9663         (camel_imap_folder_changed): Use folder->summary again.
9664         (camel_imap_folder_changed): Make sure we unref the summary lookup.
9665
9666 2000-12-22  Dan Winship  <danw@helixcode.com>
9667
9668         * providers/imap/camel-imap-store.c (get_folder_info): When
9669         getting the top-level folder list, include INBOX even if it's not
9670         subscribed. Don't show subscribed folders outside of the given
9671         namespace. Do a better job of pruning the namespace from the
9672         returned folder tree.
9673
9674 2000-12-21  Dan Winship  <danw@helixcode.com>
9675
9676         * providers/imap/camel-imap-search.c: New CamelFolderSearch
9677         subclass that just reimplements body_contains (using the IMAP
9678         SEARCH command). All other kinds of searching are done against the
9679         local summary.
9680
9681         * providers/imap/camel-imap-folder.c (imap_search_by_expression):
9682         Use a CamelImapSearch to do searching.
9683
9684         * providers/imap/camel-imap-utils.c (imap_translate_sexp, etc): No
9685         longer needed.
9686
9687         * camel-folder-search.h: Add missing CAMEL_FOLDER_SEARCH_TYPE
9688         #define
9689
9690 2000-12-21  Dan Winship  <danw@helixcode.com>
9691
9692         * camel-stream-buffer.c (camel_stream_buffer_gets): Update the
9693         doc comment: since it always NUL-terminates the buffer, it reads
9694         at most @max-1 bytes, not @max.
9695
9696         * camel-remote-store.c (remote_recv_line): Fix the "did
9697         camel_stream_buffer_gets fill the whole buffer" check. Fixes a bug
9698         when reading lines longer than 1024 characters (eg, IMAP SEARCH
9699         responses in very large folders).
9700
9701 2000-12-19  Dan Winship  <danw@helixcode.com>
9702
9703         * providers/imap/camel-imap-folder.c (imap_refresh_info): Oops.
9704         Don't do "FETCH 1:0" when the folder is empty.
9705         (imap_protocol_get_summary_specifier): Request RFC822.SIZE too.
9706         (imap_update_summary): Parse RFC822.SIZE and add it to the
9707         summary.
9708
9709 2000-12-18  Dan Winship  <danw@helixcode.com>
9710
9711         * providers/imap/camel-imap-summary.c: Add "guint32 server_flags"
9712         to CamelImapMessageInfo to keep track of the last known message
9713         flag state on the server.
9714         (message_info_save, message_info_load): Save/load the
9715         server_flags.
9716
9717         * providers/imap/camel-imap-folder.c: Make this use
9718         CamelFolderChangeInfo and emit folder_changed notifications as it
9719         gets them rather than only on refresh_info.
9720         (imap_refresh_info): Notice flags that get cleared on the server
9721         as well as flags that get set.
9722         (imap_update_summary): Remove a comment that never actually
9723         applied to the committed code.
9724
9725 2000-12-15  Dan Winship  <danw@helixcode.com>
9726
9727         * providers/imap/camel-imap-command.c (camel_imap_command): Change
9728         the semantics of fmt: Now %S (capital S) means an IMAP "string",
9729         (which can be sent as either a quoted string or a literal). If
9730         the server supports LITERAL+, these will be sent as extended
9731         literals (which don't require any special escaping). Otherwise
9732         they'll be sent as quoted strings (and it now properly deals with
9733         " or \ in the string).
9734         (imap_command_strdup_vprintf): Utility routine that does the real
9735         work for the functionality mentioned above.
9736
9737         * providers/imap/camel-imap-utils.c (imap_quote_string): Turns a
9738         string into a proper IMAP "quoted string".
9739
9740         * providers/imap/camel-imap-store.c: 
9741         * providers/imap/camel-imap-folder.c: Use %S instead of "%s" where
9742         appropriate.
9743
9744 2000-12-22  Not Zed  <NotZed@HelixCode.com>
9745
9746         * camel-folder-summary.c (GLOBAL_INFO_UNLOCK): Doh, cut and paste
9747         victim again, call unlock instead of lock!
9748         (summary_assign_uid): Unlock around trying to get a new uid, if we
9749         have a clash.
9750
9751 2000-12-21  Not Zed  <NotZed@HelixCode.com>
9752
9753         * tests/folder/Makefile.am (TESTS): reenabled the tests here.
9754
9755         * providers/nntp/camel-nntp-newsrc.c (CamelNNTPNewsrc): Add a
9756         lock.  Made completely mt-safe.  Sigh, this is all so i can
9757         support snooping of the set_flags stuff inside camel-nntp-folder,
9758         since i've removed the global folder lock from all of the other
9759         folder summary operations.
9760         (camel_nntp_newsrc_read_for_server): Setup lock.
9761         (camel_nntp_newsrc_get_highest_article_read): Lock internal access.
9762         (camel_nntp_newsrc_get_num_articles_read): 
9763         (camel_nntp_newsrc_mark_article_read): 
9764         (camel_nntp_newsrc_mark_range_read): 
9765         (camel_nntp_newsrc_article_is_read): 
9766         (camel_nntp_newsrc_group_is_subscribed): 
9767         (camel_nntp_newsrc_unsubscribe_group): 
9768         (camel_nntp_newsrc_subscribe_group): 
9769         (camel_nntp_newsrc_get_subscribed_group_names): 
9770         (camel_nntp_newsrc_get_all_group_names): "
9771         (camel_nntp_newsrc_write_to_file): Lock internal accesses.
9772         (camel_nntp_newsrc_write): Lock around diry stuff.
9773
9774         * providers/local/camel-maildir-summary.c (maildir_summary_check):
9775         Lock around our internal poking of the summary hashtable/array.
9776         (maildir_summary_sync): And the same here too.
9777
9778         * camel-folder-summary.c: Moved the summaryprivate data into
9779         camel-private.h.  Only needed for the locks really.
9780         (camel_folder_summary_init): Setup locks.
9781         (camel_folder_summary_set_filename): Lock.
9782         (camel_folder_summary_index): lock
9783         (camel_folder_summary_uid): Lock
9784         (camel_folder_summary_next_uid): "
9785         (camel_folder_summary_set_uid): "
9786         (camel_folder_summary_load): Lock around whole load.  Hrm,
9787         probably not required.
9788         (camel_folder_summary_save): Lock around whole save, this is
9789         reqwuired, unless we ref/copy the whole list first, and i couldn't
9790         be bothreed.
9791         (camel_folder_summary_add): lock
9792         (summary_assign_uid): Lock around internal accesses.
9793         (camel_folder_summary_info_new_from_parser): Lock around filtr stuff.
9794         (camel_folder_summary_info_ref): Add locking.  Could probably use
9795         its own lock?
9796         (camel_folder_summary_touch): Add locking, likewise.
9797         (camel_folder_summary_clear): Lock.  If the preiovus two are
9798         changed, then so this will need mroe locking.
9799         (camel_folder_summary_info_free): Lock around refcounting.
9800         (camel_folder_summary_remove): Locking.
9801         (camel_folder_summary_remove_uid): Lock ref, unlock, unref.  Also
9802         fixed a bug that would have made this never work, freeing the key,
9803         which isn't allocated.
9804         (camel_folder_summary_remove_index): lock, ref, unlock unref also.
9805         (camel_message_info_ref): Lock using a separate global lock, since
9806         we have no context here.
9807         (camel_message_info_free): Here too.
9808         (content_info_alloc): Use an alocation lock here.  avoids races
9809         with setting up content_info_chunks, etc.
9810         (camel_folder_summary_info_new): And here too.
9811         (camel_folder_summary_load): Changed to use a differnet lock for
9812         loading/saving.
9813         (camel_folder_summary_init): Doh, i do need a reflock afterall,
9814         set one up.
9815         (camel_folder_summary_finalize): Free it.
9816         (camel_folder_summary_index): Add a reflock.
9817         (camel_folder_summary_uid): And here too.
9818         (camel_folder_summary_info_free): Use reflock instead of
9819         summary_lock.
9820         (camel_folder_summary_info_ref): Likewise.
9821         (camel_folder_summary_remove_uid): Add reflocking.
9822         (camel_folder_summary_remove_index): And here too.
9823
9824         * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Setup a
9825         summary object.
9826         (vee_folder_build): Build each item into the real summary object.
9827         (vee_folder_add, vee_folder_add_uid, vee_folder_add_change): New
9828         functions to add a single record to the vfolder summary.
9829         (vee_folder_build_folder): Use a real summary.
9830         (vee_get_uids): Removed, use default impl.
9831         (vee_free_message_info): "
9832         (vee_get_message_info): "
9833         (vee_get_summary): "
9834         (vee_get_unread_message_count): "
9835         (vee_get_message_count): "
9836         (vee_sync): Make vee-folder-sync sync all subordinate folders.
9837         Well i dont think this is right, but enough peopl ehave aksed for
9838         it.
9839         (vee_expunge): Same for expunge.
9840         (vee_set_message_flags): Call parent class, then mirror flags to
9841         subfolder.
9842         (vee_get_message_user_flag): Removed, we just use the default
9843         impl, and our flags should always match.
9844         (vee_set_message_user_flag): Snoop the set and set on subfolder.
9845         (vee_get_message_flags): Removed, jsut use parent impl, assume our
9846         copy matches the real ones.
9847         (get_real_message): Removed.  We sort ofneed to keep the
9848         summaryitem refed while we use it, so this doesn't make as much
9849         sense as it did once.
9850         (camel_vee_folder_finalise): Unhook listening events as we unref
9851         folders.
9852         (camel_vee_folder_new): Set the summary messageinfo data size
9853         properly.
9854         (vfolder_remove_match): Fixed for summary change.
9855         (folder_changed): ditto.  Also stopped changed items from being
9856         re-searched and possibly removed.  Might have to resort to the old
9857         whole-search idea again.
9858         (message_changed): Similarly.  Might be easier just not to bother
9859         with a whole search.
9860
9861         * providers/vee/camel-vee-folder.h: Removes summary
9862         hashtable/array, and use a real summary object.  Sigh, more work.
9863
9864         * providers/nntp/camel-nntp-folder.c (nntp_folder_sync): Move
9865         summary to folder object.
9866         (nntp_folder_get_message_count): Removed, use default impl.
9867         (nntp_folder_set_message_flags): Call parent impl to do the work,
9868         but snoop for newsrc.
9869         (nntp_folder_get_uids): Removed, use default impl.
9870         (nntp_folder_get_summary): "
9871         (nntp_folder_get_message_info): "
9872         (nntp_folder_free_message_info): "
9873         (camel_nntp_folder_new): moved summary to folder class
9874         
9875         * providers/imap/camel-imap-folder.c (camel_imap_folder_init):
9876         Move summary to folder object.
9877         (camel_imap_folder_new): "
9878         (imap_finalize): No longer unref the summary (or infact, do
9879         anything else either).
9880         (imap_refresh_info): move summary to folder object.
9881         (imap_sync): "
9882         (imap_get_message_count): Removed, use default impl.
9883         (imap_get_unread_message_count): "
9884         (imap_get_uids): "
9885         (imap_get_summary): "
9886         (imap_free_summary): "
9887         (imap_get_message_info): "
9888         (imap_free_message_info): "
9889         (imap_get_message_flags): "
9890         (imap_set_message_flags): "
9891         (imap_get_message_user_flag): ", this changes functionality, but
9892         only by providing non-permanent flags.
9893         (imap_set_message_user_flag): "
9894         (imap_update_summary): move summary to folder object, and use
9895         camel_folder_summary_info_new_from_header, instead of calling the
9896         virtual function directly.
9897
9898         * providers/local/camel-maildir-folder.c (maildir_append_message):
9899         move summary to folder object, again.
9900         (maildir_get_message): "
9901
9902         * providers/local/camel-mh-folder.c (mh_append_message): move
9903         summary to folder object.
9904         (mh_get_message): "
9905
9906         * providers/local/camel-mbox-folder.c (mbox_append_message): Move
9907         summary to folder object
9908         (mbox_get_message): "
9909         (mbox_set_message_user_flag): We need our own copy of this, sigh,
9910         so we can track if the xev needs a rewrite (probably, its only a
9911         guide anyway).
9912         (mbox_set_message_user_tag): Same same with this one.
9913         (camel_mbox_folder_class_init): Link in these new virtual functions.
9914
9915         * providers/local/camel-local-folder.h (CamelLocalFolder): removed
9916         summary.
9917
9918         * providers/local/camel-local-folder.c (local_get_message_count): 
9919         (local_get_unread_message_count): 
9920         (local_get_uids): 
9921         (local_get_summary): 
9922         (local_free_summary): 
9923         (local_get_message_info): 
9924         (local_free_message_info): 
9925         (local_get_message_flags): 
9926         (local_set_message_flags): 
9927         (local_get_message_user_flag): 
9928         (local_set_message_user_flag): 
9929         (local_get_message_user_tag): 
9930         (local_set_message_user_tag): Removed, all now use default
9931         implementation.
9932         (camel_local_folder_class_init): Removed overrides.
9933         (local_init): Clear folder->summary.
9934         (local_finalize): move summary to folder.
9935         (camel_local_folder_construct): "
9936         (local_sync): "
9937
9938         * camel-folder.c (free_summary): Provide a real impl.
9939         (get_summary): "
9940         (free_uids): "
9941         (get_uids): "
9942         (free_message_info): "
9943         (get_message_info): "
9944         (set_message_user_tag): "
9945         (get_message_user_tag): "
9946         (set_message_user_flag): "
9947         (get_message_user_flag): "  Sigh, the last so far.
9948         (get_message_flags): Sigh, 1 more afterall.
9949         (get_unread_message_count): And and this.
9950         (get_message_count): and this!
9951         (set_message_flags): Sigh, and this.
9952         (camel_folder_finalize): Unref the summary if we have it.
9953         (camel_folder_free_uids): Remove locking.
9954         (camel_folder_get_message_flags): Remove locks, since the summary
9955         is now mt-safe.
9956         (camel_folder_set_message_flags): "
9957         (camel_folder_get_message_user_flag): "
9958         (camel_folder_set_message_user_flag): "
9959         (camel_folder_get_message_user_tag): "
9960         (camel_folder_set_message_user_tag): "
9961         (camel_folder_get_message_info): "
9962         (camel_folder_free_message_info): "
9963         (camel_folder_get_uids): "
9964         (camel_folder_free_summary): "
9965         (camel_folder_get_unread_message_count): "
9966         (get_unread_message_count): Check we got info, no big deal, but
9967         the summary might change while we're counting, and upset the count
9968         slightly.
9969         (camel_folder_get_message_count): Remove locks.
9970
9971         * camel-folder.h (struct _CamelFolder): Added CamelFolderSummary
9972         to the base folder object.  Sigh, this is going to be a lot of
9973         work ...
9974
9975         * camel-service.c (camel_service_init, finalise): changed
9976         connect_lock to be recursive e_mutex.
9977
9978         * camel-remote-store.c (camel_remote_store_init, finalise): Changed
9979         stream_lock to recursive e_mutex.
9980
9981         * camel-private.h (RemoteStorePrivate, ServicePrivate): Use
9982         recursive mutexes for connect_lock & stream_lock.  Ick.  Because
9983         of the imap code.
9984
9985         * providers/imap/camel-imap-private.h: Change the command_lock to
9986         be an EMutex.
9987
9988         * providers/imap/camel-imap-store.c (connect_to_server): Removed
9989         the command_lock stuff.  If we are just connected again, it should
9990         be safe to assume we have exclusive access at this point without
9991         it (and yes, removes a deadlock).
9992         (imap_create): Remove a lock that wasn't even supposed to be
9993         there.
9994         (camel_imap_store_finalize, init): g_mutex->e_mutex(E_MUTEX_REC).
9995         Use a recursive mutex since the imap code is multiply recursivly
9996         calling some functions (sigh, it would be nice to fix this).
9997
9998 2000-12-20  Not Zed  <NotZed@HelixCode.com>
9999
10000         * camel-folder.c (folder_changed): Change the locks to inside the
10001         if.  Stops a deadloc,k and we dont need a lock to read a value.
10002         (message_changed): Likewise.
10003
10004         * camel.c (camel_init): Blah, comment out g_thread_init, leave it
10005         to the caller, since it can only ever be done once.
10006
10007         * camel-folder-thread.c (camel_folder_thread_messages_new): Ref
10008         and save the folder in the thread return.  Also get the summary
10009         once, and access that for the messageinfo's.  Added bonus that now
10010         threads should come out in a similar order.  We need to do this so
10011         that the messageinfo's dont get unref'd under us, and using the
10012         summary directly simplifies memory management.
10013         (camel_folder_thread_messages_destroy): Free the summary/unref the
10014         folder.
10015
10016         * camel-folder-thread.h: Add a folder to CamelFolderThread struct.
10017
10018 2000-12-19  Not Zed  <NotZed@HelixCode.com>
10019
10020         * providers/imap/camel-imap-utils.c (imap_translate_sexp): Unref
10021         using e_sexp_unref, since it is no longer an object.
10022
10023         * tests/lib/camel-test.c: Added a global lock, and made it
10024         thread-aware.
10025
10026         * camel-exception.c: Add a global lock.  Not sure its really
10027         needed here, but it doesn't really hurt.
10028         (camel_exception_clear): Lock around access.
10029         (camel_exception_set): Same.
10030         (camel_exception_setv): "
10031         (camel_exception_xfer): "
10032
10033         * providers/local/Makefile.am (noinst_HEADERS): Added, for
10034         camel-local-private.h
10035
10036         * camel-folder.c (camel_folder_search_by_expression): Removed
10037         locking here, now upto the implementing class to lock.
10038         (camel_folder_search_free): Removed the folder lock here too, for
10039         consistency really, and the locking probably wasn't needed.
10040
10041         * providers/local/camel-local-folder.c (local_get_summary):
10042         Changed to copy/ref the summary items.
10043         (local_free_summary): Unref the summary items/free the array.
10044         (local_get_unread_message_count): Free info lookups.
10045         (local_search_by_expression): Perform more fine-grained locking,
10046         and dont lock the whole folder while searching, just the search
10047         object.  Dum de dum, it *would* be possible to not even have to
10048         lock the search, by using our own copy of the search object each
10049         time.  Could be investigated.
10050         (local_init): Init priaate data/lock.
10051         (local_finalize): Free private data/lock.
10052         (local_search_free): Also lock around the search object, because
10053         it accesses global data inside.
10054
10055         * README.mt: Some info about the mt code development.
10056
10057         * camel-folder-search.c (match_message): Put in a warning, this
10058         plain deadlocks so far, but i'm going to bed now.
10059         (camel_folder_search_finalize): Use e_sexp_unref() since its no
10060         longer an object.
10061
10062         * camel-session.c (camel_session_init): Init private data/lock.
10063         (camel_session_finalise): Free private data/lock.
10064         (camel_session_register_provider): Lock hash insert.
10065         (service_cache_remove): Lock.
10066         (camel_session_list_providers): "
10067         (camel_session_get_service): Lock the whole function.
10068
10069         * camel-session.h (struct _CamelSession): Added private data.
10070
10071         * providers/imap/camel-imap-store.c (camel_imap_store_init): Setup
10072         private data.
10073         (camel_imap_store_finalize): Free private data.
10074         (connect_to_server): Lock around command calls.  I dont think its
10075         needed, but it shouldn't hurt either.
10076         (imap_connect): Lock around command calls.  Again, I don think it
10077         is needed, but wont hurt.
10078         (imap_disconnect): ditto for this one.
10079         (imap_create): Lock around command.
10080         (get_folder): "
10081         (get_folder_info): "
10082         (subscribe_folder): "
10083         (unsubscribe_folder): "
10084         (imap_keepalive): "
10085
10086         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Lock
10087         around calling a command.
10088         (imap_refresh_info): Likewise.
10089         (imap_sync): "
10090         (imap_append_message): "
10091         (imap_copy_message_to): "
10092         (imap_move_message_to): "
10093         (imap_get_message): "
10094         (imap_update_summary): "
10095         (imap_search_by_expression): ", also minor logic cleanup.
10096         (imap_get_summary): Copy/ref the summary items.
10097         (imap_free_summary): And free it now too.
10098
10099         * providers/imap/camel-imap-auth.c (imap_try_kerberos_v4_auth):
10100         Lock the command stream for the command session.
10101
10102         * providers/imap/camel-imap-private.h: Private (locking info)
10103         stuff for imap provider.
10104         (CAMEL_IMAP_STORE_UNLOCK): Fix to call unlock, rather than lock!
10105
10106         * camel-service.c (camel_service_query_auth_types): Lock also for
10107         the connection here, incase the service needs to connect.
10108
10109         * camel-remote-store.c (camel_remote_store_init): Init private
10110         data/lock.
10111         (camel_remote_store_finalise): Readded, free private data/lock.
10112         (remote_send_stream): Changed to return the number of bytes
10113         written, like a good little stream function should.
10114         (camel_remote_store_send_string): Lock for stream access.
10115         (camel_remote_store_send_stream): Same here.
10116         (camel_remote_store_recv_line): And here.
10117         (camel_remote_store_refresh_folders): Lock the store for cache
10118         access.
10119         (timeout_cb): Lock for stream access.
10120
10121 2000-12-18  Not Zed  <NotZed@HelixCode.com>
10122
10123         * camel-service.c (camel_service_init): Init private data.
10124         (camel_service_finalise): Free private data.
10125         (camel_service_connect): Lock around connection access.
10126         (camel_service_disconnect): "
10127
10128         * camel-service.h (struct _CamelService): Added private field.
10129
10130         * camel-store.c (camel_store_init): Init private data/lock.
10131         (camel_store_finalize): Free private data/lock.
10132         (camel_store_get_folder): Lock internal calls.
10133         (camel_store_delete_folder): "
10134         (camel_store_rename_folder): "
10135         (camel_store_get_root_folder): "
10136         (camel_store_get_default_folder): "
10137         (camel_store_get_folder_info): "
10138         (camel_store_folder_subscribed): "
10139         (camel_store_subscribe_folder): "
10140         (camel_store_unsubscribe_folder): "
10141         (lookup_folder): Lock accesses to the folder cache.
10142         (cache_folder): "
10143         (uncache_folder): And here too.
10144
10145         * camel-store.h (struct _CamelStore): Added a private field.
10146
10147         * Makefile.am (noinst_HEADERS): Add camel-private.h.  There is a
10148         comment in that header as to why it ins't installed.
10149
10150         * camel-private.h: New header for private data, that subclasses
10151         can get to.
10152
10153         * tests/lib/camel-test.c (camel_test_init): If we do have threads
10154         enabled already, dont call g_thread_init().
10155         
10156         * tests/lib/folders.c (test_folder_counts): Add free of info.
10157         (test_folder_message): And here too.
10158
10159         * providers/local/camel-maildir-summary.c (remove_summary): Free
10160         info.
10161         (maildir_summary_check): Free info lookups.
10162
10163         * providers/local/camel-mh-summary.c (message_info_new): Removed,
10164         didn't add value.
10165         (remove_summary): free info after being used.
10166         (mh_summary_check): Free info lookups.
10167         (mh_summary_sync): and here too.
10168
10169         * providers/local/camel-mbox-summary.c (summary_update): Free info
10170         lookups.
10171         (mbox_summary_sync_full): Likewise.
10172         (mbox_summary_sync_quick): And here.
10173         (mbox_summary_sync):  ... and here.
10174
10175         * providers/local/camel-maildir-folder.c (maildir_get_message):
10176         Free messageinfo lookups.
10177
10178         * providers/local/camel-mh-folder.c (mh_get_message): Free
10179         messageinfo lookups.
10180
10181         * providers/local/camel-mbox-folder.c (mbox_get_message): Free
10182         messageinfo lookups.
10183
10184         * providers/local/camel-local-summary.c
10185         (message_info_new_from_message): Removed, since it wasn't doing
10186         anything useful.
10187         (message_info_new_from_parser): Same.  And some other dead code.
10188
10189         * providers/local/camel-local-folder.c (local_get_message_info):
10190         deconstify.
10191         (local_free_message_info):new func to free info.
10192         (local_get_uids): 
10193         (local_get_message_flags): 
10194         (local_set_message_flags): 
10195         (local_get_message_user_flag): 
10196         (local_set_message_user_flag): 
10197         (local_get_message_user_tag): 
10198         (local_set_message_user_tag): Free all info lookups.
10199         (local_expunge): Dont call camel_folder_* functions, to avoid a deadlock.
10200
10201         * providers/nntp/camel-nntp-folder.c
10202         (nntp_folder_get_message_info): deconstify.
10203         (nntp_folder_free_message_info): Free summary item.
10204         (nntp_folder_get_message_flags): Free summary lookup.
10205         (nntp_folder_set_message_flags): and here.
10206         (nntp_folder_get_uids): And here.
10207
10208         * providers/imap/camel-imap-auth.c: Make base64_*_simple optional
10209         with the HAVE_KRB4 flag.
10210
10211         * providers/imap/camel-imap-folder.c (imap_free_message_info):
10212         Added a free of the message info.
10213         (imap_refresh_info): 
10214         (imap_sync): 
10215         (imap_refresh_info): 
10216         (imap_get_unread_message_count): 
10217         (imap_get_uids): 
10218         (imap_get_message_flags): 
10219         (imap_set_message_flags): Free any summary lookups.
10220         (imap_get_message_flags): Get the message info directly from the
10221         summary, not via the folder interface.
10222         (imap_move_message_to): Dont call folder functions directly
10223         (delete_message), as it will deadlock since we already have the
10224         lock.
10225
10226         * providers/vee/camel-vee-folder.c (vee_free_message_info): Free/unref
10227         the messageinfo.
10228         (vee_get_message_info): First ref the internal copy, then return it.
10229         (folder_changed): Free all got message info's.
10230         (message_changed): And here.
10231         (get_real_message): And here.
10232         (vee_folder_build): and here.
10233         (vee_folder_build_folder): ... and here.
10234
10235         * camel-folder-summary.c (camel_folder_summary_info_new):
10236         Initialise the messageinfo refcount to 1.
10237         (camel_folder_summary_info_free): Down the refcount till we need
10238         to free.
10239         (camel_folder_summary_info_ref): New function to up the refcount.
10240         (camel_message_info_dup_to): Sewt the refcount of the dest to 1.
10241         (camel_message_info_new): Set refcount to 1.
10242         (camel_message_info_new_from_header): Dont allocate the mi
10243         ourselves.
10244         (camel_message_info_free): Handle refcounting.
10245         (camel_message_info_ref): New function.
10246         (camel_folder_summary_index): Ref the messageinfo before returning
10247         it.
10248         (camel_folder_summary_uid): Likewise.
10249         (camel_folder_summary_save): Access the messageinfo array
10250         directly, rather than through accessors (saves ref/unref).
10251         (camel_folder_summary_clear): Likewise.
10252         (camel_folder_summary_remove_index): Likewise.
10253         (main): Free lookups.
10254
10255         * camel-folder-summary.h (CamelMessageInfo): Added a refcount
10256         value.
10257
10258         * camel-folder.c (camel_folder_free_message_info): New function to
10259         'free' a message info.
10260         (camel_folder_get_message_info): Deconstify return.
10261         (camel_folder_lock): New (internal) function to thread-lock the
10262         folder.
10263         (camel_folder_unlock): Likewise for unlocking.
10264         (freeze): 
10265         (thaw): Lock around access to folder->frozen/changed_frozen.
10266         (folder_changed): Likewise.
10267         (message_changed): Likewise.
10268         (camel_folder_init): Init private data, locks and moved frozen
10269         info.
10270         (camel_folder_finalize): Free new private data, locks and moved
10271         frozen info.
10272         (copy_message_to): Free the messageinfo after we've used it.
10273         (move_message_to): And here too.
10274         (camel_folder_sync): Lock around virtual method invocation.  Just
10275         locking around any virtual method that is known to need it.  This
10276         is the first cut at locking.
10277         (camel_folder_refresh_info): "
10278         (camel_folder_expunge): "
10279         (camel_folder_get_message_count): "
10280         (camel_folder_get_unread_message_count): "
10281         (camel_folder_append_message): "
10282         (camel_folder_set_message_flags): "
10283         (camel_folder_get_message_flags): "
10284         (camel_folder_get_message_user_flag): "
10285         (camel_folder_set_message_user_flag): "
10286         (camel_folder_get_message_user_tag): "
10287         (camel_folder_set_message_user_tag): "
10288         (camel_folder_get_message): "
10289         (camel_folder_get_uids): "
10290         (camel_folder_free_uids): "
10291         (camel_folder_get_summary): "
10292         (camel_folder_search_by_expression): "
10293         (camel_folder_free_summary): "
10294         (camel_folder_search_free): "
10295         (camel_folder_move_message_to): "
10296         (camel_folder_copy_message_to): "
10297         (copy_message_to): Dont call any of our own folder functions
10298         directly, otherwise we will deadlock.
10299         (move_message_to): Likewise.
10300
10301         * camel-folder.h (CamelFolder): Added free_message_info() function
10302         & deconstify get_message_info()'s return.
10303         (CamelFolder): Add a private field (for locks).
10304         (struct _CamelFolder): Moved changed_changed/frozen into private
10305         data, since it really is private and now needs locked access.
10306
10307 2000-12-15  Jeffrey Stedfast  <fejj@helixcode.com>
10308
10309         * camel-mime-utils.c (header_fold): When checking to see if we
10310         need to fold the header, when we come accross a \n, make sure to
10311         start at p + 1 the next time through the loop or else we get into
10312         an infinite loop.
10313
10314 2000-12-13  Dan Winship  <danw@helixcode.com>
10315
10316         * Namespace cleanup: change a bunch of IS_CAMEL_* macros to
10317         CAMEL_IS_*
10318
10319 2000-12-13  Chris Toshok  <toshok@helixcode.com>
10320
10321         * providers/imap/camel-imap-auth.c: add #include <sys/types.h> for
10322         freebsd.
10323
10324 2000-12-12  Christopher James Lahey  <clahey@helixcode.com>
10325
10326         * camel-folder-summary.c, camel-folder-summary.h: Added #ifndef
10327         NO_WARNINGS around a #warning.  Added (void) to the prototype and
10328         declaration of camel_message_info_new.
10329
10330         * camel-mime-message.h: Added an include for
10331         camel-mime-filter-bestenc.h.  Added a prototype for
10332         camel_mime_message_set_best_encoding.  Reformatted prototypes to
10333         line up.
10334
10335         * camel-mime-parser.c: Added #if d(!)0 around the states string
10336         lookup table since it's only used in debugging output.
10337
10338         * camel-seekable-substream.c (stream_flush): Added a cast.
10339
10340         * providers/imap/camel-imap-auth.c: Added #include <netinet/in.h>.
10341
10342         * providers/imap/camel-imap-folder.c (imap_refresh_info): Made uid
10343         and flags const to fix warnings here.
10344
10345         * providers/imap/camel-imap-store.c (get_folder_info): Made p
10346         const to fix warnings here.
10347
10348 2000-12-12  Dan Winship  <danw@helixcode.com>
10349
10350         * tests/lib/Makefile.am: Add missing .h file. (From campd.)
10351
10352 2000-12-11  Not Zed  <NotZed@HelixCode.com>
10353
10354         * providers/smtp/camel-smtp-transport.c (smtp_data): Remove use of
10355         linewrap filter.  Headers are now wrapped.  encode_8bit already
10356         enforces a 998 octet line limit.
10357         (smtp_data): Also fixed a memleak, we always have to unref our own
10358         copy of the filters.  We also dont need to remove them manually,
10359         so dont bother.  The type's an int too ...
10360
10361         * camel-internet-address.c (internet_unformat): When scanning past
10362         quotes, remove them also.
10363         (camel_internet_address_format_address): If the name contains "'s,
10364         or ','s then strip and quotes and wrap the whole lot in one set of
10365         quotes.
10366         
10367         * Makefile.am (noinst_HEADERS): We dont want to install
10368         camel-charset-map-private.h, ever.  There are probably other
10369         similar files ..?
10370
10371         * camel-mime-part.c (write_to_stream): Fold header lines
10372         appropriately as we're writing them out.
10373
10374         * camel-mime-utils.c (header_fold): Add a new argument, headerlen,
10375         tells it how long the associated header token is.
10376         (header_fold): Also,k check to see if we need to fold first, using
10377         a better algorithm, and also accept already-folded lines, and
10378         re-process accordingly.
10379         (rfc2047_decode_word): Add a little buffer space to iconv output
10380         for shifting overheads?
10381         (rfc2047_decode_word): finish the iconv with a null call, to flush
10382         shift state, etc.
10383         (rfc2047_encode_word): Attempt to break up long words into
10384         appropriately sized, independent, chunks.  See rfc2047, section 2.
10385         (header_decode_mailbox): Dont add in extra spaces into the output
10386         if we are decoding adjacent encoded words.  We can only guess this
10387         case, as some broken mailers put encoded words inside quoted
10388         words.
10389         (header_encode_phrase): Dont merge words if they are going to end
10390         up too long.  Also change back ot only merge consecutive words of
10391         the same type.  e.g. 'foo. blah fum.' -> "foo." blah "fum."  or
10392         'iam an. idiot' -> iam "an." idiot
10393
10394         * camel-medium.c (camel_medium_set_header): Hrm, we actually want
10395         to call set_header, not add_header here, probably explains some
10396         duplicate X-Evolution headers i was trying to track down.  Also
10397         changed the api to handle a NULL value == remove the header.
10398
10399         * providers/local/camel-maildir-summary.c
10400         (maildir_summary_decode_x_evolution): Always return error, we dont
10401         use x-evolution for maildir.
10402         (maildir_summary_encode_x_evolution): Always return a NULL string,
10403         likewise.
10404         (maildir_summary_add): Hook in here, since the _new function
10405         doesn't have access to any flags from the caller.  If we have
10406         flags, then update the filename again.  Not ideal, but should
10407         work.
10408
10409 2000-12-08  JP Rosevear  <jpr@helixcode.com>
10410
10411         * tests/message/Makefile.am: Remove test3 from build until the files
10412         show up
10413         
10414 2000-12-09  Not Zed  <NotZed@HelixCode.com>
10415
10416         * camel-mime-message.c (camel_mime_message_set_date): Change the
10417         sign of the default date offset when none is supplied.
10418         (camel_mime_message_set_date): Also do dst if its dst (forward 1
10419         hour).  Fixes #928 + some.
10420
10421 2000-12-06  Not Zed  <NotZed@HelixCode.com>
10422
10423         * tests/lib/camel-test.h (check): Change line no format so that
10424         emacs can detect it.
10425
10426 2000-12-06  Jeffrey Stedfast  <fejj@helixcode.com>
10427
10428         * providers/imap/camel-imap-folder.c (imap_refresh_info): We want
10429         to bitwise-or the server and cached flags here so that we keep the
10430         flags that we have set locally and set any additional flags that a
10431         parallel connection may have set.
10432
10433 2000-12-05  Jeffrey Stedfast  <fejj@helixcode.com>
10434
10435         * providers/smtp/camel-smtp-transport.c (smtp_data): If the data
10436         wrapper fails to be written to the stream, unref it and the
10437         filters before returning.
10438
10439 2000-12-05  Dan Winship  <danw@helixcode.com>
10440
10441         * providers/imap/camel-imap-folder.c (imap_get_message): use
10442         BODY.PEEK[] rather than RFC822, so the message doesn't get marked
10443         as \Seen.
10444         (imap_refresh_info): Fix a really really really dumb bug.
10445
10446 2000-12-05  Dan Winship  <danw@helixcode.com>
10447
10448         * providers/imap/camel-imap-folder.c (imap_set_message_flags): Fix
10449         the check for "flags aren't actually changing".
10450
10451         * providers/local/camel-local-folder.c (local_set_message_flags,
10452         local_set_message_user_flag, local_set_message_user_tag): Don't
10453         emit message_changed unless the flags actually changed.
10454
10455         * providers/nntp/camel-nntp-folder.c
10456         (nntp_folder_set_message_flags): Don't emit message_changed unless
10457         the flags actually changed. Fix the check for marked as seen.
10458
10459 2000-12-05  Not Zed  <NotZed@HelixCode.com>
10460
10461         * camel-seekable-substream.c (stream_flush): stream_flush does
10462         make sense for a substream afterall (if you have a stream_write).
10463         (stream_write): Implement this.
10464         (stream_seek): Change the STREAM_END behaviour to be more sane.
10465         if bounded go from the end of the bound, if unbounded, go from the
10466         end of the parent stream.
10467
10468         * camel-stream-mem.c (stream_read): Dont return error if reading
10469         past the end of data, just return 0.
10470
10471         * camel-stream-fs.c (camel_stream_fs_init): Initialise the stream
10472         to be unbound.
10473         (stream_seek): Fix the logic when seeking from the end of an
10474         unbounded stream.
10475         (camel_stream_fs_new_with_fd): If the fd is invalid (-1), then
10476         return NULL immediately.
10477         (stream_seek): Range check a SEEK_END so it fits within
10478         bound_start.
10479
10480 2000-12-01  Not Zed  <NotZed@HelixCode.com>
10481
10482         * tests/lib/folders.c (test_folder_basic): New test to perform
10483         basic store operations on folders (taken from folders/test1).
10484         (test_folder_message_ops): Tkane the guts out of folders/test2.
10485
10486 2000-12-04  Jeffrey Stedfast  <fejj@helixcode.com>
10487
10488         * providers/smtp/camel-smtp-transport.c (smtp_connect): i18n-ize
10489         exception strings.
10490         (get_name): And here.
10491         (_send_to): Here too.
10492         (smtp_helo): And here and there...
10493         (smtp_mail): And around the square...
10494         (smtp_rcpt): Saying catch me if you can...
10495         (smtp_data): And here three.
10496         (smtp_rset): And here.
10497         (smtp_quit): And finally here.
10498
10499 2000-12-01  Jeffrey Stedfast  <fejj@helixcode.com>
10500
10501         * camel-folder-search.h: Added system_flag to CamelFolderSearchClass
10502
10503         * camel-folder-summary.c (camel_system_flag_get): Convenience
10504         function to return whether or not a flag is set using a string as
10505         the flag name.
10506         (camel_system_flag): Return the integer value of the flag string.
10507
10508         * camel-folder-search.c (search_system_flag): New ESExp callback
10509         for allowing vfoldering on CamelMessageInfo flags.
10510
10511 2000-12-01  Dan Winship  <danw@helixcode.com>
10512
10513         * camel-service.c (camel_service_disconnect): Don't
10514         g_return_if_fail if the service is already disconnected. Just
10515         return.
10516
10517         * providers/pop3/camel-pop3-store.c (pop3_try_authenticate):
10518         Return FALSE (don't try again) if we get CAMEL_POP3_FAIL.
10519         (pop3_connect): If we don't succeed, disconnect.
10520
10521 2000-11-30  Jeffrey Stedfast  <fejj@helixcode.com>
10522
10523         * providers/imap/camel-imap-store.c
10524         (parse_list_response_as_folder_info): Fix a possible bug where
10525         'name' could be uninitialized.
10526
10527         * camel-folder-summary.c (camel_message_info_new): New convenience
10528         function, doesn't do much but it sure makes code cleaner to read.
10529         (camel_message_info_new_from_header): This one makes my life heaven.
10530
10531 2000-11-30  Jeffrey Stedfast  <fejj@helixcode.com>
10532
10533         * providers/imap/camel-imap-summary.c (camel_imap_summary_new):
10534         Handle the case where the summary failed to load - clear the
10535         summary and then set the dirty bit so that it is sure to save
10536         later. Is this the right fix?
10537
10538 2000-11-30  Dan Winship  <danw@helixcode.com>
10539
10540         * camel-exception.c (camel_exception_setv): Remove unused
10541         variable.
10542
10543 2000-11-30  Not Zed  <NotZed@HelixCode.com>
10544
10545         * providers/local/camel-mbox-folder.c (mbox_get_message): Remove
10546         assertion that content is there, when it no longer can be.
10547
10548         * camel-folder-summary.h: Removed pos/bodypos/endpos from
10549         camelmeessagecontentinfo.
10550         (CamelMessageFlags): Added an attachments flag.
10551
10552         * providers/local/camel-local-summary.h: Added load virtual
10553         function.
10554
10555         * tests/lib/folders.c (test_message_info): Accessors.
10556         (test_folder_message): "
10557
10558         * camel-folder-thread.c (get_root_subject): Fix accessors.
10559         (dump_tree_rec): "
10560
10561         * camel-folder-search.c (camel_folder_search_execute_expression):
10562         Accessors for messageinfo.
10563         (search_match_all): "
10564         (search_header_contains): "
10565         (search_header_contains): "
10566         (search_body_contains): "
10567         (camel_folder_search_execute_expression): Use mepool_strdup.
10568
10569         * providers/local/camel-mbox-summary.c (summary_update): Accessors
10570         for messageinfo.
10571         (mbox_summary_sync_full): "
10572
10573         * providers/local/camel-mh-summary.c (remove_summary): Accessors
10574         for messageinfo.
10575         (mh_summary_check): "
10576         (mh_summary_sync_message): "
10577         (mh_summary_sync): "
10578
10579         * providers/local/camel-mh-folder.c (mh_append_message): Use
10580         accessor for uid.
10581
10582         * providers/local/camel-local-summary.c
10583         (local_summary_decode_x_evolution): Use accessor to uid.
10584         (local_summary_encode_x_evolution): Likewise.
10585         (message_info_new): And here.
10586         (camel_local_summary_load): Call virtual load function.
10587         (local_summary_load): Default load function, load summary.
10588         (camel_local_summary_load): Check file exists before trying to
10589         load.
10590         (camel_local_summary_construct): Turn off building content info!
10591         (CAMEL_LOCAL_SUMMARY_VERSION): Bump, since we dont build content
10592         info anymore.
10593         (camel_local_summary_load): After a successful load/check, do a
10594         save too so we dont have to go through it again randomly.
10595
10596         * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): Use
10597         accessors for messageinfo.
10598
10599         * providers/nntp/camel-nntp-folder.c (nntp_folder_get_uids): Use
10600         accessors for uid.
10601
10602         * providers/imap/camel-imap-folder.c (imap_refresh_info): Use
10603         accessor for uid.
10604         (imap_sync): Likewise.
10605         (imap_get_uids): Likewise.
10606         (imap_update_summary): And here.
10607
10608         * providers/vee/camel-vee-folder.c (vfolder_remove_match): Use
10609         accessor for uid.
10610         (vfolder_add_match): Handle estrv stuff.
10611         (vfolder_change_match): Accessor for uid.
10612         (get_real_message): "
10613         (vee_get_uids): "
10614         (vee_folder_build): " + estrv.
10615         (vee_folder_build_folder): "
10616
10617         * providers/local/camel-maildir-folder.c (maildir_append_message):
10618         Use acccessors for uid's.
10619         (maildir_get_message): Here too.
10620
10621         * providers/local/camel-maildir-summary.c
10622         (camel_maildir_summary_init): Setup the string count for us.
10623         (message_info_new): Access the string array directly.
10624         (message_info_free): No need to free string if using array.
10625         (camel_maildir_summary_info_to_name): Use accessor to get to uid.
10626         (remove_summary): And here.
10627         (maildir_summary_check): Likewise.
10628         (maildir_summary_sync): And here.
10629         (maildir_summary_load): Load up a cache of uid->filename mappings
10630         before loading the actual summary file.  This saves us having to
10631         waste the diskspace storing the filenames in the summary itself,
10632         and also helps us sync the summary better on load.
10633         (message_info_load): If we have the load_map setup, and the uid
10634         exists, then set the filename cache from it, and update the flags
10635         from the name, incase our summary mismatches it.
10636
10637         * camel-folder-summary.c (camel_folder_summary_init): Setup string
10638         count for compressed info record.  An optional compile mode which
10639         stores all strings for a given messageinfo into a packed array,
10640         which should save 36-50 bytes/record.
10641         (camel_folder_summary_info_new): Init the string array.
10642         (message_info_new): Set the string array items, as required.
10643         (message_info_load): And here too.
10644         (message_info_save): Use accessors to get to strings.
10645         (message_info_free): Free strings as one.
10646         (camel_message_info_dup_to): Handle packed array case.
10647         (camel_folder_summary_add): Use accessors.  And pack the strv
10648         before storing it.
10649         (summary_assign_uid): New function to assign a unique uid to a
10650         message, if it doesn't have one.
10651         (camel_folder_summary_add): Call assign_uid instead of doing it
10652         ourselves.
10653         (camel_folder_summary_info_new_from_parser): "
10654         (camel_folder_summary_info_new_from_message): "
10655         (camel_folder_summary_encode_string): constify.
10656         (camel_folder_summary_encode_token): "
10657         (summary_build_content_info_message): Fix accessors to messageinfo.
10658         (CAMEL_FOLDER_SUMMARY_VERSION): Bumped, for removal of
10659         contentinfo->pos data.
10660         (camel_folder_summary_info_new_from_parser): Calculate the size
10661         based on the parser position, not the removed contentinfo stuff.
10662         (camel_folder_summary_info_new_from_message): Remove size stuff.
10663         (camel_folder_summary_offset_content): Removed, no longer means anything.
10664         (content_info_new): 
10665         (content_info_load): 
10666         (content_info_save): 
10667         (summary_build_content_info): Remove stuff for contentinfo->pos*.
10668         (summary_build_content_info): Take a msginfo argument, set
10669         attachments flag if we find any attachments.
10670         (summary_build_content_info_message): set attachments flag if we
10671         find any attachments.
10672         (camel_folder_summary_info_new_from_parser): Always scan the
10673         content info, even if we dont save it.
10674         (camel_folder_summary_info_new_from_message): And here too.
10675         (summary_build_content_info): Only create the contentinfo stuff if
10676         we have it turned on, otherwise just parse and discard.
10677         (summary_build_content_info_message): Likewise.
10678
10679 2000-11-29  Jeffrey Stedfast  <fejj@helixcode.com>
10680
10681         * camel-store.c (camel_store_get_folder): Updated the gtk-doc
10682         comment.
10683
10684 2000-11-29  Dan Winship  <danw@helixcode.com>
10685
10686         * camel-mime-utils.c: 
10687         * camel-mime-filter-charset.c: Use iconv instead of unicode_iconv.
10688
10689         * providers/imap/camel-imap-command.c (imap_read_untagged): Fix
10690         some off-by-one-ness.
10691
10692         * camel-stream-buffer.c (stream_read): Fix another bug found in
10693         previously-unused code here.
10694
10695 2000-11-29  Ettore Perazzoli  <ettore@helixcode.com>
10696
10697         * tests/lib/Makefile.am (INCLUDES): `$(top_srcdir)' for builddir
10698         != srcdir compilation.
10699
10700 2000-11-29  Not Zed  <NotZed@HelixCode.com>
10701
10702         * tests/message/test2.c (main): Add a missed unref.
10703
10704         * camel-stream-mem.c (camel_stream_mem_set_buffer): We must set
10705         ourselves as the owner of the byte-array.
10706         Weird, someone has modified this file (its been reindented), but i
10707         can't see any changelogs ...
10708
10709         * tests/lib/messages.c (content_finalise): Fix memleak in tester,
10710         free byte array when our content object is deleted.
10711
10712         * camel-folder-search.c (camel_folder_search_finalize): Yeah
10713         great, so the sexp is a gtk object, not a camel object.  Isn't
10714         that going to be fun to fix?
10715
10716         * camel-session.c (camel_session_finalise): Free the storage path.
10717
10718         * providers/local/camel-local-store.c (camel_local_store_init): If
10719         store->folders is setup, free it first, then overwrite.  Hmm,
10720         this seems a bit crappy to me.
10721
10722         * camel-store.c (camel_store_init): Dont setup store->folders if
10723         its already setup.
10724
10725         * camel-exception.c (camel_exception_setv): Removed a memleak.  no
10726         need to strdup after a strdup_printf!!!
10727
10728         * camel-address.c (camel_address_finalize): Free the address
10729         ptrarray, once finished.
10730
10731         * providers/local/camel-local-folder.c (local_finalize): Make sure
10732         we dont leave the folder locked on close.
10733         (local_finalize): Free summary/search.
10734
10735         * providers/local/camel-mh-summary.c (mh_summary_next_uid_string):
10736         Small memleak, always free name after using it.
10737
10738         * camel-mime-part.c (set_content_object): Free txt after setting
10739         the header.
10740
10741         * providers/local/camel-maildir-summary.c (maildir_summary_check):
10742         Fix a memleak, close the dir after scanning new.
10743         (message_info_free): Added so we can free the filename cached in
10744         the messageinfo.
10745         (camel_maildir_summary_finalise): Free the hostname.
10746
10747         * tests/folder/test[12].c (main): Clear out camel-test before
10748         starting.
10749
10750         * providers/local/camel-mbox-summary.c (mbox_summary_sync_quick):
10751         Because encode_x_evolution folds the line (sigh, because
10752         encode_param does, unlike every other function in
10753         camel-mime-utils), unfold the encoded result before comparing.
10754         (mbox_summary_sync_quick): Another small memleak, free xevnew once
10755         finished with it.
10756
10757         * camel-mime-utils.c (header_decode_quoted_string): Removed a
10758         redundant check for c=0.
10759         (header_unfold): New function to un-fold headers.
10760
10761         * providers/local/camel-local-summary.c
10762         (local_summary_encode_x_evolution): some problems with encoding
10763         tags, using the wrong output strings.
10764         (local_summary_encode_x_evolution): We dont need to append a ;
10765         either, param_list_format_append() will do it for us.
10766
10767 2000-11-28  JP Rosevear  <jpr@helixcode.com>
10768
10769         * camel-lock.c: No longer hard code the enabled lock types
10770
10771 2000-11-28  Dan Winship  <danw@helixcode.com>
10772
10773         * camel-remote-store.c (remote_recv_line): Don't set exception to
10774         g_strerror (errno) when nread == 0, because it won't have been
10775         set.
10776
10777         * providers/pop3/camel-pop3-folder.c (pop3_finalize): Don't try to
10778         free things if they haven't been set yet.
10779
10780 2000-11-28  Jeffrey Stedfast  <fejj@helixcode.com>
10781
10782         * providers/smtp/camel-smtp-transport.c (smtp_connect): Clear the
10783         exception if EHLO fails before trying HELO in the cases where the
10784         SMTP provider doesn't announce its ESMTPness.
10785
10786 2000-11-28  Not Zed  <NotZed@HelixCode.com>
10787
10788         * providers/local/camel-maildir-summary.c
10789         (camel_maildir_summary_init): Set the info size's properly, oops!
10790
10791         * tests/lib/folders.[ch]: Folder testing helpers.
10792
10793         * tests/folder/test2.c: Test basic message ops on folders.
10794
10795         * tests/folder/test1.c (main): Test basic folder ops on (local)
10796         stores.
10797
10798         * providers/local/camel-local-provider.c
10799         (camel_provider_module_init): Removed some debug.
10800
10801         * providers/local/camel-maildir-folder.c
10802         (camel_maildir_folder_class_init): fix parent class.
10803
10804         * providers/local/camel-mh-folder.c (camel_mh_folder_class_init):
10805         Fix parent class (damn cut & paste).
10806
10807         * providers/local/camel-maildir-store.c (get_folder): Call parent
10808         impl.
10809         (camel_maildir_store_class_init): Fix parent class setup.
10810         (delete_folder): Check the folder exists before trying to delete
10811         it.
10812         (delete_folder): Try and make the delete operation atomic/rollback
10813         failures.  e.g. if one directory isn't empty, then create the
10814         other empty ones back.  Also clear the tmp directory fully first.
10815
10816         * providers/local/camel-mbox-store.c (get_folder): Call parent
10817         impl.
10818         (camel_mbox_store_class_init): parent class is camel_local_store,
10819         not camel_folder, oops.
10820         (delete_folder): Return an error if it doesn't exist, rather than
10821         covering it up.
10822
10823         * providers/local/camel-mh-store.c (get_folder): Call parent impl.
10824         (camel_mh_store_class_init): fix parent class setup.
10825         (delete_folder): Error if it doesn't exist now.
10826
10827         * camel-folder.c (camel_folder_move_message_to):
10828         (camel_folder_copy_message_to): Added warnings as these functions
10829         are going to be removed later.
10830
10831         * camel-store.c (camel_store_get_root_folder): Fix for an early
10832         api change.  We want CAMEL_STORE_FOLDER_CREATE, not TRUE, since
10833         its a flag.
10834         (camel_store_get_default_folder): And here too.
10835
10836         * providers/local/camel-local-store.c (xrename): Handle renaming
10837         folders differently to renaming files.
10838         (get_default_folder_name): local stores dont have a default
10839         folder, so make it so.  Or at least, it doesn't seem to make sense
10840         to have one.
10841         (get_root_folder_name): Same for root.
10842         (get_folder): Added parent implementation, that makes sure the
10843         service path exists, if we are creating a new folder (but doesn't
10844         create the folder).
10845
10846 2000-11-27  Not Zed  <NotZed@HelixCode.com>
10847
10848         * providers/local/camel-local-store.c (xrename): Fixed races.  Use
10849         link/unlink, rather than rename, to properly detect overwriting
10850         another file.  And allow some files to be missing.
10851
10852 2000-11-28  Radek Doulik  <rodo@helixcode.com>
10853
10854         * providers/local/camel-local-summary.c
10855         (local_summary_decode_x_evolution): add scan = scan->next; to
10856         avoid infinite loop
10857
10858 2000-11-27  Dan Winship  <danw@helixcode.com>
10859
10860         * providers/imap/camel-imap-command.c (imap_read_untagged): Make
10861         this gratuitously more complicated. No wait, I mean, fix bugs. Now
10862         fully handles NULs in the data stream (which "can't happen" but
10863         do) and also handles responses containing multiple literals. Also
10864         does less copying than the original code.
10865
10866         * camel-stream-buffer.c (stream_read): Fix a bug that could make
10867         it lose sync and/or overrun buffers.
10868
10869 2000-11-27  JP Rosevear  <jpr@helixcode.com>
10870
10871         * providers/local/.cvsignore: shush
10872
10873 2000-11-27  Not Zed  <NotZed@HelixCode.com>
10874
10875         * providers/Makefile.am: Removed mh, mbox, added local, to the default.
10876
10877 2000-11-24  Not Zed  <NotZed@HelixCode.com>
10878
10879         * tests/data/getaddr.pl: little util to scan mailboxes for any and
10880         every address they contain.
10881
10882         * tests/message/test2.c (main): Added a bunch of stuff to test
10883         decoding/reencoding/etc of internationalised addresses.
10884
10885         * tests/message/lib/address-data.h: Copy of some unicode/other
10886         testing data.  **Beware** of editing this file in emacs, it'll
10887         probably try and convert all the characters to something
10888         unusable.
10889
10890         * tests/lib/camel-test.c (camel_test_break): Add a debugger hook
10891         point.
10892
10893         * camel-mime-utils.c (quoted_encode): Check for space and convert
10894         to _ separately.
10895         (header_decode_mailbox): Fixed the 'check comments for realname'
10896         code, problem was the domain getting code was skipping all
10897         whitespace/comments before we could get a look-in.  This is
10898         approximate but fairly robust.
10899         (header_decode_text): Dont use the c-type isspace func here, we
10900         want a specific whitespace only.
10901         (header_decode_text): If we have decoded words next to each other,
10902         do not insert whitespaces between them, which is what rfc2047 requires.
10903         (header_decode_text): Make c unsigned too.
10904
10905         * tests/README: Added at least some explanation of all this stuff.
10906
10907         * tests/lib/camel-test.h (check_msg): Added a non-gcc version of
10908         the fail command, we dont get the expression that failed, but no
10909         matter.  Should be (more) portable now.
10910         (check, check_msg): Put the file/lineno in the default message.
10911
10912         * Makefile.am (SUBDIRS): Add tests.
10913
10914         * camel-mime-filter-basic.c (filter): Well, I'll add the extra
10915         bytes here too, lathough not strictly needed, might save a
10916         re-malloc when we get to complete().
10917
10918         * camel-mime-filter-charset.c (filter): Make sure we have room if
10919         we only convert very short data.
10920         (complete): and here too.
10921
10922         * tests/Makefile.am: Initial test harness & tests.  Requires gcc
10923         for this.
10924
10925         * camel-internet-address.c (d): Turn off debug.
10926
10927         * camel-charset-map.c (camel_charset_step): Oops, & masks for set
10928         intersection, not | them.  Dunno how this got even close to
10929         working.
10930
10931 2000-11-23  Not Zed  <NotZed@HelixCode.com>
10932
10933         * camel-mime-filter-basic.c (filter): For base64 encoding, the
10934         output size for 0, 1, or 2 bytes of input can exceed input*2, so
10935         make sure we account for that as well.
10936         (complete): And here.
10937         (complete): Similarly for qp encoding, if we have a trailing
10938         space, we need some extra bytes (not needed for 'filter()', as any
10939         such bytes are stored in state/save).
10940
10941         * camel-mime-utils.c (quoted_decode_step): Removed fixme not required.
10942         (quoted_encode_close): Dont append a trailing afterall.  Otherwise
10943         a pass through the encode/decode will grow the message each time.
10944
10945 2000-11-22  Radek Doulik  <rodo@helixcode.com>
10946
10947         * camel-mime-utils.c (header_msgid_generate): check for return
10948         values
10949
10950 2000-11-21  Dan Winship  <danw@helixcode.com>
10951
10952         * camel-lock.c: 
10953         * camel-movemail.c: add #ifdef HAVE_ALLOCA_H
10954
10955 2000-11-21  Not Zed  <NotZed@HelixCode.com>
10956
10957         * providers/local/camel-mh-summary.c (mh_summary_sync_message):
10958         Shite, -1 on error, >=0 on success.  So i've just been truncating
10959         all the messages I touched, good one zed.
10960         (mh_summary_sync_message): Sigh, and write to the right damn fd as
10961         well.
10962         (mh_summary_sync_message): Argh, and we need to compare the length
10963         of the old xev -1 to the new xev, to check if we can optimise it.
10964
10965         * camel-folder.c (camel_folder_change_info_new): Init the pool.
10966         (camel_folder_change_info_add_source): Allocate string in the
10967         pool.
10968         (camel_folder_change_info_add_source_list): 
10969         (camel_folder_change_info_add_update): No longer free the key, as
10970         it cannot be yet.
10971         (change_info_add_uid): Add a new arg, copy, telling it whether to
10972         copy the uid argument or not, and copy using mempool_strdup.
10973         (change_info_cat): Tell add_uid to copy the string.
10974         (camel_folder_change_info_add_update): Call add_uid directly.
10975         (change_info_remove): Call add_uid directly, with no copy, and
10976         dont free the key.
10977         (change_info_free_update): No longer required since we dont malloc
10978         the keys.
10979         (camel_folder_change_info_add_uid): Fix for add_uid change.
10980         (camel_folder_change_info_remove_uid): 
10981         (camel_folder_change_info_change_uid): 
10982         (change_info_clear): No longer needed, just set the size to 0 on
10983         the array directly.
10984         (camel_folder_change_info_clear): Empty the arrays directly, and
10985         flush the mempool too, and also clear uid_source, incase anyone
10986         was silly enough to call us in the wrong order.
10987         (camel_folder_change_info_free): Dont bother clearing the array's
10988         contents, just free the pool and throw away all the indexes.
10989
10990         * camel-folder.h: Added a mempool to CamelFolderChangeInfo to
10991         store the uid's we get.
10992
10993         * camel-folder-search.c (search_match_all): If we are only
10994         matching a single info, just use that/do the search.
10995         (camel_folder_search_match_expression): New function.  Matches a
10996         single message info against an expression.
10997         (camel_folder_search_init): Init a hash table used to map the
10998         returned gptrarrays' to mempools.
10999         (camel_folder_search_execute_expression): Store all of the string
11000         data in a mempool, slightly faster, less wasted space (usually),.
11001         (camel_folder_search_free_result): Check for the mempool that
11002         stores the data for the list, and free that if we have it,
11003         otherwise assume we need to use g_free() (which should only happen
11004         if the list is empty at the moment).
11005         : commented out the debugging prints.  Got sick of 'executing
11006         header search' crap.
11007
11008         * providers/vee/camel-vee-folder.c (camel_vee_folder_init): Init
11009         changes.
11010         (camel_vee_folder_finalise): Free changes.
11011         (vfolder_add_match): Simple helper to add a new matching info
11012         record.
11013         (camel_vee_folder_add_folder): Only trigger a changed event if we
11014         have changes.
11015         (vfolder_change_match): New function, changes our local vfolder
11016         info to match the source.
11017         (vfolder_add_match): Add a new info to the vfolder list.
11018         (vfolder_remove_match): Remove a no-longer matching info from the
11019         vfolder summary.
11020         (message_changed): check if the message still matches, and
11021         remove/etc as required.
11022         (camel_vee_folder_finalise, init): init/free search object.
11023         (vee_folder_build_folder): Build the changes to the folder into
11024         the changes data, as we go.
11025         (folder_changed): If the folder gave us an explicit list of
11026         changes, then process each one separately (unless there's a lot
11027         added/changed).
11028
11029         * providers/vee/camel-vee-folder.h: Added a changes field to the
11030         folder.
11031
11032         * Makefile.am (libcamel_la_SOURCES): Added
11033         camel-folder-thread.[ch].
11034
11035         * camel-folder-thread.c: message-threading algorithm, taken from
11036         evolutions' mail component, as it is generally more useful than
11037         just for evolution itself.  Changed to use e-memchunks as well to
11038         speed it up a little and use less mem.
11039
11040 2000-11-20  Jeffrey Stedfast  <fejj@helixcode.com>
11041
11042         * camel-remote-store.c (remote_recv_line): Fixed to return the
11043         correct bytecount in all cases which is the real fix to
11044         imap_parse_nstring.
11045
11046         * providers/imap/camel-imap-command.c (imap_read_untagged): Again,
11047         don't use strlen for the post-data, use 'n'.
11048
11049         * providers/imap/camel-imap-utils.c (imap_parse_nstring): Undo my
11050         previous temp-fix.
11051
11052 2000-11-20  Not Zed  <NotZed@HelixCode.com>
11053
11054         * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): Fixes for
11055         the summary messageid changes.  Hash the messageid and store it.
11056         (get_XOVER_headers): Use camel_folder_summary_info_new() to create
11057         the summary item before adding it.
11058
11059         * camel-folder-summary.h (CamelMessageInfo): Changed the
11060         messgae-id to be an 8 byte md5 hash, and the references list to be
11061         an array of these.
11062
11063         * providers/local/camel-mh-summary.c (mh_summary_sync_message):
11064         New function, sync out the message info stuff.  Only updates the
11065         X-Ev header if it can get away with it, otherwise writes out a
11066         whole new message.
11067         (mh_summary_sync): Added more functionality.  All summary info is
11068         now written to the X-Ev header, etc, and new messages re-written
11069         if required during the sync process.
11070
11071         * providers/local/camel-local-folder.c
11072         (local_set_message_user_flag): Set the XEVCHANGE flag.
11073         (local_set_message_user_tag): And here too.
11074
11075         * providers/local/camel-local-summary.h: New flag
11076         CAMEL_MESSAGE_FOLDER_XEVCHANGE to indicate the XEV header has
11077         probably changed size and needs to be rewritten in whole.
11078
11079         * camel-folder-summary.c (next_uid_string): Want this static, not
11080         const.
11081         (message_info_new): Store the references and message-id values as
11082         64 bit, binary hashes.
11083         (message_info_load): fix for message-id/references changes.
11084         (message_info_save): Likewise.
11085         (camel_message_info_dup_to): And here.
11086         (camel_message_info_free): And here too.  No longer free
11087         message_id, and simple free for references array.
11088         (CAMEL_FOLDER_SUMMARY_VERSION): Bumped file revision.
11089         (camel_folder_summary_init): Init memchunk allocators to empty.
11090         (camel_folder_summary_finalize): Free memchunk allocators if
11091         there.
11092         (message_info_new): Use the chunk allocator to allocate message
11093         info's. 
11094         (camel_folder_summary_info_new): New helper to allocate the
11095         message info, and setup the memchunk if required.
11096         (content_info_alloc): Likewise for content info's.
11097         (message_info_load): Use summary_info_new_empty.
11098         (content_info_new): Use content_info_alloc.
11099         (content_info_load): "
11100         (content_info_free): Free the content info as a memchunk.
11101         (message_info_free): Free everything directly and the base as a
11102         memchunk, rather than calling camel_message_info_free(), which
11103         assumes a malloc'd array.
11104
11105         * providers/local/camel-local-summary.c: Include ctype.h, kill a
11106         warning.
11107         (local_summary_decode_x_evolution): If we get a NULL message info,
11108         then dont try and set anything, just check for validity.
11109         (camel_local_summary_write_headers): New function to write a set
11110         of headers to an fd.
11111         (camel_local_summary_check): Added some statistic generation
11112         stuff for memory profiling.
11113
11114         * providers/local/camel-mbox-summary.c (header_write): Changed to
11115         use stdoi functions to write out the header to a buffered stream,
11116         instead of using writev, which is apparently slow (and writing
11117         each line separately is slow anyway).
11118         (mbox_summary_sync_full): New implementation.  Does things
11119         differently, doesn't use or require the content info stuff.
11120         (summary_rebuild): Dont return an error if we start scanning at
11121         the end of file.
11122         (mbox_summary_sync_full): If we are not writing out new headers,
11123         make sure we copy the From line as we go, and update frompos
11124         appropriately.
11125         (mbox_summary_sync_full): Always copy the From line from the
11126         existing one, rather than trying to make one up ourselves.
11127         (mbox_summary_sync): If we can get by with a quick-sync, then try
11128         it, if that fails, then try a full sync anyway.
11129         (mbox_summary_sync_quick): Quick sync.  Only update system flags,
11130         etc.
11131         (mbox_summary_sync_full): Use the proper local summary encode_xev
11132         function.
11133         (header_evolution_decode): Removed, no longer needed.
11134         (header_evolution_encode): Same.
11135         (copy_block): No longer needed, removed.
11136         (header_write): Removed, replaced with
11137         camel_local_summary_write_headers.
11138         (mbox_summary_sync_full): Fixed for header_write change.
11139
11140         * camel-mime-parser.c (folder_scan_step): Implement the new
11141         optional parser state HSCAN_PRE_FROM, that returns the (currently
11142         unfiltered) input data.
11143         (folder_scan_drop_step): Do the right thing for the PRE_FROM
11144         state.
11145         (camel_mime_parser_scan_from): Update the doco.
11146         (camel_mime_parser_scan_pre_from): Ok, make this behaviour
11147         optional, it simplifies a lot of loops that dont otherwise need to
11148         know about it.
11149         (folder_scan_step): Made the PRE_FROM state optional.
11150         (struct _header_scan_state): Made the bool vars 1 bit.
11151         (folder_pull_part): Free the from_line buffer if it is there.
11152         (folder_scan_skip_line): Added a new arg, can save the skpped data
11153         to a byte_array, as we go.
11154         (folder_scan_step): Fixed calls to skip_line approrpiately.  Now
11155         we save the from line as we parse it.
11156         (camel_mime_parser_read): New function to read from the mime
11157         parser buffer directly.  Useful if you use the parser to read the
11158         first/some headers, then need to scan the rest of the data,
11159         without needing to use a seek(), or allocate your own buffers.
11160
11161         * camel-mime-parser.h (struct _header_state): Added a new parser state,
11162         pre-from which returns any data found before a from line during
11163         parsing (all other data can be retrieved by the caller except
11164         this).
11165
11166 2000-11-17  Jeffrey Stedfast  <fejj@helixcode.com>
11167
11168         * providers/imap/camel-imap-utils.c (imap_parse_nstring): When
11169         extracting a literal string, capture up until the end of the last
11170         line - this we we don't lose any data if the byte count is off.
11171
11172         * providers/imap/camel-imap-command.c (imap_read_untagged): Use
11173         the byte-read count to decrement the number of bytes left to read
11174         rather than using strlen. Not only does this protect against a DoS
11175         (embedded NUL chars in the literal string would make strlen
11176         inaccurate) but it also improves performace a little.
11177
11178         * camel-remote-store.c (remote_recv_line): *Sigh* Return the
11179         number of bytes read on success rather than 0. Also don't use
11180         camel_stream_buffer_read_line since we can't get an accurate octet
11181         count.
11182
11183 2000-11-17  Not Zed  <NotZed@HelixCode.com>
11184
11185         * providers/local/camel-local-summary.c (local_summary_add): Clear
11186         the NOXEV/FLAGGED bits, since we do have an xev header.  um m,
11187         maybe this is right, this assumes a write is following.  Maybe
11188         this should be done in folder::append() instead ...
11189
11190         * camel-stream-buffer.c (camel_stream_buffer_gets): We should
11191         always terminate the string.  No need to check outptr is in range,
11192         its already been checked.
11193
11194         * providers/local/camel-mbox-summary.c (mbox_summary_sync): When
11195         we update the summary, do it from mbox_summary->folder_size, not
11196         the content info endpos (which isn't any good anymore anyway).
11197
11198         * providers/local/camel-mbox-folder.c (mbox_append_message): Set
11199         the frompos from the current folder size, since summary_add wont
11200         have initialised it to anything useful.
11201
11202 2000-11-16  Not Zed  <NotZed@HelixCode.com>
11203
11204         * providers/local/camel-local-summary.c
11205         (local_summary_encode_x_evolution): Check the uid string is all
11206         digits before trying to write a 'standard' x-ev header.
11207
11208         * providers/local/camel-maildir-summary.c
11209         (camel_maildir_summary_info_to_name): Convert an info into a
11210         maildir name:info filename.
11211         (camel_maildir_summary_name_to_info): Convert a name:info filename
11212         into an info, and tell us if it didn't match it.
11213         (message_info_new): When creating a new filename, gets its info
11214         from the flags field.  Likewise if creating from an existing file,
11215         extract the flags.
11216         (maildir_summary_sync): Remove a small memleak.  Also, if our
11217         flags and that requires a filename change, perform that here.
11218         (message_info_new): Get the received date from the filename.
11219         Also, dont overwirte the uid if we have one.
11220         (maildir_summary_check): Sort the summary in received order before
11221         completion.
11222         (maildir_summary_next_uid_string): Test the name for collusions
11223         before we give it out.  Retry, and if that fails, well, I guess we
11224         collide :(
11225
11226         * providers/local/camel-mbox-folder.c (mbox_lock): Implement mbox
11227         locking.
11228         (mbox_unlock): And unlocking.
11229         (mbox_append_message): Lock the folder for write before doing
11230         anything.
11231         (mbox_get_message): Lock the folder for read before doing
11232         anything.
11233
11234         * providers/local/camel-local-folder.c (camel_local_folder_lock):
11235         Implement something here.  We handle the recursive ability but
11236         pass the locking to the folder itself.
11237         (camel_local_folder_unlock): Likewise for unlocking.
11238         (local_lock): Default - do nothing, return success.
11239         (local_unlock): Same.
11240         (local_sync): Changed slightly for locking api changes, and also,
11241         only lock around the sync process itself.
11242
11243         * camel-lock.c: New file - utility functions for locking using
11244         different strategies and/or for locking folders safely.
11245
11246         * Makefile.am (libcamel_la_SOURCES): Adde camel-lock.[ch]
11247
11248 2000-11-15  Radek Doulik  <rodo@helixcode.com>
11249
11250         * camel-mime-utils.c: mime_guess_type_from_file_name moved back to
11251         composer as it introduced unwanted VFS dependency
11252         removed  #include <libgnomevfs/gnome-vfs.h>
11253
11254 2000-11-15  Not Zed  <NotZed@HelixCode.com>
11255
11256         * providers/Makefile.am: Removed local again, not quite ready.
11257
11258 2000-11-14  Not Zed  <NotZed@HelixCode.com>
11259
11260         * camel-folder-summary.c (message_info_new_from_message): Use
11261         message_info_new to create the summary from headers, instead of
11262         getting directly from the message.
11263         (format_recipients): No longer required.
11264
11265         * providers/Makefile.am (SUBDIRS): Added local.
11266
11267 2000-11-11  Not Zed  <NotZed@HelixCode.com>
11268
11269         * camel-mime-parser.c (folder_push_part): Make sure 'atleast' is
11270         at least 1, always.  This is possibly a temporary fix for a
11271         bad failure mode on bad multipart messages.
11272         (folder_scan_content): Go until inend, not inend+1.  Changed the
11273         continuation and retry logic to be simpler and more robust.  If we
11274         can't find a marker within
11275         the atleast we need, just set it to 1, and try again, rather than
11276         just going to the next smaller limit (boundary check checks the
11277         length anyway).
11278         (header_append): streamline the empty line case.  And strip
11279         trailing \r's if there are any (\n's already stripped).
11280         (folder_scan_header): Reordered and cleaned up a lot.  Check for
11281         continuation only once, and compress lwsp then. Assume the header
11282         buffer already has end of line's stripped, and simplify some things:
11283                 Only check for end of headers once and easier.
11284                 Dont check to remove end of line character
11285         Dont bother testing inptr-start if we get a boundary match - it is
11286         always zero.
11287         (folder_scan_header): Removed the unused part variable, and a few
11288         pointless assignments.
11289         (folder_scan_header): Change the end limit to be 1 higher, to make
11290         sure we get all content.
11291         (folder_scan_content): And here too.
11292         (folder_scan_header): Killed a warning.
11293         (folder_push_part): Removed a bad comment.  Actually
11294         boundarylenfinal can be zero for a new message not in a
11295         multipart.  So we fix that here.
11296
11297 2000-11-09  Not Zed  <NotZed@HelixCode.com>
11298
11299         * camel-mime-utils.c (header_decode_param_list): Renamed from
11300         header_param_list_decode.
11301         (header_param_list_decode): New external function to decode a
11302         parameter list.
11303         (header_param_list_format_append): Made public.
11304         (header_param_list_format): Another new public helper function for
11305         formatting just a param list.
11306
11307         * camel-folder-summary.c (next_uid_string): Default implementation
11308         is the same as before.
11309         (camel_folder_summary_class_init): And set it up.
11310
11311         * camel-folder-summary.h: Make next_uid_string a virtual function.
11312
11313         * camel-folder.c (camel_folder_change_info_changed): New function
11314         to return true if the changeset contains any changes.
11315
11316 2000-11-14  Jeffrey Stedfast  <fejj@helixcode.com>
11317
11318         * camel-stream.c (camel_stream_printf): Don't cast an int to a
11319         ssize_t.
11320
11321 2000-11-10  Dan Winship  <danw@helixcode.com>
11322
11323         * providers/mbox/camel-mbox-summary.c
11324         (camel_mbox_summary_build_from): put a space before a single-digit
11325         day of the month since it seems some mailers are fantastically
11326         picky about this. (bugs.gnome.org #27232)
11327
11328 2000-11-10  Radek Doulik  <rodo@helixcode.com>
11329
11330         * camel-mime-utils.c (header_msgid_generate): fix ids ending with '.'
11331
11332 2000-11-09  Dan Winship  <danw@helixcode.com>
11333
11334         * providers/imap/camel-imap-auth.c (imap_try_kerberos_v4_auth):
11335         Fix error handling. (Only send a "*" to bail out of authentication
11336         if the server hasn't already bailed on us.)
11337
11338 2000-11-08  Radek Doulik  <rodo@helixcode.com>
11339
11340         * camel-mime-utils.c (mime_guess_type_from_file_name): new
11341         function, moved from composer
11342
11343 2000-11-08  Not Zed  <NotZed@HelixCode.com>
11344
11345         * camel-mime-message.c (find_best_encoding): Keep track of the
11346         caller bestenc flags that make sense.
11347         
11348         * camel-mime-filter-bestenc.c (filter): Added code to detect when
11349         we have "^From " lines in the sequence of text.
11350         (camel_mime_filter_bestenc_get_best_encoding): Added a new flag
11351         CAMEL_BESTENC_NO_FROM: if set, it will not allow any lines
11352         matching "^From " to appear in the output - currently forcing
11353         base64 encoding to achieve this.
11354
11355         * camel-mime-parser.c (folder_scan_step): Call
11356         camel_mime-filter_complete() once we're done, rather than
11357         filter_filter().
11358         (folder_scan_content): Some fixes for state changing; so that when
11359         we do find another boundary it is properly flagged.  Since we
11360         strip the last \n off all data, we must take that into account
11361         too.  Sigh.  Fixes a rather nasty set of bugs where multipart
11362         messages could start including following messages as parts, etc.
11363         (struct _header_scan_stack): Added new parameter,
11364         boundarylenfinal, which holds the length of the final boundary, if
11365         it is different (e.g. for From lines, whihc aren't)
11366         (folder_scan_step): Setup teh boundarylenfinal value when creating
11367         a new boundary.
11368         (folder_scan_content): Hmm, if we hit the end-of-buffer sentinal,
11369         reset the scanner back to leave 'atleast' chars in the buffer
11370         still, dump that content, and retry again.  Stops us losing a
11371         check for a boundary on some data we haven't really looked at yet!
11372         (folder_scan_content): Use boundarylenfinal to calculate
11373         'atleast'.
11374         (folder_scan_header): And here too.
11375         (folder_boundary_check): Use the atleast value directly, dont
11376         truncate it.  Use the boundarylen/boundarylenfinal values directly
11377         too.
11378         (struct _header_scan_stack): Add an atleast parameter to cache the
11379         atleast info.
11380         (folder_push_part): Determine/set 'atleast', every time we add a
11381         new part.
11382         (folder_scan_header): Get the cached atleast info from the current
11383         part.
11384         (folder_scan_content): And here too.
11385         (folder_scan_header): Fix a problem where a part starting with
11386         " text" would be interpreted as a followon header wrongly.
11387
11388         * camel-mime-filter-charset.c (complete): Add some assertions to
11389         find a bug.
11390
11391 2000-11-07  Ettore Perazzoli  <ettore@helixcode.com>
11392
11393         * camel-service.c (get_name): Strdup the "???" string you return,
11394         so that the expected semantics for `::get_name()' is respected.
11395
11396 2000-11-07  Dan Winship  <danw@helixcode.com>
11397
11398         * camel-stream-filter.c (d): Kill debugging, as it causes lots of
11399         evolution-mail spewage.
11400
11401 2000-11-07  Not Zed  <NotZed@HelixCode.com>
11402
11403         * camel-mime-filter-bestenc.c (complete): Implement a complete()
11404         function, now we need one.
11405         (filter): Upgraded to match rfrc2045 properly.  Checks also for
11406         length of line and valid CRLF sequences.
11407         (camel_mime_filter_bestenc_get_best_encoding): Do the work of
11408         working out what is the best encoding given what we found about
11409         the stream.
11410
11411         * camel-mime-part.c (camel_mime_part_encoding_to_string): Use a
11412         lookup table to get the encoding naem, and add the binary type.
11413         (camel_mime_part_encoding_from_string): Likewise for the reverse.
11414
11415         * camel-mime-part.h: Added the binary encoding type, see rfc2045.
11416
11417         * camel-mime-utils.c (header_param_list_format_append): Dont put a
11418         space before ;'s in parameter lists, makes them more
11419         readable/consistent.
11420
11421         * camel-mime-message.c (multipart_has_8bit_parts): Cleaned up the
11422         old stuff, well removed it.
11423         (camel_mime_message_set_best_encoding): Added another argument
11424         that lets you select what you want to set the best of.  i.e. for
11425         smtp transport we only need 7 bit, and dont need to optimise the
11426         charset (although of course, we should always).
11427         (find_best_encoding): Implement this feature, if we are not
11428         getting the best charset, use the one we have.
11429         (best_encoding): Set the charset on the part appropriately.  Sigh,
11430         the interfaces for this are nonexistant.
11431         (find_best_encoding): Tell the bestenc filter that lf should be
11432         treated as crlf for the purposes of determining encodings.
11433
11434 2000-11-06  Not Zed  <NotZed@HelixCode.com>
11435
11436         * camel-charset-map.c (camel_charset_init): Init function for an
11437         iterative charset determinator.
11438         (camel_charset_step): Iterate another buffer.
11439         (camel_charset_mask): Removed, since it couldn't have worked.
11440         (camel_charset_best): Use the iterative interface to do the work.
11441         (camel_charset_best_name): Get the best name for a charset so far.
11442
11443         * camel-mime-filter-bestenc.c: New class, a stream
11444         filter that can be used to memory-efficiently determine the best
11445         encoding and/or charset to use for a given stream of bytes.
11446
11447         * Makefile.am (libcamelinclude_HEADERS): Added stream-null*.
11448         (libcamel_la_SOURCES): Added bestenc*
11449
11450         * camel-stream-null.c: New class, a null-stream, that always
11451         succeeds, and never has any contents.
11452
11453         * camel-stream.c: Minor pointless changes.  Was going to do
11454         something else but changed my mind.  Added trivial default
11455         implementations for all callbacks.
11456
11457         * camel-mime-message.h: Cleaned up some old cruft.
11458
11459         * camel-folder-summary.c (camel_folder_summary_format_address):
11460         address_list_format() no longer encodes, so we dont need to decode
11461         it.
11462
11463         * camel-address.c (camel_address_unformat): New function, attempts
11464         to reverse the formatting process on display addresses.
11465         (camel_address_length): New function to get the number of
11466         addresses, without having to peek the structure.
11467
11468         * camel-mime-message.c (camel_mime_message_set_from): Fix a typo.
11469         (camel_mime_message_finalize): Only unref from/reply_to if we have
11470         it.
11471         (camel_mime_message_set_recipients): New function - set the
11472         recipients as a CamelInternetAddress.  This function effectively
11473         deprecates the older recipient setting functions.
11474         (camel_mime_message_add_recipient): What the hell, i'll bite the
11475         bullet.  Terminate this function.  The old api was ambiguious and
11476         inefficient and didn't work right anyway.
11477         (camel_mime_message_remove_recipient_address): And this one.
11478         (camel_mime_message_remove_recipient_name): And this one too.
11479         (camel_mime_message_set_recipients): If we set an empty header,
11480         then remove it from the header list.  Allow a null receipient
11481         object to clear a header.
11482         (camel_mime_message_set_from): Likewise, if setting an empty from
11483         address.
11484         (camel_mime_message_encode_8bit_parts): Eeek!!
11485         camel_stream_mem_new_with_byte_array owns the byte_array we give
11486         it, so make sure we dont free any of it!
11487         (camel_mime_message_encode_8bit_parts):  Infact, i'll just rewrite
11488         the whole lot, its a bit of a mess.  Should really rename it and
11489         make it a little more useful too, lets see ...
11490         (best_encoding): This has a string interface?  Oh boy.
11491         (camel_mime_message_foreach_part): New experimental function to
11492         iterate over all message parts.  Might not remain.
11493         (camel_mime_message_has_8bit_parts): New implementation using
11494         foreach_part.  Fixed a couple of problems.
11495         (find_best_encoding): New function, that finds the best encoding
11496         for a given part (will probably be moved to camel-mime-part), and
11497         also the best charset to use if it is a text part.  Since one
11498         affects the other it is a two pass process, but uses streams and
11499         not memory to achieve this.
11500         (camel_mime_message_set_best_encoding): Uses the function above to
11501         configure an entire message for the best encoding possible given
11502         transport constraints.
11503         (camel_mime_message_encode_8bit_parts): Reimplemented to use the
11504         function above to perform the work.
11505
11506         * camel-internet-address.c
11507         (camel_internet_address_format_address): Dont put <> around a lone
11508         address with no real name.
11509         (camel_internet_address_encode_address): Similarly.
11510         (internet_decode): Actually return the count of decoded addresses.
11511         (internet_unformat): Implement the unformatting routine.
11512
11513 2000-11-05  Not Zed  <NotZed@HelixCode.com>
11514
11515         * providers/smtp/camel-smtp-transport.c (_send_to): Changed to get
11516         the internetaddress directly, rather than having to parse it
11517         itself.
11518
11519         * camel-address.c (camel_address_format): Added a new function
11520         which will format address, suitable for display.
11521         (camel_address_cat): Concatentate 1 camel address onto another.
11522         It is upto the caller to ensure the addresses are of compatible
11523         types.
11524         (camel_address_new_clone): New function to create a new address by
11525         copying an existing one of the same type.
11526         (camel_address_copy): New helper function to copy an address.
11527
11528         * camel-mime-message.h (struct _CamelMimeMessage): Removed cached
11529         copy of date string.
11530         (struct _CamelMimeMessage): Added date_received info.
11531
11532         * camel-mime-message.c (camel_mime_message_get_date_string):
11533         Removed.  Nothing uses it anyway, and it is redundant.
11534         (camel_mime_message_finalize): No more date_str.
11535         (camel_mime_message_init): No more date_str, initialise
11536         date_received*
11537         (write_to_stream): Change the check for a date header.
11538         (process_header): No longer track the date_str.
11539         (camel_mime_message_get_received_date): Removed.  totally invalid
11540         anyway.
11541         (camel_mime_message_get_sent_date): Removed.  Redundant.  The only
11542         'date' is the sent date, the received date is just made up.
11543         (camel_mime_message_get_date): Args changed to be more consistent
11544         with utility functions.
11545         (camel_mime_message_get_date): Dont set the date when we're asked
11546         for it (if its not set by the time its written, it'll be set
11547         then).
11548         (camel_mime_message_get_date_received): Actually do 'the right
11549         thing' here, if we have a received header, use that to determine
11550         the received date.  And return the data in the same format as
11551         get_date.
11552         (camel_mime_message_set_from): Changed the api to better match
11553         what we should be doing.  Pass a camelinternetaddress, etc.
11554         (camel_mime_message_set_reply_to): Cahnged similarly to take an
11555         internetaddress.
11556         (camel_mime_message_get_reply_to): Likewise.
11557         (camel_mime_message_finalize): Unref the from/reply_to objects.
11558         (format_address): Removed, no longer needed.
11559         (process_header): Changed to store the from/reply_to as
11560         internetaddress's.
11561         (write_to_stream): Set the from header directly to empty, if we
11562         dont have one.  Maybe we should just abort, and/or create one
11563         based on the current user.
11564
11565         * camel-mime-utils.c (header_address_list_format): Renamed to
11566         header_address_list_encode, which is what it is actually doing.
11567         (header_address_list_format_append): Similarly.
11568         (encoding_map[]): Removed, no longer used.
11569         (header_address_list_encode_append): Take another arg, do we
11570         encode the address (for internet), or not (for display - utf8
11571         only).
11572         (header_address_list_format): Re-added this function, but now it
11573         generates a display version only.  Surprise surprise, that is all
11574         anythign needs to generate anyway.  Sigh.
11575
11576         * camel-internet-address.c (camel_internet_address_get): Return
11577         false if we get an invalid index only.
11578         (camel_internet_address_encode_address): Helper function to encode
11579         a single address for mailing.
11580         (internet_encode): Use the above function to format it.
11581         (camel_internet_address_format_address): Format a single address
11582         for display.
11583         (internet_format): Implement the display version.
11584         (camel_internet_address_class_init): Init the internet_format
11585         virtual function.
11586         (internet_cat): Implement virtual function to concatenate
11587         addresses.
11588
11589         * camel-folder-summary.c
11590         (camel_folder_summary_info_new_from_header): new function, only
11591         build the summary info, dont add it.
11592         (camel_folder_summary_info_new_from_parser): Likewise, for new
11593         info from parser.
11594         (camel_folder_summary_add_from_parser): Cahnged to call function
11595         above to build info.
11596         (camel_folder_summary_add_from_header): Changed to call function
11597         above, to build info.
11598         (camel_folder_summary_info_free): New function to free the summary
11599         message info.
11600         (camel_folder_summary_clear): Changed to clal above to free info.
11601         (camel_folder_summary_remove): Likewise.
11602         (camel_folder_summary_add): Cleaned up the clashing uid
11603         re-assignment logic a little bit.
11604         (camel_folder_summary_decode_uint32): Fixed a typo, 01 != -1.
11605         (camel_folder_summary_decode_time_t): Return -1 on error.
11606         (camel_folder_summary_encode_off_t): New function to encode an
11607         off_t type.
11608         (camel_folder_summary_decode_off_t): And likewise for the reverse.
11609         (CAMEL_FOLDER_SUMMARY_VERSION): Bumped the summary version, since
11610         we're now encoding time/off_t's right.
11611         (summary_header_save): Use time_t encoder to save the timestamp.
11612         (summary_header_load): Likewise for decoding the timestamp.
11613         (content_info_load): Decode off_t types directly, now we can.
11614         (content_info_save): And likewise for encoding.
11615         (camel_folder_summary_add_from_message): New function, create a
11616         summary item from an existing message and add it.
11617         (camel_folder_summary_info_new_from_message): New function, create
11618         a summary item from an existing message.
11619         (summary_build_content_info_message): New function to do the dirty
11620         work of building the conent info/indexing, from a message source.
11621         (format_recipients): Format an internetaddress suitable for the
11622         summary.
11623         (message_info_new_from_message): Build a new summary item from a
11624         mime message.
11625         (content_info_new_from_message): Build a new conent info from a
11626         mime part.
11627         (camel_folder_summary_class_init): Init the new class functions.
11628         (message_info_new_from_message): Fixed for message api change.
11629
11630         Added documentation to the functions.
11631         
11632 2000-11-03  Radek Doulik  <rodo@helixcode.com>
11633
11634         * camel-mime-utils.c (header_msgid_generate): new function,
11635         generates simple message/content id
11636
11637 2000-11-04  Not Zed  <NotZed@HelixCode.com>
11638
11639         * camel-mime-part-utils.c
11640         (camel_mime_part_construct_content_from_parser): Set the
11641         preface/postface from the parser into the multipart object.
11642
11643         * camel-multipart.c (camel_multipart_set_postface): Function to
11644         set the postface text on a multipart.
11645         (camel_multipart_set_preface): Similarly for preface text.
11646
11647         * camel-mime-parser.c (folder_scan_content): If we scan until a
11648         boundary, then we do not include the \n that starts the boundary
11649         line in the content.
11650         (struct _header_scan_stack): Added a ByteArray to store the
11651         multipart pre/post-text as we're scanning.
11652         (folder_pull_part): Free pre/posttext if they are allocated.
11653         (folder_scan_step): Build into the pre/posttext arrays as we
11654         encounter data.
11655         (camel_mime_parser_preface): REturn the multipart preface text, if
11656         there is any scanned.
11657         (camel_mime_parser_postface): Likewise for postface text.
11658         (byte_array_to_string): helper function for above.
11659
11660         * providers/mbox/camel-mbox-folder.c (mbox_append_message): Change
11661         the from line to be "\nFrom ..." always, so no need to
11662         check/append a \n to messages.
11663         (mbox_append_message): Open the output stream with append mode
11664         [assuming this is more efficient than seeking to the end]
11665         And dont prepend \n  on the From line if its the first in the
11666         mbox.
11667         (mbox_append_message): Pass the offset of the real start of the
11668         "From " line when we perform the update (which may != 'seek')
11669
11670         * camel-mime-filter-charset.c (complete): Removed the terminating
11671         NUL 'fix'.
11672
11673         * camel-stream-filter.c (do_read): Added some debug.
11674         (do_flush): And here.
11675         (do_write): And here too.
11676         (do_write): ARGH!!! ARGH!  Ok, so the filter stream was writing a
11677         different number of bytes than the requester was asking it to
11678         write (because of filtering, of course!).  So instead of returning
11679         the true number of written bytes, we'll return what they asked us
11680         to write - unless there is an error in which case we return -1.
11681
11682         * camel-mime-utils.c (base64_encode_close): Sigh, forgot to make
11683         it unsigned.  I think this is actually a gcc bug as (48 >> 2)
11684         somehow ended up negative, when it obviously should not, even if
11685         the data load was signed.
11686
11687 2000-11-03  Jeffrey Stedfast  <fejj@helixcode.com>
11688
11689         * camel-url.c: Undo my incorrect fix - I misunderstood danw -
11690         sorry!
11691
11692 2000-11-03  Dan Winship  <danw@helixcode.com>
11693
11694         * providers/pop3/camel-pop3-store.c (camel_pop3_store_expunge):
11695         Unbreak this.
11696
11697 2000-11-03  Jeffrey Stedfast  <fejj@helixcode.com>
11698
11699         * camel-url.c (camel_url_to_string): If show_pass, then base64 the
11700         password before writing it to the output string.
11701         (camel_url_new): Assume password has been base64 encoded and
11702         decode accordingly.
11703
11704 2000-11-03  Dan Winship  <danw@helixcode.com>
11705
11706         * camel-provider.h: Add an "url_flags" field to CamelProvider.
11707         Move the CAMEL_SERVICE_URL_* defines here and remove the SERVICE_
11708         part of the name.
11709
11710         * camel-service.h: Remove CAMEL_SERVICE_URL_* flags and
11711         service->url_flags field.
11712
11713         * camel-service.c (check_url, get_path): Get URL flags from
11714         service->provider, update for changed flag names.
11715
11716         * providers/*/camel-*-provider.c: Add URL flags to provider
11717         structures.
11718
11719         * providers/*/camel-*-{store,transport}.c, camel-remote-store.c:
11720         Remove service->url_flags initialization.
11721
11722 2000-11-02  Jeffrey Stedfast  <fejj@helixcode.com>
11723
11724         * providers/imap/camel-imap-store.c (get_folder_info): Quote
11725         foldernames when sending to the IMAP server because the folder
11726         name might contain spaces.
11727
11728 2000-11-02  Not Zed  <NotZed@HelixCode.com>
11729
11730         * Merged in camel-incremental-branch.
11731
11732 2000-11-01  Dan Winship  <danw@helixcode.com>
11733
11734         * providers/imap/camel-imap-store.c (get_folder_info): Remove old
11735         subbed folders from hash table after freeing them.
11736
11737         * providers/imap/camel-imap-folder.c (imap_get_full_name): Deal
11738         correctly with namespace == ""
11739
11740 2000-11-01  Gediminas Paulauskas  <menesis@delfi.lt>
11741
11742         * camel-charset-map.c, camel-charset-map-private.h: synced all charsets
11743         with ones found in libunicode. Just include more "iso/*.h" and rebuild
11744         ...private.h with this.
11745         
11746 2000-10-31  Dan Winship  <danw@helixcode.com>
11747
11748         * camel-service.c (service_disconnect): Add a new argument, clean,
11749         that says whether or not to try to disconnect cleanly.
11750
11751         * camel-remote-store.c (remote_send_string, remote_send_stream,
11752         remote_recv_line): disconnect uncleanly on failure to prevent
11753         infinite loops when providers would normally send commands from
11754         disconnect(). Remove some unneeded CamelException goo.
11755
11756         * providers/smtp/camel-smtp-transport.c (smtp_disconnect): 
11757         * providers/pop3/camel-pop3-store.c (pop3_disconnect): 
11758         * providers/nntp/camel-nntp-store.c (nntp_store_disconnect):
11759         * providers/imap/camel-imap-store.c (imap_disconnect): Don't send
11760         QUIT/LOGOUT if !clean.
11761
11762 2000-10-30  Dan Winship  <danw@helixcode.com>
11763
11764         * providers/imap/camel-imap-auth.c: New file with code for IMAP
11765         authentication mechanisms. (Currently just krb4, and without
11766         integrity/privacy protection).
11767
11768         * providers/imap/Makefile.am: Add camel-imap-auth.[ch] and krb4
11769         CFLAGS/LDFLAGS
11770
11771         * providers/imap/camel-imap-store.c (connect_to_server): Split out
11772         from imap_connect. Just does the basic connect and CAPABILITY
11773         check. Redo the CAPABILITY code more robustly.
11774         (query_auth_types_connected): Do this right rather than punting to
11775         query_auth_types_generic. Check for KERBEROS_V4 if compiled with
11776         krb4 support.
11777         (query_auth_types_generic): Mention KERBEROS_V4 if compiled with
11778         krb4 support.
11779         (imap_connect): Use connect_to_server().
11780
11781         * camel-mime-utils.c (base64_encode_step, base64_encode_close):
11782         Take an additional argument, "break_lines", saying whether or not
11783         to add '\n's to the output.
11784
11785         * camel-multipart.c (set_boundary): 
11786         * camel-mime-filter-basic.c (filter, complete): Update for base64
11787         api change.
11788
11789 2000-10-30  Peter Williams  <peterw@helixcode.com>
11790
11791         * providers/imap/camel-imap-store.c (unsubscribe_folder): Correct
11792         parameters to g_hash_table_lookup_extended.
11793
11794 2000-10-29  Dan Winship  <danw@helixcode.com>
11795
11796         Improved IMAP namespace handling: leave the namespace in the
11797         folder names rather than constantly prepending it and stripping it
11798         off. Also some subscription fixes.
11799
11800         * camel-store.c (camel_folder_info_build): Fix for the case where
11801         @top isn't in @folders.
11802
11803         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Add
11804         a "short_name" argument rather than figuring it out ourselves.
11805         (imap_get_full_name): Implementation of CamelFolder::get_full_name
11806         that strips off namespace so the user doesn't have to see it.
11807         (imap_append_message, imap_copy_message_to, imap_move_message_to):
11808         Use folder->full_name rather than calling
11809         camel_imap_store_get_folder_path.
11810
11811         * providers/imap/camel-imap-utils.c (imap_parse_list_response):
11812         Update this: make @flags a bitmask and @sep a char rather than a
11813         string. Make all of the out arguments optional. Handle literals in
11814         the server response.
11815
11816         * providers/imap/camel-imap-store.c (imap_connect): Do a better
11817         job of getting the correct dir_sep for the namespace we're using.
11818         Construct a base_url here that will be used by get_folder_info.
11819         (camel_imap_store_folder_path): Removed
11820         (imap_folder_exists): Add an argument to return the short name of
11821         the folder (parsed out of the LIST response). Update for
11822         imap_parse_list_response change.
11823         (get_folder): Update for the various other changes.
11824         (get_folder_info): Update for the various other changes. Be more
11825         consistent about the returned layout: put everything underneath
11826         the "namespace" directory, including INBOX, even if it doesn't
11827         belong there. Don't destroy the list of subscribed folders until
11828         we've actually gotten the new list.
11829         (folder_subscribed, subscribe_folder, unsubscribe_folder): Use
11830         folder_name directly rather than camel_imap_store_folder_Path.
11831
11832         * providers/imap/camel-imap-command.c (camel_imap_command): Update
11833         for folder name changes.
11834
11835 2000-10-29  Dan Winship  <danw@helixcode.com>
11836
11837         * camel.h: Remove md5-utils.h include since it's not part of Camel
11838         any more.
11839
11840         * camel-charset-map.c: Kill some warnings.
11841
11842         * providers/nntp/camel-nntp-grouplist.c
11843         (camel_nntp_get_grouplist_from_file, camel_nntp_grouplist_save):
11844         Clean up warnings about time_t casts.
11845
11846         * providers/smtp/camel-smtp-transport.c: Remove unused md5-utils.h
11847         include.
11848
11849         * providers/pop3/camel-pop3-store.c: Undefine the "_" macro
11850         defined by krb4's des.h when compiling with krb support.
11851         Fix md5-utils.h include.
11852
11853 2000-10-27  Dan Winship  <danw@helixcode.com>
11854
11855         * camel-mime-utils.c (header_param_list_format_append): Only quote
11856         Content-type parameters when the quoting is mandatory, and deal
11857         with embedded quotes/backslashes when quoting.
11858
11859 2000-10-27    <jpr@helixcode.com>
11860
11861         * providers/pop3/Makefile.am: Tidy up build
11862
11863         * providers/smtp/Makefile.am: ditto     
11864         
11865         * Makefile.am:  Move md5-utils.[hc] to e-util because the 
11866         addressbook is going to use md5 hashes for pilot syncing.
11867         Maybe the calendar conduits as well because this is a good idea
11868         Chris had.
11869
11870 2000-10-26  Kjartan Maraas  <kmaraas@gnome.org>
11871
11872         * camel-exceptions-list.def: Add newline to kill warnings.
11873         
11874 2000-10-25  Dan Winship  <danw@helixcode.com>
11875
11876         * providers/imap/camel-imap-store.c (get_folder_info): Fix folder
11877         listing code infinite loop.
11878
11879         * camel-store.h: Add a "parent" field to CamelFolderInfo.
11880
11881         * camel-store.c (camel_folder_info_build): Deal with "parent"
11882         (camel_store_folder_subscribed, camel_store_subscribe_folder,
11883         camel_store_unsubscribe_folder): Add g_return_if_fails checking
11884         that the folder supports subscriptions.
11885
11886         * providers/imap/camel-imap-store.c (folder_subscribed,
11887         subscribe_folder, unsubscribe_folder): Remove "+ 1"s since the
11888         mail subscribe UI won't prepend / to the folder names now.
11889         (get_folder_info): Clear the "parent" field of the folderinfos
11890         when removing an empty top level.
11891
11892         * providers/nntp/camel-nntp-store.c (nntp_store_folder_subscribed,
11893         nntp_store_subscribe_folder, nntp_store_unsubscribe_folder):
11894         Remove "+ 1"s since the mail subscribe UI won't prepend / to the
11895         folder names now.
11896
11897 2000-10-24  Chris Toshok  <toshok@helixcode.com>
11898
11899         * providers/imap/camel-imap-store.h: add subscribed_folders.
11900
11901         * providers/imap/camel-imap-store.c (camel_imap_store_class_init):
11902         fill in vtable entries for subscription functions.
11903         (camel_imap_store_finalize): new function, so we can free up our
11904         subscribed_folders hashtable.
11905         (camel_imap_store_init): set CAMEL_STORE_SUBSCRIPTIONS in the
11906         CamelStore flags, and create our subscribed_folders hashtable.
11907         (camel_imap_store_get_type): camel_imap_store_finalize is our
11908         finalize function.
11909         (get_folder_info): if we're looking at subscribed_only, clear out
11910         the subscribed_folders hashtable, use LSUB instead of LIST, and
11911         insert folder paths (prepended by their namespace if there is one)
11912         into subscribed_folders.  INBOX subscription support needs work,
11913         since we always show it, regardless of it's subscribed state.
11914         (folder_subscribed): new function.  just look up the folder_path
11915         in the hashtable.
11916         (subscribe_folder): new function.  use the imap SUBSCRIBE command,
11917         and if successful add it to the hashtable.
11918         (unsubscribe_folder): new function.  use the imap UNSUBSCRIBE
11919         command, and if successful remove it from the hashtable.
11920
11921 2000-10-24  Dan Winship  <danw@helixcode.com>
11922
11923         * providers/imap/camel-imap-store.c (get_folder_info): Fill in the
11924         message_count and unread_message_count flags (if !fast).
11925
11926 2000-10-23  Dan Winship  <danw@helixcode.com>
11927
11928         * camel-object.h: #include gnome-i18n.h (and gnome-defs.h since
11929         the former depends on it.)
11930
11931         * *: Add lots of _() and N_().
11932
11933 2000-10-23  Chris Toshok  <toshok@helixcode.com>
11934
11935         * providers/nntp/Makefile.am (libcamelnntpinclude_HEADERS): add
11936         camel-nntp-types.h.
11937
11938 2000-10-23  Dan Winship  <danw@helixcode.com>
11939
11940         * providers/imap/camel-imap-command.c (imap_read_untagged): Fix a
11941         "how could this have been working before" memory overrun bug
11942         found by Vlad.
11943
11944         * camel-op-queue.[ch], camel-thread-proxy.[ch]: These should have
11945         gone away a long time ago.
11946
11947 2000-10-20  Chris Toshok  <toshok@helixcode.com>
11948
11949         * providers/Makefile.am (SUBDIRS): re-enable the nntp provider.
11950
11951 2000-10-20  Chris Toshok  <toshok@helixcode.com>
11952
11953         * providers/nntp/camel-nntp-store.c (build_folder_info): add
11954         function to build a tree from the nntp group names (using '.' as a
11955         heirarchy separator.)  #ifdefed INFO_AS_TREE only.
11956         (build_folder_info_from_grouplist): if INFO_AS_TREE is selected,
11957         call build_folder_info instead of appending a new CamelFolderInfo
11958         to our list.
11959         (ensure_news_dir_exists): use e_mkdir_hier instead of failing if a
11960         parent directory (~/evolution/news generally) isn't there.
11961
11962 2000-10-19  Chris Toshok  <toshok@helixcode.com>
11963
11964         * camel-folder-search.c: #include <sys/types.h> before <regex.h>
11965
11966 2000-10-19  Dan Winship  <danw@helixcode.com>
11967
11968         * providers/imap/camel-imap-utils.c (imap_parse_list_response):
11969         Fix a bug with "INBOX" (or anything else with NIL hierarchy
11970         separator) as the namespace.
11971
11972         * providers/imap/camel-imap-folder.c (imap_refresh_info): Emit
11973         message_changed and folder_changed as appropriate.
11974
11975 2000-10-19  Dan Winship  <danw@helixcode.com>
11976
11977         * camel-folder.c (camel_folder_refresh_info): Update comment here
11978         so refresh_info isn't just for reconnects any more. Make the
11979         default implementation a no-op rather than an error.
11980
11981         * providers/nntp/camel-nntp-folder.c: Move refresh_info impl into
11982         camel_nntp_folder_new, since it would have leaked memory and not
11983         done anything useful if it was called later.
11984
11985         * providers/mbox/camel-mbox-folder.c: Remove no-longer-necessary
11986         refresh_info impl.
11987
11988         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
11989         Update imap_folder->exists, but don't actually load the new
11990         messages. This is a temporary workaround to deal with the IMAP
11991         provider stealing the message list focus at annoying times.
11992         (imap_copy_message_to, imap_move_message_to): Emit a
11993         folder_changed by hand, for now.
11994
11995 2000-10-19  Ettore Perazzoli  <ettore@helixcode.com>
11996
11997         * providers/imap/Makefile.am (libcamelimapinclude_HEADERS): Add
11998         `camel-imap-stream.h'.
11999
12000         * Makefile.am (libcamelinclude_HEADERS): Add `camel-charset-map.h'
12001         and `camel-charset-map-private.h'.
12002
12003 2000-10-18  Jeffrey Stedfast  <fejj@helixcode.com>
12004
12005         * camel-mime-part.c (camel_mime_part_set_description): The correct
12006         fix this time - the description should be encoded here and not in
12007         the camel-medium layer.
12008
12009 2000-10-30  Not Zed  <NotZed@HelixCode.com>
12010
12011         * camel-folder.c (camel_folder_change_info_add_update): Fixed the
12012         changeset logic, which was completely wrong.
12013
12014 2000-10-27  Not Zed  <NotZed@HelixCode.com>
12015
12016         * camel-mime-utils.c (quoted_encode_step): Removed is_blank() stuff.
12017         (header_decode_init): When we set the 'space' bit, dont clear all
12018         the others.
12019         (quoted_encode): Put back the safemask.  Yes we totally need it,
12020         see rfc 2047 section 5, parts (1) and (3).
12021         (CHARS_PSPECIAL): Remove '=' and '_' from the list of allowed
12022         characters (this is an allowed list, not a not-allowed list, like
12023         the ESPECIAL).
12024         (camel_mime_special_table): Updated for fixes to definitions.
12025         (CHARS_ESPECIAL): Added '_' to list of characters that should be
12026         encoded.
12027
12028 2000-10-26  Not Zed  <NotZed@HelixCode.com>
12029
12030         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_update):
12031         Use the new camel_folder_change_info_* stuff to build the update
12032         diff, rather than doing it ourselves.
12033
12034         * camel-folder.c (camel_folder_change_info_add_source): Add a
12035         'source' list, used to create change lists.
12036         (camel_folder_change_info_add_source_list): Add a list of uid's,
12037         convenience function.
12038         (camel_folder_change_info_add_update): Add a uid to the list of
12039         uid's in the new updated list.
12040         (camel_folder_change_info_add_update_list): Add a bunch of uid's
12041         at once for the same purpose.
12042         (camel_folder_change_info_build_diff): Take the source list, the
12043         update list, and find the differences, building on the added or
12044         removed list as appropriate.
12045
12046 2000-10-20  Not Zed  <NotZed@HelixCode.com>
12047
12048         * providers/mbox/camel-mbox-summary.c (removed_uids): REnamed from
12049         add_uid.
12050         (camel_mbox_summary_update): Oops, fix the reversed logic for
12051         determining the uid changesets.
12052
12053         * camel-folder.c (message_changed): Oops, we want to change the
12054         uid, not add it.
12055
12056 2000-10-19  Not Zed  <NotZed@HelixCode.com>
12057
12058         * providers/mh/camel-mh-summary.c (camel_mh_summary_sync): Added a
12059         change list argument, and add expunged uid's to it.
12060
12061         * providers/mh/camel-mh-folder.c (mh_init): Setup the change list.
12062         (mh_finalize): And free it.
12063         (mh_sync): Track changes, and send a folder_changed signal as
12064         appropriate.
12065         (mh_expunge): Likewise.
12066         (mh_append_message): Add the new uid to the change list and
12067         trigger a folder_changed event.
12068
12069         * providers/mbox/camel-mbox-folder.c (camel_mbox_folder_new):
12070         Setup a mbox list of changes structure.
12071         (mbox_finalize): And free it.
12072         (mbox_expunge): Include the change list with the folder_changed
12073         event, and clear it off.
12074         (mbox_sync): And the same for when we are just syncing the folder.
12075         (mbox_append_message): And do the same here, after we've updated
12076         the folder.
12077
12078         * providers/mbox/camel-mbox-summary.c
12079         (camel_mbox_summary_build_from): Use gmtime_r to get the time
12080         thread-safely.
12081         (camel_mbox_summary_sync): Added a changeinfo argument.  Add any
12082         removed or changed messages to the changelists as appropriate.
12083         (camel_mbox_summary_update): Added a changeinfo argument.
12084         Genereate a list of added/removed uid's based on the difference
12085         before and after rebuilding the summary.
12086
12087         * camel-folder.c (camel_folder_change_info_new):
12088         (camel_folder_change_info_add_uid): 
12089         (change_info_add_uid): 
12090         (camel_folder_change_info_remove_uid): 
12091         (camel_folder_change_info_change_uid): 
12092         (change_info_clear): 
12093         (camel_folder_change_info_clear): 
12094         (camel_folder_change_info_free):
12095         (change_info_cat): 
12096         (camel_folder_change_info_cat):  Bunch of utility functions for
12097         working with change info lists.
12098         (camel_folder_init): Init the change info list.
12099         (camel_folder_finalize): And free it.
12100         (thaw): Changed to pass through a list of changes, or to get the
12101         changed message uids from the camelfolderchangeinfo struct, and
12102         reset it.
12103         (folder_changed): Add the changed lists to the frozen change list
12104         if we are frozen.
12105         (message_changed): Add the message to the changed list if we are
12106         in the frozen state.
12107
12108         * camel-folder.h (CamelFolderChangeInfo): New structure to hold
12109         information for the folder_changed event.
12110
12111 2000-10-18  Ettore Perazzoli  <ettore@helixcode.com>
12112
12113         * camel-mime-filter-charset.c (complete): Put a zero at the start
12114         of the outbuf.
12115
12116 2000-10-18  Not Zed  <NotZed@HelixCode.com>
12117
12118         * camel-mime-part.c (add_header): No, we must not encode the
12119         headers here.  These interfaces ARE raw interfaces as they are
12120         defined in camel_medium.  Also removed a bogus/meaningless FIXME.
12121         (set_header): Likewise here, we must not.
12122         (process_header): Removed another bogus comment.
12123
12124         * camel-object.c (shared_is_of_type): Comment out the spitting of
12125         a big warning when we're trying to determine types from code.
12126
12127         * providers/mbox/camel-mbox-summary.c
12128         (message_info_new_from_parser): Only call ibex funcitons if we
12129         have an index.
12130
12131         * providers/mh/camel-mh-summary.c (camel_mh_summary_add): Only
12132         call ibex functions if we have an index.
12133         (remove_summary): Likewise.
12134         (camel_mh_summary_check): Likewise.
12135
12136         * providers/nntp/camel-nntp-store.c (nntp_store_get_folder):
12137         get_folder -> flags argument.
12138
12139         * providers/vee/camel-vee-store.c (vee_get_folder): create->flags.
12140
12141         * providers/pop3/camel-pop3-store.c (get_folder): Changed create
12142         -> flags.
12143
12144         * providers/imap/camel-imap-store.c (get_folder): Added flags
12145         argument.
12146
12147         * providers/mh/camel-mh-folder.c (camel_mh_folder_new): Added
12148         flags argument, and fixed code appropriately.
12149
12150         * providers/mh/camel-mh-store.c (get_folder): Added flags argument.
12151
12152         * camel-folder-search.c (message_body_contains): Perform a regex
12153         match on the contents of messages.  This wont quite work yet as
12154         message contents are encoded when written to a stream.
12155         (build_match_regex): Converts a number of strings into a regex
12156         matching pattern, escaping special chars.
12157         (match_message): match a single message from a folder, by uid.
12158         Slow.
12159         (search_body_contains): Changed to support matching where no index
12160         is supplied.  Matches are performed by retrieving message
12161         contents, etc.
12162         () WTF?  camel should not be including any widget headers.
12163         
12164         * providers/mbox/camel-mbox-folder.c (camel_mbox_folder_new):
12165         Added flags argument.
12166         (mbox_refresh_info): Changed into a NOP, the refresh info code
12167         moved into the new function.
12168         (camel_mbox_folder_new): If we have an index requested, build one,
12169         otherwise, remove an old one, or just dont do anything.
12170
12171         * providers/mbox/camel-mbox-store.c (get_folder): Changed create
12172         to flags, changed code to suit.
12173
12174         * camel-store.c (camel_store_get_folder): Changed create to flags.
12175         (get_folder_internal): And here.
12176         (get_folder): And here too.
12177
12178         * camel-store.h (camel_store_get_folder): Change the create
12179         argument to be a flags argument.
12180
12181 2000-10-17  Dan Winship  <danw@helixcode.com>
12182
12183         * providers/imap/camel-imap-folder.c (imap_refresh_info): Remove
12184         cached info at the end of the summary when the folder shrinks
12185         between sessions. Also remove an untrue comment.
12186         (camel_imap_folder_new): Move the summary creation to after the
12187         folder selection again, since it depends on the uidvalidity
12188         having been set.
12189
12190         * providers/imap/camel-imap-store.c (get_folder): Fix up
12191         summary_file to not include the namespace twice.
12192
12193 2000-10-17  Jeffrey Stedfast  <fejj@helixcode.com>
12194
12195         * camel-mime-part.c (set_header): Encode the header value.
12196         (add_header): Same.
12197
12198 2000-10-17  Not Zed  <NotZed@HelixCode.com>
12199
12200         * camel-mime-filter.c: Added some malloc check debugging stuff.
12201
12202         * camel-mime-parser.c
12203         (struct _header_scan_state): Removed top_part, top_start, and
12204         pending.  I can't even remember why they were there, and they're
12205         not used anymore.
12206
12207         * camel-mime-filter-basic.c (filter): Forgot to up the space here
12208         too.
12209
12210 2000-10-14  Not Zed  <NotZed@HelixCode.com>
12211
12212         * camel-mime-filter-basic.c (complete): Ok, so we hit a fixme, 3x
12213         just wasn't enough for some sequences.
12214
12215 2000-10-16  Jeffrey Stedfast  <fejj@helixcode.com>
12216
12217         * providers/imap/camel-imap-command.c
12218         (imap_read_response): Don't imap_next_word(respbuf + 2), instead
12219         use imap_next_word(respbuf) or else we'll skip over the second
12220         token.
12221
12222 2000-10-16  Jeffrey Stedfast  <fejj@helixcode.com>
12223
12224         * providers/imap/camel-imap-command.c
12225         (camel_imap_response_extract): Don't free 'resp' as it doesn't
12226         point to the beginning of the allocated data, instead free
12227         response->untagged->pdata[i]. Also, if '*resp' is equal to a space
12228         character, then set resp = imap_next_word (resp) rather than
12229         expecting resp++ to work (there's a list broken IMAP daemons that
12230         like to put extra spaces between tokens).
12231         (imap_read_response): Don't expect 'respbuf+2' to be where the
12232         untagged number response to start (see above fix for an
12233         explanation).
12234
12235 2000-10-16  Chris Toshok  <toshok@helixcode.com>
12236
12237         * camel-service.c (get_path): when using the construct (flags &
12238         CAMEL_SERVICE_URL_NEED_*) make sure to do ((flags &
12239         CAMEL_SERVICE_URL_NEED_*) == CAMEL_SERVICE_URL_NEED_*)
12240         (check_url): same.
12241
12242 2000-10-16  Jeffrey Stedfast  <fejj@helixcode.com>
12243
12244         * providers/imap/camel-imap-store.c (imap_disconnect): Only send
12245         the LOGOUT command if the store is connected.
12246         (imap_connect): Set the 'connected' state to TRUE when we
12247         successfully connect.
12248         (get_folder_info): if (!topfi), 'topfi' was allocated but then
12249         'fi' was set. I think Dan meant to set topfi since fi is an
12250         uninitialized value at this point.
12251
12252         * providers/imap/camel-imap-command.c (imap_read_response): Check
12253         for the untagged BYE response and set the 'connected' state to
12254         FALSE if we receive the BYE response. Return NULL if we get a BYE
12255         response.
12256
12257 2000-10-16  Dan Winship  <danw@helixcode.com>
12258
12259         * providers/imap/camel-imap-store.c (get_folder_info): Deal with
12260         the possibility of not getting a LIST response back for the top
12261         level.
12262
12263 2000-10-12  Dan Winship  <danw@helixcode.com>
12264
12265         * providers/imap/camel-imap-summary.c: Simple subclass of
12266         CamelFolderSummary that also keeps a UIDVALIDITY value (and
12267         doesn't, for the moment, build content info).
12268
12269         * providers/imap/camel-imap-folder.c:
12270         (various): Use a CamelImapSummary to store/fetch summary info.
12271         (camel_imap_folder_new): Take a path to a file to use for the
12272         summary. Set the folder's permanent_flags correctly according to
12273         the server response. Read in the summary (checking the
12274         UIDVALIDITY) and update it if it's out of date.
12275         (imap_refresh_info): Just fetch UIDs and flags. If the UIDs all
12276         match, update the flags as needed and be done with it. Otherwise,
12277         delete messages that have been expunged from the server and fetch
12278         full summary info for any new messages.
12279         (imap_sync): Save the summary to disk.
12280         (imap_update_summary): Renamed from imap_get_summary_internal. Can
12281         now be told to get summary for only a subset of messages. Use
12282         camel-mime-utils functions rather than rolling our own header
12283         parsing.
12284         (imap_get_message_info_internal): Merged into imap_update_summary.
12285         (imap_set_message_flags): Don't marked the message FOLDER_FLAGGED
12286         if we're not actually changing the value of any of the flags.
12287         (camel_imap_folder_changed): Deal with EXISTS rather than RECENT.
12288         
12289         * providers/imap/camel-imap-store.c (imap_connect): Call
12290         camel_session_get_storage_path and save the value.
12291         (get_folder): Create a local directory to store summary
12292         information and pass a summary file name to camel_imap_folder_new.
12293         Don't call camel_folder_refresh_info from here any more since
12294         camel_imap_folder_new does it again.
12295
12296         * providers/imap/camel-imap-command.c (camel_imap_command): Add a
12297         special case to this to make it possible to get the repsonses from
12298         a SELECT and still have store->current_folder be updated
12299         correctly.
12300         (imap_read_response): parse EXISTS rather than RECENT
12301
12302         * camel-session.c (camel_session_get_storage_path): Use
12303         e_mkdir_hier.
12304
12305         * camel-folder-summary.c (camel_folder_summary_remove_index): New
12306         function.
12307
12308         * camel-mime-utils.c (header_raw_append_parse): fix this.
12309         (camel-mime-parser.c doesn't use this code because of the MEMPOOL
12310         optimization, so nothing was ever actually calling it before.)
12311
12312 2000-10-11  Not Zed  <NotZed@HelixCode.com>
12313
12314         * camel-mime-part.h (struct _CamelMimePart): Removed
12315         temp_message_buffer, and content_input_stream fields which seem to
12316         have come from nowhere, and are unused.
12317
12318         * camel-mime-utils.c: Added a note about touching this file.
12319         Nobody is to touch it without asking me first.  That goes for you
12320         too Jeff.
12321         (header_decode_text): In what way is this broken?
12322
12323 2000-10-10  Not Zed  <NotZed@HelixCode.com>
12324
12325         * providers/imap/camel-imap-folder.c (imap_get_summary_internal):
12326         Fix camel_summary_* function rename
12327         (imap_get_message_info_internal): Likewise.
12328
12329         * camel-mime-parser.c (camel_mime_parser_finalise): Fixed a spelling mistake.
12330
12331         * camel-folder-summary.c (camel_summary_format_address): Uh, why
12332         do we encode and then decode here ... sigh.  This is not the way
12333         to fix this.
12334         (camel_folder_summary_format_address): Renamed to a proper name,
12335         this was only supposed to be a private function.
12336         (camel_folder_summary_format_string): Likewise.  Oh i see why it
12337         was made public, code reuse by cut & paste.  Joy.
12338
12339 2000-10-11  Chris Toshok  <toshok@helixcode.com>
12340
12341         * providers/nntp/camel-nntp-store.c (nntp_store_unsubscribe_folder): remove the leading '/'.
12342         (nntp_store_subscribe_folder): same.
12343         (nntp_store_folder_subscribed): same.
12344
12345 2000-10-11  Jeffrey Stedfast  <fejj@helixcode.com>
12346
12347         * providers/imap/camel-imap-folder.c (imap_move_message_to): Quote
12348         the mailbox name as it may contain spaces.
12349         (imap_copy_message_to): Same.
12350
12351 2000-10-10  Chris Toshok  <toshok@helixcode.com>
12352
12353         * providers/nntp/camel-nntp-store.c
12354         (build_folder_info_from_grouplist): fill in message_count and
12355         unread_message_count properly.
12356
12357         * providers/nntp/camel-nntp-newsrc.h: reformat.
12358
12359         * providers/nntp/camel-nntp-grouplist.c
12360         (camel_nntp_get_grouplist_from_file): remove spew.
12361
12362         * providers/nntp/camel-nntp-newsrc.c
12363         (camel_nntp_newsrc_group_get_num_articles_read): new function.
12364         (camel_nntp_newsrc_group_get_highest_article_read): robustification.
12365
12366 2000-10-10  Joe Shaw  <joe@helixcode.com>
12367
12368         * providers/imap/camel-imap-store.c 
12369         (parse_list_response_as_folder_info): Check before dereferencing the
12370         sep pointer.
12371
12372 2000-10-10  Jacob "Ulysses" Berkman  <jacob@helixcode.com>
12373
12374         * camel-*.c: teach camel about "its" vs. "it's"
12375
12376 2000-10-09  Chris Toshok  <toshok@helixcode.com>
12377
12378         * providers/nntp/camel-nntp-store.c (finalize): write out the
12379         newsrc.
12380         (nntp_store_get_name): if @brief, just return host.
12381
12382         * providers/nntp/camel-nntp-newsrc.c: robustification and bug
12383         fixes.
12384
12385 2000-10-06  Jeffrey Stedfast  <fejj@helixcode.com>
12386
12387         * camel-folder-summary.c (camel_summary_format_address): Decode
12388         the resulting string.
12389
12390 2000-10-06  Chris Toshok  <toshok@helixcode.com>
12391
12392         * providers/nntp/camel-nntp-grouplist.c: new file.
12393
12394         * providers/nntp/camel-nntp-grouplist.h: new file.
12395
12396         * providers/nntp/camel-nntp-types.h: new file.
12397
12398 2000-10-06  Jeffrey Stedfast  <fejj@helixcode.com>
12399
12400         * camel-mime-utils.c (quoted_encode): Fix so that we don't encode
12401         every single char in the word. Also, do we need a safemask? I
12402         don't see why we would.
12403         (header_encode_string): Don't strip off the last char!!
12404
12405 2000-10-06  Chris Toshok  <toshok@helixcode.com>
12406
12407         * providers/nntp/Makefile.am (libcamelnntpinclude_HEADERS): add
12408         camel-nntp-grouplist.h
12409         (libcamelnntp_la_SOURCES): add camel-nntp-grouplist.c
12410
12411         * providers/nntp/camel-nntp-provider.c: add our own hash functions
12412         for nntp urls.
12413
12414         * providers/nntp/camel-nntp-newsrc.c
12415         (camel_nntp_newsrc_group_is_subscribed): new function.
12416         (camel_nntp_newsrc_subscribe_group): new function.
12417         (camel_nntp_newsrc_unsubscribe_group): new function.
12418
12419         * providers/nntp/camel-nntp-newsrc.h: add prototypes for
12420         _group_is_subscribed, _subscribe_group, and _unsubscribe_group.
12421
12422         * providers/nntp/camel-nntp-store.c
12423         (build_folder_info_from_grouplist): new function.
12424         (nntp_store_get_folder_info): add subscribed_only_parameter.  if
12425         it's FALSE, load the grouplist and call
12426         build_folder_info_from_grouplist.
12427         (nntp_store_folder_subscribed): implement.
12428         (nntp_store_subscribe_folder): implement.
12429         (nntp_store_unsubscribe_folder): implement.
12430         (camel_nntp_store_init): add CAMEL_STORE_SUBSCRIPTIONS to the
12431         store's flags.
12432
12433         * providers/mh/camel-mh-store.c (get_folder_info): add
12434         subscribed_only parameter.
12435
12436         * providers/mbox/camel-mbox-store.c (get_folder_info): add
12437         subscribed_only parameter.
12438
12439         * providers/imap/camel-imap-store.c (get_folder_info): add
12440         subscribed_only parameter.
12441
12442         * camel-store.c (camel_store_supports_subscriptions): new function.
12443         (camel_store_folder_subscribed): new function.
12444         (camel_store_subscribe_folder): new function.
12445         (camel_store_unsubscribe_folder): new function.
12446
12447         * camel-store.h: add prototypes and virtual functions for the
12448         subscribe implementation.  also, add a subscribed_only argument to
12449         camel_store_get_folder_info.
12450
12451 2000-10-05  Jeffrey Stedfast  <fejj@helixcode.com>
12452
12453         * camel-mime-utils.c (header_address_list_format_append): Encode
12454         the name part of the address and don't quote the name.
12455         (header_decode_text): Rewrote from scratch, the old code was badly
12456         broken.
12457
12458 2000-10-05  Jeffrey Stedfast  <fejj@helixcode.com>
12459
12460         * camel-mime-message.c (camel_mime_message_set_reply_to): Use the
12461         camel_address_encode function again.
12462         (camel_mime_message_set_from): Same.
12463
12464 2000-10-05  Jeffrey Stedfast  <fejj@helixcode.com>
12465
12466         * camel-mime-utils.c (quoted_encode_step): Modified to not encode
12467         space chars in the middle of a line.
12468         (isblank): New macro if we're not on a system with the GNU isblank
12469         extension.
12470
12471         * camel-mime-message.c (camel_mime_message_set_from): Reversed my
12472         changes, don't header_encode_phrase - it generates broken headers.
12473         (camel_mime_message_set_reply_to): Same.
12474
12475 2000-10-04  Chris Toshok  <toshok@helixcode.com>
12476
12477         * providers/nntp/camel-nntp-utils.c (camel_nntp_get_headers):
12478         revert to old method (only use XOVER if OVER is supported.)
12479
12480         * providers/nntp/camel-nntp-store.c
12481         (camel_nntp_store_get_overview_fmt): handle the case where the
12482         OVER extension isn't listed but LIST OVERVIEW.FMT works (again,
12483         INN 2.2).  enable the OVER extension in this case.
12484
12485 2000-10-04  Chris Toshok  <toshok@helixcode.com>
12486
12487         * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): return a
12488         gboolean so we can tell if this command worked.  we can't key off
12489         the OVER extension being present because at least one server (INN
12490         2.2) doesn't report the OVER extension but implements the XOVER
12491         command.  This could of course just be because I'm a loser for
12492         thinking they were related in the first place.
12493         (camel_nntp_get_headers): always try XOVER first, and if it fails
12494         revert to the slow method.
12495
12496 2000-10-04  Dan Winship  <danw@helixcode.com>
12497
12498         * providers/mbox/camel-mbox-store.c (get_folder): Fix a case where
12499         a variable was free'd and then possibly used in an error message.
12500
12501 2000-10-04  Chris Toshok  <toshok@helixcode.com>
12502
12503         * providers/nntp/camel-nntp-provider.c
12504         (camel_provider_module_init): news: -> nntp:.
12505
12506 2000-10-04  Chris Toshok  <toshok@helixcode.com>
12507
12508         * providers/nntp/camel-nntp-store.c (nntp_store_get_folder_info):
12509         use "nntp:" instead of "news:" since "news:" urls aren't supposed
12510         to have host/user/port info in them.  also, if there's a user
12511         defined in the url, put it in the urls for our folders.
12512
12513 2000-10-04  Chris Toshok  <toshok@helixcode.com>
12514
12515         * providers/nntp/camel-nntp-auth.c (camel_nntp_auth_authenticate):
12516         borrow some code from the imap provider to query the user for
12517         their password, and pass the user/passwd to nntp.  be extra
12518         paranoid and zero out the password before freeing it.
12519
12520         * providers/nntp/camel-nntp-store.c (camel_nntp_store_init): add
12521         ALLOW_USER/ALLOW_PASSWORD/ALLOW_AUTH to the url flags.
12522         (nntp_store_query_auth_types_generic): return our list of
12523         auth_types.
12524         (nntp_store_query_auth_types_connected): broken, return same as in
12525         query_auth_types_generic.
12526
12527 2000-10-04  Dan Winship  <danw@helixcode.com>
12528
12529         * providers/imap/camel-imap-store.c (imap_connect): IMAP4
12530         (pre-rev1) doesn't support the 'LIST "" ""' idiom, so don't use
12531         it. Just assume the dir_sep is '/'. Shrug.
12532
12533 2000-10-04  Jeffrey Stedfast  <fejj@helixcode.com>
12534
12535         * camel-mime-message.c (camel_mime_message_set_reply_to): Use
12536         header_encode_phrase instead.
12537         (camel_mime_message_set_from): Same.
12538
12539 2000-10-04  Not Zed  <NotZed@HelixCode.com>
12540
12541         * camel-mime-utils.c (header_content_type_is): Handle the case
12542         where ct != NULL, but type and subtype are, and also match that
12543         against text/plain.
12544
12545         * camel-folder-summary.c: Bump summary file version.
12546         (message_info_save): Save the size from the messageinfo.
12547         (message_info_load): Load the size from the summary file.
12548         (message_info_load): Fixed up the time_t saving/loading.  There
12549         was a reason the warning was left there ... obviously nobody could
12550         read the comment "/* warnings, leave them here */", why do i even
12551         bother.
12552         (camel_folder_summary_decode_time_t): Decode a time_t value from
12553         the summary file.
12554         (camel_folder_summary_encode_time_t): Encode a time_t value to the
12555         summary file.
12556
12557 2000-10-03  Jeffrey Stedfast  <fejj@helixcode.com>
12558
12559         * providers/imap/camel-imap-command.c (camel_imap_command): Quote
12560         the mailbox name when sending a SELECT request otherwise mailboxes
12561         with spaces in their names will cause problems.
12562
12563         * camel-mime-message.c (camel_mime_message_set_reply_to): encode
12564         before setting.
12565         (camel_mime_message_set_from): Same.
12566
12567 2000-10-03  Dan Winship  <danw@helixcode.com>
12568
12569         * providers/imap/camel-imap-command.c: New file containing
12570         camel_imap_command and friends. Major camel_imap_command rewrite
12571         to remove duplicated code, make the parsing of literals be
12572         more safe/correct, deal with RECENT/EXPUNGE responses more
12573         consistently, and make it possible to implement the AUTHENTICATE
12574         command.
12575
12576         * providers/imap/camel-imap-utils.c (imap_parse_nstring): New
12577         function, to parse an IMAP "nstring".
12578
12579         * providers/imap/camel-imap-store.c: Move command stuff to
12580         camel-imap-command.c. Update for camel_imap_command changes.
12581
12582         * providers/imap/camel-imap-folder.c: Update for
12583         camel_imap_command changes.
12584         (imap_append_message): CRLF filter the message before sending it.
12585
12586         * providers/imap/Makefile.am: Add camel-imap-command.[ch], remove
12587         camel-imap-stream.[ch] for now.
12588
12589 2000-10-02  Jeffrey Stedfast  <fejj@helixcode.com>
12590
12591         * camel-mime-message.c (camel_mime_message_has_8bit_parts): New
12592         convenience function to determine if there are any 8bit mime parts
12593         in a mime message.
12594         (camel_mime_message_encode_8bit_parts): New convenience function
12595         to recursively reencode all 8bit mime parts to either
12596         quoted-printable or base64 depending on which would be the best
12597         encoding for that part.
12598
12599         * providers/smtp/camel-smtp-transport.c (smtp_data): If the mime
12600         message contains 8bit parts and the server doesn't support 8bit
12601         transfers, reencode those parts before proceding with the send.
12602         (smtp_mail): If the mime message contains 8bit parts and the
12603         server supports the 8BITMIME extension to SMTP, notify the server
12604         that we'll be sending it 8bit mime parts.
12605         (_send_to): Find out if the message contains 8bit parts.
12606
12607 2000-10-02  Jeffrey Stedfast  <fejj@helixcode.com>
12608
12609         * providers/smtp/camel-smtp-transport.c (_send_to): Use the
12610         CamelInternetAddress parser.
12611         (smtp_get_email_addr_from_text): deprecated.
12612
12613 2000-10-02  Dan Winship  <danw@helixcode.com>
12614
12615         * camel-provider.h: Remove default_ports.
12616
12617         * camel-remote-store.c (remote_connect): Get default_port from
12618         CamelRemoteStore rather than CamelProvider.
12619
12620         * providers/{imap,nntp,pop3}/camel-*-store.c: Initialize
12621         CamelRemoteStore::default_port
12622
12623         * providers/*/camel-*-provider.c: Remove default_ports.
12624
12625 2000-10-02  Dan Winship  <danw@helixcode.com>
12626
12627         * camel-folder.[ch]: Remove
12628         camel_folder_{get,free}_subfolder_info, as we want to be able to
12629         scan the whole subfolder tree without having to open any folders,
12630         so this needs to be in CamelStore. Remove can_hold_folders and
12631         can_hold_messages flags; things that don't hold messages are no
12632         longer considered CamelFolders.
12633
12634         * camel-folder-summary.[ch]: Remove CamelFolderInfo stuff.
12635
12636         * camel-store.[ch]: Add camel_store_{get,free}_folder_info, as
12637         well as camel_store_free_folder_info_full and ..._nop for default
12638         implementations, and camel_folder_info_free and
12639         camel_folder_info_build as convenience functions. Turn
12640         CamelFolderInfo into a tree structure and also add an "url"
12641         member.
12642
12643         * providers/*/camel-*-folder.c: Remove subfolder_info and can_hold
12644         stuff.
12645         * providers/*/camel-*-store.c: Add folder_info stuff.
12646
12647         * providers/imap/camel-imap-folder.c (imap_summary_free): Free the
12648         summary elements with camel_message_info_free, not
12649         camel_folder_info_free. Oops.
12650
12651         * providers/imap/camel-imap-utils.c: const poison
12652
12653 2000-09-28  Jeffrey Stedfast  <fejj@helixcode.com>
12654
12655         * providers/smtp/camel-smtp-transport.c: Fixed some memory leaks.
12656         (camel_smtp_transport_init): Initialize supports_8bit to FALSE.
12657         (smtp_helo): If server supports 8bit, set supports_8bit to TRUE.
12658
12659         * camel-transport.h (struct _CamelTransport): Added variable
12660         gboolean supports_8bit (we'll need this eventually? - see bugzilla
12661         bug #53)
12662
12663         * providers/smtp/camel-smtp-transport.c
12664         (smtp_get_email_addr_from_text): Ugh, no wonder people were
12665         getting illegal seek warnings *sigh*. I guess I can only blame
12666         myself for this one though :-(
12667
12668 2000-09-28  Jeffrey Stedfast  <fejj@helixcode.com>
12669
12670         * providers/smtp/camel-smtp-transport.c (_send_to): Don't send the
12671         recipient data through smtp_get_email_addr_from_text - this is a
12672         complete waste. In fact, we don't want to have to use that
12673         function ever.
12674
12675         * camel-internet-address.c, camel-address.c: Added some gtk-doc
12676         comments.
12677         
12678 2000-09-28  Jeffrey Stedfast  <fejj@helixcode.com>
12679         
12680         * camel-mime-utils.c (header_encode_string): Make sure to add the
12681         space char after an encoded word when the encoding is iso-8859-1.
12682
12683 2000-09-28  Jeffrey Stedfast  <fejj@helixcode.com>
12684
12685         * providers/imap/camel-imap-folder.c (imap_get_message): When
12686         getting a literal string response, don't include the \r\n after
12687         the closing } (as in: "... {798}\r\n...")
12688         
12689         * providers/imap/camel-imap-stream.c (stream_read): Same.
12690
12691 2000-09-28  Not Zed  <NotZed@HelixCode.com>
12692
12693         * camel-mime-utils.c (header_fold): New function to fold headers.
12694
12695 2000-09-27  Not Zed  <NotZed@HelixCode.com>
12696
12697         * camel-mime-parser.c (folder_scan_header): If we had an empty
12698         header, then it must be end of the headers too.
12699         (folder_scan_init): No we dont need to init the outbuf with a nul
12700         terminator.
12701
12702         * camel-folder-summary.c (camel_folder_summary_set_uid): New
12703         function to reset the uid to a higher value.
12704
12705         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
12706         "something failed (yo!)" what sort of crap is this?  Fixed all the
12707         indenting again, what wanker keeps running stuff through indent?
12708         (message_info_new): Check the uid we loaded off the disk, if it
12709         existed already, assign a new one.  If it didn't then make sure
12710         the nextuid is higher.
12711
12712         * camel-charset-map.c: New file, used to build a large unicode
12713         decoding mapping table, and use it to determine what is the
12714         lowest charset a given word can be encoded with.  Uses tables from
12715         libunicode's source.
12716
12717         * camel-internet-address.c (internet_encode): Use
12718         header_phrase_encode to properly encode the fullname, as required.
12719         refixed indenting.  Who keeps doing that?
12720         (camel_internet_address_find_address): Changed fatal return/warnings
12721         into assertions.
12722
12723         * camel-mime-utils.c (header_raw_append_parse): Check : explicitly
12724         (removed from is_fieldname() macro).
12725         (camel_mime_special_table): Changed to short, so we can represent
12726         more bit types.
12727         (quoted_encode): Take a mask of the safe chars for this encoding.
12728         (header_address_decode): Removed a #warning that makes no sense
12729         anymore.
12730         (header_decode_date): Fixed the 'broken date' parser code, if it
12731         ever decoded it it just threw away the result.
12732         (header_encode_string): Use better charset matching for encoding
12733         strings as well.
12734
12735 2000-08-31  Not Zed  <NotZed@HelixCode.com>
12736
12737         * providers/mh/camel-mh-summary.c (camel_mh_summary_sync): Save
12738         the index if we do a sync.
12739         (camel_mh_summary_check): Save the index here too.  Probably.
12740
12741 2000-09-27  Dan Winship  <danw@helixcode.com>
12742
12743         * providers/imap/camel-imap-store.c (camel_imap_command_extended):
12744         Return untagged data in a GPtrArray rather than a string, since it
12745         saves processing time and is much easier to deal with for several
12746         commands. Update for camel_imap_folder_changed change.
12747         (camel_imap_fetch_command): Update for camel_imap_folder_changed
12748         change.
12749         (imap_connect, imap_folder_exists): Update for
12750         camel_imap_command_extended change.
12751
12752         * providers/imap/camel-imap-folder.c
12753         (imap_get_message_count_internal,
12754         imap_get_subfolder_info_internal, imap_search_by_expression):
12755         Update for camel_imap_command_extended change.
12756
12757         (imap_get_summary_internal, imap_get_message_info_internal): Use
12758         camel_imap_fetch_command here now to get around the
12759         camel_imap_command_extended change.
12760
12761         (camel_imap_folder_changed): turn expunged into a GArray of ints
12762         rather than a GPtrArray of strings representing ints.
12763
12764 2000-09-26  Jeffrey Stedfast  <fejj@helixcode.com>
12765
12766         * providers/imap/camel-imap-folder.c
12767         (imap_get_message_count_internal): Quote the folder name as it may
12768         contain spaces.
12769         (imap_get_subfolder_info_internal): Same.
12770
12771         * providers/imap/camel-imap-utils.c (imap_parse_list_response): Do
12772         proper unquoting for folder names.
12773         (func_get_current_date): Implemented.
12774
12775         * providers/imap/camel-imap-store.c
12776         (imap_folder_exists): Quote the folder name as it may have spaces.
12777         (imap_create): Same.
12778         (check_current_folder): Same.
12779
12780 2000-09-22  Dan Winship  <danw@helixcode.com>
12781
12782         * providers/imap/camel-imap-folder.c
12783         (imap_get_subfolder_info_internal): The root folder's name is "",
12784         not the namespace.
12785         (camel_imap_folder_new): constify folder_name.
12786
12787         * providers/imap/camel-imap-store.c (get_folder): Create the
12788         folder with folder_name, not folder_path.
12789         (camel_imap_command_preliminary): Don't free cmdid here.
12790
12791 2000-09-21  Dan Winship  <danw@helixcode.com>
12792
12793         * providers/imap/camel-imap-utils.c (imap_create_flag_list): New
12794         function to convert Camel flags to an IMAP flag_list.
12795         (imap_parse_flag_list): Contrariwise.
12796
12797         * providers/imap/camel-imap-store.c (camel_imap_command_*): Make
12798         the @ret arg actually optional, as (mostly) documented.
12799         (various): Don't pass "&result" to camel_imap_command_* if we're
12800         just going to immediately free it. Don't record status if we're
12801         not going to look at it.
12802
12803         * providers/imap/camel-imap-folder.c: Likewise.
12804         (imap_summary_free): Use camel_folder_info_free.
12805         (imap_sync): Use imap_create_flag_list. Clear
12806         CAMEL_MESSAGE_FOLDER_FLAGGED after syncing so we don't keep
12807         re-syncing.
12808         (imap_append_message): Use imap_create_flag_list. Don't leak the
12809         memstream if the append fails.
12810         (imap_move_message_to): Use camel_folder_delete_message rather
12811         than doing it by hand.
12812         (imap_get_summary_internal, imap_get_message_info_internal): Use
12813         imap_parse_flag_list and header_raw_clear.
12814         (camel_imap_folder_changed): Use camel_message_info_free.
12815
12816 2000-09-21  Dan Winship  <danw@helixcode.com>
12817
12818         * providers/imap/camel-imap-store.c (get_folder_name): INBOX is
12819         case-insensitive.
12820         (get_root_folder_name): Make the root folder "" rather than "/".
12821         (get_folder): Update for root folder name change.
12822         (camel_imap_store_get_toplevel_dir): Removed. (Unused, unneeded.)
12823         (camel_imap_store_folder_path): New function to turn a Camel
12824         folder name into the corresponding namespaced IMAP path.
12825         (imap_folder_exists): Make this take a store and a path rather
12826         than a folder.
12827         (imap_create): Likewise
12828         (get_folder): Update for camel_imap_store_folder_path and other
12829         changes.
12830         (check_current_folder): Likewise.
12831
12832         * providers/imap/camel-imap-folder.c: Change a bunch of CamelStore
12833         variables to CamelImapStore (and add a few more) to prevent excess
12834         gratuitous casting. Use camel_imap_store_folder_path where
12835         appropriate.
12836         (camel_imap_folder_new): Update for root folder name change.
12837
12838 2000-09-19  Jeffrey Stedfast  <fejj@helixcode.com>
12839
12840         * providers/smtp/camel-smtp-transport.c (smtp_data): Use the
12841         linewrap filter to achieve full RFC0821 compliance.
12842
12843         * camel-mime-filter-linewrap.[c,h]: New mime-filter to word-wrap.
12844
12845 2000-09-19  Jeffrey Stedfast  <fejj@helixcode.com>
12846
12847         * camel-internet-address.c (internet_encode): When encoding the
12848         internet address, quote the name as the name may have commas or
12849         any other token which may later confuse our address parser.
12850
12851 2000-09-19  Dan Winship  <danw@helixcode.com>
12852
12853         * providers/imap/camel-imap-folder.c
12854         (imap_get_subfolder_info_internal): Fix the case where INBOX
12855         isn't returned in the folder listing.
12856
12857 2000-09-19  Dan Winship  <danw@helixcode.com>
12858
12859         * camel-folder.c: (init): Removed
12860         (camel_folder_init, camel_folder_construct): New object init
12861         function and public object constructor to replace the old init
12862         method in a more Gtk-like fashion.
12863
12864         (get_parent_folder, camel_folder_get_parent_folder): Removed. No
12865         CamelFolder subclass was ever setting the parent_folder member, no
12866         code has ever needed to look at it, and fixing it would actually
12867         be pretty hard.
12868
12869         (get_subfolder_info, camel_folder_get_subfolder_info): Renamed
12870         from ..._names. Deals in CamelFolderInfo now.
12871         (free_subfolder_info, camel_folder_free_subfolder_info): Likewise.
12872
12873         (get_subfolder, camel_folder_get_subfolder): Removed.
12874         CamelFolderInfo contains the subfolder's full name, so this is
12875         unnecessary now, and removing it lets us get rid of the
12876         CamelFolder separator member, which is needed for the default
12877         implementation of this function, but not otherwise needed for most
12878         providers.
12879
12880         Also, lots of code style fixes.
12881
12882         * providers/*: Update CamelFolder subclasses for changes, although
12883         none of them fill in the message counts in the CamelFolderInfo
12884         yet.
12885
12886 2000-09-18  Christopher James Lahey  <clahey@helixcode.com>
12887
12888         * camel-folder-search.c, camel-folder-search.h,
12889         camel-remote-store.c, providers/imap/camel-imap-folder.c,
12890         providers/imap/camel-imap-store.c: Fixed the #include lines to
12891         deal properly with gal.
12892
12893 2000-09-17  Dan Winship  <danw@helixcode.com>
12894
12895         * camel-folder-summary.h: update CamelFolderInfo
12896         * camel-folder-summary.c (camel_folder_info_free): New function to
12897         free the contents of a CamelFolderInfo
12898
12899 2000-09-15  Dan Winship  <danw@helixcode.com>
12900
12901         * camel.c (camel_init): Set camel_verbose_debug to TRUE if
12902         CAMEL_VERBOSE_DEBUG is set in the environment.
12903
12904         * camel-remote-store.c (remote_send_line, remote_recv_line): only
12905         log if camel_verbose_debug is TRUE.
12906
12907 2000-09-14  Jeffrey Stedfast  <fejj@helixcode.com>
12908
12909         * providers/imap/camel-imap-store.c (get_folder): Don't use
12910         dir_sep as top-level directory, use "/".
12911
12912         * providers/imap/camel-imap-folder.c (imap_expunge): Get rid of
12913         unused variable.
12914
12915 2000-09-13  Dan Winship  <danw@helixcode.com>
12916
12917         * providers/imap/camel-imap-folder.c (imap_expunge): Don't look at
12918         the response of the command. camel_imap_command_extended()
12919         processes EXPUNGE responses itself, so if we do it here too we
12920         remove twice as many summary items as we should.
12921
12922 2000-09-13  Jeffrey Stedfast  <fejj@helixcode.com>
12923
12924         * providers/imap/camel-imap-store.c (imap_folder_exists): Rewrote
12925         to take a third argument (gboolean *selectable) so that we can
12926         find out if the folder is selectable or not as we look to see if
12927         it exists. Also, don't use EXAMINE because that will not work on
12928         non-selectable folders, so use LIST instead.
12929         (get_folder): Check to see if the folder exists even vefore
12930         calling imap_create as this will save time. If the folder does
12931         exist, find out if it's selectable. Moved the call to refresh_info
12932         here.
12933
12934         * providers/imap/camel-imap-folder.c (imap_get_uids): Check for a
12935         NULL summary.
12936         (camel_imap_folder_new): Don't call refresh_info here - call it in
12937         get_folder() because we don't know if this folder even exists on
12938         the server yet! And even if it does, we don't know if it can hold
12939         messages or not yet.
12940
12941 2000-09-12  Jeffrey Stedfast  <fejj@helixcode.com>
12942
12943         * camel-mime-parser.c (folder_scan_step): Make sure *datalength is
12944         > 0 before calling camel_mime_filter_filter otherwise we will get
12945         a segfault if the filter calls iconv().
12946
12947 2000-09-08  Christopher James Lahey  <clahey@helixcode.com>
12948
12949         * providers/nntp/camel-nntp-auth.c,
12950         providers/nntp/camel-nntp-auth.h: Fixed a warning.
12951
12952 2000-09-07  Dan Winship  <danw@helixcode.com>
12953
12954         * camel-session.c (camel_session_get_storage_path): Make this not
12955         leak.
12956         
12957 2000-09-07  Dan Winship  <danw@helixcode.com>
12958
12959         * camel-session.c (camel_session_new): Make this take a path to a
12960         directory that Camel can use for its own nefarious purposes.
12961         (camel_session_get_storage_path): New function to return a path
12962         that a service can use for its own nefarious sub-purposes.
12963
12964         * camel-service.c (camel_service_get_path): New method (and
12965         useful default implementation) to get a (relative) pathname
12966         corresponding to the service.
12967
12968 2000-09-06  Dan Winship  <danw@helixcode.com>
12969
12970         * providers/pop3/camel-pop3-store.c (connect_to_server): Make KPOP
12971         work again.
12972
12973 2000-09-06  Jeffrey Stedfast  <fejj@helixcode.com>
12974
12975         * camel-mime-message.c (camel_mime_message_get_received_date):
12976         Implemented (someone added these to camel-mime-message.h but never
12977         implemented them!!) - though it may not be right.
12978         (camel_mime_message_get_sent_date): Same.
12979
12980 2000-09-05  Dan Winship  <danw@helixcode.com>
12981
12982         * camel-mime-part.c (camel_mime_part_get_filename): If a MIME part
12983         has no Content-Disposition, but does have a "name" on the
12984         Content-Type, return that as the filename.
12985         (process_header): strstrip the Content-Description
12986
12987 2000-09-05  Chris Toshok  <toshok@helixcode.com>
12988
12989         * providers/nntp/camel-nntp-utils.c (get_OVER_headers): care about
12990         response code.
12991         (get_HEAD_headers): same.
12992         (camel_nntp_get_headers): same.
12993
12994         * providers/nntp/camel-nntp-store.h: get rid of
12995         CAMEL_NNTP_OK/ERR/FAIL.
12996
12997         * providers/nntp/camel-nntp-store.c
12998         (camel_nntp_store_get_extensions): take CamelException arg and
12999         pass along to camel_nntp_command.
13000         (camel_nntp_store_get_overview_fmt): same.
13001         (nntp_store_connect): convert to using constants in
13002         camel-nntp-resp-codes.h
13003         (nntp_store_get_folder): make use of camel_nntp_folder_new.
13004         (camel_nntp_command_send_recv): new function to deal with auth
13005         challenge.
13006         (camel_nntp_command): split out most of this function into
13007         camel_nntp_command_send_recv.  also, return the actual response
13008         code instead of CAMEL_NNTP_OK/ERR/FAIL.
13009
13010         * providers/nntp/camel-nntp-resp-codes.h: new file.
13011
13012         * providers/nntp/camel-nntp-folder.h: prototype for
13013         camel_nntp_folder_new.
13014
13015         * providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new): new
13016         convenience function.
13017         (nntp_folder_get_message): care more about the actual response
13018         code.
13019
13020         * providers/nntp/Makefile.am (libcamelnntp_la_SOURCES): add
13021         camel-nntp-auth.c.
13022         (libcamelnntpinclude_HEADERS): add camel-nntp-auth.h.
13023
13024         * providers/nntp/camel-nntp-auth.h: new file.
13025
13026         * providers/nntp/camel-nntp-auth.c: new file.
13027
13028 2000-09-05  Peter Williams  <peterw@helixcode.com>
13029
13030         * providers/imap/camel-imap-store.c (imap_folder_exists): Don't free the
13031         result on error; the exception will have the relevant info.
13032
13033         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Check for
13034         exceptions here.
13035
13036         * providers/imap/camel-imap-store.c (imap_connect): Check the exception
13037         on the refresh_folders call.
13038
13039         * providers/imap/camel-imap-store.h: Clean up some now-unused fields.
13040
13041         * camel.c (camel_init): Call unicode_init again, now that libunicode
13042         will not initialize itself twice.
13043
13044 2000-09-02  Lauris Kaplinski  <lauris@helixcode.com>
13045
13046         * camel-folder-search (search_header_contains): Use e_utf8_strstrcase
13047
13048 2000-09-01  Christopher James Lahey  <clahey@helixcode.com>
13049
13050         * providers/imap/camel-imap-utils.c: Removed some unused
13051         functions.
13052
13053 2000-09-01  Peter Williams  <peterw@helixcode.com>
13054
13055         * providers/nntp/camel-nntp-store.c (camel_nntp_command): Initialize
13056         the statically-allocated CamelException so that it doesn't contain
13057         junk data that camel_exception_set() may try to free.
13058         (camel_nntp_store_get_extensions): Same.
13059         (camel_nntp_store_get_overview_fmt): Same.
13060
13061         * providers/pop3/camel-pop3-store.c (camel_pop3_command): Typo
13062         fix (if (*ret) -> if (ret)).
13063
13064         * providers/pop3/camel-pop3-store.c (pop3_connect): Set the
13065         port # back to what was specified ASAP, so that the hash of
13066         the URL doesn't change (which causes a failure in
13067         service_cache_remove that leads to a segfault).
13068
13069         * providers/imap/camel-imap-store.c (imap_connect): Clear the 
13070         exception after a failed LOGIN so that it doesn't pass through
13071         to the upper level and make mail think that the login failed.
13072
13073         * providers/pop3/camel-pop3-store.c (pop3_connect): As above.
13074
13075 2000-08-31  Peter Williams  <peterw@helixcode.com>
13076
13077         * providers/pop3/camel-pop3-store.c (camel_pop3_store_get_type):
13078         Implement POP3 with the CamelRemoteStore now.
13079         (connect_to_server): Hack this a bit to get KPOP to work. Obey
13080         the new connection semantics of the remote store (implicitly).
13081         (query_auth_types_connected): Clear exceptions after attempts
13082         to connect; the code at the bottom will catch hard errors.
13083         Use camel_service_connect.
13084         (camel_pop3_command): Take a CamelException; now, when an error
13085         occurs, ret is set to NULL and the exception passes back the
13086         appropriate information.
13087         (pop3_get_response): Same as above.
13088         (pop3_try_authenticate): Give camel_pop3_command its exception
13089         and handle it properly.
13090         (pop3_connect): Call the parent classfuncs. Don't disconnect
13091         on error (done for us).
13092
13093         * providers/pop3/camel-pop3-folder.c: Obey the camel_pop3_command
13094         semantics.
13095
13096         * camel-remote-store.c (remote_query_auth_types_connected): Don't
13097         warn; just return NULL.
13098         (remote_query_auth_types_generic): Same.
13099         (remote_send_string): Filter out passwords in debugging output.
13100
13101         * providers/pop3/camel-pop3-store.c (camel_pop3_store_init): Also
13102         set the ALLOW_AUTH flag.
13103
13104         * providers/imap/camel-imap-store.c (camel_imap_store_init): Same.
13105
13106 2000-08-31  Chris Toshok  <toshok@helixcode.com>
13107
13108         * providers/nntp/camel-nntp-store.c (camel_nntp_store_class_init):
13109         remove get_folder_name.
13110         (nntp_store_get_folder_name): remove.
13111
13112 2000-08-31  Lauris Kaplinski  <lauris@helixcode.com>
13113
13114         * camel-mime-part.c (write_to-stream): Use filter only if we have one
13115         
13116 2000-08-31  Chris Toshok  <toshok@helixcode.com>
13117
13118         * providers/nntp/camel-nntp-utils.c (get_OVER_headers): use
13119         camel_remote_store_recv_line.
13120
13121         * providers/nntp/camel-nntp-folder.c (nntp_folder_get_message):
13122         use camel_remote_store_recv_line to build message.  also, free our
13123         buffer so we don't leak like mad.
13124
13125         * providers/nntp/camel-nntp-store.c:
13126         (camel_nntp_store_get_additional_data) remove.
13127         (camel_nntp_store_get_extensions): use
13128         camel_remote_store_recv_line.
13129         (camel_nntp_store_get_overview_fmt): same.  also, don't rely on
13130         _get_additional_data anymore since it's easier to parse without.
13131         (camel_nntp_command): use camel_remote_store_send_string and
13132         camel_remote_store_recv_line.
13133
13134         * providers/nntp/camel-nntp-store.h: CamelRemoteStore is the
13135         parent class now.  remove istream/ostream since CamelRemoteStore
13136         takes care of that for us.  also remove the prototype for
13137         camel_nntp_store_get_additional_data.
13138
13139         * providers/nntp/camel-nntp-newsrc.c (camel_nntp_newsrc_write):
13140         make sure to clear dirty bit.
13141         (camel_nntp_newsrc_read_for_server): don't worry about continually
13142         trying to open the file - if it fails we just return an
13143         unpopulated .newsrc file.
13144
13145 2000-08-31  Chris Toshok  <toshok@helixcode.com>
13146
13147         * providers/nntp/camel-nntp-newsrc.c
13148         (camel_nntp_newsrc_read_for_server): make this a bit more robust.
13149         try to create an empty .newsrc file for the server if we can't
13150         open it for reading.  also, don't allocate everything until we've
13151         opened the file.
13152
13153         * providers/nntp/camel-nntp-utils.c (get_OVER_headers): make use
13154         of our overview field indices.
13155         (camel_nntp_get_headers): only call get_OVER_headers if the
13156         extension is present.  warn if it's not - since get_HEAD_headers
13157         needs work before it works.
13158
13159         * providers/nntp/camel-nntp-store.c
13160         (camel_nntp_store_get_extensions): new function - query the server
13161         for it's extensions.
13162         (camel_nntp_store_get_overview_fmt): new function - query the
13163         server for the overview format and build our table of the indices
13164         we care about.  support the "full" suffix on fields.
13165         (nntp_store_connect): call camel_nntp_store_get_extensions and
13166         camel_nntp_store_get_overview_fmt.
13167
13168         * providers/nntp/camel-nntp-store.h: add codes for extensions
13169         found on news.mozilla.org.  only one that we care about is OVER.
13170         also, add CamelNNTPOverField and an enum of the overview fields
13171         that we care about.
13172
13173 2000-08-31  Jeffrey Stedfast  <fejj@helixcode.com>
13174
13175         * providers/imap/camel-imap-utils.c (imap_translate_sexp):
13176         Reimplemented. It should now work correctly for most possible
13177         VFolder rules.
13178
13179 2000-08-31  Jeffrey Stedfast  <fejj@helixcode.com>
13180
13181         * providers/imap/camel-imap-store.c (camel_imap_command_extended):
13182         Don't save any exceptions caused by camel_imap_folder_changed
13183         (camel_imap_fetch_command): Same.
13184         
13185         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
13186         Using a new way of calculating the first recent message that seems
13187         more accurate. Also added code to make sure we don't accidently
13188         add a duplicate summary.
13189
13190 2000-08-31  Not Zed  <NotZed@HelixCode.com>
13191
13192         * camel-mime-part.c (write_to_stream): Use the proper type
13193         checking function to check for text types.
13194         (write_to_stream): If we have a charset on a text type that
13195         isn't us-ascii or utf-8, then we need to reencode it, so add a
13196         filter to do that too.
13197         (write_to_stream): Fix some warnings/use the right constructor,
13198         oops.
13199         (write_to_stream): Rearrange the logic so it always does charset
13200         conversion, and not just if we have a qp/base64 block.
13201
13202         * camel-mime-utils.c (append_latin1): New function - even though
13203         its broken, we'll assume mailers send latin1 headers instead of
13204         us-ascii.  We just have to encode high chars into utf-8.
13205         (header_decode_text): Call append_latin1 for appending unencoded
13206         text segments.
13207         (append_latin1): Do an additional mask for account for c's
13208         undefined behaviour for sign extension whilst shifting right.
13209
13210 2000-08-30  Jeffrey Stedfast  <fejj@helixcode.com>
13211
13212         * providers/imap/camel-imap-store.c (camel_imap_fetch_command):
13213         Rewrote to ignore strings that look like server responses until it
13214         is sure that it has finished reading the literal string response.
13215
13216 2000-08-30  Jeffrey Stedfast  <fejj@helixcode.com>
13217         
13218         * camel-remote-store.c (remote_send_string): Don't wrap printed
13219         strings in quotes, makes things messy
13220         
13221         * providers/imap/camel-imap-folder.c (imap_get_message): Updated
13222         to use the camel_imap_fetch_command
13223         
13224         * providers/imap/camel-imap-stream.c (stream_read): Updated to use
13225         camel_imap_fetch_command
13226
13227         * providers/imap/camel-imap-store.c (camel_imap_command_extended):
13228         No longer handles FETCH requests so no longer needs to be
13229         concerned with checking to make sure that server responses are
13230         valid (they have to be).
13231         (camel_imap_fetch_command): New convenience function that handles
13232         all FETCH requests
13233
13234 2000-08-30  Peter Williams  <peterw@helixcode.com>
13235
13236         * camel-remote-store.c (remote_connect): Unify with remote_post_connect.
13237         (remote_disconnect): Unify with remote_pre_disconnect.
13238         (camel_remote_store_class_init): Don't use the post_connect and
13239         pre_disconnect classfuncs anymore ; they weren't especially useful.
13240
13241         * providers/imap/camel-imap-store.c (imap_connect): Use this again
13242         instead of implementing post_connect.
13243         (imap_disconnect): Analogous to above.
13244
13245         * camel-session.c (camel_session_get_service_connected): New function.
13246         Like camel_session_get_service() but also connects to the service
13247         if needed. camel_session_get_{store,transport} (defined in the header)
13248         used this now, preventing annoying when-to-connect problems.
13249
13250         * camel-service.c (camel_service_new): Revert to the old behavior
13251         of not connecting until told to do so. Otherwise doing auth
13252         testing correctly is really hard.
13253         (camel_service_connect): Fix behavior here (set the connected
13254         flag).
13255         (camel_service_disconnect): Unset the connected flag.
13256
13257 2000-08-30  Jeffrey Stedfast  <fejj@helixcode.com>
13258
13259         * providers/imap/camel-imap-store.c: General cleanup / moving
13260         stuff around to make things easier to follow.
13261
13262 2000-08-30  Jeffrey Stedfast  <fejj@helixcode.com>
13263         
13264         * camel-remote-store.c: Prevent exceptions from being overwritten
13265
13266         * providers/imap/camel-imap-folder.c (imap_expunge): Beautified
13267         (imap_get_subfolder_names_internal): Removed old code as the
13268         replacement code has now been tested and proven to work
13269
13270 2000-08-29  Jeffrey Stedfast  <fejj@helixcode.com>
13271
13272         * providers/imap/camel-imap-utils.c: Removed old code that will
13273         never be needed again
13274
13275         * providers/imap/camel-imap-store.c: Removed old code for
13276         try_connect - will never need this code
13277         (slurp_response): Update to make sure we aren't falsely detecting
13278         EXPUNGE flags
13279
13280 2000-08-29  Peter Williams  <peterw@helixcode.com>
13281
13282         * camel-service.c (camel_service_connect): Uncomment this.
13283         (camel_service_disconnect): Same.
13284
13285         * camel-remote-store.[ch]: New files. Abstract remote storages
13286         (IMAP, POP3, NNTP) and hides the lower-level networky stuff.
13287         
13288         * camel-service.c (camel_service_new): Take an extra argument, the
13289         provider that created us, cause it's useful.
13290         (camel_service_finalize): Unref our new provider member.
13291
13292         * camel-session.c (camel_session_get_service): Pass the proper number of
13293         arguments to camel_service_new().
13294
13295         * camel-imap-store.c: Massive update: 1) use the CamelRemoteService to
13296         make our life Very Easy (TM). 2) Change the semantics of all 
13297         camel_imap_command* functions to take exceptions, centralize tons of
13298         duplicate code, and use the handy RemoteStore utility functions
13299
13300         * camel-imap-folder.c: Use the new semantics of camel_imap_command*
13301
13302         * camel-imap-stream.c: Same.
13303         
13304 2000-08-29  Jeffrey Stedfast  <fejj@helixcode.com>
13305
13306         * providers/imap/camel-imap-store.c (camel_imap_command_extended):
13307         Updated to check for EXPUNGE notifications
13308
13309         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
13310         Updated to account for messages which have been expunged (now
13311         takes a new arg, a GPtrArray of message id's that have been
13312         expunged)
13313         (imap_expunge): Updated (we may want to just use the code in
13314         folder_changed now instead of doing our own summary
13315         expunging...but that can be fixed later)
13316         (imap_append_message): Updated.
13317         (imap_copy_message_to): Updated.
13318         (imap_move_message_to): Updated.
13319
13320 2000-08-28  Peter Williams  <peterw@helixcode.com>
13321
13322         * camel-folder.c (camel_folder_refresh_info): New member function,
13323         refresh_info, used for rereading folder state after its state has
13324         somehow become unknown. Tries to preserve last-known status of
13325         messages.
13326
13327         * providers/mbox/camel-mbox-folder.c (mbox_refresh_info): Implement
13328         ::refresh_info (split up ::init)
13329
13330         * providers/mbox/camel-mbox-store.c (get_folder): Call ::refresh_info.
13331
13332         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Call
13333         ::refresh_info once initialized.
13334         (imap_refresh_info): New member function; reads the summary from
13335         the server (used to be in camel_imap_folder_new; split out).
13336
13337         * providers/imap/camel-imap-store.c (imap_connect): Set
13338         CamelService::connected a little early so that 
13339         camel_imap_command won't try to connect while already
13340         connnecting.
13341         (camel_imap_command*): Try to connect if not connected already.
13342         
13343         * providers/pop3/camel-pop3-folder.c (pop3_refresh_info): Same as above.
13344
13345         * providers/pop3/camel-pop3-folder.c (camel_pop3_folder_new): Same
13346         as above.
13347
13348         * providers/pop3/camel-pop3-store.c (pop3_connect): Set 
13349         CamelService::connected a little early so that
13350         camel_pop3_command won't try to connect while already
13351         connecting
13352         (connect_to_server): Same.
13353
13354         * providers/nntp/camel-nntp-folder.c (nntp_folder_refresh_info): Same
13355         as above.
13356
13357 2000-08-28  Jeffrey Stedfast  <fejj@helixcode.com>
13358
13359         * providers/imap/camel-imap-folder.c (imap_get_message): Fixed the
13360         hack around quoted string responses - should now handle them
13361         according to the specifications in the RFC
13362         
13363         * providers/imap/camel-imap-stream.c (stream_read): Updated to
13364         match the code currently used in camel-imap-folder.c
13365
13366 2000-08-28  Ettore Perazzoli  <ettore@helixcode.com>
13367
13368         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
13369         Never ever free `tmpname' as it comes from `alloca()'!
13370
13371 2000-08-26  Ettore Perazzoli  <ettore@helixcode.com>
13372
13373         * camel-mime-utils.c (header_decode_text): Use `g_free()', not
13374         `free()', to free `decword'.
13375
13376 2000-08-25  Peter Williams  <peterw@helixcode.com>
13377
13378         * camel.c (camel_init): Don't call unicode_init; code in e-util
13379         will do it, and if unicode_init is called twice, you get an
13380         infinite loop when looking up nonexistant encodings (patch
13381         has been submitted to libunicode's maintainer).
13382         
13383         * camel-provider.h: Add a new field, default_ports, which
13384         helps the configuration code guess about how to make CamelURL's
13385         from providers.
13386         
13387         * providers/*/camel-*-provider.c: Specify default ports.
13388
13389 2000-08-25  Jeffrey Stedfast  <fejj@helixcode.com>
13390
13391         * providers/imap/camel-imap-folder.c
13392         (imap_get_subfolder_names_internal): If the url path is "/" and
13393         the folder path is "/", just LIST "" "*" (this should fix some
13394         cyrus imapd problems). Also, INBOX is case insensitive so use
13395         g_strcasecmp
13396
13397 2000-08-24  Lauris Kaplinski  <lauris@helixcode.com>
13398
13399         * camel-folder-summary.c (summary_build_content_info):
13400         Use UTF-8 as default
13401         * camel-mime-part-utils.c (simple_data_wrapper_construct_from_parser):
13402         Use UTF-8 as default
13403         * camel-mime-utils.c (rfc2047_decode_word): Use UTF-8
13404         
13405 2000-08-17  Not Zed  <NotZed@HelixCode.com>
13406
13407         * providers/mh/camel-mh-folder.c (mh_finalize): And here too.
13408
13409         * providers/mbox/camel-mbox-folder.c (mbox_finalize): Close index
13410         on exit.
13411
13412 2000-08-23  Dan Winship  <danw@helixcode.com>
13413
13414         * camel-mime-utils.c (header_address_list_format_append): put
13415         commas between addresses.
13416
13417 2000-08-22  Dan Winship  <danw@helixcode.com>
13418
13419         * providers/imap/camel-imap-folder.c
13420         (imap_protocol_get_summary_specifier): use BODY.PEEK, not BODY, so
13421         we don't set the message \Seen.
13422
13423 2000-08-22  Christopher James Lahey  <clahey@helixcode.com>
13424
13425         * providers/pop3/camel-pop3-store.c: Fixed a small warning.
13426
13427 2000-08-22  Peter Williams  <peterw@helixcode.com>
13428
13429         * camel-service.c (camel_service_new): Connect automatically if the
13430         URL is not empty.
13431         (finalize): Disconnect automatically if connected.
13432         (camel_service_query_auth_types): Split into two functions; one to
13433         be called if we're connected to an actual server (_connected), one
13434         to be called if we're just gauging the general authtypes supported
13435         (_generic).
13436         (is_connected): Remove.
13437
13438         * camel-store.c (camel_store_get_folder): Don't connect explicitly to
13439         the service.
13440
13441         * providers/nntp/camel-nntp-store.c (query_auth_types_generic): Split
13442         the query_auth_types function. Hook it up in _new.
13443         (finalize): Don't try to disconnect here.
13444         
13445         * providers/pop3/camel-pop3-store.c (query_auth_types_generic): Same.
13446         (finalize): Don't try to disconnect here.
13447
13448         * providers/imap/camel-imap-store.c (query_auth_types_generic): Same.
13449         (finalize): Don't try to disconnect here.
13450
13451         * providers/smtp/camel-smtp-transport.c (query_auth_types_generic): Split
13452         the query_auth_types (dummy, in this case) function. Hook it up in _new.
13453         (finalize): Don't try to disconnect here.
13454
13455 2000-08-21  JP Rosevear  <jpr@helixcode.com>
13456         
13457         * providers/nntp/camel-nntp-folder.c (nntp_folder_get_subfolder_names):
13458         Make sure newsrc is not null
13459         (nntp_folder_get_subfolder_names): ditto
13460
13461         * providers/nntp/camel-nntp-newsrc.c 
13462         (camel_nntp_newsrc_get_subscribed_group_names): Programming check
13463         for newsrc == NULL
13464         (camel_nntp_newsrc_get_all_group_names): ditto
13465         (camel_nntp_newsrc_write_to_file): ditto
13466         (camel_nntp_newsrc_write): ditto
13467
13468 2000-08-21  JP Rosevear  <jpr@helixcode.com>
13469
13470         * providers/nntp/camel-nntp-store.c (camel_nntp_command): 
13471         Make sure respbuffer is not null before manipulating it.
13472         If it is null, return CAMEL_NNTP_FAIL and a decent error
13473         message.
13474         
13475 2000-08-18  Peter Williams  <peterw@helixcode.com>
13476
13477         * camel-internet-address.c (internet_encode): If the name is "" we
13478         weren't outputting anything; output the address at least.
13479
13480 2000-08-16  Peter Williams  <peterw@helixcode.com>
13481
13482         * camel-internet-address.c (internet_encode): Fix a leak when
13483         name = "". It's a single-byte leak, but it's the little things
13484         that count.
13485
13486         * camel-object.c (camel_type_lock_up): Don't leave the type
13487         system locked when a bad unlock happens.
13488
13489         * providers/mbox/camel-mbox-store.c (get_folder): Fix a leak.
13490
13491 2000-08-15  Peter Williams  <peterw@helixcode.com>
13492
13493         * providers/imap/camel-imap-folder.c (imap_copy_message_to): Typo fix.
13494
13495 2000-08-14  Peter Williams  <peterw@helixcode.com>
13496
13497         * camel-folder-search.c (search_get_sent_date): New search function;
13498         returns the time_t when the message was sent.
13499         (search_get_receive_date): Same for when it was received.
13500         (search_get_current_date): Gets the current time for use with the
13501         above two. Is this in the right place?
13502
13503         * camel-folder-search.h: Add the new functions above to the class.
13504
13505 2000-08-13  Dan Winship  <danw@helixcode.com>
13506
13507         * providers/nntp/Makefile.am (libcamelnntpinclude_HEADERS): Add
13508         camel-nntp-utils.h
13509
13510         * providers/imap/camel-imap-folder.c
13511         (imap_get_subfolder_names_internal): do a strcasecmp rather than
13512         just a strcmp when checking if a folder is "INBOX", since it is
13513         a case-insensitive name.
13514
13515 2000-08-12  Dan Winship  <danw@helixcode.com>
13516
13517         * providers/imap/camel-imap-folder.c (imap_get_summary_internal):
13518         Don't assume the FETCH results will come back in the order they
13519         were requested.
13520         (imap_get_subfolder_names_internal): Add "INBOX" to the list as
13521         g_malloc'ed memory, not a static string.
13522
13523 2000-08-12  Jeffrey Stedfast  <fejj@helixcode.com>
13524
13525         * providers/imap/camel-imap-store.c
13526         (camel_imap_command_continuation): Now takes a char * parameter
13527         rather than a stream
13528         (camel_imap_command_continuation_with_stream): Same function as
13529         above but takes a stream parameter instead
13530
13531         * providers/imap/camel-imap-folder.c (imap_append_message): Use
13532         camel_imap_command_continuation_with_stream
13533
13534 2000-08-12  Dan Winship  <danw@helixcode.com>
13535
13536         * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): New
13537         function to do one round of attempted authentication.
13538         (pop3_connect): Move a bunch of code out into
13539         pop3_try_authenticate and fix some bugs in the edge cases.
13540
13541 2000-08-12  Jeffrey Stedfast  <fejj@helixcode.com>
13542
13543         * providers/imap/camel-imap-store.c (query_auth_types): No longer
13544         calls try_connect() to get authtypes
13545
13546 2000-08-11  Jeffrey Stedfast  <fejj@helixcode.com>
13547
13548         * providers/imap/camel-imap-store.c
13549         (camel_imap_command_continuation): Changed param order a bit and
13550         fixed some logic
13551
13552         * providers/imap/camel-imap-folder.c (imap_append_message): Use
13553         the new multi-transactional convenience functions
13554
13555 2000-08-11  Jeffrey Stedfast  <fejj@helixcode.com>
13556         
13557         * providers/imap/camel-imap-store.c
13558         (camel_imap_command_preliminary): New convenience function for
13559         multi-transactional commands (opening request)
13560         (camel_imap_command_continuation): New convenience function for
13561         multi-transactional commands (followup data)
13562
13563 2000-08-11  Christopher James Lahey  <clahey@helixcode.com>
13564
13565         * providers/mh/camel-mh-folder.c: Fixed a warning.
13566
13567 2000-08-11  Chris Toshok  <toshok@helixcode.com>
13568
13569         * providers/nntp/camel-nntp-folder.c
13570         (camel_nntp_folder_class_init): remove get_name and get_full_name
13571         assignments, since the camel-folder.c implementation does what we
13572         need.
13573
13574 2000-08-11  Chris Toshok  <toshok@helixcode.com>
13575
13576         * providers/nntp/camel-nntp-store.c
13577         (camel_nntp_store_get_toplevel_dir): use g_get_home_dir, since
13578         evolution_dir isn't available in the providers.
13579
13580 2000-08-11  Peter Williams  <peterw@helixcode.com>
13581
13582         * camel-folder.c (thaw): Fix a bug where the message_changed
13583         signal wasn't being emitted.
13584
13585 2000-08-11  Not Zed  <NotZed@HelixCode.com>
13586
13587         * providers/mh/camel-mh-folder.c (mh_set_message_user_tag):
13588         Implement.
13589         (mh_get_message_user_tag): Implement.
13590
13591         * providers/mbox/camel-mbox-folder.c (mbox_get_message_user_tag):
13592         (mbox_set_message_user_tag): Implement.
13593
13594         * camel-folder.c (move_message_to): Yay so lets fix an already
13595         fixed fix, again.
13596         (copy_message_to): and here too ... update for api change to append().
13597         And removed another warning.
13598         (camel_folder_set_message_user_tag): Routine to set message tags.
13599         (camel_folder_get_message_user_tag): And accessor.
13600
13601 2000-08-10  Christopher James Lahey  <clahey@helixcode.com>
13602
13603         * camel-folder-search.c, camel-folder-summary.c, camel-medium.c,
13604         camel-mime-filter-charset.c, camel-mime-filter.c,
13605         camel-mime-filter.h, camel-mime-message.c, camel-mime-parser.c,
13606         camel-mime-part-utils.c, camel-mime-part.c, camel-mime-utils.c,
13607         camel-movemail.c, camel-multipart.c, camel-object.c,
13608         camel-stream-mem.c, providers/mbox/camel-mbox-folder.c,
13609         providers/mbox/camel-mbox-summary.c,
13610         providers/mh/camel-mh-folder.c,
13611         providers/smtp/camel-smtp-transport.c: Fixed some warnings.
13612
13613 2000-08-11  Not Zed  <NotZed@HelixCode.com>
13614
13615         * providers/vee/camel-vee-folder.c (vee_folder_build_folder): Free
13616         the search properly.
13617         (vee_folder_build): And here too.
13618
13619 2000-08-10  Jeffrey Stedfast  <fejj@helixcode.com>
13620
13621         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
13622         If we go over the max number of messages, don't keep requesting
13623         new message summaries, just break.
13624
13625 2000-08-11  Not Zed  <NotZed@HelixCode.com>
13626
13627         * camel-mime-parser.c (folder_scan_header): A better way to
13628         compress leading whitespace.  The code is probably invalid anyway,
13629         I dont think it will work across buffer boundaries.
13630
13631         * providers/mbox/camel-mbox-folder.c (mbox_append_message): And
13632         write out proper format From lines here too.
13633
13634         * providers/mbox/camel-mbox-summary.c
13635         (camel_mbox_summary_build_from): New function to build a more
13636         compatible mbox "From " line.
13637         (camel_mbox_summary_sync): Write From lines in the proper format.
13638
13639 2000-08-10  Not Zed  <NotZed@HelixCode.com>
13640
13641         * providers/mh/camel-mh-store.c (get_folder): Remove warnin g.
13642
13643         * providers/mbox/camel-mbox-store.c (xrename): Kill some warnings
13644         with constification.
13645
13646         * providers/imap/camel-imap-folder.c (imap_append_message): Fixed
13647         for append api change.  Eek this routine seriously wastes memory.
13648
13649         * providers/mh/camel-mh-folder.c (mh_search_free): Impelemnt.
13650         (mh_append_message): Fix for api change, and include user flags
13651         and tags in new message.
13652
13653         * providers/vee/camel-vee-folder.c (vee_search_by_expression): Fix
13654         for search api change.
13655
13656         * camel-folder.c (camel_folder_search_free): New function for
13657         freeing search results.
13658         (search_free): Changed my mind, implement a default that actually
13659         does something.  Free as to the old interface.
13660         (camel_folder_append_message): Changed to accept a
13661         camelmessageinfo rather than flags, which just doesn't have enough
13662         info in it.
13663         (copy_message_to): Change for append_message api change.
13664         (move_message_to): Likewise.
13665
13666         * providers/mbox/camel-mbox-folder.c (mbox_search_free):
13667         Implement.
13668         (mbox_append_message): Fix for api change, and also copy user
13669         flags/tags across to new summary.
13670
13671         * camel-folder-search.c (search_user_tag): A search expression
13672         that returns the current use flag by name.
13673         (camel_folder_search_free_result): New function to free the result
13674         of a search.
13675
13676         * camel-folder-summary.c: Bump summary version.
13677         (message_info_new): 
13678         (message_info_load): 
13679         (message_info_save): 
13680         (camel_message_info_dup_to): 
13681         (camel_message_info_free): Added support for arbitrary tag/value
13682         pairs (CamelTag's).
13683         (camel_tag_get): 
13684         (camel_tag_set):
13685         (camel_tag_list_size):
13686         (camel_tag_list_free): Operations for working with CamelTags.
13687
13688 2000-08-09  Peter Williams  <peterw@helixcode.com>
13689
13690         * camel-store.c (camel_store_get_folder): Connect beforehand, if
13691         necessary.
13692
13693         * providers/imap/camel-imap-store.c (camel_imap_store_init): Default
13694         the dir_sep to "/" so that certain functions can safely assume that
13695         dir_sep is valid (at least, nonnull).
13696
13697 2000-08-09  Ettore Perazzoli  <ettore@helixcode.com>
13698
13699         * providers/nntp/camel-nntp-folder.c
13700         (nntp_folder_set_message_flags): Get rid of an unused variable.
13701
13702         * providers/nntp/Makefile.am (INCLUDES): Fix includes so that we
13703         don't use installed headers anymore.  [I copied this over from the
13704         IMAP provider, that does not seem to have this problem.]
13705
13706 2000-08-09  Not Zed  <NotZed@HelixCode.com>
13707
13708         * camel-folder-search.c (camel_folder_search_execute_expression):
13709         Reorder search result in summary order if we searched with a
13710         summary.
13711
13712 2000-08-08  Dan Winship  <danw@helixcode.com>
13713
13714         * camel-uid-cache.c: New code to keep an on-disk cache of what
13715         UIDs have been seen in a folder.
13716
13717         * camel-provider.h: Add new flags CAMEL_PROVIDER_IS_SOURCE (mail
13718         can arrive in it by non-Camel means) and CAMEL_PROVIDER_IS_STORAGE
13719         (you can work with mail directly without needing to copy it local).
13720
13721         * providers/*/camel-*-provider.c: Add flags as needed: imap and
13722         mbox are SOURCE and STORAGE. mh and nntp are just STORAGE, pop3 is
13723         just SOURCE.
13724
13725         * camel-mime-message.c (process_header): Add another subject
13726         g_strstrip that fejj's earlier commit missed.
13727
13728 2000-08-08  Peter Williams  <peterw@helixcode.com>
13729
13730         * camel-provider.h: Remove some GTK stuff that I missed.
13731
13732         * providers/imap/camel-imap-store.c (imap_noop): Turn this
13733         back on with the new timeout interface in CamelSession.
13734
13735         * camel-session.[ch] (camel_session_register_timeout): New
13736         interface for Camel to register timeouts. Basically the
13737         GTK timeout interface is copied. We do this because Camel isn't
13738         allowed to use GTK anymore.
13739         
13740 2000-08-07  Not Zed  <NotZed@HelixCode.com>
13741
13742         * providers/mh/camel-mh-folder.c (mh_append_message): Only retry
13743         another uid if we had a name clash, otherwise fail.
13744
13745 2000-08-07  Jeffrey Stedfast  <fejj@helixcode.com>
13746
13747         * providers/imap/camel-imap-folder.c
13748         (imap_get_subfolder_names_internal): If we are trying to get a
13749         subfolder listing of the root folder, always make sure INBOX is
13750         there...
13751
13752         * providers/imap/camel-imap-utils.c (imap_parse_list_response): 
13753         Check for NIL as a directory separator.
13754
13755 2000-08-07  Peter Williams  <peterw@helixcode.com>
13756
13757         * providers/nntp/Makefile.am: Reorder the INCLUDES to pull
13758         in the camel headers from the local source tree before
13759         the ones in $(includedir). This was causing compile problems
13760         because the installed, Gtk-based camel-object.h was included
13761         before the uninstall Camel-based one.
13762
13763 2000-08-07  Jeffrey Stedfast  <fejj@helixcode.com>
13764
13765         * providers/imap/camel-imap-utils.c (imap_translate_sexp): Strip
13766         all \n's from the expression
13767
13768         * string-utils.c (strip): New convenience function to strip
13769         occurences of a single char from a string
13770
13771         * camel-mime-message.c (camel_mime_message_set_subject): Do a
13772         g_strstrip on the subject so we can stop getting those annoying
13773         leading spaces
13774
13775 2000-08-07  Dan Winship  <danw@helixcode.com>
13776
13777         * camel-folder.c (camel_folder_free_deep): Fix this to not require
13778         NULL-termination of the array.
13779
13780 2000-08-04  Jeffrey Stedfast  <fejj@helixcode.com>
13781
13782         * providers/imap/camel-imap-store.c (imap_connect): If we fail to
13783         get a dir_sep, then supply the default of "/".
13784         (get_folder): Undo changes by Peter
13785
13786 2000-08-04  Peter Williams  <peterw@helixcode.com>
13787
13788         * providers/imap/camel-imap-store.c (get_folder): Prevent a coredump
13789         when get_folder()ing from a store with dir_sep = NULL.
13790
13791 2000-08-04  Peter Williams  <peterw@helixcode.com>
13792
13793         * camel-store.h: Include camel-object.h. Ettore said this wasn't
13794         compiling.
13795
13796 2000-08-04  Not Zed  <NotZed@HelixCode.com>
13797
13798         * camel-url.c (camel_url_set_protocol): 
13799         (camel_url_set_host): 
13800         (camel_url_set_path): 
13801         (camel_url_set_port): Url editing functions.
13802
13803 2000-08-04  Dan Winship  <danw@helixcode.com>
13804
13805         * providers/pop3/camel-pop3-folder.c (pop3_set_message_flags): 
13806         (pop3_sync): Indexes into the flags array are message_number minus
13807         1, not just message_number.
13808
13809         * providers/pop3/camel-pop3-store.c: add a debugging macro for
13810         doing protocol tracing.
13811
13812 2000-08-03  Jeffrey Stedfast  <fejj@helixcode.com>
13813
13814         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Only
13815         call imap_get_summary_internal if the folder can hold messages
13816
13817         * providers/nntp/camel-nntp-provider.c (camel_provider_module_init): 
13818         Initialize the service_cache for the news/nntp providers
13819
13820 2000-08-03  Peter Williams  <peterw@helixcode.com>
13821
13822         * providers/nntp/Makefile.am (INCLUDES): Add -I$(top_srcdir) to
13823         pull in libibex/ibex.h
13824
13825 2000-08-02  Not Zed  <NotZed@HelixCode.com>
13826
13827         * providers/mh/camel-mh-summary.c (camel_mh_summary_sync): Expunge
13828         from the end, so the index isn't messed up when you remove a
13829         message.
13830
13831         * providers/mh/camel-mh-folder.c (mh_append_message): Fix a bug
13832         where it would never open an output file/uid.
13833
13834         * providers/mbox/camel-mbox-store.c (rename_folder):
13835         Implementation for mbox as well.
13836
13837         * camel-store.c (camel_store_rename_folder): New method to rename folders.
13838         (rename_folder): Default implementation.
13839
13840         * providers/mh/camel-mh-store.c (delete_folder): Implement this.
13841         (rename_folder): Implement a rename operation.
13842
13843 2000-08-02  Dan Winship  <danw@helixcode.com>
13844
13845         * providers/MH: Kill this. It doesn't have any code to do anything
13846         the new mh provider doesn't do better.
13847
13848         * providers/Makefile.am: Remove reference to MH subdir, and
13849         promote nntp to fully-supported status, since it does compile and
13850         all.
13851
13852         * camel-mime-message.c (camel_mime_message_set_subject): Trim
13853         trailing space from the subject. I've now seen replies from two
13854         different people that tricked the threading code by (a) not having
13855         References/In-Reply-To, and (b) adding an extra space to the end
13856         of the subject line so the subject-based threading fails too. Who
13857         writes these broken mailers anyway?
13858
13859 2000-08-01  Jeffrey Stedfast  <fejj@helixcode.com>
13860
13861         * providers/smtp/camel-smtp-transport.c (smtp_helo): When forced
13862         to use the IP, place it in square brackets.
13863
13864         * providers/imap/camel-imap-utils.c (imap_translate_sexp): New and
13865         improved sexp parser. An honest try at using e-sexp is wrapped in
13866         a #ifdef at the bottom of the file but is currently not used
13867
13868         * providers/imap/camel-imap-folder.c (imap_search_by_expression):
13869         We want to do a UID SEARCH so we get UIDs back instead of sequence
13870         numbers
13871
13872 2000-08-01  Not Zed  <NotZed@HelixCode.com>
13873
13874         * providers/mh: New mh provider implementation.
13875
13876         * providers/Makefile.am (SUBDIRS): Added mh provider.
13877
13878 2000-07-31  Jeffrey Stedfast  <fejj@helixcode.com>
13879
13880         * providers/imap/camel-imap-folder.c (imap_get_message_info_internal): 
13881         Some IMAP servers don't wrap the UID in ()'s so don't depend on that
13882         (imap_get_summary_internal): Same
13883
13884         * providers/imap/camel-imap-utils.c (free_sexp_node): Oops, forgot to
13885         free node->function - not good.
13886
13887 2000-07-31  Peter Williams  <peterw@helixcode.com>
13888
13889         * providers/vee/camel-vee-folder.c (vee_search_by_expression): Add
13890         a NULL to the matches pointer array so that g_strfreev knows where
13891         the end is.
13892
13893 2000-07-31  Jeffrey Stedfast  <fejj@helixcode.com>
13894
13895         * providers/imap/camel-imap-utils.c (imap_translate_sexp): New
13896         convenience function to translate a Camel sexp into the equivalent
13897         IMAP sexp.
13898
13899         * providers/imap/camel-imap-store.c: More places now use
13900         imap_next_word
13901
13902         * providers/imap/camel-imap-folder.c (imap_search_by_expression):
13903         Implemented initial version (this may or may not work quite right)
13904
13905 2000-07-28  Jeffrey Stedfast  <fejj@helixcode.com>
13906
13907         * providers/imap/camel-imap-folder.c (imap_expunge): Make sure
13908         the third word/token (whatever) is "EXPUNGE" and not something
13909         else like "EXISTS" or "RECENT". When removing the message from
13910         the summary also make sure to free that data to avoid leakage.
13911         Also make sure to subtract 1 from the 'id' since IMAP starts
13912         at 1 and our summary starts at 0 :-)
13913
13914 2000-07-28  Jeffrey Stedfast  <fejj@helixcode.com>
13915         
13916         * providers/imap/camel-imap-store.c (camel_imap_status): Cleaned
13917         up a bit, now uses imap_next_word()
13918         (camel_imap_command_extended): Now uses imap_next_word(). When
13919         checking for RECENT, allow the first digit of the recent-count
13920         be between 0 and 9 inclusive instead of exclusive.
13921
13922         * providers/imap/camel-imap-folder.c (imap_expunge): Optimized.
13923         No longer will it need to reload the summary as it now instead
13924         removes the appropriate message summaries from the cache.
13925         (camel_imap_folder_changed): If recent == 0 then return. If 
13926         recent < 0 then just emit the folder_changed signal, don't reload
13927         summaries.
13928
13929 2000-07-28  Jeffrey Stedfast  <fejj@helixcode.com>
13930
13931         * providers/imap/camel-imap-folder.c
13932         (imap_get_message_count_internal): Get message count when STATUS
13933         is not available.
13934         (imap_init): folder->has_search_capability is required for IMAP so
13935         should always be set to TRUE (is currently being set to FALSE as
13936         I've not yet implemented SEARCH support).
13937         (camel_imap_folder_changed): Seem to have fixed my optimization
13938         hack
13939
13940 2000-07-28  Jon K Hellan  <hellan@acm.org>
13941
13942         * providers/imap/camel-imap-store.h (CamelImapServerLevel): New
13943         enum.
13944         (CamelImapStore): Added server_level and has_status_capability
13945         members.
13946
13947         * providers/imap/camel-imap-store.c (imap_connect): Detect
13948         IMAP4REV1, IMAP4 and STATUS in capability response.
13949
13950         * providers/imap/camel-imap-folder.c
13951         (imap_get_message_count_internal): Use STATUS only if server
13952         supports it. TODO: Get message count when STATUS not supported.
13953         (imap_get_message, imap_get_summary_internal,
13954         imap_get_message_info_internal): Handle IMAP4 as well.
13955         (imap_protocol_get_summary_specifier): New function: Make a data
13956         item specifier for the header lines we need, appropriate to the
13957         server level.
13958
13959 2000-07-27  Peter Williams <peterw@helixcode.com>
13960
13961         * camel-mime-utils.c (header_decode_lwsp): More
13962         checks for end of string.
13963
13964         * providers/imap/camel-imap-store.c:
13965         (imap_command_extended): Free the elements of our
13966         array (huge mem leak)
13967
13968         * providers/imap/camel-imap-folder.c:
13969         (summary_get_internal): Same as above.
13970         
13971
13972 2000-07-27  Jeffrey Stedfast  <fejj@helixcode.com>
13973
13974         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
13975         Fixed my routine to only fetch new headers, my IDs were off by 1
13976         on the high end, so when it would fetch the last newly arrived
13977         message it would fail and end up fetching all of the summaries
13978         because of the corruption.
13979
13980 2000-07-27  Jeffrey Stedfast  <fejj@helixcode.com>
13981
13982         * camel-url.c (camel_url_to_string): If the path doesn't begin
13983         with a / and there is a host, prepend a / to the path.
13984
13985 2000-07-27  Jeffrey Stedfast  <fejj@helixcode.com>
13986         
13987         * providers/imap/Makefile.am: Added camel-imap-utils.[c,h]
13988         
13989         * providers/imap/camel-imap-utils.[c,h]: Utilities for parsing
13990         server responses for use in both camel-imap-store.c and
13991         camel-imap-folder.c
13992         
13993         * providers/imap/camel-imap-folder.c (imap_get_summary_internal):
13994         Free all the pointers in the headers array.
13995         (imap_get_subfolder_names_internal): Updated to use
13996         imap_parse_list_response
13997         (imap_parse_subfolder_list): Removed in favor of
13998         imap_parse_list_response
13999
14000         * providers/imap/camel-imap-store.c (camel_imap_command_extended):
14001         Free all the pointers in the data array.
14002         (imap_connect): Updated to use imap_parse_list_response and fixed
14003         a leak
14004         (folder_is_selectable): Updated.
14005
14006 2000-07-27  Jeffrey Stedfast  <fejj@helixcode.com>
14007         
14008         * providers/imap/camel-imap-folder.c (imap_get_message_info): Now
14009         uses a hash table for looking up message info rather than a linear
14010         search :)
14011
14012 2000-07-27  Peter Williams  <peterw@helixcode.com>
14013
14014         * providers/*/Makefile.am: Don't specify SUBDIRS =
14015         [nothing]. Messes up distcheck.
14016         
14017 2000-07-26  Peter Williams  <peterw@helixcode.com>
14018         
14019         * camel-mime-parser.c (folder_scan_init): Initialize
14020         outbuf to be "" -- it's not guaranteed to be zeroed.
14021         
14022         * camel-mime-utils.c (header_references_decode): Return
14023         if the header is NULL -> or "" <-. Don't do our stupid
14024         mailer trick if we point to \0.
14025         (header_decode_quoted_string): Don't rip past end of 
14026         string!
14027         
14028 2000-07-26  Dan Winship  <danw@helixcode.com>
14029
14030         * camel-movemail.c (movemail_external): routine to call an
14031         external movemail program.
14032         (camel_movemail): Nuke return value, use movemail_external when
14033         available and useful, and don't delete "dest" on errors, since
14034         it might have started non-empty.
14035
14036 2000-07-26  Jeffrey Stedfast  <fejj@helixcode.com>
14037
14038         * camel-url.c (camel_url_to_string): Should now always prepend a '/'
14039         before the path if it doesn't already exist.
14040
14041         * providers/imap/camel-imap-folder.c: Fixed a few compiler warnings
14042
14043 2000-07-25  Jeffrey Stedfast  <fejj@helixcode.com>
14044
14045         * providers/imap/camel-imap-folder.c (imap_summary_free): Fixed the
14046         real problem that Peter was running into.
14047
14048 2000-07-25  Dan Winship  <danw@helixcode.com>
14049
14050         * camel-mime-message.c (write_to_stream): Don't add a Mime-Version
14051         header to a message that already has one.
14052
14053         * camel-internet-address.c (internet_encode): Don't put <>s around
14054         addresses with no name part.
14055
14056 2000-07-25  Peter Williams  <peterw@helixcode.com>
14057
14058         * providers/imap/camel-imap-folder.c (imap_expunge): Set 
14059         imap_folder->summary to NULL after calling imap_summary_free,
14060         so we don't get stuck with a junk summary pointer. Should
14061         we free it at all?
14062
14063 2000-07-25  Jeffrey Stedfast  <fejj@helixcode.com>
14064
14065         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
14066         Optimized to try and get the new message headers without reloading
14067         the entire summary from scratch.
14068         (imap_get_summary_internal): Will now sync() before attempting to
14069         reload the summary so that flags are set in the reloaded summary
14070         as well.
14071
14072 2000-07-24  Jeffrey Stedfast  <fejj@helixcode.com>
14073
14074         * providers/imap/camel-imap-store.c (get_folder): Updated to give
14075         special attention to the root folder.
14076
14077         * providers/imap/camel-imap-folder.c
14078         (imap_get_subfolder_names_internal): Updated to handle the root
14079         folder
14080         (imap_get_message_count_internal): return 0 if folder can't hold
14081         messages
14082         (camel_imap_folder_new): Change so that root folder gets special
14083         attention and always gets can_hold_messages set to FALSE
14084
14085 2000-07-24  Dan Winship  <danw@helixcode.com>
14086
14087         * camel-folder.c: Remove exceptions from a number of methods that
14088         work on what ought to be static data: get_parent_folder,
14089         get_parent_store, get_message_count, get_unread_message_count,
14090         get_permanent_flags, get_message_flags, set_message_flags,
14091         get_message_user_flag, set_message_user_flag, get_uids,
14092         get_summary, get_subfolder_names. Turn camel_folder_delete_message
14093         into a macro. (Mostly a pull-up from the camel-async branch.)
14094
14095         * providers/{imap,mbox,nntp,pop3,vee}: Update for CamelFolder
14096         changes
14097
14098 2000-07-24  Jeffrey Stedfast  <fejj@helixcode.com>
14099
14100         * providers/imap/camel-imap-folder.c (imap_get_message_info): Updated
14101         to port easily to the new Camel API
14102         (imap_init): Don't SELECT INBOX, we don't need to do that
14103
14104 2000-07-24  Jeffrey Stedfast  <fejj@helixcode.com>
14105
14106         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): 
14107         Initialize the summary and subfolder listing.
14108         (imap_summary_free): Now takes a GPtrArray arg rather than a 
14109         CamelImapFolder as it increases it's usefullness for free()'ing
14110         temporary summaries.
14111         (imap_get_message_count_internal): A new convenience function for
14112         getting the actual message count on a server to be used by 
14113         imap_get_summary_internal)
14114         (imap_get_message_count): Since the Camel API is on the move again, 
14115         the future version of this function will not be able to make a
14116         call to the store, it must only access previously fetched data (thus 
14117         the creation of the _internal function)
14118         (imap_get_subfolder_names_internal): Again, because the future version
14119         of imap_get_subfolder_names will not take an exception, we must rename
14120         this function which will be called by camel_imap_folder_new()
14121         (imap_get_subfolder_names): We now return the previously collected
14122         subfolder listing that the _internal function fetched previously
14123         (imap_get_summary_internal): Again, same idea as the previous _internal
14124         functions...
14125         (imap_get_summary): Again... now returns a previously aquired summary
14126
14127         * providers/imap/camel-imap-store.c (imap_noop): This will hopefully
14128         prevent the imap store from disconnecting.
14129         (imap_connect): Modified to add a gtk timeout event that will call
14130         imap_noop() every 10 minutes (we may want to change this time value)
14131         (imap_disconnect): Modified to remove the NOOP timeout event from the
14132         store.
14133         (camel_imap_command_extended): Commented out the code that would try
14134         and detect if the store was disconnected and then reconnect if it was
14135         needed.
14136
14137 2000-07-24  Dan Winship  <danw@helixcode.com>
14138
14139         * camel-folder.[ch]: Remove camel_folder_get_message_uid, which
14140         was not used, and not implemented by any provider.
14141
14142         * providers/nntp/camel-nntp-folder.c: Remove get_message_uid
14143         non-implementation.
14144
14145         * camel-folder-pt-proxy.[ch], camel-arg-collector.c,
14146         camel-marshal-utils.[ch]: Bye bye bye.
14147
14148         * Makefile.am: remove reference to camel-arg-collector.c
14149
14150 2000-07-23  Jeffrey Stedfast  <fejj@helixcode.com>
14151
14152         * providers/imap/camel-imap-store.c (imap_disconnect): Made it a
14153         little more forgiving. Also set current_folder to NULL as there is
14154         no selected folder after a disconnect.
14155         (stream_is_alive): Detects whether or not a socket is "alive"
14156         (camel_imap_command_extended): Use stream_is_alive() to aid in the
14157         detection of a disconnected state.
14158
14159 2000-07-22  Jeffrey Stedfast  <fejj@helixcode.com>
14160
14161         * providers/imap/camel-imap-store.c (get_folder): Clear
14162         CamelExceptions when appropriate (eg when folder is marked as
14163         \NoSelect). Still needs some cleanup and perhaps Dan will have a
14164         better way of doing this as this seems like a messy way of
14165         handling this.
14166
14167         * providers/imap/camel-imap-folder.c (imap_get_uids): Took out
14168         some debug statements as they are no longer needed.
14169
14170 2000-07-21  Jeffrey Stedfast  <fejj@helixcode.com>
14171
14172         * providers/imap/camel-imap-folder.c (imap_get_subfolder_names):
14173         Updated to not strip out subfolders that are marked as \NoSelect
14174         because this will be correctly handled in store->get_folder from
14175         now on.
14176
14177         * providers/imap/camel-imap-store.c (folder_is_selectable): New
14178         convenience function for use in get_folder().
14179         (parse_list_response): Now takes a char **flags argument which is
14180         needed by folder_is_selectable().
14181         (imap_connect): Updated to reflect changes to
14182         parse_list_response().
14183
14184 2000-07-21  Jeffrey Stedfast  <fejj@helixcode.com>
14185         
14186         * providers/imap/camel-imap-stream.c (stream_read): Updated with
14187         some of the same fixes I've made to camel-imap-folder.c like
14188         recalculating message part lengths.
14189
14190         * providers/imap/camel-imap-store.c (camel_imap_command_extended):
14191         Rewrote the code to check for "* %d RECENT". Still needs to be
14192         modified, but should no longer cause an infinite loop by detecting
14193         mis-detecting RECENT messages.
14194
14195 2000-07-20  Jeffrey Stedfast  <fejj@helixcode.com>
14196
14197         * providers/imap/camel-imap-folder.c (imap_get_summary):
14198         (imap_get_message_info): Oops. Fix UID parser to allow 0 and 9 to
14199         be in the range of valid UID chars.
14200
14201 2000-07-20  Peter Williams  <peterw@helixcode.com>
14202
14203         * camel-object.c (camel_object_unref): Add a new global mutex
14204         'refcount' held when refcounting operations occur.
14205
14206 2000-07-19  Peter Williams  <peterw@helixcode.com>
14207
14208         * camel-object.c (camel_type_lock_up): Correct the recursiveness;
14209         the locklevel is stored as a private, so each thread has its own
14210         idea of the locklevel. Thus one thread can relock, but a different
14211         one will think that it's a level 0 and try to lock the type_system
14212         mutex.
14213
14214 2000-07-19  Jeffrey Stedfast  <fejj@helixcode.com>
14215
14216         * providers/imap/camel-imap-folder.c: General cleanup working
14217         towards getting Actions->Expunge working correctly.
14218
14219         * providers/imap/camel-imap-store.c
14220         (cammel_imap_command_extended): Added code to look for "* %d
14221         RECENT" and to emit the folder_changed signal if there are any
14222         recent messages. Note: this is a hack and needs to be rewritten
14223         badly.
14224
14225 2000-07-19  Jeffrey Stedfast  <fejj@helixcode.com>
14226
14227         * providers/imap/camel-imap-folder.c (imap_get_summary): If the
14228         folder's message count is not the same as the number of summaries,
14229         free the old summary and create a new summary.
14230
14231 2000-07-18  Jeffrey Stedfast  <fejj@helixcode.com>
14232
14233         * providers/imap/camel-imap-folder.c
14234         (camel_imap_folder_class_init): Added in
14235         imap_[g,s]et_message_user_flag() methods
14236         (imap_get_message_info): Rewrote to use the more efficient way of
14237         downloading summary information and also added a UID comparison so
14238         that if the UID requested doesn't match the UID received, it
14239         returns NULL.  FIXME: When the mailer gets NULL when it requested
14240         message info, it seems that it displays a row for that message and
14241         when you try and select the blank row, it segfaults.
14242
14243         * providers/imap/camel-imap-store.c (get_folder): Oops, this
14244         should not be checking against "/", it should be checking against
14245         dir_sep.
14246
14247         * providers/imap/camel-imap-folder.c (imap_parse_subfolder_line):
14248         Updated to trim out the leading namespace.
14249         (imap_get_subfolder_names): Let the subfolder parser trim the
14250         namespace off the folder name.
14251
14252 2000-07-17  Peter Williams  <peterw@helixcode.com>
14253
14254         * camel-object.c (camel_type_lock_up): New function; the
14255         Camel type_system lock is now fakey-recursive, being controlled
14256         by a semaphore that goes up and down and is protected by another
14257         lock. Theoretically all we need is the lock on the semaphore,
14258         but this we catch exceptions "better" (by deadlocking).
14259         (camel_type_lock_down): Corresponding to above.
14260         (all functions): s,G_LOCK,camel_type_lock_up, etc.
14261
14262 2000-07-17  Jeffrey Stedfast  <fejj@helixcode.com>
14263
14264         * providers/imap/camel-imap-store.c (imap_disconnect): Send a
14265         "LOGOUT" command.
14266
14267         * providers/imap/camel-imap-folder.c (imap_get_message): Hacks to
14268         get IMAP code to work with CommunigatePro and MS Exchange (and any
14269         other servers that send back a UID at the end of each FETCH inside
14270         of the main body of the message part).
14271         (imap_sync): Un-#if 0 the code that sets the flags on the IMAP
14272         server for messages that have changed. Oops, don't mask with
14273         DELETED to find out if the message has been answered ;-)
14274         (imap_expunge): sync before expunging.
14275
14276 2000-07-16  Jeffrey Stedfast  <fejj@helixcode.com>
14277
14278         * providers/imap/camel-imap-store.c: All SELECT calls now pass
14279         a NULL folder argument to camel_imap_command_extended() since it's
14280         not needed.
14281         (imap_connect): Moved service_class->connect() to the point right
14282         after a connection is established with the server rather than
14283         waiting until the end of the function.
14284         (camel_imap_command): Updated the documentation comment
14285         (camel_imap_command_extended): Before sending a command, first
14286         check to make sure we are connected; if we aren't, then reconnect.
14287         Don't strncmp() command with "SELECT" as it's redundant.
14288
14289         * providers/imap/camel-imap-folder.c: All SELECT calls now pass
14290         a NULL folder argument to camel_imap_command_extended() since it's
14291         not needed. Also s/camel_imap_command/camel_imap_command_extended as
14292         I will probably be doing away with camel_imap_command() or at least
14293         only using it for LOGIN and similar commands where the server won't
14294         notify us of any recent messages.
14295
14296 2000-07-15  Jeffrey Stedfast  <fejj@helixcode.com>
14297
14298         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): 
14299         One last fix to get rid of hard-coded "/" directory separators
14300
14301 2000-07-14  Peter Williams  <peterw@helixcode.com>
14302
14303         * camel-object.c : Implement 'events', which are suspiciously
14304         like signals except without all the marshalling baggage, and
14305         with quasi-thread-safety.
14306         (camel_object_class_declare_event): New func.
14307         (camel_object_hook_event): Ditto.
14308         (camel_object_trigger_event): Ditto.
14309         (obj_class_init): Declare the "finalize" event.
14310         (obj_class_finalize): Free the hashtable of events->preps
14311         (obj_finalize): Free the hashtable of events->hooklists
14312         (camel_object_unref): Trigger the finalize event (ourselves,
14313         to prevent massively unpleasant looping things.)
14314         
14315 2000-07-14  Peter Williams  <peterw@helixcode.com>
14316         
14317         * camel-object.c (make_global_classfuncs): Change to return
14318         a CamelObjectClass. Change parents to a GSList and free it
14319         when done.
14320         (camel_object_new): Don't allocate a classfuncs for every object;
14321         merely give it a reference to the global_classfuncs. Convert
14322         parents to a GSList and free it when done.
14323         (camel_object_unref): Don't free the classfuncs. Free the parents
14324         list, which is changed to a GSList.
14325
14326 2000-07-14  Jeffrey Stedfast  <fejj@helixcode.com>
14327
14328         * string-utils.c (string_unquote): New convenience function
14329         to unquote a string if it's encapsulated by "'s
14330         
14331         * providers/imap/camel-imap-folder.c:
14332         * providers/imap/camel-imap-store.c: Made the necessary changes
14333         to stop using hard coded directory separators.
14334
14335 2000-07-13  Dan Winship  <danw@helixcode.com>
14336
14337         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_load):
14338         If the summary is for a smaller mbox, and rebuilding from the
14339         last-known end position fails, try rebuilding from the beginning.
14340         Deals with the case where the user edits the mbox and makes it
14341         bigger, without adding new messages.
14342
14343 2000-07-13  Peter Williams  <peterw@helixcode.com>
14344
14345         * camel-object.c: Rewritten to not be based on GtkObject,
14346         but a tiny threadsafe ripoff thereof. Objects still cannot
14347         be shared across threads, but ref/unref/destroy/new/etc
14348         will work. Signals are not implemented because doing it
14349         robustly would be a major pain in the butt, but class
14350         functions are. There's a small demonstration that it doesn't
14351         crash in ./temp-test.c: build it with ./make-test.sh.
14352         * camel-stream.c, camel-seekable-stream.c, camel-stream-mem.c:
14353         moved over to CamelObject. Proof of concept: two levels of
14354         subclass and class functions, all working without coredumps.
14355         To port to CamelObject:
14356         - s,GTK_,CAMEL_,g in the cast checks
14357         - s,gtk_type_new,camel_object_new,g
14358         - s,GtkType,CamelType,g
14359         - Change get_type function over to camel_type_declare
14360         - instead of hooking to finalize function, it goes into the
14361           type declaration.
14362         - remove signals.
14363         - instead of GTK_OBJECT(so)->klass, CAMEL_OBJECT_GET_CLASS(so)
14364         - s,gtk_type_class,camel_type_get_global_classfuncs,g
14365         - don't chain finalize handlers; it will be done for you
14366         
14367 2000-07-13  Jeffrey Stedfast  <fejj@helixcode.com>
14368
14369         * providers/imap/camel-imap-folder.c: 
14370         * providers/imap/camel-imap-store.c: If a SELECT fails, set
14371         imap_store->current_folder to NULL so a SELECT is forced before
14372         any message/folder operations are requested. Also, because some
14373         users don't use a namespace, make sure that if the url->path is 
14374         "/" we don't use it when creating the folder_path.
14375         (camel_imap_command[_extended]): Since we allow the passing of
14376         a NULL folder which we can use to bypass a forced SELECT, no need
14377         to check for the individual commands that don't require a folder
14378         to be selected.
14379
14380 2000-07-13  Jeffrey Stedfast  <fejj@helixcode.com>
14381
14382         * providers/imap/camel-imap-folder.c: 
14383         * providers/imap/camel-imap-store.c: Updated to use CAMEL_IMAP_OK, 
14384         CAMEL_IMAP_NO, CAMEL_IMAP_BAD, and CAMEL_IMAP_FAIL rather than the 
14385         ones copied from the POP3 provider. 
14386
14387 2000-07-13  Jeffrey Stedfast  <fejj@helixcode.com>
14388
14389         * providers/imap/camel-imap-folder.c (imap_get_summary): Oops.
14390         If the number of messages in the folder is 0, don't fetch
14391         summaries 1 thru 0, just return an empty summary.
14392         (imap_copy_message_to): Fixed to use message UID and also send
14393         the source folder as an arg to camel_imap_command rather than NULL.
14394         (imap_move_message_to): Same.
14395         (imap_init): If SELECT is successful, we need to set the current
14396         folder to the one selected, this was causing problems with move/copy
14397
14398 2000-07-13  Dan Winship  <danw@helixcode.com>
14399
14400         * camel-service.h: define a set of CAMEL_SERVICE_URL_ALLOW_* flags
14401         parallel to the _NEED_* flags, and make the _NEED_* flags imply
14402         the _ALLOW_* ones.
14403
14404         * providers/imap/camel-imap-store.c (camel_imap_store_init): imap
14405         urls ALLOW_PATH
14406
14407 2000-07-13  Jeffrey Stedfast  <fejj@helixcode.com>
14408
14409         * providers/imap/camel-imap-folder.c (imap_get_summary): New
14410         and improved approach to fetching an entire folder summary
14411         that should be much much faster than the old way as it gets
14412         the entire folder summary in 1 shot rather than requesting
14413         message by message. As with the last update, this version
14414         also only fetches the minimum number of header fields.
14415         (imap_get_summary): Oops, forgot to free the temp 
14416         GPtrArray *headers
14417
14418 2000-07-13  Jeffrey Stedfast  <fejj@helixcode.com>
14419
14420         * providers/imap/camel-imap-folder.c (imap_get_summary): Don't
14421         fetch the entire RFC822 header, just fetch the fields we want.
14422         (imap_get_message_info): Same.
14423
14424 2000-07-13  Not Zed  <NotZed@HelixCode.com>
14425
14426         * camel-mime-filter-basic.c (camel_mime_filter_basic_new_type):
14427         Reset filter on setup.
14428         (reset): When resetting qp encoding, set the state to -1, instead
14429         of 0.
14430
14431         * camel-mime-utils.c (quoted_encode_step): Actually count the
14432         characters output sofar (it never counted any).  Bunch of other
14433         fixes.
14434         (quoted_encode_close): Also flush out final character, if there's
14435         one.
14436
14437 2000-07-12  Jeffrey Stedfast  <fejj@helixcode.com>
14438
14439         Chris forgot to add #include <e-util/e-util.h> to the source files
14440         
14441         * providers/imap/camel-imap-store.c (imap_connect): Fixed Peter's 
14442         fix, we don't want to send a string to a %d.
14443
14444 2000-07-12  Christopher James Lahey  <clahey@helixcode.com>
14445
14446         * camel-folder-search.c, providers/imap/camel-imap-store.c:
14447         Changed from strstrcase to e_strstrcase.
14448
14449         * string-utils.c, string-utils.h: Removed strstrcase (in favor of
14450         e_strstrcase in e-util/e-util.c.)
14451
14452 2000-07-12  Chris Toshok  <toshok@helixcode.com>
14453
14454         * providers/nntp/camel-nntp-folder.c
14455         (nntp_folder_set_message_flags): get the article num out of our
14456         uid and mark it read in the newsrc.
14457         (nntp_folder_get_message): get the message id out of the uid to
14458         fetch the article.
14459
14460         * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): the uid
14461         is now <article-num>,<messageid>
14462         (get_HEAD_headers): same.
14463
14464         * camel-mime-parser.c (folder_scan_step): go to HSCAN_MESSAGE
14465         state when ct->subtype is "news" as well as "rfc822".  this makes
14466         attachments of type "message/news" display properly.
14467
14468 2000-07-12  Dan Winship  <danw@helixcode.com>
14469
14470         * camel-folder.c (camel_folder_free_deep,
14471         camel_folder_free_shallow, camel_folder_free_nop): Useful default
14472         implementations for free_{uids,subfolder_names,summary}.
14473         (free_subfolder_names, free_uids): Make these g_warning-ing
14474         default implementations.
14475
14476         * providers/*/camel-*-folder.c: Use the new functions where
14477         appropriate, remove duplicated code.
14478
14479 2000-07-12  Peter Williams  <peterw@helixcode.com>
14480
14481         * providers/imap/camel-imap-store.c (query_auth_types): Check for
14482         NULL parameters when setting the exception so as to not crash on
14483         Solaris (can't handle a %s passed NULL).
14484         (imap_connect): Same.
14485         
14486 2000-07-12  Jeffrey Stedfast  <fejj@helixcode.com>
14487
14488         * providers/mbox/camel-mbox-folder.c (mbox_delete_message): Use
14489         mbox_set_message_flags () instead of setting the flags by hand. This
14490         fixes the problem of the "message_changed" signal not being emitted
14491         at the correct time.
14492
14493         * providers/imap/camel-imap-folder.c: "folder_changed" signals should
14494         pass a third argument (which is ignored).
14495
14496         * camel-folder.c: Undo gtk signal emits done in set_flags and 
14497         expunge.
14498         (move_message_to): 
14499         (copy_message_to): Create info as a const CamelMessageInfo
14500
14501 2000-07-12  Chris Toshok  <toshok@helixcode.com>
14502
14503         * providers/nntp/Makefile.am: don't add test-newsrc to the build
14504         since it needs libcamel (which isn't built at the time test-newsrc
14505         needs linking.)
14506
14507         * providers/nntp/camel-nntp-utils.c (get_HEAD_headers): fill in
14508         MessageInfo->message_id.
14509         (get_XOVER_headers): same.
14510
14511         * providers/nntp/camel-nntp-folder.c (nntp_folder_init): move
14512         summary loading here.
14513         (nntp_folder_sync): summary/newsrc changes should be stored here.
14514         put a comment to that effect.
14515         (nntp_folder_set_message_flags): don't save the newsrc here.
14516         (nntp_folder_get_uids): use g_ptr_array_index instead of the
14517         cast/addition.
14518         (nntp_folder_get_summary): no need to check if we should generate
14519         the summary here.  already done.
14520         (nntp_folder_get_message_info): implement.
14521
14522         * providers/nntp/camel-nntp-store.c
14523         (camel_nntp_store_get_toplevel_dir): use evolution_dir instead of
14524         computing it ourselves.
14525         (nntp_store_disconnect): call camel_nntp_newsrc_write.
14526         (ensure_news_dir_exists): new function to create the news/<news
14527         server> subdir.
14528         (camel_nntp_store_class_init): hook up connect/disconnect and
14529         finalize.
14530         (nntp_store_connect): if ensure_news_dir_exists fails throw an
14531         exception.
14532
14533 2000-07-12  Peter Williams  <peterw@helixcode.com>
14534
14535         * camel-folder.c (camel_folder_set_message_flags): Emit a message_changed
14536         signal once the flags are set on the message.
14537         (camel_folder_set_user_flag): Ditto.
14538         (camel_folder_expunge): Emit a folder_changed if no exception.
14539
14540 2000-07-12  Jeffrey Stedfast  <fejj@helixcode.com>
14541
14542         * camel-stream.c: Use size_t and ssize_t for read/write methods
14543         
14544         * providers/imap/camel-imap-folder.c (imap_set_message_flags): 
14545         Updated to emit the message_changed signal.
14546         (imap_delete_message): Updated to use imap_set_message_flags ().
14547         (imap_move_message_to): Updated to use imap_set_message_flags ()
14548         and to emit the folder_changed signal on the destination folder.
14549         (imap_copy_message_to): Updated to emit the folder_changed signal 
14550         on the destination folder.
14551         (imap_append_message): Updated to emit the folder_changed signal 
14552         on the destination folder.
14553
14554 2000-07-11  Jeffrey Stedfast  <fejj@helixcode.com>
14555
14556         * camel-folder.c (camel_folder_append_message): Now takes a
14557         flags argument to specify the flags to be set on the message
14558         since we might not necessarily want the flags to be wiped clean.
14559         (move_message_to):
14560         (copy_message_to): Updated to send a flags argument to 
14561         append_message (); currently sends the original message's flags.
14562
14563         * providers/mbox/camel-mbox-folder.c (mbox_append_message): 
14564         * providers/imap/camel-imap-folder.c (imap_append_message): 
14565         Updated.
14566
14567 2000-07-11  Dan Winship  <danw@helixcode.com>
14568
14569         * camel-folder.c: Remove exceptions from a number of methods
14570         that work on what ought to be static data: get_parent_folder,
14571         get_parent_store, get_message_count, get_unread_message_count,
14572         get_permanent_flags, get_message_flags, set_message_flags,
14573         get_message_user_flag, set_message_user_flag, get_message_uid,
14574         get_uids, get_summary, get_subfolder_names. Turn
14575         camel_folder_delete_message into a macro.
14576
14577         * providers/{mbox,pop3,vee}: Update for CamelFolder changes
14578
14579         * providers/Makefile.am: Disable imap and nntp for now
14580
14581 2000-07-11  Jeffrey Stedfast  <fejj@helixcode.com>
14582
14583         * providers/imap/camel-imap-folder.c (imap_search_by_expression): 
14584         This shouldn't return NULL, it should return g_ptr_array_new ()
14585         so the mailer gets what it expects.
14586
14587 2000-07-10  Jeffrey Stedfast  <fejj@helixcode.com>
14588
14589         * camel-folder-summary.c (camel_folder_summary_decode_string): 
14590         Oops, an unsigned integer can never be < 0
14591
14592 2000-07-10  Dan Winship  <danw@helixcode.com>
14593
14594         * providers/vee/camel-vee-folder.c (vee_search_by_expression):
14595         Initialize a variable to make this not crash again. And fix a bug
14596         so it actually does something.
14597
14598 2000-07-10  Jeffrey Stedfast  <fejj@helixcode.com>
14599
14600         * camel-folder-summary.c: Cleaned up a bunch of compile warnings
14601
14602 2000-07-10  Dan Winship  <danw@helixcode.com>
14603
14604         * providers/vee: kill more debugging messages
14605
14606 2000-07-10  Jeffrey Stedfast  <fejj@helixcode.com>
14607
14608         * providers/mbox/camel-mbox-folder.c (mbox_get_unread_message_count): 
14609         * providers/vee/camel-vee-folder.c (vee_get_unread_message_count): 
14610         * providers/imap/camel-imap-folder.c (imap_get_unread_message_count):
14611         Implemented.
14612
14613         * camel-folder.c (camel_folder_get_unread_message_count): New
14614         convenience function to allow the mailer to query the number
14615         of unread messages in a folder (for displaying message stats
14616         in a folder tree?).
14617
14618 2000-07-09  Dan Winship  <danw@helixcode.com>
14619
14620         * camel-mime-utils.c (header_references_dup): New function to copy
14621         a header_references structure.
14622
14623         * camel-folder-summary.c (camel_message_info_dup_to): New function
14624         to (deep) copy the data from one CamelMessageInfo into another.
14625         (camel_message_info_free): And free the data.
14626
14627         * providers/vee/camel-vee-folder.c (vee_sync): Implement. (empty).
14628         (vee_search_by_expression): belatedly update for
14629         camel_folder_search change.
14630         (vee_folder_build): belatedly update for camel_folder_search
14631         change. Use camel_message_info_dup_to and camel_message_info_free
14632         (in particular, so that we get message_id and references info so
14633         vfolders can be threaded).
14634         (vee_folder_build_folder): Ditto.
14635
14636 2000-07-08  Jeffrey Stedfast  <fejj@helixcode.com>
14637
14638         * providers/nntp/camel-nntp-folder.c: 
14639         * providers/nntp/camel-nntp-utils.c: 
14640         * providers/nntp/camel-nntp-store.c: Update to reflect past changes
14641         in the Camel API. Use gtk macro casts wherever possible and use glib's
14642         memory functions instead of standard c's (since they are not 
14643         compatable)
14644
14645         * providers/smtp/camel-smtp-transport.c: 
14646         * providers/imap/camel-imap-store.c: Wrap debug print statements
14647         in a macro
14648
14649         * providers/imap/camel-imap-stream.c (stream_read): Make sure
14650         that we get up to and including the last \n of the mime part.
14651
14652         * providers/imap/camel-imap-folder.c (imap_get_message): Make sure
14653         that we get up to and including the last \n of the mime part.
14654         Wrap debug print statements in a macro.
14655
14656         * providers/imap/camel-imap-stream.c (stream_read): Only cache
14657         the important data (aka the mime part requested and no extra
14658         server response stuff)
14659
14660 2000-07-07  Dan Winship  <danw@helixcode.com>
14661
14662         * camel-mime-utils.c (header_references_decode): Work around
14663         In-Reply-To's with unquoted punctuation. So many broken mailers.
14664
14665         * camel-folder.c (camel_folder_search_by_expression): Make this
14666         return a GPtrArray rather than a GList.
14667
14668         * camel-folder-search.c (camel_folder_search_execute_expression):
14669         * providers/imap/camel-imap-folder.c (imap_search_by_expression):
14670         * providers/mbox/camel-mbox-folder.c (mbox_search_by_expression):
14671         * providers/nntp/camel-nntp-folder.c (nntp_search_by_expression):
14672         Update to return a GPtrArray rather than a GList.
14673
14674 2000-07-07  Jeffrey Stedfast  <fejj@helixcode.com>
14675
14676         * providers/smtp/camel-smtp-transport.c (esmtp_get_authtypes): 
14677         Fixed the parser to actually work
14678
14679 2000-07-06  Dan Winship  <danw@helixcode.com>
14680
14681         * camel-mime-utils.c (header_references_decode): Make this deal
14682         with the full RFC822 References/In-Reply-To format rather than
14683         just the more-nicely-behaved RFC1036 version. (Needed to parse
14684         In-Reply-To headers with extra junk in them.)
14685
14686 2000-07-06  Jeffrey Stedfast  <fejj@helixcode.com>
14687
14688         * providers/imap/camel-imap-folder.c (imap_get_summary): Parse for
14689         more header information to allow message threading in IMAP.
14690         (imap_get_message_info): Same.
14691
14692         * camel-folder-summary.c: Renamed summary_format_* to
14693         camel_summary_format_* and moved them into public scope.
14694
14695         * providers/smtp/camel-smtp-transport.c (smtp_connect): Oops. Don't
14696         pass port # as a string in the error code (if it fails to connect).
14697
14698         * providers/imap/camel-imap-folder.c (imap_append_message): Changed
14699         over to camel_imap_command_extended as that was the source of the
14700         problems - apparently appending replies with more than just 1 line.
14701
14702 2000-07-05  Dan Winship  <danw@helixcode.com>
14703
14704         * camel-folder-search.c (search_header_contains): make header
14705         matching case-insensitive
14706
14707         * camel-folder-summary.c:
14708         * camel-session.c:
14709         * providers/mbox/camel-mbox-folder.c:
14710         * providers/mbox/camel-mbox-summary.c: Remove some non-error case
14711         debugging-type messages.
14712
14713 2000-07-05  Ettore Perazzoli  <ettore@helixcode.com>
14714
14715         * providers/mbox/camel-mbox-summary.c (d): Define to empty so that
14716         we get rid of a ton of debugging messages.
14717
14718 2000-07-05  Jeffrey Stedfast  <fejj@helixcode.com>
14719
14720         * camel-mime-utils.h: Added prototype for uudecode_step
14721
14722         * camel-mime-utils.c (uudecode_step): Cleaned up some junk that
14723         should have been cleaned up when debugging printf's were taken out.
14724
14725 2000-07-05  Ettore Perazzoli  <ettore@helixcode.com>
14726
14727         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
14728         Update the X-Evolution: header even if the in-memory UID and the
14729         saved UID are not the same.  Otherwise mboxes with clashing UIDs
14730         can never be fixed.
14731
14732         * camel-folder-summary.c
14733         (camel_folder_summary_add_from_parser): Add the message to the
14734         summary before doing any ibex stuff.  In fact, this might also
14735         have the side effect of reassigning the UID so it needs to be done
14736         before we start using the UID.
14737
14738         * providers/mbox/camel-mbox-folder.c (mbox_append_message): Add
14739         debugging message to keep track of the UIDs we add.
14740
14741 2000-07-05  Dan Winship  <danw@helixcode.com>
14742
14743         * camel-folder-summary.c: Add "Cc" to summary and bump summary
14744         version number.
14745
14746         * camel-folder-search.c (search_header_contains): make "Cc" a
14747         searchable header.
14748
14749 2000-07-03  Ettore Perazzoli  <ettore@helixcode.com>
14750
14751         * camel-folder-summary.c (camel_folder_summary_next_uid_string):
14752         New.
14753         (camel_folder_summary_add): Use
14754         `camel_folder_summary_next_uid_string()' instead of recomputing
14755         the UID manually here.
14756         (camel_folder_summary_add_from_parser): Likewise.
14757
14758 2000-07-03  Ettore Perazzoli  <ettore@helixcode.com>
14759
14760         * camel-folder-summary.c (camel_folder_summary_set_uid): Removed.
14761
14762 2000-07-03  Dan Winship  <danw@helixcode.com>
14763
14764         * camel-folder-summary.c (message_info_new): Parse In-Reply-To
14765         with header_references_decode, not header_msgid_decode.
14766
14767         * camel-mime-message.c (camel_mime_message_class_init): message
14768         headers are case-insensitive.
14769
14770         * providers/pop3/camel-pop3-store.c (camel_pop3_command): Fix a
14771         bug in error-setting code.
14772         (pop3_connect): Don't re-prompt for password in the KPOP case.
14773         (pop3_get_response): New function, split out from
14774         camel_pop3_command.
14775         (connect_to_server): Use pop3_get_response to parse the greeting
14776         message, and error out appropriately if it's -ERR.
14777
14778 2000-07-02  Dan Winship  <danw@helixcode.com>
14779
14780         * camel-folder.c (camel_folder_freeze, camel_folder_thaw): New
14781         functions to freeze and thaw a folder (to prevent message/folder
14782         changed signals in the middle of a long series of operations).
14783         (camel_folder_class_init): Change signals to GTK_RUN_FIRST.
14784         (message_changed, folder_changed): Add default implementations
14785         that stop the emission and record info for later if the folder is
14786         frozen.
14787
14788         * providers/mbox/camel-mbox-folder.c (mbox_sync): leftover fixes
14789         from the close->sync change: don't destroy the ibex, summary, and
14790         search when syncing.
14791         (append_message): emit "folder_changed" on a successful append.
14792
14793 2000-07-02  Jeffrey Stedfast  <fejj@helixcode.com>
14794
14795         * camel-mime-utils.c (uudecode_step): A rather complex uudecoder
14796         written in the spirit of Zucchi-ness, is it up to par? Only the 
14797         Z-man can tell us :-)
14798
14799 2000-07-01  Dan Winship  <danw@helixcode.com>
14800
14801         * camel-service.c (camel_service_get_name): New method, to return
14802         an end-user-friendly name corresponding to a service. (eg, "POP
14803         service for danw on trna.helixcode.com").
14804
14805         * providers/imap/camel-imap-store.c,
14806         providers/mbox/camel-mbox-store.c,
14807         providers/nntp/camel-nntp-store.c,
14808         providers/pop3/camel-pop3-store.c,
14809         providers/sendmail/camel-sendmail-transport.c,
14810         providers/smtp/camel-smtp-transport.c: Implement.
14811
14812         * providers/imap/Makefile.am: remove unneeded
14813         libcamelimap_la_LDADD.
14814
14815         * providers/pop3/camel-pop3-store.c (connect_to_server): fix the
14816         CAPA-parsing code to not get into an infinite loop.
14817
14818 2000-07-01  Jeffrey Stedfast  <fejj@helixcode.com>
14819
14820         * providers/imap/camel-imap-folder.c (imap_get_message): Fixed
14821         the bug that would sometimes leave part of the server response
14822         tacked on to the end of the message.
14823
14824         * camel-folder.c: Renamed _by_uid methods. Since we no longer
14825         have get-by-number methods, no need to have the _by_uid 
14826         extensions. 
14827         (get_message_by_uid): Renamed to get_message
14828         (delete_message_by_uid): Renamed to delete_message
14829         (summary_get_by_uid): Renamed to get_message_info
14830
14831         * providers/mbox/camel-mbox-folder.c: 
14832         * providers/pop3/camel-pop3-folder.c:
14833         * providers/imap/camel-imap-folder.c:
14834         * providers/vee/camel-vee-folder.c: Updated to reflect
14835         camel-folder changes.
14836
14837 2000-06-30  Jeffrey Stedfast  <fejj@helixcode.com>
14838
14839         * camel-folder.c (camel_folder_copy_message_to): New function, to
14840         copy a message from one folder to another. The default
14841         implementation just uses append_message, but providers can 
14842         implement more efficient versions for use when both folders are on 
14843         the same store.
14844
14845         * broken-date-parser.[c,h]: Utilities for parsing broken
14846         date strings.
14847         
14848         * providers/imap/camel-imap-folder.c (imap_move_message_to): 
14849         (imap_copy_message_to): Implemented.
14850
14851         * camel-mime-utils.c (header_decode_date): Wrote some code to try
14852         and un-mangle broken date formats and then parse that new string 
14853         instead.
14854
14855 2000-06-30  Dan Winship  <danw@helixcode.com>
14856
14857         * camel-folder.c (camel_folder_move_message_to): New function, to
14858         move a message from one folder to another. The default
14859         implementation just uses append_message and delete_message, but
14860         providers can implement more efficient versions for use when both
14861         folders are on the same store.
14862
14863 2000-06-29  Jeffrey Stedfast  <fejj@helixcode.com>
14864
14865         * providers/imap/camel-imap-folder.c (imap_expunge): Should now
14866         print a meaningful error message when it doesn't succeed
14867
14868 2000-06-28  Jeffrey Stedfast  <fejj@helixcode.com>
14869
14870         * providers/imap/camel-imap-store.c (imap_connect): Changed to
14871         keep prompting user for a valid password until it either
14872         authenticates or until Canceled by the user.
14873         (camel_imap_command_extended): Improved speed (replaced the
14874         g_strjoinv call with a faster implementation)
14875
14876         * providers/pop3/camel-pop3-store.c 
14877         (camel_pop3_command_get_additional_data): Fixed.
14878         (pop3_connect): Changed to keep prompting the user for a
14879         password until it either works or until Canceled by the user.
14880
14881         * providers/mbox/camel-mbox-summary.c: General cleanup
14882         (camel_mbox_summary_sync): Fixed a memory leak and added
14883         CamelException handling.
14884
14885         * providers/mbox/camel-mbox-store.c (delete_folder): Fixed a 
14886         memory leak
14887
14888         * providers/mbox/camel-mbox-folder.c (mbox_append_message): 
14889         Default 'off_t seek' to -1 so as to make sure it's initialized
14890         before it's used in the case of a bad stat() call.
14891         (mbox_sync): Updated
14892         (mbox_expunge): Updated
14893
14894 2000-06-27  Jeffrey Stedfast  <fejj@helixcode.com>
14895
14896         * providers/imap/camel-imap-store.c (imap_connect): Move the 
14897         CAPABILITY command here so we don't have to keep checking
14898         each time we open a folder.
14899         (camel_imap_command_extended): If we are doing an EXAMINE,
14900         don't bother doing a SELECT first.
14901
14902         * providers/imap/camel-imap-folder.c (imap_init): Update so
14903         folder->has_search_capability depends on the parent IMAP store
14904         (since this is really dependant on the IMAP implementation and
14905         not the folder)
14906
14907 2000-06-27  Christopher James Lahey  <clahey@helixcode.com>
14908
14909         * providers/smtp/camel-smtp-transport.c: Don't close the filter
14910         stream when done with it (this causes the source stream to close);
14911         Instead, just flush it when done.
14912
14913 2000-06-27  Michael Zucchi  <zucchi@zedzone.mmc.com.au>
14914
14915         * camel-folder-search.c (search_header_contains): Make header
14916         search 'to' match 'to', and not 'from', small typo, fixes #317.
14917
14918 2000-06-26  Christopher James Lahey  <clahey@helixcode.com>
14919
14920         * providers/mbox/camel-mbox-summary.c: Added debugging
14921         information.
14922
14923 2000-06-23  Jeffrey Stedfast  <fejj@helixcode.com>
14924
14925         * providers/imap/camel-imap-store.c: 
14926         * providers/imap/camel-imap-folder.c: Improved folder parsing.
14927         Not specifying a namespace should no longer list the entire
14928         filesystem.
14929
14930 2000-06-22  Chris Toshok  <toshok@helixcode.com>
14931
14932         * providers/nntp/.cvsignore: ignore test-newsrc
14933
14934         * providers/nntp/camel-nntp-store.c,
14935         providers/nntp/camel-nntp-store.h,
14936         providers/nntp/camel-nntp-folder.c,
14937         providers/nntp/camel-nntp-folder.h,
14938         providers/nntp/camel-nntp-utils.c: Bring the nntp provider up to a
14939         state where it builds and is usable with the current camel.  there
14940         are still warts (semi-broken .newsrc file handling, and a lack of
14941         a subscribe ui -- in fact no way to add a new server, really), but
14942         it'll display news messages.
14943
14944         * providers/nntp/Makefile.am (libcamelnntp_la_SOURCES): add
14945         camel-nntp-newsrc.c
14946         (libcamelnntpinclude_HEADERS): add camel-nntp-newsrc.h
14947         also, add test-newsrc stuff.
14948         
14949         * providers/nntp/test-newsrc.c: new file that tests the newsrc
14950         stuff by parsing and regurgitating a .newsrc file for a particular
14951         server.
14952
14953         * providers/nntp/camel-nntp-newsrc.c,
14954         providers/nntp/camel-nntp-newsrc.h: new files, initial support for .newsrc files.
14955
14956 2000-06-22  Jeffrey Stedfast  <fejj@helixcode.com>
14957
14958         * providers/imap/camel-imap-folder.c (imap_get_message_count): 
14959         Oops. Now appends the namespace to the folder before querying
14960         for the number of messages.
14961
14962         * providers/imap/camel-imap-store.c (imap_folder_exists): New
14963         convenience function for use by imap_create().
14964         (get_folder): If folder is specified as "/", we really want
14965         "INBOX".
14966
14967         * providers/sendmail/camel-sendmail-provider.c:
14968         * providers/vee/camel-vee-provider.c:
14969         * providers/smtp/camel-smtp-provider.c:
14970         * providers/mbox/camel-mbox-provider.c:
14971         * providers/pop3/camel-pop3-provider.c:
14972         * providers/imap/camel-imap-provider.c: Updated
14973         
14974         * camel-session.c: Moved service_cache hash table into the
14975         providers.
14976         (service_cache_remove): Updated.
14977         (camel_session_get_service): Updated.
14978
14979         * camel-url.c (camel_url_hash): Took out the hashing of
14980         url->passwd. We don't want this anymore.
14981
14982         * providers/imap/camel-imap-folder.c (imap_init): Took out
14983         references to 'namespace'
14984         (camel_imap_folder_init): Same
14985
14986         * providers/imap/camel-imap-folder.h: No more namespace. We are
14987         instead going to use url->path as the namespace.
14988
14989 2000-06-21  Jeffrey Stedfast  <fejj@helixcode.com>
14990
14991         * providers/imap/camel-imap-store.c (imap_create): Modified to
14992         use the "namespace" (url->path) if it exists.
14993
14994         * providers/imap/camel-imap-folder.c (imap_delete_message_by_uid):
14995         Now just sets the deleted flag on the summary rather than speaking 
14996         directly to the IMAP server. This is both faster and cleaner.
14997
14998 2000-06-21  Dan Winship  <danw@helixcode.com>
14999
15000         * providers/pop3/camel-pop3-store.c (query_auth_types): Fix dumb
15001         bug.
15002
15003 2000-06-21  Jeffrey Stedfast  <fejj@helixcode.com>
15004
15005         * providers/imap/camel-imap-folder.c (imap_get_message_by_uid): 
15006         We are getting mail in IMAP now!! whoo-hoo!. Stripped out the 
15007         filtering so messages may have some dot-stuffing, but the 
15008         filtering can always be added back in later when we know it 
15009         works and isn't the problem.
15010
15011 2000-06-21  Peter Williams  <peterw@curious-george.helixcode.com>
15012
15013         * providers/mbox/camel-mbox-folder.c (mbox_init): Use the basename
15014         of the mailbox so we don't get pathnames like ~/evolution/inbox///movemail.ibex
15015
15016 2000-06-21  Dan Winship  <danw@helixcode.com>
15017
15018         * camel-folder-summary.c (message_info_new): Set date_received
15019         based on the first (most recent) "Received" header.
15020
15021 2000-06-20  Dan Winship  <danw@helixcode.com>
15022
15023         * camel-mime-part.c (write_to_stream): flush the filter stream
15024         before unreffing it, so it will camel_mime_filter_complete.
15025
15026         * camel-stream-filter.c (camel_stream_filter_class_init): Fix a
15027         braino so camel_stream_flush works here.
15028
15029         * camel-stream-mem.c (stream_seek): Fix a bug that resulted in
15030         large attachments being silently dropped.
15031
15032         * providers/pop3/camel-pop3-store.c
15033         (camel_pop3_command_get_additional_data): Don't use g_strjoinv
15034         here, since it is O(n^2) on the length of the output string, and
15035         we can do O(n).
15036
15037         * camel-mime-part-utils.c
15038         (simple_data_wrapper_construct_from_parser): add a CRLF decoder
15039         after the QP/B64 decoder if it's text.
15040
15041 2000-06-20  Jeffrey Stedfast  <fejj@helixcode.com>
15042
15043         * providers/imap/camel-imap-folder.c (imap_get_summary): Only
15044         fetch the summary if the folder summary doesn't already exist.
15045         When the summary *does* exist, start fetching from 1, not 0.
15046         (imap_free_summary): Don't do anything here.
15047         (imap_finalize): Free the summary here instead of in
15048         imap_free_summary().
15049         (imap_set_message_flags): Implemented
15050         (imap_sync): Added code to set flags on messages that have had
15051         their flags changed (however I #if'd it out until we are more
15052         confidant in the IMAP code :)
15053         (imap_summary_get_by_uid): Now parese flags correctly.
15054         (imap_get_summary): Now parese flags correctly. Also correctly
15055         parses the UID correctly.
15056
15057         * camel-url.c (check_equal): No need to check s1 if s2 is NULL
15058         (camel_url_equal): Don't check the passwd component of the url.
15059
15060 2000-06-20  Dan Winship  <danw@helixcode.com>
15061
15062         * camel-folder-summary.c (camel_folder_summary_add): mark the
15063         message info with CAMEL_MESSAGE_FOLDER_FLAGGED if we change the
15064         uid, so the folder will know that it's dirty.
15065
15066 2000-06-20  Jeffrey Stedfast  <fejj@helixcode.com>
15067
15068         * providers/imap/camel-imap-store.c (camel_imap_command_extended): 
15069         Now returns the last line of data that the server sends back as
15070         well. This is needed for commands like SELECT (like Peter pointed
15071         out).
15072         (camel_imap_command): No longer checks for SELECT (no need)
15073
15074         * providers/imap/camel-imap-folder.c: Added namespace stuff
15075         which we will need later on...
15076         (imap_parse_subfolder_line): Convenience function for use in
15077         get_subfolder_names()
15078         (imap_get_subfolder_names): Updated. Also changed it to use LIST
15079         instead of LSUB (temporary change).
15080
15081 2000-06-19  Jeffrey Stedfast  <fejj@helixcode.com>
15082
15083         * providers/imap/camel-imap-folder.c (camel_imap_folder_init): Set
15084         summary equal to NULL.
15085         (imap_get_summary): Store the summary in the ImapFolder
15086         (imap_summary_get_by_uid): If we have a summary cache in the
15087         ImapFolder, first check to see if that message info is in the
15088         cached summary first, if not fetch it directly from the IMAP
15089         server and append it to the summary cache.
15090         (imap_get_message_flags): Don't free the message info that we get
15091         back from summary_get_by_uid as we don't want to be corrupting our
15092         cached summary.
15093
15094 2000-06-19  Peter Williams  <peterw@curious-george.helixcode.com>
15095
15096         * providers/imap/camel-imap-store.c (camel_imap_command{,_extended}): When
15097         SELECT'ing a folder for an IMAP command, use _extended to grab the entire
15098         response (before we just used camel_imap_command and missed the OK codes)
15099
15100 2000-06-18  Jeffrey Stedfast  <fejj@helixcode.com>
15101
15102         * providers/imap/camel-imap-folder.c (imap_summary_get_by_uid): 
15103         Now gets the message flags as it should.
15104         (imap_get_summary): Same as imap_summary_get_by_uid
15105         (imap_get_permanent_flags): Return the permanent flags stored
15106         on the folder.
15107         (imap_get_message_flags): Return message flags associated with
15108         given uid. Note: we may want to somehow cache summary info so
15109         that we don't have to keep querying the IMAP provider in
15110         imap_summary_get_by_uid().
15111
15112 2000-06-17  Jeffrey Stedfast  <fejj@helixcode.com>
15113
15114         * providers/imap/camel-imap-folder.c (imap_free_summary): We were
15115         leaking memory - but not anymore!
15116         (imap_get_summary): We now get the UIDs and the beginnings of the
15117         code to get the message flags as well.
15118
15119 2000-06-17  Dan Winship  <danw@helixcode.com>
15120
15121         * camel-mime-parser.c (folder_scan_header): Don't copy newlines
15122         into the parsed header text, and turn any number of tabs and
15123         spaces after a newline into a single space.
15124
15125 2000-06-17  Jeffrey Stedfast  <fejj@helixcode.com>
15126
15127         * providers/imap/camel-imap-folder.c (imap_init): Should now
15128         correctly do CAPABILITY.
15129
15130 2000-06-17  Dan Winship  <danw@helixcode.com>
15131
15132         * providers/mbox/camel-mbox-summary.c: Add some debugging printfs
15133         when rebulding summary to help figure out why people's summaries
15134         are always being rebuilt.
15135
15136 2000-06-17  Jeffrey Stedfast  <fejj@helixcode.com>
15137
15138         * providers/imap/camel-imap-folder.c (imap_search_by_expression):
15139         Began to implement, need to get information on how to
15140         deconstruct @expression into an IMAP search expression and
15141         parse the results.
15142         (imap_init): Now queries the IMAP provider for CAPABILITY to
15143         determine if SEARCH is implemented or not.
15144
15145         * providers/imap/imap.c: Removed - no longer a need to have
15146         this as an example for anyone interesting to help mecode IMAP
15147         support.
15148         
15149 2000-06-16  Jeffrey Stedfast  <fejj@helixcode.com>
15150
15151         * providers/imap/camel-imap-folder.c (imap_sync): Added code
15152         to expunge if called for (still need to finish coding this).
15153         (imap_get_uids): Implemented.
15154         (imap_get_summary): Found a way to get the date
15155         (imap_summary_get_by_uid): Same.
15156         (imap_free_summary): Implemented.
15157
15158         * string-utils.c (strstrcase): Fixed a compile warning
15159
15160         * providers/imap/camel-imap-summary.c: Removed - we don't
15161         need a CamelImapSummary structure.
15162
15163 2000-06-16  Dan Winship  <danw@helixcode.com>
15164
15165         Move flag handling from CamelMimeMessage to CamelFolder. This
15166         simplifies several flag-handling pieces of code in the mailer, and
15167         lets you change a message's flags without having to fetch the
15168         message body. It also means that fully-constructed
15169         CamelMimeMessages are now essentially constant, which will help
15170         simplify locking issues later since it means two threads
15171         interested in the same message can just work with separate copies
15172         of it.
15173
15174         * camel-mime-message.h (struct _CamelMimeMessage): Removed flags
15175         and user_flags (moved to summary). Removed expunged and
15176         message_number which were unused. Removed message_uid and folder
15177         which are no longer needed in the new scheme.
15178         (struct CamelMimeMessageClass): Removed message_changed signal and
15179         get/set_message_number methods.
15180
15181         * camel-mime-message.c: Updates for CamelMimeMessage changes.
15182         (camel_mime_message_get/set_flags,
15183         camel_mime_message_get/set_user_flag): Replaced with methods in
15184         CamelFolder.
15185         (camel_flag_get, camel_flag_set, camel_flag_list_size,
15186         camel_flag_list_free): Moved verbatim to camel-folder-summary.c
15187         
15188         * camel-folder.c (camel_folder_get/set_message_flags,
15189         camel_folder_get/set_message_user_flag): New methods (and
15190         corresponding useless default implementations)
15191         (camel_folder_class_init): add a message_changed signal
15192
15193         * camel-folder-summary.c (camel_flag_get, camel_flag_set,
15194         camel_flag_list_size, camel_flag_list_free): Moved here from
15195         camel-mime-message.c
15196
15197         * providers/mbox/camel-mbox-folder.c (message_changed): Removed.
15198         (mbox_get_message_flags, mbox_set_message_flags,
15199         mbox_get_message_user_flag, mbox_set_message_user_flag): Tweak
15200         summary bits as appropriate. (Functionality moved here from
15201         message_changed.)
15202         (mbox_get_message_by_uid): Update for CamelMimeMessage changes
15203         (less stuff to initialize).
15204
15205         * providers/imap/camel-imap-folder.c (message_changed): Remove
15206         this. It was just copied from the mbox provider and doesn't deal
15207         with the real IMAP flag stuff anyway. (So there's currently no
15208         flag support in the IMAP provider.)
15209         (imap_get_message_by_uid): Update for CamelMimeMessage changes.
15210
15211         * providers/vee/camel-vee-folder.c: (message_changed): Remove old
15212         one. Add a new one to listen for message_changed on each folder
15213         and re-emit message_changed signals that correspond to messages in
15214         the vfolder.
15215         (vee_get/set_message_flags, vee_get/set_message_user_flag): Proxy
15216         flag setting to the underlying real messages.
15217         (vee_append_message): Removed for now; there's no way to translate
15218         this into the new CamelMimeMessage/CamelFolder scheme, but (a)
15219         there's also no code which would ever call it and (b) we're
15220         probably going want a better interface than append_message for
15221         message drag and drop to work anyway. To be revisited.
15222
15223 2000-06-16  Dan Winship  <danw@helixcode.com>
15224
15225         * camel-mime-utils.c (rfc2047_decode_word): 
15226         * camel-mime-part-utils.c (simple_data_wrapper_construct_from_parser): 
15227         * camel-folder-summary.c (summary_build_content_info): 
15228         KLUDGE! Since neither ETable nor GtkHTML supports UTF-8 yet,
15229         output ISO-8859-1 instead, so Ettore can read his Italian mail. :)
15230         This will be reverted later.
15231
15232 2000-06-15  Jeffrey Stedfast  <fejj@helixcode.com>
15233
15234         * providers/imap/camel-imap-folder.c (imap_get_summary): Started to 
15235         implement - may want to use ENVELOPE instead of BODY.PEEK[HEADER]
15236         (imap_summary_get_by_uid): Started to code, I've got to find a way to 
15237         get the date in time_t format and also get the flags
15238
15239         * string-utils.c (strstrcase): Added this convenience function - I
15240         know about strcasestr() but it's not portable.
15241
15242 2000-06-15  Dan Winship  <danw@helixcode.com>
15243
15244         * camel-service.c: Remove camel_service_connect_with_url. (URLs
15245         must be specified when the service is requested from the session,
15246         so that there can only ever be one service for any URL.)
15247
15248         * camel-folder.c: (camel_folder_open, camel_folder_is_open,
15249         camel_folder_get_mode): Kill. Folders are now always open, and
15250         handle "closing" sorts of operations at sync or finalize time.
15251         (camel_folder_sync): renamed from camel_folder_close. Syncs state
15252         to the store but doesn't necessarily close/disconnect.
15253
15254         * providers/*/camel-*-folder.c: Merge "open" methods into "init"
15255         methods. Rename close to sync and update appropriately.
15256
15257         * providers/imap/camel-imap-store.c: Remove camel_imap_store_open
15258         and camel_imap_store_close, which should not have been copied from
15259         the POP provider (where the exist to work around limitations of
15260         the POP protocol).
15261
15262         * providers/mbox/camel-mbox-summary.c: fix a bug. (don't expunge
15263         deleted messages if called with expunge == FALSE)
15264         
15265         * providers/pop3/camel-pop3-store.c (connect_to_server): Check
15266         server for various interesting extensions.
15267
15268         * providers/pop3/camel-pop3-folder.c (get_uids): If the server
15269         supports UIDL, use real UIDs rather than fake ones.
15270         (etc): Map uids back to numbers appropriately
15271
15272         * providers/mbox/camel-mbox-folder.c (mbox_append_message): Fix to
15273         previous change: make sure the "seek" variable ends up with the
15274         value it should.
15275
15276         * providers/mbox/camel-mbox-summary.c (summary_rebuild): Update
15277         summary mtime as well as size.
15278
15279 2000-06-14  Dan Winship  <danw@helixcode.com>
15280
15281         * providers/mbox/camel-mbox-folder.c (mbox_append_message): if the
15282         mbox doesn't end with a '\n', write one before appending the new
15283         message.
15284
15285 2000-06-14  Jeffrey Stedfast  <fejj@helixcode.com>
15286
15287         * camel-mime-filter-crlf.c (filter): Updated the encoder to allocate 
15288         more memory (since we are also now adding dots). Also updated the
15289         decoder as we have found that it sometimes passes the end of the 
15290         buffer.
15291
15292         * providers/pop3/camel-pop3-folder.c (get_message_by_uid): Took out the
15293         filter code (we already filter in 
15294         camel_pop3_command_get_additional_data)
15295
15296         * camel-folder.c (init): Updated: a separator is now a char* rather 
15297         than a single char because IMAP can have a string for a directory 
15298         separator. Also, since IMAP does not begin with a directory separator,
15299         there is a new argument (path_begins_with_sep) which decides if a 
15300         directory should begin with a directory separator.
15301
15302         * providers/imap/camel-imap-store.c (imap_create): Since, on connect,
15303         Camel tries to create INBOX (which already exists on every IMAP 
15304         provider) we can return TRUE when the folder name is "INBOX".
15305
15306         * providers/vee/camel-vee-folder.c (vee_init): Updated.
15307
15308         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Updated.
15309
15310         * providers/mbox/camel-mbox-store.c (get_folder): Updated.
15311
15312         * providers/mbox/camel-mbox-folder.c (mbox_init): Updated.
15313
15314         * providers/pop3/camel-pop3-folder.c (camel_pop3_folder_new): Updated.
15315
15316 2000-06-14  Dan Winship  <danw@helixcode.com>
15317
15318         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
15319         Renamed from camel_mbox_summary_expunge. Takes a gboolean saying
15320         whether to expunge or just sync the mbox file. Change some
15321         g_errors to g_warning so we don't abort. Make the quick
15322         X-Evolution updating code lseek around correctly. Update the
15323         mbox mtime in the summary file even in the quick case.
15324
15325         * providers/mbox/camel-mbox-summary.h: make
15326         CAMEL_MESSAGE_FOLDER_NOXEV not conflict with
15327         CAMEL_MESSAGE_FOLDER_FLAGGED defined in camel-mime-message.h
15328
15329         * providers/mbox/camel-mbox-folder.c (mbox_close): call
15330         camel_mbox_summary_sync to save flag state if not expunging.
15331         (mbox_expunge): Update for camel_mbox_summary_expunge rename.
15332
15333 2000-06-13  Jeffrey Stedfast  <fejj@helixcode.com>
15334
15335         * providers/imap/camel-imap-store.c (camel_imap_store_open): 
15336         (camel_imap_store_close): Added.
15337         (camel_imap_command_extended): Fixed a segfault and updated
15338         to use camel_imap_status()
15339         (camel_imap_command): Updated to use camel_imap_status()
15340         (camel_imap_status): New convenience function for parsing
15341         the return status of an IMAP command
15342
15343 2000-06-12  Jeffrey Stedfast  <fejj@helixcode.com>
15344
15345         * providers/imap/camel-imap-folder.c (imap_get_message_by_uid): 
15346         Works like the POP fetch code, should work temporarily until
15347         we get around to coding it the way it "Should Be".
15348
15349         * providers/pop3/camel-pop3-folder.c (get_message_by_uid): Now uses
15350         the camel-mime-filter-crlf decoder when retrieving messages.
15351
15352         * camel-mime-filter-smtp.c: Deprecated.
15353
15354         * providers/smtp/camel-smtp-transport.c (smtp_data): Updated to use
15355         camel-mime-filter-crlf with my 'dot' extension in place of
15356         camel-mime-filter-smtp
15357
15358         * camel-mime-part.c (write_to_stream): Updated to reflect changes
15359         made to camel-mime-filter-crlf.c
15360
15361         * camel-mime-filter-crlf.c (filter): Modified to be able to
15362         encode/decode dots ("\n.\n"<->"\n..\n"). Also fixed the decoder
15363         so that it should no longer get caught in an infinite loop.
15364
15365 2000-06-12  Dan Winship  <danw@helixcode.com>
15366
15367         * providers/*/Makefile.am: don't pass a second (incorrect) -rpath
15368         in addition to the (correct) one automatically provided by
15369         automake.
15370
15371         * camel-mime-filter-crlf.c: New filter to do CRLF<->LF conversion.
15372         (Currently only tested in the LF->CRLF direction.)
15373
15374         * camel-mime-part.c (write_to_stream): if content-type is text,
15375         and it's QP or B64 encoded, pass through the CRLF filter before
15376         the other filter to satisfy the "canonical encoding" rules in the
15377         MIME spec.
15378
15379 2000-06-09  Dan Winship  <danw@helixcode.com>
15380
15381         * camel-session.c (camel_session_query_authenticator): Add another
15382         argument, "mode", which can be CAMEL_AUTHENTICATOR_ASK or
15383         CAMEL_AUTHENTICATOR_TELL, so callers can get the app to un-cache
15384         bad info.
15385
15386         * providers/pop3/camel-pop3-store.c (pop3_connect): uncache the
15387         password if it doesn't work.
15388
15389 2000-06-09  Jeffrey Stedfast  <fejj@helixcode.com>
15390
15391         * providers/imap/camel-imap-stream.c (stream_read): Updated to reflect
15392         changes made in camel-imap-store.c
15393
15394         * providers/imap/camel-imap-store.c (imap_create): No longer checks to
15395         make sure a folder doesn't already exists (as this is no longer needed)
15396         (camel_imap_command): Now takes a CamelFolder argument so it can detect
15397         whether or not it needs to SELECT a folder or not
15398         (camel_imap_command_extended): Same.
15399
15400         * providers/smtp/camel-smtp-transport.c (smtp_connect): Will now always
15401         send EHLO first, if that fails it will fall back on HELO.
15402         (esmtp_get_authtypes): Should now correctly parse authtypes.
15403
15404 2000-06-07  Jeffrey Stedfast  <fejj@helixcode.com>
15405
15406         * providers/imap/camel-imap-summary.c: Now builds (not that it's worth
15407         much yet).
15408         
15409         * providers/imap/camel-imap-folder.c (imap_get_uids): Now uses the 
15410         correct cast to a CamelImapMessageInfo structure (should get rid of 
15411         compile warnings).
15412
15413         * providers/imap/Makefile.am: Added rules to build 
15414         camel-imap-stream
15415         
15416         * providers/imap/camel-imap-store.c (get_folder): Update.
15417         Moved imap_create here.
15418
15419         * providers/imap/camel-imap-folder.c (delete_messages): Remove.
15420         (imap_create): Removed.
15421         (imap_delete): Removed.
15422         (imap_exists): Removed.
15423
15424         * providers/imap/camel-imap-stream.h: Added typedef's for the stream
15425
15426         * providers/imap/camel-imap-stream.c: Modified to build cleanly
15427
15428 2000-06-07  Not Zed  <NotZed@HelixCode.com>
15429
15430         * camel-mime-utils.c (header_msgid_decode_internal): Properly
15431         dereference warning/debug messages.
15432         (header_references_decode): Check we actually have msgid stuff
15433         before trying to decode it ...
15434
15435 2000-06-06  Jeffrey Stedfast  <fejj@helixcode.com>
15436
15437         * camel-imap-stream.[c,h]: Removed
15438
15439         * providers/imap/camel-imap-stream.[c,h]: Relocated to this
15440         location
15441
15442         * providers/imap/camel-imap-summary.c: Added
15443
15444 2000-06-06  Dan Winship  <danw@helixcode.com>
15445
15446         * camel-folder.c: Remove exists, create, delete. A CamelFolder
15447         now always references an existing folder. Remove delete_messages
15448         too since it wasn't being used. Add a "create" flag to
15449         get_subfolder saying whether or not to create the subfolder if it
15450         doesn't yet exist.
15451
15452         * camel-store.c (camel_store_get_folder): Add a "create" flag to
15453         say whether or not to create the folder if it doesn't yet exist.
15454         (camel_store_delete_folder): New method, moved from CamelFolder.
15455         (cache_folder, uncache_folder): Fix up a bit.
15456         (get_folder_name): Explain what this is for.
15457
15458         * providers/mbox/camel-mbox-folder.c: 
15459         * providers/mbox/camel-mbox-store.c: Update. Remove support for
15460         hierarchical folders to simplify this for now, since we're not
15461         using it, and it's not completely clear how they should work in an
15462         ELocalStorage world. Needs to be revisited.
15463
15464         * providers/pop3/camel-pop3-folder.c (delete_messages): Remove.
15465         * providers/pop3/camel-pop3-store.c (get_folder): Update.
15466
15467         * providers/vee/camel-vee-folder.c (exists): Remove.
15468         * providers/vee/camel-vee-store.c (vee_get_folder): Update.
15469
15470 2000-06-06  Jeffrey Stedfast  <fejj@helixcode.com>
15471
15472         * providers/imap/camel-imap-*.[c,h]: Started on getting 
15473         imap to build cleanly (tho some work has not been completed
15474         so it still won't build until camel-imap-summary is finished
15475         along with a few methods in camel-imap-folder)
15476
15477         * camel-stream.[c,h]: Changed the read and write method prototypes
15478         to return an ssize_t type rather than an int and also changed
15479         the 'number of bytes' to read or write to a size_t type
15480
15481         * camel-stream-fs.c: same as above
15482
15483         * camel-stream-mem.c: again, same as above
15484
15485         * camel-stream-buffer.c: same
15486
15487         * camel-imap-stream.[c,h]: Added this new stream, cache's previously 
15488         read data so each successive call will instead read from the cache
15489         
15490 2000-06-05  Dan Winship  <danw@helixcode.com>
15491
15492         * camel-mime-part.c (camel_mime_part_set_disposition): fix
15493         typo/braino (set "Content-Disposition", not "Content-Description")
15494         (camel_mime_part_set_filename): const poison
15495
15496 2000-06-02  Not Zed  <NotZed@HelixCode.com>
15497
15498         * camel-mime-utils.c (base64_encode_step): Ick, damn signs!  Fix a
15499         bug with sign extended bytes.
15500
15501         * camel-mime-filter-smtp.c (filter): Changed layout/logic slightly
15502         (to match From filter)
15503
15504 2000-06-02  Jeffrey Stedfast  <fejj@helixcode.com>
15505
15506         * camel-mime-filter-smtp.c (filter): Fixed the filter so that it 
15507         wouldn't insert garbage under certain conditions.
15508
15509 2000-06-02  Christopher James Lahey  <clahey@helixcode.com>
15510
15511         * camel-session.c: Don't ref the services in the cache.
15512
15513 2000-06-02  Jeffrey Stedfast  <fejj@helixcode.com>
15514
15515         * providers/smtp/camel-smtp-transport.c: Rearanged where debug
15516         fprintf statements we placed so that any data the server sends 
15517         back is printed out before an exception is set and the function
15518         returns.
15519
15520 2000-06-02  Not Zed  <NotZed@HelixCode.com>
15521
15522         * camel-mime-utils.c (header_decode_date): If we get a funny
15523         result, just throw it out.  Basically a fix for the one true
15524         broken TradeClient.
15525
15526 2000-06-01  Not Zed  <NotZed@HelixCode.com>
15527
15528         * camel-folder-summary.c (message_info_free): Free
15529         references/messsage id.
15530         (message_info_save): Save them.
15531         (message_info_load): Load them.
15532         (message_info_new): And get them from the new message.
15533         (CAMEL_FOLDER_SUMMARY_VERSION): Bumped for new changes.
15534
15535         * camel-folder-summary.h: Added references and messageid to
15536         summary.
15537
15538 2000-06-02  Christopher James Lahey  <clahey@helixcode.com>
15539
15540         * camel-session.c: Ref and unref objects in the service cache
15541         properly.
15542
15543         * camel-store.c: Ref the folder when returning it using
15544         lookup_folder.  Used the folder's full name for the key for the
15545         folder cache since that's used to uncache it.
15546
15547 2000-06-02  Dan Winship  <danw@helixcode.com>
15548
15549         Fun with purify.
15550
15551         * providers/pop3/camel-pop3-store.c (pop3_connect): free msg on
15552         success as well as failure.
15553         (camel_pop3_command_get_additional_data): free buf after reading
15554         the last line (".").
15555
15556         * providers/pop3/camel-pop3-folder.c (get_message_by_uid): free
15557         body data after creating the memstream from it (which will copy
15558         the data).
15559
15560         * providers/mbox/camel-mbox-folder.c (mbox_finalize): free summary
15561         and index paths.
15562
15563         * camel-data-wrapper.c (finalize): unref the stream, if it exists.
15564
15565 2000-06-01  Not Zed  <NotZed@HelixCode.com>
15566
15567         * camel-mime-part.c (construct_from_parser): For a message part,
15568         set the default content-type to message/rfc822.  Maybe needs to be
15569         done for multiparts too?
15570
15571 2000-05-31  Not Zed  <NotZed@HelixCode.com>
15572
15573         * camel-mime-message.c (construct_from_parser): Typo in assersion.
15574
15575         * camel-mime-parser.c (folder_scan_step): Use a default type of
15576         message/rfc822 for multipart/digest.  Bug Z192.
15577         (folder_scan_drop_step): Remove warning.
15578
15579 2000-05-30  Not Zed  <NotZed@HelixCode.com>
15580
15581         * providers/mbox/camel-mbox-folder.c (mbox_append_message): Init
15582         filter_from to NULL, for exception case.
15583         (mbox_get_message_by_uid): Cast off_t to long int for diagnostics.
15584
15585         * camel-url.c (camel_url_hash): Hash funciton for using camel
15586         url's as hash keys.
15587         (camel_url_equal): equal function for same.
15588
15589         * camel-session.c (camel_session_finalise): Free cached services.
15590         (camel_session_init): Init service cache.
15591         (service_cache_remove): destroy callback to remove a service from
15592         the cache.
15593
15594         * camel-store.c (get_folder_internal): Remove the extra ref of the
15595         folder.  That seems the right behaviour ...?
15596         (camel_store_get_type): Doh, actually call store init, so the
15597         cache works.
15598         (cache_folder): strdup the folder name!  no wonder it never found
15599         it again.
15600
15601 2000-05-30  Jeffrey Stedfast  <fejj@helixcode.com>
15602
15603         * providers/imap/camel-imap-folder.c: Implemented a few more
15604         methods like imap_append and 1 or 2 others
15605
15606 2000-05-29  Not Zed  <NotZed@HelixCode.com>
15607
15608         * camel-store.c (camel_store_init): Move it to here.  If this
15609         level is going to maintain it, it should set it up.  Lets see what
15610         caching folders breaks :(
15611
15612         * providers/pop3/camel-pop3-store.c (camel_pop3_store_init): Dont
15613         init folder cache here.
15614
15615         * providers/mbox/camel-mbox-summary.c
15616         (camel_mbox_summary_expunge): Make sure we copy messages which are
15617         still intact to the new folder.
15618         (camel_mbox_summary_expunge): Update the frompos as well when
15619         moving the content.
15620         (camel_mbox_summary_expunge): Remove some debug, and dont offset
15621         frompos?
15622
15623         * providers/vee/camel-vee-folder.c (vee_folder_build): Check the
15624         searched folder is open before trying to search it.
15625         (message_changed): Track changes to the source message in the
15626         summary.
15627         (folder_changed): Track folder changes, re-query the folder that
15628         changed, and cascade the changed event as well.
15629         (camel_vee_folder_finalise): Free subfolder and subfolder summary.
15630
15631 2000-05-29  Dan Winship  <danw@helixcode.com>
15632
15633         * camel-service.c (camel_service_new): Fix up some glib
15634         precondition stuff. Try to set the URL in camel_service_new before
15635         checking whether or not it's "empty" so that you can successfully
15636         set "sendmail:" as a URL.
15637
15638 2000-05-28  Dan Winship  <danw@helixcode.com>
15639
15640         * camel-provider.h: Add a domain field to CamelProvider, to say
15641         what kind of data it provides.
15642
15643         * providers/imap/camel-imap-provider.c: 
15644         * providers/mbox/camel-mbox-provider.c: 
15645         * providers/pop3/camel-pop3-provider.c: 
15646         * providers/sendmail/camel-sendmail-provider.c: 
15647         * providers/smtp/camel-smtp-provider.c: Set domain to "mail".
15648
15649         * providers/nntp/camel-nntp-provider.c: Set domain to "news".
15650
15651         * providers/vee/camel-vee-provider.c: Set domain to "vfolder". (So
15652         it doesn't end up being listed as a potential mail source in the
15653         mail config wizard.)
15654
15655         * providers/pop3/camel-pop3-store.c: Split apart password and APOP
15656         auth, since some servers seem to do both, but don't really.
15657         (connect_to_server): Renamed from try_connect. Now actually does
15658         the connection up to the point of checking the greeting for APOP
15659         support.
15660         (query_auth_types): Return APOP, if appropriate. Call
15661         pop3_disconnect after connect_to_server since we don't really want
15662         to be connected.
15663         (pop3_connect): Use connect_to_server rather than duplicating
15664         code. Fix a one-byte buffer overrun in the APOP code.
15665         (pop3_disconnect): Make this able to clean up after a partial
15666         connect.
15667         (connect_to_server): Remove port number from error message since
15668         it's not terribly useful and we were getting it from the wrong
15669         place anyway.
15670
15671         * camel-mime-utils.c (header_address_list_format_append): Use
15672         `foo@bar' rather than `"" <foo@bar>' for email addresses with no
15673         name component.
15674
15675 2000-05-27  Jeffrey Stedfast  <fejj@helixcode.com>
15676
15677         * providers/imap/camel-imap-store.c: Removed 
15678         camel_imap_command_get_additional_data() as it was
15679         completely useless, replaced with 
15680         camel_imap_command_extended() which may eventually replace
15681         camel_imap_command() as well.
15682
15683         * providers/imap/camel-imap-store.h: Modified to reflect
15684         changes made to camel-imap-store.c
15685
15686         * providers/imap/camel-imap-folder.c: Wrote the first of many
15687         methods: camel_imap_init(), imap_open(), imap_expunge(), 
15688         imap_get_message_count(), and imap_get_subfolder_names()
15689
15690 2000-05-26  Dan Winship  <danw@helixcode.com>
15691
15692         * camel-multipart.c (camel_multipart_init): Don't set a default
15693         boundary. Require the caller to do that.
15694         (set_boundary): if boundary is NULL, generate a "random" boundary.
15695
15696         * camel-mime-part-utils.c
15697         (camel_mime_part_construct_content_from_parser): Add a call to
15698         camel_multipart_set_boundary after creating a new multipart.
15699
15700 2000-05-25  Jeffrey Stedfast  <fejj@helixcode.com>
15701
15702         * providers/imap/camel-imap-store.c (try_connect): Removed
15703         Exception code - Pop doesn't seem to set exceptions
15704
15705         * providers/imap/camel-imap-folder.c: Initial code, mostly
15706         just a template for future code
15707
15708         * providers/imap/imap.[c,h]: Source code from my personal
15709         mailer - for reference only!
15710
15711 2000-05-25  NotZed  <NotZed@HelixCode.com>
15712
15713         * camel-mime-part-utils.c
15714         (camel_mime_part_construct_content_from_parser): Replace simple
15715         data wrapper here too, oops.
15716
15717         * Makefile.am (libcamel_la_SOURCES): Removed
15718         camel-simple-data-wrapper again.  Less code to maintain == better
15719         code.
15720         
15721         * camel-data-wrapper.c (construct_from_stream): Fixes for bug
15722         where text attachments dont work.  Made data-wrapper concrete for
15723         the second time.
15724
15725 2000-05-23  NotZed  <NotZed@HelixCode.com>
15726
15727         * providers/vee/camel-vee-folder.c (vee_folder_build_folder):
15728         Update the vfolder details for a single folder.
15729
15730 2000-05-25  Jeffrey Stedfast  <fejj@helixcode.com>
15731
15732         * providers/smtp/camel-smtp-transport.c (_send_to): Took out code
15733         that had been there to reconnect to the server if it was not
15734         already connected - Mailer code was fixed so that this should not
15735         be needed.
15736
15737         * providers/imap/camel-imap-store.[c,h]: Initial code.
15738
15739 2000-05-24  Dan Winship  <danw@helixcode.com>
15740
15741         * camel.h: Re-add camel-simple-data-wrapper.h, which was removed
15742         for some reason.
15743
15744 2000-05-24  Jeffrey Stedfast  <fejj@helixcode.com>
15745
15746         * providers/smtp/camel-smtp-transport.[c,h]: Moved global
15747         variables into struct CamelSmtpTransport to make SMTP
15748         thread-safe
15749
15750         * providers/imap/camel-imap-*.h: Stolen from Mbox. Rough structure
15751         for Imap.
15752         
15753 2000-05-23  Jeffrey Stedfast  <fejj@helixcode.com>
15754
15755         * providers/imap: Added some initial code to the camel tree
15756         for IMAPv4
15757
15758         * providers/imap/.cvsignore: Added to repository
15759
15760         * providers/smtp/camel-smtp-transport.c: Added debug fprintf's
15761         so that testers can provide more information. Tested with simple
15762         messages and a reply to the hello@helixcode.com default message
15763         but should really be tested more.
15764         (smtp_data): Fixed to use data_wrapper_write_to_stream.
15765
15766         * camel-mime-filter-smtp.c (filter): Modified to escape all lines
15767         beginning with a '.' and to place a \r before each \n if one did
15768         not previously exist. Removed code to escape "From " as it was
15769         found to not be needed for SMTP.
15770
15771 2000-05-22  Jeffrey Stedfast  <fejj@helixcode.com>
15772
15773         * providers/smtp/camel-smtp-transport.c (smtp_data): Fixed the 
15774         filtered stream. Fixes for stream changes, updated to use 
15775         camel-mime-filter-smtp.
15776
15777         * Makefile.am: Added camel-mime-filter-smtp.c
15778         
15779         * camel-mime-filter-smtp.[c,h]: Added to camel tree
15780         Smtp filter used to change \n into \r\n, escape lone dots,
15781         and escape "From "'s.
15782
15783 2000-05-19  NotZed  <NotZed@HelixCode.com>
15784
15785         * camel-simple-data-wrapper.c (construct_from_stream): If we
15786         already have been constructed, unref our content.
15787         (write_to_stream): Check we've been constructued, and change for
15788         stream api changes.
15789
15790         * camel-mime-parser.c: Removed exception stuff.
15791
15792         * md5-utils.c (md5_get_digest_from_stream): repaired.
15793
15794         * camel-mime-message.c: Remove exception from write_to_stream, and
15795         fix, and fix formatting.
15796
15797         * providers/sendmail/camel-sendmail-transport.c (_send_internal):
15798         Fix for stream changes.
15799
15800         * providers/pop3/camel-pop3-store.c (camel_pop3_command): Fixes
15801         for stream changes.
15802
15803         * providers/mbox/camel-mbox-folder.c, and elsewhere, fix all
15804         stream api changes.
15805         (mbox_append_message): Use stream_close() now its back.
15806         (mbox_append_message): unref the from filter.
15807
15808         * camel-stream-mem.c: And here.
15809
15810         * camel-stream-fs.[ch]: Here too.
15811
15812         * camel-stream-filter.c: Likewise.  This is getting tedious.
15813
15814         * camel-stream-buffer.c (stream_write): Fix a few little problems.
15815         (stream_close): Reimplement.
15816         (camel_stream_buffer_read_line): Slightly more efficient version,
15817         that also only allocates the right amount of memory for strings.
15818
15819         * camel-seekable-substream.c: Likewise.
15820
15821         * camel-seekable-stream.[ch]: Remove exceptions, fix formatting,
15822         changes for stream (re)fixes.  set_bounds returns an error.
15823
15824         * camel-stream.[ch]: Remove exceptions.  Make flush and reset return
15825         an error code, repair all the screwed up formatting, and put back
15826         close.
15827
15828         * camel-mime-part-utils.c
15829         (camel_mime_part_construct_content_from_parser): And here.
15830
15831         * camel-mime-part.c (camel_mime_part_set_content): And this too.
15832         (write_to_stream): Fixed for stream changes.
15833
15834         * camel.h: Fixed.
15835
15836         * providers/vee/camel-vee-folder.c (vee_search_by_expression):
15837         Implement.  Performs an intersection of the two searches.
15838         (camel_vee_folder_finalise): Unref search folders.
15839         (vee_append_message): Implement append.
15840
15841 2000-05-18  Dan Winship  <danw@helixcode.com>
15842
15843         * camel-folder.c: remove message_number_capability and require uid
15844         capatibility.
15845         (camel_folder_list_subfolders, camel_folder_get_uid_list,
15846         camel_folder_get_subfolder_info, camel_folder_get_message_info):
15847         removed
15848         (camel_folder_get_subfolder_names,
15849         camel_folder_free_subfolder_names): new subfolder interfaces.
15850         (camel_folder_get_uids, camel_folder_free_uids): new uid
15851         interfaces
15852         (camel_folder_get_summary, camel_folder_free_summary): new summary
15853         interfaces
15854
15855         * providers/mbox/camel-mbox-folder.c,
15856         * providers/nntp/camel-nntp-folder.c:
15857         * providers/vee/camel-vee-folder.c: Update for changes
15858
15859         * providers/pop3/camel-pop3-folder.c: Implement get_uids, update
15860         for other changes.
15861
15862 2000-05-18  NotZed  <NotZed@HelixCode.com>
15863
15864         * providers/vee/camel-vee-folder.c: Guess!
15865
15866         * camel-folder-search.c (search_user_flag): Implement user_flag
15867         search term.
15868
15869         * camel-folder-search.h: Added user_flag search capability
15870         (user-flag "blah")
15871
15872         * providers/mbox/camel-mbox-folder.c (mbox_init): Set USER flag in
15873         permanent flags for the folder.
15874
15875 2000-05-17  Dan Winship  <danw@helixcode.com>
15876
15877         * camel-folder.c: Remove unused async open/close and
15878         copy_message_to functions.
15879         Rename functions without initial _. Fix glib preconditions and
15880         gtk-doc comments.
15881
15882 2000-05-17  Dan Winship  <danw@helixcode.com>
15883
15884         * camel-data-wrapper.c: remove get/set_output_stream operations.
15885         They're redundant with write_to_stream, and CamelMimePart and
15886         CamelMimeMessage only implement the latter, meaning that trying to
15887         get_output_stream on a CamelMimeMessage that was built from pieces
15888         rather than being parsed from a stream doesn't work. Anything that
15889         uses get_output_stream can be rewritten to use write_to_stream, so
15890         we'll standardize on that.
15891         (camel_data_wrapper_new): remove this: CamelDataWrapper is
15892         supposed to be an abstract class.
15893         (write_to_stream): remove default implementation. (Moved to
15894         CamelSimpleDataWrapper)
15895         
15896         * camel-simple-data-wrapper.c: resurrect, although it's not really
15897         the same thing it was before. A simple data wrapper, which is
15898         backed by a CamelStream.
15899
15900         * camel-mime-part-utils.c
15901         (simple_data_wrapper_construct_from_parser): Use
15902         construct_from_stream rather than set_output_stream.
15903         (camel_mime_part_construct_content_from_parser): Change
15904         camel_data_wrapper_new to camel_simple_data_wrapper_new.
15905
15906         * camel-mime-part.c (camel_mime_part_set_content): Change
15907         camel_data_wrapper_new to camel_simple_data_wrapper_new.
15908         
15909
15910 2000-05-17  Darin Adler  <darin@eazel.com>
15911
15912         * camel-folder-summary.c: (message_info_load):
15913         Quick fix to get it to compile. I hope I don't get into trouble.
15914
15915 2000-05-17  Dan Winship  <danw@helixcode.com>
15916
15917         * camel.h: Don't include the no-longer-distributed
15918         possibly-to-be-removed headers.
15919
15920         * providers/smtp/camel-smtp-transport.c
15921         (smtp_get_email_addr_from_text): fix an off-by-one error in
15922         address parsing
15923         (smtp_data): use camel_data_wrapper_get_output_stream rather than
15924         data_wrapper->output_stream
15925
15926 2000-05-17  NotZed  <NotZed@HelixCode.com>
15927
15928         * providers/mbox/camel-mbox-folder.c (message_changed): Snoop
15929         changes to user flags on the message into the summary as well.
15930
15931         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_init):
15932         Changed version init to include the parent class version info
15933         (i.e. add it not overwrite it).
15934
15935         * camel-folder-summary.c (message_info_new): Initialise user_flags
15936         to empty.
15937         (message_info_load): And load user flags.
15938         (message_info_save): And save user flags.
15939         (message_info_free): And free them.
15940         (CAMEL_FOLDER_SUMMARY_VERSION): Bumped file revision.
15941
15942         * camel-folder-summary.h: Added user-flags to summary.
15943
15944         * camel-mime-message.c (camel_mime_message_set_user_flag): Dont
15945         use a hashtable for user flags.
15946         (camel_mime_message_get_user_flag): And changed here too.
15947         (camel_flag_get): New interface to get a flag from a flag
15948         list.  Flag lists are easier to work with than hash tables, and
15949         save memory too.
15950         (camel_flag_set): And set.
15951         (camel_flag_list_free): And free.
15952         (free_key_only): Discard.
15953         (finalize): Remove the flag list.
15954
15955 2000-05-17  Jeffrey Stedfast  <fejj@stampede.org>
15956
15957         * providers/smtp/camel-smtp-transport.c: (smtp_helo): Error
15958         checking on gethostbyaddr() eliminating a possible segfault.
15959
15960 2000-05-16  NotZed  <NotZed@HelixCode.com>
15961
15962         * providers/mbox/camel-mbox-folder.c (mbox_delete_message_by_uid):
15963         Implement.
15964
15965 2000-05-12  NotZed  <NotZed@HelixCode.com>
15966
15967         * camel-movemail.c (camel_movemail): Open the destination with
15968         O_APPEND, so we dont blow away a partially transferred mbox.
15969         (camel_movemail): Loop if we get errno=INTR, and not fail.
15970
15971 2000-05-11  NotZed  <NotZed@HelixCode.com>
15972
15973         * providers/mbox/camel-mbox-summary.c (summary_rebuild): Update
15974         the summarised file size, if everything went ok.
15975         (camel_mbox_summary_expunge): Clear header flags after updating.
15976
15977 2000-05-16  Chris Toshok  <toshok@helixcode.com>
15978
15979         * providers/nntp/camel-nntp-folder.c:
15980         * providers/nntp/camel-nntp-folder.h:
15981         * providers/nntp/camel-nntp-provider.c: 
15982         * providers/nntp/camel-nntp-store.c: 
15983         * providers/nntp/camel-nntp-utils.c: 
15984         * providers/nntp/camel-nntp-utils.h: 
15985         get things working with new camel summary stuff.
15986
15987         * providers/nntp/camel-nntp-summary.c: 
15988         * providers/nntp/camel-nntp-summary.h: 
15989         removed files since camel-folder-summary does all we need.
15990
15991 2000-05-15  Jeffrey Stedfast  <fejj@stampede.org>
15992
15993         * providers/smtp/camel-smtp-transport.c: Added some preliminary
15994         AUTH support.
15995
15996 2000-05-15  Dan Winship  <danw@helixcode.com>
15997
15998         * camel-folder.h: Remove camel_folder_get_summary, which no longer
15999         exists.
16000
16001 2000-05-11  Dan Winship  <danw@helixcode.com>
16002
16003         * Makefile.am: remove some cruft that we're not currently using.
16004
16005         * camel-stream-mem.c (camel_stream_mem_new_with_buffer): Change
16006         to match prototype (size_t vs unsigned int) so it works on 64-bit
16007         machines. Noted by msw.
16008
16009 2000-05-11  NotZed  <NotZed@HelixCode.com>
16010
16011         * providers/mbox/camel-mbox-folder.c (message_changed): Indicate
16012         the summary changed also.
16013
16014 2000-05-11  Jeffrey Stedfast  <fejj@stampede.org>
16015
16016         * providers/smtp/camel-smtp-transport.c: (smtp_helo): 
16017         Updated to more closely comply with RFC 821 standards
16018
16019 2000-05-11  NotZed  <NotZed@HelixCode.com>
16020
16021         * camel-mime-part.c (write_to_stream): Unref the filter after
16022         adding it to the filtering stream.
16023
16024         * providers/mbox/camel-mbox-summary.c
16025         (camel_mbox_summary_finalise): Free the folder path.
16026         (camel_mbox_summary_update): Also save summary when done.
16027         (camel_mbox_summary_expunge): Unindex items when deleting them.
16028         (camel_mbox_summary_expunge): Save the index as well as the
16029         summary.
16030
16031         * camel-folder-summary.c (camel_folder_summary_finalise): Free the
16032         summary path.
16033         (camel_folder_summary_touch): New function, indicate the summary
16034         info changed.
16035         (camel_folder_summary_remove): Dirty here.
16036
16037         * camel-internet-address.c (internet_decode): Free multiple entry
16038         addresses properly.
16039
16040         * camel-mime-utils.c (header_decode_mailbox): Plugged another
16041         memleak, free text after converting it.
16042         (header_decode_addrspec): More leaks plugged.
16043
16044         * camel-mime-message.c (finalize): Free message_uid.
16045         (finalize): Free the recipients hashtable.
16046
16047 2000-05-11    <notzed@helixcode.com>
16048
16049         * camel-folder-summary.c (camel_folder_summary_finalise): Free
16050         summary items and charset filters.
16051
16052 2000-05-10    <notzed@helixcode.com>
16053
16054         * camel-folder-summary.c (camel_folder_summary_finalise): Don't
16055         free stuff in p, after we've free'd p.
16056
16057         * providers/mbox/camel-mbox-folder.c (mbox_append_message): Unref
16058         the stream we created for appending.
16059
16060 2000-05-10  Jeffrey Stedfast  <fejj@stampede.org>
16061
16062         * providers/smtp/camel-smtp-transport.c: (camel_smtp_transport_class_init):
16063         Added initialization for service_class
16064
16065 2000-05-10  Dan Winship  <danw@helixcode.com>
16066
16067         * camel-multipart.c (write_to_stream): fix a stupid typo. Thank
16068         you, C.
16069
16070         * camel-mime-part.c (write_to_stream): don't ref the stream before
16071         wrapper a filter around it, since nothing will ever unref it.
16072
16073 2000-05-10  Christopher James Lahey  <clahey@helixcode.com>
16074
16075         * Makefile.am: Added camel-types.h, camel-folder-pt-proxy.h, and
16076         camel-thread-proxy.h.
16077
16078 2000-05-09  Dan Winship  <danw@helixcode.com>
16079
16080         * providers/sendmail/camel-sendmail-transport.c (_send_internal):
16081         Bleah. Can't fsync a pipe. As a quick kludge, just don't
16082         stream_flush it. The right fix will require bringing back
16083         stream_close though.
16084
16085 2000-05-09  Jeffrey Stedfast  <fejj@stampede.org>
16086         * camel-internet-address.[c,h]: Undid my changes (moved
16087         struct _address back into came-internet-address.c)
16088         * providers/smtp/camel-smtp-transport.c: (_send): changed
16089         from using it's own address manipulation (using struct _address)
16090         to using camel_internet_address_get(). Also some format changes
16091         to keep consistant with the rest of Camel
16092
16093 2000-05-09  Jeffrey Stedfast  <fejj@stampede.org>
16094
16095         * camel-internet-address.[c,h]: Moved struct _address from
16096         camel-internet-address.c to camel-internet-address.h
16097         (hopefully this doesn't break anything...)
16098         * providers/smtp/camel-smtp-transport.c: (_send): now
16099         populates the recipient list with To, Cc, and Bcc addresses.
16100         Should now be able to use this module.
16101
16102 2000-05-09  Dan Winship  <danw@helixcode.com>
16103
16104         * providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid):
16105         one more refcounting fix I missed before.
16106
16107 2000-05-08  Jeffrey Stedfast  <fejj@stampede.org>
16108
16109         * providers/smtp/camel-smtp-transport.c: no longer frees memory it
16110         shouldn't, updated to reflect camel-stream changes involving
16111         CamelException (perhaps it should use a different CamelException
16112         variable than is passed to the camel smtp module?)
16113
16114 2000-05-08  Dan Winship  <danw@helixcode.com>
16115
16116         * camel-stream.c (camel_stream_read, camel_stream_write,
16117         camel_stream_flush, camel_stream_reset, camel_stream_printf,
16118         camel_stream_write_to_stream): Use CamelException to signal
16119         failure.
16120         (camel_stream_write_strings): Remove. camel_stream_printf is more
16121         useful in most of the places that used this.
16122         (camel_stream_write_string): Change from macro to function to
16123         prevent problems with double-evaluation.
16124
16125         * camel-seekable-stream.c (camel_seekable_stream_seek,
16126         camel_seekable_stream_set_bounds): Use CamelException.
16127         (reset): Update.
16128
16129         * camel-seekable-substream.c, camel-stream-buffer.c,
16130         camel-stream-filter.c, camel-stream-fs.c, camel-stream-mem.c:
16131         Update.
16132
16133         * camel-stream-fs.c: Remove the virtual init functions and move
16134         the code into the creator functions. Add CamelExceptions to
16135         creation functions that could fail.
16136
16137         * camel-data-wrapper.c (camel_data_wrapper_write_to_stream): Use
16138         CamelException.
16139         * camel-mime-message.c, camel-mime-part.c, camel-multipart.c
16140         (write_to_stream): Update.
16141
16142         * camel-mime-parser.c: add an exception to the mime parser private
16143         data and pass that to stream functions as needed.
16144         
16145         * gmime-content-field.c, md5-utils.c: Update (badly) for stream
16146         changes.
16147         
16148         * camel-exception.h (camel_exception_is_set): convenience macro.
16149
16150         * providers/Makefile.am: disable SMTP for now
16151
16152         * providers/mbox/camel-mbox-folder.c (mbox_append_message): Pass
16153         CamelException to the functions that now need it. Check the
16154         exception after calling camel_stream_flush, and fail if it fails.
16155         (mbox_get_message_by_uid): More updates.
16156
16157         * providers/pop/camel-pop3-folder.c,
16158         providers/pop/camel-pop3-store.c,
16159         providers/sendmail/camel-sendmail/transport.c: Update.
16160
16161
16162 2000-05-08  NotZed  <NotZed@HelixCode.com>
16163
16164         * camel-mime-message.c (process_header): Format From and Reply-To
16165         to at least a decoded string.  Should probably store them as an
16166         camelinternetaddress.
16167
16168         * Merged NEW_SUMMARY branch back to trunk, and resolved conflicts.
16169         
16170         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_update):
16171         Return status.
16172         (camel_mbox_summary_expunge): Force an update of the summary
16173         before we do anything.
16174         (camel_mbox_summary_expunge): Build new xev line in xevnew, and
16175         free that, and consify xev.
16176         (camel_mbox_summary_load): If we are rebuilding from scratch, make
16177         sure we clear the summary content.
16178
16179         * camel-stream-filter.c (do_close): We NEED a stream close.
16180
16181 2000-05-07  Dan Winship  <danw@helixcode.com>
16182
16183         Make camel not leak like a sieve.
16184
16185         * camel-object.c: New subclass of GtkObject which is now the base
16186         of the Camel object hierarchy. Currently the only difference
16187         between CamelObject and GtkObject is that CamelObjects don't start
16188         out floating.
16189
16190         * *.h: Move a bunch of typedefs to camel-types.h. Standardize on
16191         using <camel/foo.h> in header files rather than <foo.h>, "foo.h",
16192         or "camel/foo.h". Remove some unneeded includes.
16193
16194         * camel-address.c, camel-data-wrapper.c, camel-folder-search.c,
16195         camel-folder-summary.c, camel-folder.c, camel-mime-filter.c,
16196         camel-mime-parser.c, camel-service.c, camel-session.c,
16197         camel-stream.c: These are now subclasses of CamelObject.
16198
16199         * camel-data-wrapper.c (set_output_stream):
16200         * camel-medium.c (set_content_object):
16201         * camel-seekable-substream.c
16202         (init_with_seekable_stream_and_bounds):
16203         * providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid): 
16204         remove gtk_object_sink calls.
16205
16206         * camel-stream-buffer.c (init_vbuf): 
16207         * camel-stream-filter.c (camel_stream_filter_new_with_stream):
16208         ref the original stream.
16209
16210         * camel-folder-summary.c (camel_folder_summary_finalise): unref
16211         the filters when finalizing.
16212
16213         * camel-mime-part-utils.c
16214         (simple_data_wrapper_construct_from_parser,
16215         camel_mime_part_construct_content_from_parser):
16216         * camel-mime-part.c (camel_mime_part_set_content): Unref objects
16217         that are created only to be handed off to other objects. If
16218         they're going to be needed later, they will have been additionally
16219         ref'ed by the object that needs them.
16220
16221         * providers/pop3/camel-pop3-folder.c (get_message_by_number):
16222         unref the message stream after creating the data from it.
16223
16224         * camel-stream.c, camel-stream-buffer.c, camel-stream-filter.c,
16225         camel-stream-fs.c, camel-stream-mem.c: Remove camel_stream_close,
16226         since its semantics are dubious (what happens when you close a
16227         stream other people still have references on?).
16228
16229         * providers/nntp/camel-nntp-store.c:
16230         * providers/smtp/camel-smtp-transport.c:
16231         * providers/pop3/camel-pop3-store.c:
16232         replace camel_stream_close calls with gtk_object_unref.
16233
16234         * providers/mbox/camel-mbox-folder.c:
16235         * providers/nntp/camel-nntp-folder.c:
16236         * providers/sendmail/camel-sendmail-transport.c:
16237         replace camel_stream_close with camel_stream_flush +
16238         gtk_object_unref
16239
16240 2000-05-06  Dan Winship  <danw@helixcode.com>
16241
16242         * providers/pop3/camel-pop3-store.c (query_auth_types): A machine
16243         which serves neither POP nor KPOP is not a POP server.
16244
16245         * providers/smtp/camel-smtp-provider.c: Note in the description
16246         that this provider is not yet tested.
16247
16248 2000-05-08    <notzed@helixcode.com>
16249
16250         * camel-mime-part.c (write_to_stream): Free the filter stream when
16251         done.
16252
16253         * camel-mime-parser.c (folder_seek): Make sure we add the \n
16254         terminal when we seek as well (frob!).
16255
16256         * camel-mime-utils.c (header_decode_addrspec): Plug minor memleak.
16257
16258         * camel-mime-part.c (finalize): Free header tables once finished.
16259
16260         * camel-folder-summary.c (camel_folder_summary_remove): Dont try
16261         to access info after its free'd.
16262
16263 2000-05-07  NotZed  <NotZed@HelixCode.com>
16264
16265         * camel-mime-part.c (write_to_stream): Apply encoding to content
16266         part, when writing to a stream *sigh*.
16267
16268         * camel-stream-filter.c (do_write): implement write for the
16269         filtering stream.  Writes shouldn't be mixed with reads.
16270         (do_flush): Implemented flush.  Again write/flush shouldn't be
16271         mixed with reads.  Only flushes if the last op was write.
16272         (do_close): Force flush on close.
16273
16274         * camel-mime-filter.c (filter_run): Oops, make sure we include the
16275         backlen in the total length before passing onto the filter.
16276
16277         * camel-mime-filter-from.c: New filter, munges 'From ' lines into
16278         '>From ', for mbox.
16279
16280         * camel-mime-parser.c (camel_mime_parser_header_remove): New
16281         function to remove the parser's raw header, rather than
16282         manipulating the header directly (wich doesn't work with
16283         mempools).
16284
16285         * camel-mime-utils.c (header_address_list_clear): Fixed some
16286         broken(tm) logic, which would leak entries on multivalued lists.
16287
16288         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_load):
16289         Use ibex_save() to save the ibex.  Makes a big difference to
16290         startup times for very large mailboxes.
16291         (camel_mbox_summary_expunge): Dum de dum, reimplemented.  Designed
16292         to be much more robust, and to stop immediately if anything awry
16293         happens.
16294         (copy_block): Utility function to copy n bytes from one fd to
16295         another.
16296         (header_write): Utility function to write out raw headers to an
16297         fd.
16298         (camel_mbox_summary_update): Incremental summary updater.
16299
16300         * providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid):
16301         Dont unref the stream, because of the broken(tm) ref model of gtk
16302         widget that for some odd reason is being perpetuated in camel.  
16303         (mbox_expunge): Reenable expunge again.
16304         (mbox_append_message): Removed the optimised mbox append.  If its
16305         an issue, it can go back later.  Cleaned up a lot, checks error
16306         returns, and automagically translates 'From ' into '>From' as
16307         necessary.
16308
16309 2000-05-07    <notzed@helixcode.com>
16310
16311         * camel-mime-filter.c (filter_run): Oops, forgot to add the
16312         backlen to the pre-buffer (*poof*).
16313
16314 2000-05-07  NotZed  <NotZed@HelixCode.com>
16315
16316         * camel-mime-message.c (construct_from_parser): Allow
16317         HSCAN_FROM_END to terminate the processing of a message.
16318
16319         * camel-folder-summary.c (perform_content_info_load): Ick, dont
16320         try and append a node onto its own list.
16321         (camel_folder_summary_clear): Actually clear the indexes after
16322         we've removed the messages.
16323         (camel_folder_summary_clear): Set dirty if it changes.
16324         (camel_folder_summary_load): Clear dirty.
16325         (camel_folder_summary_save): Only save if dirty.
16326
16327         * providers/mbox/camel-mbox-summary.c (summary_header_load): Oops,
16328         remember to call that parent class first ...
16329         (summary_header_save): Here too.
16330         (camel_mbox_summary_load): Do more checking to verify the index
16331         contents as well as teh summary contents, against the mbox
16332         contents.
16333         (camel_mbox_summary_load): Removed some fo that checking, it needs
16334         more code to work reliably.
16335
16336 2000-05-07    <notzed@helixcode.com>
16337
16338         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_load):
16339         Set the size and mtime of the mbox we indexed once done.
16340
16341         * camel-folder-summary.c (camel_folder_summary_set_index): Dont
16342         write the index if it changes - let the claler fix it (uh, kind of
16343         impacts performance).
16344         (camel_folder_summary_load): close in.
16345
16346         * camel-folder-summary.c (summary_format_string): Check header
16347         exists before trying to strip its leading spaces.
16348
16349 2000-05-06  NotZed  <NotZed@HelixCode.com>
16350
16351         * camel-folder.h: Removed summary info from here, and include
16352         camel-folder-summary.h as well.
16353         
16354         * camel-mime-parser.c (camel_mime_parser_step): Allow it to accept
16355         a NULL databuffer.
16356
16357         * providers/mbox/camel-mbox-summary.c: Totally new file, now
16358         subclasses camel-folder-summary.
16359
16360         * camel-folder-summary.c (message_info_load): Load the uid as a
16361         string.
16362         (message_info_save): And save too.
16363         (camel_folder_summary_clear): New function, clears the contents of
16364         the summary.
16365
16366         * providers/mbox/camel-mbox-folder.c: Fixes for summary changes.
16367         (mbox_get_message_by_uid): Completely redone.  Now cross-checks
16368         the summary information to make sure we get a real message.
16369         (mbox_append_message): Disabled the copy version of append for
16370         now.
16371         (mbox_expunge): Temporarily disabled the expunge function, until
16372         it is put back in camel-mbox-summary.c
16373
16374 2000-05-05  NotZed  <NotZed@HelixCode.com>
16375
16376         * camel-folder-summary.c: And same here ...
16377         (camel_folder_summary_encode_fixed_int32): Ugh, fwrite doesn't
16378         return -1 on error ..
16379         (camel_folder_summary_decode_fixed_int32): Neither deos fread.
16380         (camel_folder_summary_encode_token): Fix here too.
16381         (summary_build_content_info): Use start-headers to get the pos of
16382         the message, not parser_tell(), which might not be what we
16383         expected because of parser_unstep().
16384         (camel_folder_summary_encode_token): Use bserch() to tokenise the
16385         values, rather than a linear search.
16386
16387         * camel-mime-utils.c: Defined out some memory profiling stuff I
16388         left there by mistake.
16389         (header_decode_mailbox): Dont try to append the word part of a
16390         local address if we ran out of words.
16391
16392         * camel-mime-parser.c (folder_scan_content): Apply the fix from
16393         the header scanner to here too.
16394         (folder_scan_header): Only check for end of header if we have
16395         space for it (didn't end the read with a newline)
16396         (folder_scan_header): inptr is the only real thing we need
16397         registerised for performance.  Try to help the compiler be smart
16398         about it ..
16399         (folder_scan_header): Simplified the save header case a tad.
16400
16401         Commented out some memory profiling stuff.
16402
16403 2000-05-05    <notzed@helixcode.com>
16404
16405         * camel-mime-utils.c (header_decode_mailbox): Plug a memory leak.
16406         (header_decode_text): Fixed memory leaks with g_string_append().
16407         (header_encode_string): And here too, and a few other places.  The
16408         glib api is so awful ...
16409         (header_content_type_decode): More memory leaks.
16410
16411 2000-05-05    <notzed@helixcode.com>
16412
16413         * camel-mime-parser.c (folder_scan_init_with_fd): Make sure we
16414         init the end of buffer sentinal!
16415         (folder_scan_init_with_stream): And here too ...
16416
16417 2000-05-04  NotZed  <NotZed@HelixCode.com>
16418
16419         * providers/mbox/camel-mbox-folder.c (summary_get_message_info):
16420         Maxcount is minimum of the max and the requested count, not the
16421         maximum :)
16422
16423         * camel-mime-parser.c (folder_scan_content): Properly set midline,
16424         so we dont falsely catch offset boundary markers (i.e. From inside
16425         content).
16426         (folder_read): Set a sentinal on the end of the read data (\n) so
16427         we dont have to check the buffer boundary in the inner loop.
16428         (mempool_*): New experimental memory management routines, speed
16429         up simple structure parsing by about 25% ... not compiled in by
16430         default.  Something similar may be needed for camel-mime-utils to
16431         address performance issues with g_malloc and friends.
16432
16433         * camel-mime-utils.c: Added a macro w(x) used to wrap all warnings
16434         about mime/rfc violations, so they can be turned off.
16435
16436         * camel-folder-summary.c (summary_build_content_info): Step after
16437         the end of a message ...
16438         Turn into a stand-alone program for testing and profiling.
16439
16440 2000-05-04  Dan Winship  <danw@helixcode.com>
16441
16442         * providers/pop3/camel-pop3-store.c (pop3_connect): Don't fall
16443         back to plaintext passwords if APOP fails, since it should also
16444         fail.
16445
16446 2000-05-04  Dan Winship  <danw@helixcode.com>
16447
16448         * camel-session.c (camel_session_list_providers): New function to
16449         replace camel_provider_scan. Returns a list of either (a) all
16450         currently-loaded providers, or (b) all available providers.
16451
16452         * camel-url.[ch]: Add an "empty" flag to CamelURL (indicating that
16453         it contains only a protocol).
16454
16455         * camel-service.c (camel_service_query_auth_types): Make this take
16456         a CamelException (since it may have to try to connect to the
16457         server, and it might not able to.)
16458
16459         * providers/pop3/camel-pop3-store.c: add KPOP (Kerberized POP)
16460         support. This is mostly so I have two kinds of authmech to play
16461         with instead of just one. (But it does actually work.)
16462
16463         * providers/smtp/camel-smtp-transport.c (query_auth_types): update
16464         for prototype change, but disable the functionality, since it
16465         doesn't really support any auth types yet.
16466         (camel_smtp_transport_get_type): add an object init function to
16467         set the service url_flags.
16468
16469 2000-05-04  NotZed  <NotZed@HelixCode.com>
16470
16471         * providers/mbox/camel-mbox-summary.c: Yes, and anotherone.
16472
16473         * camel-mime-utils.c: And another one.
16474
16475         * camel-mime-part.c: And another one.
16476
16477         * camel-mime-part-utils.c: And another one.
16478
16479         * camel-folder-search.c: And another one.
16480
16481         * camel-mime-parser.c: Reverted a change wihtout a ChangeLog entry.
16482
16483 2000-05-04  NotZed  <NotZed@HelixCode.com>
16484
16485         * camel-folder-summary.[hc]: Yes, CamelFolderSummary is back ...
16486         ... re-usable class to summarise and index any stream or message
16487         and to manage/load/save the created summaries.
16488         
16489         * camel-folder.c: Include string.h to kill a warning.
16490
16491 2000-05-03  Jason Leach  <leach@wam.umd.edu>
16492
16493         * Makefile.am (INCLUDES): add $(UNICODE_CFLAGS) to the INCLUDES,
16494         people who installed libunicde in non-standard include paths need
16495         this.
16496
16497 2000-05-03  NotZed  <NotZed@HelixCode.com>
16498
16499         * camel-folder.h: Added pos/bodypos/endpos to the basic message
16500         content info object.  Size to be removed?  Moved the
16501         messageconentinfo and messageinfo back to camel-folder-summary.h.
16502
16503         * camel-mime-filter-index.c (camel_mime_filter_index_set_ibex):
16504         New function to (re)set the index to use on a filter.
16505
16506         * camel-mime-parser.c (camel_mime_parser_scan_from): Whole bunch
16507         of inline docs.
16508         (camel_mime_parser_drop_step): New function to drop a state from
16509         the parser.  Needs more testing.
16510
16511         * camel-mime-utils.c (rfc2047_decode_word): If the iconv handle is
16512         -1, then dont try and convert (crashes unicode_iconv?).
16513         (rfc2047_decode_word): Use alloca for variables instead of
16514         g_malloc - by the rfc they should always be short.
16515         (rfc2047_decode_word): If we can't do the charset conversion, undo
16516         the quoted-printable/base64 at least?  Should probably convert
16517         unknown characters to the utf-8 unknown character.
16518
16519 2000-05-02  Larry Ewing  <lewing@helixcode.com>
16520
16521         * camel-mime-utils.c (header_decode_date): fix typo when
16522         dereferencing saveoffset.
16523
16524 2000-05-02  NotZed  <NotZed@HelixCode.com>
16525
16526         * camel-folder-search.c: Added some header doco.
16527
16528         * camel.h: REmove gmime-utils.h from here.
16529
16530         * providers/mbox/camel-mbox-search.[ch]: Removed.  Functionally
16531         redundant.
16532
16533         * providers/mbox/camel-mbox-folder.c (mbox_search_by_expression):
16534         Use the new CamelFolderSearch class to do the actual searching,
16535         just setup the search here.
16536
16537         * camel-folder-search.[ch]: A helper class that providers may
16538         subclass to provide their own search functionality, or they can
16539         simply use as is, it supports body searches if an ibex is
16540         supplied, and header searches if a summary is supplied.
16541
16542 2000-05-02  Matt Loper  <matt@helixcode.com>
16543
16544         * Makefile.am: set G_LOG_DOMAIN.
16545         * providers/MH/Makefile.am: same.
16546         * providers/maildir/Makefile.am: same.
16547         * providers/mbox/Makefile.am: same.
16548         * providers/nntp/Makefile.am: same.
16549         * providers/pop3/Makefile.am: same.
16550         * providers/sendmail/Makefile.am: same. 
16551         * providers/smtp/Makefile.am: same.             
16552
16553 2000-05-02  NotZed  <NotZed@HelixCode.com>
16554
16555         * providers/mbox/camel-mbox-search.c
16556         (camel_mbox_folder_search_by_expression): Dont store/remove
16557         current search from the search list.
16558         
16559         * providers/mbox/camel-mbox-folder.h: Removed searches list,
16560         searches are all sync now.
16561
16562         * gmime-utils.[ch]: What the hell, remove it.  This will break the
16563         nntp provider.  The mime parser can be used instead though.
16564         Removed from all code including it (but none were using it).
16565
16566         * gmime-utils.c (_store_header_pair_from_string): Removed bizarre
16567         string_dichotomy version of this.  This code is somewhat redundant
16568         now, and is headed for death anyway.
16569
16570         * gstring-util.c (g_string_dichotomy): Same with this one.
16571         (g_string_clone): Removed a memory leak, g_string_new() allocates
16572         its own memory.
16573         (g_string_append_g_string): Allow to append an empty gstring onto
16574         another gstring, dont abort()!
16575
16576         * string-utils.c (string_dichotomy): Removed this incredibly weird
16577         function.
16578
16579         * camel-folder.c (_create): Replaced the rather obtuse use of
16580         "string_dichotomy" function with a simple strrchr().  Still not
16581         sure it'll work.
16582
16583         * camel-folder-summary.c: cvs removed a long-removed file.
16584
16585         * camel-mime-parser.c (folder_scan_header): Fix the previous
16586         overflow problem properly (can happen in 2 places).
16587         (header_append): A new macro to include the code changed above, so
16588         it only appears in one place.
16589         (folder_scan_step): Change the content type to text/plain if the
16590         multipart is broken.  Doesn't actually change the header though.
16591         (header_append): Also move the header-start tracking stuff here.
16592         Could be a static function to save code.
16593
16594 2000-05-02    <notzed@helixcode.com>
16595
16596         * camel-mime-part-utils.c
16597         (simple_data_wrapper_construct_from_parser): Dont use autofill on
16598         these fucking long function anmes!!!!!!
16599
16600 2000-05-02  NotZed  <NotZed@HelixCode.com>
16601
16602         * providers/mbox/camel-mbox-summary.c
16603         (camel_mbox_summary_expunge): Fix the offset for the summary when
16604         an item is expunged to take account of the From line.
16605
16606 2000-05-01  NotZed  <NotZed@HelixCode.com>
16607
16608         * providers/mbox/camel-mbox-folder.h (CamelMboxFolder): Removed
16609         search_id.
16610
16611         * providers/mbox/camel-mbox-search.c
16612         (camel_mbox_folder_search_cancel): Remove.d
16613         (camel_mbox_folder_search_complete): Removed.
16614         (camel_mbox_folder_search_by_expression): Changed back to sync
16615         api.
16616         (struct _searchcontext): Removed cancelled flag.
16617         (find_context): Removed.
16618         (func_header_contains): Debug out some search stuff.
16619
16620         * providers/mbox/camel-mbox-search.h
16621         (camel_mbox_folder_search_by_expression): Moved back to sync api.
16622
16623         * providers/mbox/camel-mbox-summary.c
16624         (camel_mbox_summary_set_flags_by_uid): New function to update the
16625         flags in the summary.
16626         (camel_mbox_summary_expunge): Expunge messages from a folder.
16627         (offset_content): Re-align offsets of summary when messages
16628         added/removed to an existing summary.
16629         (camel_mbox_summary_remove_uid): Remove a message summary entry by
16630         uid.
16631         (index_folder): Restore flags from X-Evolution header, if they are set.
16632         (index_folder): Make sure we index using a decimal uid, since
16633         thats what everything else indexes off (oops).
16634         Upped SUMMARY_VERSION as a result.
16635         (camel_mbox_summary_expunge): Oops, my wrong, use the string uid
16636         to unindex on.
16637
16638         * providers/mbox/camel-mbox-folder.c (_get_message_by_uid):
16639         Connect to the message_changed signal.
16640         (_init): Set permanent flags to something reasonable.  No user
16641         flags yet ...
16642         (message_changed): If the flags of the message change, update the
16643         flags in the summary.
16644         (mbox_expunge): Implement the expunge.
16645         (camel_mbox_folder_class_init): Renamed all leading _'s to mbox_'s
16646         (mbox_expunge): Emit a folder_changed signal on expunge (uh, even
16647         if it didn't ...)
16648
16649         * camel-folder.c (_finalize): Uh, dont free permanent_flags
16650         anymore (this wouldn't failed anyway, it was a GList !!!)
16651         (camel_folder_search_complete): Removed.
16652         (camel_folder_search_cancel): Removed.
16653         (camel_folder_expunge): Changed to only allow expunge on an open
16654         folder.  It doesn't make sense for mbox, otherwise (?)
16655         (camel_folder_class_init): Added a folder_changed signal.
16656
16657         * camel-folder.h (struct _CamelFolder): Change permanent_flags to
16658         a bitfield.
16659         (list_permanent_flags): Renamed to get_permanent_flags, and
16660         returns a bitfield.
16661         (camel_folder_expunge): Changed expunge to a void type.  The
16662         messages would no longer be useful after they have been removed
16663         ...
16664         (CamelFolderClass): New function summary_get_by_uid() to get a single
16665         summary.
16666         (*search*): Moved back to synchronous search api ... *sigh*
16667         
16668         * camel-folder.h: Removed CamelSearchFunc.
16669
16670         * camel-mime-message.c (set_flag): Removed.
16671         (camel_mime_message_set_flag): Removed.
16672         (get_flag): Removed.
16673         (camel_mime_message_get_flag): Removed.
16674         (add_flag_to_list): Removed.
16675         (get_flag_list): Removed.
16676         (camel_mime_message_get_flag_list): Removed.
16677         (camel_mime_message_get_flags): New interface to get system flags.
16678         (camel_mime_message_set_flags):  " to set ".
16679         (camel_mime_message_get_user_flag): To get a user flag.
16680         (camel_mime_message_set_user_flag): To set a user flag.
16681         (finalize): Hmm, the old one free'd the key and data, not good
16682         when the data is a boolean ...
16683
16684 2000-04-30  Dan Winship  <danw@helixcode.com>
16685
16686         * camel-provider.h: Tweak the definition of CamelProvider. Among
16687         other things, a provider may now be both a store and a transport.
16688
16689         * camel-provider.c: Remove a lot of code we had no intention of
16690         using. This now only contains two functions: camel_provider_init
16691         to read the installed .urls files, and camel_provider_load to
16692         load and register a new provider.
16693
16694         * camel-session.c: Remove more unused code and simplify some of
16695         the remaining code. The list of available provider modules is now
16696         stored in the session, and it handles calling camel_provider_load
16697         to load them as needed. Provider registration is now done by
16698         calling back from the module init routine, which allows a single
16699         module to register providers for multiple URL types.
16700
16701         * providers/*: Update provider structures and init routines for
16702         the new stuff. Add a .urls file to each provider specifying what
16703         urls it handles, and install that with the library.
16704
16705         * providers/nntp/camel-nntp-provider.c: Add hints towards
16706         supporting both news: and nntp: URLs, and using nntp as both a
16707         store and a transport.
16708
16709 2000-04-29  Dan Winship  <danw@helixcode.com>
16710
16711         * camel-internet-address.c (camel_internet_address_get): const
16712         poison
16713
16714         * camel-mime-part-utils.c
16715         (simple_data_wrapper_construct_from_parser):
16716         camel_mime_parser_tell() returns an offset from where it started
16717         parsing, not necessarily from the start of data. Since we're
16718         parsing a bounded seekable_stream, we need to add the stream's
16719         starting bound to camel_mime_parser_tell's return value to
16720         create the substream in the right place.
16721
16722         * camel-seekable-substream.c
16723         (camel_seekable_substream_new_with_seekable_stream_and_bounds):
16724         say CAMEL_STREAM_UNBOUND rather than -1 in doc.
16725
16726         * camel-seekable-stream.c (camel_seekable_stream_seek): Add more
16727         info to docs.
16728
16729 2000-04-28  Dan Winship  <danw@helixcode.com>
16730
16731         * camel-mime-parser.c (folder_scan_header): fix a bug that would
16732         cause corruption with very long headers.
16733
16734 2000-04-27  Ettore Perazzoli  <ettore@helixcode.com>
16735
16736         * providers/pop3/Makefile.am (INCLUDES): Add `-I$(srcdir)/../../..'
16737         to pick the Camel includes.
16738         * providers/sendmail/Makefile.am (INCLUDES): Likewise.
16739
16740         * camel.h: Don't #include <camel/data-wrapper-repository.h> anymore.
16741
16742 2000-04-27  NotZed  <NotZed@HelixCode.com>
16743
16744         * camel-mime-utils.c (check_header): Dont try and check a NULL
16745         header.
16746
16747         * camel-recipient.[ch]: Dead.  Its not pining.
16748
16749         * camel-mime-message.h: Dont include recipients.h anymore.
16750
16751         * camel-mime-message.c (camel_mime_message_add_recipient): Accept
16752         name/address separately, and store in an CamelInternetAddress.
16753         (add_recipient): Removed.
16754         (remove_recipient): Removed.
16755         (remove_recipient_address): Renamed from remove_receipient, works
16756         via address.
16757         (camel_mime_message_remove_recipient_name): New function to remove
16758         by name.
16759         (get_recipients): Removed.
16760         (camel_mime_message_get_recipients): Return a camel-internet-address.
16761         (write_to_stream): No longer write receipients directly.
16762         (write_recipients_to_stream): Removed.
16763         (write_one_recipient_to_stream): Removed.
16764         (camel_mime_message_init): Setup recipients hashtable, rather than
16765         usign the recipients stuff.
16766         (set_recipient_list_from_string): Killed, a violent and lengthy
16767         death.
16768         (process_header): Simplified recipient handling code a lot.
16769         (received_date_str, sent_date_str, reply_to_str, subject_str,
16770         from_str): Removed some oddly-defined global statics.
16771         (camel_mime_message_class_init): Dont initialise above variables
16772         anymore.
16773         (init_header_name_table): Removed, use a table to init this, and
16774         do it in class init (2 lines of code ...).
16775
16776         * camel-news-address.c: Class to represent news addresses -
16777         currently empty, and not built.
16778
16779         * camel-internet-address.h: Class to represent internet (email)
16780         addresses.
16781
16782         * camel-address.h: Abstract class to represent (lists of)
16783         addresses.
16784
16785 2000-04-27  Dan Winship  <danw@helixcode.com>
16786
16787         * camel-mime-part.c (write_to_stream): Revert previous change. I
16788         was confused.
16789
16790         * camel-url.[ch] (camel_url_encode, camel_url_decode): expose
16791         these routines.
16792
16793 2000-04-26  Dan Winship  <danw@helixcode.com>
16794
16795         * camel-mime-part.c (write_to_stream): Only write a newline
16796         between the headers and the content object if the content object
16797         is not a CamelMedium. (If the content is a medium, it may have its
16798         own headers, which then need to go before the blank line.)
16799
16800         * camel-mime-body-part.[ch]: Remove. We weren't using the fields
16801         that made this different from camel-mime-part, so it basically
16802         just forced us to do lots of gratuitous typecasting.
16803
16804         * camel-multipart.[ch]: Use CamelMimePart. Remove the multipart
16805         parent stuff, since we weren't using that either.
16806
16807         * etc: update for CamelMimeBodyPart -> CamelMimePart
16808
16809 2000-04-26  Dan Winship  <danw@helixcode.com>
16810
16811         * camel-medium.c (set_content_object): sink the content object
16812         after referencing it.
16813
16814         * camel-mime-part.c: fix various little things in the handling
16815         of CamelMedium methods. Change camel_mime_part_set_text to the
16816         more generic camel_mime_part_set_content.
16817
16818         * camel.h: sync to current reality
16819
16820         * camel-folder-utils.[ch]: removed
16821
16822         * camel-mime-utils.c (header_format_date): fix format specifier
16823         for time zone. Fix typo in month names array.
16824
16825 2000-04-26  NotZed  <NotZed@HelixCode.com>
16826
16827         * camel-seekable-substream.c (stream_seek): Changed to have
16828         absolute seek semantics, not relative to the bounds.
16829
16830         * camel-seekable-stream.c (reset): When we reset, seek to the
16831         start of the bound, if there is one.
16832         (stream_tell): Make tell virtual.
16833
16834         * camel-stream-filter.c (do_available): Removed.
16835
16836         * camel-stream-buffer.c: Remove leading _'s from static functions.
16837         (stream_read): Renamed from read().  Fancy that conflicting!  (my
16838         boo!)  Others too.
16839
16840         * providers/pop3/camel-pop3-folder.c (get_message_by_number):
16841         Changed to stream_mem interface.
16842
16843         * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): Fixed
16844         for streamfs interface changes, and implement a failure case.
16845         (_append_message): Changed for fs stream interface change.
16846
16847         * camel-multipart.c (print_part): Iterate rahter than callback.  I
16848         hate glists's interface (hence, move this to write_to_stream).
16849         (write_to_stream): Return an error (yuck, this is a royal PITA to
16850         do with the stream write interface).
16851
16852         * camel-mime-message.c: Removed leading _ from static names.
16853
16854         * camel-mime-part.h: construct_from_parser() now returns an error
16855         code.
16856
16857         * camel-mime-part-utils.c
16858         (camel_mime_part_construct_content_from_parser): Changed to use a
16859         camel-data-wrapper instead of a camel-simple-data-wrapper (no
16860         change needed elsewhere?).
16861         (simple_data_wrapper_construct_from_parser): Fixes for stream-mem
16862         interface changes.
16863
16864         * camel-simple-data-wrapper.[ch],
16865         camel-simple-data-wrapper-stream.[ch],
16866         camel-stream-data-wrapper.[ch], removed.  Fixed including of these
16867         files.
16868         
16869         * camel-mime-part.c (camel_mime_part_set_text): Remove the use of
16870         the camel-simple-data-wrapper-stream, just use a mem stream.
16871         (write_to_stream): Renamed from my_*
16872         (construct_from_stream): Return an error on error.
16873
16874         * camel-stream-mem.c (camel_stream_mem_new*): Remove mode
16875         parameter.
16876
16877         * camel-stream-mem.h (enum CamelStreamMemMode): Removed.  It
16878         wasn't used at all.
16879
16880         * camel-data-wrapper.h: Add camel_data_wrapper_new() to create
16881         these.
16882         (write_to_stream, construct_from_stream): Return an error
16883         indicator for success.  Fixed all methods to match (ICK).
16884
16885         * Makefile.am (libcamel_la_SOURCES): Remove
16886         camel-simple-data-wrapper.c, camel-simple-data-wrapper-stream.c,
16887         camel-stream-data-wrapper.c.  Obsoleted by code re-use!
16888
16889         * camel-data-wrapper.c (construct_from_stream): Change the default
16890         implementation to just set the output stream == construction
16891         stream.  Well, this lets me get rid of both simple-data-wrapper
16892         and stream-data-wrapper (unused anyway), and
16893         simple-data-wrapper-stream in one hit.  CamelDataWrapper is now
16894         also a concrete class.
16895         (write_to_stream): Use camel_stream_write_to_stream() to
16896         calculate/return values (and save code).
16897         Include <errno.h> for obvious reasons.
16898
16899         * camel-stream.c (eos): Provide a default implementation of .eos().
16900         (camel_stream_write_to_stream): Make it return an error code on
16901         error.
16902         (camel_stream_printf): Changed to return the number of bytes
16903         written/error.
16904         (camel_stream_available): Removed.
16905
16906         * camel-stream-fs.h (enum CamelStreamFsMode): Removed.  Changed to
16907         use unix modes and so forth (wasn't used for anything but new file
16908         creation and didn't work well either).
16909
16910         * camel-stream-fs.c: Removed leading _'s for names.  And removed
16911         some virtual method 'documentation'.
16912         (destroy): Dont try and close a closed/error fd.  Only report
16913         error if close returns -1.  Moved all the code to finalise(), and
16914         killed this function.
16915         (init_with_fd): Properly setup the seek offset, if it is a
16916         valid and seekable file descriptor.
16917         (init_with_fd_and_bounds): Use off_t for bounds, set bounds on the
16918         seekable stream.
16919         (init_with_name): Return error codes.
16920         (init_with_name_and_bounds): Ditto.
16921         (camel_stream_fs_new_with_name): REturn NULL object if it failed.
16922         (camel_stream_fs_new_with_name_and_bounds): Return NULL object on
16923         failure.  Changed with_name* api's to take unix open style args
16924         and flags.
16925         (read): The bounded stream bounds checking seemed off, simplified
16926         code a bit.
16927         (write): Implement bounds checking for writing, the comment was
16928         wrong, it could make sense to bound writing.  Cleaned up a little.
16929         (available): Gone.
16930         (eos): Removed.  Use CamelStream's implementation now.
16931         (close): Reset the fd to -1, provide a warning for bad usage.
16932         (seek): Cleaned up.  Changed the behaviour a little, the returned
16933         offset is the absolute position in the file, even in bounded
16934         streams.        
16935         (seek): Seek from end mirrors lseek() behaviour (reverse seeking).
16936
16937 2000-04-25  NotZed  <NotZed@HelixCode.com>
16938
16939         * camel-stream-fs.h (struct _CamelStreamFs): Moved bounds and eof
16940         indicator to other parent classes.
16941
16942         * camel-stream.c (camel_stream_printf): New utility
16943         function.  Obvious use.
16944
16945         * camel-stream-mem.c: Removed leading _'s from static func's.
16946         (camel_stream_mem_new_with_byte_array): Fixed for api changes, set
16947         the owner for the byte array to us.
16948         : Removed A bunch of gtk doc stuff for static (implementation) functions.
16949         (available): Removed.
16950         (write): Fixed the write implementation so that seek() works on a
16951         seekable memory stream, as expected.  Seeking past the end of the
16952         buffer has unix semantics (filling with 0).
16953         (available): Removed.
16954         (write): Implement seekable stream bounded stream.
16955         (read): Implement seekable stream bounded stream.
16956         (close): Dont free the stream_mem if we're not the owner.
16957         (seek): Allow to seek beyond the end of memory area,
16958         implement bounds checking.
16959         (seek): Set errno on bad policy.
16960
16961         * camel-stream-mem.h (struct _CamelStreamMem): Changed position to off_t.
16962         (new_with_buffer): Changed len to be a size_t.
16963         (set_buffer, set_byte_array): New interface functions.
16964         (struct _CamelStreamMem): Removed position, it is stored in the
16965         superclass.
16966
16967         * camel-stream.h: Removed some of the seemingly random
16968         whitespace.  Removed the available method (its not
16969         impelemented/useful enough).
16970
16971         * camel-seekable-substream.c
16972         (init_with_seekable_stream_and_bounds): Remove the data_available
16973         stuff, it hasn't been properly implemented/finished, and may never
16974         work (unfortunately *sigh).
16975         (reemit_parent_signal): Removed part of the above change.
16976         (set_bounds): Removed (moved to seekable-stream).
16977         : Fixed up some of the generally unreadable indenting (sorry,
16978         wrapping at 80 characters with
16979         camels_really_long_function_names()
16980         just_doesnt_work_very_well_does_it().
16981         (available): Removed.
16982         (stream_seek): Fixup for object changes.  Make sure we return -1
16983         if the parent stream can't seek.
16984
16985         * camel-seekable-stream.c (ccamel_seekable_stream_set_bounds): New
16986         function to bound any seekable stream.
16987         : Removed _'s.
16988         (camel_seekable_stream_class_init): Implement an init function, to
16989         setup the stream bounds to unbound.
16990
16991         * camel-seekable-stream.h (CamelSeekableStreamClass): New virtual
16992         method set_bounds for seekable streams.
16993         (CAMEL_STREAM_UNBOUND): New define for no bound.
16994
16995         * camel-seekable-substream.h (struct _CamelSeekableSubstream):
16996         Removed sup_bound and inf_bound, moved to CamelSeekableStream (and
16997         renamed, and changed to off_t's).
16998         (new_with_seekable_stream_and_bounds): Use off_t as the bounds.
16999         (CamelSeekableSubstreamClass): Uh, why was the intialiser virtual?
17000         Removed.
17001
17002         * camel-seekable-stream.[ch] (CamelSeekableStreamClass): Changed seek
17003         to accept an off_t as the offset.
17004         (struct _CamelSeekableStream): Renamed cur_pos to position and
17005         changed it to an off_t type.
17006         (enum CamelStreamSeekPolicy): Set to match the SEEK_* constants
17007         from lseek().
17008         (get_current_position): Renamed to tell().
17009
17010         * camel-stream-buffer.h: Commented out set_vbuf - never implemented.
17011
17012 2000-04-25  Dan Winship  <danw@helixcode.com>
17013
17014         * camel-stream-buffer.c (_eos): only return TRUE if the parent is
17015         at eos AND the buffer has been exhausted
17016
17017         * camel-mime-message.c: fix some incorrect macro usage that
17018         resulted in bogus casts
17019
17020 2000-04-24  Dan Winship  <danw@helixcode.com>
17021
17022         * camel-mime-part-utils.c
17023         (simple_data_wrapper_construct_from_parser): fix a cut-and-pasto.
17024
17025         * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): ref
17026         (and sink) the message stream if we're going to unref it later.
17027         Otherwise it could get destroyed while there are still substreams
17028         attached to it. This needs a cleaner solution.
17029
17030         * camel.h: remove data-wrapper-repository.h include(s)
17031
17032 2000-04-24  NotZed  <NotZed@HelixCode.com>
17033
17034         * camel-mime-message.c (construct_from_parser): Allow MESSAGE_END
17035         _or_ EOF as valid termination conditions.
17036
17037         * providers/mbox/camel-mbox-summary.c (message_struct_new): Decode
17038         and then re-encode the addresses, so they are consistently
17039         formatted.
17040
17041         * camel-mime-utils.c (header_decode_mailbox): Store the address in
17042         a _header_address.  And try to get a comment-stored name if there
17043         is one.
17044         (header_decode_address): Actually return an address.
17045         (header_to_decode): Renamed to header_address_decode()
17046         (header_mailbox_decode): New function to get a single mailbox.
17047         (header_mime_decode): Return the major/minor value, as
17048         appropriate.
17049         (header_address_new, and friends): Whole bunch of utility
17050         functions for working with the address thingies.
17051         (header_decode_domain): Free the string header, and dont expand
17052         '.' into ' . '.
17053
17054         * camel.c (camel_init): No longer call
17055         data_wrapper_repository_init.
17056
17057         * camel-medium.c (write_to_stream): Moved (back) to
17058         camel-mime-part.
17059         (add_header):
17060         (set_header):
17061         (remove_header): 
17062         (get_header): Make all these abstract, and spit warnings if
17063         called.  I guess it could manage the list, but well, it doesn't.
17064
17065         * camel-medium.h (struct _CamelMedium): Dont store headers here,
17066         the implementor is the only one who knows their format.
17067         (CamelMediumClass): Changed header values to be void *'s.  They
17068         need not be strings?
17069
17070         * camel-simple-data-wrapper.c (construct_from_stream): And we're
17071         back.  Set the output stream.
17072         (construct_from_parser): Moved to camel-mime-part-utils.
17073
17074         * camel-mime-part-utils.c
17075         (camel_mime_part_construct_content_from_parser): Create the
17076         contents of multipart and simple messages.
17077         (camel_mime_part_construct_content_from_parser): Oops, this was
17078         totally screwed up, try creating the right cotnent on the right
17079         object.
17080
17081         * camel-multipart.c (construct_from_parser): Moved to
17082         camel-mime-part-utils.
17083         (separate_part): Removed.
17084
17085         * camel-mime-part.c (construct_from_stream): Back again!  This now
17086         switches over to using a mime parser for any mime parts, only.
17087         (my_write_to_stream): Write our headers and so forth here.
17088         (add_header): Add header directly, parent class is abstract.
17089         (remove_header): Ditto.
17090         (set_header): Ditto.
17091
17092         * camel-data-wrapper.c (camel_data_wrapper_construct_from_stream):
17093         Remade abstract.
17094         (camel_data_wrapper_construct_from_parser): Moved to
17095         camel_mime_part.
17096
17097         * camel-data-wrapper.h: Put back construct_from_stream.
17098
17099         * camel-mime-part.h: Put construct_from_parser in here, the
17100         data-wrapper shouldn't know about mime.  Ok, so now to undo half
17101         of the last hours changes ... duh.
17102         
17103 2000-04-23  Dan Winship  <danw@helixcode.com>
17104
17105         * camel-mime-utils.c (header_to_decode, header_mime_decode): fix
17106         some obvious minor bugs noted by -Wall.
17107
17108 2000-04-23  NotZed  <NotZed@HelixCode.com>
17109
17110         * providers/pop3/camel-pop3-folder.c (get_message_by_number): Use
17111         construct_from_stream instead of set_input_stream().
17112
17113         * camel-simple-data-wrapper-stream.c
17114         (camel_simple_data_wrapper_stream_construct): REmoved the destroy
17115         callback code.
17116         (wrapper_destroy_cb): Removed.
17117
17118         * camel-simple-data-wrapper.h: Add prototype for _construct()
17119         method.
17120
17121         * camel.c: Include unicode.h to kill a warning.
17122
17123         * camel-data-wrapper.h (CameldataWrapperClass): Removed
17124         construct_from_stream virtual method.
17125         Removed get/set input stream.
17126
17127         * data-wrapper-repository.[ch]: Removed&from build.  Obsoleted?
17128         The justification as is follows: It is mixing storage
17129         protocol/format with message architecture.  It really just doesn't
17130         serve any purpose, as each medium implementor will have to have its
17131         own type->handler mapping, and the only current implementor,
17132         mimepart has a very simple structure and no need for this.
17133
17134         * camel-medium.c (write_to_stream): Moved here from most of the
17135         stuff in camel-mime-part.  Well, the MEDIUM is the one that knows
17136         what the headers are, and the content is, let it write it out.
17137
17138         * camel-mime-part-utils.c (camel_mime_part_construct_content):
17139         Copied from camel-mime-part.c, removed handling of message
17140         followon state (moved to camel-mime-message).
17141         (camel_mime_part_construct_content_from_parser): Renamed from
17142         construct_content.
17143         (camel_mime_part_construct_headers_from_stream):
17144         (camel_mime_part_construct_content_from_stream):
17145         (camel_mime_part_store_stream_in_buffer): Removed.  Replaced by
17146         the new construct from parser stuff.
17147
17148         * camel-mime-message.c (construct_from_parser): Do
17149         construct_from_parser for mime-message.
17150         (_write_to_stream): Set the mime-version header for medium to
17151         write out, rather than writing it out ourselves.
17152
17153         * camel-data-wrapper.c (set_mime_type_field): Ref the
17154         content_field when we get it?
17155         (construct_from_stream): Removed.
17156         (camel_data_wrapper_construct_from_stream): Changed to a helper
17157         function, creates a mime_parser, and constructs from that.
17158         (set_input_stream): Removed.
17159         (camel_data_wrapper_set_input_stream): Removed.
17160         (get_input_stream): Removed.
17161         (camel_data_wrapper_get_input_stream): Removed.
17162
17163         * camel-mime-parser.c (camel_mime_parser_unstep): New function.
17164         Cause a subsequent call to mime_parser_step() to return the same
17165         state over again.
17166
17167         * providers/mbox/camel-mbox-folder.c (_get_message_by_uid):
17168         Initial test code using the mime parser to construct the message.
17169         (_get_message_by_uid): Use construct_from_stream() instead of
17170         creating our own parser.
17171
17172         * camel-mime-part.c (construct_from_parser): part constructor.
17173         (camel_mime_part_construct_content): Basically a simpler
17174         replacement for the datawrapper repository.
17175         (camel_mime_part_init): Set the default type to text/plain.
17176         (camel_mime_part_construct_content): Removed to
17177         camel-mime-part-utils.c
17178         (my_get_output_stream): Removed.  The streeam is in the
17179         data-wrapper.
17180         (my_get_content_object): Removed.  The content object is stored in
17181         the medium.  If none is there, the object wasn't created properly.
17182         (my_write_content_to_stream): Removed.  The content object is the
17183         one that knows how to write itself out!!!!!!!!
17184         (my_write_to_stream): Remove the base header writing stuff - has
17185         been moved to camel-medium, where it belongs.  This can just be
17186         used to check for mandatory headers.
17187         (my_construct_from_stream): Removed.
17188         (my_set_input_stream): What the hell, i'll remove this too.
17189         Nobody seems to understand how it differs from create from stream,
17190         and they both seem to serve the same purpose ...
17191
17192         * camel-simple-data-wrapper.c (construct_from_parser): Initial
17193         implementation of a content constructor.
17194         (construct_from_stream): Removed!  Job taken over by
17195         construct_from_parser.
17196
17197         * camel-multipart.c (construct_from_parser): Multipart
17198         construction routine.
17199         (camel_multipart_init): Set the default multipart type to
17200         multipart/mixed.  Duh, no subtype is not allowed anyway.
17201         (set_input_stream): REmoved.  Replaced by construct_from_parser.
17202
17203 2000-04-22  Dan Winship  <danw@helixcode.com>
17204
17205         * camel-multipart.[ch]: clean, document, etc.
17206         (camel_multipart_init): pick a prettier default boundary. Still
17207         need to deal with the larger problem
17208
17209 2000-04-22  NotZed  <NotZed@HelixCode.com>
17210
17211         * camel-mime-message.h (struct _CamelMimeMessage): Removed
17212         send_date, and received_date, and replaced it with a time_t
17213         'date' (this is what the header is called), and date_offset to
17214         store the GMT offset of the date.
17215
17216         * camel-mime-message.c (camel_mime_message_set_from): Update raw
17217         header as we go.
17218         (_set_from): Removed.
17219         (_get_from): Removed.
17220         (camel_mime_message_get_from): Moved implementation here.
17221         (camel_mime_message_get_subject): Move implementation here.
17222         (_get_subject): Nuked.
17223         (camel_mime_message_set_subject): Handle utf-8 input, and also
17224         update raw header when changed.
17225         (_set_subject): Removed.
17226         (_set_received_date): Removed.
17227         (camel_mime_message_set_received_date): Removed.
17228         (_get_received_date): Removed.
17229         (camel_mime_message_get_received_date): Removed.
17230         (_get_sent_date): Removed.
17231         (camel_mime_message_get_sent_date): Removed.
17232         (camel_mime_message_get_date): New function to get the date as a
17233         time_t/offset.
17234         (camel_mime_message_set_date): Set the date as a time_t/offset.
17235         (camel_mime_message_get_date_string): Get the date as a string.
17236         (camel_mime_message_init): Initialise the current date as
17237         'CMAEL_MESSAGE_DATE_CURRENT'.
17238         (_set_reply_to): Removed.
17239         (camel_mime_message_set_reply_to): Moved implementation here.
17240         This is still broken, reply-to can have multiple addresses.
17241         (_get_reply_to): Removed.
17242         (_set_field): Removed, no longer used anywhere.
17243         (_get_field): Also removed.
17244         (_init_header_name_table): Add the Date header.
17245         (process_header): Also handle snooping of Date header here.
17246
17247         * camel-stream-filter.c (finalise): Unref the source stream on
17248         finalise, and also call the parent class (oops).
17249
17250         * camel-mime-parser.c (camel_mime_parser_state): New function to
17251         get the current parser state.
17252         (camel_mime_parser_stream): Allow you to get the stream back from
17253         the mime_parser.
17254         (camel_mime_parser_fd): Alternative to allow you to get the fd
17255         back from the mime_parser.
17256         (folder_scan_init_with_stream): Properly ref/unref the stream.
17257         (folder_scan_close): Properly unref the stream/close the fd on
17258         exit.
17259         (folder_scan_init_with_fd): Close the old fd if there is one.
17260
17261         * camel-data-wrapper.c (camel_data_wrapper_construct_from_parser):
17262         New method, construct a data wrapper from an initialised parser.
17263         (construct_from_parser): Empty implementation.
17264         
17265         * providers/mbox/camel-mbox-summary.c (message_struct_new):
17266         Convert subject line to unicode, before storing in the summary.
17267         (strdup_trim): Removed, no longer needed.
17268
17269         * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): Ref
17270         the folder after setting it in the new message.
17271
17272         * camel-mime-part.c (my_set_content_object): Have the headers
17273         follow the content-type change here too.
17274         (my_write_to_stream): Dont write content-type here, automatically
17275         stored in the headers ...
17276         (my_write_to_stream): Use header_disposition_format() to format
17277         the content-disposition header.
17278         (my_write_to_stream): Removed old code, all headers are now stored
17279         in the camel-medium level, always.  Need to do the same with
17280         camel-mime-message i suppose ...
17281         (my_write_to_stream): Write the content using the parent class,
17282         not some weird function.
17283         (camel_mime_part_class_init): Dont override get_output_stream.
17284         (camel_mime_part_encoding_from_string): Bleh, make it
17285         case-insensitive.
17286
17287         * camel-mime-utils.c (header_content_type_is): Handle empty types.
17288         (header_encode_string): Start of an implementation of the rfc2047
17289         encoder.  It does iso-8859-1, and us-ascii, and utf-8 (others get
17290         tricky *sigh*)
17291         (rfc2047_encode_word): Convert a single word/string into rfc2047
17292         encoding.
17293         (quoted_encode): Different quoted-printable encoding for rfc2047
17294         encoding of headers.
17295
17296         * gmime-content-field.c (gmime_content_field_write_to_stream): Use
17297         header_content_type_format() to format it.
17298
17299 2000-04-21  NotZed  <NotZed@HelixCode.com>
17300
17301         * camel-mime-utils.h: Add prototype for header_param_list_free.
17302
17303         * camel-recipient.c: New function to remove all the types of a
17304         recipient list.  I think this whole object needs a major review.
17305
17306         * camel-mime-message.c (camel_mime_message_class_init): Removed
17307         parse_header_pair override, override add_header instead.
17308         (_parse_header_pair): Renamed to add_header.
17309         (remove_header): Add this method, to make sure we keep upto date
17310         with removed headers too.
17311         (_set_field): If given a NULL value, clear it out.
17312         (_set_recipient_list_from_string): Constify.
17313         (set_header): Override set_header from camel_medium.
17314         (process_header): Local function to handle set/add/remove of each
17315         header we know about.
17316
17317         * camel-mime-part.c (camel_mime_part_class_init): Removed
17318         parse_header_pair setup.
17319         (my_parse_header_pair): Moved into add_header(), removed.
17320         (my_set_disposition): Allow a NULL disposition to clear it.
17321         (my_set_content_id): Allow NULL content id to clear it.
17322         (remove_header): Track removed headers.
17323         (my_set_description): Allow NULL description to clear it.
17324         (my_set_content_MD5): Make sure we copy the md5 value, and allow a
17325         NULL value to reset it.
17326         (my_set_filename): Copy the filename.
17327         (my_set_header_lines): Removed.  Nothing uses it, it doesn't
17328         actually serve any purpose.
17329         (camel_mime_part_set_header_lines): Ditto.
17330         (my_get_header_lines): Ditto.
17331         (camel_mime_part_get_header_lines): Ditto.
17332         (camel_mime_part_class_init): Remove *_header_lines setup.
17333         (camel_mime_part_init): Remove header_lines init.
17334         (my_finalize): Remove header_lines finalise.
17335         (my_write_to_stream): Write the headers here.  This is just WRONG,
17336         camel_medium should be doing this.
17337         (my_get_output_stream): Kill a warning.
17338         (camel_mime_part_encoding_to_string): Ditto.
17339         (camel_mime_part_set_description): Unvirtualiase, use add_header()
17340         to do the processing.
17341         (my_set_description): Removed.
17342         (set_disposition): Renamed from my_set_disposition.
17343         (camel_mime_part_get_description): Get the descriptionf rom the
17344         get_header method.
17345         (my_get_description): Removed.
17346         (my_set_filename): Removed.
17347         (camel_mime_part_get_filename): Get the parameter from the
17348         disposition.
17349         (camel_mime_part_encoding_from_string): Handle NULL string.
17350         (camel_mime_part_init): Remove reference to filename.
17351         (my_finalize): Dont free filename.
17352
17353         * camel-mime-part.h (CamelMimePartClass): Removed
17354         parse_header_pair() method, it doesn't add anything that
17355         add_header() can't be used for.
17356         (CamelMimePartClass): Remove *_header_lines methods.
17357         (struct _CamelMimePart): Remove header_lines list.
17358         (struct _CamelMimePart): Removed filename attribute.
17359
17360         * camel-medium.c (camel_medium_init): Init headers to null, not a
17361         hashtable.
17362         (add_header): Append the headers as a list.
17363         (remove_header): Remove headers as a list.
17364         (get_header): Likewise for lookup.
17365         (free_header): Removed, no longer needed.
17366         (finalize): Free headers using header_raw_clear().
17367         (camel_medium_set_header): New function, to reset and override all
17368         values of a header with a new value.
17369
17370         * camel-medium.h (struct _CamelMedium): Changed to use a
17371         header_raw struct rather than a hash table, to store headers
17372         (many headers can occur multiple times).
17373
17374         * camel-mime-utils.c (header_raw_find_next): New function, allows
17375         you to find multi-valued header fields.
17376         (header_disposition_format): New function to format/create
17377         content-disposition header string.
17378         (header_param_list_format_append): Function to format parameter
17379         lists into a GString.
17380         (header_content_type_format): Function to format content-type into
17381         a usable format.
17382         (header_set_param): allow NULL value to remove the parameter.
17383         (decode_token): Renamed from header_decode_token.
17384         (header_decode_token): New interface for external use.
17385         (quoted_decode): Made static to kill annoying warnings.
17386         (g_strdup_len): Killed, replaced with calls to g_strndup().
17387         (rfc2047_decode_word): Made static to kill warnings.
17388         (decode_coded_string): Terminated.
17389         (g_string_append_len): Made static to kill warnings.
17390         (header_decode_text): Made static to kill warnings.
17391         (header_decode_text): Constify.
17392         (rfc2047_decode_word): Constify.
17393         (header_param): Constify.
17394         (header_content_type_new): Copy the type/subtype strings.
17395         (header_param_list_decode): Made static.
17396         (header_param_list_format_append): Made static.
17397         (quoted_decode): Constify.
17398         (g_string_append_len): Constify.
17399         (header_token_decode): New function to decode a single token.
17400
17401         * providers/mbox/camel-mbox-summary.c (header_write): Append a
17402         trailing \n when writing headers.
17403         (strdup_trim): Killed a warning.
17404         (camel_mbox_summary_set_uid): Make sure the next uid is at least 1
17405         higher than any existing one.
17406         (header_evolution_decode): Use header_token_decode to get the
17407         token.
17408
17409         * camel-mime-parser.c (folder_scan_header): Strip the trailing \n
17410         of the end of all header lines.
17411
17412 2000-04-20  NotZed  <NotZed@HelixCode.com>
17413
17414         * providers/mbox/camel-mbox-utils.[ch]: Removed.
17415
17416         * providers/mbox/camel-mbox-parser.[ch]: Removed.  Removed
17417         references to it.
17418
17419 2000-04-20  Dan Winship  <danw@helixcode.com>
17420
17421         * camel-mime-utils.c (rfc2047_decode_word): use libunicode iconv
17422         functions rather than libc ones (since libc might not have them).
17423         (header_decode_date): add autoconfiscation on timezone code
17424
17425         * camel.c (camel_init): call unicode_init ()
17426
17427 2000-04-20  NotZed  <NotZed@HelixCode.com>
17428
17429         * providers/mbox/camel-mbox-summary.c (message_struct_new): Trim
17430         leading/trailing spaces off the raw headers.
17431
17432         * MERGE NEW_PARSER branch into HEAD, fixed conflicts.
17433         
17434         * gmime-content-field.c (_print_parameter): Duh, removed again
17435         (@@#$@ cvs merge).
17436
17437         * camel-mime-utils.c (header_content_type_is): Constify.
17438         (header_content_type_unref): Killed a couple warnings.
17439
17440         * camel-folder.c (_init): Removed more log crap.
17441
17442         * providers/Makefile.am (SUBDIRS): Removed nntp, pending fixes for
17443         summary changes.
17444
17445         * providers/mbox/camel-mbox-folder.c (_get_message_by_number):
17446         Fixed for new summary interface.  Added a warning for using this
17447         broken api.
17448         (_get_message_by_uid): Fixed for message new with session
17449         vanishing.
17450
17451 2000-04-19  Dan Winship  <danw@helixcode.com>
17452
17453         * camel-simple-data-wrapper-stream.c
17454         (camel_simple_data_wrapper_stream_get_type): This is a subtype of
17455         CamelSeekableStream, not CamelStream.
17456
17457         * camel-seekable-substream.c: clean up a lot.
17458         (eos): When testing for end-of-stream, reset the parent position
17459         before testing if it is at end-of-stream, since either (a) it may
17460         have been seek'ed to eos by someone else, or (b) we may have been
17461         seek'ed away from eos and it hasn't been synced yet.
17462
17463         * camel-medium.[ch] (camel_medium_add_header): const poison.
17464         (Belatedly goes with my change of 2000-02-23.)
17465         (camel_medium_init): Use g_strcase_{hash,equal} on the header
17466         array.
17467         
17468 2000-04-18  Dan Winship  <danw@helixcode.com>
17469
17470         * camel-mime-part.c (my_set_input_stream): 
17471         * camel-data-wrapper.c (set_input_stream, set_output_stream): do
17472         better reference counting of streams so they actually go away
17473         when they should.
17474
17475         * camel-log.[ch], *: Nuke camel log stuff. Replace calls to
17476         CAMEL_LOG_WARNING with calls to g_warning.
17477
17478         * camel-data-wrapper.[ch]:
17479         * camel-simple-data-wrapper.[ch]:
17480         * camel-medium.[ch]: Clean, polish, document. Most of the gtk-doc
17481         comments added to camel-data-wrapper.c note serious problems that
17482         need to be fixed.
17483
17484 2000-04-17  Dan Winship  <danw@helixcode.com>
17485
17486         * camel-mime-message.[ch]: Remove the "session" field from
17487         CamelMimeMessage. Nothing uses it, about half of the existing
17488         calls to camel_mime_message_new_with_session pass NULL, and
17489         there's no obvious reason for it to be there.
17490
17491         * providers/MH/camel-mh-folder.c:
17492         * providers/maildir/camel-maildir-folder.c:
17493         * providers/mbox/camel-mbox-folder.c:
17494         * providers/mbox/camel-mbox-utils.c:
17495         * providers/nntp/camel-nntp-folder.c:
17496         * providers/pop3/camel-pop3-folder.c: Use camel_mime_message_new
17497         instead of camel_mime_message_new_with_session.
17498
17499         * camel-session.c (get_store_for_protocol_with_url): Set the
17500         exception if no provider is found.
17501
17502         * camel-url.c: Add code to encode and decode %-escapes in URLs,
17503         and do some additional correctness-checking on URL syntax. From
17504         Tiago Antào with modifications by me.
17505
17506 2000-04-14  Chris Toshok  <toshok@helixcode.com>
17507
17508         * providers/Makefile.am (SUBDIRS): add nntp
17509
17510 2000-04-14  Christopher James Lahey  <clahey@helixcode.com>
17511
17512         * providers/mbox/camel-mbox-folder.c: Fix switch statement.
17513
17514 2000-04-14  Chris Toshok  <toshok@helixcode.com>
17515
17516         * providers/nntp/camel-nntp-folder.c (_exists): always return TRUE
17517         for now.  we need to check the server response to make sure the
17518         group exists.
17519         (_get_message_by_uid): make sure to account for the \n we add to
17520         the string after every line.
17521
17522         * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): function
17523         to get the headers using the XOVER command.
17524         (get_HEAD_headers): function to get the headers using the HEAD
17525         command on each message. slooooooow.
17526         (camel_nntp_get_headers): make this function use either XOVER or HEAD
17527         versions depending on whether or not the server extension is present.
17528
17529 2000-04-14  Dan Winship  <danw@helixcode.com>
17530
17531         * camel-formatter.[ch]: This didn't belong in Camel. Move to mail/
17532
17533         * Makefile.am, camel-types.h: remove references to
17534         camel-formatter.
17535
17536 2000-04-12  Matt Loper  <matt@helixcode.com>
17537
17538         * camel-folder-pt-proxy.c (_folder_open_cb): Print warning message
17539         for broken function.
17540         (_folder_close_cb): Same.
17541
17542 2000-04-12  Miguel de Icaza  <miguel@gnu.org>
17543
17544         * Makefile.am (pthread_SRC): Use correct names for the pthread
17545         source variables.
17546
17547 2000-04-10  Dan Winship  <danw@helixcode.com>
17548
17549         * providers/pop3/camel-pop3-store.c (pop3_connect): fix various
17550         bugs in APOP code (still untested) and some of the error cases.
17551
17552         * camel-provider.h: Clarify what provider.protocol, provider.name,
17553         and provider.description should be.
17554
17555         * providers/mbox/camel-mbox-provider.c: 
17556         * providers/pop3/camel-pop3-provider.c: 
17557         * providers/sendmail/camel-sendmail-provider.c: 
17558         * providers/smtp/camel-smtp-provider.c: update protocols, names,
17559         and descriptions
17560
17561         * providers/mbox/camel-mbox-folder.c (_get_message_by_number):
17562         implement get_message_by_number for the mail fetch code.
17563
17564 2000-04-09  Jeffrey Stedfast  <fejj@stampede.org>
17565
17566         * providers/smtp/camel-smtp-transport.c: reformatted to fit
17567         the standard indent format used by helix code
17568
17569 2000-04-09  Dan Winship  <danw@helixcode.com>
17570
17571         * camel-movemail.c: New file with new function to dot-lock an mbox
17572         file and copy it to a safe private directory.
17573
17574 2000-04-08  Christopher James Lahey  <clahey@helixcode.com>
17575
17576         * providers/smtp/.cvsignore: Added a .cvsignore file.
17577
17578 2000-04-08  Dan Winship  <danw@helixcode.com>
17579
17580         * providers/sendmail/camel-sendmail-transport.c (_send_internal):
17581         actually record the pid returned by fork(). Noticed by clahey.
17582
17583         * providers/smtp/camel-smtp-transport.c: #include <sys/param.h>
17584         for MAXHOSTNAMELEN. (This is a stopgap: some of the uses of
17585         MAXHOSTNAMELEN are wrong anyway...)
17586
17587 2000-04-07  Jeffrey Stedfast  <fejj@stampede.org>
17588
17589         * providers/smtp/camel-smtp-transport.c: fixes to numerous bugs;
17590         should now build fine.
17591         * providers/Makefile.am: Readded smtp now that smtp builds without
17592         error.
17593
17594 2000-04-20  NotZed  <NotZed@HelixCode.com>
17595
17596         * providers/mbox/camel-mbox-summary.c
17597         (camel_mbox_summary_next_uid): Public function to get the next
17598         uid, makes sure its saved to disk too.
17599
17600         * camel-mime-part.c (my_finalize): Fix disposition crap with a
17601         real disposition.
17602         (my_set_disposition): Likewise.
17603         (my_get_disposition): And here.
17604         (my_write_to_stream): And here, needs more cleanup.
17605
17606         * providers/mbox/camel-mbox-folder.c (_append_message): Assign a
17607         new uid at this point.
17608
17609         * gmime-content-field.c (gmime_content_field_write_to_stream):
17610         Make something up if we have an invalid/missing content type
17611         (i.e. text/plain).
17612
17613 2000-04-19  NotZed  <NotZed@HelixCode.com>
17614
17615         * providers/mbox/camel-mbox-folder.c (_delete): Fixed completely
17616         broken switch() syntax, only compiled because errno is a macro on
17617         some systems.
17618         (_list_subfolders): Likewise.
17619
17620 2000-04-18  NotZed  <NotZed@HelixCode.com>
17621
17622         * camel-mime-parser.c (folder_scan_init): init stream to null.
17623
17624         * providers/mbox/camel-mbox-summary.c
17625         (CAMEL_MBOX_SUMMARY_VERSION): Moved to .c file, incremented.
17626         (index_folder): Changed to have index passed via the summary.
17627         (decode_string): Do a sanity check on the string size, so we dont
17628         visit g_malloc()'s friendly abort().
17629
17630         * camel-folder-pt-proxy.c (camel_folder_pt_proxy_class_init):
17631         Removed reference to set_name.
17632         (_set_name): Removed.
17633
17634         * providers/mbox/camel-mbox-utils.c
17635         (parsed_information_to_mbox_summary): Removed.  Most of this file
17636         is about to be binned.
17637
17638         * providers/mbox/camel-mbox-search.c (func_header_contains): Fixes
17639         for changes to summary interface.
17640         (struct _searchcontext): Remove pointer to message info, get it
17641         straight from the mboxsummary.
17642         (camel_mbox_folder_search_by_expression): New summary interface.
17643         (camel_mbox_folder_search_by_expression): Uh, the summary is not
17644         an object anymore (well not yet).
17645
17646         * providers/mbox/camel-mbox-folder.c
17647         (camel_mbox_folder_class_init): Removed set_name init.
17648         (_set_name): Removed.
17649         (_open): Call new summary interface.
17650         (_close): Use new summary interface.
17651         (_create): Removed a summary object leak.
17652         (_get_message_count): New summary interface.
17653         (_get_uid_list): Use new summary interface. FIXME: this is leaky.
17654         (_get_message_by_uid): Use the new summary interface, some
17655         cleanup.
17656         (_append_message): Totally changed, basically just appends the
17657         message directly, ignores the summary (for now), the summary will
17658         fix itself up if it needs to.
17659         (_check_get_or_maybe_generate_summary_file): Bye bye old code.
17660         (summary_get_message_info): Implement get_message_info again, for
17661         folder.
17662
17663         * camel-folder.c (camel_folder_class_init): Removed set_name
17664         setup.
17665         (_set_name): Moved contents into _init.
17666         (_init): Perform the old functions of set_name here.
17667
17668         * camel-folder.h: Removed the set_name internal interface.
17669
17670 2000-04-14  NotZed  <NotZed@HelixCode.com>
17671
17672         * providers/mbox/camel-mbox-summary.[ch]: Completely replaced with
17673         new code.
17674
17675         * Makefile.am (libcamel_la_SOURCES): Removed
17676         camel-folder-summary.[ch].
17677
17678         * camel-folder.h (struct _CamelFolder): Removed summary.
17679         (struct _CamelFolder): Changed flags to be 1 bit bitfields.
17680
17681         * camel-folder-summary.[ch]: Class removed entirely.
17682
17683         * camel-folder.c (camel_folder_get_summary): Removed.
17684         (camel_folder_summary_get_message_info): Moved from
17685         camel-folder-summary.c
17686         (camel_folder_summary_get_subfolder_info): Moved from
17687         camel-folder-summary.c
17688
17689         * camel-mime-parser.c (folder_scan_step): Store the start of
17690         headers and start of from in the scan state.
17691         (camel_mime_parser_tell_start_headers): Query the start of the
17692         headers.
17693         (camel_mime_parser_tell_start_from): Query the cached start of
17694         from marker.
17695
17696 2000-04-13  NotZed  <NotZed@HelixCode.com>
17697
17698         * gmime-content-field.c (gmime_content_field_free): Removed this
17699         function.  If its too dangerous to use, it shouldn't be here.
17700         (gmime_content_field_ref): Also ref the embedded content-type.
17701         (gmime_content_field_unref): Ditto to unref it.
17702
17703         * camel-mime-utils.h: Add a refcount for content-type header.
17704
17705         * camel-mime-utils.c (header_content_type_unref): Implement unref
17706         for content-type.
17707         (header_content_type_ref): Implement ref for header content type.
17708
17709 2000-04-12  NotZed  <NotZed@HelixCode.com>
17710
17711         * gmime-content-field.h: Changed to use a _header_content_type.
17712         Added type/subtype back for compatability with clients.
17713         
17714         * gmime-content-field.c: Basically a total rewrite, and now just a
17715         thin wrapper ontop of header_content_type.
17716         (_free_parameter): Got rid of it.
17717         (gmime_content_field_new): Use header_content_type_* functions.
17718         (gmime_content_field_set_parameter): Likewise.
17719         (_print_parameter): Blow away.
17720         (gmime_content_field_write_to_stream): Get details from the
17721         content_type field.  Should check if it needs to escape chars in
17722         the paramter value.
17723         (gmime_content_field_get_mime_type): Likewise.
17724         (___debug_print_parameter): Get rid of this rather annoyingly
17725         named function.
17726         (gmime_content_field_get_parameter): Simplified function.
17727         (gmime_content_field_construct_from_string): Fixed this to use a
17728         real parser.
17729         (gmime_content_field_is_type): New function to test if a type matches.
17730         (gmime_content_field_construct_from_string): Track type/subtype
17731         from subordinate content_type header struct.
17732
17733         * gmime-rfc2047.[ch]: Removed.  Unused.
17734
17735         * camel-stream-b64.[ch]: Blown away more duplicated code.
17736
17737         * Makefile.am: Removed camel-stream-b64.[ch], and
17738         gmime-base64.[ch].
17739
17740         * camel-mime-part.c (my_get_content_object): Replaced
17741         camel-stream-b64 with camel-stream-filter/camel-mime-filter-basic.
17742         (my_write_content_to_stream): Replaced camel-stream-b64 with the
17743         camel-stream-filter with an encoder.
17744         (my_get_content_object): Also implement quoted-printable decoding.
17745         (my_write_content_to_stream): Also implement quoted-printable
17746         encoding.
17747         (my_get_output_stream): Took out stream-b64 code (nothing's being
17748         executed yet anyway).
17749
17750         * gmime-base64.[ch]: Blown away.  Not used, dont need it.
17751
17752         * camel-mime-utils.h: Added offset for this header.  Records where
17753         it is in the source.
17754
17755         * camel-mime-utils.c (header_raw_append_parse): Add offset
17756         parameter, to store where the header is stored in the stream.
17757         (header_raw_append): Added offset param.
17758         (header_raw_find): Return offset, if a pointer supplied for it.
17759         (header_raw_replace): Add offset param.
17760         (header_content_type_new): New function, to create an empty
17761         content type.
17762         (header_content_type_set_param): Set a parameter in the
17763         content-type.
17764         (header_set_param): Generic header parameter setting function.
17765         (header_decode_string): Handle NULL input.
17766
17767         * camel-mime-parser.c (camel_mime_parser_headers_raw): New
17768         function to get access to all the raw headers.
17769         (folder_scan_header): Keep track of the header start position, and
17770         store it when saving the header.
17771
17772 2000-04-11  NotZed  <NotZed@HelixCode.com>
17773
17774         * camel-mime-utils.c: Moved a bunch of printf's to debug.
17775
17776         * camel-mime-parser.c: Moved a bunch of printf's to debug.
17777         (folder_scan_header): Detect end of each header line using the
17778         last scanned char, and not the last scanned position.
17779
17780         * camel-mime-filter-index.[ch]: Indexing filter.  Indexes unicode
17781         sequences into ibex files.
17782
17783 2000-04-09  NotZed  <NotZed@HelixCode.com>
17784
17785         * camel-mime-part.c: Dont include gmime-base64.h
17786
17787         * camel-mime-filter-charset.c (complete): Implement the completion
17788         function.
17789
17790         * camel-mime-parser.c (folder_scan_step): If we get to the end of
17791         the body data, check any filters for outstanding completion data.
17792         (camel_mime_parser_scan_from): Set whether we scan for "From "
17793         headers or not.
17794
17795         * camel-stream-filter.c (do_read): If we get to end of stream on
17796         the source, then call the filtering completion function to see if
17797         we have any more data to return.
17798
17799         * camel-mime-filter-basic.c (filter): Implement quoted printable
17800         encoding and decoding filters.
17801         (complete): And the complete function as well.
17802
17803         * camel-mime-utils.c (base64_encode_close): Also take an input
17804         buffer, allow closing of filters.
17805         (quoted_encode_step): First cut, simple quoted-printable encoder.
17806         Doesn't handle trailing spaces/tabs on end of line properly yet.
17807         (quoted_encode_close): Complete a quoted-encoding.
17808         (is_qpsafe): New type check, for quoted-printable safe characters
17809         (that do not need encoding).  Thats all bits used in the type
17810         table!  Rebuilt the types table.
17811         (header_content_type_is): Checks a content type against at
17812         type/subtype match.
17813         (header_content_type_param): Handle NULL content type pointer.
17814
17815 2000-04-08  NotZed  <NotZed@HelixCode.com>
17816
17817         * camel-mime-filter-basic.c (filter): Implement the base64
17818         encoder.  Problem is, there is no way to know when to close it.
17819         Close/Reset will have to provide the same args as filter, so it can
17820         flush remaining data *sigh*
17821
17822         * camel-mime-utils.c (base64_encode_step): A rather complex base64
17823         encoder, fast?
17824         (base64_step_close): Companion function to finish off the base64
17825         sequence.
17826
17827         * camel-mime-part.c (my_write_content_to_stream): Changed to use
17828         camel_stream_write_to_stream().
17829
17830         * camel-stream.[ch] (camel_stream_write_to_stream): From
17831         camel_stream_b64_write_to_stream().  Fixed some infinite loop
17832         bugs with error conditions.
17833
17834         * camel-stream-b64.[ch] (camel_stream_b64_write_to_stream): Removed.
17835         This has nothing to do with stream-b64, so i've moved it to
17836         CamelStream.
17837
17838         * camel-mime-utils.h: Add a comment about refcounting
17839         header_content_type struct.
17840
17841         * Makefile.am: Added camel-stream-filter*.[ch].
17842
17843         * camel-stream-filter.[ch]: Class to implement a generic
17844         (multipass) filter ontop of a stream.  Only implements a read-only
17845         stream.
17846
17847         * camel-mime-parser.c (camel_mime_parser_filter_add): Ref the
17848         filter we just added.
17849
17850         * Makefile.am: Added camel-mime-filter*.[ch].
17851
17852         * camel-mime-filter-charset.[ch]: A filter to preform character set
17853         conversion (uses unicode_iconv).
17854
17855         * camel-mime-filter-save.[ch]: A simple filter which will save all
17856         data directly to a file or file descriptor.
17857
17858         * camel-mime-filter-basic.[ch]: Implements the basic mime filters,
17859         base64 and quoted-printable decoding (encoding not implemented yet).
17860
17861         * camel-mime-filter.[ch]: A filtering class, which can filter streams
17862         of data without having to copy them.  Simpler than stream classes,
17863         and can be plugged into a single stream class (when i write it).
17864
17865 2000-04-07  Dan Winship  <danw@helixcode.com>
17866
17867         * providers/pop3/camel-pop3-store.c (pop3_connect): Clarify error
17868         messages.
17869         (finalize): fix a bug in camel_exception usage
17870         (pop3_connect): Remember the password after asking for it the
17871         first time.
17872
17873 2000-04-07  NotZed  <NotZed@HelixCode.com>
17874
17875         * Makefile.am: Added camel-mime-parser/camel-mime-utils.
17876
17877         * camel-mime-parser.c: Fast mime parser.
17878
17879         * camel-mime-utils.c: Mime utility functions, and email header
17880         parsers.
17881
17882 2000-04-07  NotZed  <NotZed@HelixCode.com>
17883
17884         * providers/Makefile.am: Removed smtp for now, its a long way from
17885         building.
17886         * providers/smtp/Makefile.in: Removed file that shouldn't have been
17887         checked in.
17888
17889 2000-04-06  Matt Loper  <matt@helixcode.com>
17890
17891         * camel-folder-pt-proxy.c (_get_full_name): Remove exception param
17892         from get_full_name() called, since get_full_name() was changed to
17893         not have an exception in the last param (see dan's notes below).
17894         (_get_name): same.
17895
17896 2000-04-06  Dan Winship  <danw@helixcode.com>
17897
17898         * camel-store.[ch]: Reorganize the folder-fetching methods and
17899         implement a folder cache so that multiple requests for the same
17900         folder will yield the same CamelFolder object (as long as it
17901         remains active). Includes some code to remove no-longer-active
17902         folders from the cache, but it doesn't get used since nothing is
17903         ever unref'ed in Camel right now...
17904         
17905         * providers/mbox/camel-mbox-store.c:
17906         * providers/pop3/camel-pop3-store.c: update for CamelStore
17907         changes.
17908
17909         * camel-folder.[ch]: Remove the (unused) CamelException argument
17910         from camel_folder_get_name and camel_folder_get_full_name.
17911         (camel_folder_set_name): make this go away since changing a
17912         folder's name after it has been created could result in it
17913         conflicting with a separately-issued folder.
17914         
17915 2000-04-05  Dan Winship  <danw@helixcode.com>
17916
17917         * g_url_new really wanted to take a CamelException. So, rename
17918         Gurl to CamelURL, g_url_* to camel_url_* (with camel_url_new
17919         taking an exception), and url-util.[ch] to camel-url.[ch]. Also
17920         force url->port to be numeric and remove camel_service_getport. (I
17921         was confused before: the URL RFC says the port must be numeric, so
17922         we don't want to do getportbyname.)
17923
17924 2000-04-01  Dan Winship  <danw@helixcode.com>
17925
17926         * providers/mbox/camel-mbox-folder.c
17927         (_check_get_or_maybe_generate_summary_file): Compare
17928         mbox_file_size and mbox_modtime to the results of stat()ing the
17929         mbox file, not the summary file. Duh.
17930         (_close): Update the summary's mbox_file_size and mbox_modtime
17931         before writing it to disk.
17932
17933         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_save,
17934         camel_mbox_summary_load): Wow. I must have been tired when I wrote
17935         this code. First, the comparison bug above. Second, it was using
17936         ntohs and htons instead of ntohl and htonl. Third, I was reading
17937         the status flag byte in two different places and thus getting out
17938         of sync. Fourth, it was writing out field_length bytes of each
17939         header field after having converted field_length to network byte
17940         order, resulting in lots of random crap being appended, and the
17941         summary files being huge. (Fortunately, since the size/modtime
17942         comparison was biffed, the garbage summary read from disk was
17943         always immediately discarded.)
17944
17945         * providers/mbox/camel-mbox-parser.c (camel_mbox_parse_file): fix
17946         an off-by-one error that caused the last-used UID to be reused if
17947         the summary file was regenerated. (That one wasn't my fault. :-)
17948
17949 2000-03-31  Dan Winship  <danw@helixcode.com>
17950
17951         * camel-stream-mem.c: implement unimplemented methods
17952
17953         * gmime-content-field.c
17954         (gmime_content_field_construct_from_string):
17955         * data-wrapper-repository.c
17956         (data_wrapper_repository_get_data_wrapper_type):
17957         * camel-simple-data-wrapper.c (my_write_to_stream):
17958         * camel-mime-part.c (my_set_input_stream):
17959         remove debugging printf()s that no longer seem useful.
17960
17961 2000-03-31  Matt Loper  <matt@helixcode.com>
17962
17963         * camel-formatter.c (text_to_html): Added "convert_newlines_to_br"
17964         boolean param, to give the option of not converting '\n's to <br>
17965         tags. This way, when we stick stuff in a <pre> tag, newlines stay
17966         newlines.
17967
17968 2000-03-30  Matt Loper  <matt@helixcode.com>
17969
17970         * camel-formatter.c (handle_text_plain): Use <pre> tag to force
17971         the use of monospaced fonts.
17972
17973 2000-03-30  Dan Winship  <danw@helixcode.com>
17974
17975         * camel-service.c (camel_service_getport): Add a htons in the
17976         default_number case, and document the fact that the function
17977         returns the port in network byte order.
17978
17979         * providers/pop3/camel-pop3-store.c (pop3_connect): Revert
17980         Miguel's change. The port number bug was actually somewhere
17981         else, and the IP address copying code was fine already.
17982         
17983 2000-03-29  Miguel de Icaza  <miguel@gnu.org>
17984
17985         * providers/pop3/camel-pop3-store.c (pop3_connect): Add htons
17986         (port), and only copy 4 bytes for the IP address to prevent a DNS
17987         attack. 
17988
17989 2000-03-28  Dan Winship  <danw@helixcode.com>
17990
17991         * camel-seekable-substream.c
17992         (camel_seekable_substream_new_with_seekable_stream_and_bounds):
17993         make this return a CamelStream rather than a
17994         CamelSeekableSubstream, because that's the way Gtk objects tend to
17995         work.
17996
17997         * camel-service.c (camel_service_gethost,
17998         camel_service_getport): convenience functions to canonicalize
17999         the host and port values of a service's URL.
18000         * providers/pop3/camel-pop3-store.c: use them
18001
18002         * providers/mbox/camel-mbox-folder.c
18003         (_check_get_or_maybe_generate_summary_file): Make this work when
18004         the inbox file doesn't yet exist.
18005
18006 2000-03-27  Dan Winship  <danw@helixcode.com>
18007
18008         * providers/mbox/camel-mbox-folder.c (_append_message): uncomment
18009         the call to unlink the temp file: there's no way to tell
18010         camel_stream_fs to truncate a file, so reusing the same file was
18011         resulting in junk at the ends of messages.
18012
18013         * camel-folder.[ch]: add delete_message_by_{number,uid}.
18014
18015         * providers/pop3/camel-pop3-folder.[ch]: implement
18016         delete_message_by_uid. Add a close method to do expunging
18017         of deleted messages if requested.
18018
18019         * providers/pop3/camel-pop3-store.[ch]: support for
18020         CamelPop3Folder::close. (You have to close the connection
18021         in order to expunge the folder, thus the store may be
18022         connected in the CamelService::is_connected sense when it
18023         is not actually connected to the server.) Also some bugfixes.
18024
18025 2000-03-27  NotZed  <NotZed@HelixCode.com>
18026
18027         * providers/mbox/camel-mbox-folder.c (_append_message): Unref the
18028         output_stream when done, close doesn't do it.
18029         (_append_message): Clear all uid's from the appending messages, so
18030         they are reassigned proper unique id's.
18031
18032         * gmime-utils.c (get_header_array_from_stream): Actually free the
18033         header, it is copied elsewhere.
18034
18035 2000-03-26  NotZed  <NotZed@HelixCode.com>
18036
18037         * providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev): Added
18038         folder parameter to function.  Fixed callers.
18039         (index_message): Index a message as it is assigned a unique id.
18040
18041         * camel-mime-part.c (my_set_content_id): Make sure we malloc and
18042         copy the content_id, otherwise *poof*
18043
18044 2000-03-25  NotZed  <NotZed@HelixCode.com>
18045
18046         * camel-medium.c (_finalize): Another leak, unref the content if
18047         finished with it.
18048
18049         * camel-recipient.c (camel_recipient_table_free): Plug another
18050         memory leak - actually free the recipient table.
18051
18052         * camel-mime-message.c (_finalize): Plugged a memory leak with the
18053         flags table.
18054
18055         * gmime-utils.c (_store_header_pair_from_string): A simpler, more
18056         debuggable and functionally identical header extraction function.
18057
18058 2000-03-24  NotZed  <NotZed@HelixCode.com>
18059
18060         * gmime-content-field.c (gmime_content_field_set_parameter):
18061         Remove the hash table entry before freeing its key and data.
18062
18063 2000-03-27  Dan Winship  <danw@helixcode.com>
18064
18065         * providers/Makefile.am (SUBDIRS): Add pop3.
18066
18067         * providers/pop3/camel-pop3-store.c: keep separate input and
18068         output streams so the output doesn't end up being buffered.
18069
18070         * providers/pop3/camel-pop3-folder.c (get_message_by_number):
18071         finish implementing this.
18072
18073 2000-03-27  Michael Meeks  <michael@helixcode.com>
18074
18075         * camel-mime-part.c (my_set_disposition): fix so less broken.
18076         (my_finalize): remove dodgy disposition free.
18077
18078         * camel-data-wrapper.c (my_set_mime_type_field): unref instead of
18079         free on mime_type.
18080
18081 2000-03-27  Dan Winship  <danw@helixcode.com>
18082
18083         * camel-service.c (camel_service_free_auth_types): new routine to
18084         free the data allocated by camel_service_query_auth_types.
18085
18086         * providers/pop3/camel-pop3-store.c (free_auth_types): implement
18087
18088         * camel-stream-mem.c (camel_stream_mem_new_with_buffer): rename
18089         camel_stream_mem_new_with_buffer to ..._with_byte_array and add a
18090         new ..._with_buffer that takes a char * rather than a GByteArray.
18091
18092         * Remove CamelStreamBufferedFs, since CamelStreamBuffer makes it
18093         redundant.
18094
18095 2000-03-25  Dan Winship  <danw@helixcode.com>
18096
18097         * camel-folder-summary.[ch]: change the CamelFolderSummary
18098         interfaces to allow partial summary queries (for dealing
18099         with very large folders). Remove the "extended_fields" from
18100         CamelFolderInfo and CamelMessageInfo: this is better dealt
18101         with by subtyping.
18102
18103         * providers/mbox/camel-mbox-summary.[ch]: Make CamelMboxSummary a
18104         subclass of CamelFolderSummary. Update interfaces for that. Remove
18105         the internal/external summary distinction. Remove the (unused) md5
18106         checksum in the folder summary. Change the summary file format
18107         (primarily to make it no longer byte-order dependent) and add a
18108         version number to it so it will be easier to change in the future.
18109         
18110         * providers/mbox/camel-mbox-folder.[ch]
18111         * providers/mbox/camel-mbox-search.c
18112         * providers/mbox/camel-mbox-utils.c: update for summary changes
18113
18114         * camel-exception-list.def: add
18115         CAMEL_EXCEPTION_FOLDER_SUMMARY_INVALID
18116         
18117 2000-03-23  NotZed  <NotZed@HelixCode.com>
18118
18119         * providers/mbox/camel-mbox-provider.c: Added flag to provider
18120         initialisation, to match changed structure.
18121
18122 2000-03-22  NotZed  <NotZed@HelixCode.com>
18123
18124         * camel-folder.[ch]: Added async search api.
18125
18126         * providers/mbox/camel-mbox-search.c
18127         (camel_mbox_folder_search_by_expression): Changed to use an
18128         asynchronous interface.
18129         (camel_mbox_folder_search_cancel): Cancel function for async
18130         interface.
18131
18132 2000-03-23  Dan Winship  <danw@helixcode.com>
18133
18134         * camel-stream-buffer.c (camel_stream_buffer_read_line): Function
18135         to read one line of any size from a stream and return it in
18136         allocated memory.
18137
18138 2000-03-22  Dan Winship  <danw@helixcode.com>
18139
18140         * camel-service.c (camel_service_query_auth_types): New function
18141         to query a service for the authentication protocols it supports.
18142         * providers/pop3/camel-pop3-store.c (query_auth_types): implement
18143
18144         * camel-provider.c (camel_provider_scan): New function to
18145         scan the provider dir and return a list of all providers.
18146
18147         * providers/pop3/camel-pop3-folder.c: fill this in partially
18148         * providers/pop3/camel-pop3-store.c: make camel_pop3_command
18149         return the text after "+OK"/"-ERR" and add a separate
18150         camel_pop3_get_additional_data to get the message body or
18151         whatever. Also make them take a CamelPop3Store rather than
18152         a CamelStreamBuffer.
18153
18154 2000-03-22  Matt Loper  <matt@helixcode.com>
18155
18156         * camel-formatter.c (debug): Disabled some useless debug
18157         messaging.
18158
18159 2000-03-21  Dan Winship  <danw@helixcode.com>
18160
18161         * providers/pop3: some initial bits of the POP3 provider, to
18162         make Matt happy. Incomplete, untested, etc.
18163
18164 2000-03-21  bertrand  <bertrand@helixcode.com>
18165
18166         * providers/mbox/camel-mbox-summary.c 
18167         (camel_mbox_summary_append_internal_to_external): copy the size field
18168
18169         * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): initialize 
18170         message_info to NULL
18171
18172         * camel-folder-summary.h: added the size field.
18173
18174         * providers/mbox/camel-mbox-summary.h: 
18175         added the received_date field.
18176
18177         * providers/mbox/camel-mbox-summary.c:
18178         documented all functions.
18179
18180         * camel-folder-summary.h: name change and 
18181         new fields.
18182
18183         * providers/mbox/camel-mbox-search.c: update to 
18184         conform to name change in the summary fields.
18185
18186 2000-03-10  bertrand  <bertrand@helixcode.com>
18187
18188         * camel-service.h: cosmetic changes.
18189
18190 2000-03-09  Dan Winship  <danw@helixcode.com>
18191
18192         * s/HelixCode/Helix Code, Inc./ in the copyrights
18193
18194 2000-03-07  bertrand  <bertrand@helixcode.com>
18195
18196         * camel-formatter.c (handle_mime_part): 
18197         plug mem leaks due to bad documentation
18198         of camel_content_field_get_mime_type
18199         (print_camel_body_part): idem
18200         (handle_multipart_alternative): idem
18201
18202         * gmime-content-field.c (gmime_content_field_get_mime_type): 
18203         documentation fix.
18204
18205
18206         * camel-mime-part.c (my_finalize): unref the 
18207         content_input_stream if any. 
18208
18209 2000-03-06  bertrand  <bertrand@helixcode.com>
18210
18211         * camel-stream-fs.c (_seek): fix a bogus calculation
18212         in the return position.
18213
18214 2000-03-05  bertrand  <bertrand@helixcode.com>
18215
18216         * camel-session.h: cosmetic fixes.
18217
18218         * camel-stream-fs.c (_read): 
18219         (_seek): fixed the current position so that it refers
18220         to the current position in the stream, not in its parent.
18221
18222 2000-03-04  NotZed  <NotZed@HelixCode.com>
18223
18224         * providers/mbox/camel-mbox-search.c
18225         (camel_mbox_folder_search_by_expression): Ref the summary
18226         after we have got it.
18227
18228 2000-03-04  bertrand  <bertrand@helixcode.com>
18229
18230         * camel-mime-part.c (my_write_content_to_stream): 
18231         stream the raw content instead of nothing if the encoding
18232         is not supported.
18233
18234         * camel-stream-fs.c (_seek): handle eos more
18235         properly.
18236
18237         * camel-formatter.c (get_bonobo_tag_for_object): 
18238         bonobo-goad-id is the good key to look for. 
18239         (get_bonobo_tag_for_object): close the <object> tag.
18240         (get_bonobo_tag_for_object): the correct syntax for the
18241         to set a parameter inside an <object> tag is :
18242         <object classid="..."> <param name="uid" value="..."> <param ...>
18243         </object>
18244
18245 2000-03-03  bertrand  <bertrand@helixcode.com>
18246
18247         * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): 
18248         use set_input_stream instead of construct_from_stream
18249         to feed the message object. 
18250
18251         * camel-data-wrapper.c (my_write_to_stream): reset output stream.
18252         (my_set_input_stream): unref the previous input stream.
18253         use the set_output_stream for default behaviour.
18254         (my_set_output_stream): unref previous output stream.
18255
18256         * camel-mime-part.c (my_write_content_to_stream): reset content
18257         object output stream.
18258
18259 2000-03-03  NotZed  <NotZed@HelixCode.com>
18260
18261         * providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev): Make
18262         sure we open with create with a creation mask.
18263
18264 2000-03-01  NotZed  <NotZed@HelixCode.com>
18265
18266         * camel-mime-part-utils.c
18267         (camel_mime_part_construct_content_from_stream): DO NOT assert on
18268         content type, we have fallback code 4 lines below it ... *sigh*
18269
18270 2000-02-29  NotZed  <NotZed@HelixCode.com>
18271
18272         * Makefile.am (libcamelinclude_HEADERS): Added camel-stream-buffer
18273         to build.
18274
18275         * camel-stream-buffer.[ch]: Generic buffer which can be applied to
18276         any stream.
18277
18278 2000-03-03  bertrand  <bertrand@helixcode.com>
18279
18280         * camel-formatter.c (handle_image): in the case
18281         of images, put the content object output stream
18282         in the url. This allows the message browser
18283         to show inline images.
18284
18285         * camel-stream-b64.c (my_read_encode): fixed state
18286         0 keep value. 
18287
18288 2000-03-02  bertrand  <bertrand@helixcode.com>
18289
18290         * camel-stream-b64.c (my_read_encode): don't forget to 
18291         set the state to 0 after 3.
18292         (my_read_encode): don't forget to encode, even in state 3.
18293
18294         * camel-simple-data-wrapper.c: static functions are prefixed 
18295         with my_ instead of _
18296         * camel-multipart.c: static functions are prefixed 
18297         with my_ instead of _
18298         (my_write_to_stream): commented.
18299         (my_write_to_stream): warning in case the boudary is set
18300         but is a zero length string.
18301
18302         * camel-mime-part.c (camel_mime_part_encoding_from_string): 
18303         remove debug trace. 
18304         
18305         * camel-mime-part.c: Replaced all static functions
18306         with name begining with _ by the same name begining
18307         with "my_" to prevent the possible conflicts 
18308         with system symbols Dan warned us about. 
18309         
18310         * camel-stream-b64.c (camel_stream_b64_write_to_stream): 
18311         use CamelStreamB64 type for the input stream.
18312
18313         * camel-mime-part.c (_get_content_object): remove 
18314         debugging trace
18315         (_write_content_to_stream): implement the b64 
18316         encoding the new way (that is using camel_stream_b64)
18317
18318         * camel-data-wrapper.c (my_write_to_stream): 
18319         fix implementation so that it writes properly
18320         to the output stream even.
18321
18322         * camel-stream-b64.c (camel_stream_b64_write_to_stream): 
18323         fix implementation. 
18324
18325 2000-02-29  bertrand  <bertrand@helixcode.com>
18326
18327         * camel-stream-b64.c (camel_stream_b64_write_to_stream): new
18328         utility function. 
18329
18330         * camel-data-wrapper.c (_write_to_stream): default
18331         implementation. 
18332
18333         * gmime-utils.c (_store_header_pair_from_string): 
18334         revert strange changes. 
18335
18336         * camel-stream-b64.c (my_read_decode): set eos to true when we
18337         have read the whole input stream. 
18338         (my_reset): set eos to FALSE.
18339
18340 2000-02-28  NotZed  <NotZed@HelixCode.com>
18341
18342         * camel-mime-part.c (_parse_header_pair): Dont free this either.
18343
18344         * camel-medium.c (_remove_header): Ugh, dont free the header
18345         before we actually remove it.
18346         (_add_header): Ugh, dont free hashtable entries which may be
18347         duplicated (hash_insert _will_ reference that memory).
18348
18349         * string-utils.c (string_trim): Trimming a 0-length string is not
18350         an error.
18351
18352         * camel-mime-message.c (_parse_header_pair): Fixed very broken
18353         memory handling of header_name/value.
18354
18355         * providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev):
18356         Initialise end_of_last_message always.
18357         (camel_mbox_copy_file_chunk): Stop trying to read if we run out of
18358         data, rather than looping forever.
18359         (camel_mbox_write_xev): Use an open flag when opening with create.
18360
18361         * camel-folder.c (camel_folder_search_by_expression): No, its not
18362         a fatal error to search on a non-searchable folder, you just dont
18363         get any matches.
18364         (_open): Dont open an opened folder (i dont see why this is really
18365         a bug, but what the hell ...)
18366
18367         * providers/mbox/camel-mbox-folder.c (_init): Set search cap on.
18368         (_open): Call parent class to perform open.  Remove folder-open
18369         check to parent instead.
18370         (_create): open takes a creation mask, dont use umask to try and
18371         set the open mode.
18372         (_delete): Dont bother checking folder==NULL, its already been
18373         checked on the external interface (changed to an assertion, this
18374         would have to be a camel bug).
18375         (_delete_messages): Likewise.
18376         (_create): Ditto.
18377         (_init): Dont go and clear all the paths and shit that the parent
18378         open just setup for us.
18379         (_delete_messages): Get rid of more umask stuff.
18380         (_append_message): Make sure we pass file mode to open with create.
18381         (_append_message): Cleaned up some indenting to make it readable.
18382
18383         * camel-stream-b64.c (my_read_encode): Fixed a typo.
18384
18385         * providers/mbox/camel-mbox-search.c: Changed to use e-sexp,
18386         rather than filter-sexp.
18387
18388 2000-02-28  bertrand  <bertrand@helixcode.com>
18389
18390         * camel-stream-b64.c (my_read_encode): encoding
18391         filter.
18392
18393 2000-02-23  bertrand  <Bertrand.Guiheneuf@aful.org>
18394
18395         * camel-stream-b64.c: changed the __static 
18396         suffix into a my_ prefix. 
18397         (camel_stream_b64_set_mode): reset the persistent
18398         status. 
18399         (my_read_decode): remove superfluous %
18400         
18401         * providers/mbox/camel-mbox-utils.c (camel_mbox_copy_file_chunk): 
18402         fix exception description message.
18403
18404 2000-02-24  Dan Winship  <danw@helixcode.com>
18405
18406         * camel-session.c: Add camel_session_get_transport_for_protocol.
18407
18408         * camel-transport.h:
18409         * camel-transport.c: Add an abstract CamelTransport class.
18410
18411         * providers/sendmail/*: A CamelTransport that uses sendmail
18412         to deliver mail.
18413
18414 2000-02-24  Dan Winship  <danw@helixcode.com>
18415
18416         * camel-folder.c: use CamelExceptions for run-time errors, not
18417         incorrect code. Don't bother validating that an object exists from
18418         inside one of its methods, since you couldn't have gotten there if
18419         it didn't. Fix some code style bugs.
18420
18421         (_init): Rename init_with_store to init and add parent_folder,
18422         separator, and name arguments.
18423         (_set_name): Get separator from self, not parent_store now.
18424
18425         * camel-store.h:
18426         * camel-store.c: Remove get/set_separator.
18427
18428         * providers/mbox/: Update for above.
18429
18430 2000-02-23  Dan Winship  <danw@helixcode.com>
18431
18432         * camel-medium.c (_finalize): Free the data in the headers hash
18433         table.
18434         (_add_header): g_strdup the header name and value when adding it.
18435
18436         * camel-mime-part-utils.c
18437         (camel_mime_part_construct_headers_from_stream): Free the header
18438         data after calling camel_medium_add_header, since it will have
18439         g_strdup()ed it itself.
18440
18441 2000-02-22  NotZed  <NotZed@HelixCode.com>
18442
18443         * providers/mbox/camel-mbox-search.c: Dont compile by default.
18444
18445         * providers/mbox/Makefile.am: Fuck off the filter code.
18446
18447 2000-02-22  bertrand  <Bertrand.Guiheneuf@aful.org>
18448
18449         * camel-stream-b64.c (read_decode__static): 
18450         don't read the char if we reached the length
18451         of the output buffer. Hours lost on this
18452         %$!@# bug : 3.5
18453
18454         * camel-folder.c (camel_folder_get_subfolder): 
18455         (camel_folder_create): 
18456         (camel_folder_delete): 
18457         (camel_folder_delete_messages): 
18458         (camel_folder_list_subfolders): 
18459         (camel_folder_expunge): 
18460         (camel_folder_get_message_by_number): 
18461         (camel_folder_get_message_count): 
18462         (camel_folder_append_message): 
18463         (camel_folder_copy_message_to): 
18464         (camel_folder_get_summary): 
18465         (camel_folder_get_message_uid): 
18466         (camel_folder_get_message_by_uid): 
18467         (camel_folder_get_uid_list): 
18468         Check folder state (open/close) and raise an
18469         exception if it is not ok. 
18470         
18471         * providers/mbox/camel-mbox-folder.c (_create): 
18472         create the file and the path with two different
18473         names.
18474
18475         * camel-folder.c (_create): handle the case 
18476         when the folder name starts with '/'
18477
18478         * camel-exception.c (camel_exception_new): use 
18479         (void) instead of () in decl.
18480
18481         * camel-exception.h: cosmetic fixes.
18482
18483         * camel-exception.c (camel_exception_init): new routine.
18484         Fix a bug in mail/message-list.c
18485         
18486
18487         * camel-folder.h: cosmetic changes.
18488
18489         * camel-stream-b64.c (reset__static): added a
18490         reset method. Thanks message-browser to find
18491         so much bugs :)
18492
18493         * providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): readd
18494         Unicode libs.
18495
18496 2000-02-21  bertrand  <Bertrand.Guiheneuf@aful.org>
18497
18498         * camel-formatter.c (lookup_unique_id): 
18499         awful hack to test get_output_stream.
18500         * camel-stream-b64.[ch] :
18501         b64 encoding/decoding is now implemented as
18502         a stream. 
18503         
18504
18505 2000-02-21  bertrand  <Bertrand.Guiheneuf@aful.org>
18506
18507         * camel-seekable-substream.c (_reemit_parent_signal): 
18508         emit "data_available" when parent stream emits it. 
18509
18510
18511 2000-02-21  NotZed  <NotZed@HelixCode.com>
18512
18513         * providers/mbox/Makefile.am: Uh, fixed LIBADD again.  What was
18514         there was never ever going to work, wasn't it tested?
18515
18516
18517 2000-02-21  Dan Winship  <danw@helixcode.com>
18518
18519         * camel-session.h: (struct _CamelSession): Add authenticator.
18520
18521         * camel-session.c (camel_session_new): Add authenticator.
18522         (camel_session_query_authenticator): New function to query the
18523         session authenticator for password, etc, information.
18524
18525 2000-02-21  Dan Winship  <danw@helixcode.com>
18526
18527         * camel-session.c: add CamelExceptions to several functions. Use
18528         camel_session_new to initialize the session and URL fields of
18529         created CamelStores as appropriate.
18530
18531         * camel-store.h:
18532         * camel-store.c
18533         * camel-service.h:
18534         * camel-service.c: Move the session and url (and associated
18535         functions) from CamelStore to CamelService. Add url_flags to
18536         CamelService so subclasses can specify which URL components
18537         are mandatory for them. Add camel_session_new for
18538         camel_session_get_store* to use.
18539
18540         * providers/mbox/camel-mbox-folder.c:
18541         * providers/mbox/camel-mbox-store.c:
18542         * providers/mbox/camel-mbox-store.h: Update for above changes.
18543
18544         * camel-exception-list.def: Once camel is being used for real,
18545         exceptions won't be renumberable. So renumber them now to make
18546         more room to add exceptions to the various categories later, and
18547         add a big warning message.
18548
18549 2000-02-20  Dan Winship  <danw@helixcode.com>
18550
18551         * providers/mbox/Makefile.am: add libibex back to
18552         libcamelmbox_la_LIBADD
18553
18554 2000-02-18  NotZed  <NotZed@HelixCode.com>
18555
18556         * providers/mbox/camel-mbox-search.h
18557         (camel_mbox_folder_search_by_expression): Added exception to call,
18558         and fixed caller.
18559
18560         * providers/mbox/camel-mbox-search.c
18561         (camel_mbox_folder_search_by_expression): Major changes, to use
18562         the sexp evaluator from filter/filter-sexp.c to implement the
18563         searching.
18564         (func_body_contains): Changed to support multiple strings in 1
18565         command (results or'd together)
18566
18567         * url-util.c (g_url_new): Fixed a typo (colon == 0 isn't right),
18568         and made it so full url's are absolute pathed (Dan, this is how it
18569         has to work!).  Also, always include a path part, even if it is an
18570         empty string.
18571
18572 2000-02-18  Dan Winship  <danw@helixcode.com>
18573
18574         * camel/camel-types.h: New header with the typedefs for all camel
18575         classes. Now the class headers can just include this and the
18576         header for the parent type. This makes it possible for
18577         CamelService to include a CamelSession without creating an
18578         #include loop.
18579
18580         * camel/*:      
18581         * composer/e-msg-composer-attachment-bar.h:
18582         * mail/folder-browser.c:
18583         * mail/message-list.c: frob #includes to match the new reality
18584
18585 2000-02-17  Dan Winship  <danw@helixcode.com>
18586
18587         * camel/camel-service.h:
18588         * camel/camel-service.c: Make camel-service us a Gurl internally.
18589         Remove the login/password interfaces and instead provide
18590         camel_service_connect_with_url. Add CamelExceptions
18591
18592 2000-02-17  bertrand  <Bertrand.Guiheneuf@aful.org>
18593
18594         * camel/camel-formatter.c (handle_text_plain): 
18595         (handle_text_html): use camel_stream_reset instead
18596         of seek. The formatter should be able to work 
18597         with all streams, not only seekable streams. 
18598         In the case where some provider implementation
18599         would not be able to provide a reset method 
18600         to their stream, implementors would have
18601         to find a workaround.
18602
18603         * camel/camel-session.c (camel_session_new): use
18604         (void) instean of () in function decl.
18605
18606         * camel/camel-folder.c: ifdef async operation 
18607         related code. 
18608
18609         * camel/camel-seekable-stream.c (_seek): added a warning.
18610         (_reset): default implementation of reset for seekable
18611         stream.
18612
18613         * camel/camel-mime-message.h: set_received_date declaration fix.
18614         cosmetic changes.
18615
18616         * camel/providers/mbox/camel-mbox-provider.c (camel_provider_module_init): 
18617         use (void) instead of ().
18618
18619         * camel/camel-stream.c (camel_stream_reset): 
18620         new method for CamelStream.
18621
18622 2000-02-17  Dan Winship  <danw@helixcode.com>
18623
18624         * camel/url-util.c (g_url_to_string): New function to convert
18625         a Gurl back into a char *.
18626
18627 2000-02-17  bertrand  <Bertrand.Guiheneuf@aful.org>
18628
18629         * camel/camel-formatter.c (handle_text_plain): 
18630         revamped so that it uses the output stream
18631         of the data wrapper
18632         (handle_text_html): ditto.
18633         
18634         
18635         * camel/camel-simple-data-wrapper.h: 
18636         * camel/camel-simple-data-wrapper.c (camel_simple_data_wrapper_new): 
18637         use (void) instead of ().
18638         (_get_output_stream): simple implementation. 
18639
18640 2000-02-16  bertrand  <Bertrand.Guiheneuf@aful.org>
18641
18642         * camel/camel-data-wrapper.c (_set_input_stream): ref input stream
18643         (_set_output_stream): ref output stream
18644         (_finalize): unref input and output streams
18645
18646         * camel/camel-seekable-substream.c (_set_bounds): don't
18647         seek the begining of the substream.
18648         (_eos): fix eos condition testing. 
18649         (_finalize): unref parent stream
18650         (_init_with_seekable_stream_and_bounds): ref parent stream
18651
18652         * camel/gstring-util.c (g_string_equal_for_hash): 
18653         (g_string_equal_for_glist): return type is int.
18654
18655         * camel/camel.h: 
18656         * camel/camel.c (camel_init): use (void) 
18657         instead of ().
18658         
18659 2000-02-16  NotZed  <NotZed@HelixCode.com>
18660
18661         * providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): Added
18662         libfilter to link line (temporarily?).  Required for
18663         filter-sexp.
18664
18665 2000-02-15  bertrand  <bertrand@helixcode.com>
18666
18667         * camel/camel-multipart.c (_localize_part): 
18668         this routine replaces the _read_part routine
18669         and does not store the part in a buffer. 
18670         (_set_input_stream): use the set_input_stream
18671         instead of the construct_from_stream.
18672         each bodypart is given an input stream. 
18673
18674         * camel/camel-mime-part-utils.c: 
18675         include the data-wrapper-repository header. 
18676         (camel_mime_part_construct_content_from_stream): 
18677         use the set_input_stream instead of the 
18678         construct_from_stream method. 
18679
18680         * camel/camel-seekable-substream.c (_set_bounds): 
18681         cur position is set to 0 not to inf_bound.
18682
18683 2000-02-15  bertrand  <Bertrand.Guiheneuf@aful.org>
18684
18685         * camel/camel-mime-part.c: include gmime-base64.h
18686         various compilation and runtime fixes.
18687         (_set_input_stream): store the input substream 
18688         for the content object.
18689
18690         * camel/camel-data-wrapper.h: declare the 
18691         set/get function on input/output stream.
18692
18693         * camel/camel-mime-part.c (_get_content_object): 
18694         don't use a temporary mem stream.       
18695
18696         * camel/camel-seekable-substream.c (_seek): 
18697         (_eos): 
18698         (_read): the substream can be unlimited in length
18699
18700         * camel/camel-data-wrapper.c (camel_data_wrapper_class_init): 
18701         set the get/set_input/output_stream methods.    
18702
18703         * camel/camel-multipart.c (_construct_from_stream): 
18704         camel_stream_seek -> camel_seekable_stream_seek
18705
18706 2000-02-14  Miguel de Icaza  <miguel@gnu.org>
18707
18708         * camel/providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): Add
18709         the unicode libraries as well.
18710
18711         * camel/camel-provider.c (camel_provider_register_as_module): Add
18712         error reporting here.  Desire to use Solaris increases.  Hair loss
18713         in the last two hours: 5,400.
18714
18715         * camel/providers/mbox/camel-mbox-provider.c
18716         (camel_mbox_get_provider): Renamed function.
18717
18718         * camel/camel.h: All include files use camel/ now here.
18719
18720         * camel/providers/mbox/Makefile.am: Drop all the dynamism from
18721         Camel, and make this a standard library.
18722
18723 2000-02-14  bertrand  <Bertrand.Guiheneuf@aful.org>
18724
18725         * camel/gmime-utils.c (get_header_array_from_stream): use the 
18726         eos stream method. 
18727         (gmime_read_line_from_stream): ditto.
18728
18729         * camel/camel-stream-fs.h (struct ): add the eof field
18730         cosmetics changes. 
18731
18732         * camel/camel-stream-fs.c (camel_stream_fs_init): set eof.
18733         (_read): set eof on end of file.
18734         (_eos): implemented.
18735
18736         * camel/gmime-utils.c (get_header_array_from_stream): 
18737         make a blocking version of the header parser. 
18738         When the fs stream uses gnome-vfs, this should
18739         be changed. 
18740         (gmime_read_line_from_stream): ditto. 
18741
18742 2000-02-11  bertrand  <Bertrand.Guiheneuf@aful.org>
18743
18744         * camel/camel-stream-fs.c: 
18745         everywhere, when using the cur_pos field, do it
18746         on the CamelSeekableStream object.
18747         (_seek): small fix. 
18748
18749         * camel/camel-seekable-stream.c (camel_seekable_stream_seek): 
18750         s/camel_stream_seek/camel_seekable_stream_seek/g
18751
18752         * camel/camel-seekable-stream.h: 
18753         (struct ): added a field to store the
18754         current position.
18755
18756         * camel/camel-seekable-stream.c (camel_seekable_stream_get_current_position): 
18757         New function. Allows to get the current position 
18758         of a seekable stream.
18759         
18760
18761 2000-02-13  NotZed  <notzed@zedzone.helixcode.com>
18762
18763         * providers/mbox/camel-mbox-search.c: New file, implements the
18764         search api for mbox folders.
18765
18766         * providers/mbox/Makefile.am: Link with ibex.
18767
18768         * camel-folder.c (camel_folder_has_search_capability): Api
18769         additions.
18770         (camel_folder_search_by_expression): Ditto.
18771
18772 2000-02-12  NotZed  <notzed@zedzone.helixcode.com>
18773
18774         * providers/mbox/camel-mbox-folder.c (_set_name): Setup index
18775         filename as well.
18776         (_init_with_store): Init index filename.  Hmm, none of these
18777         names ever seem to get free'd (FIXME?)
18778
18779         * providers/mbox/camel-mbox-folder.h: Add index file name.
18780
18781 2000-02-12  NotZed  <notzed@helixcode.com>
18782
18783         * camel-folder.h: Add folder search functions.
18784
18785         ** Created ChangeLog just for camel **
18786          - refer to ../ChangeLog for changes prior to this date.