1 2002-06-21 Jeffrey Stedfast <fejj@ximian.com>
3 * camel-gpg-context.[c,h]: New source files implementing the
4 CamelCipherContext class for gnupg.
6 * camel-pgp-context.c (camel_pgp_context_new): Return a
9 * camel-pgp-mime.c (camel_pgp_mime_part_decrypt): Take a
10 CamelCipherContext argument rather than a CamelPgpContext since we
11 now have a CamelGpgContext also.
12 (camel_pgp_mime_part_encrypt): Same.
13 (camel_pgp_mime_part_verify): Same.
14 (camel_pgp_mime_part_sign): Same.
16 2002-06-20 Jeffrey Stedfast <fejj@ximian.com>
18 * camel-digest-folder.c: Updated to support searching as well as
19 making it use CamelDigestSummary.
21 * camel-digest-summary.[c,h]: New class to handle the summary for
24 * camel-tcp-stream-ssl.c (set_errno): PR_IO_TIMEOUT_ERROR should
25 map to ETIMEDOUT and not EAGAIN.
26 (stream_connect): Reset the PR_Poll() timeout back to 2 minutes as
27 this wasn't the problem afterall.
29 2002-06-19 Not Zed <NotZed@Ximian.com>
31 * camel-mime-parser.c (folder_scan_drop_step): Drop back to
32 initial state if we came from eof state.
34 2002-06-19 Jeffrey Stedfast <fejj@ximian.com>
36 * camel-tcp-stream-ssl.c (stream_connect): Set the poll timeout to
37 be PR_INTERVAL_MIN, this one shouldn't need to be 2 minutes (plus
38 it blocks my connection at home for far too long).
40 * providers/imap/camel-imap-folder.c (imap_refresh_info): Make
41 sure we hold the command_lock before accessing current_folder.
42 (imap_append_online): Same.
43 (imap_transfer_online): Same.
45 * providers/imap/camel-imap-store.c (delete_folder): We need to
46 hold the command_lock before we can set the current_folder to
48 (rename_folder): Same.
49 (get_folder_info_online): We need to make sure we hold the
50 command_lock in order to use current_folder.
53 2002-06-19 Jeffrey Stedfast <fejj@ximian.com>
55 * providers/smtp/camel-smtp-transport.c (smtp_connect): Don't
56 bother trying to authenticate (and thus don't throw up an error
57 dialog) unless the server is an ESMTP server and supports
60 * camel-sasl-plain.c: Change the user-friendly name to PLAIN, this
61 is what it should be. Not "Password" because user's immediately
62 think that they need authentication when they see "Password" even
63 if they don't need it at all.
65 2002-06-17 Jeffrey Stedfast <fejj@ximian.com>
67 * camel-vee-folder.c (camel_vee_folder_add_folder): Update the
68 freeze state of the new source folder.
69 (camel_vee_folder_remove_folder): Undo any freeze state that we
70 have imposed on this source folder.
72 2002-06-14 Jeffrey Stedfast <fejj@ximian.com>
74 * camel-vee-folder.c (vee_freeze): Freeze source folders.
75 (vee_thaw): Thaw all source folders. Fixes bug #24317.
77 * providers/imap/camel-imap-folder.c (imap_sync_online): Unlock
78 the command_lock after each UID STORE command so that other
79 (probably more important) threads can send their requests.
82 * camel-disco-diary.c:
83 * camel-index-control.c:
87 * camel-tcp-stream-ssl.c:
88 * camel-text-index.c: Fixed compiler warnings.
90 * camel-multipart-signed.c: Updated to use ctx->sign_protocol
91 rather than ctx->protocol.
93 * camel-cipher-context.h: Add an ecnryption protocol member.
95 * camel-pgp-context.c (camel_pgp_context_init): Set the encryption
98 2002-06-11 Not Zed <NotZed@Ximian.com>
100 * camel-vtrash-folder.c (camel_vtrash_folder_class_init): Our
101 parent class is camel_vee_folder, not camel_folder, fix setting of
102 parent folder (unused anyway, but removes a run-time warning).
104 2002-06-07 Not Zed <NotZed@Ximian.com>
106 * camel-pgp-context.c (camel_pgp_context_init): Duh! The protocol
107 is application/pgp-signature. TODO: need to have a signed and an
108 encrypted protocol specified separately.
110 2002-06-06 Not Zed <NotZed@Ximian.com>
112 * camel-folder-thread.c (thread_summary): Do the work here.
113 (camel_folder_thread_messages_remove): Implement. Remove some
114 uid's from the tree. Disalbe from build, for now.
115 (remove_uid_node_rec): Actually do the work.
116 (camel_folder_thread_messages_add): Implement. Add some summary
117 items to the tree. Disable from build though.
118 (camel_folder_thread_messages_apply): Make a thread tree built
119 using camel_folder_thread_new() map to a new set of uids,
120 preserving some order. Meant primarily to manage deleted + added
121 uids in a user-friendly manner.
123 2002-06-09 Jeffrey Stedfast <fejj@ximian.com>
125 * camel-multipart-signed.c (camel_multipart_signed_verify): Use
126 CAMEL_EXCEPTION_SYSTEM rather than '1' for clarity.
128 2002-06-07 Jeffrey Stedfast <fejj@ximian.com>
130 * camel-tcp-stream-ssl.c (stream_connect): Up the timeout on the
131 connect code to 2 minutes.
133 2002-06-05 Dan Winship <danw@ximian.com>
135 * camel-mime-utils.c (header_decode_mailbox): Parse
136 "From: Dan Winship <danw>" (with no domain) in the way the sender
137 meant it, even though it's completely wrong.
139 2002-06-04 Not Zed <NotZed@Ximian.com>
141 * providers/local/camel-local-provider.c: Remove the
142 CONF_DEFAULT_PATH entry, as this is handled by the url config
143 stuff. This made it basically impossible to configure any local
146 * providers/local/camel-local-folder.c (local_refresh_info): Force
147 a refresh. Should work for all local folders to force them to
150 * providers/local/camel-maildir-folder.c (maildir_refresh_info):
151 Removed, moved into camel-local-folder.
153 * providers/local/camel-mh-summary.c (mh_summary_next_uid_string):
154 Once we assign or get a uid, tell the summary of this, so the next
155 uid we get will be higher than any previously.
157 * camel-object.c (camel_object_ref, camel_object_unref): I got
158 sick of casting, these now take void * like they should, and
159 perform their own run-time type checking.
161 * providers/local/camel-mh-store.c (recursive_scan): Changed to
162 use stat, not lstat (*shrug* maybe someone wants to softlink their
166 (inode_free): Copied from camel-maildir store (should put into
167 camel-local-store or utils?).
168 (recursive_scan): Changed to check for re-visiting inodes. Also,
169 it builds the tree itself, rather than using folder_info_build.
170 (add_folder): Changed to folder_info_new.
171 (recursive_scan): Properly honour the recursive flag. Also,
172 lookup unread count from folder.
173 (folder_info_new): Init unread message count to -1, since we dont
175 (folder_info_new): Take the name as an argument, and perform the
177 (folders_update): Util func to add/remove folders from .folders
178 file. I'm assuming its sorted.
179 (get_folder): Add the folder to .folders if we created a new one,
181 (delete_folder): Remove from .folders, etc.
182 (folders_scan): If we have a .folders file, read and use that
184 (recursive_scan): Handle scanning from a particular directory
186 (rename_folder): Implement so we can track any changes to the
187 .folders file if its turned on.
189 ** Applied patch below from Greg Hudson.
191 2002-05-10 Greg Hudson <ghudson@mit.edu>
193 * camel-mh-store.c (get_inbox, get_folder_info, recursive_scan,
194 add_folder): Implement support for MH stores.
196 * camel-mh-summary.c (mh_summary_check, sort_uid_cmp): Sort MH
197 messages by message number (uid), like we sort maildir messages by
200 * camel-local-provider.c (mh_provider): Turn on source and store
203 2002-06-03 Not Zed <NotZed@Ximian.com>
205 * camel-vee-folder.c (camel_vee_folder_add_folder):
206 (folder_changed_change):
207 (folder_changed_remove_uid):
208 (folder_changed_add_uid):
209 (vee_folder_build_folder): Check that any unmatched operation is
210 not concerning any vfolder. Other vfolders should never be part of any
211 unmatched handling. For #24615, and others probably.
213 2002-06-02 Not Zed <NotZed@Ximian.com>
215 * camel-sasl.c (camel_sasl_new):
216 (camel_sasl_finalize): setup/free the mech string.
218 * camel-sasl.h: Added 'mech' mechanism string.
220 2002-06-01 Not Zed <NotZed@Ximian.com>
222 * providers/imap/camel-imap-folder.c (imap_getv): Implement. Only
223 the object_description arg.
224 (camel_imap_folder_get_type): Init parent_class holder.
226 * providers/local/camel-local-folder.c (local_getv): Implement,
227 object_description arg.
229 * camel-folder.c (folder_getv): Implement, add a bunch of args you
230 can get -> camel_folder_get_unread_count etc will be going RSN i
232 (camel_folder_finalize): Free cached description string.
234 * camel-object.c (cobject_getv): Implement
235 CAMEL_OBJECT_ARG_DESCRIPTION, just return the classname of the
240 (camel_object_set): Take object = void *, to simplify usage.
241 (camel_object_setv): Removed unecessary locals.
242 (camel_object_getv): Same.
243 (camel_object_free): New method, free an arg, upto implementations
244 whether args are static/const or not.
245 (cobject_free): Implement a dummy do nothing free.
247 2002-05-31 Not Zed <NotZed@Ximian.com>
249 * camel-vee-folder.c (camel_vee_folder_get_location): new function
250 to get the real location (folder) (and uid) of a vfolder object.
251 Using the folderinfo, since we already have it, maybe it should
254 2002-05-31 Jeffrey Stedfast <fejj@ximian.com>
256 * providers/imap/camel-imap-folder.c (get_content): When the part
257 is a multipart/signed, make sure to free the part_spec before
258 returning (the other types already did this properly).
260 * providers/imap/camel-imap-message-cache.c
261 (camel_imap_message_cache_get): Free the path buffer when we're
264 * providers/imap/camel-imap-folder.c (imap_update_summary): Free
265 the final tagged response buffer.
267 * providers/imap/camel-imap-command.c (imap_read_untagged): If we
268 fail to read a literal, free the temporary string buffer.
270 * providers/imap/camel-imap-folder.c (imap_rescan): Revert my fix
271 from the other day since camel_imap_command_response() doesn't
272 guarentee that resp will be set to NULL on error.
274 * camel-data-cache.c (camel_data_cache_get): If we fail to be able
275 to create a stream to insert into the cache, then free the 'real'
278 2002-05-30 Not Zed <NotZed@Ximian.com>
280 * camel-cipher-context.h: Added a protocol field for users to use.
282 * camel-stream-filter.c (do_read): Sigh, the pre-size is READ_PAD
283 not READ_SIZE. Big difference.
284 (READ_PAD): Bumped upto 128 from 64, so we can fit a typical line
287 * providers/imap/camel-imap-folder.c (get_content): Changed to
288 load multipart/signed as an opaque block into the right kind of
291 * camel-multipart.h (struct _CamelMultipart): Removed the boundary
292 field. It wans't actually used anywhere.
294 * camel-seekable-substream.c
295 (camel_seekable_substream_new_with_seekable_stream_and_bounds):
296 Shortened this stupidly long name to just :new(), its the only way
297 its ever used. Fixed all callers.
299 * camel-multipart-signed.[ch]: new wrapper for multipart/signed
300 types. We need to treat the entire content as a blob of data for
301 transport purposes. This also cleans up a lot of the sign/verify
304 * camel-mime-part-utils.c
305 (camel_mime_part_construct_content_from_parser): Just call
306 camel_multipart_construct_from_parser for multipart parts, also
307 use a multipart_signed for multipart/signed types.
309 * camel-multipart.c (camel_multipart_construct_from_parser): New
310 virtual function for multiparts to buld themselves.
311 (construct_from_parser): Implement for normal multiparts.
312 (toplevel): Got rid of a warning, it'll never be an abstract
315 * camel-pgp-context.c (pgp_hash_to_id):
316 (pgp_id_to_hash): Implement.
317 (camel_pgp_context_init): Init the pgp protocol specifier.
319 * camel-cipher-context.c (camel_cipher_id_to_hash):
320 (camel_cipher_hash_to_id): Util virtual methods to handle the
323 * camel-mime-filter-canon.[ch]: A new filter, end/start of line
324 canonicalisation filter. Can escape "From " and strip trailing
325 whitespace, and canonicalise the end of line to crlf or to lf.
327 2002-05-29 Not Zed <NotZed@Ximian.com>
329 * camel-multipart.h (struct _CamelMultipart): Removed the
330 'parent', nothing used it, anywhere. Cleaned up some formatting
333 2002-05-30 Jeffrey Stedfast <fejj@ximian.com>
335 * providers/imap/camel-imap-store.c (camel_imap_store_readline):
336 On error, don't leak the GByteArray buffer.
338 * providers/imap/camel-imap-folder.c (imap_rescan): Free the
339 response before checking for errors. I'm not sure this'll actually
340 fix the memory leak here, but it might? Certainly can't hurt.
342 * camel-block-file.c (camel_block_file_finalise): Destroy the
345 2002-05-29 Jeffrey Stedfast <fejj@ximian.com>
347 * providers/imap/camel-imap-store.c (connect_to_server): Only free
348 the LOGOUT response if it is non-NULL.
350 2002-05-28 Not Zed <NotZed@Ximian.com>
352 * providers/local/camel-maildir-folder.c (maildir_refresh_info):
353 Implement. Run a summary check to update for any newly arrived
356 * providers/local/camel-maildir-store.c (scan_dir): If we have a
357 folder, execute a refresh_info on it, to suck in any new stuff.
359 2002-05-28 Jeffrey Stedfast <fejj@ximian.com>
361 * camel-filter-driver.c (camel_filter_driver_log): Use the
362 CamelMessageInfo rather than the CamelMimeMessage because the
363 message may not have been loaded (thus NULL).
365 2002-05-27 Jeffrey Stedfast <fejj@ximian.com>
367 * providers/smtp/camel-smtp-transport.c (connect_to_server): On
368 connection failure, unref the tcp stream.
370 * providers/pop3/camel-pop3-store.c (connect_to_server): On
371 connection failure, unref the tcp stream.
373 * providers/imap/camel-imap-store.c (connect_to_server): On
374 connection failure, unref the tcp stream.
376 * providers/nntp/camel-nntp-store.c (nntp_store_query_auth_types):
377 Our parent class is no longer CamelRemoteStore.
378 (nntp_store_init): Same.
379 (camel_nntp_store_get_type): Here too.
380 (nntp_connect): Rewritten to try to connect via SSL. Also remove
381 code using CamelRemoteStore.
382 (camel_nntp_command): Don't call camel_remote_store_connected().
384 2002-05-24 Jeffrey Stedfast <fejj@ximian.com>
386 * providers/imap/camel-imap-folder.c (content_info_get_part_spec):
387 Helps if we allocate enough space here. Also, start smoking the
388 same purple flavoured IMAP crack when counting parts (parts don't
389 count if their parent part is a message/* part with a parent
390 part). Fixes bug #25260.
392 2002-05-24 Jeffrey Stedfast <fejj@ximian.com>
394 * providers/imap/camel-imap-command.c (imap_read_untagged): Use
395 the new readline function.
397 * providers/imap/camel-imap-store.c (connect_to_server): Use the
398 new camel_imap_store_readline() function which doesn't suck quite
399 as bad as the original camel_remote_store_recv_line() function.
400 (camel_imap_store_readline): New function to replace
401 camel_remote_store_recv_line(). This function is at least safe
402 with embedded nul chars. Not that any of our callers use it
405 2002-05-24 Jeffrey Stedfast <fejj@ximian.com>
407 * providers/imap/camel-imap-store.c (connect_to_server): Added
408 some NULL protection fixes.
410 2002-05-22 Jeffrey Stedfast <fejj@ximian.com>
412 * camel-remote-store.c: Removed from the build. Glory glory
415 * camel-disco-store.c: Updated to inherit from
416 CamelStore rather than CamelRemoteStore.
418 * providers/imap/camel-imap-command.c (imap_command_start): Don't
419 use the camel-remote-store shit to send a string. Just use
420 camel_stream_printf for chrissakes.
422 * providers/imap/camel-imap-store.c: Updated to not depend on
423 CamelRemoteStore and to handle STARTTLS.
424 (imap_disconnect_online): Unref the streams.
425 (imap_keepalive): Removed.
426 (camel_imap_store_connected): New function to replace
427 camel_remote_store_connected().
428 (camel_imap_store_finalize): Unref the streams.
429 (camel_imap_store_recv_line): New function to replace
430 camel_remote_store_recv_line().
431 (imap_get_capability): Renamed from connect_to_server
432 (connect_to_server): New function to try and connect to the
434 (connect_to_server_wrapper): New wrapper function around
435 connect_to_server that takes the ssl modes into consideration.
436 (query_auth_types): Don't bother calling our parent's
437 implementation of query_auth_types() since CamelDiscoStore doesn't
439 (imap_get_name): New method to implement CamelService::get_name
441 2002-05-18 Not Zed <NotZed@Ximian.com>
443 * camel-search-private.c (camel_utf8_getc): If we get an invalid
444 start char, just ignore it and goto the next character.
446 2002-05-16 Jeffrey Stedfast <fejj@ximian.com>
448 * providers/imap/camel-imap-store.c (get_folder_offline): Don't
449 call some retarded function to simply set an exception.
451 * camel-filter-search.c (get_label): New e-sexp callback function
452 to get a user_tag label value.
454 2002-05-15 Jeffrey Stedfast <fejj@ximian.com>
456 * providers/imap/camel-imap-utils.c
457 (imap_parse_namespace_response): New function to parse a NAMESPACE
459 (imap_namespaces_destroy): New function to destroy the returned
460 structure from the above function.
462 2002-05-15 Jeffrey Stedfast <fejj@ximian.com>
464 * camel-service.c (service_setv): Only reconnect if we are already
465 connected, if we are in a disconnected state then no need to
468 * providers/imap/camel-imap-folder.c (get_content): If the
469 part_spec is an empty string for a leaft part, use "1" since we
470 don't actually want to get the raw message headers too.
472 2002-05-15 Not Zed <NotZed@Ximian.com>
474 * providers/imap/camel-imap-store.c (refresh_folder_info): removed.
475 (imap_store_refresh_folders): Copy the folders first, then refresh
476 them, outside of the cache_lock, which could cause deadlocks
477 because of a workaround for crappo exchange.
478 (imap_disconnect_online): Dont pass an exception to LOGOUT
479 command. The required response 'BYE' always sets an exception
480 when we call LOGOUT. This also interfered with a lot of other
481 processing causing partial failures and messed up offline/online
484 * camel-disco-folder.c (disco_prepare_for_offline): Do progress
487 2002-05-14 Jeffrey Stedfast <fejj@ximian.com>
491 * providers/imap/camel-imap-folder.c (content_info_get_part_spec):
492 New function to take a CamelMessageContentInfo and generate a
493 part-specification string.
494 (get_content): Stop passing around part_spec strings and use
495 content_info_get_part_spec instead.
497 * camel-folder-summary.c (camel_content_info_dump): Made this into
498 a public debugging function.
500 * providers/imap/camel-imap-utils.c (imap_parse_body): Make sure
501 to set the parent of any message/rfc822 subparts.
503 2002-05-13 Jeffrey Stedfast <fejj@ximian.com>
505 * providers/imap/camel-imap-folder.c (imap_get_message): Previous
508 2002-05-13 Jeffrey Stedfast <fejj@ximian.com>
510 * providers/imap/camel-imap-store.c (camel_imap_store_class_init):
511 Overload the setv/getv CamelObject virtual methods.
512 (imap_setv): Implemented.
513 (imap_getv): Implemented.
515 2002-05-13 Dan Winship <danw@ximian.com>
517 * camel-folder.c (camel_folder_append_message): Add a "char
518 **appended_uid" argument, for the caller to optionally pass in a
519 variable to receive the UID of the appended message (if the
521 (camel_folder_transfer_messages_to): Likewise, add "GPtrArray
523 (transfer_messages_to): Update default implementation to handle
526 * camel-disco-folder.c (disco_append_message,
527 disco_transfer_messages_to): Update for API changes.
529 * camel-disco-diary.c (camel_disco_diary_replay): Update the
530 diary's temporary uid->real uid map when replaying appends and
533 * providers/imap/camel-imap-folder.c (imap_append_offline,
534 imap_append_online, imap_transfer_offline): Pass back the new
535 UIDs, when requested and available.
536 (imap_append_resyncing): Pass back the new UIDs when requested and
537 available. Remove the diary uidmap managing code since
538 CamelDiscoDiary can handle that itself now.
539 (imap_transfer_online, imap_transfer_resyncing): Update for new
540 APIs, but don't actually pass back the new UIDs yet. (It's tricky
541 since the COPYUID response may not be in the same order as the
544 * providers/local/camel-maildir-folder.c (maildir_append_message):
545 Pass back the new UID if requested.
547 * providers/local/camel-mbox-folder.c (mbox_append_message):
550 * providers/local/camel-mh-folder.c (mh_append_message): Likewise.
552 * providers/local/camel-spool-folder.c (spool_append_message):
555 * camel-digest-folder.c (digest_append_message,
556 digest_transfer_messages_to): Update for API changes.
558 * camel-filter-driver.c (camel_filter_driver_filter_message,
559 do_copy, do_move): Update for API changes.
561 * camel-vee-folder.c (vee_append_message,
562 vee_transfer_messages_to): Likewise.
564 * camel-vtrash-folder.c (vtrash_append_message,
565 vtrash_transfer_messages_to): Likewise.
567 2002-05-13 Not Zed <NotZed@Ximian.com>
569 * camel-folder-thread.c
570 (camel_folder_thread_messages_new_summary):
571 (camel_folder_thread_messages_new): Since the fix for #3357 uses
572 'order=0' to indicate tree structure nodes, make sure we dont
573 actually set order=0 for valid messages, otherwise we silently
574 lose duplicates of the first message (i==0). Fixes #19920.
576 2002-05-10 Jeffrey Stedfast <fejj@ximian.com>
578 * providers/imap/camel-imap-folder.c (imap_get_message): Fetch the
579 BODYSTRUCTURE rather than BODY since BODY seems to be lacking some
580 of the data we need. This fixes bug #24136.
582 * camel-transport.c (camel_transport_get_type): Might help if we
583 called camel_transport_class_init.
585 2002-05-10 Dan Winship <danw@ximian.com>
587 * camel-folder.c (camel_folder_transfer_messages_to): Replace
588 copy_messages_to and move_messages_to with a single function that
589 just takes a "delete_originals" flag. Also, use the vtrash
590 implementation if *either* folder is a vtrash.
591 (transfer_messages_to): Make this use camel_operation_progress
592 (previously move_messages_to did but copy_messages_to didn't), and
593 freeze/thaw the folder(s) if doing multiple messages.
595 * camel-vtrash-folder.c (vtrash_transfer_messages_to): Update for
596 move/copy merge. Move the "move messages into vtrash" code here
597 from mail-ops.c. Now all of the vtrash move/copy special casing is
598 in camel instead of half of it being here and half in mail/. (This
599 should also make it so that "Move to Trash" will work in filter
602 * camel-vee-folder.c (vee_transfer_messages_to): Make this just
603 return an exception, since it will only be called when trying to
604 move/copy messages from one vfolder to another.
605 (vee_append_message): Add this too so we get a nicer error message
606 than the default "unimplemented" one in camel-folder.c.
608 * camel-digest-folder.c: Replace copy_messages_to and
609 move_messages_to with transfer_messages_to.
611 * camel-disco-folder.c: Likewise
613 * camel-disco-diary.c (camel_disco_diary_log,
614 camel_disco_diary_replay): replace MOVE/COPY with TRANSFER.
616 * providers/imap/camel-imap-folder.c (imap_transfer_offline,
617 imap_transfer_online, imap_transfer_resyncing): Update for
618 changes. (This ends up being a bit more complicated than it was
619 before for now, but later disconnected operation changes should
622 * camel-filter-driver.c (camel_filter_driver_filter_message,
623 do_copy, do_move): Use transfer_messages_to instead of copy.
625 2002-05-09 Jeffrey Stedfast <fejj@ximian.com>
627 * camel-filter-search.c (shell_exec): New filter function to pipe
628 a message to another program.
629 (run_command): Fixed some bugs to make this work.
631 2002-05-09 Not Zed <NotZed@Ximian.com>
633 * camel-service.c (camel_service_disconnect): Instead of testing
634 for SERVICE_CONNECTED, we need to also handle SERVICE_CONNECTING
635 too, as it will often have setup some details before it failed.
636 Make it !DISCONNECTED (and !DISCONNECTING for recursive calls,
637 which happen). Fixes #23782, and maybe also #21604 and many other
640 2002-05-08 Jeffrey Stedfast <fejj@ximian.com>
642 * camel-digest-store.c (digest_setv): Implemented.
643 (digest_getv): Implemented.
645 * camel-disco-store.c (disco_setv): Implemented.
646 (disco_getv): Implemented.
648 * camel-remote-store.c (remote_store_setv): Implemented.
649 (remote_store_getv): Implemented.
651 * camel-transport.c (camel_transport_class_init): Implemented.
652 (transport_setv): Implemented.
653 (transport_getv): Implemented.
655 * camel-store.c (store_setv): Implemented.
656 (store_getv): Implemented.
658 * camel-service.c (service_setv): Implemented.
659 (service_getv): Implemented.
661 * providers/pop3/camel-pop3-store.c (pop3_try_authenticate):
662 camel_pop3_engine_iterate doesn't return the state, it returns -1
663 on fail, 0 when finished processing request or >0 if more ops are
664 in the queue, so don't check status against CAMEL_POP3_STATE_OK,
665 instead check pcp->state against that.
667 2002-05-07 Jeffrey Stedfast <fejj@ximian.com>
669 * camel-object.h: s/class/klass for arguments so that c++
670 developers don't complain later.
672 2002-05-07 Dan Winship <danw@ximian.com>
674 * camel-object.c (camel_object_class_cast): Fix a crash in a
677 2002-05-07 Not Zed <NotZed@Ximian.com>
679 * camel-remote-store.c (remote_send_string): Check for LOGIN xxxx
680 as well if debug is on, so we dont print passwords to evolution
683 * providers/imap/camel-imap-utils.c (imap_is_atom_char): This was
684 really broken. 1. isprint() is locale dependent, and 2. it looked
685 up an 8 bit value in a 7 bit table without truncating it. I've
686 removed the isprint() stuff and just put it directly into the
687 special table, which i've expanded to the right size too.
689 * providers/imap/*: Applied patch from Preston Elder
690 <prez@magick.tm> to make camel only use literals if it needs to
691 for simple strings. Changed slightly to use imap_is_atom() and
692 more consistent formatting.
693 providers/imap/camel-imap-utils.c (imap_is_atom): Chagned from
694 imap_needs_quoting().
696 ** Merged in camel-object2 branch. Simpler camelobject
697 implementation + object args interface.
699 * camel.c (camel_init): Call camel_object_get_type() to make sure
700 camel_object_type is initialised.
702 * camel-object.h (CAMEL_OBJECT_TYPE): Changed to return global
703 camel_object_type pointer, not call camel_object_get_type.
705 2002-05-06 Jeffrey Stedfast <fejj@ximian.com>
707 * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): If
708 the pop3 command status is -1, then we probably have a TCP error
709 (?) so set a SYSTEM exception so our caller can distinguish
710 between a "bad password" and a "tcp error".
711 (pop3_connect): Only uncache the password on "bad password"
714 * camel-pgp-mime.c (pgp_mime_part_sign_prepare_part): Use
715 CamelMimeFilterBestenc to get a more appropriate encoding rather
716 than just blindling assigning QP.
718 * providers/imap/camel-imap-folder.c (do_append): Call
719 camel_mime_message_encode_8bit_parts() which fixes bug #10885.
721 * camel-tcp-stream-raw.c (socket_connect): Don't bother with
722 counting down the timeout.
724 2002-05-02 Jeffrey Stedfast <fejj@ximian.com>
726 * camel-stream-fs.c (stream_read): Same fix as the tcp stream.
727 (stream_write): Again here. Just like tcp stream's stream_write(),
728 also make sure to save errno before calling fcntl to restore the
731 * camel-tcp-stream-raw.c (stream_read): Handle EINTR errors for
733 (stream_write): Same and also preserve errno when setting the fd
734 flags back. If w == -1, return -1.
736 2002-05-02 Jeffrey Stedfast <fejj@ximian.com>
738 * camel-mime-utils.c (header_decode_mailbox): Fixed the fix for
739 stupidly-broken-mailer bug #5 to work when multiple unescaped
740 characters were in a row. Fixes bug #24140.
742 * camel-tcp-stream-raw.c (socket_connect): Check select() for
745 * camel-pgp-context.c (crypto_exec_with_passwd): Change the order
746 of some code so that we check if the select() failed before we
747 check for user-cancellation.
749 * camel-service.c (camel_gethostbyname): Check for EINTR when
751 (camel_gethostbyaddr): Same.
753 2002-04-29 Jeffrey Stedfast <fejj@ximian.com>
755 * camel-provider.c (camel_provider_auto_detect): Now takes a
756 CamelURL argument rather than a GHashTable *settings argument.
758 2002-04-29 Not Zed <NotZed@Ximian.com>
760 * providers/local/camel-spool-store.c (get_folder_info): We want
761 to set unread_count to get_unread_message_count, not
762 get_message_count(). Might fix #17174. Also removed FIXME: as it
765 2002-04-26 Jeffrey Stedfast <fejj@ximian.com>
767 * providers/local/Makefile.am: Don't link to libibex.a anymore.
769 * providers/nntp/Makefile.am: Same.
771 * providers/imap/Makefile.am: And again here.
773 * camel-store-summary.h: No longer want to #include
776 * camel-provider.c (camel_provider_auto_detect): New function to
777 auto-detect configuration settings.
779 2002-04-26 Not Zed <NotZed@Ximian.com>
781 * camel-block-file.c (block_file_validate_root): Remove the
782 excessive \n's, after printfs.
784 * camel-text-index.c (text_index_compress_nosync): @!#$@#$!@$#!.
785 Since the rename op was fixed, this broke compression's rename,
786 resulting in the index 'vanishing' after every compress
787 (i.e. after every reindex). Fix this code to account for the
788 fixed rename operation.
790 2002-04-25 Jeffrey Stedfast <fejj@ximian.com>
792 * providers/smtp/camel-smtp-transport.c (smtp_rcpt): Don't put a
793 space between the "RCPT TO:" and the "<recipient>" strings -
794 rfc0821 was not clear on this but it seems rfc2821 defines a
795 grammar excluding that SP.
798 2002-04-24 Jeffrey Stedfast <fejj@ximian.com>
800 * providers/local/camel-local-provider.c
801 (camel_provider_module_init): Configure the default paths for mh,
802 mbox, maildir, spools, etc.
804 * camel-provider.h: Add a CAMEL_PROVIDER_CONF_LABEL enum and
805 define some default CamelProviderConfEntry macros.
807 2002-04-19 Jeffrey Stedfast <fejj@ximian.com>
809 * providers/pop3/camel-pop3-folder.c (pop3_refresh_info): Free the
812 * camel-data-cache.c (data_cache_finalise): Free the cdc->path.
814 * camel-multipart.c (write_to_stream): Don't g_return_val_if_fail
815 here if the boundary is an empty string. See bug #23676 for
816 details. The way I see it, we have 2 options: 1) leave this fix
817 the way it is, thus allowing multipart boundaries to be
818 empty-strings; or 2) make camel_multipart_get_boundary() change
819 the boundary to something legal if the boundary is an
820 empty-string. Since the parser should be able to handle an
821 empty-string boundary *and* more importantly because we want to
822 keep the same boundaries as the original raw message so as to be
823 able to verify multipart/signed parts, I vote for solution #1.
825 2002-04-19 Not Zed <NotZed@Ximian.com>
827 * devel-docs/camel-index.txt: Start of a white-paperish document
828 describing camel-index and older libibex.
830 2002-04-18 Not Zed <NotZed@Ximian.com>
832 * providers/local/camel-local-store.c (rename_folder): If we get a
833 failure, make sure we set an exception.
835 * camel-text-index.c (camel_text_index_rename): If the file
836 doesn't exist, just assume it never did, dont return failure.
837 (text_index_rename): Add '.index' to the path name we're using,
838 since we dont get it passed in.
840 * camel-folder-search.c (check_header): When doing a contains
841 match, split the words and perform an and on it.
842 (match_words_messages): If we have an index, but were forced to do
843 a full search, first lookup a subset of messages using
844 the index and a simplified word set. Only do a manual search of
847 2002-04-17 Not Zed <NotZed@Ximian.com>
849 * camel-folder-search.c (match_message_index): Changed to take a
850 utf8 string not a regex pattern.
851 (match_words_index): Matches against a camel_search_words list.
852 (match_words_1message): Matches a single message against a
853 camel_search_words list.
854 (match_words_message): Same, but gets the message from the folder
856 (match_words_messages): Matches a list of messages against a words
858 (search_body_contains): Rewritten to handle multiple word
859 searches. For #23371.
861 * providers/imap/camel-imap-search.c (sync_match): Split words
862 when searching, to support multiple search words. Also, try
863 searching specifying charset of utf8 if we can, if that fails,
864 fall back to not specifying charset. TODO: It should translate
865 the strings into the locale default charset?
867 * providers/imap/camel-imap-store.c (connect_to_server): Added new
868 cap - utf8_search, if set, we tell the server we're searching
869 using utf8, otherwise we dont (incorrectly, since we always use
872 * camel-search-private.c (camel_ustrstrcase): Make this class public.
873 (camel_search_words_split): Split a word into multiple words based
874 on whitespace, and keep track of whether the word is simple
875 (indexable directly), or not.
876 (camel_search_words_free): Free 'em.
878 2002-04-17 Jeffrey Stedfast <fejj@ximian.com>
880 * camel-vee-folder.c (vee_search_by_expression): If the vee-folder
881 is the unmatched, we don't have our own expression so we cannot
882 merge them. Instead, just use the expression passed in. This fixes
883 a Null-Pointer-Read crash on Solaris systems at least.
885 2002-04-16 Jeffrey Stedfast <fejj@ximian.com>
887 * camel-filter-driver.c (camel_filter_driver_filter_folder): Get
888 rid of an unused variable.
890 * providers/smtp/camel-smtp-transport.c (smtp_helo): Use
891 camel_gethostbyaddr since gethostbyaddr is not reentrant.
893 * camel-http-stream.c (http_connect): Updated after the rename of
894 camel_get_host_byname.
896 * camel-service.c (camel_gethostbyname): Renamed.
897 (camel_gethostbyaddr): New cancellable/reentrant version of
900 2002-04-14 Jeffrey Stedfast <fejj@ximian.com>
902 * providers/local/camel-spoold-store.c: Added #include
903 <sys/types.h> for dirent.h which needs it on MacOS X.
905 * providers/local/camel-maildir-store.c: Same.
907 * providers/nntp/camel-nntp-store.c: Same.
909 * providers/imap/camel-imap-message-cache.c: Same.
911 * camel-provider.c: Same.
913 * camel-data-cache.c: Same.
915 2002-04-12 Jeffrey Stedfast <fejj@ximian.com>
917 * broken-date-parser.c (datetok): Treat commas as token
919 (WEEKDAY_CHARS): Use full weekday names in case the broken mailer
921 (MONTH_CHARS): Same as above but for months.
923 2002-04-15 Not Zed <NotZed@Ximian.com>
925 * *.c: Fix callers for api changes to camel-object, mainly
926 declare_event->add_event, and classfuncs->klass, and a couple
927 of missing #include <config.h>'s
929 * camel-arg.[ch], Makefile.am: New support code for
930 camel_object_get/set arg.
932 * *.h: Fixed all uses of get_type to return a CamelType rather
933 than a guint (now a pointer).
935 * camel-object.[ch]: Major cleanup of object implementation. Also
936 added a get/set interface, and some debugging options.
938 2002-04-11 Not Zed <NotZed@Ximian.com>
940 * providers/local/camel-spool-summary.c (spool_summary_sync_full):
941 If the last message(s) were deleted, and we had any messages
942 output, account for the lost \n of the following From line by
943 adding an extra \n. fix for #8214.
945 2002-04-10 Not Zed <NotZed@Ximian.com>
947 * camel-mime-part-utils.c (convert_buffer): If we get a 0 length
948 input, return a 0 lenght output as valid - fixes bugs with some
949 iconv impl and its simpler anyway.
951 2002-04-11 Jeffrey Stedfast <fejj@ximian.com>
953 * providers/imap/camel-imap-folder.c: Set the UID_SET_LIMIT value
954 to 4096. I ran into an issue tonight where apparently the IMAP
955 server changed the UIDVALIDITY and so Evo needed to re-fetch all
956 headers and it was trying to send a uid set of some 25k (yes, I
957 have a very large INBOX). Anyways, it was set to unlimited
958 before. Courier IMAPd can safely handle up to ~16k per token, but
959 UW IMAPd can only handle 8k per command-line, so I set it to 4k
962 2002-04-10 Jeffrey Stedfast <fejj@ximian.com>
964 * camel-mime-part-utils.c (convert_buffer): Fixed a bug that would
965 miscalculate how much data to copy into the GByteArray (negative
966 value) thus causing a segfault. Also optimized it while I was at
969 2002-04-09 Jeffrey Stedfast <fejj@ximian.com>
971 * camel-store.c (camel_store_init): Make the folder_lock
972 recursive. See bug #22363 for details. Basically,
973 get_folder_info() is requesting a diary folder which in turn
974 connects which requests then calls get_folder() but deadlocks
975 because get_folder_info already holds the lock.
977 * camel-mime-message.c (camel_mime_message_set_date): Don't adjust
978 the timezone offset if we used tm.tm_gmtoff because it is already
981 2002-04-09 Not Zed <NotZed@Ximian.com>
983 * camel-mime-part.c (construct_from_parser): If we get multiple
984 Content-Type header values, change subsequent headers to
985 X-Invalid-Content-Type so it doesn't wreck processing. This fixes
986 the reported case in #18929, but i dont know if it fixes the
987 original posters problems.
989 2002-04-08 Not Zed <NotZed@Ximian.com>
991 * camel-vtrash-folder.c (vtrash_move_messages_to): If we find
992 we're moving from the vtrash to another folder, we need to convert
993 the uid from a vfolder uid to the source uid (+8). Fix for
994 #20886. Also changed to batch multiple moves to different folders
995 so they are done as efficiently as possible rather than one at a
998 * camel-mime-utils.c (base64_decode_step): If we only get passed
999 '=', we back track only if we actually output any data. Fix for
1001 (quoted_decode): Pass out size_t instead of int, and use 0 instead
1002 of -1 for error since its not signed. This will fix similar bug
1003 to above in different circumstances since the result is taken as
1004 unsigned. This is only an internal func.
1005 (quoted_encode): Return size_t just for consistency.
1007 * camel-block-file.c (block_file_validate_root): Comment out the
1008 debug and move it into a warning when the validation fails.
1010 2002-04-08 Jeffrey Stedfast <fejj@ximian.com>
1012 * camel-mime-utils.c (uuencode_close): Don't count our filler when
1013 encoding our line-length octet.
1015 2002-04-05 Jeffrey Stedfast <fejj@ximian.com>
1017 * camel-http-stream.c (http_get_headers): Don't get the statuscode
1019 (http_method_invoke): Use a User-Agent header and do basic proxy
1021 (stream_read): Handle redirects.
1022 (camel_http_stream_set_user_agent): New function to allow client
1023 to set the User-Agent string.
1024 (camel_http_stream_set_proxy): New function for setting the proxy
1026 (camel_http_stream_set_proxy_authrealm): New function for setting
1027 the proxy auth realm.
1028 (camel_http_stream_set_proxy_authpass): New function for setting
1029 the proxy auth password.
1031 2002-04-04 Jeffrey Stedfast <fejj@ximian.com>
1033 * camel-folder-summary.c (message_info_new): Simplified since we
1034 can now decode in-reply-to without getting extra cruft. Get rid of
1035 the FIXME about having to check scan->id because of the
1036 possibility of it being NULL, this can no longer happen.
1038 * camel-mime-utils.c (header_references_inreplyto_decode): New
1039 function to decode in-reply-to headers. Only grabs the first thing
1040 that looks like a message-id and then returns.
1041 (header_references_decode): Loop calling
1042 header_references_decode_single (a new internal function).
1044 2002-04-04 Not Zed <NotZed@Ximian.com>
1046 * providers/imap/camel-imap-search.c (imap_body_contains): If
1047 (body-contains) is not passed any arguments, return empty/false.
1048 Fixes a crash exposed by #15001.
1050 * camel-remote-store.c (remote_connect): Reset the keepalive
1051 timeout to 10 minutes rather than the 30 seconds I was using for
1054 2002-04-03 Dan Winship <danw@ximian.com>
1056 * camel-provider.h (CamelProvider): make service_cache be an array
1057 of CAMEL_NUM_PROVIDER_TYPES elements so you can have a single
1058 provider offer both stores and transports. (Eg, Exchange, NNTP)
1060 * providers/imap/camel-imap-provider.c: Don't initialize
1061 service_cache here. (The session code can do it itself since the
1062 url_hash and url_equal functions are stored as part of the
1065 * providers/nntp/camel-nntp-provider.c: Likewise.
1067 * providers/local/camel-local-provider.c: Likewise.
1069 * providers/pop3/camel-pop3-provider.c: Likewise.
1071 * providers/sendmail/camel-sendmail-provider.c: Likewise.
1073 * providers/smtp/camel-smtp-provider.c: Likewise.
1075 * camel-session.c (register_provider): Initialize the provider's
1076 service cache(s) here.
1077 (camel_session_class_init): Don't initialize.
1078 vee_provider.service_cache here.
1079 (camel_session_destroy_provider): Update to destroy multiple
1081 (service_cache_remove, get_service): Tweak these a bit to deal
1082 with multiple service_caches.
1084 2002-04-02 Jeffrey Stedfast <fejj@ximian.com>
1086 * camel-tcp-stream-ssl.c (set_errno): Handle a ton more nspr i/o
1088 (stream_connect): Act as if we are doing a non-blocking
1089 connect. This is to try and work around bug #15120 where users get
1090 an EINPROGRESS error. Maybe importing a PRFileDesc into SSL mode
1091 automagically makes it non-blocking? I dunno.
1093 2002-04-01 Jeffrey Stedfast <fejj@ximian.com>
1095 * camel-folder-summary.c (message_info_new): Updated the
1096 construction of the references to match JWZ's updated algorithm
1097 initialization (ie, append any In-Reply-To reference onto any
1098 References header and never take more than a single message-id
1099 from the In-Reply-To header since anything after the first will
1100 probably just be email addresses). Fixes bug #1336.
1102 2002-04-03 Not Zed <NotZed@Ximian.com>
1104 * providers/local/camel-local-folder.c
1105 (camel_local_folder_construct): Turn indexing back on, fingers
1108 * camel-block-file.c (sync_nolock): #!@$@$#@~#$
1109 DF@#$!Q@$#!@$#!#%. Well it helps if we're iterating a list to
1110 iterate the node pointer ...
1112 * camel-text-index.c (text_index_sync): Sync the key tables
1114 (text_index_sync): Debug out frag info.
1115 (camel_text_index_dump): Added a (rather large, but optional) raw
1116 dumping mode for debugging purposes.
1118 * camel-partition-table.c (camel_key_table_finalise): Sync root
1120 (camel_key_table_sync): New function, sync key table (root) explicitly.
1121 (camel_partition_table_sync): Method to explicitly sync the
1124 2002-04-02 Not Zed <NotZed@Ximian.com>
1126 * camel-block-file.c (camel_block_file_free_block): Mark root
1127 block dirty when we change it (this function isn't used yet
1130 * camel-text-index.c (text_index_add_name_to_word): Touch the root
1131 block when we modify the counts. Also, abort processing on any
1133 (text_index_sync): Fix typo in comments. Sync the block file
1135 (text_index_compress_nosync): Lock the old index while we're
1137 (text_index_compress_nosync): Remove the bogus while() at the end
1138 of the while() loops! Also plug a memleak - records weren't
1140 (text_index_rename): Lock around rename op.
1141 (text_index_add_name): More typos.
1142 (text_index_sync): Touch root when changing it.
1143 (text_index_add_name): "
1144 (text_index_delete_name): "
1145 (camel_text_index_new): Touch root if we change it.
1146 (text_index_cursor_reset): Make sure we NULL pointers after we
1147 free them (nothing uses this yet).
1149 * camel-partition-table.c (hash_key): Remove some debug
1150 accidentally left in.
1151 (camel_partition_table_add): When linking in the next block list,
1152 set the right previous pointer.
1153 (camel_key_table_add): Simplify the 'left' calculation (it was
1155 (camel_key_table_next): Initialise returns before processing.
1156 Broaden the lock slightly, and simplify validity calculations.
1158 * providers/imap/camel-imap-store.c (imap_keepalive): Put back in
1159 the exception setup stuff i disabled for debugging.
1161 * providers/local/camel-local-folder.c
1162 (camel_local_folder_construct): Temporarily disable indexing.
1164 2002-03-28 Not Zed <NotZed@Ximian.com>
1166 * camel-partition-table.c (camel_key_table_lookup): Change range
1167 checking assert to a warning.
1169 * providers/pop3/camel-pop3-folder.c (pop3_finalize): Make sure we
1170 flush out all outstanding commands before finalising, stops being
1171 finalised while outsanding requests are processed by the store
1173 (pop3_get_message): Instead of pre-fetching all messages, just
1174 pre-fetch a maxiumum number at any one time, stops us running out
1177 * providers/nntp/camel-nntp-folder.c (nntp_folder_init/finalise):
1178 Setup priv data + locks, & free.
1180 * providers/imap/camel-imap-folder.c (imap_rescan): Batch all
1181 message_chagned events into a single folder_changed event
1182 (otherwise updates can be >>> expensive, like >5 hours for 80K
1183 messages changing!). Alternately it could use folder
1184 freeze/unfreeze perhaps.
1186 2002-03-27 Not Zed <NotZed@Ximian.com>
1188 * providers/imap/camel-imap-store.c (imap_keepalive): Pass an
1189 exception to called code so it behaves properly since it uses the
1190 passed exception to check returns.
1192 2002-04-01 Dan Winship <danw@ximian.com>
1194 * providers/imap/Makefile.am (libcamelimap_la_LDFLAGS): Use
1195 -avoid-version instead of -version-info 0:0:0, and specify
1196 -module. (From Max Horn <max@quendi.de>).
1198 * providers/local/Makefile.am (libcamellocal_la_LDFLAGS): Likewise.
1200 * providers/nntp/Makefile.am (libcamelnntp_la_LDFLAGS): Likewise.
1202 * providers/sendmail/Makefile.am (libcamelsendmail_la_LDFLAGS):
1205 * providers/smtp/Makefile.am (libcamelsmtp_la_LDFLAGS): Likewise.
1207 * providers/pop3/Makefile.am (libcamelpop3_la_LDFLAGS): Likewise.
1208 Also remove $(KRB4_LDFLAGS) since KPOP is gone.
1209 (INCLUDES): and $(KRB4_CFLAGS)
1211 2002-03-28 Jeffrey Stedfast <fejj@ximian.com>
1213 * camel-filter-driver.c (do_copy): We now have to check to make
1214 sure that p->message is non-NULL because we only load the message
1216 (do_move): Same here.
1218 2002-03-28 Dan Winship <danw@ximian.com>
1220 * camel-transport.c (camel_transport_send_to): Change the message
1221 arg to a CamelMimeMessage instead of a CamelMedium. Even the NNTP
1222 provider returns CamelMimeMessages, and we're never going to
1223 support anything more exotic than that. Also do a few more
1224 g_return_if_fails here instead of in the providers.
1225 (camel_transport_can_send): No longer needed.
1226 (camel_transport_send): Remove this too. It wasn't being used any
1227 more, and it doesn't behave exactly the same in sendmail and smtp.
1229 * providers/smtp/camel-smtp-transport.c (smtp_send,
1230 smtp_can_send): Gone.
1231 (smtp_send_to): Update for arg change.
1232 (smtp_data): Make this take a CamelMimeMessage too.
1234 * providers/sendmail/camel-sendmail-transport.c (sendmail_send,
1235 sendmail_can_send): Gone.
1236 (sendmail_send_to): Update for arg change, and merge in the part
1237 that used to be shared with sendmail_send.
1239 2002-03-27 Jeffrey Stedfast <fejj@ximian.com>
1241 * camel-filter-driver.c (camel_filter_driver_filter_folder):
1242 Construct the source_url the right way. The previous way was
1243 generating urls like pop://fejj@ximian.com;keep_on_server/inbox
1246 2002-03-26 Not Zed <NotZed@Ximian.com>
1248 * camel-text-index.c (text_index_normalise): Changed to use just
1249 g_utf8_strdown instead of utf8_normalise, to match the indexing
1250 code. utf8_normalise is just far too expensive (saves approx 25%
1253 2002-03-25 Not Zed <NotZed@Ximian.com>
1255 * camel-text-index.c (text_index_add_name): When we add a new
1256 name, up all of the cache limits, because we're probably going to
1258 (text_index_sync): Drop the cache limits back down again, we dont
1259 need them when looking words up.
1261 ** MERGE camel_index branch.
1263 * camel-text-index.[ch]: Added files i forgot to add (eep nearly
1264 lost all this work!)
1266 * camel-block-file.c (sync_nolock): Fix an infinite loop in syncing.
1268 2002-03-21 Jeffrey Stedfast <fejj@ximian.com>
1270 * camel-folder-summary.c (camel_message_info_new_from_header): Use
1271 the date in the received header for the received_date.
1273 2002-03-22 Not Zed <NotZed@Ximian.com>
1275 * providers/local/camel-local-folder.c
1276 (camel_local_folder_construct): Use the right option to remove the
1277 index file and reset the index file on creation.
1278 (camel_local_folder_construct): Remove any existing '.ibex' files
1279 - these are the old format index files.
1281 * camel-block-file.c (camel_block_file_rename): Lock io lock while
1283 (camel_key_file_rename): Lock around rename.
1284 (block_file_validate_root): Implement sync flag checking.
1285 (camel_block_file_touch_block): Turn off the sync flag if we're
1286 touching any non-root block and write it to disk. Shoudl this
1288 (sync_nolock): sync the root block only if we need to.
1290 * providers/local/camel-local-store.c (rename_folder): Re-enable
1291 index rename code. Not sure how race-free it is though.
1292 (delete_folder): Delete the index file properly.
1294 * camel-partition-table.c (camel_key_table_lookup): Initialise
1295 output values to 0 before doing anything.
1296 (camel_key_table_add): Do some range-checking on values.
1298 * camel-text-index.c (text_index_compress): Changed to call sync here.
1299 (text_index_compress_nolock): and not here - stops a recursive
1300 sync call when sync performs a compress also.
1301 (text_index_compress_nolock): Change to _nosync, since the locking
1302 is irrelevent (recursive lock). Fixed callers.
1303 (text_index_add_name_to_word): If we get a failure with key table
1304 ops, fail immediately.
1305 (text_index_compress_nosync): Likewise.
1306 (text_index_write_name): If the nameid is 0, do nothing.
1307 (text_index_add_name): If we can't get a keyid, dont add it to the
1309 (camel_text_index_remove): Function to delete an index file.
1310 (text_index_compress_nosync): Clean up temp files when done.
1312 * camel-folder-search.c (match_messages_index): New function,
1313 split from body_contains, matches a regex against all words in an
1315 (match_message_index): Similar to above but matches against an
1317 (search_body_contains): Changed to use above functions for
1318 matching - substring matches should now work on indexed data.
1320 2002-03-21 Not Zed <NotZed@Ximian.com>
1322 * camel-index.c (camel_index_words/names): New virtual
1323 methods/stubs to get a cursor of all words and names.
1325 * camel-text-index.c (text_index_compress_nolock): Split from
1326 text_index_compress, so we can call the compressor while locked
1327 also, removed lock calls.
1328 (text_index_compress): Changed to stub which calls
1329 text_index_compress_nolock.
1330 (camel_text_index_key_cursor_new): New object to iterate through
1332 (text_index_words, text_index_names): Implement virtual functions
1333 for iterating through all words or names.
1335 * camel-block-file.c: Turn off some debug.
1337 2002-03-20 Not Zed <NotZed@Ximian.com>
1339 ** New body index implementation.
1341 * camel-index*: Code for camel index, a new class to replace ibex.
1343 * camel-block-file.[ch]: block-based and link based
1344 filesystem-in-a-file classes.
1346 * camel-partition-table.[ch]: An implementation of a partition
1347 table (automatically extending on-disk hash-table using ideal
1348 hash), and a key-table, a key<>name mapping table. Used by
1351 * providers/local/*, camel-folder-summary.[ch]: Changed to use
1352 camel-index interface rather than ibex.
1354 2002-03-05 Not Zed <NotZed@Ximian.com>
1356 * providers/local/camel-maildir-summary.c (maildir_summary_check):
1357 Do progress reporting of operations.
1358 (maildir_summary_sync): Same here.
1360 2002-03-04 Not Zed <NotZed@Ximian.com>
1362 * providers/local/camel-spoold-store.c (scan_dir): Kill a warning
1365 * providers/local/camel-*.c: Changed for ibex->camelindex.
1367 * camel-folder-search.c (camel_folder_search_set_summary): Init
1368 summary_hash to point to 'static' uid strings.
1369 (search_body_contains): Use the static uid memory to return
1370 results rather than the values from the index library.
1372 * camel-folder-search.[ch]: Changed to use camelindex object.
1374 * camel-folder-summary.c (summary_build_content_info_message):
1375 Use a stream to index content, also filter html mail first.
1376 (camel_folder_summary_info_new_from_message): Use a stream
1377 filtered to index content.
1378 (main): Removed the test main code. Added headers for open call
1379 (ibex must've had them before).
1381 * camel-folder-summary.[ch]: Changed from ibex to CamelIndex.
1383 * camel-mime-filter-index.c (camel_mime_filter_index_finalize):
1386 * camel-mime-filter-index.[ch]: Changed from ibex to CamelIndex.
1388 2002-03-19 Jeffrey Stedfast <fejj@ximian.com>
1390 * camel-mime-utils.c (header_encode_param): Fix this to work
1391 right. We need to convert the input buffer to the charset we claim
1392 in the encoded param (duh).
1394 2002-03-18 Jeffrey Stedfast <fejj@ximian.com>
1396 * providers/smtp/camel-smtp-transport.c
1397 (connect_to_server_wrapper): Updated to use the same logic as the
1400 * providers/pop3/camel-pop3-store.c (connect_to_server): No longer
1401 takes a stls_supported argument since we no longer need it with
1403 (connect_to_server_wrapper): New logic: First try connecting to
1404 the SSL port (995 by default), if that fails with
1405 SERVICE_UNAVAILABLE, then we attempt to connect (to port 110 by
1406 default) and try to use STARTTLS.
1408 2002-03-15 Jeffrey Stedfast <fejj@ximian.com>
1412 * camel-private.h: Don't allow any empty structs. If
1413 !ENABLE_THREADS, provide a gpointer dummy member. Fixes bug #6382.
1415 2002-03-13 Jeffrey Stedfast <fejj@ximian.com>
1417 * providers/smtp/camel-smtp-transport.c (smtp_auth): Added a
1418 work-around for SMTP servers that can't read the RFCs and thus
1419 implement SASL incorrectly. Oh well, that's life in the world of
1420 mail clients I guess.
1422 2002-03-12 Jeffrey Stedfast <fejj@ximian.com>
1424 * camel-digest-store.c (camel_digest_store_new): Now takes a url
1427 * camel-digest-folder.c (digest_add_multipart): Fixed some memory
1428 corruption and also modified to use CAMEL_IS_MIME_MESSAGE() rather
1429 than comparing content-type strings.
1430 (digest_get_message): Fixed a logic blooper.
1432 * camel-folder-summary.c (camel_message_info_new_from_header): Set
1433 the date fields of the CamelMessageInfo as well. This may even fix
1434 some filter-related bugs where the user was trying to compare
1437 2002-03-11 Jeffrey Stedfast <fejj@ximian.com>
1439 * camel-digest-store.c: A pretty empty store implementation to be
1440 the parent store of a CamelDigestFolder.
1442 * camel-digest-folder.c: Updated to reference it's parent store.
1444 2002-03-11 Jeffrey Stedfast <fejj@ximian.com>
1446 * camel-digest-folder.c (camel_digest_folder_new): Allow any leaf
1447 part to be a message/rfc822 part.
1448 (digest_get_uids): Recurse the mime structure and add all
1449 message/rfc822 parts and use a uid scheme similar to IMAP's mime
1450 part naming convention.
1451 (digest_get_message): Decode the uid to get the correct mime part.
1453 2002-03-11 Ettore Perazzoli <ettore@ximian.com>
1455 * camel-mime-utils.c: Change the order of the mailing list magic
1456 patterns so that the more mailing-list specific ones are on the
1459 2002-03-11 Jeffrey Stedfast <fejj@ximian.com>
1461 These fixes should fix bug #21737.
1463 * providers/smtp/camel-smtp-transport.c
1464 (connect_to_server_wrapper): Same as with the POP code.
1466 * providers/pop3/camel-pop3-store.c (connect_to_server_wrapper):
1467 Slight restructuring of the if-statements for the USE_SSL_ALWAYS
1468 case so that we can't possibly return TRUE unless we really did
1469 connect successfully.
1471 2002-03-10 Dan Winship <danw@ximian.com>
1473 Rename the OpenSSL implementation of things to match the NSS
1474 implementation so that callers don't need to care which one is
1477 * camel-tcp-stream-openssl.c: Implement CamelTcpStreamSSL, not
1478 CamelTcpStreamOpenSSL. Rename methods as well. Replace the
1479 camel-tcp-stream-openssl.h include with camel-tcp-stream-ssl.h.
1481 * camel-tcp-stream-openssl.h: Gone.
1483 * camel-tcp-stream-ssl.c: Add a note explaining that this
1484 implementation is only used for NSS, and that OpenSSL's
1485 implementation is in another file. (Should probably do some CVS
1486 renaming magic at some point.)
1488 * camel-http-stream.c (http_connect): Remove OpenSSL refs; the
1489 previously-NSS-specific code works for both now.
1491 * camel-remote-store.c: Likewise.
1493 * providers/smtp/camel-smtp-transport.c: Likewise.
1495 * providers/pop3/camel-pop3-store.c: Likewise.
1497 * Makefile.am (libcamelinclude_HEADERS): Remove
1498 camel-tcp-stream-openssl.h
1500 2002-03-10 Dan Winship <danw@ximian.com>
1502 * camel-tcp-stream.c (camel_tcp_stream_get_socket): Remove this:
1503 it couldn't be generically used, because different subclasses
1504 returned entirely different types of data.
1505 (camel_tcp_stream_get_local_address,
1506 camel_tcp_stream_get_remote_address): Add these to replace what
1507 get_socket was being used for.
1508 (camel_tcp_address_new, camel_tcp_address_free): Utility functions
1509 for get_{local,remote}_address.
1511 * providers/smtp/camel-smtp-transport.c: Change localaddr to a
1513 (connect_to_server): Call camel_tcp_stream_get_local_address to
1514 get the local IP address.
1515 (smtp_disconnect): free localaddr.
1516 (smtp_helo): Update for localaddr change.
1518 * camel-tcp-stream-raw.c (stream_get_socket): Remove
1519 (stream_get_local_address, stream_get_remote_address): Implement.
1521 * camel-tcp-stream-ssl.c (stream_get_socket): Remove
1522 (stream_get_local_address, stream_get_remote_address): Implement.
1524 * camel-tcp-stream-openssl.c (stream_get_socket): Remove
1525 (stream_get_local_address, stream_get_remote_address): Implement.
1527 2002-03-08 Jeffrey Stedfast <fejj@ximian.com>
1529 * providers/pop3/camel-pop3-provider.c
1530 (camel_provider_module_init): Don't call
1531 camel_remote_store_get_authtypes since we no longer subclass
1534 * providers/pop3/camel-pop3-engine.c: Added STARTTLS to the
1535 capabilities to look for.
1536 (camel_pop3_engine_reget_capabilities): New function to re-get
1539 * providers/pop3/camel-pop3-store.c: Updated to not subclass
1541 (connect_to_server): Rewritten to not depend on CamelRemoteStore's
1542 connect implementation. Also added support for STLS (aka
1545 2002-03-07 Jeffrey Stedfast <fejj@ximian.com>
1547 * camel-pgp-mime.c (camel_pgp_mime_part_sign): Add support for
1548 hash type RIPEMD160.
1550 * camel-cipher-context.h: Add RIPEMD160 hash type.
1552 * camel-pgp-context.c (pgp_sign): Updated to consider hash
1553 function for pgp5 and pgp6.
1554 (pgp_clearsign): Same.
1556 * camel-tcp-stream-openssl.c (stream_read): Add a timeout on the
1558 (stream_write): Same.
1560 2002-03-06 Jeffrey Stedfast <fejj@ximian.com>
1562 * providers/smtp/camel-smtp-transport.c (connect_to_server): Fix
1563 to work with OpenSSL.
1565 * camel-tcp-stream-openssl.c: compile fixes.
1566 (camel_tcp_stream_openssl_enable_ssl): Check to make sure that the
1567 sockfd != -1, it's not enough to check that it is non-zero. Also
1568 set the sockfd to -1 on fail (open_ssl_connection will close the
1571 2002-03-06 Dan Winship <danw@ximian.com>
1573 * providers/smtp/camel-smtp-transport.c (smtp_construct): Make
1576 2002-03-05 Jeffrey Stedfast <fejj@ximian.com>
1578 * camel-tcp-stream-ssl.c (save_ssl_cert): Removed. Glory glory
1580 (ssl_bad_cert): No longer calls ssl_save_cert or
1583 2002-03-05 Jeffrey Stedfast <fejj@ximian.com>
1585 * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_new_raw):
1586 Start the ssl stream off in non-ssl mode (useful for STARTTLS).
1587 (camel_tcp_stream_openssl_enable_ssl): New function to toggle an
1588 ssl stream into ssl mode.
1589 (open_ssl_connection): Close the sockfd on fail so our caller
1590 doesn't have to - this also allows us to save the original errno.
1591 (stream_connect): If we want ssl mode, do our ssl stuff.
1592 (camel_tcp_stream_openssl_class_init): Init some SSL stuff here
1593 instead of in open_ssl_connection since these only ever need to be
1595 (stream_read): Only use SSL_read if we are in ssl mode.
1596 (stream_write): Only use SSL_write if we are in ssl mode.
1598 * providers/smtp/camel-smtp-transport.c (smtp_helo): Check for the
1600 (connect_to_server): Try to use STARTTLS whenever possible rather
1601 than the old way of doing things.
1602 (connect_to_server_wrapper): Wrapper around connect_to_server() to
1603 first try STARTTLS and then attempt normal SSL mode if we can't
1604 connect via STARTTLS.
1606 * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_enable_ssl): New
1607 function to toggle an ssl stream into ssl mode.
1608 (camel_tcp_stream_ssl_new_raw): Start the ssl stream off in
1609 non-ssl mode (useful for STARTTLS).
1610 (stream_connect): Only connect in SSL mode if required.
1612 2002-03-01 Jeffrey Stedfast <fejj@ximian.com>
1614 * camel-vtrash-folder.h:
1615 * camel-vee-store.h:
1616 * camel-vee-folder.h:
1617 * camel-stream-null.h:
1618 * camel-stream-filter.h:
1619 * camel-store-summary.h:
1620 * camel-news-address.h:
1621 * camel-mime-utils.h:
1622 * camel-mime-parser.h:
1623 * camel-mime-filter-save.h:
1624 * camel-mime-filter-linewrap.h:
1625 * camel-mime-filter-index.h:
1626 * camel-mime-filter-html.h:
1627 * camel-mime-filter.h:
1628 * camel-mime-filter-from.h:
1629 * camel-mime-filter-crlf.h:
1630 * camel-mime-filter-chomp.h:
1631 * camel-mime-filter-charset.h:
1632 * camel-mime-filter-bestenc.h:
1633 * camel-mime-filter-basic.h:
1634 * camel-internet-address.h:
1635 * camel-folder-thread.h:
1636 * camel-folder-summary.h:
1637 * camel-folder-search.h:
1638 * camel-filter-driver.h:
1639 * camel-charset-map.h:
1640 * camel-address.h: Add c++ armoring.
1642 * camel-object.h: s/class/klass
1644 2002-03-01 Jeffrey Stedfast <fejj@ximian.com>
1646 * camel-mime-part-utils.c
1647 (camel_mime_part_construct_content_from_parser): Reverted my
1648 pgp/mime fixes here too.
1650 * camel-mime-part.c (write_to_stream): Removed my pgp/mime raw
1651 stream hack, this is causing problems such as some messages to not
1652 displaying, view->source not working at all, etc.
1654 2002-02-28 Jeffrey Stedfast <fejj@ximian.com>
1656 * camel-mime-parser.c: Changed offset variables from int's to
1657 off_t's since the system may support large files.
1659 * camel-mime-part-utils.c
1660 (camel_mime_part_construct_content_from_parser): Rearrange the
1661 save filter stuff so that we save raw streams for all mime
1662 parts. If the mime part turns out to be a multupart, then don't
1663 bother saving the raw stream, we only need to save the raw stream
1666 2002-02-27 Jeffrey Stedfast <fejj@ximian.com>
1668 * camel-folder-summary.h: Don't #include camel-mime-filter-save.h,
1671 * camel-file-utils.c: Fixed a few 'might be used uninitialized'
1672 warnings which were real problems.
1674 * camel-mime-part-utils.c
1675 (camel_mime_part_construct_content_from_parser): Save the raw mime
1676 stream for any/all signed parts.
1678 * camel-mime-part.c (camel_mime_part_init): Initialize our raw
1680 (camel_mime_part_finalize): Unref our raw stream, if we have one.
1681 (write_to_stream): If we have a raw stream, write that out instead
1684 * camel-mime-filter-save.[c,h]: Rewritten to save to a stream
1687 2002-02-28 Not Zed <NotZed@Ximian.com>
1689 * camel-mime-utils.c (header_fold): Use the FOLD_SIZE as a
1690 recommended folding size, but add a new FOLD_MAX_SIZE (=998, the
1691 smtp max line size) as the hard limit for any output.
1693 2002-02-27 Jeffrey Stedfast <fejj@ximian.com>
1695 * camel-mime-filter-chomp.c (camel_mime_filter_chomp_new): New
1696 stream filter that chomps excess trailing whitespace from the end
1697 of the stream. This is needed to update the PGP/MIME code to
1698 comply with rfc3156.
1700 * camel-pgp-mime.c (camel_pgp_mime_part_verify): Don't attach a
1701 from filter, if it ain't from-filtered already, then we'll just be
1702 breaking stuff. To become rfc3156 compliant, add a chomp filter
1704 (camel_pgp_mime_part_sign): Add a chomp filter here too.
1706 2002-02-27 Not Zed <NotZed@Ximian.com>
1708 * camel-mime-part.c (init_header_name_table): Changed header
1709 formatted table to contain a pointer to an output function, and
1710 added in-reply-to and references headers.
1711 (write_references): New function to write out references header,
1712 folded properly. It only approximates based on the last >, but it
1713 should be adequate and will also handle invalid headers.
1714 (write_fold): Function to write out headers folded. Since this is
1715 the default it isn't required.
1716 (write_raw): Write out an already formatted header, e.g. most of
1718 (write_to_stream): Lookup header output function, if we have one,
1719 use that, otherwise fold header using basic (dumb) function.
1721 This is all for #14779. A better fix is probably do have the
1722 headers always stored formatted, but that can wait.
1724 2002-02-25 Jeffrey Stedfast <fejj@ximian.com>
1726 * camel-digest-folder.c (camel_digest_folder_new): Allow all
1727 multiparts that contain message/rfc822 attachments.
1728 (digest_get_uids): Only assign uids to message parts.
1730 2002-02-22 Jeffrey Stedfast <fejj@ximian.com>
1732 * camel-mime-part.c (camel_mime_part_set_filename): Set the 'name'
1733 parameter on the Content-Type too. Fixes bug #20779.
1735 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
1737 * camel-pgp-context.c (pgp_sign): Pass --always-trust to gpg
1738 (requested by users).
1739 (pgp_clearsign): Same.
1740 (pgp_encrypt): Here too.
1742 2002-02-12 Jeffrey Stedfast <fejj@ximian.com>
1744 * providers/smtp/camel-smtp-transport.c (smtp_helo): Since the
1745 AUTH token sometimes uses '=' instead of whitespace, don't use
1746 smtp_token_next here.
1748 2002-02-09 Not Zed <NotZed@Ximian.com>
1750 * providers/pop3/camel-pop3-engine.c (get_capabilities): Duh, when
1751 we grab the apop stamp it needs to include the <> as well, I even
1752 read the rfc, silly me.
1754 * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): Doh,
1755 when iterating the authtype list, it helps to goto the next node.
1756 Found with help from miles.
1758 2002-02-08 Not Zed <NotZed@Ximian.com>
1760 * providers/local/camel-spool-summary.c
1761 (camel_spool_summary_build_from): The day number has to be 2 chars
1762 wide, space filled to work properly with pine, etc.
1764 * providers/local/camel-spoold-store.[ch]: new type of provider
1765 'spool directory', which lets you view external mbox dirs without
1766 adding any extra cruft. Perhaps it should use . files to store
1767 summaries? Still a bit experimental, there's a warning when you
1768 select it in the account editor. Finished off most of #1185.
1769 Can't rename or move folders.
1771 * camel-mime-utils.c (header_decode_date): If the date is
1772 100->1900 then we actually want to use it as the year in the tm
1773 struct, not year+100. e.g. year 102 -> 2002, not 2102.
1775 2002-02-07 Not Zed <NotZed@Ximian.com>
1777 * providers/local/camel-spool-store.c (get_folder): Pass path into
1780 * providers/local/camel-spool-folder.c (camel_spool_folder_new):
1781 (camel_spool_folder_construct): Take the full path to the folder
1782 and use that as the file path, independent of the full_name we
1785 2002-02-07 Not Zed <NotZed@Ximian.com>
1787 * providers/local/camel-local-provider.c: Added new type, spoold
1788 provider, spoold: for local directories.
1790 * providers/imap/camel-imap-store.c (get_one_folder_offline):
1791 Create offline uri's in a compatible manner to online ones.
1793 2002-02-07 Dan Winship <danw@ximian.com>
1795 * camel-sasl-ntlm.c: Implementation of NTLM (aka "Secure Password
1796 Authentication") auth, taken from soup.
1798 * Makefile.am (libcamel_la_SOURCES, libcamel_la_HEADERS): Add
1801 * camel-sasl.c: Add refs to camel-sasl-ntlm.
1803 * providers/imap/camel-imap-store.c (try_auth): Use
1804 imap_next_word() to skip over the "+ " of the continuation rather
1805 than just "resp + 2" since Exchange (incorrectly) returns "+"
1806 instead of "+ " for an empty continuation response.
1808 2002-02-06 Jeffrey Stedfast <fejj@ximian.com>
1810 * camel-folder-summary.h: Remove the CAMEL_MESSAGE_NEEDS_REPLY
1811 flag, we no longer will be using this.
1813 2002-02-04 Jeffrey Stedfast <fejj@ximian.com>
1815 * camel-http-stream.c (stream_read): Use camel_mime_parser_read to
1816 read internal parser data.
1817 (camel_http_stream_get_content_type): Implemented.
1818 (http_method_invoke): Use HTTP/1.0 instead of 1.1
1820 * camel-mime-utils.c (header_decode_int): Made public.
1822 * camel-http-stream.[c,h]: Added. New stream for HTTP requests
1823 (currently supported are GET and HEAD).
1825 * camel-tcp-stream-ssl.c (stream_connect): Call set_errno
1828 2002-01-31 Not Zed <NotZed@Ximian.com>
1830 * camel-mime-utils.c (header_decode_domain): Oops, this was
1831 converting foo@[blah] to foo@[ blah ], fixed.
1833 2002-01-30 Jeffrey Stedfast <fejj@ximian.com>
1835 * providers/pop3/camel-pop3-provider.c: Use "pop" instead of
1836 "pop3" so current configurations continue to work.
1838 2002-01-30 Not Zed <NotZed@Ximian.com>
1840 * camel-sasl-login.c: Changed name from "NT Login" to simply
1843 * providers/pop3/*: Entirely new pop implmentation, supporting
1846 2002-01-29 Not Zed <NotZed@Ximian.com>
1848 * camel-data-cache.c (free_busy): We dont want to unref the
1849 stream, instead, stop listening to the finalised events, and free
1852 2002-01-25 Not Zed <NotZed@Ximian.com>
1854 * camel-data-cache.c (stream_finalised): Remove the object from
1855 the busy_stream hashtable, not the busy_path hashtable.
1857 2002-01-29 Jeffrey Stedfast <fejj@ximian.com>
1859 * providers/imap/camel-imap-folder.c (imap_update_summary): Added
1860 more kludge to an existing Exchange IMAP 5.5 kludge to work around
1861 it returning multiple messages with the same UIDs.
1863 2002-01-28 Jeffrey Stedfast <fejj@ximian.com>
1865 * camel-mime-message.c (process_header): Handle Resent headers
1868 * camel-mime-message.h: Added Resent-* #defines.
1870 * camel-filter-driver.c (camel_filter_driver_remove_rule_by_name):
1871 Use while (node->next) instead of while (node)
1873 * providers/smtp/camel-smtp-transport.c (smtp_decode_status_code):
1874 New function to decode an enhanced status code.
1875 (smtp_set_exception): Sets an exception based on the
1876 Enhanced-Status-Code.
1877 (esmtp_get_authtypes): Don't diplicate the key in the hash since
1878 the key and value are the same.
1879 (smtp_rcpt): Include the failed recipient in the error message to
1880 be more helpful to the user.
1882 * camel-mime-utils.c (hex_decode): Make sure to allocate enough
1885 2002-01-28 Jeffrey Stedfast <fejj@ximian.com>
1887 * providers/smtp/camel-smtp-transport.c (smtp_construct):
1888 (connect_to_server): Use flags rather than a bunch of gboolean
1890 (smtp_connect): Same.
1891 (smtp_mail): Here too. Use the enhanced status codes if available.
1892 (smtp_data): And again here.
1893 (smtp_helo): Finally here. Also detect the ENHANCEDSTATUSCODES
1895 (smtp_rcpt): Use the enhanced status codes if available.
1896 (smtp_rset): Here too.
1897 (smtp_quit): And finally here.
1899 * camel-transport.h: Removed gboolean supports_8bit since this is
1900 pretty local to only SMTP for now.
1902 2002-01-24 Ettore Perazzoli <ettore@ximian.com>
1904 * Makefile.am: Remove some old cruft.
1906 2002-01-24 Ettore Perazzoli <ettore@ximian.com>
1908 * tests/folder/Makefile.am: s/MAILER_LIBS/EVOLUTION_MAIL_LIBS/.
1909 * tests/message/Makefile.am: Likewise.
1910 * tests/mime-filter/Makefile.am: Likewise.
1911 * tests/misc/Makefile.am: Likewise.
1912 * tests/smime/Makefile.am: Likewise.
1913 * tests/stream/Makefile.am: Likewise.
1915 2002-01-24 Jeffrey Stedfast <fejj@ximian.com>
1917 * camel-filter-driver.c (do_beep): Call the beep callback
1919 (camel_filter_driver_set_system_beep_func): New function to set
1922 2002-01-22 Jeffrey Stedfast <fejj@ximian.com>
1924 * camel-filter-driver.c (camel_filter_driver_remove_rule_by_name):
1925 New function to remove a filter rule by name.
1927 2002-01-21 Jeffrey Stedfast <fejj@ximian.com>
1929 * camel-filter-driver.c (do_beep): As a temporary solution, just
1930 printf ("\a"); to make a beep :-)
1932 * providers/imap/camel-imap-command.c
1933 (imap_command_strdup_vprintf): Encode the mailbox to UTF-7 here.
1935 * providers/imap/camel-imap-utils.c (imap_parse_list_response):
1936 Decode the mailbox name as we parse the list response.
1937 (imap_mailbox_decode): It's only an illegal mailbox name if it
1938 didn't switch back to US-ASCII mode.
1940 2002-01-18 Jeffrey Stedfast <fejj@ximian.com>
1942 * providers/imap/camel-imap-utils.c (imap_mailbox_decode): New
1943 function to decode an IMAP mailbox name from modified UTF-7
1945 (imap_mailbox_encode): New function to convert a mailbox name from
1946 UTF-8 to IMAP's modified UTF-7 encoding.
1948 2002-01-17 Jeffrey Stedfast <fejj@ximian.com>
1950 * camel-mime-filter-basic.c (filter): Stop uudecoding once the
1951 CAMEL_UUDECODE_STATE_END state bit gets set. Set the
1952 CAMEL_UUDECODE_STATE_BEGIN state bit once we find the begin line.
1953 (reset): No longer have uu_begin or uulen state variables, these
1954 are now stuffed into a single state variable.
1956 * camel-mime-utils.c (uudecode_step): No longer needs a uulen
1957 argument and also keeps track of whether or not the end of the
1958 encoded data has been found in 'state'.
1959 (uuencode_step): Now stuffs uulen into state so that the uulen
1960 argument is no longer needed.
1961 (uuencode_close): Same.
1963 2002-01-16 Jeffrey Stedfast <fejj@ximian.com>
1965 * camel-mime-filter-basic.c (filter): If we don't want to corrupt
1966 the uuencoded data by overwriting it with base64 decoded data
1967 afterward, we need to add a break statement!
1969 * camel-folder-summary.c (summary_build_content_info): Add code to
1971 (camel_folder_summary_finalize): Unref the uuencode filter.
1973 2002-01-16 Jeffrey Stedfast <fejj@ximian.com>
1975 * camel-mime-filter-basic.c (filter): Fixed slight logic error to
1976 find the uuencode begin line. Fixes bug #18754.
1978 2002-01-15 Jeffrey Stedfast <fejj@ximian.com>
1980 * providers/smtp/camel-smtp-transport.c (smtp_send_to): Updated to
1981 match the new send_to API.
1982 (smtp_send): Get the from address and pass that along to
1985 * providers/sendmail/camel-sendmail-transport.c
1986 (sendmail_send_to): Updated to match the new send_to API.
1988 * camel-transport.c (camel_transport_send_to): Now takes a from
1991 * providers/imap/camel-imap-folder.c (imap_update_summary): Sort
1992 the needheaders UID array and fixed to respect the
1993 UID_SET_LIMIT. This should now finish the fixification of bug
1994 #2529. There's still the possible issue that a command-line (The
1995 only command-line I can think of that can still be too long is a
1996 SEARCH command, but this can't possibly be fixed until we rewrite
1997 the imap code to use Zucchi's ImapEngine idea).
1999 2002-01-14 Jeffrey Stedfast <fejj@ximian.com>
2001 * providers/imap/camel-imap-folder.c (imap_expunge_uids_online):
2002 Move the command-lock outside the loop.
2004 2002-01-14 Jeffrey Stedfast <fejj@ximian.com>
2006 * providers/imap/camel-imap-folder.c (imap_expunge_uids_online):
2007 Updated to use the new imap_uid_array_to_set() interface.
2008 (imap_expunge_uids_resyncing): Same.
2009 (do_copy): Here too.
2010 (imap_update_summary): Added a FIXME comment to rewrite allowing
2011 for a uid-set limitation.
2012 (get_matching): Copy some of the logic over from
2013 imap_uid_adday_to_set() to limit the length of the uid-set string.
2014 (imap_sync_online): Added a comment to explain what is going on
2015 with get_matching() since the behavior has changed slightly.
2017 * providers/imap/camel-imap-utils.c (imap_uid_array_to_set):
2018 Modify the interface so that we can limit the size of the uid set
2021 2002-01-14 Not Zed <NotZed@Ximian.com>
2023 * providers/imap/camel-imap-search.c (imap_body_contains):
2024 Rewritten to use a cache for body searches when online. Will need
2025 some heavy testing but so far seems to be beneficial.
2027 * providers/imap/camel-imap-folder.c (imap_search_by_expression,
2028 search_by_uids): dont initialise search object here.
2029 (camel_imap_folder_new): Setup search object here with pointer to
2032 2001-12-01 Not Zed <NotZed@Ximian.com>
2034 * camel-store-summary.[ch]: New class to store a store's folder
2035 list in. Not yet completed.
2037 2002-01-11 Jeffrey Stedfast <fejj@ximian.com>
2039 * providers/imap/camel-imap-folder.c (imap_update_summary): Kludge
2040 around a bug in Exchange 5.5 that reports 2 messages with the same
2041 UID. Fixes bug #17694. Replaces the fix from yesterday.
2043 2002-01-10 Jeffrey Stedfast <fejj@ximian.com>
2045 * providers/local/camel-local-folder.c: If PATH_MAX doesn't exist,
2046 use _POSIX_PATH_MAX.
2048 * providers/imap/camel-imap-folder.c (imap_update_summary): If mi
2049 is NULL, don't bother updating it. Should fix bug #17694.
2051 2002-01-10 Jeffrey Stedfast <fejj@ximian.com>
2053 * camel.h: #include camel-mime-filter-tohtml.h
2055 * providers/imap/camel-imap-folder.c (imap_update_summary): Kludge
2056 around Microsoft Exchange 5.5 (bug #5348) by forgetting our
2057 currently selected folder and re-SELECTing it so that the Exchange
2058 server has a chance to realise it has new messages.
2060 2002-01-09 Jeffrey Stedfast <fejj@ximian.com>
2062 * providers/local/camel-local-folder.c
2063 (camel_local_folder_construct): If the mbox file is a symlink,
2064 follow the symlink and get the One True Path so that we can
2065 rewrite the mbox later without worrying about clobbering the
2068 2002-01-08 Jeffrey Stedfast <fejj@ximian.com>
2070 * camel-filter-search.c (TODO): There are a few sexp callbacks
2071 that could be modified to use fms->info rather than using a
2072 message object (like date and possibly mlist stuff) but *only* if
2073 the date exists on the CamelMessageInfo object (since it may be
2074 blank except for message flags).
2075 (camel_filter_search_get_message): New internal convenience
2076 function to make sure that the FilterMessageSearch has loaded the
2077 message (and to load the message if this isn't the case).
2078 (check_header): Call camel_filter_search_get_message().
2079 (header_exists): Same.
2080 (header_regex): Here too.
2081 (header_full_regex): And here.
2082 (body_contains): Again here.
2083 (body_regex): Here too.
2084 (get_sent_date): Here also.
2085 (get_received_date): Same.
2086 (get_source): Here if we need to.
2087 (camel_filter_search_match): Now takes a callback function/data
2088 pair for on-demand message loading so that we don't necessarily
2089 have to load the message if the defined filter rules don't require
2092 * camel-filter-driver.c (camel_filter_driver_filter_folder): Don't
2093 bother fetching the message here, let
2094 camel_filter_driver_filter_message() worry about this.
2095 (get_message_cb): New utility callback to fetch a message.
2096 (camel_filter_driver_filter_message): Only fetch the message if we
2097 absolutely need it to get a CamelMessageInfo. Instead of passing a
2098 message object to camel_filter_search_match(), pass get_message_cb
2099 and some user_data so that the matching code can fetch the message
2102 2002-01-07 Jeffrey Stedfast <fejj@ximian.com>
2104 * camel-folder.c (filter_filter): Flush the only-once actions.
2106 * camel-filter-driver.c (camel_filter_driver_filter_message):
2107 Don't increment a filtered_count here any longer.
2108 (camel_filter_driver_reset_filtered_count): Removed.
2109 (camel_filter_driver_get_filtered_count): Removed.
2110 (do_beep): New action.
2111 (play_sound): New action to play a sound
2112 (do_only_once): Another new action.
2113 (camel_filter_driver_finalise): Free the only_once hash if the
2114 driver has not been "flushed".
2115 (camel_filter_driver_flush): Flush all of the only-once actions.
2117 * camel-charset-map.c: Moved windows-1251 to the end of the list
2118 since it contains the euro and we'd prefer to use iso-8859-15 when
2119 the euro is requested than a windows charset if possible.
2121 * camel-charset-map-private.h: Regenerated.
2123 2001-12-12 Jeffrey Stedfast <fejj@ximian.com>
2125 * camel-folder-summary.c (content_info_load): Don't try setting a
2126 content-type parameter if either the name or value is NULL.
2128 * camel-mime-utils.c (header_set_param): NULL-protection.
2130 2002-01-02 Jeffrey Stedfast <fejj@ximian.com>
2132 * camel-tcp-stream-ssl.c (ssl_bad_cert): Do more like what mutt
2133 does so hopefully this'll fix bug #16363 and #16300.
2135 2001-12-21 Jeffrey Stedfast <fejj@ximian.com>
2137 * broken-date-parser.c (parse_broken_date): Completely
2138 rewritten. It is now a load faster and a heck of a lot more
2139 accurate, also now returns a time_t and sets the saveoffset
2140 variable rather than returning a new char* buffer for the normal
2141 camel date parser to re-parse. This saves a fair number of cpu
2144 * camel-mime-utils.c (header_decode_date): Cleanup the broken date
2147 2001-12-20 Jeffrey Stedfast <fejj@ximian.com>
2149 * camel-address.h: Change the prototype for camel_address_get_type
2150 to return a CamelType (since internally this is what it returns
2151 and also in case we decide to write a replacement for the current
2152 CamelObject it'd be easier to drop in).
2154 * camel-internet-address.h: Same but for
2155 camel_internet_address_get_type()
2157 * providers/smtp/camel-smtp-transport.c (smtp_send_to): Updated to
2158 use a CamelAddress of recipients.
2159 (smtp_send): Since smtp_send_to now takes a CamelAddress
2160 recipients argument, our lives have been simplified and we can now
2161 just concat To/Cc/Bcc into a recipients addr and send away.
2163 * providers/sendmail/camel-sendmail-transport.c
2164 (sendmail_send_to): Updated to use a CamelAddress of recipients.
2166 * camel-transport.c (camel_transport_send_to): Now takes a
2167 CamelAddress argument for the recipient list rather than a GList.
2169 2001-12-19 Jeffrey Stedfast <fejj@ximian.com>
2171 * providers/smtp/Makefile.am: Remove the providerdir variable.
2173 * providers/sendmail/Makefile.am: Same.
2175 2001-12-17 Jeffrey Stedfast <fejj@ximian.com>
2177 * camel-charset-map.c (camel_charset_iso_to_windows): New function
2178 to map ISO charsets to the Windows charsets.
2180 * camel-mime-part-utils.c (broken_windows_charset): Detect Windows
2182 (simple_data_wrapper_construct_from_parser): Simplify a tad and
2183 also check for iso-8859-* charsets that are really Windows
2184 charsets. Fixes bug #12631.
2186 2001-12-17 Dan Winship <danw@ximian.com>
2188 * Makefile.am (INCLUDES): define CAMEL_PROVIDERDIR to be the
2189 configure.in-defined camel_providerdir.
2191 * providers/Makefile.am: Remove some outdated comments
2193 * providers/imap/Makefile.am (camel_provider_LTLIBRARIES,
2194 camel_provider_DATA): renamed from provider_LTLIBRARIES,
2197 * providers/local/Makefile.am: Likewise
2199 * providers/nntp/Makefile.am: Likewise
2201 * providers/pop3/Makefile.am: Likewise
2203 * providers/sendmail/Makefile.am: Likewise
2205 * providers/smtp/Makefile.am: Likewise
2207 2001-12-16 Jeffrey Stedfast <fejj@ximian.com>
2209 * providers/imap/camel-imap-folder.c (get_content): Reverted my
2210 previous changes here since it doesn't actually work afterall.
2212 * providers/imap/camel-imap-wrapper.c (imap_wrapper_hydrate):
2213 Update to do uudecoding when appropriate.
2215 2001-12-16 Jeffrey Stedfast <fejj@ximian.com>
2217 * providers/imap/camel-imap-folder.c (get_content): Try to use the
2218 original boundary so luis will stop bugging me about "data
2219 corruption". Also preserve other params in the multipart
2220 content-type by dumping it to a string and setting it on the mime
2223 2001-12-14 Jeffrey Stedfast <fejj@ximian.com>
2225 * camel-filter-driver.c
2226 (camel_filter_driver_reset_filtered_count): Reset the
2227 filtered_count to zero.
2228 (camel_filter_driver_get_filtered_count): Return the private
2229 filtered_count value.
2230 (camel_filter_driver_filter_message): Increment the
2232 (camel_filter_driver_set_shell_exec_func): New function to set the
2234 (shell_exec): New ESExp filter action callback.
2236 2001-12-14 Jeffrey Stedfast <fejj@ximian.com>
2238 * camel-pgp-mime.c (camel_pgp_mime_part_verify): Removed
2239 x-inline-pgp-hack kludge because it doesn't work.
2240 (camel_pgp_mime_part_decrypt): Same.
2242 2001-12-13 Chris Toshok <toshok@ximian.com>
2244 * camel-data-cache.c: include stdlib.h (for alloca on freebsd) and
2245 only include alloca.h if HAVE_ALLOCA_H is defined.
2247 2001-12-11 Zbigniew Chyla <cyba@gnome.pl>
2251 * camel-charset-map.c: Added #include <errno.h>.
2253 * camel-charset-map-private.h:
2254 Recreated (following instructions from camel-charset-map.c)
2256 2001-12-11 Jeffrey Stedfast <fejj@ximian.com>
2258 * camel-object.c (camel_type_register): Keep a name-to-type hash
2259 so that we can make sure that the type has not yet been registered
2260 (prevents a race condition such as the one in bug #16559).
2262 * camel-service.c (camel_service_connect): Make sure that the
2263 connect_op is non-NULL before unregistering/unreffing it.
2265 2001-12-04 Jeffrey Stedfast <fejj@ximian.com>
2267 * camel-mime-utils.c (header_content_type_simple): Protect against
2268 either of the types being NULL.
2270 2001-12-05 Jeffrey Stedfast <fejj@ximian.com>
2272 * camel-mime-filter-basic.c (filter): If complete() allocates
2273 len+2 bytes for the out buffer, so should this. See bug #16371 for
2276 2001-12-05 Jeffrey Stedfast <fejj@ximian.com>
2278 * camel-sasl-digest-md5.c: iconv() returns a size_t, not an int.
2280 * camel-pgp-context.c: The return value of iconv() is a size_t,
2283 * camel-mime-part-utils.c (convert_buffer): Always use size_t args
2286 * camel-mime-filter-charset.c (complete): Always use size_t args
2290 * camel-mime-utils.c (header_address_fold): Make headerlen a
2291 size_t instead of an int.
2292 (header_fold): Same.
2293 (base64_encode_close): We should be returning a size_t and inlen
2294 should also be a size_t.
2295 (base64_encode_step): Same here.
2296 (base64_decode_step): Here too.
2297 (base64_encode_simple): And here...
2298 (base64_decode_simple): Same.
2299 (uuencode_close): We should also use size_t's here...
2300 (uuencode_step): And here too.
2301 (uudecode_step): And also here.
2302 (quoted_encode_close): Same idea here.
2303 (quoted_encode_step): Again here.
2304 (quoted_decode_step): Here too.
2305 (quoted_encode): Input length should be a size_t.
2306 (rfc2047_decode_word): Same.
2307 (g_string_append_len): Here too.
2309 (rfc2047_encode_word): "
2312 (rfc2184_decode): Use size_t's with iconv().
2313 (header_decode_param): Same.
2315 2001-12-09 Jon Trowbridge <trow@ximian.com>
2317 * camel-folder-summary.c: Add "NeedsReply" to the flag_names array
2318 for CAMEL_MESSAGE_NEEDS_REPLY.
2320 * camel-folder-summary.h: Added CAMEL_MESSAGE_NEEDS_REPLY flag.
2322 2001-12-07 Dan Winship <danw@ximian.com>
2324 * camel-mime-message.c (camel_mime_message_set_date): Fix the
2325 tm_gmtoff case (its sign is the opposite of "timezone"). Fixes
2328 2001-11-29 Jeffrey Stedfast <fejj@ximian.com>
2330 * camel-folder-search.c (search_body_contains): Don't use regex
2331 matching. Fixes bug #16227.
2333 * camel-mime-message.c (best_encoding): Check the content-object's
2334 mime type, not the mime part types. Should fix bug #15843.
2336 2001-11-27 Jeffrey Stedfast <fejj@ximian.com>
2338 * providers/imap/camel-imap-folder.c (get_content): Return NULL if
2339 construct_from_stream fails.
2340 (get_message): Same.
2341 (get_message_simple): Here too.
2342 (add_message_from_data): And here.
2344 2001-11-14 <NotZed@Ximian.com>
2346 * camel-vee-folder.c (folder_changed_remove_uid): Use the uid
2347 rather than vuid for unmatched. Also add the uid to unmatched if
2348 it wasn't in the unmatched_uids table at all.
2349 (folder_changed_change): If checking for added, if the new ones
2350 dont match, then try to add them to unmatched. Fixes #6893.
2352 * camel-folder-summary.c (camel_folder_summary_index): Change lock
2353 order, always summary_lock before ref_lock.
2354 (camel_folder_summary_array): "
2355 (camel_folder_summary_uid): "
2356 (camel_folder_summary_remove_uid): " Fixes a deadlock.
2358 2001-11-30 Not Zed <NotZed@Ximian.com>
2360 * providers/nntp/camel-nntp-*.c: Completely new implementation of
2363 Doesn't support subscriptions yet (lists all folders), but should
2364 be more reliable (faster?), and has an integrated cache.
2366 * camel-exception.c (camel_exception_new): Use e_memchunks for
2368 (camel_exception_free): Same.
2370 * camel-data-cache.[ch]: New object for managing on-disk caches of
2371 anything that can be stored in a camel-stream.
2373 * camel-file-utils.c (camel_file_util_mkdir): New function, just a
2374 nicer place to put this (than camel-store), should be removed from
2376 (camel_file_util_safe_filename): New function to url-encode a
2379 * camel-mime-parser.c (drop_states): New func to drop the parser
2380 state to initial state.
2381 (folder_scan_init_with_fd):
2382 (folder_scan_init_with_stream): Call above func to reset state if
2383 the stream is changed on us so we can change streams to reuse a
2386 2001-11-25 Not Zed <NotZed@Ximian.com>
2388 * providers/nntp/camel-nntp-folder.c (nntp_folder_get_message): If
2389 the uid doesn't have a ',' in it, fail to crash.
2391 * providers/nntp/camel-nntp-newsrc.c
2392 (camel_nntp_newsrc_article_is_read): check group != NULL before
2394 (camel_nntp_newsrc_get_highest_article_read): "
2395 (camel_nntp_newsrc_get_num_articles_read): "
2396 (camel_nntp_newsrc_mark_range_read): "
2398 * providers/nntp/camel-nntp-store.c
2399 (camel_nntp_store_get_overview_fmt): IF we dont have
2400 nntp_list_follows, dont try and get a list response.
2401 (nntp_store_get_folder_info): Set path part of folderinfo.
2403 2001-11-20 Jeffrey Stedfast <fejj@ximian.com>
2405 * providers/smtp/camel-smtp-transport.c (get_smtp_error_string):
2406 Check to see that errno is non-zero before returning
2407 g_strerror. If it's 0, then we have an unknown error.
2409 2001-11-26 Jeffrey Stedfast <fejj@ximian.com>
2411 * camel-mime-filter-basic.c: For the uudecoding mode, garble up
2412 the "begin <mode> <filename>" line before decoding.
2414 * camel-mime-part-utils.c
2415 (simple_data_wrapper_construct_from_parser): Add a uudecoder if
2416 the transfer encoding is x-uuencode.
2418 * camel-mime-part.c (write_to_stream): Handle x-uuencoded content
2421 2001-11-19 Jeffrey Stedfast <fejj@ximian.com>
2423 * camel-tcp-stream-ssl.c (stream_read): Added a check to see if
2424 the operation has been cancelled.
2425 (stream_write): Same.
2427 2001-11-19 Jeffrey Stedfast <fejj@ximian.com>
2429 Updates for compliance with rfc2231
2431 * camel-mime-utils.c (header_encode_param):
2432 camel_mime_special_table[c] & IS_ESAFE should have been
2433 !(camel_mime_special_table[c] & IS_ESAFE). Also added a few
2434 comments for how to improve the code at some future date.
2435 (header_decode_param): Now takes an argument rfc2184_part so our
2436 caller can get this information as well.
2437 (header_decode_param_list): Pass an rfc2184_part argument to
2438 header_decode_param and also added a few comments on where to
2439 improve on rfc2184/rfc2231 compliance.
2440 (rfc2047_decode_word): Updated to respect the updated ABNF syntax
2441 of rfc2047 encoded words, yay.
2443 2001-11-16 Jeffrey Stedfast <fejj@ximian.com>
2445 * providers/imap/camel-imap-utils.c (imap_parse_body): Abort if
2448 * camel-mime-filter-tohtml.c (camel_mime_filter_tohtml_new): New
2449 mime filter to convert plain text to html.
2451 2001-11-16 Jeffrey Stedfast <fejj@ximian.com>
2453 Since some mail clients like Outlook are broken, we need to set a
2454 name parameter on pgp signed and encrypted parts.
2456 * camel-pgp-mime.c (camel_pgp_mime_part_encrypt): Set a name
2458 (camel_pgp_mime_part_sign): Same.
2460 2001-11-14 Jeffrey Stedfast <fejj@ximian.com>
2462 * providers/imap/camel-imap-command.c
2463 (camel_imap_command_response): If we get a BYE response, call
2464 camel_service_disconnect() and set an exception. Also do the check
2465 for "* BYE" first instead of passing it off imap_read_untagged()
2466 since we'll just waste time in there mallocing left and right only
2467 to arrive at the single response line "* BYE" again :-)
2469 2001-11-13 <NotZed@Ximian.com>
2471 * camel-filter-search.c (get_source): If we have no source string,
2472 then use undefined, which should always evaluate to FALSE. Fix
2475 2001-11-12 Jeffrey Stedfast <fejj@ximian.com>
2477 * camel-store.c (camel_store_get_folder): Added a
2478 g_return_val_if_fail for folder_name != NULL.
2480 2001-11-08 Jeffrey Stedfast <fejj@ximian.com>
2482 * camel-pgp-context.c (crypto_exec_with_passwd): If any of the
2483 pipe()'s fail, clean up any pipes that may have succeeded. Also
2484 close the password fds.
2486 2001-11-09 <NotZed@Ximian.com>
2488 * providers/imap/camel-imap-store.c (imap_auth_loop): If we get a
2489 user cancel and that causes us to fail to authenticate, abort
2490 rather than loop forever. Fix for #14951.
2492 2001-11-06 Jeffrey Stedfast <fejj@ximian.com>
2494 * providers/imap/camel-imap-command.c
2495 (camel_imap_command_continuation): Now takes a command-length
2496 argument so we can 1) avoid duping the command string yet again,
2497 yay. 2) we now don't have to worry about embedded nul-chars
2498 screwing us over (we still need to avoid allowing them into the
2499 string but at least now it won't mess us up).
2501 * providers/imap/camel-imap-folder.c (do_append): Instead of
2502 appending a nul char to the end of the byte array and then passing
2503 that off as if it were a string to
2504 camel_imap_command_continuation, instead pass the byte-array
2505 length since that function now takes a length argument. Yay. Also
2506 encode any 8bit parts to avoid the possibility of sending embedded
2507 nul chars to the imap server.
2509 * providers/imap/camel-imap-store.c (try_auth): Updated to pass a
2510 command-length argument to camel_imap_command_continuation().
2512 2001-11-07 Jeffrey Stedfast <fejj@ximian.com>
2514 * camel-tcp-stream-ssl.c (save_ssl_cert): Oops, pass a mode
2515 argument to the open() call.
2517 * camel-tcp-stream-openssl.c (save_ssl_cert): Oops, pass a mode
2518 argument to the open() call.
2520 2001-11-07 Jeffrey Stedfast <fejj@ximian.com>
2522 * camel-pgp-mime.c (camel_pgp_mime_part_decrypt): Add code to
2523 kludge around any x-inline-pgp-hacks by prepending some content
2524 headers to the decrypted data.
2526 2001-11-02 Jeffrey Stedfast <fejj@ximian.com>
2528 * camel-data-wrapper.c (camel_data_wrapper_init): Initialize our
2530 (camel_data_wrapper_finalize): Destroy our private mutex.
2531 (write_to_stream): Lock around camel_stream_write_to_stream() so
2532 that we don't get 2 threads trying to read from our stream at the
2535 2001-11-01 <NotZed@Ximian.com>
2537 * camel-vee-folder.c (folder_changed_change): Move all searching
2538 operations outside of any locks except subfolder lock, same as
2539 build_folder. Fix for #14294.
2541 2001-10-31 <NotZed@Ximian.com>
2543 * providers/local/camel-spool-folder.c (spool_get_message): Same
2546 * providers/local/camel-maildir-folder.c (maildir_get_message):
2549 * providers/local/camel-mbox-folder.c (mbox_get_message): Set
2550 USER_CANCEL if failed due to EINTR.
2552 * camel-filter-driver.c (camel_filter_driver_filter_mbox): If
2553 construct from parser fails due to user cancel, set USER_CANCEL on
2556 * camel-mime-part.c (construct_from_parser): Return error if the
2557 parser had an io error.
2559 * camel-mime-message.c (construct_from_parser): Check error on
2560 parser/return error.
2562 * camel-mime-parser.c (folder_scan_init): Init error number.
2563 (camel_mime_parser_errno): New function, return errno of any io
2565 (folder_read): Set errno if a failure occured.
2566 (folder_seek): Same.
2567 (folder_scan_init_with_fd): Setup errno depeding on ok/failure.
2568 (folder_scan_init_with_stream): Same.
2570 2001-10-30 <NotZed@Ximian.com>
2572 * camel-operation.c (camel_operation_new): Dont setup cancel_fd.
2573 (camel_operation_cancel_fd): If cancel_fd not created, set it up.
2574 (camel_operation_cancel): Set cancel flag before sending message.
2575 (cancel_thread): Same.
2577 * camel-filter-driver.c (camel_filter_driver_filter_mbox): Make
2578 sure we unref the mimeparse when we're done (successfully). This
2579 was leaking an fd every get-mail! :(
2581 * camel-lock-client.c (camel_lock_helper_init): Close all fd's
2584 * providers/local/camel-mbox-folder.c (mbox_get_message): Remove
2585 the X-Evolution header before anyone else gets to see this private
2586 thing. Shoudl fix 11676 since we were inheriting flags from
2587 X-Evolution headers we didn't want to.
2589 * camel-folder-search.c (match_message): If we can't retrieve the
2590 message, ignore it, it can't match.
2592 * providers/imap/camel-imap-search.c
2593 (camel_imap_search_class_init): Setup parent class pointer.
2594 (imap_body_contains): If offline, just use the parent
2595 body_contains method which will get the messages and search them
2598 * providers/imap/camel-imap-folder.c (imap_search_by_expression,
2599 imap_search_by_uids): Remove offline check.
2601 2001-10-30 Dan Winship <danw@ximian.com>
2603 * camel-mime-part.c (free_headers): Fix this to match get_headers.
2605 2001-10-30 <NotZed@Ximian.com>
2607 * providers/local/camel-local-store.c (rename_folder): Dont try to
2608 move ibex if we have none.
2610 * camel-tcp-stream-openssl.c (stream_write): Fixed compilation
2613 2001-10-29 Jeffrey Stedfast <fejj@ximian.com>
2615 * camel-mime-utils.c (camel_mime_utils_init): Removed unused
2618 2001-10-30 <NotZed@Ximian.com>
2620 * camel-mime-utils.c (header_decode_mailbox): w(x) out some warnings.
2622 * providers/local/camel-local-summary.c
2623 (camel_local_summary_load): Remove the warning about not loading
2624 summary file - its a valid case for new folders.
2626 2001-10-29 Jeffrey Stedfast <fejj@ximian.com>
2628 * camel-tcp-stream-openssl.c (my_SSL_write): Removed.
2629 (stream_write): Keep looping (non-blocking case) if errno is
2630 EAGAIN, EINTR or EWOULDBLOCK. For NONBLOCKing I/O, sync up with
2631 CamelTcpStreamRaw. As with CamelTcpStreamRaw/SSL - make sure to
2632 write out everything before returning.
2633 (my_SSL_read): Removed.
2634 (stream_read): Just call ssl_error_to_errno() and check the errno
2635 values that we care about so we can keep the general look of all
2636 this stream code the same. Also when checking the return value of
2637 SSL_read, check for <0 instead of ==-1 since the man page for
2638 SSL_read doesn't say it will return -1 on fail, it just says <0.
2639 (stream_flush): Don't fsync() since syncing on a socket is a Bad
2642 * camel-tcp-stream-ssl.c (stream_write): Make sure we write out
2643 everything just like in camel-tcp-stream-raw.c.
2645 * camel-stream-buffer.c (camel_stream_buffer_gets): If
2646 camel_stream_read() returns -1, don't necessarily return -1 to our
2647 caller since it's possible that we did actually "read" some data
2648 (ie, we copied some pre-buffered data into the out buffer).
2650 * camel-stream-buffer.h: Removed CAMEL_STREAM_BUFFER_NEWLINE since
2651 it never got used anywhere and it isn't supported anyway.
2653 2001-10-30 <NotZed@Ximian.com>
2655 * providers/imap/camel-imap-store.c
2656 (parse_list_response_as_folder_info): If we get an empty name,
2657 then mark that as NoSelect. Workaround fix for #13239.
2659 2001-10-29 Dan Winship <danw@ximian.com>
2661 * providers/imap/camel-imap-folder.c (get_message_simple,
2662 imap_get_message): Set an X-Evolution-Source header on the
2663 returned message so replies come from the right identity.
2665 2001-10-29 <NotZed@Ximian.com>
2667 * camel-vee-folder.c (folder_changed_change): If we're not going
2668 to search on a changed uid, make sure we change out copy still.
2671 2001-10-29 Jeffrey Stedfast <fejj@ximian.com>
2673 * providers/imap/camel-imap-store.c (subscribe_folder): Don't emit
2674 a folder_subscribed signal if we are in the process of renaming
2676 (unsubscribe_folder): Same here but for the unsubscribe signal.
2677 (rename_folder): Unsubscribe from the folder being renamed and any
2678 subfolders it may have before actually renaming. Once the folder
2679 has been renamed, re-subscribe to it and it's subfolders with the
2682 * camel-store.c (camel_folder_info_build): Sort the folder info's
2683 before constructing the tree.
2685 * camel-mime-utils.c (header_decode_param): Minor fix - should
2686 have been using a strNcmp when checking if it was an rfc2047
2689 * camel-pgp-context.c (pgp_sign): Notify the user that PGP 2.6.x
2690 is no longer supported and use camel_exception_set() instead of
2691 setv() where appropriate.
2692 (pgp_clearsign): Same.
2693 (pgp_verify): And again here.
2694 (pgp_encrypt): Here too.
2695 (pgp_decrypt): And finally here.
2697 2001-10-29 Dan Winship <danw@ximian.com>
2699 * providers/imap/camel-imap-store.c (unsubscribe_folder): Don't
2700 free the hash table key if the folder wasn't found in the hash
2701 table. I'm not sure where the bug is/was that made it possible to
2702 add a folder to the tree after creating it failed, but now if that
2703 happens, it won't crash if you try to delete it again. (#11492)
2705 * camel-disco-store.c (camel_disco_store_status): if the service
2706 is being connected and thinks it's online, but the session is
2707 offline, then mark the service offline as well. Fixes 13683.
2709 2001-10-29 <NotZed@Ximian.com>
2711 * camel-mime-utils.c: Turn off w() -> warnings.
2713 * providers/imap/camel-imap-store.c (rename_folder): Also rename
2715 (rename_folder): Fix subscribed folders table with rename(s).
2717 * providers/imap/camel-imap-folder.c (imap_rename): Implement,
2718 rename the cache dir pointer.
2720 * providers/imap/camel-imap-message-cache.c
2721 (camel_imap_message_cache_set_path): New method to set the path
2722 used by a message cache.
2724 * camel-vee-store.c (build_info): Fix the 'is this a matching
2725 subfolder or subfolder' logic to match camel-store
2728 * camel-store.c (get_subfolders): Fix the 'is this a matching
2729 folder or subfolder' logic.
2731 2001-10-28 <NotZed@Ximian.com>
2733 * providers/local/camel-local-store.c (rename_folder): Changed to
2734 call ibex_move to rename it internally.
2736 * camel-store.c (camel_store_rename_folder): Use the right
2739 2001-10-28 Jeffrey Stedfast <fejj@ximian.com>
2741 * camel-stream-buffer.c (camel_stream_buffer_read_line): Make sure
2742 we've actually read data before checking if p[-] is '\r' or not.
2744 * camel-tcp-stream-raw.c (stream_write): Same.
2746 * camel-stream-fs.c (stream_write): If errno isn't EAGAIN, just
2747 exit with -1 and instead of using continue (which doesn't go to
2748 the top of the do-while thus making our logic suck), just set w to
2749 0. Still seems to be a bug in select() if it's telling us the
2750 socket is ready for data when it really isn't but oh well.
2752 2001-10-28 <NotZed@Ximian.com>
2754 * providers/local/camel-local-folder.c
2755 (camel_local_folder_construct): Use path not protocol as the path
2756 part of the uri of the folder_created event.
2758 * providers/local/camel-maildir-store.c (scan_dir): If FAST is
2759 set, dont try and scan for unread counts.
2761 * providers/local/camel-local-store.c (create_folder): Implement,
2762 just return the folderinfo of the folder matched, not all of it.
2764 * camel-store.c (camel_store_rename_folder): Rename the
2765 camelfolders before emitting the folderchanged event (otherwise
2766 vstore fails to pick up change.
2768 2001-10-27 <NotZed@Ximian.com>
2770 * camel-store.c (camel_store_init): Always use a default dir_sep
2773 * camel-store.h (struct _CamelStore): Added a dir_sep to the base
2774 store so rename and whatnot can work, temporary fix for mixed dir
2775 separator in folder name api's.
2777 * providers/imap/camel-imap-store.c (rename_folder): Finished
2779 (imap_connect_online): Also set the store's dir_sep here.
2780 (imap_connect_offline): "
2782 * providers/local/camel-local-folder.c (local_rename): Implement
2783 local rename of folder objects.
2785 2001-10-26 <NotZed@Ximian.com>
2787 * camel-vee-folder.c (camel_vee_folder_class_init): Hook into
2789 (vee_rename): Implement the veefolder rename function.
2790 (camel_vee_folder_class_init):
2791 (folder_changed_change): Kill a warning with a cast.
2793 * camel-vee-store.c (vee_rename_folder): Emit a folder_renamed
2794 event properly, also call parent to do some rename stuff.
2796 * camel-store.h: Added a CamelRenameInfo for the rename event.
2798 * camel-folder.c (camel_folder_rename): New function to rename a
2800 (camel_folder_class_init): Added a renamed event.
2801 (folder_rename): Default impl, set full_name, and set name
2802 assuming the dir separator is '/'.
2804 * camel-store.c (camel_store_class_init): Added folder_renamed
2806 (camel_store_rename_folder): Rename an active folder object if we
2807 have one, and update the folder table.
2808 (rename_folder): Make a default implementation that handles
2809 updating the folder tree.
2811 2001-10-26 Jeffrey Stedfast <fejj@ximian.com>
2813 * providers/imap/camel-imap-store.c (delete_folder): Don't bother
2814 checking ex since we can rely on the response being NULL on error.
2815 (rename_folder): Implemented.
2817 2001-10-26 Jeffrey Stedfast <fejj@ximian.com>
2819 * providers/imap/camel-imap-folder.c (imap_get_message): Check to
2820 make sure that the dataset is non-NULL before using and/or
2823 * camel-tcp-stream-raw.c (stream_write): Check for EWOULDBLOCK
2825 (stream_read): Same.
2826 (stream_flush): Return 0 always, fsync() and tcp sockets don't
2829 * providers/imap/camel-imap-message-cache.c
2830 (camel_imap_message_cache_get): Lets try putting a
2831 camel_stream_reset() here. Logic being that the stream may have
2832 been read from since it was cached and thus our caller may try
2833 reading from it and get no data from it since it is already at the
2834 EOS. This may fix bug #12943.
2836 2001-10-25 <NotZed@Ximian.com>
2838 * camel-search-private.c (utf8_get): Remove the stupid warning
2839 that should never have been there in the first place.
2841 * camel-sasl-digest-md5.c (digest_response): s/iconv/e_iconv/
2843 * camel-pgp-context.c (pgp_verify): "
2845 * camel-mime-utils.c (rfc2047_decode_word, rfc2047_decode_word,
2846 append_8bit, rfc2047_encode_word, rfc2184_decode,
2847 header_decode_param): "
2849 * camel-mime-part-utils.c (convert_buffer, convert_buffer): "
2851 * camel-mime-filter-charset.c (reset, complete, filter): "
2853 2001-10-24 <NotZed@Ximian.com>
2855 * camel-mime-filter-basic.c (complete): For qp decoding, if the
2856 data isn't really qp encoded, we could possible grow the buffer by
2857 upto 2 bytes above the input size, fix allocations/assertions
2860 * camel-vee-folder.c (folder_changed_change): If we're not
2861 autoupdate, only search for new matches against changed uid's that
2862 we dont already have.
2864 2001-10-24 Dan Winship <danw@ximian.com>
2866 * providers/imap/camel-imap-store.c (unsubscribe_folder): Don't
2867 let fi->name be NULL.
2869 2001-10-24 Jeffrey Stedfast <fejj@ximian.com>
2871 * camel-stream-fs.c (stream_read): Same as in the TcpStreamRaw code.
2872 (stream_write): And again here...
2874 * camel-tcp-stream-raw.c (stream_read): Handle the EAGAIN error
2876 (stream_write): Same here, this might fix the SMTP truncation
2879 2001-10-23 Dan Winship <danw@ximian.com>
2881 * camel-mime-utils.c (mail_list_magic): Remove an extra * in one
2882 of the regexps that glibc apparently doesn't mind but bsd does.
2884 2001-10-23 <NotZed@Ximian.com>
2886 * providers/local/camel-mbox-summary.c: made d(x) x recompile again.
2888 2001-10-22 <NotZed@Ximian.com>
2890 * providers/local/camel-spool-summary.c (summary_rebuild): No, use
2891 Storing, as the other code does :p
2892 (spool_summary_check): Check for consistency.
2894 2001-10-22 Jon Trowbridge <trow@ximian.com>
2896 * providers/local/camel-spool-summary.c (summary_rebuild):
2897 s/summarising/summarizing/.
2898 (spool_summary_check): s/summarise/summarize/.
2900 2001-10-22 Jeffrey Stedfast <fejj@ximian.com>
2902 * camel-pgp-mime.c (camel_pgp_mime_part_verify): If we are
2903 kludging around a inline-pgp signed part, do some charset
2904 conversion to protect any 8bit text.
2906 2001-10-22 <NotZed@Ximian.com>
2908 * camel-filter-search.c, camel-folder-search.c (check_header): Use
2909 search_type_mlist for mailing list searches.
2911 * camel.c (camel_init): call camel-mime-utils-init func.
2913 * camel-mime-utils.c: Changed mail mail_list_magic to include a
2914 domain part, also pre-compile all the patterns. They are all
2915 backward compatible except List-Id: which now uses the
2916 mail-address-like <list-name.host.name> part rather than the
2917 plain-text part (which might've been blank anyway).
2918 (camel_mime_utils_init): Initialisation function to setup any
2919 static data required by camel-mime-utils at run-time. We now
2920 setup the base64/charset class tables here, so it doesn't need to
2922 (camel_mime_special_table, camel_mime_base64_rank): No longer
2923 statically initialise these.
2924 (main): Removed + the tests at the end of the file.
2925 (header_raw_check_mailing_list): Dont compile regex's here,
2926 already compiled in utils_init. Use the regex patterns to remove
2927 leading <'s from addresses. Also, if there is a domain part
2928 matched, add that after a '@' is added.
2930 * camel-search-private.c (camel_search_header_match): Match check
2931 against all addresses in a multiple address match. Should fix
2933 (camel_search_header_match): Oops, missing i=0.
2934 (camel_search_header_match): Added SEARCH_TYPE_MLIST for mlist
2935 search types. It ignores the domain part if either (but not both)
2936 of the values dont have it.
2938 2001-10-22 Dan Winship <danw@ximian.com>
2940 * camel-pgp-mime.c (camel_pgp_mime_part_verify): Add a hack: if
2941 the multipart/signed part has a "x-inline-pgp-hack" parameter in
2942 its Content-Type, don't pass the MIME headers as part of the data
2945 2001-10-22 Rodrigo Moya <rodrigo@ximian.com>
2947 * Makefile.am: added $GNOME_INCLUDEDIR to INCLUDES, needed for latest
2948 libgnome, which install headers in $(prefix)/gnome-1.0
2950 2001-10-21 Jeffrey Stedfast <fejj@ximian.com>
2952 * camel-mime-part-utils.c
2953 (simple_data_wrapper_construct_from_parser): Only do the rawtext
2954 checks if the part is a text part, otherwise don't bother wasting
2957 * camel-store.c (camel_folder_info_build): Updated comments to
2958 make the code a bit more clear.
2960 2001-10-21 <NotZed@Ximian.com>
2962 * camel-store.c (CS_CLASS): Dont do the macro stuff - basically so
2963 you can actually debug calls.
2964 (camel_store_uri_cmp): New function to compare store objects.
2966 * camel-vee-folder.c (vee_folder_add_info): oops, dont free the
2967 vuid, since its alloca'd now.
2968 (folder_changed_change): Kill a compile warning.
2970 2001-10-20 <NotZed@Ximian.com>
2972 * camel-folder.c (move_messages_to): If no exception supplied, use
2974 (move_message_to): Set the seen flag also when we delete it.
2976 2001-10-19 Jeffrey Stedfast <fejj@ximian.com>
2978 * camel-vtrash-folder.c (vtrash_move_messages_to): If the
2979 destination folder is the vfolder source folder, then
2980 set_message_flags on it.
2982 2001-10-19 <NotZed@Ximian.com>
2984 * camel-session.c (register_provider): When registering provider,
2985 translate all strings.
2987 * camel-vee-folder.c (camel_vee_folder_remove_folder): Lock the
2988 right lock for unmatched subfolder list stuff. If the sub folder
2989 is deleted & part of unmatched, or the last ref to the sub folder
2990 is gone from unmatched, blow it away completely from unmatched,
2991 but only do it once.
2992 (vee_folder_remove_folder): Added arg to kill unmatched
2993 unconditionally. Also handle deleted folders, always remove
2995 (folder_changed_change): Lock subfolder lock for entirety of
2996 operation, and also check to see if the subfolder is still there
2997 before doing any fancy work (incase it got removed while we were
2998 waiting to execute).
2999 (folder_changed_change_uid): Use alloca for vuid, and not
3001 (vee_search_by_expression): Dont use sprintf for vuid.
3002 (vee_search_by_uids): "
3003 (vee_folder_add_info): "
3004 (folder_changed_remove_uid): "
3005 (folder_changed_change): "
3006 (folder_changed_change_uid): Also check folder_unmatched for
3007 changed uid's so we properly update/propagate unmatched changes.
3008 (folder_changed_change): Ok, so dont hold the subfolder lock for
3009 the whole duration of the changed event, although we probably
3010 should, requires a recursive mutex.
3011 (folder_changed_change): Change logic, we always add changed stuff
3012 if it now matches, but dont remove it unless its auto-remove, only
3013 propagate changes for it.
3014 (vee_set_message_flags): Call parent method after doing our work.
3015 (vee_set_message_user_flag): Same here.
3017 2001-10-18 Jeffrey Stedfast <fejj@ximian.com>
3019 * camel-mime-part-utils.c
3020 (simple_data_wrapper_construct_from_parser): If a charset isn't
3021 specified or claims to be utf-8, check the validity of the text
3022 and if it's invalid, set the rawtext bit to TRUE. If the charset
3023 is x-unknown or some other x- charset, always set the rawtext bit
3026 2001-10-18 <NotZed@Ximian.com>
3028 * camel-store.c (camel_store_unsubscribe_folder): If we are
3029 unsubscribing from a folder we have loaded, set the folder
3030 deleted, as with the delete_folder case.
3032 * providers/(imap|local|pop3|sendmail|smtp)/Makefile.am: Added
3033 CAMEL_CFLAGS so we get the right iconv stuff, patch from Yanko
3034 Kaneti <yaneti@declera.com>
3036 2001-10-18 Jeffrey Stedfast <fejj@ximian.com>
3038 * camel-pgp-context.c (crypto_exec_with_passwd): Make sure the
3041 2001-10-18 Jeffrey Stedfast <fejj@ximian.com>
3043 * providers/imap/camel-imap-message-cache.c (insert_finish): Flush
3044 the stream here, not sure it really matters but it might
3045 (hopefully) fix bug #12943.
3047 * camel-pgp-context.c (crypto_exec_with_passwd): Make
3050 * providers/local/camel-local-provider.c: String cleanup for bug
3053 * providers/imap/camel-imap-folder.c (imap_sync_online): Fix my
3054 Cyrus imapd workaround...instead of checking to see if info->flags
3055 == FLAGGED, just check to see if it contains any IMAP flags.
3057 2001-10-17 <NotZed@Ximian.com>
3059 * providers/local/camel-maildir-folder.c
3060 (camel_maildir_folder_new): Use '.' as the inbox name for filter
3063 * camel-store.c (camel_folder_info_clone): New function to clone a
3066 2001-10-17 Jeffrey Stedfast <fejj@ximian.com>
3068 * providers/local/camel-mh-folder.c (mh_append_message): Same as
3069 maildir and mbox append-message.
3071 * providers/local/camel-maildir-folder.c (maildir_append_message):
3072 Same as mbox append.
3074 * camel-exception.c (camel_exception_set): Make sure the new
3075 description isn't the same as the old description pointer before
3076 freeing the old one.
3077 (camel_exception_setv): Don't free the old description until we
3078 set the new one this way we can reuse the old description in the
3081 * providers/local/camel-mbox-folder.c (mbox_append_message): If
3082 errno == EINTR, then we got a user-cancel so set the exception
3083 appropriately so that we don't make the user shit his pants.
3085 * camel-filter-driver.c (do_copy): Add an optimization for when
3086 destination folder is the same as the source folder.
3088 2001-10-17 <NotZed@Ximian.com>
3090 * providers/imap/camel-imap-store.c (get_folder_info_online):
3091 (parse_list_response_as_folder_info): Patch from Danw, Use unread
3092 count of -1 to mark unflagged messages. Make sure any folder we
3093 dont lookup explicitly is marked as -1. Should fix #9947 and
3096 * providers/local/camel-mbox-summary.c (mbox_summary_sync): Only
3097 touch the summary if the timestamp or size changed.
3099 2001-10-17 Jeffrey Stedfast <fejj@ximian.com>
3101 * camel-filter-driver.c (camel_filter_driver_filter_message): Set
3102 the DELETED flag on directly on the info if the source folder
3103 doesn't have summary capability.
3105 2001-10-17 Not Zed <NotZed@Ximian.com>
3107 * camel-tcp-stream-raw.c (stream_write): As below.
3109 * camel-stream-fs.c (stream_write): If not checking cancellation,
3110 make sure we write out everything asked of us.
3112 2001-10-16 Jeffrey Stedfast <fejj@ximian.com>
3114 * camel-pgp-context.c (pgp_verify): Rearange the order of the gpg
3115 options slightly otherwise it might try to use "--no-tty" as the
3116 filename to verify :-)
3118 * camel-object.[c,h]: If CAMEL_DEBUG is defined, print some useful
3121 * providers/imap/camel-imap-store.c (delete_folder): Fixed an
3124 * camel-uid-cache.c (camel_uid_cache_new): Make sure that the
3125 parent directory exists before trying to open the filename, if it
3128 2001-10-16 <NotZed@Ximian.com>
3130 * camel-mime-utils.c (header_address_decode): If no content, dont
3131 try and decode further and spit meaningless warnings.
3133 2001-10-16 Jeffrey Stedfast <fejj@ximian.com>
3135 * camel-filter-driver.c (do_flag): Only perform the operation on
3136 the folder if the folder has summary capability, else just poke
3137 the info directly. Fixes the "Filters don't work" bug.
3139 (do_colour): And here too.
3141 2001-10-15 Jeffrey Stedfast <fejj@ximian.com>
3143 * camel-stream-fs.c (stream_read): Save the errno before calling
3144 fcntl so fcntl doesn't overwrite errno in case of a previous
3146 (stream_write): Same.
3148 2001-10-13 Jeffrey Stedfast <fejj@ximian.com>
3150 * providers/smtp/camel-smtp-transport.c (smtp_data): Replace the
3151 Bcc headers in a single location and don't flush the data unless
3152 the write was successful.
3154 2001-10-12 Jeffrey Stedfast <fejj@ximian.com>
3156 * Makefile.am: Remove the stripheader filter from the build.
3158 * camel-mime-filter-stripheader.[c,h]: Removed.
3160 * providers/smtp/camel-smtp-transport.c (smtp_data): Check the
3161 return value of camel_stream_flush to make sure it flushed the
3162 data successfully before continuing. Don't use the stripheader
3163 filter, it was completely broken - instead remove the header and
3164 set it again after we send.
3166 2001-10-12 <NotZed@Ximian.com>
3168 * camel-vee-folder.c (camel_vee_folder_remove_folder): Unhook from
3169 all events before removing folder.
3170 (camel_vee_folder_add_folder): Hook onto delete event.
3171 (camel_vee_folder_finalise): Unhook from deleted event for suibfolder.
3172 (subfolder_deleted): When the folder is deleted, remove it from
3173 the vfolder automagically.
3175 2001-10-11 <NotZed@Ximian.com>
3177 * camel-vee-folder.c (vee_search_by_uids): convert the uids list
3178 to a subset appropriate for each subfolder before trying to search
3181 * camel-charset-map.[ch]: Removed charset/locale charset lookup
3182 and iconv_open/close functions, moved to gal. Fixed all callers.
3184 2001-10-11 Jeffrey Stedfast <fejj@ximian.com>
3186 * camel-tcp-stream-ssl.c (ssl_cert_is_saved): Same.
3188 * camel-tcp-stream-openssl.c (ssl_cert_is_saved): Instead of
3189 opening the file, stat it and make sure that it belongs to us.
3191 2001-10-10 Jeffrey Stedfast <fejj@ximian.com>
3193 * camel-tcp-stream-openssl.c (ssl_verify): Same hack as below.
3195 * camel-tcp-stream-ssl.c (ssl_bad_cert): Hack around the fact that
3196 adding a cert to nss's certdb seems to not work.
3198 2001-10-10 <NotZed@Ximian.com>
3200 * camel-vee-folder.c (vee_sync): Only re-build the folder if we're
3201 expunging. Also only clear out the changed folders list if we're
3202 expungung and everything worked.
3204 2001-10-10 Jeffrey Stedfast <fejj@ximian.com>
3206 * camel-charset-map.c (camel_charset_map_init): Added a hack for
3209 2001-10-10 <NotZed@Ximian.com>
3211 * providers/local/camel-maildir-store.c (scan_dir): oops, we want
3212 get_unread_message_count, not get_message_count!
3214 2001-10-09 <NotZed@Ximian.com>
3216 * camel-service.c (camel_service_disconnect): Duplicate connect
3217 code that unregisters a cancel op if we created one.
3219 * camel-operation.c (camel_operation_progress): Another go at
3220 getting the logic right again. Make transients only update after
3221 5 seconds (CAMEL_OPERATION_TRANSIENT_DELAY)
3222 (camel_operation_end): Likewise.
3224 * providers/local/camel-spool-folder.c (spool_search_by_uids):
3227 * providers/imap/camel-imap-search.c (imap_body_contains): If
3228 searching a sub-set of the total message count, then use a UID
3229 range to search only specific messages.
3231 * camel-vee-folder.c (vee_folder_change_match): Removed.
3232 (folder_changed_add_uid): Helper func for changed code.
3233 (folder_changed_remove_uid): "
3234 (folder_changed_change_uid): "
3235 (folder_changed): Rewritten. Supports proper auto-updating of
3236 changes, but not removals till a sync occurs.
3237 (vee_search_by_uids): Implement.
3238 (folder_changed): Changed to call an async threaded function to do
3239 the actual folder updating.
3241 * camel-folder-summary.c (camel_flag_list_copy): New func to copy
3242 a whole list of flags.
3243 (camel_tag_list_copy): New func to copy a whole list of flags.
3245 * providers/imap/camel-imap-folder.c (imap_search_by_uids):
3248 * providers/local/camel-local-folder.c (local_search_by_uids):
3251 * camel-folder.c (camel_folder_search_by_uids): New function,
3252 search a subset of uid's.
3253 (search_by_uids): Default impl, return error.
3255 2001-10-08 Dan Winship <danw@ximian.com>
3257 * camel-folder.h (struct _CamelFolder): replace the ever-growing
3258 list of gbooleans with a single guint32 for flags.
3260 * camel-folder.c: Update folder flag setting/checking.
3262 * providers/pop3/camel-pop3-folder.c (camel_pop3_folder_init):
3263 * providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new):
3264 * providers/local/camel-spool-folder.c (spool_init,
3265 camel_spool_folder_new):
3266 * providers/local/camel-maildir-folder.c (camel_maildir_folder_new):
3267 * providers/local/camel-local-folder.c (local_init):
3268 * providers/imap/camel-imap-folder.c (camel_imap_folder_init,
3269 camel_imap_folder_new):
3270 * camel-vtrash-folder.c (camel_vtrash_folder_init):
3271 * camel-vee-folder.c (camel_vee_folder_init):
3272 * camel-digest-folder.c (camel_digest_folder_init): update folder
3275 2001-10-07 Dan Winship <danw@ximian.com>
3277 * providers/imap/camel-imap-store.c (get_folder_online): Unlock
3278 the store before returning error. (noted by NotZed)
3280 2001-10-06 Jeffrey Stedfast <fejj@ximian.com>
3282 * camel-mime-utils.c (header_decode_text): Fix a slight error in
3283 logic. Just because the last word was an encoded word doesn't mean
3284 we ignore the lwsp padding, we only ignore it if the last word and
3285 *this* word are encoded.
3287 2001-10-06 Jeffrey Stedfast <fejj@ximian.com>
3289 * camel-mime-filter-basic.c (filter): Implemented uuencoding and
3291 (complete): Implemented uuencoding and decoding.
3293 * camel-mime-utils.c (uuencode_close): New function to flush the
3295 (uuencode_step): New function to uuencode a block of data.
3297 2001-10-05 <NotZed@Ximian.com>
3299 * providers/imap/camel-imap-store.c (subscribe_folder): Use a
3300 folder_subscribed event rather than a folder_created one.
3301 (unsubscribe_folder): Similarly for unsubscribed/deleted.
3302 (create_folder): Emit a folder_created event on the folders we
3303 added. Not sure hsould probably check which ones are new and
3304 which ones are just existing ones?
3305 (delete_folder): Emit a folder_deletd event when we've deleted the
3306 folder. Part of fix for #11831.
3308 * camel-store.c (camel_store_class_init): Added
3309 folder_subscribed/unsubscribed events.
3311 2001-10-05 Jeffrey Stedfast <fejj@ximian.com>
3313 * camel-service.c (camel_service_finalize): Turn off warnings.
3316 * camel-sasl.c (sasl_challenge): Turn off warnings.
3318 * camel-tcp-stream.c (tcp_connect): Turn off warnings.
3319 (tcp_getsockopt): Same.
3320 (tcp_setsockopt): Here too.
3321 (tcp_get_socket): And here.
3323 * camel-folder.c (folder_sync): Turn off warnings.
3325 (append_message): Here too.
3326 (get_message): And here.
3327 (search_by_expression): And again here.
3328 (folder_changed): Here too.
3330 * camel-store.c (get_folder): Set an exception and turn off
3331 debugging g_warnings.
3332 (create_folder): Same.
3333 (delete_folder): Here too.
3334 (rename_folder): And here.
3335 (get_trash): And here.
3336 (get_folder_info): Same.
3337 (free_folder_info): And again here.
3338 (camel_folder_info_build): Here too.
3339 (folder_subscribed): Same.
3340 (subscribe_folder): Here too.
3341 (unsubscribe_folder): And here.
3343 2001-10-05 <NotZed@Ximian.com>
3345 * camel-mime-utils.c (header_decode_mailbox): Try harder to get
3346 broken names out of addresses. Unencoded ,'s in names will still
3347 break it, but well what can you do eh?
3348 (header_decode_mailbox): Always add .'s into address we've scanned
3349 past a '.', even if we can't decode the next part. Fix for some
3352 2001-10-04 <NotZed@Ximian.com>
3354 * camel-store.c (camel_store_delete_folder): Change the order of
3355 execution slightly. We delete the folder first, then call the
3356 classes delete folder, then cleanup the hashtable afterwards.
3357 This is so deletes of vfolders work, since vee-store uses the
3358 folder hashtable to store all of is vfolders :-/
3360 2001-10-04 Jeffrey Stedfast <fejj@ximian.com>
3362 * camel-service.c (camel_service_connect): Unregister the
3363 operation before unreffing it.
3365 2001-10-03 <NotZed@Ximian.com>
3367 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
3368 Remove now unused 'recents' array/freeing func.
3370 * camel-object.c (camel_object_trigger_event): Oops, always run
3371 the prep function, even if we have no hooks listening. Causes
3372 incoming imap recents to get ignored bythe camel-folder filter
3375 * providers/local/camel-local-folder.c (local_sync): Dont
3376 explicitly save metadata, its saved in summary_sync.
3378 * providers/local/camel-mh-summary.c: Call superclass.
3379 (mh_summary_check): Dont save ibex.
3381 * providers/local/camel-maildir-summary.c: Call superclass method.
3382 (maildir_summary_check): Dont save ibex explictly.
3384 * providers/local/camel-mbox-summary.c: Call super-class sync when
3385 done, saves summary/ibex, etc.
3386 (mbox_summary_check): Dont save ibex.
3387 (mbox_summary_sync): Call summary_check rather than trying to
3388 update from our known position.
3390 * providers/local/camel-local-summary.c
3391 (camel_local_summary_check): Dont save the summary or index here.
3392 (local_summary_sync): Save the summary/index here.
3394 * camel-search-private.c (camel_search_build_match_regex): Added
3395 MATCH_NEWLINE flag, -> REG_NEWLINE.
3397 * camel-lock-helper.c: Include <string.h> to kill some warnings.
3399 * camel-filter-search.c (get_full_header): Put \n's between each
3401 (header_full_regex): Dont drop the first argument to the command
3403 (header_full_regex): Set match_newline for building regex.
3404 (body_regex): And here too. These all fix #9877.
3406 2001-10-03 Jeffrey Stedfast <fejj@ximian.com>
3408 * camel-store.c (camel_store_delete_folder): Call
3409 camel_folder_delete() on the folder if it's "alive".
3411 * camel-folder.c (camel_folder_delete): Mark the folder as
3412 deleted, perform any folder specific cleanup and emit the deleted
3414 (camel_folder_sync): Only sync the folder if it hasn't been
3416 (camel_folder_expunge): Same.
3418 2001-10-03 Dan Winship <danw@ximian.com>
3420 * providers/local/camel-local-provider.c (local_url_equal):
3421 Strange are the ways of alloca. Fixes 11543.
3423 2001-10-02 Jeffrey Stedfast <fejj@ximian.com>
3425 * camel-tcp-stream-ssl.c (ssl_bad_cert): Import the certificate if
3426 the user accepts it.
3428 2001-10-02 <NotZed@Ximian.com>
3430 * providers/local/camel-local-provider.c (local_url_hash,
3431 local_url_equal): for hashing/comparing local url's, we ignore
3432 trailing /'s in paths (maybe shuld handle multiple /'s too).
3433 (camel_provider_module_init): Use local_url_hash/equal for all
3436 * camel-sasl-digest-md5.c (digest_response): Change to
3437 camel_charset_iconv_open/close.
3439 * camel-pgp-context.c (pgp_verify): Change to
3440 camel_charset_iconv_open/close.
3442 * camel-mime-part-utils.c (convert_buffer): Change to
3443 camel_charset_iconv_open().
3445 * camel-mime-filter-charset.c
3446 (camel_mime_filter_charset_new_convert, finalise): Change to
3447 camel_charset_iconv_open, etc.
3449 * camel-mime-utils.c: Use the camel_charset_iconv_open/close()
3450 functions to open/close it.
3452 * camel-charset-map.c (camel_charset_iconv_open): New function,
3453 wrap iconv_open, so we can cache ic's.
3454 (camel_charset_iconv_close): Likewise for close.
3455 (camel_charset_map_init,shutdown): Init/free iconv cache.
3457 2001-10-02 Jeffrey Stedfast <fejj@ximian.com>
3459 * camel-charset-map.c (camel_charset_to_iconv): Revert my
3460 x-unknown special-case hack - this may mask other problems.
3462 * camel-mime-utils.c (rfc2047_decode_word): If the iconv
3463 conversion fails, for whatever reason, retry using the user's
3466 2001-10-02 <NotZed@Ximian.com>
3468 * providers/local/camel-maildir-store.c (get_folder_info): Go back
3469 to using the store url's path, not the toplevel_dir thing.
3471 * camel-operation.c (camel_operation_progress): Fix the progress
3472 logic, so we dont update too often.
3474 * camel-object.c (camel_object_get_hooks): Change the lock to a
3476 (camel_object_hook_event): Maintain list length of hook list.
3477 (camel_object_unhook_event): "
3478 (camel_object_unhook_event): If we are in an event, just mark the
3479 pair as removed, without removing it.
3480 (camel_object_trigger_event): Before running events, copy the
3481 list, and also ignore 'removed' events. After running events, if
3482 we're all out of events, then free up any pending-removed events.
3483 (camel_object_free_hooks): Add some new assertions on the state of
3485 Removed the #error if threads not defined. It _should_ actually
3486 work without threads.
3487 (camel_object_free_hooks): Free mutex when done.
3489 2001-10-01 Jeffrey Stedfast <fejj@ximian.com>
3491 * providers/imap/camel-imap-store.c (delete_folder): Remove any
3492 cached messages that belonged to the deleted folder.
3493 (subscribe_folder): Don't ever let the info->name be NULL and
3494 don't use the stupid concat kludge to generate the URL, just use a
3495 CamelURL to do it. This way we don't risk breaking stuff by having
3496 a url like imap://fejj@imap//folder
3498 * camel-charset-map.c (camel_charset_to_iconv): If the charset is
3499 x-unknown, return the locale_charset.
3501 2001-10-01 Dan Winship <danw@ximian.com>
3503 * camel-provider.h: Fix up the provider flags to specify things
3504 more completely so we don't have to hardcode provider names in the
3507 * providers/local/camel-local-provider.c: MH, mbox, and Maildir
3508 are LOCAL. MH and mbox are no longer STORAGE by the new
3511 * camel-session.c (vee_provider): The vfolder store is a STORAGE.
3513 2001-10-01 Dan Winship <danw@ximian.com>
3515 * providers/local/camel-local-store.c (construct): Don't munge the
3516 URL; CamelSession's caching relies on it not changing. Instead,
3517 add a toplevel_dir field to CamelLocalStore, and set that to the
3518 path, but always ending with /.
3519 (camel_local_store_finalize): Free toplevel_dir
3520 (camel_local_store_get_toplevel_dir): Return toplevel_dir rather
3523 * providers/local/*: Lots of s/url->path/toplevel_dir/
3525 * providers/local/camel-spool-store.c (construct): Likewise, don't
3526 try to strip a trailing / from url->path here, but I didn't make
3527 the corresponding toplevel_dir change, because there's no good
3528 reason someone should expect "/var/spool/mail/danw/" to work since
3529 that's not a directory.
3531 * providers/pop3/camel-pop3-folder.c (pop3_refresh_info): if STAT
3532 returns 0, don't bother sending UIDL. Speeds things up slightly
3533 and also works around a bug in a particular random POP server.
3536 2001-09-29 Jeffrey Stedfast <fejj@ximian.com>
3538 * camel-pgp-context.c (pgp_sign): Add --no-secmem-warning and
3539 --no-greeting to the gpg command-line options.
3540 (pgp_clearsign): Same.
3541 (pgp_verify): Here too.
3542 (pgp_encrypt): And here.
3543 (pgp_decrypt): And finally here.
3545 2001-09-28 Jeffrey Stedfast <fejj@ximian.com>
3547 * camel-filter-search.c (get_source): Same here.
3549 * camel-mime-message.c (camel_mime_message_set_source): Don't use
3550 the e_url_shroud hack, use CamelURL functions instead.
3552 2001-09-28 Jeffrey Stedfast <fejj@ximian.com>
3554 * providers/nntp/camel-nntp-provider.c
3555 (camel_provider_module_init): Init the nntp url hash and url_equal
3558 * providers/sendmail/camel-sendmail-provider.c
3559 (camel_provider_module_init): Init the sendmail url hash and
3560 url_equal functions.
3562 * providers/smtp/camel-smtp-provider.c
3563 (camel_provider_module_init): Init the smtp url hash and url_equal
3566 * providers/pop3/camel-pop3-provider.c
3567 (camel_provider_module_init): Init the pop3 url hash and url_equal
3570 * providers/imap/camel-imap-provider.c
3571 (camel_provider_module_init): Init the imap url hash and url_equal
3574 * providers/local/camel-local-provider.c
3575 (camel_provider_module_init): Init the local url hash and
3576 url_equal functions.
3578 * camel-session.c (camel_session_class_init): Init the vfolder url
3579 hash and url_equal functions.
3581 * camel-provider.h: Added url_hash and url_equal function pointers
3584 * camel-vtrash-folder.c (vtrash_move_messages_to): Oops, a
3585 CamelFolder is not a CamelFolderClass.
3587 2001-09-28 Dan Winship <danw@ximian.com>
3589 * camel-tcp-stream-openssl.c (ssl_error_to_errno): Make this take
3590 an SSL * instead of a CamelTcpStreamSSL *, since it can get called
3591 from open_ssl_connection, when the CamelTcpStreamSSL isn't set up
3592 right yet. Fixes a crash on connection failure.
3594 2001-09-27 Dan Winship <danw@ximian.com>
3596 * providers/imap/camel-imap-folder.c
3597 (camel_imap_folder_fetch_data): Grab the store's command_lock
3598 before grabbing the folder's cache_lock to prevent deadlock if
3599 another thread is processing an EXPUNGE response.
3601 * providers/imap/camel-imap-folder.c
3602 (imap_expunge_uids_resyncing): Fix a compiler warning that might
3603 point out a real bug...
3605 * providers/imap/camel-imap-folder.c (get_content): and one that
3608 2001-09-27 <NotZed@Ximian.com>
3610 * camel-service.c (camel_service_connect): Dont re-register the
3611 connect_op if we got it by calling 'operation_registered', which
3612 returns an already-registered one.
3613 (camel_service_disconnect): Likewise here. This removes all the
3614 re-registered warnings.
3616 * camel-object.c (camel_object_unref): Fill the finalised data
3617 with nonsense, rather than 0's - more easily detect bad data.
3618 (camel_object_new): Clear instance data when we retrieve it off
3621 * camel-object.h (_CamelObject): Added an event lock pointer for
3622 uh, locking event stuff. Also change the hooklist hashtable into
3623 a list. Changed all the code to handle it. Result: thread-safe
3624 events, event-hooks, and save memory too, and SHOULD FINALLY FIX
3625 THAT UNREAD COUNT PROBLEM.
3627 2001-09-27 Jeffrey Stedfast <fejj@ximian.com>
3629 * camel-pgp-mime.c (camel_pgp_mime_part_decrypt): CRLF decode the
3630 stream before parsing it into a MIME part. This fixes bug #10521.
3632 * camel-store.c: Remove the old folder from the vTrash folder.
3634 2001-09-27 Dan Winship <danw@ximian.com>
3636 * camel-service.c: Change "gboolean connected" to
3637 "CamelServiceConnectionStatus status", which can be disconnected,
3638 connecting, connected, or disconnecting.
3639 (camel_service_init, camel_service_finalize): create/destroy the
3640 connect_op_lock. Refer to service->status rather than
3642 (camel_service_connect): When connecting, note the current
3643 operation (and create a new one if there's none registered) and
3644 mark the connection "connecting" until we succeed or fail.
3645 (camel_service_disconnect): Likewise in reverse.
3646 (camel_service_cancel_connect): New function to cancel a
3648 (cancel_connect): Default implementation: Call
3649 camel_operation_cancel on the connect_op.
3651 * camel-disco-store.c (disco_connect): Only call
3652 CamelRemoteStore's connect func if we're online.
3653 (disco_cancel_connect): Fall back to offline if a connection gets
3655 (disco_get_folder_info): Kludge: call connect explicitly before
3656 deciding whether to do the online or offline version, so if the
3657 connect fails, we fall back correctly.
3659 * camel-session.c (camel_session_get_service_connected):
3660 s/svc->connected/svc->status/
3662 * camel-remote-store.c (camel_remote_store_finalise):
3663 Change service->connected check to service->status check.
3664 (remote_connect): Don't set service->connected here:
3665 camel_service_connect() itself does that.
3667 * camel-operation.c (camel_operation_registered): Deal with the
3668 possibility that there's no registered op.
3670 2001-09-26 <NotZed@Ximian.com>
3672 * camel-filter-driver.c (camel_filter_driver_filter_message): If
3673 we get a search error, just abort, dont try and fall back and copy
3675 (camel_filter_driver_filter_message): Make sure we ALWAYS use
3676 exceptions for important things - like moving messages to inbox!
3677 (camel_filter_driver_filter_message): If we have the source
3678 folder, use camel_folder_set_message_flags rather then poking the
3679 info directly, which skips changed events. This means filtering
3680 immediate doesn't lose changed events.
3681 (do_flag): Same here.
3682 (do_colour): Same thing but using set_tag.
3683 (do_score): Same again.
3684 (camel_filter_driver_filter_folder): Use ~0 as the 'set' arg to
3685 set_flags, just saves typing.
3686 (open_folder): We cache folders that we couldn't open as well as
3687 those ones we could. Use magic token FOLDER_INVALID =
3688 (void *)~0 as the marker.
3689 (close_folder): Handle FOLDER_INVALID case properly.
3691 2001-09-26 Jeffrey Stedfast <fejj@ximian.com>
3693 * camel-mime-message.c
3694 (camel_mime_message_get_part_by_content_id): New function to
3695 convenience Larry ;-)
3696 (check_content_id): Oops, return !found instead of found. This
3697 callback has to return whether or not to keep searching, not
3698 whether or not it found what it's looking for. Do'h!
3700 * camel-pgp-mime.c (camel_pgp_mime_is_rfc2015_signed): block out
3701 some code if ENABLE_PEDANTIC_PGPMIME is not defined.
3703 2001-09-26 <NotZed@Ximian.com>
3705 * camel-vee-store.c: Emptied VeeStorePrivate, member wasn't used.
3707 * camel-vee-folder.c (camel_vee_folder_set_expression): Lock
3708 changed list separately.
3709 (camel_vee_folder_remove_folder): "
3710 (camel_vee_folder_set_folders): Use changed_lock for changed list.
3711 (vee_refresh_info): Use changed_lock, also just grab the list,
3712 reset it in the lock, and do the work unlocked.
3713 (vee_sync): Use changed lock for changed list.
3714 (folder_changed): ". All this kills a deadlock with sync/expunge.
3716 * camel-private.h (CamelVeeFolderPrivate): Added a new lock for
3717 the folders-changed list.
3718 (CamelVeeStorePrivate): Removed, defined in camel-vee-store.c,
3719 thanks to a pedantic.
3721 2001-09-26 Jeffrey Stedfast <fejj@ximian.com>
3723 * Makefile.am: Fix Ettore's fix.
3725 2001-09-25 Jeffrey Stedfast <fejj@ximian.com>
3727 * camel-pgp-context.c (camel_pgp_context_new): No longer takes a
3729 (pgp_sign): Only uncache the passphrase on failure.
3730 (pgp_clearsign): Same.
3731 (pgp_encrypt): Here too.
3732 (pgp_decrypt): And here.
3733 (pass_free): New function to zero the passphrase before freeing
3736 2001-09-25 Ettore Perazzoli <ettore@ximian.com>
3738 [Patch for Automake 1.5 compatibility pointed out by Richard
3739 Boulton <richard@tartarus.org>, as per #9258.]
3741 * providers/nntp/Makefile.am: Remove some commented parts that
3742 make Automake 1.5 choke.
3744 * Makefile.am (camel-lock-helper): Add $(EXEEXT) for Automake 1.5
3747 2001-09-25 <NotZed@Ximian.com>
3749 * camel-folder.c (get_unread_message_count): Only unref info if we
3752 * camel-operation.c (camel_operation_unref): Fix for !threads
3753 enabled not ccompiling.
3754 (camel_operation_ref): Assert refcount > 0.
3755 (struct _CamelOperation): Removed the lock. On further
3756 investigation, I dont think this will always work, the
3757 registration operations assume that a lookup in the
3758 operation_active table will return a ref, that will remain valid
3759 until we ref it, which needn't be the case. So now i'm using a
3760 single global lock, since we'd need to do that for unref anyway,
3761 and every operation is fast & memory-bound. Changed all the code
3763 (camel_operation_progress_count): Since the code is identical,
3764 just call progress() for now.
3765 (camel_operation_register): No longer refcount, use unref to
3766 check/clear the active table.
3767 (camel_operation_unregister): Same here.
3768 (camel_operation_unref): Check if operation is in active table, if
3771 2001-09-25 Dan Winship <danw@ximian.com>
3773 * camel-tcp-stream-openssl.c (my_SSL_read, my_SSL_write): call
3774 SSL_read/write, looping on SSL_ERROR_WANT_READ/WRITE. I'm sure
3775 there's a perfectly good reason that the API works this way. No,
3777 (stream_read, stream_write): use my_SSL_read and my_SSL_write.
3778 Fixes at least ximian 8593, and probably 6024 and maybe 10366,
3779 at least for OpenSSL. There may be a parallel NSS bug?
3781 2001-09-25 <NotZed@Ximian.com>
3783 * camel-stream-buffer.c (stream_write_all): A "safe write"
3784 function that always writes out all data asked of it, till
3786 (stream_write): Rewritten. What was i on when i wrote that
3787 originally, how did it ever work with tcp streams ...
3789 2001-09-24 <NotZed@Ximian.com>
3791 * camel-folder.c (append_message): Set the exception to
3792 FOLDER_INVALID rather than making out it worked. A fix for #7025.
3793 (search_by_expression): Here too.
3795 * providers/imap/camel-imap-folder.c (imap_update_summary): In the
3796 'lose' case, free messages, not fetch_data twice!
3798 * camel-filter-search.c (check_header): If the type is encoded,
3799 get the fallback charset from the message content-type.
3801 * camel-mime-part-utils.c (check_html_charset): Dont check for
3802 charset==null before calling charset_to_iconv.
3803 (simple_data_wrapper_construct_from_parser): "
3805 * camel-mime-message.c (process_header): Try use content-type
3806 charset param as the fallback charset.
3808 * camel-charset-map.c (camel_charset_to_iconv): Handle name ==
3811 * camel-folder-summary.c (camel_folder_summary_format_address):
3812 (camel_folder_summary_format_string): Made private again, removed
3813 #warning about it. Renamed to s/camel_folder//.
3814 (summary_format_string): Take default charset param.
3815 (camel_message_info_new_from_header, message_info_new): Decode
3816 content-type field to get the charset parameter to use as the
3817 default charset for decoding strings.
3819 * camel-search-private.c (camel_search_header_match): Pass NULL as
3820 the charset, the locale charset is always tried.
3821 (camel_search_header_match): Supply a default_charset parameter to
3822 be used with TYPE_ENCODED params.
3824 * camel-mime-utils.c
3825 (header_param): get rid of the g_strcasecmp crap.
3826 (header_set_param): Same here.
3827 (header_decode_param_list): And here.
3828 (header_decode_text): Totally rewritten. 30% of its size. If the
3829 word is not rfc2047 encoded, always try default_charset if
3830 supplied, if that fails, try locale charset if it exists, if that
3831 fails then assume latin1/7 bit ascii.
3832 (append_8bit): Changed to return FALSE if we can't convert for
3833 whatever reason, and dont append anything.
3835 * camel-mime-part.h (struct _CamelMimePart): Move content_type and
3836 headers out of the 'private' section.
3838 * camel-mime-part.c (get_headers): Dont do any conversion on the
3840 (process_header): Get the content-type charset as the fallback
3841 charset for decode_string.
3842 (construct_from_parser): IF we have a content-type header, process
3843 it before doing anything else, so we have access to a fallback
3844 charset for invalid headers.
3846 2001-09-23 Jeffrey Stedfast <fejj@ximian.com>
3848 * camel-tcp-stream-openssl.c (ssl_verify): Don't even try to alert
3849 the user if the session isn't interactive.
3850 (errlib_error_to_errno): Make the default errno EINTR so that we
3851 act just like CamelTcpStreamSSL.
3853 * camel-pgp-context.c (pgp_sign): When the password is not
3854 provided, set the exception to USER_CANCEL.
3855 (pgp_clearsign): Same.
3856 (pgp_encrypt): And here.
3857 (pgp_decrypt): Here too.
3859 2001-09-21 <NotZed@Ximian.com>
3861 * camel-store.c (create_folder): Set the exception if
3862 create_folder isn't implemented.
3864 2001-09-21 Jeffrey Stedfast <fejj@ximian.com>
3866 * providers/imap/camel-imap-store.c (create_folder): Go back to
3867 not using camel_folder_info_build() here because this seems to
3868 break folder creation (returning nodes from the root path when it
3871 2001-09-21 <NotZed@Ximian.com>
3873 * camel-vee-store.c (vee_get_folder_info): Force a refresh of
3874 vfolders before storing their count. This essentially makes
3875 'get_folderinfo' refresh all vfolders, so that get-mail works as
3878 * camel-vee-folder.c (camel_vee_folder_finalise): Clear lists.
3879 (folder_changed): If we're not autoupdating the folder, then
3880 add this folder to the list of 'changed' folders for this vfolder.
3881 (camel_vee_folder_set_expression): Reset the folders_changed list.
3882 (camel_vee_folder_remove_folder): Remove the folder from the
3883 folders_changed list.
3884 (camel_vee_folder_set_folders): If we have a folder already, but
3885 its changed, use this opportunity to update it.
3886 (vee_sync): Remove any synced folders from the folders_changed
3888 (vee_refresh_info): Refresh folder, re-run queries on any changed
3891 2001-09-20 <NotZed@Ximian.com>
3893 * camel-folder-summary.c (camel_folder_summary_header_load): New
3894 function to just load the summary. Not much use yet, until unread
3895 counts are stored in the summary (which now looks like too much
3898 * camel-mime-utils.c (header_decode_mailbox): Crappy fix for
3899 stupid mailers. If we get 'name b. name <foo>' then treat it as
3900 '"name b. name" <foo>'. See 8147.
3901 (header_decode_mailbox): Another fix for really broken mailers
3902 that have things that look like addresses followed by <address>
3904 (rfc2047_encode_word): Escape ??= to avoid some bizarre warning
3907 * providers/local/camel-local-folder.c
3908 (camel_local_folder_construct): Setup unread count properly, and
3909 also setup the url properly.
3911 * providers/local/camel-maildir-store.c (camel_folder_info_new):
3912 Build the path on the folderinfo.
3913 (scan_dir): Dont include empty host part in url for folder.
3914 (scan_dir): Lookup folder counts for any folders we currenty have
3916 (scan_dir): If we dont have the folder open, then scan the 'new'
3917 and 'cur' folders for new and unread messages to count instead.
3919 * providers/local/camel-spool-store.c (get_folder_info): If we
3920 have this folder open, then set unread from the folder itself.
3921 (get_folder_info): Change the INBOX path to not include the
3924 * providers/local/camel-spool-folder.c
3925 (camel_spool_folder_construct): Fix path.
3926 (camel_spool_folder_construct): Properly setup the url field when
3927 we say we've got a new folder created.
3929 * providers/imap/camel-imap-store.c (unsubscribe_folder): Build
3932 * camel-store.c (camel_folder_info_build_path): Prepend / to path.
3934 * camel-vee-folder.c (camel_vee_folder_construct): Use macro for
3935 unmatched folder name.
3936 (camel_vee_folder_new): "
3938 * camel-vee-store.c (vee_get_folder_info): Use macro for unmatched
3940 (vee_delete_folder): "
3941 (vee_rename_folder): "
3942 (vee_get_folder): Prepend / onto path.
3943 (vee_delete_folder): Setup path in folderinfo.
3944 (vee_get_folder_info): Fix path in folderinfo.
3946 * camel-vee-folder.h (CAMEL_UNMATCHED_NAME): New define for
3947 unmatched (internal) name.
3949 2001-09-20 Jeffrey Stedfast <fejj@ximian.com>
3951 * providers/local/camel-spool-folder.c
3952 (camel_spool_folder_construct): And finally here.
3954 * providers/local/camel-local-folder.c
3955 (camel_local_folder_construct): And here.
3957 * camel-vee-store.c (vee_get_folder): ANd here too.
3958 (vee_get_folder_info): And here.
3960 * providers/imap/camel-imap-store.c (create_folder): Use
3961 camel_folder_info_build() and do better error checking.
3962 (subscribe_folder): Set the path on the folder info.
3964 * camel-store.c (camel_folder_info_build): Set the folder-info
3965 path if it hasn't already been set by the caller.
3966 (camel_folder_info_free): Free the path.
3968 * camel-store.h: Added a path member to the FolderInfo type.
3970 2001-09-20 Dan Winship <danw@ximian.com>
3972 * camel-charset-map.c (camel_charset_to_iconv): Nuke debug warning.
3974 2001-09-19 Jeffrey Stedfast <fejj@ximian.com>
3976 * camel-pgp-context.c: Updated exception strings to be more clear.
3978 * camel-pgp-mime.c (pgp_mime_part_sign_restore_part): Stupid
3979 mistake, fixes bug #9975.
3981 * camel-tcp-stream-ssl.c (ssl_bad_cert): Oops, don't fail if
3982 `data' isn't a CamelService...cuz it's not supposed to be! It's a
3983 CamelTcpStreamSSL object...doh!
3985 2001-09-19 <NotZed@Ximian.com>
3987 * General cleanup of camel debug printfs.
3989 * camel-lock.c (camel_lock_fcntl): Changed to return 'success' if
3990 the error indicates file locking isn't supported on this
3991 filesystem. Still return a warning just incase (if its the first
3992 time). Might fix a lot of reported bugs.
3994 * providers/local/camel-spool-store.c (get_folder_info): Dont
3995 include the empty // host part in the uri. This 'breaks' the
3998 2001-09-18 Jeffrey Stedfast <fejj@ximian.com>
4000 * camel-mime-utils.c: Match mailing-list header List-Owner.
4002 2001-09-18 <NotZed@Ximian.com>
4004 * camel-vee-store.c (vee_get_folder): Fix the uri genereated for
4005 the folderinfo for the folder_created event.
4007 * camel-store.h: Added 'total' to CamelFolderInfo.
4009 2000-09-18 <NotZed@Ximian.com>
4011 * providers/local/camel-maildir-folder.c
4012 (camel_maildir_folder_new): If filter inbox is set on the store,
4013 and we're opening inbox '', then enable filtering on new messages.
4015 * providers/local/camel-local-folder.c
4016 (camel_local_folder_construct): After loading the summary, check
4017 it, and only abort if that fails. Also maintain the changes
4020 * providers/local/camel-local-summary.c
4021 (camel_local_summary_load): Remove summary_check code from here.
4022 (camel_local_summary_check): Sync index/summary here, if we were
4025 * providers/local/camel-spool-folder.c
4026 (camel_spool_folder_new): If we have filter-new-messages-on-inbox
4027 set and we just opened inbox, turn on filtering on this folder.
4028 (camel_spool_folder_construct): Keep track of changes for the
4029 folder, so that filter-new-messages works right (?)
4031 * providers/local/camel-spool-store.c (get_folder): Pass 'INBOX'
4032 as the folder name, not the path.
4034 * camel-folder-search.c (search_not): Modified patch from
4035 <peterw@ximian.com> since the summary is messageinfo's, not
4038 ** Ok so the problem with the stuff below is that maildir/spool
4039 'summary_load' throws away all events, including recents, joy eh?
4041 * providers/local/camel-maildir-summary.c (maildir_summary_check):
4042 Add new messages to the recent changeinfo.
4044 * providers/local/camel-spool-summary.c: Mark 'new' message as
4045 recent, for later processing if required (i.e. 'filter new
4048 * camel-store.c (construct): new function, cascade up construct
4049 method and check for 'filter' param, and set accordingly for any
4050 one that might want it.
4052 * providers/imap/camel-imap-store.c (construct): map the
4053 param_filter_inbox flag to the store->flags as
4054 CAMEL_STORE_FILTER_INBOX.
4056 * camel-store.h (CAMEL_STORE_FILTER_INBOX): new flag to tell it to
4059 * providers/imap/camel-imap-folder.h: Removed do_filtering flag
4060 from CamelImapFolder.
4062 * providers/imap/camel-imap-folder.c (imap_update_summary): Remove
4063 the 'recents' parameter, use the 'changes' parameter instead to
4065 (camel_imap_folder_changed): Changed for update_summary api
4066 change. Now always just emit the changed event if we have any
4067 changes to report, filtering code removed, handled upstream.
4069 (filter_free): Removed old filtering code.
4070 (camel_imap_folder_new): Set the filter_recent flag on the folder
4071 if we're the inbox and filtering of inbox is enabled.
4073 * camel-folder.c (folder_changed): If we have 'recent' messages,
4074 and are set to filter recents, then freeze the folder and launch a
4075 thread to do the processing (or similar if threading not enabled).
4076 (thaw): Make sure we emit the changed signal outside of owning the
4077 lock and if things have changed. Also, no longer bother
4078 downgrading folder_changed events to message_changed events.
4080 * camel-folder.h (struct _CamelFolder): Added filter_recent flag
4081 -> signifies all recent messages in folder should be filtered.
4083 * camel-session.c: (camel_session_thread_msg_new,
4084 camel_session_thread_msg_free, camel_session_thread_queue,
4085 camel_session_thread_wait): code to handle async operations as
4086 part of camel processing.
4087 (camel_session_finalise): free thread_lock, destroy thread, active
4089 (camel_session_init): init thread, active hash, etc.
4090 (camel_session_class_init): Init virtual functions.
4091 (session_thread_msg_new, session_thread_msg_free,
4092 session_thread_destroy, session_thread_received,
4093 session_thread_queue, session_thread_wait): default implementation
4094 of session threads stuff.
4096 2001-09-17 <NotZed@Ximian.com>
4098 * camel-folder.c (camel_folder_change_info_recent_uid): New
4099 function to add a 'recent' uid to the change info.
4100 (camel_folder_change_info_clear): Clear recent list.
4101 (camel_folder_change_info_free): Free recent list.
4102 (camel_folder_change_info_new): Setup recent list.
4104 * camel-folder.h: Added a uid_recent item to the folder_changed
4107 * providers/local/camel-maildir-store.c (scan_dir): Free new in
4110 * providers/local/camel-local-provider.c: Add local config entries
4111 to filter on new messages in spool and maildir provider.
4113 * camel-vee-folder.c (vee_folder_construct): Remove the assertion
4114 which stops ? in names from being allowed.
4116 2001-09-18 Dan Winship <danw@ximian.com>
4118 * camel-data-wrapper.c (camel_data_wrapper_is_offline): Virtualize
4121 * camel-medium.c (is_offline): A medium is offline if its content
4124 * camel-multipart.c (is_offline): A multipart is offline if any of
4125 its subparts are offline.
4127 2001-09-18 Jeffrey Stedfast <fejj@ximian.com>
4129 * camel-charset-map.c: Added korean charset conversion.
4131 2001-09-17 Jeffrey Stedfast <fejj@ximian.com>
4133 * providers/imap/camel-imap-store.c (delete_folder): Don't process
4134 the ImapResponse data, we don't want to block forever on data we
4136 (create_folder): Use get_folders_online() instead of
4137 get_folder_info_online().
4139 * camel-folder.c: Reverted previous changes.
4141 2001-09-17 JP Rosevear <jpr@ximian.com>
4143 * Makefile.am: Helpful install-exec-hook debugging output
4145 2001-09-16 Jeffrey Stedfast <fejj@ximian.com>
4147 * camel-folder.c (camel_folder_get_uri): New function to get the
4149 (get_uri): Default implementation.
4151 2001-09-14 <NotZed@Ximian.com>
4153 * camel-vee-folder.c (camel_vee_folder_set_folders): New function,
4154 set the complete list of folders on a vfolder, all at once.
4155 (camel_vee_folder_set_expression): If we set the query to be the
4156 same thing, dont do anything.
4158 * camel-vee-store.c (camel_vee_store_init): Turn off vtrash for
4161 * camel-store.c (camel_store_init): Enable vtrash by default via
4163 (camel_store_get_trash): REturn NULL if the store doesn't support
4165 (init_trash): Dont init if store doesn't support vtrash.
4167 * camel-store.h: Add a new flags CAMEL_STORE_VTRASH -> store
4170 2001-09-13 <NotZed@Ximian.com>
4172 * camel-vee-store.c (vee_get_folder_info): Implement.
4173 (build_info): Used to build a folder record from the folders
4175 (vee_delete_folder): Implemented, remove folder from hashtable.
4176 (vee_rename_folder): Implemented, remove old folder from
4177 hashtable, add new one and rename its guts too.
4179 * camel-store.c (camel_store_rename_folder): Do nothing if we're
4180 not asked to actually change names. Also dont do the renamed
4181 cache check till after we've called the subclass.
4182 (camel_store_delete_folder): Call the subclass delete firs,t then
4183 make sure the cache is right.
4185 * camel-vee-folder.c (vee_folder_construct): Remove support for
4186 name?query syntax to setup vfolder. Abort if such syntax is used.
4187 (camel_vee_folder_new): Removed code that handles ? syntax, etc.
4188 (vee_folder_build_folder): Handle unset expression, treat it as an
4190 (camel_vee_folder_set_expression): Oops, actually set the
4193 * camel-vtrash-folder.c (camel_vtrash_folder_new): Dont use
4194 name?query syntax to setup vfolder, but set the expression
4195 directly. Also fixes a small memleak.
4197 2001-09-12 <NotZed@Ximian.com>
4199 * camel-store.c (camel_store_delete_folder): Fixed warnings with a
4201 (camel_store_rename_folder): "
4203 2001-09-14 Jeffrey Stedfast <fejj@ximian.com>
4205 * camel-url.c (camel_url_set_param): Use g_datalist_set_data_full
4206 so that the data will be free'd when we clear the list.
4208 2001-09-14 Dan Winship <danw@ximian.com>
4210 * camel-file-utils.c (camel_file_util_encode_string,
4211 camel_file_util_decode_string): Don't claim failure when
4212 reading/writing the empty string.
4214 2001-09-14 JP Rosevear <jpr@ximian.com>
4216 * Makefile.am: use install hook instead of install rule to
4217 guarantee we run after installation
4219 2001-09-13 Jeffrey Stedfast <fejj@ximian.com>
4221 * camel-filter-driver.c (camel_filter_driver_filter_folder): Don't
4222 reuse the exception if it has already been set.
4223 (camel_filter_driver_filter_message): Same here. Also use the new
4224 return value from camel_filter_search_match().
4226 * camel-filter-search.c (camel_filter_search_match): Return an
4227 integer (matched, no-match, or error).
4229 * providers/local/camel-mbox-folder.c (mbox_append_message): Do
4230 error-checking based on function return values rather than
4231 exceptions as it's possible for them to be NULL.
4232 (mbox_get_message): Same.
4234 * providers/imap/camel-imap-folder.c (imap_append_offline): Pass
4235 an exception to the cache.
4236 (imap_append_online): Same.
4237 (imap_append_resyncing): Here too.
4238 (imap_copy_offline): And here.
4239 (handle_copyuid): Pass NULL as the exception here...
4240 (parse_fetch_response): And finally here.
4242 * providers/imap/camel-imap-message-cache.c
4243 (camel_imap_message_cache_insert):
4245 (camel_imap_message_cache_insert_stream):
4246 (camel_imap_message_cache_insert_wrapper):
4247 (camel_imap_message_cache_copy): Take an exception argument and
4250 * camel-mime-part-utils.c
4251 (simple_data_wrapper_construct_from_parser): Convert the charset
4252 to the iconv-friendly name.
4254 * camel-charset-map.c (camel_charset_to_iconv): Add code to
4255 convert windows-[cp]#### charsets to their iconv-friendly format
4258 * camel-pgp-context.c (crypto_exec_with_passwd): Return -1 on
4261 2001-09-12 Larry Ewing <lewing@ximian.com>
4263 * camel-filter-driver.c (camel_filter_driver_filter_mbox): free
4264 the source url in the nonfailure case.
4266 2001-09-12 <NotZed@Ximian.com>
4268 * camel-folder-search.h: Change the 'not' virtual method from an
4269 immediate e-sexp function to a non-immediate one, which is what it
4272 * camel-folder-search.c (search_not): Implement a 'not' function
4273 ourselves. If 'not' on a vector value, then not over all items
4275 (builtings[]): Change the 'not' builtin to be a non-immediate
4278 2001-09-12 Jeffrey Stedfast <fejj@ximian.com>
4280 * camel-filter-driver.c (camel_filter_driver_filter_mbox): Unref
4283 2001-09-10 <NotZed@Ximian.com>
4285 * providers/local/camel-maildir-store.c (get_folder_info): Pass in
4286 a hashtalbe used for finding visited nodes.
4289 (inode_free): Helper functions for visited node checks, hashes on
4290 inode + device number.
4291 (scan_dir): Dont re-visited directories we've already visited, use
4292 inodes + device number.
4293 Also, if the folder doesn't contain cur/tmp/new, mark it as
4294 noselect, but continue to recurse folders, if asked.
4296 * camel-folder.c (move_messages_to): Progress reporting while
4299 * camel-store.c (camel_store_delete_folder): Make sure we remove
4300 the folder from our vtrash, if we have it in our opened set, and
4301 also remove it from our hashtable.
4302 (camel_store_rename_folder): Remove the old folder name from the
4303 folder cahce, if it is there.
4305 2001-09-10 Jeffrey Stedfast <fejj@ximian.com>
4307 * camel-charset-map.c (camel_charset_to_iconv): Get rid of the
4308 g_warning, we no longer really need that.
4310 2001-09-10 <NotZed@Ximian.com>
4312 * providers/imap/camel-imap-store.c (camel_imap_msg_new): Forgot
4313 to return the newly allocated msg.
4315 2001-09-08 Not Zed <NotZed@Ximian.com>
4317 * providers/local/camel-spool-summary.c (spool_summary_sync_full):
4320 * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
4323 * camel-tcp-stream-raw.c (stream_read): Save errno around fcntl
4324 call in cancellable read case. Also, loop while we get EINTR.
4325 This might fix some weird reconnect behaviour with pop.
4328 2001-09-07 Jeffrey Stedfast <fejj@ximian.com>
4330 * camel-tcp-stream-ssl.c (ssl_bad_cert): #if 0 out the code that
4331 was hopefully going to fix bug #5325 because the functions I used
4332 seem to have been deprecated. *sigh*.
4334 * camel-remote-store.c (camel_remote_store_finalise): Disconnect
4335 from the service here otherwise the locks will be destroyed and by
4336 the time CamelService finalizes we'll crash or hang.
4338 * providers/smtp/camel-smtp-transport.c (smtp_data): Make sure to
4339 unref the mime filters when we finish with them.
4341 2001-09-07 Ettore Perazzoli <ettore@ximian.com>
4343 * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
4344 s/Synchronising/Synchronizing/.
4345 (mbox_summary_sync_quick): Likewise.
4346 (summary_rebuild): s/Summarising/Summarizing/.
4348 2001-09-07 Jeffrey Stedfast <fejj@ximian.com>
4350 * camel-multipart.c (camel_multipart_set_boundary): Take a const
4351 char * instead of a char *.
4353 * camel-mime-part-utils.c
4354 (camel_mime_part_construct_content_from_parser): Reuse the
4355 original boundary instead of generating our own.
4357 2001-09-06 <NotZed@Ximian.com>
4359 * providers/imap/camel-imap-folder.c (filter_proc): Thread
4360 function to perform filtering.
4361 (filter_free): Free the filter object.
4362 (camel_imap_folder_changed): If we have threads enabled, then
4363 queue up a request to perform filtering. For bug #4422.
4365 * providers/imap/camel-imap-store.c (camel_imap_msg_new): Create a
4367 (camel_imap_msg_queue): Queue an 'imap msg'.
4368 (async_received): Handle receiving of imap msg in async thread.
4369 (async_destroy): Handle destroying of imap msg.
4370 (camel_imap_store_finalize): Destroy thread when done.
4371 (camel_imap_store_init): Setup thread.
4373 * providers/imap/camel-imap-store.h: Added an ethread to the
4374 store, for async processing.
4376 2001-09-06 Jeffrey Stedfast <fejj@ximian.com>
4378 * camel-remote-store.c (remote_recv_line): Use
4379 camel_stream_buffer_read_line() instead of duplicationing the
4380 functionality. Also, the previous way was broken anyway. What if a
4381 line was the same length as our buffer? Then we'd go and read a
4382 second line and a third and so on until they weren't the same
4383 length, leaving \r's in the middle of the buffer.
4385 2001-09-06 Dan Winship <danw@ximian.com>
4387 * providers/pop3/camel-pop3-store.c (pop3_get_response): Fix this
4388 to always set an exception if it returns POP3_FAIL, as documented.
4390 * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
4393 2001-09-06 Jeffrey Stedfast <fejj@ximian.com>
4395 * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
4396 Set an exception on POP3_FAIL as well.
4398 2001-09-06 Dan Winship <danw@ximian.com>
4400 * providers/pop3/camel-pop3-provider.c: #ifdef out the "delete
4401 after N days" option in pop3_conf_entries, since it won't be done
4404 2001-09-04 Jeffrey Stedfast <fejj@ximian.com>
4406 * camel-remote-store.c (remote_disconnect): Too late to sync the
4407 folders here... if this is gonna happen at all it should be done
4410 * camel-service.c (camel_service_finalize): Do a clean disconnect.
4412 2001-08-30 Jeffrey Stedfast <fejj@ximian.com>
4414 * providers/local/camel-spool-store.c (get_inbox): Return the
4415 default folder (ie. INBOX) rather than saying we don't support an
4418 * camel-tcp-stream-ssl.c: #include pk11func.h.
4419 (ssl_bad_cert): Use CERT_GetDefaultCertDB.
4421 2001-08-29 Jeffrey Stedfast <fejj@ximian.com>
4423 * camel-smime-context.c (smime_sign_prepare): Do the same here as
4424 what we did in the pgp code a moment ago.
4425 (smime_sign_restore): And again here.
4426 (smime_sign): And update thise code to pass in the address of the
4427 encodings list when restoring parts.
4429 * camel-pgp-mime.c (pgp_mime_part_sign_prepare_part): Special-case
4430 message/rfc822 mime parts - don't set an encoding on these,
4431 instead traverse into their subparts and set the encodings for
4433 (pgp_mime_part_sign_restore_part): Reverse any operations done to
4434 message/rfc822 parts in the above prepare_part() function and also
4435 take a pointer to a GSList of encodings instead of just a GSList
4436 so we can properly keep track of which encoding we are on.
4437 (camel_pgp_mime_part_sign): Pass in the address to the encodings
4438 list when restoring parts.
4440 2001-08-29 Not Zed <NotZed@Ximian.com>
4442 * providers/pop3/camel-pop3-folder.c (pop3_sync): Add progress
4443 reporting to deleting messages. Dont change the calculation to a
4444 bloody float. Bug #6189.
4446 2001-08-28 Jeffrey Stedfast <fejj@ximian.com>
4448 * camel-pgp-context.c (crypto_exec_with_passwd): Initialize buf
4449 and diag_buf to NULL, hopefully this fixes the crash if the
4451 (pgp_encrypt): Argh. What was I thinking? Don't use "-r recipient"
4452 as an argument, instead use "-r" and "recipient" as 2 separate
4453 arguments to pgp. This might fix the "gpg only encrypts to my
4456 2001-08-28 Peter Williams <peterw@ximian.com>
4458 * providers/imap/camel-imap-store.c (create_folder): Whoops.
4459 Double-free and FMR = bad.
4461 * camel-remote-store.c (remote_send_string): Don't reveal the
4462 user's IMAP password if their server supports LITERALPLUS. Also
4463 add some more dashes to make it line up nicely :-)
4465 2001-08-28 Jeffrey Stedfast <fejj@ximian.com>
4467 * camel-tcp-stream-ssl.c (ssl_bad_cert): If the user accepts the
4468 certificate, add it to the database as a trusted CA.
4470 2001-08-28 Peter Williams <peterw@ximian.com>
4472 * camel-object.c (camel_object_unref): Make the locking more
4473 fine-grained on destruction; specifically, don't hold the
4474 type lock while calling the finalize functions.
4476 2001-08-27 Jeffrey Stedfast <fejj@ximian.com>
4478 * providers/local/camel-local-provider.c: Changed the
4479 description/names of some of the local providers to try and
4480 clarify the meanings.
4482 * providers/pop3/camel-pop3-provider.c: Simplify the POP
4483 description - we want short but sweet.
4485 * providers/imap/camel-imap-provider.c: s/IMAPv4/IMAP
4487 2001-08-27 Not Zed <NotZed@Ximian.com>
4489 * camel-mime-part-utils.c (convert_buffer): re-read the iconv man
4490 page, and treat the return value properly. It returns the number
4491 of non-reversible conversions performed, not the number of output
4493 (check_html_charset): Changed to just take a buffer of data, and
4494 not the mime parser.
4495 (simple_data_wrapper_construct_from_parser): Since we dont need
4496 the charset till we have all the data, search for the charset
4497 after we've read the data, if we have html data with no charset in
4499 (simple_data_wrapper_construct_from_parser): Remove the
4500 seekable_source stuff.
4502 * Re-apply patches from before.
4504 2001-08-25 Not Zed <NotZed@Ximian.com>
4506 ["Summarising" and "Synchronising" are spelt with a "s" in
4509 * providers/local/camel-mbox-summary.c (mbox_summary_sync_quick):
4510 s/Synchronizing/Synchronising/.
4512 * providers/local/camel-mbox-summary.c (summary_rebuild):
4513 s/Summarizing/Summarising/
4515 2001-08-24 Jeffrey Stedfast <fejj@ximian.com>
4517 * camel-disco-diary.c (camel_disco_diary_replay): Use fseek
4518 instead of fseeko since we want to be portable and use ftell
4519 rather than ftello for the same reason.
4520 (camel_disco_diary_empty): Same here.
4522 2001-08-24 Peter Williams <peterw@ximian.com>
4524 * Revert Not Zed's previous commits as they apparently can cause
4525 serious data loss for POP3 users.
4527 2001-08-24 Ettore Perazzoli <ettore@ximian.com>
4529 ["Summarizing" and "Synchronizing" are spelt with a "z" in the
4530 default locale, that happens to be "en_US".]
4532 * providers/local/camel-mbox-summary.c (mbox_summary_sync_quick):
4533 s/Synchronising/Synchronizing/.
4535 * providers/local/camel-mbox-summary.c (summary_rebuild):
4536 s/Summarising/Summarizing/
4538 2001-08-24 Not Zed <NotZed@Ximian.com>
4540 * camel-mime-part-utils.c (convert_buffer): Limit the maximum
4541 output buffer size. iconv bugs? returns E2BIG forever on some
4544 * providers/local/camel-spool-summary.c (summary_rebuild):
4547 * providers/local/camel-mbox-summary.c (summary_rebuild):
4548 Summarising is spelt with an s.
4550 2001-08-23 Not Zed <NotZed@Ximian.com>
4552 * camel-mime-part.c (write_to_stream): If we have rawtext, then
4553 dont do any charset conversion, only encoding/crlf conversion.
4555 * camel-data-wrapper.h (struct _CamelDataWrapper): Added 'rawtext'
4556 member, says the character encoding is raw, not utf8.
4558 * providers/local/camel-spool-summary.c
4559 (spool_summary_sync_quick): Synchronising is spelt with an s, not
4561 (spool_summary_sync_full): "
4563 * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
4564 No, synchronising is spelt with an s.
4565 (mbox_summary_sync_quick): "
4567 * camel-mime-part-utils.c
4568 (camel_mime_part_construct_content_from_parser): Remove the
4569 warnings which aren't going anywhere fast.
4570 (convert_buffer): Function to convert a bytearray of textual
4571 content from one charset to another. If the charset doesn't exist
4572 or fails, then do no conversion.
4573 (simple_data_wrapper_construct_from_parser): First, read in data,
4574 then try and convert it using the specified charset if supplied.
4575 If that fails, then dont do any conversion, and leave as raw.
4576 Also, if we have any x-* charsets, then dont do any processing.
4578 2001-08-23 Peter Williams <peterw@ximian.com>
4580 * providers/local/camel-mbox-summary.c (summary_rebuild): Add a
4581 missing \n to the end of a printf.
4583 * providers/local/camel-spool-summary.c (summary_rebuild): Same.
4585 2001-08-22 Jeffrey Stedfast <fejj@ximian.com>
4587 * providers/pop3/camel-pop3-folder.c (pop3_generate_uids):
4588 Oops. Fixed a mis-use of GPtrArray. If we set_size, then using
4589 g_ptr_array_add will assume `size' elements have already been
4590 initialized and will start appending on to the end.
4592 2001-08-21 Jeffrey Stedfast <fejj@ximian.com>
4594 * camel-pgp-context.c (pgp_verify): Turn on --batch and reenable
4595 gpg keyserver lookups.
4596 (pgp_decrypt): Disable keyserver lookups if we are disconnected.
4598 2001-08-21 Dan Winship <danw@ximian.com>
4600 * camel-folder-thread.c
4601 (camel_folder_thread_messages_new_summary): Fix the duplicate
4602 message check so it doesn't mess up threading when a reply appears
4603 in the folder before the message it's a reply to. Fixes bug #3357.
4604 (camel_folder_thread_messages_new): Likewise, although I don't
4605 think this function is used any more.
4607 2001-08-20 JP Rosevear <jpr@ximian.com>
4609 * Makefile.am: build a static camel for the addressbook conduit
4611 2001-08-20 Ettore Perazzoli <ettore@ximian.com>
4613 * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
4614 s/Synchronising/Synchronizing/.
4615 (mbox_summary_sync_quick): Likewise. *
4616 providers/local/camel-spool-summary.c (spool_summary_sync_full):
4618 (spool_summary_sync_quick): Likewise.
4620 2001-08-20 Jeffrey Stedfast <fejj@ximian.com>
4622 * providers/imap/camel-imap-store.c (create_folder): Get the
4623 entire directory structure for the folder we just created, meaning
4624 if we created a folder named "test.mailbox" where test didn't
4625 previously exist, get the listing for "test" and "test.mailbox".
4627 * providers/imap/camel-imap-utils.c (imap_parse_folder_name): New
4630 2001-08-19 Chris Toshok <toshok@ximian.com>
4632 * camel-store.h: #include <sys/types.h> for mode_t on freebsd.
4634 2001-08-19 Jeffrey Stedfast <fejj@ximian.com>
4636 * providers/pop3/camel-pop3-folder.c (pop3_generate_uids): Make
4637 sure the generated UID is non-NULL before appending it to the
4638 array of UIDs. How would this even happen? I have no clue...
4640 2001-08-17 Jeffrey Stedfast <fejj@ximian.com>
4642 * providers/imap/camel-imap-folder.c (imap_update_summary): Start
4643 scanning new messages at maxuid + 1 rather than uidval + 1? Maybe
4644 I'm missing the logic, but anyways...this might fix bug #5348.
4646 2001-08-16 Jeffrey Stedfast <fejj@ximian.com>
4648 * providers/imap/camel-imap-store.c (imap_keepalive): If we are
4649 online and message flags have changed in the current folder, sync
4650 the flags else do a NOOP. This fixes bug #4666. Also lock around
4653 * providers/imap/camel-imap-folder.c (imap_sync_online): Don't
4654 ever send "STORE FLAGS.SILENT ()" since Cyrus imapd doesn't like
4655 this (and maybe others too?) so what we'll do instead is to send
4656 "STORE -FLAGS.SILENT (\Seen \Answered \Deleted \Marked)" to clear
4657 all the flags (since this is in essence what we want to do
4660 2001-08-16 Peter Williams <peterw@ximian.com>
4662 * providers/imap/camel-imap-store.c (imap_connect_online): Fix
4663 this again. Sigh. Problem of namespace = "" may not yet be
4666 2001-08-15 Peter Williams <peterw@ximian.com>
4668 * camel-tcp-stream-openssl.c (ssl_error_to_errno): New
4669 function. Try to approximate the SSL error into errno.
4670 (errlib_error_to_errno): New function, try to approximate
4671 OpenSSl's error library's error (ERR_*) into errno.
4672 (stream_read): Try to set errno using ssl_error_to_errno.
4673 (stream_write): Same.
4674 (open_ssl_connection): Same.
4676 * providers/imap/camel-imap-store.c (imap_connect_online): Oh
4677 crap, huge killer typo.
4679 2001-08-14 Peter Williams <peterw@ximian.com>
4681 * providers/imap/camel-imap-store.c (imap_connect_online):
4682 Canonicalize store->namespace to end in store->dir_sep, once both
4683 values are known. The %F-related code makes this
4684 assumption. Probably fixes a bug reported on the mailing list.
4686 2001-08-13 Jeffrey Stedfast <fejj@ximian.com>
4688 * camel-store.c (camel_store_get_folder): After talking to NotZed,
4689 it turns out I was wrong after all.
4690 (store_sync): Create a copy of the folder-cache that owns a ref on
4691 each of the folders so that if one of the folders get's finalized
4692 inside store_sync(), we don't run into any locking issues. This is
4693 mostly meant to solve a problem in IMAP (#6089).
4695 2001-08-13 Peter Williams <peterw@ximian.com>
4697 * providers/imap/camel-imap-store.c (delete_folder): Fix a leak.
4699 * providers/imap/camel-imap-utils.c (imap_namespace_concat): Bleah,
4700 handle when namespace = NULL (can happen upon initial open of mailbox.)
4702 * providers/imap/camel-imap-command.c (imap_command_strdup_vprintf):
4703 Don't crash when %F'ing with an empty folder name and NULL namespace.
4705 2001-08-13 Jeffrey Stedfast <fejj@ximian.com>
4707 * camel-store.c (camel_store_get_folder): We need to be ref'ing
4708 the folder if/when we add it to the hash. This may fix bug #6089?
4709 (camel_store_get_folder): Nevermind, reverted the fix.
4710 (camel_store_get_folder): No, I wasn't on crack before after
4711 all...if we don't ref here, then we're open to a race condition
4714 2001-08-11 Ettore Perazzoli <ettore@ximian.com>
4716 * providers/local/camel-spool-summary.c (summary_rebuild):
4717 s/summarising/summarizing/.
4718 (summary_rebuild): Likewise.
4720 * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
4721 s/summarise/summarize/.
4722 (mbox_summary_sync_quick): Likewise.
4723 (summary_rebuild): Likewise.
4724 (mbox_summary_check): Likewise.
4726 2001-08-10 Jeffrey Stedfast <fejj@ximian.com>
4728 * providers/imap/camel-imap-utils.c (imap_quote_string): Added an
4729 assert - at this point a backtrace would be more useful than a
4730 transaction log for debugging.
4732 * providers/imap/camel-imap-command.c (imap_command_start): Return
4733 FALSE here, not NULL.
4735 * providers/imap/camel-imap-folder.c (imap_rescan): Don't
4736 g_strdup() the uid into the trigger_event call.
4738 * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
4739 Set the total bytes expected to 0 if the response is empty too.
4740 (pop3_refresh_info): Return of there was an error generating pop3
4743 * camel-mime-utils.c (header_raw_check_mailing_list): regfree the
4744 pattern before continue'ing. This was showing up quite a bit under
4747 2001-08-09 Jeffrey Stedfast <fejj@ximian.com>
4749 * providers/imap/camel-imap-utils.c (imap_parse_string_generic): A
4750 quoted string cannot contain \n's so check for those as well.
4751 (imap_atom_specials): Update this to fix bug #6553.
4753 2001-08-08 Jon Trowbridge <trow@ximian.com>
4755 * camel-filter-search.c (get_source): Remove trailing stuff from
4756 URLs before returning. (Done in an evil way, not in the good way
4757 suggested by fejj. :)) (Bug #4876)
4759 2001-08-08 jacob berkman <jacob@ximian.com>
4761 * camel-search-private.c (camel_search_header_match): check for
4762 NULL name and addr (fixes a bug i was about to report)
4764 2001-08-08 Not Zed <NotZed@Ximian.com>
4766 * camel-filter-search.c (check_header): Properly determine match
4767 type to pass to header_match.
4768 (address_matches_exactly): Removed, effectively added to
4769 camel_search_header_match.
4771 * camel-folder-search.c (check_header): Properly determine the
4772 match type to pass to header_match.
4774 * camel-search-private.c (camel_search_header_match): Add a new
4775 parameter 'type' which is the type of header we're matching
4776 against. ASIS means utf8 format, ADDRESS means an internet
4777 address ('formatted'), ADDRESS_ENCODED means a raw address header,
4778 ENCODED means rfc 2047 encoded text.
4779 (header_match): Move original logic here, have search_header_match
4780 call it as appropriate for the 'type' of match.
4782 2001-08-07 Not Zed <NotZed@Ximian.com>
4784 * camel-session.c (camel_session_class_init): Only init the vee
4785 provider struct once (if we're subclassed this will get called
4788 * camel-object.c (obj_finalize): Removed a bit of a debug that
4789 crept in with jacob's poolv patch (?).
4791 2001-08-07 Jeffrey Stedfast <fejj@ximian.com>
4793 * camel-filter-search.c (address_matches_exactly): New function to
4794 do danw's address "is" comparison (as specified in bug #5886.
4795 (check_header): Special-case address-type headers when we are
4796 doing an exact match to use the address_matches_exactly function.
4798 2001-08-06 Jeffrey Stedfast <fejj@ximian.com>
4800 * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
4801 Modify to take a headers_only argument which will then only fetch
4803 (pop3_generate_uids): Pass in TRUE for headers_only.
4804 (pop3_get_message): Pass in FALSE for headers_only and move the
4805 camel_operation() stuff out of get_message_stream and in to here
4807 (pop3_generate_uids): We also need to be using i+ 1 as the id
4808 since we are starting at 0.
4810 2001-08-06 Jeffrey Stedfast <fejj@ximian.com>
4812 * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
4813 New internal function to get a message stream by message sequence
4814 id (so that we can share code between pop3_get_message and
4815 pop3_generate_uids).
4816 (pop3_get_message): Use pop3_get_message_stream.
4817 (pop3_generate_uids): New function to generate UIDs based on the
4818 message - this fixes bug #1256.
4819 (pop3_refresh_info): If the server doesn't support UIDL, call
4820 pop3_generate_uids to get our list of UIDs.
4822 * providers/imap/camel-imap-store.c (get_folder_info_online):
4823 Don't strstr for noselect=yes, that's just plain broken.
4825 2001-08-06 Dan Winship <danw@ximian.com>
4827 * providers/imap/camel-imap-folder.c (imap_rescan): Fix off-by-one
4828 error in cleaning up deleted messages at the end of the folder.
4829 Fixes bug #5585 and maybe others.
4831 * providers/imap/camel-imap-store.c (get_folder_info_online): Do a
4832 refresh_info on the selected folder before looking at its unread
4833 count. Should fix bug #4944.
4835 2001-08-06 Peter Williams <peterw@ximian.com>
4837 Completely hide the namespace from everything external to the IMAP
4838 code, which Dan W says is the way it should be.
4840 * providers/imap/camel-imap-command.c
4841 (imap_command_strdup_vprintf): Add a new %F argument, which is like
4842 %S but will add the namespace (for folder names).
4843 (camel_imap_command): Use %F here.
4845 * providers/imap/camel-imap-utils.c (imap_parse_list_response):
4846 Changed to strip out the namespec when returning *folder. In order
4847 to do this we need to be passed the CamelImapStore.
4848 (imap_concat): Move to here from camel-imap-store.c, un-static
4849 (imap_namespace_concat): New function, adds the namespace to the
4850 folder name, unless it's INBOX.
4852 * providers/imap/camel-imap-utils.h: Prototypes.
4854 * providers/imap/camel-imap-store.c (imap_connect_online): Extra
4855 arg to imap_parse_list_response.
4856 (imap_connect_offline): Here too.
4857 (get_folder_status): Use %F.
4858 (get_folder_online): Here too.
4859 (delete_folder): Here too.
4860 (create_folder): Here too, and arg to imap_parse_list_response.
4861 (parse_list_response_as_folder_info): Arg to i_p_l_r.
4862 (get_subscribed_folders_by_hand): Use %F.
4863 (get_folders_online): Here too.
4864 (get_folder_info_online): Instead of checking for NULL @name, check
4865 for name = NULL or "", and set to "" instead of namespace. Pass ""
4866 instead of namespace to camel_folder_info_build.
4867 (subscribe_folder): Use %F.
4868 (unsubscribe_folder): Here too.
4870 * providers/imap/camel-imap-folder.c (imap_get_full_name): This
4871 now just returns folder->full_name.
4873 (do_copy): Here too.
4875 2001-08-06 Jeffrey Stedfast <fejj@ximian.com>
4877 * camel-pgp-context.c (pgp_verify): Always do --no-auto-key-retrieve.
4879 2001-08-03 Jeffrey Stedfast <fejj@ximian.com>
4881 * camel-pgp-context.c (pgp_verify): Minor changes to the iconv
4882 code so that it does the check in the return value of iconv() just
4883 like the code in camel-mime-utils.c in case this fixes Bo Rosen's
4884 gpg bugs (but I doubt this will change anything?).
4886 2001-08-03 Jeffrey Stedfast <fejj@ximian.com>
4888 * providers/smtp/camel-smtp-transport.c (smtp_connect): First
4889 check to make sure that service->url->authmech is non-NULL before
4890 passing it into strcmp to avoid a segfault.
4892 * camel-pgp-context.c (pgp_decrypt): Sigh, if gpg returns '1' it
4893 means that the key is bad but it did succeede in decrypting the
4894 block so to make users happy (even though I find this a
4895 questionable action) we are going to ignore the error and show it
4896 to the user anyway. This fixes bug #6136.
4898 2001-08-03 Not Zed <NotZed@Ximian.com>
4900 * providers/smtp/camel-smtp-transport.c (smtp_connect): special
4901 case popb4smtp auth before we try and connect, and do the magic
4904 2001-08-02 Not Zed <NotZed@Ximian.com>
4906 * providers/smtp/camel-smtp-transport.c (smtp_connect): Check for
4907 POPB4SMTP separate to the esmtp auth list.
4908 (smtp_auth): If creating the sasl object means it is
4909 already authenticated, then exit early. Sort of 'clean hack' to
4910 help popb4smtp work.
4911 (smtp_auth): Unref the sasl object, clean up a memleak i think.
4913 * providers/smtp/camel-smtp-provider.c
4914 (camel_provider_module_init): Added POPB4SMTP auth type.
4916 * camel-sasl.c (camel_sasl_authtype): Added POPB4SMTP type.
4918 * camel-sasl-popb4smtp.c: New file for pop before smtp
4921 * Makefile.am (libcamel_la_SOURCES, HEADERS): Add
4922 camel-sasl-popb4smtp.[ch].
4924 2001-08-01 Not Zed <NotZed@Ximian.com>
4926 * providers/local/camel-mbox-folder.c (mbox_lock): If we fail to
4927 get the lock, make sure we close our locking fd, and reset it.
4928 Fixes the crash part of 5095.
4930 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
4931 Slightly re-arranged filter/change notification logic. If we;re
4932 filtering, freeze the folder till we're finished to smooth the ui
4935 2001-07-31 Not Zed <NotZed@Ximian.com>
4937 * camel-folder.c (camel_folder_init): Chagned mutexes to
4938 e_mutexes, folder lock recursive. This fixes the imap filtering
4939 bug, or at least some cases of it.
4940 (camel_folder_finalize): Free mutexes.
4942 * camel-private.h (CamelFolderPrivate): Changed mutexes to
4945 2001-07-25 Not Zed <NotZed@Ximian.com>
4947 * camel-folder.c (camel_folder_change_info_*): Change the
4948 return if fail's into asserts.
4949 (camel_folder_change_info_free): Don't let it accept a NULL
4950 argument. This isn't g_lib so we dont have to.
4952 2001-07-27 Jeffrey Stedfast <fejj@ximian.com>
4954 * camel-mime-utils.c (header_decode_param): Fix the fix that fixes
4955 broken mailer behavior. We want to make sure that the user's
4956 locale charset is non-NULL before we pass it off to
4957 iconv_open(). If it *is* NULL, we want to use iso-8859-1.
4959 2001-07-26 Jeffrey Stedfast <fejj@ximian.com>
4961 * camel-url.c (camel_url_free): Allow the url to be NULL just like
4962 the libc free convention.
4964 2001-07-26 Dan Winship <danw@ximian.com>
4966 * providers/imap/camel-imap-command.c (camel_imap_command_start):
4967 Send an IMAP command, but don't wait for responses.
4968 (camel_imap_command_response): Read a single line of response from
4970 (camel_imap_command, etc): Reimplement in terms of the new code.
4972 * providers/imap/camel-imap-folder.c (imap_rescan): Use
4973 camel_imap_command_start and camel_imap_command_response, and
4974 call camel_operation_progress after each line read from the
4976 (imap_update_summary): Likewise, although with more fudging on the
4977 precentages... Also, fix this so that if none of the new messages
4978 are cached, it only does a single FETCH, and if some of them are
4979 cached, it does two FETCHes (one to get the UIDs, FLAGS, and
4980 SIZEs, and another to get the bodies of all of the messages that
4981 aren't cached now that it knows the relevant UIDs). This should
4982 speed up startup a bunch (especially if you have high bandwidth
4983 but also high latency to the IMAP server).
4985 2001-07-25 Dan Winship <danw@ximian.com>
4987 * camel-mime-utils.c (mail_mlist_magic): Add another Sender
4990 2001-07-24 Not Zed <NotZed@Ximian.com>
4992 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
4993 Change the break into a continue, we should process as many as we
4996 * camel-folder.c (camel_folder_move_messages_to): If we have no
4997 uid's to copy, exit here before going any further. Some code
4998 internally [imap] assumes there are uids to copy otherwise it can
5000 (camel_folder_copy_messages_to): Same.
5002 2001-07-24 Jeffrey Stedfast <fejj@ximian.com>
5004 * camel-mime-utils.c (header_decode_param): Handle broken mailers
5005 that send unencoded 8bit header params. And there was much
5008 * camel-url.h (CAMEL_URL_HIDE_ALL): New #define, and there was
5009 much rejoicing. Rah.
5011 2001-07-24 Not Zed <NotZed@Ximian.com>
5013 * camel-operation.c (camel_operation_register, unregister): Added
5014 some warnings for bad cases.
5016 2001-07-23 Not Zed <NotZed@Ximian.com>
5018 * camel-operation.c (camel_operation_register): Only insert a hash
5019 entry if we haven't already.
5020 (camel_operation_unregister): Only remove the has entry if the id
5023 2001-07-23 Jeffrey Stedfast <fejj@ximian.com>
5025 * camel-filter-driver.c (do_move): Slight fix for when source ==
5026 destination (we don't want to do this action because on-demand
5027 filtering would then delete the messages it supposedly "moved").
5029 2001-07-23 Not Zed <NotZed@Ximian.com>
5031 * providers/smtp/camel-smtp-transport.c (smtp_auth, smtp_helo,
5032 send_to): Added some operation progress reporting. Actual data
5033 transfer is 'tricky' because of the layers used.
5034 (smtp_auth): Instead of checking exception_is_set, use
5035 challenge==NULL to test if sasl_challenge_base64 failed.
5037 * providers/local/camel-mbox-summary.c (mbox_summary_sync): Remove
5038 peters changes below and put in a better fix. These functions
5039 already return -1 on error, just use that, and not worry about
5040 building our own exception redundantly.
5042 * camel-service.c (camel_get_host_byname): Turn the progress into
5045 2001-07-20 Peter Williams <peterw@ximian.com>
5047 * providers/local/camel-mbox-summary.c (mbox_summary_sync): More
5048 usage fixes for CamelException. Check our own exception for
5049 summary_update and xfer it out if an error occurred.
5051 2001-07-20 JP Rosevear <jpr@ximian.com>
5053 * Pull up test fixes to get them building again
5055 2001-07-20 Not Zed <NotZed@Ximian.com>
5057 * camel-charset-map.c (camel_charset_get_iconv_friendly_name):
5058 renamed to camel_charset_to_iconv() to make it just a little more
5059 consistent and not so long & fixed callers.
5061 2001-07-19 Jeffrey Stedfast <fejj@ximian.com>
5063 * camel-mime-filter-charset.c
5064 (camel_mime_filter_charset_new_convert): Convert to the
5065 iconv-friendly charset names.
5067 * providers/imap/camel-imap-store.c (create_folder): Fixed a
5068 compiler warning about returning without a value in a non-void
5071 * camel-mime-part.c (process_header): Pass the locale charset as
5072 the default_charset to header_decode_string().
5074 * camel-folder-summary.c (camel_folder_summary_format_string):
5075 Pass the locale charset as the default_charset to
5076 header_decode_string().
5077 (content_info_new): Same.
5079 * camel-mime-message.c (process_header): Pass the locale charset
5080 as the default_charset to header_decode_string().
5082 * camel-mime-utils.c (append_8bit): New helper function who's
5083 purpose is similar to append_latin1() but for 8bit text that we
5084 are assuming is not latin1.
5085 (header_decode_text): Now takes a default_charset parameter and
5086 calls append_8bit when appropriate.
5087 (header_decode_string): Also takes a default_charset parameter
5089 (header_decode_mailbox): Pass NULL as the default_charset to
5090 header_decode_string().
5092 2001-07-19 Jeffrey Stedfast <fejj@ximian.com>
5094 * camel-pgp-context.c (pgp_verify): Modified to treat the return
5095 value from camel_charset_locale_name() as a const char*.
5097 * camel-sasl-digest-md5.c (digest_response): Modified to treat the
5098 return value from camel_charset_locale_name() as a const char*.
5100 * camel-charset-map.c (camel_charset_locale_name): Modify to
5101 return const char* by returning the static locale_charset which is
5102 created inside of camel_charset_map_init().
5103 (camel_charset_map_init): Find the locale charset here and set the
5106 2001-07-19 Peter Williams <peterw@ximian.com>
5108 Policy change: NULL url's are no longer allowed in
5109 CamelFolderInfos. They used to signify that the folder was, in
5110 IMAP jargon, NoSelect; now the same effect is achieved by adding a
5111 "noselect=yes" parameter to the end of the URL. As far as I know,
5112 IMAP is the only affected provider.
5114 * providers/imap/camel-imap-store.c (delete_folder): New
5115 function. Implement folder deletion.
5116 (camel_imap_store_class_init): Set the delete_folder class
5118 (get_folder_status): New function. Utility wrapper around the
5120 (create_folder): If the parent folder is NoSelect but is empty,
5121 delete it and recreate it as a a subfolder-containing folder. If
5122 it is NoSelect but contains messages, set an exception.
5123 (parse_list_response_as_folder_info): Always set the FolderInfo's
5124 URL, but add a NoSelect parameter if it isn't selectable.
5125 (get_folder_info_online): Change logic of removing the namespace
5126 to reflect URL change. Same for logic of checking unread counts.
5127 (get_folder_info_online): Use get_folder_status to simplify this.
5129 * camel-store.c (camel_folder_info_build): When creating dummy
5130 parents, copy the child's URL and set the NoSelect parameter.
5132 2001-07-19 Jeffrey Stedfast <fejj@ximian.com>
5134 * camel-mime-part-utils.c
5135 (simple_data_wrapper_construct_from_parser): No need for
5137 (check_html_charset): Return a const char* and also use
5138 camel_charset_get_iconv_friendly_name() internally.
5140 * camel-mime-utils.c (rfc2047_decode_word): Remove my iso8859-1 ->
5141 iso-8859-1 hack and use camel_charset_get_iconv_friendly_name()
5143 (rfc2184_decode): Use camel_charset_get_iconv_friendly_name()
5145 * camel.c (camel_init): Call camel_charset_map_init().
5147 * camel-charset-map.c (camel_charset_map_init): New function to
5148 initialize the charset-equivalent lookup table. To be called by
5150 (camel_charset_get_iconv_friendly_name): New function to try and
5151 convert a charset into something that iconv is more likely to
5154 2001-07-19 Peter Williams <peterw@ximian.com>
5156 * Revert 7/11/2001 patch for IMAP INBOX filtering at NotZed's
5159 2001-07-17 Peter Williams <peterw@ximian.com>
5161 Clean up some exception misusage.
5163 * providers/imap/camel-imap-command.c (camel_imap_command): Use
5164 our own internal exception for sending the string and transfer it
5165 to @ex if anything goes wrong.
5166 (imap_read_response): Use our own internal exception for reading
5167 the untagged responses and blah blah blah.
5169 * camel-session.c (get_service): Use our own internal exception
5170 when constructing the service and transfer it to @ex if anything
5173 * camel-remote-store.c (remote_recv_line): Instead of having
5174 gboolean exception, use our own internal exception and copy
5175 it to @ex if anything goes wrong.
5177 * camel-store.c (store_sync): Create an internal exception
5178 because sync_folder() checks it for validity. Transfer it to
5181 * camel-exception.c (camel_exception_get_description): If @ex is
5182 NULL, complain - passing NULL exceptions to Camel is okay, but
5183 there should be no circumstances under which they're then
5185 (camel_exception_get_id): Same here,
5186 (camel_exception_xfer): NULL-protect and warn if transferring from
5189 2001-07-17 Jeffrey Stedfast <fejj@ximian.com>
5191 * camel-store.c (init_trash): Use CAMEL_VTRASH_NAME.
5193 * camel-vtrash-folder.h: #define CAMEL_VTRASH_NAME
5195 2001-07-16 Dan Winship <danw@ximian.com>
5197 * providers/imap/camel-imap-command.c (camel_imap_response_free):
5201 We have to pass 3, not 4 to camel_imap_folder_changed for the
5202 exists count. Fixes ximian bug #2112 (finally!).
5204 2001-07-14 Jeffrey Stedfast <fejj@ximian.com>
5206 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
5207 If the message info for an expunged message is NULL, then just
5208 break out - maybe a message was expunged that we were never
5209 notified even existed?
5211 2001-07-13 Jeffrey Stedfast <fejj@ximian.com>
5213 * camel-mime-utils.c (rfc2047_decode_word): Added a hack to
5214 convert charsets in the format iso8859-1 to iso-8859-1 because it
5215 seems to be more iconv friendly. It has been reported that on some
5216 systems, iconv doesn't know about iso8859-1 while it *does* know
5217 about iso-8859-1. See bug #4530.
5219 2001-07-13 Peter Williams <peterw@ximian.com>
5221 * Makefile.am (install-exec-local): Let people install as
5222 non-root, but give them a bigass warning so they're not allowed to
5223 complain when it doesn't work right.
5225 * camel-remote-store.c (sync_remote_folder): New function: hash
5227 (remote_disconnect): If cleanly disconnecting, sync our
5228 folders. Fixes deadlocks on exit (folders syncing after store
5229 disconnects) and also makes sense.
5231 2001-07-13 Jeffrey Stedfast <fejj@ximian.com>
5233 * camel-uid-cache.c (camel_uid_cache_new): We now use a structure
5234 as the bucket data rather than just a cache level so set the save
5236 (maybe_write_uid): We only save the uid if the cache levels are
5237 the same *and* if the save state is TRUE.
5238 (free_uid): Free the state value.
5239 (camel_uid_cache_get_new_uids): New uids that get added to the
5240 cache start with a save state of FALSE.
5241 (camel_uid_cache_save_uid): Set the save state of the uid to
5242 TRUE. What should we do if the uid isn't already in the cache?
5243 Currently I make it add the uid, but maybe it shouldn't?
5245 * providers/imap/camel-imap-folder.c (imap_filter_timeout): Update
5246 to reflect CamelFilterDriver API changes.
5248 * camel-filter-driver.c (camel_filter_driver_filter_folder): Take
5249 a cache argument so we can tell the cache whether or not the uid
5250 should be saved (meaning we have successfully filtered it).
5252 2001-07-12 Jeffrey Stedfast <fejj@ximian.com>
5254 * camel-filter-driver.c (camel_filter_driver_filter_message):
5255 Okay, I've decided that that user is just on crack. We don't want
5256 to allow filtering of deleted messages or we could get some
5257 unexpected behavior.
5258 (do_move): Oops. My last fix needs to be after the if-statement,
5260 (do_copy): And here too.
5262 2001-07-12 Jeffrey Stedfast <fejj@ximian.com>
5264 * camel-filter-driver.c (do_move): Only set p->copied and
5265 p->deleted if the messages are copied without an exception.
5266 (do_copy): Same - but obviously we don't set the p->deleted here
5268 (camel_filter_driver_filter_message): Since users complained that
5269 they couldn't filter deleted messages for "safe keeping" (WTF?
5270 safe keeping? why were they deleted in the first place then??), I
5271 have taken out the code that optimized filtering by not allowing
5272 deleted messages to be filtered. This fixes bug #4473.
5274 Note: Users have a warped sense of logic.
5276 2001-07-12 Not Zed <NotZed@Ximian.com>
5278 * camel-mime-part-utils.c (extract_metatag_charset): Removed.
5279 (check_html_charset): Replaced with this.
5280 (simple_data_wrapper_construct_from_parser): Call
5281 check_html_charset if we dont have a charset on the content-type,
5282 and we have text/html data.
5283 (check_html_charset): We also need to do qp/base64 decoding
5286 * camel-mime-utils.c (html_meta_param_list_decode): Removed. This
5287 was very wrong, the rules for mail headers vastly different from
5288 rules for decoding html elements.
5289 (rfc2184_decode): Move the malloc inside the iconv_open worked,
5290 otherwise we have a memleak.
5292 * camel-mime-filter-html.c (camel_mime_filter_html_finalize, init,
5293 run, reset): Changed to use camelhtmlparser, and fixed a tiny
5296 * camel-html-parser.c: Made the html indexer tokeniser re-usable.
5297 ONLY TO BE USED INTERNAL TO CAMEL HOWEVER.
5298 (tokenise_step): Slight fix to non-quoted values.
5300 * camel-folder-summary.c
5301 (camel_folder_summary_info_new_from_message): Removed some code i
5302 wasn't supposed to commit.
5304 * providers/local/camel-local-summary.c (local_summary_add): Only
5305 set info->size if it is not zero.
5306 (local_summary_add): If we dont get a size from the info passed
5307 in, calculate it using a null stream write. Should do #4392.
5309 2001-07-11 Jeffrey Stedfast <fejj@ximian.com>
5311 * camel-mime-part-utils.c (extract_metatag_charset): New function
5312 to extract a meta-tag charset value if it exists.
5313 (simple_data_wrapper_construct_from_parser): Along the same lines
5314 as the code I previously ripped out, but this time use the
5315 mime-parser's seek ability to help us along. Currently I read up
5316 to a 2k buffer size - this is probably overkill, 1k is probably
5319 * camel-mime-utils.c (html_meta_param_list_decode): When we get to
5320 an `=', we must skip past it before trying to grab the param
5323 2001-07-11 Jeffrey Stedfast <fejj@ximian.com>
5325 * camel-mime-part-utils.c
5326 (simple_data_wrapper_construct_from_parser): Ripped out my code
5327 since it was never being used since the mime parser is not using a
5328 seekable stream (ever?) which pretty much means my code needs to
5329 be done someplace else.
5331 2001-07-11 Peter Williams <peterw@ximian.com>
5333 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
5334 Run the filter in its own thread to prevent locking issues.
5335 (imap_filter_timeout): New function that does the filtering called
5336 as a CamelSession timeout.
5338 2001-07-11 Not Zed <NotZed@Ximian.com>
5340 * camel-filter-driver.c (camel_filter_driver_filter_mbox): Create
5341 the messageinfo itself, so we can properly set the size.
5343 * camel-movemail.c (camel_movemail_solaris): Write out the from
5344 line between each message.
5346 2001-07-10 Not Zed <NotZed@Ximian.com>
5348 * providers/local/camel-local-summary.c (local_summary_add): Copy
5349 the size across from the source message info if supplied.
5351 * camel-stream-null.c: Added a 'written' member which keeps track
5352 of how much has been written to the stream.
5354 * camel-movemail.c (camel_movemail): If we have BROKEN_SPOOL
5355 defined, then use the solaris movemail to quote from lines that
5357 (camel_movemail_solaris): Compile this in if BROKEN_SPOOL defined.
5359 2001-07-10 Jeffrey Stedfast <fejj@ximian.com>
5361 * camel-mime-utils.c (html_meta_param_list_decode): New function
5362 to parse an HTML meta-tag.
5364 * camel-mime-part-utils.c
5365 (simple_data_wrapper_construct_from_parser): If the Content-Type
5366 did not contain a charset parameter and it's also a text/html
5367 part, we have 1 last place to look - in the META html tags. *sigh*
5369 * camel-mime-message.c (camel_mime_message_get_source):
5370 s/gint/unsigned since that's what it should be.
5372 2001-07-09 Jeffrey Stedfast <fejj@ximian.com>
5374 * camel-pgp-context.c (pgp_sign): Forget the passphrase if the
5375 user has set that option.
5376 (pgp_clearsign): Same.
5377 (pgp_encrypt): And here...
5378 (pgp_decrypt): And finally here.
5379 (camel_pgp_context_new): Take a `remember' argument.
5381 2001-07-09 Not Zed <NotZed@Ximian.com>
5383 * providers/local/camel-maildir-summary.c (maildir_summary_sync):
5384 Oops, e_poolv_set free's it for us, so dont double-free here.
5386 2001-07-06 Not Zed <NotZed@Ximian.com>
5388 * camel-vee-folder.c (camel_vee_folder_finalise): Changed so we
5389 dont have the list changing under us, just going to the next node
5390 before we call a function that might change the list is
5391 potentially dangerous (slight mod of peters fix). Hmm, i think it
5392 would've double-unref'd it too(?)
5394 2001-07-08 Chris Toshok <toshok@ximian.com>
5396 * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_finalize):
5397 openssl_table is gone. we now store/get the stream from the
5399 (stream_read): rework the non-blocking case to account for SSL
5400 possibly buffering data (in which case select will block even
5401 though data is ready to be read), and to account for FreeBSD's
5402 strange behavior of returning -1/EAGAIN even though select said
5403 the fd was ready to be read.
5404 (ssl_verify): openssl_table is gone.
5405 (open_ssl_connection): set the SSL_CTX's app_data to be the
5406 stream, remove the openssl_table code.
5408 2001-07-06 Jeffrey Stedfast <fejj@ximian.com>
5410 * camel-mime-utils.c (header_encode_param): Don't allow in to be
5411 NULL, so instead of doing if (in == NULL) return;, make it a
5412 g_return_val_if_fail and later we can make it an assert or
5415 * providers/local/camel-maildir-store.c (get_inbox): Fixes bug
5418 * providers/local/camel-mbox-summary.c
5419 (camel_mbox_summary_build_from): Make the `day-of-month' digit
5420 take up 2 chars by using "%2d". Fixes bug #3989 for lame mailers
5423 * camel-pgp-context.c (crypto_exec_with_passwd): Set the pipe fd's
5426 2001-07-06 Peter Williams <peterw@ximian.com>
5428 * camel-object.c (camel_object_unref): Make sure that after the
5429 finalization event has happened and the finalization functions
5430 have been called that the object still has a zero refcount.
5432 2001-07-06 Joe Shaw <joe@ximian.com>
5434 * providers/nntp/camel-nntp-grouplist.c: Add locking to
5435 camel_nntp_get_grouplist_from_server().
5437 * providers/nntp/camel-nntp-resp-codes.h: Added
5438 NNTP_EXTENSIONS_SUPPORTED (202).
5440 * providers/nntp/camel-nntp-store.c (camel_nntp_store_get_extensions):
5441 Check for both NNTP_LIST_FOLLOWS and NNTP_EXTENSIONS_SUPPORTED from
5442 a LIST EXTENSIONS request. (Dunno if NNTP_LIST_FOLLOWS ever comes
5443 out of this, but that's what was already there...) Also, put some
5445 (finalize): e_mutex_destroy() the command lock
5446 (camel_nntp_store_init): e_mutex_new() the command lock.
5448 * providers/nntp/camel-nntp-store.h: Add locking macros.
5450 2001-07-05 Jeffrey Stedfast <fejj@ximian.com>
5452 * camel-folder-summary.c (camel_message_info_string): Added an
5453 assert to make sure that `mi' isn't NULL.
5454 (camel_message_info_set_string): Same.
5456 * providers/imap/camel-imap-command.c (camel_imap_response_free):
5457 Create and use a temporary CamelException for use with
5458 camel_imap_folder_changed.
5460 2001-07-05 Jeffrey Stedfast <fejj@ximian.com>
5462 * camel-pgp-context.c (pgp_verify): Send the
5463 --no-auto-key-retrieve argument to gpg if we are in offline mode
5464 so that we don't have to worry about gpg hanging if it can't
5465 connect to the key servers, because now it shouldn't even attempt
5468 2001-07-05 Chris Toshok <toshok@ximian.com>
5470 * camel-tcp-stream-openssl.c (ssl_verify): use
5471 X509_STORE_CTX_get_ex_data to get at the SSL* - don't use the
5472 X509_STORE_CTX to look up our stream, since it's not what we used
5473 to insert our stream into the hashtable.
5474 (open_ssl_connection): insert the stream into the hashtable before
5475 calling SSL_connect, as this can cause ssl_verify to be called,
5476 and we need to look up the stream there. remove the stream from
5477 the hashtable if there's an error connecting.
5478 (stream_connect): pass the CamelTcpStreamOpenSSL* to
5479 open_ssl_connection since it handles the hashtable stuff. remove
5480 hashtable stuff from here.
5482 2001-07-05 Jeffrey Stedfast <fejj@ximian.com>
5484 * camel-folder.c (camel_folder_copy_messages_to): if source ==
5487 2001-07-05 Peter Williams <peterw@ximian.com>
5489 * camel-vee-folder.c (camel_vee_folder_finalise): Move this before the
5490 camel_vee_folder_remove_folder because that function modifies p->folders
5491 messing up our iteration.
5492 (camel_vee_folder_finalise): Don't unref our summary; camel-folder now
5495 * camel-object.h (CamelObject): Add a 'destroying' flag to CamelObject.
5497 * camel-object.c (obj_init): Clear 'destroying'.
5498 (camel_object_unref): If 'destroying' then do not send the finalize
5499 event and do not call finalize functions. Otherwise, set destroying
5500 so just in case we get refed (eg event code) we don't get doubly
5503 2001-07-05 Not Zed <NotZed@Ximian.com>
5505 * camel-mime-filter-basic.c (filter): Fix the assertion slightly,
5506 if we have a little bit of input the output size could be larger,
5507 since we store upto 3 chars in the state.
5509 * camel-folder-summary.c
5510 (camel_folder_summary_info_new_from_message): When indexing a new
5511 record, create a pseudo word 'ibexindexed' so we can always tell
5512 that a message has already been idnexed, even if it contains no
5513 words of its own. Things like maildir use this check to see if
5514 its already been processed, and it matters if it is incorrect in
5515 this case (not just wasted cycles).
5516 (camel_message_info_dup_to): Assign the to->strings from the
5517 e_poolv_cpy() call, since it may allocaote a new poolv if the
5518 lengths do not match.
5520 (camel_folder_summary_info_new_from_parser): And same here.
5522 * providers/local/camel-maildir-summary.c (maildir_summary_sync):
5523 Changed the logicfor epoolv code to be different, we dont need to
5524 update hash references or any tricky stuff.
5525 (maildir_summary_check): Samehere.
5527 * camel-folder-summary.h: Removed include of e-memory.h.
5529 2001-07-03 Joe Shaw <joe@ximian.com>
5531 * providers/nntp/camel-nntp-resp-codes.h: Added NNTP_NO_PERMISSION
5532 (502) to the list of response codes.
5534 * providers/nntp/camel-nntp-store.c (nntp_store_connect): If we
5535 receive a NNTP_NO_PERMISSION, don't get into an infinite loop trying
5536 to reconnect, get extensions, etc. Just give up and return FALSE.
5538 2001-07-03 Dan Winship <danw@ximian.com>
5540 * providers/imap/camel-imap-message-cache.c
5541 (camel_imap_message_cache_clear): Doh. Don't remove things from
5542 the hash table while foreach'ing it. (And can't use foreach_remove
5543 either because we have to remove them in a weird order). Fixes
5546 * providers/imap/camel-imap-folder.c (imap_get_message): If the
5547 server returns OK from the FETCH BODY, but there's no parseable
5548 BODY response, it's probably because there's an UN-parseable BODY
5549 response, implying the message is badly formatted, MIMEwise. In
5550 that case, fall back to fetching the message as a single part.
5552 2001-07-02 Sam Creasey <sammy@oh.verio.com>
5554 * providers/nntp/camel-nntp-folder.c: Implemented
5555 nntp_folder_search_by_expression and
5556 nntp_folder_search_free. Basic search functionality e.g. unread
5557 marking now works for NNTP folders.
5559 * camel_filter_search.c (get_size): Added get-size sexp directive
5560 to get the size of a message for filters.
5562 * providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new):
5563 Always check with the NNTP server after summary load -- this
5564 function now always expires old summary entries and syncs with
5567 * providers/nntp/camel-nntp-utils.c (camel_nntp_get_headers):
5568 Only fetch headers for articles not already logged in
5571 * providers/nntp/camel-nntp-grouplist.c
5572 (camel_nntp_get_grouplist_from_*): change from g_list_append()
5573 to g_list_prepend() + g_list_reverse. Traversing 40,000
5574 element linked lists sucks.
5576 * providers/nntp/camel-nntp-store.c (camel_nntp_command):
5577 Should the NNTP connection die with
5578 CAMEL_EXCEPTION_SERVICE_NOT_CONNECTED, make a single retry
5579 attempt. Timing out the NNTP link is less painful this way.
5581 2001-07-02 Peter Williams <peterw@ximian.com>
5583 * README (Introduction): Add comment noting that Camel actually
5586 2001-07-02 Dan Winship <danw@ximian.com>
5588 * camel-session.c (camel_session_get_filter_driver): new method to
5589 get an application-initialized filter driver.
5591 * camel-filter-driver.c (camel_filter_driver_new): Remove the
5592 get_folder function and data args from here...
5593 (camel_filter_driver_set_folder_func): ...and add this function to
5596 * providers/imap/camel-imap-folder.c (camel_imap_folder_new): If
5597 this folder is INBOX and we're filtering INBOX, set a flag on the
5599 (imap_update_summary): Add another argument (GPtrArray *recents),
5600 and if it's non-NULL, add the uids of any \Recent new messages to
5602 (camel_imap_folder_changed): If doing filtering in this folder,
5603 create a recents array and pass it to imap_update_summary. Then
5604 get a filter driver and use it to filter the recent messages.
5606 * providers/imap/camel-imap-summary.h:
5607 * providers/imap/camel-imap-utils.c (imap_parse_flag_list): Add
5608 support for the \Recent flag.
5610 * providers/imap/camel-imap-provider.c (imap_conf_entries): enable
5611 the "filter" option.
5613 * camel-types.h: add CamelFilterDriver typedef here
5615 2001-07-02 Not Zed <NotZed@Ximian.com>
5617 * camel-lock-client.c (camel_lock_helper_init): properly return
5618 error if we can't create pipes.
5620 * camel-folder-summary.c (summary_build_content_info): re-enable
5623 * camel-mime-filter-html.c: Completely re-implemented using a
5626 2001-07-02 Dan Winship <danw@ximian.com>
5628 * tests/misc/url.c (main): Change a camel_exception_clear to
5629 camel_exception_init to fix a sometimes-crash
5631 2001-06-29 Jeffrey Stedfast <fejj@ximian.com>
5633 * camel-mime-utils.c: Added Originator: header as a header to look
5634 for when looking for the mailing list.
5636 * tests/mime-filter/Makefile.am: Build the test-crlf test program.
5638 * tests/mime-filter/test-crlf.c: New test suite for the crlf
5641 * camel-mime-filter-crlf.c (filter): Fixed to correctly encode and
5644 2001-06-28 Peter Williams <peterw@ximian.com>
5646 * camel-mime-filter-stripheader.c: New file. Filter that strips a
5647 header from mime output.
5649 * camel-mime-filter-stripheader.h: New file. Header for the above.
5651 * providers/smtp/camel-smtp-transport.c (smtp_data): Use the
5652 stripheader filter to remove the "Bcc" header.
5654 * Makefile.am: Add the stripheader files.
5656 * tests/lib/Makefile.am (INCLUDES): Get this to compile again.
5658 * tests/mime-filter/test-stripheader.c: New file. Test suite for
5659 the CamelMimeFilterStripHeader.
5661 * tests/mime-filter/Makefile.am: New test section: mime filters.
5663 2001-06-28 Jeffrey Stedfast <fejj@ximian.com>
5665 * camel-mime-utils.c (header_decode_param_list): Fix a memory
5666 leak. Also if the decoded value is NULL, that means it wasn't
5667 encoded so we don't want to toss the old value.
5668 (header_param_list_format_append): Correctly wrap long parameter
5669 values according to rfc2184.
5671 2001-06-28 Dan Winship <danw@ximian.com>
5673 * providers/imap/camel-imap-folder.c (imap_refresh_info): If the
5674 folder is frozen, don't refresh, just record that we need to do it
5676 (imap_append_online): If the APPEND doesn't trigger an immediate
5677 EXISTS response (because the folder isn't the selected folder, or
5678 because the server doesn't do that until the next command), call
5679 imap_refresh_info on the folder.
5680 (imap_copy_online): Likewise. (Replacing the unconditional NOOP
5681 that was there before, which absolutely killed filter performance
5682 by forcing the IMAP provider to switch back and forth between
5683 folders after every copy or move.)
5684 (imap_thaw): If the folder needs a refresh, do it.
5686 * camel-folder.c (camel_folder_is_frozen): New method
5688 2001-06-27 Jeffrey Stedfast <fejj@ximian.com>
5690 * camel-transport.c (camel_transport_init): Initialize the private
5692 (camel_transport_finalize): Free the private send_lock.
5693 (camel_transport_get_type): Set the init and finalize functions.
5694 (camel_transport_send): Lock the transport.
5695 (camel_transport_send_to): Same.
5697 * camel-private.h: Add CAMEL_TRANSPORT_(UN)LOCK macros.
5699 2001-06-27 Jeffrey Stedfast <fejj@ximian.com>
5701 * tests/folder/test9.c (main): Updated to match the current API.
5703 * tests/folder/test3.c: #include <gtk/gtk.h> since we use
5706 * camel-internet-address.c
5707 (camel_internet_address_encode_address): Use the new
5708 header_address_fold.
5710 * camel-mime-utils.c: Removed some old #if 0'd code of mine.
5711 (rfc2047_encode_word): If enclen is 0, don't write an encoded word
5712 token (=?iso-8859-7?Q??= would be an invalid token).
5713 (header_address_fold): New function to wrap address headers -
5714 header_fold() was force-wrapping rfc2047 encoded words which was
5715 making the test suite fail. The *real* solution, however, is to
5716 not create rfc2047 encoded words longer than 72 chars.
5718 2001-06-26 Jeffrey Stedfast <fejj@ximian.com>
5720 * camel-filter-driver.c (open_folder): Since we want an error
5721 opening a folder to result in the message being copied to Inbox
5722 (assuming no other filters get a chance to `move` it), don't
5723 record any exceptions that may occur in this function.
5725 2001-06-26 Dan Winship <danw@ximian.com>
5727 * providers/imap/camel-imap-folder.c (camel_imap_folder_selected,
5728 imap_append_offline, imap_append_online,
5729 camel_imap_folder_changed): lock the cache around accesses
5731 * providers/imap/camel-imap-store.c (get_folder_online): ref the
5732 newly-created folder (as current_folder) before calling
5733 camel_imap_folder_selected, in case that needs to do something
5734 that causes another folder to become current...
5736 * camel-service.c (camel_service_get_url): D'oh.
5737 s/FALSE/CAMEL_URL_HIDE_PASSWORD/
5739 2001-06-25 Jeffrey Stedfast <fejj@ximian.com>
5741 * camel-filter-search.c (get_source): g_strdup() the message
5742 source here or we will have problems later when we go to free the
5745 2001-06-25 Dan Winship <danw@ximian.com>
5747 * providers/imap/camel-imap-store.c (try_auth): Fix this: IMAP
5748 doesn't allow an extra argument to AUTHENTICATE to avoid a useless
5749 round trip like some other SASL bindings do.
5751 * providers/imap/camel-imap-command.c (imap_read_response): Deal
5752 with IMAP servers that (incorrectly) return "+\r\n" rather than
5753 "+ \r\n" for an empty continuation response.
5754 (camel_imap_response_extract_continuation): Likewise.
5756 2001-06-21 Jeffrey Stedfast <fejj@ximian.com>
5758 * camel-mime-utils.c (word_types_compatable): New function that
5759 decides if 2 word types are mergeable. An atom and a qstring are
5760 mergeable; 2 qstrings are mergeable; and 2 encoded words are
5762 (header_encode_phrase_merge_words): If 2 words are merged, the new
5763 word type is the MAX of the combined types. This means that if we
5764 merge a qstring and an atom, the resulting word type is a
5767 * camel-internet-address.c (internet_format):
5768 s/g_string_sprintfa/g_string_append since this makes more sense in
5769 this particular case.
5770 (internet_encode): Same here.
5772 2001-06-21 Jeffrey Stedfast <fejj@ximian.com>
5774 * providers/smtp/camel-smtp-transport.c (smtp_send): Use
5775 camel_address_length() rather than casting and accessing data
5778 2001-06-20 Jeffrey Stedfast <fejj@ximian.com>
5780 * camel-mime-utils.c (header_raw_check_mailing_list): If the first
5781 char of the mailing-list name is '<', chop it off to make Ettore
5782 happy. Fixes bug #2153.
5784 2001-06-19 Not Zed <NotZed@Ximian.com>
5786 * camel-lock-helper.c (unlock_id): Fixed a bug when not running
5787 setuid it wouldn't unlock.
5789 * camel-movemail.c (camel_movemail): use new
5790 locking daemon, also return an error code.
5792 2001-06-18 Jeffrey Stedfast <fejj@ximian.com>
5794 Note: Except for the info_free(), the NULL checks are
5795 g_return's. I felt that since g_free() handles NULL that our
5796 _free() functions should also.
5798 * camel-folder.c (camel_folder_change_info_free): Check to make
5799 sure that the info pointer isn't NULL.
5800 (camel_folder_change_info_change_uid): Same.
5801 (camel_folder_change_info_changed): Same.
5802 (camel_folder_change_info_remove_uid): Same.
5803 (camel_folder_change_info_add_uid): Same.
5804 (camel_folder_change_info_build_diff): Same.
5805 (camel_folder_change_info_cat): Same.
5806 (camel_folder_change_info_add_source): Same.
5807 (camel_folder_change_info_add_source_list): Same.
5808 (camel_folder_change_info_add_update): Same.
5809 (camel_folder_change_info_add_update_list): Same.
5811 2001-06-18 Dan Winship <danw@ximian.com>
5813 * tests/stream/Makefile.am (LDADD):
5814 * tests/smime/Makefile.am (LDADD):
5815 * tests/misc/Makefile.am (LDADD):
5816 * tests/message/Makefile.am (LDADD):
5817 * tests/folder/Makefile.am (LDADD): Remove DB3_LDADD
5819 * Makefile.am (install-exec-local): Set camel-lock-help setgid or
5822 2001-06-18 Not Zed <NotZed@Ximian.com>
5824 * camel-folder-summary.c
5825 (camel_folder_summary_info_new_from_parser): Only create a missing
5826 uid if we have indexing turned on.
5828 * camel-lock-helper.c (setup_process): Function to setup
5829 process/sanity/security checks. Change to the real uid as soon as
5831 (lock_path): First try to lock as the real uid, if that fails, try
5833 (unlock_id): Unlock as the uid we created the lock as.
5835 * Makefile.am (INCLUDES): Added -DCAMEL_SBINDIR for lock helper
5838 * providers/local/camel-spool-folder.c (spool_lock): Implemented,
5839 using lock helper locking. Need to work out if the locking
5840 requires a root created lock?
5841 (spool_unlock): Likewise.
5843 2001-06-15 Not Zed <NotZed@Ximian.com>
5845 * camel-lock-helper.c: Setuid Lock helper process. Creates and manages
5846 .locks, keeping them active, removing them, etc. What real perms it
5847 needs is a little system dependent.
5849 2001-06-14 Not Zed <NotZed@Ximian.com>
5851 * providers/local/camel-maildir-store.c (get_folder_info): Implement.
5852 (scan_dir): Does the work of scanning for maildir directories.
5854 2001-06-13 Not Zed <NotZed@Ximian.com>
5856 * providers/local/camel-spool-store.c (get_folder_info):
5857 Implemented, just returns a hardcoded INBOX folder.
5858 (free_folder_info): implemented, free's the 1 possible level of
5861 * providers/local/camel-spool-folder.c
5862 (camel_spool_folder_construct): Set the real unread message
5863 count on the folder_created thing.
5865 2001-06-15 Dan Winship <danw@ximian.com>
5867 * providers/imap/camel-imap-message-cache.c
5868 (camel_imap_message_cache_max_uid): Return the largest real UID in
5869 the cache (as an integer). Eventually to be used for an
5870 optimization in the new-message fetch code.
5871 (cache_put): Keep track of max_uid.
5873 2001-06-14 Jeffrey Stedfast <fejj@ximian.com>
5875 * camel-mime-utils.c: Added Mailing-List header regex so that we
5876 can do mlist magic on that header.
5878 2001-05-28 Jeffrey Stedfast <fejj@ximian.com>
5880 * camel-mime-utils.c (header_decode_param): Properly handle
5881 correct and incorrect (for the common case, ie Outlook and
5882 Netscape/Mozilla) rfc2184 values.
5883 (header_decode_rfc2184_param): Get the param name and see if we
5884 should expect a rfc2184 parameter value.
5885 (rfc2184_decode): Decode a rfc2184 value.
5886 (hex_decode): hex decode a string.
5887 (header_decode_param_list): Handle rfc2184 encoded parameters (ie
5888 parameters that have been split and perhaps encoded).
5889 (header_param_list_format_append): Encode the value before seeing
5890 if it will fit on the line. If the value does get encoded, be sure
5891 to put a '*' before the equal-sign.
5892 (header_encode_param): New function to rfc2184 encode a parameter
5893 value (maybe it should be renamed?)
5895 2001-06-14 Jeffrey Stedfast <fejj@ximian.com>
5897 * camel-mime-part.c (init_header_name_table): Don't try to format
5898 the Reply-To header - we don't want to wrap the reply-to address.
5900 2001-06-12 Not Zed <NotZed@Ximian.com>
5902 * providers/local/camel-spool-*.[ch]: A new provider, for spool
5903 mailboxes. Mostly a cut and paste of the mbox code, but not a
5904 subclass CamelLocal*. Not tested a lot, doesn't lock yet, use
5905 with extreme caution.
5907 * tests/lib/folders.c (test_folder_message_ops): Added spool arg,
5908 spool folders can't be deleted, renamed, etc.
5909 (test_folder_basic): Same.
5911 * tests/folder/test2.c (main): Added checks for spool type.
5913 * tests/[message|stream|folder|misc|smime]/Makefile.am (LDADD):
5914 Added db3 flags, so make check compiles, doesn't run though.
5916 2001-05-24 Not Zed <NotZed@Ximian.com>
5918 * providers/local/camel-local-provider.c
5919 (camel_provider_module_init): Added spool provider.
5921 2001-06-07 Jon Trowbridge <trow@ximian.com>
5923 * camel-filter-driver.c (camel_filter_driver_filter_folder): Add a
5924 separator between the service url and the folder name, if needed.
5926 * camel-filter-driver.c (camel_filter_driver_filter_mbox): Added
5927 an argument, so that the original source URI of the mbox can be
5928 passed in. This is needed because this function is called
5929 post-movemail, so we are never reading from the original mbox
5930 anymore. Without the original mbox URI, the X-Evolution-Source
5931 tag gets set incorrectly and filter-on-source will fail to work.
5932 (camel_filter_driver_filter_message): Also take an extra arg
5933 for the original source URI. It is the original URI, not the
5934 source URI, that is used for filtering and for setting the
5935 X-Evolution-Source tag.
5937 2001-06-05 Dan Winship <danw@ximian.com>
5939 * providers/imap/camel-imap-folder.c (imap_rescan): Don't fetch
5940 the UID and FLAGS of messages we don't know about yet, since
5941 they'll just get discarded.
5943 2001-06-01 Jeffrey Stedfast <fejj@ximian.com>
5945 * tests/smime/pgp.c: Fix to not get into a recursive loop in
5948 * tests/smime/pgp-mime.c: Same.
5950 2001-05-31 Jeffrey Stedfast <fejj@ximian.com>
5952 * camel-smime-context.c: Numerous fixes to get it to compile.
5954 * camel.h: Added camel-cipher-context.h, camel-cms-context.h,
5955 camel-smime-context.h, and camel-smime-utils.h
5957 * camel-cms-context.[c,h]: New virtual class for manipulating
5958 cryptographic message syntax messages (like S/MIME).
5960 * camel-smime-context.[c,h]: Modified to inherit from the
5961 CamelCMSContext class rather than the CamelCipherContext class.
5963 * camel-smime.[c,h]: Removed - just use camel-smime-context
5966 * camel-smime-utils.[c,h]: New source files. Moved the 2 useful
5967 functions from camel-smime.[c,h] into here.
5969 2001-05-30 Dan Winship <danw@ximian.com>
5971 * camel-charset-map.c: Redo the BUILD_MAP code to not depend on
5972 libunicode. Now it only generates a map of "popular" 8bit
5973 encodings. (It's not worthwhile to support obscure encodings,
5974 because any mailer that supports them will support UTF8 too. And
5975 Chinese and Japanese use mostly the same UTF8 characters so you
5976 need to decide between those encodings based on the locale or
5977 the charset of the message you're replying to or the input
5978 method you used. So this is sufficient for camel_charset_best's
5981 * camel-charset-map-private.h: Regenerated.
5983 * camel.c (camel_shutdown): Move #ifdefs around to prevent a
5986 2001-05-29 Dan Winship <danw@ximian.com>
5988 * camel-disco-diary.c: Code for logging and replaying offline
5991 * camel-disco-store.c (disco_construct): Set disco->status here
5992 (where we can base it on the session's offline status) rather than
5994 (disco_connect): If we connect online and have a non-empty diary,
5995 switch to RESYNCING mode and replay the diary to the server.
5996 (disco_get_folder, disco_get_folder_info): Add _resyncing
5999 * camel-disco-folder.c (disco_sync, disco_expunge_uids,
6000 disco_append_message, disco_copy_messages_to,
6001 disco_move_messages_to): Add _resyncing variants to switches.
6002 (disco_expunge_uids, disco_append_message, disco_copy_messages_to,
6003 disco_move_messages_to): Remove #ifdef'ed out diary code: let the
6005 (disco_append_message): Redo the append methods to no longer
6006 return the UID, since we're no longer doing the logging from here.
6008 * providers/imap/camel-imap-store.c (imap_connect_online,
6009 imap_connect_offline): Create a CamelDiscoDiary.
6010 (imap_disconnect_offline): And free it.
6012 * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
6013 If RESYNCING, don't do any sort of checking that the remote folder
6014 matches the summary, beyond making sure that the UIDVALIDITY is
6016 (imap_rescan): Add a missing camel_folder_summary_info_free when
6017 removing a UID from the summary.
6018 (imap_expunge_uids_offline): Implement. Fairly simple.
6019 (imap_expunge_uids_resyncing): Implement. If the store supports
6020 UIDPLUS, we can just use imap_expunge_uids_online. If not, we need
6021 to temporarily undelete any messages marked deleted on the server
6022 that aren't supposed to get expunged.
6023 (imap_append_offline): Implement, using cache and summary
6024 operations, and triggering the folder_changed event by hand.
6025 (imap_append_resyncing): Implement. Redo imap_append_online a bit
6026 in the process to make them able to share more code.
6027 (imap_copy_offline): Implement.
6028 (imap_copy_online): Move parts of this out into a helper.
6029 (imap_copy_resyncing): Implement. In most cases this is just like
6030 imap_copy_online, but if you are copying a message that was itself
6031 copied or appended into the folder, and the server doesn't do
6032 UIDPLUS, it will be necessary to replace at least part of the copy
6033 operation with one or more appends.
6035 * providers/imap/camel-imap-command.c (imap_read_response): Don't
6036 record the current folder in the response when in RESYNCING mode.
6037 (This means that EXISTS and EXPUNGE responses won't be processed,
6038 which is needed because the summary may not match the folder at
6040 (imap_read_response): On error, call
6041 camel_imap_response_free_without_processing, not
6042 camel_imap_response_free.
6044 * providers/imap/camel-imap-utils.c (imap_uid_array_to_set): Make
6045 this work better when operating on UIDs that aren't in the summary.
6047 * providers/imap/camel-imap-summary.c
6048 (camel_imap_summary_add_offline): New routine used by
6049 imap_append_offline and imap_copy_offline to create new summary
6052 2001-05-28 Jeffrey Stedfast <fejj@ximian.com>
6054 * camel-mime-utils.c (header_set_param): Use g_strcasecmp()
6055 because some systems don't have strcasecmp(). Also, when removing
6056 a param, make sure to free the param->name too.
6058 2001-05-27 Dan Winship <danw@ximian.com>
6060 * tests/lib/messages.c (test_message_read_file): Fix an fd leak
6062 * tests/lib/session.c, tests/lib/session.h: a CamelSession
6063 subclass for the test programs.
6065 * tests/lib/Makefile.am: include session.[ch]
6067 * tests/folder/test*.c: Use a CamelTestSession from libcameltest
6068 instead of cut+pasting everywhere.
6070 * tests/misc/url.c (main): Update for a camel_url_new change at
6073 * tests/*/.cvsignore: Add stuff.
6075 * camel-mime-utils.c (rfc2047_encode_word): Fix a silly ==/!=
6078 2001-05-26 Dan Winship <danw@ximian.com>
6080 * providers/imap/camel-imap-folder.c: Add a "need_rescan" flag
6081 saying if we want to rescan the entire folder for flag changes
6082 next time it's selected.
6083 (camel_imap_folder_init): Set need_rescan TRUE.
6084 (camel_imap_folder_selected): If need_rescan is TRUE, call
6086 (imap_refresh_info): Only do a full rescan if need_rescan is TRUE.
6087 Otherwise just do a NOOP, making this a MUCH more lightweight
6088 operation. Also, don't call imap_rescan directly if the folder
6089 isn't selected, since that could end up causing the folder to be
6090 scanned *twice* (imap_rescan -> camel_imap_command ->
6091 camel_imap_folder_selected -> imap_rescan).
6092 (imap_rescan): Set need_rescan FALSE.
6093 (imap_sync_online): Don't NOOP if no changes were pushed: the
6094 caller will call refresh_info if it wants to poll for changes.
6095 Fixes evolution-mail doing lots of unnecessary extra work at
6098 * providers/imap/camel-imap-store.c (refresh_folder_info): Set
6099 need_rescan on each folder before calling refresh_info.
6101 2001-05-25 Jeffrey Stedfast <fejj@ximian.com>
6103 * providers/smtp/camel-smtp-transport.c (smtp_auth): Oops. Use a
6104 strNcmp to make sure the response begins with a 334 code, not a
6107 * providers/local/camel-maildir-folder.c (maildir_append_message):
6108 remove the summary info so we are not out-of-sync with the maildir
6111 * providers/local/camel-mh-folder.c (mh_append_message): remove
6112 the summary info so we are not out-of-sync with the mh folder.
6114 * providers/local/camel-mbox-folder.c (mbox_append_message):
6115 remove the summary info so we are not out-of-sync with the mbox.
6117 2001-05-24 Jeffrey Stedfast <fejj@ximian.com>
6119 * camel-smime-context.c (camel_smime_context_new): Oops, I spelled
6120 the get-default-db function name wrong.
6122 2001-05-23 Jeffrey Stedfast <fejj@ximian.com>
6124 * providers/local/camel-local-folder.c
6125 (camel_local_folder_construct): s/folder_deleted/folder_created -
6126 result of a bad copy/paste.
6128 * providers/imap/camel-imap-search.c (imap_body_contains):
6129 Optimize the match "" case.
6131 2001-05-21 Jeffrey Stedfast <fejj@ximian.com>
6133 * providers/imap/camel-imap-store.c (get_folder_info_online):
6134 Store the CamelFolderInfo tree that was returned from
6135 camel_folder_info_build() in a new variable, 'tree', rather than
6136 'fi' since we later use 'fi' when syncing folders. Not only does
6137 this fix a memory leak, but it also fixes the bug where the user
6138 would only see the last folder in the folder list and/or it's
6141 2001-05-16 Jeffrey Stedfast <fejj@ximian.com>
6143 * camel-session.c (camel_session_forget_password): The service can
6144 be NULL here too, thanks to Wayne Davis for pointing this out.
6146 * camel-smime-context.c (camel_smime_context_new): We don't need
6147 to be passed the certdb path anymore.
6149 2001-05-16 Dan Winship <danw@ximian.com>
6151 * camel-medium.c (camel_medium_get_headers): New function to
6152 return an array of all headers.
6153 (camel_medium_free_headers): And free them.
6155 * camel-mime-part.c (get_headers, free_headers): Implement this
6156 for CamelMimePart. (Works for CamelMimeMessage too.)
6158 2001-05-15 Jeffrey Stedfast <fejj@ximian.com>
6160 * camel-smime-context.c (camel_smime_context_finalise): Don't
6161 close or free (it wasn't allocated) the certdb.
6162 (camel_smime_context_new): If we get a NULL certdb handle, then
6163 don't bother trying to create a new certdb handle since NSS_Init*
6164 should have done that.
6166 2001-05-15 Jeffrey Stedfast <fejj@ximian.com>
6168 * Makefile.am: Don't use EXTRA_GNOME_*, use the new CAMEL_*
6169 variables so we don't link in tons of extra cruft that we don't
6172 * tests/smime/pkcs7.c: Added to the test suite - tests the S/MIME
6175 2001-05-14 Jeffrey Stedfast <fejj@ximian.com>
6177 * camel-smime-context.c: Lots of fixes to get this to compile.
6179 * camel-smime.c (camel_smime_part_verify): Updated to pass in a
6180 hash argument to camel_smime_verify().
6182 * camel-pgp-mime.c (camel_pgp_mime_part_verify): Update according
6183 to the changes in the context API.
6185 * camel-pgp-context.c (pgp_verify): Updated to take a
6186 CamelCipherHash argument.
6188 * camel-cipher-context.c (camel_cipher_verify): Now takes a hash
6189 argument since the S/MIME code needs this.
6191 * Makefile.am: Add camel-smime-context.[c,h] and camel-smime.[c,h]
6194 * camel-smime.[c,h]: New source files for manipulating S/MIME
6197 2001-05-14 Jon Trowbridge <trow@ximian.com>
6199 * camel-search-private.c (utf8_get): Replicate the semantics of
6200 the libunicode utf8 functions by returning NULL in the arg
6203 * camel-pgp-context.c (pgp_verify): Check for valid utf8,
6204 terminate loop if something looks wrong.
6206 * camel-mime-utils.c (header_encode_phrase_get_words): Properly
6207 check for invalid utf8.
6208 (header_encode_string): Properly check for invalid utf8.
6210 * camel-charset-map.c (camel_charset_step): Properly check for
6213 2001-05-14 Jeffrey Stedfast <fejj@ximian.com>
6215 * tests/folder/test9.c:
6216 * tests/folder/test8.c:
6217 * tests/folder/test7.c:
6218 * tests/folder/test6.c:
6219 * tests/folder/test5.c:
6220 * tests/folder/test4.c:
6221 * tests/folder/test3.c:
6222 * tests/folder/test2.c:
6223 * tests/folder/test1.c:
6224 * tests/smime/pgp-mime.c:
6225 * tests/smime/pgp.c: Subclass CamelSession since we can no longer
6226 specify the passwd callback any other way and update code
6229 2001-05-11 Dan Winship <danw@ximian.com>
6231 * camel-mime-utils.c (header_location_decode): Decode
6232 Content-Location, either correctly or Netscape-generated-brokenly.
6234 * camel-mime-part.c (camel_mime_part_set_content_location,
6235 camel_mime_part_get_content_location, etc): Deal with
6236 Content-Location header.
6238 2001-05-11 Jeffrey Stedfast <fejj@ximian.com>
6240 * providers/smtp/camel-smtp-transport.c (smtp_auth): Don't check
6241 the initial auth response until we get into the while-loop
6242 otherwise we have problems if the SASL mechanism supported a
6243 client initiated challenge (like PLAIN and LOGIN do).
6245 2001-05-11 Dan Winship <danw@ximian.com>
6247 * camel-stream-null.c (camel_stream_null_new): Make this return
6248 CamelStream * (like the other stream new functions) instead of
6251 2001-05-10 Chris Toshok <toshok@ximian.com>
6253 * camel-tcp-stream-ssl.c (stream_connect): call SSL_Enable after
6254 the SSL_ImportFD and before PR_Connect. Otherwise, NSS aborts
6257 2001-05-10 Jeffrey Stedfast <fejj@ximian.com>
6259 * camel-session.c (camel_session_get_password): Don't abort if the
6260 Service is NULL, this is perfectly valid for cipher contexts.
6262 2001-05-09 Peter Williams <peterw@ximian.com>
6264 * providers/imap/camel-imap-folder.c (imap_move_messages_to): Pass
6265 appropriate parameters to CF_CLASS and add comment explaining why
6266 my initial attempt at a solution didn't work.
6268 2001-05-09 Dan Winship <danw@ximian.com>
6270 * camel-disco-store.c (camel_disco_set_status): Set the
6271 disconnected status.
6272 (camel_disco_store_can_work_offline): Return whether or not a
6273 given CamelDiscoStore can work offline or not.
6275 * camel-disco-folder.c (camel_disco_folder_cache_message):
6276 Explicitly tell a folder to cache a message. (Better than using
6277 get_message, because for IMAP that doesn't guarantee you'll get
6278 all the message parts.)
6279 (camel_disco_folder_prepare_for_offline): Prepare a folder for
6280 offline use by caching all messages meeting given search criteria
6281 (and doing anything else the particular folder implementation
6284 * camel-session.c (camel_session_set_online,
6285 camel_session_is_online): A session-wide online/offline toggle.
6286 (camel_session_init): Set online to TRUE.
6288 * providers/imap/camel-imap-store.c (can_work_offline):
6289 Implementation of CamelDiscoStore::can_work_offline. (Checks that
6290 the store has been used online at least once.)
6291 (imap_get_folder_online, imap_get_folder_offline): Deal with
6292 request for "inbox" properly. ("Don't you mean... 'INBOX'?").
6294 * providers/imap/camel-imap-folder.c (imap_cache_message):
6295 Implementation of CamelDiscoFolder::cache_message.
6297 * camel.h: Add camel-disco-store.h and camel-disco-folder.h
6299 2001-05-09 Jeffrey Stedfast <fejj@ximian.com>
6301 * camel-mime-part.c (camel_mime_part_set_content_id): Wrap the
6302 content-id with <>'s.
6304 2001-05-04 Jeffrey Stedfast <fejj@ximian.com>
6306 * providers/smtp/camel-smtp-transport.c (connect_to_server): Add
6307 support for using OpenSSL.
6309 * camel-remote-store.c (remote_connect): Add support for using the
6310 OpenSSL implementation.
6312 * camel-tcp-stream-ssl.c (ssl_bad_cert): Hmmmm, don't pass in a
6313 NULL as the last argument to alert_user - prototype doesn't take
6314 that argument anymore?
6316 * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_finalize):
6317 (ssl_verify): Use a global hash table to try and lookup the
6318 CamelTcpStreamOpenSSL object given the ssl context since OpenSSL
6319 doesn't think one needs to pass data around, we should all be
6320 living in a world of global variables, duh!
6322 2001-05-06 Dan Winship <danw@ximian.com>
6324 * Makefile.am (libcamelinclude_HEADERS): Fix another build
6325 problem. (Um, anyone else could have done this...)
6327 2001-05-04 Dan Winship <danw@ximian.com>
6329 * providers/imap/camel-imap-store.c (get_folder_online): Fix up
6330 refcounting on current_folder.
6332 * camel-disco-folder.c, camel-disco-store.h: Remove
6333 CamelDiscoDiary refs that weren't supposed to escape yet.
6335 2001-05-03 Dan Winship <danw@ximian.com>
6337 * camel-disco-store.c: new abstract class for disconnectable
6340 * camel-disco-folder.c: new abstract class for folders on
6341 disconnectable stores.
6343 * Makefile.am: Add camel-disco-folder.[ch] and
6344 camel-disco-store.[ch].
6346 * providers/imap/camel-imap-store.c: Make this a subclass of
6347 CamelDiscoStore, and fix up the offline interfaces for the changes
6348 since they were first written (particularly the fact that some
6349 IMAP stores don't just use subscribed folders).
6351 * providers/imap/camel-imap-folder.c: Make this a subclass of
6352 CamelDiscoFolder, although most ops still fail in disconnected
6355 * camel-store.c (camel_store_get_folder_info): Change gboolean,
6356 gboolean, gboolean to guint32 in the prototype for this function.
6358 * providers/local/camel-local-store.c (get_folder_info): Update
6359 for prototype change.
6361 2001-05-02 Dan Winship <danw@ximian.com>
6363 * providers/imap/camel-imap-store.h: Clean this up a bit. Add a
6364 "tag_prefix" member. Move "useful_lsub" into capabilities.
6366 * providers/imap/camel-imap-store.c (camel_imap_store_init):
6367 Initialize the tag_prefix, based on a static variable.
6369 * providers/imap/camel-imap-command.c (camel_imap_command): Use
6370 the store's tag_prefix character rather than "A" at the start of
6371 the tag. Makes the verbose debug output easier to parse when
6372 connected to multiple IMAP servers. (Well, unless you're connected
6373 to more than 26 servers...)
6375 * providers/imap/camel-imap-utils.c (imap_uid_array_to_set): Fix
6376 this up... it was losing count in some cases and giving a more
6377 verbose answer than it needed to.
6379 * providers/pop3/camel-pop3-store.c: Rescue the KPOP code from bit
6382 2001-05-01 Dan Winship <danw@ximian.com>
6384 * providers/imap/camel-imap-command.c (camel_imap_command): Redo
6385 command locking. Since command_lock is recursive, we can just get
6386 a lock here, and release it either on error, or when the caller
6387 frees the response data. (This simplifies a lot of stuff, and
6388 fixes some problems with camel_imap_folder_changed being called
6389 without the command_lock locked because of the 2001-03-22 change.)
6391 (camel_imap_response_free):
6392 (camel_imap_response_free_without_processing):
6393 (camel_imap_response_extract):
6394 (camel_imap_response_extract_continuation): These all take a
6395 CamelImapStore now as well, to deal with locking.
6397 * providers/imap/camel-imap-private.h: Add
6398 CAMEL_IMAP_STORE_ASSERT_LOCKED, which defaults to a noop, but can
6399 be made to call e_mutex_assert_locked.
6401 * providers/imap/camel-imap-folder.c, camel-imap-search.c,
6402 camel-imap-store.c: Simplify using new locking stuff. Add a few
6403 CAMEL_IMAP_STORE_ASSERT_LOCKED checks.
6405 2001-05-01 Dan Winship <danw@ximian.com>
6407 Support the IMAP UIDPLUS extension (RFC 2359), which lets you
6408 resync after disconnected operation more efficiently, but also
6409 makes it possible to do appends and moves/copies more efficiently
6412 * providers/imap/camel-imap-folder.c (imap_append_message): If the
6413 server supports UIDPLUS, grab the APPENDUID response and cache the
6414 message into the folder's message cache.
6415 (imap_copy_messages_to): Likewise, for COPYUID, copy any message
6416 parts we have cached between the source and destination folder
6418 (imap_get_message): If the entire message is already in the cache,
6419 just return that rather than building it from parts.
6420 (imap_update_summary): Fetch just the "UID FLAGS RFC822.SIZE" of
6421 the new messages first, then only fetch the headers for messages
6422 where we don't already have the headers cached.
6424 * providers/imap/camel-imap-message-cache.c: Add gtk-doc comments.
6425 (cache_put): Fix refcounting stuff here.
6426 (camel_imap_message_cache_insert_stream,
6427 camel_imap_message_cache_insert_wrapper): New.
6428 (camel_imap_message_cache_get): Fix a bug here so the memory
6429 caching actually works.
6430 (camel_imap_message_cache_copy): New routine, used by
6431 imap_copy_messages_to.
6433 * providers/imap/camel-imap-utils.c (imap_uid_set_to_array):
6434 Inverse operation of imap_uid_array_to_set. Used to parse COPYUID
6437 2001-04-30 Dan Winship <danw@ximian.com>
6439 * providers/imap/camel-imap-utils.c (imap_uid_array_to_set):
6440 New-and-improved version of get_uid_set() from
6441 camel-imap-folder.c. Looks at the summary as it goes so that if
6442 you ask for messages 5, 6, 8, and 9, and there is no message 7,
6443 then you get "5:9" instead of "5:6,8:9"
6445 * providers/imap/camel-imap-folder.c (imap_copy_messages_to): Use
6446 imap_uid_array_to_set() rather than get_uid_set().
6449 2001-04-27 Dan Winship <danw@ximian.com>
6451 * camel-session.c: Redo this a lot so that instead of having a
6452 class full of callbacks, we have a subclassable class. Also,
6453 replace the increasingly horrifying
6454 camel_session_query_authenticator with three new routines,
6455 camel_session_get_password, camel_session_forget_password, and
6456 camel_session_alert_user.
6458 * camel-pgp-context.c:
6459 * camel-pkcs7-context.c:
6460 * camel-smime-context.c:
6461 * providers/imap/camel-imap-store.c:
6462 * providers/pop3/camel-pop3-store.c:
6463 * providers/smtp/camel-smtp-transport.c:
6464 Use camel_session_get_password / camel_session_forget_password.
6466 * camel-tcp-stream-ssl.c (ssl_bad_cert): Use
6467 camel_session_alert_user.
6469 2001-04-26 Jeffrey Stedfast <fejj@ximian.com>
6471 * camel.c (camel_init): Automagically call camel_shutdown()
6473 (camel_init): Also initialize NSS databases as read/write for
6474 S/MIME and if NSS fails to init, try initializing with volatile
6477 * camel-file-utils.h: #include <sys/types.h> for off_t.
6479 2001-04-26 Dan Winship <danw@ximian.com>
6481 * camel-file-utils.c: New file, with the int, string, time_t, and
6482 off_t encode/decode routines from camel-folder-summary.c moved
6483 here and renamed, for the enjoyment of non-CamelFolderSummary
6486 * Makefile.am (libcamel_la_SOURCES): Add camel-file-utils.c
6487 (libcamelinclude_HEADERS): and camel-file-utils.h
6489 * camel-folder-summary.c: Remove functions that were moved to
6490 camel-file-utils.c, update uses of them for the new names.
6491 (camel_folder_summary_{en,de}code_token are still here.)
6493 * providers/local/camel-mbox-summary.c: Use camel_file_util_*
6496 * providers/imap/camel-imap-summary.c: Use camel_file_util_* names
6498 * providers/imap/camel-imap-store.c (imap_store_setup_online,
6499 imap_store_setup_offline): Use camel_file_util_* names, which
6500 makes much more sense since this isn't folder summary stuff.
6502 2001-04-26 Dan Winship <danw@ximian.com>
6504 * Makefile.am (INCLUDES): Remove UNICODE_CFLAGS (and some other
6505 stuff that's redundant with EXTRA_GNOME_CFLAGS)
6506 (libcamel_la_LIBADD): Replace UNICODE_LIBS with GAL_LIBS.
6508 * camel-search-private.c:
6509 * camel-pgp-context.c:
6510 * camel-mime-utils.c: Use gunicode interfaces rather than
6513 * camel-charset-map.c: Use gunicode rather than libunicode. (The
6514 charmap-regen code still depends on libunicode though.)
6516 * camel-mime-filter-charset.h:
6517 * tests/message/test2.c (convert): Use iconv rather than
6520 * providers/smtp/Makefile.am (libcamelsmtp_la_LIBADD):
6521 * providers/pop3/Makefile.am (libcamelpop3_la_LIBADD):
6522 * providers/local/Makefile.am (libcamellocal_la_LIBADD): Remove
6525 * camel.c (camel_init): Remove call to unicode_init.
6527 * camel-mime-parser.c: Remove unused unicode.h include.
6529 2001-04-26 Dan Winship <danw@ximian.com>
6531 * camel-service.c (get_host): Use e_gethostbyname_r.
6532 (camel_service_gethost): Remove unused var.
6534 2001-04-26 Not Zed <NotZed@Ximian.com>
6536 * Applied jacob's patches for e-poolv stuff.
6538 2001-04-23 Jeffrey Stedfast <fejj@ximian.com>
6540 * camel.h: Add camel-vee-folder.h and camel-digest-folder.h
6542 * camel-digest-folder.[c,h]: New class that can be used to browse
6543 a multipart/digest message as if it were a CamelFolder.
6545 2001-04-22 Jeffrey Stedfast <fejj@ximian.com>
6547 * camel-pgp-context.c (pgp_verify): Oops, don't use the return
6548 value of iconv() as a string length, it only tells us the number
6549 of non-reversable character conversions. This fixes it so we
6550 actually see the gpg output in the message viewer.
6552 2001-04-23 Mikael Hallendal <micke@codefactory.se>
6554 * providers/nntp/Makefile.am (INCLUDES):
6555 Changed GTK_INCLUDEDIR to EXTRA_GNOME_CFLAGS.
6557 2001-04-20 Jeffrey Stedfast <fejj@ximian.com>
6559 * camel-smime-context.c (smime_sign): Implemented using the
6560 secmime.h convenience functions.
6561 (smime_clearsign): We just error our here, there is no clearsign
6563 (smime_verify): Copied code over from the pkcs7 verify - same
6564 state, ugly and unknown :-)
6565 (smime_encrypt): Implemented using the secmime.h convenience
6567 (smime_decrypt): Same as the code in pkcs7-context.
6569 2001-04-19 Jeffrey Stedfast <fejj@ximian.com>
6571 * camel-pkcs7-context.c (pkcs7_sign): Implemented.
6572 (pkcs7_clearsign): Implemented.
6573 (get_zero_len_passwd): Convenience function to try a 0-length key
6574 on the certificate db - if this works then there is no need to
6576 (get_password): Callback to get the password.
6577 (camel_cipher_hash_to_nss): Convenience function to convert a
6578 CamelCipherHash to an NSS HASH_HashType.
6579 (nss_hash_to_sec_oid): Converts a HASH_HashType to a SecOidTag.
6580 (pkcs7_digest): Digest function for use with pkcs7_sign().
6581 (sign_encode_cb): Callback to write the signed data to the output
6583 (pkcs7_verify): Hacked on a bit more but am still a bit on the
6584 confused side. This might work but I wouldn't hold my breath. The
6585 sign/clearsign should be close if not correct, but this one...god
6587 (pkcs7_decrypt): Implemented.
6588 (pkcs7_encrypt): Implemented (mostly, still need to handle when
6591 2001-04-18 Dan Winship <danw@ximian.com>
6593 * providers/imap/camel-imap-store.c (camel_imap_store_finalize):
6594 Free base_url and storage_path.
6596 * providers/pop3/camel-pop3-store.c (finalize): Free the
6597 implementation string.
6598 (camel_pop3_command): Clarify documentation to mention that
6599 @ex isn't set (and *@ret is) on CAMEL_POP3_ERR.
6600 (connect_to_server): Set @ex properly on CAMEL_POP3_ERR.
6602 * providers/pop3/camel-pop3-folder.c (pop3_refresh_info,
6603 pop3_get_message): Set @ex properly on CAMEL_POP3_ERR.
6605 2001-04-17 Jeffrey Stedfast <fejj@ximian.com>
6607 * camel-pkcs7-context.[c,h]: New source files to handle Pkcs7
6608 encryption, decryption, signing, and verifying. Not yet
6609 complete. I'm sensing this is going to take a while seeing as how
6610 NSS is just so well documented.
6612 2001-04-17 Dan Winship <danw@ximian.com>
6614 * camel-filter-driver.c (camel_filter_driver_filter_message): Fix
6615 a memory leak in the error case.
6617 2001-04-16 Jeffrey Stedfast <fejj@ximian.com>
6619 * providers/local/camel-mbox-summary.c (summary_rebuild): Don't we
6620 want to tell where we are by using the start of the message? I
6621 think this should be using camel_mime_parser_tell_start_from()
6622 instead. Also divide by the size *before* multiplying by 100 so
6623 that we don't overflow the int which was giving us negative values
6624 for our progress status (oops).
6626 2001-04-16 Jeffrey Stedfast <fejj@ximian.com>
6628 * camel-operation.c: Added a prototype for stamp().
6630 * camel-charset-map.c (camel_charset_locale_name): #include
6631 string.h so we don't get a warning about strchr being undefined
6632 and also init charset to NULL.
6634 * camel-pgp-context.c (pgp_verify): Go back to doing the utf8
6635 conversion by hand so that we don't depend on gal.
6637 * Makefile.am: Remove the EXTRA_GNOME_CFLAGS include.
6639 * camel-store.c (camel_mkdir_hier): Convenience function that it
6640 seems a number of camel-store implementations used gal for.
6642 * providers/nntp/camel-nntp-store.c (ensure_news_dir_exists): Lets
6643 not depend on gal for just e_mkdir_hier() - use camel_mkdir_hier()
6646 * providers/nntp/camel-imap-store.c: Lets not depend on gal for
6647 just e_mkdir_hier() - use camel_mkdir_hier() instead.
6649 * camel-session.c (camel_session_get_storage_path): Don't depend
6650 on e_mkdir_heir() anymore, use the CamelStore version.
6652 * camel-folder-search.h: Removed gal dependency, why was this even
6653 there in the first place?
6655 * providers/imap/camel-imap-folder.c: Don't need gal/util/e-util.h
6658 * string-utils.c (strstrcase): New function, well more like old
6659 function brought back to life so we don't have to depend on gal.
6661 * providers/imap/camel-imap-store.c (imap_store_setup_online): Use
6662 strstrcase rather than e_strstrcase so we don't depend on gal.
6663 (get_unread_online): Same here.
6665 * providers/smtp/camel-smtp-transport.c (smtp_helo): Use
6668 2001-04-15 Jeffrey Stedfast <fejj@ximian.com>
6670 * camel-mime-utils.c (header_raw_check_mailing_list): regex
6671 doesn't set errno and regcomp returns 0 on success and any other
6672 value for an error (so don't *just* check for -1).
6674 2001-04-14 Jeffrey Stedfast <fejj@ximian.com>
6676 * camel-cipher-context.c: Check to make sure the context is a
6677 valid context in all the user functions.
6679 2001-04-13 Jon Trowbridge <trow@ximian.com>
6681 * providers/imap/camel-imap-store.c (imap_disconnect):
6682 s/imap_store/store/, fixing a typo that was causing the build to
6685 * camel-filter-search.c (get_source): Make the (previously unused)
6686 get-source command actually do the right thing, properly shrouding
6687 any passed-in source and falling back to use the source attached
6688 to the mime message.
6690 2001-04-13 Dan Winship <danw@ximian.com>
6692 * camel-object.c (camel_object_hook_event):
6693 * camel-uid-cache.c (camel_uid_cache_get_new_uids):
6694 * camel-url.c (camel_url_new_with_base): Plug leaks.
6696 * camel-remote-store.c (camel_remote_store_init): Don't
6697 re-initialize the folders hash table.
6699 * providers/imap/camel-imap-store.c (imap_disconnect): Free
6700 authtypes since they'll be re-read on re-connect.
6701 (get_folder_info): Free folderinfos that we're discarding from the
6704 2001-04-12 Jeffrey Stedfast <fejj@ximian.com>
6706 * camel-pgp-context.c (camel_pgp_context_get_type): Oops, lets not
6707 get into a recursive call here ;-)
6709 * tests/smime/pgp.c: Updated to reflect changes to the PGP code.
6711 * tests/smime/pgp-mime.c: Same.
6713 2001-04-12 Jeffrey Stedfast <fejj@ximian.com>
6715 * camel-pgp-mime.c: Updated to reflect the few changes made to the
6716 CamelPgpContext class.
6718 * camel-pgp-context.c: Updated to subclass of CamelCipherContext.
6720 * camel-cipher-context.[c,h]: New base class for
6721 CamelPgpContext. Also contains the replacement for
6722 CamelPgpValidity, CamelCipherValidity.
6724 2001-04-12 Dan Winship <danw@ximian.com>
6726 * camel-mime-filter-crlf.c (filter): Fix a pair of array bounds
6727 reads noted by purify
6729 2001-04-12 Jeffrey Stedfast <fejj@ximian.com>
6731 * camel.h: #include the pgp stuff.
6733 2001-04-12 Dan Winship <danw@ximian.com>
6735 * providers/imap/camel-imap-message-cache.c
6736 (camel_imap_message_cache_remove):
6737 * camel-url.c (camel_url_to_string): Plug memory leaks.
6739 2001-04-11 Dan Winship <danw@ximian.com>
6741 * providers/imap/camel-imap-utils.c (imap_parse_string_generic):
6742 Simplify peterw's imap_is_atom_char fix.
6744 2001-04-11 Jeffrey Stedfast <fejj@ximian.com>
6746 * tests/smime/Makefile.am: Added pgp-mime.c to the tests.
6748 * tests/smime/pgp-mime.c: Test suite for camel-pgp-mime.c functions.
6750 * Makefile.am: Add camel-pgp-mime.[c,h] to the build.
6752 * camel-pgp-mime.c: Made a number of fixes to get it to compile
6753 and also fixed a few logic errors (mostly forgetting to reset
6754 streams) so that it worked (thanks to the pgp-mime test program).
6756 2001-04-11 JP Rosevear <jpr@ximian.com>
6758 * providers/imap/Makefile.am: user GNOME_INCLUDEDIR since gnome
6759 files are included in the top level camel headers and the gtk
6760 include dir is now versioned and such
6762 * providers/local/Makefile.am: ditto
6764 * providers/pop3/Makefile.am: ditto
6766 * providers/smtp/Makefile.am: ditto
6768 * providers/sendmail/Makefile.am: ditto
6770 * camel-service.c: use five arg version of gethostbyname_r if
6772 (camel_get_host_byname): check if msg->herr is non-zero instead of
6773 checking if msg->hp is null since we may not always have msg->hp
6775 2001-04-11 Jeffrey Stedfast <fejj@ximian.com>
6777 * camel-sasl-digest-md5.c (digest_response): Use
6778 camel_charset_locale_name() to get the locale charset rather than
6779 checking the CHARSET environment variable. This is a much less
6780 ugly hack. Also: If we fail to be able to convert to UTF8, then
6781 disavow all knowledge of the charset parameter.
6783 * camel-charset-map.c (camel_charset_locale_name): New function to
6784 return the locale charset (or NULL if US-ASCII).
6786 2001-04-11 Jeffrey Stedfast <fejj@ximian.com>
6788 * camel-pgp-context.c (camel_pgp_verify): Use
6789 e_utf8_from_locale_string() rather than trying to do it manually
6790 since Lauris's version works much better.
6792 2001-04-06 Jeffrey Stedfast <fejj@ximian.com>
6794 * Makefile.am: Added camel-pgp-context.[c,h] to the build. Also
6795 added tests/smime/pgp.c and Makefile.am
6797 * tests/smime/pgp.c: New test suite for PGP functions.
6799 * camel-pgp-context.c: Various fixes to get it to build.
6801 2001-04-07 Peter Williams <peterw@ximian.com>
6803 * providers/imap/camel-imap-utils.c (imap_parse_string_generic): It
6804 would be a good idea to recognize '\0'. Before, this code was running
6805 off the ends of strings and intermittently coredumping (if it didn't
6806 hit an imap_atom_char first) -- whoops!
6808 2001-04-05 Not Zed <NotZed@Ximian.com>
6810 * merge from evolution-0-10-branch to evolution-0-10-merge-0
6812 2001-04-03 Jeffrey Stedfast <fejj@ximian.com>
6814 * Makefile.am: Added tests/ back in
6816 * camel-mime-utils.c (header_decode_text): Ignore whitespace
6817 between encoded words (there were a few cases where it didn't
6819 (header_encode_string): Preserve whitespace between words that are
6820 to be encoded by encoding them too.
6821 (header_encode_phrase): Same here but with phrases.
6823 2001-04-03 Dan Winship <danw@ximian.com>
6825 * providers/imap/camel-imap-folder.c (imap_sync): If we don't
6826 change any flags or expunge, send a NOOP to give the server a
6827 chance to send EXISTS, etc, messages.
6828 (imap_get_message): If the server_level < IMAP4rev1, always fetch
6829 messages all-at-once, since they don't support the [#.MIME]
6831 (imap_update_summary): When reading message flags, set the
6832 server_flags field as well, and don't overwrite any flags set by
6833 camel_folder_summary_info_new_from_message. Might help with some
6834 of the flag problems...
6836 2001-04-02 Dan Winship <danw@ximian.com>
6838 * camel-service.h: Remove the "quick_login" member, which is
6841 * providers/smtp/camel-smtp-transport.c (smtp_auth): Remove the
6842 references to quick_login and fix this to use the CamelSasl
6843 interfaces correctly to do the same thing.
6844 (connect_to_server): Split this out of smtp_connect
6845 (smtp_connect): Use connect_to_server. When re-EHLO'ing after
6846 auth, ignore errors.
6847 (query_auth_types): Use connect_to_server rather than
6848 smtp_connect, so it doesn't try to authenticate. Add LOGIN
6849 authtype to the list of authtypes to check for.
6851 * providers/smtp/camel-smtp-provider.c
6852 (camel_provider_module_init): Add LOGIN authtype to the authtypes
6855 * camel-sasl.c (camel_sasl_authtype_list): Don't list LOGIN here:
6856 it's not a real SASL authtype and is only used for SMTP.
6858 * camel-sasl-plain.c:
6859 * camel-sasl-login.c:
6860 * camel-sasl-kerberos4.c:
6861 * camel-sasl-cram-md5.c:
6862 * camel-sasl-anonymous.c:
6863 * providers/pop3/camel-pop3-provider.c: Remove "quick_login"
6864 argument from authtypes.
6866 2001-04-02 Gediminas Paulauskas <menesis@delfi.lt>
6868 * camel-filter-driver.c: marked missing report status' for translation.
6870 2001-04-02 Jeffrey Stedfast <fejj@ximian.com>
6872 * camel-pgp-context.c (camel_pgp_sign): mutex lock & unlock the
6874 (camel_pgp_clearsign): Same.
6875 (camel_pgp_verify): Same.
6876 (camel_pgp_encrypt): Same.
6877 (camel_pgp_decrypt): And finally here...
6879 * camel-pgp-context.h: Update the function prototypes to match
6880 those found in camel-pgp-context.c.
6882 * camel-pgp-context.c: Updated.
6884 * camel-pgp-mime.c (camel_pgp_mime_part_sign): Implemented.
6885 (camel_pgp_mime_part_verify): Implemented.
6886 (camel_pgp_mime_part_encrypt): Implemented.
6887 (camel_pgp_mime_part_decrypt): Implemented.
6889 2001-04-01 Jeffrey Stedfast <fejj@ximian.com>
6891 * camel-sasl-login.[c,h]: New files to handle the LOGIN SASL
6894 * camel-sasl-plain.c: Removed the definition of
6895 camel_sasl_login_authtype.
6897 * camel-sasl.c (camel_sasl_new): Oops. I thought LOGIN was an
6898 alias to PLAIN. I was wrong. These two SASL objects have to be
6901 * providers/smtp/camel-smtp-transport.c (smtp_auth): Updated to
6902 check for and use authmech->quick_login when available.
6904 2001-04-01 Jeffrey Stedfast <fejj@ximian.com>
6906 * providers/pop3/camel-pop3-provider.c: Updated the authtypes here
6909 * camel-sasl-plain.c:
6910 * camel-sasl-anonymous.c:
6911 * camel-sasl-digest-md5.c:
6912 * camel-sasl-cram-md5.c:
6913 * camel-sasl-kerberos4.c: Updated the authtype values.
6915 * camel-service.h: Added another field to CamelServiceAuthType
6916 that specifies whether or not the mechanism supports "quick auth"
6917 which means that the client can send the initial challenge in the
6920 * camel-sasl.c (camel_sasl_new): Add support for LOGIN.
6921 (camel_sasl_authtype_list): Here too.
6922 (camel_sasl_authtype): And finally here.
6924 * camel-sasl-plain.c: Define camel_sasl_login_authtype.
6926 * providers/smtp/camel-smtp-transport.c (smtp_auth): Only unref
6927 the SASL object if it exists.
6929 2001-03-30 Dan Winship <danw@ximian.com>
6931 * providers/pop3/camel-pop3-store.c (connect_to_server,
6932 query_auth_types, pop3_connect): Move things around here to make
6933 this all work right again (so you don't get prompted for a
6934 password when checking the supported authtypes.)
6936 2001-03-30 Jon Trowbridge <trow@ximian.com>
6938 * camel-mime-message.c (camel_mime_message_set_source): Shrould
6939 our source URL before putting it into X-Evolution-Source.
6941 2001-03-29 Jeffrey Stedfast <fejj@ximian.com>
6943 * providers/imap/camel-imap-store.c (get_folder_info): Don't
6944 blindly append "/INBOX", construct a CamelURL and set the path
6946 (parse_list_response_as_folder_info): Don't blindly append
6947 "/<foldername>", construct a CamelURL and set the path that way
6949 (get_folders_offline): And again here.
6951 2001-03-30 Not Zed <NotZed@Ximian.com>
6953 * camel-service.c (camel_get_host_byname): Dont overwrite an
6954 exception if we got one already. Added camel_operation status to
6955 it, and comment out some debug.
6957 2001-03-29 Not Zed <NotZed@Ximian.com>
6959 * providers/smtp/camel-smtp-transport.c (smtp_connect): Free host
6960 name info when done ... blah blah.
6962 * camel-sasl-kerberos4.c (krb4_challenge): Free host name info
6963 after we're done with it.
6965 * camel-sasl-digest-md5.c (digest_md5_challenge): Free host name
6966 info after we're done with it.
6968 * camel-remote-store.c (remote_connect): Free the host name info
6969 from get_host after we're finished with it.
6971 * camel-service.c (camel_get_host_byname): New function to
6972 lookup a name, and still be cancellable.
6973 (camel_free_host): And a function to free the structure
6975 (camel_service_gethost): Call get_host_byname for this.
6977 2001-03-29 Jon Trowbridge <trow@ximian.com>
6979 * camel-filter-driver.c (camel_filter_driver_filter_message): Save
6980 the source URL using camel_mime_message_set_source.
6982 * camel-mime-message.c (camel_mime_message_set_source): Renamed
6983 camel_mime_message_set_identity to this. Sets the X-Evolution-Source
6985 (camel_mime_message_get_source): Returns the X-Evolution-Source
6988 2001-03-29 Kjartan Maraas <kmaraas@gnome.org>
6990 * broken-date-parser.c: #include <stdio.h>, <stdlib.h> and <string.h>
6991 * broken-date-parser.h: Remove all includes but <glib.h>
6992 * camel-address.h: Added #include <glib.h>
6993 * camel-data-wrapper.c: Move system includes to the top.
6994 * camel-data-wrapper.h: #include <glib.h>
6995 * camel-exception.c: #ifdef HAVE_CONFIG_H
6996 * camel-exception.h: Remove #include <glib.h>
6997 * camel-filter-driver.c: #ifdef HAVE_CONFIG_H and move system
6998 headers to top. Mark strings in camel_exception_set*() for i18n.
6999 * camel-filter-driver.h: #include <glib.h>
7000 * camel-filter-search.c: #ifdef HAVE_CONFIG_H
7001 * camel-folder-search.c: #include <config.h>
7002 * camel-folder-search.h: Header shuffling
7003 * camel-folder-summary.h: Same here
7004 * camel-folder-thread.c: #ifdef HAVE_CONFIG_H
7005 * camel-folder.c: Here too.
7006 * camel-folder.h: #include <glib.h>
7007 * camel-internet-address.c: Move system headers up
7008 * camel-lock.c: #ifdef HAVE_CONFIG_H
7009 * camel-medium.c: Same here
7010 * camel-mime-filter-bestenc.c: Move system headers up
7011 * camel-mime-filter-from.c: Same here
7012 * camel-mime-filter-linewrap.c: And here
7013 * camel-mime-filter.c: #include <string.h> to fix warnings from new gcc
7014 * camel-mime-filter.h: System headers moved up
7015 * camel-mime-message.c: Here too. #ifdef HAVE_CONFIG_H added
7016 * camel-mime-part-utils.c: #ifdef HAVE_CONFIG_H added
7017 * camel-mime-part.c: Here too, and shuffle headers
7018 * camel-mime-utils.c: #ifdef HAVE_CONFIG_H. Remove const from two
7019 variables to remove warning.
7020 * camel-mime-utils.h: Shuffle headers
7021 * camel-movemail.c: #ifdef HAVE_CONFIG_H. Mark string in camel_exception_set
7022 * camel-multipart.c: #ifdef HAVE_CONFIG_H. Added includes to remove
7023 warnings from new gcc
7024 * camel-object.c: #ifdef HAVE_CONFIG_H
7025 * camel-object.h: Shuffle headers
7026 * camel-operation.c: #ifdef HAVE_CONFIG_H
7027 * camel-provider.c: #ifdef HAVE_CONFIG_H. Shuffle headers. Mark a string
7028 * camel-remote-store.c: #ifdef HAVE_CONFIG_H
7029 * camel-sasl-anonymous.c: #ifdef HAVE_CONFIG_H. #include <string.h>
7030 * camel-sasl-cram-md5.c: #ifdef HAVE_CONFIG_H. #include <string.h> and
7031 <stdio.h> to remove warnings.
7032 * camel-sasl-digest-md5.c: #ifdef HAVE_CONFIG_H. shuffle headers
7033 * camel-sasl-digest-md5.h: Shuffle headers.
7034 * camel-sasl-kerberos4.c: #ifdef HAVE_CONFIG_H. Shuffle headers.
7035 * camel-sasl-kerberos4.h: Shuffle headers.
7036 * camel-sasl-plain.c: #ifdef HAVE_CONFIG_H. Shuffle
7037 * camel-sasl.c: #ifdef HAVE_CONFIG_H. #include <string.h>
7038 * camel-search-private.c: #include <config.h>
7039 * camel-seekable-stream.c: #ifdef HAVE_CONFIG_H
7040 * camel-seekable-stream.h: Shuffle
7041 * camel-seekable-substream.c: #ifdef HAVE_CONFIG_H
7042 * camel-service.c: Same
7043 * camel-service.h: Shuffle
7044 * camel-session.c: #ifdef HAVE_CONFIG_H
7045 * camel-store.c: Same
7046 * camel-stream-buffer.c: Here too
7047 * camel-stream-buffer.h: Shuffle
7048 * camel-stream-filter.c: #include <string.h>
7049 * camel-stream-fs.c: #ifdef HAVE_CONFIG_H
7050 * camel-stream-fs.h: Shuffle headers
7051 * camel-stream-mem.c: Same as above
7052 * camel-stream-mem.h: Here too
7053 * camel-stream-null.c: #ifdef HAVE_CONFIG_H
7054 * camel-stream.c: Here too
7055 * camel-stream.h: Shuffle
7056 * camel-tcp-stream-openssl.c: #ifdef HAVE_CONFIG_H
7057 * camel-tcp-stream-raw.c: Same here. and move local includes down
7058 * camel-tcp-stream-ssl.c: Same as above
7059 * camel-tcp-stream.c: #ifdef HAVE_CONFIG_H
7060 * camel-tcp-stream.h: move local include down
7061 * camel-transport.c: #ifdef HAVE_CONFIG_H
7062 * camel-transport.h: #include <glib.h>
7063 * camel-uid-cache.c: #ifdef HAVE_CONFIG_H. Shuffle headers
7064 * camel-uid-cache.h: Shuffle
7065 * camel-url.c: #ifdef HAVE_CONFIG_H
7066 * camel-vee-folder.c: #ifdef HAVE_CONFIG_H. Shuffle headers
7067 * camel-vee-folder.h: #include <glib.h>
7068 * camel-vee-store.h: Same here
7069 * camel.c: #ifdef HAVE_CONFIG_H
7070 * gstring-util.c: Here too
7071 * hash-table-utils.c: Remove #include <glib.h>
7072 * hash-table-utils.h: #include it here instead.
7073 * string-utils.c: #ifdef HAVE_CONFIG_H
7074 * providers/cache/camel-cache-map.c: #ifdef HAVE_CONFIG_H, shuffle
7075 headers and mark strings in camel_exception_set*()
7076 * providers/cache/camel-cache-provider.c: #ifdef HAVE_CONFIG_H
7077 * providers/cache/camel-cache-store.c: Same here, and mark a string.
7078 * providers/imap/camel-imap-command.c: #ifdef HAVE_CONFIG_H
7079 * providers/imap/camel-imap-command.h: Shuffle header
7080 * providers/imap/camel-imap-folder.c: #ifdef HAVE_CONFIG_H
7081 * providers/imap/camel-imap-message-cache.c: #ifdef HAVE_CONFIG_H
7082 * providers/imap/camel-imap-provider.c: #ifdef HAVE_CONFIG_H and
7084 * providers/imap/camel-imap-search.c: #ifdef HAVE_CONFIG_H
7085 * providers/imap/camel-imap-store.c: #ifdef HAVE_CONFIG_H and mark
7087 * providers/imap/camel-imap-summary.c: Shuffle headers
7088 * providers/imap/camel-imap-wrapper.c: #ifdef HAVE_CONFIG_H. Shuffle
7089 * providers/local/camel-local-folder.c: #ifdef HAVE_CONFIG_H
7090 * providers/local/camel-local-provider.c: #ifdef HAVE_CONFIG_H
7091 * providers/local/camel-local-store.c: Same here
7092 * providers/local/camel-local-summary.c: Here too, shuffle, mark a string
7093 * providers/local/camel-maildir-folder.c: #ifdef HAVE_CONFIG_H
7094 * providers/local/camel-maildir-store.c: Same
7095 * providers/local/camel-maildir-summary.c: Here too
7096 * providers/local/camel-mbox-summary.c: And here
7097 * providers/local/camel-mbox-store.c: And here
7098 * providers/local/camel-mbox-summary.c: #include <config.h>
7099 * providers/local/camel-mh-folder.c: #ifdef HAVE_CONFIG_H
7100 * providers/local/camel-mh-store.c: same
7101 * providers/local/camel-mh-summary.c: #ifdef HAVE_CONFIG_H, shuffle headers
7102 and mark a string for translation.
7103 * providers/nntp/camel-nntp-auth.c: #include <config.h>
7104 * providers/nntp/camel-nntp-store.c: Remove superfluous arg to
7105 CAMEL_SERVICE_CLASS to make it compile
7106 * providers/pop3/camel-pop3-provider.c: #ifdef HAVE_CONFIG_H
7107 * providers/pop3/camel-pop3-store.c: Same here
7108 * providers/sendmail/camel-sendmail-provider.c: Here too
7109 * providers/sendmail/camel-sendmail-transport.c: Here too
7110 * providers/smtp/camel-smtp-provider.c: Same
7111 * providers/smtp/camel-smtp-transport.c: #ifdef HAVE_CONFIG_H, mark
7112 strings for translations.
7114 2001-03-29 Dan Winship <danw@ximian.com>
7116 * camel-url.c (camel_url_to_string): change "gboolean show_passwd"
7119 * tests/misc/url.c (main): Update calls to camel_url_to_string
7121 * providers/imap/camel-imap-store.c (construct): Call
7122 camel_url_to_string with flags to hide password, authtype, and
7123 params to create the base_url.
7124 (etc): Update for the fact that the base_url no longer has the "/"
7127 * camel-service.c (construct): Update calls to camel_url_to_string
7128 (pass CAMEL_URL_HIDE_PASSWORD)
7130 2001-04-03 Jeffrey Stedfast <fejj@ximian.com>
7132 * camel-mime-utils.c (header_decode_text): Ignore whitespace
7133 between encoded words (there were a few cases where it didn't
7135 (header_encode_string): Preserve whitespace between words that are
7136 to be encoded by encoding them too.
7137 (header_encode_phrase): Same here but with phrases.
7139 2001-04-04 Kjartan Maraas <kmaraas@gnome.org>
7141 * camel-filter-driver.c: Added #include <config.h>. Marked
7142 a bunch of strings for translation.
7143 * camel-folder-search.c: Added #include <config.h>.
7144 * camel-folder-summary.c: Same here.
7145 * camel-movemail.c: Marked strings for translation.
7146 * camel-provider.c: Same here.
7147 * camel-search-private.c: #include <config.h>
7148 * camel-vee-folder.c: Mark string for translation.
7149 * providers/local/camel-mbox-summary.c: #include <config.h>
7151 2001-04-03 Dan Winship <danw@ximian.com>
7153 * providers/imap/camel-imap-folder.c (imap_sync): If we don't
7154 change any flags or expunge, send a NOOP to give the server a
7155 chance to send EXISTS, etc, messages.
7156 (imap_get_message): If the server_level < IMAP4rev1, always fetch
7157 messages all-at-once, since they don't support the [#.MIME]
7160 2001-04-01 Jeffrey Stedfast <fejj@ximian.com>
7162 * providers/imap/camel-imap-store.c (get_folder_info): Don't
7163 blindly append "/INBOX", construct a CamelURL and set the path
7165 (parse_list_response_as_folder_info): Don't blindly append
7166 "/<foldername>", construct a CamelURL and set the path that way
7168 (get_folders_offline): And again here.
7170 2001-03-31 Not Zed <NotZed@Ximian.com>
7172 * camel-operation.c (struct _status_stack): change stamp to
7173 unsigned to avoid overflow.
7174 (camel_operation_end):
7175 (camel_operation_progress_count):
7176 (camel_operation_progress): Double the delay before transient
7177 events start showing their own progress.
7179 2001-03-30 Not Zed <NotZed@Ximian.com>
7181 * providers/pop3/camel-pop3-folder.c (pop3_get_message): Change
7182 the pop download into a transient event.
7184 * camel-operation.c (stamp): Get a timestamp that changes 4x a
7185 second (or rather, arbitrarily more often than 1/second).
7186 (camel_operation_progress): Use stamp() for time updates.
7187 (camel_operation_progress_count): "
7188 (camel_operation_start): Store the status as a struct status_stack
7190 (camel_operation_start_transient): New function to start a
7191 transient event, which is only reported if it runs for too
7192 long/and is reset afterwards.
7193 (camel_operation_progress):
7194 (camel_operation_progress_count): Fix for status_stack changes,
7195 and account for transient updates.
7197 * camel-filter-driver.c (camel_filter_driver_filter_folder): When
7198 we remove things (set deleted), always set seen too, to mirror
7199 interface behaviour when you delete.
7200 (camel_filter_driver_filter_message): And same here too.
7202 2001-03-30 Dan Winship <danw@ximian.com>
7204 * providers/pop3/camel-pop3-store.c (connect_to_server,
7205 query_auth_types, pop3_connect): Move things around here to make
7206 this all work right again (so you don't get prompted for a
7207 password when checking the supported authtypes.)
7209 2001-03-29 Dan Winship <danw@ximian.com>
7211 * camel-url.c (camel_url_to_string): change "gboolean show_passwd"
7214 * tests/misc/url.c (main): Update calls to camel_url_to_string
7216 * providers/imap/camel-imap-store.c (construct): Call
7217 camel_url_to_string with flags to hide password, authtype, and
7218 params to create the base_url.
7219 (etc): Update for the fact that the base_url no longer has the "/"
7222 * camel-service.c (construct): Update calls to camel_url_to_string
7223 (pass CAMEL_URL_HIDE_PASSWORD)
7225 2001-03-28 Jeffrey Stedfast <fejj@ximian.com>
7227 * camel-pgp-context.[c,h]: New class for PGP encrypting,
7228 decrypting, signing and verifying. Next I'll be moving the
7229 contents of mail/mail-crypto into Camel. These files will
7230 basically replace mail/openpgp-utils.[c,h].
7232 2001-03-29 Not Zed <NotZed@Ximian.com>
7234 * camel-folder-search.c (search_body_contains): Optimise the match
7235 "" case, just match everything in the folder (if we have it).
7237 * camel-vtrash-folder.c (vtrash_move_messages_to): Access the
7238 folder directly from the message info.
7239 (vtrash_move_messages_to): I think we also need to call the real
7240 move_messages_to, and not try and bypass the lock, since we dont
7241 have the lock for that folder.
7243 * camel-vee-folder.h: Move CamelVeeMessageInfo to public, so
7244 subclasses can get to it.
7246 * camel-vee-folder.c (camel_vee_folder_add_folder): Dont let you
7247 add a vfolder to itself.
7249 (vee_folder_remove_folder):
7250 (vee_folder_build_folder): Copy changes before triggering changed
7251 events, so we can do them outside of locks.
7252 (camel_vee_folder_get_message_folder): Removed function.
7253 (camel_vee_folder_hash_folder): Made public (renamed from
7254 hash_folder), simply for subclasses (probably not needed).
7255 (vee_expunge): Oops, call the class sync, not superclass sync.
7256 (vee_sync): Remove some accidental debug.
7258 2001-03-27 Jeffrey Stedfast <fejj@ximian.com>
7260 * camel-service.c (get_path): Add the port (if user defined) to
7261 the path to fix bug #1996.
7263 Danw: I'm iffy on the "fix" so I'd like you to comment.
7265 2001-03-27 Jeffrey Stedfast <fejj@ximian.com>
7267 * providers/pop3/camel-pop3-folder.c (pop3_sync): If we aren't
7268 going to even check the resp/free buffer that gets returned from
7269 camel_pop3_command, don't even bother using it. Send in NULL
7271 (pop3_get_message): Check to make sure that the `result' string is
7272 non-NULL. It's possible that some POP servers may return with
7273 "+OK\r\n<message>..." rather than the expected
7274 "+OK ### octets\r\n<message>..."
7276 2001-03-27 Not Zed <NotZed@Ximian.com>
7278 * camel-folder-summary.c (camel_folder_summary_finalize): Unref
7279 the html filter when done.
7280 (summary_build_content_info): Disable using the html parser to
7281 help index html mails until it gets sorted out.
7283 * camel-vee-folder.c (folder_changed): Fix a cut n paste bug, we
7284 want uid_removed not uid_changed deref, fixes bug #1999.
7286 2001-03-27 Dan Winship <danw@ximian.com>
7288 * camel-sasl.c (camel_sasl_authtype_list): add an argument to say
7289 whether or not you want "PLAIN" in the list (so you don't end up
7290 with "Password" twice in the config dialog).
7292 * providers/imap/camel-imap-provider.c (camel_provider_module_init):
7293 * providers/imap/camel-imap-store.c (query_auth_types): We don't
7296 * providers/smtp/camel-smtp-provider.c (camel_provider_module_init):
7297 * providers/smtp/camel-smtp-transport.c (query_auth_types): But we
7300 2001-03-27 Dan Winship <danw@ximian.com>
7302 * camel-provider.h: Add an "extra_conf" field to CamelProvider
7303 with structures and defines and stuff, for providers to specify
7304 additional configuration options that they want. Also add a
7305 "supports ssl" flag to the provider flags.
7307 * camel-url.c (camel_url_new_with_base): Fix parsing of params.
7308 (output_param): And unparsing...
7310 * camel-remote-store.c: add a "default_ssl_port" field.
7311 (remote_construct): If the URL has the "use_ssl" parameter, set
7312 the store's use_ssl flag.
7313 (remote_connect): If using SSL and no port specified, use the
7314 default_ssl_port rather than the default_port.
7316 * providers/smtp/camel-smtp-provider.c (smtp_provider): add
7317 CAMEL_PROVIDER_SUPPORTS_SSL and CAMEL_URL_ALLOW_USER. (The config
7318 gui code knows that the ALLOW_USER and ALLOW_AUTH go together.)
7319 (ssmtp_provider): gone
7321 * providers/smtp/camel-smtp-transport.c (smtp_construct): Set a
7322 flag if "use_ssl" param is set.
7323 (smtp_connect): Check the CamelSmtpTransport use_ssl flag rather
7324 than checking if this is smtp or ssmtp.
7326 * providers/imap/camel-imap-provider.c (imap_conf_entries): Add a
7327 bunch of IMAP-specific configuration options, like "check for new
7328 mail in all folders" (default TRUE), "show only subscribed
7329 folders" (default TRUE), "ignore server-supplied namespace", and
7330 "apply filters to INBOX" (not yet implemented).
7331 (imap_provider): We support SSL and we no longer allow a path in
7332 the URL. (namespace is handled via extra_conf)
7333 (simap_provider): Gone
7335 * providers/imap/camel-imap-store.c (camel_imap_store_init): Set
7336 default_ssl_port, don't set CAMEL_STORE_SUBSCRIPTIONS here
7337 (construct): remove simap stuff, deal with "use_lsub",
7338 "namespace", "check_all", and "filter" parameters. Set base_url
7339 to not include params.
7340 (imap_store_setup_online): Don't ask for the namespace if it was
7341 set explicitly. Don't get subscribed folders if !use_lsub.
7342 (imap_concat): Fix a bug.
7343 (get_folder_info): Support for not checking all folders.
7345 * providers/imap/camel-imap-folder.c (imap_get_full_name): Rewrite
7346 to use imap_store->namespace, not service->url->path
7348 * providers/pop3/camel-pop3-provider.c (pop3_conf_entries): "keep
7349 on server" (currently still implemented by the mailer code, not
7350 here), "delete after N days" (not yet implemented).
7351 (pop3_provider): we support SSL
7352 (spop_provider): gone
7354 * providers/pop3/camel-pop3-store.c (camel_pop3_store_init): Set
7356 (pop3_connect): Remove spop code
7358 2001-03-26 Jeffrey Stedfast <fejj@ximian.com>
7360 * camel-vee-folder.c (vee_folder_construct): Move all of the
7361 camel_vee_folder_construct() internals here.
7362 (camel_vee_folder_construct): This function basically becomes a
7363 wrapper for vee_folder_construct and also checks to make sure that
7364 the UNMATCHED vfodler is constructed otherwise constructs it.
7365 (camel_vee_folder_new): Call vee_folder_construct() instead so
7366 that we don't get into a dead-lock.
7368 2001-03-26 Jeffrey Stedfast <fejj@ximian.com>
7370 * camel-store.c (init_trash): Use camel_vtrash_folder_new() to
7371 create the vtrash folder now.
7373 * camel-vtrash-folder.[c,h]: New subclass of CamelVeeFolder for
7376 * camel-folder.c (camel_folder_copy_messages_to): Don't watch for
7377 vtrash folders anymore.
7378 (camel_folder_move_messages_to): Same.
7380 * camel-vee-folder.c (camel_vee_folder_class_init): Update.
7381 (vee_move_messages_to): Rewrite to use the new move API.
7383 * camel-filter-driver.c (do_copy): Updated to reflect
7384 copy_message_to changes. Create a temporary uid array and use
7387 (camel_filter_driver_filter_message): And again, here...
7389 * providers/imap/camel-imap-folder.c (imap_copy_messages_to):
7390 Update to the new API.
7391 (imap_move_messages_to): Same.
7392 (get_uid_set): New function to create a `set' string based on an
7393 array of UIDs for use with imap_copy_messages_to.
7395 * camel-folder.c (camel_folder_copy_messages_to): Replaces
7396 camel_folder_copy_message_to
7397 (camel_folder_move_message_to): Replaces
7398 camel_folder_move_message_to.
7400 2001-03-27 Not Zed <NotZed@Ximian.com>
7402 * camel-vee-store.c (vee_get_folder): Added folder_created event
7405 * camel-vee-folder.c (unmatched_finalise): Removed, moved into
7407 (message_changed): Just create a new change entry and promote it
7408 to a folder_changed thing.
7409 (vee_sync): Always rebuild folder on sync, even when not expunge.
7410 (folder_changed): If not autoupdating, make sure we remove any
7412 (vee_folder_build_folder):
7413 (vee_folder_remove_folder): NOP if we're called on
7415 (vee_search_by_expression): Only search each folder once. Should
7416 we also order the result in summary order?
7418 2001-03-20 Not Zed <NotZed@Ximian.com>
7420 * camel-store.c (init_trash): Fix calling for vee_folder_new().
7422 * camel-folder-summary.c (camel_folder_summary_remove_index):
7423 Optimise slightly, use ptr_array_remove_index rather than have to
7424 search for the index by using summary_remove.
7426 * camel-vee-folder.h: Removed local member from VeeFolder, since
7429 * camel-vee-store.c (camel_vee_store_finalise): Setup finalise
7432 * camel-vee-folder.c (camel_vee_folder_set_expression): New
7433 function to set the query of an existing vfolder.
7434 (camel_vee_folder_construct): New function for
7435 convenience/subclasses.
7436 (camel_vee_folder_new): Removed exception parameter, no longer
7437 needed (since we dont search yet).
7438 (camel_vee_folder_new): Changed to use folder_construct, and no
7439 longer raise the folder created signal.
7440 (vee_folder_build_folder): Make it return error on exception, so
7441 we can work without exceptions.
7442 (vee_folder_remove_folder): Use remove index rather than
7443 remove_uid, this is ok since we have the summary locked for our
7445 (camel_vee_folder_add_folder): Only add the folder to the
7446 unmatched private if it is not a private folder.
7447 (camel_vee_folder_remove_folder): Only remove the folder from
7448 unmatched if it is not private.
7449 (vee_expunge): Just call sync with expunge set.
7450 (vee_sync): If expunging, also refresh the search.
7451 (vee_folder_build_folder): We do our own locking now, removed from
7452 callers, also trigger changed events here too (within locks),
7453 fixed callers appropriately.
7454 (vee_folder_remove_folder): Do our own locking, and trigger
7456 (vee_folder_add_info): Renamed of vee_folder_add, we now take a
7457 hash of the folder name, rather than use the folders address.
7458 (hash_folder): Convert a folder name into an 8 character hash.
7459 (vee_get_message, vee_search_by_expression, vee_set_message_flags,
7460 vee_set_message_user_flag, vee_move_message_to): Changed the uid
7461 to be an 8 byte hash + original uid, with no ':' anymore.
7463 2001-03-26 Jeffrey Stedfast <fejj@ximian.com>
7465 * camel-mime-utils.c (header_decode_text): When writing the last
7466 token (if not rfc2047 encoded), don't use g_string_append_len, use
7469 * camel-mime-message.c (write_to_stream): Don't spew a warning if
7470 the message-id wasn't set by the application, not a big deal since
7471 we create one right here.
7473 2001-03-26 Dan Winship <danw@ximian.com>
7475 * providers/imap/camel-imap-command.c (camel_imap_command): keep a
7476 reference on the store's current_folder.
7478 * providers/imap/camel-imap-store.c (camel_imap_store_finalize):
7479 (imap_disconnect): unref the current_folder before clearing it.
7481 * camel-url.c (camel_url_get_param): Add missing accessor.
7483 * camel-session.c (camel_session_get_provider): New. Return
7484 the provider for a URL.
7486 2001-03-25 Dan Winship <danw@ximian.com>
7488 * camel-url.c (camel_url_new_with_base): New URL parser with full
7489 RFC1808 relative URL support. Yum.
7490 (camel_url_new): Wrapper around camel_url_new_with_base now.
7492 * tests/Makefile.am: add misc subdir
7494 * tests/misc/url.c: relative URL test cases from RFC 1808
7496 2001-03-25 Jeffrey Stedfast <fejj@ximian.com>
7498 * camel-filter-driver.c (do_copy): Don't use copy_to if the source
7499 folder doesn't support summary info's.
7501 (camel_filter_driver_filter_message): And again here. I think
7502 this will fix the problem of "colour" tags not staying with the
7503 message when it's copied to a folder during the filter process.
7505 2001-03-24 Jeffrey Stedfast <fejj@ximian.com>
7507 * camel-sasl-digest-md5.c (digest_response): Do charset conversion
7508 on the username param here if needed.
7509 (parse_server_challenge): Protect against possibly empty-string
7512 2001-03-23 Jon Trowbridge <trow@ximian.com>
7514 * camel-filter-driver.c (camel_filter_driver_filter_message):
7515 Don't call camel_mime_message_set_identity. (The call is
7516 commented out, left over from some earlier experimentation that I
7517 want to be able to remember later...)
7519 * camel-mime-message.c (camel_mime_message_set_identity): Added.
7520 A function to set the X-Evolution-Identity header.
7522 2001-03-22 Dan Winship <danw@ximian.com>
7524 * providers/imap/camel-imap-command.c (imap_read_response): Don't
7525 look at untagged responses other than "* BYE"...
7526 (camel_imap_response_free): ...do it here instead...
7527 (camel_imap_response_free_without_processing): ...but not here.
7529 * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
7530 Remove the "EXISTS" line from the response so
7531 camel_imap_response_free won't try to process it.
7532 (camel_imap_folder_selected): If we get an EXISTS response mixed
7533 in with the FETCH responses, record the new EXISTS value.
7534 Use camel_imap_response_free_without_processing so that an EXISTS
7535 response won't cause a loop.
7536 (imap_rescan): Use camel_imap_response_free_without_processing.
7537 (imap_update_summary): Use
7538 camel_imap_response_free_without_processing. If an EXISTS response
7539 shows up, call imap_update_summary again to get the new messages.
7540 (imap_protocol_get_summary_specifier): Use BODY.PEEK[0], not
7541 RFC822.HEADER for prev IMAP4rev1, since the FETCH parser won't
7542 deal with RFC822.HEADER responses.
7544 * providers/imap/camel-imap-store.c (get_folder_info): Fix an
7545 uninitialized variable
7547 2001-03-21 Dan Winship <danw@ximian.com>
7549 * camel-provider.h: (CamelProvider) add a "GList *authtypes", so
7550 you can get the list of authtypes used by a provider without
7551 needing to have an actual CamelService object handy. (Will be
7552 needed by the new config druid.)
7553 (CAMEL_PROVIDER_ALLOWS, CAMEL_PROVIDER_NEEDS): New macros to test
7554 the URL part stuff, since the way it works is too complicated and
7555 everyone always does it wrong.
7557 * camel-service.c (camel_service_query_auth_types): Remove the
7558 @connected arg again: if you don't want to connect, you can just
7559 get the list of authtypes off the provider.
7560 (camel_service_free_auth_types): Remove this. All existing
7561 implementations do authtypes the same way, so just say the caller
7562 should "g_list_free" the list. (Oh, look, removing this function
7563 doesn't actually cause the mailer to not build. How 'bout that.)
7564 (construct, get_path): Use the new URL part macros.
7566 * camel-remote-store.c (remote_query_auth_types): Update
7567 (remote_free_auth_types): Nuke
7568 (camel_remote_store_authtype_list): New function for use by
7571 * providers/imap/camel-imap-provider.c:
7572 * providers/pop3/camel-pop3-provider.c:
7573 * providers/smtp/camel-smtp-provider.c: Update CamelProvider
7575 (camel_provider_module_init): Put all the SSL parts together so
7576 there's only 1 #ifdef. Set up the provider authtypes field using
7577 the SASL, CamelRemoteStore, and standard authtypes, as
7578 appropriate. Copy that from the normal provider to the SSL
7581 * providers/local/camel-local-provider.c:
7582 * providers/sendmail/camel-sendmail-provider.c:
7583 * camel-session.c: Update CamelProvider structures.
7585 * providers/imap/camel-imap-store.c (query_auth_types):
7586 * providers/pop3/camel-pop3-store.c (query_auth_types): Update
7588 * providers/smtp/camel-smtp-store.c (query_auth_types): Update.
7589 Remove the no_authtype, because that's what "ALLOW_AUTH" rather
7590 than "NEED_AUTH" means.
7591 (free_auth_types): Nuke.
7593 2001-03-21 Jeffrey Stedfast <fejj@ximian.com>
7595 * camel-filter-driver.c (camel_filter_driver_filter_message):
7597 (camel_filter_driver_filter_folder): Same.
7598 (camel_filter_driver_filter_mbox): Same.
7599 (camel_filter_driver_filter_folder): Return -1 if an exception was
7602 2001-03-19 Jeffrey Stedfast <fejj@ximian.com>
7604 * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_finalize):
7605 Free the expected host.
7606 (camel_tcp_stream_openssl_new): Now takes a Service and an
7607 expected_host. Set them.
7609 2001-03-20 Dan Winship <danw@ximian.com>
7611 * providers/imap/camel-imap-store.c
7612 (camel_imap_store_check_online): Function to check if the store is
7613 online and set an exception if not. Currently controlled by an
7614 environment variable, but eventually there will be both a global
7615 (session-level) setting and a per-store setting.
7616 (construct): Set up storage_path and base_url here rather than at
7618 (imap_auth_loop): Split out from imap_connect.
7619 (imap_setup_online): Split out from imap_connect. Do the
7620 post-authentication connection setup, and cache the results to
7622 (imap_setup_offline): Set up a CamelImapStore with information
7623 saved from a previous imap_setup_online.
7624 (imap_connect): If online, do connect_to_server(),
7625 imap_auth_loop(), and imap_setup_online(). Otherwise, do
7626 imap_setup_offline().
7627 (get_folder, get_folder_info): Add offline support.
7628 (create_folder, subscribe_folder, unsubscribe_folder): Disable
7629 these when offline (for now).
7631 * providers/imap/camel-imap-folder.c (camel_imap_folder_new):
7632 Remove the sync'ing-with-server stuff... it's done by
7633 camel_imap_folder_selected now, which only gets called if the
7635 (camel_imap_folder_selected): add the code removed from
7636 camel_imap_folder_new. Besides simplifying the folder_new and
7637 summary_new code, this also means now that we'll DTRT if a
7638 folder's UIDVALIDITY changes while we're connected. Also, when
7639 that happens, clear the message cache explicitly.
7640 (imap_refresh_info, imap_sync): These are no-ops when offline.
7641 (imap_expunge, imap_append_message, imap_copy_message_to,
7642 imap_search_by_expression): These don't yet work offline.
7643 (imap_get_message, camel_imap_folder_fetch_data): Return an error
7644 when trying to fetch a non-cached body part when we're offline.
7646 * providers/imap/camel-imap-summary.c (camel_imap_summary_new):
7647 Rewrite to not check the validity here. (We'll do it from
7648 camel_imap_folder_selected instead.)
7650 * providers/imap/camel-imap-command.c (camel_imap_command): Call
7651 camel_imap_folder_selected even when the selection is all we're
7652 doing, to match the changes in camel-imap-folder.c.
7654 * providers/imap/camel-imap-message-cache.c
7655 (camel_imap_message_cache_clear): New function to clear out a
7658 2001-03-19 Christopher James Lahey <clahey@ximian.com>
7660 * Makefile.am (INCLUDES): Added $(EXTRA_GNOME_CFLAGS)
7662 2001-03-19 Jeffrey Stedfast <fejj@ximian.com>
7664 * providers/pop3/camel-pop3-store.c (pop3_connect): Set the errbuf
7665 to NULL after freeing it? I don't think this should fix bug #1801
7666 but I guess it can't hurt.
7668 2001-03-18 Jeffrey Stedfast <fejj@ximian.com>
7670 * camel-remote-store.c (remote_recv_line): Protect against a
7671 possibly NULL exception.
7673 * camel-filter-driver.c (camel_filter_driver_filter_message):
7674 Document and modify to return a boolean value denoting whether or
7675 not errors occured during processing.
7676 (camel_filter_driver_filter_mbox): Same as above and also modified
7677 to check return codes of filter_message rather than relying only
7678 on whether or not the exception was set (as it's possible to pass
7679 in NULL for the exception).
7680 (camel_filter_driver_filter_folder): Same as above.
7682 * camel-mime-utils.c (header_param_list_format_append): Quote the
7683 param value if it contains whitespace as well.
7685 2001-03-17 Jeffrey Stedfast <fejj@ximian.com>
7687 * Makefile.am: Don't include system include dir.
7689 * camel.c: Use quotes around the nss.h include so it doesn't try
7690 to use the systen nss.h file.
7692 * camel-tcp-stream-ssl.c: Same here.
7694 2001-03-17 Not Zed <NotZed@Ximian.com>
7696 * providers/local/camel-maildir-summary.c (maildir_summary_sync):
7697 Modified patch from Dan Berger <dberger@ix.netcom.com> to re-check
7698 the maildir directory for new/updated messages at sync time.
7700 * camel-folder.c (camel_folder_ref_message_info): Implemented.
7701 (ref_message_info): And default implementation.
7703 * camel-folder.h: Added ref_message_info virtual method.
7705 2001-03-16 Not Zed <NotZed@Ximian.com>
7707 * camel-folder-thread.c
7708 (camel_folder_thread_messages_new_summary): New function to create
7709 a thread tree from a supplied summary array.
7710 (camel_folder_thread_messages_destroy): Handle thread trees
7711 generated by the above function properly.
7713 2001-03-16 Jeffrey Stedfast <fejj@ximian.com>
7715 * camel-private.h: Same.
7717 * camel-remote-store.h: Fixed #include to use <>'s instead of ""'s
7719 2001-03-16 Jeffrey Stedfast <fejj@ximian.com>
7721 * camel-tcp-stream-ssl.c (ssl_bad_cert): Print info about the
7722 issuer of the certificate.
7724 * providers/smtp/camel-smtp-transport.c (smtp_connect): Use
7725 camel_tcp_stream_get_socket().
7727 * camel-tcp-stream-openssl.c (stream_get_socket): Implemented.
7729 * camel-tcp-stream-ssl.c (stream_get_socket): Implemented.
7731 * camel-tcp-stream-raw.c (stream_get_socket): Implemented.
7733 * camel-tcp-stream.c (camel_tcp_stream_get_socket): New function.
7735 2001-03-16 Kjartan Maraas <kmaraas@gnome.org>
7737 * providers/pop3/camel-pop3-folder.c: Added #include <config.h>
7739 2001-03-16 Dan Winship <danw@ximian.com>
7741 * camel-mime-utils.c (header_msgid_generate): Don't use
7742 getdomainname: it's NIS crap, not DNS.
7744 2001-03-15 Jeffrey Stedfast <fejj@ximian.com>
7746 * camel.c (camel_init): Don't use the hardcoded cert db directory,
7747 use the one passed in.
7749 * camel-tcp-stream-ssl.c (ssl_get_client_auth): Wrote the default
7750 implementation. Not that we'll use this though, since this is the
7751 default implementation provided by NSS anyway. This more or less
7752 serves as a reference in case we want to change anything.
7753 (ssl_auth_cert): Same.
7754 (ssl_bad_cert): Changed the prompt string and free it when we're
7757 2001-03-15 Dan Winship <danw@ximian.com>
7759 First batch of disconnected IMAP-related stuff. This adds local
7760 caching of message parts, but NOT any actual disconnected support.
7761 (But it should speed up IMAP use.)
7763 * providers/imap/camel-imap-message-cache.c: New class for caching
7764 message data to disk, and removing it when it's no longer
7765 relevant. Will eventually also support merging message parts
7766 together to save on files. Or maybe using a db instead of files?
7768 * providers/imap/camel-imap-private.h: Add a cache_lock to
7769 CamelImapFolderPrivate. This lock must be recursive, so make both
7770 locks EMutexes rather than GMutex.
7772 * providers/imap/camel-imap-folder.c (parse_fetch_response): "The
7773 only FETCH response parser you need!" Replaces the various
7774 almost-correct bits of code formerly scattered throughout this
7775 file with a single fully-correct function that can handle any
7776 FETCH response at any time, so we don't get confused by seeing a
7777 flags update when we were only expecting a message body, etc.
7778 (camel_imap_folder_fetch_data): FETCH a message body part either
7779 from the cache or the server
7780 (camel_imap_folder_changed): Remove expunged messages from the
7782 (camel_imap_folder_new): Change to take a directory instead of a
7783 summary file name. Create a CamelImapMessageCache for the folder.
7784 (imap_finalize): Unref the message cache.
7785 (camel_imap_folder_selected, imap_rescan, get_content,
7786 get_message, imap_get_message, imap_update_summary): Redone a
7787 bunch to use parse_fetch_data, CamelImapMessageCache, etc.
7789 * providers/imap/camel-imap-store.c (get_folder): Pass directory
7790 name to camel_imap_folder_new, not summary filename. Use
7791 e_path_to_physical to generate a path with /subfolders/ inserted
7792 between directory components.
7794 * providers/imap/camel-imap-wrapper.c (camel_imap_wrapper_new):
7795 Call camel_imap_folder_fetch_data (with cache_only TRUE) and if
7796 the data is cached, return an online datawrapper rather than an
7798 (write_to_stream): Use camel_imap_folder_fetch_data (with
7799 cache_only FALSE) here too
7801 * providers/imap/camel-imap-utils.c (imap_skip_list): Renamed from
7802 skip_list and made non-static.
7804 2001-03-15 Jeffrey Stedfast <fejj@ximian.com>
7806 * camel-tcp-stream-ssl.h: Uninclude prnetdb.h since it's not
7809 * providers/smtp/camel-smtp-transport.c: #include prnetdb.h here
7810 instead of making camel-tcp-stream-ssl.h include it. Prevents some
7813 * providers/smtp/Makefile.am: Include the NSPR_CFLAGS and
7816 2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
7818 * providers/smtp/camel-smtp-transport.c (smtp_connect): Update for
7819 using CamelTcpStreams and also for using SSL.
7821 * providers/smtp/libcamelsmtp.urls: defined "ssmtp"
7823 * providers/smtp/camel-smtp-provider.c: Defined the Secure SMTP
7825 (camel_provider_module_init): Register the Secure SMTP provider.
7827 2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
7829 * providers/imap/camel-imap-store.c (imap_connect): Check for
7830 "simap" instead of "imaps".
7832 * providers/pop3/camel-pop3-store.c (pop3_connect): Change the
7833 port to be 995 for spop.
7835 * providers/pop3/libcamelpop3.urls: Change to "spop".
7837 * providers/imap/libcamelimap.urls: Change "imaps" to "simap" to
7838 correspond to /etc/services.
7840 2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
7842 * providers/pop3/camel-pop3-store.c (pop3_connect): Check to see
7843 if we are using "pops" and then set the appropriate SSL settings.
7845 * providers/pop3/libcamelpop3.urls: Add "pops"
7847 * providers/pop3/camel-pop3-provider.c: Defined the pops provider.
7848 (camel_provider_module_init): Register the pops provider.
7850 2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
7852 * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_new): Ya know what?
7853 Lets not ref the service because otherwise we'll start having the
7854 same problems we had back with vtrash. Besides, since the store
7855 owns the stream, it's not like the store is going anywhere without
7857 (camel_tcp_stream_ssl_finalize): No need to unref the service.
7859 2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
7861 * camel-remote-store.c (remote_connect): Pass the service into the
7862 SSL stream, not the session.
7864 * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_init): Set the
7866 (camel_tcp_stream_ssl_finalize): Unref the service.
7867 (camel_tcp_stream_ssl_new): Takes a CamelService arg now rather
7868 than a CamelSession arg.
7870 2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
7872 * camel.c (camel_init): So it turns out that NSS_Init *isn't*
7873 idempotent, so we have to protect against initializing it more
7874 than once(contrary to what their design specs suggest).
7876 * camel-session.c (camel_session_get_service): Use
7877 camel_exception_is_set() - Makes no difference but it's more
7878 consistant with how we normally do it.
7880 * camel-provider.h (CAMEL_URL_ALLOW_SSL): We don't need this.
7882 * providers/imap/camel-imap-provider.c: Define the imaps provider.
7883 (camel_provider_module_init): Register the imaps provider.
7885 * camel-provider.c (camel_provider_init): Only add the protocol to
7886 the hash table if it's non empty. Also, g_strdup() the filename
7887 into the hash table.
7889 * providers/imap/camel-imap-store.c (camel_imap_store_init): Eek!
7890 So the service's URL isn't set until after this is
7891 initialized. This means we can't check for SSL here.
7892 (imap_connect): Set the SSL options here instead.
7894 2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
7896 * camel-tcp-stream-ssl.c: Numerous fixes to get it to build
7897 correctly with NSS enabled.
7899 * camel-remote-store.c (remote_connect): Pass in the session and
7900 expected host args, oops.
7902 * camel-provider.h (CAMEL_URL_ALLOW_SSL): Defined.
7904 * providers/imap/camel-imap-store.c (camel_imap_store_init): Check
7905 to see if we are supposed to use SSL and set the options
7907 (imap_connect): Return FALSE here instead of NULL.
7909 * providers/imap/camel-imap-provider.c: Add CAMEL_URL_ALLOW_SSL.
7911 * providers/imap/libcamelimap.urls: Add "imaps" which is the
7912 protocol for Secure IMAP.
7914 2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
7916 * camel-tcp-stream-openssl.[c,h]: Added
7918 * Makefile.am: Added camel-tcp-stream-openssl.[c,h] to the build.
7920 * camel-types.h: Added CamelTcpStreamSSL and CamelTcpStreamOpenSSL
7922 2001-03-14 Not Zed <NotZed@Ximian.com>
7924 * camel-mime-filter-charset.c (filter, complete): re-constify
7925 inbuf, to remove a warning.
7927 * camel-mime-parser.c (folder_scan_step): When we're out of data,
7928 run the filter_complete. For some reason the logic that was there
7929 was never being run, always try it now, i think it was to work
7930 around a buggy filter, rather than fix it the right way.
7932 * camel-folder-summary.c (summary_build_content_info): If indexing
7933 html parts, use the html filter to convert it to some indexable
7935 (summary_build_content_info): Reset the filters before adding them
7936 back to the stream, if they get re-used in a given instance
7939 * Makefile.am (libcamelinclude_HEADERS): Added
7940 camel-mime-filter-html.[ch].
7941 (INCLUDES): Added xml clags
7943 2001-03-05 Not Zed <NotZed@Ximian.com>
7945 * camel-folder-search.c (camel_folder_search_class_init): Setup a
7946 new function, "uid" which matches uids.
7947 (search_uid): Implement the "match uid" command.
7949 2001-03-13 Jeffrey Stedfast <fejj@ximian.com>
7951 * camel-mime-utils.c: Check for a new type of mailing list header.
7953 2001-03-13 Jeffrey Stedfast <fejj@ximian.com>
7955 * camel-tcp-stream-raw.c (stream_read): Made cancellable.
7956 (stream_write): Same.
7957 (stream_connect): Removed checks for DIVINE_INTERVENTION as the
7960 * camel-tcp-stream-ssl.c (stream_write): get rid of 'w' as it
7961 wasn't really needed.
7962 (set_errno): New function to set errno based on the NSPR error
7964 (stream_read): If an error occured, call set_errno().
7965 (stream_write): Same.
7967 2001-03-13 Jeffrey Stedfast <fejj@ximian.com>
7969 * Makefile.am: Added camel-tcp-stream-ssl to the build.
7971 * camel-remote-store.h: Add a use_ssl member to the
7972 CamelRemoteStore object.
7974 2001-03-13 Jeffrey Stedfast <fejj@ximian.com>
7976 * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_get_type):
7977 Oops. Make this a subclass of CamelTcpStream, not CamelStream.
7979 * camel-types.h: Add the defs for CamelTcpStream and
7982 * Makefile.am: Add camel-tcp-stream and camel-tcp-stream-raw to
7985 * camel-remote-store.c (remote_connect): Update to use
7988 * camel-tcp-stream-raw.c (stream_connect): Made cancellable by
7989 copying the currently used code in camel-remote-store.c.
7990 (stream_setsockopt): Oops, flags = fcntl (..., GET_FL);
7991 (camel_tcp_stream_raw_get_type): Oops. Make this a subclass of
7992 CamelTcpStream, not CamelStream.
7994 2001-03-13 Jeffrey Stedfast <fejj@ximian.com>
7996 * camel.c (camel_init): Since all of the Mozilla libs (including
7997 NSPR and NSS) correctly handle reinitializations, we might as well
7998 init both NSPR and NSS in camel_init so we can be sure of that
7999 these libs have been initialized.
8000 (camel_shutdown): New function to call the NSS cleanup stuff.
8002 2001-03-13 Jeffrey Stedfast <fejj@ximian.com>
8004 * camel-folder.c (camel_folder_copy_message_to): Don't allow the
8005 user to copy a message to or from the vtrash folder. Set an
8006 exception if they try.
8007 (camel_folder_move_message_to): This one is a bit more
8008 complicated: 1) If the user tried to move a message from the
8009 vtrash into the original folder, just undelete the message. 2) If
8010 the user tries to move the message to the vtrash folder, then just
8011 mark the message as deleted. 3) If the user tries to move the
8012 message from the vTrash to a folder other than the original, use
8013 the original folder as the source. As another optimization, I've
8014 made it so that if the user tries to move a message to the same
8016 (move_message_to): Unset the deleted flag before moving (assuming
8018 (copy_message_to): Same.
8020 * camel-vee-folder.c (camel_vee_folder_get_message_folder): New
8021 convenience function to get the folder from which the message uid
8024 2001-03-13 Dan Winship <danw@ximian.com>
8026 * providers/imap/camel-imap-store.c (imap_connect): When trying
8027 again after a failed password attempt, check if the connection got
8028 dropped (which Courier will do) and deal accordingly.
8030 * providers/sendmail/camel-sendmail-transport.c (sendmail_send_to,
8031 sendmail_send): More fixing for exim: It can't deal with "-tif",
8032 you need to say "-t -i -f".
8034 2001-03-12 Jeffrey Stedfast <fejj@ximian.com>
8036 * camel-store.c (init_trash): Rename the folder to "Trash" and
8039 2001-03-09 Jeffrey Stedfast <fejj@ximian.com>
8041 * camel-tcp-stream-ssl.h: Comment out everything unless HAVE_NSS
8044 * camel-tcp-stream-ssl.c (stream_read): Don't use errno, use
8045 nspr's error code stuff.
8046 (stream_write): Same.
8048 2001-03-09 Jeffrey Stedfast <fejj@ximian.com>
8050 * camel-session.c (camel_session_query_authenticator): Created a
8051 new mode (CAMEL_AUTHENTICATOR_ACCEPT) which is a Yes/No prompt to
8052 the user. This will be needed by the SSL/TLS code to come. Also
8053 changed the return value to a gpointer rather than a char* to
8054 allow the returning of TRUE/FALSE values.
8056 * camel.c: Wrap stuff with HAVE_NSS
8058 2001-03-09 Dan Winship <danw@ximian.com>
8060 * providers/sendmail/camel-sendmail-transport.c (sendmail_send,
8061 sendmail_send_to): Remove the "-U" for now, because it breaks
8062 exim's "sendmail" wrapper. (And it doesn't actually do all that
8063 much to sendmail's behavior, and it was working fine before
8066 * camel-mime-utils.c (header_fold): Fix a bug that could make this
8067 walk off the end of a string. (The bug has been there since
8068 December... maybe this will fix some unreproduceable crashes?)
8070 2001-03-08 Jeffrey Stedfast <fejj@ximian.com>
8072 * camel-store.c (camel_store_get_folder): Changes so that the
8073 folder gets added to the vtrash reguardless of whether or not the
8074 store is holding it's own folder lookup hash.
8075 (init_trash): Oops, lets try locking the cache before we go and
8076 add all the cached folders to the vtrash.
8078 2001-03-08 Jeffrey Stedfast <fejj@ximian.com>
8079 These fixes make it so that the CamelStore does not actually hold
8080 a ref on it's vTrash folder. The vTrash folder is now created ONLY
8081 when it is requested. This solves the problem of not being able to
8082 unref a Store and have it disconnect/finalize like we expect it to.
8084 * camel-store.c (init_trash): When we create the vtrash, add all
8085 previously opened folders to it and hook on to the finalize event
8086 so that we can then set the store->vtrash to NULL.
8087 (get_trash): If a vtrash folder for the store doesn't exist,
8088 init_trash() and then try.
8089 (construct): No longer need this.
8090 (camel_store_class_init): Don't override the construct method.
8091 (camel_store_finalize): We no longer hold a ref on the vtrash so
8094 2001-03-07 Jeffrey Stedfast <fejj@ximian.com>
8096 * providers/pop3/camel-pop3-store.c (init_trash): Implement.
8097 (get_trash): Implement.
8098 (camel_pop3_store_class_init): Override the default init_trash and
8099 get_trash virtual functions. Hopefully this should fix the problem
8100 of pop3 sotre's not disconnecting after the send&recv code
8101 finishes downloading mail.
8103 Wonder if I should override the default implementation for the
8104 mbox, mh, and maildir too?
8106 2001-03-07 Dan Winship <danw@ximian.com>
8108 * camel-remote-store.c (camel_remote_store_connected): Return the
8109 return value of camel_service_connect rather than returning
8110 !camel_exception_is_set(), since that will be wrong if ex==NULL...
8111 Fixes a crash in the IMAP keepalive code, but this same problem
8112 probably exists in other places too...
8113 (remote_recv_line): Fix another problem...
8115 * providers/local/camel-mbox-provider.c:
8116 * providers/vee/.cvsignore:
8117 * providers/vee/libcamelvee.urls: Remove some unused stuff
8119 2001-03-06 Jeffrey Stedfast <fejj@ximian.com>
8121 * camel-sasl-digest-md5.c (compute_response): Redone so as to save
8122 on memory allocations and speed.
8124 2001-03-05 Jeffrey Stedfast <fejj@ximian.com>
8126 * camel-sasl-plain.c (plain_challenge): Don't return NULL if the
8127 token is non-NULL. This is why:
8129 sending : AUTH PLAIN
8130 received: 334 ok. go on. <-- this is why
8131 sending : ZGZPaQpAZ214Lm5ldBBnb29jYXI=
8132 received: 235 {mp005-rz3} go ahead
8134 * camel-sasl.c (camel_sasl_authtype): Add the PLAIN type here.
8135 (camel_sasl_authtype_list): And here too.
8137 * camel-sasl-plain.c: Initialize the camel_sasl_plain_authtype.
8139 * camel-sasl-plain.h: extern the camel_sasl_plain_authtype.
8141 2001-03-05 Jeffrey Stedfast <fejj@ximian.com>
8143 * providers/imap/camel-imap-store.c (imap_connect): i18n'd some
8146 * providers/smtp/camel-smtp-transport.c (smtp_connect): Keep
8147 trying to authenticate until either we succeed or until the user
8150 2001-03-04 Jeffrey Stedfast <fejj@ximian.com>
8152 * camel-mime-utils.c: Wrote a new version of header_fold() that
8153 takes a 'force' option and uses another new function called
8154 header_fold_next_space() in place of strchr(inptr, ' ') to get the
8155 next whitespace char. The idea of header_fold_next_space() is to
8156 not treat spaces between a set of quotes as a space - this way it
8157 will be possible to fold (for example) the Content-Type MIME
8158 header without worrying about breaking up a boundary string.
8159 Note: This code is #if 0'd out until Zucchi approves of the patch.
8160 Another Note: We will probably still want to use the "don't fold
8161 this header" hash lookup for headers like the Message-Id and
8162 possibly a few others.
8164 2001-03-04 Jeffrey Stedfast <fejj@ximian.com>
8166 * camel-internet-address.c
8167 (camel_internet_address_encode_address): Make sure there is a
8168 space between the name and the address tokens.
8170 * camel-mime-utils.c (rfc2047_decode_word): encoded string
8171 segments need to be at least 8 chars (7 doesn't leave room for an
8172 ecoding value. To be more realistic, even 8 chars isn't enough as
8173 this assumes there is no charset nor any encoded text. If the
8174 encoding value is not 'Q' or 'B', then return NULL. This fixes bug
8177 2001-03-03 Not Zed <NotZed@Ximian.com>
8179 * camel-vee-folder.c (vee_folder_remove_folder): New function to
8180 remove a folder from a vfolder.
8181 (camel_vee_folder_remove_folder): New public function to remove a
8182 folder from a vfolder.
8184 2001-03-02 Jeffrey Stedfast <fejj@ximian.com>
8186 * providers/smtp/camel-smtp-provider.c: Doh! Set the
8187 CAMEL_URL_ALLOW_AUTH flag.
8189 * providers/smtp/camel-smtp-transport.c (get_smtp_error_string):
8190 Updated with the extended AUTH return codes.
8192 2001-03-02 Jeffrey Stedfast <fejj@ximian.com>
8194 * providers/imap/camel-imap-store.c (try_auth): Don't forget to
8195 unref the SASL object.
8197 * providers/smtp/camel-smtp-transport.c (query_auth_types):
8199 (smtp_auth): Implemented.
8200 (smtp_helo): Don't bother parsing the authtypes if we already have
8202 (smtp_connect): call smtp_auth() here if we found any authtypes.
8203 (smtp_disconnect): Updated as I now use a hash table for the
8204 supported authtypes rather than a linked list.
8205 (esmtp_get_authtypes): modify to use a hash table instead of a
8206 linked list and also use isspace() rather than == ' '.
8208 2001-03-02 Dan Winship <danw@ximian.com>
8210 * providers/sendmail/camel-sendmail-transport.c (sendmail_send_to,
8211 sendmail_send): Use "-f" to set the envelope from address so
8212 bounces go to the right place. Also, pass "-U" since the man page
8213 says we're supposed to...
8215 2001-03-01 Jeffrey Stedfast <fejj@ximian.com>
8217 * camel-sasl.c: #include "camel-sasl-digest-md5.h"
8218 (camel_sasl_authtype_list): add DIGEST-MD5 stuff here.
8219 (camel_sasl_authtype): And here too.
8220 (camel_sasl_new): And here...
8222 * camel-sasl-digest-md5.[c,h]: new SASL class for DIGEST-MD5 (has
8223 been tested and proven to work).
8225 2001-03-01 Dan Winship <danw@ximian.com>
8227 * camel-sasl.c (camel_sasl_challenge): Take a GByteArray as input
8228 as well. Comment that you can pass %NULL for @token to get the
8229 initial auth data for mechanisms that are client-initiated.
8230 (camel_sasl_challenge_base64): Convenience function for protocols
8231 that use base64-encoded SASL.
8232 (camel_sasl_authenticated): Implement this... (it was prototyped
8234 (camel_sasl_new): Function to take a service name, a mechanism
8235 name, and a CamelService, and return a CamelSasl for it.
8236 (camel_sasl_authtype, camel_sasl_authtype_list): Functions to
8237 return CamelServiceAuthType information about SASL mechanisms, to
8238 allow providers to deal with them generically.
8240 * camel-sasl-anonymous.c, camel-sasl-plain.c: Update/simplify for
8241 CamelSasl changes. Both of these are single-round
8242 (client-initiated) mechanisms, so they don't need to keep state.
8243 (camel_sasl_plain_new): Removed; use camel_sasl_new instead.
8244 (Can't get rid of camel_sasl_anonymous_new though...)
8246 * camel-sasl-cram-md5.c: Update/simplify for CamelSasl changes.
8247 (camel_sasl_cram_md5_new): Removed; use camel_sasl_new instead.
8248 (cram_md5_challenge): Use md5_get_digest where possible, and
8249 various other minor simplifications. CRAM-MD5 only has a single
8250 round, so there's no need to keep track of state. This code is now
8251 tested (against Cyrus IMAPd) and known to work.
8253 * camel-sasl-kerberos4.h: Update/simplify for CamelSasl changes.
8254 Make only a single #ifdef HAVE_KRB4. Remove stuff from priv that
8255 isn't needed between rounds.
8256 (camel_sasl_kerberos4_new): Removed; use camel_sasl_new instead
8257 (krb4_challenge): Fix up the logic I broke in my previous "at
8258 least make it compile" fixes, update to match other changes, and
8259 remove IMAP-isms that shouldn't be in the generic code. This still
8260 isn't tested, because we're stuck behind a NAT right now...
8262 * providers/imap/camel-imap-store.c: Add an "authtypes" hash table
8263 to CamelImapStore recording the supported authtypes.
8264 (connect_to_server): Record supported authtypes in the authtypes
8265 hash rather than the capabilities bitmask, since now the IMAP code
8266 is no longer responsible for keeping track of which authtypes we
8268 (query_auth_types): Use camel_sasl_authtype_list to get the
8269 SASL-supported authtypes.
8270 (try_auth): New function to try a SASL auth mechanism. Sort of
8271 formerly imap_try_kerberos_v4_auth.
8272 (imap_connect): Get rid of the krb4-specific bits and genericize
8273 them for any SASL authtype.
8275 * providers/imap/Makefile.am: Remove camel-imap-auth.[ch] (moved
8276 into camel-imap-store.c since it's now constant size) and the
8277 KRB4_CFLAGS and KRB4_LDFLAGS references.
8279 2001-03-01 Jeffrey Stedfast <fejj@ximian.com>
8281 * camel-sasl-anonymous.c (anon_challenge): Don't base64 encode the
8282 data, leave that up to the provider to do if it needs to. Also
8283 save on some memory allocations and stuff.
8285 * camel-sasl-cram-md5.c (cram_md5_challenge): Same here. Also get
8286 rid of the need for the temp buf as we can just write it to the
8289 2001-03-02 Not Zed <NotZed@Ximian.com>
8291 * camel-mime-utils.c (rfc2047_encode_word, rfc2047_decode_word):
8292 Reconstify variables to match iconv.
8294 * camel-search-private.c (camel_ustrstrcase): Change some
8295 assertions back into valid returns.
8297 2001-03-01 Dan Winship <danw@ximian.com>
8299 * Makefile.am (libcamel_la_LIBADD, INCLUDES): camel depends on
8300 krb4 now (where available), for camel-sasl-kerberos4.c
8302 * camel-sasl-kerberos4.[ch]: Make this at least compile. Dunno if
8305 2001-03-01 Peter Williams <peterw@ximian.com>
8307 * camel-url.c (camel_url_new): Assert url_string != NULL.
8309 2001-02-28 Jeffrey Stedfast <fejj@ximian.com>
8311 * Makefile.am: Added camel-sasl-anonymous.[c,h] to the build.
8313 * camel-sasl-anonymous.[c,h]: new SASL class for ANONYMOUS
8315 * camel-sasl-plain.c (plain_challenge): Oops, have a state for
8316 setting sasl->authenticated = TRUE;
8318 * camel-sasl-cram-md5.c (cram_md5_challenge): Same here.
8320 2001-02-28 Jeffrey Stedfast <fejj@ximian.com>
8322 * camel-mime-utils.c (header_decode_date): A fix for broken
8323 mailers that send 2-digit years (ie "Wed, 28 Feb 01
8324 04:59:41"). Fixes bug #1633.
8326 * camel-filter-driver.c (camel_filter_driver_filter_folder): Check
8327 to make sure message isn't NULL.
8329 2001-02-28 Dan Winship <danw@ximian.com>
8331 * camel-remote-store.c (remote_recv_line): If we get back 0 bytes
8332 from camel_stream_buffer_gets, that means the socket got
8333 disconnected, so set an exception. (Noticed because of a message
8334 that crashes our IMAP server when you try to look at it. :)
8336 2001-02-28 Jeffrey Stedfast <fejj@ximian.com>
8338 * Makefile.am: Added camel-sasl*.[c,h] to the build.
8340 * camel-sasl.[c,h]: new "abstract" SASL class
8342 * camel-sasl-kerberos4.[c,h]: new SASL class for KERBEROS_V4
8344 * camel-sasl-cram-md5.[c,h]: new SASL class for CRAM-MD5
8346 * camel-sasl-plain.[c,h]: new SASL class for PLAIN
8348 * providers/imap/camel-imap-auth.c: Removed the base64 functions.
8350 * camel-mime-utils.c (base64_encode_simple): Moved here from
8352 (base64_decode_simple): Same.
8354 2001-02-26 Dan Winship <danw@ximian.com>
8356 * providers/imap/camel-imap-folder.c (imap_sync): Group messages
8357 into sets with the same flags and use the IMAP message set
8358 notation rather than doing a separate STORE FLAGS for each one.
8359 This cuts the network traffic down to just a handful of commands
8360 per sync rather than one per changed message. Removed the progress
8361 notification stuff since it's no longer meaningful and should
8362 hopefully be unnecessary.
8363 (imap_copy_message_to): move the former sync_message function
8364 into here, since it's no longer shared with imap_sync.
8366 2001-02-26 Jeffrey Stedfast <fejj@ximian.com>
8368 * camel-mime-utils.c: Made thread-safe and moved to above the test
8371 * camel-mime-message.c (camel_mime_message_init): Set the
8373 (camel_mime_message_finalize): Free the message_id.
8374 (camel_mime_message_set_message_id): New function to set the
8376 (camel_mime_message_get_message_id): New function to get the
8378 (process_header): Decode the message-id.
8380 2001-02-24 Jeffrey Stedfast <fejj@ximian.com>
8382 * camel-store.c (construct): init the vTrash folder here instead
8384 (camel_store_class_init): init service_class->construct.
8385 (camel_store_finalize): We only need to unref the vtrash folder.
8386 (init_trash): don't create a vstore since we don't need it.
8388 2001-02-23 Jeffrey Stedfast <fejj@ximian.com>
8390 * camel-store.c (camel_store_class_init): init get_trash and
8392 (camel_store_init): call the virtual init_trash function.
8393 (camel_store_finalize): unref the vtrash folder/store if present.
8394 (camel_store_get_folder): Add the new folder to the vtrash
8396 (init_trash): default implementation of init_trash.
8397 (get_trash): default implementation of get_trash.
8399 * camel-vee-store.c (vee_init_trash): No-op.
8400 (vee_get_trash): return NULL
8402 2001-02-23 Not Zed <NotZed@Ximian.com>
8404 * camel-folder-summary.c (camel_message_info_new_from_header):
8405 Doh, cut and paste problem, use mlist not cc.
8407 * camel-folder.c (move_message_to):
8408 (copy_message_to): If the source folder doesn't support a
8409 summary, dont try and get the message info from it.
8411 * camel-filter-search.c (check_header): Implement a pseudo-header
8412 "x-camel-mlist" which just looks up in the message info for a
8415 * camel-folder-search.c (check_header): Add pseudo-header
8416 "x-camel-mlist" which can be used to match on mailing list.
8418 * providers/imap/camel-imap-folder.c (imap_sync): Add some
8419 internal progress reporting.
8420 (imap_rescan): Do some progress reporting.
8422 * camel-mime-part.c (init_header_name_table): Add the message-id
8423 to the formatted table, so we dont try and wrap it, and break it.
8425 2001-02-22 Jeffrey Stedfast <fejj@ximian.com>
8427 * camel-folder.h: Remove the 'FIXME: remove because this isn't
8428 required...' comment for copy_message_to since we now need and
8429 cherish its existance in the filter-driver code ;-)
8431 * camel-filter-driver.c (camel_filter_driver_filter_message): Now
8432 takes a UID and CamelFolder arguments (which can be NULL) to allow
8433 for possible optimizations when copying messages between folders
8435 (camel_filter_driver_filter_mbox): Updated (passes NULL for both
8436 since this case can't be optimized anyway).
8437 (camel_filter_driver_filter_folder): Updated to pass in the uid
8438 and folder of the message.
8440 2001-02-22 Dan Winship <danw@ximian.com>
8442 * providers/imap/camel-imap-summary.h (CAMEL_IMAP_SERVER_FLAGS):
8443 #define this as the set of all IMAP system flags
8445 * providers/imap/camel-imap-folder.c (sync_message): after syncing
8446 flags, set server_flags to (flags & CAMEL_IMAP_SERVER_FLAGS)
8447 rather than just "flags", since any other flags won't have been
8448 synced. Prevents the CAMEL_MESSAGE_ATTACHMENTS flag from getting
8451 2001-02-22 Not Zed <NotZed@Ximian.com>
8453 * providers/vee/*: Removed all files.
8455 * camel-private.h: Move camel-vee-private.h stuff into here.
8457 * camel-session.c: Move the vee_provider here, and initialise it
8458 always as part of a session. The vfolder provider is always
8461 * providers/Makefile.am: Remove "vee" from the build list, now
8462 built as part of the main library.
8464 * Makefile.am (libcamelinclude_HEADERS):
8465 (libcamel_la_SOURCES): Added camel-vee-store.[ch],
8466 camel-vee-folder.[ch].
8468 * providers/vee/camel-vee-folder.c (vee_folder_build): Removed,
8470 (camel_vee_folder_new): Removed call to build_folder.
8471 (vee_get_message): Dont try and free the mi if we didn't get it.
8473 * camel-folder.c (camel_folder_change_info_new): Added a hash
8474 table of what we have in the lists, plus moved private things into
8476 (camel_folder_change_info_add_source): Fixed up private accesses.
8477 (camel_folder_change_info_add_uid): Changed to use a hashtable to
8478 see if we already have the uid, etc.
8479 (camel_folder_change_info_remove_uid): Similar.
8480 (change_info_remove): Likewise.
8481 (camel_folder_change_info_clear): Fixes for privatisations.
8482 (camel_folder_change_info_free): "
8484 2001-02-21 Dan Winship <danw@ximian.com>
8486 * providers/imap/camel-imap-folder.c (fetch_medium): Fixes for
8487 IMAP4-pre-rev1 from Torsten Schulz.
8489 2001-02-20 Not Zed <NotZed@Ximian.com>
8491 * camel-mime-utils.c (mail_list_magic): Take the ^Header: part out
8492 of the expression, since we look that up ourselves.
8493 (header_raw_check_mailing_list): When getting the match, get match
8494 1, not match 0, we dont want the full string match.
8496 * camel-folder-summary.c (CAMEL_FOLDER_SUMMARY_VERSION): Bumped
8498 (message_info_new): Extract the mlist info from the headers.
8499 (message_info_load): Load mlist from summary.
8500 (message_info_save): Save mlist to summary.
8501 (message_info_free): Save the mlist entry.
8502 (camel_message_info_new_from_header): Extract mailing list header.
8503 (camel_message_info_dup_to): Copy the mlist entry.
8504 (camel_message_info_free): Free mlist.
8505 (message_info_dump): Dump the mlist.
8507 * camel-folder-summary.h: Add an mlist (mailing list) string to
8510 2001-02-19 Not Zed <NotZed@Ximian.com>
8512 * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Added
8514 (message_changed): Add support for the auto-update flag, in which
8515 case we auto-match the content as it changes.
8516 (camel_vee_folder_init): Remoive "DYNAMIC" optionality
8517 (camel_vee_folder_finalise): "
8518 (vee_expunge): As we expunge folders, re-sync their content by
8519 rerunning the query.
8521 * providers/vee/camel-vee-store.c (vee_get_folder): Pass flags to
8524 2001-02-18 Not Zed <NotZed@Ximian.com>
8526 * providers/vee/Makefile.am (noinst_HEADERS): Added
8527 camel-vee-private.h.
8529 * providers/vee/camel-vee-private.h: New file to add locking stuff
8532 * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Add
8533 locking around unmatched setup.
8534 (camel_vee_folder_init): Setup lock.
8535 (camel_vee_folder_finalise): Free locks.
8536 (folder_changed): Add locking.
8537 (unmatched_finalise): "
8538 (message_changed): "
8539 (vee_folder_build): "
8541 2001-02-17 Not Zed <NotZed@Ximian.com>
8543 * providers/vee/camel-vee-folder.c (vee_folder_add): Check uid
8544 doesn't exist before adding it.
8546 2001-02-16 Not Zed <NotZed@Ximian.com>
8548 * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Create
8549 a new virtual virtual folder UNMATCHED, to store all messages that
8550 dont match other vfolders.
8551 (unmatched_folder_changed): When a vfolder issues a changed event,
8552 use its info to update the unmatched folder info.
8553 (unmatched_finalise): When a vfolder is finalised, remove any uids
8554 it has as if we had a removed event for it.
8556 2001-02-16 Jeffrey Stedfast <fejj@ximian.com>
8558 * camel-filter-driver.c (camel_filter_driver_finalise): Thaw the
8560 (camel_filter_driver_set_default_folder): Thaw the defaultfolder
8561 we're about to replace, and freeze the new defaultfolder.
8563 2001-02-15 Jeffrey Stedfast <fejj@ximian.com>
8565 * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Emit
8566 the folder_created signal here.
8568 * providers/local/camel-local-folder.c
8569 (camel_local_folder_construct): Emit the folder_created signal.
8571 * providers/local/camel-local-store.c (delete_folder): On error,
8572 free the 'name' string so we don't leak. Also emit the
8573 folder_deleted signal.
8575 * providers/imap/camel-imap-store.c (subscribe_folder): Emit the
8576 folder_created signal.
8577 (unsubscribe_folder): Emit the folder_deleted signal.
8579 * camel-store.c (camel_store_class_init): Added folder_created and
8580 folder_deleted signal defs.
8582 2001-02-15 Dan Winship <danw@ximian.com>
8584 * camel-folder-thread.c (container_parent_child): Deal with
8585 out-of-order References headers so they don't cause messages to
8586 disappear in threaded view.
8588 * providers/imap/camel-imap-folder.c (fetch_medium): IMAP4
8589 (pre-rev1) doesn't allow BODY.PEEK[], so use RFC822.PEEK instead
8592 2001-02-14 Christopher James Lahey <clahey@ximian.com>
8594 * camel-mime-filter-charset.c (complete, filter),
8595 camel-mime-utils.c (rfc2047_decode_word, rfc2047_encode_word):
8596 Changed this code to match the glibc iconv signature.
8598 2001-02-14 Dan Winship <danw@ximian.com>
8600 * camel-store.c (camel_store_create_folder): New method to create
8601 a folder when you don't know its full name.
8603 * providers/imap/camel-imap-store.c (create_folder): Implement.
8604 (create_folder): Oops, and fix bug involving namespaces
8606 2001-02-12 Not Zed <NotZed@Ximian.com>
8608 * camel-mime-part.c (init_header_name_table): Add address headers
8609 to list that we dont fold when writing. The are properly
8610 formatted as we build them.
8611 (write_to_stream): DOH, lookup the header name in the formatted
8612 hash table, not the value, that would never have worked.
8614 * camel-internet-address.c
8615 (camel_internet_address_encode_address): Changed to take a
8616 parameter saying how much we've printed so far. We now fold the
8617 header as we format it. We dont fold addresses, even if they are
8618 too long, we simply put them on another line by themselves: this
8619 should make the result more parsable by mailers that can't handle
8620 split up addresses (which are legal).
8621 (internet_encode): Fix for changes to above.
8623 2001-02-12 Jeffrey Stedfast <fejj@ximian.com>
8625 * providers/local/camel-local-provider.c: mbox, mh, and maildir
8626 camel-url's need absolute paths.
8628 * camel-provider.h (CAMEL_URL_PATH_IS_ABSOLUTE): New flaggy flag.
8630 2001-02-08 Dan Winship <danw@ximian.com>
8632 * camel-store.c: Rewrite a bunch. Replace the existing folder
8633 cache stuff with much simpler code that still handles all the
8634 existing cases. Now the folder hash table is always created by the
8635 base class, using hash and compare functions provided by the class
8636 implementation. (If they are set to NULL, CamelStore won't cache
8637 folders.) lookup_folder, cache_folder, and uncache_folder are no
8638 longer class methods, and get_name is gone completely.
8640 (camel_store_get_inbox): Renamed from
8641 camel_store_get_default_folder, since that wasn't being used, and
8642 this is what we actually need.
8643 (camel_store_get_root_folder): Removed, since it's not needed for
8644 anything given get_folder_info.
8646 * camel-remote-store.c:
8647 * providers/local/camel-local-store.c:
8648 * providers/local/camel-mbox-store.c:
8649 * providers/local/camel-mh-store.c:
8650 * providers/local/camel-maildir-store.c:
8651 * providers/nntp/camel-nntp-store.c:
8652 * providers/pop3/camel-pop3-store.c:
8653 * providers/vee/camel-vee-store.c: Minor updates for CamelStore
8656 * providers/imap/camel-imap-store.c (camel_imap_store_class_init):
8657 Update for CamelStore changes.
8658 (hash_folder_name, compare_folder_name): treat INBOX
8659 case-insensitively, otherwise use g_str_hash and g_str_equal.
8661 * camel-service.c (camel_service_construct): Remove
8662 camel_service_new and create camel_service_construct (as a class
8663 method) in its place.
8665 * camel-session.c (camel_session_get_service): Use
8666 camel_object_new and camel_service_construct to replace
8669 * providers/local/camel-local-store.c (construct): Append a '/' to
8670 the URL path if it doesn't end with one
8672 2001-01-31 Jeffrey Stedfast <fejj@helixcode.com>
8674 * camel-tcp-stream-ssl.c: Oops, include the camel-tcp-stream-ssl
8675 header instead of the raw one.
8677 2001-02-07 Not Zed <NotZed@Ximian.com>
8679 * camel-operation.c (camel_operation_start): Changed to push the
8680 operation into a status stack.
8681 (camel_operation_progress): Changed to only accept % complete.
8682 (camel_operation_reset): Free status stack as well.
8684 * providers/pop3/camel-pop3-folder.c (pop3_get_message): Get the
8685 octect count from the return line, and pass it to
8686 get_additional_data().
8687 (pop3_refresh_info): Added status stuff.
8689 * providers/pop3/camel-pop3-store.c
8690 (camel_pop3_command_get_additional_data): Added a total bytes
8691 expected argument for progress reporting & fixed callers.
8692 (camel_pop3_command_get_additional_data): Added progress
8695 * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
8696 (mbox_summary_sync_quick):
8697 (summary_rebuild): Added progress reporting stuff.
8699 2001-02-07 Jeffrey Stedfast <fejj@ximian.com>
8701 * camel-search-private.c (CAMEL_SEARCH_COMPARE): Macro for making
8703 (camel_ustrcasecmp): Use CAMEL_SEARCH_COMPARE and check for
8704 end-of-string before the utf-8 error check.
8705 (camel_ustrncasecmp): Same.
8706 (camel_search_header_match): Strip leading spaces before doing
8707 anything else. Also use vlen and mlen so as to not need to do 500
8709 (camel_ustrcasecmp): Don't get_utf8() for the 2 strings in the
8710 comparison part of the loop because of short-circuit expression
8711 evaluation. (blame JPR if this is the wrong term!)
8712 (camel_ustrncasecmp): Same.
8714 2001-02-06 Jeffrey Stedfast <fejj@ximian.com>
8716 * camel-search-private.c (utf8_get): Rewrote using unicode_get_utf8().
8717 (camel_ustrcasecmp): Use unicode_char_t
8718 (camel_ustrncasecmp): Same.
8720 2001-02-06 Christopher James Lahey <clahey@ximian.com>
8722 * camel-mime-filter-charset.c (complete, filter),
8723 camel-mime-utils.c (rfc2047_decode_word, rfc2047_encode_word):
8724 Made these pass char ** as the second parameter to iconv.
8726 2001-02-06 Not Zed <NotZed@Ximian.com>
8728 * camel-session.c: Removed all the camel_cancel stuff.
8730 * camel-stream-fs.c (stream_read): Change to use camel_operation.
8733 * camel-remote-store.c (socket_connect): Change to use
8734 camel_operation rather than camel_cancel stuff.
8735 Removed gal include, WTF is that doing there anyway?
8737 * Makefile.am (libcamel_la_SOURCES):
8738 (libcamelinclude_HEADERS): Added camel-operation.[ch], stuff to
8739 handle notification and cancellation.
8741 * camel-search-private.c: Removed unwanted header. It was never
8742 put in for a reason. Stop fixing irrelevant warnings.
8744 (camel_ustrstrcase): Our own strstrcase impl for utf8 strings.
8745 (camel_ustrcasecmp): Ditto for strcasecmp.
8746 (camel_ustrncasecmp): And strncasecmp.
8747 (utf8_get): Simpler interface to utf8 string processing.
8748 (camel_search_header_match): Use the new things.
8750 2001-02-05 Not Zed <NotZed@Ximian.com>
8752 * camel-folder.c (get_summary): Removed some old variables/a small
8754 (free_summary): Removed old variables.
8756 * camel-mime-utils.c (header_raw_check_mailing_list): New utility
8757 function to get the mailing list (if any) that a set of headers
8760 2001-02-05 Christopher James Lahey <clahey@helixcode.com>
8762 * camel-stream-fs.c: Added a missing #include.
8764 * camel-search-private.c: Added a missing #include.
8766 2001-02-05 Jeffrey Stedfast <fejj@ximian.com>
8768 * camel-remote-store.c (remote_query_auth_types): Oops. Change
8771 * providers/smtp/camel-smtp-transport.c (query_auth_types): Updated.
8773 * providers/nntp/camel-nntp-store.c (nntp_store_query_auth_types):
8776 * providers/pop3/camel-pop3-store.c (query_auth_types): Updated.
8778 * providers/imap/camel-imap-store.c (query_auth_types): Updated.
8780 * camel-service.c (camel_service_query_auth_types): Now takes a
8781 boolean value to specify whether or not to connect when
8782 constructing a supported authtype list.
8784 2001-02-05 Not Zed <NotZed@Ximian.com>
8786 * camel-stream-filter.c (do_write): Revert jeff's earlier change,
8787 the change below is the more-correct fix. All his was doing was
8788 ignoring the return code & looping actually :)
8790 * camel-stream-fs.c (stream_write): Since we are non-blocking on
8791 the outgoing fd, keep looping if writing out large blocks, so we
8792 can keep checking for cancel, etc.
8794 2001-02-02 Not Zed <NotZed@Ximian.com>
8796 * camel-folder-thread.c (camel_folder_thread_messages_new): When
8797 we drop a fake node, dont skip checking the next in the list.
8798 (camel_folder_thread_messages_new): Add an assertion check just to
8799 make sure we dont get any pseudo nodes, and spit a warning if we
8802 2001-02-04 Jeffrey Stedfast <fejj@ximian.com>
8804 * camel-stream-filter.c (do_write): Make do_write loop until the
8805 entire buffer is written.
8807 2001-02-02 Not Zed <NotZed@Ximian.com>
8809 * camel-stream-fs.c: Add missing header for cancel check stuff.
8811 * camel-session.c (camel_cancel_cancel): Fix a wrong cast.
8813 * camel-mime-part.c (init_header_name_table): Setup a new table
8814 header_formatted_table, that lists headers that we dont want to
8815 fold (they've already been folded).
8816 (write_to_stream): Check for already formatted headers, and dont
8817 try and fold them. This is a fix for bug #1097.
8819 2001-02-01 Not Zed <NotZed@Ximian.com>
8821 * camel-mime-utils.c (header_fold): If we are folding, drop the
8822 space at the end of the line.
8824 2001-01-30 Not Zed <NotZed@Ximian.com>
8826 * camel-remote-store.c (timeout_cb): Remvoe the stream locking
8827 here. I think this was leading to a deadlock when a keepalive is
8828 being sent, in imap.
8830 2001-01-29 Not Zed <NotZed@Ximian.com>
8832 * providers/imap/camel-imap-command.c
8833 (imap_command_strdup_vprintf): Include the terminating NUL in the
8834 calculated string length. This hit memcheck.
8836 2001-01-25 Not Zed <NotZed@Ximian.com>
8838 * tests/folder/test3.c: Changed the subject search to handle case
8839 sensitive when it is mixed case.
8841 * Makefile.am (libcamel_la_SOURCES): Added camel-ssearch-private.c
8842 (noinst_HEADERS): Added camel-search-private.h
8844 * camel-folder-search.c (check_header): New function to do the
8845 work of the various header checks.
8846 (search_header_matches):
8847 (search_header_starts_with):
8848 (search_header_ends_with):
8849 (search_header_contains): Use check_header to do the work.
8850 (build_match_regex): Removed.
8852 * camel-search-private.c (header_soundex): New
8853 function to match words to phrases using soundex algorithm.
8855 * camel-filter-search.c (soundexcmp): Removed.
8856 (check_match): Moved to search-private.h
8858 2001-01-24 Not Zed <NotZed@Ximian.com>
8860 * camel-search-private.c (camel_search_build_match_regex): Added
8861 extra flags, so the same function can be used for
8862 start/end/whole/partial matches.
8863 (camel_search_header_match): Convenience function to check a
8864 single header against all sorts of different matches.
8866 * providers/imap/camel-imap-search.c (imap_body_contains): Fix for
8869 * camel-folder-search.c: Fix for e_sexp api changes.
8870 (search_header_contains): Free args/quit on unknown header.
8871 (search_header_matches): "
8872 (search_header_starts_with): "
8873 (search_header_ends_with): "
8874 (match_message): Add an exception argument.
8875 (search_body_contains): Free args/quit on fatal error.
8876 (message_body_contains): Removed (moved to
8877 camel-search-private.c), fixed callers.
8879 * camel-filter-search.c: Fix for e_sexp api changes.
8880 (build_match_regex, message_body_contains): Moved into
8881 camel-filter-private.c Fixed callers.
8882 (check_header): moved guts to camel-search-private, and
8883 changed to use regex's for everything. Just calls that with the
8885 (check_header): GEts the header, decodes it, and checks for
8886 failure, and whatnot.
8887 (check_match): Removed.
8888 (header_soundex): Changed significantly. Now it soundexes each
8889 word in the header separately, and compares it to the first
8892 * tests/folder/test9.c (main): Fix for api changes.
8893 (main): Added tests to see that invalid match and action
8894 rules are properly detected.
8896 * camel-filter-driver.c (camel_filter_driver_filter_mbox): Remove
8897 the 'finished message' bit.
8898 (camel_filter_driver_filter_message): Remove an accidentally
8900 (camel_filter_driver_filter_message): Fix for e-sexp api changes.
8902 2001-01-23 Dan Winship <danw@ximian.com>
8904 * providers/imap/camel-imap-wrapper.c: Add a lock around the
8905 delayed loading, so two threads won't try to do it at the same
8908 2001-01-22 Dan Winship <danw@ximian.com>
8910 * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Set the
8911 CamelFolder::name to just the base part of the vfolder name (the
8914 2001-01-23 Not Zed <NotZed@Ximian.com>
8916 * camel-filter-search.c (camel_filter_search_match): Perform error
8917 checking on parsing/execution.
8919 * camel-folder-search.c (camel_folder_search_execute_expression):
8920 Perform error handling on search expression.
8921 (CamelFolderSearchPrivate): Add a camelexception for error
8923 (camel_folder_search_execute_expression): Setup exception pointer.
8924 (search_match_all): Quit on error.
8926 * providers/imap/camel-imap-summary.c (message_info_load): Removed
8927 some debug 'warnings', as they should now be displayed at the
8928 toplevel loader, and just made the code match similar code
8931 * providers/local/camel-mbox-summary.c (message_info_load): Error
8933 (message_info_save): more error handling.
8935 * camel-folder-summary.c (message_info_load): Add error handling
8936 and sanity checking.
8937 (camel_folder_summary_load): Add error checks.
8938 (perform_content_info_load): Error + sanity checks.
8939 (content_info_load): error + sanity checks.
8941 * camel-filter-driver.c (close_folder): avoid /0 by updating after
8942 we've done the sync.
8943 (close_folders): Setup the first progress report to start it off.
8944 (camel_filter_driver_filter_message): Fix a fixme, check errors in
8945 e_sexp parsing, etc.
8947 2001-01-22 Christopher James Lahey <clahey@helixcode.com>
8949 * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
8950 Initialize the value of the variable exists here.
8952 2001-01-22 Not Zed <NotZed@Ximian.com>
8954 * .cvsignore */*/.cvsignore: Added profiling temp
8957 * camel-folder-thread.c (camel_folder_thread_messages_new): When
8958 removing phantom nodes, check for the end node too.
8960 * camel-filter-driver.[ch]: Changed status vars to be
8961 CAMEL_FILTER_STATUS_ etc.
8963 2001-01-21 Jeffrey Stedfast <fejj@ximian.com>
8965 * camel-mime-utils.c (header_param_list_format_append): Make the
8966 output a little prettier. Okay, so I'm anal...
8968 2001-01-21 Not Zed <NotZed@Ximian.com>
8970 * camel-filter-driver.h: Added an exception to
8971 CamelFilterGetFolderFunc.
8973 * camel-filter-driver.c (camel_filter_driver_filter_message):
8974 Remove source parameter, as it is determined elsewhere now.
8975 (camel_filter_driver_filter_folder): Same here.
8976 (camel_filter_driver_filter_mbox): And here.
8977 (do_move): If we cannot open a folder, quit, rather than ignoring
8979 (do_copy): Here too.
8980 (open_folder): Pass an exception into get_folder callback.
8981 (camel_filter_driver_filter_folder): Report that we're syncing,
8983 (camel_filter_driver_filter_mbox): And here too.
8984 (close_folder): And here.
8986 2001-01-19 Jeffrey Stedfast <fejj@ximian.com>
8988 * camel-filter-driver.c (camel_filter_driver_filter_message): Set
8989 the deleted bit *before* copying to the default folder, this way
8990 if they are importing mail and have a rule to delete it, it
8991 doesn't get copied to the default folder un-deleted.
8993 2001-01-19 Dan Winship <danw@ximian.com>
8995 * providers/imap/camel-imap-store.c
8996 (get_subscribed_folders_by_hand): If LISTing a subscribed folder
8997 doesn't return a LIST response, just ignore that folder. Yay
8999 (subscribe_folder): add a missing UNLOCK
9001 2001-01-19 Kjartan Maraas <kmaraas@gnome.org>
9003 * providers/smtp/camel-smtp-provider.c: Mark strings for translation.
9005 2001-01-19 Not Zed <NotZed@Ximian.com>
9007 * camel-filter-driver.c (report_status): Add a percentage complete
9008 indicator to the status thing.
9009 (camel_filter_driver_filter_mbox): Add percentage complete to
9011 (camel_filter_driver_filter_folder): Same.
9013 2001-01-18 Dan Winship <danw@ximian.com>
9015 * camel-store.c (camel_folder_info_build): More tweaking... skip
9016 separator characters after the namespace character. (Gets rid of
9017 the shell folder registration warning some people have had with
9020 * providers/imap/camel-imap-store.c (imap_connect): I'm sure there
9021 was some clever reason I was storing the flags of the folder in
9022 the hash table rather than just "1", but I don't remember what it
9023 was now. Anyway, since we only ever test NULL/non-NULL, store 1,
9024 since flags is sometimes 0.
9026 * providers/imap/camel-imap-folder.c (imap_update_summary): Oops.
9027 Somewhere in one of the reorgs, the code to add new messages to
9028 the CamelFolderChangeInfo structure got removed. Fix that.
9030 2001-01-17 Jeffrey Stedfast <fejj@ximian.com>
9032 * providers/imap/camel-imap-summary.c (message_info_load): Add
9033 some g_warnings() to help debug later if I ever get the segfaults
9034 I was getting earlier. Can't seem to reproduce them after my
9037 * camel-folder-summary.c (camel_folder_summary_load): Undid my
9038 change here, NotZed said it was wrong and that if it gets a NULL
9039 mi then it should abort and not continue.
9041 2001-01-17 Jeffrey Stedfast <fejj@ximian.com>
9043 * camel-folder-summary.c (camel_folder_summary_load): Make sure
9044 that the message-info is non-null before we go accessing inner
9045 parts of it and/or adding it to the summary array. I may not have
9046 handled the error correctly, but it does seem to work
9047 correctly. If NotZed could double-check this it'd be great.
9049 * providers/smtp/camel-smtp-transport.c (get_smtp_error_string):
9050 New smtp error-code to string mapping function.
9051 (smtp_connect): Use the new error->string function for reporting
9053 (smtp_helo): Same. Also use a case-insensitive strstr for 8BITMIEM
9054 as it seems Exchange sends back lowercase for that one single SMTP
9055 extension. Everything else is uppercase. I'm seeing a lack of love
9056 for that extension by Microsoft dudes...
9057 (smtp_mail): Use get_smtp_error_string.
9063 2001-01-16 Jeffrey Stedfast <fejj@ximian.com>
9065 * camel-folder-summary.c (camel_folder_summary_array): Add an int
9066 i so this code will compile. Should I be worried about how well
9067 this code will work? ;-)
9069 2001-01-17 Not Zed <NotZed@Ximian.com>
9071 * camel-folder.c (free_summary): Call
9072 camel_folder_summary_array_free() to do the work.
9073 (get_summary): Use camel_folder_summary_array() to get the array
9074 atomically. These fixes allow folder/test8 to work again, and fix
9075 a sort of race where the summary size can change while we were
9076 making a copy of it.
9078 * camel-folder-summary.c (camel_folder_summary_array): Get the
9079 summary array atomically, so it can't contain empty records.
9080 (camel_folder_summary_array_free): And free it.
9082 * tests/lib/camel-test.c (die): If we are verbose & in threads,
9083 then goto sleep so we can debug.
9085 * tests/folder/test8.c (worker): Add a missing pull() for
9088 * camel-filter-search.c: Fix the symbol table, so match-all is an
9089 immediate function, as it should be.
9091 * tests/folder/test9.c (main): New test, tests some filtering
9094 * tests/message/test3.c (main): Dont use a boundary string with
9095 spaces in it. Folding can corrupt it. Maybe the folding isn't
9096 working entirely right, but anyway.
9098 * camel-session.c: Debug out the debug.
9100 * camel-filter-driver.c (camel_filter_driver_filter_folder): Plug
9103 2001-01-16 Dan Winship <danw@ximian.com>
9105 Delayed loading of IMAP message parts.
9107 * camel-types.h: typedef CamelMessageInfo and
9108 CamelMessageContentInfo here
9110 * camel-folder-summary.h: Add a "size" field to
9111 CamelMessageContentInfo.
9113 * camel-folder-summary.c (camel_folder_summary_content_info_new,
9114 camel_folder_summary_content_info_free): Renamed and made
9115 non-static for providers that construct their own content info.
9116 (content_info_load, content_info_save): load/save size
9118 * camel-data-wrapper.c (camel_data_wrapper_is_offline): New
9119 function to return if a data wrapper's contents are "offline". (So
9120 that, for example, we don't make thumbnails of images that haven't
9121 been loaded off the IMAP server yet.) Defaults to FALSE.
9123 * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
9124 Fix a bug in re-selecting a folder when messages have been
9125 expunged from it by another client in the meantime.
9126 (imap_get_message): Rewrite. If the message is larger than a
9127 certain size, just create a skeleton message containing
9128 CamelImapWrappers that will read parts as needed. This way, large
9129 attachments only need to be downloaded if the user looks at them,
9130 and multipart/alternative alternatives that aren't used will never
9131 be downloaded at all.
9132 (imap_update_summary): Rewrite this a bunch too to make the
9133 parsing more robust.
9135 * providers/imap/camel-imap-summary.c
9136 (CAMEL_IMAP_SUMMARY_VERSION): bump.
9137 (camel_imap_summary_new): Set build_content to TRUE.
9138 (content_info_load, content_info_save): Only save/load the content
9139 for messages that have it. (The content info gets created as a
9140 side effect of imap_get_message.)
9142 * providers/imap/camel-imap-utils.c (imap_parse_body): New routine
9143 (and helpers) to parse an IMAP 'body' FETCH response and fill in a
9144 CamelMessageContentInfo from it.
9146 * providers/imap/Makefile.am (libcamelimap_la_SOURCES,
9147 libcamelimap_la_HEADERS): add camel-imap-wrapper.
9149 2001-01-16 Dan Winship <danw@ximian.com>
9151 * camel-tcp-stream-raw.c (stream_getsockopt, stream_setsockopt):
9152 * camel-stream-fs.c (stream_read, stream_write):
9153 * camel-remote-store.c (socket_connect): fcntl(fd, F_GETFL)
9154 returns the flags as the return value, not via a passed in
9155 pointer. And F_SETFL looks for an int, not a long, and you have to
9156 pass it what it's expecting because it's a va_arg parameter. (Yes,
9157 the man page lies on Linux. But check the UNIX98 spec or the glibc
9158 source.) Also, fix another bug in socket_connect: if we manage to
9159 connect right away, unset O_NONBLOCK so it doesn't mess us up
9162 Fixes a bunch of problems with non-blocking I/O being done in the
9163 allegedly-blocking case and then returning EWOULDBLOCK.
9165 2001-01-16 Chris Toshok <toshok@ximian.com>
9167 * providers/Makefile.am (NNTP_DIR): set to nntp if ENABLE_NNTP
9168 (SUBDIRS): use $(NNTP_DIR)
9170 2001-01-16 Jeffrey Stedfast <fejj@ximian.com>
9172 * providers/smtp/camel-smtp-transport.c (smtp_rcpt): Don't check
9173 errno as it's not being set. Fixes bug #1150.
9175 2001-01-16 Jeffrey Stedfast <fejj@ximian.com>
9177 Ugh, this design is ugly like my butt.
9179 * camel-session.c (camel_session_query_cert_authenticator): New
9180 function which will be useful when we integrate SSL.
9182 * camel-tcp-stream-ssl.c (ssl_auth_cert): Callback to authenticate
9184 (ssl_bad_cert): Callback that gets the reason the certificate is
9185 bad and then calls camel's cert-authenticator callback to notify
9186 the user and to allow the user to override the check.
9187 (stream_connect): Set the URL we expect to connect with and setup
9188 the auth_cert and bad_cert callbacks.
9189 (camel_tcp_stream_ssl_new): Now takes a CamelSession and a
9190 expected_host argument that it will use for certificate
9192 (camel_tcp_stream_ssl_finalize): Unref the session and free the
9195 2001-01-16 Not Zed <NotZed@Ximian.com>
9197 * camel-filter-search.c (header_exists): Changed to support
9198 multiple args (or'd together).
9199 (header_contains): Cleaned up to match the search code. Why did
9200 fejj change it? I'll never know.
9202 (header_starts_with):
9203 (header_ends_with): Big cleanup of fejj's "i'm the cut & paste
9204 king" code. Also properly handle or'ing of additional args to
9205 match what the folder-search code should do.
9206 (check_match): New function which does the annoying matching
9207 stuff (for header matches).
9208 (check_header): Similarly, handles or'ing of the matches together.
9211 (header_starts_with):
9212 (header_ends_with): Call check_header to do the actual work.
9213 (header_soundex): And here too.
9214 (match_all): Yeah like match-all isn't passed expression results,
9215 its passed expression terms. Fix this so match-all works like it
9216 should, by executing the contained expression.
9217 (message_body_contains): Copied directly from
9218 camel-folder-search.c, a more robust/faster/simpler body search
9220 (mime_part_matches): Removed entirely.
9221 (handle_multipart): Removed entirely.
9222 (build_match_regex): Copied from camel-folder-search. Builds a
9223 set of simple strings into a regex pattern that matches any of
9224 them (for faster & simpler matching). Expanded to accept regex
9225 patterns itself, so it can merge them together.
9226 (body_contains): Use build match/match message to match using a
9228 (body_regex): Likewise, this time we tell it we're building a
9230 (header_full_regex): Use build_match_regex to take the drudgery
9231 out of it, and expand it to handle multiple regex's at once.
9232 (get_full_header): slightly cleaner (well i dunno, the sprintf
9233 stuff just got to me).
9234 (header_regex): Cleaned up to use build_match_Regex too, and to
9235 properly check types.
9236 (filter_message_search): Just allocate 'fms' on the stack.
9238 * camel-filter-driver.c (camel_filter_driver_finalise):
9239 (camel_filter_driver_init):
9240 (camel_filter_driver_class_init):
9241 (camel_filter_driver_get_type): Changed from gtk object to camel
9243 (camel_filter_driver_add_rule): New function to add a rule to be
9244 processed in sexp form.
9245 (camel_filter_driver_init): Init the rules list.
9246 (camel_filter_driver_finalise): Clear the rules/rules list.
9247 (camel_filter_driver_filter_message): Scan rules list directly
9248 rather than creating on the fly.
9250 * Makefile.am (libcamelinclude_HEADERS): Added camel-filter-driver.h
9251 (libcamel_la_SOURCES): Added camel-filter-driver.c, code taken
9252 from filter-driver, which can drive, uh, filters based on sexp's.
9253 (libcamelinclude_HEADERS):
9254 (libcamel_la_SOURCES): Added camel-filter-search.[ch]
9256 * camel-folder-summary.c (camel_folder_summary_decode_string):
9257 Chganged len back to be unsigned. And do a simple range check on
9258 the string value to try and detect corrupted summary files.
9260 * providers/imap/camel-imap-command.c (imap_read_untagged): Handle
9261 cancelled stream reads with an appropriate exception.
9263 * providers/imap/camel-imap-private.h: Fix the include-once
9264 macro. Doh, confliced with camel-private.h.
9266 * providers/imap/camel-imap-store.c (imap_store_refresh_folders):
9267 A copy of camel_remote_store_refresh_folders. We avoid locking
9268 each folder when we call it though. This should be removed when i
9269 can work out how to remove the folder lock from this function
9272 * camel-stream-fs.c (stream_write): Fix n' argument of select.
9273 (stream_read): Likewise.
9275 * camel-remote-store.c (socket_connect): Bump the connect timeout
9277 (socket_connect): Oops, fix the 'n' argument of select.
9279 * camel-session.c (camel_cancel_cancel): If we are given no
9280 cancellation node, then do it for all active ones.
9282 2001-01-15 Jeffrey Stedfast <fejj@ximian.com>
9284 * camel-stream-fs.c (stream_close): If the close() is successful,
9287 * camel-tcp-stream-raw.c: Removed the disconnect() method.
9288 (stream_close): If the close() is successful, set the sockfd to
9291 * camel-tcp-stream-ssl.c: Removed the disconnect() method.
9292 (stream_close): If the close() is successful, set the sockfd to
9295 * camel-tcp-stream.c (camel_tcp_stream_disconnect): Removed,
9296 easier to just use the close() method as it did the same thing
9299 2001-01-15 Jeffrey Stedfast <fejj@ximian.com>
9301 * camel-tcp-stream-raw.c (stream_getsockopt): Updated to be able
9302 to get the CAMEL_SOCKOPT_NONBLOCKING socket opt.
9303 (stream_setsockopt): Updated to be able to set the
9304 CAMEL_SOCKOPT_NONBLOCKING socket opt.
9306 2001-01-15 Peter Williams <peterw@ximian.com>
9308 * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Lock
9309 around the imap_rescan, which needs it.
9311 2001-01-15 Not Zed <NotZed@Ximian.com>
9313 * camel-remote-store.c (socket_connect): A cancellable connection
9315 (remote_send_string): Return cancelled exception if we were.
9316 (remote_send_stream): "
9317 (remote_recv_line): "
9319 * camel-stream-fs.c (stream_read): First cut at cancellation
9320 stuff. Its looking a bit ugly.
9322 2001-01-15 Jeffrey Stedfast <fejj@ximian.com>
9324 * camel-tcp-stream-ssl.c (stream_connect): Uses an SSL socket now
9325 although there's still a few things missing (like certificate
9328 * camel.c (camel_ssl_init): A replacement function for
9329 camel_init() that also initializes SSL.
9331 2001-01-14 Jeffrey Stedfast <fejj@ximian.com>
9333 * camel-tcp-stream-ssl.c (stream_getsockopt): Implemented.
9334 (stream_setsockopt): Implemented.
9336 * camel-tcp-stream-raw.c (stream_getsockopt): Implemented.
9337 (stream_setsockopt): Implemented.
9339 * camel-tcp-stream.c (camel_tcp_stream_getsockopt): New method.
9340 (camel_tcp_stream_setsockopt): Another new method. I think you get
9341 the idea of what these are for so I won't explain them.
9343 2001-01-14 Jeffrey Stedfast <fejj@helixcode.com>
9345 * camel-tcp-stream-ssl.[c,h]: New CamelTcpStream class that
9346 implements nspr sockets and eventually will use nss for
9347 SSL/TLS. Currently doesn't do any SSL/TLS but it should still
9348 work. It's functionally equivalent to CamelTcpStreamRaw at the
9349 moment only it uses nspr i/o.
9351 * camel-tcp-stream-raw.[c,h]: New CamelTcpStream class that
9352 implements native sockets. Should be usable but may have some bugs
9355 2001-01-13 Jeffrey Stedfast <fejj@ximian.com>
9357 * camel-tcp-stream.[c,h]: New abstract class for TCP streams. The
9358 next step is to write child classes (CamelTcpStreamBSD and
9359 CamelTcpStreamSSL). The BSD stream will use normal BSD sockets
9360 while SSL will use Mozilla's NSPR and NSS libraries to do Secure
9361 Socket Layers which wille ventually replace CamelStreamSSL which I
9362 just commit'd. Oh well.
9364 2001-01-13 Jeffrey Stedfast <fejj@ximian.com>
9366 * camel-stream-ssl.[c,h]: New stream for handling SSL/TLS
9369 2001-01-12 Not Zed <NotZed@Ximian.com>
9371 * camel-folder-thread.c (camel_folder_thread_messages_new):
9372 Perform a final pass, removing any pseudo nodes we added earlier.
9373 Quick patch to test the idea.
9374 (camel_folder_thread_messages_new): Added casts to rmeove some
9375 warnings for the analites out there.
9377 2001-01-11 Dan Winship <danw@ximian.com>
9379 * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
9380 Fix a bug in previous commit: don't check for deleted messages if
9381 there are no known messages in the folder (because it would end up
9382 sending "FETCH 0 ...").
9383 (imap_copy_message_to): Fix this up: sync flags to the server
9384 before copying so that they end up correct in the remote folder.
9385 And poke the destination folder after doing the copy so it notices
9386 the new message right away.
9387 (imap_move_message_to): Call imap_copy_message_to for most of the
9388 work rather than duplicating the code (since it's much more
9391 2001-01-11 Dan Winship <danw@ximian.com>
9393 * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
9394 New function to check for added/deleted messages when re-selecting
9396 (imap_refresh_info, imap_rescan, imap_update_summary): Various
9397 locking tweaks that turn out to be irrelevant since command_lock
9398 is recursive, but whatever.
9400 * providers/imap/camel-imap-command.c (camel_imap_command): When
9401 selecting a new folder, call camel_imap_folder_selected on it.
9403 * camel-folder.c (camel_folder_copy_message_to): Fix a locking
9404 problem. (One branch of an if statement was returning with the
9405 lock still locked.) Also remove the deprecation comments, to match
9408 2001-01-10 Jeffrey Stedfast <fejj@helixcode.com>
9410 * providers/local/camel-local-provider.c: Changed the descriptions
9411 for mh, mbox, and maildir to be more "user-friendly".
9413 2001-01-10 Dan Winship <danw@helixcode.com>
9415 * providers/imap/camel-imap-types.h: New header to prevent
9416 recursive #include problems
9418 * providers/imap/*.h: Replace some #includes with #include
9419 "camel-imap-types.h", remove typedefs that were moved to
9422 * providers/imap/*.c: Add #includes to make up for #includes
9423 removed from .h files
9425 * providers/imap/Makefile.am (libcamelimapinclude_HEADERS): Add
9428 2001-01-10 Dan Winship <danw@helixcode.com>
9430 * camel-store.c (camel_store_sync): New class function, parallel
9431 to camel_folder_sync. (The default implementation just calls
9432 camel_folder_sync on each cached folder.)
9434 * providers/imap/camel-imap-store.c (get_folder_info): Call
9435 camel_store_sync before doing anything else so that the IMAP
9436 server and Camel are working from the same data. Don't ask the
9437 server for the unread message count of the current folder, since
9438 UW will return often-incorrect cached data, and we can calculate
9439 it without talking to the server anyway.
9441 2001-01-09 Dan Winship <danw@helixcode.com>
9443 Mostly IMAP changes. Use the NAMESPACE extension (where
9444 available). Deal with servers that don't return LIST flags in
9445 response to LSUB (like UW) to get rid of the "not a selectable
9446 folder" error messages in the UI. Take advantage of the \Marked
9447 and \Unmarked flags to try to speed up the folder scan by not
9448 doing STATUS on unmarked folders. Some further tweaks on the shape
9449 of the resulting folder tree in various situations...
9451 * camel-store.h: Remove the (read) message_count, since nothing
9452 uses it, and we can speed up IMAP a bit this way.
9454 * camel-store.c (camel_folder_info_build): Redo this a bit to make
9455 it more useful for IMAP since that's the only thing that uses it.
9457 * camel-remote-store.c (camel_remote_store_connected): Public
9458 function to check if the store is connected, and try to connect it
9460 (remote_send_string, remote_send_stream, remote_recv_line): Use
9463 * providers/imap/camel-imap-store.c (camel_imap_store_finalize):
9465 (camel_imap_store_init): Initialize subscribed_folders to NULL
9466 rather than an empty hash table.
9467 (imap_connect): Get the list of subscribed folders here. If the
9468 server doesn't claim that any of them are either Marked or
9469 Unmarked, then assume that it doesn't do that for LSUB and
9470 remember that for later. If the server supports the NAMESPACE
9471 extension and the user didn't specify a namespace, use the
9472 server-provided one.
9473 (imap_disconnect): Free the list of subscribed folders, and the
9475 (get_folder): check camel_remote_store_connected
9476 (get_folder_info): check camel_remote_store_connected. Add a bunch
9477 of new cleverness. If we learned that the server doesn't do LSUB
9478 usefully, do a bunch of LISTs by hand. Then, if we're getting
9479 unread counts, only do it for folders that weren't listed as
9480 Unmarked. Also, deal with namespaces that end with the separator
9481 character, and update for changes to camel_folder_info_build.
9482 (folder_subscribed): Add a g_return_val_if_fail.
9483 (subscribe_folder, unsubscribe_folder): check
9484 camel_remote_store_connected.
9486 * providers/nntp/camel-nntp-store.c (build_folder_info,
9487 build_folder_info_from_grouplist, nntp_store_get_folder_info):
9488 Don't fill in message_count since it doesn't exist any more.
9490 2001-01-09 Dan Winship <danw@helixcode.com>
9492 Kill off a long-hated Camel kludge: "empty" URLs and
9493 query_auth_types_generic.
9495 * camel-url.c: Remove "empty" from CamelURL.
9496 (camel_url_new): No longer set it.
9497 (camel_url_to_string): Treat "" as equivalent to NULL for
9498 authmech. (Unrelated change, but it simplifies some stuff with the
9501 * camel-service.c (camel_service_new): Remove url->empty check: if
9502 the URL isn't valid, we don't create the service.
9503 (camel_service_query_auth_types): No longer need to switch between
9504 generic and connected variants.
9506 * providers/smtp/camel-smtp-transport.c (query_auth_types):
9507 * providers/pop3/camel-pop3-store.c (query_auth_types):
9508 * providers/nntp/camel-nntp-store.c (nntp_store_query_auth_types):
9509 * providers/imap/camel-imap-store.c (query_auth_types):
9510 * camel-remote-store.c (remote_query_auth_types): Remove generic
9511 version, rename connected version.
9513 2001-01-06 Not Zed <NotZed@HelixCode.com>
9515 * providers/vee/camel-vee-folder.c (vee_folder_build_folder): Dont
9516 try and unref a messageinfo that wasn't there, and use the right
9517 free function too. Modified patch from Iain.
9518 (vee_move_message_to): New method, call the real folders'
9519 move_message_to method.
9521 2001-01-04 JP Rosevear <jpr@helixcode.com>
9523 * tests/lib/Makefile.am: fix includes for compilation
9525 * tests/message/Makefile.am: Build test3 again
9527 * tests/message/test2.c: Kill warnings with header includes
9529 * tests/message/test3.c: ditto
9531 * tests/lib/streams.c: ditto
9533 * tests/lib/camel-test.c: ditto
9535 * tests/lib/messages.c: ditto
9537 * tests/lib/folders.c: ditto
9539 2001-01-04 Dan Winship <danw@helixcode.com>
9541 * providers/imap/camel-imap-folder.c (imap_rescan): Fix two
9542 problems in figuring out server-expunged messages.
9544 2001-01-04 Not Zed <NotZed@HelixCode.com>
9546 * camel-folder.c (thaw): If we have a lot of messages changed,
9547 promote it to a folder changed event.
9549 2000-01-03 Jeffrey Stedfast <fejj@helixcode.com>
9551 * camel-folder-search.c (search_header_matches): Implemented.
9552 (search_header_exists): Implemented.
9553 (search_header_starts_with): Implemented.
9554 (search_header_ends_with): Implemented.
9556 2001-01-03 Christopher James Lahey <clahey@helixcode.com>
9558 * providers/imap/camel-imap-folder.c (camel_imap_folder_new):
9559 Initialize the exists variable so that we don't do random things
9560 if the imap server misbehaves.
9562 2000-12-29 Not Zed <NotZed@HelixCode.com>
9564 * camel-folder.c (camel_folder_move_message_to): REmove warning,
9565 this isn't really deprecated, sigh.
9567 * camel-mime-utils.c (header_fold): Comment out some debug.
9569 2001-01-02 Christopher James Lahey <clahey@helixcode.com>
9571 * providers/maildir/, providers/mbox/, providers/mh/: Removed
9572 these directories since they're unused.
9574 2001-01-02 Dan Winship <danw@helixcode.com>
9578 * providers/imap/camel-imap-stream.[ch]: Remove. To be replaced.
9580 * providers/imap/Makefile.am (libcamelimapinclude_HEADERS): Remove
9583 * providers/imap/camel-imap-utils.c (imap_parse_flag_list): Take a
9584 char ** instead of char *, to return the position at the end of
9585 parsing like the string parsing functions.
9586 (imap_parse_string_generic): New function to parse a string,
9587 nstring, or astring.
9588 (imap_parse_nstring, imap_parse_astring): Now macros
9589 (imap_parse_string): Added
9591 * providers/imap/camel-imap-folder.h: Remove the "exists" field
9592 from CamelImapFolder.
9594 * providers/imap/camel-imap-folder.c: Remove unused include of
9595 camel-imap-stream.h.
9596 (camel_imap_folder_init): Remove no-longer-relevant summary
9598 (camel_imap_folder_new): Update for imap_parse_flag_list change,
9599 exists removal, and imap_rescan.
9600 (imap_rescan): New function that does most of the work of the old
9601 imap_refresh_info, but taking "exists" as an argument instead of
9602 getting it from the folder. Also calls camel_imap_folder_changed
9603 to do the summary updating and signalling, rather than duplicating
9605 (imap_refresh_info): Just call imap_rescan (using the size of the
9606 folder summary as "exists").
9607 (imap_update_summary): Update for imap_parse_flag_list change
9608 (camel_imap_folder_changed): Update for "exists" change.
9610 2001-01-02 Dan Winship <danw@helixcode.com>
9612 * camel-mime-utils.c (header_content_type_simple): New function to
9613 return just foo/bar with no parameters.
9615 * camel-data-wrapper.c (get_mime_type): Use
9616 header_content_type_simple rather than header_content_type_format.
9618 2000-12-28 Dan Winship <danw@helixcode.com>
9620 * gmime-content-field.[ch]: Remove this. It was only a thin
9621 wrapper around struct _header_content_type anyway, and didn't
9622 match the naming scheme of anything else.
9624 * Makefile.am: Remove gmime-content-field.[ch]
9626 * camel.h: Remove gmime-content-field.h
9628 * camel-types.h: Add CamelContentType as a typedef for struct
9629 _header_content_type (especially for use outside of camel).
9631 * camel-multipart.c:
9632 * camel-mime-part.c:
9633 * camel-mime-message.c:
9634 * camel-folder-summary.c:
9635 * camel-folder-search.c:
9636 * camel-data-wrapper.[ch]: Use CamelContentType and
9637 header_content_type_* functions rather than the GMime stuff.
9639 * camel-mime-part-utils.c:
9640 * camel-medium.c: Remove unused gmime-content-field.h include.
9642 2000-12-27 Dan Winship <danw@helixcode.com>
9644 * providers/pop3/camel-pop3-store.c (connect_to_server): Fix the
9645 APOP check to not crash on servers that don't return any
9646 information on the +OK greeting line.
9648 2000-12-24 Not Zed <NotZed@HelixCode.com>
9650 * providers/imap/camel-imap-search.c (imap_body_contains): Lock
9651 the command channel while searching.
9652 (imap_body_contains): If performing a whole uid search, then add
9653 references to our own summary items, dont look it up in the
9654 folder. This way they can't vanish unexpectedly.
9656 * providers/imap/camel-imap-folder.h (CamelImapFolder): Added a
9658 (CamelImapFolder): Removed summary again from here.
9660 * providers/imap/camel-imap-private.h: Added lock for imap
9663 * Merge from camel-mt-branch.
9665 * providers/imap/camel-imap-folder.c (imap_update_summary): Merge
9666 fix, use the folder->summary.
9667 (imap_get_message_flags, imap_set_message_flags,
9668 imap_get_message_user_flag, imap_set_message_user_flag): Removed
9670 (camel_imap_folder_init): Setup private data/lock.
9671 (imap_finalize): Free private data/search lock.
9672 (imap_search_free): Lock the search_lock.
9673 (imap_search_by_expression): Lock the search lock when using the
9674 search object. Also copy/ref hte summary, rather than getting it
9676 (imap_refresh_info): Free any info lookups. Use folder->summary
9677 not imap_folder->summary. And lock around commands.
9678 (camel_imap_folder_changed): Use folder->summary again.
9679 (camel_imap_folder_changed): Make sure we unref the summary lookup.
9681 2000-12-22 Dan Winship <danw@helixcode.com>
9683 * providers/imap/camel-imap-store.c (get_folder_info): When
9684 getting the top-level folder list, include INBOX even if it's not
9685 subscribed. Don't show subscribed folders outside of the given
9686 namespace. Do a better job of pruning the namespace from the
9687 returned folder tree.
9689 2000-12-21 Dan Winship <danw@helixcode.com>
9691 * providers/imap/camel-imap-search.c: New CamelFolderSearch
9692 subclass that just reimplements body_contains (using the IMAP
9693 SEARCH command). All other kinds of searching are done against the
9696 * providers/imap/camel-imap-folder.c (imap_search_by_expression):
9697 Use a CamelImapSearch to do searching.
9699 * providers/imap/camel-imap-utils.c (imap_translate_sexp, etc): No
9702 * camel-folder-search.h: Add missing CAMEL_FOLDER_SEARCH_TYPE
9705 2000-12-21 Dan Winship <danw@helixcode.com>
9707 * camel-stream-buffer.c (camel_stream_buffer_gets): Update the
9708 doc comment: since it always NUL-terminates the buffer, it reads
9709 at most @max-1 bytes, not @max.
9711 * camel-remote-store.c (remote_recv_line): Fix the "did
9712 camel_stream_buffer_gets fill the whole buffer" check. Fixes a bug
9713 when reading lines longer than 1024 characters (eg, IMAP SEARCH
9714 responses in very large folders).
9716 2000-12-19 Dan Winship <danw@helixcode.com>
9718 * providers/imap/camel-imap-folder.c (imap_refresh_info): Oops.
9719 Don't do "FETCH 1:0" when the folder is empty.
9720 (imap_protocol_get_summary_specifier): Request RFC822.SIZE too.
9721 (imap_update_summary): Parse RFC822.SIZE and add it to the
9724 2000-12-18 Dan Winship <danw@helixcode.com>
9726 * providers/imap/camel-imap-summary.c: Add "guint32 server_flags"
9727 to CamelImapMessageInfo to keep track of the last known message
9728 flag state on the server.
9729 (message_info_save, message_info_load): Save/load the
9732 * providers/imap/camel-imap-folder.c: Make this use
9733 CamelFolderChangeInfo and emit folder_changed notifications as it
9734 gets them rather than only on refresh_info.
9735 (imap_refresh_info): Notice flags that get cleared on the server
9736 as well as flags that get set.
9737 (imap_update_summary): Remove a comment that never actually
9738 applied to the committed code.
9740 2000-12-15 Dan Winship <danw@helixcode.com>
9742 * providers/imap/camel-imap-command.c (camel_imap_command): Change
9743 the semantics of fmt: Now %S (capital S) means an IMAP "string",
9744 (which can be sent as either a quoted string or a literal). If
9745 the server supports LITERAL+, these will be sent as extended
9746 literals (which don't require any special escaping). Otherwise
9747 they'll be sent as quoted strings (and it now properly deals with
9748 " or \ in the string).
9749 (imap_command_strdup_vprintf): Utility routine that does the real
9750 work for the functionality mentioned above.
9752 * providers/imap/camel-imap-utils.c (imap_quote_string): Turns a
9753 string into a proper IMAP "quoted string".
9755 * providers/imap/camel-imap-store.c:
9756 * providers/imap/camel-imap-folder.c: Use %S instead of "%s" where
9759 2000-12-22 Not Zed <NotZed@HelixCode.com>
9761 * camel-folder-summary.c (GLOBAL_INFO_UNLOCK): Doh, cut and paste
9762 victim again, call unlock instead of lock!
9763 (summary_assign_uid): Unlock around trying to get a new uid, if we
9766 2000-12-21 Not Zed <NotZed@HelixCode.com>
9768 * tests/folder/Makefile.am (TESTS): reenabled the tests here.
9770 * providers/nntp/camel-nntp-newsrc.c (CamelNNTPNewsrc): Add a
9771 lock. Made completely mt-safe. Sigh, this is all so i can
9772 support snooping of the set_flags stuff inside camel-nntp-folder,
9773 since i've removed the global folder lock from all of the other
9774 folder summary operations.
9775 (camel_nntp_newsrc_read_for_server): Setup lock.
9776 (camel_nntp_newsrc_get_highest_article_read): Lock internal access.
9777 (camel_nntp_newsrc_get_num_articles_read):
9778 (camel_nntp_newsrc_mark_article_read):
9779 (camel_nntp_newsrc_mark_range_read):
9780 (camel_nntp_newsrc_article_is_read):
9781 (camel_nntp_newsrc_group_is_subscribed):
9782 (camel_nntp_newsrc_unsubscribe_group):
9783 (camel_nntp_newsrc_subscribe_group):
9784 (camel_nntp_newsrc_get_subscribed_group_names):
9785 (camel_nntp_newsrc_get_all_group_names): "
9786 (camel_nntp_newsrc_write_to_file): Lock internal accesses.
9787 (camel_nntp_newsrc_write): Lock around diry stuff.
9789 * providers/local/camel-maildir-summary.c (maildir_summary_check):
9790 Lock around our internal poking of the summary hashtable/array.
9791 (maildir_summary_sync): And the same here too.
9793 * camel-folder-summary.c: Moved the summaryprivate data into
9794 camel-private.h. Only needed for the locks really.
9795 (camel_folder_summary_init): Setup locks.
9796 (camel_folder_summary_set_filename): Lock.
9797 (camel_folder_summary_index): lock
9798 (camel_folder_summary_uid): Lock
9799 (camel_folder_summary_next_uid): "
9800 (camel_folder_summary_set_uid): "
9801 (camel_folder_summary_load): Lock around whole load. Hrm,
9802 probably not required.
9803 (camel_folder_summary_save): Lock around whole save, this is
9804 reqwuired, unless we ref/copy the whole list first, and i couldn't
9806 (camel_folder_summary_add): lock
9807 (summary_assign_uid): Lock around internal accesses.
9808 (camel_folder_summary_info_new_from_parser): Lock around filtr stuff.
9809 (camel_folder_summary_info_ref): Add locking. Could probably use
9811 (camel_folder_summary_touch): Add locking, likewise.
9812 (camel_folder_summary_clear): Lock. If the preiovus two are
9813 changed, then so this will need mroe locking.
9814 (camel_folder_summary_info_free): Lock around refcounting.
9815 (camel_folder_summary_remove): Locking.
9816 (camel_folder_summary_remove_uid): Lock ref, unlock, unref. Also
9817 fixed a bug that would have made this never work, freeing the key,
9818 which isn't allocated.
9819 (camel_folder_summary_remove_index): lock, ref, unlock unref also.
9820 (camel_message_info_ref): Lock using a separate global lock, since
9821 we have no context here.
9822 (camel_message_info_free): Here too.
9823 (content_info_alloc): Use an alocation lock here. avoids races
9824 with setting up content_info_chunks, etc.
9825 (camel_folder_summary_info_new): And here too.
9826 (camel_folder_summary_load): Changed to use a differnet lock for
9828 (camel_folder_summary_init): Doh, i do need a reflock afterall,
9830 (camel_folder_summary_finalize): Free it.
9831 (camel_folder_summary_index): Add a reflock.
9832 (camel_folder_summary_uid): And here too.
9833 (camel_folder_summary_info_free): Use reflock instead of
9835 (camel_folder_summary_info_ref): Likewise.
9836 (camel_folder_summary_remove_uid): Add reflocking.
9837 (camel_folder_summary_remove_index): And here too.
9839 * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Setup a
9841 (vee_folder_build): Build each item into the real summary object.
9842 (vee_folder_add, vee_folder_add_uid, vee_folder_add_change): New
9843 functions to add a single record to the vfolder summary.
9844 (vee_folder_build_folder): Use a real summary.
9845 (vee_get_uids): Removed, use default impl.
9846 (vee_free_message_info): "
9847 (vee_get_message_info): "
9848 (vee_get_summary): "
9849 (vee_get_unread_message_count): "
9850 (vee_get_message_count): "
9851 (vee_sync): Make vee-folder-sync sync all subordinate folders.
9852 Well i dont think this is right, but enough peopl ehave aksed for
9854 (vee_expunge): Same for expunge.
9855 (vee_set_message_flags): Call parent class, then mirror flags to
9857 (vee_get_message_user_flag): Removed, we just use the default
9858 impl, and our flags should always match.
9859 (vee_set_message_user_flag): Snoop the set and set on subfolder.
9860 (vee_get_message_flags): Removed, jsut use parent impl, assume our
9861 copy matches the real ones.
9862 (get_real_message): Removed. We sort ofneed to keep the
9863 summaryitem refed while we use it, so this doesn't make as much
9864 sense as it did once.
9865 (camel_vee_folder_finalise): Unhook listening events as we unref
9867 (camel_vee_folder_new): Set the summary messageinfo data size
9869 (vfolder_remove_match): Fixed for summary change.
9870 (folder_changed): ditto. Also stopped changed items from being
9871 re-searched and possibly removed. Might have to resort to the old
9872 whole-search idea again.
9873 (message_changed): Similarly. Might be easier just not to bother
9874 with a whole search.
9876 * providers/vee/camel-vee-folder.h: Removes summary
9877 hashtable/array, and use a real summary object. Sigh, more work.
9879 * providers/nntp/camel-nntp-folder.c (nntp_folder_sync): Move
9880 summary to folder object.
9881 (nntp_folder_get_message_count): Removed, use default impl.
9882 (nntp_folder_set_message_flags): Call parent impl to do the work,
9883 but snoop for newsrc.
9884 (nntp_folder_get_uids): Removed, use default impl.
9885 (nntp_folder_get_summary): "
9886 (nntp_folder_get_message_info): "
9887 (nntp_folder_free_message_info): "
9888 (camel_nntp_folder_new): moved summary to folder class
9890 * providers/imap/camel-imap-folder.c (camel_imap_folder_init):
9891 Move summary to folder object.
9892 (camel_imap_folder_new): "
9893 (imap_finalize): No longer unref the summary (or infact, do
9894 anything else either).
9895 (imap_refresh_info): move summary to folder object.
9897 (imap_get_message_count): Removed, use default impl.
9898 (imap_get_unread_message_count): "
9900 (imap_get_summary): "
9901 (imap_free_summary): "
9902 (imap_get_message_info): "
9903 (imap_free_message_info): "
9904 (imap_get_message_flags): "
9905 (imap_set_message_flags): "
9906 (imap_get_message_user_flag): ", this changes functionality, but
9907 only by providing non-permanent flags.
9908 (imap_set_message_user_flag): "
9909 (imap_update_summary): move summary to folder object, and use
9910 camel_folder_summary_info_new_from_header, instead of calling the
9911 virtual function directly.
9913 * providers/local/camel-maildir-folder.c (maildir_append_message):
9914 move summary to folder object, again.
9915 (maildir_get_message): "
9917 * providers/local/camel-mh-folder.c (mh_append_message): move
9918 summary to folder object.
9921 * providers/local/camel-mbox-folder.c (mbox_append_message): Move
9922 summary to folder object
9923 (mbox_get_message): "
9924 (mbox_set_message_user_flag): We need our own copy of this, sigh,
9925 so we can track if the xev needs a rewrite (probably, its only a
9927 (mbox_set_message_user_tag): Same same with this one.
9928 (camel_mbox_folder_class_init): Link in these new virtual functions.
9930 * providers/local/camel-local-folder.h (CamelLocalFolder): removed
9933 * providers/local/camel-local-folder.c (local_get_message_count):
9934 (local_get_unread_message_count):
9936 (local_get_summary):
9937 (local_free_summary):
9938 (local_get_message_info):
9939 (local_free_message_info):
9940 (local_get_message_flags):
9941 (local_set_message_flags):
9942 (local_get_message_user_flag):
9943 (local_set_message_user_flag):
9944 (local_get_message_user_tag):
9945 (local_set_message_user_tag): Removed, all now use default
9947 (camel_local_folder_class_init): Removed overrides.
9948 (local_init): Clear folder->summary.
9949 (local_finalize): move summary to folder.
9950 (camel_local_folder_construct): "
9953 * camel-folder.c (free_summary): Provide a real impl.
9957 (free_message_info): "
9958 (get_message_info): "
9959 (set_message_user_tag): "
9960 (get_message_user_tag): "
9961 (set_message_user_flag): "
9962 (get_message_user_flag): " Sigh, the last so far.
9963 (get_message_flags): Sigh, 1 more afterall.
9964 (get_unread_message_count): And and this.
9965 (get_message_count): and this!
9966 (set_message_flags): Sigh, and this.
9967 (camel_folder_finalize): Unref the summary if we have it.
9968 (camel_folder_free_uids): Remove locking.
9969 (camel_folder_get_message_flags): Remove locks, since the summary
9971 (camel_folder_set_message_flags): "
9972 (camel_folder_get_message_user_flag): "
9973 (camel_folder_set_message_user_flag): "
9974 (camel_folder_get_message_user_tag): "
9975 (camel_folder_set_message_user_tag): "
9976 (camel_folder_get_message_info): "
9977 (camel_folder_free_message_info): "
9978 (camel_folder_get_uids): "
9979 (camel_folder_free_summary): "
9980 (camel_folder_get_unread_message_count): "
9981 (get_unread_message_count): Check we got info, no big deal, but
9982 the summary might change while we're counting, and upset the count
9984 (camel_folder_get_message_count): Remove locks.
9986 * camel-folder.h (struct _CamelFolder): Added CamelFolderSummary
9987 to the base folder object. Sigh, this is going to be a lot of
9990 * camel-service.c (camel_service_init, finalise): changed
9991 connect_lock to be recursive e_mutex.
9993 * camel-remote-store.c (camel_remote_store_init, finalise): Changed
9994 stream_lock to recursive e_mutex.
9996 * camel-private.h (RemoteStorePrivate, ServicePrivate): Use
9997 recursive mutexes for connect_lock & stream_lock. Ick. Because
10000 * providers/imap/camel-imap-private.h: Change the command_lock to
10003 * providers/imap/camel-imap-store.c (connect_to_server): Removed
10004 the command_lock stuff. If we are just connected again, it should
10005 be safe to assume we have exclusive access at this point without
10006 it (and yes, removes a deadlock).
10007 (imap_create): Remove a lock that wasn't even supposed to be
10009 (camel_imap_store_finalize, init): g_mutex->e_mutex(E_MUTEX_REC).
10010 Use a recursive mutex since the imap code is multiply recursivly
10011 calling some functions (sigh, it would be nice to fix this).
10013 2000-12-20 Not Zed <NotZed@HelixCode.com>
10015 * camel-folder.c (folder_changed): Change the locks to inside the
10016 if. Stops a deadloc,k and we dont need a lock to read a value.
10017 (message_changed): Likewise.
10019 * camel.c (camel_init): Blah, comment out g_thread_init, leave it
10020 to the caller, since it can only ever be done once.
10022 * camel-folder-thread.c (camel_folder_thread_messages_new): Ref
10023 and save the folder in the thread return. Also get the summary
10024 once, and access that for the messageinfo's. Added bonus that now
10025 threads should come out in a similar order. We need to do this so
10026 that the messageinfo's dont get unref'd under us, and using the
10027 summary directly simplifies memory management.
10028 (camel_folder_thread_messages_destroy): Free the summary/unref the
10031 * camel-folder-thread.h: Add a folder to CamelFolderThread struct.
10033 2000-12-19 Not Zed <NotZed@HelixCode.com>
10035 * providers/imap/camel-imap-utils.c (imap_translate_sexp): Unref
10036 using e_sexp_unref, since it is no longer an object.
10038 * tests/lib/camel-test.c: Added a global lock, and made it
10041 * camel-exception.c: Add a global lock. Not sure its really
10042 needed here, but it doesn't really hurt.
10043 (camel_exception_clear): Lock around access.
10044 (camel_exception_set): Same.
10045 (camel_exception_setv): "
10046 (camel_exception_xfer): "
10048 * providers/local/Makefile.am (noinst_HEADERS): Added, for
10049 camel-local-private.h
10051 * camel-folder.c (camel_folder_search_by_expression): Removed
10052 locking here, now upto the implementing class to lock.
10053 (camel_folder_search_free): Removed the folder lock here too, for
10054 consistency really, and the locking probably wasn't needed.
10056 * providers/local/camel-local-folder.c (local_get_summary):
10057 Changed to copy/ref the summary items.
10058 (local_free_summary): Unref the summary items/free the array.
10059 (local_get_unread_message_count): Free info lookups.
10060 (local_search_by_expression): Perform more fine-grained locking,
10061 and dont lock the whole folder while searching, just the search
10062 object. Dum de dum, it *would* be possible to not even have to
10063 lock the search, by using our own copy of the search object each
10064 time. Could be investigated.
10065 (local_init): Init priaate data/lock.
10066 (local_finalize): Free private data/lock.
10067 (local_search_free): Also lock around the search object, because
10068 it accesses global data inside.
10070 * README.mt: Some info about the mt code development.
10072 * camel-folder-search.c (match_message): Put in a warning, this
10073 plain deadlocks so far, but i'm going to bed now.
10074 (camel_folder_search_finalize): Use e_sexp_unref() since its no
10077 * camel-session.c (camel_session_init): Init private data/lock.
10078 (camel_session_finalise): Free private data/lock.
10079 (camel_session_register_provider): Lock hash insert.
10080 (service_cache_remove): Lock.
10081 (camel_session_list_providers): "
10082 (camel_session_get_service): Lock the whole function.
10084 * camel-session.h (struct _CamelSession): Added private data.
10086 * providers/imap/camel-imap-store.c (camel_imap_store_init): Setup
10088 (camel_imap_store_finalize): Free private data.
10089 (connect_to_server): Lock around command calls. I dont think its
10090 needed, but it shouldn't hurt either.
10091 (imap_connect): Lock around command calls. Again, I don think it
10092 is needed, but wont hurt.
10093 (imap_disconnect): ditto for this one.
10094 (imap_create): Lock around command.
10096 (get_folder_info): "
10097 (subscribe_folder): "
10098 (unsubscribe_folder): "
10099 (imap_keepalive): "
10101 * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Lock
10102 around calling a command.
10103 (imap_refresh_info): Likewise.
10105 (imap_append_message): "
10106 (imap_copy_message_to): "
10107 (imap_move_message_to): "
10108 (imap_get_message): "
10109 (imap_update_summary): "
10110 (imap_search_by_expression): ", also minor logic cleanup.
10111 (imap_get_summary): Copy/ref the summary items.
10112 (imap_free_summary): And free it now too.
10114 * providers/imap/camel-imap-auth.c (imap_try_kerberos_v4_auth):
10115 Lock the command stream for the command session.
10117 * providers/imap/camel-imap-private.h: Private (locking info)
10118 stuff for imap provider.
10119 (CAMEL_IMAP_STORE_UNLOCK): Fix to call unlock, rather than lock!
10121 * camel-service.c (camel_service_query_auth_types): Lock also for
10122 the connection here, incase the service needs to connect.
10124 * camel-remote-store.c (camel_remote_store_init): Init private
10126 (camel_remote_store_finalise): Readded, free private data/lock.
10127 (remote_send_stream): Changed to return the number of bytes
10128 written, like a good little stream function should.
10129 (camel_remote_store_send_string): Lock for stream access.
10130 (camel_remote_store_send_stream): Same here.
10131 (camel_remote_store_recv_line): And here.
10132 (camel_remote_store_refresh_folders): Lock the store for cache
10134 (timeout_cb): Lock for stream access.
10136 2000-12-18 Not Zed <NotZed@HelixCode.com>
10138 * camel-service.c (camel_service_init): Init private data.
10139 (camel_service_finalise): Free private data.
10140 (camel_service_connect): Lock around connection access.
10141 (camel_service_disconnect): "
10143 * camel-service.h (struct _CamelService): Added private field.
10145 * camel-store.c (camel_store_init): Init private data/lock.
10146 (camel_store_finalize): Free private data/lock.
10147 (camel_store_get_folder): Lock internal calls.
10148 (camel_store_delete_folder): "
10149 (camel_store_rename_folder): "
10150 (camel_store_get_root_folder): "
10151 (camel_store_get_default_folder): "
10152 (camel_store_get_folder_info): "
10153 (camel_store_folder_subscribed): "
10154 (camel_store_subscribe_folder): "
10155 (camel_store_unsubscribe_folder): "
10156 (lookup_folder): Lock accesses to the folder cache.
10158 (uncache_folder): And here too.
10160 * camel-store.h (struct _CamelStore): Added a private field.
10162 * Makefile.am (noinst_HEADERS): Add camel-private.h. There is a
10163 comment in that header as to why it ins't installed.
10165 * camel-private.h: New header for private data, that subclasses
10168 * tests/lib/camel-test.c (camel_test_init): If we do have threads
10169 enabled already, dont call g_thread_init().
10171 * tests/lib/folders.c (test_folder_counts): Add free of info.
10172 (test_folder_message): And here too.
10174 * providers/local/camel-maildir-summary.c (remove_summary): Free
10176 (maildir_summary_check): Free info lookups.
10178 * providers/local/camel-mh-summary.c (message_info_new): Removed,
10180 (remove_summary): free info after being used.
10181 (mh_summary_check): Free info lookups.
10182 (mh_summary_sync): and here too.
10184 * providers/local/camel-mbox-summary.c (summary_update): Free info
10186 (mbox_summary_sync_full): Likewise.
10187 (mbox_summary_sync_quick): And here.
10188 (mbox_summary_sync): ... and here.
10190 * providers/local/camel-maildir-folder.c (maildir_get_message):
10191 Free messageinfo lookups.
10193 * providers/local/camel-mh-folder.c (mh_get_message): Free
10194 messageinfo lookups.
10196 * providers/local/camel-mbox-folder.c (mbox_get_message): Free
10197 messageinfo lookups.
10199 * providers/local/camel-local-summary.c
10200 (message_info_new_from_message): Removed, since it wasn't doing
10202 (message_info_new_from_parser): Same. And some other dead code.
10204 * providers/local/camel-local-folder.c (local_get_message_info):
10206 (local_free_message_info):new func to free info.
10208 (local_get_message_flags):
10209 (local_set_message_flags):
10210 (local_get_message_user_flag):
10211 (local_set_message_user_flag):
10212 (local_get_message_user_tag):
10213 (local_set_message_user_tag): Free all info lookups.
10214 (local_expunge): Dont call camel_folder_* functions, to avoid a deadlock.
10216 * providers/nntp/camel-nntp-folder.c
10217 (nntp_folder_get_message_info): deconstify.
10218 (nntp_folder_free_message_info): Free summary item.
10219 (nntp_folder_get_message_flags): Free summary lookup.
10220 (nntp_folder_set_message_flags): and here.
10221 (nntp_folder_get_uids): And here.
10223 * providers/imap/camel-imap-auth.c: Make base64_*_simple optional
10224 with the HAVE_KRB4 flag.
10226 * providers/imap/camel-imap-folder.c (imap_free_message_info):
10227 Added a free of the message info.
10228 (imap_refresh_info):
10230 (imap_refresh_info):
10231 (imap_get_unread_message_count):
10233 (imap_get_message_flags):
10234 (imap_set_message_flags): Free any summary lookups.
10235 (imap_get_message_flags): Get the message info directly from the
10236 summary, not via the folder interface.
10237 (imap_move_message_to): Dont call folder functions directly
10238 (delete_message), as it will deadlock since we already have the
10241 * providers/vee/camel-vee-folder.c (vee_free_message_info): Free/unref
10243 (vee_get_message_info): First ref the internal copy, then return it.
10244 (folder_changed): Free all got message info's.
10245 (message_changed): And here.
10246 (get_real_message): And here.
10247 (vee_folder_build): and here.
10248 (vee_folder_build_folder): ... and here.
10250 * camel-folder-summary.c (camel_folder_summary_info_new):
10251 Initialise the messageinfo refcount to 1.
10252 (camel_folder_summary_info_free): Down the refcount till we need
10254 (camel_folder_summary_info_ref): New function to up the refcount.
10255 (camel_message_info_dup_to): Sewt the refcount of the dest to 1.
10256 (camel_message_info_new): Set refcount to 1.
10257 (camel_message_info_new_from_header): Dont allocate the mi
10259 (camel_message_info_free): Handle refcounting.
10260 (camel_message_info_ref): New function.
10261 (camel_folder_summary_index): Ref the messageinfo before returning
10263 (camel_folder_summary_uid): Likewise.
10264 (camel_folder_summary_save): Access the messageinfo array
10265 directly, rather than through accessors (saves ref/unref).
10266 (camel_folder_summary_clear): Likewise.
10267 (camel_folder_summary_remove_index): Likewise.
10268 (main): Free lookups.
10270 * camel-folder-summary.h (CamelMessageInfo): Added a refcount
10273 * camel-folder.c (camel_folder_free_message_info): New function to
10274 'free' a message info.
10275 (camel_folder_get_message_info): Deconstify return.
10276 (camel_folder_lock): New (internal) function to thread-lock the
10278 (camel_folder_unlock): Likewise for unlocking.
10280 (thaw): Lock around access to folder->frozen/changed_frozen.
10281 (folder_changed): Likewise.
10282 (message_changed): Likewise.
10283 (camel_folder_init): Init private data, locks and moved frozen
10285 (camel_folder_finalize): Free new private data, locks and moved
10287 (copy_message_to): Free the messageinfo after we've used it.
10288 (move_message_to): And here too.
10289 (camel_folder_sync): Lock around virtual method invocation. Just
10290 locking around any virtual method that is known to need it. This
10291 is the first cut at locking.
10292 (camel_folder_refresh_info): "
10293 (camel_folder_expunge): "
10294 (camel_folder_get_message_count): "
10295 (camel_folder_get_unread_message_count): "
10296 (camel_folder_append_message): "
10297 (camel_folder_set_message_flags): "
10298 (camel_folder_get_message_flags): "
10299 (camel_folder_get_message_user_flag): "
10300 (camel_folder_set_message_user_flag): "
10301 (camel_folder_get_message_user_tag): "
10302 (camel_folder_set_message_user_tag): "
10303 (camel_folder_get_message): "
10304 (camel_folder_get_uids): "
10305 (camel_folder_free_uids): "
10306 (camel_folder_get_summary): "
10307 (camel_folder_search_by_expression): "
10308 (camel_folder_free_summary): "
10309 (camel_folder_search_free): "
10310 (camel_folder_move_message_to): "
10311 (camel_folder_copy_message_to): "
10312 (copy_message_to): Dont call any of our own folder functions
10313 directly, otherwise we will deadlock.
10314 (move_message_to): Likewise.
10316 * camel-folder.h (CamelFolder): Added free_message_info() function
10317 & deconstify get_message_info()'s return.
10318 (CamelFolder): Add a private field (for locks).
10319 (struct _CamelFolder): Moved changed_changed/frozen into private
10320 data, since it really is private and now needs locked access.
10322 2000-12-15 Jeffrey Stedfast <fejj@helixcode.com>
10324 * camel-mime-utils.c (header_fold): When checking to see if we
10325 need to fold the header, when we come accross a \n, make sure to
10326 start at p + 1 the next time through the loop or else we get into
10329 2000-12-13 Dan Winship <danw@helixcode.com>
10331 * Namespace cleanup: change a bunch of IS_CAMEL_* macros to
10334 2000-12-13 Chris Toshok <toshok@helixcode.com>
10336 * providers/imap/camel-imap-auth.c: add #include <sys/types.h> for
10339 2000-12-12 Christopher James Lahey <clahey@helixcode.com>
10341 * camel-folder-summary.c, camel-folder-summary.h: Added #ifndef
10342 NO_WARNINGS around a #warning. Added (void) to the prototype and
10343 declaration of camel_message_info_new.
10345 * camel-mime-message.h: Added an include for
10346 camel-mime-filter-bestenc.h. Added a prototype for
10347 camel_mime_message_set_best_encoding. Reformatted prototypes to
10350 * camel-mime-parser.c: Added #if d(!)0 around the states string
10351 lookup table since it's only used in debugging output.
10353 * camel-seekable-substream.c (stream_flush): Added a cast.
10355 * providers/imap/camel-imap-auth.c: Added #include <netinet/in.h>.
10357 * providers/imap/camel-imap-folder.c (imap_refresh_info): Made uid
10358 and flags const to fix warnings here.
10360 * providers/imap/camel-imap-store.c (get_folder_info): Made p
10361 const to fix warnings here.
10363 2000-12-12 Dan Winship <danw@helixcode.com>
10365 * tests/lib/Makefile.am: Add missing .h file. (From campd.)
10367 2000-12-11 Not Zed <NotZed@HelixCode.com>
10369 * providers/smtp/camel-smtp-transport.c (smtp_data): Remove use of
10370 linewrap filter. Headers are now wrapped. encode_8bit already
10371 enforces a 998 octet line limit.
10372 (smtp_data): Also fixed a memleak, we always have to unref our own
10373 copy of the filters. We also dont need to remove them manually,
10374 so dont bother. The type's an int too ...
10376 * camel-internet-address.c (internet_unformat): When scanning past
10377 quotes, remove them also.
10378 (camel_internet_address_format_address): If the name contains "'s,
10379 or ','s then strip and quotes and wrap the whole lot in one set of
10382 * Makefile.am (noinst_HEADERS): We dont want to install
10383 camel-charset-map-private.h, ever. There are probably other
10386 * camel-mime-part.c (write_to_stream): Fold header lines
10387 appropriately as we're writing them out.
10389 * camel-mime-utils.c (header_fold): Add a new argument, headerlen,
10390 tells it how long the associated header token is.
10391 (header_fold): Also,k check to see if we need to fold first, using
10392 a better algorithm, and also accept already-folded lines, and
10393 re-process accordingly.
10394 (rfc2047_decode_word): Add a little buffer space to iconv output
10395 for shifting overheads?
10396 (rfc2047_decode_word): finish the iconv with a null call, to flush
10398 (rfc2047_encode_word): Attempt to break up long words into
10399 appropriately sized, independent, chunks. See rfc2047, section 2.
10400 (header_decode_mailbox): Dont add in extra spaces into the output
10401 if we are decoding adjacent encoded words. We can only guess this
10402 case, as some broken mailers put encoded words inside quoted
10404 (header_encode_phrase): Dont merge words if they are going to end
10405 up too long. Also change back ot only merge consecutive words of
10406 the same type. e.g. 'foo. blah fum.' -> "foo." blah "fum." or
10407 'iam an. idiot' -> iam "an." idiot
10409 * camel-medium.c (camel_medium_set_header): Hrm, we actually want
10410 to call set_header, not add_header here, probably explains some
10411 duplicate X-Evolution headers i was trying to track down. Also
10412 changed the api to handle a NULL value == remove the header.
10414 * providers/local/camel-maildir-summary.c
10415 (maildir_summary_decode_x_evolution): Always return error, we dont
10416 use x-evolution for maildir.
10417 (maildir_summary_encode_x_evolution): Always return a NULL string,
10419 (maildir_summary_add): Hook in here, since the _new function
10420 doesn't have access to any flags from the caller. If we have
10421 flags, then update the filename again. Not ideal, but should
10424 2000-12-08 JP Rosevear <jpr@helixcode.com>
10426 * tests/message/Makefile.am: Remove test3 from build until the files
10429 2000-12-09 Not Zed <NotZed@HelixCode.com>
10431 * camel-mime-message.c (camel_mime_message_set_date): Change the
10432 sign of the default date offset when none is supplied.
10433 (camel_mime_message_set_date): Also do dst if its dst (forward 1
10434 hour). Fixes #928 + some.
10436 2000-12-06 Not Zed <NotZed@HelixCode.com>
10438 * tests/lib/camel-test.h (check): Change line no format so that
10439 emacs can detect it.
10441 2000-12-06 Jeffrey Stedfast <fejj@helixcode.com>
10443 * providers/imap/camel-imap-folder.c (imap_refresh_info): We want
10444 to bitwise-or the server and cached flags here so that we keep the
10445 flags that we have set locally and set any additional flags that a
10446 parallel connection may have set.
10448 2000-12-05 Jeffrey Stedfast <fejj@helixcode.com>
10450 * providers/smtp/camel-smtp-transport.c (smtp_data): If the data
10451 wrapper fails to be written to the stream, unref it and the
10452 filters before returning.
10454 2000-12-05 Dan Winship <danw@helixcode.com>
10456 * providers/imap/camel-imap-folder.c (imap_get_message): use
10457 BODY.PEEK[] rather than RFC822, so the message doesn't get marked
10459 (imap_refresh_info): Fix a really really really dumb bug.
10461 2000-12-05 Dan Winship <danw@helixcode.com>
10463 * providers/imap/camel-imap-folder.c (imap_set_message_flags): Fix
10464 the check for "flags aren't actually changing".
10466 * providers/local/camel-local-folder.c (local_set_message_flags,
10467 local_set_message_user_flag, local_set_message_user_tag): Don't
10468 emit message_changed unless the flags actually changed.
10470 * providers/nntp/camel-nntp-folder.c
10471 (nntp_folder_set_message_flags): Don't emit message_changed unless
10472 the flags actually changed. Fix the check for marked as seen.
10474 2000-12-05 Not Zed <NotZed@HelixCode.com>
10476 * camel-seekable-substream.c (stream_flush): stream_flush does
10477 make sense for a substream afterall (if you have a stream_write).
10478 (stream_write): Implement this.
10479 (stream_seek): Change the STREAM_END behaviour to be more sane.
10480 if bounded go from the end of the bound, if unbounded, go from the
10481 end of the parent stream.
10483 * camel-stream-mem.c (stream_read): Dont return error if reading
10484 past the end of data, just return 0.
10486 * camel-stream-fs.c (camel_stream_fs_init): Initialise the stream
10488 (stream_seek): Fix the logic when seeking from the end of an
10490 (camel_stream_fs_new_with_fd): If the fd is invalid (-1), then
10491 return NULL immediately.
10492 (stream_seek): Range check a SEEK_END so it fits within
10495 2000-12-01 Not Zed <NotZed@HelixCode.com>
10497 * tests/lib/folders.c (test_folder_basic): New test to perform
10498 basic store operations on folders (taken from folders/test1).
10499 (test_folder_message_ops): Tkane the guts out of folders/test2.
10501 2000-12-04 Jeffrey Stedfast <fejj@helixcode.com>
10503 * providers/smtp/camel-smtp-transport.c (smtp_connect): i18n-ize
10505 (get_name): And here.
10506 (_send_to): Here too.
10507 (smtp_helo): And here and there...
10508 (smtp_mail): And around the square...
10509 (smtp_rcpt): Saying catch me if you can...
10510 (smtp_data): And here three.
10511 (smtp_rset): And here.
10512 (smtp_quit): And finally here.
10514 2000-12-01 Jeffrey Stedfast <fejj@helixcode.com>
10516 * camel-folder-search.h: Added system_flag to CamelFolderSearchClass
10518 * camel-folder-summary.c (camel_system_flag_get): Convenience
10519 function to return whether or not a flag is set using a string as
10521 (camel_system_flag): Return the integer value of the flag string.
10523 * camel-folder-search.c (search_system_flag): New ESExp callback
10524 for allowing vfoldering on CamelMessageInfo flags.
10526 2000-12-01 Dan Winship <danw@helixcode.com>
10528 * camel-service.c (camel_service_disconnect): Don't
10529 g_return_if_fail if the service is already disconnected. Just
10532 * providers/pop3/camel-pop3-store.c (pop3_try_authenticate):
10533 Return FALSE (don't try again) if we get CAMEL_POP3_FAIL.
10534 (pop3_connect): If we don't succeed, disconnect.
10536 2000-11-30 Jeffrey Stedfast <fejj@helixcode.com>
10538 * providers/imap/camel-imap-store.c
10539 (parse_list_response_as_folder_info): Fix a possible bug where
10540 'name' could be uninitialized.
10542 * camel-folder-summary.c (camel_message_info_new): New convenience
10543 function, doesn't do much but it sure makes code cleaner to read.
10544 (camel_message_info_new_from_header): This one makes my life heaven.
10546 2000-11-30 Jeffrey Stedfast <fejj@helixcode.com>
10548 * providers/imap/camel-imap-summary.c (camel_imap_summary_new):
10549 Handle the case where the summary failed to load - clear the
10550 summary and then set the dirty bit so that it is sure to save
10551 later. Is this the right fix?
10553 2000-11-30 Dan Winship <danw@helixcode.com>
10555 * camel-exception.c (camel_exception_setv): Remove unused
10558 2000-11-30 Not Zed <NotZed@HelixCode.com>
10560 * providers/local/camel-mbox-folder.c (mbox_get_message): Remove
10561 assertion that content is there, when it no longer can be.
10563 * camel-folder-summary.h: Removed pos/bodypos/endpos from
10564 camelmeessagecontentinfo.
10565 (CamelMessageFlags): Added an attachments flag.
10567 * providers/local/camel-local-summary.h: Added load virtual
10570 * tests/lib/folders.c (test_message_info): Accessors.
10571 (test_folder_message): "
10573 * camel-folder-thread.c (get_root_subject): Fix accessors.
10576 * camel-folder-search.c (camel_folder_search_execute_expression):
10577 Accessors for messageinfo.
10578 (search_match_all): "
10579 (search_header_contains): "
10580 (search_header_contains): "
10581 (search_body_contains): "
10582 (camel_folder_search_execute_expression): Use mepool_strdup.
10584 * providers/local/camel-mbox-summary.c (summary_update): Accessors
10586 (mbox_summary_sync_full): "
10588 * providers/local/camel-mh-summary.c (remove_summary): Accessors
10590 (mh_summary_check): "
10591 (mh_summary_sync_message): "
10592 (mh_summary_sync): "
10594 * providers/local/camel-mh-folder.c (mh_append_message): Use
10597 * providers/local/camel-local-summary.c
10598 (local_summary_decode_x_evolution): Use accessor to uid.
10599 (local_summary_encode_x_evolution): Likewise.
10600 (message_info_new): And here.
10601 (camel_local_summary_load): Call virtual load function.
10602 (local_summary_load): Default load function, load summary.
10603 (camel_local_summary_load): Check file exists before trying to
10605 (camel_local_summary_construct): Turn off building content info!
10606 (CAMEL_LOCAL_SUMMARY_VERSION): Bump, since we dont build content
10608 (camel_local_summary_load): After a successful load/check, do a
10609 save too so we dont have to go through it again randomly.
10611 * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): Use
10612 accessors for messageinfo.
10614 * providers/nntp/camel-nntp-folder.c (nntp_folder_get_uids): Use
10617 * providers/imap/camel-imap-folder.c (imap_refresh_info): Use
10619 (imap_sync): Likewise.
10620 (imap_get_uids): Likewise.
10621 (imap_update_summary): And here.
10623 * providers/vee/camel-vee-folder.c (vfolder_remove_match): Use
10625 (vfolder_add_match): Handle estrv stuff.
10626 (vfolder_change_match): Accessor for uid.
10627 (get_real_message): "
10629 (vee_folder_build): " + estrv.
10630 (vee_folder_build_folder): "
10632 * providers/local/camel-maildir-folder.c (maildir_append_message):
10633 Use acccessors for uid's.
10634 (maildir_get_message): Here too.
10636 * providers/local/camel-maildir-summary.c
10637 (camel_maildir_summary_init): Setup the string count for us.
10638 (message_info_new): Access the string array directly.
10639 (message_info_free): No need to free string if using array.
10640 (camel_maildir_summary_info_to_name): Use accessor to get to uid.
10641 (remove_summary): And here.
10642 (maildir_summary_check): Likewise.
10643 (maildir_summary_sync): And here.
10644 (maildir_summary_load): Load up a cache of uid->filename mappings
10645 before loading the actual summary file. This saves us having to
10646 waste the diskspace storing the filenames in the summary itself,
10647 and also helps us sync the summary better on load.
10648 (message_info_load): If we have the load_map setup, and the uid
10649 exists, then set the filename cache from it, and update the flags
10650 from the name, incase our summary mismatches it.
10652 * camel-folder-summary.c (camel_folder_summary_init): Setup string
10653 count for compressed info record. An optional compile mode which
10654 stores all strings for a given messageinfo into a packed array,
10655 which should save 36-50 bytes/record.
10656 (camel_folder_summary_info_new): Init the string array.
10657 (message_info_new): Set the string array items, as required.
10658 (message_info_load): And here too.
10659 (message_info_save): Use accessors to get to strings.
10660 (message_info_free): Free strings as one.
10661 (camel_message_info_dup_to): Handle packed array case.
10662 (camel_folder_summary_add): Use accessors. And pack the strv
10664 (summary_assign_uid): New function to assign a unique uid to a
10665 message, if it doesn't have one.
10666 (camel_folder_summary_add): Call assign_uid instead of doing it
10668 (camel_folder_summary_info_new_from_parser): "
10669 (camel_folder_summary_info_new_from_message): "
10670 (camel_folder_summary_encode_string): constify.
10671 (camel_folder_summary_encode_token): "
10672 (summary_build_content_info_message): Fix accessors to messageinfo.
10673 (CAMEL_FOLDER_SUMMARY_VERSION): Bumped, for removal of
10674 contentinfo->pos data.
10675 (camel_folder_summary_info_new_from_parser): Calculate the size
10676 based on the parser position, not the removed contentinfo stuff.
10677 (camel_folder_summary_info_new_from_message): Remove size stuff.
10678 (camel_folder_summary_offset_content): Removed, no longer means anything.
10679 (content_info_new):
10680 (content_info_load):
10681 (content_info_save):
10682 (summary_build_content_info): Remove stuff for contentinfo->pos*.
10683 (summary_build_content_info): Take a msginfo argument, set
10684 attachments flag if we find any attachments.
10685 (summary_build_content_info_message): set attachments flag if we
10686 find any attachments.
10687 (camel_folder_summary_info_new_from_parser): Always scan the
10688 content info, even if we dont save it.
10689 (camel_folder_summary_info_new_from_message): And here too.
10690 (summary_build_content_info): Only create the contentinfo stuff if
10691 we have it turned on, otherwise just parse and discard.
10692 (summary_build_content_info_message): Likewise.
10694 2000-11-29 Jeffrey Stedfast <fejj@helixcode.com>
10696 * camel-store.c (camel_store_get_folder): Updated the gtk-doc
10699 2000-11-29 Dan Winship <danw@helixcode.com>
10701 * camel-mime-utils.c:
10702 * camel-mime-filter-charset.c: Use iconv instead of unicode_iconv.
10704 * providers/imap/camel-imap-command.c (imap_read_untagged): Fix
10705 some off-by-one-ness.
10707 * camel-stream-buffer.c (stream_read): Fix another bug found in
10708 previously-unused code here.
10710 2000-11-29 Ettore Perazzoli <ettore@helixcode.com>
10712 * tests/lib/Makefile.am (INCLUDES): `$(top_srcdir)' for builddir
10713 != srcdir compilation.
10715 2000-11-29 Not Zed <NotZed@HelixCode.com>
10717 * tests/message/test2.c (main): Add a missed unref.
10719 * camel-stream-mem.c (camel_stream_mem_set_buffer): We must set
10720 ourselves as the owner of the byte-array.
10721 Weird, someone has modified this file (its been reindented), but i
10722 can't see any changelogs ...
10724 * tests/lib/messages.c (content_finalise): Fix memleak in tester,
10725 free byte array when our content object is deleted.
10727 * camel-folder-search.c (camel_folder_search_finalize): Yeah
10728 great, so the sexp is a gtk object, not a camel object. Isn't
10729 that going to be fun to fix?
10731 * camel-session.c (camel_session_finalise): Free the storage path.
10733 * providers/local/camel-local-store.c (camel_local_store_init): If
10734 store->folders is setup, free it first, then overwrite. Hmm,
10735 this seems a bit crappy to me.
10737 * camel-store.c (camel_store_init): Dont setup store->folders if
10740 * camel-exception.c (camel_exception_setv): Removed a memleak. no
10741 need to strdup after a strdup_printf!!!
10743 * camel-address.c (camel_address_finalize): Free the address
10744 ptrarray, once finished.
10746 * providers/local/camel-local-folder.c (local_finalize): Make sure
10747 we dont leave the folder locked on close.
10748 (local_finalize): Free summary/search.
10750 * providers/local/camel-mh-summary.c (mh_summary_next_uid_string):
10751 Small memleak, always free name after using it.
10753 * camel-mime-part.c (set_content_object): Free txt after setting
10756 * providers/local/camel-maildir-summary.c (maildir_summary_check):
10757 Fix a memleak, close the dir after scanning new.
10758 (message_info_free): Added so we can free the filename cached in
10760 (camel_maildir_summary_finalise): Free the hostname.
10762 * tests/folder/test[12].c (main): Clear out camel-test before
10765 * providers/local/camel-mbox-summary.c (mbox_summary_sync_quick):
10766 Because encode_x_evolution folds the line (sigh, because
10767 encode_param does, unlike every other function in
10768 camel-mime-utils), unfold the encoded result before comparing.
10769 (mbox_summary_sync_quick): Another small memleak, free xevnew once
10772 * camel-mime-utils.c (header_decode_quoted_string): Removed a
10773 redundant check for c=0.
10774 (header_unfold): New function to un-fold headers.
10776 * providers/local/camel-local-summary.c
10777 (local_summary_encode_x_evolution): some problems with encoding
10778 tags, using the wrong output strings.
10779 (local_summary_encode_x_evolution): We dont need to append a ;
10780 either, param_list_format_append() will do it for us.
10782 2000-11-28 JP Rosevear <jpr@helixcode.com>
10784 * camel-lock.c: No longer hard code the enabled lock types
10786 2000-11-28 Dan Winship <danw@helixcode.com>
10788 * camel-remote-store.c (remote_recv_line): Don't set exception to
10789 g_strerror (errno) when nread == 0, because it won't have been
10792 * providers/pop3/camel-pop3-folder.c (pop3_finalize): Don't try to
10793 free things if they haven't been set yet.
10795 2000-11-28 Jeffrey Stedfast <fejj@helixcode.com>
10797 * providers/smtp/camel-smtp-transport.c (smtp_connect): Clear the
10798 exception if EHLO fails before trying HELO in the cases where the
10799 SMTP provider doesn't announce its ESMTPness.
10801 2000-11-28 Not Zed <NotZed@HelixCode.com>
10803 * providers/local/camel-maildir-summary.c
10804 (camel_maildir_summary_init): Set the info size's properly, oops!
10806 * tests/lib/folders.[ch]: Folder testing helpers.
10808 * tests/folder/test2.c: Test basic message ops on folders.
10810 * tests/folder/test1.c (main): Test basic folder ops on (local)
10813 * providers/local/camel-local-provider.c
10814 (camel_provider_module_init): Removed some debug.
10816 * providers/local/camel-maildir-folder.c
10817 (camel_maildir_folder_class_init): fix parent class.
10819 * providers/local/camel-mh-folder.c (camel_mh_folder_class_init):
10820 Fix parent class (damn cut & paste).
10822 * providers/local/camel-maildir-store.c (get_folder): Call parent
10824 (camel_maildir_store_class_init): Fix parent class setup.
10825 (delete_folder): Check the folder exists before trying to delete
10827 (delete_folder): Try and make the delete operation atomic/rollback
10828 failures. e.g. if one directory isn't empty, then create the
10829 other empty ones back. Also clear the tmp directory fully first.
10831 * providers/local/camel-mbox-store.c (get_folder): Call parent
10833 (camel_mbox_store_class_init): parent class is camel_local_store,
10834 not camel_folder, oops.
10835 (delete_folder): Return an error if it doesn't exist, rather than
10838 * providers/local/camel-mh-store.c (get_folder): Call parent impl.
10839 (camel_mh_store_class_init): fix parent class setup.
10840 (delete_folder): Error if it doesn't exist now.
10842 * camel-folder.c (camel_folder_move_message_to):
10843 (camel_folder_copy_message_to): Added warnings as these functions
10844 are going to be removed later.
10846 * camel-store.c (camel_store_get_root_folder): Fix for an early
10847 api change. We want CAMEL_STORE_FOLDER_CREATE, not TRUE, since
10849 (camel_store_get_default_folder): And here too.
10851 * providers/local/camel-local-store.c (xrename): Handle renaming
10852 folders differently to renaming files.
10853 (get_default_folder_name): local stores dont have a default
10854 folder, so make it so. Or at least, it doesn't seem to make sense
10856 (get_root_folder_name): Same for root.
10857 (get_folder): Added parent implementation, that makes sure the
10858 service path exists, if we are creating a new folder (but doesn't
10859 create the folder).
10861 2000-11-27 Not Zed <NotZed@HelixCode.com>
10863 * providers/local/camel-local-store.c (xrename): Fixed races. Use
10864 link/unlink, rather than rename, to properly detect overwriting
10865 another file. And allow some files to be missing.
10867 2000-11-28 Radek Doulik <rodo@helixcode.com>
10869 * providers/local/camel-local-summary.c
10870 (local_summary_decode_x_evolution): add scan = scan->next; to
10871 avoid infinite loop
10873 2000-11-27 Dan Winship <danw@helixcode.com>
10875 * providers/imap/camel-imap-command.c (imap_read_untagged): Make
10876 this gratuitously more complicated. No wait, I mean, fix bugs. Now
10877 fully handles NULs in the data stream (which "can't happen" but
10878 do) and also handles responses containing multiple literals. Also
10879 does less copying than the original code.
10881 * camel-stream-buffer.c (stream_read): Fix a bug that could make
10882 it lose sync and/or overrun buffers.
10884 2000-11-27 JP Rosevear <jpr@helixcode.com>
10886 * providers/local/.cvsignore: shush
10888 2000-11-27 Not Zed <NotZed@HelixCode.com>
10890 * providers/Makefile.am: Removed mh, mbox, added local, to the default.
10892 2000-11-24 Not Zed <NotZed@HelixCode.com>
10894 * tests/data/getaddr.pl: little util to scan mailboxes for any and
10895 every address they contain.
10897 * tests/message/test2.c (main): Added a bunch of stuff to test
10898 decoding/reencoding/etc of internationalised addresses.
10900 * tests/message/lib/address-data.h: Copy of some unicode/other
10901 testing data. **Beware** of editing this file in emacs, it'll
10902 probably try and convert all the characters to something
10905 * tests/lib/camel-test.c (camel_test_break): Add a debugger hook
10908 * camel-mime-utils.c (quoted_encode): Check for space and convert
10910 (header_decode_mailbox): Fixed the 'check comments for realname'
10911 code, problem was the domain getting code was skipping all
10912 whitespace/comments before we could get a look-in. This is
10913 approximate but fairly robust.
10914 (header_decode_text): Dont use the c-type isspace func here, we
10915 want a specific whitespace only.
10916 (header_decode_text): If we have decoded words next to each other,
10917 do not insert whitespaces between them, which is what rfc2047 requires.
10918 (header_decode_text): Make c unsigned too.
10920 * tests/README: Added at least some explanation of all this stuff.
10922 * tests/lib/camel-test.h (check_msg): Added a non-gcc version of
10923 the fail command, we dont get the expression that failed, but no
10924 matter. Should be (more) portable now.
10925 (check, check_msg): Put the file/lineno in the default message.
10927 * Makefile.am (SUBDIRS): Add tests.
10929 * camel-mime-filter-basic.c (filter): Well, I'll add the extra
10930 bytes here too, lathough not strictly needed, might save a
10931 re-malloc when we get to complete().
10933 * camel-mime-filter-charset.c (filter): Make sure we have room if
10934 we only convert very short data.
10935 (complete): and here too.
10937 * tests/Makefile.am: Initial test harness & tests. Requires gcc
10940 * camel-internet-address.c (d): Turn off debug.
10942 * camel-charset-map.c (camel_charset_step): Oops, & masks for set
10943 intersection, not | them. Dunno how this got even close to
10946 2000-11-23 Not Zed <NotZed@HelixCode.com>
10948 * camel-mime-filter-basic.c (filter): For base64 encoding, the
10949 output size for 0, 1, or 2 bytes of input can exceed input*2, so
10950 make sure we account for that as well.
10951 (complete): And here.
10952 (complete): Similarly for qp encoding, if we have a trailing
10953 space, we need some extra bytes (not needed for 'filter()', as any
10954 such bytes are stored in state/save).
10956 * camel-mime-utils.c (quoted_decode_step): Removed fixme not required.
10957 (quoted_encode_close): Dont append a trailing afterall. Otherwise
10958 a pass through the encode/decode will grow the message each time.
10960 2000-11-22 Radek Doulik <rodo@helixcode.com>
10962 * camel-mime-utils.c (header_msgid_generate): check for return
10965 2000-11-21 Dan Winship <danw@helixcode.com>
10968 * camel-movemail.c: add #ifdef HAVE_ALLOCA_H
10970 2000-11-21 Not Zed <NotZed@HelixCode.com>
10972 * providers/local/camel-mh-summary.c (mh_summary_sync_message):
10973 Shite, -1 on error, >=0 on success. So i've just been truncating
10974 all the messages I touched, good one zed.
10975 (mh_summary_sync_message): Sigh, and write to the right damn fd as
10977 (mh_summary_sync_message): Argh, and we need to compare the length
10978 of the old xev -1 to the new xev, to check if we can optimise it.
10980 * camel-folder.c (camel_folder_change_info_new): Init the pool.
10981 (camel_folder_change_info_add_source): Allocate string in the
10983 (camel_folder_change_info_add_source_list):
10984 (camel_folder_change_info_add_update): No longer free the key, as
10986 (change_info_add_uid): Add a new arg, copy, telling it whether to
10987 copy the uid argument or not, and copy using mempool_strdup.
10988 (change_info_cat): Tell add_uid to copy the string.
10989 (camel_folder_change_info_add_update): Call add_uid directly.
10990 (change_info_remove): Call add_uid directly, with no copy, and
10992 (change_info_free_update): No longer required since we dont malloc
10994 (camel_folder_change_info_add_uid): Fix for add_uid change.
10995 (camel_folder_change_info_remove_uid):
10996 (camel_folder_change_info_change_uid):
10997 (change_info_clear): No longer needed, just set the size to 0 on
10998 the array directly.
10999 (camel_folder_change_info_clear): Empty the arrays directly, and
11000 flush the mempool too, and also clear uid_source, incase anyone
11001 was silly enough to call us in the wrong order.
11002 (camel_folder_change_info_free): Dont bother clearing the array's
11003 contents, just free the pool and throw away all the indexes.
11005 * camel-folder.h: Added a mempool to CamelFolderChangeInfo to
11006 store the uid's we get.
11008 * camel-folder-search.c (search_match_all): If we are only
11009 matching a single info, just use that/do the search.
11010 (camel_folder_search_match_expression): New function. Matches a
11011 single message info against an expression.
11012 (camel_folder_search_init): Init a hash table used to map the
11013 returned gptrarrays' to mempools.
11014 (camel_folder_search_execute_expression): Store all of the string
11015 data in a mempool, slightly faster, less wasted space (usually),.
11016 (camel_folder_search_free_result): Check for the mempool that
11017 stores the data for the list, and free that if we have it,
11018 otherwise assume we need to use g_free() (which should only happen
11019 if the list is empty at the moment).
11020 : commented out the debugging prints. Got sick of 'executing
11021 header search' crap.
11023 * providers/vee/camel-vee-folder.c (camel_vee_folder_init): Init
11025 (camel_vee_folder_finalise): Free changes.
11026 (vfolder_add_match): Simple helper to add a new matching info
11028 (camel_vee_folder_add_folder): Only trigger a changed event if we
11030 (vfolder_change_match): New function, changes our local vfolder
11031 info to match the source.
11032 (vfolder_add_match): Add a new info to the vfolder list.
11033 (vfolder_remove_match): Remove a no-longer matching info from the
11035 (message_changed): check if the message still matches, and
11036 remove/etc as required.
11037 (camel_vee_folder_finalise, init): init/free search object.
11038 (vee_folder_build_folder): Build the changes to the folder into
11039 the changes data, as we go.
11040 (folder_changed): If the folder gave us an explicit list of
11041 changes, then process each one separately (unless there's a lot
11044 * providers/vee/camel-vee-folder.h: Added a changes field to the
11047 * Makefile.am (libcamel_la_SOURCES): Added
11048 camel-folder-thread.[ch].
11050 * camel-folder-thread.c: message-threading algorithm, taken from
11051 evolutions' mail component, as it is generally more useful than
11052 just for evolution itself. Changed to use e-memchunks as well to
11053 speed it up a little and use less mem.
11055 2000-11-20 Jeffrey Stedfast <fejj@helixcode.com>
11057 * camel-remote-store.c (remote_recv_line): Fixed to return the
11058 correct bytecount in all cases which is the real fix to
11059 imap_parse_nstring.
11061 * providers/imap/camel-imap-command.c (imap_read_untagged): Again,
11062 don't use strlen for the post-data, use 'n'.
11064 * providers/imap/camel-imap-utils.c (imap_parse_nstring): Undo my
11067 2000-11-20 Not Zed <NotZed@HelixCode.com>
11069 * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): Fixes for
11070 the summary messageid changes. Hash the messageid and store it.
11071 (get_XOVER_headers): Use camel_folder_summary_info_new() to create
11072 the summary item before adding it.
11074 * camel-folder-summary.h (CamelMessageInfo): Changed the
11075 messgae-id to be an 8 byte md5 hash, and the references list to be
11078 * providers/local/camel-mh-summary.c (mh_summary_sync_message):
11079 New function, sync out the message info stuff. Only updates the
11080 X-Ev header if it can get away with it, otherwise writes out a
11082 (mh_summary_sync): Added more functionality. All summary info is
11083 now written to the X-Ev header, etc, and new messages re-written
11084 if required during the sync process.
11086 * providers/local/camel-local-folder.c
11087 (local_set_message_user_flag): Set the XEVCHANGE flag.
11088 (local_set_message_user_tag): And here too.
11090 * providers/local/camel-local-summary.h: New flag
11091 CAMEL_MESSAGE_FOLDER_XEVCHANGE to indicate the XEV header has
11092 probably changed size and needs to be rewritten in whole.
11094 * camel-folder-summary.c (next_uid_string): Want this static, not
11096 (message_info_new): Store the references and message-id values as
11097 64 bit, binary hashes.
11098 (message_info_load): fix for message-id/references changes.
11099 (message_info_save): Likewise.
11100 (camel_message_info_dup_to): And here.
11101 (camel_message_info_free): And here too. No longer free
11102 message_id, and simple free for references array.
11103 (CAMEL_FOLDER_SUMMARY_VERSION): Bumped file revision.
11104 (camel_folder_summary_init): Init memchunk allocators to empty.
11105 (camel_folder_summary_finalize): Free memchunk allocators if
11107 (message_info_new): Use the chunk allocator to allocate message
11109 (camel_folder_summary_info_new): New helper to allocate the
11110 message info, and setup the memchunk if required.
11111 (content_info_alloc): Likewise for content info's.
11112 (message_info_load): Use summary_info_new_empty.
11113 (content_info_new): Use content_info_alloc.
11114 (content_info_load): "
11115 (content_info_free): Free the content info as a memchunk.
11116 (message_info_free): Free everything directly and the base as a
11117 memchunk, rather than calling camel_message_info_free(), which
11118 assumes a malloc'd array.
11120 * providers/local/camel-local-summary.c: Include ctype.h, kill a
11122 (local_summary_decode_x_evolution): If we get a NULL message info,
11123 then dont try and set anything, just check for validity.
11124 (camel_local_summary_write_headers): New function to write a set
11125 of headers to an fd.
11126 (camel_local_summary_check): Added some statistic generation
11127 stuff for memory profiling.
11129 * providers/local/camel-mbox-summary.c (header_write): Changed to
11130 use stdoi functions to write out the header to a buffered stream,
11131 instead of using writev, which is apparently slow (and writing
11132 each line separately is slow anyway).
11133 (mbox_summary_sync_full): New implementation. Does things
11134 differently, doesn't use or require the content info stuff.
11135 (summary_rebuild): Dont return an error if we start scanning at
11137 (mbox_summary_sync_full): If we are not writing out new headers,
11138 make sure we copy the From line as we go, and update frompos
11140 (mbox_summary_sync_full): Always copy the From line from the
11141 existing one, rather than trying to make one up ourselves.
11142 (mbox_summary_sync): If we can get by with a quick-sync, then try
11143 it, if that fails, then try a full sync anyway.
11144 (mbox_summary_sync_quick): Quick sync. Only update system flags,
11146 (mbox_summary_sync_full): Use the proper local summary encode_xev
11148 (header_evolution_decode): Removed, no longer needed.
11149 (header_evolution_encode): Same.
11150 (copy_block): No longer needed, removed.
11151 (header_write): Removed, replaced with
11152 camel_local_summary_write_headers.
11153 (mbox_summary_sync_full): Fixed for header_write change.
11155 * camel-mime-parser.c (folder_scan_step): Implement the new
11156 optional parser state HSCAN_PRE_FROM, that returns the (currently
11157 unfiltered) input data.
11158 (folder_scan_drop_step): Do the right thing for the PRE_FROM
11160 (camel_mime_parser_scan_from): Update the doco.
11161 (camel_mime_parser_scan_pre_from): Ok, make this behaviour
11162 optional, it simplifies a lot of loops that dont otherwise need to
11164 (folder_scan_step): Made the PRE_FROM state optional.
11165 (struct _header_scan_state): Made the bool vars 1 bit.
11166 (folder_pull_part): Free the from_line buffer if it is there.
11167 (folder_scan_skip_line): Added a new arg, can save the skpped data
11168 to a byte_array, as we go.
11169 (folder_scan_step): Fixed calls to skip_line approrpiately. Now
11170 we save the from line as we parse it.
11171 (camel_mime_parser_read): New function to read from the mime
11172 parser buffer directly. Useful if you use the parser to read the
11173 first/some headers, then need to scan the rest of the data,
11174 without needing to use a seek(), or allocate your own buffers.
11176 * camel-mime-parser.h (struct _header_state): Added a new parser state,
11177 pre-from which returns any data found before a from line during
11178 parsing (all other data can be retrieved by the caller except
11181 2000-11-17 Jeffrey Stedfast <fejj@helixcode.com>
11183 * providers/imap/camel-imap-utils.c (imap_parse_nstring): When
11184 extracting a literal string, capture up until the end of the last
11185 line - this we we don't lose any data if the byte count is off.
11187 * providers/imap/camel-imap-command.c (imap_read_untagged): Use
11188 the byte-read count to decrement the number of bytes left to read
11189 rather than using strlen. Not only does this protect against a DoS
11190 (embedded NUL chars in the literal string would make strlen
11191 inaccurate) but it also improves performace a little.
11193 * camel-remote-store.c (remote_recv_line): *Sigh* Return the
11194 number of bytes read on success rather than 0. Also don't use
11195 camel_stream_buffer_read_line since we can't get an accurate octet
11198 2000-11-17 Not Zed <NotZed@HelixCode.com>
11200 * providers/local/camel-local-summary.c (local_summary_add): Clear
11201 the NOXEV/FLAGGED bits, since we do have an xev header. um m,
11202 maybe this is right, this assumes a write is following. Maybe
11203 this should be done in folder::append() instead ...
11205 * camel-stream-buffer.c (camel_stream_buffer_gets): We should
11206 always terminate the string. No need to check outptr is in range,
11207 its already been checked.
11209 * providers/local/camel-mbox-summary.c (mbox_summary_sync): When
11210 we update the summary, do it from mbox_summary->folder_size, not
11211 the content info endpos (which isn't any good anymore anyway).
11213 * providers/local/camel-mbox-folder.c (mbox_append_message): Set
11214 the frompos from the current folder size, since summary_add wont
11215 have initialised it to anything useful.
11217 2000-11-16 Not Zed <NotZed@HelixCode.com>
11219 * providers/local/camel-local-summary.c
11220 (local_summary_encode_x_evolution): Check the uid string is all
11221 digits before trying to write a 'standard' x-ev header.
11223 * providers/local/camel-maildir-summary.c
11224 (camel_maildir_summary_info_to_name): Convert an info into a
11225 maildir name:info filename.
11226 (camel_maildir_summary_name_to_info): Convert a name:info filename
11227 into an info, and tell us if it didn't match it.
11228 (message_info_new): When creating a new filename, gets its info
11229 from the flags field. Likewise if creating from an existing file,
11231 (maildir_summary_sync): Remove a small memleak. Also, if our
11232 flags and that requires a filename change, perform that here.
11233 (message_info_new): Get the received date from the filename.
11234 Also, dont overwirte the uid if we have one.
11235 (maildir_summary_check): Sort the summary in received order before
11237 (maildir_summary_next_uid_string): Test the name for collusions
11238 before we give it out. Retry, and if that fails, well, I guess we
11241 * providers/local/camel-mbox-folder.c (mbox_lock): Implement mbox
11243 (mbox_unlock): And unlocking.
11244 (mbox_append_message): Lock the folder for write before doing
11246 (mbox_get_message): Lock the folder for read before doing
11249 * providers/local/camel-local-folder.c (camel_local_folder_lock):
11250 Implement something here. We handle the recursive ability but
11251 pass the locking to the folder itself.
11252 (camel_local_folder_unlock): Likewise for unlocking.
11253 (local_lock): Default - do nothing, return success.
11254 (local_unlock): Same.
11255 (local_sync): Changed slightly for locking api changes, and also,
11256 only lock around the sync process itself.
11258 * camel-lock.c: New file - utility functions for locking using
11259 different strategies and/or for locking folders safely.
11261 * Makefile.am (libcamel_la_SOURCES): Adde camel-lock.[ch]
11263 2000-11-15 Radek Doulik <rodo@helixcode.com>
11265 * camel-mime-utils.c: mime_guess_type_from_file_name moved back to
11266 composer as it introduced unwanted VFS dependency
11267 removed #include <libgnomevfs/gnome-vfs.h>
11269 2000-11-15 Not Zed <NotZed@HelixCode.com>
11271 * providers/Makefile.am: Removed local again, not quite ready.
11273 2000-11-14 Not Zed <NotZed@HelixCode.com>
11275 * camel-folder-summary.c (message_info_new_from_message): Use
11276 message_info_new to create the summary from headers, instead of
11277 getting directly from the message.
11278 (format_recipients): No longer required.
11280 * providers/Makefile.am (SUBDIRS): Added local.
11282 2000-11-11 Not Zed <NotZed@HelixCode.com>
11284 * camel-mime-parser.c (folder_push_part): Make sure 'atleast' is
11285 at least 1, always. This is possibly a temporary fix for a
11286 bad failure mode on bad multipart messages.
11287 (folder_scan_content): Go until inend, not inend+1. Changed the
11288 continuation and retry logic to be simpler and more robust. If we
11289 can't find a marker within
11290 the atleast we need, just set it to 1, and try again, rather than
11291 just going to the next smaller limit (boundary check checks the
11293 (header_append): streamline the empty line case. And strip
11294 trailing \r's if there are any (\n's already stripped).
11295 (folder_scan_header): Reordered and cleaned up a lot. Check for
11296 continuation only once, and compress lwsp then. Assume the header
11297 buffer already has end of line's stripped, and simplify some things:
11298 Only check for end of headers once and easier.
11299 Dont check to remove end of line character
11300 Dont bother testing inptr-start if we get a boundary match - it is
11302 (folder_scan_header): Removed the unused part variable, and a few
11303 pointless assignments.
11304 (folder_scan_header): Change the end limit to be 1 higher, to make
11305 sure we get all content.
11306 (folder_scan_content): And here too.
11307 (folder_scan_header): Killed a warning.
11308 (folder_push_part): Removed a bad comment. Actually
11309 boundarylenfinal can be zero for a new message not in a
11310 multipart. So we fix that here.
11312 2000-11-09 Not Zed <NotZed@HelixCode.com>
11314 * camel-mime-utils.c (header_decode_param_list): Renamed from
11315 header_param_list_decode.
11316 (header_param_list_decode): New external function to decode a
11318 (header_param_list_format_append): Made public.
11319 (header_param_list_format): Another new public helper function for
11320 formatting just a param list.
11322 * camel-folder-summary.c (next_uid_string): Default implementation
11323 is the same as before.
11324 (camel_folder_summary_class_init): And set it up.
11326 * camel-folder-summary.h: Make next_uid_string a virtual function.
11328 * camel-folder.c (camel_folder_change_info_changed): New function
11329 to return true if the changeset contains any changes.
11331 2000-11-14 Jeffrey Stedfast <fejj@helixcode.com>
11333 * camel-stream.c (camel_stream_printf): Don't cast an int to a
11336 2000-11-10 Dan Winship <danw@helixcode.com>
11338 * providers/mbox/camel-mbox-summary.c
11339 (camel_mbox_summary_build_from): put a space before a single-digit
11340 day of the month since it seems some mailers are fantastically
11341 picky about this. (bugs.gnome.org #27232)
11343 2000-11-10 Radek Doulik <rodo@helixcode.com>
11345 * camel-mime-utils.c (header_msgid_generate): fix ids ending with '.'
11347 2000-11-09 Dan Winship <danw@helixcode.com>
11349 * providers/imap/camel-imap-auth.c (imap_try_kerberos_v4_auth):
11350 Fix error handling. (Only send a "*" to bail out of authentication
11351 if the server hasn't already bailed on us.)
11353 2000-11-08 Radek Doulik <rodo@helixcode.com>
11355 * camel-mime-utils.c (mime_guess_type_from_file_name): new
11356 function, moved from composer
11358 2000-11-08 Not Zed <NotZed@HelixCode.com>
11360 * camel-mime-message.c (find_best_encoding): Keep track of the
11361 caller bestenc flags that make sense.
11363 * camel-mime-filter-bestenc.c (filter): Added code to detect when
11364 we have "^From " lines in the sequence of text.
11365 (camel_mime_filter_bestenc_get_best_encoding): Added a new flag
11366 CAMEL_BESTENC_NO_FROM: if set, it will not allow any lines
11367 matching "^From " to appear in the output - currently forcing
11368 base64 encoding to achieve this.
11370 * camel-mime-parser.c (folder_scan_step): Call
11371 camel_mime-filter_complete() once we're done, rather than
11373 (folder_scan_content): Some fixes for state changing; so that when
11374 we do find another boundary it is properly flagged. Since we
11375 strip the last \n off all data, we must take that into account
11376 too. Sigh. Fixes a rather nasty set of bugs where multipart
11377 messages could start including following messages as parts, etc.
11378 (struct _header_scan_stack): Added new parameter,
11379 boundarylenfinal, which holds the length of the final boundary, if
11380 it is different (e.g. for From lines, whihc aren't)
11381 (folder_scan_step): Setup teh boundarylenfinal value when creating
11383 (folder_scan_content): Hmm, if we hit the end-of-buffer sentinal,
11384 reset the scanner back to leave 'atleast' chars in the buffer
11385 still, dump that content, and retry again. Stops us losing a
11386 check for a boundary on some data we haven't really looked at yet!
11387 (folder_scan_content): Use boundarylenfinal to calculate
11389 (folder_scan_header): And here too.
11390 (folder_boundary_check): Use the atleast value directly, dont
11391 truncate it. Use the boundarylen/boundarylenfinal values directly
11393 (struct _header_scan_stack): Add an atleast parameter to cache the
11395 (folder_push_part): Determine/set 'atleast', every time we add a
11397 (folder_scan_header): Get the cached atleast info from the current
11399 (folder_scan_content): And here too.
11400 (folder_scan_header): Fix a problem where a part starting with
11401 " text" would be interpreted as a followon header wrongly.
11403 * camel-mime-filter-charset.c (complete): Add some assertions to
11406 2000-11-07 Ettore Perazzoli <ettore@helixcode.com>
11408 * camel-service.c (get_name): Strdup the "???" string you return,
11409 so that the expected semantics for `::get_name()' is respected.
11411 2000-11-07 Dan Winship <danw@helixcode.com>
11413 * camel-stream-filter.c (d): Kill debugging, as it causes lots of
11414 evolution-mail spewage.
11416 2000-11-07 Not Zed <NotZed@HelixCode.com>
11418 * camel-mime-filter-bestenc.c (complete): Implement a complete()
11419 function, now we need one.
11420 (filter): Upgraded to match rfrc2045 properly. Checks also for
11421 length of line and valid CRLF sequences.
11422 (camel_mime_filter_bestenc_get_best_encoding): Do the work of
11423 working out what is the best encoding given what we found about
11426 * camel-mime-part.c (camel_mime_part_encoding_to_string): Use a
11427 lookup table to get the encoding naem, and add the binary type.
11428 (camel_mime_part_encoding_from_string): Likewise for the reverse.
11430 * camel-mime-part.h: Added the binary encoding type, see rfc2045.
11432 * camel-mime-utils.c (header_param_list_format_append): Dont put a
11433 space before ;'s in parameter lists, makes them more
11434 readable/consistent.
11436 * camel-mime-message.c (multipart_has_8bit_parts): Cleaned up the
11437 old stuff, well removed it.
11438 (camel_mime_message_set_best_encoding): Added another argument
11439 that lets you select what you want to set the best of. i.e. for
11440 smtp transport we only need 7 bit, and dont need to optimise the
11441 charset (although of course, we should always).
11442 (find_best_encoding): Implement this feature, if we are not
11443 getting the best charset, use the one we have.
11444 (best_encoding): Set the charset on the part appropriately. Sigh,
11445 the interfaces for this are nonexistant.
11446 (find_best_encoding): Tell the bestenc filter that lf should be
11447 treated as crlf for the purposes of determining encodings.
11449 2000-11-06 Not Zed <NotZed@HelixCode.com>
11451 * camel-charset-map.c (camel_charset_init): Init function for an
11452 iterative charset determinator.
11453 (camel_charset_step): Iterate another buffer.
11454 (camel_charset_mask): Removed, since it couldn't have worked.
11455 (camel_charset_best): Use the iterative interface to do the work.
11456 (camel_charset_best_name): Get the best name for a charset so far.
11458 * camel-mime-filter-bestenc.c: New class, a stream
11459 filter that can be used to memory-efficiently determine the best
11460 encoding and/or charset to use for a given stream of bytes.
11462 * Makefile.am (libcamelinclude_HEADERS): Added stream-null*.
11463 (libcamel_la_SOURCES): Added bestenc*
11465 * camel-stream-null.c: New class, a null-stream, that always
11466 succeeds, and never has any contents.
11468 * camel-stream.c: Minor pointless changes. Was going to do
11469 something else but changed my mind. Added trivial default
11470 implementations for all callbacks.
11472 * camel-mime-message.h: Cleaned up some old cruft.
11474 * camel-folder-summary.c (camel_folder_summary_format_address):
11475 address_list_format() no longer encodes, so we dont need to decode
11478 * camel-address.c (camel_address_unformat): New function, attempts
11479 to reverse the formatting process on display addresses.
11480 (camel_address_length): New function to get the number of
11481 addresses, without having to peek the structure.
11483 * camel-mime-message.c (camel_mime_message_set_from): Fix a typo.
11484 (camel_mime_message_finalize): Only unref from/reply_to if we have
11486 (camel_mime_message_set_recipients): New function - set the
11487 recipients as a CamelInternetAddress. This function effectively
11488 deprecates the older recipient setting functions.
11489 (camel_mime_message_add_recipient): What the hell, i'll bite the
11490 bullet. Terminate this function. The old api was ambiguious and
11491 inefficient and didn't work right anyway.
11492 (camel_mime_message_remove_recipient_address): And this one.
11493 (camel_mime_message_remove_recipient_name): And this one too.
11494 (camel_mime_message_set_recipients): If we set an empty header,
11495 then remove it from the header list. Allow a null receipient
11496 object to clear a header.
11497 (camel_mime_message_set_from): Likewise, if setting an empty from
11499 (camel_mime_message_encode_8bit_parts): Eeek!!
11500 camel_stream_mem_new_with_byte_array owns the byte_array we give
11501 it, so make sure we dont free any of it!
11502 (camel_mime_message_encode_8bit_parts): Infact, i'll just rewrite
11503 the whole lot, its a bit of a mess. Should really rename it and
11504 make it a little more useful too, lets see ...
11505 (best_encoding): This has a string interface? Oh boy.
11506 (camel_mime_message_foreach_part): New experimental function to
11507 iterate over all message parts. Might not remain.
11508 (camel_mime_message_has_8bit_parts): New implementation using
11509 foreach_part. Fixed a couple of problems.
11510 (find_best_encoding): New function, that finds the best encoding
11511 for a given part (will probably be moved to camel-mime-part), and
11512 also the best charset to use if it is a text part. Since one
11513 affects the other it is a two pass process, but uses streams and
11514 not memory to achieve this.
11515 (camel_mime_message_set_best_encoding): Uses the function above to
11516 configure an entire message for the best encoding possible given
11517 transport constraints.
11518 (camel_mime_message_encode_8bit_parts): Reimplemented to use the
11519 function above to perform the work.
11521 * camel-internet-address.c
11522 (camel_internet_address_format_address): Dont put <> around a lone
11523 address with no real name.
11524 (camel_internet_address_encode_address): Similarly.
11525 (internet_decode): Actually return the count of decoded addresses.
11526 (internet_unformat): Implement the unformatting routine.
11528 2000-11-05 Not Zed <NotZed@HelixCode.com>
11530 * providers/smtp/camel-smtp-transport.c (_send_to): Changed to get
11531 the internetaddress directly, rather than having to parse it
11534 * camel-address.c (camel_address_format): Added a new function
11535 which will format address, suitable for display.
11536 (camel_address_cat): Concatentate 1 camel address onto another.
11537 It is upto the caller to ensure the addresses are of compatible
11539 (camel_address_new_clone): New function to create a new address by
11540 copying an existing one of the same type.
11541 (camel_address_copy): New helper function to copy an address.
11543 * camel-mime-message.h (struct _CamelMimeMessage): Removed cached
11544 copy of date string.
11545 (struct _CamelMimeMessage): Added date_received info.
11547 * camel-mime-message.c (camel_mime_message_get_date_string):
11548 Removed. Nothing uses it anyway, and it is redundant.
11549 (camel_mime_message_finalize): No more date_str.
11550 (camel_mime_message_init): No more date_str, initialise
11552 (write_to_stream): Change the check for a date header.
11553 (process_header): No longer track the date_str.
11554 (camel_mime_message_get_received_date): Removed. totally invalid
11556 (camel_mime_message_get_sent_date): Removed. Redundant. The only
11557 'date' is the sent date, the received date is just made up.
11558 (camel_mime_message_get_date): Args changed to be more consistent
11559 with utility functions.
11560 (camel_mime_message_get_date): Dont set the date when we're asked
11561 for it (if its not set by the time its written, it'll be set
11563 (camel_mime_message_get_date_received): Actually do 'the right
11564 thing' here, if we have a received header, use that to determine
11565 the received date. And return the data in the same format as
11567 (camel_mime_message_set_from): Changed the api to better match
11568 what we should be doing. Pass a camelinternetaddress, etc.
11569 (camel_mime_message_set_reply_to): Cahnged similarly to take an
11571 (camel_mime_message_get_reply_to): Likewise.
11572 (camel_mime_message_finalize): Unref the from/reply_to objects.
11573 (format_address): Removed, no longer needed.
11574 (process_header): Changed to store the from/reply_to as
11576 (write_to_stream): Set the from header directly to empty, if we
11577 dont have one. Maybe we should just abort, and/or create one
11578 based on the current user.
11580 * camel-mime-utils.c (header_address_list_format): Renamed to
11581 header_address_list_encode, which is what it is actually doing.
11582 (header_address_list_format_append): Similarly.
11583 (encoding_map[]): Removed, no longer used.
11584 (header_address_list_encode_append): Take another arg, do we
11585 encode the address (for internet), or not (for display - utf8
11587 (header_address_list_format): Re-added this function, but now it
11588 generates a display version only. Surprise surprise, that is all
11589 anythign needs to generate anyway. Sigh.
11591 * camel-internet-address.c (camel_internet_address_get): Return
11592 false if we get an invalid index only.
11593 (camel_internet_address_encode_address): Helper function to encode
11594 a single address for mailing.
11595 (internet_encode): Use the above function to format it.
11596 (camel_internet_address_format_address): Format a single address
11598 (internet_format): Implement the display version.
11599 (camel_internet_address_class_init): Init the internet_format
11601 (internet_cat): Implement virtual function to concatenate
11604 * camel-folder-summary.c
11605 (camel_folder_summary_info_new_from_header): new function, only
11606 build the summary info, dont add it.
11607 (camel_folder_summary_info_new_from_parser): Likewise, for new
11609 (camel_folder_summary_add_from_parser): Cahnged to call function
11610 above to build info.
11611 (camel_folder_summary_add_from_header): Changed to call function
11612 above, to build info.
11613 (camel_folder_summary_info_free): New function to free the summary
11615 (camel_folder_summary_clear): Changed to clal above to free info.
11616 (camel_folder_summary_remove): Likewise.
11617 (camel_folder_summary_add): Cleaned up the clashing uid
11618 re-assignment logic a little bit.
11619 (camel_folder_summary_decode_uint32): Fixed a typo, 01 != -1.
11620 (camel_folder_summary_decode_time_t): Return -1 on error.
11621 (camel_folder_summary_encode_off_t): New function to encode an
11623 (camel_folder_summary_decode_off_t): And likewise for the reverse.
11624 (CAMEL_FOLDER_SUMMARY_VERSION): Bumped the summary version, since
11625 we're now encoding time/off_t's right.
11626 (summary_header_save): Use time_t encoder to save the timestamp.
11627 (summary_header_load): Likewise for decoding the timestamp.
11628 (content_info_load): Decode off_t types directly, now we can.
11629 (content_info_save): And likewise for encoding.
11630 (camel_folder_summary_add_from_message): New function, create a
11631 summary item from an existing message and add it.
11632 (camel_folder_summary_info_new_from_message): New function, create
11633 a summary item from an existing message.
11634 (summary_build_content_info_message): New function to do the dirty
11635 work of building the conent info/indexing, from a message source.
11636 (format_recipients): Format an internetaddress suitable for the
11638 (message_info_new_from_message): Build a new summary item from a
11640 (content_info_new_from_message): Build a new conent info from a
11642 (camel_folder_summary_class_init): Init the new class functions.
11643 (message_info_new_from_message): Fixed for message api change.
11645 Added documentation to the functions.
11647 2000-11-03 Radek Doulik <rodo@helixcode.com>
11649 * camel-mime-utils.c (header_msgid_generate): new function,
11650 generates simple message/content id
11652 2000-11-04 Not Zed <NotZed@HelixCode.com>
11654 * camel-mime-part-utils.c
11655 (camel_mime_part_construct_content_from_parser): Set the
11656 preface/postface from the parser into the multipart object.
11658 * camel-multipart.c (camel_multipart_set_postface): Function to
11659 set the postface text on a multipart.
11660 (camel_multipart_set_preface): Similarly for preface text.
11662 * camel-mime-parser.c (folder_scan_content): If we scan until a
11663 boundary, then we do not include the \n that starts the boundary
11664 line in the content.
11665 (struct _header_scan_stack): Added a ByteArray to store the
11666 multipart pre/post-text as we're scanning.
11667 (folder_pull_part): Free pre/posttext if they are allocated.
11668 (folder_scan_step): Build into the pre/posttext arrays as we
11670 (camel_mime_parser_preface): REturn the multipart preface text, if
11671 there is any scanned.
11672 (camel_mime_parser_postface): Likewise for postface text.
11673 (byte_array_to_string): helper function for above.
11675 * providers/mbox/camel-mbox-folder.c (mbox_append_message): Change
11676 the from line to be "\nFrom ..." always, so no need to
11677 check/append a \n to messages.
11678 (mbox_append_message): Open the output stream with append mode
11679 [assuming this is more efficient than seeking to the end]
11680 And dont prepend \n on the From line if its the first in the
11682 (mbox_append_message): Pass the offset of the real start of the
11683 "From " line when we perform the update (which may != 'seek')
11685 * camel-mime-filter-charset.c (complete): Removed the terminating
11688 * camel-stream-filter.c (do_read): Added some debug.
11689 (do_flush): And here.
11690 (do_write): And here too.
11691 (do_write): ARGH!!! ARGH! Ok, so the filter stream was writing a
11692 different number of bytes than the requester was asking it to
11693 write (because of filtering, of course!). So instead of returning
11694 the true number of written bytes, we'll return what they asked us
11695 to write - unless there is an error in which case we return -1.
11697 * camel-mime-utils.c (base64_encode_close): Sigh, forgot to make
11698 it unsigned. I think this is actually a gcc bug as (48 >> 2)
11699 somehow ended up negative, when it obviously should not, even if
11700 the data load was signed.
11702 2000-11-03 Jeffrey Stedfast <fejj@helixcode.com>
11704 * camel-url.c: Undo my incorrect fix - I misunderstood danw -
11707 2000-11-03 Dan Winship <danw@helixcode.com>
11709 * providers/pop3/camel-pop3-store.c (camel_pop3_store_expunge):
11712 2000-11-03 Jeffrey Stedfast <fejj@helixcode.com>
11714 * camel-url.c (camel_url_to_string): If show_pass, then base64 the
11715 password before writing it to the output string.
11716 (camel_url_new): Assume password has been base64 encoded and
11717 decode accordingly.
11719 2000-11-03 Dan Winship <danw@helixcode.com>
11721 * camel-provider.h: Add an "url_flags" field to CamelProvider.
11722 Move the CAMEL_SERVICE_URL_* defines here and remove the SERVICE_
11725 * camel-service.h: Remove CAMEL_SERVICE_URL_* flags and
11726 service->url_flags field.
11728 * camel-service.c (check_url, get_path): Get URL flags from
11729 service->provider, update for changed flag names.
11731 * providers/*/camel-*-provider.c: Add URL flags to provider
11734 * providers/*/camel-*-{store,transport}.c, camel-remote-store.c:
11735 Remove service->url_flags initialization.
11737 2000-11-02 Jeffrey Stedfast <fejj@helixcode.com>
11739 * providers/imap/camel-imap-store.c (get_folder_info): Quote
11740 foldernames when sending to the IMAP server because the folder
11741 name might contain spaces.
11743 2000-11-02 Not Zed <NotZed@HelixCode.com>
11745 * Merged in camel-incremental-branch.
11747 2000-11-01 Dan Winship <danw@helixcode.com>
11749 * providers/imap/camel-imap-store.c (get_folder_info): Remove old
11750 subbed folders from hash table after freeing them.
11752 * providers/imap/camel-imap-folder.c (imap_get_full_name): Deal
11753 correctly with namespace == ""
11755 2000-11-01 Gediminas Paulauskas <menesis@delfi.lt>
11757 * camel-charset-map.c, camel-charset-map-private.h: synced all charsets
11758 with ones found in libunicode. Just include more "iso/*.h" and rebuild
11759 ...private.h with this.
11761 2000-10-31 Dan Winship <danw@helixcode.com>
11763 * camel-service.c (service_disconnect): Add a new argument, clean,
11764 that says whether or not to try to disconnect cleanly.
11766 * camel-remote-store.c (remote_send_string, remote_send_stream,
11767 remote_recv_line): disconnect uncleanly on failure to prevent
11768 infinite loops when providers would normally send commands from
11769 disconnect(). Remove some unneeded CamelException goo.
11771 * providers/smtp/camel-smtp-transport.c (smtp_disconnect):
11772 * providers/pop3/camel-pop3-store.c (pop3_disconnect):
11773 * providers/nntp/camel-nntp-store.c (nntp_store_disconnect):
11774 * providers/imap/camel-imap-store.c (imap_disconnect): Don't send
11775 QUIT/LOGOUT if !clean.
11777 2000-10-30 Dan Winship <danw@helixcode.com>
11779 * providers/imap/camel-imap-auth.c: New file with code for IMAP
11780 authentication mechanisms. (Currently just krb4, and without
11781 integrity/privacy protection).
11783 * providers/imap/Makefile.am: Add camel-imap-auth.[ch] and krb4
11786 * providers/imap/camel-imap-store.c (connect_to_server): Split out
11787 from imap_connect. Just does the basic connect and CAPABILITY
11788 check. Redo the CAPABILITY code more robustly.
11789 (query_auth_types_connected): Do this right rather than punting to
11790 query_auth_types_generic. Check for KERBEROS_V4 if compiled with
11792 (query_auth_types_generic): Mention KERBEROS_V4 if compiled with
11794 (imap_connect): Use connect_to_server().
11796 * camel-mime-utils.c (base64_encode_step, base64_encode_close):
11797 Take an additional argument, "break_lines", saying whether or not
11798 to add '\n's to the output.
11800 * camel-multipart.c (set_boundary):
11801 * camel-mime-filter-basic.c (filter, complete): Update for base64
11804 2000-10-30 Peter Williams <peterw@helixcode.com>
11806 * providers/imap/camel-imap-store.c (unsubscribe_folder): Correct
11807 parameters to g_hash_table_lookup_extended.
11809 2000-10-29 Dan Winship <danw@helixcode.com>
11811 Improved IMAP namespace handling: leave the namespace in the
11812 folder names rather than constantly prepending it and stripping it
11813 off. Also some subscription fixes.
11815 * camel-store.c (camel_folder_info_build): Fix for the case where
11816 @top isn't in @folders.
11818 * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Add
11819 a "short_name" argument rather than figuring it out ourselves.
11820 (imap_get_full_name): Implementation of CamelFolder::get_full_name
11821 that strips off namespace so the user doesn't have to see it.
11822 (imap_append_message, imap_copy_message_to, imap_move_message_to):
11823 Use folder->full_name rather than calling
11824 camel_imap_store_get_folder_path.
11826 * providers/imap/camel-imap-utils.c (imap_parse_list_response):
11827 Update this: make @flags a bitmask and @sep a char rather than a
11828 string. Make all of the out arguments optional. Handle literals in
11829 the server response.
11831 * providers/imap/camel-imap-store.c (imap_connect): Do a better
11832 job of getting the correct dir_sep for the namespace we're using.
11833 Construct a base_url here that will be used by get_folder_info.
11834 (camel_imap_store_folder_path): Removed
11835 (imap_folder_exists): Add an argument to return the short name of
11836 the folder (parsed out of the LIST response). Update for
11837 imap_parse_list_response change.
11838 (get_folder): Update for the various other changes.
11839 (get_folder_info): Update for the various other changes. Be more
11840 consistent about the returned layout: put everything underneath
11841 the "namespace" directory, including INBOX, even if it doesn't
11842 belong there. Don't destroy the list of subscribed folders until
11843 we've actually gotten the new list.
11844 (folder_subscribed, subscribe_folder, unsubscribe_folder): Use
11845 folder_name directly rather than camel_imap_store_folder_Path.
11847 * providers/imap/camel-imap-command.c (camel_imap_command): Update
11848 for folder name changes.
11850 2000-10-29 Dan Winship <danw@helixcode.com>
11852 * camel.h: Remove md5-utils.h include since it's not part of Camel
11855 * camel-charset-map.c: Kill some warnings.
11857 * providers/nntp/camel-nntp-grouplist.c
11858 (camel_nntp_get_grouplist_from_file, camel_nntp_grouplist_save):
11859 Clean up warnings about time_t casts.
11861 * providers/smtp/camel-smtp-transport.c: Remove unused md5-utils.h
11864 * providers/pop3/camel-pop3-store.c: Undefine the "_" macro
11865 defined by krb4's des.h when compiling with krb support.
11866 Fix md5-utils.h include.
11868 2000-10-27 Dan Winship <danw@helixcode.com>
11870 * camel-mime-utils.c (header_param_list_format_append): Only quote
11871 Content-type parameters when the quoting is mandatory, and deal
11872 with embedded quotes/backslashes when quoting.
11874 2000-10-27 <jpr@helixcode.com>
11876 * providers/pop3/Makefile.am: Tidy up build
11878 * providers/smtp/Makefile.am: ditto
11880 * Makefile.am: Move md5-utils.[hc] to e-util because the
11881 addressbook is going to use md5 hashes for pilot syncing.
11882 Maybe the calendar conduits as well because this is a good idea
11885 2000-10-26 Kjartan Maraas <kmaraas@gnome.org>
11887 * camel-exceptions-list.def: Add newline to kill warnings.
11889 2000-10-25 Dan Winship <danw@helixcode.com>
11891 * providers/imap/camel-imap-store.c (get_folder_info): Fix folder
11892 listing code infinite loop.
11894 * camel-store.h: Add a "parent" field to CamelFolderInfo.
11896 * camel-store.c (camel_folder_info_build): Deal with "parent"
11897 (camel_store_folder_subscribed, camel_store_subscribe_folder,
11898 camel_store_unsubscribe_folder): Add g_return_if_fails checking
11899 that the folder supports subscriptions.
11901 * providers/imap/camel-imap-store.c (folder_subscribed,
11902 subscribe_folder, unsubscribe_folder): Remove "+ 1"s since the
11903 mail subscribe UI won't prepend / to the folder names now.
11904 (get_folder_info): Clear the "parent" field of the folderinfos
11905 when removing an empty top level.
11907 * providers/nntp/camel-nntp-store.c (nntp_store_folder_subscribed,
11908 nntp_store_subscribe_folder, nntp_store_unsubscribe_folder):
11909 Remove "+ 1"s since the mail subscribe UI won't prepend / to the
11912 2000-10-24 Chris Toshok <toshok@helixcode.com>
11914 * providers/imap/camel-imap-store.h: add subscribed_folders.
11916 * providers/imap/camel-imap-store.c (camel_imap_store_class_init):
11917 fill in vtable entries for subscription functions.
11918 (camel_imap_store_finalize): new function, so we can free up our
11919 subscribed_folders hashtable.
11920 (camel_imap_store_init): set CAMEL_STORE_SUBSCRIPTIONS in the
11921 CamelStore flags, and create our subscribed_folders hashtable.
11922 (camel_imap_store_get_type): camel_imap_store_finalize is our
11924 (get_folder_info): if we're looking at subscribed_only, clear out
11925 the subscribed_folders hashtable, use LSUB instead of LIST, and
11926 insert folder paths (prepended by their namespace if there is one)
11927 into subscribed_folders. INBOX subscription support needs work,
11928 since we always show it, regardless of it's subscribed state.
11929 (folder_subscribed): new function. just look up the folder_path
11931 (subscribe_folder): new function. use the imap SUBSCRIBE command,
11932 and if successful add it to the hashtable.
11933 (unsubscribe_folder): new function. use the imap UNSUBSCRIBE
11934 command, and if successful remove it from the hashtable.
11936 2000-10-24 Dan Winship <danw@helixcode.com>
11938 * providers/imap/camel-imap-store.c (get_folder_info): Fill in the
11939 message_count and unread_message_count flags (if !fast).
11941 2000-10-23 Dan Winship <danw@helixcode.com>
11943 * camel-object.h: #include gnome-i18n.h (and gnome-defs.h since
11944 the former depends on it.)
11946 * *: Add lots of _() and N_().
11948 2000-10-23 Chris Toshok <toshok@helixcode.com>
11950 * providers/nntp/Makefile.am (libcamelnntpinclude_HEADERS): add
11951 camel-nntp-types.h.
11953 2000-10-23 Dan Winship <danw@helixcode.com>
11955 * providers/imap/camel-imap-command.c (imap_read_untagged): Fix a
11956 "how could this have been working before" memory overrun bug
11959 * camel-op-queue.[ch], camel-thread-proxy.[ch]: These should have
11960 gone away a long time ago.
11962 2000-10-20 Chris Toshok <toshok@helixcode.com>
11964 * providers/Makefile.am (SUBDIRS): re-enable the nntp provider.
11966 2000-10-20 Chris Toshok <toshok@helixcode.com>
11968 * providers/nntp/camel-nntp-store.c (build_folder_info): add
11969 function to build a tree from the nntp group names (using '.' as a
11970 heirarchy separator.) #ifdefed INFO_AS_TREE only.
11971 (build_folder_info_from_grouplist): if INFO_AS_TREE is selected,
11972 call build_folder_info instead of appending a new CamelFolderInfo
11974 (ensure_news_dir_exists): use e_mkdir_hier instead of failing if a
11975 parent directory (~/evolution/news generally) isn't there.
11977 2000-10-19 Chris Toshok <toshok@helixcode.com>
11979 * camel-folder-search.c: #include <sys/types.h> before <regex.h>
11981 2000-10-19 Dan Winship <danw@helixcode.com>
11983 * providers/imap/camel-imap-utils.c (imap_parse_list_response):
11984 Fix a bug with "INBOX" (or anything else with NIL hierarchy
11985 separator) as the namespace.
11987 * providers/imap/camel-imap-folder.c (imap_refresh_info): Emit
11988 message_changed and folder_changed as appropriate.
11990 2000-10-19 Dan Winship <danw@helixcode.com>
11992 * camel-folder.c (camel_folder_refresh_info): Update comment here
11993 so refresh_info isn't just for reconnects any more. Make the
11994 default implementation a no-op rather than an error.
11996 * providers/nntp/camel-nntp-folder.c: Move refresh_info impl into
11997 camel_nntp_folder_new, since it would have leaked memory and not
11998 done anything useful if it was called later.
12000 * providers/mbox/camel-mbox-folder.c: Remove no-longer-necessary
12003 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
12004 Update imap_folder->exists, but don't actually load the new
12005 messages. This is a temporary workaround to deal with the IMAP
12006 provider stealing the message list focus at annoying times.
12007 (imap_copy_message_to, imap_move_message_to): Emit a
12008 folder_changed by hand, for now.
12010 2000-10-19 Ettore Perazzoli <ettore@helixcode.com>
12012 * providers/imap/Makefile.am (libcamelimapinclude_HEADERS): Add
12013 `camel-imap-stream.h'.
12015 * Makefile.am (libcamelinclude_HEADERS): Add `camel-charset-map.h'
12016 and `camel-charset-map-private.h'.
12018 2000-10-18 Jeffrey Stedfast <fejj@helixcode.com>
12020 * camel-mime-part.c (camel_mime_part_set_description): The correct
12021 fix this time - the description should be encoded here and not in
12022 the camel-medium layer.
12024 2000-10-30 Not Zed <NotZed@HelixCode.com>
12026 * camel-folder.c (camel_folder_change_info_add_update): Fixed the
12027 changeset logic, which was completely wrong.
12029 2000-10-27 Not Zed <NotZed@HelixCode.com>
12031 * camel-mime-utils.c (quoted_encode_step): Removed is_blank() stuff.
12032 (header_decode_init): When we set the 'space' bit, dont clear all
12034 (quoted_encode): Put back the safemask. Yes we totally need it,
12035 see rfc 2047 section 5, parts (1) and (3).
12036 (CHARS_PSPECIAL): Remove '=' and '_' from the list of allowed
12037 characters (this is an allowed list, not a not-allowed list, like
12039 (camel_mime_special_table): Updated for fixes to definitions.
12040 (CHARS_ESPECIAL): Added '_' to list of characters that should be
12043 2000-10-26 Not Zed <NotZed@HelixCode.com>
12045 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_update):
12046 Use the new camel_folder_change_info_* stuff to build the update
12047 diff, rather than doing it ourselves.
12049 * camel-folder.c (camel_folder_change_info_add_source): Add a
12050 'source' list, used to create change lists.
12051 (camel_folder_change_info_add_source_list): Add a list of uid's,
12052 convenience function.
12053 (camel_folder_change_info_add_update): Add a uid to the list of
12054 uid's in the new updated list.
12055 (camel_folder_change_info_add_update_list): Add a bunch of uid's
12056 at once for the same purpose.
12057 (camel_folder_change_info_build_diff): Take the source list, the
12058 update list, and find the differences, building on the added or
12059 removed list as appropriate.
12061 2000-10-20 Not Zed <NotZed@HelixCode.com>
12063 * providers/mbox/camel-mbox-summary.c (removed_uids): REnamed from
12065 (camel_mbox_summary_update): Oops, fix the reversed logic for
12066 determining the uid changesets.
12068 * camel-folder.c (message_changed): Oops, we want to change the
12071 2000-10-19 Not Zed <NotZed@HelixCode.com>
12073 * providers/mh/camel-mh-summary.c (camel_mh_summary_sync): Added a
12074 change list argument, and add expunged uid's to it.
12076 * providers/mh/camel-mh-folder.c (mh_init): Setup the change list.
12077 (mh_finalize): And free it.
12078 (mh_sync): Track changes, and send a folder_changed signal as
12080 (mh_expunge): Likewise.
12081 (mh_append_message): Add the new uid to the change list and
12082 trigger a folder_changed event.
12084 * providers/mbox/camel-mbox-folder.c (camel_mbox_folder_new):
12085 Setup a mbox list of changes structure.
12086 (mbox_finalize): And free it.
12087 (mbox_expunge): Include the change list with the folder_changed
12088 event, and clear it off.
12089 (mbox_sync): And the same for when we are just syncing the folder.
12090 (mbox_append_message): And do the same here, after we've updated
12093 * providers/mbox/camel-mbox-summary.c
12094 (camel_mbox_summary_build_from): Use gmtime_r to get the time
12096 (camel_mbox_summary_sync): Added a changeinfo argument. Add any
12097 removed or changed messages to the changelists as appropriate.
12098 (camel_mbox_summary_update): Added a changeinfo argument.
12099 Genereate a list of added/removed uid's based on the difference
12100 before and after rebuilding the summary.
12102 * camel-folder.c (camel_folder_change_info_new):
12103 (camel_folder_change_info_add_uid):
12104 (change_info_add_uid):
12105 (camel_folder_change_info_remove_uid):
12106 (camel_folder_change_info_change_uid):
12107 (change_info_clear):
12108 (camel_folder_change_info_clear):
12109 (camel_folder_change_info_free):
12111 (camel_folder_change_info_cat): Bunch of utility functions for
12112 working with change info lists.
12113 (camel_folder_init): Init the change info list.
12114 (camel_folder_finalize): And free it.
12115 (thaw): Changed to pass through a list of changes, or to get the
12116 changed message uids from the camelfolderchangeinfo struct, and
12118 (folder_changed): Add the changed lists to the frozen change list
12120 (message_changed): Add the message to the changed list if we are
12121 in the frozen state.
12123 * camel-folder.h (CamelFolderChangeInfo): New structure to hold
12124 information for the folder_changed event.
12126 2000-10-18 Ettore Perazzoli <ettore@helixcode.com>
12128 * camel-mime-filter-charset.c (complete): Put a zero at the start
12131 2000-10-18 Not Zed <NotZed@HelixCode.com>
12133 * camel-mime-part.c (add_header): No, we must not encode the
12134 headers here. These interfaces ARE raw interfaces as they are
12135 defined in camel_medium. Also removed a bogus/meaningless FIXME.
12136 (set_header): Likewise here, we must not.
12137 (process_header): Removed another bogus comment.
12139 * camel-object.c (shared_is_of_type): Comment out the spitting of
12140 a big warning when we're trying to determine types from code.
12142 * providers/mbox/camel-mbox-summary.c
12143 (message_info_new_from_parser): Only call ibex funcitons if we
12146 * providers/mh/camel-mh-summary.c (camel_mh_summary_add): Only
12147 call ibex functions if we have an index.
12148 (remove_summary): Likewise.
12149 (camel_mh_summary_check): Likewise.
12151 * providers/nntp/camel-nntp-store.c (nntp_store_get_folder):
12152 get_folder -> flags argument.
12154 * providers/vee/camel-vee-store.c (vee_get_folder): create->flags.
12156 * providers/pop3/camel-pop3-store.c (get_folder): Changed create
12159 * providers/imap/camel-imap-store.c (get_folder): Added flags
12162 * providers/mh/camel-mh-folder.c (camel_mh_folder_new): Added
12163 flags argument, and fixed code appropriately.
12165 * providers/mh/camel-mh-store.c (get_folder): Added flags argument.
12167 * camel-folder-search.c (message_body_contains): Perform a regex
12168 match on the contents of messages. This wont quite work yet as
12169 message contents are encoded when written to a stream.
12170 (build_match_regex): Converts a number of strings into a regex
12171 matching pattern, escaping special chars.
12172 (match_message): match a single message from a folder, by uid.
12174 (search_body_contains): Changed to support matching where no index
12175 is supplied. Matches are performed by retrieving message
12177 () WTF? camel should not be including any widget headers.
12179 * providers/mbox/camel-mbox-folder.c (camel_mbox_folder_new):
12180 Added flags argument.
12181 (mbox_refresh_info): Changed into a NOP, the refresh info code
12182 moved into the new function.
12183 (camel_mbox_folder_new): If we have an index requested, build one,
12184 otherwise, remove an old one, or just dont do anything.
12186 * providers/mbox/camel-mbox-store.c (get_folder): Changed create
12187 to flags, changed code to suit.
12189 * camel-store.c (camel_store_get_folder): Changed create to flags.
12190 (get_folder_internal): And here.
12191 (get_folder): And here too.
12193 * camel-store.h (camel_store_get_folder): Change the create
12194 argument to be a flags argument.
12196 2000-10-17 Dan Winship <danw@helixcode.com>
12198 * providers/imap/camel-imap-folder.c (imap_refresh_info): Remove
12199 cached info at the end of the summary when the folder shrinks
12200 between sessions. Also remove an untrue comment.
12201 (camel_imap_folder_new): Move the summary creation to after the
12202 folder selection again, since it depends on the uidvalidity
12205 * providers/imap/camel-imap-store.c (get_folder): Fix up
12206 summary_file to not include the namespace twice.
12208 2000-10-17 Jeffrey Stedfast <fejj@helixcode.com>
12210 * camel-mime-part.c (set_header): Encode the header value.
12211 (add_header): Same.
12213 2000-10-17 Not Zed <NotZed@HelixCode.com>
12215 * camel-mime-filter.c: Added some malloc check debugging stuff.
12217 * camel-mime-parser.c
12218 (struct _header_scan_state): Removed top_part, top_start, and
12219 pending. I can't even remember why they were there, and they're
12222 * camel-mime-filter-basic.c (filter): Forgot to up the space here
12225 2000-10-14 Not Zed <NotZed@HelixCode.com>
12227 * camel-mime-filter-basic.c (complete): Ok, so we hit a fixme, 3x
12228 just wasn't enough for some sequences.
12230 2000-10-16 Jeffrey Stedfast <fejj@helixcode.com>
12232 * providers/imap/camel-imap-command.c
12233 (imap_read_response): Don't imap_next_word(respbuf + 2), instead
12234 use imap_next_word(respbuf) or else we'll skip over the second
12237 2000-10-16 Jeffrey Stedfast <fejj@helixcode.com>
12239 * providers/imap/camel-imap-command.c
12240 (camel_imap_response_extract): Don't free 'resp' as it doesn't
12241 point to the beginning of the allocated data, instead free
12242 response->untagged->pdata[i]. Also, if '*resp' is equal to a space
12243 character, then set resp = imap_next_word (resp) rather than
12244 expecting resp++ to work (there's a list broken IMAP daemons that
12245 like to put extra spaces between tokens).
12246 (imap_read_response): Don't expect 'respbuf+2' to be where the
12247 untagged number response to start (see above fix for an
12250 2000-10-16 Chris Toshok <toshok@helixcode.com>
12252 * camel-service.c (get_path): when using the construct (flags &
12253 CAMEL_SERVICE_URL_NEED_*) make sure to do ((flags &
12254 CAMEL_SERVICE_URL_NEED_*) == CAMEL_SERVICE_URL_NEED_*)
12257 2000-10-16 Jeffrey Stedfast <fejj@helixcode.com>
12259 * providers/imap/camel-imap-store.c (imap_disconnect): Only send
12260 the LOGOUT command if the store is connected.
12261 (imap_connect): Set the 'connected' state to TRUE when we
12262 successfully connect.
12263 (get_folder_info): if (!topfi), 'topfi' was allocated but then
12264 'fi' was set. I think Dan meant to set topfi since fi is an
12265 uninitialized value at this point.
12267 * providers/imap/camel-imap-command.c (imap_read_response): Check
12268 for the untagged BYE response and set the 'connected' state to
12269 FALSE if we receive the BYE response. Return NULL if we get a BYE
12272 2000-10-16 Dan Winship <danw@helixcode.com>
12274 * providers/imap/camel-imap-store.c (get_folder_info): Deal with
12275 the possibility of not getting a LIST response back for the top
12278 2000-10-12 Dan Winship <danw@helixcode.com>
12280 * providers/imap/camel-imap-summary.c: Simple subclass of
12281 CamelFolderSummary that also keeps a UIDVALIDITY value (and
12282 doesn't, for the moment, build content info).
12284 * providers/imap/camel-imap-folder.c:
12285 (various): Use a CamelImapSummary to store/fetch summary info.
12286 (camel_imap_folder_new): Take a path to a file to use for the
12287 summary. Set the folder's permanent_flags correctly according to
12288 the server response. Read in the summary (checking the
12289 UIDVALIDITY) and update it if it's out of date.
12290 (imap_refresh_info): Just fetch UIDs and flags. If the UIDs all
12291 match, update the flags as needed and be done with it. Otherwise,
12292 delete messages that have been expunged from the server and fetch
12293 full summary info for any new messages.
12294 (imap_sync): Save the summary to disk.
12295 (imap_update_summary): Renamed from imap_get_summary_internal. Can
12296 now be told to get summary for only a subset of messages. Use
12297 camel-mime-utils functions rather than rolling our own header
12299 (imap_get_message_info_internal): Merged into imap_update_summary.
12300 (imap_set_message_flags): Don't marked the message FOLDER_FLAGGED
12301 if we're not actually changing the value of any of the flags.
12302 (camel_imap_folder_changed): Deal with EXISTS rather than RECENT.
12304 * providers/imap/camel-imap-store.c (imap_connect): Call
12305 camel_session_get_storage_path and save the value.
12306 (get_folder): Create a local directory to store summary
12307 information and pass a summary file name to camel_imap_folder_new.
12308 Don't call camel_folder_refresh_info from here any more since
12309 camel_imap_folder_new does it again.
12311 * providers/imap/camel-imap-command.c (camel_imap_command): Add a
12312 special case to this to make it possible to get the repsonses from
12313 a SELECT and still have store->current_folder be updated
12315 (imap_read_response): parse EXISTS rather than RECENT
12317 * camel-session.c (camel_session_get_storage_path): Use
12320 * camel-folder-summary.c (camel_folder_summary_remove_index): New
12323 * camel-mime-utils.c (header_raw_append_parse): fix this.
12324 (camel-mime-parser.c doesn't use this code because of the MEMPOOL
12325 optimization, so nothing was ever actually calling it before.)
12327 2000-10-11 Not Zed <NotZed@HelixCode.com>
12329 * camel-mime-part.h (struct _CamelMimePart): Removed
12330 temp_message_buffer, and content_input_stream fields which seem to
12331 have come from nowhere, and are unused.
12333 * camel-mime-utils.c: Added a note about touching this file.
12334 Nobody is to touch it without asking me first. That goes for you
12336 (header_decode_text): In what way is this broken?
12338 2000-10-10 Not Zed <NotZed@HelixCode.com>
12340 * providers/imap/camel-imap-folder.c (imap_get_summary_internal):
12341 Fix camel_summary_* function rename
12342 (imap_get_message_info_internal): Likewise.
12344 * camel-mime-parser.c (camel_mime_parser_finalise): Fixed a spelling mistake.
12346 * camel-folder-summary.c (camel_summary_format_address): Uh, why
12347 do we encode and then decode here ... sigh. This is not the way
12349 (camel_folder_summary_format_address): Renamed to a proper name,
12350 this was only supposed to be a private function.
12351 (camel_folder_summary_format_string): Likewise. Oh i see why it
12352 was made public, code reuse by cut & paste. Joy.
12354 2000-10-11 Chris Toshok <toshok@helixcode.com>
12356 * providers/nntp/camel-nntp-store.c (nntp_store_unsubscribe_folder): remove the leading '/'.
12357 (nntp_store_subscribe_folder): same.
12358 (nntp_store_folder_subscribed): same.
12360 2000-10-11 Jeffrey Stedfast <fejj@helixcode.com>
12362 * providers/imap/camel-imap-folder.c (imap_move_message_to): Quote
12363 the mailbox name as it may contain spaces.
12364 (imap_copy_message_to): Same.
12366 2000-10-10 Chris Toshok <toshok@helixcode.com>
12368 * providers/nntp/camel-nntp-store.c
12369 (build_folder_info_from_grouplist): fill in message_count and
12370 unread_message_count properly.
12372 * providers/nntp/camel-nntp-newsrc.h: reformat.
12374 * providers/nntp/camel-nntp-grouplist.c
12375 (camel_nntp_get_grouplist_from_file): remove spew.
12377 * providers/nntp/camel-nntp-newsrc.c
12378 (camel_nntp_newsrc_group_get_num_articles_read): new function.
12379 (camel_nntp_newsrc_group_get_highest_article_read): robustification.
12381 2000-10-10 Joe Shaw <joe@helixcode.com>
12383 * providers/imap/camel-imap-store.c
12384 (parse_list_response_as_folder_info): Check before dereferencing the
12387 2000-10-10 Jacob "Ulysses" Berkman <jacob@helixcode.com>
12389 * camel-*.c: teach camel about "its" vs. "it's"
12391 2000-10-09 Chris Toshok <toshok@helixcode.com>
12393 * providers/nntp/camel-nntp-store.c (finalize): write out the
12395 (nntp_store_get_name): if @brief, just return host.
12397 * providers/nntp/camel-nntp-newsrc.c: robustification and bug
12400 2000-10-06 Jeffrey Stedfast <fejj@helixcode.com>
12402 * camel-folder-summary.c (camel_summary_format_address): Decode
12403 the resulting string.
12405 2000-10-06 Chris Toshok <toshok@helixcode.com>
12407 * providers/nntp/camel-nntp-grouplist.c: new file.
12409 * providers/nntp/camel-nntp-grouplist.h: new file.
12411 * providers/nntp/camel-nntp-types.h: new file.
12413 2000-10-06 Jeffrey Stedfast <fejj@helixcode.com>
12415 * camel-mime-utils.c (quoted_encode): Fix so that we don't encode
12416 every single char in the word. Also, do we need a safemask? I
12417 don't see why we would.
12418 (header_encode_string): Don't strip off the last char!!
12420 2000-10-06 Chris Toshok <toshok@helixcode.com>
12422 * providers/nntp/Makefile.am (libcamelnntpinclude_HEADERS): add
12423 camel-nntp-grouplist.h
12424 (libcamelnntp_la_SOURCES): add camel-nntp-grouplist.c
12426 * providers/nntp/camel-nntp-provider.c: add our own hash functions
12429 * providers/nntp/camel-nntp-newsrc.c
12430 (camel_nntp_newsrc_group_is_subscribed): new function.
12431 (camel_nntp_newsrc_subscribe_group): new function.
12432 (camel_nntp_newsrc_unsubscribe_group): new function.
12434 * providers/nntp/camel-nntp-newsrc.h: add prototypes for
12435 _group_is_subscribed, _subscribe_group, and _unsubscribe_group.
12437 * providers/nntp/camel-nntp-store.c
12438 (build_folder_info_from_grouplist): new function.
12439 (nntp_store_get_folder_info): add subscribed_only_parameter. if
12440 it's FALSE, load the grouplist and call
12441 build_folder_info_from_grouplist.
12442 (nntp_store_folder_subscribed): implement.
12443 (nntp_store_subscribe_folder): implement.
12444 (nntp_store_unsubscribe_folder): implement.
12445 (camel_nntp_store_init): add CAMEL_STORE_SUBSCRIPTIONS to the
12448 * providers/mh/camel-mh-store.c (get_folder_info): add
12449 subscribed_only parameter.
12451 * providers/mbox/camel-mbox-store.c (get_folder_info): add
12452 subscribed_only parameter.
12454 * providers/imap/camel-imap-store.c (get_folder_info): add
12455 subscribed_only parameter.
12457 * camel-store.c (camel_store_supports_subscriptions): new function.
12458 (camel_store_folder_subscribed): new function.
12459 (camel_store_subscribe_folder): new function.
12460 (camel_store_unsubscribe_folder): new function.
12462 * camel-store.h: add prototypes and virtual functions for the
12463 subscribe implementation. also, add a subscribed_only argument to
12464 camel_store_get_folder_info.
12466 2000-10-05 Jeffrey Stedfast <fejj@helixcode.com>
12468 * camel-mime-utils.c (header_address_list_format_append): Encode
12469 the name part of the address and don't quote the name.
12470 (header_decode_text): Rewrote from scratch, the old code was badly
12473 2000-10-05 Jeffrey Stedfast <fejj@helixcode.com>
12475 * camel-mime-message.c (camel_mime_message_set_reply_to): Use the
12476 camel_address_encode function again.
12477 (camel_mime_message_set_from): Same.
12479 2000-10-05 Jeffrey Stedfast <fejj@helixcode.com>
12481 * camel-mime-utils.c (quoted_encode_step): Modified to not encode
12482 space chars in the middle of a line.
12483 (isblank): New macro if we're not on a system with the GNU isblank
12486 * camel-mime-message.c (camel_mime_message_set_from): Reversed my
12487 changes, don't header_encode_phrase - it generates broken headers.
12488 (camel_mime_message_set_reply_to): Same.
12490 2000-10-04 Chris Toshok <toshok@helixcode.com>
12492 * providers/nntp/camel-nntp-utils.c (camel_nntp_get_headers):
12493 revert to old method (only use XOVER if OVER is supported.)
12495 * providers/nntp/camel-nntp-store.c
12496 (camel_nntp_store_get_overview_fmt): handle the case where the
12497 OVER extension isn't listed but LIST OVERVIEW.FMT works (again,
12498 INN 2.2). enable the OVER extension in this case.
12500 2000-10-04 Chris Toshok <toshok@helixcode.com>
12502 * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): return a
12503 gboolean so we can tell if this command worked. we can't key off
12504 the OVER extension being present because at least one server (INN
12505 2.2) doesn't report the OVER extension but implements the XOVER
12506 command. This could of course just be because I'm a loser for
12507 thinking they were related in the first place.
12508 (camel_nntp_get_headers): always try XOVER first, and if it fails
12509 revert to the slow method.
12511 2000-10-04 Dan Winship <danw@helixcode.com>
12513 * providers/mbox/camel-mbox-store.c (get_folder): Fix a case where
12514 a variable was free'd and then possibly used in an error message.
12516 2000-10-04 Chris Toshok <toshok@helixcode.com>
12518 * providers/nntp/camel-nntp-provider.c
12519 (camel_provider_module_init): news: -> nntp:.
12521 2000-10-04 Chris Toshok <toshok@helixcode.com>
12523 * providers/nntp/camel-nntp-store.c (nntp_store_get_folder_info):
12524 use "nntp:" instead of "news:" since "news:" urls aren't supposed
12525 to have host/user/port info in them. also, if there's a user
12526 defined in the url, put it in the urls for our folders.
12528 2000-10-04 Chris Toshok <toshok@helixcode.com>
12530 * providers/nntp/camel-nntp-auth.c (camel_nntp_auth_authenticate):
12531 borrow some code from the imap provider to query the user for
12532 their password, and pass the user/passwd to nntp. be extra
12533 paranoid and zero out the password before freeing it.
12535 * providers/nntp/camel-nntp-store.c (camel_nntp_store_init): add
12536 ALLOW_USER/ALLOW_PASSWORD/ALLOW_AUTH to the url flags.
12537 (nntp_store_query_auth_types_generic): return our list of
12539 (nntp_store_query_auth_types_connected): broken, return same as in
12540 query_auth_types_generic.
12542 2000-10-04 Dan Winship <danw@helixcode.com>
12544 * providers/imap/camel-imap-store.c (imap_connect): IMAP4
12545 (pre-rev1) doesn't support the 'LIST "" ""' idiom, so don't use
12546 it. Just assume the dir_sep is '/'. Shrug.
12548 2000-10-04 Jeffrey Stedfast <fejj@helixcode.com>
12550 * camel-mime-message.c (camel_mime_message_set_reply_to): Use
12551 header_encode_phrase instead.
12552 (camel_mime_message_set_from): Same.
12554 2000-10-04 Not Zed <NotZed@HelixCode.com>
12556 * camel-mime-utils.c (header_content_type_is): Handle the case
12557 where ct != NULL, but type and subtype are, and also match that
12558 against text/plain.
12560 * camel-folder-summary.c: Bump summary file version.
12561 (message_info_save): Save the size from the messageinfo.
12562 (message_info_load): Load the size from the summary file.
12563 (message_info_load): Fixed up the time_t saving/loading. There
12564 was a reason the warning was left there ... obviously nobody could
12565 read the comment "/* warnings, leave them here */", why do i even
12567 (camel_folder_summary_decode_time_t): Decode a time_t value from
12569 (camel_folder_summary_encode_time_t): Encode a time_t value to the
12572 2000-10-03 Jeffrey Stedfast <fejj@helixcode.com>
12574 * providers/imap/camel-imap-command.c (camel_imap_command): Quote
12575 the mailbox name when sending a SELECT request otherwise mailboxes
12576 with spaces in their names will cause problems.
12578 * camel-mime-message.c (camel_mime_message_set_reply_to): encode
12580 (camel_mime_message_set_from): Same.
12582 2000-10-03 Dan Winship <danw@helixcode.com>
12584 * providers/imap/camel-imap-command.c: New file containing
12585 camel_imap_command and friends. Major camel_imap_command rewrite
12586 to remove duplicated code, make the parsing of literals be
12587 more safe/correct, deal with RECENT/EXPUNGE responses more
12588 consistently, and make it possible to implement the AUTHENTICATE
12591 * providers/imap/camel-imap-utils.c (imap_parse_nstring): New
12592 function, to parse an IMAP "nstring".
12594 * providers/imap/camel-imap-store.c: Move command stuff to
12595 camel-imap-command.c. Update for camel_imap_command changes.
12597 * providers/imap/camel-imap-folder.c: Update for
12598 camel_imap_command changes.
12599 (imap_append_message): CRLF filter the message before sending it.
12601 * providers/imap/Makefile.am: Add camel-imap-command.[ch], remove
12602 camel-imap-stream.[ch] for now.
12604 2000-10-02 Jeffrey Stedfast <fejj@helixcode.com>
12606 * camel-mime-message.c (camel_mime_message_has_8bit_parts): New
12607 convenience function to determine if there are any 8bit mime parts
12609 (camel_mime_message_encode_8bit_parts): New convenience function
12610 to recursively reencode all 8bit mime parts to either
12611 quoted-printable or base64 depending on which would be the best
12612 encoding for that part.
12614 * providers/smtp/camel-smtp-transport.c (smtp_data): If the mime
12615 message contains 8bit parts and the server doesn't support 8bit
12616 transfers, reencode those parts before proceding with the send.
12617 (smtp_mail): If the mime message contains 8bit parts and the
12618 server supports the 8BITMIME extension to SMTP, notify the server
12619 that we'll be sending it 8bit mime parts.
12620 (_send_to): Find out if the message contains 8bit parts.
12622 2000-10-02 Jeffrey Stedfast <fejj@helixcode.com>
12624 * providers/smtp/camel-smtp-transport.c (_send_to): Use the
12625 CamelInternetAddress parser.
12626 (smtp_get_email_addr_from_text): deprecated.
12628 2000-10-02 Dan Winship <danw@helixcode.com>
12630 * camel-provider.h: Remove default_ports.
12632 * camel-remote-store.c (remote_connect): Get default_port from
12633 CamelRemoteStore rather than CamelProvider.
12635 * providers/{imap,nntp,pop3}/camel-*-store.c: Initialize
12636 CamelRemoteStore::default_port
12638 * providers/*/camel-*-provider.c: Remove default_ports.
12640 2000-10-02 Dan Winship <danw@helixcode.com>
12642 * camel-folder.[ch]: Remove
12643 camel_folder_{get,free}_subfolder_info, as we want to be able to
12644 scan the whole subfolder tree without having to open any folders,
12645 so this needs to be in CamelStore. Remove can_hold_folders and
12646 can_hold_messages flags; things that don't hold messages are no
12647 longer considered CamelFolders.
12649 * camel-folder-summary.[ch]: Remove CamelFolderInfo stuff.
12651 * camel-store.[ch]: Add camel_store_{get,free}_folder_info, as
12652 well as camel_store_free_folder_info_full and ..._nop for default
12653 implementations, and camel_folder_info_free and
12654 camel_folder_info_build as convenience functions. Turn
12655 CamelFolderInfo into a tree structure and also add an "url"
12658 * providers/*/camel-*-folder.c: Remove subfolder_info and can_hold
12660 * providers/*/camel-*-store.c: Add folder_info stuff.
12662 * providers/imap/camel-imap-folder.c (imap_summary_free): Free the
12663 summary elements with camel_message_info_free, not
12664 camel_folder_info_free. Oops.
12666 * providers/imap/camel-imap-utils.c: const poison
12668 2000-09-28 Jeffrey Stedfast <fejj@helixcode.com>
12670 * providers/smtp/camel-smtp-transport.c: Fixed some memory leaks.
12671 (camel_smtp_transport_init): Initialize supports_8bit to FALSE.
12672 (smtp_helo): If server supports 8bit, set supports_8bit to TRUE.
12674 * camel-transport.h (struct _CamelTransport): Added variable
12675 gboolean supports_8bit (we'll need this eventually? - see bugzilla
12678 * providers/smtp/camel-smtp-transport.c
12679 (smtp_get_email_addr_from_text): Ugh, no wonder people were
12680 getting illegal seek warnings *sigh*. I guess I can only blame
12681 myself for this one though :-(
12683 2000-09-28 Jeffrey Stedfast <fejj@helixcode.com>
12685 * providers/smtp/camel-smtp-transport.c (_send_to): Don't send the
12686 recipient data through smtp_get_email_addr_from_text - this is a
12687 complete waste. In fact, we don't want to have to use that
12690 * camel-internet-address.c, camel-address.c: Added some gtk-doc
12693 2000-09-28 Jeffrey Stedfast <fejj@helixcode.com>
12695 * camel-mime-utils.c (header_encode_string): Make sure to add the
12696 space char after an encoded word when the encoding is iso-8859-1.
12698 2000-09-28 Jeffrey Stedfast <fejj@helixcode.com>
12700 * providers/imap/camel-imap-folder.c (imap_get_message): When
12701 getting a literal string response, don't include the \r\n after
12702 the closing } (as in: "... {798}\r\n...")
12704 * providers/imap/camel-imap-stream.c (stream_read): Same.
12706 2000-09-28 Not Zed <NotZed@HelixCode.com>
12708 * camel-mime-utils.c (header_fold): New function to fold headers.
12710 2000-09-27 Not Zed <NotZed@HelixCode.com>
12712 * camel-mime-parser.c (folder_scan_header): If we had an empty
12713 header, then it must be end of the headers too.
12714 (folder_scan_init): No we dont need to init the outbuf with a nul
12717 * camel-folder-summary.c (camel_folder_summary_set_uid): New
12718 function to reset the uid to a higher value.
12720 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
12721 "something failed (yo!)" what sort of crap is this? Fixed all the
12722 indenting again, what wanker keeps running stuff through indent?
12723 (message_info_new): Check the uid we loaded off the disk, if it
12724 existed already, assign a new one. If it didn't then make sure
12725 the nextuid is higher.
12727 * camel-charset-map.c: New file, used to build a large unicode
12728 decoding mapping table, and use it to determine what is the
12729 lowest charset a given word can be encoded with. Uses tables from
12730 libunicode's source.
12732 * camel-internet-address.c (internet_encode): Use
12733 header_phrase_encode to properly encode the fullname, as required.
12734 refixed indenting. Who keeps doing that?
12735 (camel_internet_address_find_address): Changed fatal return/warnings
12738 * camel-mime-utils.c (header_raw_append_parse): Check : explicitly
12739 (removed from is_fieldname() macro).
12740 (camel_mime_special_table): Changed to short, so we can represent
12742 (quoted_encode): Take a mask of the safe chars for this encoding.
12743 (header_address_decode): Removed a #warning that makes no sense
12745 (header_decode_date): Fixed the 'broken date' parser code, if it
12746 ever decoded it it just threw away the result.
12747 (header_encode_string): Use better charset matching for encoding
12750 2000-08-31 Not Zed <NotZed@HelixCode.com>
12752 * providers/mh/camel-mh-summary.c (camel_mh_summary_sync): Save
12753 the index if we do a sync.
12754 (camel_mh_summary_check): Save the index here too. Probably.
12756 2000-09-27 Dan Winship <danw@helixcode.com>
12758 * providers/imap/camel-imap-store.c (camel_imap_command_extended):
12759 Return untagged data in a GPtrArray rather than a string, since it
12760 saves processing time and is much easier to deal with for several
12761 commands. Update for camel_imap_folder_changed change.
12762 (camel_imap_fetch_command): Update for camel_imap_folder_changed
12764 (imap_connect, imap_folder_exists): Update for
12765 camel_imap_command_extended change.
12767 * providers/imap/camel-imap-folder.c
12768 (imap_get_message_count_internal,
12769 imap_get_subfolder_info_internal, imap_search_by_expression):
12770 Update for camel_imap_command_extended change.
12772 (imap_get_summary_internal, imap_get_message_info_internal): Use
12773 camel_imap_fetch_command here now to get around the
12774 camel_imap_command_extended change.
12776 (camel_imap_folder_changed): turn expunged into a GArray of ints
12777 rather than a GPtrArray of strings representing ints.
12779 2000-09-26 Jeffrey Stedfast <fejj@helixcode.com>
12781 * providers/imap/camel-imap-folder.c
12782 (imap_get_message_count_internal): Quote the folder name as it may
12784 (imap_get_subfolder_info_internal): Same.
12786 * providers/imap/camel-imap-utils.c (imap_parse_list_response): Do
12787 proper unquoting for folder names.
12788 (func_get_current_date): Implemented.
12790 * providers/imap/camel-imap-store.c
12791 (imap_folder_exists): Quote the folder name as it may have spaces.
12792 (imap_create): Same.
12793 (check_current_folder): Same.
12795 2000-09-22 Dan Winship <danw@helixcode.com>
12797 * providers/imap/camel-imap-folder.c
12798 (imap_get_subfolder_info_internal): The root folder's name is "",
12800 (camel_imap_folder_new): constify folder_name.
12802 * providers/imap/camel-imap-store.c (get_folder): Create the
12803 folder with folder_name, not folder_path.
12804 (camel_imap_command_preliminary): Don't free cmdid here.
12806 2000-09-21 Dan Winship <danw@helixcode.com>
12808 * providers/imap/camel-imap-utils.c (imap_create_flag_list): New
12809 function to convert Camel flags to an IMAP flag_list.
12810 (imap_parse_flag_list): Contrariwise.
12812 * providers/imap/camel-imap-store.c (camel_imap_command_*): Make
12813 the @ret arg actually optional, as (mostly) documented.
12814 (various): Don't pass "&result" to camel_imap_command_* if we're
12815 just going to immediately free it. Don't record status if we're
12816 not going to look at it.
12818 * providers/imap/camel-imap-folder.c: Likewise.
12819 (imap_summary_free): Use camel_folder_info_free.
12820 (imap_sync): Use imap_create_flag_list. Clear
12821 CAMEL_MESSAGE_FOLDER_FLAGGED after syncing so we don't keep
12823 (imap_append_message): Use imap_create_flag_list. Don't leak the
12824 memstream if the append fails.
12825 (imap_move_message_to): Use camel_folder_delete_message rather
12826 than doing it by hand.
12827 (imap_get_summary_internal, imap_get_message_info_internal): Use
12828 imap_parse_flag_list and header_raw_clear.
12829 (camel_imap_folder_changed): Use camel_message_info_free.
12831 2000-09-21 Dan Winship <danw@helixcode.com>
12833 * providers/imap/camel-imap-store.c (get_folder_name): INBOX is
12835 (get_root_folder_name): Make the root folder "" rather than "/".
12836 (get_folder): Update for root folder name change.
12837 (camel_imap_store_get_toplevel_dir): Removed. (Unused, unneeded.)
12838 (camel_imap_store_folder_path): New function to turn a Camel
12839 folder name into the corresponding namespaced IMAP path.
12840 (imap_folder_exists): Make this take a store and a path rather
12842 (imap_create): Likewise
12843 (get_folder): Update for camel_imap_store_folder_path and other
12845 (check_current_folder): Likewise.
12847 * providers/imap/camel-imap-folder.c: Change a bunch of CamelStore
12848 variables to CamelImapStore (and add a few more) to prevent excess
12849 gratuitous casting. Use camel_imap_store_folder_path where
12851 (camel_imap_folder_new): Update for root folder name change.
12853 2000-09-19 Jeffrey Stedfast <fejj@helixcode.com>
12855 * providers/smtp/camel-smtp-transport.c (smtp_data): Use the
12856 linewrap filter to achieve full RFC0821 compliance.
12858 * camel-mime-filter-linewrap.[c,h]: New mime-filter to word-wrap.
12860 2000-09-19 Jeffrey Stedfast <fejj@helixcode.com>
12862 * camel-internet-address.c (internet_encode): When encoding the
12863 internet address, quote the name as the name may have commas or
12864 any other token which may later confuse our address parser.
12866 2000-09-19 Dan Winship <danw@helixcode.com>
12868 * providers/imap/camel-imap-folder.c
12869 (imap_get_subfolder_info_internal): Fix the case where INBOX
12870 isn't returned in the folder listing.
12872 2000-09-19 Dan Winship <danw@helixcode.com>
12874 * camel-folder.c: (init): Removed
12875 (camel_folder_init, camel_folder_construct): New object init
12876 function and public object constructor to replace the old init
12877 method in a more Gtk-like fashion.
12879 (get_parent_folder, camel_folder_get_parent_folder): Removed. No
12880 CamelFolder subclass was ever setting the parent_folder member, no
12881 code has ever needed to look at it, and fixing it would actually
12884 (get_subfolder_info, camel_folder_get_subfolder_info): Renamed
12885 from ..._names. Deals in CamelFolderInfo now.
12886 (free_subfolder_info, camel_folder_free_subfolder_info): Likewise.
12888 (get_subfolder, camel_folder_get_subfolder): Removed.
12889 CamelFolderInfo contains the subfolder's full name, so this is
12890 unnecessary now, and removing it lets us get rid of the
12891 CamelFolder separator member, which is needed for the default
12892 implementation of this function, but not otherwise needed for most
12895 Also, lots of code style fixes.
12897 * providers/*: Update CamelFolder subclasses for changes, although
12898 none of them fill in the message counts in the CamelFolderInfo
12901 2000-09-18 Christopher James Lahey <clahey@helixcode.com>
12903 * camel-folder-search.c, camel-folder-search.h,
12904 camel-remote-store.c, providers/imap/camel-imap-folder.c,
12905 providers/imap/camel-imap-store.c: Fixed the #include lines to
12906 deal properly with gal.
12908 2000-09-17 Dan Winship <danw@helixcode.com>
12910 * camel-folder-summary.h: update CamelFolderInfo
12911 * camel-folder-summary.c (camel_folder_info_free): New function to
12912 free the contents of a CamelFolderInfo
12914 2000-09-15 Dan Winship <danw@helixcode.com>
12916 * camel.c (camel_init): Set camel_verbose_debug to TRUE if
12917 CAMEL_VERBOSE_DEBUG is set in the environment.
12919 * camel-remote-store.c (remote_send_line, remote_recv_line): only
12920 log if camel_verbose_debug is TRUE.
12922 2000-09-14 Jeffrey Stedfast <fejj@helixcode.com>
12924 * providers/imap/camel-imap-store.c (get_folder): Don't use
12925 dir_sep as top-level directory, use "/".
12927 * providers/imap/camel-imap-folder.c (imap_expunge): Get rid of
12930 2000-09-13 Dan Winship <danw@helixcode.com>
12932 * providers/imap/camel-imap-folder.c (imap_expunge): Don't look at
12933 the response of the command. camel_imap_command_extended()
12934 processes EXPUNGE responses itself, so if we do it here too we
12935 remove twice as many summary items as we should.
12937 2000-09-13 Jeffrey Stedfast <fejj@helixcode.com>
12939 * providers/imap/camel-imap-store.c (imap_folder_exists): Rewrote
12940 to take a third argument (gboolean *selectable) so that we can
12941 find out if the folder is selectable or not as we look to see if
12942 it exists. Also, don't use EXAMINE because that will not work on
12943 non-selectable folders, so use LIST instead.
12944 (get_folder): Check to see if the folder exists even vefore
12945 calling imap_create as this will save time. If the folder does
12946 exist, find out if it's selectable. Moved the call to refresh_info
12949 * providers/imap/camel-imap-folder.c (imap_get_uids): Check for a
12951 (camel_imap_folder_new): Don't call refresh_info here - call it in
12952 get_folder() because we don't know if this folder even exists on
12953 the server yet! And even if it does, we don't know if it can hold
12954 messages or not yet.
12956 2000-09-12 Jeffrey Stedfast <fejj@helixcode.com>
12958 * camel-mime-parser.c (folder_scan_step): Make sure *datalength is
12959 > 0 before calling camel_mime_filter_filter otherwise we will get
12960 a segfault if the filter calls iconv().
12962 2000-09-08 Christopher James Lahey <clahey@helixcode.com>
12964 * providers/nntp/camel-nntp-auth.c,
12965 providers/nntp/camel-nntp-auth.h: Fixed a warning.
12967 2000-09-07 Dan Winship <danw@helixcode.com>
12969 * camel-session.c (camel_session_get_storage_path): Make this not
12972 2000-09-07 Dan Winship <danw@helixcode.com>
12974 * camel-session.c (camel_session_new): Make this take a path to a
12975 directory that Camel can use for its own nefarious purposes.
12976 (camel_session_get_storage_path): New function to return a path
12977 that a service can use for its own nefarious sub-purposes.
12979 * camel-service.c (camel_service_get_path): New method (and
12980 useful default implementation) to get a (relative) pathname
12981 corresponding to the service.
12983 2000-09-06 Dan Winship <danw@helixcode.com>
12985 * providers/pop3/camel-pop3-store.c (connect_to_server): Make KPOP
12988 2000-09-06 Jeffrey Stedfast <fejj@helixcode.com>
12990 * camel-mime-message.c (camel_mime_message_get_received_date):
12991 Implemented (someone added these to camel-mime-message.h but never
12992 implemented them!!) - though it may not be right.
12993 (camel_mime_message_get_sent_date): Same.
12995 2000-09-05 Dan Winship <danw@helixcode.com>
12997 * camel-mime-part.c (camel_mime_part_get_filename): If a MIME part
12998 has no Content-Disposition, but does have a "name" on the
12999 Content-Type, return that as the filename.
13000 (process_header): strstrip the Content-Description
13002 2000-09-05 Chris Toshok <toshok@helixcode.com>
13004 * providers/nntp/camel-nntp-utils.c (get_OVER_headers): care about
13006 (get_HEAD_headers): same.
13007 (camel_nntp_get_headers): same.
13009 * providers/nntp/camel-nntp-store.h: get rid of
13010 CAMEL_NNTP_OK/ERR/FAIL.
13012 * providers/nntp/camel-nntp-store.c
13013 (camel_nntp_store_get_extensions): take CamelException arg and
13014 pass along to camel_nntp_command.
13015 (camel_nntp_store_get_overview_fmt): same.
13016 (nntp_store_connect): convert to using constants in
13017 camel-nntp-resp-codes.h
13018 (nntp_store_get_folder): make use of camel_nntp_folder_new.
13019 (camel_nntp_command_send_recv): new function to deal with auth
13021 (camel_nntp_command): split out most of this function into
13022 camel_nntp_command_send_recv. also, return the actual response
13023 code instead of CAMEL_NNTP_OK/ERR/FAIL.
13025 * providers/nntp/camel-nntp-resp-codes.h: new file.
13027 * providers/nntp/camel-nntp-folder.h: prototype for
13028 camel_nntp_folder_new.
13030 * providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new): new
13031 convenience function.
13032 (nntp_folder_get_message): care more about the actual response
13035 * providers/nntp/Makefile.am (libcamelnntp_la_SOURCES): add
13037 (libcamelnntpinclude_HEADERS): add camel-nntp-auth.h.
13039 * providers/nntp/camel-nntp-auth.h: new file.
13041 * providers/nntp/camel-nntp-auth.c: new file.
13043 2000-09-05 Peter Williams <peterw@helixcode.com>
13045 * providers/imap/camel-imap-store.c (imap_folder_exists): Don't free the
13046 result on error; the exception will have the relevant info.
13048 * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Check for
13051 * providers/imap/camel-imap-store.c (imap_connect): Check the exception
13052 on the refresh_folders call.
13054 * providers/imap/camel-imap-store.h: Clean up some now-unused fields.
13056 * camel.c (camel_init): Call unicode_init again, now that libunicode
13057 will not initialize itself twice.
13059 2000-09-02 Lauris Kaplinski <lauris@helixcode.com>
13061 * camel-folder-search (search_header_contains): Use e_utf8_strstrcase
13063 2000-09-01 Christopher James Lahey <clahey@helixcode.com>
13065 * providers/imap/camel-imap-utils.c: Removed some unused
13068 2000-09-01 Peter Williams <peterw@helixcode.com>
13070 * providers/nntp/camel-nntp-store.c (camel_nntp_command): Initialize
13071 the statically-allocated CamelException so that it doesn't contain
13072 junk data that camel_exception_set() may try to free.
13073 (camel_nntp_store_get_extensions): Same.
13074 (camel_nntp_store_get_overview_fmt): Same.
13076 * providers/pop3/camel-pop3-store.c (camel_pop3_command): Typo
13077 fix (if (*ret) -> if (ret)).
13079 * providers/pop3/camel-pop3-store.c (pop3_connect): Set the
13080 port # back to what was specified ASAP, so that the hash of
13081 the URL doesn't change (which causes a failure in
13082 service_cache_remove that leads to a segfault).
13084 * providers/imap/camel-imap-store.c (imap_connect): Clear the
13085 exception after a failed LOGIN so that it doesn't pass through
13086 to the upper level and make mail think that the login failed.
13088 * providers/pop3/camel-pop3-store.c (pop3_connect): As above.
13090 2000-08-31 Peter Williams <peterw@helixcode.com>
13092 * providers/pop3/camel-pop3-store.c (camel_pop3_store_get_type):
13093 Implement POP3 with the CamelRemoteStore now.
13094 (connect_to_server): Hack this a bit to get KPOP to work. Obey
13095 the new connection semantics of the remote store (implicitly).
13096 (query_auth_types_connected): Clear exceptions after attempts
13097 to connect; the code at the bottom will catch hard errors.
13098 Use camel_service_connect.
13099 (camel_pop3_command): Take a CamelException; now, when an error
13100 occurs, ret is set to NULL and the exception passes back the
13101 appropriate information.
13102 (pop3_get_response): Same as above.
13103 (pop3_try_authenticate): Give camel_pop3_command its exception
13104 and handle it properly.
13105 (pop3_connect): Call the parent classfuncs. Don't disconnect
13106 on error (done for us).
13108 * providers/pop3/camel-pop3-folder.c: Obey the camel_pop3_command
13111 * camel-remote-store.c (remote_query_auth_types_connected): Don't
13112 warn; just return NULL.
13113 (remote_query_auth_types_generic): Same.
13114 (remote_send_string): Filter out passwords in debugging output.
13116 * providers/pop3/camel-pop3-store.c (camel_pop3_store_init): Also
13117 set the ALLOW_AUTH flag.
13119 * providers/imap/camel-imap-store.c (camel_imap_store_init): Same.
13121 2000-08-31 Chris Toshok <toshok@helixcode.com>
13123 * providers/nntp/camel-nntp-store.c (camel_nntp_store_class_init):
13124 remove get_folder_name.
13125 (nntp_store_get_folder_name): remove.
13127 2000-08-31 Lauris Kaplinski <lauris@helixcode.com>
13129 * camel-mime-part.c (write_to-stream): Use filter only if we have one
13131 2000-08-31 Chris Toshok <toshok@helixcode.com>
13133 * providers/nntp/camel-nntp-utils.c (get_OVER_headers): use
13134 camel_remote_store_recv_line.
13136 * providers/nntp/camel-nntp-folder.c (nntp_folder_get_message):
13137 use camel_remote_store_recv_line to build message. also, free our
13138 buffer so we don't leak like mad.
13140 * providers/nntp/camel-nntp-store.c:
13141 (camel_nntp_store_get_additional_data) remove.
13142 (camel_nntp_store_get_extensions): use
13143 camel_remote_store_recv_line.
13144 (camel_nntp_store_get_overview_fmt): same. also, don't rely on
13145 _get_additional_data anymore since it's easier to parse without.
13146 (camel_nntp_command): use camel_remote_store_send_string and
13147 camel_remote_store_recv_line.
13149 * providers/nntp/camel-nntp-store.h: CamelRemoteStore is the
13150 parent class now. remove istream/ostream since CamelRemoteStore
13151 takes care of that for us. also remove the prototype for
13152 camel_nntp_store_get_additional_data.
13154 * providers/nntp/camel-nntp-newsrc.c (camel_nntp_newsrc_write):
13155 make sure to clear dirty bit.
13156 (camel_nntp_newsrc_read_for_server): don't worry about continually
13157 trying to open the file - if it fails we just return an
13158 unpopulated .newsrc file.
13160 2000-08-31 Chris Toshok <toshok@helixcode.com>
13162 * providers/nntp/camel-nntp-newsrc.c
13163 (camel_nntp_newsrc_read_for_server): make this a bit more robust.
13164 try to create an empty .newsrc file for the server if we can't
13165 open it for reading. also, don't allocate everything until we've
13168 * providers/nntp/camel-nntp-utils.c (get_OVER_headers): make use
13169 of our overview field indices.
13170 (camel_nntp_get_headers): only call get_OVER_headers if the
13171 extension is present. warn if it's not - since get_HEAD_headers
13172 needs work before it works.
13174 * providers/nntp/camel-nntp-store.c
13175 (camel_nntp_store_get_extensions): new function - query the server
13176 for it's extensions.
13177 (camel_nntp_store_get_overview_fmt): new function - query the
13178 server for the overview format and build our table of the indices
13179 we care about. support the "full" suffix on fields.
13180 (nntp_store_connect): call camel_nntp_store_get_extensions and
13181 camel_nntp_store_get_overview_fmt.
13183 * providers/nntp/camel-nntp-store.h: add codes for extensions
13184 found on news.mozilla.org. only one that we care about is OVER.
13185 also, add CamelNNTPOverField and an enum of the overview fields
13186 that we care about.
13188 2000-08-31 Jeffrey Stedfast <fejj@helixcode.com>
13190 * providers/imap/camel-imap-utils.c (imap_translate_sexp):
13191 Reimplemented. It should now work correctly for most possible
13194 2000-08-31 Jeffrey Stedfast <fejj@helixcode.com>
13196 * providers/imap/camel-imap-store.c (camel_imap_command_extended):
13197 Don't save any exceptions caused by camel_imap_folder_changed
13198 (camel_imap_fetch_command): Same.
13200 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
13201 Using a new way of calculating the first recent message that seems
13202 more accurate. Also added code to make sure we don't accidently
13203 add a duplicate summary.
13205 2000-08-31 Not Zed <NotZed@HelixCode.com>
13207 * camel-mime-part.c (write_to_stream): Use the proper type
13208 checking function to check for text types.
13209 (write_to_stream): If we have a charset on a text type that
13210 isn't us-ascii or utf-8, then we need to reencode it, so add a
13211 filter to do that too.
13212 (write_to_stream): Fix some warnings/use the right constructor,
13214 (write_to_stream): Rearrange the logic so it always does charset
13215 conversion, and not just if we have a qp/base64 block.
13217 * camel-mime-utils.c (append_latin1): New function - even though
13218 its broken, we'll assume mailers send latin1 headers instead of
13219 us-ascii. We just have to encode high chars into utf-8.
13220 (header_decode_text): Call append_latin1 for appending unencoded
13222 (append_latin1): Do an additional mask for account for c's
13223 undefined behaviour for sign extension whilst shifting right.
13225 2000-08-30 Jeffrey Stedfast <fejj@helixcode.com>
13227 * providers/imap/camel-imap-store.c (camel_imap_fetch_command):
13228 Rewrote to ignore strings that look like server responses until it
13229 is sure that it has finished reading the literal string response.
13231 2000-08-30 Jeffrey Stedfast <fejj@helixcode.com>
13233 * camel-remote-store.c (remote_send_string): Don't wrap printed
13234 strings in quotes, makes things messy
13236 * providers/imap/camel-imap-folder.c (imap_get_message): Updated
13237 to use the camel_imap_fetch_command
13239 * providers/imap/camel-imap-stream.c (stream_read): Updated to use
13240 camel_imap_fetch_command
13242 * providers/imap/camel-imap-store.c (camel_imap_command_extended):
13243 No longer handles FETCH requests so no longer needs to be
13244 concerned with checking to make sure that server responses are
13245 valid (they have to be).
13246 (camel_imap_fetch_command): New convenience function that handles
13249 2000-08-30 Peter Williams <peterw@helixcode.com>
13251 * camel-remote-store.c (remote_connect): Unify with remote_post_connect.
13252 (remote_disconnect): Unify with remote_pre_disconnect.
13253 (camel_remote_store_class_init): Don't use the post_connect and
13254 pre_disconnect classfuncs anymore ; they weren't especially useful.
13256 * providers/imap/camel-imap-store.c (imap_connect): Use this again
13257 instead of implementing post_connect.
13258 (imap_disconnect): Analogous to above.
13260 * camel-session.c (camel_session_get_service_connected): New function.
13261 Like camel_session_get_service() but also connects to the service
13262 if needed. camel_session_get_{store,transport} (defined in the header)
13263 used this now, preventing annoying when-to-connect problems.
13265 * camel-service.c (camel_service_new): Revert to the old behavior
13266 of not connecting until told to do so. Otherwise doing auth
13267 testing correctly is really hard.
13268 (camel_service_connect): Fix behavior here (set the connected
13270 (camel_service_disconnect): Unset the connected flag.
13272 2000-08-30 Jeffrey Stedfast <fejj@helixcode.com>
13274 * providers/imap/camel-imap-store.c: General cleanup / moving
13275 stuff around to make things easier to follow.
13277 2000-08-30 Jeffrey Stedfast <fejj@helixcode.com>
13279 * camel-remote-store.c: Prevent exceptions from being overwritten
13281 * providers/imap/camel-imap-folder.c (imap_expunge): Beautified
13282 (imap_get_subfolder_names_internal): Removed old code as the
13283 replacement code has now been tested and proven to work
13285 2000-08-29 Jeffrey Stedfast <fejj@helixcode.com>
13287 * providers/imap/camel-imap-utils.c: Removed old code that will
13288 never be needed again
13290 * providers/imap/camel-imap-store.c: Removed old code for
13291 try_connect - will never need this code
13292 (slurp_response): Update to make sure we aren't falsely detecting
13295 2000-08-29 Peter Williams <peterw@helixcode.com>
13297 * camel-service.c (camel_service_connect): Uncomment this.
13298 (camel_service_disconnect): Same.
13300 * camel-remote-store.[ch]: New files. Abstract remote storages
13301 (IMAP, POP3, NNTP) and hides the lower-level networky stuff.
13303 * camel-service.c (camel_service_new): Take an extra argument, the
13304 provider that created us, cause it's useful.
13305 (camel_service_finalize): Unref our new provider member.
13307 * camel-session.c (camel_session_get_service): Pass the proper number of
13308 arguments to camel_service_new().
13310 * camel-imap-store.c: Massive update: 1) use the CamelRemoteService to
13311 make our life Very Easy (TM). 2) Change the semantics of all
13312 camel_imap_command* functions to take exceptions, centralize tons of
13313 duplicate code, and use the handy RemoteStore utility functions
13315 * camel-imap-folder.c: Use the new semantics of camel_imap_command*
13317 * camel-imap-stream.c: Same.
13319 2000-08-29 Jeffrey Stedfast <fejj@helixcode.com>
13321 * providers/imap/camel-imap-store.c (camel_imap_command_extended):
13322 Updated to check for EXPUNGE notifications
13324 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
13325 Updated to account for messages which have been expunged (now
13326 takes a new arg, a GPtrArray of message id's that have been
13328 (imap_expunge): Updated (we may want to just use the code in
13329 folder_changed now instead of doing our own summary
13330 expunging...but that can be fixed later)
13331 (imap_append_message): Updated.
13332 (imap_copy_message_to): Updated.
13333 (imap_move_message_to): Updated.
13335 2000-08-28 Peter Williams <peterw@helixcode.com>
13337 * camel-folder.c (camel_folder_refresh_info): New member function,
13338 refresh_info, used for rereading folder state after its state has
13339 somehow become unknown. Tries to preserve last-known status of
13342 * providers/mbox/camel-mbox-folder.c (mbox_refresh_info): Implement
13343 ::refresh_info (split up ::init)
13345 * providers/mbox/camel-mbox-store.c (get_folder): Call ::refresh_info.
13347 * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Call
13348 ::refresh_info once initialized.
13349 (imap_refresh_info): New member function; reads the summary from
13350 the server (used to be in camel_imap_folder_new; split out).
13352 * providers/imap/camel-imap-store.c (imap_connect): Set
13353 CamelService::connected a little early so that
13354 camel_imap_command won't try to connect while already
13356 (camel_imap_command*): Try to connect if not connected already.
13358 * providers/pop3/camel-pop3-folder.c (pop3_refresh_info): Same as above.
13360 * providers/pop3/camel-pop3-folder.c (camel_pop3_folder_new): Same
13363 * providers/pop3/camel-pop3-store.c (pop3_connect): Set
13364 CamelService::connected a little early so that
13365 camel_pop3_command won't try to connect while already
13367 (connect_to_server): Same.
13369 * providers/nntp/camel-nntp-folder.c (nntp_folder_refresh_info): Same
13372 2000-08-28 Jeffrey Stedfast <fejj@helixcode.com>
13374 * providers/imap/camel-imap-folder.c (imap_get_message): Fixed the
13375 hack around quoted string responses - should now handle them
13376 according to the specifications in the RFC
13378 * providers/imap/camel-imap-stream.c (stream_read): Updated to
13379 match the code currently used in camel-imap-folder.c
13381 2000-08-28 Ettore Perazzoli <ettore@helixcode.com>
13383 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
13384 Never ever free `tmpname' as it comes from `alloca()'!
13386 2000-08-26 Ettore Perazzoli <ettore@helixcode.com>
13388 * camel-mime-utils.c (header_decode_text): Use `g_free()', not
13389 `free()', to free `decword'.
13391 2000-08-25 Peter Williams <peterw@helixcode.com>
13393 * camel.c (camel_init): Don't call unicode_init; code in e-util
13394 will do it, and if unicode_init is called twice, you get an
13395 infinite loop when looking up nonexistant encodings (patch
13396 has been submitted to libunicode's maintainer).
13398 * camel-provider.h: Add a new field, default_ports, which
13399 helps the configuration code guess about how to make CamelURL's
13402 * providers/*/camel-*-provider.c: Specify default ports.
13404 2000-08-25 Jeffrey Stedfast <fejj@helixcode.com>
13406 * providers/imap/camel-imap-folder.c
13407 (imap_get_subfolder_names_internal): If the url path is "/" and
13408 the folder path is "/", just LIST "" "*" (this should fix some
13409 cyrus imapd problems). Also, INBOX is case insensitive so use
13412 2000-08-24 Lauris Kaplinski <lauris@helixcode.com>
13414 * camel-folder-summary.c (summary_build_content_info):
13415 Use UTF-8 as default
13416 * camel-mime-part-utils.c (simple_data_wrapper_construct_from_parser):
13417 Use UTF-8 as default
13418 * camel-mime-utils.c (rfc2047_decode_word): Use UTF-8
13420 2000-08-17 Not Zed <NotZed@HelixCode.com>
13422 * providers/mh/camel-mh-folder.c (mh_finalize): And here too.
13424 * providers/mbox/camel-mbox-folder.c (mbox_finalize): Close index
13427 2000-08-23 Dan Winship <danw@helixcode.com>
13429 * camel-mime-utils.c (header_address_list_format_append): put
13430 commas between addresses.
13432 2000-08-22 Dan Winship <danw@helixcode.com>
13434 * providers/imap/camel-imap-folder.c
13435 (imap_protocol_get_summary_specifier): use BODY.PEEK, not BODY, so
13436 we don't set the message \Seen.
13438 2000-08-22 Christopher James Lahey <clahey@helixcode.com>
13440 * providers/pop3/camel-pop3-store.c: Fixed a small warning.
13442 2000-08-22 Peter Williams <peterw@helixcode.com>
13444 * camel-service.c (camel_service_new): Connect automatically if the
13446 (finalize): Disconnect automatically if connected.
13447 (camel_service_query_auth_types): Split into two functions; one to
13448 be called if we're connected to an actual server (_connected), one
13449 to be called if we're just gauging the general authtypes supported
13451 (is_connected): Remove.
13453 * camel-store.c (camel_store_get_folder): Don't connect explicitly to
13456 * providers/nntp/camel-nntp-store.c (query_auth_types_generic): Split
13457 the query_auth_types function. Hook it up in _new.
13458 (finalize): Don't try to disconnect here.
13460 * providers/pop3/camel-pop3-store.c (query_auth_types_generic): Same.
13461 (finalize): Don't try to disconnect here.
13463 * providers/imap/camel-imap-store.c (query_auth_types_generic): Same.
13464 (finalize): Don't try to disconnect here.
13466 * providers/smtp/camel-smtp-transport.c (query_auth_types_generic): Split
13467 the query_auth_types (dummy, in this case) function. Hook it up in _new.
13468 (finalize): Don't try to disconnect here.
13470 2000-08-21 JP Rosevear <jpr@helixcode.com>
13472 * providers/nntp/camel-nntp-folder.c (nntp_folder_get_subfolder_names):
13473 Make sure newsrc is not null
13474 (nntp_folder_get_subfolder_names): ditto
13476 * providers/nntp/camel-nntp-newsrc.c
13477 (camel_nntp_newsrc_get_subscribed_group_names): Programming check
13479 (camel_nntp_newsrc_get_all_group_names): ditto
13480 (camel_nntp_newsrc_write_to_file): ditto
13481 (camel_nntp_newsrc_write): ditto
13483 2000-08-21 JP Rosevear <jpr@helixcode.com>
13485 * providers/nntp/camel-nntp-store.c (camel_nntp_command):
13486 Make sure respbuffer is not null before manipulating it.
13487 If it is null, return CAMEL_NNTP_FAIL and a decent error
13490 2000-08-18 Peter Williams <peterw@helixcode.com>
13492 * camel-internet-address.c (internet_encode): If the name is "" we
13493 weren't outputting anything; output the address at least.
13495 2000-08-16 Peter Williams <peterw@helixcode.com>
13497 * camel-internet-address.c (internet_encode): Fix a leak when
13498 name = "". It's a single-byte leak, but it's the little things
13501 * camel-object.c (camel_type_lock_up): Don't leave the type
13502 system locked when a bad unlock happens.
13504 * providers/mbox/camel-mbox-store.c (get_folder): Fix a leak.
13506 2000-08-15 Peter Williams <peterw@helixcode.com>
13508 * providers/imap/camel-imap-folder.c (imap_copy_message_to): Typo fix.
13510 2000-08-14 Peter Williams <peterw@helixcode.com>
13512 * camel-folder-search.c (search_get_sent_date): New search function;
13513 returns the time_t when the message was sent.
13514 (search_get_receive_date): Same for when it was received.
13515 (search_get_current_date): Gets the current time for use with the
13516 above two. Is this in the right place?
13518 * camel-folder-search.h: Add the new functions above to the class.
13520 2000-08-13 Dan Winship <danw@helixcode.com>
13522 * providers/nntp/Makefile.am (libcamelnntpinclude_HEADERS): Add
13525 * providers/imap/camel-imap-folder.c
13526 (imap_get_subfolder_names_internal): do a strcasecmp rather than
13527 just a strcmp when checking if a folder is "INBOX", since it is
13528 a case-insensitive name.
13530 2000-08-12 Dan Winship <danw@helixcode.com>
13532 * providers/imap/camel-imap-folder.c (imap_get_summary_internal):
13533 Don't assume the FETCH results will come back in the order they
13535 (imap_get_subfolder_names_internal): Add "INBOX" to the list as
13536 g_malloc'ed memory, not a static string.
13538 2000-08-12 Jeffrey Stedfast <fejj@helixcode.com>
13540 * providers/imap/camel-imap-store.c
13541 (camel_imap_command_continuation): Now takes a char * parameter
13542 rather than a stream
13543 (camel_imap_command_continuation_with_stream): Same function as
13544 above but takes a stream parameter instead
13546 * providers/imap/camel-imap-folder.c (imap_append_message): Use
13547 camel_imap_command_continuation_with_stream
13549 2000-08-12 Dan Winship <danw@helixcode.com>
13551 * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): New
13552 function to do one round of attempted authentication.
13553 (pop3_connect): Move a bunch of code out into
13554 pop3_try_authenticate and fix some bugs in the edge cases.
13556 2000-08-12 Jeffrey Stedfast <fejj@helixcode.com>
13558 * providers/imap/camel-imap-store.c (query_auth_types): No longer
13559 calls try_connect() to get authtypes
13561 2000-08-11 Jeffrey Stedfast <fejj@helixcode.com>
13563 * providers/imap/camel-imap-store.c
13564 (camel_imap_command_continuation): Changed param order a bit and
13567 * providers/imap/camel-imap-folder.c (imap_append_message): Use
13568 the new multi-transactional convenience functions
13570 2000-08-11 Jeffrey Stedfast <fejj@helixcode.com>
13572 * providers/imap/camel-imap-store.c
13573 (camel_imap_command_preliminary): New convenience function for
13574 multi-transactional commands (opening request)
13575 (camel_imap_command_continuation): New convenience function for
13576 multi-transactional commands (followup data)
13578 2000-08-11 Christopher James Lahey <clahey@helixcode.com>
13580 * providers/mh/camel-mh-folder.c: Fixed a warning.
13582 2000-08-11 Chris Toshok <toshok@helixcode.com>
13584 * providers/nntp/camel-nntp-folder.c
13585 (camel_nntp_folder_class_init): remove get_name and get_full_name
13586 assignments, since the camel-folder.c implementation does what we
13589 2000-08-11 Chris Toshok <toshok@helixcode.com>
13591 * providers/nntp/camel-nntp-store.c
13592 (camel_nntp_store_get_toplevel_dir): use g_get_home_dir, since
13593 evolution_dir isn't available in the providers.
13595 2000-08-11 Peter Williams <peterw@helixcode.com>
13597 * camel-folder.c (thaw): Fix a bug where the message_changed
13598 signal wasn't being emitted.
13600 2000-08-11 Not Zed <NotZed@HelixCode.com>
13602 * providers/mh/camel-mh-folder.c (mh_set_message_user_tag):
13604 (mh_get_message_user_tag): Implement.
13606 * providers/mbox/camel-mbox-folder.c (mbox_get_message_user_tag):
13607 (mbox_set_message_user_tag): Implement.
13609 * camel-folder.c (move_message_to): Yay so lets fix an already
13611 (copy_message_to): and here too ... update for api change to append().
13612 And removed another warning.
13613 (camel_folder_set_message_user_tag): Routine to set message tags.
13614 (camel_folder_get_message_user_tag): And accessor.
13616 2000-08-10 Christopher James Lahey <clahey@helixcode.com>
13618 * camel-folder-search.c, camel-folder-summary.c, camel-medium.c,
13619 camel-mime-filter-charset.c, camel-mime-filter.c,
13620 camel-mime-filter.h, camel-mime-message.c, camel-mime-parser.c,
13621 camel-mime-part-utils.c, camel-mime-part.c, camel-mime-utils.c,
13622 camel-movemail.c, camel-multipart.c, camel-object.c,
13623 camel-stream-mem.c, providers/mbox/camel-mbox-folder.c,
13624 providers/mbox/camel-mbox-summary.c,
13625 providers/mh/camel-mh-folder.c,
13626 providers/smtp/camel-smtp-transport.c: Fixed some warnings.
13628 2000-08-11 Not Zed <NotZed@HelixCode.com>
13630 * providers/vee/camel-vee-folder.c (vee_folder_build_folder): Free
13631 the search properly.
13632 (vee_folder_build): And here too.
13634 2000-08-10 Jeffrey Stedfast <fejj@helixcode.com>
13636 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
13637 If we go over the max number of messages, don't keep requesting
13638 new message summaries, just break.
13640 2000-08-11 Not Zed <NotZed@HelixCode.com>
13642 * camel-mime-parser.c (folder_scan_header): A better way to
13643 compress leading whitespace. The code is probably invalid anyway,
13644 I dont think it will work across buffer boundaries.
13646 * providers/mbox/camel-mbox-folder.c (mbox_append_message): And
13647 write out proper format From lines here too.
13649 * providers/mbox/camel-mbox-summary.c
13650 (camel_mbox_summary_build_from): New function to build a more
13651 compatible mbox "From " line.
13652 (camel_mbox_summary_sync): Write From lines in the proper format.
13654 2000-08-10 Not Zed <NotZed@HelixCode.com>
13656 * providers/mh/camel-mh-store.c (get_folder): Remove warnin g.
13658 * providers/mbox/camel-mbox-store.c (xrename): Kill some warnings
13659 with constification.
13661 * providers/imap/camel-imap-folder.c (imap_append_message): Fixed
13662 for append api change. Eek this routine seriously wastes memory.
13664 * providers/mh/camel-mh-folder.c (mh_search_free): Impelemnt.
13665 (mh_append_message): Fix for api change, and include user flags
13666 and tags in new message.
13668 * providers/vee/camel-vee-folder.c (vee_search_by_expression): Fix
13669 for search api change.
13671 * camel-folder.c (camel_folder_search_free): New function for
13672 freeing search results.
13673 (search_free): Changed my mind, implement a default that actually
13674 does something. Free as to the old interface.
13675 (camel_folder_append_message): Changed to accept a
13676 camelmessageinfo rather than flags, which just doesn't have enough
13678 (copy_message_to): Change for append_message api change.
13679 (move_message_to): Likewise.
13681 * providers/mbox/camel-mbox-folder.c (mbox_search_free):
13683 (mbox_append_message): Fix for api change, and also copy user
13684 flags/tags across to new summary.
13686 * camel-folder-search.c (search_user_tag): A search expression
13687 that returns the current use flag by name.
13688 (camel_folder_search_free_result): New function to free the result
13691 * camel-folder-summary.c: Bump summary version.
13692 (message_info_new):
13693 (message_info_load):
13694 (message_info_save):
13695 (camel_message_info_dup_to):
13696 (camel_message_info_free): Added support for arbitrary tag/value
13697 pairs (CamelTag's).
13700 (camel_tag_list_size):
13701 (camel_tag_list_free): Operations for working with CamelTags.
13703 2000-08-09 Peter Williams <peterw@helixcode.com>
13705 * camel-store.c (camel_store_get_folder): Connect beforehand, if
13708 * providers/imap/camel-imap-store.c (camel_imap_store_init): Default
13709 the dir_sep to "/" so that certain functions can safely assume that
13710 dir_sep is valid (at least, nonnull).
13712 2000-08-09 Ettore Perazzoli <ettore@helixcode.com>
13714 * providers/nntp/camel-nntp-folder.c
13715 (nntp_folder_set_message_flags): Get rid of an unused variable.
13717 * providers/nntp/Makefile.am (INCLUDES): Fix includes so that we
13718 don't use installed headers anymore. [I copied this over from the
13719 IMAP provider, that does not seem to have this problem.]
13721 2000-08-09 Not Zed <NotZed@HelixCode.com>
13723 * camel-folder-search.c (camel_folder_search_execute_expression):
13724 Reorder search result in summary order if we searched with a
13727 2000-08-08 Dan Winship <danw@helixcode.com>
13729 * camel-uid-cache.c: New code to keep an on-disk cache of what
13730 UIDs have been seen in a folder.
13732 * camel-provider.h: Add new flags CAMEL_PROVIDER_IS_SOURCE (mail
13733 can arrive in it by non-Camel means) and CAMEL_PROVIDER_IS_STORAGE
13734 (you can work with mail directly without needing to copy it local).
13736 * providers/*/camel-*-provider.c: Add flags as needed: imap and
13737 mbox are SOURCE and STORAGE. mh and nntp are just STORAGE, pop3 is
13740 * camel-mime-message.c (process_header): Add another subject
13741 g_strstrip that fejj's earlier commit missed.
13743 2000-08-08 Peter Williams <peterw@helixcode.com>
13745 * camel-provider.h: Remove some GTK stuff that I missed.
13747 * providers/imap/camel-imap-store.c (imap_noop): Turn this
13748 back on with the new timeout interface in CamelSession.
13750 * camel-session.[ch] (camel_session_register_timeout): New
13751 interface for Camel to register timeouts. Basically the
13752 GTK timeout interface is copied. We do this because Camel isn't
13753 allowed to use GTK anymore.
13755 2000-08-07 Not Zed <NotZed@HelixCode.com>
13757 * providers/mh/camel-mh-folder.c (mh_append_message): Only retry
13758 another uid if we had a name clash, otherwise fail.
13760 2000-08-07 Jeffrey Stedfast <fejj@helixcode.com>
13762 * providers/imap/camel-imap-folder.c
13763 (imap_get_subfolder_names_internal): If we are trying to get a
13764 subfolder listing of the root folder, always make sure INBOX is
13767 * providers/imap/camel-imap-utils.c (imap_parse_list_response):
13768 Check for NIL as a directory separator.
13770 2000-08-07 Peter Williams <peterw@helixcode.com>
13772 * providers/nntp/Makefile.am: Reorder the INCLUDES to pull
13773 in the camel headers from the local source tree before
13774 the ones in $(includedir). This was causing compile problems
13775 because the installed, Gtk-based camel-object.h was included
13776 before the uninstall Camel-based one.
13778 2000-08-07 Jeffrey Stedfast <fejj@helixcode.com>
13780 * providers/imap/camel-imap-utils.c (imap_translate_sexp): Strip
13781 all \n's from the expression
13783 * string-utils.c (strip): New convenience function to strip
13784 occurences of a single char from a string
13786 * camel-mime-message.c (camel_mime_message_set_subject): Do a
13787 g_strstrip on the subject so we can stop getting those annoying
13790 2000-08-07 Dan Winship <danw@helixcode.com>
13792 * camel-folder.c (camel_folder_free_deep): Fix this to not require
13793 NULL-termination of the array.
13795 2000-08-04 Jeffrey Stedfast <fejj@helixcode.com>
13797 * providers/imap/camel-imap-store.c (imap_connect): If we fail to
13798 get a dir_sep, then supply the default of "/".
13799 (get_folder): Undo changes by Peter
13801 2000-08-04 Peter Williams <peterw@helixcode.com>
13803 * providers/imap/camel-imap-store.c (get_folder): Prevent a coredump
13804 when get_folder()ing from a store with dir_sep = NULL.
13806 2000-08-04 Peter Williams <peterw@helixcode.com>
13808 * camel-store.h: Include camel-object.h. Ettore said this wasn't
13811 2000-08-04 Not Zed <NotZed@HelixCode.com>
13813 * camel-url.c (camel_url_set_protocol):
13814 (camel_url_set_host):
13815 (camel_url_set_path):
13816 (camel_url_set_port): Url editing functions.
13818 2000-08-04 Dan Winship <danw@helixcode.com>
13820 * providers/pop3/camel-pop3-folder.c (pop3_set_message_flags):
13821 (pop3_sync): Indexes into the flags array are message_number minus
13822 1, not just message_number.
13824 * providers/pop3/camel-pop3-store.c: add a debugging macro for
13825 doing protocol tracing.
13827 2000-08-03 Jeffrey Stedfast <fejj@helixcode.com>
13829 * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Only
13830 call imap_get_summary_internal if the folder can hold messages
13832 * providers/nntp/camel-nntp-provider.c (camel_provider_module_init):
13833 Initialize the service_cache for the news/nntp providers
13835 2000-08-03 Peter Williams <peterw@helixcode.com>
13837 * providers/nntp/Makefile.am (INCLUDES): Add -I$(top_srcdir) to
13838 pull in libibex/ibex.h
13840 2000-08-02 Not Zed <NotZed@HelixCode.com>
13842 * providers/mh/camel-mh-summary.c (camel_mh_summary_sync): Expunge
13843 from the end, so the index isn't messed up when you remove a
13846 * providers/mh/camel-mh-folder.c (mh_append_message): Fix a bug
13847 where it would never open an output file/uid.
13849 * providers/mbox/camel-mbox-store.c (rename_folder):
13850 Implementation for mbox as well.
13852 * camel-store.c (camel_store_rename_folder): New method to rename folders.
13853 (rename_folder): Default implementation.
13855 * providers/mh/camel-mh-store.c (delete_folder): Implement this.
13856 (rename_folder): Implement a rename operation.
13858 2000-08-02 Dan Winship <danw@helixcode.com>
13860 * providers/MH: Kill this. It doesn't have any code to do anything
13861 the new mh provider doesn't do better.
13863 * providers/Makefile.am: Remove reference to MH subdir, and
13864 promote nntp to fully-supported status, since it does compile and
13867 * camel-mime-message.c (camel_mime_message_set_subject): Trim
13868 trailing space from the subject. I've now seen replies from two
13869 different people that tricked the threading code by (a) not having
13870 References/In-Reply-To, and (b) adding an extra space to the end
13871 of the subject line so the subject-based threading fails too. Who
13872 writes these broken mailers anyway?
13874 2000-08-01 Jeffrey Stedfast <fejj@helixcode.com>
13876 * providers/smtp/camel-smtp-transport.c (smtp_helo): When forced
13877 to use the IP, place it in square brackets.
13879 * providers/imap/camel-imap-utils.c (imap_translate_sexp): New and
13880 improved sexp parser. An honest try at using e-sexp is wrapped in
13881 a #ifdef at the bottom of the file but is currently not used
13883 * providers/imap/camel-imap-folder.c (imap_search_by_expression):
13884 We want to do a UID SEARCH so we get UIDs back instead of sequence
13887 2000-08-01 Not Zed <NotZed@HelixCode.com>
13889 * providers/mh: New mh provider implementation.
13891 * providers/Makefile.am (SUBDIRS): Added mh provider.
13893 2000-07-31 Jeffrey Stedfast <fejj@helixcode.com>
13895 * providers/imap/camel-imap-folder.c (imap_get_message_info_internal):
13896 Some IMAP servers don't wrap the UID in ()'s so don't depend on that
13897 (imap_get_summary_internal): Same
13899 * providers/imap/camel-imap-utils.c (free_sexp_node): Oops, forgot to
13900 free node->function - not good.
13902 2000-07-31 Peter Williams <peterw@helixcode.com>
13904 * providers/vee/camel-vee-folder.c (vee_search_by_expression): Add
13905 a NULL to the matches pointer array so that g_strfreev knows where
13908 2000-07-31 Jeffrey Stedfast <fejj@helixcode.com>
13910 * providers/imap/camel-imap-utils.c (imap_translate_sexp): New
13911 convenience function to translate a Camel sexp into the equivalent
13914 * providers/imap/camel-imap-store.c: More places now use
13917 * providers/imap/camel-imap-folder.c (imap_search_by_expression):
13918 Implemented initial version (this may or may not work quite right)
13920 2000-07-28 Jeffrey Stedfast <fejj@helixcode.com>
13922 * providers/imap/camel-imap-folder.c (imap_expunge): Make sure
13923 the third word/token (whatever) is "EXPUNGE" and not something
13924 else like "EXISTS" or "RECENT". When removing the message from
13925 the summary also make sure to free that data to avoid leakage.
13926 Also make sure to subtract 1 from the 'id' since IMAP starts
13927 at 1 and our summary starts at 0 :-)
13929 2000-07-28 Jeffrey Stedfast <fejj@helixcode.com>
13931 * providers/imap/camel-imap-store.c (camel_imap_status): Cleaned
13932 up a bit, now uses imap_next_word()
13933 (camel_imap_command_extended): Now uses imap_next_word(). When
13934 checking for RECENT, allow the first digit of the recent-count
13935 be between 0 and 9 inclusive instead of exclusive.
13937 * providers/imap/camel-imap-folder.c (imap_expunge): Optimized.
13938 No longer will it need to reload the summary as it now instead
13939 removes the appropriate message summaries from the cache.
13940 (camel_imap_folder_changed): If recent == 0 then return. If
13941 recent < 0 then just emit the folder_changed signal, don't reload
13944 2000-07-28 Jeffrey Stedfast <fejj@helixcode.com>
13946 * providers/imap/camel-imap-folder.c
13947 (imap_get_message_count_internal): Get message count when STATUS
13949 (imap_init): folder->has_search_capability is required for IMAP so
13950 should always be set to TRUE (is currently being set to FALSE as
13951 I've not yet implemented SEARCH support).
13952 (camel_imap_folder_changed): Seem to have fixed my optimization
13955 2000-07-28 Jon K Hellan <hellan@acm.org>
13957 * providers/imap/camel-imap-store.h (CamelImapServerLevel): New
13959 (CamelImapStore): Added server_level and has_status_capability
13962 * providers/imap/camel-imap-store.c (imap_connect): Detect
13963 IMAP4REV1, IMAP4 and STATUS in capability response.
13965 * providers/imap/camel-imap-folder.c
13966 (imap_get_message_count_internal): Use STATUS only if server
13967 supports it. TODO: Get message count when STATUS not supported.
13968 (imap_get_message, imap_get_summary_internal,
13969 imap_get_message_info_internal): Handle IMAP4 as well.
13970 (imap_protocol_get_summary_specifier): New function: Make a data
13971 item specifier for the header lines we need, appropriate to the
13974 2000-07-27 Peter Williams <peterw@helixcode.com>
13976 * camel-mime-utils.c (header_decode_lwsp): More
13977 checks for end of string.
13979 * providers/imap/camel-imap-store.c:
13980 (imap_command_extended): Free the elements of our
13981 array (huge mem leak)
13983 * providers/imap/camel-imap-folder.c:
13984 (summary_get_internal): Same as above.
13987 2000-07-27 Jeffrey Stedfast <fejj@helixcode.com>
13989 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
13990 Fixed my routine to only fetch new headers, my IDs were off by 1
13991 on the high end, so when it would fetch the last newly arrived
13992 message it would fail and end up fetching all of the summaries
13993 because of the corruption.
13995 2000-07-27 Jeffrey Stedfast <fejj@helixcode.com>
13997 * camel-url.c (camel_url_to_string): If the path doesn't begin
13998 with a / and there is a host, prepend a / to the path.
14000 2000-07-27 Jeffrey Stedfast <fejj@helixcode.com>
14002 * providers/imap/Makefile.am: Added camel-imap-utils.[c,h]
14004 * providers/imap/camel-imap-utils.[c,h]: Utilities for parsing
14005 server responses for use in both camel-imap-store.c and
14006 camel-imap-folder.c
14008 * providers/imap/camel-imap-folder.c (imap_get_summary_internal):
14009 Free all the pointers in the headers array.
14010 (imap_get_subfolder_names_internal): Updated to use
14011 imap_parse_list_response
14012 (imap_parse_subfolder_list): Removed in favor of
14013 imap_parse_list_response
14015 * providers/imap/camel-imap-store.c (camel_imap_command_extended):
14016 Free all the pointers in the data array.
14017 (imap_connect): Updated to use imap_parse_list_response and fixed
14019 (folder_is_selectable): Updated.
14021 2000-07-27 Jeffrey Stedfast <fejj@helixcode.com>
14023 * providers/imap/camel-imap-folder.c (imap_get_message_info): Now
14024 uses a hash table for looking up message info rather than a linear
14027 2000-07-27 Peter Williams <peterw@helixcode.com>
14029 * providers/*/Makefile.am: Don't specify SUBDIRS =
14030 [nothing]. Messes up distcheck.
14032 2000-07-26 Peter Williams <peterw@helixcode.com>
14034 * camel-mime-parser.c (folder_scan_init): Initialize
14035 outbuf to be "" -- it's not guaranteed to be zeroed.
14037 * camel-mime-utils.c (header_references_decode): Return
14038 if the header is NULL -> or "" <-. Don't do our stupid
14039 mailer trick if we point to \0.
14040 (header_decode_quoted_string): Don't rip past end of
14043 2000-07-26 Dan Winship <danw@helixcode.com>
14045 * camel-movemail.c (movemail_external): routine to call an
14046 external movemail program.
14047 (camel_movemail): Nuke return value, use movemail_external when
14048 available and useful, and don't delete "dest" on errors, since
14049 it might have started non-empty.
14051 2000-07-26 Jeffrey Stedfast <fejj@helixcode.com>
14053 * camel-url.c (camel_url_to_string): Should now always prepend a '/'
14054 before the path if it doesn't already exist.
14056 * providers/imap/camel-imap-folder.c: Fixed a few compiler warnings
14058 2000-07-25 Jeffrey Stedfast <fejj@helixcode.com>
14060 * providers/imap/camel-imap-folder.c (imap_summary_free): Fixed the
14061 real problem that Peter was running into.
14063 2000-07-25 Dan Winship <danw@helixcode.com>
14065 * camel-mime-message.c (write_to_stream): Don't add a Mime-Version
14066 header to a message that already has one.
14068 * camel-internet-address.c (internet_encode): Don't put <>s around
14069 addresses with no name part.
14071 2000-07-25 Peter Williams <peterw@helixcode.com>
14073 * providers/imap/camel-imap-folder.c (imap_expunge): Set
14074 imap_folder->summary to NULL after calling imap_summary_free,
14075 so we don't get stuck with a junk summary pointer. Should
14078 2000-07-25 Jeffrey Stedfast <fejj@helixcode.com>
14080 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
14081 Optimized to try and get the new message headers without reloading
14082 the entire summary from scratch.
14083 (imap_get_summary_internal): Will now sync() before attempting to
14084 reload the summary so that flags are set in the reloaded summary
14087 2000-07-24 Jeffrey Stedfast <fejj@helixcode.com>
14089 * providers/imap/camel-imap-store.c (get_folder): Updated to give
14090 special attention to the root folder.
14092 * providers/imap/camel-imap-folder.c
14093 (imap_get_subfolder_names_internal): Updated to handle the root
14095 (imap_get_message_count_internal): return 0 if folder can't hold
14097 (camel_imap_folder_new): Change so that root folder gets special
14098 attention and always gets can_hold_messages set to FALSE
14100 2000-07-24 Dan Winship <danw@helixcode.com>
14102 * camel-folder.c: Remove exceptions from a number of methods that
14103 work on what ought to be static data: get_parent_folder,
14104 get_parent_store, get_message_count, get_unread_message_count,
14105 get_permanent_flags, get_message_flags, set_message_flags,
14106 get_message_user_flag, set_message_user_flag, get_uids,
14107 get_summary, get_subfolder_names. Turn camel_folder_delete_message
14108 into a macro. (Mostly a pull-up from the camel-async branch.)
14110 * providers/{imap,mbox,nntp,pop3,vee}: Update for CamelFolder
14113 2000-07-24 Jeffrey Stedfast <fejj@helixcode.com>
14115 * providers/imap/camel-imap-folder.c (imap_get_message_info): Updated
14116 to port easily to the new Camel API
14117 (imap_init): Don't SELECT INBOX, we don't need to do that
14119 2000-07-24 Jeffrey Stedfast <fejj@helixcode.com>
14121 * providers/imap/camel-imap-folder.c (camel_imap_folder_new):
14122 Initialize the summary and subfolder listing.
14123 (imap_summary_free): Now takes a GPtrArray arg rather than a
14124 CamelImapFolder as it increases it's usefullness for free()'ing
14125 temporary summaries.
14126 (imap_get_message_count_internal): A new convenience function for
14127 getting the actual message count on a server to be used by
14128 imap_get_summary_internal)
14129 (imap_get_message_count): Since the Camel API is on the move again,
14130 the future version of this function will not be able to make a
14131 call to the store, it must only access previously fetched data (thus
14132 the creation of the _internal function)
14133 (imap_get_subfolder_names_internal): Again, because the future version
14134 of imap_get_subfolder_names will not take an exception, we must rename
14135 this function which will be called by camel_imap_folder_new()
14136 (imap_get_subfolder_names): We now return the previously collected
14137 subfolder listing that the _internal function fetched previously
14138 (imap_get_summary_internal): Again, same idea as the previous _internal
14140 (imap_get_summary): Again... now returns a previously aquired summary
14142 * providers/imap/camel-imap-store.c (imap_noop): This will hopefully
14143 prevent the imap store from disconnecting.
14144 (imap_connect): Modified to add a gtk timeout event that will call
14145 imap_noop() every 10 minutes (we may want to change this time value)
14146 (imap_disconnect): Modified to remove the NOOP timeout event from the
14148 (camel_imap_command_extended): Commented out the code that would try
14149 and detect if the store was disconnected and then reconnect if it was
14152 2000-07-24 Dan Winship <danw@helixcode.com>
14154 * camel-folder.[ch]: Remove camel_folder_get_message_uid, which
14155 was not used, and not implemented by any provider.
14157 * providers/nntp/camel-nntp-folder.c: Remove get_message_uid
14158 non-implementation.
14160 * camel-folder-pt-proxy.[ch], camel-arg-collector.c,
14161 camel-marshal-utils.[ch]: Bye bye bye.
14163 * Makefile.am: remove reference to camel-arg-collector.c
14165 2000-07-23 Jeffrey Stedfast <fejj@helixcode.com>
14167 * providers/imap/camel-imap-store.c (imap_disconnect): Made it a
14168 little more forgiving. Also set current_folder to NULL as there is
14169 no selected folder after a disconnect.
14170 (stream_is_alive): Detects whether or not a socket is "alive"
14171 (camel_imap_command_extended): Use stream_is_alive() to aid in the
14172 detection of a disconnected state.
14174 2000-07-22 Jeffrey Stedfast <fejj@helixcode.com>
14176 * providers/imap/camel-imap-store.c (get_folder): Clear
14177 CamelExceptions when appropriate (eg when folder is marked as
14178 \NoSelect). Still needs some cleanup and perhaps Dan will have a
14179 better way of doing this as this seems like a messy way of
14182 * providers/imap/camel-imap-folder.c (imap_get_uids): Took out
14183 some debug statements as they are no longer needed.
14185 2000-07-21 Jeffrey Stedfast <fejj@helixcode.com>
14187 * providers/imap/camel-imap-folder.c (imap_get_subfolder_names):
14188 Updated to not strip out subfolders that are marked as \NoSelect
14189 because this will be correctly handled in store->get_folder from
14192 * providers/imap/camel-imap-store.c (folder_is_selectable): New
14193 convenience function for use in get_folder().
14194 (parse_list_response): Now takes a char **flags argument which is
14195 needed by folder_is_selectable().
14196 (imap_connect): Updated to reflect changes to
14197 parse_list_response().
14199 2000-07-21 Jeffrey Stedfast <fejj@helixcode.com>
14201 * providers/imap/camel-imap-stream.c (stream_read): Updated with
14202 some of the same fixes I've made to camel-imap-folder.c like
14203 recalculating message part lengths.
14205 * providers/imap/camel-imap-store.c (camel_imap_command_extended):
14206 Rewrote the code to check for "* %d RECENT". Still needs to be
14207 modified, but should no longer cause an infinite loop by detecting
14208 mis-detecting RECENT messages.
14210 2000-07-20 Jeffrey Stedfast <fejj@helixcode.com>
14212 * providers/imap/camel-imap-folder.c (imap_get_summary):
14213 (imap_get_message_info): Oops. Fix UID parser to allow 0 and 9 to
14214 be in the range of valid UID chars.
14216 2000-07-20 Peter Williams <peterw@helixcode.com>
14218 * camel-object.c (camel_object_unref): Add a new global mutex
14219 'refcount' held when refcounting operations occur.
14221 2000-07-19 Peter Williams <peterw@helixcode.com>
14223 * camel-object.c (camel_type_lock_up): Correct the recursiveness;
14224 the locklevel is stored as a private, so each thread has its own
14225 idea of the locklevel. Thus one thread can relock, but a different
14226 one will think that it's a level 0 and try to lock the type_system
14229 2000-07-19 Jeffrey Stedfast <fejj@helixcode.com>
14231 * providers/imap/camel-imap-folder.c: General cleanup working
14232 towards getting Actions->Expunge working correctly.
14234 * providers/imap/camel-imap-store.c
14235 (cammel_imap_command_extended): Added code to look for "* %d
14236 RECENT" and to emit the folder_changed signal if there are any
14237 recent messages. Note: this is a hack and needs to be rewritten
14240 2000-07-19 Jeffrey Stedfast <fejj@helixcode.com>
14242 * providers/imap/camel-imap-folder.c (imap_get_summary): If the
14243 folder's message count is not the same as the number of summaries,
14244 free the old summary and create a new summary.
14246 2000-07-18 Jeffrey Stedfast <fejj@helixcode.com>
14248 * providers/imap/camel-imap-folder.c
14249 (camel_imap_folder_class_init): Added in
14250 imap_[g,s]et_message_user_flag() methods
14251 (imap_get_message_info): Rewrote to use the more efficient way of
14252 downloading summary information and also added a UID comparison so
14253 that if the UID requested doesn't match the UID received, it
14254 returns NULL. FIXME: When the mailer gets NULL when it requested
14255 message info, it seems that it displays a row for that message and
14256 when you try and select the blank row, it segfaults.
14258 * providers/imap/camel-imap-store.c (get_folder): Oops, this
14259 should not be checking against "/", it should be checking against
14262 * providers/imap/camel-imap-folder.c (imap_parse_subfolder_line):
14263 Updated to trim out the leading namespace.
14264 (imap_get_subfolder_names): Let the subfolder parser trim the
14265 namespace off the folder name.
14267 2000-07-17 Peter Williams <peterw@helixcode.com>
14269 * camel-object.c (camel_type_lock_up): New function; the
14270 Camel type_system lock is now fakey-recursive, being controlled
14271 by a semaphore that goes up and down and is protected by another
14272 lock. Theoretically all we need is the lock on the semaphore,
14273 but this we catch exceptions "better" (by deadlocking).
14274 (camel_type_lock_down): Corresponding to above.
14275 (all functions): s,G_LOCK,camel_type_lock_up, etc.
14277 2000-07-17 Jeffrey Stedfast <fejj@helixcode.com>
14279 * providers/imap/camel-imap-store.c (imap_disconnect): Send a
14282 * providers/imap/camel-imap-folder.c (imap_get_message): Hacks to
14283 get IMAP code to work with CommunigatePro and MS Exchange (and any
14284 other servers that send back a UID at the end of each FETCH inside
14285 of the main body of the message part).
14286 (imap_sync): Un-#if 0 the code that sets the flags on the IMAP
14287 server for messages that have changed. Oops, don't mask with
14288 DELETED to find out if the message has been answered ;-)
14289 (imap_expunge): sync before expunging.
14291 2000-07-16 Jeffrey Stedfast <fejj@helixcode.com>
14293 * providers/imap/camel-imap-store.c: All SELECT calls now pass
14294 a NULL folder argument to camel_imap_command_extended() since it's
14296 (imap_connect): Moved service_class->connect() to the point right
14297 after a connection is established with the server rather than
14298 waiting until the end of the function.
14299 (camel_imap_command): Updated the documentation comment
14300 (camel_imap_command_extended): Before sending a command, first
14301 check to make sure we are connected; if we aren't, then reconnect.
14302 Don't strncmp() command with "SELECT" as it's redundant.
14304 * providers/imap/camel-imap-folder.c: All SELECT calls now pass
14305 a NULL folder argument to camel_imap_command_extended() since it's
14306 not needed. Also s/camel_imap_command/camel_imap_command_extended as
14307 I will probably be doing away with camel_imap_command() or at least
14308 only using it for LOGIN and similar commands where the server won't
14309 notify us of any recent messages.
14311 2000-07-15 Jeffrey Stedfast <fejj@helixcode.com>
14313 * providers/imap/camel-imap-folder.c (camel_imap_folder_new):
14314 One last fix to get rid of hard-coded "/" directory separators
14316 2000-07-14 Peter Williams <peterw@helixcode.com>
14318 * camel-object.c : Implement 'events', which are suspiciously
14319 like signals except without all the marshalling baggage, and
14320 with quasi-thread-safety.
14321 (camel_object_class_declare_event): New func.
14322 (camel_object_hook_event): Ditto.
14323 (camel_object_trigger_event): Ditto.
14324 (obj_class_init): Declare the "finalize" event.
14325 (obj_class_finalize): Free the hashtable of events->preps
14326 (obj_finalize): Free the hashtable of events->hooklists
14327 (camel_object_unref): Trigger the finalize event (ourselves,
14328 to prevent massively unpleasant looping things.)
14330 2000-07-14 Peter Williams <peterw@helixcode.com>
14332 * camel-object.c (make_global_classfuncs): Change to return
14333 a CamelObjectClass. Change parents to a GSList and free it
14335 (camel_object_new): Don't allocate a classfuncs for every object;
14336 merely give it a reference to the global_classfuncs. Convert
14337 parents to a GSList and free it when done.
14338 (camel_object_unref): Don't free the classfuncs. Free the parents
14339 list, which is changed to a GSList.
14341 2000-07-14 Jeffrey Stedfast <fejj@helixcode.com>
14343 * string-utils.c (string_unquote): New convenience function
14344 to unquote a string if it's encapsulated by "'s
14346 * providers/imap/camel-imap-folder.c:
14347 * providers/imap/camel-imap-store.c: Made the necessary changes
14348 to stop using hard coded directory separators.
14350 2000-07-13 Dan Winship <danw@helixcode.com>
14352 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_load):
14353 If the summary is for a smaller mbox, and rebuilding from the
14354 last-known end position fails, try rebuilding from the beginning.
14355 Deals with the case where the user edits the mbox and makes it
14356 bigger, without adding new messages.
14358 2000-07-13 Peter Williams <peterw@helixcode.com>
14360 * camel-object.c: Rewritten to not be based on GtkObject,
14361 but a tiny threadsafe ripoff thereof. Objects still cannot
14362 be shared across threads, but ref/unref/destroy/new/etc
14363 will work. Signals are not implemented because doing it
14364 robustly would be a major pain in the butt, but class
14365 functions are. There's a small demonstration that it doesn't
14366 crash in ./temp-test.c: build it with ./make-test.sh.
14367 * camel-stream.c, camel-seekable-stream.c, camel-stream-mem.c:
14368 moved over to CamelObject. Proof of concept: two levels of
14369 subclass and class functions, all working without coredumps.
14370 To port to CamelObject:
14371 - s,GTK_,CAMEL_,g in the cast checks
14372 - s,gtk_type_new,camel_object_new,g
14373 - s,GtkType,CamelType,g
14374 - Change get_type function over to camel_type_declare
14375 - instead of hooking to finalize function, it goes into the
14378 - instead of GTK_OBJECT(so)->klass, CAMEL_OBJECT_GET_CLASS(so)
14379 - s,gtk_type_class,camel_type_get_global_classfuncs,g
14380 - don't chain finalize handlers; it will be done for you
14382 2000-07-13 Jeffrey Stedfast <fejj@helixcode.com>
14384 * providers/imap/camel-imap-folder.c:
14385 * providers/imap/camel-imap-store.c: If a SELECT fails, set
14386 imap_store->current_folder to NULL so a SELECT is forced before
14387 any message/folder operations are requested. Also, because some
14388 users don't use a namespace, make sure that if the url->path is
14389 "/" we don't use it when creating the folder_path.
14390 (camel_imap_command[_extended]): Since we allow the passing of
14391 a NULL folder which we can use to bypass a forced SELECT, no need
14392 to check for the individual commands that don't require a folder
14395 2000-07-13 Jeffrey Stedfast <fejj@helixcode.com>
14397 * providers/imap/camel-imap-folder.c:
14398 * providers/imap/camel-imap-store.c: Updated to use CAMEL_IMAP_OK,
14399 CAMEL_IMAP_NO, CAMEL_IMAP_BAD, and CAMEL_IMAP_FAIL rather than the
14400 ones copied from the POP3 provider.
14402 2000-07-13 Jeffrey Stedfast <fejj@helixcode.com>
14404 * providers/imap/camel-imap-folder.c (imap_get_summary): Oops.
14405 If the number of messages in the folder is 0, don't fetch
14406 summaries 1 thru 0, just return an empty summary.
14407 (imap_copy_message_to): Fixed to use message UID and also send
14408 the source folder as an arg to camel_imap_command rather than NULL.
14409 (imap_move_message_to): Same.
14410 (imap_init): If SELECT is successful, we need to set the current
14411 folder to the one selected, this was causing problems with move/copy
14413 2000-07-13 Dan Winship <danw@helixcode.com>
14415 * camel-service.h: define a set of CAMEL_SERVICE_URL_ALLOW_* flags
14416 parallel to the _NEED_* flags, and make the _NEED_* flags imply
14419 * providers/imap/camel-imap-store.c (camel_imap_store_init): imap
14422 2000-07-13 Jeffrey Stedfast <fejj@helixcode.com>
14424 * providers/imap/camel-imap-folder.c (imap_get_summary): New
14425 and improved approach to fetching an entire folder summary
14426 that should be much much faster than the old way as it gets
14427 the entire folder summary in 1 shot rather than requesting
14428 message by message. As with the last update, this version
14429 also only fetches the minimum number of header fields.
14430 (imap_get_summary): Oops, forgot to free the temp
14433 2000-07-13 Jeffrey Stedfast <fejj@helixcode.com>
14435 * providers/imap/camel-imap-folder.c (imap_get_summary): Don't
14436 fetch the entire RFC822 header, just fetch the fields we want.
14437 (imap_get_message_info): Same.
14439 2000-07-13 Not Zed <NotZed@HelixCode.com>
14441 * camel-mime-filter-basic.c (camel_mime_filter_basic_new_type):
14442 Reset filter on setup.
14443 (reset): When resetting qp encoding, set the state to -1, instead
14446 * camel-mime-utils.c (quoted_encode_step): Actually count the
14447 characters output sofar (it never counted any). Bunch of other
14449 (quoted_encode_close): Also flush out final character, if there's
14452 2000-07-12 Jeffrey Stedfast <fejj@helixcode.com>
14454 Chris forgot to add #include <e-util/e-util.h> to the source files
14456 * providers/imap/camel-imap-store.c (imap_connect): Fixed Peter's
14457 fix, we don't want to send a string to a %d.
14459 2000-07-12 Christopher James Lahey <clahey@helixcode.com>
14461 * camel-folder-search.c, providers/imap/camel-imap-store.c:
14462 Changed from strstrcase to e_strstrcase.
14464 * string-utils.c, string-utils.h: Removed strstrcase (in favor of
14465 e_strstrcase in e-util/e-util.c.)
14467 2000-07-12 Chris Toshok <toshok@helixcode.com>
14469 * providers/nntp/camel-nntp-folder.c
14470 (nntp_folder_set_message_flags): get the article num out of our
14471 uid and mark it read in the newsrc.
14472 (nntp_folder_get_message): get the message id out of the uid to
14475 * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): the uid
14476 is now <article-num>,<messageid>
14477 (get_HEAD_headers): same.
14479 * camel-mime-parser.c (folder_scan_step): go to HSCAN_MESSAGE
14480 state when ct->subtype is "news" as well as "rfc822". this makes
14481 attachments of type "message/news" display properly.
14483 2000-07-12 Dan Winship <danw@helixcode.com>
14485 * camel-folder.c (camel_folder_free_deep,
14486 camel_folder_free_shallow, camel_folder_free_nop): Useful default
14487 implementations for free_{uids,subfolder_names,summary}.
14488 (free_subfolder_names, free_uids): Make these g_warning-ing
14489 default implementations.
14491 * providers/*/camel-*-folder.c: Use the new functions where
14492 appropriate, remove duplicated code.
14494 2000-07-12 Peter Williams <peterw@helixcode.com>
14496 * providers/imap/camel-imap-store.c (query_auth_types): Check for
14497 NULL parameters when setting the exception so as to not crash on
14498 Solaris (can't handle a %s passed NULL).
14499 (imap_connect): Same.
14501 2000-07-12 Jeffrey Stedfast <fejj@helixcode.com>
14503 * providers/mbox/camel-mbox-folder.c (mbox_delete_message): Use
14504 mbox_set_message_flags () instead of setting the flags by hand. This
14505 fixes the problem of the "message_changed" signal not being emitted
14506 at the correct time.
14508 * providers/imap/camel-imap-folder.c: "folder_changed" signals should
14509 pass a third argument (which is ignored).
14511 * camel-folder.c: Undo gtk signal emits done in set_flags and
14514 (copy_message_to): Create info as a const CamelMessageInfo
14516 2000-07-12 Chris Toshok <toshok@helixcode.com>
14518 * providers/nntp/Makefile.am: don't add test-newsrc to the build
14519 since it needs libcamel (which isn't built at the time test-newsrc
14522 * providers/nntp/camel-nntp-utils.c (get_HEAD_headers): fill in
14523 MessageInfo->message_id.
14524 (get_XOVER_headers): same.
14526 * providers/nntp/camel-nntp-folder.c (nntp_folder_init): move
14527 summary loading here.
14528 (nntp_folder_sync): summary/newsrc changes should be stored here.
14529 put a comment to that effect.
14530 (nntp_folder_set_message_flags): don't save the newsrc here.
14531 (nntp_folder_get_uids): use g_ptr_array_index instead of the
14533 (nntp_folder_get_summary): no need to check if we should generate
14534 the summary here. already done.
14535 (nntp_folder_get_message_info): implement.
14537 * providers/nntp/camel-nntp-store.c
14538 (camel_nntp_store_get_toplevel_dir): use evolution_dir instead of
14539 computing it ourselves.
14540 (nntp_store_disconnect): call camel_nntp_newsrc_write.
14541 (ensure_news_dir_exists): new function to create the news/<news
14543 (camel_nntp_store_class_init): hook up connect/disconnect and
14545 (nntp_store_connect): if ensure_news_dir_exists fails throw an
14548 2000-07-12 Peter Williams <peterw@helixcode.com>
14550 * camel-folder.c (camel_folder_set_message_flags): Emit a message_changed
14551 signal once the flags are set on the message.
14552 (camel_folder_set_user_flag): Ditto.
14553 (camel_folder_expunge): Emit a folder_changed if no exception.
14555 2000-07-12 Jeffrey Stedfast <fejj@helixcode.com>
14557 * camel-stream.c: Use size_t and ssize_t for read/write methods
14559 * providers/imap/camel-imap-folder.c (imap_set_message_flags):
14560 Updated to emit the message_changed signal.
14561 (imap_delete_message): Updated to use imap_set_message_flags ().
14562 (imap_move_message_to): Updated to use imap_set_message_flags ()
14563 and to emit the folder_changed signal on the destination folder.
14564 (imap_copy_message_to): Updated to emit the folder_changed signal
14565 on the destination folder.
14566 (imap_append_message): Updated to emit the folder_changed signal
14567 on the destination folder.
14569 2000-07-11 Jeffrey Stedfast <fejj@helixcode.com>
14571 * camel-folder.c (camel_folder_append_message): Now takes a
14572 flags argument to specify the flags to be set on the message
14573 since we might not necessarily want the flags to be wiped clean.
14575 (copy_message_to): Updated to send a flags argument to
14576 append_message (); currently sends the original message's flags.
14578 * providers/mbox/camel-mbox-folder.c (mbox_append_message):
14579 * providers/imap/camel-imap-folder.c (imap_append_message):
14582 2000-07-11 Dan Winship <danw@helixcode.com>
14584 * camel-folder.c: Remove exceptions from a number of methods
14585 that work on what ought to be static data: get_parent_folder,
14586 get_parent_store, get_message_count, get_unread_message_count,
14587 get_permanent_flags, get_message_flags, set_message_flags,
14588 get_message_user_flag, set_message_user_flag, get_message_uid,
14589 get_uids, get_summary, get_subfolder_names. Turn
14590 camel_folder_delete_message into a macro.
14592 * providers/{mbox,pop3,vee}: Update for CamelFolder changes
14594 * providers/Makefile.am: Disable imap and nntp for now
14596 2000-07-11 Jeffrey Stedfast <fejj@helixcode.com>
14598 * providers/imap/camel-imap-folder.c (imap_search_by_expression):
14599 This shouldn't return NULL, it should return g_ptr_array_new ()
14600 so the mailer gets what it expects.
14602 2000-07-10 Jeffrey Stedfast <fejj@helixcode.com>
14604 * camel-folder-summary.c (camel_folder_summary_decode_string):
14605 Oops, an unsigned integer can never be < 0
14607 2000-07-10 Dan Winship <danw@helixcode.com>
14609 * providers/vee/camel-vee-folder.c (vee_search_by_expression):
14610 Initialize a variable to make this not crash again. And fix a bug
14611 so it actually does something.
14613 2000-07-10 Jeffrey Stedfast <fejj@helixcode.com>
14615 * camel-folder-summary.c: Cleaned up a bunch of compile warnings
14617 2000-07-10 Dan Winship <danw@helixcode.com>
14619 * providers/vee: kill more debugging messages
14621 2000-07-10 Jeffrey Stedfast <fejj@helixcode.com>
14623 * providers/mbox/camel-mbox-folder.c (mbox_get_unread_message_count):
14624 * providers/vee/camel-vee-folder.c (vee_get_unread_message_count):
14625 * providers/imap/camel-imap-folder.c (imap_get_unread_message_count):
14628 * camel-folder.c (camel_folder_get_unread_message_count): New
14629 convenience function to allow the mailer to query the number
14630 of unread messages in a folder (for displaying message stats
14631 in a folder tree?).
14633 2000-07-09 Dan Winship <danw@helixcode.com>
14635 * camel-mime-utils.c (header_references_dup): New function to copy
14636 a header_references structure.
14638 * camel-folder-summary.c (camel_message_info_dup_to): New function
14639 to (deep) copy the data from one CamelMessageInfo into another.
14640 (camel_message_info_free): And free the data.
14642 * providers/vee/camel-vee-folder.c (vee_sync): Implement. (empty).
14643 (vee_search_by_expression): belatedly update for
14644 camel_folder_search change.
14645 (vee_folder_build): belatedly update for camel_folder_search
14646 change. Use camel_message_info_dup_to and camel_message_info_free
14647 (in particular, so that we get message_id and references info so
14648 vfolders can be threaded).
14649 (vee_folder_build_folder): Ditto.
14651 2000-07-08 Jeffrey Stedfast <fejj@helixcode.com>
14653 * providers/nntp/camel-nntp-folder.c:
14654 * providers/nntp/camel-nntp-utils.c:
14655 * providers/nntp/camel-nntp-store.c: Update to reflect past changes
14656 in the Camel API. Use gtk macro casts wherever possible and use glib's
14657 memory functions instead of standard c's (since they are not
14660 * providers/smtp/camel-smtp-transport.c:
14661 * providers/imap/camel-imap-store.c: Wrap debug print statements
14664 * providers/imap/camel-imap-stream.c (stream_read): Make sure
14665 that we get up to and including the last \n of the mime part.
14667 * providers/imap/camel-imap-folder.c (imap_get_message): Make sure
14668 that we get up to and including the last \n of the mime part.
14669 Wrap debug print statements in a macro.
14671 * providers/imap/camel-imap-stream.c (stream_read): Only cache
14672 the important data (aka the mime part requested and no extra
14673 server response stuff)
14675 2000-07-07 Dan Winship <danw@helixcode.com>
14677 * camel-mime-utils.c (header_references_decode): Work around
14678 In-Reply-To's with unquoted punctuation. So many broken mailers.
14680 * camel-folder.c (camel_folder_search_by_expression): Make this
14681 return a GPtrArray rather than a GList.
14683 * camel-folder-search.c (camel_folder_search_execute_expression):
14684 * providers/imap/camel-imap-folder.c (imap_search_by_expression):
14685 * providers/mbox/camel-mbox-folder.c (mbox_search_by_expression):
14686 * providers/nntp/camel-nntp-folder.c (nntp_search_by_expression):
14687 Update to return a GPtrArray rather than a GList.
14689 2000-07-07 Jeffrey Stedfast <fejj@helixcode.com>
14691 * providers/smtp/camel-smtp-transport.c (esmtp_get_authtypes):
14692 Fixed the parser to actually work
14694 2000-07-06 Dan Winship <danw@helixcode.com>
14696 * camel-mime-utils.c (header_references_decode): Make this deal
14697 with the full RFC822 References/In-Reply-To format rather than
14698 just the more-nicely-behaved RFC1036 version. (Needed to parse
14699 In-Reply-To headers with extra junk in them.)
14701 2000-07-06 Jeffrey Stedfast <fejj@helixcode.com>
14703 * providers/imap/camel-imap-folder.c (imap_get_summary): Parse for
14704 more header information to allow message threading in IMAP.
14705 (imap_get_message_info): Same.
14707 * camel-folder-summary.c: Renamed summary_format_* to
14708 camel_summary_format_* and moved them into public scope.
14710 * providers/smtp/camel-smtp-transport.c (smtp_connect): Oops. Don't
14711 pass port # as a string in the error code (if it fails to connect).
14713 * providers/imap/camel-imap-folder.c (imap_append_message): Changed
14714 over to camel_imap_command_extended as that was the source of the
14715 problems - apparently appending replies with more than just 1 line.
14717 2000-07-05 Dan Winship <danw@helixcode.com>
14719 * camel-folder-search.c (search_header_contains): make header
14720 matching case-insensitive
14722 * camel-folder-summary.c:
14724 * providers/mbox/camel-mbox-folder.c:
14725 * providers/mbox/camel-mbox-summary.c: Remove some non-error case
14726 debugging-type messages.
14728 2000-07-05 Ettore Perazzoli <ettore@helixcode.com>
14730 * providers/mbox/camel-mbox-summary.c (d): Define to empty so that
14731 we get rid of a ton of debugging messages.
14733 2000-07-05 Jeffrey Stedfast <fejj@helixcode.com>
14735 * camel-mime-utils.h: Added prototype for uudecode_step
14737 * camel-mime-utils.c (uudecode_step): Cleaned up some junk that
14738 should have been cleaned up when debugging printf's were taken out.
14740 2000-07-05 Ettore Perazzoli <ettore@helixcode.com>
14742 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
14743 Update the X-Evolution: header even if the in-memory UID and the
14744 saved UID are not the same. Otherwise mboxes with clashing UIDs
14745 can never be fixed.
14747 * camel-folder-summary.c
14748 (camel_folder_summary_add_from_parser): Add the message to the
14749 summary before doing any ibex stuff. In fact, this might also
14750 have the side effect of reassigning the UID so it needs to be done
14751 before we start using the UID.
14753 * providers/mbox/camel-mbox-folder.c (mbox_append_message): Add
14754 debugging message to keep track of the UIDs we add.
14756 2000-07-05 Dan Winship <danw@helixcode.com>
14758 * camel-folder-summary.c: Add "Cc" to summary and bump summary
14761 * camel-folder-search.c (search_header_contains): make "Cc" a
14764 2000-07-03 Ettore Perazzoli <ettore@helixcode.com>
14766 * camel-folder-summary.c (camel_folder_summary_next_uid_string):
14768 (camel_folder_summary_add): Use
14769 `camel_folder_summary_next_uid_string()' instead of recomputing
14770 the UID manually here.
14771 (camel_folder_summary_add_from_parser): Likewise.
14773 2000-07-03 Ettore Perazzoli <ettore@helixcode.com>
14775 * camel-folder-summary.c (camel_folder_summary_set_uid): Removed.
14777 2000-07-03 Dan Winship <danw@helixcode.com>
14779 * camel-folder-summary.c (message_info_new): Parse In-Reply-To
14780 with header_references_decode, not header_msgid_decode.
14782 * camel-mime-message.c (camel_mime_message_class_init): message
14783 headers are case-insensitive.
14785 * providers/pop3/camel-pop3-store.c (camel_pop3_command): Fix a
14786 bug in error-setting code.
14787 (pop3_connect): Don't re-prompt for password in the KPOP case.
14788 (pop3_get_response): New function, split out from
14789 camel_pop3_command.
14790 (connect_to_server): Use pop3_get_response to parse the greeting
14791 message, and error out appropriately if it's -ERR.
14793 2000-07-02 Dan Winship <danw@helixcode.com>
14795 * camel-folder.c (camel_folder_freeze, camel_folder_thaw): New
14796 functions to freeze and thaw a folder (to prevent message/folder
14797 changed signals in the middle of a long series of operations).
14798 (camel_folder_class_init): Change signals to GTK_RUN_FIRST.
14799 (message_changed, folder_changed): Add default implementations
14800 that stop the emission and record info for later if the folder is
14803 * providers/mbox/camel-mbox-folder.c (mbox_sync): leftover fixes
14804 from the close->sync change: don't destroy the ibex, summary, and
14805 search when syncing.
14806 (append_message): emit "folder_changed" on a successful append.
14808 2000-07-02 Jeffrey Stedfast <fejj@helixcode.com>
14810 * camel-mime-utils.c (uudecode_step): A rather complex uudecoder
14811 written in the spirit of Zucchi-ness, is it up to par? Only the
14812 Z-man can tell us :-)
14814 2000-07-01 Dan Winship <danw@helixcode.com>
14816 * camel-service.c (camel_service_get_name): New method, to return
14817 an end-user-friendly name corresponding to a service. (eg, "POP
14818 service for danw on trna.helixcode.com").
14820 * providers/imap/camel-imap-store.c,
14821 providers/mbox/camel-mbox-store.c,
14822 providers/nntp/camel-nntp-store.c,
14823 providers/pop3/camel-pop3-store.c,
14824 providers/sendmail/camel-sendmail-transport.c,
14825 providers/smtp/camel-smtp-transport.c: Implement.
14827 * providers/imap/Makefile.am: remove unneeded
14828 libcamelimap_la_LDADD.
14830 * providers/pop3/camel-pop3-store.c (connect_to_server): fix the
14831 CAPA-parsing code to not get into an infinite loop.
14833 2000-07-01 Jeffrey Stedfast <fejj@helixcode.com>
14835 * providers/imap/camel-imap-folder.c (imap_get_message): Fixed
14836 the bug that would sometimes leave part of the server response
14837 tacked on to the end of the message.
14839 * camel-folder.c: Renamed _by_uid methods. Since we no longer
14840 have get-by-number methods, no need to have the _by_uid
14842 (get_message_by_uid): Renamed to get_message
14843 (delete_message_by_uid): Renamed to delete_message
14844 (summary_get_by_uid): Renamed to get_message_info
14846 * providers/mbox/camel-mbox-folder.c:
14847 * providers/pop3/camel-pop3-folder.c:
14848 * providers/imap/camel-imap-folder.c:
14849 * providers/vee/camel-vee-folder.c: Updated to reflect
14850 camel-folder changes.
14852 2000-06-30 Jeffrey Stedfast <fejj@helixcode.com>
14854 * camel-folder.c (camel_folder_copy_message_to): New function, to
14855 copy a message from one folder to another. The default
14856 implementation just uses append_message, but providers can
14857 implement more efficient versions for use when both folders are on
14860 * broken-date-parser.[c,h]: Utilities for parsing broken
14863 * providers/imap/camel-imap-folder.c (imap_move_message_to):
14864 (imap_copy_message_to): Implemented.
14866 * camel-mime-utils.c (header_decode_date): Wrote some code to try
14867 and un-mangle broken date formats and then parse that new string
14870 2000-06-30 Dan Winship <danw@helixcode.com>
14872 * camel-folder.c (camel_folder_move_message_to): New function, to
14873 move a message from one folder to another. The default
14874 implementation just uses append_message and delete_message, but
14875 providers can implement more efficient versions for use when both
14876 folders are on the same store.
14878 2000-06-29 Jeffrey Stedfast <fejj@helixcode.com>
14880 * providers/imap/camel-imap-folder.c (imap_expunge): Should now
14881 print a meaningful error message when it doesn't succeed
14883 2000-06-28 Jeffrey Stedfast <fejj@helixcode.com>
14885 * providers/imap/camel-imap-store.c (imap_connect): Changed to
14886 keep prompting user for a valid password until it either
14887 authenticates or until Canceled by the user.
14888 (camel_imap_command_extended): Improved speed (replaced the
14889 g_strjoinv call with a faster implementation)
14891 * providers/pop3/camel-pop3-store.c
14892 (camel_pop3_command_get_additional_data): Fixed.
14893 (pop3_connect): Changed to keep prompting the user for a
14894 password until it either works or until Canceled by the user.
14896 * providers/mbox/camel-mbox-summary.c: General cleanup
14897 (camel_mbox_summary_sync): Fixed a memory leak and added
14898 CamelException handling.
14900 * providers/mbox/camel-mbox-store.c (delete_folder): Fixed a
14903 * providers/mbox/camel-mbox-folder.c (mbox_append_message):
14904 Default 'off_t seek' to -1 so as to make sure it's initialized
14905 before it's used in the case of a bad stat() call.
14906 (mbox_sync): Updated
14907 (mbox_expunge): Updated
14909 2000-06-27 Jeffrey Stedfast <fejj@helixcode.com>
14911 * providers/imap/camel-imap-store.c (imap_connect): Move the
14912 CAPABILITY command here so we don't have to keep checking
14913 each time we open a folder.
14914 (camel_imap_command_extended): If we are doing an EXAMINE,
14915 don't bother doing a SELECT first.
14917 * providers/imap/camel-imap-folder.c (imap_init): Update so
14918 folder->has_search_capability depends on the parent IMAP store
14919 (since this is really dependant on the IMAP implementation and
14922 2000-06-27 Christopher James Lahey <clahey@helixcode.com>
14924 * providers/smtp/camel-smtp-transport.c: Don't close the filter
14925 stream when done with it (this causes the source stream to close);
14926 Instead, just flush it when done.
14928 2000-06-27 Michael Zucchi <zucchi@zedzone.mmc.com.au>
14930 * camel-folder-search.c (search_header_contains): Make header
14931 search 'to' match 'to', and not 'from', small typo, fixes #317.
14933 2000-06-26 Christopher James Lahey <clahey@helixcode.com>
14935 * providers/mbox/camel-mbox-summary.c: Added debugging
14938 2000-06-23 Jeffrey Stedfast <fejj@helixcode.com>
14940 * providers/imap/camel-imap-store.c:
14941 * providers/imap/camel-imap-folder.c: Improved folder parsing.
14942 Not specifying a namespace should no longer list the entire
14945 2000-06-22 Chris Toshok <toshok@helixcode.com>
14947 * providers/nntp/.cvsignore: ignore test-newsrc
14949 * providers/nntp/camel-nntp-store.c,
14950 providers/nntp/camel-nntp-store.h,
14951 providers/nntp/camel-nntp-folder.c,
14952 providers/nntp/camel-nntp-folder.h,
14953 providers/nntp/camel-nntp-utils.c: Bring the nntp provider up to a
14954 state where it builds and is usable with the current camel. there
14955 are still warts (semi-broken .newsrc file handling, and a lack of
14956 a subscribe ui -- in fact no way to add a new server, really), but
14957 it'll display news messages.
14959 * providers/nntp/Makefile.am (libcamelnntp_la_SOURCES): add
14960 camel-nntp-newsrc.c
14961 (libcamelnntpinclude_HEADERS): add camel-nntp-newsrc.h
14962 also, add test-newsrc stuff.
14964 * providers/nntp/test-newsrc.c: new file that tests the newsrc
14965 stuff by parsing and regurgitating a .newsrc file for a particular
14968 * providers/nntp/camel-nntp-newsrc.c,
14969 providers/nntp/camel-nntp-newsrc.h: new files, initial support for .newsrc files.
14971 2000-06-22 Jeffrey Stedfast <fejj@helixcode.com>
14973 * providers/imap/camel-imap-folder.c (imap_get_message_count):
14974 Oops. Now appends the namespace to the folder before querying
14975 for the number of messages.
14977 * providers/imap/camel-imap-store.c (imap_folder_exists): New
14978 convenience function for use by imap_create().
14979 (get_folder): If folder is specified as "/", we really want
14982 * providers/sendmail/camel-sendmail-provider.c:
14983 * providers/vee/camel-vee-provider.c:
14984 * providers/smtp/camel-smtp-provider.c:
14985 * providers/mbox/camel-mbox-provider.c:
14986 * providers/pop3/camel-pop3-provider.c:
14987 * providers/imap/camel-imap-provider.c: Updated
14989 * camel-session.c: Moved service_cache hash table into the
14991 (service_cache_remove): Updated.
14992 (camel_session_get_service): Updated.
14994 * camel-url.c (camel_url_hash): Took out the hashing of
14995 url->passwd. We don't want this anymore.
14997 * providers/imap/camel-imap-folder.c (imap_init): Took out
14998 references to 'namespace'
14999 (camel_imap_folder_init): Same
15001 * providers/imap/camel-imap-folder.h: No more namespace. We are
15002 instead going to use url->path as the namespace.
15004 2000-06-21 Jeffrey Stedfast <fejj@helixcode.com>
15006 * providers/imap/camel-imap-store.c (imap_create): Modified to
15007 use the "namespace" (url->path) if it exists.
15009 * providers/imap/camel-imap-folder.c (imap_delete_message_by_uid):
15010 Now just sets the deleted flag on the summary rather than speaking
15011 directly to the IMAP server. This is both faster and cleaner.
15013 2000-06-21 Dan Winship <danw@helixcode.com>
15015 * providers/pop3/camel-pop3-store.c (query_auth_types): Fix dumb
15018 2000-06-21 Jeffrey Stedfast <fejj@helixcode.com>
15020 * providers/imap/camel-imap-folder.c (imap_get_message_by_uid):
15021 We are getting mail in IMAP now!! whoo-hoo!. Stripped out the
15022 filtering so messages may have some dot-stuffing, but the
15023 filtering can always be added back in later when we know it
15024 works and isn't the problem.
15026 2000-06-21 Peter Williams <peterw@curious-george.helixcode.com>
15028 * providers/mbox/camel-mbox-folder.c (mbox_init): Use the basename
15029 of the mailbox so we don't get pathnames like ~/evolution/inbox///movemail.ibex
15031 2000-06-21 Dan Winship <danw@helixcode.com>
15033 * camel-folder-summary.c (message_info_new): Set date_received
15034 based on the first (most recent) "Received" header.
15036 2000-06-20 Dan Winship <danw@helixcode.com>
15038 * camel-mime-part.c (write_to_stream): flush the filter stream
15039 before unreffing it, so it will camel_mime_filter_complete.
15041 * camel-stream-filter.c (camel_stream_filter_class_init): Fix a
15042 braino so camel_stream_flush works here.
15044 * camel-stream-mem.c (stream_seek): Fix a bug that resulted in
15045 large attachments being silently dropped.
15047 * providers/pop3/camel-pop3-store.c
15048 (camel_pop3_command_get_additional_data): Don't use g_strjoinv
15049 here, since it is O(n^2) on the length of the output string, and
15052 * camel-mime-part-utils.c
15053 (simple_data_wrapper_construct_from_parser): add a CRLF decoder
15054 after the QP/B64 decoder if it's text.
15056 2000-06-20 Jeffrey Stedfast <fejj@helixcode.com>
15058 * providers/imap/camel-imap-folder.c (imap_get_summary): Only
15059 fetch the summary if the folder summary doesn't already exist.
15060 When the summary *does* exist, start fetching from 1, not 0.
15061 (imap_free_summary): Don't do anything here.
15062 (imap_finalize): Free the summary here instead of in
15063 imap_free_summary().
15064 (imap_set_message_flags): Implemented
15065 (imap_sync): Added code to set flags on messages that have had
15066 their flags changed (however I #if'd it out until we are more
15067 confidant in the IMAP code :)
15068 (imap_summary_get_by_uid): Now parese flags correctly.
15069 (imap_get_summary): Now parese flags correctly. Also correctly
15070 parses the UID correctly.
15072 * camel-url.c (check_equal): No need to check s1 if s2 is NULL
15073 (camel_url_equal): Don't check the passwd component of the url.
15075 2000-06-20 Dan Winship <danw@helixcode.com>
15077 * camel-folder-summary.c (camel_folder_summary_add): mark the
15078 message info with CAMEL_MESSAGE_FOLDER_FLAGGED if we change the
15079 uid, so the folder will know that it's dirty.
15081 2000-06-20 Jeffrey Stedfast <fejj@helixcode.com>
15083 * providers/imap/camel-imap-store.c (camel_imap_command_extended):
15084 Now returns the last line of data that the server sends back as
15085 well. This is needed for commands like SELECT (like Peter pointed
15087 (camel_imap_command): No longer checks for SELECT (no need)
15089 * providers/imap/camel-imap-folder.c: Added namespace stuff
15090 which we will need later on...
15091 (imap_parse_subfolder_line): Convenience function for use in
15092 get_subfolder_names()
15093 (imap_get_subfolder_names): Updated. Also changed it to use LIST
15094 instead of LSUB (temporary change).
15096 2000-06-19 Jeffrey Stedfast <fejj@helixcode.com>
15098 * providers/imap/camel-imap-folder.c (camel_imap_folder_init): Set
15099 summary equal to NULL.
15100 (imap_get_summary): Store the summary in the ImapFolder
15101 (imap_summary_get_by_uid): If we have a summary cache in the
15102 ImapFolder, first check to see if that message info is in the
15103 cached summary first, if not fetch it directly from the IMAP
15104 server and append it to the summary cache.
15105 (imap_get_message_flags): Don't free the message info that we get
15106 back from summary_get_by_uid as we don't want to be corrupting our
15109 2000-06-19 Peter Williams <peterw@curious-george.helixcode.com>
15111 * providers/imap/camel-imap-store.c (camel_imap_command{,_extended}): When
15112 SELECT'ing a folder for an IMAP command, use _extended to grab the entire
15113 response (before we just used camel_imap_command and missed the OK codes)
15115 2000-06-18 Jeffrey Stedfast <fejj@helixcode.com>
15117 * providers/imap/camel-imap-folder.c (imap_summary_get_by_uid):
15118 Now gets the message flags as it should.
15119 (imap_get_summary): Same as imap_summary_get_by_uid
15120 (imap_get_permanent_flags): Return the permanent flags stored
15122 (imap_get_message_flags): Return message flags associated with
15123 given uid. Note: we may want to somehow cache summary info so
15124 that we don't have to keep querying the IMAP provider in
15125 imap_summary_get_by_uid().
15127 2000-06-17 Jeffrey Stedfast <fejj@helixcode.com>
15129 * providers/imap/camel-imap-folder.c (imap_free_summary): We were
15130 leaking memory - but not anymore!
15131 (imap_get_summary): We now get the UIDs and the beginnings of the
15132 code to get the message flags as well.
15134 2000-06-17 Dan Winship <danw@helixcode.com>
15136 * camel-mime-parser.c (folder_scan_header): Don't copy newlines
15137 into the parsed header text, and turn any number of tabs and
15138 spaces after a newline into a single space.
15140 2000-06-17 Jeffrey Stedfast <fejj@helixcode.com>
15142 * providers/imap/camel-imap-folder.c (imap_init): Should now
15143 correctly do CAPABILITY.
15145 2000-06-17 Dan Winship <danw@helixcode.com>
15147 * providers/mbox/camel-mbox-summary.c: Add some debugging printfs
15148 when rebulding summary to help figure out why people's summaries
15149 are always being rebuilt.
15151 2000-06-17 Jeffrey Stedfast <fejj@helixcode.com>
15153 * providers/imap/camel-imap-folder.c (imap_search_by_expression):
15154 Began to implement, need to get information on how to
15155 deconstruct @expression into an IMAP search expression and
15157 (imap_init): Now queries the IMAP provider for CAPABILITY to
15158 determine if SEARCH is implemented or not.
15160 * providers/imap/imap.c: Removed - no longer a need to have
15161 this as an example for anyone interesting to help mecode IMAP
15164 2000-06-16 Jeffrey Stedfast <fejj@helixcode.com>
15166 * providers/imap/camel-imap-folder.c (imap_sync): Added code
15167 to expunge if called for (still need to finish coding this).
15168 (imap_get_uids): Implemented.
15169 (imap_get_summary): Found a way to get the date
15170 (imap_summary_get_by_uid): Same.
15171 (imap_free_summary): Implemented.
15173 * string-utils.c (strstrcase): Fixed a compile warning
15175 * providers/imap/camel-imap-summary.c: Removed - we don't
15176 need a CamelImapSummary structure.
15178 2000-06-16 Dan Winship <danw@helixcode.com>
15180 Move flag handling from CamelMimeMessage to CamelFolder. This
15181 simplifies several flag-handling pieces of code in the mailer, and
15182 lets you change a message's flags without having to fetch the
15183 message body. It also means that fully-constructed
15184 CamelMimeMessages are now essentially constant, which will help
15185 simplify locking issues later since it means two threads
15186 interested in the same message can just work with separate copies
15189 * camel-mime-message.h (struct _CamelMimeMessage): Removed flags
15190 and user_flags (moved to summary). Removed expunged and
15191 message_number which were unused. Removed message_uid and folder
15192 which are no longer needed in the new scheme.
15193 (struct CamelMimeMessageClass): Removed message_changed signal and
15194 get/set_message_number methods.
15196 * camel-mime-message.c: Updates for CamelMimeMessage changes.
15197 (camel_mime_message_get/set_flags,
15198 camel_mime_message_get/set_user_flag): Replaced with methods in
15200 (camel_flag_get, camel_flag_set, camel_flag_list_size,
15201 camel_flag_list_free): Moved verbatim to camel-folder-summary.c
15203 * camel-folder.c (camel_folder_get/set_message_flags,
15204 camel_folder_get/set_message_user_flag): New methods (and
15205 corresponding useless default implementations)
15206 (camel_folder_class_init): add a message_changed signal
15208 * camel-folder-summary.c (camel_flag_get, camel_flag_set,
15209 camel_flag_list_size, camel_flag_list_free): Moved here from
15210 camel-mime-message.c
15212 * providers/mbox/camel-mbox-folder.c (message_changed): Removed.
15213 (mbox_get_message_flags, mbox_set_message_flags,
15214 mbox_get_message_user_flag, mbox_set_message_user_flag): Tweak
15215 summary bits as appropriate. (Functionality moved here from
15217 (mbox_get_message_by_uid): Update for CamelMimeMessage changes
15218 (less stuff to initialize).
15220 * providers/imap/camel-imap-folder.c (message_changed): Remove
15221 this. It was just copied from the mbox provider and doesn't deal
15222 with the real IMAP flag stuff anyway. (So there's currently no
15223 flag support in the IMAP provider.)
15224 (imap_get_message_by_uid): Update for CamelMimeMessage changes.
15226 * providers/vee/camel-vee-folder.c: (message_changed): Remove old
15227 one. Add a new one to listen for message_changed on each folder
15228 and re-emit message_changed signals that correspond to messages in
15230 (vee_get/set_message_flags, vee_get/set_message_user_flag): Proxy
15231 flag setting to the underlying real messages.
15232 (vee_append_message): Removed for now; there's no way to translate
15233 this into the new CamelMimeMessage/CamelFolder scheme, but (a)
15234 there's also no code which would ever call it and (b) we're
15235 probably going want a better interface than append_message for
15236 message drag and drop to work anyway. To be revisited.
15238 2000-06-16 Dan Winship <danw@helixcode.com>
15240 * camel-mime-utils.c (rfc2047_decode_word):
15241 * camel-mime-part-utils.c (simple_data_wrapper_construct_from_parser):
15242 * camel-folder-summary.c (summary_build_content_info):
15243 KLUDGE! Since neither ETable nor GtkHTML supports UTF-8 yet,
15244 output ISO-8859-1 instead, so Ettore can read his Italian mail. :)
15245 This will be reverted later.
15247 2000-06-15 Jeffrey Stedfast <fejj@helixcode.com>
15249 * providers/imap/camel-imap-folder.c (imap_get_summary): Started to
15250 implement - may want to use ENVELOPE instead of BODY.PEEK[HEADER]
15251 (imap_summary_get_by_uid): Started to code, I've got to find a way to
15252 get the date in time_t format and also get the flags
15254 * string-utils.c (strstrcase): Added this convenience function - I
15255 know about strcasestr() but it's not portable.
15257 2000-06-15 Dan Winship <danw@helixcode.com>
15259 * camel-service.c: Remove camel_service_connect_with_url. (URLs
15260 must be specified when the service is requested from the session,
15261 so that there can only ever be one service for any URL.)
15263 * camel-folder.c: (camel_folder_open, camel_folder_is_open,
15264 camel_folder_get_mode): Kill. Folders are now always open, and
15265 handle "closing" sorts of operations at sync or finalize time.
15266 (camel_folder_sync): renamed from camel_folder_close. Syncs state
15267 to the store but doesn't necessarily close/disconnect.
15269 * providers/*/camel-*-folder.c: Merge "open" methods into "init"
15270 methods. Rename close to sync and update appropriately.
15272 * providers/imap/camel-imap-store.c: Remove camel_imap_store_open
15273 and camel_imap_store_close, which should not have been copied from
15274 the POP provider (where the exist to work around limitations of
15277 * providers/mbox/camel-mbox-summary.c: fix a bug. (don't expunge
15278 deleted messages if called with expunge == FALSE)
15280 * providers/pop3/camel-pop3-store.c (connect_to_server): Check
15281 server for various interesting extensions.
15283 * providers/pop3/camel-pop3-folder.c (get_uids): If the server
15284 supports UIDL, use real UIDs rather than fake ones.
15285 (etc): Map uids back to numbers appropriately
15287 * providers/mbox/camel-mbox-folder.c (mbox_append_message): Fix to
15288 previous change: make sure the "seek" variable ends up with the
15291 * providers/mbox/camel-mbox-summary.c (summary_rebuild): Update
15292 summary mtime as well as size.
15294 2000-06-14 Dan Winship <danw@helixcode.com>
15296 * providers/mbox/camel-mbox-folder.c (mbox_append_message): if the
15297 mbox doesn't end with a '\n', write one before appending the new
15300 2000-06-14 Jeffrey Stedfast <fejj@helixcode.com>
15302 * camel-mime-filter-crlf.c (filter): Updated the encoder to allocate
15303 more memory (since we are also now adding dots). Also updated the
15304 decoder as we have found that it sometimes passes the end of the
15307 * providers/pop3/camel-pop3-folder.c (get_message_by_uid): Took out the
15308 filter code (we already filter in
15309 camel_pop3_command_get_additional_data)
15311 * camel-folder.c (init): Updated: a separator is now a char* rather
15312 than a single char because IMAP can have a string for a directory
15313 separator. Also, since IMAP does not begin with a directory separator,
15314 there is a new argument (path_begins_with_sep) which decides if a
15315 directory should begin with a directory separator.
15317 * providers/imap/camel-imap-store.c (imap_create): Since, on connect,
15318 Camel tries to create INBOX (which already exists on every IMAP
15319 provider) we can return TRUE when the folder name is "INBOX".
15321 * providers/vee/camel-vee-folder.c (vee_init): Updated.
15323 * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Updated.
15325 * providers/mbox/camel-mbox-store.c (get_folder): Updated.
15327 * providers/mbox/camel-mbox-folder.c (mbox_init): Updated.
15329 * providers/pop3/camel-pop3-folder.c (camel_pop3_folder_new): Updated.
15331 2000-06-14 Dan Winship <danw@helixcode.com>
15333 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
15334 Renamed from camel_mbox_summary_expunge. Takes a gboolean saying
15335 whether to expunge or just sync the mbox file. Change some
15336 g_errors to g_warning so we don't abort. Make the quick
15337 X-Evolution updating code lseek around correctly. Update the
15338 mbox mtime in the summary file even in the quick case.
15340 * providers/mbox/camel-mbox-summary.h: make
15341 CAMEL_MESSAGE_FOLDER_NOXEV not conflict with
15342 CAMEL_MESSAGE_FOLDER_FLAGGED defined in camel-mime-message.h
15344 * providers/mbox/camel-mbox-folder.c (mbox_close): call
15345 camel_mbox_summary_sync to save flag state if not expunging.
15346 (mbox_expunge): Update for camel_mbox_summary_expunge rename.
15348 2000-06-13 Jeffrey Stedfast <fejj@helixcode.com>
15350 * providers/imap/camel-imap-store.c (camel_imap_store_open):
15351 (camel_imap_store_close): Added.
15352 (camel_imap_command_extended): Fixed a segfault and updated
15353 to use camel_imap_status()
15354 (camel_imap_command): Updated to use camel_imap_status()
15355 (camel_imap_status): New convenience function for parsing
15356 the return status of an IMAP command
15358 2000-06-12 Jeffrey Stedfast <fejj@helixcode.com>
15360 * providers/imap/camel-imap-folder.c (imap_get_message_by_uid):
15361 Works like the POP fetch code, should work temporarily until
15362 we get around to coding it the way it "Should Be".
15364 * providers/pop3/camel-pop3-folder.c (get_message_by_uid): Now uses
15365 the camel-mime-filter-crlf decoder when retrieving messages.
15367 * camel-mime-filter-smtp.c: Deprecated.
15369 * providers/smtp/camel-smtp-transport.c (smtp_data): Updated to use
15370 camel-mime-filter-crlf with my 'dot' extension in place of
15371 camel-mime-filter-smtp
15373 * camel-mime-part.c (write_to_stream): Updated to reflect changes
15374 made to camel-mime-filter-crlf.c
15376 * camel-mime-filter-crlf.c (filter): Modified to be able to
15377 encode/decode dots ("\n.\n"<->"\n..\n"). Also fixed the decoder
15378 so that it should no longer get caught in an infinite loop.
15380 2000-06-12 Dan Winship <danw@helixcode.com>
15382 * providers/*/Makefile.am: don't pass a second (incorrect) -rpath
15383 in addition to the (correct) one automatically provided by
15386 * camel-mime-filter-crlf.c: New filter to do CRLF<->LF conversion.
15387 (Currently only tested in the LF->CRLF direction.)
15389 * camel-mime-part.c (write_to_stream): if content-type is text,
15390 and it's QP or B64 encoded, pass through the CRLF filter before
15391 the other filter to satisfy the "canonical encoding" rules in the
15394 2000-06-09 Dan Winship <danw@helixcode.com>
15396 * camel-session.c (camel_session_query_authenticator): Add another
15397 argument, "mode", which can be CAMEL_AUTHENTICATOR_ASK or
15398 CAMEL_AUTHENTICATOR_TELL, so callers can get the app to un-cache
15401 * providers/pop3/camel-pop3-store.c (pop3_connect): uncache the
15402 password if it doesn't work.
15404 2000-06-09 Jeffrey Stedfast <fejj@helixcode.com>
15406 * providers/imap/camel-imap-stream.c (stream_read): Updated to reflect
15407 changes made in camel-imap-store.c
15409 * providers/imap/camel-imap-store.c (imap_create): No longer checks to
15410 make sure a folder doesn't already exists (as this is no longer needed)
15411 (camel_imap_command): Now takes a CamelFolder argument so it can detect
15412 whether or not it needs to SELECT a folder or not
15413 (camel_imap_command_extended): Same.
15415 * providers/smtp/camel-smtp-transport.c (smtp_connect): Will now always
15416 send EHLO first, if that fails it will fall back on HELO.
15417 (esmtp_get_authtypes): Should now correctly parse authtypes.
15419 2000-06-07 Jeffrey Stedfast <fejj@helixcode.com>
15421 * providers/imap/camel-imap-summary.c: Now builds (not that it's worth
15424 * providers/imap/camel-imap-folder.c (imap_get_uids): Now uses the
15425 correct cast to a CamelImapMessageInfo structure (should get rid of
15428 * providers/imap/Makefile.am: Added rules to build
15431 * providers/imap/camel-imap-store.c (get_folder): Update.
15432 Moved imap_create here.
15434 * providers/imap/camel-imap-folder.c (delete_messages): Remove.
15435 (imap_create): Removed.
15436 (imap_delete): Removed.
15437 (imap_exists): Removed.
15439 * providers/imap/camel-imap-stream.h: Added typedef's for the stream
15441 * providers/imap/camel-imap-stream.c: Modified to build cleanly
15443 2000-06-07 Not Zed <NotZed@HelixCode.com>
15445 * camel-mime-utils.c (header_msgid_decode_internal): Properly
15446 dereference warning/debug messages.
15447 (header_references_decode): Check we actually have msgid stuff
15448 before trying to decode it ...
15450 2000-06-06 Jeffrey Stedfast <fejj@helixcode.com>
15452 * camel-imap-stream.[c,h]: Removed
15454 * providers/imap/camel-imap-stream.[c,h]: Relocated to this
15457 * providers/imap/camel-imap-summary.c: Added
15459 2000-06-06 Dan Winship <danw@helixcode.com>
15461 * camel-folder.c: Remove exists, create, delete. A CamelFolder
15462 now always references an existing folder. Remove delete_messages
15463 too since it wasn't being used. Add a "create" flag to
15464 get_subfolder saying whether or not to create the subfolder if it
15467 * camel-store.c (camel_store_get_folder): Add a "create" flag to
15468 say whether or not to create the folder if it doesn't yet exist.
15469 (camel_store_delete_folder): New method, moved from CamelFolder.
15470 (cache_folder, uncache_folder): Fix up a bit.
15471 (get_folder_name): Explain what this is for.
15473 * providers/mbox/camel-mbox-folder.c:
15474 * providers/mbox/camel-mbox-store.c: Update. Remove support for
15475 hierarchical folders to simplify this for now, since we're not
15476 using it, and it's not completely clear how they should work in an
15477 ELocalStorage world. Needs to be revisited.
15479 * providers/pop3/camel-pop3-folder.c (delete_messages): Remove.
15480 * providers/pop3/camel-pop3-store.c (get_folder): Update.
15482 * providers/vee/camel-vee-folder.c (exists): Remove.
15483 * providers/vee/camel-vee-store.c (vee_get_folder): Update.
15485 2000-06-06 Jeffrey Stedfast <fejj@helixcode.com>
15487 * providers/imap/camel-imap-*.[c,h]: Started on getting
15488 imap to build cleanly (tho some work has not been completed
15489 so it still won't build until camel-imap-summary is finished
15490 along with a few methods in camel-imap-folder)
15492 * camel-stream.[c,h]: Changed the read and write method prototypes
15493 to return an ssize_t type rather than an int and also changed
15494 the 'number of bytes' to read or write to a size_t type
15496 * camel-stream-fs.c: same as above
15498 * camel-stream-mem.c: again, same as above
15500 * camel-stream-buffer.c: same
15502 * camel-imap-stream.[c,h]: Added this new stream, cache's previously
15503 read data so each successive call will instead read from the cache
15505 2000-06-05 Dan Winship <danw@helixcode.com>
15507 * camel-mime-part.c (camel_mime_part_set_disposition): fix
15508 typo/braino (set "Content-Disposition", not "Content-Description")
15509 (camel_mime_part_set_filename): const poison
15511 2000-06-02 Not Zed <NotZed@HelixCode.com>
15513 * camel-mime-utils.c (base64_encode_step): Ick, damn signs! Fix a
15514 bug with sign extended bytes.
15516 * camel-mime-filter-smtp.c (filter): Changed layout/logic slightly
15517 (to match From filter)
15519 2000-06-02 Jeffrey Stedfast <fejj@helixcode.com>
15521 * camel-mime-filter-smtp.c (filter): Fixed the filter so that it
15522 wouldn't insert garbage under certain conditions.
15524 2000-06-02 Christopher James Lahey <clahey@helixcode.com>
15526 * camel-session.c: Don't ref the services in the cache.
15528 2000-06-02 Jeffrey Stedfast <fejj@helixcode.com>
15530 * providers/smtp/camel-smtp-transport.c: Rearanged where debug
15531 fprintf statements we placed so that any data the server sends
15532 back is printed out before an exception is set and the function
15535 2000-06-02 Not Zed <NotZed@HelixCode.com>
15537 * camel-mime-utils.c (header_decode_date): If we get a funny
15538 result, just throw it out. Basically a fix for the one true
15539 broken TradeClient.
15541 2000-06-01 Not Zed <NotZed@HelixCode.com>
15543 * camel-folder-summary.c (message_info_free): Free
15544 references/messsage id.
15545 (message_info_save): Save them.
15546 (message_info_load): Load them.
15547 (message_info_new): And get them from the new message.
15548 (CAMEL_FOLDER_SUMMARY_VERSION): Bumped for new changes.
15550 * camel-folder-summary.h: Added references and messageid to
15553 2000-06-02 Christopher James Lahey <clahey@helixcode.com>
15555 * camel-session.c: Ref and unref objects in the service cache
15558 * camel-store.c: Ref the folder when returning it using
15559 lookup_folder. Used the folder's full name for the key for the
15560 folder cache since that's used to uncache it.
15562 2000-06-02 Dan Winship <danw@helixcode.com>
15566 * providers/pop3/camel-pop3-store.c (pop3_connect): free msg on
15567 success as well as failure.
15568 (camel_pop3_command_get_additional_data): free buf after reading
15569 the last line (".").
15571 * providers/pop3/camel-pop3-folder.c (get_message_by_uid): free
15572 body data after creating the memstream from it (which will copy
15575 * providers/mbox/camel-mbox-folder.c (mbox_finalize): free summary
15578 * camel-data-wrapper.c (finalize): unref the stream, if it exists.
15580 2000-06-01 Not Zed <NotZed@HelixCode.com>
15582 * camel-mime-part.c (construct_from_parser): For a message part,
15583 set the default content-type to message/rfc822. Maybe needs to be
15584 done for multiparts too?
15586 2000-05-31 Not Zed <NotZed@HelixCode.com>
15588 * camel-mime-message.c (construct_from_parser): Typo in assersion.
15590 * camel-mime-parser.c (folder_scan_step): Use a default type of
15591 message/rfc822 for multipart/digest. Bug Z192.
15592 (folder_scan_drop_step): Remove warning.
15594 2000-05-30 Not Zed <NotZed@HelixCode.com>
15596 * providers/mbox/camel-mbox-folder.c (mbox_append_message): Init
15597 filter_from to NULL, for exception case.
15598 (mbox_get_message_by_uid): Cast off_t to long int for diagnostics.
15600 * camel-url.c (camel_url_hash): Hash funciton for using camel
15601 url's as hash keys.
15602 (camel_url_equal): equal function for same.
15604 * camel-session.c (camel_session_finalise): Free cached services.
15605 (camel_session_init): Init service cache.
15606 (service_cache_remove): destroy callback to remove a service from
15609 * camel-store.c (get_folder_internal): Remove the extra ref of the
15610 folder. That seems the right behaviour ...?
15611 (camel_store_get_type): Doh, actually call store init, so the
15613 (cache_folder): strdup the folder name! no wonder it never found
15616 2000-05-30 Jeffrey Stedfast <fejj@helixcode.com>
15618 * providers/imap/camel-imap-folder.c: Implemented a few more
15619 methods like imap_append and 1 or 2 others
15621 2000-05-29 Not Zed <NotZed@HelixCode.com>
15623 * camel-store.c (camel_store_init): Move it to here. If this
15624 level is going to maintain it, it should set it up. Lets see what
15625 caching folders breaks :(
15627 * providers/pop3/camel-pop3-store.c (camel_pop3_store_init): Dont
15628 init folder cache here.
15630 * providers/mbox/camel-mbox-summary.c
15631 (camel_mbox_summary_expunge): Make sure we copy messages which are
15632 still intact to the new folder.
15633 (camel_mbox_summary_expunge): Update the frompos as well when
15634 moving the content.
15635 (camel_mbox_summary_expunge): Remove some debug, and dont offset
15638 * providers/vee/camel-vee-folder.c (vee_folder_build): Check the
15639 searched folder is open before trying to search it.
15640 (message_changed): Track changes to the source message in the
15642 (folder_changed): Track folder changes, re-query the folder that
15643 changed, and cascade the changed event as well.
15644 (camel_vee_folder_finalise): Free subfolder and subfolder summary.
15646 2000-05-29 Dan Winship <danw@helixcode.com>
15648 * camel-service.c (camel_service_new): Fix up some glib
15649 precondition stuff. Try to set the URL in camel_service_new before
15650 checking whether or not it's "empty" so that you can successfully
15651 set "sendmail:" as a URL.
15653 2000-05-28 Dan Winship <danw@helixcode.com>
15655 * camel-provider.h: Add a domain field to CamelProvider, to say
15656 what kind of data it provides.
15658 * providers/imap/camel-imap-provider.c:
15659 * providers/mbox/camel-mbox-provider.c:
15660 * providers/pop3/camel-pop3-provider.c:
15661 * providers/sendmail/camel-sendmail-provider.c:
15662 * providers/smtp/camel-smtp-provider.c: Set domain to "mail".
15664 * providers/nntp/camel-nntp-provider.c: Set domain to "news".
15666 * providers/vee/camel-vee-provider.c: Set domain to "vfolder". (So
15667 it doesn't end up being listed as a potential mail source in the
15668 mail config wizard.)
15670 * providers/pop3/camel-pop3-store.c: Split apart password and APOP
15671 auth, since some servers seem to do both, but don't really.
15672 (connect_to_server): Renamed from try_connect. Now actually does
15673 the connection up to the point of checking the greeting for APOP
15675 (query_auth_types): Return APOP, if appropriate. Call
15676 pop3_disconnect after connect_to_server since we don't really want
15678 (pop3_connect): Use connect_to_server rather than duplicating
15679 code. Fix a one-byte buffer overrun in the APOP code.
15680 (pop3_disconnect): Make this able to clean up after a partial
15682 (connect_to_server): Remove port number from error message since
15683 it's not terribly useful and we were getting it from the wrong
15686 * camel-mime-utils.c (header_address_list_format_append): Use
15687 `foo@bar' rather than `"" <foo@bar>' for email addresses with no
15690 2000-05-27 Jeffrey Stedfast <fejj@helixcode.com>
15692 * providers/imap/camel-imap-store.c: Removed
15693 camel_imap_command_get_additional_data() as it was
15694 completely useless, replaced with
15695 camel_imap_command_extended() which may eventually replace
15696 camel_imap_command() as well.
15698 * providers/imap/camel-imap-store.h: Modified to reflect
15699 changes made to camel-imap-store.c
15701 * providers/imap/camel-imap-folder.c: Wrote the first of many
15702 methods: camel_imap_init(), imap_open(), imap_expunge(),
15703 imap_get_message_count(), and imap_get_subfolder_names()
15705 2000-05-26 Dan Winship <danw@helixcode.com>
15707 * camel-multipart.c (camel_multipart_init): Don't set a default
15708 boundary. Require the caller to do that.
15709 (set_boundary): if boundary is NULL, generate a "random" boundary.
15711 * camel-mime-part-utils.c
15712 (camel_mime_part_construct_content_from_parser): Add a call to
15713 camel_multipart_set_boundary after creating a new multipart.
15715 2000-05-25 Jeffrey Stedfast <fejj@helixcode.com>
15717 * providers/imap/camel-imap-store.c (try_connect): Removed
15718 Exception code - Pop doesn't seem to set exceptions
15720 * providers/imap/camel-imap-folder.c: Initial code, mostly
15721 just a template for future code
15723 * providers/imap/imap.[c,h]: Source code from my personal
15724 mailer - for reference only!
15726 2000-05-25 NotZed <NotZed@HelixCode.com>
15728 * camel-mime-part-utils.c
15729 (camel_mime_part_construct_content_from_parser): Replace simple
15730 data wrapper here too, oops.
15732 * Makefile.am (libcamel_la_SOURCES): Removed
15733 camel-simple-data-wrapper again. Less code to maintain == better
15736 * camel-data-wrapper.c (construct_from_stream): Fixes for bug
15737 where text attachments dont work. Made data-wrapper concrete for
15740 2000-05-23 NotZed <NotZed@HelixCode.com>
15742 * providers/vee/camel-vee-folder.c (vee_folder_build_folder):
15743 Update the vfolder details for a single folder.
15745 2000-05-25 Jeffrey Stedfast <fejj@helixcode.com>
15747 * providers/smtp/camel-smtp-transport.c (_send_to): Took out code
15748 that had been there to reconnect to the server if it was not
15749 already connected - Mailer code was fixed so that this should not
15752 * providers/imap/camel-imap-store.[c,h]: Initial code.
15754 2000-05-24 Dan Winship <danw@helixcode.com>
15756 * camel.h: Re-add camel-simple-data-wrapper.h, which was removed
15759 2000-05-24 Jeffrey Stedfast <fejj@helixcode.com>
15761 * providers/smtp/camel-smtp-transport.[c,h]: Moved global
15762 variables into struct CamelSmtpTransport to make SMTP
15765 * providers/imap/camel-imap-*.h: Stolen from Mbox. Rough structure
15768 2000-05-23 Jeffrey Stedfast <fejj@helixcode.com>
15770 * providers/imap: Added some initial code to the camel tree
15773 * providers/imap/.cvsignore: Added to repository
15775 * providers/smtp/camel-smtp-transport.c: Added debug fprintf's
15776 so that testers can provide more information. Tested with simple
15777 messages and a reply to the hello@helixcode.com default message
15778 but should really be tested more.
15779 (smtp_data): Fixed to use data_wrapper_write_to_stream.
15781 * camel-mime-filter-smtp.c (filter): Modified to escape all lines
15782 beginning with a '.' and to place a \r before each \n if one did
15783 not previously exist. Removed code to escape "From " as it was
15784 found to not be needed for SMTP.
15786 2000-05-22 Jeffrey Stedfast <fejj@helixcode.com>
15788 * providers/smtp/camel-smtp-transport.c (smtp_data): Fixed the
15789 filtered stream. Fixes for stream changes, updated to use
15790 camel-mime-filter-smtp.
15792 * Makefile.am: Added camel-mime-filter-smtp.c
15794 * camel-mime-filter-smtp.[c,h]: Added to camel tree
15795 Smtp filter used to change \n into \r\n, escape lone dots,
15796 and escape "From "'s.
15798 2000-05-19 NotZed <NotZed@HelixCode.com>
15800 * camel-simple-data-wrapper.c (construct_from_stream): If we
15801 already have been constructed, unref our content.
15802 (write_to_stream): Check we've been constructued, and change for
15803 stream api changes.
15805 * camel-mime-parser.c: Removed exception stuff.
15807 * md5-utils.c (md5_get_digest_from_stream): repaired.
15809 * camel-mime-message.c: Remove exception from write_to_stream, and
15810 fix, and fix formatting.
15812 * providers/sendmail/camel-sendmail-transport.c (_send_internal):
15813 Fix for stream changes.
15815 * providers/pop3/camel-pop3-store.c (camel_pop3_command): Fixes
15816 for stream changes.
15818 * providers/mbox/camel-mbox-folder.c, and elsewhere, fix all
15819 stream api changes.
15820 (mbox_append_message): Use stream_close() now its back.
15821 (mbox_append_message): unref the from filter.
15823 * camel-stream-mem.c: And here.
15825 * camel-stream-fs.[ch]: Here too.
15827 * camel-stream-filter.c: Likewise. This is getting tedious.
15829 * camel-stream-buffer.c (stream_write): Fix a few little problems.
15830 (stream_close): Reimplement.
15831 (camel_stream_buffer_read_line): Slightly more efficient version,
15832 that also only allocates the right amount of memory for strings.
15834 * camel-seekable-substream.c: Likewise.
15836 * camel-seekable-stream.[ch]: Remove exceptions, fix formatting,
15837 changes for stream (re)fixes. set_bounds returns an error.
15839 * camel-stream.[ch]: Remove exceptions. Make flush and reset return
15840 an error code, repair all the screwed up formatting, and put back
15843 * camel-mime-part-utils.c
15844 (camel_mime_part_construct_content_from_parser): And here.
15846 * camel-mime-part.c (camel_mime_part_set_content): And this too.
15847 (write_to_stream): Fixed for stream changes.
15851 * providers/vee/camel-vee-folder.c (vee_search_by_expression):
15852 Implement. Performs an intersection of the two searches.
15853 (camel_vee_folder_finalise): Unref search folders.
15854 (vee_append_message): Implement append.
15856 2000-05-18 Dan Winship <danw@helixcode.com>
15858 * camel-folder.c: remove message_number_capability and require uid
15860 (camel_folder_list_subfolders, camel_folder_get_uid_list,
15861 camel_folder_get_subfolder_info, camel_folder_get_message_info):
15863 (camel_folder_get_subfolder_names,
15864 camel_folder_free_subfolder_names): new subfolder interfaces.
15865 (camel_folder_get_uids, camel_folder_free_uids): new uid
15867 (camel_folder_get_summary, camel_folder_free_summary): new summary
15870 * providers/mbox/camel-mbox-folder.c,
15871 * providers/nntp/camel-nntp-folder.c:
15872 * providers/vee/camel-vee-folder.c: Update for changes
15874 * providers/pop3/camel-pop3-folder.c: Implement get_uids, update
15877 2000-05-18 NotZed <NotZed@HelixCode.com>
15879 * providers/vee/camel-vee-folder.c: Guess!
15881 * camel-folder-search.c (search_user_flag): Implement user_flag
15884 * camel-folder-search.h: Added user_flag search capability
15887 * providers/mbox/camel-mbox-folder.c (mbox_init): Set USER flag in
15888 permanent flags for the folder.
15890 2000-05-17 Dan Winship <danw@helixcode.com>
15892 * camel-folder.c: Remove unused async open/close and
15893 copy_message_to functions.
15894 Rename functions without initial _. Fix glib preconditions and
15897 2000-05-17 Dan Winship <danw@helixcode.com>
15899 * camel-data-wrapper.c: remove get/set_output_stream operations.
15900 They're redundant with write_to_stream, and CamelMimePart and
15901 CamelMimeMessage only implement the latter, meaning that trying to
15902 get_output_stream on a CamelMimeMessage that was built from pieces
15903 rather than being parsed from a stream doesn't work. Anything that
15904 uses get_output_stream can be rewritten to use write_to_stream, so
15905 we'll standardize on that.
15906 (camel_data_wrapper_new): remove this: CamelDataWrapper is
15907 supposed to be an abstract class.
15908 (write_to_stream): remove default implementation. (Moved to
15909 CamelSimpleDataWrapper)
15911 * camel-simple-data-wrapper.c: resurrect, although it's not really
15912 the same thing it was before. A simple data wrapper, which is
15913 backed by a CamelStream.
15915 * camel-mime-part-utils.c
15916 (simple_data_wrapper_construct_from_parser): Use
15917 construct_from_stream rather than set_output_stream.
15918 (camel_mime_part_construct_content_from_parser): Change
15919 camel_data_wrapper_new to camel_simple_data_wrapper_new.
15921 * camel-mime-part.c (camel_mime_part_set_content): Change
15922 camel_data_wrapper_new to camel_simple_data_wrapper_new.
15925 2000-05-17 Darin Adler <darin@eazel.com>
15927 * camel-folder-summary.c: (message_info_load):
15928 Quick fix to get it to compile. I hope I don't get into trouble.
15930 2000-05-17 Dan Winship <danw@helixcode.com>
15932 * camel.h: Don't include the no-longer-distributed
15933 possibly-to-be-removed headers.
15935 * providers/smtp/camel-smtp-transport.c
15936 (smtp_get_email_addr_from_text): fix an off-by-one error in
15938 (smtp_data): use camel_data_wrapper_get_output_stream rather than
15939 data_wrapper->output_stream
15941 2000-05-17 NotZed <NotZed@HelixCode.com>
15943 * providers/mbox/camel-mbox-folder.c (message_changed): Snoop
15944 changes to user flags on the message into the summary as well.
15946 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_init):
15947 Changed version init to include the parent class version info
15948 (i.e. add it not overwrite it).
15950 * camel-folder-summary.c (message_info_new): Initialise user_flags
15952 (message_info_load): And load user flags.
15953 (message_info_save): And save user flags.
15954 (message_info_free): And free them.
15955 (CAMEL_FOLDER_SUMMARY_VERSION): Bumped file revision.
15957 * camel-folder-summary.h: Added user-flags to summary.
15959 * camel-mime-message.c (camel_mime_message_set_user_flag): Dont
15960 use a hashtable for user flags.
15961 (camel_mime_message_get_user_flag): And changed here too.
15962 (camel_flag_get): New interface to get a flag from a flag
15963 list. Flag lists are easier to work with than hash tables, and
15965 (camel_flag_set): And set.
15966 (camel_flag_list_free): And free.
15967 (free_key_only): Discard.
15968 (finalize): Remove the flag list.
15970 2000-05-17 Jeffrey Stedfast <fejj@stampede.org>
15972 * providers/smtp/camel-smtp-transport.c: (smtp_helo): Error
15973 checking on gethostbyaddr() eliminating a possible segfault.
15975 2000-05-16 NotZed <NotZed@HelixCode.com>
15977 * providers/mbox/camel-mbox-folder.c (mbox_delete_message_by_uid):
15980 2000-05-12 NotZed <NotZed@HelixCode.com>
15982 * camel-movemail.c (camel_movemail): Open the destination with
15983 O_APPEND, so we dont blow away a partially transferred mbox.
15984 (camel_movemail): Loop if we get errno=INTR, and not fail.
15986 2000-05-11 NotZed <NotZed@HelixCode.com>
15988 * providers/mbox/camel-mbox-summary.c (summary_rebuild): Update
15989 the summarised file size, if everything went ok.
15990 (camel_mbox_summary_expunge): Clear header flags after updating.
15992 2000-05-16 Chris Toshok <toshok@helixcode.com>
15994 * providers/nntp/camel-nntp-folder.c:
15995 * providers/nntp/camel-nntp-folder.h:
15996 * providers/nntp/camel-nntp-provider.c:
15997 * providers/nntp/camel-nntp-store.c:
15998 * providers/nntp/camel-nntp-utils.c:
15999 * providers/nntp/camel-nntp-utils.h:
16000 get things working with new camel summary stuff.
16002 * providers/nntp/camel-nntp-summary.c:
16003 * providers/nntp/camel-nntp-summary.h:
16004 removed files since camel-folder-summary does all we need.
16006 2000-05-15 Jeffrey Stedfast <fejj@stampede.org>
16008 * providers/smtp/camel-smtp-transport.c: Added some preliminary
16011 2000-05-15 Dan Winship <danw@helixcode.com>
16013 * camel-folder.h: Remove camel_folder_get_summary, which no longer
16016 2000-05-11 Dan Winship <danw@helixcode.com>
16018 * Makefile.am: remove some cruft that we're not currently using.
16020 * camel-stream-mem.c (camel_stream_mem_new_with_buffer): Change
16021 to match prototype (size_t vs unsigned int) so it works on 64-bit
16022 machines. Noted by msw.
16024 2000-05-11 NotZed <NotZed@HelixCode.com>
16026 * providers/mbox/camel-mbox-folder.c (message_changed): Indicate
16027 the summary changed also.
16029 2000-05-11 Jeffrey Stedfast <fejj@stampede.org>
16031 * providers/smtp/camel-smtp-transport.c: (smtp_helo):
16032 Updated to more closely comply with RFC 821 standards
16034 2000-05-11 NotZed <NotZed@HelixCode.com>
16036 * camel-mime-part.c (write_to_stream): Unref the filter after
16037 adding it to the filtering stream.
16039 * providers/mbox/camel-mbox-summary.c
16040 (camel_mbox_summary_finalise): Free the folder path.
16041 (camel_mbox_summary_update): Also save summary when done.
16042 (camel_mbox_summary_expunge): Unindex items when deleting them.
16043 (camel_mbox_summary_expunge): Save the index as well as the
16046 * camel-folder-summary.c (camel_folder_summary_finalise): Free the
16048 (camel_folder_summary_touch): New function, indicate the summary
16050 (camel_folder_summary_remove): Dirty here.
16052 * camel-internet-address.c (internet_decode): Free multiple entry
16053 addresses properly.
16055 * camel-mime-utils.c (header_decode_mailbox): Plugged another
16056 memleak, free text after converting it.
16057 (header_decode_addrspec): More leaks plugged.
16059 * camel-mime-message.c (finalize): Free message_uid.
16060 (finalize): Free the recipients hashtable.
16062 2000-05-11 <notzed@helixcode.com>
16064 * camel-folder-summary.c (camel_folder_summary_finalise): Free
16065 summary items and charset filters.
16067 2000-05-10 <notzed@helixcode.com>
16069 * camel-folder-summary.c (camel_folder_summary_finalise): Don't
16070 free stuff in p, after we've free'd p.
16072 * providers/mbox/camel-mbox-folder.c (mbox_append_message): Unref
16073 the stream we created for appending.
16075 2000-05-10 Jeffrey Stedfast <fejj@stampede.org>
16077 * providers/smtp/camel-smtp-transport.c: (camel_smtp_transport_class_init):
16078 Added initialization for service_class
16080 2000-05-10 Dan Winship <danw@helixcode.com>
16082 * camel-multipart.c (write_to_stream): fix a stupid typo. Thank
16085 * camel-mime-part.c (write_to_stream): don't ref the stream before
16086 wrapper a filter around it, since nothing will ever unref it.
16088 2000-05-10 Christopher James Lahey <clahey@helixcode.com>
16090 * Makefile.am: Added camel-types.h, camel-folder-pt-proxy.h, and
16091 camel-thread-proxy.h.
16093 2000-05-09 Dan Winship <danw@helixcode.com>
16095 * providers/sendmail/camel-sendmail-transport.c (_send_internal):
16096 Bleah. Can't fsync a pipe. As a quick kludge, just don't
16097 stream_flush it. The right fix will require bringing back
16098 stream_close though.
16100 2000-05-09 Jeffrey Stedfast <fejj@stampede.org>
16101 * camel-internet-address.[c,h]: Undid my changes (moved
16102 struct _address back into came-internet-address.c)
16103 * providers/smtp/camel-smtp-transport.c: (_send): changed
16104 from using it's own address manipulation (using struct _address)
16105 to using camel_internet_address_get(). Also some format changes
16106 to keep consistant with the rest of Camel
16108 2000-05-09 Jeffrey Stedfast <fejj@stampede.org>
16110 * camel-internet-address.[c,h]: Moved struct _address from
16111 camel-internet-address.c to camel-internet-address.h
16112 (hopefully this doesn't break anything...)
16113 * providers/smtp/camel-smtp-transport.c: (_send): now
16114 populates the recipient list with To, Cc, and Bcc addresses.
16115 Should now be able to use this module.
16117 2000-05-09 Dan Winship <danw@helixcode.com>
16119 * providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid):
16120 one more refcounting fix I missed before.
16122 2000-05-08 Jeffrey Stedfast <fejj@stampede.org>
16124 * providers/smtp/camel-smtp-transport.c: no longer frees memory it
16125 shouldn't, updated to reflect camel-stream changes involving
16126 CamelException (perhaps it should use a different CamelException
16127 variable than is passed to the camel smtp module?)
16129 2000-05-08 Dan Winship <danw@helixcode.com>
16131 * camel-stream.c (camel_stream_read, camel_stream_write,
16132 camel_stream_flush, camel_stream_reset, camel_stream_printf,
16133 camel_stream_write_to_stream): Use CamelException to signal
16135 (camel_stream_write_strings): Remove. camel_stream_printf is more
16136 useful in most of the places that used this.
16137 (camel_stream_write_string): Change from macro to function to
16138 prevent problems with double-evaluation.
16140 * camel-seekable-stream.c (camel_seekable_stream_seek,
16141 camel_seekable_stream_set_bounds): Use CamelException.
16144 * camel-seekable-substream.c, camel-stream-buffer.c,
16145 camel-stream-filter.c, camel-stream-fs.c, camel-stream-mem.c:
16148 * camel-stream-fs.c: Remove the virtual init functions and move
16149 the code into the creator functions. Add CamelExceptions to
16150 creation functions that could fail.
16152 * camel-data-wrapper.c (camel_data_wrapper_write_to_stream): Use
16154 * camel-mime-message.c, camel-mime-part.c, camel-multipart.c
16155 (write_to_stream): Update.
16157 * camel-mime-parser.c: add an exception to the mime parser private
16158 data and pass that to stream functions as needed.
16160 * gmime-content-field.c, md5-utils.c: Update (badly) for stream
16163 * camel-exception.h (camel_exception_is_set): convenience macro.
16165 * providers/Makefile.am: disable SMTP for now
16167 * providers/mbox/camel-mbox-folder.c (mbox_append_message): Pass
16168 CamelException to the functions that now need it. Check the
16169 exception after calling camel_stream_flush, and fail if it fails.
16170 (mbox_get_message_by_uid): More updates.
16172 * providers/pop/camel-pop3-folder.c,
16173 providers/pop/camel-pop3-store.c,
16174 providers/sendmail/camel-sendmail/transport.c: Update.
16177 2000-05-08 NotZed <NotZed@HelixCode.com>
16179 * camel-mime-message.c (process_header): Format From and Reply-To
16180 to at least a decoded string. Should probably store them as an
16181 camelinternetaddress.
16183 * Merged NEW_SUMMARY branch back to trunk, and resolved conflicts.
16185 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_update):
16187 (camel_mbox_summary_expunge): Force an update of the summary
16188 before we do anything.
16189 (camel_mbox_summary_expunge): Build new xev line in xevnew, and
16190 free that, and consify xev.
16191 (camel_mbox_summary_load): If we are rebuilding from scratch, make
16192 sure we clear the summary content.
16194 * camel-stream-filter.c (do_close): We NEED a stream close.
16196 2000-05-07 Dan Winship <danw@helixcode.com>
16198 Make camel not leak like a sieve.
16200 * camel-object.c: New subclass of GtkObject which is now the base
16201 of the Camel object hierarchy. Currently the only difference
16202 between CamelObject and GtkObject is that CamelObjects don't start
16205 * *.h: Move a bunch of typedefs to camel-types.h. Standardize on
16206 using <camel/foo.h> in header files rather than <foo.h>, "foo.h",
16207 or "camel/foo.h". Remove some unneeded includes.
16209 * camel-address.c, camel-data-wrapper.c, camel-folder-search.c,
16210 camel-folder-summary.c, camel-folder.c, camel-mime-filter.c,
16211 camel-mime-parser.c, camel-service.c, camel-session.c,
16212 camel-stream.c: These are now subclasses of CamelObject.
16214 * camel-data-wrapper.c (set_output_stream):
16215 * camel-medium.c (set_content_object):
16216 * camel-seekable-substream.c
16217 (init_with_seekable_stream_and_bounds):
16218 * providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid):
16219 remove gtk_object_sink calls.
16221 * camel-stream-buffer.c (init_vbuf):
16222 * camel-stream-filter.c (camel_stream_filter_new_with_stream):
16223 ref the original stream.
16225 * camel-folder-summary.c (camel_folder_summary_finalise): unref
16226 the filters when finalizing.
16228 * camel-mime-part-utils.c
16229 (simple_data_wrapper_construct_from_parser,
16230 camel_mime_part_construct_content_from_parser):
16231 * camel-mime-part.c (camel_mime_part_set_content): Unref objects
16232 that are created only to be handed off to other objects. If
16233 they're going to be needed later, they will have been additionally
16234 ref'ed by the object that needs them.
16236 * providers/pop3/camel-pop3-folder.c (get_message_by_number):
16237 unref the message stream after creating the data from it.
16239 * camel-stream.c, camel-stream-buffer.c, camel-stream-filter.c,
16240 camel-stream-fs.c, camel-stream-mem.c: Remove camel_stream_close,
16241 since its semantics are dubious (what happens when you close a
16242 stream other people still have references on?).
16244 * providers/nntp/camel-nntp-store.c:
16245 * providers/smtp/camel-smtp-transport.c:
16246 * providers/pop3/camel-pop3-store.c:
16247 replace camel_stream_close calls with gtk_object_unref.
16249 * providers/mbox/camel-mbox-folder.c:
16250 * providers/nntp/camel-nntp-folder.c:
16251 * providers/sendmail/camel-sendmail-transport.c:
16252 replace camel_stream_close with camel_stream_flush +
16255 2000-05-06 Dan Winship <danw@helixcode.com>
16257 * providers/pop3/camel-pop3-store.c (query_auth_types): A machine
16258 which serves neither POP nor KPOP is not a POP server.
16260 * providers/smtp/camel-smtp-provider.c: Note in the description
16261 that this provider is not yet tested.
16263 2000-05-08 <notzed@helixcode.com>
16265 * camel-mime-part.c (write_to_stream): Free the filter stream when
16268 * camel-mime-parser.c (folder_seek): Make sure we add the \n
16269 terminal when we seek as well (frob!).
16271 * camel-mime-utils.c (header_decode_addrspec): Plug minor memleak.
16273 * camel-mime-part.c (finalize): Free header tables once finished.
16275 * camel-folder-summary.c (camel_folder_summary_remove): Dont try
16276 to access info after its free'd.
16278 2000-05-07 NotZed <NotZed@HelixCode.com>
16280 * camel-mime-part.c (write_to_stream): Apply encoding to content
16281 part, when writing to a stream *sigh*.
16283 * camel-stream-filter.c (do_write): implement write for the
16284 filtering stream. Writes shouldn't be mixed with reads.
16285 (do_flush): Implemented flush. Again write/flush shouldn't be
16286 mixed with reads. Only flushes if the last op was write.
16287 (do_close): Force flush on close.
16289 * camel-mime-filter.c (filter_run): Oops, make sure we include the
16290 backlen in the total length before passing onto the filter.
16292 * camel-mime-filter-from.c: New filter, munges 'From ' lines into
16293 '>From ', for mbox.
16295 * camel-mime-parser.c (camel_mime_parser_header_remove): New
16296 function to remove the parser's raw header, rather than
16297 manipulating the header directly (wich doesn't work with
16300 * camel-mime-utils.c (header_address_list_clear): Fixed some
16301 broken(tm) logic, which would leak entries on multivalued lists.
16303 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_load):
16304 Use ibex_save() to save the ibex. Makes a big difference to
16305 startup times for very large mailboxes.
16306 (camel_mbox_summary_expunge): Dum de dum, reimplemented. Designed
16307 to be much more robust, and to stop immediately if anything awry
16309 (copy_block): Utility function to copy n bytes from one fd to
16311 (header_write): Utility function to write out raw headers to an
16313 (camel_mbox_summary_update): Incremental summary updater.
16315 * providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid):
16316 Dont unref the stream, because of the broken(tm) ref model of gtk
16317 widget that for some odd reason is being perpetuated in camel.
16318 (mbox_expunge): Reenable expunge again.
16319 (mbox_append_message): Removed the optimised mbox append. If its
16320 an issue, it can go back later. Cleaned up a lot, checks error
16321 returns, and automagically translates 'From ' into '>From' as
16324 2000-05-07 <notzed@helixcode.com>
16326 * camel-mime-filter.c (filter_run): Oops, forgot to add the
16327 backlen to the pre-buffer (*poof*).
16329 2000-05-07 NotZed <NotZed@HelixCode.com>
16331 * camel-mime-message.c (construct_from_parser): Allow
16332 HSCAN_FROM_END to terminate the processing of a message.
16334 * camel-folder-summary.c (perform_content_info_load): Ick, dont
16335 try and append a node onto its own list.
16336 (camel_folder_summary_clear): Actually clear the indexes after
16337 we've removed the messages.
16338 (camel_folder_summary_clear): Set dirty if it changes.
16339 (camel_folder_summary_load): Clear dirty.
16340 (camel_folder_summary_save): Only save if dirty.
16342 * providers/mbox/camel-mbox-summary.c (summary_header_load): Oops,
16343 remember to call that parent class first ...
16344 (summary_header_save): Here too.
16345 (camel_mbox_summary_load): Do more checking to verify the index
16346 contents as well as teh summary contents, against the mbox
16348 (camel_mbox_summary_load): Removed some fo that checking, it needs
16349 more code to work reliably.
16351 2000-05-07 <notzed@helixcode.com>
16353 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_load):
16354 Set the size and mtime of the mbox we indexed once done.
16356 * camel-folder-summary.c (camel_folder_summary_set_index): Dont
16357 write the index if it changes - let the claler fix it (uh, kind of
16358 impacts performance).
16359 (camel_folder_summary_load): close in.
16361 * camel-folder-summary.c (summary_format_string): Check header
16362 exists before trying to strip its leading spaces.
16364 2000-05-06 NotZed <NotZed@HelixCode.com>
16366 * camel-folder.h: Removed summary info from here, and include
16367 camel-folder-summary.h as well.
16369 * camel-mime-parser.c (camel_mime_parser_step): Allow it to accept
16372 * providers/mbox/camel-mbox-summary.c: Totally new file, now
16373 subclasses camel-folder-summary.
16375 * camel-folder-summary.c (message_info_load): Load the uid as a
16377 (message_info_save): And save too.
16378 (camel_folder_summary_clear): New function, clears the contents of
16381 * providers/mbox/camel-mbox-folder.c: Fixes for summary changes.
16382 (mbox_get_message_by_uid): Completely redone. Now cross-checks
16383 the summary information to make sure we get a real message.
16384 (mbox_append_message): Disabled the copy version of append for
16386 (mbox_expunge): Temporarily disabled the expunge function, until
16387 it is put back in camel-mbox-summary.c
16389 2000-05-05 NotZed <NotZed@HelixCode.com>
16391 * camel-folder-summary.c: And same here ...
16392 (camel_folder_summary_encode_fixed_int32): Ugh, fwrite doesn't
16393 return -1 on error ..
16394 (camel_folder_summary_decode_fixed_int32): Neither deos fread.
16395 (camel_folder_summary_encode_token): Fix here too.
16396 (summary_build_content_info): Use start-headers to get the pos of
16397 the message, not parser_tell(), which might not be what we
16398 expected because of parser_unstep().
16399 (camel_folder_summary_encode_token): Use bserch() to tokenise the
16400 values, rather than a linear search.
16402 * camel-mime-utils.c: Defined out some memory profiling stuff I
16403 left there by mistake.
16404 (header_decode_mailbox): Dont try to append the word part of a
16405 local address if we ran out of words.
16407 * camel-mime-parser.c (folder_scan_content): Apply the fix from
16408 the header scanner to here too.
16409 (folder_scan_header): Only check for end of header if we have
16410 space for it (didn't end the read with a newline)
16411 (folder_scan_header): inptr is the only real thing we need
16412 registerised for performance. Try to help the compiler be smart
16414 (folder_scan_header): Simplified the save header case a tad.
16416 Commented out some memory profiling stuff.
16418 2000-05-05 <notzed@helixcode.com>
16420 * camel-mime-utils.c (header_decode_mailbox): Plug a memory leak.
16421 (header_decode_text): Fixed memory leaks with g_string_append().
16422 (header_encode_string): And here too, and a few other places. The
16423 glib api is so awful ...
16424 (header_content_type_decode): More memory leaks.
16426 2000-05-05 <notzed@helixcode.com>
16428 * camel-mime-parser.c (folder_scan_init_with_fd): Make sure we
16429 init the end of buffer sentinal!
16430 (folder_scan_init_with_stream): And here too ...
16432 2000-05-04 NotZed <NotZed@HelixCode.com>
16434 * providers/mbox/camel-mbox-folder.c (summary_get_message_info):
16435 Maxcount is minimum of the max and the requested count, not the
16438 * camel-mime-parser.c (folder_scan_content): Properly set midline,
16439 so we dont falsely catch offset boundary markers (i.e. From inside
16441 (folder_read): Set a sentinal on the end of the read data (\n) so
16442 we dont have to check the buffer boundary in the inner loop.
16443 (mempool_*): New experimental memory management routines, speed
16444 up simple structure parsing by about 25% ... not compiled in by
16445 default. Something similar may be needed for camel-mime-utils to
16446 address performance issues with g_malloc and friends.
16448 * camel-mime-utils.c: Added a macro w(x) used to wrap all warnings
16449 about mime/rfc violations, so they can be turned off.
16451 * camel-folder-summary.c (summary_build_content_info): Step after
16452 the end of a message ...
16453 Turn into a stand-alone program for testing and profiling.
16455 2000-05-04 Dan Winship <danw@helixcode.com>
16457 * providers/pop3/camel-pop3-store.c (pop3_connect): Don't fall
16458 back to plaintext passwords if APOP fails, since it should also
16461 2000-05-04 Dan Winship <danw@helixcode.com>
16463 * camel-session.c (camel_session_list_providers): New function to
16464 replace camel_provider_scan. Returns a list of either (a) all
16465 currently-loaded providers, or (b) all available providers.
16467 * camel-url.[ch]: Add an "empty" flag to CamelURL (indicating that
16468 it contains only a protocol).
16470 * camel-service.c (camel_service_query_auth_types): Make this take
16471 a CamelException (since it may have to try to connect to the
16472 server, and it might not able to.)
16474 * providers/pop3/camel-pop3-store.c: add KPOP (Kerberized POP)
16475 support. This is mostly so I have two kinds of authmech to play
16476 with instead of just one. (But it does actually work.)
16478 * providers/smtp/camel-smtp-transport.c (query_auth_types): update
16479 for prototype change, but disable the functionality, since it
16480 doesn't really support any auth types yet.
16481 (camel_smtp_transport_get_type): add an object init function to
16482 set the service url_flags.
16484 2000-05-04 NotZed <NotZed@HelixCode.com>
16486 * providers/mbox/camel-mbox-summary.c: Yes, and anotherone.
16488 * camel-mime-utils.c: And another one.
16490 * camel-mime-part.c: And another one.
16492 * camel-mime-part-utils.c: And another one.
16494 * camel-folder-search.c: And another one.
16496 * camel-mime-parser.c: Reverted a change wihtout a ChangeLog entry.
16498 2000-05-04 NotZed <NotZed@HelixCode.com>
16500 * camel-folder-summary.[hc]: Yes, CamelFolderSummary is back ...
16501 ... re-usable class to summarise and index any stream or message
16502 and to manage/load/save the created summaries.
16504 * camel-folder.c: Include string.h to kill a warning.
16506 2000-05-03 Jason Leach <leach@wam.umd.edu>
16508 * Makefile.am (INCLUDES): add $(UNICODE_CFLAGS) to the INCLUDES,
16509 people who installed libunicde in non-standard include paths need
16512 2000-05-03 NotZed <NotZed@HelixCode.com>
16514 * camel-folder.h: Added pos/bodypos/endpos to the basic message
16515 content info object. Size to be removed? Moved the
16516 messageconentinfo and messageinfo back to camel-folder-summary.h.
16518 * camel-mime-filter-index.c (camel_mime_filter_index_set_ibex):
16519 New function to (re)set the index to use on a filter.
16521 * camel-mime-parser.c (camel_mime_parser_scan_from): Whole bunch
16523 (camel_mime_parser_drop_step): New function to drop a state from
16524 the parser. Needs more testing.
16526 * camel-mime-utils.c (rfc2047_decode_word): If the iconv handle is
16527 -1, then dont try and convert (crashes unicode_iconv?).
16528 (rfc2047_decode_word): Use alloca for variables instead of
16529 g_malloc - by the rfc they should always be short.
16530 (rfc2047_decode_word): If we can't do the charset conversion, undo
16531 the quoted-printable/base64 at least? Should probably convert
16532 unknown characters to the utf-8 unknown character.
16534 2000-05-02 Larry Ewing <lewing@helixcode.com>
16536 * camel-mime-utils.c (header_decode_date): fix typo when
16537 dereferencing saveoffset.
16539 2000-05-02 NotZed <NotZed@HelixCode.com>
16541 * camel-folder-search.c: Added some header doco.
16543 * camel.h: REmove gmime-utils.h from here.
16545 * providers/mbox/camel-mbox-search.[ch]: Removed. Functionally
16548 * providers/mbox/camel-mbox-folder.c (mbox_search_by_expression):
16549 Use the new CamelFolderSearch class to do the actual searching,
16550 just setup the search here.
16552 * camel-folder-search.[ch]: A helper class that providers may
16553 subclass to provide their own search functionality, or they can
16554 simply use as is, it supports body searches if an ibex is
16555 supplied, and header searches if a summary is supplied.
16557 2000-05-02 Matt Loper <matt@helixcode.com>
16559 * Makefile.am: set G_LOG_DOMAIN.
16560 * providers/MH/Makefile.am: same.
16561 * providers/maildir/Makefile.am: same.
16562 * providers/mbox/Makefile.am: same.
16563 * providers/nntp/Makefile.am: same.
16564 * providers/pop3/Makefile.am: same.
16565 * providers/sendmail/Makefile.am: same.
16566 * providers/smtp/Makefile.am: same.
16568 2000-05-02 NotZed <NotZed@HelixCode.com>
16570 * providers/mbox/camel-mbox-search.c
16571 (camel_mbox_folder_search_by_expression): Dont store/remove
16572 current search from the search list.
16574 * providers/mbox/camel-mbox-folder.h: Removed searches list,
16575 searches are all sync now.
16577 * gmime-utils.[ch]: What the hell, remove it. This will break the
16578 nntp provider. The mime parser can be used instead though.
16579 Removed from all code including it (but none were using it).
16581 * gmime-utils.c (_store_header_pair_from_string): Removed bizarre
16582 string_dichotomy version of this. This code is somewhat redundant
16583 now, and is headed for death anyway.
16585 * gstring-util.c (g_string_dichotomy): Same with this one.
16586 (g_string_clone): Removed a memory leak, g_string_new() allocates
16588 (g_string_append_g_string): Allow to append an empty gstring onto
16589 another gstring, dont abort()!
16591 * string-utils.c (string_dichotomy): Removed this incredibly weird
16594 * camel-folder.c (_create): Replaced the rather obtuse use of
16595 "string_dichotomy" function with a simple strrchr(). Still not
16598 * camel-folder-summary.c: cvs removed a long-removed file.
16600 * camel-mime-parser.c (folder_scan_header): Fix the previous
16601 overflow problem properly (can happen in 2 places).
16602 (header_append): A new macro to include the code changed above, so
16603 it only appears in one place.
16604 (folder_scan_step): Change the content type to text/plain if the
16605 multipart is broken. Doesn't actually change the header though.
16606 (header_append): Also move the header-start tracking stuff here.
16607 Could be a static function to save code.
16609 2000-05-02 <notzed@helixcode.com>
16611 * camel-mime-part-utils.c
16612 (simple_data_wrapper_construct_from_parser): Dont use autofill on
16613 these fucking long function anmes!!!!!!
16615 2000-05-02 NotZed <NotZed@HelixCode.com>
16617 * providers/mbox/camel-mbox-summary.c
16618 (camel_mbox_summary_expunge): Fix the offset for the summary when
16619 an item is expunged to take account of the From line.
16621 2000-05-01 NotZed <NotZed@HelixCode.com>
16623 * providers/mbox/camel-mbox-folder.h (CamelMboxFolder): Removed
16626 * providers/mbox/camel-mbox-search.c
16627 (camel_mbox_folder_search_cancel): Remove.d
16628 (camel_mbox_folder_search_complete): Removed.
16629 (camel_mbox_folder_search_by_expression): Changed back to sync
16631 (struct _searchcontext): Removed cancelled flag.
16632 (find_context): Removed.
16633 (func_header_contains): Debug out some search stuff.
16635 * providers/mbox/camel-mbox-search.h
16636 (camel_mbox_folder_search_by_expression): Moved back to sync api.
16638 * providers/mbox/camel-mbox-summary.c
16639 (camel_mbox_summary_set_flags_by_uid): New function to update the
16640 flags in the summary.
16641 (camel_mbox_summary_expunge): Expunge messages from a folder.
16642 (offset_content): Re-align offsets of summary when messages
16643 added/removed to an existing summary.
16644 (camel_mbox_summary_remove_uid): Remove a message summary entry by
16646 (index_folder): Restore flags from X-Evolution header, if they are set.
16647 (index_folder): Make sure we index using a decimal uid, since
16648 thats what everything else indexes off (oops).
16649 Upped SUMMARY_VERSION as a result.
16650 (camel_mbox_summary_expunge): Oops, my wrong, use the string uid
16653 * providers/mbox/camel-mbox-folder.c (_get_message_by_uid):
16654 Connect to the message_changed signal.
16655 (_init): Set permanent flags to something reasonable. No user
16657 (message_changed): If the flags of the message change, update the
16658 flags in the summary.
16659 (mbox_expunge): Implement the expunge.
16660 (camel_mbox_folder_class_init): Renamed all leading _'s to mbox_'s
16661 (mbox_expunge): Emit a folder_changed signal on expunge (uh, even
16664 * camel-folder.c (_finalize): Uh, dont free permanent_flags
16665 anymore (this wouldn't failed anyway, it was a GList !!!)
16666 (camel_folder_search_complete): Removed.
16667 (camel_folder_search_cancel): Removed.
16668 (camel_folder_expunge): Changed to only allow expunge on an open
16669 folder. It doesn't make sense for mbox, otherwise (?)
16670 (camel_folder_class_init): Added a folder_changed signal.
16672 * camel-folder.h (struct _CamelFolder): Change permanent_flags to
16674 (list_permanent_flags): Renamed to get_permanent_flags, and
16675 returns a bitfield.
16676 (camel_folder_expunge): Changed expunge to a void type. The
16677 messages would no longer be useful after they have been removed
16679 (CamelFolderClass): New function summary_get_by_uid() to get a single
16681 (*search*): Moved back to synchronous search api ... *sigh*
16683 * camel-folder.h: Removed CamelSearchFunc.
16685 * camel-mime-message.c (set_flag): Removed.
16686 (camel_mime_message_set_flag): Removed.
16687 (get_flag): Removed.
16688 (camel_mime_message_get_flag): Removed.
16689 (add_flag_to_list): Removed.
16690 (get_flag_list): Removed.
16691 (camel_mime_message_get_flag_list): Removed.
16692 (camel_mime_message_get_flags): New interface to get system flags.
16693 (camel_mime_message_set_flags): " to set ".
16694 (camel_mime_message_get_user_flag): To get a user flag.
16695 (camel_mime_message_set_user_flag): To set a user flag.
16696 (finalize): Hmm, the old one free'd the key and data, not good
16697 when the data is a boolean ...
16699 2000-04-30 Dan Winship <danw@helixcode.com>
16701 * camel-provider.h: Tweak the definition of CamelProvider. Among
16702 other things, a provider may now be both a store and a transport.
16704 * camel-provider.c: Remove a lot of code we had no intention of
16705 using. This now only contains two functions: camel_provider_init
16706 to read the installed .urls files, and camel_provider_load to
16707 load and register a new provider.
16709 * camel-session.c: Remove more unused code and simplify some of
16710 the remaining code. The list of available provider modules is now
16711 stored in the session, and it handles calling camel_provider_load
16712 to load them as needed. Provider registration is now done by
16713 calling back from the module init routine, which allows a single
16714 module to register providers for multiple URL types.
16716 * providers/*: Update provider structures and init routines for
16717 the new stuff. Add a .urls file to each provider specifying what
16718 urls it handles, and install that with the library.
16720 * providers/nntp/camel-nntp-provider.c: Add hints towards
16721 supporting both news: and nntp: URLs, and using nntp as both a
16722 store and a transport.
16724 2000-04-29 Dan Winship <danw@helixcode.com>
16726 * camel-internet-address.c (camel_internet_address_get): const
16729 * camel-mime-part-utils.c
16730 (simple_data_wrapper_construct_from_parser):
16731 camel_mime_parser_tell() returns an offset from where it started
16732 parsing, not necessarily from the start of data. Since we're
16733 parsing a bounded seekable_stream, we need to add the stream's
16734 starting bound to camel_mime_parser_tell's return value to
16735 create the substream in the right place.
16737 * camel-seekable-substream.c
16738 (camel_seekable_substream_new_with_seekable_stream_and_bounds):
16739 say CAMEL_STREAM_UNBOUND rather than -1 in doc.
16741 * camel-seekable-stream.c (camel_seekable_stream_seek): Add more
16744 2000-04-28 Dan Winship <danw@helixcode.com>
16746 * camel-mime-parser.c (folder_scan_header): fix a bug that would
16747 cause corruption with very long headers.
16749 2000-04-27 Ettore Perazzoli <ettore@helixcode.com>
16751 * providers/pop3/Makefile.am (INCLUDES): Add `-I$(srcdir)/../../..'
16752 to pick the Camel includes.
16753 * providers/sendmail/Makefile.am (INCLUDES): Likewise.
16755 * camel.h: Don't #include <camel/data-wrapper-repository.h> anymore.
16757 2000-04-27 NotZed <NotZed@HelixCode.com>
16759 * camel-mime-utils.c (check_header): Dont try and check a NULL
16762 * camel-recipient.[ch]: Dead. Its not pining.
16764 * camel-mime-message.h: Dont include recipients.h anymore.
16766 * camel-mime-message.c (camel_mime_message_add_recipient): Accept
16767 name/address separately, and store in an CamelInternetAddress.
16768 (add_recipient): Removed.
16769 (remove_recipient): Removed.
16770 (remove_recipient_address): Renamed from remove_receipient, works
16772 (camel_mime_message_remove_recipient_name): New function to remove
16774 (get_recipients): Removed.
16775 (camel_mime_message_get_recipients): Return a camel-internet-address.
16776 (write_to_stream): No longer write receipients directly.
16777 (write_recipients_to_stream): Removed.
16778 (write_one_recipient_to_stream): Removed.
16779 (camel_mime_message_init): Setup recipients hashtable, rather than
16780 usign the recipients stuff.
16781 (set_recipient_list_from_string): Killed, a violent and lengthy
16783 (process_header): Simplified recipient handling code a lot.
16784 (received_date_str, sent_date_str, reply_to_str, subject_str,
16785 from_str): Removed some oddly-defined global statics.
16786 (camel_mime_message_class_init): Dont initialise above variables
16788 (init_header_name_table): Removed, use a table to init this, and
16789 do it in class init (2 lines of code ...).
16791 * camel-news-address.c: Class to represent news addresses -
16792 currently empty, and not built.
16794 * camel-internet-address.h: Class to represent internet (email)
16797 * camel-address.h: Abstract class to represent (lists of)
16800 2000-04-27 Dan Winship <danw@helixcode.com>
16802 * camel-mime-part.c (write_to_stream): Revert previous change. I
16805 * camel-url.[ch] (camel_url_encode, camel_url_decode): expose
16808 2000-04-26 Dan Winship <danw@helixcode.com>
16810 * camel-mime-part.c (write_to_stream): Only write a newline
16811 between the headers and the content object if the content object
16812 is not a CamelMedium. (If the content is a medium, it may have its
16813 own headers, which then need to go before the blank line.)
16815 * camel-mime-body-part.[ch]: Remove. We weren't using the fields
16816 that made this different from camel-mime-part, so it basically
16817 just forced us to do lots of gratuitous typecasting.
16819 * camel-multipart.[ch]: Use CamelMimePart. Remove the multipart
16820 parent stuff, since we weren't using that either.
16822 * etc: update for CamelMimeBodyPart -> CamelMimePart
16824 2000-04-26 Dan Winship <danw@helixcode.com>
16826 * camel-medium.c (set_content_object): sink the content object
16827 after referencing it.
16829 * camel-mime-part.c: fix various little things in the handling
16830 of CamelMedium methods. Change camel_mime_part_set_text to the
16831 more generic camel_mime_part_set_content.
16833 * camel.h: sync to current reality
16835 * camel-folder-utils.[ch]: removed
16837 * camel-mime-utils.c (header_format_date): fix format specifier
16838 for time zone. Fix typo in month names array.
16840 2000-04-26 NotZed <NotZed@HelixCode.com>
16842 * camel-seekable-substream.c (stream_seek): Changed to have
16843 absolute seek semantics, not relative to the bounds.
16845 * camel-seekable-stream.c (reset): When we reset, seek to the
16846 start of the bound, if there is one.
16847 (stream_tell): Make tell virtual.
16849 * camel-stream-filter.c (do_available): Removed.
16851 * camel-stream-buffer.c: Remove leading _'s from static functions.
16852 (stream_read): Renamed from read(). Fancy that conflicting! (my
16855 * providers/pop3/camel-pop3-folder.c (get_message_by_number):
16856 Changed to stream_mem interface.
16858 * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): Fixed
16859 for streamfs interface changes, and implement a failure case.
16860 (_append_message): Changed for fs stream interface change.
16862 * camel-multipart.c (print_part): Iterate rahter than callback. I
16863 hate glists's interface (hence, move this to write_to_stream).
16864 (write_to_stream): Return an error (yuck, this is a royal PITA to
16865 do with the stream write interface).
16867 * camel-mime-message.c: Removed leading _ from static names.
16869 * camel-mime-part.h: construct_from_parser() now returns an error
16872 * camel-mime-part-utils.c
16873 (camel_mime_part_construct_content_from_parser): Changed to use a
16874 camel-data-wrapper instead of a camel-simple-data-wrapper (no
16875 change needed elsewhere?).
16876 (simple_data_wrapper_construct_from_parser): Fixes for stream-mem
16879 * camel-simple-data-wrapper.[ch],
16880 camel-simple-data-wrapper-stream.[ch],
16881 camel-stream-data-wrapper.[ch], removed. Fixed including of these
16884 * camel-mime-part.c (camel_mime_part_set_text): Remove the use of
16885 the camel-simple-data-wrapper-stream, just use a mem stream.
16886 (write_to_stream): Renamed from my_*
16887 (construct_from_stream): Return an error on error.
16889 * camel-stream-mem.c (camel_stream_mem_new*): Remove mode
16892 * camel-stream-mem.h (enum CamelStreamMemMode): Removed. It
16893 wasn't used at all.
16895 * camel-data-wrapper.h: Add camel_data_wrapper_new() to create
16897 (write_to_stream, construct_from_stream): Return an error
16898 indicator for success. Fixed all methods to match (ICK).
16900 * Makefile.am (libcamel_la_SOURCES): Remove
16901 camel-simple-data-wrapper.c, camel-simple-data-wrapper-stream.c,
16902 camel-stream-data-wrapper.c. Obsoleted by code re-use!
16904 * camel-data-wrapper.c (construct_from_stream): Change the default
16905 implementation to just set the output stream == construction
16906 stream. Well, this lets me get rid of both simple-data-wrapper
16907 and stream-data-wrapper (unused anyway), and
16908 simple-data-wrapper-stream in one hit. CamelDataWrapper is now
16909 also a concrete class.
16910 (write_to_stream): Use camel_stream_write_to_stream() to
16911 calculate/return values (and save code).
16912 Include <errno.h> for obvious reasons.
16914 * camel-stream.c (eos): Provide a default implementation of .eos().
16915 (camel_stream_write_to_stream): Make it return an error code on
16917 (camel_stream_printf): Changed to return the number of bytes
16919 (camel_stream_available): Removed.
16921 * camel-stream-fs.h (enum CamelStreamFsMode): Removed. Changed to
16922 use unix modes and so forth (wasn't used for anything but new file
16923 creation and didn't work well either).
16925 * camel-stream-fs.c: Removed leading _'s for names. And removed
16926 some virtual method 'documentation'.
16927 (destroy): Dont try and close a closed/error fd. Only report
16928 error if close returns -1. Moved all the code to finalise(), and
16929 killed this function.
16930 (init_with_fd): Properly setup the seek offset, if it is a
16931 valid and seekable file descriptor.
16932 (init_with_fd_and_bounds): Use off_t for bounds, set bounds on the
16934 (init_with_name): Return error codes.
16935 (init_with_name_and_bounds): Ditto.
16936 (camel_stream_fs_new_with_name): REturn NULL object if it failed.
16937 (camel_stream_fs_new_with_name_and_bounds): Return NULL object on
16938 failure. Changed with_name* api's to take unix open style args
16940 (read): The bounded stream bounds checking seemed off, simplified
16942 (write): Implement bounds checking for writing, the comment was
16943 wrong, it could make sense to bound writing. Cleaned up a little.
16945 (eos): Removed. Use CamelStream's implementation now.
16946 (close): Reset the fd to -1, provide a warning for bad usage.
16947 (seek): Cleaned up. Changed the behaviour a little, the returned
16948 offset is the absolute position in the file, even in bounded
16950 (seek): Seek from end mirrors lseek() behaviour (reverse seeking).
16952 2000-04-25 NotZed <NotZed@HelixCode.com>
16954 * camel-stream-fs.h (struct _CamelStreamFs): Moved bounds and eof
16955 indicator to other parent classes.
16957 * camel-stream.c (camel_stream_printf): New utility
16958 function. Obvious use.
16960 * camel-stream-mem.c: Removed leading _'s from static func's.
16961 (camel_stream_mem_new_with_byte_array): Fixed for api changes, set
16962 the owner for the byte array to us.
16963 : Removed A bunch of gtk doc stuff for static (implementation) functions.
16964 (available): Removed.
16965 (write): Fixed the write implementation so that seek() works on a
16966 seekable memory stream, as expected. Seeking past the end of the
16967 buffer has unix semantics (filling with 0).
16968 (available): Removed.
16969 (write): Implement seekable stream bounded stream.
16970 (read): Implement seekable stream bounded stream.
16971 (close): Dont free the stream_mem if we're not the owner.
16972 (seek): Allow to seek beyond the end of memory area,
16973 implement bounds checking.
16974 (seek): Set errno on bad policy.
16976 * camel-stream-mem.h (struct _CamelStreamMem): Changed position to off_t.
16977 (new_with_buffer): Changed len to be a size_t.
16978 (set_buffer, set_byte_array): New interface functions.
16979 (struct _CamelStreamMem): Removed position, it is stored in the
16982 * camel-stream.h: Removed some of the seemingly random
16983 whitespace. Removed the available method (its not
16984 impelemented/useful enough).
16986 * camel-seekable-substream.c
16987 (init_with_seekable_stream_and_bounds): Remove the data_available
16988 stuff, it hasn't been properly implemented/finished, and may never
16989 work (unfortunately *sigh).
16990 (reemit_parent_signal): Removed part of the above change.
16991 (set_bounds): Removed (moved to seekable-stream).
16992 : Fixed up some of the generally unreadable indenting (sorry,
16993 wrapping at 80 characters with
16994 camels_really_long_function_names()
16995 just_doesnt_work_very_well_does_it().
16996 (available): Removed.
16997 (stream_seek): Fixup for object changes. Make sure we return -1
16998 if the parent stream can't seek.
17000 * camel-seekable-stream.c (ccamel_seekable_stream_set_bounds): New
17001 function to bound any seekable stream.
17003 (camel_seekable_stream_class_init): Implement an init function, to
17004 setup the stream bounds to unbound.
17006 * camel-seekable-stream.h (CamelSeekableStreamClass): New virtual
17007 method set_bounds for seekable streams.
17008 (CAMEL_STREAM_UNBOUND): New define for no bound.
17010 * camel-seekable-substream.h (struct _CamelSeekableSubstream):
17011 Removed sup_bound and inf_bound, moved to CamelSeekableStream (and
17012 renamed, and changed to off_t's).
17013 (new_with_seekable_stream_and_bounds): Use off_t as the bounds.
17014 (CamelSeekableSubstreamClass): Uh, why was the intialiser virtual?
17017 * camel-seekable-stream.[ch] (CamelSeekableStreamClass): Changed seek
17018 to accept an off_t as the offset.
17019 (struct _CamelSeekableStream): Renamed cur_pos to position and
17020 changed it to an off_t type.
17021 (enum CamelStreamSeekPolicy): Set to match the SEEK_* constants
17023 (get_current_position): Renamed to tell().
17025 * camel-stream-buffer.h: Commented out set_vbuf - never implemented.
17027 2000-04-25 Dan Winship <danw@helixcode.com>
17029 * camel-stream-buffer.c (_eos): only return TRUE if the parent is
17030 at eos AND the buffer has been exhausted
17032 * camel-mime-message.c: fix some incorrect macro usage that
17033 resulted in bogus casts
17035 2000-04-24 Dan Winship <danw@helixcode.com>
17037 * camel-mime-part-utils.c
17038 (simple_data_wrapper_construct_from_parser): fix a cut-and-pasto.
17040 * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): ref
17041 (and sink) the message stream if we're going to unref it later.
17042 Otherwise it could get destroyed while there are still substreams
17043 attached to it. This needs a cleaner solution.
17045 * camel.h: remove data-wrapper-repository.h include(s)
17047 2000-04-24 NotZed <NotZed@HelixCode.com>
17049 * camel-mime-message.c (construct_from_parser): Allow MESSAGE_END
17050 _or_ EOF as valid termination conditions.
17052 * providers/mbox/camel-mbox-summary.c (message_struct_new): Decode
17053 and then re-encode the addresses, so they are consistently
17056 * camel-mime-utils.c (header_decode_mailbox): Store the address in
17057 a _header_address. And try to get a comment-stored name if there
17059 (header_decode_address): Actually return an address.
17060 (header_to_decode): Renamed to header_address_decode()
17061 (header_mailbox_decode): New function to get a single mailbox.
17062 (header_mime_decode): Return the major/minor value, as
17064 (header_address_new, and friends): Whole bunch of utility
17065 functions for working with the address thingies.
17066 (header_decode_domain): Free the string header, and dont expand
17069 * camel.c (camel_init): No longer call
17070 data_wrapper_repository_init.
17072 * camel-medium.c (write_to_stream): Moved (back) to
17077 (get_header): Make all these abstract, and spit warnings if
17078 called. I guess it could manage the list, but well, it doesn't.
17080 * camel-medium.h (struct _CamelMedium): Dont store headers here,
17081 the implementor is the only one who knows their format.
17082 (CamelMediumClass): Changed header values to be void *'s. They
17083 need not be strings?
17085 * camel-simple-data-wrapper.c (construct_from_stream): And we're
17086 back. Set the output stream.
17087 (construct_from_parser): Moved to camel-mime-part-utils.
17089 * camel-mime-part-utils.c
17090 (camel_mime_part_construct_content_from_parser): Create the
17091 contents of multipart and simple messages.
17092 (camel_mime_part_construct_content_from_parser): Oops, this was
17093 totally screwed up, try creating the right cotnent on the right
17096 * camel-multipart.c (construct_from_parser): Moved to
17097 camel-mime-part-utils.
17098 (separate_part): Removed.
17100 * camel-mime-part.c (construct_from_stream): Back again! This now
17101 switches over to using a mime parser for any mime parts, only.
17102 (my_write_to_stream): Write our headers and so forth here.
17103 (add_header): Add header directly, parent class is abstract.
17104 (remove_header): Ditto.
17105 (set_header): Ditto.
17107 * camel-data-wrapper.c (camel_data_wrapper_construct_from_stream):
17109 (camel_data_wrapper_construct_from_parser): Moved to
17112 * camel-data-wrapper.h: Put back construct_from_stream.
17114 * camel-mime-part.h: Put construct_from_parser in here, the
17115 data-wrapper shouldn't know about mime. Ok, so now to undo half
17116 of the last hours changes ... duh.
17118 2000-04-23 Dan Winship <danw@helixcode.com>
17120 * camel-mime-utils.c (header_to_decode, header_mime_decode): fix
17121 some obvious minor bugs noted by -Wall.
17123 2000-04-23 NotZed <NotZed@HelixCode.com>
17125 * providers/pop3/camel-pop3-folder.c (get_message_by_number): Use
17126 construct_from_stream instead of set_input_stream().
17128 * camel-simple-data-wrapper-stream.c
17129 (camel_simple_data_wrapper_stream_construct): REmoved the destroy
17131 (wrapper_destroy_cb): Removed.
17133 * camel-simple-data-wrapper.h: Add prototype for _construct()
17136 * camel.c: Include unicode.h to kill a warning.
17138 * camel-data-wrapper.h (CameldataWrapperClass): Removed
17139 construct_from_stream virtual method.
17140 Removed get/set input stream.
17142 * data-wrapper-repository.[ch]: Removed&from build. Obsoleted?
17143 The justification as is follows: It is mixing storage
17144 protocol/format with message architecture. It really just doesn't
17145 serve any purpose, as each medium implementor will have to have its
17146 own type->handler mapping, and the only current implementor,
17147 mimepart has a very simple structure and no need for this.
17149 * camel-medium.c (write_to_stream): Moved here from most of the
17150 stuff in camel-mime-part. Well, the MEDIUM is the one that knows
17151 what the headers are, and the content is, let it write it out.
17153 * camel-mime-part-utils.c (camel_mime_part_construct_content):
17154 Copied from camel-mime-part.c, removed handling of message
17155 followon state (moved to camel-mime-message).
17156 (camel_mime_part_construct_content_from_parser): Renamed from
17158 (camel_mime_part_construct_headers_from_stream):
17159 (camel_mime_part_construct_content_from_stream):
17160 (camel_mime_part_store_stream_in_buffer): Removed. Replaced by
17161 the new construct from parser stuff.
17163 * camel-mime-message.c (construct_from_parser): Do
17164 construct_from_parser for mime-message.
17165 (_write_to_stream): Set the mime-version header for medium to
17166 write out, rather than writing it out ourselves.
17168 * camel-data-wrapper.c (set_mime_type_field): Ref the
17169 content_field when we get it?
17170 (construct_from_stream): Removed.
17171 (camel_data_wrapper_construct_from_stream): Changed to a helper
17172 function, creates a mime_parser, and constructs from that.
17173 (set_input_stream): Removed.
17174 (camel_data_wrapper_set_input_stream): Removed.
17175 (get_input_stream): Removed.
17176 (camel_data_wrapper_get_input_stream): Removed.
17178 * camel-mime-parser.c (camel_mime_parser_unstep): New function.
17179 Cause a subsequent call to mime_parser_step() to return the same
17182 * providers/mbox/camel-mbox-folder.c (_get_message_by_uid):
17183 Initial test code using the mime parser to construct the message.
17184 (_get_message_by_uid): Use construct_from_stream() instead of
17185 creating our own parser.
17187 * camel-mime-part.c (construct_from_parser): part constructor.
17188 (camel_mime_part_construct_content): Basically a simpler
17189 replacement for the datawrapper repository.
17190 (camel_mime_part_init): Set the default type to text/plain.
17191 (camel_mime_part_construct_content): Removed to
17192 camel-mime-part-utils.c
17193 (my_get_output_stream): Removed. The streeam is in the
17195 (my_get_content_object): Removed. The content object is stored in
17196 the medium. If none is there, the object wasn't created properly.
17197 (my_write_content_to_stream): Removed. The content object is the
17198 one that knows how to write itself out!!!!!!!!
17199 (my_write_to_stream): Remove the base header writing stuff - has
17200 been moved to camel-medium, where it belongs. This can just be
17201 used to check for mandatory headers.
17202 (my_construct_from_stream): Removed.
17203 (my_set_input_stream): What the hell, i'll remove this too.
17204 Nobody seems to understand how it differs from create from stream,
17205 and they both seem to serve the same purpose ...
17207 * camel-simple-data-wrapper.c (construct_from_parser): Initial
17208 implementation of a content constructor.
17209 (construct_from_stream): Removed! Job taken over by
17210 construct_from_parser.
17212 * camel-multipart.c (construct_from_parser): Multipart
17213 construction routine.
17214 (camel_multipart_init): Set the default multipart type to
17215 multipart/mixed. Duh, no subtype is not allowed anyway.
17216 (set_input_stream): REmoved. Replaced by construct_from_parser.
17218 2000-04-22 Dan Winship <danw@helixcode.com>
17220 * camel-multipart.[ch]: clean, document, etc.
17221 (camel_multipart_init): pick a prettier default boundary. Still
17222 need to deal with the larger problem
17224 2000-04-22 NotZed <NotZed@HelixCode.com>
17226 * camel-mime-message.h (struct _CamelMimeMessage): Removed
17227 send_date, and received_date, and replaced it with a time_t
17228 'date' (this is what the header is called), and date_offset to
17229 store the GMT offset of the date.
17231 * camel-mime-message.c (camel_mime_message_set_from): Update raw
17233 (_set_from): Removed.
17234 (_get_from): Removed.
17235 (camel_mime_message_get_from): Moved implementation here.
17236 (camel_mime_message_get_subject): Move implementation here.
17237 (_get_subject): Nuked.
17238 (camel_mime_message_set_subject): Handle utf-8 input, and also
17239 update raw header when changed.
17240 (_set_subject): Removed.
17241 (_set_received_date): Removed.
17242 (camel_mime_message_set_received_date): Removed.
17243 (_get_received_date): Removed.
17244 (camel_mime_message_get_received_date): Removed.
17245 (_get_sent_date): Removed.
17246 (camel_mime_message_get_sent_date): Removed.
17247 (camel_mime_message_get_date): New function to get the date as a
17249 (camel_mime_message_set_date): Set the date as a time_t/offset.
17250 (camel_mime_message_get_date_string): Get the date as a string.
17251 (camel_mime_message_init): Initialise the current date as
17252 'CMAEL_MESSAGE_DATE_CURRENT'.
17253 (_set_reply_to): Removed.
17254 (camel_mime_message_set_reply_to): Moved implementation here.
17255 This is still broken, reply-to can have multiple addresses.
17256 (_get_reply_to): Removed.
17257 (_set_field): Removed, no longer used anywhere.
17258 (_get_field): Also removed.
17259 (_init_header_name_table): Add the Date header.
17260 (process_header): Also handle snooping of Date header here.
17262 * camel-stream-filter.c (finalise): Unref the source stream on
17263 finalise, and also call the parent class (oops).
17265 * camel-mime-parser.c (camel_mime_parser_state): New function to
17266 get the current parser state.
17267 (camel_mime_parser_stream): Allow you to get the stream back from
17269 (camel_mime_parser_fd): Alternative to allow you to get the fd
17270 back from the mime_parser.
17271 (folder_scan_init_with_stream): Properly ref/unref the stream.
17272 (folder_scan_close): Properly unref the stream/close the fd on
17274 (folder_scan_init_with_fd): Close the old fd if there is one.
17276 * camel-data-wrapper.c (camel_data_wrapper_construct_from_parser):
17277 New method, construct a data wrapper from an initialised parser.
17278 (construct_from_parser): Empty implementation.
17280 * providers/mbox/camel-mbox-summary.c (message_struct_new):
17281 Convert subject line to unicode, before storing in the summary.
17282 (strdup_trim): Removed, no longer needed.
17284 * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): Ref
17285 the folder after setting it in the new message.
17287 * camel-mime-part.c (my_set_content_object): Have the headers
17288 follow the content-type change here too.
17289 (my_write_to_stream): Dont write content-type here, automatically
17290 stored in the headers ...
17291 (my_write_to_stream): Use header_disposition_format() to format
17292 the content-disposition header.
17293 (my_write_to_stream): Removed old code, all headers are now stored
17294 in the camel-medium level, always. Need to do the same with
17295 camel-mime-message i suppose ...
17296 (my_write_to_stream): Write the content using the parent class,
17297 not some weird function.
17298 (camel_mime_part_class_init): Dont override get_output_stream.
17299 (camel_mime_part_encoding_from_string): Bleh, make it
17302 * camel-mime-utils.c (header_content_type_is): Handle empty types.
17303 (header_encode_string): Start of an implementation of the rfc2047
17304 encoder. It does iso-8859-1, and us-ascii, and utf-8 (others get
17306 (rfc2047_encode_word): Convert a single word/string into rfc2047
17308 (quoted_encode): Different quoted-printable encoding for rfc2047
17309 encoding of headers.
17311 * gmime-content-field.c (gmime_content_field_write_to_stream): Use
17312 header_content_type_format() to format it.
17314 2000-04-21 NotZed <NotZed@HelixCode.com>
17316 * camel-mime-utils.h: Add prototype for header_param_list_free.
17318 * camel-recipient.c: New function to remove all the types of a
17319 recipient list. I think this whole object needs a major review.
17321 * camel-mime-message.c (camel_mime_message_class_init): Removed
17322 parse_header_pair override, override add_header instead.
17323 (_parse_header_pair): Renamed to add_header.
17324 (remove_header): Add this method, to make sure we keep upto date
17325 with removed headers too.
17326 (_set_field): If given a NULL value, clear it out.
17327 (_set_recipient_list_from_string): Constify.
17328 (set_header): Override set_header from camel_medium.
17329 (process_header): Local function to handle set/add/remove of each
17330 header we know about.
17332 * camel-mime-part.c (camel_mime_part_class_init): Removed
17333 parse_header_pair setup.
17334 (my_parse_header_pair): Moved into add_header(), removed.
17335 (my_set_disposition): Allow a NULL disposition to clear it.
17336 (my_set_content_id): Allow NULL content id to clear it.
17337 (remove_header): Track removed headers.
17338 (my_set_description): Allow NULL description to clear it.
17339 (my_set_content_MD5): Make sure we copy the md5 value, and allow a
17340 NULL value to reset it.
17341 (my_set_filename): Copy the filename.
17342 (my_set_header_lines): Removed. Nothing uses it, it doesn't
17343 actually serve any purpose.
17344 (camel_mime_part_set_header_lines): Ditto.
17345 (my_get_header_lines): Ditto.
17346 (camel_mime_part_get_header_lines): Ditto.
17347 (camel_mime_part_class_init): Remove *_header_lines setup.
17348 (camel_mime_part_init): Remove header_lines init.
17349 (my_finalize): Remove header_lines finalise.
17350 (my_write_to_stream): Write the headers here. This is just WRONG,
17351 camel_medium should be doing this.
17352 (my_get_output_stream): Kill a warning.
17353 (camel_mime_part_encoding_to_string): Ditto.
17354 (camel_mime_part_set_description): Unvirtualiase, use add_header()
17355 to do the processing.
17356 (my_set_description): Removed.
17357 (set_disposition): Renamed from my_set_disposition.
17358 (camel_mime_part_get_description): Get the descriptionf rom the
17360 (my_get_description): Removed.
17361 (my_set_filename): Removed.
17362 (camel_mime_part_get_filename): Get the parameter from the
17364 (camel_mime_part_encoding_from_string): Handle NULL string.
17365 (camel_mime_part_init): Remove reference to filename.
17366 (my_finalize): Dont free filename.
17368 * camel-mime-part.h (CamelMimePartClass): Removed
17369 parse_header_pair() method, it doesn't add anything that
17370 add_header() can't be used for.
17371 (CamelMimePartClass): Remove *_header_lines methods.
17372 (struct _CamelMimePart): Remove header_lines list.
17373 (struct _CamelMimePart): Removed filename attribute.
17375 * camel-medium.c (camel_medium_init): Init headers to null, not a
17377 (add_header): Append the headers as a list.
17378 (remove_header): Remove headers as a list.
17379 (get_header): Likewise for lookup.
17380 (free_header): Removed, no longer needed.
17381 (finalize): Free headers using header_raw_clear().
17382 (camel_medium_set_header): New function, to reset and override all
17383 values of a header with a new value.
17385 * camel-medium.h (struct _CamelMedium): Changed to use a
17386 header_raw struct rather than a hash table, to store headers
17387 (many headers can occur multiple times).
17389 * camel-mime-utils.c (header_raw_find_next): New function, allows
17390 you to find multi-valued header fields.
17391 (header_disposition_format): New function to format/create
17392 content-disposition header string.
17393 (header_param_list_format_append): Function to format parameter
17394 lists into a GString.
17395 (header_content_type_format): Function to format content-type into
17397 (header_set_param): allow NULL value to remove the parameter.
17398 (decode_token): Renamed from header_decode_token.
17399 (header_decode_token): New interface for external use.
17400 (quoted_decode): Made static to kill annoying warnings.
17401 (g_strdup_len): Killed, replaced with calls to g_strndup().
17402 (rfc2047_decode_word): Made static to kill warnings.
17403 (decode_coded_string): Terminated.
17404 (g_string_append_len): Made static to kill warnings.
17405 (header_decode_text): Made static to kill warnings.
17406 (header_decode_text): Constify.
17407 (rfc2047_decode_word): Constify.
17408 (header_param): Constify.
17409 (header_content_type_new): Copy the type/subtype strings.
17410 (header_param_list_decode): Made static.
17411 (header_param_list_format_append): Made static.
17412 (quoted_decode): Constify.
17413 (g_string_append_len): Constify.
17414 (header_token_decode): New function to decode a single token.
17416 * providers/mbox/camel-mbox-summary.c (header_write): Append a
17417 trailing \n when writing headers.
17418 (strdup_trim): Killed a warning.
17419 (camel_mbox_summary_set_uid): Make sure the next uid is at least 1
17420 higher than any existing one.
17421 (header_evolution_decode): Use header_token_decode to get the
17424 * camel-mime-parser.c (folder_scan_header): Strip the trailing \n
17425 of the end of all header lines.
17427 2000-04-20 NotZed <NotZed@HelixCode.com>
17429 * providers/mbox/camel-mbox-utils.[ch]: Removed.
17431 * providers/mbox/camel-mbox-parser.[ch]: Removed. Removed
17434 2000-04-20 Dan Winship <danw@helixcode.com>
17436 * camel-mime-utils.c (rfc2047_decode_word): use libunicode iconv
17437 functions rather than libc ones (since libc might not have them).
17438 (header_decode_date): add autoconfiscation on timezone code
17440 * camel.c (camel_init): call unicode_init ()
17442 2000-04-20 NotZed <NotZed@HelixCode.com>
17444 * providers/mbox/camel-mbox-summary.c (message_struct_new): Trim
17445 leading/trailing spaces off the raw headers.
17447 * MERGE NEW_PARSER branch into HEAD, fixed conflicts.
17449 * gmime-content-field.c (_print_parameter): Duh, removed again
17452 * camel-mime-utils.c (header_content_type_is): Constify.
17453 (header_content_type_unref): Killed a couple warnings.
17455 * camel-folder.c (_init): Removed more log crap.
17457 * providers/Makefile.am (SUBDIRS): Removed nntp, pending fixes for
17460 * providers/mbox/camel-mbox-folder.c (_get_message_by_number):
17461 Fixed for new summary interface. Added a warning for using this
17463 (_get_message_by_uid): Fixed for message new with session
17466 2000-04-19 Dan Winship <danw@helixcode.com>
17468 * camel-simple-data-wrapper-stream.c
17469 (camel_simple_data_wrapper_stream_get_type): This is a subtype of
17470 CamelSeekableStream, not CamelStream.
17472 * camel-seekable-substream.c: clean up a lot.
17473 (eos): When testing for end-of-stream, reset the parent position
17474 before testing if it is at end-of-stream, since either (a) it may
17475 have been seek'ed to eos by someone else, or (b) we may have been
17476 seek'ed away from eos and it hasn't been synced yet.
17478 * camel-medium.[ch] (camel_medium_add_header): const poison.
17479 (Belatedly goes with my change of 2000-02-23.)
17480 (camel_medium_init): Use g_strcase_{hash,equal} on the header
17483 2000-04-18 Dan Winship <danw@helixcode.com>
17485 * camel-mime-part.c (my_set_input_stream):
17486 * camel-data-wrapper.c (set_input_stream, set_output_stream): do
17487 better reference counting of streams so they actually go away
17490 * camel-log.[ch], *: Nuke camel log stuff. Replace calls to
17491 CAMEL_LOG_WARNING with calls to g_warning.
17493 * camel-data-wrapper.[ch]:
17494 * camel-simple-data-wrapper.[ch]:
17495 * camel-medium.[ch]: Clean, polish, document. Most of the gtk-doc
17496 comments added to camel-data-wrapper.c note serious problems that
17499 2000-04-17 Dan Winship <danw@helixcode.com>
17501 * camel-mime-message.[ch]: Remove the "session" field from
17502 CamelMimeMessage. Nothing uses it, about half of the existing
17503 calls to camel_mime_message_new_with_session pass NULL, and
17504 there's no obvious reason for it to be there.
17506 * providers/MH/camel-mh-folder.c:
17507 * providers/maildir/camel-maildir-folder.c:
17508 * providers/mbox/camel-mbox-folder.c:
17509 * providers/mbox/camel-mbox-utils.c:
17510 * providers/nntp/camel-nntp-folder.c:
17511 * providers/pop3/camel-pop3-folder.c: Use camel_mime_message_new
17512 instead of camel_mime_message_new_with_session.
17514 * camel-session.c (get_store_for_protocol_with_url): Set the
17515 exception if no provider is found.
17517 * camel-url.c: Add code to encode and decode %-escapes in URLs,
17518 and do some additional correctness-checking on URL syntax. From
17519 Tiago Antà o with modifications by me.
17521 2000-04-14 Chris Toshok <toshok@helixcode.com>
17523 * providers/Makefile.am (SUBDIRS): add nntp
17525 2000-04-14 Christopher James Lahey <clahey@helixcode.com>
17527 * providers/mbox/camel-mbox-folder.c: Fix switch statement.
17529 2000-04-14 Chris Toshok <toshok@helixcode.com>
17531 * providers/nntp/camel-nntp-folder.c (_exists): always return TRUE
17532 for now. we need to check the server response to make sure the
17534 (_get_message_by_uid): make sure to account for the \n we add to
17535 the string after every line.
17537 * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): function
17538 to get the headers using the XOVER command.
17539 (get_HEAD_headers): function to get the headers using the HEAD
17540 command on each message. slooooooow.
17541 (camel_nntp_get_headers): make this function use either XOVER or HEAD
17542 versions depending on whether or not the server extension is present.
17544 2000-04-14 Dan Winship <danw@helixcode.com>
17546 * camel-formatter.[ch]: This didn't belong in Camel. Move to mail/
17548 * Makefile.am, camel-types.h: remove references to
17551 2000-04-12 Matt Loper <matt@helixcode.com>
17553 * camel-folder-pt-proxy.c (_folder_open_cb): Print warning message
17554 for broken function.
17555 (_folder_close_cb): Same.
17557 2000-04-12 Miguel de Icaza <miguel@gnu.org>
17559 * Makefile.am (pthread_SRC): Use correct names for the pthread
17562 2000-04-10 Dan Winship <danw@helixcode.com>
17564 * providers/pop3/camel-pop3-store.c (pop3_connect): fix various
17565 bugs in APOP code (still untested) and some of the error cases.
17567 * camel-provider.h: Clarify what provider.protocol, provider.name,
17568 and provider.description should be.
17570 * providers/mbox/camel-mbox-provider.c:
17571 * providers/pop3/camel-pop3-provider.c:
17572 * providers/sendmail/camel-sendmail-provider.c:
17573 * providers/smtp/camel-smtp-provider.c: update protocols, names,
17576 * providers/mbox/camel-mbox-folder.c (_get_message_by_number):
17577 implement get_message_by_number for the mail fetch code.
17579 2000-04-09 Jeffrey Stedfast <fejj@stampede.org>
17581 * providers/smtp/camel-smtp-transport.c: reformatted to fit
17582 the standard indent format used by helix code
17584 2000-04-09 Dan Winship <danw@helixcode.com>
17586 * camel-movemail.c: New file with new function to dot-lock an mbox
17587 file and copy it to a safe private directory.
17589 2000-04-08 Christopher James Lahey <clahey@helixcode.com>
17591 * providers/smtp/.cvsignore: Added a .cvsignore file.
17593 2000-04-08 Dan Winship <danw@helixcode.com>
17595 * providers/sendmail/camel-sendmail-transport.c (_send_internal):
17596 actually record the pid returned by fork(). Noticed by clahey.
17598 * providers/smtp/camel-smtp-transport.c: #include <sys/param.h>
17599 for MAXHOSTNAMELEN. (This is a stopgap: some of the uses of
17600 MAXHOSTNAMELEN are wrong anyway...)
17602 2000-04-07 Jeffrey Stedfast <fejj@stampede.org>
17604 * providers/smtp/camel-smtp-transport.c: fixes to numerous bugs;
17605 should now build fine.
17606 * providers/Makefile.am: Readded smtp now that smtp builds without
17609 2000-04-20 NotZed <NotZed@HelixCode.com>
17611 * providers/mbox/camel-mbox-summary.c
17612 (camel_mbox_summary_next_uid): Public function to get the next
17613 uid, makes sure its saved to disk too.
17615 * camel-mime-part.c (my_finalize): Fix disposition crap with a
17617 (my_set_disposition): Likewise.
17618 (my_get_disposition): And here.
17619 (my_write_to_stream): And here, needs more cleanup.
17621 * providers/mbox/camel-mbox-folder.c (_append_message): Assign a
17622 new uid at this point.
17624 * gmime-content-field.c (gmime_content_field_write_to_stream):
17625 Make something up if we have an invalid/missing content type
17628 2000-04-19 NotZed <NotZed@HelixCode.com>
17630 * providers/mbox/camel-mbox-folder.c (_delete): Fixed completely
17631 broken switch() syntax, only compiled because errno is a macro on
17633 (_list_subfolders): Likewise.
17635 2000-04-18 NotZed <NotZed@HelixCode.com>
17637 * camel-mime-parser.c (folder_scan_init): init stream to null.
17639 * providers/mbox/camel-mbox-summary.c
17640 (CAMEL_MBOX_SUMMARY_VERSION): Moved to .c file, incremented.
17641 (index_folder): Changed to have index passed via the summary.
17642 (decode_string): Do a sanity check on the string size, so we dont
17643 visit g_malloc()'s friendly abort().
17645 * camel-folder-pt-proxy.c (camel_folder_pt_proxy_class_init):
17646 Removed reference to set_name.
17647 (_set_name): Removed.
17649 * providers/mbox/camel-mbox-utils.c
17650 (parsed_information_to_mbox_summary): Removed. Most of this file
17651 is about to be binned.
17653 * providers/mbox/camel-mbox-search.c (func_header_contains): Fixes
17654 for changes to summary interface.
17655 (struct _searchcontext): Remove pointer to message info, get it
17656 straight from the mboxsummary.
17657 (camel_mbox_folder_search_by_expression): New summary interface.
17658 (camel_mbox_folder_search_by_expression): Uh, the summary is not
17659 an object anymore (well not yet).
17661 * providers/mbox/camel-mbox-folder.c
17662 (camel_mbox_folder_class_init): Removed set_name init.
17663 (_set_name): Removed.
17664 (_open): Call new summary interface.
17665 (_close): Use new summary interface.
17666 (_create): Removed a summary object leak.
17667 (_get_message_count): New summary interface.
17668 (_get_uid_list): Use new summary interface. FIXME: this is leaky.
17669 (_get_message_by_uid): Use the new summary interface, some
17671 (_append_message): Totally changed, basically just appends the
17672 message directly, ignores the summary (for now), the summary will
17673 fix itself up if it needs to.
17674 (_check_get_or_maybe_generate_summary_file): Bye bye old code.
17675 (summary_get_message_info): Implement get_message_info again, for
17678 * camel-folder.c (camel_folder_class_init): Removed set_name
17680 (_set_name): Moved contents into _init.
17681 (_init): Perform the old functions of set_name here.
17683 * camel-folder.h: Removed the set_name internal interface.
17685 2000-04-14 NotZed <NotZed@HelixCode.com>
17687 * providers/mbox/camel-mbox-summary.[ch]: Completely replaced with
17690 * Makefile.am (libcamel_la_SOURCES): Removed
17691 camel-folder-summary.[ch].
17693 * camel-folder.h (struct _CamelFolder): Removed summary.
17694 (struct _CamelFolder): Changed flags to be 1 bit bitfields.
17696 * camel-folder-summary.[ch]: Class removed entirely.
17698 * camel-folder.c (camel_folder_get_summary): Removed.
17699 (camel_folder_summary_get_message_info): Moved from
17700 camel-folder-summary.c
17701 (camel_folder_summary_get_subfolder_info): Moved from
17702 camel-folder-summary.c
17704 * camel-mime-parser.c (folder_scan_step): Store the start of
17705 headers and start of from in the scan state.
17706 (camel_mime_parser_tell_start_headers): Query the start of the
17708 (camel_mime_parser_tell_start_from): Query the cached start of
17711 2000-04-13 NotZed <NotZed@HelixCode.com>
17713 * gmime-content-field.c (gmime_content_field_free): Removed this
17714 function. If its too dangerous to use, it shouldn't be here.
17715 (gmime_content_field_ref): Also ref the embedded content-type.
17716 (gmime_content_field_unref): Ditto to unref it.
17718 * camel-mime-utils.h: Add a refcount for content-type header.
17720 * camel-mime-utils.c (header_content_type_unref): Implement unref
17722 (header_content_type_ref): Implement ref for header content type.
17724 2000-04-12 NotZed <NotZed@HelixCode.com>
17726 * gmime-content-field.h: Changed to use a _header_content_type.
17727 Added type/subtype back for compatability with clients.
17729 * gmime-content-field.c: Basically a total rewrite, and now just a
17730 thin wrapper ontop of header_content_type.
17731 (_free_parameter): Got rid of it.
17732 (gmime_content_field_new): Use header_content_type_* functions.
17733 (gmime_content_field_set_parameter): Likewise.
17734 (_print_parameter): Blow away.
17735 (gmime_content_field_write_to_stream): Get details from the
17736 content_type field. Should check if it needs to escape chars in
17737 the paramter value.
17738 (gmime_content_field_get_mime_type): Likewise.
17739 (___debug_print_parameter): Get rid of this rather annoyingly
17741 (gmime_content_field_get_parameter): Simplified function.
17742 (gmime_content_field_construct_from_string): Fixed this to use a
17744 (gmime_content_field_is_type): New function to test if a type matches.
17745 (gmime_content_field_construct_from_string): Track type/subtype
17746 from subordinate content_type header struct.
17748 * gmime-rfc2047.[ch]: Removed. Unused.
17750 * camel-stream-b64.[ch]: Blown away more duplicated code.
17752 * Makefile.am: Removed camel-stream-b64.[ch], and
17755 * camel-mime-part.c (my_get_content_object): Replaced
17756 camel-stream-b64 with camel-stream-filter/camel-mime-filter-basic.
17757 (my_write_content_to_stream): Replaced camel-stream-b64 with the
17758 camel-stream-filter with an encoder.
17759 (my_get_content_object): Also implement quoted-printable decoding.
17760 (my_write_content_to_stream): Also implement quoted-printable
17762 (my_get_output_stream): Took out stream-b64 code (nothing's being
17763 executed yet anyway).
17765 * gmime-base64.[ch]: Blown away. Not used, dont need it.
17767 * camel-mime-utils.h: Added offset for this header. Records where
17768 it is in the source.
17770 * camel-mime-utils.c (header_raw_append_parse): Add offset
17771 parameter, to store where the header is stored in the stream.
17772 (header_raw_append): Added offset param.
17773 (header_raw_find): Return offset, if a pointer supplied for it.
17774 (header_raw_replace): Add offset param.
17775 (header_content_type_new): New function, to create an empty
17777 (header_content_type_set_param): Set a parameter in the
17779 (header_set_param): Generic header parameter setting function.
17780 (header_decode_string): Handle NULL input.
17782 * camel-mime-parser.c (camel_mime_parser_headers_raw): New
17783 function to get access to all the raw headers.
17784 (folder_scan_header): Keep track of the header start position, and
17785 store it when saving the header.
17787 2000-04-11 NotZed <NotZed@HelixCode.com>
17789 * camel-mime-utils.c: Moved a bunch of printf's to debug.
17791 * camel-mime-parser.c: Moved a bunch of printf's to debug.
17792 (folder_scan_header): Detect end of each header line using the
17793 last scanned char, and not the last scanned position.
17795 * camel-mime-filter-index.[ch]: Indexing filter. Indexes unicode
17796 sequences into ibex files.
17798 2000-04-09 NotZed <NotZed@HelixCode.com>
17800 * camel-mime-part.c: Dont include gmime-base64.h
17802 * camel-mime-filter-charset.c (complete): Implement the completion
17805 * camel-mime-parser.c (folder_scan_step): If we get to the end of
17806 the body data, check any filters for outstanding completion data.
17807 (camel_mime_parser_scan_from): Set whether we scan for "From "
17810 * camel-stream-filter.c (do_read): If we get to end of stream on
17811 the source, then call the filtering completion function to see if
17812 we have any more data to return.
17814 * camel-mime-filter-basic.c (filter): Implement quoted printable
17815 encoding and decoding filters.
17816 (complete): And the complete function as well.
17818 * camel-mime-utils.c (base64_encode_close): Also take an input
17819 buffer, allow closing of filters.
17820 (quoted_encode_step): First cut, simple quoted-printable encoder.
17821 Doesn't handle trailing spaces/tabs on end of line properly yet.
17822 (quoted_encode_close): Complete a quoted-encoding.
17823 (is_qpsafe): New type check, for quoted-printable safe characters
17824 (that do not need encoding). Thats all bits used in the type
17825 table! Rebuilt the types table.
17826 (header_content_type_is): Checks a content type against at
17827 type/subtype match.
17828 (header_content_type_param): Handle NULL content type pointer.
17830 2000-04-08 NotZed <NotZed@HelixCode.com>
17832 * camel-mime-filter-basic.c (filter): Implement the base64
17833 encoder. Problem is, there is no way to know when to close it.
17834 Close/Reset will have to provide the same args as filter, so it can
17835 flush remaining data *sigh*
17837 * camel-mime-utils.c (base64_encode_step): A rather complex base64
17839 (base64_step_close): Companion function to finish off the base64
17842 * camel-mime-part.c (my_write_content_to_stream): Changed to use
17843 camel_stream_write_to_stream().
17845 * camel-stream.[ch] (camel_stream_write_to_stream): From
17846 camel_stream_b64_write_to_stream(). Fixed some infinite loop
17847 bugs with error conditions.
17849 * camel-stream-b64.[ch] (camel_stream_b64_write_to_stream): Removed.
17850 This has nothing to do with stream-b64, so i've moved it to
17853 * camel-mime-utils.h: Add a comment about refcounting
17854 header_content_type struct.
17856 * Makefile.am: Added camel-stream-filter*.[ch].
17858 * camel-stream-filter.[ch]: Class to implement a generic
17859 (multipass) filter ontop of a stream. Only implements a read-only
17862 * camel-mime-parser.c (camel_mime_parser_filter_add): Ref the
17863 filter we just added.
17865 * Makefile.am: Added camel-mime-filter*.[ch].
17867 * camel-mime-filter-charset.[ch]: A filter to preform character set
17868 conversion (uses unicode_iconv).
17870 * camel-mime-filter-save.[ch]: A simple filter which will save all
17871 data directly to a file or file descriptor.
17873 * camel-mime-filter-basic.[ch]: Implements the basic mime filters,
17874 base64 and quoted-printable decoding (encoding not implemented yet).
17876 * camel-mime-filter.[ch]: A filtering class, which can filter streams
17877 of data without having to copy them. Simpler than stream classes,
17878 and can be plugged into a single stream class (when i write it).
17880 2000-04-07 Dan Winship <danw@helixcode.com>
17882 * providers/pop3/camel-pop3-store.c (pop3_connect): Clarify error
17884 (finalize): fix a bug in camel_exception usage
17885 (pop3_connect): Remember the password after asking for it the
17888 2000-04-07 NotZed <NotZed@HelixCode.com>
17890 * Makefile.am: Added camel-mime-parser/camel-mime-utils.
17892 * camel-mime-parser.c: Fast mime parser.
17894 * camel-mime-utils.c: Mime utility functions, and email header
17897 2000-04-07 NotZed <NotZed@HelixCode.com>
17899 * providers/Makefile.am: Removed smtp for now, its a long way from
17901 * providers/smtp/Makefile.in: Removed file that shouldn't have been
17904 2000-04-06 Matt Loper <matt@helixcode.com>
17906 * camel-folder-pt-proxy.c (_get_full_name): Remove exception param
17907 from get_full_name() called, since get_full_name() was changed to
17908 not have an exception in the last param (see dan's notes below).
17911 2000-04-06 Dan Winship <danw@helixcode.com>
17913 * camel-store.[ch]: Reorganize the folder-fetching methods and
17914 implement a folder cache so that multiple requests for the same
17915 folder will yield the same CamelFolder object (as long as it
17916 remains active). Includes some code to remove no-longer-active
17917 folders from the cache, but it doesn't get used since nothing is
17918 ever unref'ed in Camel right now...
17920 * providers/mbox/camel-mbox-store.c:
17921 * providers/pop3/camel-pop3-store.c: update for CamelStore
17924 * camel-folder.[ch]: Remove the (unused) CamelException argument
17925 from camel_folder_get_name and camel_folder_get_full_name.
17926 (camel_folder_set_name): make this go away since changing a
17927 folder's name after it has been created could result in it
17928 conflicting with a separately-issued folder.
17930 2000-04-05 Dan Winship <danw@helixcode.com>
17932 * g_url_new really wanted to take a CamelException. So, rename
17933 Gurl to CamelURL, g_url_* to camel_url_* (with camel_url_new
17934 taking an exception), and url-util.[ch] to camel-url.[ch]. Also
17935 force url->port to be numeric and remove camel_service_getport. (I
17936 was confused before: the URL RFC says the port must be numeric, so
17937 we don't want to do getportbyname.)
17939 2000-04-01 Dan Winship <danw@helixcode.com>
17941 * providers/mbox/camel-mbox-folder.c
17942 (_check_get_or_maybe_generate_summary_file): Compare
17943 mbox_file_size and mbox_modtime to the results of stat()ing the
17944 mbox file, not the summary file. Duh.
17945 (_close): Update the summary's mbox_file_size and mbox_modtime
17946 before writing it to disk.
17948 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_save,
17949 camel_mbox_summary_load): Wow. I must have been tired when I wrote
17950 this code. First, the comparison bug above. Second, it was using
17951 ntohs and htons instead of ntohl and htonl. Third, I was reading
17952 the status flag byte in two different places and thus getting out
17953 of sync. Fourth, it was writing out field_length bytes of each
17954 header field after having converted field_length to network byte
17955 order, resulting in lots of random crap being appended, and the
17956 summary files being huge. (Fortunately, since the size/modtime
17957 comparison was biffed, the garbage summary read from disk was
17958 always immediately discarded.)
17960 * providers/mbox/camel-mbox-parser.c (camel_mbox_parse_file): fix
17961 an off-by-one error that caused the last-used UID to be reused if
17962 the summary file was regenerated. (That one wasn't my fault. :-)
17964 2000-03-31 Dan Winship <danw@helixcode.com>
17966 * camel-stream-mem.c: implement unimplemented methods
17968 * gmime-content-field.c
17969 (gmime_content_field_construct_from_string):
17970 * data-wrapper-repository.c
17971 (data_wrapper_repository_get_data_wrapper_type):
17972 * camel-simple-data-wrapper.c (my_write_to_stream):
17973 * camel-mime-part.c (my_set_input_stream):
17974 remove debugging printf()s that no longer seem useful.
17976 2000-03-31 Matt Loper <matt@helixcode.com>
17978 * camel-formatter.c (text_to_html): Added "convert_newlines_to_br"
17979 boolean param, to give the option of not converting '\n's to <br>
17980 tags. This way, when we stick stuff in a <pre> tag, newlines stay
17983 2000-03-30 Matt Loper <matt@helixcode.com>
17985 * camel-formatter.c (handle_text_plain): Use <pre> tag to force
17986 the use of monospaced fonts.
17988 2000-03-30 Dan Winship <danw@helixcode.com>
17990 * camel-service.c (camel_service_getport): Add a htons in the
17991 default_number case, and document the fact that the function
17992 returns the port in network byte order.
17994 * providers/pop3/camel-pop3-store.c (pop3_connect): Revert
17995 Miguel's change. The port number bug was actually somewhere
17996 else, and the IP address copying code was fine already.
17998 2000-03-29 Miguel de Icaza <miguel@gnu.org>
18000 * providers/pop3/camel-pop3-store.c (pop3_connect): Add htons
18001 (port), and only copy 4 bytes for the IP address to prevent a DNS
18004 2000-03-28 Dan Winship <danw@helixcode.com>
18006 * camel-seekable-substream.c
18007 (camel_seekable_substream_new_with_seekable_stream_and_bounds):
18008 make this return a CamelStream rather than a
18009 CamelSeekableSubstream, because that's the way Gtk objects tend to
18012 * camel-service.c (camel_service_gethost,
18013 camel_service_getport): convenience functions to canonicalize
18014 the host and port values of a service's URL.
18015 * providers/pop3/camel-pop3-store.c: use them
18017 * providers/mbox/camel-mbox-folder.c
18018 (_check_get_or_maybe_generate_summary_file): Make this work when
18019 the inbox file doesn't yet exist.
18021 2000-03-27 Dan Winship <danw@helixcode.com>
18023 * providers/mbox/camel-mbox-folder.c (_append_message): uncomment
18024 the call to unlink the temp file: there's no way to tell
18025 camel_stream_fs to truncate a file, so reusing the same file was
18026 resulting in junk at the ends of messages.
18028 * camel-folder.[ch]: add delete_message_by_{number,uid}.
18030 * providers/pop3/camel-pop3-folder.[ch]: implement
18031 delete_message_by_uid. Add a close method to do expunging
18032 of deleted messages if requested.
18034 * providers/pop3/camel-pop3-store.[ch]: support for
18035 CamelPop3Folder::close. (You have to close the connection
18036 in order to expunge the folder, thus the store may be
18037 connected in the CamelService::is_connected sense when it
18038 is not actually connected to the server.) Also some bugfixes.
18040 2000-03-27 NotZed <NotZed@HelixCode.com>
18042 * providers/mbox/camel-mbox-folder.c (_append_message): Unref the
18043 output_stream when done, close doesn't do it.
18044 (_append_message): Clear all uid's from the appending messages, so
18045 they are reassigned proper unique id's.
18047 * gmime-utils.c (get_header_array_from_stream): Actually free the
18048 header, it is copied elsewhere.
18050 2000-03-26 NotZed <NotZed@HelixCode.com>
18052 * providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev): Added
18053 folder parameter to function. Fixed callers.
18054 (index_message): Index a message as it is assigned a unique id.
18056 * camel-mime-part.c (my_set_content_id): Make sure we malloc and
18057 copy the content_id, otherwise *poof*
18059 2000-03-25 NotZed <NotZed@HelixCode.com>
18061 * camel-medium.c (_finalize): Another leak, unref the content if
18064 * camel-recipient.c (camel_recipient_table_free): Plug another
18065 memory leak - actually free the recipient table.
18067 * camel-mime-message.c (_finalize): Plugged a memory leak with the
18070 * gmime-utils.c (_store_header_pair_from_string): A simpler, more
18071 debuggable and functionally identical header extraction function.
18073 2000-03-24 NotZed <NotZed@HelixCode.com>
18075 * gmime-content-field.c (gmime_content_field_set_parameter):
18076 Remove the hash table entry before freeing its key and data.
18078 2000-03-27 Dan Winship <danw@helixcode.com>
18080 * providers/Makefile.am (SUBDIRS): Add pop3.
18082 * providers/pop3/camel-pop3-store.c: keep separate input and
18083 output streams so the output doesn't end up being buffered.
18085 * providers/pop3/camel-pop3-folder.c (get_message_by_number):
18086 finish implementing this.
18088 2000-03-27 Michael Meeks <michael@helixcode.com>
18090 * camel-mime-part.c (my_set_disposition): fix so less broken.
18091 (my_finalize): remove dodgy disposition free.
18093 * camel-data-wrapper.c (my_set_mime_type_field): unref instead of
18096 2000-03-27 Dan Winship <danw@helixcode.com>
18098 * camel-service.c (camel_service_free_auth_types): new routine to
18099 free the data allocated by camel_service_query_auth_types.
18101 * providers/pop3/camel-pop3-store.c (free_auth_types): implement
18103 * camel-stream-mem.c (camel_stream_mem_new_with_buffer): rename
18104 camel_stream_mem_new_with_buffer to ..._with_byte_array and add a
18105 new ..._with_buffer that takes a char * rather than a GByteArray.
18107 * Remove CamelStreamBufferedFs, since CamelStreamBuffer makes it
18110 2000-03-25 Dan Winship <danw@helixcode.com>
18112 * camel-folder-summary.[ch]: change the CamelFolderSummary
18113 interfaces to allow partial summary queries (for dealing
18114 with very large folders). Remove the "extended_fields" from
18115 CamelFolderInfo and CamelMessageInfo: this is better dealt
18118 * providers/mbox/camel-mbox-summary.[ch]: Make CamelMboxSummary a
18119 subclass of CamelFolderSummary. Update interfaces for that. Remove
18120 the internal/external summary distinction. Remove the (unused) md5
18121 checksum in the folder summary. Change the summary file format
18122 (primarily to make it no longer byte-order dependent) and add a
18123 version number to it so it will be easier to change in the future.
18125 * providers/mbox/camel-mbox-folder.[ch]
18126 * providers/mbox/camel-mbox-search.c
18127 * providers/mbox/camel-mbox-utils.c: update for summary changes
18129 * camel-exception-list.def: add
18130 CAMEL_EXCEPTION_FOLDER_SUMMARY_INVALID
18132 2000-03-23 NotZed <NotZed@HelixCode.com>
18134 * providers/mbox/camel-mbox-provider.c: Added flag to provider
18135 initialisation, to match changed structure.
18137 2000-03-22 NotZed <NotZed@HelixCode.com>
18139 * camel-folder.[ch]: Added async search api.
18141 * providers/mbox/camel-mbox-search.c
18142 (camel_mbox_folder_search_by_expression): Changed to use an
18143 asynchronous interface.
18144 (camel_mbox_folder_search_cancel): Cancel function for async
18147 2000-03-23 Dan Winship <danw@helixcode.com>
18149 * camel-stream-buffer.c (camel_stream_buffer_read_line): Function
18150 to read one line of any size from a stream and return it in
18153 2000-03-22 Dan Winship <danw@helixcode.com>
18155 * camel-service.c (camel_service_query_auth_types): New function
18156 to query a service for the authentication protocols it supports.
18157 * providers/pop3/camel-pop3-store.c (query_auth_types): implement
18159 * camel-provider.c (camel_provider_scan): New function to
18160 scan the provider dir and return a list of all providers.
18162 * providers/pop3/camel-pop3-folder.c: fill this in partially
18163 * providers/pop3/camel-pop3-store.c: make camel_pop3_command
18164 return the text after "+OK"/"-ERR" and add a separate
18165 camel_pop3_get_additional_data to get the message body or
18166 whatever. Also make them take a CamelPop3Store rather than
18167 a CamelStreamBuffer.
18169 2000-03-22 Matt Loper <matt@helixcode.com>
18171 * camel-formatter.c (debug): Disabled some useless debug
18174 2000-03-21 Dan Winship <danw@helixcode.com>
18176 * providers/pop3: some initial bits of the POP3 provider, to
18177 make Matt happy. Incomplete, untested, etc.
18179 2000-03-21 bertrand <bertrand@helixcode.com>
18181 * providers/mbox/camel-mbox-summary.c
18182 (camel_mbox_summary_append_internal_to_external): copy the size field
18184 * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): initialize
18185 message_info to NULL
18187 * camel-folder-summary.h: added the size field.
18189 * providers/mbox/camel-mbox-summary.h:
18190 added the received_date field.
18192 * providers/mbox/camel-mbox-summary.c:
18193 documented all functions.
18195 * camel-folder-summary.h: name change and
18198 * providers/mbox/camel-mbox-search.c: update to
18199 conform to name change in the summary fields.
18201 2000-03-10 bertrand <bertrand@helixcode.com>
18203 * camel-service.h: cosmetic changes.
18205 2000-03-09 Dan Winship <danw@helixcode.com>
18207 * s/HelixCode/Helix Code, Inc./ in the copyrights
18209 2000-03-07 bertrand <bertrand@helixcode.com>
18211 * camel-formatter.c (handle_mime_part):
18212 plug mem leaks due to bad documentation
18213 of camel_content_field_get_mime_type
18214 (print_camel_body_part): idem
18215 (handle_multipart_alternative): idem
18217 * gmime-content-field.c (gmime_content_field_get_mime_type):
18221 * camel-mime-part.c (my_finalize): unref the
18222 content_input_stream if any.
18224 2000-03-06 bertrand <bertrand@helixcode.com>
18226 * camel-stream-fs.c (_seek): fix a bogus calculation
18227 in the return position.
18229 2000-03-05 bertrand <bertrand@helixcode.com>
18231 * camel-session.h: cosmetic fixes.
18233 * camel-stream-fs.c (_read):
18234 (_seek): fixed the current position so that it refers
18235 to the current position in the stream, not in its parent.
18237 2000-03-04 NotZed <NotZed@HelixCode.com>
18239 * providers/mbox/camel-mbox-search.c
18240 (camel_mbox_folder_search_by_expression): Ref the summary
18241 after we have got it.
18243 2000-03-04 bertrand <bertrand@helixcode.com>
18245 * camel-mime-part.c (my_write_content_to_stream):
18246 stream the raw content instead of nothing if the encoding
18249 * camel-stream-fs.c (_seek): handle eos more
18252 * camel-formatter.c (get_bonobo_tag_for_object):
18253 bonobo-goad-id is the good key to look for.
18254 (get_bonobo_tag_for_object): close the <object> tag.
18255 (get_bonobo_tag_for_object): the correct syntax for the
18256 to set a parameter inside an <object> tag is :
18257 <object classid="..."> <param name="uid" value="..."> <param ...>
18260 2000-03-03 bertrand <bertrand@helixcode.com>
18262 * providers/mbox/camel-mbox-folder.c (_get_message_by_uid):
18263 use set_input_stream instead of construct_from_stream
18264 to feed the message object.
18266 * camel-data-wrapper.c (my_write_to_stream): reset output stream.
18267 (my_set_input_stream): unref the previous input stream.
18268 use the set_output_stream for default behaviour.
18269 (my_set_output_stream): unref previous output stream.
18271 * camel-mime-part.c (my_write_content_to_stream): reset content
18272 object output stream.
18274 2000-03-03 NotZed <NotZed@HelixCode.com>
18276 * providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev): Make
18277 sure we open with create with a creation mask.
18279 2000-03-01 NotZed <NotZed@HelixCode.com>
18281 * camel-mime-part-utils.c
18282 (camel_mime_part_construct_content_from_stream): DO NOT assert on
18283 content type, we have fallback code 4 lines below it ... *sigh*
18285 2000-02-29 NotZed <NotZed@HelixCode.com>
18287 * Makefile.am (libcamelinclude_HEADERS): Added camel-stream-buffer
18290 * camel-stream-buffer.[ch]: Generic buffer which can be applied to
18293 2000-03-03 bertrand <bertrand@helixcode.com>
18295 * camel-formatter.c (handle_image): in the case
18296 of images, put the content object output stream
18297 in the url. This allows the message browser
18298 to show inline images.
18300 * camel-stream-b64.c (my_read_encode): fixed state
18303 2000-03-02 bertrand <bertrand@helixcode.com>
18305 * camel-stream-b64.c (my_read_encode): don't forget to
18306 set the state to 0 after 3.
18307 (my_read_encode): don't forget to encode, even in state 3.
18309 * camel-simple-data-wrapper.c: static functions are prefixed
18310 with my_ instead of _
18311 * camel-multipart.c: static functions are prefixed
18312 with my_ instead of _
18313 (my_write_to_stream): commented.
18314 (my_write_to_stream): warning in case the boudary is set
18315 but is a zero length string.
18317 * camel-mime-part.c (camel_mime_part_encoding_from_string):
18318 remove debug trace.
18320 * camel-mime-part.c: Replaced all static functions
18321 with name begining with _ by the same name begining
18322 with "my_" to prevent the possible conflicts
18323 with system symbols Dan warned us about.
18325 * camel-stream-b64.c (camel_stream_b64_write_to_stream):
18326 use CamelStreamB64 type for the input stream.
18328 * camel-mime-part.c (_get_content_object): remove
18330 (_write_content_to_stream): implement the b64
18331 encoding the new way (that is using camel_stream_b64)
18333 * camel-data-wrapper.c (my_write_to_stream):
18334 fix implementation so that it writes properly
18335 to the output stream even.
18337 * camel-stream-b64.c (camel_stream_b64_write_to_stream):
18338 fix implementation.
18340 2000-02-29 bertrand <bertrand@helixcode.com>
18342 * camel-stream-b64.c (camel_stream_b64_write_to_stream): new
18345 * camel-data-wrapper.c (_write_to_stream): default
18348 * gmime-utils.c (_store_header_pair_from_string):
18349 revert strange changes.
18351 * camel-stream-b64.c (my_read_decode): set eos to true when we
18352 have read the whole input stream.
18353 (my_reset): set eos to FALSE.
18355 2000-02-28 NotZed <NotZed@HelixCode.com>
18357 * camel-mime-part.c (_parse_header_pair): Dont free this either.
18359 * camel-medium.c (_remove_header): Ugh, dont free the header
18360 before we actually remove it.
18361 (_add_header): Ugh, dont free hashtable entries which may be
18362 duplicated (hash_insert _will_ reference that memory).
18364 * string-utils.c (string_trim): Trimming a 0-length string is not
18367 * camel-mime-message.c (_parse_header_pair): Fixed very broken
18368 memory handling of header_name/value.
18370 * providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev):
18371 Initialise end_of_last_message always.
18372 (camel_mbox_copy_file_chunk): Stop trying to read if we run out of
18373 data, rather than looping forever.
18374 (camel_mbox_write_xev): Use an open flag when opening with create.
18376 * camel-folder.c (camel_folder_search_by_expression): No, its not
18377 a fatal error to search on a non-searchable folder, you just dont
18379 (_open): Dont open an opened folder (i dont see why this is really
18380 a bug, but what the hell ...)
18382 * providers/mbox/camel-mbox-folder.c (_init): Set search cap on.
18383 (_open): Call parent class to perform open. Remove folder-open
18384 check to parent instead.
18385 (_create): open takes a creation mask, dont use umask to try and
18387 (_delete): Dont bother checking folder==NULL, its already been
18388 checked on the external interface (changed to an assertion, this
18389 would have to be a camel bug).
18390 (_delete_messages): Likewise.
18392 (_init): Dont go and clear all the paths and shit that the parent
18393 open just setup for us.
18394 (_delete_messages): Get rid of more umask stuff.
18395 (_append_message): Make sure we pass file mode to open with create.
18396 (_append_message): Cleaned up some indenting to make it readable.
18398 * camel-stream-b64.c (my_read_encode): Fixed a typo.
18400 * providers/mbox/camel-mbox-search.c: Changed to use e-sexp,
18401 rather than filter-sexp.
18403 2000-02-28 bertrand <bertrand@helixcode.com>
18405 * camel-stream-b64.c (my_read_encode): encoding
18408 2000-02-23 bertrand <Bertrand.Guiheneuf@aful.org>
18410 * camel-stream-b64.c: changed the __static
18411 suffix into a my_ prefix.
18412 (camel_stream_b64_set_mode): reset the persistent
18414 (my_read_decode): remove superfluous %
18416 * providers/mbox/camel-mbox-utils.c (camel_mbox_copy_file_chunk):
18417 fix exception description message.
18419 2000-02-24 Dan Winship <danw@helixcode.com>
18421 * camel-session.c: Add camel_session_get_transport_for_protocol.
18423 * camel-transport.h:
18424 * camel-transport.c: Add an abstract CamelTransport class.
18426 * providers/sendmail/*: A CamelTransport that uses sendmail
18429 2000-02-24 Dan Winship <danw@helixcode.com>
18431 * camel-folder.c: use CamelExceptions for run-time errors, not
18432 incorrect code. Don't bother validating that an object exists from
18433 inside one of its methods, since you couldn't have gotten there if
18434 it didn't. Fix some code style bugs.
18436 (_init): Rename init_with_store to init and add parent_folder,
18437 separator, and name arguments.
18438 (_set_name): Get separator from self, not parent_store now.
18441 * camel-store.c: Remove get/set_separator.
18443 * providers/mbox/: Update for above.
18445 2000-02-23 Dan Winship <danw@helixcode.com>
18447 * camel-medium.c (_finalize): Free the data in the headers hash
18449 (_add_header): g_strdup the header name and value when adding it.
18451 * camel-mime-part-utils.c
18452 (camel_mime_part_construct_headers_from_stream): Free the header
18453 data after calling camel_medium_add_header, since it will have
18454 g_strdup()ed it itself.
18456 2000-02-22 NotZed <NotZed@HelixCode.com>
18458 * providers/mbox/camel-mbox-search.c: Dont compile by default.
18460 * providers/mbox/Makefile.am: Fuck off the filter code.
18462 2000-02-22 bertrand <Bertrand.Guiheneuf@aful.org>
18464 * camel-stream-b64.c (read_decode__static):
18465 don't read the char if we reached the length
18466 of the output buffer. Hours lost on this
18469 * camel-folder.c (camel_folder_get_subfolder):
18470 (camel_folder_create):
18471 (camel_folder_delete):
18472 (camel_folder_delete_messages):
18473 (camel_folder_list_subfolders):
18474 (camel_folder_expunge):
18475 (camel_folder_get_message_by_number):
18476 (camel_folder_get_message_count):
18477 (camel_folder_append_message):
18478 (camel_folder_copy_message_to):
18479 (camel_folder_get_summary):
18480 (camel_folder_get_message_uid):
18481 (camel_folder_get_message_by_uid):
18482 (camel_folder_get_uid_list):
18483 Check folder state (open/close) and raise an
18484 exception if it is not ok.
18486 * providers/mbox/camel-mbox-folder.c (_create):
18487 create the file and the path with two different
18490 * camel-folder.c (_create): handle the case
18491 when the folder name starts with '/'
18493 * camel-exception.c (camel_exception_new): use
18494 (void) instead of () in decl.
18496 * camel-exception.h: cosmetic fixes.
18498 * camel-exception.c (camel_exception_init): new routine.
18499 Fix a bug in mail/message-list.c
18502 * camel-folder.h: cosmetic changes.
18504 * camel-stream-b64.c (reset__static): added a
18505 reset method. Thanks message-browser to find
18508 * providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): readd
18511 2000-02-21 bertrand <Bertrand.Guiheneuf@aful.org>
18513 * camel-formatter.c (lookup_unique_id):
18514 awful hack to test get_output_stream.
18515 * camel-stream-b64.[ch] :
18516 b64 encoding/decoding is now implemented as
18520 2000-02-21 bertrand <Bertrand.Guiheneuf@aful.org>
18522 * camel-seekable-substream.c (_reemit_parent_signal):
18523 emit "data_available" when parent stream emits it.
18526 2000-02-21 NotZed <NotZed@HelixCode.com>
18528 * providers/mbox/Makefile.am: Uh, fixed LIBADD again. What was
18529 there was never ever going to work, wasn't it tested?
18532 2000-02-21 Dan Winship <danw@helixcode.com>
18534 * camel-session.h: (struct _CamelSession): Add authenticator.
18536 * camel-session.c (camel_session_new): Add authenticator.
18537 (camel_session_query_authenticator): New function to query the
18538 session authenticator for password, etc, information.
18540 2000-02-21 Dan Winship <danw@helixcode.com>
18542 * camel-session.c: add CamelExceptions to several functions. Use
18543 camel_session_new to initialize the session and URL fields of
18544 created CamelStores as appropriate.
18549 * camel-service.c: Move the session and url (and associated
18550 functions) from CamelStore to CamelService. Add url_flags to
18551 CamelService so subclasses can specify which URL components
18552 are mandatory for them. Add camel_session_new for
18553 camel_session_get_store* to use.
18555 * providers/mbox/camel-mbox-folder.c:
18556 * providers/mbox/camel-mbox-store.c:
18557 * providers/mbox/camel-mbox-store.h: Update for above changes.
18559 * camel-exception-list.def: Once camel is being used for real,
18560 exceptions won't be renumberable. So renumber them now to make
18561 more room to add exceptions to the various categories later, and
18562 add a big warning message.
18564 2000-02-20 Dan Winship <danw@helixcode.com>
18566 * providers/mbox/Makefile.am: add libibex back to
18567 libcamelmbox_la_LIBADD
18569 2000-02-18 NotZed <NotZed@HelixCode.com>
18571 * providers/mbox/camel-mbox-search.h
18572 (camel_mbox_folder_search_by_expression): Added exception to call,
18575 * providers/mbox/camel-mbox-search.c
18576 (camel_mbox_folder_search_by_expression): Major changes, to use
18577 the sexp evaluator from filter/filter-sexp.c to implement the
18579 (func_body_contains): Changed to support multiple strings in 1
18580 command (results or'd together)
18582 * url-util.c (g_url_new): Fixed a typo (colon == 0 isn't right),
18583 and made it so full url's are absolute pathed (Dan, this is how it
18584 has to work!). Also, always include a path part, even if it is an
18587 2000-02-18 Dan Winship <danw@helixcode.com>
18589 * camel/camel-types.h: New header with the typedefs for all camel
18590 classes. Now the class headers can just include this and the
18591 header for the parent type. This makes it possible for
18592 CamelService to include a CamelSession without creating an
18596 * composer/e-msg-composer-attachment-bar.h:
18597 * mail/folder-browser.c:
18598 * mail/message-list.c: frob #includes to match the new reality
18600 2000-02-17 Dan Winship <danw@helixcode.com>
18602 * camel/camel-service.h:
18603 * camel/camel-service.c: Make camel-service us a Gurl internally.
18604 Remove the login/password interfaces and instead provide
18605 camel_service_connect_with_url. Add CamelExceptions
18607 2000-02-17 bertrand <Bertrand.Guiheneuf@aful.org>
18609 * camel/camel-formatter.c (handle_text_plain):
18610 (handle_text_html): use camel_stream_reset instead
18611 of seek. The formatter should be able to work
18612 with all streams, not only seekable streams.
18613 In the case where some provider implementation
18614 would not be able to provide a reset method
18615 to their stream, implementors would have
18616 to find a workaround.
18618 * camel/camel-session.c (camel_session_new): use
18619 (void) instean of () in function decl.
18621 * camel/camel-folder.c: ifdef async operation
18624 * camel/camel-seekable-stream.c (_seek): added a warning.
18625 (_reset): default implementation of reset for seekable
18628 * camel/camel-mime-message.h: set_received_date declaration fix.
18631 * camel/providers/mbox/camel-mbox-provider.c (camel_provider_module_init):
18632 use (void) instead of ().
18634 * camel/camel-stream.c (camel_stream_reset):
18635 new method for CamelStream.
18637 2000-02-17 Dan Winship <danw@helixcode.com>
18639 * camel/url-util.c (g_url_to_string): New function to convert
18640 a Gurl back into a char *.
18642 2000-02-17 bertrand <Bertrand.Guiheneuf@aful.org>
18644 * camel/camel-formatter.c (handle_text_plain):
18645 revamped so that it uses the output stream
18646 of the data wrapper
18647 (handle_text_html): ditto.
18650 * camel/camel-simple-data-wrapper.h:
18651 * camel/camel-simple-data-wrapper.c (camel_simple_data_wrapper_new):
18652 use (void) instead of ().
18653 (_get_output_stream): simple implementation.
18655 2000-02-16 bertrand <Bertrand.Guiheneuf@aful.org>
18657 * camel/camel-data-wrapper.c (_set_input_stream): ref input stream
18658 (_set_output_stream): ref output stream
18659 (_finalize): unref input and output streams
18661 * camel/camel-seekable-substream.c (_set_bounds): don't
18662 seek the begining of the substream.
18663 (_eos): fix eos condition testing.
18664 (_finalize): unref parent stream
18665 (_init_with_seekable_stream_and_bounds): ref parent stream
18667 * camel/gstring-util.c (g_string_equal_for_hash):
18668 (g_string_equal_for_glist): return type is int.
18671 * camel/camel.c (camel_init): use (void)
18674 2000-02-16 NotZed <NotZed@HelixCode.com>
18676 * providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): Added
18677 libfilter to link line (temporarily?). Required for
18680 2000-02-15 bertrand <bertrand@helixcode.com>
18682 * camel/camel-multipart.c (_localize_part):
18683 this routine replaces the _read_part routine
18684 and does not store the part in a buffer.
18685 (_set_input_stream): use the set_input_stream
18686 instead of the construct_from_stream.
18687 each bodypart is given an input stream.
18689 * camel/camel-mime-part-utils.c:
18690 include the data-wrapper-repository header.
18691 (camel_mime_part_construct_content_from_stream):
18692 use the set_input_stream instead of the
18693 construct_from_stream method.
18695 * camel/camel-seekable-substream.c (_set_bounds):
18696 cur position is set to 0 not to inf_bound.
18698 2000-02-15 bertrand <Bertrand.Guiheneuf@aful.org>
18700 * camel/camel-mime-part.c: include gmime-base64.h
18701 various compilation and runtime fixes.
18702 (_set_input_stream): store the input substream
18703 for the content object.
18705 * camel/camel-data-wrapper.h: declare the
18706 set/get function on input/output stream.
18708 * camel/camel-mime-part.c (_get_content_object):
18709 don't use a temporary mem stream.
18711 * camel/camel-seekable-substream.c (_seek):
18713 (_read): the substream can be unlimited in length
18715 * camel/camel-data-wrapper.c (camel_data_wrapper_class_init):
18716 set the get/set_input/output_stream methods.
18718 * camel/camel-multipart.c (_construct_from_stream):
18719 camel_stream_seek -> camel_seekable_stream_seek
18721 2000-02-14 Miguel de Icaza <miguel@gnu.org>
18723 * camel/providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): Add
18724 the unicode libraries as well.
18726 * camel/camel-provider.c (camel_provider_register_as_module): Add
18727 error reporting here. Desire to use Solaris increases. Hair loss
18728 in the last two hours: 5,400.
18730 * camel/providers/mbox/camel-mbox-provider.c
18731 (camel_mbox_get_provider): Renamed function.
18733 * camel/camel.h: All include files use camel/ now here.
18735 * camel/providers/mbox/Makefile.am: Drop all the dynamism from
18736 Camel, and make this a standard library.
18738 2000-02-14 bertrand <Bertrand.Guiheneuf@aful.org>
18740 * camel/gmime-utils.c (get_header_array_from_stream): use the
18742 (gmime_read_line_from_stream): ditto.
18744 * camel/camel-stream-fs.h (struct ): add the eof field
18747 * camel/camel-stream-fs.c (camel_stream_fs_init): set eof.
18748 (_read): set eof on end of file.
18749 (_eos): implemented.
18751 * camel/gmime-utils.c (get_header_array_from_stream):
18752 make a blocking version of the header parser.
18753 When the fs stream uses gnome-vfs, this should
18755 (gmime_read_line_from_stream): ditto.
18757 2000-02-11 bertrand <Bertrand.Guiheneuf@aful.org>
18759 * camel/camel-stream-fs.c:
18760 everywhere, when using the cur_pos field, do it
18761 on the CamelSeekableStream object.
18762 (_seek): small fix.
18764 * camel/camel-seekable-stream.c (camel_seekable_stream_seek):
18765 s/camel_stream_seek/camel_seekable_stream_seek/g
18767 * camel/camel-seekable-stream.h:
18768 (struct ): added a field to store the
18771 * camel/camel-seekable-stream.c (camel_seekable_stream_get_current_position):
18772 New function. Allows to get the current position
18773 of a seekable stream.
18776 2000-02-13 NotZed <notzed@zedzone.helixcode.com>
18778 * providers/mbox/camel-mbox-search.c: New file, implements the
18779 search api for mbox folders.
18781 * providers/mbox/Makefile.am: Link with ibex.
18783 * camel-folder.c (camel_folder_has_search_capability): Api
18785 (camel_folder_search_by_expression): Ditto.
18787 2000-02-12 NotZed <notzed@zedzone.helixcode.com>
18789 * providers/mbox/camel-mbox-folder.c (_set_name): Setup index
18791 (_init_with_store): Init index filename. Hmm, none of these
18792 names ever seem to get free'd (FIXME?)
18794 * providers/mbox/camel-mbox-folder.h: Add index file name.
18796 2000-02-12 NotZed <notzed@helixcode.com>
18798 * camel-folder.h: Add folder search functions.
18800 ** Created ChangeLog just for camel **
18801 - refer to ../ChangeLog for changes prior to this date.