1 2002-06-25 Jeffrey Stedfast <fejj@ximian.com>
3 * camel-gpg-context.c (gpg_hash_str): Return the option as
5 (gpg_ctx_parse_status): Decode more status information and keep
6 track of trust and such.
7 (gpg_ctx_op_complete): Make sure we aren't waiting for gpg to
8 write data to stdout (such as encrypted/decrypted data or a
10 (gpg_encrypt): Remove the fejj@stampede.org hard-coded value
11 (which had only meant to be for testing).
13 2002-06-24 Jeffrey Stedfast <fejj@ximian.com>
15 * camel-gpg-context.c (gpg_ctx_get_argv): Use --command-fd rather
16 than --passphrase-fd since what we really want is an interactive
17 mode (besides, --passphrase-fd requires a passphrase to be sent
18 before --status-fd will send a NEED_PASSPHRASE status message).
19 (gpg_ctx_parse_status): When we encounter a BAD_PASSPHRASE, tell
20 the session to uncache it.
21 (camel_gpg_context_set_always_trust): Implemented.
23 2002-06-23 Jeffrey Stedfast <fejj@ximian.com>
25 * camel-gpg-context.c (gpg_ctx_parse_status): Check for ERRSIG
27 (gpg_ctx_op_step): Don't try writing a passphrase unless our
28 operation requires it.
30 2002-06-22 Jeffrey Stedfast <fejj@ximian.com>
32 * camel-gpg-context.c (gpg_encrypt): Return -1 on error.
34 (gpg_sign): Again here.
35 (gpg_ctx_op_step): Only attenmpt to read from the status-fd if we
36 are not already 'complete'.
38 * camel-pgp-mime.c (camel_pgp_mime_part_encrypt): Flush the
41 2002-06-21 Jeffrey Stedfast <fejj@ximian.com>
43 * camel-gpg-context.[c,h]: New source files implementing the
44 CamelCipherContext class for gnupg.
46 * camel-pgp-context.c (camel_pgp_context_new): Return a
49 * camel-pgp-mime.c (camel_pgp_mime_part_decrypt): Take a
50 CamelCipherContext argument rather than a CamelPgpContext since we
51 now have a CamelGpgContext also.
52 (camel_pgp_mime_part_encrypt): Same.
53 (camel_pgp_mime_part_verify): Same.
54 (camel_pgp_mime_part_sign): Same.
56 2002-06-20 Jeffrey Stedfast <fejj@ximian.com>
58 * camel-digest-folder.c: Updated to support searching as well as
59 making it use CamelDigestSummary.
61 * camel-digest-summary.[c,h]: New class to handle the summary for
64 * camel-tcp-stream-ssl.c (set_errno): PR_IO_TIMEOUT_ERROR should
65 map to ETIMEDOUT and not EAGAIN.
66 (stream_connect): Reset the PR_Poll() timeout back to 2 minutes as
67 this wasn't the problem afterall.
69 2002-06-19 Not Zed <NotZed@Ximian.com>
71 * camel-mime-parser.c (folder_scan_drop_step): Drop back to
72 initial state if we came from eof state.
74 2002-06-19 Jeffrey Stedfast <fejj@ximian.com>
76 * camel-tcp-stream-ssl.c (stream_connect): Set the poll timeout to
77 be PR_INTERVAL_MIN, this one shouldn't need to be 2 minutes (plus
78 it blocks my connection at home for far too long).
80 * providers/imap/camel-imap-folder.c (imap_refresh_info): Make
81 sure we hold the command_lock before accessing current_folder.
82 (imap_append_online): Same.
83 (imap_transfer_online): Same.
85 * providers/imap/camel-imap-store.c (delete_folder): We need to
86 hold the command_lock before we can set the current_folder to
88 (rename_folder): Same.
89 (get_folder_info_online): We need to make sure we hold the
90 command_lock in order to use current_folder.
93 2002-06-19 Jeffrey Stedfast <fejj@ximian.com>
95 * providers/smtp/camel-smtp-transport.c (smtp_connect): Don't
96 bother trying to authenticate (and thus don't throw up an error
97 dialog) unless the server is an ESMTP server and supports
100 * camel-sasl-plain.c: Change the user-friendly name to PLAIN, this
101 is what it should be. Not "Password" because user's immediately
102 think that they need authentication when they see "Password" even
103 if they don't need it at all.
105 2002-06-17 Jeffrey Stedfast <fejj@ximian.com>
107 * camel-vee-folder.c (camel_vee_folder_add_folder): Update the
108 freeze state of the new source folder.
109 (camel_vee_folder_remove_folder): Undo any freeze state that we
110 have imposed on this source folder.
112 2002-06-14 Jeffrey Stedfast <fejj@ximian.com>
114 * camel-vee-folder.c (vee_freeze): Freeze source folders.
115 (vee_thaw): Thaw all source folders. Fixes bug #24317.
117 * providers/imap/camel-imap-folder.c (imap_sync_online): Unlock
118 the command_lock after each UID STORE command so that other
119 (probably more important) threads can send their requests.
122 * camel-disco-diary.c:
123 * camel-index-control.c:
127 * camel-tcp-stream-ssl.c:
128 * camel-text-index.c: Fixed compiler warnings.
130 * camel-multipart-signed.c: Updated to use ctx->sign_protocol
131 rather than ctx->protocol.
133 * camel-cipher-context.h: Add an ecnryption protocol member.
135 * camel-pgp-context.c (camel_pgp_context_init): Set the encryption
138 2002-06-11 Not Zed <NotZed@Ximian.com>
140 * camel-vtrash-folder.c (camel_vtrash_folder_class_init): Our
141 parent class is camel_vee_folder, not camel_folder, fix setting of
142 parent folder (unused anyway, but removes a run-time warning).
144 2002-06-07 Not Zed <NotZed@Ximian.com>
146 * camel-pgp-context.c (camel_pgp_context_init): Duh! The protocol
147 is application/pgp-signature. TODO: need to have a signed and an
148 encrypted protocol specified separately.
150 2002-06-06 Not Zed <NotZed@Ximian.com>
152 * camel-folder-thread.c (thread_summary): Do the work here.
153 (camel_folder_thread_messages_remove): Implement. Remove some
154 uid's from the tree. Disalbe from build, for now.
155 (remove_uid_node_rec): Actually do the work.
156 (camel_folder_thread_messages_add): Implement. Add some summary
157 items to the tree. Disable from build though.
158 (camel_folder_thread_messages_apply): Make a thread tree built
159 using camel_folder_thread_new() map to a new set of uids,
160 preserving some order. Meant primarily to manage deleted + added
161 uids in a user-friendly manner.
163 2002-06-09 Jeffrey Stedfast <fejj@ximian.com>
165 * camel-multipart-signed.c (camel_multipart_signed_verify): Use
166 CAMEL_EXCEPTION_SYSTEM rather than '1' for clarity.
168 2002-06-07 Jeffrey Stedfast <fejj@ximian.com>
170 * camel-tcp-stream-ssl.c (stream_connect): Up the timeout on the
171 connect code to 2 minutes.
173 2002-06-05 Dan Winship <danw@ximian.com>
175 * camel-mime-utils.c (header_decode_mailbox): Parse
176 "From: Dan Winship <danw>" (with no domain) in the way the sender
177 meant it, even though it's completely wrong.
179 2002-06-04 Not Zed <NotZed@Ximian.com>
181 * providers/local/camel-local-provider.c: Remove the
182 CONF_DEFAULT_PATH entry, as this is handled by the url config
183 stuff. This made it basically impossible to configure any local
186 * providers/local/camel-local-folder.c (local_refresh_info): Force
187 a refresh. Should work for all local folders to force them to
190 * providers/local/camel-maildir-folder.c (maildir_refresh_info):
191 Removed, moved into camel-local-folder.
193 * providers/local/camel-mh-summary.c (mh_summary_next_uid_string):
194 Once we assign or get a uid, tell the summary of this, so the next
195 uid we get will be higher than any previously.
197 * camel-object.c (camel_object_ref, camel_object_unref): I got
198 sick of casting, these now take void * like they should, and
199 perform their own run-time type checking.
201 * providers/local/camel-mh-store.c (recursive_scan): Changed to
202 use stat, not lstat (*shrug* maybe someone wants to softlink their
206 (inode_free): Copied from camel-maildir store (should put into
207 camel-local-store or utils?).
208 (recursive_scan): Changed to check for re-visiting inodes. Also,
209 it builds the tree itself, rather than using folder_info_build.
210 (add_folder): Changed to folder_info_new.
211 (recursive_scan): Properly honour the recursive flag. Also,
212 lookup unread count from folder.
213 (folder_info_new): Init unread message count to -1, since we dont
215 (folder_info_new): Take the name as an argument, and perform the
217 (folders_update): Util func to add/remove folders from .folders
218 file. I'm assuming its sorted.
219 (get_folder): Add the folder to .folders if we created a new one,
221 (delete_folder): Remove from .folders, etc.
222 (folders_scan): If we have a .folders file, read and use that
224 (recursive_scan): Handle scanning from a particular directory
226 (rename_folder): Implement so we can track any changes to the
227 .folders file if its turned on.
229 ** Applied patch below from Greg Hudson.
231 2002-05-10 Greg Hudson <ghudson@mit.edu>
233 * camel-mh-store.c (get_inbox, get_folder_info, recursive_scan,
234 add_folder): Implement support for MH stores.
236 * camel-mh-summary.c (mh_summary_check, sort_uid_cmp): Sort MH
237 messages by message number (uid), like we sort maildir messages by
240 * camel-local-provider.c (mh_provider): Turn on source and store
243 2002-06-03 Not Zed <NotZed@Ximian.com>
245 * camel-vee-folder.c (camel_vee_folder_add_folder):
246 (folder_changed_change):
247 (folder_changed_remove_uid):
248 (folder_changed_add_uid):
249 (vee_folder_build_folder): Check that any unmatched operation is
250 not concerning any vfolder. Other vfolders should never be part of any
251 unmatched handling. For #24615, and others probably.
253 2002-06-02 Not Zed <NotZed@Ximian.com>
255 * camel-sasl.c (camel_sasl_new):
256 (camel_sasl_finalize): setup/free the mech string.
258 * camel-sasl.h: Added 'mech' mechanism string.
260 2002-06-01 Not Zed <NotZed@Ximian.com>
262 * providers/imap/camel-imap-folder.c (imap_getv): Implement. Only
263 the object_description arg.
264 (camel_imap_folder_get_type): Init parent_class holder.
266 * providers/local/camel-local-folder.c (local_getv): Implement,
267 object_description arg.
269 * camel-folder.c (folder_getv): Implement, add a bunch of args you
270 can get -> camel_folder_get_unread_count etc will be going RSN i
272 (camel_folder_finalize): Free cached description string.
274 * camel-object.c (cobject_getv): Implement
275 CAMEL_OBJECT_ARG_DESCRIPTION, just return the classname of the
280 (camel_object_set): Take object = void *, to simplify usage.
281 (camel_object_setv): Removed unecessary locals.
282 (camel_object_getv): Same.
283 (camel_object_free): New method, free an arg, upto implementations
284 whether args are static/const or not.
285 (cobject_free): Implement a dummy do nothing free.
287 2002-05-31 Not Zed <NotZed@Ximian.com>
289 * camel-vee-folder.c (camel_vee_folder_get_location): new function
290 to get the real location (folder) (and uid) of a vfolder object.
291 Using the folderinfo, since we already have it, maybe it should
294 2002-05-31 Jeffrey Stedfast <fejj@ximian.com>
296 * providers/imap/camel-imap-folder.c (get_content): When the part
297 is a multipart/signed, make sure to free the part_spec before
298 returning (the other types already did this properly).
300 * providers/imap/camel-imap-message-cache.c
301 (camel_imap_message_cache_get): Free the path buffer when we're
304 * providers/imap/camel-imap-folder.c (imap_update_summary): Free
305 the final tagged response buffer.
307 * providers/imap/camel-imap-command.c (imap_read_untagged): If we
308 fail to read a literal, free the temporary string buffer.
310 * providers/imap/camel-imap-folder.c (imap_rescan): Revert my fix
311 from the other day since camel_imap_command_response() doesn't
312 guarentee that resp will be set to NULL on error.
314 * camel-data-cache.c (camel_data_cache_get): If we fail to be able
315 to create a stream to insert into the cache, then free the 'real'
318 2002-05-30 Not Zed <NotZed@Ximian.com>
320 * camel-cipher-context.h: Added a protocol field for users to use.
322 * camel-stream-filter.c (do_read): Sigh, the pre-size is READ_PAD
323 not READ_SIZE. Big difference.
324 (READ_PAD): Bumped upto 128 from 64, so we can fit a typical line
327 * providers/imap/camel-imap-folder.c (get_content): Changed to
328 load multipart/signed as an opaque block into the right kind of
331 * camel-multipart.h (struct _CamelMultipart): Removed the boundary
332 field. It wans't actually used anywhere.
334 * camel-seekable-substream.c
335 (camel_seekable_substream_new_with_seekable_stream_and_bounds):
336 Shortened this stupidly long name to just :new(), its the only way
337 its ever used. Fixed all callers.
339 * camel-multipart-signed.[ch]: new wrapper for multipart/signed
340 types. We need to treat the entire content as a blob of data for
341 transport purposes. This also cleans up a lot of the sign/verify
344 * camel-mime-part-utils.c
345 (camel_mime_part_construct_content_from_parser): Just call
346 camel_multipart_construct_from_parser for multipart parts, also
347 use a multipart_signed for multipart/signed types.
349 * camel-multipart.c (camel_multipart_construct_from_parser): New
350 virtual function for multiparts to buld themselves.
351 (construct_from_parser): Implement for normal multiparts.
352 (toplevel): Got rid of a warning, it'll never be an abstract
355 * camel-pgp-context.c (pgp_hash_to_id):
356 (pgp_id_to_hash): Implement.
357 (camel_pgp_context_init): Init the pgp protocol specifier.
359 * camel-cipher-context.c (camel_cipher_id_to_hash):
360 (camel_cipher_hash_to_id): Util virtual methods to handle the
363 * camel-mime-filter-canon.[ch]: A new filter, end/start of line
364 canonicalisation filter. Can escape "From " and strip trailing
365 whitespace, and canonicalise the end of line to crlf or to lf.
367 2002-05-29 Not Zed <NotZed@Ximian.com>
369 * camel-multipart.h (struct _CamelMultipart): Removed the
370 'parent', nothing used it, anywhere. Cleaned up some formatting
373 2002-05-30 Jeffrey Stedfast <fejj@ximian.com>
375 * providers/imap/camel-imap-store.c (camel_imap_store_readline):
376 On error, don't leak the GByteArray buffer.
378 * providers/imap/camel-imap-folder.c (imap_rescan): Free the
379 response before checking for errors. I'm not sure this'll actually
380 fix the memory leak here, but it might? Certainly can't hurt.
382 * camel-block-file.c (camel_block_file_finalise): Destroy the
385 2002-05-29 Jeffrey Stedfast <fejj@ximian.com>
387 * providers/imap/camel-imap-store.c (connect_to_server): Only free
388 the LOGOUT response if it is non-NULL.
390 2002-05-28 Not Zed <NotZed@Ximian.com>
392 * providers/local/camel-maildir-folder.c (maildir_refresh_info):
393 Implement. Run a summary check to update for any newly arrived
396 * providers/local/camel-maildir-store.c (scan_dir): If we have a
397 folder, execute a refresh_info on it, to suck in any new stuff.
399 2002-05-28 Jeffrey Stedfast <fejj@ximian.com>
401 * camel-filter-driver.c (camel_filter_driver_log): Use the
402 CamelMessageInfo rather than the CamelMimeMessage because the
403 message may not have been loaded (thus NULL).
405 2002-05-27 Jeffrey Stedfast <fejj@ximian.com>
407 * providers/smtp/camel-smtp-transport.c (connect_to_server): On
408 connection failure, unref the tcp stream.
410 * providers/pop3/camel-pop3-store.c (connect_to_server): On
411 connection failure, unref the tcp stream.
413 * providers/imap/camel-imap-store.c (connect_to_server): On
414 connection failure, unref the tcp stream.
416 * providers/nntp/camel-nntp-store.c (nntp_store_query_auth_types):
417 Our parent class is no longer CamelRemoteStore.
418 (nntp_store_init): Same.
419 (camel_nntp_store_get_type): Here too.
420 (nntp_connect): Rewritten to try to connect via SSL. Also remove
421 code using CamelRemoteStore.
422 (camel_nntp_command): Don't call camel_remote_store_connected().
424 2002-05-24 Jeffrey Stedfast <fejj@ximian.com>
426 * providers/imap/camel-imap-folder.c (content_info_get_part_spec):
427 Helps if we allocate enough space here. Also, start smoking the
428 same purple flavoured IMAP crack when counting parts (parts don't
429 count if their parent part is a message/* part with a parent
430 part). Fixes bug #25260.
432 2002-05-24 Jeffrey Stedfast <fejj@ximian.com>
434 * providers/imap/camel-imap-command.c (imap_read_untagged): Use
435 the new readline function.
437 * providers/imap/camel-imap-store.c (connect_to_server): Use the
438 new camel_imap_store_readline() function which doesn't suck quite
439 as bad as the original camel_remote_store_recv_line() function.
440 (camel_imap_store_readline): New function to replace
441 camel_remote_store_recv_line(). This function is at least safe
442 with embedded nul chars. Not that any of our callers use it
445 2002-05-24 Jeffrey Stedfast <fejj@ximian.com>
447 * providers/imap/camel-imap-store.c (connect_to_server): Added
448 some NULL protection fixes.
450 2002-05-22 Jeffrey Stedfast <fejj@ximian.com>
452 * camel-remote-store.c: Removed from the build. Glory glory
455 * camel-disco-store.c: Updated to inherit from
456 CamelStore rather than CamelRemoteStore.
458 * providers/imap/camel-imap-command.c (imap_command_start): Don't
459 use the camel-remote-store shit to send a string. Just use
460 camel_stream_printf for chrissakes.
462 * providers/imap/camel-imap-store.c: Updated to not depend on
463 CamelRemoteStore and to handle STARTTLS.
464 (imap_disconnect_online): Unref the streams.
465 (imap_keepalive): Removed.
466 (camel_imap_store_connected): New function to replace
467 camel_remote_store_connected().
468 (camel_imap_store_finalize): Unref the streams.
469 (camel_imap_store_recv_line): New function to replace
470 camel_remote_store_recv_line().
471 (imap_get_capability): Renamed from connect_to_server
472 (connect_to_server): New function to try and connect to the
474 (connect_to_server_wrapper): New wrapper function around
475 connect_to_server that takes the ssl modes into consideration.
476 (query_auth_types): Don't bother calling our parent's
477 implementation of query_auth_types() since CamelDiscoStore doesn't
479 (imap_get_name): New method to implement CamelService::get_name
481 2002-05-18 Not Zed <NotZed@Ximian.com>
483 * camel-search-private.c (camel_utf8_getc): If we get an invalid
484 start char, just ignore it and goto the next character.
486 2002-05-16 Jeffrey Stedfast <fejj@ximian.com>
488 * providers/imap/camel-imap-store.c (get_folder_offline): Don't
489 call some retarded function to simply set an exception.
491 * camel-filter-search.c (get_label): New e-sexp callback function
492 to get a user_tag label value.
494 2002-05-15 Jeffrey Stedfast <fejj@ximian.com>
496 * providers/imap/camel-imap-utils.c
497 (imap_parse_namespace_response): New function to parse a NAMESPACE
499 (imap_namespaces_destroy): New function to destroy the returned
500 structure from the above function.
502 2002-05-15 Jeffrey Stedfast <fejj@ximian.com>
504 * camel-service.c (service_setv): Only reconnect if we are already
505 connected, if we are in a disconnected state then no need to
508 * providers/imap/camel-imap-folder.c (get_content): If the
509 part_spec is an empty string for a leaft part, use "1" since we
510 don't actually want to get the raw message headers too.
512 2002-05-15 Not Zed <NotZed@Ximian.com>
514 * providers/imap/camel-imap-store.c (refresh_folder_info): removed.
515 (imap_store_refresh_folders): Copy the folders first, then refresh
516 them, outside of the cache_lock, which could cause deadlocks
517 because of a workaround for crappo exchange.
518 (imap_disconnect_online): Dont pass an exception to LOGOUT
519 command. The required response 'BYE' always sets an exception
520 when we call LOGOUT. This also interfered with a lot of other
521 processing causing partial failures and messed up offline/online
524 * camel-disco-folder.c (disco_prepare_for_offline): Do progress
527 2002-05-14 Jeffrey Stedfast <fejj@ximian.com>
531 * providers/imap/camel-imap-folder.c (content_info_get_part_spec):
532 New function to take a CamelMessageContentInfo and generate a
533 part-specification string.
534 (get_content): Stop passing around part_spec strings and use
535 content_info_get_part_spec instead.
537 * camel-folder-summary.c (camel_content_info_dump): Made this into
538 a public debugging function.
540 * providers/imap/camel-imap-utils.c (imap_parse_body): Make sure
541 to set the parent of any message/rfc822 subparts.
543 2002-05-13 Jeffrey Stedfast <fejj@ximian.com>
545 * providers/imap/camel-imap-folder.c (imap_get_message): Previous
548 2002-05-13 Jeffrey Stedfast <fejj@ximian.com>
550 * providers/imap/camel-imap-store.c (camel_imap_store_class_init):
551 Overload the setv/getv CamelObject virtual methods.
552 (imap_setv): Implemented.
553 (imap_getv): Implemented.
555 2002-05-13 Dan Winship <danw@ximian.com>
557 * camel-folder.c (camel_folder_append_message): Add a "char
558 **appended_uid" argument, for the caller to optionally pass in a
559 variable to receive the UID of the appended message (if the
561 (camel_folder_transfer_messages_to): Likewise, add "GPtrArray
563 (transfer_messages_to): Update default implementation to handle
566 * camel-disco-folder.c (disco_append_message,
567 disco_transfer_messages_to): Update for API changes.
569 * camel-disco-diary.c (camel_disco_diary_replay): Update the
570 diary's temporary uid->real uid map when replaying appends and
573 * providers/imap/camel-imap-folder.c (imap_append_offline,
574 imap_append_online, imap_transfer_offline): Pass back the new
575 UIDs, when requested and available.
576 (imap_append_resyncing): Pass back the new UIDs when requested and
577 available. Remove the diary uidmap managing code since
578 CamelDiscoDiary can handle that itself now.
579 (imap_transfer_online, imap_transfer_resyncing): Update for new
580 APIs, but don't actually pass back the new UIDs yet. (It's tricky
581 since the COPYUID response may not be in the same order as the
584 * providers/local/camel-maildir-folder.c (maildir_append_message):
585 Pass back the new UID if requested.
587 * providers/local/camel-mbox-folder.c (mbox_append_message):
590 * providers/local/camel-mh-folder.c (mh_append_message): Likewise.
592 * providers/local/camel-spool-folder.c (spool_append_message):
595 * camel-digest-folder.c (digest_append_message,
596 digest_transfer_messages_to): Update for API changes.
598 * camel-filter-driver.c (camel_filter_driver_filter_message,
599 do_copy, do_move): Update for API changes.
601 * camel-vee-folder.c (vee_append_message,
602 vee_transfer_messages_to): Likewise.
604 * camel-vtrash-folder.c (vtrash_append_message,
605 vtrash_transfer_messages_to): Likewise.
607 2002-05-13 Not Zed <NotZed@Ximian.com>
609 * camel-folder-thread.c
610 (camel_folder_thread_messages_new_summary):
611 (camel_folder_thread_messages_new): Since the fix for #3357 uses
612 'order=0' to indicate tree structure nodes, make sure we dont
613 actually set order=0 for valid messages, otherwise we silently
614 lose duplicates of the first message (i==0). Fixes #19920.
616 2002-05-10 Jeffrey Stedfast <fejj@ximian.com>
618 * providers/imap/camel-imap-folder.c (imap_get_message): Fetch the
619 BODYSTRUCTURE rather than BODY since BODY seems to be lacking some
620 of the data we need. This fixes bug #24136.
622 * camel-transport.c (camel_transport_get_type): Might help if we
623 called camel_transport_class_init.
625 2002-05-10 Dan Winship <danw@ximian.com>
627 * camel-folder.c (camel_folder_transfer_messages_to): Replace
628 copy_messages_to and move_messages_to with a single function that
629 just takes a "delete_originals" flag. Also, use the vtrash
630 implementation if *either* folder is a vtrash.
631 (transfer_messages_to): Make this use camel_operation_progress
632 (previously move_messages_to did but copy_messages_to didn't), and
633 freeze/thaw the folder(s) if doing multiple messages.
635 * camel-vtrash-folder.c (vtrash_transfer_messages_to): Update for
636 move/copy merge. Move the "move messages into vtrash" code here
637 from mail-ops.c. Now all of the vtrash move/copy special casing is
638 in camel instead of half of it being here and half in mail/. (This
639 should also make it so that "Move to Trash" will work in filter
642 * camel-vee-folder.c (vee_transfer_messages_to): Make this just
643 return an exception, since it will only be called when trying to
644 move/copy messages from one vfolder to another.
645 (vee_append_message): Add this too so we get a nicer error message
646 than the default "unimplemented" one in camel-folder.c.
648 * camel-digest-folder.c: Replace copy_messages_to and
649 move_messages_to with transfer_messages_to.
651 * camel-disco-folder.c: Likewise
653 * camel-disco-diary.c (camel_disco_diary_log,
654 camel_disco_diary_replay): replace MOVE/COPY with TRANSFER.
656 * providers/imap/camel-imap-folder.c (imap_transfer_offline,
657 imap_transfer_online, imap_transfer_resyncing): Update for
658 changes. (This ends up being a bit more complicated than it was
659 before for now, but later disconnected operation changes should
662 * camel-filter-driver.c (camel_filter_driver_filter_message,
663 do_copy, do_move): Use transfer_messages_to instead of copy.
665 2002-05-09 Jeffrey Stedfast <fejj@ximian.com>
667 * camel-filter-search.c (shell_exec): New filter function to pipe
668 a message to another program.
669 (run_command): Fixed some bugs to make this work.
671 2002-05-09 Not Zed <NotZed@Ximian.com>
673 * camel-service.c (camel_service_disconnect): Instead of testing
674 for SERVICE_CONNECTED, we need to also handle SERVICE_CONNECTING
675 too, as it will often have setup some details before it failed.
676 Make it !DISCONNECTED (and !DISCONNECTING for recursive calls,
677 which happen). Fixes #23782, and maybe also #21604 and many other
680 2002-05-08 Jeffrey Stedfast <fejj@ximian.com>
682 * camel-digest-store.c (digest_setv): Implemented.
683 (digest_getv): Implemented.
685 * camel-disco-store.c (disco_setv): Implemented.
686 (disco_getv): Implemented.
688 * camel-remote-store.c (remote_store_setv): Implemented.
689 (remote_store_getv): Implemented.
691 * camel-transport.c (camel_transport_class_init): Implemented.
692 (transport_setv): Implemented.
693 (transport_getv): Implemented.
695 * camel-store.c (store_setv): Implemented.
696 (store_getv): Implemented.
698 * camel-service.c (service_setv): Implemented.
699 (service_getv): Implemented.
701 * providers/pop3/camel-pop3-store.c (pop3_try_authenticate):
702 camel_pop3_engine_iterate doesn't return the state, it returns -1
703 on fail, 0 when finished processing request or >0 if more ops are
704 in the queue, so don't check status against CAMEL_POP3_STATE_OK,
705 instead check pcp->state against that.
707 2002-05-07 Jeffrey Stedfast <fejj@ximian.com>
709 * camel-object.h: s/class/klass for arguments so that c++
710 developers don't complain later.
712 2002-05-07 Dan Winship <danw@ximian.com>
714 * camel-object.c (camel_object_class_cast): Fix a crash in a
717 2002-05-07 Not Zed <NotZed@Ximian.com>
719 * camel-remote-store.c (remote_send_string): Check for LOGIN xxxx
720 as well if debug is on, so we dont print passwords to evolution
723 * providers/imap/camel-imap-utils.c (imap_is_atom_char): This was
724 really broken. 1. isprint() is locale dependent, and 2. it looked
725 up an 8 bit value in a 7 bit table without truncating it. I've
726 removed the isprint() stuff and just put it directly into the
727 special table, which i've expanded to the right size too.
729 * providers/imap/*: Applied patch from Preston Elder
730 <prez@magick.tm> to make camel only use literals if it needs to
731 for simple strings. Changed slightly to use imap_is_atom() and
732 more consistent formatting.
733 providers/imap/camel-imap-utils.c (imap_is_atom): Chagned from
734 imap_needs_quoting().
736 ** Merged in camel-object2 branch. Simpler camelobject
737 implementation + object args interface.
739 * camel.c (camel_init): Call camel_object_get_type() to make sure
740 camel_object_type is initialised.
742 * camel-object.h (CAMEL_OBJECT_TYPE): Changed to return global
743 camel_object_type pointer, not call camel_object_get_type.
745 2002-05-06 Jeffrey Stedfast <fejj@ximian.com>
747 * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): If
748 the pop3 command status is -1, then we probably have a TCP error
749 (?) so set a SYSTEM exception so our caller can distinguish
750 between a "bad password" and a "tcp error".
751 (pop3_connect): Only uncache the password on "bad password"
754 * camel-pgp-mime.c (pgp_mime_part_sign_prepare_part): Use
755 CamelMimeFilterBestenc to get a more appropriate encoding rather
756 than just blindling assigning QP.
758 * providers/imap/camel-imap-folder.c (do_append): Call
759 camel_mime_message_encode_8bit_parts() which fixes bug #10885.
761 * camel-tcp-stream-raw.c (socket_connect): Don't bother with
762 counting down the timeout.
764 2002-05-02 Jeffrey Stedfast <fejj@ximian.com>
766 * camel-stream-fs.c (stream_read): Same fix as the tcp stream.
767 (stream_write): Again here. Just like tcp stream's stream_write(),
768 also make sure to save errno before calling fcntl to restore the
771 * camel-tcp-stream-raw.c (stream_read): Handle EINTR errors for
773 (stream_write): Same and also preserve errno when setting the fd
774 flags back. If w == -1, return -1.
776 2002-05-02 Jeffrey Stedfast <fejj@ximian.com>
778 * camel-mime-utils.c (header_decode_mailbox): Fixed the fix for
779 stupidly-broken-mailer bug #5 to work when multiple unescaped
780 characters were in a row. Fixes bug #24140.
782 * camel-tcp-stream-raw.c (socket_connect): Check select() for
785 * camel-pgp-context.c (crypto_exec_with_passwd): Change the order
786 of some code so that we check if the select() failed before we
787 check for user-cancellation.
789 * camel-service.c (camel_gethostbyname): Check for EINTR when
791 (camel_gethostbyaddr): Same.
793 2002-04-29 Jeffrey Stedfast <fejj@ximian.com>
795 * camel-provider.c (camel_provider_auto_detect): Now takes a
796 CamelURL argument rather than a GHashTable *settings argument.
798 2002-04-29 Not Zed <NotZed@Ximian.com>
800 * providers/local/camel-spool-store.c (get_folder_info): We want
801 to set unread_count to get_unread_message_count, not
802 get_message_count(). Might fix #17174. Also removed FIXME: as it
805 2002-04-26 Jeffrey Stedfast <fejj@ximian.com>
807 * providers/local/Makefile.am: Don't link to libibex.a anymore.
809 * providers/nntp/Makefile.am: Same.
811 * providers/imap/Makefile.am: And again here.
813 * camel-store-summary.h: No longer want to #include
816 * camel-provider.c (camel_provider_auto_detect): New function to
817 auto-detect configuration settings.
819 2002-04-26 Not Zed <NotZed@Ximian.com>
821 * camel-block-file.c (block_file_validate_root): Remove the
822 excessive \n's, after printfs.
824 * camel-text-index.c (text_index_compress_nosync): @!#$@#$!@$#!.
825 Since the rename op was fixed, this broke compression's rename,
826 resulting in the index 'vanishing' after every compress
827 (i.e. after every reindex). Fix this code to account for the
828 fixed rename operation.
830 2002-04-25 Jeffrey Stedfast <fejj@ximian.com>
832 * providers/smtp/camel-smtp-transport.c (smtp_rcpt): Don't put a
833 space between the "RCPT TO:" and the "<recipient>" strings -
834 rfc0821 was not clear on this but it seems rfc2821 defines a
835 grammar excluding that SP.
838 2002-04-24 Jeffrey Stedfast <fejj@ximian.com>
840 * providers/local/camel-local-provider.c
841 (camel_provider_module_init): Configure the default paths for mh,
842 mbox, maildir, spools, etc.
844 * camel-provider.h: Add a CAMEL_PROVIDER_CONF_LABEL enum and
845 define some default CamelProviderConfEntry macros.
847 2002-04-19 Jeffrey Stedfast <fejj@ximian.com>
849 * providers/pop3/camel-pop3-folder.c (pop3_refresh_info): Free the
852 * camel-data-cache.c (data_cache_finalise): Free the cdc->path.
854 * camel-multipart.c (write_to_stream): Don't g_return_val_if_fail
855 here if the boundary is an empty string. See bug #23676 for
856 details. The way I see it, we have 2 options: 1) leave this fix
857 the way it is, thus allowing multipart boundaries to be
858 empty-strings; or 2) make camel_multipart_get_boundary() change
859 the boundary to something legal if the boundary is an
860 empty-string. Since the parser should be able to handle an
861 empty-string boundary *and* more importantly because we want to
862 keep the same boundaries as the original raw message so as to be
863 able to verify multipart/signed parts, I vote for solution #1.
865 2002-04-19 Not Zed <NotZed@Ximian.com>
867 * devel-docs/camel-index.txt: Start of a white-paperish document
868 describing camel-index and older libibex.
870 2002-04-18 Not Zed <NotZed@Ximian.com>
872 * providers/local/camel-local-store.c (rename_folder): If we get a
873 failure, make sure we set an exception.
875 * camel-text-index.c (camel_text_index_rename): If the file
876 doesn't exist, just assume it never did, dont return failure.
877 (text_index_rename): Add '.index' to the path name we're using,
878 since we dont get it passed in.
880 * camel-folder-search.c (check_header): When doing a contains
881 match, split the words and perform an and on it.
882 (match_words_messages): If we have an index, but were forced to do
883 a full search, first lookup a subset of messages using
884 the index and a simplified word set. Only do a manual search of
887 2002-04-17 Not Zed <NotZed@Ximian.com>
889 * camel-folder-search.c (match_message_index): Changed to take a
890 utf8 string not a regex pattern.
891 (match_words_index): Matches against a camel_search_words list.
892 (match_words_1message): Matches a single message against a
893 camel_search_words list.
894 (match_words_message): Same, but gets the message from the folder
896 (match_words_messages): Matches a list of messages against a words
898 (search_body_contains): Rewritten to handle multiple word
899 searches. For #23371.
901 * providers/imap/camel-imap-search.c (sync_match): Split words
902 when searching, to support multiple search words. Also, try
903 searching specifying charset of utf8 if we can, if that fails,
904 fall back to not specifying charset. TODO: It should translate
905 the strings into the locale default charset?
907 * providers/imap/camel-imap-store.c (connect_to_server): Added new
908 cap - utf8_search, if set, we tell the server we're searching
909 using utf8, otherwise we dont (incorrectly, since we always use
912 * camel-search-private.c (camel_ustrstrcase): Make this class public.
913 (camel_search_words_split): Split a word into multiple words based
914 on whitespace, and keep track of whether the word is simple
915 (indexable directly), or not.
916 (camel_search_words_free): Free 'em.
918 2002-04-17 Jeffrey Stedfast <fejj@ximian.com>
920 * camel-vee-folder.c (vee_search_by_expression): If the vee-folder
921 is the unmatched, we don't have our own expression so we cannot
922 merge them. Instead, just use the expression passed in. This fixes
923 a Null-Pointer-Read crash on Solaris systems at least.
925 2002-04-16 Jeffrey Stedfast <fejj@ximian.com>
927 * camel-filter-driver.c (camel_filter_driver_filter_folder): Get
928 rid of an unused variable.
930 * providers/smtp/camel-smtp-transport.c (smtp_helo): Use
931 camel_gethostbyaddr since gethostbyaddr is not reentrant.
933 * camel-http-stream.c (http_connect): Updated after the rename of
934 camel_get_host_byname.
936 * camel-service.c (camel_gethostbyname): Renamed.
937 (camel_gethostbyaddr): New cancellable/reentrant version of
940 2002-04-14 Jeffrey Stedfast <fejj@ximian.com>
942 * providers/local/camel-spoold-store.c: Added #include
943 <sys/types.h> for dirent.h which needs it on MacOS X.
945 * providers/local/camel-maildir-store.c: Same.
947 * providers/nntp/camel-nntp-store.c: Same.
949 * providers/imap/camel-imap-message-cache.c: Same.
951 * camel-provider.c: Same.
953 * camel-data-cache.c: Same.
955 2002-04-12 Jeffrey Stedfast <fejj@ximian.com>
957 * broken-date-parser.c (datetok): Treat commas as token
959 (WEEKDAY_CHARS): Use full weekday names in case the broken mailer
961 (MONTH_CHARS): Same as above but for months.
963 2002-04-15 Not Zed <NotZed@Ximian.com>
965 * *.c: Fix callers for api changes to camel-object, mainly
966 declare_event->add_event, and classfuncs->klass, and a couple
967 of missing #include <config.h>'s
969 * camel-arg.[ch], Makefile.am: New support code for
970 camel_object_get/set arg.
972 * *.h: Fixed all uses of get_type to return a CamelType rather
973 than a guint (now a pointer).
975 * camel-object.[ch]: Major cleanup of object implementation. Also
976 added a get/set interface, and some debugging options.
978 2002-04-11 Not Zed <NotZed@Ximian.com>
980 * providers/local/camel-spool-summary.c (spool_summary_sync_full):
981 If the last message(s) were deleted, and we had any messages
982 output, account for the lost \n of the following From line by
983 adding an extra \n. fix for #8214.
985 2002-04-10 Not Zed <NotZed@Ximian.com>
987 * camel-mime-part-utils.c (convert_buffer): If we get a 0 length
988 input, return a 0 lenght output as valid - fixes bugs with some
989 iconv impl and its simpler anyway.
991 2002-04-11 Jeffrey Stedfast <fejj@ximian.com>
993 * providers/imap/camel-imap-folder.c: Set the UID_SET_LIMIT value
994 to 4096. I ran into an issue tonight where apparently the IMAP
995 server changed the UIDVALIDITY and so Evo needed to re-fetch all
996 headers and it was trying to send a uid set of some 25k (yes, I
997 have a very large INBOX). Anyways, it was set to unlimited
998 before. Courier IMAPd can safely handle up to ~16k per token, but
999 UW IMAPd can only handle 8k per command-line, so I set it to 4k
1002 2002-04-10 Jeffrey Stedfast <fejj@ximian.com>
1004 * camel-mime-part-utils.c (convert_buffer): Fixed a bug that would
1005 miscalculate how much data to copy into the GByteArray (negative
1006 value) thus causing a segfault. Also optimized it while I was at
1009 2002-04-09 Jeffrey Stedfast <fejj@ximian.com>
1011 * camel-store.c (camel_store_init): Make the folder_lock
1012 recursive. See bug #22363 for details. Basically,
1013 get_folder_info() is requesting a diary folder which in turn
1014 connects which requests then calls get_folder() but deadlocks
1015 because get_folder_info already holds the lock.
1017 * camel-mime-message.c (camel_mime_message_set_date): Don't adjust
1018 the timezone offset if we used tm.tm_gmtoff because it is already
1021 2002-04-09 Not Zed <NotZed@Ximian.com>
1023 * camel-mime-part.c (construct_from_parser): If we get multiple
1024 Content-Type header values, change subsequent headers to
1025 X-Invalid-Content-Type so it doesn't wreck processing. This fixes
1026 the reported case in #18929, but i dont know if it fixes the
1027 original posters problems.
1029 2002-04-08 Not Zed <NotZed@Ximian.com>
1031 * camel-vtrash-folder.c (vtrash_move_messages_to): If we find
1032 we're moving from the vtrash to another folder, we need to convert
1033 the uid from a vfolder uid to the source uid (+8). Fix for
1034 #20886. Also changed to batch multiple moves to different folders
1035 so they are done as efficiently as possible rather than one at a
1038 * camel-mime-utils.c (base64_decode_step): If we only get passed
1039 '=', we back track only if we actually output any data. Fix for
1041 (quoted_decode): Pass out size_t instead of int, and use 0 instead
1042 of -1 for error since its not signed. This will fix similar bug
1043 to above in different circumstances since the result is taken as
1044 unsigned. This is only an internal func.
1045 (quoted_encode): Return size_t just for consistency.
1047 * camel-block-file.c (block_file_validate_root): Comment out the
1048 debug and move it into a warning when the validation fails.
1050 2002-04-08 Jeffrey Stedfast <fejj@ximian.com>
1052 * camel-mime-utils.c (uuencode_close): Don't count our filler when
1053 encoding our line-length octet.
1055 2002-04-05 Jeffrey Stedfast <fejj@ximian.com>
1057 * camel-http-stream.c (http_get_headers): Don't get the statuscode
1059 (http_method_invoke): Use a User-Agent header and do basic proxy
1061 (stream_read): Handle redirects.
1062 (camel_http_stream_set_user_agent): New function to allow client
1063 to set the User-Agent string.
1064 (camel_http_stream_set_proxy): New function for setting the proxy
1066 (camel_http_stream_set_proxy_authrealm): New function for setting
1067 the proxy auth realm.
1068 (camel_http_stream_set_proxy_authpass): New function for setting
1069 the proxy auth password.
1071 2002-04-04 Jeffrey Stedfast <fejj@ximian.com>
1073 * camel-folder-summary.c (message_info_new): Simplified since we
1074 can now decode in-reply-to without getting extra cruft. Get rid of
1075 the FIXME about having to check scan->id because of the
1076 possibility of it being NULL, this can no longer happen.
1078 * camel-mime-utils.c (header_references_inreplyto_decode): New
1079 function to decode in-reply-to headers. Only grabs the first thing
1080 that looks like a message-id and then returns.
1081 (header_references_decode): Loop calling
1082 header_references_decode_single (a new internal function).
1084 2002-04-04 Not Zed <NotZed@Ximian.com>
1086 * providers/imap/camel-imap-search.c (imap_body_contains): If
1087 (body-contains) is not passed any arguments, return empty/false.
1088 Fixes a crash exposed by #15001.
1090 * camel-remote-store.c (remote_connect): Reset the keepalive
1091 timeout to 10 minutes rather than the 30 seconds I was using for
1094 2002-04-03 Dan Winship <danw@ximian.com>
1096 * camel-provider.h (CamelProvider): make service_cache be an array
1097 of CAMEL_NUM_PROVIDER_TYPES elements so you can have a single
1098 provider offer both stores and transports. (Eg, Exchange, NNTP)
1100 * providers/imap/camel-imap-provider.c: Don't initialize
1101 service_cache here. (The session code can do it itself since the
1102 url_hash and url_equal functions are stored as part of the
1105 * providers/nntp/camel-nntp-provider.c: Likewise.
1107 * providers/local/camel-local-provider.c: Likewise.
1109 * providers/pop3/camel-pop3-provider.c: Likewise.
1111 * providers/sendmail/camel-sendmail-provider.c: Likewise.
1113 * providers/smtp/camel-smtp-provider.c: Likewise.
1115 * camel-session.c (register_provider): Initialize the provider's
1116 service cache(s) here.
1117 (camel_session_class_init): Don't initialize.
1118 vee_provider.service_cache here.
1119 (camel_session_destroy_provider): Update to destroy multiple
1121 (service_cache_remove, get_service): Tweak these a bit to deal
1122 with multiple service_caches.
1124 2002-04-02 Jeffrey Stedfast <fejj@ximian.com>
1126 * camel-tcp-stream-ssl.c (set_errno): Handle a ton more nspr i/o
1128 (stream_connect): Act as if we are doing a non-blocking
1129 connect. This is to try and work around bug #15120 where users get
1130 an EINPROGRESS error. Maybe importing a PRFileDesc into SSL mode
1131 automagically makes it non-blocking? I dunno.
1133 2002-04-01 Jeffrey Stedfast <fejj@ximian.com>
1135 * camel-folder-summary.c (message_info_new): Updated the
1136 construction of the references to match JWZ's updated algorithm
1137 initialization (ie, append any In-Reply-To reference onto any
1138 References header and never take more than a single message-id
1139 from the In-Reply-To header since anything after the first will
1140 probably just be email addresses). Fixes bug #1336.
1142 2002-04-03 Not Zed <NotZed@Ximian.com>
1144 * providers/local/camel-local-folder.c
1145 (camel_local_folder_construct): Turn indexing back on, fingers
1148 * camel-block-file.c (sync_nolock): #!@$@$#@~#$
1149 DF@#$!Q@$#!@$#!#%. Well it helps if we're iterating a list to
1150 iterate the node pointer ...
1152 * camel-text-index.c (text_index_sync): Sync the key tables
1154 (text_index_sync): Debug out frag info.
1155 (camel_text_index_dump): Added a (rather large, but optional) raw
1156 dumping mode for debugging purposes.
1158 * camel-partition-table.c (camel_key_table_finalise): Sync root
1160 (camel_key_table_sync): New function, sync key table (root) explicitly.
1161 (camel_partition_table_sync): Method to explicitly sync the
1164 2002-04-02 Not Zed <NotZed@Ximian.com>
1166 * camel-block-file.c (camel_block_file_free_block): Mark root
1167 block dirty when we change it (this function isn't used yet
1170 * camel-text-index.c (text_index_add_name_to_word): Touch the root
1171 block when we modify the counts. Also, abort processing on any
1173 (text_index_sync): Fix typo in comments. Sync the block file
1175 (text_index_compress_nosync): Lock the old index while we're
1177 (text_index_compress_nosync): Remove the bogus while() at the end
1178 of the while() loops! Also plug a memleak - records weren't
1180 (text_index_rename): Lock around rename op.
1181 (text_index_add_name): More typos.
1182 (text_index_sync): Touch root when changing it.
1183 (text_index_add_name): "
1184 (text_index_delete_name): "
1185 (camel_text_index_new): Touch root if we change it.
1186 (text_index_cursor_reset): Make sure we NULL pointers after we
1187 free them (nothing uses this yet).
1189 * camel-partition-table.c (hash_key): Remove some debug
1190 accidentally left in.
1191 (camel_partition_table_add): When linking in the next block list,
1192 set the right previous pointer.
1193 (camel_key_table_add): Simplify the 'left' calculation (it was
1195 (camel_key_table_next): Initialise returns before processing.
1196 Broaden the lock slightly, and simplify validity calculations.
1198 * providers/imap/camel-imap-store.c (imap_keepalive): Put back in
1199 the exception setup stuff i disabled for debugging.
1201 * providers/local/camel-local-folder.c
1202 (camel_local_folder_construct): Temporarily disable indexing.
1204 2002-03-28 Not Zed <NotZed@Ximian.com>
1206 * camel-partition-table.c (camel_key_table_lookup): Change range
1207 checking assert to a warning.
1209 * providers/pop3/camel-pop3-folder.c (pop3_finalize): Make sure we
1210 flush out all outstanding commands before finalising, stops being
1211 finalised while outsanding requests are processed by the store
1213 (pop3_get_message): Instead of pre-fetching all messages, just
1214 pre-fetch a maxiumum number at any one time, stops us running out
1217 * providers/nntp/camel-nntp-folder.c (nntp_folder_init/finalise):
1218 Setup priv data + locks, & free.
1220 * providers/imap/camel-imap-folder.c (imap_rescan): Batch all
1221 message_chagned events into a single folder_changed event
1222 (otherwise updates can be >>> expensive, like >5 hours for 80K
1223 messages changing!). Alternately it could use folder
1224 freeze/unfreeze perhaps.
1226 2002-03-27 Not Zed <NotZed@Ximian.com>
1228 * providers/imap/camel-imap-store.c (imap_keepalive): Pass an
1229 exception to called code so it behaves properly since it uses the
1230 passed exception to check returns.
1232 2002-04-01 Dan Winship <danw@ximian.com>
1234 * providers/imap/Makefile.am (libcamelimap_la_LDFLAGS): Use
1235 -avoid-version instead of -version-info 0:0:0, and specify
1236 -module. (From Max Horn <max@quendi.de>).
1238 * providers/local/Makefile.am (libcamellocal_la_LDFLAGS): Likewise.
1240 * providers/nntp/Makefile.am (libcamelnntp_la_LDFLAGS): Likewise.
1242 * providers/sendmail/Makefile.am (libcamelsendmail_la_LDFLAGS):
1245 * providers/smtp/Makefile.am (libcamelsmtp_la_LDFLAGS): Likewise.
1247 * providers/pop3/Makefile.am (libcamelpop3_la_LDFLAGS): Likewise.
1248 Also remove $(KRB4_LDFLAGS) since KPOP is gone.
1249 (INCLUDES): and $(KRB4_CFLAGS)
1251 2002-03-28 Jeffrey Stedfast <fejj@ximian.com>
1253 * camel-filter-driver.c (do_copy): We now have to check to make
1254 sure that p->message is non-NULL because we only load the message
1256 (do_move): Same here.
1258 2002-03-28 Dan Winship <danw@ximian.com>
1260 * camel-transport.c (camel_transport_send_to): Change the message
1261 arg to a CamelMimeMessage instead of a CamelMedium. Even the NNTP
1262 provider returns CamelMimeMessages, and we're never going to
1263 support anything more exotic than that. Also do a few more
1264 g_return_if_fails here instead of in the providers.
1265 (camel_transport_can_send): No longer needed.
1266 (camel_transport_send): Remove this too. It wasn't being used any
1267 more, and it doesn't behave exactly the same in sendmail and smtp.
1269 * providers/smtp/camel-smtp-transport.c (smtp_send,
1270 smtp_can_send): Gone.
1271 (smtp_send_to): Update for arg change.
1272 (smtp_data): Make this take a CamelMimeMessage too.
1274 * providers/sendmail/camel-sendmail-transport.c (sendmail_send,
1275 sendmail_can_send): Gone.
1276 (sendmail_send_to): Update for arg change, and merge in the part
1277 that used to be shared with sendmail_send.
1279 2002-03-27 Jeffrey Stedfast <fejj@ximian.com>
1281 * camel-filter-driver.c (camel_filter_driver_filter_folder):
1282 Construct the source_url the right way. The previous way was
1283 generating urls like pop://fejj@ximian.com;keep_on_server/inbox
1286 2002-03-26 Not Zed <NotZed@Ximian.com>
1288 * camel-text-index.c (text_index_normalise): Changed to use just
1289 g_utf8_strdown instead of utf8_normalise, to match the indexing
1290 code. utf8_normalise is just far too expensive (saves approx 25%
1293 2002-03-25 Not Zed <NotZed@Ximian.com>
1295 * camel-text-index.c (text_index_add_name): When we add a new
1296 name, up all of the cache limits, because we're probably going to
1298 (text_index_sync): Drop the cache limits back down again, we dont
1299 need them when looking words up.
1301 ** MERGE camel_index branch.
1303 * camel-text-index.[ch]: Added files i forgot to add (eep nearly
1304 lost all this work!)
1306 * camel-block-file.c (sync_nolock): Fix an infinite loop in syncing.
1308 2002-03-21 Jeffrey Stedfast <fejj@ximian.com>
1310 * camel-folder-summary.c (camel_message_info_new_from_header): Use
1311 the date in the received header for the received_date.
1313 2002-03-22 Not Zed <NotZed@Ximian.com>
1315 * providers/local/camel-local-folder.c
1316 (camel_local_folder_construct): Use the right option to remove the
1317 index file and reset the index file on creation.
1318 (camel_local_folder_construct): Remove any existing '.ibex' files
1319 - these are the old format index files.
1321 * camel-block-file.c (camel_block_file_rename): Lock io lock while
1323 (camel_key_file_rename): Lock around rename.
1324 (block_file_validate_root): Implement sync flag checking.
1325 (camel_block_file_touch_block): Turn off the sync flag if we're
1326 touching any non-root block and write it to disk. Shoudl this
1328 (sync_nolock): sync the root block only if we need to.
1330 * providers/local/camel-local-store.c (rename_folder): Re-enable
1331 index rename code. Not sure how race-free it is though.
1332 (delete_folder): Delete the index file properly.
1334 * camel-partition-table.c (camel_key_table_lookup): Initialise
1335 output values to 0 before doing anything.
1336 (camel_key_table_add): Do some range-checking on values.
1338 * camel-text-index.c (text_index_compress): Changed to call sync here.
1339 (text_index_compress_nolock): and not here - stops a recursive
1340 sync call when sync performs a compress also.
1341 (text_index_compress_nolock): Change to _nosync, since the locking
1342 is irrelevent (recursive lock). Fixed callers.
1343 (text_index_add_name_to_word): If we get a failure with key table
1344 ops, fail immediately.
1345 (text_index_compress_nosync): Likewise.
1346 (text_index_write_name): If the nameid is 0, do nothing.
1347 (text_index_add_name): If we can't get a keyid, dont add it to the
1349 (camel_text_index_remove): Function to delete an index file.
1350 (text_index_compress_nosync): Clean up temp files when done.
1352 * camel-folder-search.c (match_messages_index): New function,
1353 split from body_contains, matches a regex against all words in an
1355 (match_message_index): Similar to above but matches against an
1357 (search_body_contains): Changed to use above functions for
1358 matching - substring matches should now work on indexed data.
1360 2002-03-21 Not Zed <NotZed@Ximian.com>
1362 * camel-index.c (camel_index_words/names): New virtual
1363 methods/stubs to get a cursor of all words and names.
1365 * camel-text-index.c (text_index_compress_nolock): Split from
1366 text_index_compress, so we can call the compressor while locked
1367 also, removed lock calls.
1368 (text_index_compress): Changed to stub which calls
1369 text_index_compress_nolock.
1370 (camel_text_index_key_cursor_new): New object to iterate through
1372 (text_index_words, text_index_names): Implement virtual functions
1373 for iterating through all words or names.
1375 * camel-block-file.c: Turn off some debug.
1377 2002-03-20 Not Zed <NotZed@Ximian.com>
1379 ** New body index implementation.
1381 * camel-index*: Code for camel index, a new class to replace ibex.
1383 * camel-block-file.[ch]: block-based and link based
1384 filesystem-in-a-file classes.
1386 * camel-partition-table.[ch]: An implementation of a partition
1387 table (automatically extending on-disk hash-table using ideal
1388 hash), and a key-table, a key<>name mapping table. Used by
1391 * providers/local/*, camel-folder-summary.[ch]: Changed to use
1392 camel-index interface rather than ibex.
1394 2002-03-05 Not Zed <NotZed@Ximian.com>
1396 * providers/local/camel-maildir-summary.c (maildir_summary_check):
1397 Do progress reporting of operations.
1398 (maildir_summary_sync): Same here.
1400 2002-03-04 Not Zed <NotZed@Ximian.com>
1402 * providers/local/camel-spoold-store.c (scan_dir): Kill a warning
1405 * providers/local/camel-*.c: Changed for ibex->camelindex.
1407 * camel-folder-search.c (camel_folder_search_set_summary): Init
1408 summary_hash to point to 'static' uid strings.
1409 (search_body_contains): Use the static uid memory to return
1410 results rather than the values from the index library.
1412 * camel-folder-search.[ch]: Changed to use camelindex object.
1414 * camel-folder-summary.c (summary_build_content_info_message):
1415 Use a stream to index content, also filter html mail first.
1416 (camel_folder_summary_info_new_from_message): Use a stream
1417 filtered to index content.
1418 (main): Removed the test main code. Added headers for open call
1419 (ibex must've had them before).
1421 * camel-folder-summary.[ch]: Changed from ibex to CamelIndex.
1423 * camel-mime-filter-index.c (camel_mime_filter_index_finalize):
1426 * camel-mime-filter-index.[ch]: Changed from ibex to CamelIndex.
1428 2002-03-19 Jeffrey Stedfast <fejj@ximian.com>
1430 * camel-mime-utils.c (header_encode_param): Fix this to work
1431 right. We need to convert the input buffer to the charset we claim
1432 in the encoded param (duh).
1434 2002-03-18 Jeffrey Stedfast <fejj@ximian.com>
1436 * providers/smtp/camel-smtp-transport.c
1437 (connect_to_server_wrapper): Updated to use the same logic as the
1440 * providers/pop3/camel-pop3-store.c (connect_to_server): No longer
1441 takes a stls_supported argument since we no longer need it with
1443 (connect_to_server_wrapper): New logic: First try connecting to
1444 the SSL port (995 by default), if that fails with
1445 SERVICE_UNAVAILABLE, then we attempt to connect (to port 110 by
1446 default) and try to use STARTTLS.
1448 2002-03-15 Jeffrey Stedfast <fejj@ximian.com>
1452 * camel-private.h: Don't allow any empty structs. If
1453 !ENABLE_THREADS, provide a gpointer dummy member. Fixes bug #6382.
1455 2002-03-13 Jeffrey Stedfast <fejj@ximian.com>
1457 * providers/smtp/camel-smtp-transport.c (smtp_auth): Added a
1458 work-around for SMTP servers that can't read the RFCs and thus
1459 implement SASL incorrectly. Oh well, that's life in the world of
1460 mail clients I guess.
1462 2002-03-12 Jeffrey Stedfast <fejj@ximian.com>
1464 * camel-digest-store.c (camel_digest_store_new): Now takes a url
1467 * camel-digest-folder.c (digest_add_multipart): Fixed some memory
1468 corruption and also modified to use CAMEL_IS_MIME_MESSAGE() rather
1469 than comparing content-type strings.
1470 (digest_get_message): Fixed a logic blooper.
1472 * camel-folder-summary.c (camel_message_info_new_from_header): Set
1473 the date fields of the CamelMessageInfo as well. This may even fix
1474 some filter-related bugs where the user was trying to compare
1477 2002-03-11 Jeffrey Stedfast <fejj@ximian.com>
1479 * camel-digest-store.c: A pretty empty store implementation to be
1480 the parent store of a CamelDigestFolder.
1482 * camel-digest-folder.c: Updated to reference it's parent store.
1484 2002-03-11 Jeffrey Stedfast <fejj@ximian.com>
1486 * camel-digest-folder.c (camel_digest_folder_new): Allow any leaf
1487 part to be a message/rfc822 part.
1488 (digest_get_uids): Recurse the mime structure and add all
1489 message/rfc822 parts and use a uid scheme similar to IMAP's mime
1490 part naming convention.
1491 (digest_get_message): Decode the uid to get the correct mime part.
1493 2002-03-11 Ettore Perazzoli <ettore@ximian.com>
1495 * camel-mime-utils.c: Change the order of the mailing list magic
1496 patterns so that the more mailing-list specific ones are on the
1499 2002-03-11 Jeffrey Stedfast <fejj@ximian.com>
1501 These fixes should fix bug #21737.
1503 * providers/smtp/camel-smtp-transport.c
1504 (connect_to_server_wrapper): Same as with the POP code.
1506 * providers/pop3/camel-pop3-store.c (connect_to_server_wrapper):
1507 Slight restructuring of the if-statements for the USE_SSL_ALWAYS
1508 case so that we can't possibly return TRUE unless we really did
1509 connect successfully.
1511 2002-03-10 Dan Winship <danw@ximian.com>
1513 Rename the OpenSSL implementation of things to match the NSS
1514 implementation so that callers don't need to care which one is
1517 * camel-tcp-stream-openssl.c: Implement CamelTcpStreamSSL, not
1518 CamelTcpStreamOpenSSL. Rename methods as well. Replace the
1519 camel-tcp-stream-openssl.h include with camel-tcp-stream-ssl.h.
1521 * camel-tcp-stream-openssl.h: Gone.
1523 * camel-tcp-stream-ssl.c: Add a note explaining that this
1524 implementation is only used for NSS, and that OpenSSL's
1525 implementation is in another file. (Should probably do some CVS
1526 renaming magic at some point.)
1528 * camel-http-stream.c (http_connect): Remove OpenSSL refs; the
1529 previously-NSS-specific code works for both now.
1531 * camel-remote-store.c: Likewise.
1533 * providers/smtp/camel-smtp-transport.c: Likewise.
1535 * providers/pop3/camel-pop3-store.c: Likewise.
1537 * Makefile.am (libcamelinclude_HEADERS): Remove
1538 camel-tcp-stream-openssl.h
1540 2002-03-10 Dan Winship <danw@ximian.com>
1542 * camel-tcp-stream.c (camel_tcp_stream_get_socket): Remove this:
1543 it couldn't be generically used, because different subclasses
1544 returned entirely different types of data.
1545 (camel_tcp_stream_get_local_address,
1546 camel_tcp_stream_get_remote_address): Add these to replace what
1547 get_socket was being used for.
1548 (camel_tcp_address_new, camel_tcp_address_free): Utility functions
1549 for get_{local,remote}_address.
1551 * providers/smtp/camel-smtp-transport.c: Change localaddr to a
1553 (connect_to_server): Call camel_tcp_stream_get_local_address to
1554 get the local IP address.
1555 (smtp_disconnect): free localaddr.
1556 (smtp_helo): Update for localaddr change.
1558 * camel-tcp-stream-raw.c (stream_get_socket): Remove
1559 (stream_get_local_address, stream_get_remote_address): Implement.
1561 * camel-tcp-stream-ssl.c (stream_get_socket): Remove
1562 (stream_get_local_address, stream_get_remote_address): Implement.
1564 * camel-tcp-stream-openssl.c (stream_get_socket): Remove
1565 (stream_get_local_address, stream_get_remote_address): Implement.
1567 2002-03-08 Jeffrey Stedfast <fejj@ximian.com>
1569 * providers/pop3/camel-pop3-provider.c
1570 (camel_provider_module_init): Don't call
1571 camel_remote_store_get_authtypes since we no longer subclass
1574 * providers/pop3/camel-pop3-engine.c: Added STARTTLS to the
1575 capabilities to look for.
1576 (camel_pop3_engine_reget_capabilities): New function to re-get
1579 * providers/pop3/camel-pop3-store.c: Updated to not subclass
1581 (connect_to_server): Rewritten to not depend on CamelRemoteStore's
1582 connect implementation. Also added support for STLS (aka
1585 2002-03-07 Jeffrey Stedfast <fejj@ximian.com>
1587 * camel-pgp-mime.c (camel_pgp_mime_part_sign): Add support for
1588 hash type RIPEMD160.
1590 * camel-cipher-context.h: Add RIPEMD160 hash type.
1592 * camel-pgp-context.c (pgp_sign): Updated to consider hash
1593 function for pgp5 and pgp6.
1594 (pgp_clearsign): Same.
1596 * camel-tcp-stream-openssl.c (stream_read): Add a timeout on the
1598 (stream_write): Same.
1600 2002-03-06 Jeffrey Stedfast <fejj@ximian.com>
1602 * providers/smtp/camel-smtp-transport.c (connect_to_server): Fix
1603 to work with OpenSSL.
1605 * camel-tcp-stream-openssl.c: compile fixes.
1606 (camel_tcp_stream_openssl_enable_ssl): Check to make sure that the
1607 sockfd != -1, it's not enough to check that it is non-zero. Also
1608 set the sockfd to -1 on fail (open_ssl_connection will close the
1611 2002-03-06 Dan Winship <danw@ximian.com>
1613 * providers/smtp/camel-smtp-transport.c (smtp_construct): Make
1616 2002-03-05 Jeffrey Stedfast <fejj@ximian.com>
1618 * camel-tcp-stream-ssl.c (save_ssl_cert): Removed. Glory glory
1620 (ssl_bad_cert): No longer calls ssl_save_cert or
1623 2002-03-05 Jeffrey Stedfast <fejj@ximian.com>
1625 * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_new_raw):
1626 Start the ssl stream off in non-ssl mode (useful for STARTTLS).
1627 (camel_tcp_stream_openssl_enable_ssl): New function to toggle an
1628 ssl stream into ssl mode.
1629 (open_ssl_connection): Close the sockfd on fail so our caller
1630 doesn't have to - this also allows us to save the original errno.
1631 (stream_connect): If we want ssl mode, do our ssl stuff.
1632 (camel_tcp_stream_openssl_class_init): Init some SSL stuff here
1633 instead of in open_ssl_connection since these only ever need to be
1635 (stream_read): Only use SSL_read if we are in ssl mode.
1636 (stream_write): Only use SSL_write if we are in ssl mode.
1638 * providers/smtp/camel-smtp-transport.c (smtp_helo): Check for the
1640 (connect_to_server): Try to use STARTTLS whenever possible rather
1641 than the old way of doing things.
1642 (connect_to_server_wrapper): Wrapper around connect_to_server() to
1643 first try STARTTLS and then attempt normal SSL mode if we can't
1644 connect via STARTTLS.
1646 * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_enable_ssl): New
1647 function to toggle an ssl stream into ssl mode.
1648 (camel_tcp_stream_ssl_new_raw): Start the ssl stream off in
1649 non-ssl mode (useful for STARTTLS).
1650 (stream_connect): Only connect in SSL mode if required.
1652 2002-03-01 Jeffrey Stedfast <fejj@ximian.com>
1654 * camel-vtrash-folder.h:
1655 * camel-vee-store.h:
1656 * camel-vee-folder.h:
1657 * camel-stream-null.h:
1658 * camel-stream-filter.h:
1659 * camel-store-summary.h:
1660 * camel-news-address.h:
1661 * camel-mime-utils.h:
1662 * camel-mime-parser.h:
1663 * camel-mime-filter-save.h:
1664 * camel-mime-filter-linewrap.h:
1665 * camel-mime-filter-index.h:
1666 * camel-mime-filter-html.h:
1667 * camel-mime-filter.h:
1668 * camel-mime-filter-from.h:
1669 * camel-mime-filter-crlf.h:
1670 * camel-mime-filter-chomp.h:
1671 * camel-mime-filter-charset.h:
1672 * camel-mime-filter-bestenc.h:
1673 * camel-mime-filter-basic.h:
1674 * camel-internet-address.h:
1675 * camel-folder-thread.h:
1676 * camel-folder-summary.h:
1677 * camel-folder-search.h:
1678 * camel-filter-driver.h:
1679 * camel-charset-map.h:
1680 * camel-address.h: Add c++ armoring.
1682 * camel-object.h: s/class/klass
1684 2002-03-01 Jeffrey Stedfast <fejj@ximian.com>
1686 * camel-mime-part-utils.c
1687 (camel_mime_part_construct_content_from_parser): Reverted my
1688 pgp/mime fixes here too.
1690 * camel-mime-part.c (write_to_stream): Removed my pgp/mime raw
1691 stream hack, this is causing problems such as some messages to not
1692 displaying, view->source not working at all, etc.
1694 2002-02-28 Jeffrey Stedfast <fejj@ximian.com>
1696 * camel-mime-parser.c: Changed offset variables from int's to
1697 off_t's since the system may support large files.
1699 * camel-mime-part-utils.c
1700 (camel_mime_part_construct_content_from_parser): Rearrange the
1701 save filter stuff so that we save raw streams for all mime
1702 parts. If the mime part turns out to be a multupart, then don't
1703 bother saving the raw stream, we only need to save the raw stream
1706 2002-02-27 Jeffrey Stedfast <fejj@ximian.com>
1708 * camel-folder-summary.h: Don't #include camel-mime-filter-save.h,
1711 * camel-file-utils.c: Fixed a few 'might be used uninitialized'
1712 warnings which were real problems.
1714 * camel-mime-part-utils.c
1715 (camel_mime_part_construct_content_from_parser): Save the raw mime
1716 stream for any/all signed parts.
1718 * camel-mime-part.c (camel_mime_part_init): Initialize our raw
1720 (camel_mime_part_finalize): Unref our raw stream, if we have one.
1721 (write_to_stream): If we have a raw stream, write that out instead
1724 * camel-mime-filter-save.[c,h]: Rewritten to save to a stream
1727 2002-02-28 Not Zed <NotZed@Ximian.com>
1729 * camel-mime-utils.c (header_fold): Use the FOLD_SIZE as a
1730 recommended folding size, but add a new FOLD_MAX_SIZE (=998, the
1731 smtp max line size) as the hard limit for any output.
1733 2002-02-27 Jeffrey Stedfast <fejj@ximian.com>
1735 * camel-mime-filter-chomp.c (camel_mime_filter_chomp_new): New
1736 stream filter that chomps excess trailing whitespace from the end
1737 of the stream. This is needed to update the PGP/MIME code to
1738 comply with rfc3156.
1740 * camel-pgp-mime.c (camel_pgp_mime_part_verify): Don't attach a
1741 from filter, if it ain't from-filtered already, then we'll just be
1742 breaking stuff. To become rfc3156 compliant, add a chomp filter
1744 (camel_pgp_mime_part_sign): Add a chomp filter here too.
1746 2002-02-27 Not Zed <NotZed@Ximian.com>
1748 * camel-mime-part.c (init_header_name_table): Changed header
1749 formatted table to contain a pointer to an output function, and
1750 added in-reply-to and references headers.
1751 (write_references): New function to write out references header,
1752 folded properly. It only approximates based on the last >, but it
1753 should be adequate and will also handle invalid headers.
1754 (write_fold): Function to write out headers folded. Since this is
1755 the default it isn't required.
1756 (write_raw): Write out an already formatted header, e.g. most of
1758 (write_to_stream): Lookup header output function, if we have one,
1759 use that, otherwise fold header using basic (dumb) function.
1761 This is all for #14779. A better fix is probably do have the
1762 headers always stored formatted, but that can wait.
1764 2002-02-25 Jeffrey Stedfast <fejj@ximian.com>
1766 * camel-digest-folder.c (camel_digest_folder_new): Allow all
1767 multiparts that contain message/rfc822 attachments.
1768 (digest_get_uids): Only assign uids to message parts.
1770 2002-02-22 Jeffrey Stedfast <fejj@ximian.com>
1772 * camel-mime-part.c (camel_mime_part_set_filename): Set the 'name'
1773 parameter on the Content-Type too. Fixes bug #20779.
1775 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
1777 * camel-pgp-context.c (pgp_sign): Pass --always-trust to gpg
1778 (requested by users).
1779 (pgp_clearsign): Same.
1780 (pgp_encrypt): Here too.
1782 2002-02-12 Jeffrey Stedfast <fejj@ximian.com>
1784 * providers/smtp/camel-smtp-transport.c (smtp_helo): Since the
1785 AUTH token sometimes uses '=' instead of whitespace, don't use
1786 smtp_token_next here.
1788 2002-02-09 Not Zed <NotZed@Ximian.com>
1790 * providers/pop3/camel-pop3-engine.c (get_capabilities): Duh, when
1791 we grab the apop stamp it needs to include the <> as well, I even
1792 read the rfc, silly me.
1794 * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): Doh,
1795 when iterating the authtype list, it helps to goto the next node.
1796 Found with help from miles.
1798 2002-02-08 Not Zed <NotZed@Ximian.com>
1800 * providers/local/camel-spool-summary.c
1801 (camel_spool_summary_build_from): The day number has to be 2 chars
1802 wide, space filled to work properly with pine, etc.
1804 * providers/local/camel-spoold-store.[ch]: new type of provider
1805 'spool directory', which lets you view external mbox dirs without
1806 adding any extra cruft. Perhaps it should use . files to store
1807 summaries? Still a bit experimental, there's a warning when you
1808 select it in the account editor. Finished off most of #1185.
1809 Can't rename or move folders.
1811 * camel-mime-utils.c (header_decode_date): If the date is
1812 100->1900 then we actually want to use it as the year in the tm
1813 struct, not year+100. e.g. year 102 -> 2002, not 2102.
1815 2002-02-07 Not Zed <NotZed@Ximian.com>
1817 * providers/local/camel-spool-store.c (get_folder): Pass path into
1820 * providers/local/camel-spool-folder.c (camel_spool_folder_new):
1821 (camel_spool_folder_construct): Take the full path to the folder
1822 and use that as the file path, independent of the full_name we
1825 2002-02-07 Not Zed <NotZed@Ximian.com>
1827 * providers/local/camel-local-provider.c: Added new type, spoold
1828 provider, spoold: for local directories.
1830 * providers/imap/camel-imap-store.c (get_one_folder_offline):
1831 Create offline uri's in a compatible manner to online ones.
1833 2002-02-07 Dan Winship <danw@ximian.com>
1835 * camel-sasl-ntlm.c: Implementation of NTLM (aka "Secure Password
1836 Authentication") auth, taken from soup.
1838 * Makefile.am (libcamel_la_SOURCES, libcamel_la_HEADERS): Add
1841 * camel-sasl.c: Add refs to camel-sasl-ntlm.
1843 * providers/imap/camel-imap-store.c (try_auth): Use
1844 imap_next_word() to skip over the "+ " of the continuation rather
1845 than just "resp + 2" since Exchange (incorrectly) returns "+"
1846 instead of "+ " for an empty continuation response.
1848 2002-02-06 Jeffrey Stedfast <fejj@ximian.com>
1850 * camel-folder-summary.h: Remove the CAMEL_MESSAGE_NEEDS_REPLY
1851 flag, we no longer will be using this.
1853 2002-02-04 Jeffrey Stedfast <fejj@ximian.com>
1855 * camel-http-stream.c (stream_read): Use camel_mime_parser_read to
1856 read internal parser data.
1857 (camel_http_stream_get_content_type): Implemented.
1858 (http_method_invoke): Use HTTP/1.0 instead of 1.1
1860 * camel-mime-utils.c (header_decode_int): Made public.
1862 * camel-http-stream.[c,h]: Added. New stream for HTTP requests
1863 (currently supported are GET and HEAD).
1865 * camel-tcp-stream-ssl.c (stream_connect): Call set_errno
1868 2002-01-31 Not Zed <NotZed@Ximian.com>
1870 * camel-mime-utils.c (header_decode_domain): Oops, this was
1871 converting foo@[blah] to foo@[ blah ], fixed.
1873 2002-01-30 Jeffrey Stedfast <fejj@ximian.com>
1875 * providers/pop3/camel-pop3-provider.c: Use "pop" instead of
1876 "pop3" so current configurations continue to work.
1878 2002-01-30 Not Zed <NotZed@Ximian.com>
1880 * camel-sasl-login.c: Changed name from "NT Login" to simply
1883 * providers/pop3/*: Entirely new pop implmentation, supporting
1886 2002-01-29 Not Zed <NotZed@Ximian.com>
1888 * camel-data-cache.c (free_busy): We dont want to unref the
1889 stream, instead, stop listening to the finalised events, and free
1892 2002-01-25 Not Zed <NotZed@Ximian.com>
1894 * camel-data-cache.c (stream_finalised): Remove the object from
1895 the busy_stream hashtable, not the busy_path hashtable.
1897 2002-01-29 Jeffrey Stedfast <fejj@ximian.com>
1899 * providers/imap/camel-imap-folder.c (imap_update_summary): Added
1900 more kludge to an existing Exchange IMAP 5.5 kludge to work around
1901 it returning multiple messages with the same UIDs.
1903 2002-01-28 Jeffrey Stedfast <fejj@ximian.com>
1905 * camel-mime-message.c (process_header): Handle Resent headers
1908 * camel-mime-message.h: Added Resent-* #defines.
1910 * camel-filter-driver.c (camel_filter_driver_remove_rule_by_name):
1911 Use while (node->next) instead of while (node)
1913 * providers/smtp/camel-smtp-transport.c (smtp_decode_status_code):
1914 New function to decode an enhanced status code.
1915 (smtp_set_exception): Sets an exception based on the
1916 Enhanced-Status-Code.
1917 (esmtp_get_authtypes): Don't diplicate the key in the hash since
1918 the key and value are the same.
1919 (smtp_rcpt): Include the failed recipient in the error message to
1920 be more helpful to the user.
1922 * camel-mime-utils.c (hex_decode): Make sure to allocate enough
1925 2002-01-28 Jeffrey Stedfast <fejj@ximian.com>
1927 * providers/smtp/camel-smtp-transport.c (smtp_construct):
1928 (connect_to_server): Use flags rather than a bunch of gboolean
1930 (smtp_connect): Same.
1931 (smtp_mail): Here too. Use the enhanced status codes if available.
1932 (smtp_data): And again here.
1933 (smtp_helo): Finally here. Also detect the ENHANCEDSTATUSCODES
1935 (smtp_rcpt): Use the enhanced status codes if available.
1936 (smtp_rset): Here too.
1937 (smtp_quit): And finally here.
1939 * camel-transport.h: Removed gboolean supports_8bit since this is
1940 pretty local to only SMTP for now.
1942 2002-01-24 Ettore Perazzoli <ettore@ximian.com>
1944 * Makefile.am: Remove some old cruft.
1946 2002-01-24 Ettore Perazzoli <ettore@ximian.com>
1948 * tests/folder/Makefile.am: s/MAILER_LIBS/EVOLUTION_MAIL_LIBS/.
1949 * tests/message/Makefile.am: Likewise.
1950 * tests/mime-filter/Makefile.am: Likewise.
1951 * tests/misc/Makefile.am: Likewise.
1952 * tests/smime/Makefile.am: Likewise.
1953 * tests/stream/Makefile.am: Likewise.
1955 2002-01-24 Jeffrey Stedfast <fejj@ximian.com>
1957 * camel-filter-driver.c (do_beep): Call the beep callback
1959 (camel_filter_driver_set_system_beep_func): New function to set
1962 2002-01-22 Jeffrey Stedfast <fejj@ximian.com>
1964 * camel-filter-driver.c (camel_filter_driver_remove_rule_by_name):
1965 New function to remove a filter rule by name.
1967 2002-01-21 Jeffrey Stedfast <fejj@ximian.com>
1969 * camel-filter-driver.c (do_beep): As a temporary solution, just
1970 printf ("\a"); to make a beep :-)
1972 * providers/imap/camel-imap-command.c
1973 (imap_command_strdup_vprintf): Encode the mailbox to UTF-7 here.
1975 * providers/imap/camel-imap-utils.c (imap_parse_list_response):
1976 Decode the mailbox name as we parse the list response.
1977 (imap_mailbox_decode): It's only an illegal mailbox name if it
1978 didn't switch back to US-ASCII mode.
1980 2002-01-18 Jeffrey Stedfast <fejj@ximian.com>
1982 * providers/imap/camel-imap-utils.c (imap_mailbox_decode): New
1983 function to decode an IMAP mailbox name from modified UTF-7
1985 (imap_mailbox_encode): New function to convert a mailbox name from
1986 UTF-8 to IMAP's modified UTF-7 encoding.
1988 2002-01-17 Jeffrey Stedfast <fejj@ximian.com>
1990 * camel-mime-filter-basic.c (filter): Stop uudecoding once the
1991 CAMEL_UUDECODE_STATE_END state bit gets set. Set the
1992 CAMEL_UUDECODE_STATE_BEGIN state bit once we find the begin line.
1993 (reset): No longer have uu_begin or uulen state variables, these
1994 are now stuffed into a single state variable.
1996 * camel-mime-utils.c (uudecode_step): No longer needs a uulen
1997 argument and also keeps track of whether or not the end of the
1998 encoded data has been found in 'state'.
1999 (uuencode_step): Now stuffs uulen into state so that the uulen
2000 argument is no longer needed.
2001 (uuencode_close): Same.
2003 2002-01-16 Jeffrey Stedfast <fejj@ximian.com>
2005 * camel-mime-filter-basic.c (filter): If we don't want to corrupt
2006 the uuencoded data by overwriting it with base64 decoded data
2007 afterward, we need to add a break statement!
2009 * camel-folder-summary.c (summary_build_content_info): Add code to
2011 (camel_folder_summary_finalize): Unref the uuencode filter.
2013 2002-01-16 Jeffrey Stedfast <fejj@ximian.com>
2015 * camel-mime-filter-basic.c (filter): Fixed slight logic error to
2016 find the uuencode begin line. Fixes bug #18754.
2018 2002-01-15 Jeffrey Stedfast <fejj@ximian.com>
2020 * providers/smtp/camel-smtp-transport.c (smtp_send_to): Updated to
2021 match the new send_to API.
2022 (smtp_send): Get the from address and pass that along to
2025 * providers/sendmail/camel-sendmail-transport.c
2026 (sendmail_send_to): Updated to match the new send_to API.
2028 * camel-transport.c (camel_transport_send_to): Now takes a from
2031 * providers/imap/camel-imap-folder.c (imap_update_summary): Sort
2032 the needheaders UID array and fixed to respect the
2033 UID_SET_LIMIT. This should now finish the fixification of bug
2034 #2529. There's still the possible issue that a command-line (The
2035 only command-line I can think of that can still be too long is a
2036 SEARCH command, but this can't possibly be fixed until we rewrite
2037 the imap code to use Zucchi's ImapEngine idea).
2039 2002-01-14 Jeffrey Stedfast <fejj@ximian.com>
2041 * providers/imap/camel-imap-folder.c (imap_expunge_uids_online):
2042 Move the command-lock outside the loop.
2044 2002-01-14 Jeffrey Stedfast <fejj@ximian.com>
2046 * providers/imap/camel-imap-folder.c (imap_expunge_uids_online):
2047 Updated to use the new imap_uid_array_to_set() interface.
2048 (imap_expunge_uids_resyncing): Same.
2049 (do_copy): Here too.
2050 (imap_update_summary): Added a FIXME comment to rewrite allowing
2051 for a uid-set limitation.
2052 (get_matching): Copy some of the logic over from
2053 imap_uid_adday_to_set() to limit the length of the uid-set string.
2054 (imap_sync_online): Added a comment to explain what is going on
2055 with get_matching() since the behavior has changed slightly.
2057 * providers/imap/camel-imap-utils.c (imap_uid_array_to_set):
2058 Modify the interface so that we can limit the size of the uid set
2061 2002-01-14 Not Zed <NotZed@Ximian.com>
2063 * providers/imap/camel-imap-search.c (imap_body_contains):
2064 Rewritten to use a cache for body searches when online. Will need
2065 some heavy testing but so far seems to be beneficial.
2067 * providers/imap/camel-imap-folder.c (imap_search_by_expression,
2068 search_by_uids): dont initialise search object here.
2069 (camel_imap_folder_new): Setup search object here with pointer to
2072 2001-12-01 Not Zed <NotZed@Ximian.com>
2074 * camel-store-summary.[ch]: New class to store a store's folder
2075 list in. Not yet completed.
2077 2002-01-11 Jeffrey Stedfast <fejj@ximian.com>
2079 * providers/imap/camel-imap-folder.c (imap_update_summary): Kludge
2080 around a bug in Exchange 5.5 that reports 2 messages with the same
2081 UID. Fixes bug #17694. Replaces the fix from yesterday.
2083 2002-01-10 Jeffrey Stedfast <fejj@ximian.com>
2085 * providers/local/camel-local-folder.c: If PATH_MAX doesn't exist,
2086 use _POSIX_PATH_MAX.
2088 * providers/imap/camel-imap-folder.c (imap_update_summary): If mi
2089 is NULL, don't bother updating it. Should fix bug #17694.
2091 2002-01-10 Jeffrey Stedfast <fejj@ximian.com>
2093 * camel.h: #include camel-mime-filter-tohtml.h
2095 * providers/imap/camel-imap-folder.c (imap_update_summary): Kludge
2096 around Microsoft Exchange 5.5 (bug #5348) by forgetting our
2097 currently selected folder and re-SELECTing it so that the Exchange
2098 server has a chance to realise it has new messages.
2100 2002-01-09 Jeffrey Stedfast <fejj@ximian.com>
2102 * providers/local/camel-local-folder.c
2103 (camel_local_folder_construct): If the mbox file is a symlink,
2104 follow the symlink and get the One True Path so that we can
2105 rewrite the mbox later without worrying about clobbering the
2108 2002-01-08 Jeffrey Stedfast <fejj@ximian.com>
2110 * camel-filter-search.c (TODO): There are a few sexp callbacks
2111 that could be modified to use fms->info rather than using a
2112 message object (like date and possibly mlist stuff) but *only* if
2113 the date exists on the CamelMessageInfo object (since it may be
2114 blank except for message flags).
2115 (camel_filter_search_get_message): New internal convenience
2116 function to make sure that the FilterMessageSearch has loaded the
2117 message (and to load the message if this isn't the case).
2118 (check_header): Call camel_filter_search_get_message().
2119 (header_exists): Same.
2120 (header_regex): Here too.
2121 (header_full_regex): And here.
2122 (body_contains): Again here.
2123 (body_regex): Here too.
2124 (get_sent_date): Here also.
2125 (get_received_date): Same.
2126 (get_source): Here if we need to.
2127 (camel_filter_search_match): Now takes a callback function/data
2128 pair for on-demand message loading so that we don't necessarily
2129 have to load the message if the defined filter rules don't require
2132 * camel-filter-driver.c (camel_filter_driver_filter_folder): Don't
2133 bother fetching the message here, let
2134 camel_filter_driver_filter_message() worry about this.
2135 (get_message_cb): New utility callback to fetch a message.
2136 (camel_filter_driver_filter_message): Only fetch the message if we
2137 absolutely need it to get a CamelMessageInfo. Instead of passing a
2138 message object to camel_filter_search_match(), pass get_message_cb
2139 and some user_data so that the matching code can fetch the message
2142 2002-01-07 Jeffrey Stedfast <fejj@ximian.com>
2144 * camel-folder.c (filter_filter): Flush the only-once actions.
2146 * camel-filter-driver.c (camel_filter_driver_filter_message):
2147 Don't increment a filtered_count here any longer.
2148 (camel_filter_driver_reset_filtered_count): Removed.
2149 (camel_filter_driver_get_filtered_count): Removed.
2150 (do_beep): New action.
2151 (play_sound): New action to play a sound
2152 (do_only_once): Another new action.
2153 (camel_filter_driver_finalise): Free the only_once hash if the
2154 driver has not been "flushed".
2155 (camel_filter_driver_flush): Flush all of the only-once actions.
2157 * camel-charset-map.c: Moved windows-1251 to the end of the list
2158 since it contains the euro and we'd prefer to use iso-8859-15 when
2159 the euro is requested than a windows charset if possible.
2161 * camel-charset-map-private.h: Regenerated.
2163 2001-12-12 Jeffrey Stedfast <fejj@ximian.com>
2165 * camel-folder-summary.c (content_info_load): Don't try setting a
2166 content-type parameter if either the name or value is NULL.
2168 * camel-mime-utils.c (header_set_param): NULL-protection.
2170 2002-01-02 Jeffrey Stedfast <fejj@ximian.com>
2172 * camel-tcp-stream-ssl.c (ssl_bad_cert): Do more like what mutt
2173 does so hopefully this'll fix bug #16363 and #16300.
2175 2001-12-21 Jeffrey Stedfast <fejj@ximian.com>
2177 * broken-date-parser.c (parse_broken_date): Completely
2178 rewritten. It is now a load faster and a heck of a lot more
2179 accurate, also now returns a time_t and sets the saveoffset
2180 variable rather than returning a new char* buffer for the normal
2181 camel date parser to re-parse. This saves a fair number of cpu
2184 * camel-mime-utils.c (header_decode_date): Cleanup the broken date
2187 2001-12-20 Jeffrey Stedfast <fejj@ximian.com>
2189 * camel-address.h: Change the prototype for camel_address_get_type
2190 to return a CamelType (since internally this is what it returns
2191 and also in case we decide to write a replacement for the current
2192 CamelObject it'd be easier to drop in).
2194 * camel-internet-address.h: Same but for
2195 camel_internet_address_get_type()
2197 * providers/smtp/camel-smtp-transport.c (smtp_send_to): Updated to
2198 use a CamelAddress of recipients.
2199 (smtp_send): Since smtp_send_to now takes a CamelAddress
2200 recipients argument, our lives have been simplified and we can now
2201 just concat To/Cc/Bcc into a recipients addr and send away.
2203 * providers/sendmail/camel-sendmail-transport.c
2204 (sendmail_send_to): Updated to use a CamelAddress of recipients.
2206 * camel-transport.c (camel_transport_send_to): Now takes a
2207 CamelAddress argument for the recipient list rather than a GList.
2209 2001-12-19 Jeffrey Stedfast <fejj@ximian.com>
2211 * providers/smtp/Makefile.am: Remove the providerdir variable.
2213 * providers/sendmail/Makefile.am: Same.
2215 2001-12-17 Jeffrey Stedfast <fejj@ximian.com>
2217 * camel-charset-map.c (camel_charset_iso_to_windows): New function
2218 to map ISO charsets to the Windows charsets.
2220 * camel-mime-part-utils.c (broken_windows_charset): Detect Windows
2222 (simple_data_wrapper_construct_from_parser): Simplify a tad and
2223 also check for iso-8859-* charsets that are really Windows
2224 charsets. Fixes bug #12631.
2226 2001-12-17 Dan Winship <danw@ximian.com>
2228 * Makefile.am (INCLUDES): define CAMEL_PROVIDERDIR to be the
2229 configure.in-defined camel_providerdir.
2231 * providers/Makefile.am: Remove some outdated comments
2233 * providers/imap/Makefile.am (camel_provider_LTLIBRARIES,
2234 camel_provider_DATA): renamed from provider_LTLIBRARIES,
2237 * providers/local/Makefile.am: Likewise
2239 * providers/nntp/Makefile.am: Likewise
2241 * providers/pop3/Makefile.am: Likewise
2243 * providers/sendmail/Makefile.am: Likewise
2245 * providers/smtp/Makefile.am: Likewise
2247 2001-12-16 Jeffrey Stedfast <fejj@ximian.com>
2249 * providers/imap/camel-imap-folder.c (get_content): Reverted my
2250 previous changes here since it doesn't actually work afterall.
2252 * providers/imap/camel-imap-wrapper.c (imap_wrapper_hydrate):
2253 Update to do uudecoding when appropriate.
2255 2001-12-16 Jeffrey Stedfast <fejj@ximian.com>
2257 * providers/imap/camel-imap-folder.c (get_content): Try to use the
2258 original boundary so luis will stop bugging me about "data
2259 corruption". Also preserve other params in the multipart
2260 content-type by dumping it to a string and setting it on the mime
2263 2001-12-14 Jeffrey Stedfast <fejj@ximian.com>
2265 * camel-filter-driver.c
2266 (camel_filter_driver_reset_filtered_count): Reset the
2267 filtered_count to zero.
2268 (camel_filter_driver_get_filtered_count): Return the private
2269 filtered_count value.
2270 (camel_filter_driver_filter_message): Increment the
2272 (camel_filter_driver_set_shell_exec_func): New function to set the
2274 (shell_exec): New ESExp filter action callback.
2276 2001-12-14 Jeffrey Stedfast <fejj@ximian.com>
2278 * camel-pgp-mime.c (camel_pgp_mime_part_verify): Removed
2279 x-inline-pgp-hack kludge because it doesn't work.
2280 (camel_pgp_mime_part_decrypt): Same.
2282 2001-12-13 Chris Toshok <toshok@ximian.com>
2284 * camel-data-cache.c: include stdlib.h (for alloca on freebsd) and
2285 only include alloca.h if HAVE_ALLOCA_H is defined.
2287 2001-12-11 Zbigniew Chyla <cyba@gnome.pl>
2291 * camel-charset-map.c: Added #include <errno.h>.
2293 * camel-charset-map-private.h:
2294 Recreated (following instructions from camel-charset-map.c)
2296 2001-12-11 Jeffrey Stedfast <fejj@ximian.com>
2298 * camel-object.c (camel_type_register): Keep a name-to-type hash
2299 so that we can make sure that the type has not yet been registered
2300 (prevents a race condition such as the one in bug #16559).
2302 * camel-service.c (camel_service_connect): Make sure that the
2303 connect_op is non-NULL before unregistering/unreffing it.
2305 2001-12-04 Jeffrey Stedfast <fejj@ximian.com>
2307 * camel-mime-utils.c (header_content_type_simple): Protect against
2308 either of the types being NULL.
2310 2001-12-05 Jeffrey Stedfast <fejj@ximian.com>
2312 * camel-mime-filter-basic.c (filter): If complete() allocates
2313 len+2 bytes for the out buffer, so should this. See bug #16371 for
2316 2001-12-05 Jeffrey Stedfast <fejj@ximian.com>
2318 * camel-sasl-digest-md5.c: iconv() returns a size_t, not an int.
2320 * camel-pgp-context.c: The return value of iconv() is a size_t,
2323 * camel-mime-part-utils.c (convert_buffer): Always use size_t args
2326 * camel-mime-filter-charset.c (complete): Always use size_t args
2330 * camel-mime-utils.c (header_address_fold): Make headerlen a
2331 size_t instead of an int.
2332 (header_fold): Same.
2333 (base64_encode_close): We should be returning a size_t and inlen
2334 should also be a size_t.
2335 (base64_encode_step): Same here.
2336 (base64_decode_step): Here too.
2337 (base64_encode_simple): And here...
2338 (base64_decode_simple): Same.
2339 (uuencode_close): We should also use size_t's here...
2340 (uuencode_step): And here too.
2341 (uudecode_step): And also here.
2342 (quoted_encode_close): Same idea here.
2343 (quoted_encode_step): Again here.
2344 (quoted_decode_step): Here too.
2345 (quoted_encode): Input length should be a size_t.
2346 (rfc2047_decode_word): Same.
2347 (g_string_append_len): Here too.
2349 (rfc2047_encode_word): "
2352 (rfc2184_decode): Use size_t's with iconv().
2353 (header_decode_param): Same.
2355 2001-12-09 Jon Trowbridge <trow@ximian.com>
2357 * camel-folder-summary.c: Add "NeedsReply" to the flag_names array
2358 for CAMEL_MESSAGE_NEEDS_REPLY.
2360 * camel-folder-summary.h: Added CAMEL_MESSAGE_NEEDS_REPLY flag.
2362 2001-12-07 Dan Winship <danw@ximian.com>
2364 * camel-mime-message.c (camel_mime_message_set_date): Fix the
2365 tm_gmtoff case (its sign is the opposite of "timezone"). Fixes
2368 2001-11-29 Jeffrey Stedfast <fejj@ximian.com>
2370 * camel-folder-search.c (search_body_contains): Don't use regex
2371 matching. Fixes bug #16227.
2373 * camel-mime-message.c (best_encoding): Check the content-object's
2374 mime type, not the mime part types. Should fix bug #15843.
2376 2001-11-27 Jeffrey Stedfast <fejj@ximian.com>
2378 * providers/imap/camel-imap-folder.c (get_content): Return NULL if
2379 construct_from_stream fails.
2380 (get_message): Same.
2381 (get_message_simple): Here too.
2382 (add_message_from_data): And here.
2384 2001-11-14 <NotZed@Ximian.com>
2386 * camel-vee-folder.c (folder_changed_remove_uid): Use the uid
2387 rather than vuid for unmatched. Also add the uid to unmatched if
2388 it wasn't in the unmatched_uids table at all.
2389 (folder_changed_change): If checking for added, if the new ones
2390 dont match, then try to add them to unmatched. Fixes #6893.
2392 * camel-folder-summary.c (camel_folder_summary_index): Change lock
2393 order, always summary_lock before ref_lock.
2394 (camel_folder_summary_array): "
2395 (camel_folder_summary_uid): "
2396 (camel_folder_summary_remove_uid): " Fixes a deadlock.
2398 2001-11-30 Not Zed <NotZed@Ximian.com>
2400 * providers/nntp/camel-nntp-*.c: Completely new implementation of
2403 Doesn't support subscriptions yet (lists all folders), but should
2404 be more reliable (faster?), and has an integrated cache.
2406 * camel-exception.c (camel_exception_new): Use e_memchunks for
2408 (camel_exception_free): Same.
2410 * camel-data-cache.[ch]: New object for managing on-disk caches of
2411 anything that can be stored in a camel-stream.
2413 * camel-file-utils.c (camel_file_util_mkdir): New function, just a
2414 nicer place to put this (than camel-store), should be removed from
2416 (camel_file_util_safe_filename): New function to url-encode a
2419 * camel-mime-parser.c (drop_states): New func to drop the parser
2420 state to initial state.
2421 (folder_scan_init_with_fd):
2422 (folder_scan_init_with_stream): Call above func to reset state if
2423 the stream is changed on us so we can change streams to reuse a
2426 2001-11-25 Not Zed <NotZed@Ximian.com>
2428 * providers/nntp/camel-nntp-folder.c (nntp_folder_get_message): If
2429 the uid doesn't have a ',' in it, fail to crash.
2431 * providers/nntp/camel-nntp-newsrc.c
2432 (camel_nntp_newsrc_article_is_read): check group != NULL before
2434 (camel_nntp_newsrc_get_highest_article_read): "
2435 (camel_nntp_newsrc_get_num_articles_read): "
2436 (camel_nntp_newsrc_mark_range_read): "
2438 * providers/nntp/camel-nntp-store.c
2439 (camel_nntp_store_get_overview_fmt): IF we dont have
2440 nntp_list_follows, dont try and get a list response.
2441 (nntp_store_get_folder_info): Set path part of folderinfo.
2443 2001-11-20 Jeffrey Stedfast <fejj@ximian.com>
2445 * providers/smtp/camel-smtp-transport.c (get_smtp_error_string):
2446 Check to see that errno is non-zero before returning
2447 g_strerror. If it's 0, then we have an unknown error.
2449 2001-11-26 Jeffrey Stedfast <fejj@ximian.com>
2451 * camel-mime-filter-basic.c: For the uudecoding mode, garble up
2452 the "begin <mode> <filename>" line before decoding.
2454 * camel-mime-part-utils.c
2455 (simple_data_wrapper_construct_from_parser): Add a uudecoder if
2456 the transfer encoding is x-uuencode.
2458 * camel-mime-part.c (write_to_stream): Handle x-uuencoded content
2461 2001-11-19 Jeffrey Stedfast <fejj@ximian.com>
2463 * camel-tcp-stream-ssl.c (stream_read): Added a check to see if
2464 the operation has been cancelled.
2465 (stream_write): Same.
2467 2001-11-19 Jeffrey Stedfast <fejj@ximian.com>
2469 Updates for compliance with rfc2231
2471 * camel-mime-utils.c (header_encode_param):
2472 camel_mime_special_table[c] & IS_ESAFE should have been
2473 !(camel_mime_special_table[c] & IS_ESAFE). Also added a few
2474 comments for how to improve the code at some future date.
2475 (header_decode_param): Now takes an argument rfc2184_part so our
2476 caller can get this information as well.
2477 (header_decode_param_list): Pass an rfc2184_part argument to
2478 header_decode_param and also added a few comments on where to
2479 improve on rfc2184/rfc2231 compliance.
2480 (rfc2047_decode_word): Updated to respect the updated ABNF syntax
2481 of rfc2047 encoded words, yay.
2483 2001-11-16 Jeffrey Stedfast <fejj@ximian.com>
2485 * providers/imap/camel-imap-utils.c (imap_parse_body): Abort if
2488 * camel-mime-filter-tohtml.c (camel_mime_filter_tohtml_new): New
2489 mime filter to convert plain text to html.
2491 2001-11-16 Jeffrey Stedfast <fejj@ximian.com>
2493 Since some mail clients like Outlook are broken, we need to set a
2494 name parameter on pgp signed and encrypted parts.
2496 * camel-pgp-mime.c (camel_pgp_mime_part_encrypt): Set a name
2498 (camel_pgp_mime_part_sign): Same.
2500 2001-11-14 Jeffrey Stedfast <fejj@ximian.com>
2502 * providers/imap/camel-imap-command.c
2503 (camel_imap_command_response): If we get a BYE response, call
2504 camel_service_disconnect() and set an exception. Also do the check
2505 for "* BYE" first instead of passing it off imap_read_untagged()
2506 since we'll just waste time in there mallocing left and right only
2507 to arrive at the single response line "* BYE" again :-)
2509 2001-11-13 <NotZed@Ximian.com>
2511 * camel-filter-search.c (get_source): If we have no source string,
2512 then use undefined, which should always evaluate to FALSE. Fix
2515 2001-11-12 Jeffrey Stedfast <fejj@ximian.com>
2517 * camel-store.c (camel_store_get_folder): Added a
2518 g_return_val_if_fail for folder_name != NULL.
2520 2001-11-08 Jeffrey Stedfast <fejj@ximian.com>
2522 * camel-pgp-context.c (crypto_exec_with_passwd): If any of the
2523 pipe()'s fail, clean up any pipes that may have succeeded. Also
2524 close the password fds.
2526 2001-11-09 <NotZed@Ximian.com>
2528 * providers/imap/camel-imap-store.c (imap_auth_loop): If we get a
2529 user cancel and that causes us to fail to authenticate, abort
2530 rather than loop forever. Fix for #14951.
2532 2001-11-06 Jeffrey Stedfast <fejj@ximian.com>
2534 * providers/imap/camel-imap-command.c
2535 (camel_imap_command_continuation): Now takes a command-length
2536 argument so we can 1) avoid duping the command string yet again,
2537 yay. 2) we now don't have to worry about embedded nul-chars
2538 screwing us over (we still need to avoid allowing them into the
2539 string but at least now it won't mess us up).
2541 * providers/imap/camel-imap-folder.c (do_append): Instead of
2542 appending a nul char to the end of the byte array and then passing
2543 that off as if it were a string to
2544 camel_imap_command_continuation, instead pass the byte-array
2545 length since that function now takes a length argument. Yay. Also
2546 encode any 8bit parts to avoid the possibility of sending embedded
2547 nul chars to the imap server.
2549 * providers/imap/camel-imap-store.c (try_auth): Updated to pass a
2550 command-length argument to camel_imap_command_continuation().
2552 2001-11-07 Jeffrey Stedfast <fejj@ximian.com>
2554 * camel-tcp-stream-ssl.c (save_ssl_cert): Oops, pass a mode
2555 argument to the open() call.
2557 * camel-tcp-stream-openssl.c (save_ssl_cert): Oops, pass a mode
2558 argument to the open() call.
2560 2001-11-07 Jeffrey Stedfast <fejj@ximian.com>
2562 * camel-pgp-mime.c (camel_pgp_mime_part_decrypt): Add code to
2563 kludge around any x-inline-pgp-hacks by prepending some content
2564 headers to the decrypted data.
2566 2001-11-02 Jeffrey Stedfast <fejj@ximian.com>
2568 * camel-data-wrapper.c (camel_data_wrapper_init): Initialize our
2570 (camel_data_wrapper_finalize): Destroy our private mutex.
2571 (write_to_stream): Lock around camel_stream_write_to_stream() so
2572 that we don't get 2 threads trying to read from our stream at the
2575 2001-11-01 <NotZed@Ximian.com>
2577 * camel-vee-folder.c (folder_changed_change): Move all searching
2578 operations outside of any locks except subfolder lock, same as
2579 build_folder. Fix for #14294.
2581 2001-10-31 <NotZed@Ximian.com>
2583 * providers/local/camel-spool-folder.c (spool_get_message): Same
2586 * providers/local/camel-maildir-folder.c (maildir_get_message):
2589 * providers/local/camel-mbox-folder.c (mbox_get_message): Set
2590 USER_CANCEL if failed due to EINTR.
2592 * camel-filter-driver.c (camel_filter_driver_filter_mbox): If
2593 construct from parser fails due to user cancel, set USER_CANCEL on
2596 * camel-mime-part.c (construct_from_parser): Return error if the
2597 parser had an io error.
2599 * camel-mime-message.c (construct_from_parser): Check error on
2600 parser/return error.
2602 * camel-mime-parser.c (folder_scan_init): Init error number.
2603 (camel_mime_parser_errno): New function, return errno of any io
2605 (folder_read): Set errno if a failure occured.
2606 (folder_seek): Same.
2607 (folder_scan_init_with_fd): Setup errno depeding on ok/failure.
2608 (folder_scan_init_with_stream): Same.
2610 2001-10-30 <NotZed@Ximian.com>
2612 * camel-operation.c (camel_operation_new): Dont setup cancel_fd.
2613 (camel_operation_cancel_fd): If cancel_fd not created, set it up.
2614 (camel_operation_cancel): Set cancel flag before sending message.
2615 (cancel_thread): Same.
2617 * camel-filter-driver.c (camel_filter_driver_filter_mbox): Make
2618 sure we unref the mimeparse when we're done (successfully). This
2619 was leaking an fd every get-mail! :(
2621 * camel-lock-client.c (camel_lock_helper_init): Close all fd's
2624 * providers/local/camel-mbox-folder.c (mbox_get_message): Remove
2625 the X-Evolution header before anyone else gets to see this private
2626 thing. Shoudl fix 11676 since we were inheriting flags from
2627 X-Evolution headers we didn't want to.
2629 * camel-folder-search.c (match_message): If we can't retrieve the
2630 message, ignore it, it can't match.
2632 * providers/imap/camel-imap-search.c
2633 (camel_imap_search_class_init): Setup parent class pointer.
2634 (imap_body_contains): If offline, just use the parent
2635 body_contains method which will get the messages and search them
2638 * providers/imap/camel-imap-folder.c (imap_search_by_expression,
2639 imap_search_by_uids): Remove offline check.
2641 2001-10-30 Dan Winship <danw@ximian.com>
2643 * camel-mime-part.c (free_headers): Fix this to match get_headers.
2645 2001-10-30 <NotZed@Ximian.com>
2647 * providers/local/camel-local-store.c (rename_folder): Dont try to
2648 move ibex if we have none.
2650 * camel-tcp-stream-openssl.c (stream_write): Fixed compilation
2653 2001-10-29 Jeffrey Stedfast <fejj@ximian.com>
2655 * camel-mime-utils.c (camel_mime_utils_init): Removed unused
2658 2001-10-30 <NotZed@Ximian.com>
2660 * camel-mime-utils.c (header_decode_mailbox): w(x) out some warnings.
2662 * providers/local/camel-local-summary.c
2663 (camel_local_summary_load): Remove the warning about not loading
2664 summary file - its a valid case for new folders.
2666 2001-10-29 Jeffrey Stedfast <fejj@ximian.com>
2668 * camel-tcp-stream-openssl.c (my_SSL_write): Removed.
2669 (stream_write): Keep looping (non-blocking case) if errno is
2670 EAGAIN, EINTR or EWOULDBLOCK. For NONBLOCKing I/O, sync up with
2671 CamelTcpStreamRaw. As with CamelTcpStreamRaw/SSL - make sure to
2672 write out everything before returning.
2673 (my_SSL_read): Removed.
2674 (stream_read): Just call ssl_error_to_errno() and check the errno
2675 values that we care about so we can keep the general look of all
2676 this stream code the same. Also when checking the return value of
2677 SSL_read, check for <0 instead of ==-1 since the man page for
2678 SSL_read doesn't say it will return -1 on fail, it just says <0.
2679 (stream_flush): Don't fsync() since syncing on a socket is a Bad
2682 * camel-tcp-stream-ssl.c (stream_write): Make sure we write out
2683 everything just like in camel-tcp-stream-raw.c.
2685 * camel-stream-buffer.c (camel_stream_buffer_gets): If
2686 camel_stream_read() returns -1, don't necessarily return -1 to our
2687 caller since it's possible that we did actually "read" some data
2688 (ie, we copied some pre-buffered data into the out buffer).
2690 * camel-stream-buffer.h: Removed CAMEL_STREAM_BUFFER_NEWLINE since
2691 it never got used anywhere and it isn't supported anyway.
2693 2001-10-30 <NotZed@Ximian.com>
2695 * providers/imap/camel-imap-store.c
2696 (parse_list_response_as_folder_info): If we get an empty name,
2697 then mark that as NoSelect. Workaround fix for #13239.
2699 2001-10-29 Dan Winship <danw@ximian.com>
2701 * providers/imap/camel-imap-folder.c (get_message_simple,
2702 imap_get_message): Set an X-Evolution-Source header on the
2703 returned message so replies come from the right identity.
2705 2001-10-29 <NotZed@Ximian.com>
2707 * camel-vee-folder.c (folder_changed_change): If we're not going
2708 to search on a changed uid, make sure we change out copy still.
2711 2001-10-29 Jeffrey Stedfast <fejj@ximian.com>
2713 * providers/imap/camel-imap-store.c (subscribe_folder): Don't emit
2714 a folder_subscribed signal if we are in the process of renaming
2716 (unsubscribe_folder): Same here but for the unsubscribe signal.
2717 (rename_folder): Unsubscribe from the folder being renamed and any
2718 subfolders it may have before actually renaming. Once the folder
2719 has been renamed, re-subscribe to it and it's subfolders with the
2722 * camel-store.c (camel_folder_info_build): Sort the folder info's
2723 before constructing the tree.
2725 * camel-mime-utils.c (header_decode_param): Minor fix - should
2726 have been using a strNcmp when checking if it was an rfc2047
2729 * camel-pgp-context.c (pgp_sign): Notify the user that PGP 2.6.x
2730 is no longer supported and use camel_exception_set() instead of
2731 setv() where appropriate.
2732 (pgp_clearsign): Same.
2733 (pgp_verify): And again here.
2734 (pgp_encrypt): Here too.
2735 (pgp_decrypt): And finally here.
2737 2001-10-29 Dan Winship <danw@ximian.com>
2739 * providers/imap/camel-imap-store.c (unsubscribe_folder): Don't
2740 free the hash table key if the folder wasn't found in the hash
2741 table. I'm not sure where the bug is/was that made it possible to
2742 add a folder to the tree after creating it failed, but now if that
2743 happens, it won't crash if you try to delete it again. (#11492)
2745 * camel-disco-store.c (camel_disco_store_status): if the service
2746 is being connected and thinks it's online, but the session is
2747 offline, then mark the service offline as well. Fixes 13683.
2749 2001-10-29 <NotZed@Ximian.com>
2751 * camel-mime-utils.c: Turn off w() -> warnings.
2753 * providers/imap/camel-imap-store.c (rename_folder): Also rename
2755 (rename_folder): Fix subscribed folders table with rename(s).
2757 * providers/imap/camel-imap-folder.c (imap_rename): Implement,
2758 rename the cache dir pointer.
2760 * providers/imap/camel-imap-message-cache.c
2761 (camel_imap_message_cache_set_path): New method to set the path
2762 used by a message cache.
2764 * camel-vee-store.c (build_info): Fix the 'is this a matching
2765 subfolder or subfolder' logic to match camel-store
2768 * camel-store.c (get_subfolders): Fix the 'is this a matching
2769 folder or subfolder' logic.
2771 2001-10-28 <NotZed@Ximian.com>
2773 * providers/local/camel-local-store.c (rename_folder): Changed to
2774 call ibex_move to rename it internally.
2776 * camel-store.c (camel_store_rename_folder): Use the right
2779 2001-10-28 Jeffrey Stedfast <fejj@ximian.com>
2781 * camel-stream-buffer.c (camel_stream_buffer_read_line): Make sure
2782 we've actually read data before checking if p[-] is '\r' or not.
2784 * camel-tcp-stream-raw.c (stream_write): Same.
2786 * camel-stream-fs.c (stream_write): If errno isn't EAGAIN, just
2787 exit with -1 and instead of using continue (which doesn't go to
2788 the top of the do-while thus making our logic suck), just set w to
2789 0. Still seems to be a bug in select() if it's telling us the
2790 socket is ready for data when it really isn't but oh well.
2792 2001-10-28 <NotZed@Ximian.com>
2794 * providers/local/camel-local-folder.c
2795 (camel_local_folder_construct): Use path not protocol as the path
2796 part of the uri of the folder_created event.
2798 * providers/local/camel-maildir-store.c (scan_dir): If FAST is
2799 set, dont try and scan for unread counts.
2801 * providers/local/camel-local-store.c (create_folder): Implement,
2802 just return the folderinfo of the folder matched, not all of it.
2804 * camel-store.c (camel_store_rename_folder): Rename the
2805 camelfolders before emitting the folderchanged event (otherwise
2806 vstore fails to pick up change.
2808 2001-10-27 <NotZed@Ximian.com>
2810 * camel-store.c (camel_store_init): Always use a default dir_sep
2813 * camel-store.h (struct _CamelStore): Added a dir_sep to the base
2814 store so rename and whatnot can work, temporary fix for mixed dir
2815 separator in folder name api's.
2817 * providers/imap/camel-imap-store.c (rename_folder): Finished
2819 (imap_connect_online): Also set the store's dir_sep here.
2820 (imap_connect_offline): "
2822 * providers/local/camel-local-folder.c (local_rename): Implement
2823 local rename of folder objects.
2825 2001-10-26 <NotZed@Ximian.com>
2827 * camel-vee-folder.c (camel_vee_folder_class_init): Hook into
2829 (vee_rename): Implement the veefolder rename function.
2830 (camel_vee_folder_class_init):
2831 (folder_changed_change): Kill a warning with a cast.
2833 * camel-vee-store.c (vee_rename_folder): Emit a folder_renamed
2834 event properly, also call parent to do some rename stuff.
2836 * camel-store.h: Added a CamelRenameInfo for the rename event.
2838 * camel-folder.c (camel_folder_rename): New function to rename a
2840 (camel_folder_class_init): Added a renamed event.
2841 (folder_rename): Default impl, set full_name, and set name
2842 assuming the dir separator is '/'.
2844 * camel-store.c (camel_store_class_init): Added folder_renamed
2846 (camel_store_rename_folder): Rename an active folder object if we
2847 have one, and update the folder table.
2848 (rename_folder): Make a default implementation that handles
2849 updating the folder tree.
2851 2001-10-26 Jeffrey Stedfast <fejj@ximian.com>
2853 * providers/imap/camel-imap-store.c (delete_folder): Don't bother
2854 checking ex since we can rely on the response being NULL on error.
2855 (rename_folder): Implemented.
2857 2001-10-26 Jeffrey Stedfast <fejj@ximian.com>
2859 * providers/imap/camel-imap-folder.c (imap_get_message): Check to
2860 make sure that the dataset is non-NULL before using and/or
2863 * camel-tcp-stream-raw.c (stream_write): Check for EWOULDBLOCK
2865 (stream_read): Same.
2866 (stream_flush): Return 0 always, fsync() and tcp sockets don't
2869 * providers/imap/camel-imap-message-cache.c
2870 (camel_imap_message_cache_get): Lets try putting a
2871 camel_stream_reset() here. Logic being that the stream may have
2872 been read from since it was cached and thus our caller may try
2873 reading from it and get no data from it since it is already at the
2874 EOS. This may fix bug #12943.
2876 2001-10-25 <NotZed@Ximian.com>
2878 * camel-search-private.c (utf8_get): Remove the stupid warning
2879 that should never have been there in the first place.
2881 * camel-sasl-digest-md5.c (digest_response): s/iconv/e_iconv/
2883 * camel-pgp-context.c (pgp_verify): "
2885 * camel-mime-utils.c (rfc2047_decode_word, rfc2047_decode_word,
2886 append_8bit, rfc2047_encode_word, rfc2184_decode,
2887 header_decode_param): "
2889 * camel-mime-part-utils.c (convert_buffer, convert_buffer): "
2891 * camel-mime-filter-charset.c (reset, complete, filter): "
2893 2001-10-24 <NotZed@Ximian.com>
2895 * camel-mime-filter-basic.c (complete): For qp decoding, if the
2896 data isn't really qp encoded, we could possible grow the buffer by
2897 upto 2 bytes above the input size, fix allocations/assertions
2900 * camel-vee-folder.c (folder_changed_change): If we're not
2901 autoupdate, only search for new matches against changed uid's that
2902 we dont already have.
2904 2001-10-24 Dan Winship <danw@ximian.com>
2906 * providers/imap/camel-imap-store.c (unsubscribe_folder): Don't
2907 let fi->name be NULL.
2909 2001-10-24 Jeffrey Stedfast <fejj@ximian.com>
2911 * camel-stream-fs.c (stream_read): Same as in the TcpStreamRaw code.
2912 (stream_write): And again here...
2914 * camel-tcp-stream-raw.c (stream_read): Handle the EAGAIN error
2916 (stream_write): Same here, this might fix the SMTP truncation
2919 2001-10-23 Dan Winship <danw@ximian.com>
2921 * camel-mime-utils.c (mail_list_magic): Remove an extra * in one
2922 of the regexps that glibc apparently doesn't mind but bsd does.
2924 2001-10-23 <NotZed@Ximian.com>
2926 * providers/local/camel-mbox-summary.c: made d(x) x recompile again.
2928 2001-10-22 <NotZed@Ximian.com>
2930 * providers/local/camel-spool-summary.c (summary_rebuild): No, use
2931 Storing, as the other code does :p
2932 (spool_summary_check): Check for consistency.
2934 2001-10-22 Jon Trowbridge <trow@ximian.com>
2936 * providers/local/camel-spool-summary.c (summary_rebuild):
2937 s/summarising/summarizing/.
2938 (spool_summary_check): s/summarise/summarize/.
2940 2001-10-22 Jeffrey Stedfast <fejj@ximian.com>
2942 * camel-pgp-mime.c (camel_pgp_mime_part_verify): If we are
2943 kludging around a inline-pgp signed part, do some charset
2944 conversion to protect any 8bit text.
2946 2001-10-22 <NotZed@Ximian.com>
2948 * camel-filter-search.c, camel-folder-search.c (check_header): Use
2949 search_type_mlist for mailing list searches.
2951 * camel.c (camel_init): call camel-mime-utils-init func.
2953 * camel-mime-utils.c: Changed mail mail_list_magic to include a
2954 domain part, also pre-compile all the patterns. They are all
2955 backward compatible except List-Id: which now uses the
2956 mail-address-like <list-name.host.name> part rather than the
2957 plain-text part (which might've been blank anyway).
2958 (camel_mime_utils_init): Initialisation function to setup any
2959 static data required by camel-mime-utils at run-time. We now
2960 setup the base64/charset class tables here, so it doesn't need to
2962 (camel_mime_special_table, camel_mime_base64_rank): No longer
2963 statically initialise these.
2964 (main): Removed + the tests at the end of the file.
2965 (header_raw_check_mailing_list): Dont compile regex's here,
2966 already compiled in utils_init. Use the regex patterns to remove
2967 leading <'s from addresses. Also, if there is a domain part
2968 matched, add that after a '@' is added.
2970 * camel-search-private.c (camel_search_header_match): Match check
2971 against all addresses in a multiple address match. Should fix
2973 (camel_search_header_match): Oops, missing i=0.
2974 (camel_search_header_match): Added SEARCH_TYPE_MLIST for mlist
2975 search types. It ignores the domain part if either (but not both)
2976 of the values dont have it.
2978 2001-10-22 Dan Winship <danw@ximian.com>
2980 * camel-pgp-mime.c (camel_pgp_mime_part_verify): Add a hack: if
2981 the multipart/signed part has a "x-inline-pgp-hack" parameter in
2982 its Content-Type, don't pass the MIME headers as part of the data
2985 2001-10-22 Rodrigo Moya <rodrigo@ximian.com>
2987 * Makefile.am: added $GNOME_INCLUDEDIR to INCLUDES, needed for latest
2988 libgnome, which install headers in $(prefix)/gnome-1.0
2990 2001-10-21 Jeffrey Stedfast <fejj@ximian.com>
2992 * camel-mime-part-utils.c
2993 (simple_data_wrapper_construct_from_parser): Only do the rawtext
2994 checks if the part is a text part, otherwise don't bother wasting
2997 * camel-store.c (camel_folder_info_build): Updated comments to
2998 make the code a bit more clear.
3000 2001-10-21 <NotZed@Ximian.com>
3002 * camel-store.c (CS_CLASS): Dont do the macro stuff - basically so
3003 you can actually debug calls.
3004 (camel_store_uri_cmp): New function to compare store objects.
3006 * camel-vee-folder.c (vee_folder_add_info): oops, dont free the
3007 vuid, since its alloca'd now.
3008 (folder_changed_change): Kill a compile warning.
3010 2001-10-20 <NotZed@Ximian.com>
3012 * camel-folder.c (move_messages_to): If no exception supplied, use
3014 (move_message_to): Set the seen flag also when we delete it.
3016 2001-10-19 Jeffrey Stedfast <fejj@ximian.com>
3018 * camel-vtrash-folder.c (vtrash_move_messages_to): If the
3019 destination folder is the vfolder source folder, then
3020 set_message_flags on it.
3022 2001-10-19 <NotZed@Ximian.com>
3024 * camel-session.c (register_provider): When registering provider,
3025 translate all strings.
3027 * camel-vee-folder.c (camel_vee_folder_remove_folder): Lock the
3028 right lock for unmatched subfolder list stuff. If the sub folder
3029 is deleted & part of unmatched, or the last ref to the sub folder
3030 is gone from unmatched, blow it away completely from unmatched,
3031 but only do it once.
3032 (vee_folder_remove_folder): Added arg to kill unmatched
3033 unconditionally. Also handle deleted folders, always remove
3035 (folder_changed_change): Lock subfolder lock for entirety of
3036 operation, and also check to see if the subfolder is still there
3037 before doing any fancy work (incase it got removed while we were
3038 waiting to execute).
3039 (folder_changed_change_uid): Use alloca for vuid, and not
3041 (vee_search_by_expression): Dont use sprintf for vuid.
3042 (vee_search_by_uids): "
3043 (vee_folder_add_info): "
3044 (folder_changed_remove_uid): "
3045 (folder_changed_change): "
3046 (folder_changed_change_uid): Also check folder_unmatched for
3047 changed uid's so we properly update/propagate unmatched changes.
3048 (folder_changed_change): Ok, so dont hold the subfolder lock for
3049 the whole duration of the changed event, although we probably
3050 should, requires a recursive mutex.
3051 (folder_changed_change): Change logic, we always add changed stuff
3052 if it now matches, but dont remove it unless its auto-remove, only
3053 propagate changes for it.
3054 (vee_set_message_flags): Call parent method after doing our work.
3055 (vee_set_message_user_flag): Same here.
3057 2001-10-18 Jeffrey Stedfast <fejj@ximian.com>
3059 * camel-mime-part-utils.c
3060 (simple_data_wrapper_construct_from_parser): If a charset isn't
3061 specified or claims to be utf-8, check the validity of the text
3062 and if it's invalid, set the rawtext bit to TRUE. If the charset
3063 is x-unknown or some other x- charset, always set the rawtext bit
3066 2001-10-18 <NotZed@Ximian.com>
3068 * camel-store.c (camel_store_unsubscribe_folder): If we are
3069 unsubscribing from a folder we have loaded, set the folder
3070 deleted, as with the delete_folder case.
3072 * providers/(imap|local|pop3|sendmail|smtp)/Makefile.am: Added
3073 CAMEL_CFLAGS so we get the right iconv stuff, patch from Yanko
3074 Kaneti <yaneti@declera.com>
3076 2001-10-18 Jeffrey Stedfast <fejj@ximian.com>
3078 * camel-pgp-context.c (crypto_exec_with_passwd): Make sure the
3081 2001-10-18 Jeffrey Stedfast <fejj@ximian.com>
3083 * providers/imap/camel-imap-message-cache.c (insert_finish): Flush
3084 the stream here, not sure it really matters but it might
3085 (hopefully) fix bug #12943.
3087 * camel-pgp-context.c (crypto_exec_with_passwd): Make
3090 * providers/local/camel-local-provider.c: String cleanup for bug
3093 * providers/imap/camel-imap-folder.c (imap_sync_online): Fix my
3094 Cyrus imapd workaround...instead of checking to see if info->flags
3095 == FLAGGED, just check to see if it contains any IMAP flags.
3097 2001-10-17 <NotZed@Ximian.com>
3099 * providers/local/camel-maildir-folder.c
3100 (camel_maildir_folder_new): Use '.' as the inbox name for filter
3103 * camel-store.c (camel_folder_info_clone): New function to clone a
3106 2001-10-17 Jeffrey Stedfast <fejj@ximian.com>
3108 * providers/local/camel-mh-folder.c (mh_append_message): Same as
3109 maildir and mbox append-message.
3111 * providers/local/camel-maildir-folder.c (maildir_append_message):
3112 Same as mbox append.
3114 * camel-exception.c (camel_exception_set): Make sure the new
3115 description isn't the same as the old description pointer before
3116 freeing the old one.
3117 (camel_exception_setv): Don't free the old description until we
3118 set the new one this way we can reuse the old description in the
3121 * providers/local/camel-mbox-folder.c (mbox_append_message): If
3122 errno == EINTR, then we got a user-cancel so set the exception
3123 appropriately so that we don't make the user shit his pants.
3125 * camel-filter-driver.c (do_copy): Add an optimization for when
3126 destination folder is the same as the source folder.
3128 2001-10-17 <NotZed@Ximian.com>
3130 * providers/imap/camel-imap-store.c (get_folder_info_online):
3131 (parse_list_response_as_folder_info): Patch from Danw, Use unread
3132 count of -1 to mark unflagged messages. Make sure any folder we
3133 dont lookup explicitly is marked as -1. Should fix #9947 and
3136 * providers/local/camel-mbox-summary.c (mbox_summary_sync): Only
3137 touch the summary if the timestamp or size changed.
3139 2001-10-17 Jeffrey Stedfast <fejj@ximian.com>
3141 * camel-filter-driver.c (camel_filter_driver_filter_message): Set
3142 the DELETED flag on directly on the info if the source folder
3143 doesn't have summary capability.
3145 2001-10-17 Not Zed <NotZed@Ximian.com>
3147 * camel-tcp-stream-raw.c (stream_write): As below.
3149 * camel-stream-fs.c (stream_write): If not checking cancellation,
3150 make sure we write out everything asked of us.
3152 2001-10-16 Jeffrey Stedfast <fejj@ximian.com>
3154 * camel-pgp-context.c (pgp_verify): Rearange the order of the gpg
3155 options slightly otherwise it might try to use "--no-tty" as the
3156 filename to verify :-)
3158 * camel-object.[c,h]: If CAMEL_DEBUG is defined, print some useful
3161 * providers/imap/camel-imap-store.c (delete_folder): Fixed an
3164 * camel-uid-cache.c (camel_uid_cache_new): Make sure that the
3165 parent directory exists before trying to open the filename, if it
3168 2001-10-16 <NotZed@Ximian.com>
3170 * camel-mime-utils.c (header_address_decode): If no content, dont
3171 try and decode further and spit meaningless warnings.
3173 2001-10-16 Jeffrey Stedfast <fejj@ximian.com>
3175 * camel-filter-driver.c (do_flag): Only perform the operation on
3176 the folder if the folder has summary capability, else just poke
3177 the info directly. Fixes the "Filters don't work" bug.
3179 (do_colour): And here too.
3181 2001-10-15 Jeffrey Stedfast <fejj@ximian.com>
3183 * camel-stream-fs.c (stream_read): Save the errno before calling
3184 fcntl so fcntl doesn't overwrite errno in case of a previous
3186 (stream_write): Same.
3188 2001-10-13 Jeffrey Stedfast <fejj@ximian.com>
3190 * providers/smtp/camel-smtp-transport.c (smtp_data): Replace the
3191 Bcc headers in a single location and don't flush the data unless
3192 the write was successful.
3194 2001-10-12 Jeffrey Stedfast <fejj@ximian.com>
3196 * Makefile.am: Remove the stripheader filter from the build.
3198 * camel-mime-filter-stripheader.[c,h]: Removed.
3200 * providers/smtp/camel-smtp-transport.c (smtp_data): Check the
3201 return value of camel_stream_flush to make sure it flushed the
3202 data successfully before continuing. Don't use the stripheader
3203 filter, it was completely broken - instead remove the header and
3204 set it again after we send.
3206 2001-10-12 <NotZed@Ximian.com>
3208 * camel-vee-folder.c (camel_vee_folder_remove_folder): Unhook from
3209 all events before removing folder.
3210 (camel_vee_folder_add_folder): Hook onto delete event.
3211 (camel_vee_folder_finalise): Unhook from deleted event for suibfolder.
3212 (subfolder_deleted): When the folder is deleted, remove it from
3213 the vfolder automagically.
3215 2001-10-11 <NotZed@Ximian.com>
3217 * camel-vee-folder.c (vee_search_by_uids): convert the uids list
3218 to a subset appropriate for each subfolder before trying to search
3221 * camel-charset-map.[ch]: Removed charset/locale charset lookup
3222 and iconv_open/close functions, moved to gal. Fixed all callers.
3224 2001-10-11 Jeffrey Stedfast <fejj@ximian.com>
3226 * camel-tcp-stream-ssl.c (ssl_cert_is_saved): Same.
3228 * camel-tcp-stream-openssl.c (ssl_cert_is_saved): Instead of
3229 opening the file, stat it and make sure that it belongs to us.
3231 2001-10-10 Jeffrey Stedfast <fejj@ximian.com>
3233 * camel-tcp-stream-openssl.c (ssl_verify): Same hack as below.
3235 * camel-tcp-stream-ssl.c (ssl_bad_cert): Hack around the fact that
3236 adding a cert to nss's certdb seems to not work.
3238 2001-10-10 <NotZed@Ximian.com>
3240 * camel-vee-folder.c (vee_sync): Only re-build the folder if we're
3241 expunging. Also only clear out the changed folders list if we're
3242 expungung and everything worked.
3244 2001-10-10 Jeffrey Stedfast <fejj@ximian.com>
3246 * camel-charset-map.c (camel_charset_map_init): Added a hack for
3249 2001-10-10 <NotZed@Ximian.com>
3251 * providers/local/camel-maildir-store.c (scan_dir): oops, we want
3252 get_unread_message_count, not get_message_count!
3254 2001-10-09 <NotZed@Ximian.com>
3256 * camel-service.c (camel_service_disconnect): Duplicate connect
3257 code that unregisters a cancel op if we created one.
3259 * camel-operation.c (camel_operation_progress): Another go at
3260 getting the logic right again. Make transients only update after
3261 5 seconds (CAMEL_OPERATION_TRANSIENT_DELAY)
3262 (camel_operation_end): Likewise.
3264 * providers/local/camel-spool-folder.c (spool_search_by_uids):
3267 * providers/imap/camel-imap-search.c (imap_body_contains): If
3268 searching a sub-set of the total message count, then use a UID
3269 range to search only specific messages.
3271 * camel-vee-folder.c (vee_folder_change_match): Removed.
3272 (folder_changed_add_uid): Helper func for changed code.
3273 (folder_changed_remove_uid): "
3274 (folder_changed_change_uid): "
3275 (folder_changed): Rewritten. Supports proper auto-updating of
3276 changes, but not removals till a sync occurs.
3277 (vee_search_by_uids): Implement.
3278 (folder_changed): Changed to call an async threaded function to do
3279 the actual folder updating.
3281 * camel-folder-summary.c (camel_flag_list_copy): New func to copy
3282 a whole list of flags.
3283 (camel_tag_list_copy): New func to copy a whole list of flags.
3285 * providers/imap/camel-imap-folder.c (imap_search_by_uids):
3288 * providers/local/camel-local-folder.c (local_search_by_uids):
3291 * camel-folder.c (camel_folder_search_by_uids): New function,
3292 search a subset of uid's.
3293 (search_by_uids): Default impl, return error.
3295 2001-10-08 Dan Winship <danw@ximian.com>
3297 * camel-folder.h (struct _CamelFolder): replace the ever-growing
3298 list of gbooleans with a single guint32 for flags.
3300 * camel-folder.c: Update folder flag setting/checking.
3302 * providers/pop3/camel-pop3-folder.c (camel_pop3_folder_init):
3303 * providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new):
3304 * providers/local/camel-spool-folder.c (spool_init,
3305 camel_spool_folder_new):
3306 * providers/local/camel-maildir-folder.c (camel_maildir_folder_new):
3307 * providers/local/camel-local-folder.c (local_init):
3308 * providers/imap/camel-imap-folder.c (camel_imap_folder_init,
3309 camel_imap_folder_new):
3310 * camel-vtrash-folder.c (camel_vtrash_folder_init):
3311 * camel-vee-folder.c (camel_vee_folder_init):
3312 * camel-digest-folder.c (camel_digest_folder_init): update folder
3315 2001-10-07 Dan Winship <danw@ximian.com>
3317 * providers/imap/camel-imap-store.c (get_folder_online): Unlock
3318 the store before returning error. (noted by NotZed)
3320 2001-10-06 Jeffrey Stedfast <fejj@ximian.com>
3322 * camel-mime-utils.c (header_decode_text): Fix a slight error in
3323 logic. Just because the last word was an encoded word doesn't mean
3324 we ignore the lwsp padding, we only ignore it if the last word and
3325 *this* word are encoded.
3327 2001-10-06 Jeffrey Stedfast <fejj@ximian.com>
3329 * camel-mime-filter-basic.c (filter): Implemented uuencoding and
3331 (complete): Implemented uuencoding and decoding.
3333 * camel-mime-utils.c (uuencode_close): New function to flush the
3335 (uuencode_step): New function to uuencode a block of data.
3337 2001-10-05 <NotZed@Ximian.com>
3339 * providers/imap/camel-imap-store.c (subscribe_folder): Use a
3340 folder_subscribed event rather than a folder_created one.
3341 (unsubscribe_folder): Similarly for unsubscribed/deleted.
3342 (create_folder): Emit a folder_created event on the folders we
3343 added. Not sure hsould probably check which ones are new and
3344 which ones are just existing ones?
3345 (delete_folder): Emit a folder_deletd event when we've deleted the
3346 folder. Part of fix for #11831.
3348 * camel-store.c (camel_store_class_init): Added
3349 folder_subscribed/unsubscribed events.
3351 2001-10-05 Jeffrey Stedfast <fejj@ximian.com>
3353 * camel-service.c (camel_service_finalize): Turn off warnings.
3356 * camel-sasl.c (sasl_challenge): Turn off warnings.
3358 * camel-tcp-stream.c (tcp_connect): Turn off warnings.
3359 (tcp_getsockopt): Same.
3360 (tcp_setsockopt): Here too.
3361 (tcp_get_socket): And here.
3363 * camel-folder.c (folder_sync): Turn off warnings.
3365 (append_message): Here too.
3366 (get_message): And here.
3367 (search_by_expression): And again here.
3368 (folder_changed): Here too.
3370 * camel-store.c (get_folder): Set an exception and turn off
3371 debugging g_warnings.
3372 (create_folder): Same.
3373 (delete_folder): Here too.
3374 (rename_folder): And here.
3375 (get_trash): And here.
3376 (get_folder_info): Same.
3377 (free_folder_info): And again here.
3378 (camel_folder_info_build): Here too.
3379 (folder_subscribed): Same.
3380 (subscribe_folder): Here too.
3381 (unsubscribe_folder): And here.
3383 2001-10-05 <NotZed@Ximian.com>
3385 * camel-mime-utils.c (header_decode_mailbox): Try harder to get
3386 broken names out of addresses. Unencoded ,'s in names will still
3387 break it, but well what can you do eh?
3388 (header_decode_mailbox): Always add .'s into address we've scanned
3389 past a '.', even if we can't decode the next part. Fix for some
3392 2001-10-04 <NotZed@Ximian.com>
3394 * camel-store.c (camel_store_delete_folder): Change the order of
3395 execution slightly. We delete the folder first, then call the
3396 classes delete folder, then cleanup the hashtable afterwards.
3397 This is so deletes of vfolders work, since vee-store uses the
3398 folder hashtable to store all of is vfolders :-/
3400 2001-10-04 Jeffrey Stedfast <fejj@ximian.com>
3402 * camel-service.c (camel_service_connect): Unregister the
3403 operation before unreffing it.
3405 2001-10-03 <NotZed@Ximian.com>
3407 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
3408 Remove now unused 'recents' array/freeing func.
3410 * camel-object.c (camel_object_trigger_event): Oops, always run
3411 the prep function, even if we have no hooks listening. Causes
3412 incoming imap recents to get ignored bythe camel-folder filter
3415 * providers/local/camel-local-folder.c (local_sync): Dont
3416 explicitly save metadata, its saved in summary_sync.
3418 * providers/local/camel-mh-summary.c: Call superclass.
3419 (mh_summary_check): Dont save ibex.
3421 * providers/local/camel-maildir-summary.c: Call superclass method.
3422 (maildir_summary_check): Dont save ibex explictly.
3424 * providers/local/camel-mbox-summary.c: Call super-class sync when
3425 done, saves summary/ibex, etc.
3426 (mbox_summary_check): Dont save ibex.
3427 (mbox_summary_sync): Call summary_check rather than trying to
3428 update from our known position.
3430 * providers/local/camel-local-summary.c
3431 (camel_local_summary_check): Dont save the summary or index here.
3432 (local_summary_sync): Save the summary/index here.
3434 * camel-search-private.c (camel_search_build_match_regex): Added
3435 MATCH_NEWLINE flag, -> REG_NEWLINE.
3437 * camel-lock-helper.c: Include <string.h> to kill some warnings.
3439 * camel-filter-search.c (get_full_header): Put \n's between each
3441 (header_full_regex): Dont drop the first argument to the command
3443 (header_full_regex): Set match_newline for building regex.
3444 (body_regex): And here too. These all fix #9877.
3446 2001-10-03 Jeffrey Stedfast <fejj@ximian.com>
3448 * camel-store.c (camel_store_delete_folder): Call
3449 camel_folder_delete() on the folder if it's "alive".
3451 * camel-folder.c (camel_folder_delete): Mark the folder as
3452 deleted, perform any folder specific cleanup and emit the deleted
3454 (camel_folder_sync): Only sync the folder if it hasn't been
3456 (camel_folder_expunge): Same.
3458 2001-10-03 Dan Winship <danw@ximian.com>
3460 * providers/local/camel-local-provider.c (local_url_equal):
3461 Strange are the ways of alloca. Fixes 11543.
3463 2001-10-02 Jeffrey Stedfast <fejj@ximian.com>
3465 * camel-tcp-stream-ssl.c (ssl_bad_cert): Import the certificate if
3466 the user accepts it.
3468 2001-10-02 <NotZed@Ximian.com>
3470 * providers/local/camel-local-provider.c (local_url_hash,
3471 local_url_equal): for hashing/comparing local url's, we ignore
3472 trailing /'s in paths (maybe shuld handle multiple /'s too).
3473 (camel_provider_module_init): Use local_url_hash/equal for all
3476 * camel-sasl-digest-md5.c (digest_response): Change to
3477 camel_charset_iconv_open/close.
3479 * camel-pgp-context.c (pgp_verify): Change to
3480 camel_charset_iconv_open/close.
3482 * camel-mime-part-utils.c (convert_buffer): Change to
3483 camel_charset_iconv_open().
3485 * camel-mime-filter-charset.c
3486 (camel_mime_filter_charset_new_convert, finalise): Change to
3487 camel_charset_iconv_open, etc.
3489 * camel-mime-utils.c: Use the camel_charset_iconv_open/close()
3490 functions to open/close it.
3492 * camel-charset-map.c (camel_charset_iconv_open): New function,
3493 wrap iconv_open, so we can cache ic's.
3494 (camel_charset_iconv_close): Likewise for close.
3495 (camel_charset_map_init,shutdown): Init/free iconv cache.
3497 2001-10-02 Jeffrey Stedfast <fejj@ximian.com>
3499 * camel-charset-map.c (camel_charset_to_iconv): Revert my
3500 x-unknown special-case hack - this may mask other problems.
3502 * camel-mime-utils.c (rfc2047_decode_word): If the iconv
3503 conversion fails, for whatever reason, retry using the user's
3506 2001-10-02 <NotZed@Ximian.com>
3508 * providers/local/camel-maildir-store.c (get_folder_info): Go back
3509 to using the store url's path, not the toplevel_dir thing.
3511 * camel-operation.c (camel_operation_progress): Fix the progress
3512 logic, so we dont update too often.
3514 * camel-object.c (camel_object_get_hooks): Change the lock to a
3516 (camel_object_hook_event): Maintain list length of hook list.
3517 (camel_object_unhook_event): "
3518 (camel_object_unhook_event): If we are in an event, just mark the
3519 pair as removed, without removing it.
3520 (camel_object_trigger_event): Before running events, copy the
3521 list, and also ignore 'removed' events. After running events, if
3522 we're all out of events, then free up any pending-removed events.
3523 (camel_object_free_hooks): Add some new assertions on the state of
3525 Removed the #error if threads not defined. It _should_ actually
3526 work without threads.
3527 (camel_object_free_hooks): Free mutex when done.
3529 2001-10-01 Jeffrey Stedfast <fejj@ximian.com>
3531 * providers/imap/camel-imap-store.c (delete_folder): Remove any
3532 cached messages that belonged to the deleted folder.
3533 (subscribe_folder): Don't ever let the info->name be NULL and
3534 don't use the stupid concat kludge to generate the URL, just use a
3535 CamelURL to do it. This way we don't risk breaking stuff by having
3536 a url like imap://fejj@imap//folder
3538 * camel-charset-map.c (camel_charset_to_iconv): If the charset is
3539 x-unknown, return the locale_charset.
3541 2001-10-01 Dan Winship <danw@ximian.com>
3543 * camel-provider.h: Fix up the provider flags to specify things
3544 more completely so we don't have to hardcode provider names in the
3547 * providers/local/camel-local-provider.c: MH, mbox, and Maildir
3548 are LOCAL. MH and mbox are no longer STORAGE by the new
3551 * camel-session.c (vee_provider): The vfolder store is a STORAGE.
3553 2001-10-01 Dan Winship <danw@ximian.com>
3555 * providers/local/camel-local-store.c (construct): Don't munge the
3556 URL; CamelSession's caching relies on it not changing. Instead,
3557 add a toplevel_dir field to CamelLocalStore, and set that to the
3558 path, but always ending with /.
3559 (camel_local_store_finalize): Free toplevel_dir
3560 (camel_local_store_get_toplevel_dir): Return toplevel_dir rather
3563 * providers/local/*: Lots of s/url->path/toplevel_dir/
3565 * providers/local/camel-spool-store.c (construct): Likewise, don't
3566 try to strip a trailing / from url->path here, but I didn't make
3567 the corresponding toplevel_dir change, because there's no good
3568 reason someone should expect "/var/spool/mail/danw/" to work since
3569 that's not a directory.
3571 * providers/pop3/camel-pop3-folder.c (pop3_refresh_info): if STAT
3572 returns 0, don't bother sending UIDL. Speeds things up slightly
3573 and also works around a bug in a particular random POP server.
3576 2001-09-29 Jeffrey Stedfast <fejj@ximian.com>
3578 * camel-pgp-context.c (pgp_sign): Add --no-secmem-warning and
3579 --no-greeting to the gpg command-line options.
3580 (pgp_clearsign): Same.
3581 (pgp_verify): Here too.
3582 (pgp_encrypt): And here.
3583 (pgp_decrypt): And finally here.
3585 2001-09-28 Jeffrey Stedfast <fejj@ximian.com>
3587 * camel-filter-search.c (get_source): Same here.
3589 * camel-mime-message.c (camel_mime_message_set_source): Don't use
3590 the e_url_shroud hack, use CamelURL functions instead.
3592 2001-09-28 Jeffrey Stedfast <fejj@ximian.com>
3594 * providers/nntp/camel-nntp-provider.c
3595 (camel_provider_module_init): Init the nntp url hash and url_equal
3598 * providers/sendmail/camel-sendmail-provider.c
3599 (camel_provider_module_init): Init the sendmail url hash and
3600 url_equal functions.
3602 * providers/smtp/camel-smtp-provider.c
3603 (camel_provider_module_init): Init the smtp url hash and url_equal
3606 * providers/pop3/camel-pop3-provider.c
3607 (camel_provider_module_init): Init the pop3 url hash and url_equal
3610 * providers/imap/camel-imap-provider.c
3611 (camel_provider_module_init): Init the imap url hash and url_equal
3614 * providers/local/camel-local-provider.c
3615 (camel_provider_module_init): Init the local url hash and
3616 url_equal functions.
3618 * camel-session.c (camel_session_class_init): Init the vfolder url
3619 hash and url_equal functions.
3621 * camel-provider.h: Added url_hash and url_equal function pointers
3624 * camel-vtrash-folder.c (vtrash_move_messages_to): Oops, a
3625 CamelFolder is not a CamelFolderClass.
3627 2001-09-28 Dan Winship <danw@ximian.com>
3629 * camel-tcp-stream-openssl.c (ssl_error_to_errno): Make this take
3630 an SSL * instead of a CamelTcpStreamSSL *, since it can get called
3631 from open_ssl_connection, when the CamelTcpStreamSSL isn't set up
3632 right yet. Fixes a crash on connection failure.
3634 2001-09-27 Dan Winship <danw@ximian.com>
3636 * providers/imap/camel-imap-folder.c
3637 (camel_imap_folder_fetch_data): Grab the store's command_lock
3638 before grabbing the folder's cache_lock to prevent deadlock if
3639 another thread is processing an EXPUNGE response.
3641 * providers/imap/camel-imap-folder.c
3642 (imap_expunge_uids_resyncing): Fix a compiler warning that might
3643 point out a real bug...
3645 * providers/imap/camel-imap-folder.c (get_content): and one that
3648 2001-09-27 <NotZed@Ximian.com>
3650 * camel-service.c (camel_service_connect): Dont re-register the
3651 connect_op if we got it by calling 'operation_registered', which
3652 returns an already-registered one.
3653 (camel_service_disconnect): Likewise here. This removes all the
3654 re-registered warnings.
3656 * camel-object.c (camel_object_unref): Fill the finalised data
3657 with nonsense, rather than 0's - more easily detect bad data.
3658 (camel_object_new): Clear instance data when we retrieve it off
3661 * camel-object.h (_CamelObject): Added an event lock pointer for
3662 uh, locking event stuff. Also change the hooklist hashtable into
3663 a list. Changed all the code to handle it. Result: thread-safe
3664 events, event-hooks, and save memory too, and SHOULD FINALLY FIX
3665 THAT UNREAD COUNT PROBLEM.
3667 2001-09-27 Jeffrey Stedfast <fejj@ximian.com>
3669 * camel-pgp-mime.c (camel_pgp_mime_part_decrypt): CRLF decode the
3670 stream before parsing it into a MIME part. This fixes bug #10521.
3672 * camel-store.c: Remove the old folder from the vTrash folder.
3674 2001-09-27 Dan Winship <danw@ximian.com>
3676 * camel-service.c: Change "gboolean connected" to
3677 "CamelServiceConnectionStatus status", which can be disconnected,
3678 connecting, connected, or disconnecting.
3679 (camel_service_init, camel_service_finalize): create/destroy the
3680 connect_op_lock. Refer to service->status rather than
3682 (camel_service_connect): When connecting, note the current
3683 operation (and create a new one if there's none registered) and
3684 mark the connection "connecting" until we succeed or fail.
3685 (camel_service_disconnect): Likewise in reverse.
3686 (camel_service_cancel_connect): New function to cancel a
3688 (cancel_connect): Default implementation: Call
3689 camel_operation_cancel on the connect_op.
3691 * camel-disco-store.c (disco_connect): Only call
3692 CamelRemoteStore's connect func if we're online.
3693 (disco_cancel_connect): Fall back to offline if a connection gets
3695 (disco_get_folder_info): Kludge: call connect explicitly before
3696 deciding whether to do the online or offline version, so if the
3697 connect fails, we fall back correctly.
3699 * camel-session.c (camel_session_get_service_connected):
3700 s/svc->connected/svc->status/
3702 * camel-remote-store.c (camel_remote_store_finalise):
3703 Change service->connected check to service->status check.
3704 (remote_connect): Don't set service->connected here:
3705 camel_service_connect() itself does that.
3707 * camel-operation.c (camel_operation_registered): Deal with the
3708 possibility that there's no registered op.
3710 2001-09-26 <NotZed@Ximian.com>
3712 * camel-filter-driver.c (camel_filter_driver_filter_message): If
3713 we get a search error, just abort, dont try and fall back and copy
3715 (camel_filter_driver_filter_message): Make sure we ALWAYS use
3716 exceptions for important things - like moving messages to inbox!
3717 (camel_filter_driver_filter_message): If we have the source
3718 folder, use camel_folder_set_message_flags rather then poking the
3719 info directly, which skips changed events. This means filtering
3720 immediate doesn't lose changed events.
3721 (do_flag): Same here.
3722 (do_colour): Same thing but using set_tag.
3723 (do_score): Same again.
3724 (camel_filter_driver_filter_folder): Use ~0 as the 'set' arg to
3725 set_flags, just saves typing.
3726 (open_folder): We cache folders that we couldn't open as well as
3727 those ones we could. Use magic token FOLDER_INVALID =
3728 (void *)~0 as the marker.
3729 (close_folder): Handle FOLDER_INVALID case properly.
3731 2001-09-26 Jeffrey Stedfast <fejj@ximian.com>
3733 * camel-mime-message.c
3734 (camel_mime_message_get_part_by_content_id): New function to
3735 convenience Larry ;-)
3736 (check_content_id): Oops, return !found instead of found. This
3737 callback has to return whether or not to keep searching, not
3738 whether or not it found what it's looking for. Do'h!
3740 * camel-pgp-mime.c (camel_pgp_mime_is_rfc2015_signed): block out
3741 some code if ENABLE_PEDANTIC_PGPMIME is not defined.
3743 2001-09-26 <NotZed@Ximian.com>
3745 * camel-vee-store.c: Emptied VeeStorePrivate, member wasn't used.
3747 * camel-vee-folder.c (camel_vee_folder_set_expression): Lock
3748 changed list separately.
3749 (camel_vee_folder_remove_folder): "
3750 (camel_vee_folder_set_folders): Use changed_lock for changed list.
3751 (vee_refresh_info): Use changed_lock, also just grab the list,
3752 reset it in the lock, and do the work unlocked.
3753 (vee_sync): Use changed lock for changed list.
3754 (folder_changed): ". All this kills a deadlock with sync/expunge.
3756 * camel-private.h (CamelVeeFolderPrivate): Added a new lock for
3757 the folders-changed list.
3758 (CamelVeeStorePrivate): Removed, defined in camel-vee-store.c,
3759 thanks to a pedantic.
3761 2001-09-26 Jeffrey Stedfast <fejj@ximian.com>
3763 * Makefile.am: Fix Ettore's fix.
3765 2001-09-25 Jeffrey Stedfast <fejj@ximian.com>
3767 * camel-pgp-context.c (camel_pgp_context_new): No longer takes a
3769 (pgp_sign): Only uncache the passphrase on failure.
3770 (pgp_clearsign): Same.
3771 (pgp_encrypt): Here too.
3772 (pgp_decrypt): And here.
3773 (pass_free): New function to zero the passphrase before freeing
3776 2001-09-25 Ettore Perazzoli <ettore@ximian.com>
3778 [Patch for Automake 1.5 compatibility pointed out by Richard
3779 Boulton <richard@tartarus.org>, as per #9258.]
3781 * providers/nntp/Makefile.am: Remove some commented parts that
3782 make Automake 1.5 choke.
3784 * Makefile.am (camel-lock-helper): Add $(EXEEXT) for Automake 1.5
3787 2001-09-25 <NotZed@Ximian.com>
3789 * camel-folder.c (get_unread_message_count): Only unref info if we
3792 * camel-operation.c (camel_operation_unref): Fix for !threads
3793 enabled not ccompiling.
3794 (camel_operation_ref): Assert refcount > 0.
3795 (struct _CamelOperation): Removed the lock. On further
3796 investigation, I dont think this will always work, the
3797 registration operations assume that a lookup in the
3798 operation_active table will return a ref, that will remain valid
3799 until we ref it, which needn't be the case. So now i'm using a
3800 single global lock, since we'd need to do that for unref anyway,
3801 and every operation is fast & memory-bound. Changed all the code
3803 (camel_operation_progress_count): Since the code is identical,
3804 just call progress() for now.
3805 (camel_operation_register): No longer refcount, use unref to
3806 check/clear the active table.
3807 (camel_operation_unregister): Same here.
3808 (camel_operation_unref): Check if operation is in active table, if
3811 2001-09-25 Dan Winship <danw@ximian.com>
3813 * camel-tcp-stream-openssl.c (my_SSL_read, my_SSL_write): call
3814 SSL_read/write, looping on SSL_ERROR_WANT_READ/WRITE. I'm sure
3815 there's a perfectly good reason that the API works this way. No,
3817 (stream_read, stream_write): use my_SSL_read and my_SSL_write.
3818 Fixes at least ximian 8593, and probably 6024 and maybe 10366,
3819 at least for OpenSSL. There may be a parallel NSS bug?
3821 2001-09-25 <NotZed@Ximian.com>
3823 * camel-stream-buffer.c (stream_write_all): A "safe write"
3824 function that always writes out all data asked of it, till
3826 (stream_write): Rewritten. What was i on when i wrote that
3827 originally, how did it ever work with tcp streams ...
3829 2001-09-24 <NotZed@Ximian.com>
3831 * camel-folder.c (append_message): Set the exception to
3832 FOLDER_INVALID rather than making out it worked. A fix for #7025.
3833 (search_by_expression): Here too.
3835 * providers/imap/camel-imap-folder.c (imap_update_summary): In the
3836 'lose' case, free messages, not fetch_data twice!
3838 * camel-filter-search.c (check_header): If the type is encoded,
3839 get the fallback charset from the message content-type.
3841 * camel-mime-part-utils.c (check_html_charset): Dont check for
3842 charset==null before calling charset_to_iconv.
3843 (simple_data_wrapper_construct_from_parser): "
3845 * camel-mime-message.c (process_header): Try use content-type
3846 charset param as the fallback charset.
3848 * camel-charset-map.c (camel_charset_to_iconv): Handle name ==
3851 * camel-folder-summary.c (camel_folder_summary_format_address):
3852 (camel_folder_summary_format_string): Made private again, removed
3853 #warning about it. Renamed to s/camel_folder//.
3854 (summary_format_string): Take default charset param.
3855 (camel_message_info_new_from_header, message_info_new): Decode
3856 content-type field to get the charset parameter to use as the
3857 default charset for decoding strings.
3859 * camel-search-private.c (camel_search_header_match): Pass NULL as
3860 the charset, the locale charset is always tried.
3861 (camel_search_header_match): Supply a default_charset parameter to
3862 be used with TYPE_ENCODED params.
3864 * camel-mime-utils.c
3865 (header_param): get rid of the g_strcasecmp crap.
3866 (header_set_param): Same here.
3867 (header_decode_param_list): And here.
3868 (header_decode_text): Totally rewritten. 30% of its size. If the
3869 word is not rfc2047 encoded, always try default_charset if
3870 supplied, if that fails, try locale charset if it exists, if that
3871 fails then assume latin1/7 bit ascii.
3872 (append_8bit): Changed to return FALSE if we can't convert for
3873 whatever reason, and dont append anything.
3875 * camel-mime-part.h (struct _CamelMimePart): Move content_type and
3876 headers out of the 'private' section.
3878 * camel-mime-part.c (get_headers): Dont do any conversion on the
3880 (process_header): Get the content-type charset as the fallback
3881 charset for decode_string.
3882 (construct_from_parser): IF we have a content-type header, process
3883 it before doing anything else, so we have access to a fallback
3884 charset for invalid headers.
3886 2001-09-23 Jeffrey Stedfast <fejj@ximian.com>
3888 * camel-tcp-stream-openssl.c (ssl_verify): Don't even try to alert
3889 the user if the session isn't interactive.
3890 (errlib_error_to_errno): Make the default errno EINTR so that we
3891 act just like CamelTcpStreamSSL.
3893 * camel-pgp-context.c (pgp_sign): When the password is not
3894 provided, set the exception to USER_CANCEL.
3895 (pgp_clearsign): Same.
3896 (pgp_encrypt): And here.
3897 (pgp_decrypt): Here too.
3899 2001-09-21 <NotZed@Ximian.com>
3901 * camel-store.c (create_folder): Set the exception if
3902 create_folder isn't implemented.
3904 2001-09-21 Jeffrey Stedfast <fejj@ximian.com>
3906 * providers/imap/camel-imap-store.c (create_folder): Go back to
3907 not using camel_folder_info_build() here because this seems to
3908 break folder creation (returning nodes from the root path when it
3911 2001-09-21 <NotZed@Ximian.com>
3913 * camel-vee-store.c (vee_get_folder_info): Force a refresh of
3914 vfolders before storing their count. This essentially makes
3915 'get_folderinfo' refresh all vfolders, so that get-mail works as
3918 * camel-vee-folder.c (camel_vee_folder_finalise): Clear lists.
3919 (folder_changed): If we're not autoupdating the folder, then
3920 add this folder to the list of 'changed' folders for this vfolder.
3921 (camel_vee_folder_set_expression): Reset the folders_changed list.
3922 (camel_vee_folder_remove_folder): Remove the folder from the
3923 folders_changed list.
3924 (camel_vee_folder_set_folders): If we have a folder already, but
3925 its changed, use this opportunity to update it.
3926 (vee_sync): Remove any synced folders from the folders_changed
3928 (vee_refresh_info): Refresh folder, re-run queries on any changed
3931 2001-09-20 <NotZed@Ximian.com>
3933 * camel-folder-summary.c (camel_folder_summary_header_load): New
3934 function to just load the summary. Not much use yet, until unread
3935 counts are stored in the summary (which now looks like too much
3938 * camel-mime-utils.c (header_decode_mailbox): Crappy fix for
3939 stupid mailers. If we get 'name b. name <foo>' then treat it as
3940 '"name b. name" <foo>'. See 8147.
3941 (header_decode_mailbox): Another fix for really broken mailers
3942 that have things that look like addresses followed by <address>
3944 (rfc2047_encode_word): Escape ??= to avoid some bizarre warning
3947 * providers/local/camel-local-folder.c
3948 (camel_local_folder_construct): Setup unread count properly, and
3949 also setup the url properly.
3951 * providers/local/camel-maildir-store.c (camel_folder_info_new):
3952 Build the path on the folderinfo.
3953 (scan_dir): Dont include empty host part in url for folder.
3954 (scan_dir): Lookup folder counts for any folders we currenty have
3956 (scan_dir): If we dont have the folder open, then scan the 'new'
3957 and 'cur' folders for new and unread messages to count instead.
3959 * providers/local/camel-spool-store.c (get_folder_info): If we
3960 have this folder open, then set unread from the folder itself.
3961 (get_folder_info): Change the INBOX path to not include the
3964 * providers/local/camel-spool-folder.c
3965 (camel_spool_folder_construct): Fix path.
3966 (camel_spool_folder_construct): Properly setup the url field when
3967 we say we've got a new folder created.
3969 * providers/imap/camel-imap-store.c (unsubscribe_folder): Build
3972 * camel-store.c (camel_folder_info_build_path): Prepend / to path.
3974 * camel-vee-folder.c (camel_vee_folder_construct): Use macro for
3975 unmatched folder name.
3976 (camel_vee_folder_new): "
3978 * camel-vee-store.c (vee_get_folder_info): Use macro for unmatched
3980 (vee_delete_folder): "
3981 (vee_rename_folder): "
3982 (vee_get_folder): Prepend / onto path.
3983 (vee_delete_folder): Setup path in folderinfo.
3984 (vee_get_folder_info): Fix path in folderinfo.
3986 * camel-vee-folder.h (CAMEL_UNMATCHED_NAME): New define for
3987 unmatched (internal) name.
3989 2001-09-20 Jeffrey Stedfast <fejj@ximian.com>
3991 * providers/local/camel-spool-folder.c
3992 (camel_spool_folder_construct): And finally here.
3994 * providers/local/camel-local-folder.c
3995 (camel_local_folder_construct): And here.
3997 * camel-vee-store.c (vee_get_folder): ANd here too.
3998 (vee_get_folder_info): And here.
4000 * providers/imap/camel-imap-store.c (create_folder): Use
4001 camel_folder_info_build() and do better error checking.
4002 (subscribe_folder): Set the path on the folder info.
4004 * camel-store.c (camel_folder_info_build): Set the folder-info
4005 path if it hasn't already been set by the caller.
4006 (camel_folder_info_free): Free the path.
4008 * camel-store.h: Added a path member to the FolderInfo type.
4010 2001-09-20 Dan Winship <danw@ximian.com>
4012 * camel-charset-map.c (camel_charset_to_iconv): Nuke debug warning.
4014 2001-09-19 Jeffrey Stedfast <fejj@ximian.com>
4016 * camel-pgp-context.c: Updated exception strings to be more clear.
4018 * camel-pgp-mime.c (pgp_mime_part_sign_restore_part): Stupid
4019 mistake, fixes bug #9975.
4021 * camel-tcp-stream-ssl.c (ssl_bad_cert): Oops, don't fail if
4022 `data' isn't a CamelService...cuz it's not supposed to be! It's a
4023 CamelTcpStreamSSL object...doh!
4025 2001-09-19 <NotZed@Ximian.com>
4027 * General cleanup of camel debug printfs.
4029 * camel-lock.c (camel_lock_fcntl): Changed to return 'success' if
4030 the error indicates file locking isn't supported on this
4031 filesystem. Still return a warning just incase (if its the first
4032 time). Might fix a lot of reported bugs.
4034 * providers/local/camel-spool-store.c (get_folder_info): Dont
4035 include the empty // host part in the uri. This 'breaks' the
4038 2001-09-18 Jeffrey Stedfast <fejj@ximian.com>
4040 * camel-mime-utils.c: Match mailing-list header List-Owner.
4042 2001-09-18 <NotZed@Ximian.com>
4044 * camel-vee-store.c (vee_get_folder): Fix the uri genereated for
4045 the folderinfo for the folder_created event.
4047 * camel-store.h: Added 'total' to CamelFolderInfo.
4049 2000-09-18 <NotZed@Ximian.com>
4051 * providers/local/camel-maildir-folder.c
4052 (camel_maildir_folder_new): If filter inbox is set on the store,
4053 and we're opening inbox '', then enable filtering on new messages.
4055 * providers/local/camel-local-folder.c
4056 (camel_local_folder_construct): After loading the summary, check
4057 it, and only abort if that fails. Also maintain the changes
4060 * providers/local/camel-local-summary.c
4061 (camel_local_summary_load): Remove summary_check code from here.
4062 (camel_local_summary_check): Sync index/summary here, if we were
4065 * providers/local/camel-spool-folder.c
4066 (camel_spool_folder_new): If we have filter-new-messages-on-inbox
4067 set and we just opened inbox, turn on filtering on this folder.
4068 (camel_spool_folder_construct): Keep track of changes for the
4069 folder, so that filter-new-messages works right (?)
4071 * providers/local/camel-spool-store.c (get_folder): Pass 'INBOX'
4072 as the folder name, not the path.
4074 * camel-folder-search.c (search_not): Modified patch from
4075 <peterw@ximian.com> since the summary is messageinfo's, not
4078 ** Ok so the problem with the stuff below is that maildir/spool
4079 'summary_load' throws away all events, including recents, joy eh?
4081 * providers/local/camel-maildir-summary.c (maildir_summary_check):
4082 Add new messages to the recent changeinfo.
4084 * providers/local/camel-spool-summary.c: Mark 'new' message as
4085 recent, for later processing if required (i.e. 'filter new
4088 * camel-store.c (construct): new function, cascade up construct
4089 method and check for 'filter' param, and set accordingly for any
4090 one that might want it.
4092 * providers/imap/camel-imap-store.c (construct): map the
4093 param_filter_inbox flag to the store->flags as
4094 CAMEL_STORE_FILTER_INBOX.
4096 * camel-store.h (CAMEL_STORE_FILTER_INBOX): new flag to tell it to
4099 * providers/imap/camel-imap-folder.h: Removed do_filtering flag
4100 from CamelImapFolder.
4102 * providers/imap/camel-imap-folder.c (imap_update_summary): Remove
4103 the 'recents' parameter, use the 'changes' parameter instead to
4105 (camel_imap_folder_changed): Changed for update_summary api
4106 change. Now always just emit the changed event if we have any
4107 changes to report, filtering code removed, handled upstream.
4109 (filter_free): Removed old filtering code.
4110 (camel_imap_folder_new): Set the filter_recent flag on the folder
4111 if we're the inbox and filtering of inbox is enabled.
4113 * camel-folder.c (folder_changed): If we have 'recent' messages,
4114 and are set to filter recents, then freeze the folder and launch a
4115 thread to do the processing (or similar if threading not enabled).
4116 (thaw): Make sure we emit the changed signal outside of owning the
4117 lock and if things have changed. Also, no longer bother
4118 downgrading folder_changed events to message_changed events.
4120 * camel-folder.h (struct _CamelFolder): Added filter_recent flag
4121 -> signifies all recent messages in folder should be filtered.
4123 * camel-session.c: (camel_session_thread_msg_new,
4124 camel_session_thread_msg_free, camel_session_thread_queue,
4125 camel_session_thread_wait): code to handle async operations as
4126 part of camel processing.
4127 (camel_session_finalise): free thread_lock, destroy thread, active
4129 (camel_session_init): init thread, active hash, etc.
4130 (camel_session_class_init): Init virtual functions.
4131 (session_thread_msg_new, session_thread_msg_free,
4132 session_thread_destroy, session_thread_received,
4133 session_thread_queue, session_thread_wait): default implementation
4134 of session threads stuff.
4136 2001-09-17 <NotZed@Ximian.com>
4138 * camel-folder.c (camel_folder_change_info_recent_uid): New
4139 function to add a 'recent' uid to the change info.
4140 (camel_folder_change_info_clear): Clear recent list.
4141 (camel_folder_change_info_free): Free recent list.
4142 (camel_folder_change_info_new): Setup recent list.
4144 * camel-folder.h: Added a uid_recent item to the folder_changed
4147 * providers/local/camel-maildir-store.c (scan_dir): Free new in
4150 * providers/local/camel-local-provider.c: Add local config entries
4151 to filter on new messages in spool and maildir provider.
4153 * camel-vee-folder.c (vee_folder_construct): Remove the assertion
4154 which stops ? in names from being allowed.
4156 2001-09-18 Dan Winship <danw@ximian.com>
4158 * camel-data-wrapper.c (camel_data_wrapper_is_offline): Virtualize
4161 * camel-medium.c (is_offline): A medium is offline if its content
4164 * camel-multipart.c (is_offline): A multipart is offline if any of
4165 its subparts are offline.
4167 2001-09-18 Jeffrey Stedfast <fejj@ximian.com>
4169 * camel-charset-map.c: Added korean charset conversion.
4171 2001-09-17 Jeffrey Stedfast <fejj@ximian.com>
4173 * providers/imap/camel-imap-store.c (delete_folder): Don't process
4174 the ImapResponse data, we don't want to block forever on data we
4176 (create_folder): Use get_folders_online() instead of
4177 get_folder_info_online().
4179 * camel-folder.c: Reverted previous changes.
4181 2001-09-17 JP Rosevear <jpr@ximian.com>
4183 * Makefile.am: Helpful install-exec-hook debugging output
4185 2001-09-16 Jeffrey Stedfast <fejj@ximian.com>
4187 * camel-folder.c (camel_folder_get_uri): New function to get the
4189 (get_uri): Default implementation.
4191 2001-09-14 <NotZed@Ximian.com>
4193 * camel-vee-folder.c (camel_vee_folder_set_folders): New function,
4194 set the complete list of folders on a vfolder, all at once.
4195 (camel_vee_folder_set_expression): If we set the query to be the
4196 same thing, dont do anything.
4198 * camel-vee-store.c (camel_vee_store_init): Turn off vtrash for
4201 * camel-store.c (camel_store_init): Enable vtrash by default via
4203 (camel_store_get_trash): REturn NULL if the store doesn't support
4205 (init_trash): Dont init if store doesn't support vtrash.
4207 * camel-store.h: Add a new flags CAMEL_STORE_VTRASH -> store
4210 2001-09-13 <NotZed@Ximian.com>
4212 * camel-vee-store.c (vee_get_folder_info): Implement.
4213 (build_info): Used to build a folder record from the folders
4215 (vee_delete_folder): Implemented, remove folder from hashtable.
4216 (vee_rename_folder): Implemented, remove old folder from
4217 hashtable, add new one and rename its guts too.
4219 * camel-store.c (camel_store_rename_folder): Do nothing if we're
4220 not asked to actually change names. Also dont do the renamed
4221 cache check till after we've called the subclass.
4222 (camel_store_delete_folder): Call the subclass delete firs,t then
4223 make sure the cache is right.
4225 * camel-vee-folder.c (vee_folder_construct): Remove support for
4226 name?query syntax to setup vfolder. Abort if such syntax is used.
4227 (camel_vee_folder_new): Removed code that handles ? syntax, etc.
4228 (vee_folder_build_folder): Handle unset expression, treat it as an
4230 (camel_vee_folder_set_expression): Oops, actually set the
4233 * camel-vtrash-folder.c (camel_vtrash_folder_new): Dont use
4234 name?query syntax to setup vfolder, but set the expression
4235 directly. Also fixes a small memleak.
4237 2001-09-12 <NotZed@Ximian.com>
4239 * camel-store.c (camel_store_delete_folder): Fixed warnings with a
4241 (camel_store_rename_folder): "
4243 2001-09-14 Jeffrey Stedfast <fejj@ximian.com>
4245 * camel-url.c (camel_url_set_param): Use g_datalist_set_data_full
4246 so that the data will be free'd when we clear the list.
4248 2001-09-14 Dan Winship <danw@ximian.com>
4250 * camel-file-utils.c (camel_file_util_encode_string,
4251 camel_file_util_decode_string): Don't claim failure when
4252 reading/writing the empty string.
4254 2001-09-14 JP Rosevear <jpr@ximian.com>
4256 * Makefile.am: use install hook instead of install rule to
4257 guarantee we run after installation
4259 2001-09-13 Jeffrey Stedfast <fejj@ximian.com>
4261 * camel-filter-driver.c (camel_filter_driver_filter_folder): Don't
4262 reuse the exception if it has already been set.
4263 (camel_filter_driver_filter_message): Same here. Also use the new
4264 return value from camel_filter_search_match().
4266 * camel-filter-search.c (camel_filter_search_match): Return an
4267 integer (matched, no-match, or error).
4269 * providers/local/camel-mbox-folder.c (mbox_append_message): Do
4270 error-checking based on function return values rather than
4271 exceptions as it's possible for them to be NULL.
4272 (mbox_get_message): Same.
4274 * providers/imap/camel-imap-folder.c (imap_append_offline): Pass
4275 an exception to the cache.
4276 (imap_append_online): Same.
4277 (imap_append_resyncing): Here too.
4278 (imap_copy_offline): And here.
4279 (handle_copyuid): Pass NULL as the exception here...
4280 (parse_fetch_response): And finally here.
4282 * providers/imap/camel-imap-message-cache.c
4283 (camel_imap_message_cache_insert):
4285 (camel_imap_message_cache_insert_stream):
4286 (camel_imap_message_cache_insert_wrapper):
4287 (camel_imap_message_cache_copy): Take an exception argument and
4290 * camel-mime-part-utils.c
4291 (simple_data_wrapper_construct_from_parser): Convert the charset
4292 to the iconv-friendly name.
4294 * camel-charset-map.c (camel_charset_to_iconv): Add code to
4295 convert windows-[cp]#### charsets to their iconv-friendly format
4298 * camel-pgp-context.c (crypto_exec_with_passwd): Return -1 on
4301 2001-09-12 Larry Ewing <lewing@ximian.com>
4303 * camel-filter-driver.c (camel_filter_driver_filter_mbox): free
4304 the source url in the nonfailure case.
4306 2001-09-12 <NotZed@Ximian.com>
4308 * camel-folder-search.h: Change the 'not' virtual method from an
4309 immediate e-sexp function to a non-immediate one, which is what it
4312 * camel-folder-search.c (search_not): Implement a 'not' function
4313 ourselves. If 'not' on a vector value, then not over all items
4315 (builtings[]): Change the 'not' builtin to be a non-immediate
4318 2001-09-12 Jeffrey Stedfast <fejj@ximian.com>
4320 * camel-filter-driver.c (camel_filter_driver_filter_mbox): Unref
4323 2001-09-10 <NotZed@Ximian.com>
4325 * providers/local/camel-maildir-store.c (get_folder_info): Pass in
4326 a hashtalbe used for finding visited nodes.
4329 (inode_free): Helper functions for visited node checks, hashes on
4330 inode + device number.
4331 (scan_dir): Dont re-visited directories we've already visited, use
4332 inodes + device number.
4333 Also, if the folder doesn't contain cur/tmp/new, mark it as
4334 noselect, but continue to recurse folders, if asked.
4336 * camel-folder.c (move_messages_to): Progress reporting while
4339 * camel-store.c (camel_store_delete_folder): Make sure we remove
4340 the folder from our vtrash, if we have it in our opened set, and
4341 also remove it from our hashtable.
4342 (camel_store_rename_folder): Remove the old folder name from the
4343 folder cahce, if it is there.
4345 2001-09-10 Jeffrey Stedfast <fejj@ximian.com>
4347 * camel-charset-map.c (camel_charset_to_iconv): Get rid of the
4348 g_warning, we no longer really need that.
4350 2001-09-10 <NotZed@Ximian.com>
4352 * providers/imap/camel-imap-store.c (camel_imap_msg_new): Forgot
4353 to return the newly allocated msg.
4355 2001-09-08 Not Zed <NotZed@Ximian.com>
4357 * providers/local/camel-spool-summary.c (spool_summary_sync_full):
4360 * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
4363 * camel-tcp-stream-raw.c (stream_read): Save errno around fcntl
4364 call in cancellable read case. Also, loop while we get EINTR.
4365 This might fix some weird reconnect behaviour with pop.
4368 2001-09-07 Jeffrey Stedfast <fejj@ximian.com>
4370 * camel-tcp-stream-ssl.c (ssl_bad_cert): #if 0 out the code that
4371 was hopefully going to fix bug #5325 because the functions I used
4372 seem to have been deprecated. *sigh*.
4374 * camel-remote-store.c (camel_remote_store_finalise): Disconnect
4375 from the service here otherwise the locks will be destroyed and by
4376 the time CamelService finalizes we'll crash or hang.
4378 * providers/smtp/camel-smtp-transport.c (smtp_data): Make sure to
4379 unref the mime filters when we finish with them.
4381 2001-09-07 Ettore Perazzoli <ettore@ximian.com>
4383 * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
4384 s/Synchronising/Synchronizing/.
4385 (mbox_summary_sync_quick): Likewise.
4386 (summary_rebuild): s/Summarising/Summarizing/.
4388 2001-09-07 Jeffrey Stedfast <fejj@ximian.com>
4390 * camel-multipart.c (camel_multipart_set_boundary): Take a const
4391 char * instead of a char *.
4393 * camel-mime-part-utils.c
4394 (camel_mime_part_construct_content_from_parser): Reuse the
4395 original boundary instead of generating our own.
4397 2001-09-06 <NotZed@Ximian.com>
4399 * providers/imap/camel-imap-folder.c (filter_proc): Thread
4400 function to perform filtering.
4401 (filter_free): Free the filter object.
4402 (camel_imap_folder_changed): If we have threads enabled, then
4403 queue up a request to perform filtering. For bug #4422.
4405 * providers/imap/camel-imap-store.c (camel_imap_msg_new): Create a
4407 (camel_imap_msg_queue): Queue an 'imap msg'.
4408 (async_received): Handle receiving of imap msg in async thread.
4409 (async_destroy): Handle destroying of imap msg.
4410 (camel_imap_store_finalize): Destroy thread when done.
4411 (camel_imap_store_init): Setup thread.
4413 * providers/imap/camel-imap-store.h: Added an ethread to the
4414 store, for async processing.
4416 2001-09-06 Jeffrey Stedfast <fejj@ximian.com>
4418 * camel-remote-store.c (remote_recv_line): Use
4419 camel_stream_buffer_read_line() instead of duplicationing the
4420 functionality. Also, the previous way was broken anyway. What if a
4421 line was the same length as our buffer? Then we'd go and read a
4422 second line and a third and so on until they weren't the same
4423 length, leaving \r's in the middle of the buffer.
4425 2001-09-06 Dan Winship <danw@ximian.com>
4427 * providers/pop3/camel-pop3-store.c (pop3_get_response): Fix this
4428 to always set an exception if it returns POP3_FAIL, as documented.
4430 * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
4433 2001-09-06 Jeffrey Stedfast <fejj@ximian.com>
4435 * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
4436 Set an exception on POP3_FAIL as well.
4438 2001-09-06 Dan Winship <danw@ximian.com>
4440 * providers/pop3/camel-pop3-provider.c: #ifdef out the "delete
4441 after N days" option in pop3_conf_entries, since it won't be done
4444 2001-09-04 Jeffrey Stedfast <fejj@ximian.com>
4446 * camel-remote-store.c (remote_disconnect): Too late to sync the
4447 folders here... if this is gonna happen at all it should be done
4450 * camel-service.c (camel_service_finalize): Do a clean disconnect.
4452 2001-08-30 Jeffrey Stedfast <fejj@ximian.com>
4454 * providers/local/camel-spool-store.c (get_inbox): Return the
4455 default folder (ie. INBOX) rather than saying we don't support an
4458 * camel-tcp-stream-ssl.c: #include pk11func.h.
4459 (ssl_bad_cert): Use CERT_GetDefaultCertDB.
4461 2001-08-29 Jeffrey Stedfast <fejj@ximian.com>
4463 * camel-smime-context.c (smime_sign_prepare): Do the same here as
4464 what we did in the pgp code a moment ago.
4465 (smime_sign_restore): And again here.
4466 (smime_sign): And update thise code to pass in the address of the
4467 encodings list when restoring parts.
4469 * camel-pgp-mime.c (pgp_mime_part_sign_prepare_part): Special-case
4470 message/rfc822 mime parts - don't set an encoding on these,
4471 instead traverse into their subparts and set the encodings for
4473 (pgp_mime_part_sign_restore_part): Reverse any operations done to
4474 message/rfc822 parts in the above prepare_part() function and also
4475 take a pointer to a GSList of encodings instead of just a GSList
4476 so we can properly keep track of which encoding we are on.
4477 (camel_pgp_mime_part_sign): Pass in the address to the encodings
4478 list when restoring parts.
4480 2001-08-29 Not Zed <NotZed@Ximian.com>
4482 * providers/pop3/camel-pop3-folder.c (pop3_sync): Add progress
4483 reporting to deleting messages. Dont change the calculation to a
4484 bloody float. Bug #6189.
4486 2001-08-28 Jeffrey Stedfast <fejj@ximian.com>
4488 * camel-pgp-context.c (crypto_exec_with_passwd): Initialize buf
4489 and diag_buf to NULL, hopefully this fixes the crash if the
4491 (pgp_encrypt): Argh. What was I thinking? Don't use "-r recipient"
4492 as an argument, instead use "-r" and "recipient" as 2 separate
4493 arguments to pgp. This might fix the "gpg only encrypts to my
4496 2001-08-28 Peter Williams <peterw@ximian.com>
4498 * providers/imap/camel-imap-store.c (create_folder): Whoops.
4499 Double-free and FMR = bad.
4501 * camel-remote-store.c (remote_send_string): Don't reveal the
4502 user's IMAP password if their server supports LITERALPLUS. Also
4503 add some more dashes to make it line up nicely :-)
4505 2001-08-28 Jeffrey Stedfast <fejj@ximian.com>
4507 * camel-tcp-stream-ssl.c (ssl_bad_cert): If the user accepts the
4508 certificate, add it to the database as a trusted CA.
4510 2001-08-28 Peter Williams <peterw@ximian.com>
4512 * camel-object.c (camel_object_unref): Make the locking more
4513 fine-grained on destruction; specifically, don't hold the
4514 type lock while calling the finalize functions.
4516 2001-08-27 Jeffrey Stedfast <fejj@ximian.com>
4518 * providers/local/camel-local-provider.c: Changed the
4519 description/names of some of the local providers to try and
4520 clarify the meanings.
4522 * providers/pop3/camel-pop3-provider.c: Simplify the POP
4523 description - we want short but sweet.
4525 * providers/imap/camel-imap-provider.c: s/IMAPv4/IMAP
4527 2001-08-27 Not Zed <NotZed@Ximian.com>
4529 * camel-mime-part-utils.c (convert_buffer): re-read the iconv man
4530 page, and treat the return value properly. It returns the number
4531 of non-reversible conversions performed, not the number of output
4533 (check_html_charset): Changed to just take a buffer of data, and
4534 not the mime parser.
4535 (simple_data_wrapper_construct_from_parser): Since we dont need
4536 the charset till we have all the data, search for the charset
4537 after we've read the data, if we have html data with no charset in
4539 (simple_data_wrapper_construct_from_parser): Remove the
4540 seekable_source stuff.
4542 * Re-apply patches from before.
4544 2001-08-25 Not Zed <NotZed@Ximian.com>
4546 ["Summarising" and "Synchronising" are spelt with a "s" in
4549 * providers/local/camel-mbox-summary.c (mbox_summary_sync_quick):
4550 s/Synchronizing/Synchronising/.
4552 * providers/local/camel-mbox-summary.c (summary_rebuild):
4553 s/Summarizing/Summarising/
4555 2001-08-24 Jeffrey Stedfast <fejj@ximian.com>
4557 * camel-disco-diary.c (camel_disco_diary_replay): Use fseek
4558 instead of fseeko since we want to be portable and use ftell
4559 rather than ftello for the same reason.
4560 (camel_disco_diary_empty): Same here.
4562 2001-08-24 Peter Williams <peterw@ximian.com>
4564 * Revert Not Zed's previous commits as they apparently can cause
4565 serious data loss for POP3 users.
4567 2001-08-24 Ettore Perazzoli <ettore@ximian.com>
4569 ["Summarizing" and "Synchronizing" are spelt with a "z" in the
4570 default locale, that happens to be "en_US".]
4572 * providers/local/camel-mbox-summary.c (mbox_summary_sync_quick):
4573 s/Synchronising/Synchronizing/.
4575 * providers/local/camel-mbox-summary.c (summary_rebuild):
4576 s/Summarising/Summarizing/
4578 2001-08-24 Not Zed <NotZed@Ximian.com>
4580 * camel-mime-part-utils.c (convert_buffer): Limit the maximum
4581 output buffer size. iconv bugs? returns E2BIG forever on some
4584 * providers/local/camel-spool-summary.c (summary_rebuild):
4587 * providers/local/camel-mbox-summary.c (summary_rebuild):
4588 Summarising is spelt with an s.
4590 2001-08-23 Not Zed <NotZed@Ximian.com>
4592 * camel-mime-part.c (write_to_stream): If we have rawtext, then
4593 dont do any charset conversion, only encoding/crlf conversion.
4595 * camel-data-wrapper.h (struct _CamelDataWrapper): Added 'rawtext'
4596 member, says the character encoding is raw, not utf8.
4598 * providers/local/camel-spool-summary.c
4599 (spool_summary_sync_quick): Synchronising is spelt with an s, not
4601 (spool_summary_sync_full): "
4603 * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
4604 No, synchronising is spelt with an s.
4605 (mbox_summary_sync_quick): "
4607 * camel-mime-part-utils.c
4608 (camel_mime_part_construct_content_from_parser): Remove the
4609 warnings which aren't going anywhere fast.
4610 (convert_buffer): Function to convert a bytearray of textual
4611 content from one charset to another. If the charset doesn't exist
4612 or fails, then do no conversion.
4613 (simple_data_wrapper_construct_from_parser): First, read in data,
4614 then try and convert it using the specified charset if supplied.
4615 If that fails, then dont do any conversion, and leave as raw.
4616 Also, if we have any x-* charsets, then dont do any processing.
4618 2001-08-23 Peter Williams <peterw@ximian.com>
4620 * providers/local/camel-mbox-summary.c (summary_rebuild): Add a
4621 missing \n to the end of a printf.
4623 * providers/local/camel-spool-summary.c (summary_rebuild): Same.
4625 2001-08-22 Jeffrey Stedfast <fejj@ximian.com>
4627 * providers/pop3/camel-pop3-folder.c (pop3_generate_uids):
4628 Oops. Fixed a mis-use of GPtrArray. If we set_size, then using
4629 g_ptr_array_add will assume `size' elements have already been
4630 initialized and will start appending on to the end.
4632 2001-08-21 Jeffrey Stedfast <fejj@ximian.com>
4634 * camel-pgp-context.c (pgp_verify): Turn on --batch and reenable
4635 gpg keyserver lookups.
4636 (pgp_decrypt): Disable keyserver lookups if we are disconnected.
4638 2001-08-21 Dan Winship <danw@ximian.com>
4640 * camel-folder-thread.c
4641 (camel_folder_thread_messages_new_summary): Fix the duplicate
4642 message check so it doesn't mess up threading when a reply appears
4643 in the folder before the message it's a reply to. Fixes bug #3357.
4644 (camel_folder_thread_messages_new): Likewise, although I don't
4645 think this function is used any more.
4647 2001-08-20 JP Rosevear <jpr@ximian.com>
4649 * Makefile.am: build a static camel for the addressbook conduit
4651 2001-08-20 Ettore Perazzoli <ettore@ximian.com>
4653 * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
4654 s/Synchronising/Synchronizing/.
4655 (mbox_summary_sync_quick): Likewise. *
4656 providers/local/camel-spool-summary.c (spool_summary_sync_full):
4658 (spool_summary_sync_quick): Likewise.
4660 2001-08-20 Jeffrey Stedfast <fejj@ximian.com>
4662 * providers/imap/camel-imap-store.c (create_folder): Get the
4663 entire directory structure for the folder we just created, meaning
4664 if we created a folder named "test.mailbox" where test didn't
4665 previously exist, get the listing for "test" and "test.mailbox".
4667 * providers/imap/camel-imap-utils.c (imap_parse_folder_name): New
4670 2001-08-19 Chris Toshok <toshok@ximian.com>
4672 * camel-store.h: #include <sys/types.h> for mode_t on freebsd.
4674 2001-08-19 Jeffrey Stedfast <fejj@ximian.com>
4676 * providers/pop3/camel-pop3-folder.c (pop3_generate_uids): Make
4677 sure the generated UID is non-NULL before appending it to the
4678 array of UIDs. How would this even happen? I have no clue...
4680 2001-08-17 Jeffrey Stedfast <fejj@ximian.com>
4682 * providers/imap/camel-imap-folder.c (imap_update_summary): Start
4683 scanning new messages at maxuid + 1 rather than uidval + 1? Maybe
4684 I'm missing the logic, but anyways...this might fix bug #5348.
4686 2001-08-16 Jeffrey Stedfast <fejj@ximian.com>
4688 * providers/imap/camel-imap-store.c (imap_keepalive): If we are
4689 online and message flags have changed in the current folder, sync
4690 the flags else do a NOOP. This fixes bug #4666. Also lock around
4693 * providers/imap/camel-imap-folder.c (imap_sync_online): Don't
4694 ever send "STORE FLAGS.SILENT ()" since Cyrus imapd doesn't like
4695 this (and maybe others too?) so what we'll do instead is to send
4696 "STORE -FLAGS.SILENT (\Seen \Answered \Deleted \Marked)" to clear
4697 all the flags (since this is in essence what we want to do
4700 2001-08-16 Peter Williams <peterw@ximian.com>
4702 * providers/imap/camel-imap-store.c (imap_connect_online): Fix
4703 this again. Sigh. Problem of namespace = "" may not yet be
4706 2001-08-15 Peter Williams <peterw@ximian.com>
4708 * camel-tcp-stream-openssl.c (ssl_error_to_errno): New
4709 function. Try to approximate the SSL error into errno.
4710 (errlib_error_to_errno): New function, try to approximate
4711 OpenSSl's error library's error (ERR_*) into errno.
4712 (stream_read): Try to set errno using ssl_error_to_errno.
4713 (stream_write): Same.
4714 (open_ssl_connection): Same.
4716 * providers/imap/camel-imap-store.c (imap_connect_online): Oh
4717 crap, huge killer typo.
4719 2001-08-14 Peter Williams <peterw@ximian.com>
4721 * providers/imap/camel-imap-store.c (imap_connect_online):
4722 Canonicalize store->namespace to end in store->dir_sep, once both
4723 values are known. The %F-related code makes this
4724 assumption. Probably fixes a bug reported on the mailing list.
4726 2001-08-13 Jeffrey Stedfast <fejj@ximian.com>
4728 * camel-store.c (camel_store_get_folder): After talking to NotZed,
4729 it turns out I was wrong after all.
4730 (store_sync): Create a copy of the folder-cache that owns a ref on
4731 each of the folders so that if one of the folders get's finalized
4732 inside store_sync(), we don't run into any locking issues. This is
4733 mostly meant to solve a problem in IMAP (#6089).
4735 2001-08-13 Peter Williams <peterw@ximian.com>
4737 * providers/imap/camel-imap-store.c (delete_folder): Fix a leak.
4739 * providers/imap/camel-imap-utils.c (imap_namespace_concat): Bleah,
4740 handle when namespace = NULL (can happen upon initial open of mailbox.)
4742 * providers/imap/camel-imap-command.c (imap_command_strdup_vprintf):
4743 Don't crash when %F'ing with an empty folder name and NULL namespace.
4745 2001-08-13 Jeffrey Stedfast <fejj@ximian.com>
4747 * camel-store.c (camel_store_get_folder): We need to be ref'ing
4748 the folder if/when we add it to the hash. This may fix bug #6089?
4749 (camel_store_get_folder): Nevermind, reverted the fix.
4750 (camel_store_get_folder): No, I wasn't on crack before after
4751 all...if we don't ref here, then we're open to a race condition
4754 2001-08-11 Ettore Perazzoli <ettore@ximian.com>
4756 * providers/local/camel-spool-summary.c (summary_rebuild):
4757 s/summarising/summarizing/.
4758 (summary_rebuild): Likewise.
4760 * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
4761 s/summarise/summarize/.
4762 (mbox_summary_sync_quick): Likewise.
4763 (summary_rebuild): Likewise.
4764 (mbox_summary_check): Likewise.
4766 2001-08-10 Jeffrey Stedfast <fejj@ximian.com>
4768 * providers/imap/camel-imap-utils.c (imap_quote_string): Added an
4769 assert - at this point a backtrace would be more useful than a
4770 transaction log for debugging.
4772 * providers/imap/camel-imap-command.c (imap_command_start): Return
4773 FALSE here, not NULL.
4775 * providers/imap/camel-imap-folder.c (imap_rescan): Don't
4776 g_strdup() the uid into the trigger_event call.
4778 * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
4779 Set the total bytes expected to 0 if the response is empty too.
4780 (pop3_refresh_info): Return of there was an error generating pop3
4783 * camel-mime-utils.c (header_raw_check_mailing_list): regfree the
4784 pattern before continue'ing. This was showing up quite a bit under
4787 2001-08-09 Jeffrey Stedfast <fejj@ximian.com>
4789 * providers/imap/camel-imap-utils.c (imap_parse_string_generic): A
4790 quoted string cannot contain \n's so check for those as well.
4791 (imap_atom_specials): Update this to fix bug #6553.
4793 2001-08-08 Jon Trowbridge <trow@ximian.com>
4795 * camel-filter-search.c (get_source): Remove trailing stuff from
4796 URLs before returning. (Done in an evil way, not in the good way
4797 suggested by fejj. :)) (Bug #4876)
4799 2001-08-08 jacob berkman <jacob@ximian.com>
4801 * camel-search-private.c (camel_search_header_match): check for
4802 NULL name and addr (fixes a bug i was about to report)
4804 2001-08-08 Not Zed <NotZed@Ximian.com>
4806 * camel-filter-search.c (check_header): Properly determine match
4807 type to pass to header_match.
4808 (address_matches_exactly): Removed, effectively added to
4809 camel_search_header_match.
4811 * camel-folder-search.c (check_header): Properly determine the
4812 match type to pass to header_match.
4814 * camel-search-private.c (camel_search_header_match): Add a new
4815 parameter 'type' which is the type of header we're matching
4816 against. ASIS means utf8 format, ADDRESS means an internet
4817 address ('formatted'), ADDRESS_ENCODED means a raw address header,
4818 ENCODED means rfc 2047 encoded text.
4819 (header_match): Move original logic here, have search_header_match
4820 call it as appropriate for the 'type' of match.
4822 2001-08-07 Not Zed <NotZed@Ximian.com>
4824 * camel-session.c (camel_session_class_init): Only init the vee
4825 provider struct once (if we're subclassed this will get called
4828 * camel-object.c (obj_finalize): Removed a bit of a debug that
4829 crept in with jacob's poolv patch (?).
4831 2001-08-07 Jeffrey Stedfast <fejj@ximian.com>
4833 * camel-filter-search.c (address_matches_exactly): New function to
4834 do danw's address "is" comparison (as specified in bug #5886.
4835 (check_header): Special-case address-type headers when we are
4836 doing an exact match to use the address_matches_exactly function.
4838 2001-08-06 Jeffrey Stedfast <fejj@ximian.com>
4840 * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
4841 Modify to take a headers_only argument which will then only fetch
4843 (pop3_generate_uids): Pass in TRUE for headers_only.
4844 (pop3_get_message): Pass in FALSE for headers_only and move the
4845 camel_operation() stuff out of get_message_stream and in to here
4847 (pop3_generate_uids): We also need to be using i+ 1 as the id
4848 since we are starting at 0.
4850 2001-08-06 Jeffrey Stedfast <fejj@ximian.com>
4852 * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
4853 New internal function to get a message stream by message sequence
4854 id (so that we can share code between pop3_get_message and
4855 pop3_generate_uids).
4856 (pop3_get_message): Use pop3_get_message_stream.
4857 (pop3_generate_uids): New function to generate UIDs based on the
4858 message - this fixes bug #1256.
4859 (pop3_refresh_info): If the server doesn't support UIDL, call
4860 pop3_generate_uids to get our list of UIDs.
4862 * providers/imap/camel-imap-store.c (get_folder_info_online):
4863 Don't strstr for noselect=yes, that's just plain broken.
4865 2001-08-06 Dan Winship <danw@ximian.com>
4867 * providers/imap/camel-imap-folder.c (imap_rescan): Fix off-by-one
4868 error in cleaning up deleted messages at the end of the folder.
4869 Fixes bug #5585 and maybe others.
4871 * providers/imap/camel-imap-store.c (get_folder_info_online): Do a
4872 refresh_info on the selected folder before looking at its unread
4873 count. Should fix bug #4944.
4875 2001-08-06 Peter Williams <peterw@ximian.com>
4877 Completely hide the namespace from everything external to the IMAP
4878 code, which Dan W says is the way it should be.
4880 * providers/imap/camel-imap-command.c
4881 (imap_command_strdup_vprintf): Add a new %F argument, which is like
4882 %S but will add the namespace (for folder names).
4883 (camel_imap_command): Use %F here.
4885 * providers/imap/camel-imap-utils.c (imap_parse_list_response):
4886 Changed to strip out the namespec when returning *folder. In order
4887 to do this we need to be passed the CamelImapStore.
4888 (imap_concat): Move to here from camel-imap-store.c, un-static
4889 (imap_namespace_concat): New function, adds the namespace to the
4890 folder name, unless it's INBOX.
4892 * providers/imap/camel-imap-utils.h: Prototypes.
4894 * providers/imap/camel-imap-store.c (imap_connect_online): Extra
4895 arg to imap_parse_list_response.
4896 (imap_connect_offline): Here too.
4897 (get_folder_status): Use %F.
4898 (get_folder_online): Here too.
4899 (delete_folder): Here too.
4900 (create_folder): Here too, and arg to imap_parse_list_response.
4901 (parse_list_response_as_folder_info): Arg to i_p_l_r.
4902 (get_subscribed_folders_by_hand): Use %F.
4903 (get_folders_online): Here too.
4904 (get_folder_info_online): Instead of checking for NULL @name, check
4905 for name = NULL or "", and set to "" instead of namespace. Pass ""
4906 instead of namespace to camel_folder_info_build.
4907 (subscribe_folder): Use %F.
4908 (unsubscribe_folder): Here too.
4910 * providers/imap/camel-imap-folder.c (imap_get_full_name): This
4911 now just returns folder->full_name.
4913 (do_copy): Here too.
4915 2001-08-06 Jeffrey Stedfast <fejj@ximian.com>
4917 * camel-pgp-context.c (pgp_verify): Always do --no-auto-key-retrieve.
4919 2001-08-03 Jeffrey Stedfast <fejj@ximian.com>
4921 * camel-pgp-context.c (pgp_verify): Minor changes to the iconv
4922 code so that it does the check in the return value of iconv() just
4923 like the code in camel-mime-utils.c in case this fixes Bo Rosen's
4924 gpg bugs (but I doubt this will change anything?).
4926 2001-08-03 Jeffrey Stedfast <fejj@ximian.com>
4928 * providers/smtp/camel-smtp-transport.c (smtp_connect): First
4929 check to make sure that service->url->authmech is non-NULL before
4930 passing it into strcmp to avoid a segfault.
4932 * camel-pgp-context.c (pgp_decrypt): Sigh, if gpg returns '1' it
4933 means that the key is bad but it did succeede in decrypting the
4934 block so to make users happy (even though I find this a
4935 questionable action) we are going to ignore the error and show it
4936 to the user anyway. This fixes bug #6136.
4938 2001-08-03 Not Zed <NotZed@Ximian.com>
4940 * providers/smtp/camel-smtp-transport.c (smtp_connect): special
4941 case popb4smtp auth before we try and connect, and do the magic
4944 2001-08-02 Not Zed <NotZed@Ximian.com>
4946 * providers/smtp/camel-smtp-transport.c (smtp_connect): Check for
4947 POPB4SMTP separate to the esmtp auth list.
4948 (smtp_auth): If creating the sasl object means it is
4949 already authenticated, then exit early. Sort of 'clean hack' to
4950 help popb4smtp work.
4951 (smtp_auth): Unref the sasl object, clean up a memleak i think.
4953 * providers/smtp/camel-smtp-provider.c
4954 (camel_provider_module_init): Added POPB4SMTP auth type.
4956 * camel-sasl.c (camel_sasl_authtype): Added POPB4SMTP type.
4958 * camel-sasl-popb4smtp.c: New file for pop before smtp
4961 * Makefile.am (libcamel_la_SOURCES, HEADERS): Add
4962 camel-sasl-popb4smtp.[ch].
4964 2001-08-01 Not Zed <NotZed@Ximian.com>
4966 * providers/local/camel-mbox-folder.c (mbox_lock): If we fail to
4967 get the lock, make sure we close our locking fd, and reset it.
4968 Fixes the crash part of 5095.
4970 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
4971 Slightly re-arranged filter/change notification logic. If we;re
4972 filtering, freeze the folder till we're finished to smooth the ui
4975 2001-07-31 Not Zed <NotZed@Ximian.com>
4977 * camel-folder.c (camel_folder_init): Chagned mutexes to
4978 e_mutexes, folder lock recursive. This fixes the imap filtering
4979 bug, or at least some cases of it.
4980 (camel_folder_finalize): Free mutexes.
4982 * camel-private.h (CamelFolderPrivate): Changed mutexes to
4985 2001-07-25 Not Zed <NotZed@Ximian.com>
4987 * camel-folder.c (camel_folder_change_info_*): Change the
4988 return if fail's into asserts.
4989 (camel_folder_change_info_free): Don't let it accept a NULL
4990 argument. This isn't g_lib so we dont have to.
4992 2001-07-27 Jeffrey Stedfast <fejj@ximian.com>
4994 * camel-mime-utils.c (header_decode_param): Fix the fix that fixes
4995 broken mailer behavior. We want to make sure that the user's
4996 locale charset is non-NULL before we pass it off to
4997 iconv_open(). If it *is* NULL, we want to use iso-8859-1.
4999 2001-07-26 Jeffrey Stedfast <fejj@ximian.com>
5001 * camel-url.c (camel_url_free): Allow the url to be NULL just like
5002 the libc free convention.
5004 2001-07-26 Dan Winship <danw@ximian.com>
5006 * providers/imap/camel-imap-command.c (camel_imap_command_start):
5007 Send an IMAP command, but don't wait for responses.
5008 (camel_imap_command_response): Read a single line of response from
5010 (camel_imap_command, etc): Reimplement in terms of the new code.
5012 * providers/imap/camel-imap-folder.c (imap_rescan): Use
5013 camel_imap_command_start and camel_imap_command_response, and
5014 call camel_operation_progress after each line read from the
5016 (imap_update_summary): Likewise, although with more fudging on the
5017 precentages... Also, fix this so that if none of the new messages
5018 are cached, it only does a single FETCH, and if some of them are
5019 cached, it does two FETCHes (one to get the UIDs, FLAGS, and
5020 SIZEs, and another to get the bodies of all of the messages that
5021 aren't cached now that it knows the relevant UIDs). This should
5022 speed up startup a bunch (especially if you have high bandwidth
5023 but also high latency to the IMAP server).
5025 2001-07-25 Dan Winship <danw@ximian.com>
5027 * camel-mime-utils.c (mail_mlist_magic): Add another Sender
5030 2001-07-24 Not Zed <NotZed@Ximian.com>
5032 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
5033 Change the break into a continue, we should process as many as we
5036 * camel-folder.c (camel_folder_move_messages_to): If we have no
5037 uid's to copy, exit here before going any further. Some code
5038 internally [imap] assumes there are uids to copy otherwise it can
5040 (camel_folder_copy_messages_to): Same.
5042 2001-07-24 Jeffrey Stedfast <fejj@ximian.com>
5044 * camel-mime-utils.c (header_decode_param): Handle broken mailers
5045 that send unencoded 8bit header params. And there was much
5048 * camel-url.h (CAMEL_URL_HIDE_ALL): New #define, and there was
5049 much rejoicing. Rah.
5051 2001-07-24 Not Zed <NotZed@Ximian.com>
5053 * camel-operation.c (camel_operation_register, unregister): Added
5054 some warnings for bad cases.
5056 2001-07-23 Not Zed <NotZed@Ximian.com>
5058 * camel-operation.c (camel_operation_register): Only insert a hash
5059 entry if we haven't already.
5060 (camel_operation_unregister): Only remove the has entry if the id
5063 2001-07-23 Jeffrey Stedfast <fejj@ximian.com>
5065 * camel-filter-driver.c (do_move): Slight fix for when source ==
5066 destination (we don't want to do this action because on-demand
5067 filtering would then delete the messages it supposedly "moved").
5069 2001-07-23 Not Zed <NotZed@Ximian.com>
5071 * providers/smtp/camel-smtp-transport.c (smtp_auth, smtp_helo,
5072 send_to): Added some operation progress reporting. Actual data
5073 transfer is 'tricky' because of the layers used.
5074 (smtp_auth): Instead of checking exception_is_set, use
5075 challenge==NULL to test if sasl_challenge_base64 failed.
5077 * providers/local/camel-mbox-summary.c (mbox_summary_sync): Remove
5078 peters changes below and put in a better fix. These functions
5079 already return -1 on error, just use that, and not worry about
5080 building our own exception redundantly.
5082 * camel-service.c (camel_get_host_byname): Turn the progress into
5085 2001-07-20 Peter Williams <peterw@ximian.com>
5087 * providers/local/camel-mbox-summary.c (mbox_summary_sync): More
5088 usage fixes for CamelException. Check our own exception for
5089 summary_update and xfer it out if an error occurred.
5091 2001-07-20 JP Rosevear <jpr@ximian.com>
5093 * Pull up test fixes to get them building again
5095 2001-07-20 Not Zed <NotZed@Ximian.com>
5097 * camel-charset-map.c (camel_charset_get_iconv_friendly_name):
5098 renamed to camel_charset_to_iconv() to make it just a little more
5099 consistent and not so long & fixed callers.
5101 2001-07-19 Jeffrey Stedfast <fejj@ximian.com>
5103 * camel-mime-filter-charset.c
5104 (camel_mime_filter_charset_new_convert): Convert to the
5105 iconv-friendly charset names.
5107 * providers/imap/camel-imap-store.c (create_folder): Fixed a
5108 compiler warning about returning without a value in a non-void
5111 * camel-mime-part.c (process_header): Pass the locale charset as
5112 the default_charset to header_decode_string().
5114 * camel-folder-summary.c (camel_folder_summary_format_string):
5115 Pass the locale charset as the default_charset to
5116 header_decode_string().
5117 (content_info_new): Same.
5119 * camel-mime-message.c (process_header): Pass the locale charset
5120 as the default_charset to header_decode_string().
5122 * camel-mime-utils.c (append_8bit): New helper function who's
5123 purpose is similar to append_latin1() but for 8bit text that we
5124 are assuming is not latin1.
5125 (header_decode_text): Now takes a default_charset parameter and
5126 calls append_8bit when appropriate.
5127 (header_decode_string): Also takes a default_charset parameter
5129 (header_decode_mailbox): Pass NULL as the default_charset to
5130 header_decode_string().
5132 2001-07-19 Jeffrey Stedfast <fejj@ximian.com>
5134 * camel-pgp-context.c (pgp_verify): Modified to treat the return
5135 value from camel_charset_locale_name() as a const char*.
5137 * camel-sasl-digest-md5.c (digest_response): Modified to treat the
5138 return value from camel_charset_locale_name() as a const char*.
5140 * camel-charset-map.c (camel_charset_locale_name): Modify to
5141 return const char* by returning the static locale_charset which is
5142 created inside of camel_charset_map_init().
5143 (camel_charset_map_init): Find the locale charset here and set the
5146 2001-07-19 Peter Williams <peterw@ximian.com>
5148 Policy change: NULL url's are no longer allowed in
5149 CamelFolderInfos. They used to signify that the folder was, in
5150 IMAP jargon, NoSelect; now the same effect is achieved by adding a
5151 "noselect=yes" parameter to the end of the URL. As far as I know,
5152 IMAP is the only affected provider.
5154 * providers/imap/camel-imap-store.c (delete_folder): New
5155 function. Implement folder deletion.
5156 (camel_imap_store_class_init): Set the delete_folder class
5158 (get_folder_status): New function. Utility wrapper around the
5160 (create_folder): If the parent folder is NoSelect but is empty,
5161 delete it and recreate it as a a subfolder-containing folder. If
5162 it is NoSelect but contains messages, set an exception.
5163 (parse_list_response_as_folder_info): Always set the FolderInfo's
5164 URL, but add a NoSelect parameter if it isn't selectable.
5165 (get_folder_info_online): Change logic of removing the namespace
5166 to reflect URL change. Same for logic of checking unread counts.
5167 (get_folder_info_online): Use get_folder_status to simplify this.
5169 * camel-store.c (camel_folder_info_build): When creating dummy
5170 parents, copy the child's URL and set the NoSelect parameter.
5172 2001-07-19 Jeffrey Stedfast <fejj@ximian.com>
5174 * camel-mime-part-utils.c
5175 (simple_data_wrapper_construct_from_parser): No need for
5177 (check_html_charset): Return a const char* and also use
5178 camel_charset_get_iconv_friendly_name() internally.
5180 * camel-mime-utils.c (rfc2047_decode_word): Remove my iso8859-1 ->
5181 iso-8859-1 hack and use camel_charset_get_iconv_friendly_name()
5183 (rfc2184_decode): Use camel_charset_get_iconv_friendly_name()
5185 * camel.c (camel_init): Call camel_charset_map_init().
5187 * camel-charset-map.c (camel_charset_map_init): New function to
5188 initialize the charset-equivalent lookup table. To be called by
5190 (camel_charset_get_iconv_friendly_name): New function to try and
5191 convert a charset into something that iconv is more likely to
5194 2001-07-19 Peter Williams <peterw@ximian.com>
5196 * Revert 7/11/2001 patch for IMAP INBOX filtering at NotZed's
5199 2001-07-17 Peter Williams <peterw@ximian.com>
5201 Clean up some exception misusage.
5203 * providers/imap/camel-imap-command.c (camel_imap_command): Use
5204 our own internal exception for sending the string and transfer it
5205 to @ex if anything goes wrong.
5206 (imap_read_response): Use our own internal exception for reading
5207 the untagged responses and blah blah blah.
5209 * camel-session.c (get_service): Use our own internal exception
5210 when constructing the service and transfer it to @ex if anything
5213 * camel-remote-store.c (remote_recv_line): Instead of having
5214 gboolean exception, use our own internal exception and copy
5215 it to @ex if anything goes wrong.
5217 * camel-store.c (store_sync): Create an internal exception
5218 because sync_folder() checks it for validity. Transfer it to
5221 * camel-exception.c (camel_exception_get_description): If @ex is
5222 NULL, complain - passing NULL exceptions to Camel is okay, but
5223 there should be no circumstances under which they're then
5225 (camel_exception_get_id): Same here,
5226 (camel_exception_xfer): NULL-protect and warn if transferring from
5229 2001-07-17 Jeffrey Stedfast <fejj@ximian.com>
5231 * camel-store.c (init_trash): Use CAMEL_VTRASH_NAME.
5233 * camel-vtrash-folder.h: #define CAMEL_VTRASH_NAME
5235 2001-07-16 Dan Winship <danw@ximian.com>
5237 * providers/imap/camel-imap-command.c (camel_imap_response_free):
5241 We have to pass 3, not 4 to camel_imap_folder_changed for the
5242 exists count. Fixes ximian bug #2112 (finally!).
5244 2001-07-14 Jeffrey Stedfast <fejj@ximian.com>
5246 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
5247 If the message info for an expunged message is NULL, then just
5248 break out - maybe a message was expunged that we were never
5249 notified even existed?
5251 2001-07-13 Jeffrey Stedfast <fejj@ximian.com>
5253 * camel-mime-utils.c (rfc2047_decode_word): Added a hack to
5254 convert charsets in the format iso8859-1 to iso-8859-1 because it
5255 seems to be more iconv friendly. It has been reported that on some
5256 systems, iconv doesn't know about iso8859-1 while it *does* know
5257 about iso-8859-1. See bug #4530.
5259 2001-07-13 Peter Williams <peterw@ximian.com>
5261 * Makefile.am (install-exec-local): Let people install as
5262 non-root, but give them a bigass warning so they're not allowed to
5263 complain when it doesn't work right.
5265 * camel-remote-store.c (sync_remote_folder): New function: hash
5267 (remote_disconnect): If cleanly disconnecting, sync our
5268 folders. Fixes deadlocks on exit (folders syncing after store
5269 disconnects) and also makes sense.
5271 2001-07-13 Jeffrey Stedfast <fejj@ximian.com>
5273 * camel-uid-cache.c (camel_uid_cache_new): We now use a structure
5274 as the bucket data rather than just a cache level so set the save
5276 (maybe_write_uid): We only save the uid if the cache levels are
5277 the same *and* if the save state is TRUE.
5278 (free_uid): Free the state value.
5279 (camel_uid_cache_get_new_uids): New uids that get added to the
5280 cache start with a save state of FALSE.
5281 (camel_uid_cache_save_uid): Set the save state of the uid to
5282 TRUE. What should we do if the uid isn't already in the cache?
5283 Currently I make it add the uid, but maybe it shouldn't?
5285 * providers/imap/camel-imap-folder.c (imap_filter_timeout): Update
5286 to reflect CamelFilterDriver API changes.
5288 * camel-filter-driver.c (camel_filter_driver_filter_folder): Take
5289 a cache argument so we can tell the cache whether or not the uid
5290 should be saved (meaning we have successfully filtered it).
5292 2001-07-12 Jeffrey Stedfast <fejj@ximian.com>
5294 * camel-filter-driver.c (camel_filter_driver_filter_message):
5295 Okay, I've decided that that user is just on crack. We don't want
5296 to allow filtering of deleted messages or we could get some
5297 unexpected behavior.
5298 (do_move): Oops. My last fix needs to be after the if-statement,
5300 (do_copy): And here too.
5302 2001-07-12 Jeffrey Stedfast <fejj@ximian.com>
5304 * camel-filter-driver.c (do_move): Only set p->copied and
5305 p->deleted if the messages are copied without an exception.
5306 (do_copy): Same - but obviously we don't set the p->deleted here
5308 (camel_filter_driver_filter_message): Since users complained that
5309 they couldn't filter deleted messages for "safe keeping" (WTF?
5310 safe keeping? why were they deleted in the first place then??), I
5311 have taken out the code that optimized filtering by not allowing
5312 deleted messages to be filtered. This fixes bug #4473.
5314 Note: Users have a warped sense of logic.
5316 2001-07-12 Not Zed <NotZed@Ximian.com>
5318 * camel-mime-part-utils.c (extract_metatag_charset): Removed.
5319 (check_html_charset): Replaced with this.
5320 (simple_data_wrapper_construct_from_parser): Call
5321 check_html_charset if we dont have a charset on the content-type,
5322 and we have text/html data.
5323 (check_html_charset): We also need to do qp/base64 decoding
5326 * camel-mime-utils.c (html_meta_param_list_decode): Removed. This
5327 was very wrong, the rules for mail headers vastly different from
5328 rules for decoding html elements.
5329 (rfc2184_decode): Move the malloc inside the iconv_open worked,
5330 otherwise we have a memleak.
5332 * camel-mime-filter-html.c (camel_mime_filter_html_finalize, init,
5333 run, reset): Changed to use camelhtmlparser, and fixed a tiny
5336 * camel-html-parser.c: Made the html indexer tokeniser re-usable.
5337 ONLY TO BE USED INTERNAL TO CAMEL HOWEVER.
5338 (tokenise_step): Slight fix to non-quoted values.
5340 * camel-folder-summary.c
5341 (camel_folder_summary_info_new_from_message): Removed some code i
5342 wasn't supposed to commit.
5344 * providers/local/camel-local-summary.c (local_summary_add): Only
5345 set info->size if it is not zero.
5346 (local_summary_add): If we dont get a size from the info passed
5347 in, calculate it using a null stream write. Should do #4392.
5349 2001-07-11 Jeffrey Stedfast <fejj@ximian.com>
5351 * camel-mime-part-utils.c (extract_metatag_charset): New function
5352 to extract a meta-tag charset value if it exists.
5353 (simple_data_wrapper_construct_from_parser): Along the same lines
5354 as the code I previously ripped out, but this time use the
5355 mime-parser's seek ability to help us along. Currently I read up
5356 to a 2k buffer size - this is probably overkill, 1k is probably
5359 * camel-mime-utils.c (html_meta_param_list_decode): When we get to
5360 an `=', we must skip past it before trying to grab the param
5363 2001-07-11 Jeffrey Stedfast <fejj@ximian.com>
5365 * camel-mime-part-utils.c
5366 (simple_data_wrapper_construct_from_parser): Ripped out my code
5367 since it was never being used since the mime parser is not using a
5368 seekable stream (ever?) which pretty much means my code needs to
5369 be done someplace else.
5371 2001-07-11 Peter Williams <peterw@ximian.com>
5373 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
5374 Run the filter in its own thread to prevent locking issues.
5375 (imap_filter_timeout): New function that does the filtering called
5376 as a CamelSession timeout.
5378 2001-07-11 Not Zed <NotZed@Ximian.com>
5380 * camel-filter-driver.c (camel_filter_driver_filter_mbox): Create
5381 the messageinfo itself, so we can properly set the size.
5383 * camel-movemail.c (camel_movemail_solaris): Write out the from
5384 line between each message.
5386 2001-07-10 Not Zed <NotZed@Ximian.com>
5388 * providers/local/camel-local-summary.c (local_summary_add): Copy
5389 the size across from the source message info if supplied.
5391 * camel-stream-null.c: Added a 'written' member which keeps track
5392 of how much has been written to the stream.
5394 * camel-movemail.c (camel_movemail): If we have BROKEN_SPOOL
5395 defined, then use the solaris movemail to quote from lines that
5397 (camel_movemail_solaris): Compile this in if BROKEN_SPOOL defined.
5399 2001-07-10 Jeffrey Stedfast <fejj@ximian.com>
5401 * camel-mime-utils.c (html_meta_param_list_decode): New function
5402 to parse an HTML meta-tag.
5404 * camel-mime-part-utils.c
5405 (simple_data_wrapper_construct_from_parser): If the Content-Type
5406 did not contain a charset parameter and it's also a text/html
5407 part, we have 1 last place to look - in the META html tags. *sigh*
5409 * camel-mime-message.c (camel_mime_message_get_source):
5410 s/gint/unsigned since that's what it should be.
5412 2001-07-09 Jeffrey Stedfast <fejj@ximian.com>
5414 * camel-pgp-context.c (pgp_sign): Forget the passphrase if the
5415 user has set that option.
5416 (pgp_clearsign): Same.
5417 (pgp_encrypt): And here...
5418 (pgp_decrypt): And finally here.
5419 (camel_pgp_context_new): Take a `remember' argument.
5421 2001-07-09 Not Zed <NotZed@Ximian.com>
5423 * providers/local/camel-maildir-summary.c (maildir_summary_sync):
5424 Oops, e_poolv_set free's it for us, so dont double-free here.
5426 2001-07-06 Not Zed <NotZed@Ximian.com>
5428 * camel-vee-folder.c (camel_vee_folder_finalise): Changed so we
5429 dont have the list changing under us, just going to the next node
5430 before we call a function that might change the list is
5431 potentially dangerous (slight mod of peters fix). Hmm, i think it
5432 would've double-unref'd it too(?)
5434 2001-07-08 Chris Toshok <toshok@ximian.com>
5436 * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_finalize):
5437 openssl_table is gone. we now store/get the stream from the
5439 (stream_read): rework the non-blocking case to account for SSL
5440 possibly buffering data (in which case select will block even
5441 though data is ready to be read), and to account for FreeBSD's
5442 strange behavior of returning -1/EAGAIN even though select said
5443 the fd was ready to be read.
5444 (ssl_verify): openssl_table is gone.
5445 (open_ssl_connection): set the SSL_CTX's app_data to be the
5446 stream, remove the openssl_table code.
5448 2001-07-06 Jeffrey Stedfast <fejj@ximian.com>
5450 * camel-mime-utils.c (header_encode_param): Don't allow in to be
5451 NULL, so instead of doing if (in == NULL) return;, make it a
5452 g_return_val_if_fail and later we can make it an assert or
5455 * providers/local/camel-maildir-store.c (get_inbox): Fixes bug
5458 * providers/local/camel-mbox-summary.c
5459 (camel_mbox_summary_build_from): Make the `day-of-month' digit
5460 take up 2 chars by using "%2d". Fixes bug #3989 for lame mailers
5463 * camel-pgp-context.c (crypto_exec_with_passwd): Set the pipe fd's
5466 2001-07-06 Peter Williams <peterw@ximian.com>
5468 * camel-object.c (camel_object_unref): Make sure that after the
5469 finalization event has happened and the finalization functions
5470 have been called that the object still has a zero refcount.
5472 2001-07-06 Joe Shaw <joe@ximian.com>
5474 * providers/nntp/camel-nntp-grouplist.c: Add locking to
5475 camel_nntp_get_grouplist_from_server().
5477 * providers/nntp/camel-nntp-resp-codes.h: Added
5478 NNTP_EXTENSIONS_SUPPORTED (202).
5480 * providers/nntp/camel-nntp-store.c (camel_nntp_store_get_extensions):
5481 Check for both NNTP_LIST_FOLLOWS and NNTP_EXTENSIONS_SUPPORTED from
5482 a LIST EXTENSIONS request. (Dunno if NNTP_LIST_FOLLOWS ever comes
5483 out of this, but that's what was already there...) Also, put some
5485 (finalize): e_mutex_destroy() the command lock
5486 (camel_nntp_store_init): e_mutex_new() the command lock.
5488 * providers/nntp/camel-nntp-store.h: Add locking macros.
5490 2001-07-05 Jeffrey Stedfast <fejj@ximian.com>
5492 * camel-folder-summary.c (camel_message_info_string): Added an
5493 assert to make sure that `mi' isn't NULL.
5494 (camel_message_info_set_string): Same.
5496 * providers/imap/camel-imap-command.c (camel_imap_response_free):
5497 Create and use a temporary CamelException for use with
5498 camel_imap_folder_changed.
5500 2001-07-05 Jeffrey Stedfast <fejj@ximian.com>
5502 * camel-pgp-context.c (pgp_verify): Send the
5503 --no-auto-key-retrieve argument to gpg if we are in offline mode
5504 so that we don't have to worry about gpg hanging if it can't
5505 connect to the key servers, because now it shouldn't even attempt
5508 2001-07-05 Chris Toshok <toshok@ximian.com>
5510 * camel-tcp-stream-openssl.c (ssl_verify): use
5511 X509_STORE_CTX_get_ex_data to get at the SSL* - don't use the
5512 X509_STORE_CTX to look up our stream, since it's not what we used
5513 to insert our stream into the hashtable.
5514 (open_ssl_connection): insert the stream into the hashtable before
5515 calling SSL_connect, as this can cause ssl_verify to be called,
5516 and we need to look up the stream there. remove the stream from
5517 the hashtable if there's an error connecting.
5518 (stream_connect): pass the CamelTcpStreamOpenSSL* to
5519 open_ssl_connection since it handles the hashtable stuff. remove
5520 hashtable stuff from here.
5522 2001-07-05 Jeffrey Stedfast <fejj@ximian.com>
5524 * camel-folder.c (camel_folder_copy_messages_to): if source ==
5527 2001-07-05 Peter Williams <peterw@ximian.com>
5529 * camel-vee-folder.c (camel_vee_folder_finalise): Move this before the
5530 camel_vee_folder_remove_folder because that function modifies p->folders
5531 messing up our iteration.
5532 (camel_vee_folder_finalise): Don't unref our summary; camel-folder now
5535 * camel-object.h (CamelObject): Add a 'destroying' flag to CamelObject.
5537 * camel-object.c (obj_init): Clear 'destroying'.
5538 (camel_object_unref): If 'destroying' then do not send the finalize
5539 event and do not call finalize functions. Otherwise, set destroying
5540 so just in case we get refed (eg event code) we don't get doubly
5543 2001-07-05 Not Zed <NotZed@Ximian.com>
5545 * camel-mime-filter-basic.c (filter): Fix the assertion slightly,
5546 if we have a little bit of input the output size could be larger,
5547 since we store upto 3 chars in the state.
5549 * camel-folder-summary.c
5550 (camel_folder_summary_info_new_from_message): When indexing a new
5551 record, create a pseudo word 'ibexindexed' so we can always tell
5552 that a message has already been idnexed, even if it contains no
5553 words of its own. Things like maildir use this check to see if
5554 its already been processed, and it matters if it is incorrect in
5555 this case (not just wasted cycles).
5556 (camel_message_info_dup_to): Assign the to->strings from the
5557 e_poolv_cpy() call, since it may allocaote a new poolv if the
5558 lengths do not match.
5560 (camel_folder_summary_info_new_from_parser): And same here.
5562 * providers/local/camel-maildir-summary.c (maildir_summary_sync):
5563 Changed the logicfor epoolv code to be different, we dont need to
5564 update hash references or any tricky stuff.
5565 (maildir_summary_check): Samehere.
5567 * camel-folder-summary.h: Removed include of e-memory.h.
5569 2001-07-03 Joe Shaw <joe@ximian.com>
5571 * providers/nntp/camel-nntp-resp-codes.h: Added NNTP_NO_PERMISSION
5572 (502) to the list of response codes.
5574 * providers/nntp/camel-nntp-store.c (nntp_store_connect): If we
5575 receive a NNTP_NO_PERMISSION, don't get into an infinite loop trying
5576 to reconnect, get extensions, etc. Just give up and return FALSE.
5578 2001-07-03 Dan Winship <danw@ximian.com>
5580 * providers/imap/camel-imap-message-cache.c
5581 (camel_imap_message_cache_clear): Doh. Don't remove things from
5582 the hash table while foreach'ing it. (And can't use foreach_remove
5583 either because we have to remove them in a weird order). Fixes
5586 * providers/imap/camel-imap-folder.c (imap_get_message): If the
5587 server returns OK from the FETCH BODY, but there's no parseable
5588 BODY response, it's probably because there's an UN-parseable BODY
5589 response, implying the message is badly formatted, MIMEwise. In
5590 that case, fall back to fetching the message as a single part.
5592 2001-07-02 Sam Creasey <sammy@oh.verio.com>
5594 * providers/nntp/camel-nntp-folder.c: Implemented
5595 nntp_folder_search_by_expression and
5596 nntp_folder_search_free. Basic search functionality e.g. unread
5597 marking now works for NNTP folders.
5599 * camel_filter_search.c (get_size): Added get-size sexp directive
5600 to get the size of a message for filters.
5602 * providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new):
5603 Always check with the NNTP server after summary load -- this
5604 function now always expires old summary entries and syncs with
5607 * providers/nntp/camel-nntp-utils.c (camel_nntp_get_headers):
5608 Only fetch headers for articles not already logged in
5611 * providers/nntp/camel-nntp-grouplist.c
5612 (camel_nntp_get_grouplist_from_*): change from g_list_append()
5613 to g_list_prepend() + g_list_reverse. Traversing 40,000
5614 element linked lists sucks.
5616 * providers/nntp/camel-nntp-store.c (camel_nntp_command):
5617 Should the NNTP connection die with
5618 CAMEL_EXCEPTION_SERVICE_NOT_CONNECTED, make a single retry
5619 attempt. Timing out the NNTP link is less painful this way.
5621 2001-07-02 Peter Williams <peterw@ximian.com>
5623 * README (Introduction): Add comment noting that Camel actually
5626 2001-07-02 Dan Winship <danw@ximian.com>
5628 * camel-session.c (camel_session_get_filter_driver): new method to
5629 get an application-initialized filter driver.
5631 * camel-filter-driver.c (camel_filter_driver_new): Remove the
5632 get_folder function and data args from here...
5633 (camel_filter_driver_set_folder_func): ...and add this function to
5636 * providers/imap/camel-imap-folder.c (camel_imap_folder_new): If
5637 this folder is INBOX and we're filtering INBOX, set a flag on the
5639 (imap_update_summary): Add another argument (GPtrArray *recents),
5640 and if it's non-NULL, add the uids of any \Recent new messages to
5642 (camel_imap_folder_changed): If doing filtering in this folder,
5643 create a recents array and pass it to imap_update_summary. Then
5644 get a filter driver and use it to filter the recent messages.
5646 * providers/imap/camel-imap-summary.h:
5647 * providers/imap/camel-imap-utils.c (imap_parse_flag_list): Add
5648 support for the \Recent flag.
5650 * providers/imap/camel-imap-provider.c (imap_conf_entries): enable
5651 the "filter" option.
5653 * camel-types.h: add CamelFilterDriver typedef here
5655 2001-07-02 Not Zed <NotZed@Ximian.com>
5657 * camel-lock-client.c (camel_lock_helper_init): properly return
5658 error if we can't create pipes.
5660 * camel-folder-summary.c (summary_build_content_info): re-enable
5663 * camel-mime-filter-html.c: Completely re-implemented using a
5666 2001-07-02 Dan Winship <danw@ximian.com>
5668 * tests/misc/url.c (main): Change a camel_exception_clear to
5669 camel_exception_init to fix a sometimes-crash
5671 2001-06-29 Jeffrey Stedfast <fejj@ximian.com>
5673 * camel-mime-utils.c: Added Originator: header as a header to look
5674 for when looking for the mailing list.
5676 * tests/mime-filter/Makefile.am: Build the test-crlf test program.
5678 * tests/mime-filter/test-crlf.c: New test suite for the crlf
5681 * camel-mime-filter-crlf.c (filter): Fixed to correctly encode and
5684 2001-06-28 Peter Williams <peterw@ximian.com>
5686 * camel-mime-filter-stripheader.c: New file. Filter that strips a
5687 header from mime output.
5689 * camel-mime-filter-stripheader.h: New file. Header for the above.
5691 * providers/smtp/camel-smtp-transport.c (smtp_data): Use the
5692 stripheader filter to remove the "Bcc" header.
5694 * Makefile.am: Add the stripheader files.
5696 * tests/lib/Makefile.am (INCLUDES): Get this to compile again.
5698 * tests/mime-filter/test-stripheader.c: New file. Test suite for
5699 the CamelMimeFilterStripHeader.
5701 * tests/mime-filter/Makefile.am: New test section: mime filters.
5703 2001-06-28 Jeffrey Stedfast <fejj@ximian.com>
5705 * camel-mime-utils.c (header_decode_param_list): Fix a memory
5706 leak. Also if the decoded value is NULL, that means it wasn't
5707 encoded so we don't want to toss the old value.
5708 (header_param_list_format_append): Correctly wrap long parameter
5709 values according to rfc2184.
5711 2001-06-28 Dan Winship <danw@ximian.com>
5713 * providers/imap/camel-imap-folder.c (imap_refresh_info): If the
5714 folder is frozen, don't refresh, just record that we need to do it
5716 (imap_append_online): If the APPEND doesn't trigger an immediate
5717 EXISTS response (because the folder isn't the selected folder, or
5718 because the server doesn't do that until the next command), call
5719 imap_refresh_info on the folder.
5720 (imap_copy_online): Likewise. (Replacing the unconditional NOOP
5721 that was there before, which absolutely killed filter performance
5722 by forcing the IMAP provider to switch back and forth between
5723 folders after every copy or move.)
5724 (imap_thaw): If the folder needs a refresh, do it.
5726 * camel-folder.c (camel_folder_is_frozen): New method
5728 2001-06-27 Jeffrey Stedfast <fejj@ximian.com>
5730 * camel-transport.c (camel_transport_init): Initialize the private
5732 (camel_transport_finalize): Free the private send_lock.
5733 (camel_transport_get_type): Set the init and finalize functions.
5734 (camel_transport_send): Lock the transport.
5735 (camel_transport_send_to): Same.
5737 * camel-private.h: Add CAMEL_TRANSPORT_(UN)LOCK macros.
5739 2001-06-27 Jeffrey Stedfast <fejj@ximian.com>
5741 * tests/folder/test9.c (main): Updated to match the current API.
5743 * tests/folder/test3.c: #include <gtk/gtk.h> since we use
5746 * camel-internet-address.c
5747 (camel_internet_address_encode_address): Use the new
5748 header_address_fold.
5750 * camel-mime-utils.c: Removed some old #if 0'd code of mine.
5751 (rfc2047_encode_word): If enclen is 0, don't write an encoded word
5752 token (=?iso-8859-7?Q??= would be an invalid token).
5753 (header_address_fold): New function to wrap address headers -
5754 header_fold() was force-wrapping rfc2047 encoded words which was
5755 making the test suite fail. The *real* solution, however, is to
5756 not create rfc2047 encoded words longer than 72 chars.
5758 2001-06-26 Jeffrey Stedfast <fejj@ximian.com>
5760 * camel-filter-driver.c (open_folder): Since we want an error
5761 opening a folder to result in the message being copied to Inbox
5762 (assuming no other filters get a chance to `move` it), don't
5763 record any exceptions that may occur in this function.
5765 2001-06-26 Dan Winship <danw@ximian.com>
5767 * providers/imap/camel-imap-folder.c (camel_imap_folder_selected,
5768 imap_append_offline, imap_append_online,
5769 camel_imap_folder_changed): lock the cache around accesses
5771 * providers/imap/camel-imap-store.c (get_folder_online): ref the
5772 newly-created folder (as current_folder) before calling
5773 camel_imap_folder_selected, in case that needs to do something
5774 that causes another folder to become current...
5776 * camel-service.c (camel_service_get_url): D'oh.
5777 s/FALSE/CAMEL_URL_HIDE_PASSWORD/
5779 2001-06-25 Jeffrey Stedfast <fejj@ximian.com>
5781 * camel-filter-search.c (get_source): g_strdup() the message
5782 source here or we will have problems later when we go to free the
5785 2001-06-25 Dan Winship <danw@ximian.com>
5787 * providers/imap/camel-imap-store.c (try_auth): Fix this: IMAP
5788 doesn't allow an extra argument to AUTHENTICATE to avoid a useless
5789 round trip like some other SASL bindings do.
5791 * providers/imap/camel-imap-command.c (imap_read_response): Deal
5792 with IMAP servers that (incorrectly) return "+\r\n" rather than
5793 "+ \r\n" for an empty continuation response.
5794 (camel_imap_response_extract_continuation): Likewise.
5796 2001-06-21 Jeffrey Stedfast <fejj@ximian.com>
5798 * camel-mime-utils.c (word_types_compatable): New function that
5799 decides if 2 word types are mergeable. An atom and a qstring are
5800 mergeable; 2 qstrings are mergeable; and 2 encoded words are
5802 (header_encode_phrase_merge_words): If 2 words are merged, the new
5803 word type is the MAX of the combined types. This means that if we
5804 merge a qstring and an atom, the resulting word type is a
5807 * camel-internet-address.c (internet_format):
5808 s/g_string_sprintfa/g_string_append since this makes more sense in
5809 this particular case.
5810 (internet_encode): Same here.
5812 2001-06-21 Jeffrey Stedfast <fejj@ximian.com>
5814 * providers/smtp/camel-smtp-transport.c (smtp_send): Use
5815 camel_address_length() rather than casting and accessing data
5818 2001-06-20 Jeffrey Stedfast <fejj@ximian.com>
5820 * camel-mime-utils.c (header_raw_check_mailing_list): If the first
5821 char of the mailing-list name is '<', chop it off to make Ettore
5822 happy. Fixes bug #2153.
5824 2001-06-19 Not Zed <NotZed@Ximian.com>
5826 * camel-lock-helper.c (unlock_id): Fixed a bug when not running
5827 setuid it wouldn't unlock.
5829 * camel-movemail.c (camel_movemail): use new
5830 locking daemon, also return an error code.
5832 2001-06-18 Jeffrey Stedfast <fejj@ximian.com>
5834 Note: Except for the info_free(), the NULL checks are
5835 g_return's. I felt that since g_free() handles NULL that our
5836 _free() functions should also.
5838 * camel-folder.c (camel_folder_change_info_free): Check to make
5839 sure that the info pointer isn't NULL.
5840 (camel_folder_change_info_change_uid): Same.
5841 (camel_folder_change_info_changed): Same.
5842 (camel_folder_change_info_remove_uid): Same.
5843 (camel_folder_change_info_add_uid): Same.
5844 (camel_folder_change_info_build_diff): Same.
5845 (camel_folder_change_info_cat): Same.
5846 (camel_folder_change_info_add_source): Same.
5847 (camel_folder_change_info_add_source_list): Same.
5848 (camel_folder_change_info_add_update): Same.
5849 (camel_folder_change_info_add_update_list): Same.
5851 2001-06-18 Dan Winship <danw@ximian.com>
5853 * tests/stream/Makefile.am (LDADD):
5854 * tests/smime/Makefile.am (LDADD):
5855 * tests/misc/Makefile.am (LDADD):
5856 * tests/message/Makefile.am (LDADD):
5857 * tests/folder/Makefile.am (LDADD): Remove DB3_LDADD
5859 * Makefile.am (install-exec-local): Set camel-lock-help setgid or
5862 2001-06-18 Not Zed <NotZed@Ximian.com>
5864 * camel-folder-summary.c
5865 (camel_folder_summary_info_new_from_parser): Only create a missing
5866 uid if we have indexing turned on.
5868 * camel-lock-helper.c (setup_process): Function to setup
5869 process/sanity/security checks. Change to the real uid as soon as
5871 (lock_path): First try to lock as the real uid, if that fails, try
5873 (unlock_id): Unlock as the uid we created the lock as.
5875 * Makefile.am (INCLUDES): Added -DCAMEL_SBINDIR for lock helper
5878 * providers/local/camel-spool-folder.c (spool_lock): Implemented,
5879 using lock helper locking. Need to work out if the locking
5880 requires a root created lock?
5881 (spool_unlock): Likewise.
5883 2001-06-15 Not Zed <NotZed@Ximian.com>
5885 * camel-lock-helper.c: Setuid Lock helper process. Creates and manages
5886 .locks, keeping them active, removing them, etc. What real perms it
5887 needs is a little system dependent.
5889 2001-06-14 Not Zed <NotZed@Ximian.com>
5891 * providers/local/camel-maildir-store.c (get_folder_info): Implement.
5892 (scan_dir): Does the work of scanning for maildir directories.
5894 2001-06-13 Not Zed <NotZed@Ximian.com>
5896 * providers/local/camel-spool-store.c (get_folder_info):
5897 Implemented, just returns a hardcoded INBOX folder.
5898 (free_folder_info): implemented, free's the 1 possible level of
5901 * providers/local/camel-spool-folder.c
5902 (camel_spool_folder_construct): Set the real unread message
5903 count on the folder_created thing.
5905 2001-06-15 Dan Winship <danw@ximian.com>
5907 * providers/imap/camel-imap-message-cache.c
5908 (camel_imap_message_cache_max_uid): Return the largest real UID in
5909 the cache (as an integer). Eventually to be used for an
5910 optimization in the new-message fetch code.
5911 (cache_put): Keep track of max_uid.
5913 2001-06-14 Jeffrey Stedfast <fejj@ximian.com>
5915 * camel-mime-utils.c: Added Mailing-List header regex so that we
5916 can do mlist magic on that header.
5918 2001-05-28 Jeffrey Stedfast <fejj@ximian.com>
5920 * camel-mime-utils.c (header_decode_param): Properly handle
5921 correct and incorrect (for the common case, ie Outlook and
5922 Netscape/Mozilla) rfc2184 values.
5923 (header_decode_rfc2184_param): Get the param name and see if we
5924 should expect a rfc2184 parameter value.
5925 (rfc2184_decode): Decode a rfc2184 value.
5926 (hex_decode): hex decode a string.
5927 (header_decode_param_list): Handle rfc2184 encoded parameters (ie
5928 parameters that have been split and perhaps encoded).
5929 (header_param_list_format_append): Encode the value before seeing
5930 if it will fit on the line. If the value does get encoded, be sure
5931 to put a '*' before the equal-sign.
5932 (header_encode_param): New function to rfc2184 encode a parameter
5933 value (maybe it should be renamed?)
5935 2001-06-14 Jeffrey Stedfast <fejj@ximian.com>
5937 * camel-mime-part.c (init_header_name_table): Don't try to format
5938 the Reply-To header - we don't want to wrap the reply-to address.
5940 2001-06-12 Not Zed <NotZed@Ximian.com>
5942 * providers/local/camel-spool-*.[ch]: A new provider, for spool
5943 mailboxes. Mostly a cut and paste of the mbox code, but not a
5944 subclass CamelLocal*. Not tested a lot, doesn't lock yet, use
5945 with extreme caution.
5947 * tests/lib/folders.c (test_folder_message_ops): Added spool arg,
5948 spool folders can't be deleted, renamed, etc.
5949 (test_folder_basic): Same.
5951 * tests/folder/test2.c (main): Added checks for spool type.
5953 * tests/[message|stream|folder|misc|smime]/Makefile.am (LDADD):
5954 Added db3 flags, so make check compiles, doesn't run though.
5956 2001-05-24 Not Zed <NotZed@Ximian.com>
5958 * providers/local/camel-local-provider.c
5959 (camel_provider_module_init): Added spool provider.
5961 2001-06-07 Jon Trowbridge <trow@ximian.com>
5963 * camel-filter-driver.c (camel_filter_driver_filter_folder): Add a
5964 separator between the service url and the folder name, if needed.
5966 * camel-filter-driver.c (camel_filter_driver_filter_mbox): Added
5967 an argument, so that the original source URI of the mbox can be
5968 passed in. This is needed because this function is called
5969 post-movemail, so we are never reading from the original mbox
5970 anymore. Without the original mbox URI, the X-Evolution-Source
5971 tag gets set incorrectly and filter-on-source will fail to work.
5972 (camel_filter_driver_filter_message): Also take an extra arg
5973 for the original source URI. It is the original URI, not the
5974 source URI, that is used for filtering and for setting the
5975 X-Evolution-Source tag.
5977 2001-06-05 Dan Winship <danw@ximian.com>
5979 * providers/imap/camel-imap-folder.c (imap_rescan): Don't fetch
5980 the UID and FLAGS of messages we don't know about yet, since
5981 they'll just get discarded.
5983 2001-06-01 Jeffrey Stedfast <fejj@ximian.com>
5985 * tests/smime/pgp.c: Fix to not get into a recursive loop in
5988 * tests/smime/pgp-mime.c: Same.
5990 2001-05-31 Jeffrey Stedfast <fejj@ximian.com>
5992 * camel-smime-context.c: Numerous fixes to get it to compile.
5994 * camel.h: Added camel-cipher-context.h, camel-cms-context.h,
5995 camel-smime-context.h, and camel-smime-utils.h
5997 * camel-cms-context.[c,h]: New virtual class for manipulating
5998 cryptographic message syntax messages (like S/MIME).
6000 * camel-smime-context.[c,h]: Modified to inherit from the
6001 CamelCMSContext class rather than the CamelCipherContext class.
6003 * camel-smime.[c,h]: Removed - just use camel-smime-context
6006 * camel-smime-utils.[c,h]: New source files. Moved the 2 useful
6007 functions from camel-smime.[c,h] into here.
6009 2001-05-30 Dan Winship <danw@ximian.com>
6011 * camel-charset-map.c: Redo the BUILD_MAP code to not depend on
6012 libunicode. Now it only generates a map of "popular" 8bit
6013 encodings. (It's not worthwhile to support obscure encodings,
6014 because any mailer that supports them will support UTF8 too. And
6015 Chinese and Japanese use mostly the same UTF8 characters so you
6016 need to decide between those encodings based on the locale or
6017 the charset of the message you're replying to or the input
6018 method you used. So this is sufficient for camel_charset_best's
6021 * camel-charset-map-private.h: Regenerated.
6023 * camel.c (camel_shutdown): Move #ifdefs around to prevent a
6026 2001-05-29 Dan Winship <danw@ximian.com>
6028 * camel-disco-diary.c: Code for logging and replaying offline
6031 * camel-disco-store.c (disco_construct): Set disco->status here
6032 (where we can base it on the session's offline status) rather than
6034 (disco_connect): If we connect online and have a non-empty diary,
6035 switch to RESYNCING mode and replay the diary to the server.
6036 (disco_get_folder, disco_get_folder_info): Add _resyncing
6039 * camel-disco-folder.c (disco_sync, disco_expunge_uids,
6040 disco_append_message, disco_copy_messages_to,
6041 disco_move_messages_to): Add _resyncing variants to switches.
6042 (disco_expunge_uids, disco_append_message, disco_copy_messages_to,
6043 disco_move_messages_to): Remove #ifdef'ed out diary code: let the
6045 (disco_append_message): Redo the append methods to no longer
6046 return the UID, since we're no longer doing the logging from here.
6048 * providers/imap/camel-imap-store.c (imap_connect_online,
6049 imap_connect_offline): Create a CamelDiscoDiary.
6050 (imap_disconnect_offline): And free it.
6052 * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
6053 If RESYNCING, don't do any sort of checking that the remote folder
6054 matches the summary, beyond making sure that the UIDVALIDITY is
6056 (imap_rescan): Add a missing camel_folder_summary_info_free when
6057 removing a UID from the summary.
6058 (imap_expunge_uids_offline): Implement. Fairly simple.
6059 (imap_expunge_uids_resyncing): Implement. If the store supports
6060 UIDPLUS, we can just use imap_expunge_uids_online. If not, we need
6061 to temporarily undelete any messages marked deleted on the server
6062 that aren't supposed to get expunged.
6063 (imap_append_offline): Implement, using cache and summary
6064 operations, and triggering the folder_changed event by hand.
6065 (imap_append_resyncing): Implement. Redo imap_append_online a bit
6066 in the process to make them able to share more code.
6067 (imap_copy_offline): Implement.
6068 (imap_copy_online): Move parts of this out into a helper.
6069 (imap_copy_resyncing): Implement. In most cases this is just like
6070 imap_copy_online, but if you are copying a message that was itself
6071 copied or appended into the folder, and the server doesn't do
6072 UIDPLUS, it will be necessary to replace at least part of the copy
6073 operation with one or more appends.
6075 * providers/imap/camel-imap-command.c (imap_read_response): Don't
6076 record the current folder in the response when in RESYNCING mode.
6077 (This means that EXISTS and EXPUNGE responses won't be processed,
6078 which is needed because the summary may not match the folder at
6080 (imap_read_response): On error, call
6081 camel_imap_response_free_without_processing, not
6082 camel_imap_response_free.
6084 * providers/imap/camel-imap-utils.c (imap_uid_array_to_set): Make
6085 this work better when operating on UIDs that aren't in the summary.
6087 * providers/imap/camel-imap-summary.c
6088 (camel_imap_summary_add_offline): New routine used by
6089 imap_append_offline and imap_copy_offline to create new summary
6092 2001-05-28 Jeffrey Stedfast <fejj@ximian.com>
6094 * camel-mime-utils.c (header_set_param): Use g_strcasecmp()
6095 because some systems don't have strcasecmp(). Also, when removing
6096 a param, make sure to free the param->name too.
6098 2001-05-27 Dan Winship <danw@ximian.com>
6100 * tests/lib/messages.c (test_message_read_file): Fix an fd leak
6102 * tests/lib/session.c, tests/lib/session.h: a CamelSession
6103 subclass for the test programs.
6105 * tests/lib/Makefile.am: include session.[ch]
6107 * tests/folder/test*.c: Use a CamelTestSession from libcameltest
6108 instead of cut+pasting everywhere.
6110 * tests/misc/url.c (main): Update for a camel_url_new change at
6113 * tests/*/.cvsignore: Add stuff.
6115 * camel-mime-utils.c (rfc2047_encode_word): Fix a silly ==/!=
6118 2001-05-26 Dan Winship <danw@ximian.com>
6120 * providers/imap/camel-imap-folder.c: Add a "need_rescan" flag
6121 saying if we want to rescan the entire folder for flag changes
6122 next time it's selected.
6123 (camel_imap_folder_init): Set need_rescan TRUE.
6124 (camel_imap_folder_selected): If need_rescan is TRUE, call
6126 (imap_refresh_info): Only do a full rescan if need_rescan is TRUE.
6127 Otherwise just do a NOOP, making this a MUCH more lightweight
6128 operation. Also, don't call imap_rescan directly if the folder
6129 isn't selected, since that could end up causing the folder to be
6130 scanned *twice* (imap_rescan -> camel_imap_command ->
6131 camel_imap_folder_selected -> imap_rescan).
6132 (imap_rescan): Set need_rescan FALSE.
6133 (imap_sync_online): Don't NOOP if no changes were pushed: the
6134 caller will call refresh_info if it wants to poll for changes.
6135 Fixes evolution-mail doing lots of unnecessary extra work at
6138 * providers/imap/camel-imap-store.c (refresh_folder_info): Set
6139 need_rescan on each folder before calling refresh_info.
6141 2001-05-25 Jeffrey Stedfast <fejj@ximian.com>
6143 * providers/smtp/camel-smtp-transport.c (smtp_auth): Oops. Use a
6144 strNcmp to make sure the response begins with a 334 code, not a
6147 * providers/local/camel-maildir-folder.c (maildir_append_message):
6148 remove the summary info so we are not out-of-sync with the maildir
6151 * providers/local/camel-mh-folder.c (mh_append_message): remove
6152 the summary info so we are not out-of-sync with the mh folder.
6154 * providers/local/camel-mbox-folder.c (mbox_append_message):
6155 remove the summary info so we are not out-of-sync with the mbox.
6157 2001-05-24 Jeffrey Stedfast <fejj@ximian.com>
6159 * camel-smime-context.c (camel_smime_context_new): Oops, I spelled
6160 the get-default-db function name wrong.
6162 2001-05-23 Jeffrey Stedfast <fejj@ximian.com>
6164 * providers/local/camel-local-folder.c
6165 (camel_local_folder_construct): s/folder_deleted/folder_created -
6166 result of a bad copy/paste.
6168 * providers/imap/camel-imap-search.c (imap_body_contains):
6169 Optimize the match "" case.
6171 2001-05-21 Jeffrey Stedfast <fejj@ximian.com>
6173 * providers/imap/camel-imap-store.c (get_folder_info_online):
6174 Store the CamelFolderInfo tree that was returned from
6175 camel_folder_info_build() in a new variable, 'tree', rather than
6176 'fi' since we later use 'fi' when syncing folders. Not only does
6177 this fix a memory leak, but it also fixes the bug where the user
6178 would only see the last folder in the folder list and/or it's
6181 2001-05-16 Jeffrey Stedfast <fejj@ximian.com>
6183 * camel-session.c (camel_session_forget_password): The service can
6184 be NULL here too, thanks to Wayne Davis for pointing this out.
6186 * camel-smime-context.c (camel_smime_context_new): We don't need
6187 to be passed the certdb path anymore.
6189 2001-05-16 Dan Winship <danw@ximian.com>
6191 * camel-medium.c (camel_medium_get_headers): New function to
6192 return an array of all headers.
6193 (camel_medium_free_headers): And free them.
6195 * camel-mime-part.c (get_headers, free_headers): Implement this
6196 for CamelMimePart. (Works for CamelMimeMessage too.)
6198 2001-05-15 Jeffrey Stedfast <fejj@ximian.com>
6200 * camel-smime-context.c (camel_smime_context_finalise): Don't
6201 close or free (it wasn't allocated) the certdb.
6202 (camel_smime_context_new): If we get a NULL certdb handle, then
6203 don't bother trying to create a new certdb handle since NSS_Init*
6204 should have done that.
6206 2001-05-15 Jeffrey Stedfast <fejj@ximian.com>
6208 * Makefile.am: Don't use EXTRA_GNOME_*, use the new CAMEL_*
6209 variables so we don't link in tons of extra cruft that we don't
6212 * tests/smime/pkcs7.c: Added to the test suite - tests the S/MIME
6215 2001-05-14 Jeffrey Stedfast <fejj@ximian.com>
6217 * camel-smime-context.c: Lots of fixes to get this to compile.
6219 * camel-smime.c (camel_smime_part_verify): Updated to pass in a
6220 hash argument to camel_smime_verify().
6222 * camel-pgp-mime.c (camel_pgp_mime_part_verify): Update according
6223 to the changes in the context API.
6225 * camel-pgp-context.c (pgp_verify): Updated to take a
6226 CamelCipherHash argument.
6228 * camel-cipher-context.c (camel_cipher_verify): Now takes a hash
6229 argument since the S/MIME code needs this.
6231 * Makefile.am: Add camel-smime-context.[c,h] and camel-smime.[c,h]
6234 * camel-smime.[c,h]: New source files for manipulating S/MIME
6237 2001-05-14 Jon Trowbridge <trow@ximian.com>
6239 * camel-search-private.c (utf8_get): Replicate the semantics of
6240 the libunicode utf8 functions by returning NULL in the arg
6243 * camel-pgp-context.c (pgp_verify): Check for valid utf8,
6244 terminate loop if something looks wrong.
6246 * camel-mime-utils.c (header_encode_phrase_get_words): Properly
6247 check for invalid utf8.
6248 (header_encode_string): Properly check for invalid utf8.
6250 * camel-charset-map.c (camel_charset_step): Properly check for
6253 2001-05-14 Jeffrey Stedfast <fejj@ximian.com>
6255 * tests/folder/test9.c:
6256 * tests/folder/test8.c:
6257 * tests/folder/test7.c:
6258 * tests/folder/test6.c:
6259 * tests/folder/test5.c:
6260 * tests/folder/test4.c:
6261 * tests/folder/test3.c:
6262 * tests/folder/test2.c:
6263 * tests/folder/test1.c:
6264 * tests/smime/pgp-mime.c:
6265 * tests/smime/pgp.c: Subclass CamelSession since we can no longer
6266 specify the passwd callback any other way and update code
6269 2001-05-11 Dan Winship <danw@ximian.com>
6271 * camel-mime-utils.c (header_location_decode): Decode
6272 Content-Location, either correctly or Netscape-generated-brokenly.
6274 * camel-mime-part.c (camel_mime_part_set_content_location,
6275 camel_mime_part_get_content_location, etc): Deal with
6276 Content-Location header.
6278 2001-05-11 Jeffrey Stedfast <fejj@ximian.com>
6280 * providers/smtp/camel-smtp-transport.c (smtp_auth): Don't check
6281 the initial auth response until we get into the while-loop
6282 otherwise we have problems if the SASL mechanism supported a
6283 client initiated challenge (like PLAIN and LOGIN do).
6285 2001-05-11 Dan Winship <danw@ximian.com>
6287 * camel-stream-null.c (camel_stream_null_new): Make this return
6288 CamelStream * (like the other stream new functions) instead of
6291 2001-05-10 Chris Toshok <toshok@ximian.com>
6293 * camel-tcp-stream-ssl.c (stream_connect): call SSL_Enable after
6294 the SSL_ImportFD and before PR_Connect. Otherwise, NSS aborts
6297 2001-05-10 Jeffrey Stedfast <fejj@ximian.com>
6299 * camel-session.c (camel_session_get_password): Don't abort if the
6300 Service is NULL, this is perfectly valid for cipher contexts.
6302 2001-05-09 Peter Williams <peterw@ximian.com>
6304 * providers/imap/camel-imap-folder.c (imap_move_messages_to): Pass
6305 appropriate parameters to CF_CLASS and add comment explaining why
6306 my initial attempt at a solution didn't work.
6308 2001-05-09 Dan Winship <danw@ximian.com>
6310 * camel-disco-store.c (camel_disco_set_status): Set the
6311 disconnected status.
6312 (camel_disco_store_can_work_offline): Return whether or not a
6313 given CamelDiscoStore can work offline or not.
6315 * camel-disco-folder.c (camel_disco_folder_cache_message):
6316 Explicitly tell a folder to cache a message. (Better than using
6317 get_message, because for IMAP that doesn't guarantee you'll get
6318 all the message parts.)
6319 (camel_disco_folder_prepare_for_offline): Prepare a folder for
6320 offline use by caching all messages meeting given search criteria
6321 (and doing anything else the particular folder implementation
6324 * camel-session.c (camel_session_set_online,
6325 camel_session_is_online): A session-wide online/offline toggle.
6326 (camel_session_init): Set online to TRUE.
6328 * providers/imap/camel-imap-store.c (can_work_offline):
6329 Implementation of CamelDiscoStore::can_work_offline. (Checks that
6330 the store has been used online at least once.)
6331 (imap_get_folder_online, imap_get_folder_offline): Deal with
6332 request for "inbox" properly. ("Don't you mean... 'INBOX'?").
6334 * providers/imap/camel-imap-folder.c (imap_cache_message):
6335 Implementation of CamelDiscoFolder::cache_message.
6337 * camel.h: Add camel-disco-store.h and camel-disco-folder.h
6339 2001-05-09 Jeffrey Stedfast <fejj@ximian.com>
6341 * camel-mime-part.c (camel_mime_part_set_content_id): Wrap the
6342 content-id with <>'s.
6344 2001-05-04 Jeffrey Stedfast <fejj@ximian.com>
6346 * providers/smtp/camel-smtp-transport.c (connect_to_server): Add
6347 support for using OpenSSL.
6349 * camel-remote-store.c (remote_connect): Add support for using the
6350 OpenSSL implementation.
6352 * camel-tcp-stream-ssl.c (ssl_bad_cert): Hmmmm, don't pass in a
6353 NULL as the last argument to alert_user - prototype doesn't take
6354 that argument anymore?
6356 * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_finalize):
6357 (ssl_verify): Use a global hash table to try and lookup the
6358 CamelTcpStreamOpenSSL object given the ssl context since OpenSSL
6359 doesn't think one needs to pass data around, we should all be
6360 living in a world of global variables, duh!
6362 2001-05-06 Dan Winship <danw@ximian.com>
6364 * Makefile.am (libcamelinclude_HEADERS): Fix another build
6365 problem. (Um, anyone else could have done this...)
6367 2001-05-04 Dan Winship <danw@ximian.com>
6369 * providers/imap/camel-imap-store.c (get_folder_online): Fix up
6370 refcounting on current_folder.
6372 * camel-disco-folder.c, camel-disco-store.h: Remove
6373 CamelDiscoDiary refs that weren't supposed to escape yet.
6375 2001-05-03 Dan Winship <danw@ximian.com>
6377 * camel-disco-store.c: new abstract class for disconnectable
6380 * camel-disco-folder.c: new abstract class for folders on
6381 disconnectable stores.
6383 * Makefile.am: Add camel-disco-folder.[ch] and
6384 camel-disco-store.[ch].
6386 * providers/imap/camel-imap-store.c: Make this a subclass of
6387 CamelDiscoStore, and fix up the offline interfaces for the changes
6388 since they were first written (particularly the fact that some
6389 IMAP stores don't just use subscribed folders).
6391 * providers/imap/camel-imap-folder.c: Make this a subclass of
6392 CamelDiscoFolder, although most ops still fail in disconnected
6395 * camel-store.c (camel_store_get_folder_info): Change gboolean,
6396 gboolean, gboolean to guint32 in the prototype for this function.
6398 * providers/local/camel-local-store.c (get_folder_info): Update
6399 for prototype change.
6401 2001-05-02 Dan Winship <danw@ximian.com>
6403 * providers/imap/camel-imap-store.h: Clean this up a bit. Add a
6404 "tag_prefix" member. Move "useful_lsub" into capabilities.
6406 * providers/imap/camel-imap-store.c (camel_imap_store_init):
6407 Initialize the tag_prefix, based on a static variable.
6409 * providers/imap/camel-imap-command.c (camel_imap_command): Use
6410 the store's tag_prefix character rather than "A" at the start of
6411 the tag. Makes the verbose debug output easier to parse when
6412 connected to multiple IMAP servers. (Well, unless you're connected
6413 to more than 26 servers...)
6415 * providers/imap/camel-imap-utils.c (imap_uid_array_to_set): Fix
6416 this up... it was losing count in some cases and giving a more
6417 verbose answer than it needed to.
6419 * providers/pop3/camel-pop3-store.c: Rescue the KPOP code from bit
6422 2001-05-01 Dan Winship <danw@ximian.com>
6424 * providers/imap/camel-imap-command.c (camel_imap_command): Redo
6425 command locking. Since command_lock is recursive, we can just get
6426 a lock here, and release it either on error, or when the caller
6427 frees the response data. (This simplifies a lot of stuff, and
6428 fixes some problems with camel_imap_folder_changed being called
6429 without the command_lock locked because of the 2001-03-22 change.)
6431 (camel_imap_response_free):
6432 (camel_imap_response_free_without_processing):
6433 (camel_imap_response_extract):
6434 (camel_imap_response_extract_continuation): These all take a
6435 CamelImapStore now as well, to deal with locking.
6437 * providers/imap/camel-imap-private.h: Add
6438 CAMEL_IMAP_STORE_ASSERT_LOCKED, which defaults to a noop, but can
6439 be made to call e_mutex_assert_locked.
6441 * providers/imap/camel-imap-folder.c, camel-imap-search.c,
6442 camel-imap-store.c: Simplify using new locking stuff. Add a few
6443 CAMEL_IMAP_STORE_ASSERT_LOCKED checks.
6445 2001-05-01 Dan Winship <danw@ximian.com>
6447 Support the IMAP UIDPLUS extension (RFC 2359), which lets you
6448 resync after disconnected operation more efficiently, but also
6449 makes it possible to do appends and moves/copies more efficiently
6452 * providers/imap/camel-imap-folder.c (imap_append_message): If the
6453 server supports UIDPLUS, grab the APPENDUID response and cache the
6454 message into the folder's message cache.
6455 (imap_copy_messages_to): Likewise, for COPYUID, copy any message
6456 parts we have cached between the source and destination folder
6458 (imap_get_message): If the entire message is already in the cache,
6459 just return that rather than building it from parts.
6460 (imap_update_summary): Fetch just the "UID FLAGS RFC822.SIZE" of
6461 the new messages first, then only fetch the headers for messages
6462 where we don't already have the headers cached.
6464 * providers/imap/camel-imap-message-cache.c: Add gtk-doc comments.
6465 (cache_put): Fix refcounting stuff here.
6466 (camel_imap_message_cache_insert_stream,
6467 camel_imap_message_cache_insert_wrapper): New.
6468 (camel_imap_message_cache_get): Fix a bug here so the memory
6469 caching actually works.
6470 (camel_imap_message_cache_copy): New routine, used by
6471 imap_copy_messages_to.
6473 * providers/imap/camel-imap-utils.c (imap_uid_set_to_array):
6474 Inverse operation of imap_uid_array_to_set. Used to parse COPYUID
6477 2001-04-30 Dan Winship <danw@ximian.com>
6479 * providers/imap/camel-imap-utils.c (imap_uid_array_to_set):
6480 New-and-improved version of get_uid_set() from
6481 camel-imap-folder.c. Looks at the summary as it goes so that if
6482 you ask for messages 5, 6, 8, and 9, and there is no message 7,
6483 then you get "5:9" instead of "5:6,8:9"
6485 * providers/imap/camel-imap-folder.c (imap_copy_messages_to): Use
6486 imap_uid_array_to_set() rather than get_uid_set().
6489 2001-04-27 Dan Winship <danw@ximian.com>
6491 * camel-session.c: Redo this a lot so that instead of having a
6492 class full of callbacks, we have a subclassable class. Also,
6493 replace the increasingly horrifying
6494 camel_session_query_authenticator with three new routines,
6495 camel_session_get_password, camel_session_forget_password, and
6496 camel_session_alert_user.
6498 * camel-pgp-context.c:
6499 * camel-pkcs7-context.c:
6500 * camel-smime-context.c:
6501 * providers/imap/camel-imap-store.c:
6502 * providers/pop3/camel-pop3-store.c:
6503 * providers/smtp/camel-smtp-transport.c:
6504 Use camel_session_get_password / camel_session_forget_password.
6506 * camel-tcp-stream-ssl.c (ssl_bad_cert): Use
6507 camel_session_alert_user.
6509 2001-04-26 Jeffrey Stedfast <fejj@ximian.com>
6511 * camel.c (camel_init): Automagically call camel_shutdown()
6513 (camel_init): Also initialize NSS databases as read/write for
6514 S/MIME and if NSS fails to init, try initializing with volatile
6517 * camel-file-utils.h: #include <sys/types.h> for off_t.
6519 2001-04-26 Dan Winship <danw@ximian.com>
6521 * camel-file-utils.c: New file, with the int, string, time_t, and
6522 off_t encode/decode routines from camel-folder-summary.c moved
6523 here and renamed, for the enjoyment of non-CamelFolderSummary
6526 * Makefile.am (libcamel_la_SOURCES): Add camel-file-utils.c
6527 (libcamelinclude_HEADERS): and camel-file-utils.h
6529 * camel-folder-summary.c: Remove functions that were moved to
6530 camel-file-utils.c, update uses of them for the new names.
6531 (camel_folder_summary_{en,de}code_token are still here.)
6533 * providers/local/camel-mbox-summary.c: Use camel_file_util_*
6536 * providers/imap/camel-imap-summary.c: Use camel_file_util_* names
6538 * providers/imap/camel-imap-store.c (imap_store_setup_online,
6539 imap_store_setup_offline): Use camel_file_util_* names, which
6540 makes much more sense since this isn't folder summary stuff.
6542 2001-04-26 Dan Winship <danw@ximian.com>
6544 * Makefile.am (INCLUDES): Remove UNICODE_CFLAGS (and some other
6545 stuff that's redundant with EXTRA_GNOME_CFLAGS)
6546 (libcamel_la_LIBADD): Replace UNICODE_LIBS with GAL_LIBS.
6548 * camel-search-private.c:
6549 * camel-pgp-context.c:
6550 * camel-mime-utils.c: Use gunicode interfaces rather than
6553 * camel-charset-map.c: Use gunicode rather than libunicode. (The
6554 charmap-regen code still depends on libunicode though.)
6556 * camel-mime-filter-charset.h:
6557 * tests/message/test2.c (convert): Use iconv rather than
6560 * providers/smtp/Makefile.am (libcamelsmtp_la_LIBADD):
6561 * providers/pop3/Makefile.am (libcamelpop3_la_LIBADD):
6562 * providers/local/Makefile.am (libcamellocal_la_LIBADD): Remove
6565 * camel.c (camel_init): Remove call to unicode_init.
6567 * camel-mime-parser.c: Remove unused unicode.h include.
6569 2001-04-26 Dan Winship <danw@ximian.com>
6571 * camel-service.c (get_host): Use e_gethostbyname_r.
6572 (camel_service_gethost): Remove unused var.
6574 2001-04-26 Not Zed <NotZed@Ximian.com>
6576 * Applied jacob's patches for e-poolv stuff.
6578 2001-04-23 Jeffrey Stedfast <fejj@ximian.com>
6580 * camel.h: Add camel-vee-folder.h and camel-digest-folder.h
6582 * camel-digest-folder.[c,h]: New class that can be used to browse
6583 a multipart/digest message as if it were a CamelFolder.
6585 2001-04-22 Jeffrey Stedfast <fejj@ximian.com>
6587 * camel-pgp-context.c (pgp_verify): Oops, don't use the return
6588 value of iconv() as a string length, it only tells us the number
6589 of non-reversable character conversions. This fixes it so we
6590 actually see the gpg output in the message viewer.
6592 2001-04-23 Mikael Hallendal <micke@codefactory.se>
6594 * providers/nntp/Makefile.am (INCLUDES):
6595 Changed GTK_INCLUDEDIR to EXTRA_GNOME_CFLAGS.
6597 2001-04-20 Jeffrey Stedfast <fejj@ximian.com>
6599 * camel-smime-context.c (smime_sign): Implemented using the
6600 secmime.h convenience functions.
6601 (smime_clearsign): We just error our here, there is no clearsign
6603 (smime_verify): Copied code over from the pkcs7 verify - same
6604 state, ugly and unknown :-)
6605 (smime_encrypt): Implemented using the secmime.h convenience
6607 (smime_decrypt): Same as the code in pkcs7-context.
6609 2001-04-19 Jeffrey Stedfast <fejj@ximian.com>
6611 * camel-pkcs7-context.c (pkcs7_sign): Implemented.
6612 (pkcs7_clearsign): Implemented.
6613 (get_zero_len_passwd): Convenience function to try a 0-length key
6614 on the certificate db - if this works then there is no need to
6616 (get_password): Callback to get the password.
6617 (camel_cipher_hash_to_nss): Convenience function to convert a
6618 CamelCipherHash to an NSS HASH_HashType.
6619 (nss_hash_to_sec_oid): Converts a HASH_HashType to a SecOidTag.
6620 (pkcs7_digest): Digest function for use with pkcs7_sign().
6621 (sign_encode_cb): Callback to write the signed data to the output
6623 (pkcs7_verify): Hacked on a bit more but am still a bit on the
6624 confused side. This might work but I wouldn't hold my breath. The
6625 sign/clearsign should be close if not correct, but this one...god
6627 (pkcs7_decrypt): Implemented.
6628 (pkcs7_encrypt): Implemented (mostly, still need to handle when
6631 2001-04-18 Dan Winship <danw@ximian.com>
6633 * providers/imap/camel-imap-store.c (camel_imap_store_finalize):
6634 Free base_url and storage_path.
6636 * providers/pop3/camel-pop3-store.c (finalize): Free the
6637 implementation string.
6638 (camel_pop3_command): Clarify documentation to mention that
6639 @ex isn't set (and *@ret is) on CAMEL_POP3_ERR.
6640 (connect_to_server): Set @ex properly on CAMEL_POP3_ERR.
6642 * providers/pop3/camel-pop3-folder.c (pop3_refresh_info,
6643 pop3_get_message): Set @ex properly on CAMEL_POP3_ERR.
6645 2001-04-17 Jeffrey Stedfast <fejj@ximian.com>
6647 * camel-pkcs7-context.[c,h]: New source files to handle Pkcs7
6648 encryption, decryption, signing, and verifying. Not yet
6649 complete. I'm sensing this is going to take a while seeing as how
6650 NSS is just so well documented.
6652 2001-04-17 Dan Winship <danw@ximian.com>
6654 * camel-filter-driver.c (camel_filter_driver_filter_message): Fix
6655 a memory leak in the error case.
6657 2001-04-16 Jeffrey Stedfast <fejj@ximian.com>
6659 * providers/local/camel-mbox-summary.c (summary_rebuild): Don't we
6660 want to tell where we are by using the start of the message? I
6661 think this should be using camel_mime_parser_tell_start_from()
6662 instead. Also divide by the size *before* multiplying by 100 so
6663 that we don't overflow the int which was giving us negative values
6664 for our progress status (oops).
6666 2001-04-16 Jeffrey Stedfast <fejj@ximian.com>
6668 * camel-operation.c: Added a prototype for stamp().
6670 * camel-charset-map.c (camel_charset_locale_name): #include
6671 string.h so we don't get a warning about strchr being undefined
6672 and also init charset to NULL.
6674 * camel-pgp-context.c (pgp_verify): Go back to doing the utf8
6675 conversion by hand so that we don't depend on gal.
6677 * Makefile.am: Remove the EXTRA_GNOME_CFLAGS include.
6679 * camel-store.c (camel_mkdir_hier): Convenience function that it
6680 seems a number of camel-store implementations used gal for.
6682 * providers/nntp/camel-nntp-store.c (ensure_news_dir_exists): Lets
6683 not depend on gal for just e_mkdir_hier() - use camel_mkdir_hier()
6686 * providers/nntp/camel-imap-store.c: Lets not depend on gal for
6687 just e_mkdir_hier() - use camel_mkdir_hier() instead.
6689 * camel-session.c (camel_session_get_storage_path): Don't depend
6690 on e_mkdir_heir() anymore, use the CamelStore version.
6692 * camel-folder-search.h: Removed gal dependency, why was this even
6693 there in the first place?
6695 * providers/imap/camel-imap-folder.c: Don't need gal/util/e-util.h
6698 * string-utils.c (strstrcase): New function, well more like old
6699 function brought back to life so we don't have to depend on gal.
6701 * providers/imap/camel-imap-store.c (imap_store_setup_online): Use
6702 strstrcase rather than e_strstrcase so we don't depend on gal.
6703 (get_unread_online): Same here.
6705 * providers/smtp/camel-smtp-transport.c (smtp_helo): Use
6708 2001-04-15 Jeffrey Stedfast <fejj@ximian.com>
6710 * camel-mime-utils.c (header_raw_check_mailing_list): regex
6711 doesn't set errno and regcomp returns 0 on success and any other
6712 value for an error (so don't *just* check for -1).
6714 2001-04-14 Jeffrey Stedfast <fejj@ximian.com>
6716 * camel-cipher-context.c: Check to make sure the context is a
6717 valid context in all the user functions.
6719 2001-04-13 Jon Trowbridge <trow@ximian.com>
6721 * providers/imap/camel-imap-store.c (imap_disconnect):
6722 s/imap_store/store/, fixing a typo that was causing the build to
6725 * camel-filter-search.c (get_source): Make the (previously unused)
6726 get-source command actually do the right thing, properly shrouding
6727 any passed-in source and falling back to use the source attached
6728 to the mime message.
6730 2001-04-13 Dan Winship <danw@ximian.com>
6732 * camel-object.c (camel_object_hook_event):
6733 * camel-uid-cache.c (camel_uid_cache_get_new_uids):
6734 * camel-url.c (camel_url_new_with_base): Plug leaks.
6736 * camel-remote-store.c (camel_remote_store_init): Don't
6737 re-initialize the folders hash table.
6739 * providers/imap/camel-imap-store.c (imap_disconnect): Free
6740 authtypes since they'll be re-read on re-connect.
6741 (get_folder_info): Free folderinfos that we're discarding from the
6744 2001-04-12 Jeffrey Stedfast <fejj@ximian.com>
6746 * camel-pgp-context.c (camel_pgp_context_get_type): Oops, lets not
6747 get into a recursive call here ;-)
6749 * tests/smime/pgp.c: Updated to reflect changes to the PGP code.
6751 * tests/smime/pgp-mime.c: Same.
6753 2001-04-12 Jeffrey Stedfast <fejj@ximian.com>
6755 * camel-pgp-mime.c: Updated to reflect the few changes made to the
6756 CamelPgpContext class.
6758 * camel-pgp-context.c: Updated to subclass of CamelCipherContext.
6760 * camel-cipher-context.[c,h]: New base class for
6761 CamelPgpContext. Also contains the replacement for
6762 CamelPgpValidity, CamelCipherValidity.
6764 2001-04-12 Dan Winship <danw@ximian.com>
6766 * camel-mime-filter-crlf.c (filter): Fix a pair of array bounds
6767 reads noted by purify
6769 2001-04-12 Jeffrey Stedfast <fejj@ximian.com>
6771 * camel.h: #include the pgp stuff.
6773 2001-04-12 Dan Winship <danw@ximian.com>
6775 * providers/imap/camel-imap-message-cache.c
6776 (camel_imap_message_cache_remove):
6777 * camel-url.c (camel_url_to_string): Plug memory leaks.
6779 2001-04-11 Dan Winship <danw@ximian.com>
6781 * providers/imap/camel-imap-utils.c (imap_parse_string_generic):
6782 Simplify peterw's imap_is_atom_char fix.
6784 2001-04-11 Jeffrey Stedfast <fejj@ximian.com>
6786 * tests/smime/Makefile.am: Added pgp-mime.c to the tests.
6788 * tests/smime/pgp-mime.c: Test suite for camel-pgp-mime.c functions.
6790 * Makefile.am: Add camel-pgp-mime.[c,h] to the build.
6792 * camel-pgp-mime.c: Made a number of fixes to get it to compile
6793 and also fixed a few logic errors (mostly forgetting to reset
6794 streams) so that it worked (thanks to the pgp-mime test program).
6796 2001-04-11 JP Rosevear <jpr@ximian.com>
6798 * providers/imap/Makefile.am: user GNOME_INCLUDEDIR since gnome
6799 files are included in the top level camel headers and the gtk
6800 include dir is now versioned and such
6802 * providers/local/Makefile.am: ditto
6804 * providers/pop3/Makefile.am: ditto
6806 * providers/smtp/Makefile.am: ditto
6808 * providers/sendmail/Makefile.am: ditto
6810 * camel-service.c: use five arg version of gethostbyname_r if
6812 (camel_get_host_byname): check if msg->herr is non-zero instead of
6813 checking if msg->hp is null since we may not always have msg->hp
6815 2001-04-11 Jeffrey Stedfast <fejj@ximian.com>
6817 * camel-sasl-digest-md5.c (digest_response): Use
6818 camel_charset_locale_name() to get the locale charset rather than
6819 checking the CHARSET environment variable. This is a much less
6820 ugly hack. Also: If we fail to be able to convert to UTF8, then
6821 disavow all knowledge of the charset parameter.
6823 * camel-charset-map.c (camel_charset_locale_name): New function to
6824 return the locale charset (or NULL if US-ASCII).
6826 2001-04-11 Jeffrey Stedfast <fejj@ximian.com>
6828 * camel-pgp-context.c (camel_pgp_verify): Use
6829 e_utf8_from_locale_string() rather than trying to do it manually
6830 since Lauris's version works much better.
6832 2001-04-06 Jeffrey Stedfast <fejj@ximian.com>
6834 * Makefile.am: Added camel-pgp-context.[c,h] to the build. Also
6835 added tests/smime/pgp.c and Makefile.am
6837 * tests/smime/pgp.c: New test suite for PGP functions.
6839 * camel-pgp-context.c: Various fixes to get it to build.
6841 2001-04-07 Peter Williams <peterw@ximian.com>
6843 * providers/imap/camel-imap-utils.c (imap_parse_string_generic): It
6844 would be a good idea to recognize '\0'. Before, this code was running
6845 off the ends of strings and intermittently coredumping (if it didn't
6846 hit an imap_atom_char first) -- whoops!
6848 2001-04-05 Not Zed <NotZed@Ximian.com>
6850 * merge from evolution-0-10-branch to evolution-0-10-merge-0
6852 2001-04-03 Jeffrey Stedfast <fejj@ximian.com>
6854 * Makefile.am: Added tests/ back in
6856 * camel-mime-utils.c (header_decode_text): Ignore whitespace
6857 between encoded words (there were a few cases where it didn't
6859 (header_encode_string): Preserve whitespace between words that are
6860 to be encoded by encoding them too.
6861 (header_encode_phrase): Same here but with phrases.
6863 2001-04-03 Dan Winship <danw@ximian.com>
6865 * providers/imap/camel-imap-folder.c (imap_sync): If we don't
6866 change any flags or expunge, send a NOOP to give the server a
6867 chance to send EXISTS, etc, messages.
6868 (imap_get_message): If the server_level < IMAP4rev1, always fetch
6869 messages all-at-once, since they don't support the [#.MIME]
6871 (imap_update_summary): When reading message flags, set the
6872 server_flags field as well, and don't overwrite any flags set by
6873 camel_folder_summary_info_new_from_message. Might help with some
6874 of the flag problems...
6876 2001-04-02 Dan Winship <danw@ximian.com>
6878 * camel-service.h: Remove the "quick_login" member, which is
6881 * providers/smtp/camel-smtp-transport.c (smtp_auth): Remove the
6882 references to quick_login and fix this to use the CamelSasl
6883 interfaces correctly to do the same thing.
6884 (connect_to_server): Split this out of smtp_connect
6885 (smtp_connect): Use connect_to_server. When re-EHLO'ing after
6886 auth, ignore errors.
6887 (query_auth_types): Use connect_to_server rather than
6888 smtp_connect, so it doesn't try to authenticate. Add LOGIN
6889 authtype to the list of authtypes to check for.
6891 * providers/smtp/camel-smtp-provider.c
6892 (camel_provider_module_init): Add LOGIN authtype to the authtypes
6895 * camel-sasl.c (camel_sasl_authtype_list): Don't list LOGIN here:
6896 it's not a real SASL authtype and is only used for SMTP.
6898 * camel-sasl-plain.c:
6899 * camel-sasl-login.c:
6900 * camel-sasl-kerberos4.c:
6901 * camel-sasl-cram-md5.c:
6902 * camel-sasl-anonymous.c:
6903 * providers/pop3/camel-pop3-provider.c: Remove "quick_login"
6904 argument from authtypes.
6906 2001-04-02 Gediminas Paulauskas <menesis@delfi.lt>
6908 * camel-filter-driver.c: marked missing report status' for translation.
6910 2001-04-02 Jeffrey Stedfast <fejj@ximian.com>
6912 * camel-pgp-context.c (camel_pgp_sign): mutex lock & unlock the
6914 (camel_pgp_clearsign): Same.
6915 (camel_pgp_verify): Same.
6916 (camel_pgp_encrypt): Same.
6917 (camel_pgp_decrypt): And finally here...
6919 * camel-pgp-context.h: Update the function prototypes to match
6920 those found in camel-pgp-context.c.
6922 * camel-pgp-context.c: Updated.
6924 * camel-pgp-mime.c (camel_pgp_mime_part_sign): Implemented.
6925 (camel_pgp_mime_part_verify): Implemented.
6926 (camel_pgp_mime_part_encrypt): Implemented.
6927 (camel_pgp_mime_part_decrypt): Implemented.
6929 2001-04-01 Jeffrey Stedfast <fejj@ximian.com>
6931 * camel-sasl-login.[c,h]: New files to handle the LOGIN SASL
6934 * camel-sasl-plain.c: Removed the definition of
6935 camel_sasl_login_authtype.
6937 * camel-sasl.c (camel_sasl_new): Oops. I thought LOGIN was an
6938 alias to PLAIN. I was wrong. These two SASL objects have to be
6941 * providers/smtp/camel-smtp-transport.c (smtp_auth): Updated to
6942 check for and use authmech->quick_login when available.
6944 2001-04-01 Jeffrey Stedfast <fejj@ximian.com>
6946 * providers/pop3/camel-pop3-provider.c: Updated the authtypes here
6949 * camel-sasl-plain.c:
6950 * camel-sasl-anonymous.c:
6951 * camel-sasl-digest-md5.c:
6952 * camel-sasl-cram-md5.c:
6953 * camel-sasl-kerberos4.c: Updated the authtype values.
6955 * camel-service.h: Added another field to CamelServiceAuthType
6956 that specifies whether or not the mechanism supports "quick auth"
6957 which means that the client can send the initial challenge in the
6960 * camel-sasl.c (camel_sasl_new): Add support for LOGIN.
6961 (camel_sasl_authtype_list): Here too.
6962 (camel_sasl_authtype): And finally here.
6964 * camel-sasl-plain.c: Define camel_sasl_login_authtype.
6966 * providers/smtp/camel-smtp-transport.c (smtp_auth): Only unref
6967 the SASL object if it exists.
6969 2001-03-30 Dan Winship <danw@ximian.com>
6971 * providers/pop3/camel-pop3-store.c (connect_to_server,
6972 query_auth_types, pop3_connect): Move things around here to make
6973 this all work right again (so you don't get prompted for a
6974 password when checking the supported authtypes.)
6976 2001-03-30 Jon Trowbridge <trow@ximian.com>
6978 * camel-mime-message.c (camel_mime_message_set_source): Shrould
6979 our source URL before putting it into X-Evolution-Source.
6981 2001-03-29 Jeffrey Stedfast <fejj@ximian.com>
6983 * providers/imap/camel-imap-store.c (get_folder_info): Don't
6984 blindly append "/INBOX", construct a CamelURL and set the path
6986 (parse_list_response_as_folder_info): Don't blindly append
6987 "/<foldername>", construct a CamelURL and set the path that way
6989 (get_folders_offline): And again here.
6991 2001-03-30 Not Zed <NotZed@Ximian.com>
6993 * camel-service.c (camel_get_host_byname): Dont overwrite an
6994 exception if we got one already. Added camel_operation status to
6995 it, and comment out some debug.
6997 2001-03-29 Not Zed <NotZed@Ximian.com>
6999 * providers/smtp/camel-smtp-transport.c (smtp_connect): Free host
7000 name info when done ... blah blah.
7002 * camel-sasl-kerberos4.c (krb4_challenge): Free host name info
7003 after we're done with it.
7005 * camel-sasl-digest-md5.c (digest_md5_challenge): Free host name
7006 info after we're done with it.
7008 * camel-remote-store.c (remote_connect): Free the host name info
7009 from get_host after we're finished with it.
7011 * camel-service.c (camel_get_host_byname): New function to
7012 lookup a name, and still be cancellable.
7013 (camel_free_host): And a function to free the structure
7015 (camel_service_gethost): Call get_host_byname for this.
7017 2001-03-29 Jon Trowbridge <trow@ximian.com>
7019 * camel-filter-driver.c (camel_filter_driver_filter_message): Save
7020 the source URL using camel_mime_message_set_source.
7022 * camel-mime-message.c (camel_mime_message_set_source): Renamed
7023 camel_mime_message_set_identity to this. Sets the X-Evolution-Source
7025 (camel_mime_message_get_source): Returns the X-Evolution-Source
7028 2001-03-29 Kjartan Maraas <kmaraas@gnome.org>
7030 * broken-date-parser.c: #include <stdio.h>, <stdlib.h> and <string.h>
7031 * broken-date-parser.h: Remove all includes but <glib.h>
7032 * camel-address.h: Added #include <glib.h>
7033 * camel-data-wrapper.c: Move system includes to the top.
7034 * camel-data-wrapper.h: #include <glib.h>
7035 * camel-exception.c: #ifdef HAVE_CONFIG_H
7036 * camel-exception.h: Remove #include <glib.h>
7037 * camel-filter-driver.c: #ifdef HAVE_CONFIG_H and move system
7038 headers to top. Mark strings in camel_exception_set*() for i18n.
7039 * camel-filter-driver.h: #include <glib.h>
7040 * camel-filter-search.c: #ifdef HAVE_CONFIG_H
7041 * camel-folder-search.c: #include <config.h>
7042 * camel-folder-search.h: Header shuffling
7043 * camel-folder-summary.h: Same here
7044 * camel-folder-thread.c: #ifdef HAVE_CONFIG_H
7045 * camel-folder.c: Here too.
7046 * camel-folder.h: #include <glib.h>
7047 * camel-internet-address.c: Move system headers up
7048 * camel-lock.c: #ifdef HAVE_CONFIG_H
7049 * camel-medium.c: Same here
7050 * camel-mime-filter-bestenc.c: Move system headers up
7051 * camel-mime-filter-from.c: Same here
7052 * camel-mime-filter-linewrap.c: And here
7053 * camel-mime-filter.c: #include <string.h> to fix warnings from new gcc
7054 * camel-mime-filter.h: System headers moved up
7055 * camel-mime-message.c: Here too. #ifdef HAVE_CONFIG_H added
7056 * camel-mime-part-utils.c: #ifdef HAVE_CONFIG_H added
7057 * camel-mime-part.c: Here too, and shuffle headers
7058 * camel-mime-utils.c: #ifdef HAVE_CONFIG_H. Remove const from two
7059 variables to remove warning.
7060 * camel-mime-utils.h: Shuffle headers
7061 * camel-movemail.c: #ifdef HAVE_CONFIG_H. Mark string in camel_exception_set
7062 * camel-multipart.c: #ifdef HAVE_CONFIG_H. Added includes to remove
7063 warnings from new gcc
7064 * camel-object.c: #ifdef HAVE_CONFIG_H
7065 * camel-object.h: Shuffle headers
7066 * camel-operation.c: #ifdef HAVE_CONFIG_H
7067 * camel-provider.c: #ifdef HAVE_CONFIG_H. Shuffle headers. Mark a string
7068 * camel-remote-store.c: #ifdef HAVE_CONFIG_H
7069 * camel-sasl-anonymous.c: #ifdef HAVE_CONFIG_H. #include <string.h>
7070 * camel-sasl-cram-md5.c: #ifdef HAVE_CONFIG_H. #include <string.h> and
7071 <stdio.h> to remove warnings.
7072 * camel-sasl-digest-md5.c: #ifdef HAVE_CONFIG_H. shuffle headers
7073 * camel-sasl-digest-md5.h: Shuffle headers.
7074 * camel-sasl-kerberos4.c: #ifdef HAVE_CONFIG_H. Shuffle headers.
7075 * camel-sasl-kerberos4.h: Shuffle headers.
7076 * camel-sasl-plain.c: #ifdef HAVE_CONFIG_H. Shuffle
7077 * camel-sasl.c: #ifdef HAVE_CONFIG_H. #include <string.h>
7078 * camel-search-private.c: #include <config.h>
7079 * camel-seekable-stream.c: #ifdef HAVE_CONFIG_H
7080 * camel-seekable-stream.h: Shuffle
7081 * camel-seekable-substream.c: #ifdef HAVE_CONFIG_H
7082 * camel-service.c: Same
7083 * camel-service.h: Shuffle
7084 * camel-session.c: #ifdef HAVE_CONFIG_H
7085 * camel-store.c: Same
7086 * camel-stream-buffer.c: Here too
7087 * camel-stream-buffer.h: Shuffle
7088 * camel-stream-filter.c: #include <string.h>
7089 * camel-stream-fs.c: #ifdef HAVE_CONFIG_H
7090 * camel-stream-fs.h: Shuffle headers
7091 * camel-stream-mem.c: Same as above
7092 * camel-stream-mem.h: Here too
7093 * camel-stream-null.c: #ifdef HAVE_CONFIG_H
7094 * camel-stream.c: Here too
7095 * camel-stream.h: Shuffle
7096 * camel-tcp-stream-openssl.c: #ifdef HAVE_CONFIG_H
7097 * camel-tcp-stream-raw.c: Same here. and move local includes down
7098 * camel-tcp-stream-ssl.c: Same as above
7099 * camel-tcp-stream.c: #ifdef HAVE_CONFIG_H
7100 * camel-tcp-stream.h: move local include down
7101 * camel-transport.c: #ifdef HAVE_CONFIG_H
7102 * camel-transport.h: #include <glib.h>
7103 * camel-uid-cache.c: #ifdef HAVE_CONFIG_H. Shuffle headers
7104 * camel-uid-cache.h: Shuffle
7105 * camel-url.c: #ifdef HAVE_CONFIG_H
7106 * camel-vee-folder.c: #ifdef HAVE_CONFIG_H. Shuffle headers
7107 * camel-vee-folder.h: #include <glib.h>
7108 * camel-vee-store.h: Same here
7109 * camel.c: #ifdef HAVE_CONFIG_H
7110 * gstring-util.c: Here too
7111 * hash-table-utils.c: Remove #include <glib.h>
7112 * hash-table-utils.h: #include it here instead.
7113 * string-utils.c: #ifdef HAVE_CONFIG_H
7114 * providers/cache/camel-cache-map.c: #ifdef HAVE_CONFIG_H, shuffle
7115 headers and mark strings in camel_exception_set*()
7116 * providers/cache/camel-cache-provider.c: #ifdef HAVE_CONFIG_H
7117 * providers/cache/camel-cache-store.c: Same here, and mark a string.
7118 * providers/imap/camel-imap-command.c: #ifdef HAVE_CONFIG_H
7119 * providers/imap/camel-imap-command.h: Shuffle header
7120 * providers/imap/camel-imap-folder.c: #ifdef HAVE_CONFIG_H
7121 * providers/imap/camel-imap-message-cache.c: #ifdef HAVE_CONFIG_H
7122 * providers/imap/camel-imap-provider.c: #ifdef HAVE_CONFIG_H and
7124 * providers/imap/camel-imap-search.c: #ifdef HAVE_CONFIG_H
7125 * providers/imap/camel-imap-store.c: #ifdef HAVE_CONFIG_H and mark
7127 * providers/imap/camel-imap-summary.c: Shuffle headers
7128 * providers/imap/camel-imap-wrapper.c: #ifdef HAVE_CONFIG_H. Shuffle
7129 * providers/local/camel-local-folder.c: #ifdef HAVE_CONFIG_H
7130 * providers/local/camel-local-provider.c: #ifdef HAVE_CONFIG_H
7131 * providers/local/camel-local-store.c: Same here
7132 * providers/local/camel-local-summary.c: Here too, shuffle, mark a string
7133 * providers/local/camel-maildir-folder.c: #ifdef HAVE_CONFIG_H
7134 * providers/local/camel-maildir-store.c: Same
7135 * providers/local/camel-maildir-summary.c: Here too
7136 * providers/local/camel-mbox-summary.c: And here
7137 * providers/local/camel-mbox-store.c: And here
7138 * providers/local/camel-mbox-summary.c: #include <config.h>
7139 * providers/local/camel-mh-folder.c: #ifdef HAVE_CONFIG_H
7140 * providers/local/camel-mh-store.c: same
7141 * providers/local/camel-mh-summary.c: #ifdef HAVE_CONFIG_H, shuffle headers
7142 and mark a string for translation.
7143 * providers/nntp/camel-nntp-auth.c: #include <config.h>
7144 * providers/nntp/camel-nntp-store.c: Remove superfluous arg to
7145 CAMEL_SERVICE_CLASS to make it compile
7146 * providers/pop3/camel-pop3-provider.c: #ifdef HAVE_CONFIG_H
7147 * providers/pop3/camel-pop3-store.c: Same here
7148 * providers/sendmail/camel-sendmail-provider.c: Here too
7149 * providers/sendmail/camel-sendmail-transport.c: Here too
7150 * providers/smtp/camel-smtp-provider.c: Same
7151 * providers/smtp/camel-smtp-transport.c: #ifdef HAVE_CONFIG_H, mark
7152 strings for translations.
7154 2001-03-29 Dan Winship <danw@ximian.com>
7156 * camel-url.c (camel_url_to_string): change "gboolean show_passwd"
7159 * tests/misc/url.c (main): Update calls to camel_url_to_string
7161 * providers/imap/camel-imap-store.c (construct): Call
7162 camel_url_to_string with flags to hide password, authtype, and
7163 params to create the base_url.
7164 (etc): Update for the fact that the base_url no longer has the "/"
7167 * camel-service.c (construct): Update calls to camel_url_to_string
7168 (pass CAMEL_URL_HIDE_PASSWORD)
7170 2001-04-03 Jeffrey Stedfast <fejj@ximian.com>
7172 * camel-mime-utils.c (header_decode_text): Ignore whitespace
7173 between encoded words (there were a few cases where it didn't
7175 (header_encode_string): Preserve whitespace between words that are
7176 to be encoded by encoding them too.
7177 (header_encode_phrase): Same here but with phrases.
7179 2001-04-04 Kjartan Maraas <kmaraas@gnome.org>
7181 * camel-filter-driver.c: Added #include <config.h>. Marked
7182 a bunch of strings for translation.
7183 * camel-folder-search.c: Added #include <config.h>.
7184 * camel-folder-summary.c: Same here.
7185 * camel-movemail.c: Marked strings for translation.
7186 * camel-provider.c: Same here.
7187 * camel-search-private.c: #include <config.h>
7188 * camel-vee-folder.c: Mark string for translation.
7189 * providers/local/camel-mbox-summary.c: #include <config.h>
7191 2001-04-03 Dan Winship <danw@ximian.com>
7193 * providers/imap/camel-imap-folder.c (imap_sync): If we don't
7194 change any flags or expunge, send a NOOP to give the server a
7195 chance to send EXISTS, etc, messages.
7196 (imap_get_message): If the server_level < IMAP4rev1, always fetch
7197 messages all-at-once, since they don't support the [#.MIME]
7200 2001-04-01 Jeffrey Stedfast <fejj@ximian.com>
7202 * providers/imap/camel-imap-store.c (get_folder_info): Don't
7203 blindly append "/INBOX", construct a CamelURL and set the path
7205 (parse_list_response_as_folder_info): Don't blindly append
7206 "/<foldername>", construct a CamelURL and set the path that way
7208 (get_folders_offline): And again here.
7210 2001-03-31 Not Zed <NotZed@Ximian.com>
7212 * camel-operation.c (struct _status_stack): change stamp to
7213 unsigned to avoid overflow.
7214 (camel_operation_end):
7215 (camel_operation_progress_count):
7216 (camel_operation_progress): Double the delay before transient
7217 events start showing their own progress.
7219 2001-03-30 Not Zed <NotZed@Ximian.com>
7221 * providers/pop3/camel-pop3-folder.c (pop3_get_message): Change
7222 the pop download into a transient event.
7224 * camel-operation.c (stamp): Get a timestamp that changes 4x a
7225 second (or rather, arbitrarily more often than 1/second).
7226 (camel_operation_progress): Use stamp() for time updates.
7227 (camel_operation_progress_count): "
7228 (camel_operation_start): Store the status as a struct status_stack
7230 (camel_operation_start_transient): New function to start a
7231 transient event, which is only reported if it runs for too
7232 long/and is reset afterwards.
7233 (camel_operation_progress):
7234 (camel_operation_progress_count): Fix for status_stack changes,
7235 and account for transient updates.
7237 * camel-filter-driver.c (camel_filter_driver_filter_folder): When
7238 we remove things (set deleted), always set seen too, to mirror
7239 interface behaviour when you delete.
7240 (camel_filter_driver_filter_message): And same here too.
7242 2001-03-30 Dan Winship <danw@ximian.com>
7244 * providers/pop3/camel-pop3-store.c (connect_to_server,
7245 query_auth_types, pop3_connect): Move things around here to make
7246 this all work right again (so you don't get prompted for a
7247 password when checking the supported authtypes.)
7249 2001-03-29 Dan Winship <danw@ximian.com>
7251 * camel-url.c (camel_url_to_string): change "gboolean show_passwd"
7254 * tests/misc/url.c (main): Update calls to camel_url_to_string
7256 * providers/imap/camel-imap-store.c (construct): Call
7257 camel_url_to_string with flags to hide password, authtype, and
7258 params to create the base_url.
7259 (etc): Update for the fact that the base_url no longer has the "/"
7262 * camel-service.c (construct): Update calls to camel_url_to_string
7263 (pass CAMEL_URL_HIDE_PASSWORD)
7265 2001-03-28 Jeffrey Stedfast <fejj@ximian.com>
7267 * camel-pgp-context.[c,h]: New class for PGP encrypting,
7268 decrypting, signing and verifying. Next I'll be moving the
7269 contents of mail/mail-crypto into Camel. These files will
7270 basically replace mail/openpgp-utils.[c,h].
7272 2001-03-29 Not Zed <NotZed@Ximian.com>
7274 * camel-folder-search.c (search_body_contains): Optimise the match
7275 "" case, just match everything in the folder (if we have it).
7277 * camel-vtrash-folder.c (vtrash_move_messages_to): Access the
7278 folder directly from the message info.
7279 (vtrash_move_messages_to): I think we also need to call the real
7280 move_messages_to, and not try and bypass the lock, since we dont
7281 have the lock for that folder.
7283 * camel-vee-folder.h: Move CamelVeeMessageInfo to public, so
7284 subclasses can get to it.
7286 * camel-vee-folder.c (camel_vee_folder_add_folder): Dont let you
7287 add a vfolder to itself.
7289 (vee_folder_remove_folder):
7290 (vee_folder_build_folder): Copy changes before triggering changed
7291 events, so we can do them outside of locks.
7292 (camel_vee_folder_get_message_folder): Removed function.
7293 (camel_vee_folder_hash_folder): Made public (renamed from
7294 hash_folder), simply for subclasses (probably not needed).
7295 (vee_expunge): Oops, call the class sync, not superclass sync.
7296 (vee_sync): Remove some accidental debug.
7298 2001-03-27 Jeffrey Stedfast <fejj@ximian.com>
7300 * camel-service.c (get_path): Add the port (if user defined) to
7301 the path to fix bug #1996.
7303 Danw: I'm iffy on the "fix" so I'd like you to comment.
7305 2001-03-27 Jeffrey Stedfast <fejj@ximian.com>
7307 * providers/pop3/camel-pop3-folder.c (pop3_sync): If we aren't
7308 going to even check the resp/free buffer that gets returned from
7309 camel_pop3_command, don't even bother using it. Send in NULL
7311 (pop3_get_message): Check to make sure that the `result' string is
7312 non-NULL. It's possible that some POP servers may return with
7313 "+OK\r\n<message>..." rather than the expected
7314 "+OK ### octets\r\n<message>..."
7316 2001-03-27 Not Zed <NotZed@Ximian.com>
7318 * camel-folder-summary.c (camel_folder_summary_finalize): Unref
7319 the html filter when done.
7320 (summary_build_content_info): Disable using the html parser to
7321 help index html mails until it gets sorted out.
7323 * camel-vee-folder.c (folder_changed): Fix a cut n paste bug, we
7324 want uid_removed not uid_changed deref, fixes bug #1999.
7326 2001-03-27 Dan Winship <danw@ximian.com>
7328 * camel-sasl.c (camel_sasl_authtype_list): add an argument to say
7329 whether or not you want "PLAIN" in the list (so you don't end up
7330 with "Password" twice in the config dialog).
7332 * providers/imap/camel-imap-provider.c (camel_provider_module_init):
7333 * providers/imap/camel-imap-store.c (query_auth_types): We don't
7336 * providers/smtp/camel-smtp-provider.c (camel_provider_module_init):
7337 * providers/smtp/camel-smtp-transport.c (query_auth_types): But we
7340 2001-03-27 Dan Winship <danw@ximian.com>
7342 * camel-provider.h: Add an "extra_conf" field to CamelProvider
7343 with structures and defines and stuff, for providers to specify
7344 additional configuration options that they want. Also add a
7345 "supports ssl" flag to the provider flags.
7347 * camel-url.c (camel_url_new_with_base): Fix parsing of params.
7348 (output_param): And unparsing...
7350 * camel-remote-store.c: add a "default_ssl_port" field.
7351 (remote_construct): If the URL has the "use_ssl" parameter, set
7352 the store's use_ssl flag.
7353 (remote_connect): If using SSL and no port specified, use the
7354 default_ssl_port rather than the default_port.
7356 * providers/smtp/camel-smtp-provider.c (smtp_provider): add
7357 CAMEL_PROVIDER_SUPPORTS_SSL and CAMEL_URL_ALLOW_USER. (The config
7358 gui code knows that the ALLOW_USER and ALLOW_AUTH go together.)
7359 (ssmtp_provider): gone
7361 * providers/smtp/camel-smtp-transport.c (smtp_construct): Set a
7362 flag if "use_ssl" param is set.
7363 (smtp_connect): Check the CamelSmtpTransport use_ssl flag rather
7364 than checking if this is smtp or ssmtp.
7366 * providers/imap/camel-imap-provider.c (imap_conf_entries): Add a
7367 bunch of IMAP-specific configuration options, like "check for new
7368 mail in all folders" (default TRUE), "show only subscribed
7369 folders" (default TRUE), "ignore server-supplied namespace", and
7370 "apply filters to INBOX" (not yet implemented).
7371 (imap_provider): We support SSL and we no longer allow a path in
7372 the URL. (namespace is handled via extra_conf)
7373 (simap_provider): Gone
7375 * providers/imap/camel-imap-store.c (camel_imap_store_init): Set
7376 default_ssl_port, don't set CAMEL_STORE_SUBSCRIPTIONS here
7377 (construct): remove simap stuff, deal with "use_lsub",
7378 "namespace", "check_all", and "filter" parameters. Set base_url
7379 to not include params.
7380 (imap_store_setup_online): Don't ask for the namespace if it was
7381 set explicitly. Don't get subscribed folders if !use_lsub.
7382 (imap_concat): Fix a bug.
7383 (get_folder_info): Support for not checking all folders.
7385 * providers/imap/camel-imap-folder.c (imap_get_full_name): Rewrite
7386 to use imap_store->namespace, not service->url->path
7388 * providers/pop3/camel-pop3-provider.c (pop3_conf_entries): "keep
7389 on server" (currently still implemented by the mailer code, not
7390 here), "delete after N days" (not yet implemented).
7391 (pop3_provider): we support SSL
7392 (spop_provider): gone
7394 * providers/pop3/camel-pop3-store.c (camel_pop3_store_init): Set
7396 (pop3_connect): Remove spop code
7398 2001-03-26 Jeffrey Stedfast <fejj@ximian.com>
7400 * camel-vee-folder.c (vee_folder_construct): Move all of the
7401 camel_vee_folder_construct() internals here.
7402 (camel_vee_folder_construct): This function basically becomes a
7403 wrapper for vee_folder_construct and also checks to make sure that
7404 the UNMATCHED vfodler is constructed otherwise constructs it.
7405 (camel_vee_folder_new): Call vee_folder_construct() instead so
7406 that we don't get into a dead-lock.
7408 2001-03-26 Jeffrey Stedfast <fejj@ximian.com>
7410 * camel-store.c (init_trash): Use camel_vtrash_folder_new() to
7411 create the vtrash folder now.
7413 * camel-vtrash-folder.[c,h]: New subclass of CamelVeeFolder for
7416 * camel-folder.c (camel_folder_copy_messages_to): Don't watch for
7417 vtrash folders anymore.
7418 (camel_folder_move_messages_to): Same.
7420 * camel-vee-folder.c (camel_vee_folder_class_init): Update.
7421 (vee_move_messages_to): Rewrite to use the new move API.
7423 * camel-filter-driver.c (do_copy): Updated to reflect
7424 copy_message_to changes. Create a temporary uid array and use
7427 (camel_filter_driver_filter_message): And again, here...
7429 * providers/imap/camel-imap-folder.c (imap_copy_messages_to):
7430 Update to the new API.
7431 (imap_move_messages_to): Same.
7432 (get_uid_set): New function to create a `set' string based on an
7433 array of UIDs for use with imap_copy_messages_to.
7435 * camel-folder.c (camel_folder_copy_messages_to): Replaces
7436 camel_folder_copy_message_to
7437 (camel_folder_move_message_to): Replaces
7438 camel_folder_move_message_to.
7440 2001-03-27 Not Zed <NotZed@Ximian.com>
7442 * camel-vee-store.c (vee_get_folder): Added folder_created event
7445 * camel-vee-folder.c (unmatched_finalise): Removed, moved into
7447 (message_changed): Just create a new change entry and promote it
7448 to a folder_changed thing.
7449 (vee_sync): Always rebuild folder on sync, even when not expunge.
7450 (folder_changed): If not autoupdating, make sure we remove any
7452 (vee_folder_build_folder):
7453 (vee_folder_remove_folder): NOP if we're called on
7455 (vee_search_by_expression): Only search each folder once. Should
7456 we also order the result in summary order?
7458 2001-03-20 Not Zed <NotZed@Ximian.com>
7460 * camel-store.c (init_trash): Fix calling for vee_folder_new().
7462 * camel-folder-summary.c (camel_folder_summary_remove_index):
7463 Optimise slightly, use ptr_array_remove_index rather than have to
7464 search for the index by using summary_remove.
7466 * camel-vee-folder.h: Removed local member from VeeFolder, since
7469 * camel-vee-store.c (camel_vee_store_finalise): Setup finalise
7472 * camel-vee-folder.c (camel_vee_folder_set_expression): New
7473 function to set the query of an existing vfolder.
7474 (camel_vee_folder_construct): New function for
7475 convenience/subclasses.
7476 (camel_vee_folder_new): Removed exception parameter, no longer
7477 needed (since we dont search yet).
7478 (camel_vee_folder_new): Changed to use folder_construct, and no
7479 longer raise the folder created signal.
7480 (vee_folder_build_folder): Make it return error on exception, so
7481 we can work without exceptions.
7482 (vee_folder_remove_folder): Use remove index rather than
7483 remove_uid, this is ok since we have the summary locked for our
7485 (camel_vee_folder_add_folder): Only add the folder to the
7486 unmatched private if it is not a private folder.
7487 (camel_vee_folder_remove_folder): Only remove the folder from
7488 unmatched if it is not private.
7489 (vee_expunge): Just call sync with expunge set.
7490 (vee_sync): If expunging, also refresh the search.
7491 (vee_folder_build_folder): We do our own locking now, removed from
7492 callers, also trigger changed events here too (within locks),
7493 fixed callers appropriately.
7494 (vee_folder_remove_folder): Do our own locking, and trigger
7496 (vee_folder_add_info): Renamed of vee_folder_add, we now take a
7497 hash of the folder name, rather than use the folders address.
7498 (hash_folder): Convert a folder name into an 8 character hash.
7499 (vee_get_message, vee_search_by_expression, vee_set_message_flags,
7500 vee_set_message_user_flag, vee_move_message_to): Changed the uid
7501 to be an 8 byte hash + original uid, with no ':' anymore.
7503 2001-03-26 Jeffrey Stedfast <fejj@ximian.com>
7505 * camel-mime-utils.c (header_decode_text): When writing the last
7506 token (if not rfc2047 encoded), don't use g_string_append_len, use
7509 * camel-mime-message.c (write_to_stream): Don't spew a warning if
7510 the message-id wasn't set by the application, not a big deal since
7511 we create one right here.
7513 2001-03-26 Dan Winship <danw@ximian.com>
7515 * providers/imap/camel-imap-command.c (camel_imap_command): keep a
7516 reference on the store's current_folder.
7518 * providers/imap/camel-imap-store.c (camel_imap_store_finalize):
7519 (imap_disconnect): unref the current_folder before clearing it.
7521 * camel-url.c (camel_url_get_param): Add missing accessor.
7523 * camel-session.c (camel_session_get_provider): New. Return
7524 the provider for a URL.
7526 2001-03-25 Dan Winship <danw@ximian.com>
7528 * camel-url.c (camel_url_new_with_base): New URL parser with full
7529 RFC1808 relative URL support. Yum.
7530 (camel_url_new): Wrapper around camel_url_new_with_base now.
7532 * tests/Makefile.am: add misc subdir
7534 * tests/misc/url.c: relative URL test cases from RFC 1808
7536 2001-03-25 Jeffrey Stedfast <fejj@ximian.com>
7538 * camel-filter-driver.c (do_copy): Don't use copy_to if the source
7539 folder doesn't support summary info's.
7541 (camel_filter_driver_filter_message): And again here. I think
7542 this will fix the problem of "colour" tags not staying with the
7543 message when it's copied to a folder during the filter process.
7545 2001-03-24 Jeffrey Stedfast <fejj@ximian.com>
7547 * camel-sasl-digest-md5.c (digest_response): Do charset conversion
7548 on the username param here if needed.
7549 (parse_server_challenge): Protect against possibly empty-string
7552 2001-03-23 Jon Trowbridge <trow@ximian.com>
7554 * camel-filter-driver.c (camel_filter_driver_filter_message):
7555 Don't call camel_mime_message_set_identity. (The call is
7556 commented out, left over from some earlier experimentation that I
7557 want to be able to remember later...)
7559 * camel-mime-message.c (camel_mime_message_set_identity): Added.
7560 A function to set the X-Evolution-Identity header.
7562 2001-03-22 Dan Winship <danw@ximian.com>
7564 * providers/imap/camel-imap-command.c (imap_read_response): Don't
7565 look at untagged responses other than "* BYE"...
7566 (camel_imap_response_free): ...do it here instead...
7567 (camel_imap_response_free_without_processing): ...but not here.
7569 * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
7570 Remove the "EXISTS" line from the response so
7571 camel_imap_response_free won't try to process it.
7572 (camel_imap_folder_selected): If we get an EXISTS response mixed
7573 in with the FETCH responses, record the new EXISTS value.
7574 Use camel_imap_response_free_without_processing so that an EXISTS
7575 response won't cause a loop.
7576 (imap_rescan): Use camel_imap_response_free_without_processing.
7577 (imap_update_summary): Use
7578 camel_imap_response_free_without_processing. If an EXISTS response
7579 shows up, call imap_update_summary again to get the new messages.
7580 (imap_protocol_get_summary_specifier): Use BODY.PEEK[0], not
7581 RFC822.HEADER for prev IMAP4rev1, since the FETCH parser won't
7582 deal with RFC822.HEADER responses.
7584 * providers/imap/camel-imap-store.c (get_folder_info): Fix an
7585 uninitialized variable
7587 2001-03-21 Dan Winship <danw@ximian.com>
7589 * camel-provider.h: (CamelProvider) add a "GList *authtypes", so
7590 you can get the list of authtypes used by a provider without
7591 needing to have an actual CamelService object handy. (Will be
7592 needed by the new config druid.)
7593 (CAMEL_PROVIDER_ALLOWS, CAMEL_PROVIDER_NEEDS): New macros to test
7594 the URL part stuff, since the way it works is too complicated and
7595 everyone always does it wrong.
7597 * camel-service.c (camel_service_query_auth_types): Remove the
7598 @connected arg again: if you don't want to connect, you can just
7599 get the list of authtypes off the provider.
7600 (camel_service_free_auth_types): Remove this. All existing
7601 implementations do authtypes the same way, so just say the caller
7602 should "g_list_free" the list. (Oh, look, removing this function
7603 doesn't actually cause the mailer to not build. How 'bout that.)
7604 (construct, get_path): Use the new URL part macros.
7606 * camel-remote-store.c (remote_query_auth_types): Update
7607 (remote_free_auth_types): Nuke
7608 (camel_remote_store_authtype_list): New function for use by
7611 * providers/imap/camel-imap-provider.c:
7612 * providers/pop3/camel-pop3-provider.c:
7613 * providers/smtp/camel-smtp-provider.c: Update CamelProvider
7615 (camel_provider_module_init): Put all the SSL parts together so
7616 there's only 1 #ifdef. Set up the provider authtypes field using
7617 the SASL, CamelRemoteStore, and standard authtypes, as
7618 appropriate. Copy that from the normal provider to the SSL
7621 * providers/local/camel-local-provider.c:
7622 * providers/sendmail/camel-sendmail-provider.c:
7623 * camel-session.c: Update CamelProvider structures.
7625 * providers/imap/camel-imap-store.c (query_auth_types):
7626 * providers/pop3/camel-pop3-store.c (query_auth_types): Update
7628 * providers/smtp/camel-smtp-store.c (query_auth_types): Update.
7629 Remove the no_authtype, because that's what "ALLOW_AUTH" rather
7630 than "NEED_AUTH" means.
7631 (free_auth_types): Nuke.
7633 2001-03-21 Jeffrey Stedfast <fejj@ximian.com>
7635 * camel-filter-driver.c (camel_filter_driver_filter_message):
7637 (camel_filter_driver_filter_folder): Same.
7638 (camel_filter_driver_filter_mbox): Same.
7639 (camel_filter_driver_filter_folder): Return -1 if an exception was
7642 2001-03-19 Jeffrey Stedfast <fejj@ximian.com>
7644 * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_finalize):
7645 Free the expected host.
7646 (camel_tcp_stream_openssl_new): Now takes a Service and an
7647 expected_host. Set them.
7649 2001-03-20 Dan Winship <danw@ximian.com>
7651 * providers/imap/camel-imap-store.c
7652 (camel_imap_store_check_online): Function to check if the store is
7653 online and set an exception if not. Currently controlled by an
7654 environment variable, but eventually there will be both a global
7655 (session-level) setting and a per-store setting.
7656 (construct): Set up storage_path and base_url here rather than at
7658 (imap_auth_loop): Split out from imap_connect.
7659 (imap_setup_online): Split out from imap_connect. Do the
7660 post-authentication connection setup, and cache the results to
7662 (imap_setup_offline): Set up a CamelImapStore with information
7663 saved from a previous imap_setup_online.
7664 (imap_connect): If online, do connect_to_server(),
7665 imap_auth_loop(), and imap_setup_online(). Otherwise, do
7666 imap_setup_offline().
7667 (get_folder, get_folder_info): Add offline support.
7668 (create_folder, subscribe_folder, unsubscribe_folder): Disable
7669 these when offline (for now).
7671 * providers/imap/camel-imap-folder.c (camel_imap_folder_new):
7672 Remove the sync'ing-with-server stuff... it's done by
7673 camel_imap_folder_selected now, which only gets called if the
7675 (camel_imap_folder_selected): add the code removed from
7676 camel_imap_folder_new. Besides simplifying the folder_new and
7677 summary_new code, this also means now that we'll DTRT if a
7678 folder's UIDVALIDITY changes while we're connected. Also, when
7679 that happens, clear the message cache explicitly.
7680 (imap_refresh_info, imap_sync): These are no-ops when offline.
7681 (imap_expunge, imap_append_message, imap_copy_message_to,
7682 imap_search_by_expression): These don't yet work offline.
7683 (imap_get_message, camel_imap_folder_fetch_data): Return an error
7684 when trying to fetch a non-cached body part when we're offline.
7686 * providers/imap/camel-imap-summary.c (camel_imap_summary_new):
7687 Rewrite to not check the validity here. (We'll do it from
7688 camel_imap_folder_selected instead.)
7690 * providers/imap/camel-imap-command.c (camel_imap_command): Call
7691 camel_imap_folder_selected even when the selection is all we're
7692 doing, to match the changes in camel-imap-folder.c.
7694 * providers/imap/camel-imap-message-cache.c
7695 (camel_imap_message_cache_clear): New function to clear out a
7698 2001-03-19 Christopher James Lahey <clahey@ximian.com>
7700 * Makefile.am (INCLUDES): Added $(EXTRA_GNOME_CFLAGS)
7702 2001-03-19 Jeffrey Stedfast <fejj@ximian.com>
7704 * providers/pop3/camel-pop3-store.c (pop3_connect): Set the errbuf
7705 to NULL after freeing it? I don't think this should fix bug #1801
7706 but I guess it can't hurt.
7708 2001-03-18 Jeffrey Stedfast <fejj@ximian.com>
7710 * camel-remote-store.c (remote_recv_line): Protect against a
7711 possibly NULL exception.
7713 * camel-filter-driver.c (camel_filter_driver_filter_message):
7714 Document and modify to return a boolean value denoting whether or
7715 not errors occured during processing.
7716 (camel_filter_driver_filter_mbox): Same as above and also modified
7717 to check return codes of filter_message rather than relying only
7718 on whether or not the exception was set (as it's possible to pass
7719 in NULL for the exception).
7720 (camel_filter_driver_filter_folder): Same as above.
7722 * camel-mime-utils.c (header_param_list_format_append): Quote the
7723 param value if it contains whitespace as well.
7725 2001-03-17 Jeffrey Stedfast <fejj@ximian.com>
7727 * Makefile.am: Don't include system include dir.
7729 * camel.c: Use quotes around the nss.h include so it doesn't try
7730 to use the systen nss.h file.
7732 * camel-tcp-stream-ssl.c: Same here.
7734 2001-03-17 Not Zed <NotZed@Ximian.com>
7736 * providers/local/camel-maildir-summary.c (maildir_summary_sync):
7737 Modified patch from Dan Berger <dberger@ix.netcom.com> to re-check
7738 the maildir directory for new/updated messages at sync time.
7740 * camel-folder.c (camel_folder_ref_message_info): Implemented.
7741 (ref_message_info): And default implementation.
7743 * camel-folder.h: Added ref_message_info virtual method.
7745 2001-03-16 Not Zed <NotZed@Ximian.com>
7747 * camel-folder-thread.c
7748 (camel_folder_thread_messages_new_summary): New function to create
7749 a thread tree from a supplied summary array.
7750 (camel_folder_thread_messages_destroy): Handle thread trees
7751 generated by the above function properly.
7753 2001-03-16 Jeffrey Stedfast <fejj@ximian.com>
7755 * camel-private.h: Same.
7757 * camel-remote-store.h: Fixed #include to use <>'s instead of ""'s
7759 2001-03-16 Jeffrey Stedfast <fejj@ximian.com>
7761 * camel-tcp-stream-ssl.c (ssl_bad_cert): Print info about the
7762 issuer of the certificate.
7764 * providers/smtp/camel-smtp-transport.c (smtp_connect): Use
7765 camel_tcp_stream_get_socket().
7767 * camel-tcp-stream-openssl.c (stream_get_socket): Implemented.
7769 * camel-tcp-stream-ssl.c (stream_get_socket): Implemented.
7771 * camel-tcp-stream-raw.c (stream_get_socket): Implemented.
7773 * camel-tcp-stream.c (camel_tcp_stream_get_socket): New function.
7775 2001-03-16 Kjartan Maraas <kmaraas@gnome.org>
7777 * providers/pop3/camel-pop3-folder.c: Added #include <config.h>
7779 2001-03-16 Dan Winship <danw@ximian.com>
7781 * camel-mime-utils.c (header_msgid_generate): Don't use
7782 getdomainname: it's NIS crap, not DNS.
7784 2001-03-15 Jeffrey Stedfast <fejj@ximian.com>
7786 * camel.c (camel_init): Don't use the hardcoded cert db directory,
7787 use the one passed in.
7789 * camel-tcp-stream-ssl.c (ssl_get_client_auth): Wrote the default
7790 implementation. Not that we'll use this though, since this is the
7791 default implementation provided by NSS anyway. This more or less
7792 serves as a reference in case we want to change anything.
7793 (ssl_auth_cert): Same.
7794 (ssl_bad_cert): Changed the prompt string and free it when we're
7797 2001-03-15 Dan Winship <danw@ximian.com>
7799 First batch of disconnected IMAP-related stuff. This adds local
7800 caching of message parts, but NOT any actual disconnected support.
7801 (But it should speed up IMAP use.)
7803 * providers/imap/camel-imap-message-cache.c: New class for caching
7804 message data to disk, and removing it when it's no longer
7805 relevant. Will eventually also support merging message parts
7806 together to save on files. Or maybe using a db instead of files?
7808 * providers/imap/camel-imap-private.h: Add a cache_lock to
7809 CamelImapFolderPrivate. This lock must be recursive, so make both
7810 locks EMutexes rather than GMutex.
7812 * providers/imap/camel-imap-folder.c (parse_fetch_response): "The
7813 only FETCH response parser you need!" Replaces the various
7814 almost-correct bits of code formerly scattered throughout this
7815 file with a single fully-correct function that can handle any
7816 FETCH response at any time, so we don't get confused by seeing a
7817 flags update when we were only expecting a message body, etc.
7818 (camel_imap_folder_fetch_data): FETCH a message body part either
7819 from the cache or the server
7820 (camel_imap_folder_changed): Remove expunged messages from the
7822 (camel_imap_folder_new): Change to take a directory instead of a
7823 summary file name. Create a CamelImapMessageCache for the folder.
7824 (imap_finalize): Unref the message cache.
7825 (camel_imap_folder_selected, imap_rescan, get_content,
7826 get_message, imap_get_message, imap_update_summary): Redone a
7827 bunch to use parse_fetch_data, CamelImapMessageCache, etc.
7829 * providers/imap/camel-imap-store.c (get_folder): Pass directory
7830 name to camel_imap_folder_new, not summary filename. Use
7831 e_path_to_physical to generate a path with /subfolders/ inserted
7832 between directory components.
7834 * providers/imap/camel-imap-wrapper.c (camel_imap_wrapper_new):
7835 Call camel_imap_folder_fetch_data (with cache_only TRUE) and if
7836 the data is cached, return an online datawrapper rather than an
7838 (write_to_stream): Use camel_imap_folder_fetch_data (with
7839 cache_only FALSE) here too
7841 * providers/imap/camel-imap-utils.c (imap_skip_list): Renamed from
7842 skip_list and made non-static.
7844 2001-03-15 Jeffrey Stedfast <fejj@ximian.com>
7846 * camel-tcp-stream-ssl.h: Uninclude prnetdb.h since it's not
7849 * providers/smtp/camel-smtp-transport.c: #include prnetdb.h here
7850 instead of making camel-tcp-stream-ssl.h include it. Prevents some
7853 * providers/smtp/Makefile.am: Include the NSPR_CFLAGS and
7856 2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
7858 * providers/smtp/camel-smtp-transport.c (smtp_connect): Update for
7859 using CamelTcpStreams and also for using SSL.
7861 * providers/smtp/libcamelsmtp.urls: defined "ssmtp"
7863 * providers/smtp/camel-smtp-provider.c: Defined the Secure SMTP
7865 (camel_provider_module_init): Register the Secure SMTP provider.
7867 2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
7869 * providers/imap/camel-imap-store.c (imap_connect): Check for
7870 "simap" instead of "imaps".
7872 * providers/pop3/camel-pop3-store.c (pop3_connect): Change the
7873 port to be 995 for spop.
7875 * providers/pop3/libcamelpop3.urls: Change to "spop".
7877 * providers/imap/libcamelimap.urls: Change "imaps" to "simap" to
7878 correspond to /etc/services.
7880 2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
7882 * providers/pop3/camel-pop3-store.c (pop3_connect): Check to see
7883 if we are using "pops" and then set the appropriate SSL settings.
7885 * providers/pop3/libcamelpop3.urls: Add "pops"
7887 * providers/pop3/camel-pop3-provider.c: Defined the pops provider.
7888 (camel_provider_module_init): Register the pops provider.
7890 2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
7892 * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_new): Ya know what?
7893 Lets not ref the service because otherwise we'll start having the
7894 same problems we had back with vtrash. Besides, since the store
7895 owns the stream, it's not like the store is going anywhere without
7897 (camel_tcp_stream_ssl_finalize): No need to unref the service.
7899 2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
7901 * camel-remote-store.c (remote_connect): Pass the service into the
7902 SSL stream, not the session.
7904 * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_init): Set the
7906 (camel_tcp_stream_ssl_finalize): Unref the service.
7907 (camel_tcp_stream_ssl_new): Takes a CamelService arg now rather
7908 than a CamelSession arg.
7910 2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
7912 * camel.c (camel_init): So it turns out that NSS_Init *isn't*
7913 idempotent, so we have to protect against initializing it more
7914 than once(contrary to what their design specs suggest).
7916 * camel-session.c (camel_session_get_service): Use
7917 camel_exception_is_set() - Makes no difference but it's more
7918 consistant with how we normally do it.
7920 * camel-provider.h (CAMEL_URL_ALLOW_SSL): We don't need this.
7922 * providers/imap/camel-imap-provider.c: Define the imaps provider.
7923 (camel_provider_module_init): Register the imaps provider.
7925 * camel-provider.c (camel_provider_init): Only add the protocol to
7926 the hash table if it's non empty. Also, g_strdup() the filename
7927 into the hash table.
7929 * providers/imap/camel-imap-store.c (camel_imap_store_init): Eek!
7930 So the service's URL isn't set until after this is
7931 initialized. This means we can't check for SSL here.
7932 (imap_connect): Set the SSL options here instead.
7934 2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
7936 * camel-tcp-stream-ssl.c: Numerous fixes to get it to build
7937 correctly with NSS enabled.
7939 * camel-remote-store.c (remote_connect): Pass in the session and
7940 expected host args, oops.
7942 * camel-provider.h (CAMEL_URL_ALLOW_SSL): Defined.
7944 * providers/imap/camel-imap-store.c (camel_imap_store_init): Check
7945 to see if we are supposed to use SSL and set the options
7947 (imap_connect): Return FALSE here instead of NULL.
7949 * providers/imap/camel-imap-provider.c: Add CAMEL_URL_ALLOW_SSL.
7951 * providers/imap/libcamelimap.urls: Add "imaps" which is the
7952 protocol for Secure IMAP.
7954 2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
7956 * camel-tcp-stream-openssl.[c,h]: Added
7958 * Makefile.am: Added camel-tcp-stream-openssl.[c,h] to the build.
7960 * camel-types.h: Added CamelTcpStreamSSL and CamelTcpStreamOpenSSL
7962 2001-03-14 Not Zed <NotZed@Ximian.com>
7964 * camel-mime-filter-charset.c (filter, complete): re-constify
7965 inbuf, to remove a warning.
7967 * camel-mime-parser.c (folder_scan_step): When we're out of data,
7968 run the filter_complete. For some reason the logic that was there
7969 was never being run, always try it now, i think it was to work
7970 around a buggy filter, rather than fix it the right way.
7972 * camel-folder-summary.c (summary_build_content_info): If indexing
7973 html parts, use the html filter to convert it to some indexable
7975 (summary_build_content_info): Reset the filters before adding them
7976 back to the stream, if they get re-used in a given instance
7979 * Makefile.am (libcamelinclude_HEADERS): Added
7980 camel-mime-filter-html.[ch].
7981 (INCLUDES): Added xml clags
7983 2001-03-05 Not Zed <NotZed@Ximian.com>
7985 * camel-folder-search.c (camel_folder_search_class_init): Setup a
7986 new function, "uid" which matches uids.
7987 (search_uid): Implement the "match uid" command.
7989 2001-03-13 Jeffrey Stedfast <fejj@ximian.com>
7991 * camel-mime-utils.c: Check for a new type of mailing list header.
7993 2001-03-13 Jeffrey Stedfast <fejj@ximian.com>
7995 * camel-tcp-stream-raw.c (stream_read): Made cancellable.
7996 (stream_write): Same.
7997 (stream_connect): Removed checks for DIVINE_INTERVENTION as the
8000 * camel-tcp-stream-ssl.c (stream_write): get rid of 'w' as it
8001 wasn't really needed.
8002 (set_errno): New function to set errno based on the NSPR error
8004 (stream_read): If an error occured, call set_errno().
8005 (stream_write): Same.
8007 2001-03-13 Jeffrey Stedfast <fejj@ximian.com>
8009 * Makefile.am: Added camel-tcp-stream-ssl to the build.
8011 * camel-remote-store.h: Add a use_ssl member to the
8012 CamelRemoteStore object.
8014 2001-03-13 Jeffrey Stedfast <fejj@ximian.com>
8016 * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_get_type):
8017 Oops. Make this a subclass of CamelTcpStream, not CamelStream.
8019 * camel-types.h: Add the defs for CamelTcpStream and
8022 * Makefile.am: Add camel-tcp-stream and camel-tcp-stream-raw to
8025 * camel-remote-store.c (remote_connect): Update to use
8028 * camel-tcp-stream-raw.c (stream_connect): Made cancellable by
8029 copying the currently used code in camel-remote-store.c.
8030 (stream_setsockopt): Oops, flags = fcntl (..., GET_FL);
8031 (camel_tcp_stream_raw_get_type): Oops. Make this a subclass of
8032 CamelTcpStream, not CamelStream.
8034 2001-03-13 Jeffrey Stedfast <fejj@ximian.com>
8036 * camel.c (camel_init): Since all of the Mozilla libs (including
8037 NSPR and NSS) correctly handle reinitializations, we might as well
8038 init both NSPR and NSS in camel_init so we can be sure of that
8039 these libs have been initialized.
8040 (camel_shutdown): New function to call the NSS cleanup stuff.
8042 2001-03-13 Jeffrey Stedfast <fejj@ximian.com>
8044 * camel-folder.c (camel_folder_copy_message_to): Don't allow the
8045 user to copy a message to or from the vtrash folder. Set an
8046 exception if they try.
8047 (camel_folder_move_message_to): This one is a bit more
8048 complicated: 1) If the user tried to move a message from the
8049 vtrash into the original folder, just undelete the message. 2) If
8050 the user tries to move the message to the vtrash folder, then just
8051 mark the message as deleted. 3) If the user tries to move the
8052 message from the vTrash to a folder other than the original, use
8053 the original folder as the source. As another optimization, I've
8054 made it so that if the user tries to move a message to the same
8056 (move_message_to): Unset the deleted flag before moving (assuming
8058 (copy_message_to): Same.
8060 * camel-vee-folder.c (camel_vee_folder_get_message_folder): New
8061 convenience function to get the folder from which the message uid
8064 2001-03-13 Dan Winship <danw@ximian.com>
8066 * providers/imap/camel-imap-store.c (imap_connect): When trying
8067 again after a failed password attempt, check if the connection got
8068 dropped (which Courier will do) and deal accordingly.
8070 * providers/sendmail/camel-sendmail-transport.c (sendmail_send_to,
8071 sendmail_send): More fixing for exim: It can't deal with "-tif",
8072 you need to say "-t -i -f".
8074 2001-03-12 Jeffrey Stedfast <fejj@ximian.com>
8076 * camel-store.c (init_trash): Rename the folder to "Trash" and
8079 2001-03-09 Jeffrey Stedfast <fejj@ximian.com>
8081 * camel-tcp-stream-ssl.h: Comment out everything unless HAVE_NSS
8084 * camel-tcp-stream-ssl.c (stream_read): Don't use errno, use
8085 nspr's error code stuff.
8086 (stream_write): Same.
8088 2001-03-09 Jeffrey Stedfast <fejj@ximian.com>
8090 * camel-session.c (camel_session_query_authenticator): Created a
8091 new mode (CAMEL_AUTHENTICATOR_ACCEPT) which is a Yes/No prompt to
8092 the user. This will be needed by the SSL/TLS code to come. Also
8093 changed the return value to a gpointer rather than a char* to
8094 allow the returning of TRUE/FALSE values.
8096 * camel.c: Wrap stuff with HAVE_NSS
8098 2001-03-09 Dan Winship <danw@ximian.com>
8100 * providers/sendmail/camel-sendmail-transport.c (sendmail_send,
8101 sendmail_send_to): Remove the "-U" for now, because it breaks
8102 exim's "sendmail" wrapper. (And it doesn't actually do all that
8103 much to sendmail's behavior, and it was working fine before
8106 * camel-mime-utils.c (header_fold): Fix a bug that could make this
8107 walk off the end of a string. (The bug has been there since
8108 December... maybe this will fix some unreproduceable crashes?)
8110 2001-03-08 Jeffrey Stedfast <fejj@ximian.com>
8112 * camel-store.c (camel_store_get_folder): Changes so that the
8113 folder gets added to the vtrash reguardless of whether or not the
8114 store is holding it's own folder lookup hash.
8115 (init_trash): Oops, lets try locking the cache before we go and
8116 add all the cached folders to the vtrash.
8118 2001-03-08 Jeffrey Stedfast <fejj@ximian.com>
8119 These fixes make it so that the CamelStore does not actually hold
8120 a ref on it's vTrash folder. The vTrash folder is now created ONLY
8121 when it is requested. This solves the problem of not being able to
8122 unref a Store and have it disconnect/finalize like we expect it to.
8124 * camel-store.c (init_trash): When we create the vtrash, add all
8125 previously opened folders to it and hook on to the finalize event
8126 so that we can then set the store->vtrash to NULL.
8127 (get_trash): If a vtrash folder for the store doesn't exist,
8128 init_trash() and then try.
8129 (construct): No longer need this.
8130 (camel_store_class_init): Don't override the construct method.
8131 (camel_store_finalize): We no longer hold a ref on the vtrash so
8134 2001-03-07 Jeffrey Stedfast <fejj@ximian.com>
8136 * providers/pop3/camel-pop3-store.c (init_trash): Implement.
8137 (get_trash): Implement.
8138 (camel_pop3_store_class_init): Override the default init_trash and
8139 get_trash virtual functions. Hopefully this should fix the problem
8140 of pop3 sotre's not disconnecting after the send&recv code
8141 finishes downloading mail.
8143 Wonder if I should override the default implementation for the
8144 mbox, mh, and maildir too?
8146 2001-03-07 Dan Winship <danw@ximian.com>
8148 * camel-remote-store.c (camel_remote_store_connected): Return the
8149 return value of camel_service_connect rather than returning
8150 !camel_exception_is_set(), since that will be wrong if ex==NULL...
8151 Fixes a crash in the IMAP keepalive code, but this same problem
8152 probably exists in other places too...
8153 (remote_recv_line): Fix another problem...
8155 * providers/local/camel-mbox-provider.c:
8156 * providers/vee/.cvsignore:
8157 * providers/vee/libcamelvee.urls: Remove some unused stuff
8159 2001-03-06 Jeffrey Stedfast <fejj@ximian.com>
8161 * camel-sasl-digest-md5.c (compute_response): Redone so as to save
8162 on memory allocations and speed.
8164 2001-03-05 Jeffrey Stedfast <fejj@ximian.com>
8166 * camel-sasl-plain.c (plain_challenge): Don't return NULL if the
8167 token is non-NULL. This is why:
8169 sending : AUTH PLAIN
8170 received: 334 ok. go on. <-- this is why
8171 sending : ZGZPaQpAZ214Lm5ldBBnb29jYXI=
8172 received: 235 {mp005-rz3} go ahead
8174 * camel-sasl.c (camel_sasl_authtype): Add the PLAIN type here.
8175 (camel_sasl_authtype_list): And here too.
8177 * camel-sasl-plain.c: Initialize the camel_sasl_plain_authtype.
8179 * camel-sasl-plain.h: extern the camel_sasl_plain_authtype.
8181 2001-03-05 Jeffrey Stedfast <fejj@ximian.com>
8183 * providers/imap/camel-imap-store.c (imap_connect): i18n'd some
8186 * providers/smtp/camel-smtp-transport.c (smtp_connect): Keep
8187 trying to authenticate until either we succeed or until the user
8190 2001-03-04 Jeffrey Stedfast <fejj@ximian.com>
8192 * camel-mime-utils.c: Wrote a new version of header_fold() that
8193 takes a 'force' option and uses another new function called
8194 header_fold_next_space() in place of strchr(inptr, ' ') to get the
8195 next whitespace char. The idea of header_fold_next_space() is to
8196 not treat spaces between a set of quotes as a space - this way it
8197 will be possible to fold (for example) the Content-Type MIME
8198 header without worrying about breaking up a boundary string.
8199 Note: This code is #if 0'd out until Zucchi approves of the patch.
8200 Another Note: We will probably still want to use the "don't fold
8201 this header" hash lookup for headers like the Message-Id and
8202 possibly a few others.
8204 2001-03-04 Jeffrey Stedfast <fejj@ximian.com>
8206 * camel-internet-address.c
8207 (camel_internet_address_encode_address): Make sure there is a
8208 space between the name and the address tokens.
8210 * camel-mime-utils.c (rfc2047_decode_word): encoded string
8211 segments need to be at least 8 chars (7 doesn't leave room for an
8212 ecoding value. To be more realistic, even 8 chars isn't enough as
8213 this assumes there is no charset nor any encoded text. If the
8214 encoding value is not 'Q' or 'B', then return NULL. This fixes bug
8217 2001-03-03 Not Zed <NotZed@Ximian.com>
8219 * camel-vee-folder.c (vee_folder_remove_folder): New function to
8220 remove a folder from a vfolder.
8221 (camel_vee_folder_remove_folder): New public function to remove a
8222 folder from a vfolder.
8224 2001-03-02 Jeffrey Stedfast <fejj@ximian.com>
8226 * providers/smtp/camel-smtp-provider.c: Doh! Set the
8227 CAMEL_URL_ALLOW_AUTH flag.
8229 * providers/smtp/camel-smtp-transport.c (get_smtp_error_string):
8230 Updated with the extended AUTH return codes.
8232 2001-03-02 Jeffrey Stedfast <fejj@ximian.com>
8234 * providers/imap/camel-imap-store.c (try_auth): Don't forget to
8235 unref the SASL object.
8237 * providers/smtp/camel-smtp-transport.c (query_auth_types):
8239 (smtp_auth): Implemented.
8240 (smtp_helo): Don't bother parsing the authtypes if we already have
8242 (smtp_connect): call smtp_auth() here if we found any authtypes.
8243 (smtp_disconnect): Updated as I now use a hash table for the
8244 supported authtypes rather than a linked list.
8245 (esmtp_get_authtypes): modify to use a hash table instead of a
8246 linked list and also use isspace() rather than == ' '.
8248 2001-03-02 Dan Winship <danw@ximian.com>
8250 * providers/sendmail/camel-sendmail-transport.c (sendmail_send_to,
8251 sendmail_send): Use "-f" to set the envelope from address so
8252 bounces go to the right place. Also, pass "-U" since the man page
8253 says we're supposed to...
8255 2001-03-01 Jeffrey Stedfast <fejj@ximian.com>
8257 * camel-sasl.c: #include "camel-sasl-digest-md5.h"
8258 (camel_sasl_authtype_list): add DIGEST-MD5 stuff here.
8259 (camel_sasl_authtype): And here too.
8260 (camel_sasl_new): And here...
8262 * camel-sasl-digest-md5.[c,h]: new SASL class for DIGEST-MD5 (has
8263 been tested and proven to work).
8265 2001-03-01 Dan Winship <danw@ximian.com>
8267 * camel-sasl.c (camel_sasl_challenge): Take a GByteArray as input
8268 as well. Comment that you can pass %NULL for @token to get the
8269 initial auth data for mechanisms that are client-initiated.
8270 (camel_sasl_challenge_base64): Convenience function for protocols
8271 that use base64-encoded SASL.
8272 (camel_sasl_authenticated): Implement this... (it was prototyped
8274 (camel_sasl_new): Function to take a service name, a mechanism
8275 name, and a CamelService, and return a CamelSasl for it.
8276 (camel_sasl_authtype, camel_sasl_authtype_list): Functions to
8277 return CamelServiceAuthType information about SASL mechanisms, to
8278 allow providers to deal with them generically.
8280 * camel-sasl-anonymous.c, camel-sasl-plain.c: Update/simplify for
8281 CamelSasl changes. Both of these are single-round
8282 (client-initiated) mechanisms, so they don't need to keep state.
8283 (camel_sasl_plain_new): Removed; use camel_sasl_new instead.
8284 (Can't get rid of camel_sasl_anonymous_new though...)
8286 * camel-sasl-cram-md5.c: Update/simplify for CamelSasl changes.
8287 (camel_sasl_cram_md5_new): Removed; use camel_sasl_new instead.
8288 (cram_md5_challenge): Use md5_get_digest where possible, and
8289 various other minor simplifications. CRAM-MD5 only has a single
8290 round, so there's no need to keep track of state. This code is now
8291 tested (against Cyrus IMAPd) and known to work.
8293 * camel-sasl-kerberos4.h: Update/simplify for CamelSasl changes.
8294 Make only a single #ifdef HAVE_KRB4. Remove stuff from priv that
8295 isn't needed between rounds.
8296 (camel_sasl_kerberos4_new): Removed; use camel_sasl_new instead
8297 (krb4_challenge): Fix up the logic I broke in my previous "at
8298 least make it compile" fixes, update to match other changes, and
8299 remove IMAP-isms that shouldn't be in the generic code. This still
8300 isn't tested, because we're stuck behind a NAT right now...
8302 * providers/imap/camel-imap-store.c: Add an "authtypes" hash table
8303 to CamelImapStore recording the supported authtypes.
8304 (connect_to_server): Record supported authtypes in the authtypes
8305 hash rather than the capabilities bitmask, since now the IMAP code
8306 is no longer responsible for keeping track of which authtypes we
8308 (query_auth_types): Use camel_sasl_authtype_list to get the
8309 SASL-supported authtypes.
8310 (try_auth): New function to try a SASL auth mechanism. Sort of
8311 formerly imap_try_kerberos_v4_auth.
8312 (imap_connect): Get rid of the krb4-specific bits and genericize
8313 them for any SASL authtype.
8315 * providers/imap/Makefile.am: Remove camel-imap-auth.[ch] (moved
8316 into camel-imap-store.c since it's now constant size) and the
8317 KRB4_CFLAGS and KRB4_LDFLAGS references.
8319 2001-03-01 Jeffrey Stedfast <fejj@ximian.com>
8321 * camel-sasl-anonymous.c (anon_challenge): Don't base64 encode the
8322 data, leave that up to the provider to do if it needs to. Also
8323 save on some memory allocations and stuff.
8325 * camel-sasl-cram-md5.c (cram_md5_challenge): Same here. Also get
8326 rid of the need for the temp buf as we can just write it to the
8329 2001-03-02 Not Zed <NotZed@Ximian.com>
8331 * camel-mime-utils.c (rfc2047_encode_word, rfc2047_decode_word):
8332 Reconstify variables to match iconv.
8334 * camel-search-private.c (camel_ustrstrcase): Change some
8335 assertions back into valid returns.
8337 2001-03-01 Dan Winship <danw@ximian.com>
8339 * Makefile.am (libcamel_la_LIBADD, INCLUDES): camel depends on
8340 krb4 now (where available), for camel-sasl-kerberos4.c
8342 * camel-sasl-kerberos4.[ch]: Make this at least compile. Dunno if
8345 2001-03-01 Peter Williams <peterw@ximian.com>
8347 * camel-url.c (camel_url_new): Assert url_string != NULL.
8349 2001-02-28 Jeffrey Stedfast <fejj@ximian.com>
8351 * Makefile.am: Added camel-sasl-anonymous.[c,h] to the build.
8353 * camel-sasl-anonymous.[c,h]: new SASL class for ANONYMOUS
8355 * camel-sasl-plain.c (plain_challenge): Oops, have a state for
8356 setting sasl->authenticated = TRUE;
8358 * camel-sasl-cram-md5.c (cram_md5_challenge): Same here.
8360 2001-02-28 Jeffrey Stedfast <fejj@ximian.com>
8362 * camel-mime-utils.c (header_decode_date): A fix for broken
8363 mailers that send 2-digit years (ie "Wed, 28 Feb 01
8364 04:59:41"). Fixes bug #1633.
8366 * camel-filter-driver.c (camel_filter_driver_filter_folder): Check
8367 to make sure message isn't NULL.
8369 2001-02-28 Dan Winship <danw@ximian.com>
8371 * camel-remote-store.c (remote_recv_line): If we get back 0 bytes
8372 from camel_stream_buffer_gets, that means the socket got
8373 disconnected, so set an exception. (Noticed because of a message
8374 that crashes our IMAP server when you try to look at it. :)
8376 2001-02-28 Jeffrey Stedfast <fejj@ximian.com>
8378 * Makefile.am: Added camel-sasl*.[c,h] to the build.
8380 * camel-sasl.[c,h]: new "abstract" SASL class
8382 * camel-sasl-kerberos4.[c,h]: new SASL class for KERBEROS_V4
8384 * camel-sasl-cram-md5.[c,h]: new SASL class for CRAM-MD5
8386 * camel-sasl-plain.[c,h]: new SASL class for PLAIN
8388 * providers/imap/camel-imap-auth.c: Removed the base64 functions.
8390 * camel-mime-utils.c (base64_encode_simple): Moved here from
8392 (base64_decode_simple): Same.
8394 2001-02-26 Dan Winship <danw@ximian.com>
8396 * providers/imap/camel-imap-folder.c (imap_sync): Group messages
8397 into sets with the same flags and use the IMAP message set
8398 notation rather than doing a separate STORE FLAGS for each one.
8399 This cuts the network traffic down to just a handful of commands
8400 per sync rather than one per changed message. Removed the progress
8401 notification stuff since it's no longer meaningful and should
8402 hopefully be unnecessary.
8403 (imap_copy_message_to): move the former sync_message function
8404 into here, since it's no longer shared with imap_sync.
8406 2001-02-26 Jeffrey Stedfast <fejj@ximian.com>
8408 * camel-mime-utils.c: Made thread-safe and moved to above the test
8411 * camel-mime-message.c (camel_mime_message_init): Set the
8413 (camel_mime_message_finalize): Free the message_id.
8414 (camel_mime_message_set_message_id): New function to set the
8416 (camel_mime_message_get_message_id): New function to get the
8418 (process_header): Decode the message-id.
8420 2001-02-24 Jeffrey Stedfast <fejj@ximian.com>
8422 * camel-store.c (construct): init the vTrash folder here instead
8424 (camel_store_class_init): init service_class->construct.
8425 (camel_store_finalize): We only need to unref the vtrash folder.
8426 (init_trash): don't create a vstore since we don't need it.
8428 2001-02-23 Jeffrey Stedfast <fejj@ximian.com>
8430 * camel-store.c (camel_store_class_init): init get_trash and
8432 (camel_store_init): call the virtual init_trash function.
8433 (camel_store_finalize): unref the vtrash folder/store if present.
8434 (camel_store_get_folder): Add the new folder to the vtrash
8436 (init_trash): default implementation of init_trash.
8437 (get_trash): default implementation of get_trash.
8439 * camel-vee-store.c (vee_init_trash): No-op.
8440 (vee_get_trash): return NULL
8442 2001-02-23 Not Zed <NotZed@Ximian.com>
8444 * camel-folder-summary.c (camel_message_info_new_from_header):
8445 Doh, cut and paste problem, use mlist not cc.
8447 * camel-folder.c (move_message_to):
8448 (copy_message_to): If the source folder doesn't support a
8449 summary, dont try and get the message info from it.
8451 * camel-filter-search.c (check_header): Implement a pseudo-header
8452 "x-camel-mlist" which just looks up in the message info for a
8455 * camel-folder-search.c (check_header): Add pseudo-header
8456 "x-camel-mlist" which can be used to match on mailing list.
8458 * providers/imap/camel-imap-folder.c (imap_sync): Add some
8459 internal progress reporting.
8460 (imap_rescan): Do some progress reporting.
8462 * camel-mime-part.c (init_header_name_table): Add the message-id
8463 to the formatted table, so we dont try and wrap it, and break it.
8465 2001-02-22 Jeffrey Stedfast <fejj@ximian.com>
8467 * camel-folder.h: Remove the 'FIXME: remove because this isn't
8468 required...' comment for copy_message_to since we now need and
8469 cherish its existance in the filter-driver code ;-)
8471 * camel-filter-driver.c (camel_filter_driver_filter_message): Now
8472 takes a UID and CamelFolder arguments (which can be NULL) to allow
8473 for possible optimizations when copying messages between folders
8475 (camel_filter_driver_filter_mbox): Updated (passes NULL for both
8476 since this case can't be optimized anyway).
8477 (camel_filter_driver_filter_folder): Updated to pass in the uid
8478 and folder of the message.
8480 2001-02-22 Dan Winship <danw@ximian.com>
8482 * providers/imap/camel-imap-summary.h (CAMEL_IMAP_SERVER_FLAGS):
8483 #define this as the set of all IMAP system flags
8485 * providers/imap/camel-imap-folder.c (sync_message): after syncing
8486 flags, set server_flags to (flags & CAMEL_IMAP_SERVER_FLAGS)
8487 rather than just "flags", since any other flags won't have been
8488 synced. Prevents the CAMEL_MESSAGE_ATTACHMENTS flag from getting
8491 2001-02-22 Not Zed <NotZed@Ximian.com>
8493 * providers/vee/*: Removed all files.
8495 * camel-private.h: Move camel-vee-private.h stuff into here.
8497 * camel-session.c: Move the vee_provider here, and initialise it
8498 always as part of a session. The vfolder provider is always
8501 * providers/Makefile.am: Remove "vee" from the build list, now
8502 built as part of the main library.
8504 * Makefile.am (libcamelinclude_HEADERS):
8505 (libcamel_la_SOURCES): Added camel-vee-store.[ch],
8506 camel-vee-folder.[ch].
8508 * providers/vee/camel-vee-folder.c (vee_folder_build): Removed,
8510 (camel_vee_folder_new): Removed call to build_folder.
8511 (vee_get_message): Dont try and free the mi if we didn't get it.
8513 * camel-folder.c (camel_folder_change_info_new): Added a hash
8514 table of what we have in the lists, plus moved private things into
8516 (camel_folder_change_info_add_source): Fixed up private accesses.
8517 (camel_folder_change_info_add_uid): Changed to use a hashtable to
8518 see if we already have the uid, etc.
8519 (camel_folder_change_info_remove_uid): Similar.
8520 (change_info_remove): Likewise.
8521 (camel_folder_change_info_clear): Fixes for privatisations.
8522 (camel_folder_change_info_free): "
8524 2001-02-21 Dan Winship <danw@ximian.com>
8526 * providers/imap/camel-imap-folder.c (fetch_medium): Fixes for
8527 IMAP4-pre-rev1 from Torsten Schulz.
8529 2001-02-20 Not Zed <NotZed@Ximian.com>
8531 * camel-mime-utils.c (mail_list_magic): Take the ^Header: part out
8532 of the expression, since we look that up ourselves.
8533 (header_raw_check_mailing_list): When getting the match, get match
8534 1, not match 0, we dont want the full string match.
8536 * camel-folder-summary.c (CAMEL_FOLDER_SUMMARY_VERSION): Bumped
8538 (message_info_new): Extract the mlist info from the headers.
8539 (message_info_load): Load mlist from summary.
8540 (message_info_save): Save mlist to summary.
8541 (message_info_free): Save the mlist entry.
8542 (camel_message_info_new_from_header): Extract mailing list header.
8543 (camel_message_info_dup_to): Copy the mlist entry.
8544 (camel_message_info_free): Free mlist.
8545 (message_info_dump): Dump the mlist.
8547 * camel-folder-summary.h: Add an mlist (mailing list) string to
8550 2001-02-19 Not Zed <NotZed@Ximian.com>
8552 * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Added
8554 (message_changed): Add support for the auto-update flag, in which
8555 case we auto-match the content as it changes.
8556 (camel_vee_folder_init): Remoive "DYNAMIC" optionality
8557 (camel_vee_folder_finalise): "
8558 (vee_expunge): As we expunge folders, re-sync their content by
8559 rerunning the query.
8561 * providers/vee/camel-vee-store.c (vee_get_folder): Pass flags to
8564 2001-02-18 Not Zed <NotZed@Ximian.com>
8566 * providers/vee/Makefile.am (noinst_HEADERS): Added
8567 camel-vee-private.h.
8569 * providers/vee/camel-vee-private.h: New file to add locking stuff
8572 * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Add
8573 locking around unmatched setup.
8574 (camel_vee_folder_init): Setup lock.
8575 (camel_vee_folder_finalise): Free locks.
8576 (folder_changed): Add locking.
8577 (unmatched_finalise): "
8578 (message_changed): "
8579 (vee_folder_build): "
8581 2001-02-17 Not Zed <NotZed@Ximian.com>
8583 * providers/vee/camel-vee-folder.c (vee_folder_add): Check uid
8584 doesn't exist before adding it.
8586 2001-02-16 Not Zed <NotZed@Ximian.com>
8588 * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Create
8589 a new virtual virtual folder UNMATCHED, to store all messages that
8590 dont match other vfolders.
8591 (unmatched_folder_changed): When a vfolder issues a changed event,
8592 use its info to update the unmatched folder info.
8593 (unmatched_finalise): When a vfolder is finalised, remove any uids
8594 it has as if we had a removed event for it.
8596 2001-02-16 Jeffrey Stedfast <fejj@ximian.com>
8598 * camel-filter-driver.c (camel_filter_driver_finalise): Thaw the
8600 (camel_filter_driver_set_default_folder): Thaw the defaultfolder
8601 we're about to replace, and freeze the new defaultfolder.
8603 2001-02-15 Jeffrey Stedfast <fejj@ximian.com>
8605 * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Emit
8606 the folder_created signal here.
8608 * providers/local/camel-local-folder.c
8609 (camel_local_folder_construct): Emit the folder_created signal.
8611 * providers/local/camel-local-store.c (delete_folder): On error,
8612 free the 'name' string so we don't leak. Also emit the
8613 folder_deleted signal.
8615 * providers/imap/camel-imap-store.c (subscribe_folder): Emit the
8616 folder_created signal.
8617 (unsubscribe_folder): Emit the folder_deleted signal.
8619 * camel-store.c (camel_store_class_init): Added folder_created and
8620 folder_deleted signal defs.
8622 2001-02-15 Dan Winship <danw@ximian.com>
8624 * camel-folder-thread.c (container_parent_child): Deal with
8625 out-of-order References headers so they don't cause messages to
8626 disappear in threaded view.
8628 * providers/imap/camel-imap-folder.c (fetch_medium): IMAP4
8629 (pre-rev1) doesn't allow BODY.PEEK[], so use RFC822.PEEK instead
8632 2001-02-14 Christopher James Lahey <clahey@ximian.com>
8634 * camel-mime-filter-charset.c (complete, filter),
8635 camel-mime-utils.c (rfc2047_decode_word, rfc2047_encode_word):
8636 Changed this code to match the glibc iconv signature.
8638 2001-02-14 Dan Winship <danw@ximian.com>
8640 * camel-store.c (camel_store_create_folder): New method to create
8641 a folder when you don't know its full name.
8643 * providers/imap/camel-imap-store.c (create_folder): Implement.
8644 (create_folder): Oops, and fix bug involving namespaces
8646 2001-02-12 Not Zed <NotZed@Ximian.com>
8648 * camel-mime-part.c (init_header_name_table): Add address headers
8649 to list that we dont fold when writing. The are properly
8650 formatted as we build them.
8651 (write_to_stream): DOH, lookup the header name in the formatted
8652 hash table, not the value, that would never have worked.
8654 * camel-internet-address.c
8655 (camel_internet_address_encode_address): Changed to take a
8656 parameter saying how much we've printed so far. We now fold the
8657 header as we format it. We dont fold addresses, even if they are
8658 too long, we simply put them on another line by themselves: this
8659 should make the result more parsable by mailers that can't handle
8660 split up addresses (which are legal).
8661 (internet_encode): Fix for changes to above.
8663 2001-02-12 Jeffrey Stedfast <fejj@ximian.com>
8665 * providers/local/camel-local-provider.c: mbox, mh, and maildir
8666 camel-url's need absolute paths.
8668 * camel-provider.h (CAMEL_URL_PATH_IS_ABSOLUTE): New flaggy flag.
8670 2001-02-08 Dan Winship <danw@ximian.com>
8672 * camel-store.c: Rewrite a bunch. Replace the existing folder
8673 cache stuff with much simpler code that still handles all the
8674 existing cases. Now the folder hash table is always created by the
8675 base class, using hash and compare functions provided by the class
8676 implementation. (If they are set to NULL, CamelStore won't cache
8677 folders.) lookup_folder, cache_folder, and uncache_folder are no
8678 longer class methods, and get_name is gone completely.
8680 (camel_store_get_inbox): Renamed from
8681 camel_store_get_default_folder, since that wasn't being used, and
8682 this is what we actually need.
8683 (camel_store_get_root_folder): Removed, since it's not needed for
8684 anything given get_folder_info.
8686 * camel-remote-store.c:
8687 * providers/local/camel-local-store.c:
8688 * providers/local/camel-mbox-store.c:
8689 * providers/local/camel-mh-store.c:
8690 * providers/local/camel-maildir-store.c:
8691 * providers/nntp/camel-nntp-store.c:
8692 * providers/pop3/camel-pop3-store.c:
8693 * providers/vee/camel-vee-store.c: Minor updates for CamelStore
8696 * providers/imap/camel-imap-store.c (camel_imap_store_class_init):
8697 Update for CamelStore changes.
8698 (hash_folder_name, compare_folder_name): treat INBOX
8699 case-insensitively, otherwise use g_str_hash and g_str_equal.
8701 * camel-service.c (camel_service_construct): Remove
8702 camel_service_new and create camel_service_construct (as a class
8703 method) in its place.
8705 * camel-session.c (camel_session_get_service): Use
8706 camel_object_new and camel_service_construct to replace
8709 * providers/local/camel-local-store.c (construct): Append a '/' to
8710 the URL path if it doesn't end with one
8712 2001-01-31 Jeffrey Stedfast <fejj@helixcode.com>
8714 * camel-tcp-stream-ssl.c: Oops, include the camel-tcp-stream-ssl
8715 header instead of the raw one.
8717 2001-02-07 Not Zed <NotZed@Ximian.com>
8719 * camel-operation.c (camel_operation_start): Changed to push the
8720 operation into a status stack.
8721 (camel_operation_progress): Changed to only accept % complete.
8722 (camel_operation_reset): Free status stack as well.
8724 * providers/pop3/camel-pop3-folder.c (pop3_get_message): Get the
8725 octect count from the return line, and pass it to
8726 get_additional_data().
8727 (pop3_refresh_info): Added status stuff.
8729 * providers/pop3/camel-pop3-store.c
8730 (camel_pop3_command_get_additional_data): Added a total bytes
8731 expected argument for progress reporting & fixed callers.
8732 (camel_pop3_command_get_additional_data): Added progress
8735 * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
8736 (mbox_summary_sync_quick):
8737 (summary_rebuild): Added progress reporting stuff.
8739 2001-02-07 Jeffrey Stedfast <fejj@ximian.com>
8741 * camel-search-private.c (CAMEL_SEARCH_COMPARE): Macro for making
8743 (camel_ustrcasecmp): Use CAMEL_SEARCH_COMPARE and check for
8744 end-of-string before the utf-8 error check.
8745 (camel_ustrncasecmp): Same.
8746 (camel_search_header_match): Strip leading spaces before doing
8747 anything else. Also use vlen and mlen so as to not need to do 500
8749 (camel_ustrcasecmp): Don't get_utf8() for the 2 strings in the
8750 comparison part of the loop because of short-circuit expression
8751 evaluation. (blame JPR if this is the wrong term!)
8752 (camel_ustrncasecmp): Same.
8754 2001-02-06 Jeffrey Stedfast <fejj@ximian.com>
8756 * camel-search-private.c (utf8_get): Rewrote using unicode_get_utf8().
8757 (camel_ustrcasecmp): Use unicode_char_t
8758 (camel_ustrncasecmp): Same.
8760 2001-02-06 Christopher James Lahey <clahey@ximian.com>
8762 * camel-mime-filter-charset.c (complete, filter),
8763 camel-mime-utils.c (rfc2047_decode_word, rfc2047_encode_word):
8764 Made these pass char ** as the second parameter to iconv.
8766 2001-02-06 Not Zed <NotZed@Ximian.com>
8768 * camel-session.c: Removed all the camel_cancel stuff.
8770 * camel-stream-fs.c (stream_read): Change to use camel_operation.
8773 * camel-remote-store.c (socket_connect): Change to use
8774 camel_operation rather than camel_cancel stuff.
8775 Removed gal include, WTF is that doing there anyway?
8777 * Makefile.am (libcamel_la_SOURCES):
8778 (libcamelinclude_HEADERS): Added camel-operation.[ch], stuff to
8779 handle notification and cancellation.
8781 * camel-search-private.c: Removed unwanted header. It was never
8782 put in for a reason. Stop fixing irrelevant warnings.
8784 (camel_ustrstrcase): Our own strstrcase impl for utf8 strings.
8785 (camel_ustrcasecmp): Ditto for strcasecmp.
8786 (camel_ustrncasecmp): And strncasecmp.
8787 (utf8_get): Simpler interface to utf8 string processing.
8788 (camel_search_header_match): Use the new things.
8790 2001-02-05 Not Zed <NotZed@Ximian.com>
8792 * camel-folder.c (get_summary): Removed some old variables/a small
8794 (free_summary): Removed old variables.
8796 * camel-mime-utils.c (header_raw_check_mailing_list): New utility
8797 function to get the mailing list (if any) that a set of headers
8800 2001-02-05 Christopher James Lahey <clahey@helixcode.com>
8802 * camel-stream-fs.c: Added a missing #include.
8804 * camel-search-private.c: Added a missing #include.
8806 2001-02-05 Jeffrey Stedfast <fejj@ximian.com>
8808 * camel-remote-store.c (remote_query_auth_types): Oops. Change
8811 * providers/smtp/camel-smtp-transport.c (query_auth_types): Updated.
8813 * providers/nntp/camel-nntp-store.c (nntp_store_query_auth_types):
8816 * providers/pop3/camel-pop3-store.c (query_auth_types): Updated.
8818 * providers/imap/camel-imap-store.c (query_auth_types): Updated.
8820 * camel-service.c (camel_service_query_auth_types): Now takes a
8821 boolean value to specify whether or not to connect when
8822 constructing a supported authtype list.
8824 2001-02-05 Not Zed <NotZed@Ximian.com>
8826 * camel-stream-filter.c (do_write): Revert jeff's earlier change,
8827 the change below is the more-correct fix. All his was doing was
8828 ignoring the return code & looping actually :)
8830 * camel-stream-fs.c (stream_write): Since we are non-blocking on
8831 the outgoing fd, keep looping if writing out large blocks, so we
8832 can keep checking for cancel, etc.
8834 2001-02-02 Not Zed <NotZed@Ximian.com>
8836 * camel-folder-thread.c (camel_folder_thread_messages_new): When
8837 we drop a fake node, dont skip checking the next in the list.
8838 (camel_folder_thread_messages_new): Add an assertion check just to
8839 make sure we dont get any pseudo nodes, and spit a warning if we
8842 2001-02-04 Jeffrey Stedfast <fejj@ximian.com>
8844 * camel-stream-filter.c (do_write): Make do_write loop until the
8845 entire buffer is written.
8847 2001-02-02 Not Zed <NotZed@Ximian.com>
8849 * camel-stream-fs.c: Add missing header for cancel check stuff.
8851 * camel-session.c (camel_cancel_cancel): Fix a wrong cast.
8853 * camel-mime-part.c (init_header_name_table): Setup a new table
8854 header_formatted_table, that lists headers that we dont want to
8855 fold (they've already been folded).
8856 (write_to_stream): Check for already formatted headers, and dont
8857 try and fold them. This is a fix for bug #1097.
8859 2001-02-01 Not Zed <NotZed@Ximian.com>
8861 * camel-mime-utils.c (header_fold): If we are folding, drop the
8862 space at the end of the line.
8864 2001-01-30 Not Zed <NotZed@Ximian.com>
8866 * camel-remote-store.c (timeout_cb): Remvoe the stream locking
8867 here. I think this was leading to a deadlock when a keepalive is
8868 being sent, in imap.
8870 2001-01-29 Not Zed <NotZed@Ximian.com>
8872 * providers/imap/camel-imap-command.c
8873 (imap_command_strdup_vprintf): Include the terminating NUL in the
8874 calculated string length. This hit memcheck.
8876 2001-01-25 Not Zed <NotZed@Ximian.com>
8878 * tests/folder/test3.c: Changed the subject search to handle case
8879 sensitive when it is mixed case.
8881 * Makefile.am (libcamel_la_SOURCES): Added camel-ssearch-private.c
8882 (noinst_HEADERS): Added camel-search-private.h
8884 * camel-folder-search.c (check_header): New function to do the
8885 work of the various header checks.
8886 (search_header_matches):
8887 (search_header_starts_with):
8888 (search_header_ends_with):
8889 (search_header_contains): Use check_header to do the work.
8890 (build_match_regex): Removed.
8892 * camel-search-private.c (header_soundex): New
8893 function to match words to phrases using soundex algorithm.
8895 * camel-filter-search.c (soundexcmp): Removed.
8896 (check_match): Moved to search-private.h
8898 2001-01-24 Not Zed <NotZed@Ximian.com>
8900 * camel-search-private.c (camel_search_build_match_regex): Added
8901 extra flags, so the same function can be used for
8902 start/end/whole/partial matches.
8903 (camel_search_header_match): Convenience function to check a
8904 single header against all sorts of different matches.
8906 * providers/imap/camel-imap-search.c (imap_body_contains): Fix for
8909 * camel-folder-search.c: Fix for e_sexp api changes.
8910 (search_header_contains): Free args/quit on unknown header.
8911 (search_header_matches): "
8912 (search_header_starts_with): "
8913 (search_header_ends_with): "
8914 (match_message): Add an exception argument.
8915 (search_body_contains): Free args/quit on fatal error.
8916 (message_body_contains): Removed (moved to
8917 camel-search-private.c), fixed callers.
8919 * camel-filter-search.c: Fix for e_sexp api changes.
8920 (build_match_regex, message_body_contains): Moved into
8921 camel-filter-private.c Fixed callers.
8922 (check_header): moved guts to camel-search-private, and
8923 changed to use regex's for everything. Just calls that with the
8925 (check_header): GEts the header, decodes it, and checks for
8926 failure, and whatnot.
8927 (check_match): Removed.
8928 (header_soundex): Changed significantly. Now it soundexes each
8929 word in the header separately, and compares it to the first
8932 * tests/folder/test9.c (main): Fix for api changes.
8933 (main): Added tests to see that invalid match and action
8934 rules are properly detected.
8936 * camel-filter-driver.c (camel_filter_driver_filter_mbox): Remove
8937 the 'finished message' bit.
8938 (camel_filter_driver_filter_message): Remove an accidentally
8940 (camel_filter_driver_filter_message): Fix for e-sexp api changes.
8942 2001-01-23 Dan Winship <danw@ximian.com>
8944 * providers/imap/camel-imap-wrapper.c: Add a lock around the
8945 delayed loading, so two threads won't try to do it at the same
8948 2001-01-22 Dan Winship <danw@ximian.com>
8950 * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Set the
8951 CamelFolder::name to just the base part of the vfolder name (the
8954 2001-01-23 Not Zed <NotZed@Ximian.com>
8956 * camel-filter-search.c (camel_filter_search_match): Perform error
8957 checking on parsing/execution.
8959 * camel-folder-search.c (camel_folder_search_execute_expression):
8960 Perform error handling on search expression.
8961 (CamelFolderSearchPrivate): Add a camelexception for error
8963 (camel_folder_search_execute_expression): Setup exception pointer.
8964 (search_match_all): Quit on error.
8966 * providers/imap/camel-imap-summary.c (message_info_load): Removed
8967 some debug 'warnings', as they should now be displayed at the
8968 toplevel loader, and just made the code match similar code
8971 * providers/local/camel-mbox-summary.c (message_info_load): Error
8973 (message_info_save): more error handling.
8975 * camel-folder-summary.c (message_info_load): Add error handling
8976 and sanity checking.
8977 (camel_folder_summary_load): Add error checks.
8978 (perform_content_info_load): Error + sanity checks.
8979 (content_info_load): error + sanity checks.
8981 * camel-filter-driver.c (close_folder): avoid /0 by updating after
8982 we've done the sync.
8983 (close_folders): Setup the first progress report to start it off.
8984 (camel_filter_driver_filter_message): Fix a fixme, check errors in
8985 e_sexp parsing, etc.
8987 2001-01-22 Christopher James Lahey <clahey@helixcode.com>
8989 * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
8990 Initialize the value of the variable exists here.
8992 2001-01-22 Not Zed <NotZed@Ximian.com>
8994 * .cvsignore */*/.cvsignore: Added profiling temp
8997 * camel-folder-thread.c (camel_folder_thread_messages_new): When
8998 removing phantom nodes, check for the end node too.
9000 * camel-filter-driver.[ch]: Changed status vars to be
9001 CAMEL_FILTER_STATUS_ etc.
9003 2001-01-21 Jeffrey Stedfast <fejj@ximian.com>
9005 * camel-mime-utils.c (header_param_list_format_append): Make the
9006 output a little prettier. Okay, so I'm anal...
9008 2001-01-21 Not Zed <NotZed@Ximian.com>
9010 * camel-filter-driver.h: Added an exception to
9011 CamelFilterGetFolderFunc.
9013 * camel-filter-driver.c (camel_filter_driver_filter_message):
9014 Remove source parameter, as it is determined elsewhere now.
9015 (camel_filter_driver_filter_folder): Same here.
9016 (camel_filter_driver_filter_mbox): And here.
9017 (do_move): If we cannot open a folder, quit, rather than ignoring
9019 (do_copy): Here too.
9020 (open_folder): Pass an exception into get_folder callback.
9021 (camel_filter_driver_filter_folder): Report that we're syncing,
9023 (camel_filter_driver_filter_mbox): And here too.
9024 (close_folder): And here.
9026 2001-01-19 Jeffrey Stedfast <fejj@ximian.com>
9028 * camel-filter-driver.c (camel_filter_driver_filter_message): Set
9029 the deleted bit *before* copying to the default folder, this way
9030 if they are importing mail and have a rule to delete it, it
9031 doesn't get copied to the default folder un-deleted.
9033 2001-01-19 Dan Winship <danw@ximian.com>
9035 * providers/imap/camel-imap-store.c
9036 (get_subscribed_folders_by_hand): If LISTing a subscribed folder
9037 doesn't return a LIST response, just ignore that folder. Yay
9039 (subscribe_folder): add a missing UNLOCK
9041 2001-01-19 Kjartan Maraas <kmaraas@gnome.org>
9043 * providers/smtp/camel-smtp-provider.c: Mark strings for translation.
9045 2001-01-19 Not Zed <NotZed@Ximian.com>
9047 * camel-filter-driver.c (report_status): Add a percentage complete
9048 indicator to the status thing.
9049 (camel_filter_driver_filter_mbox): Add percentage complete to
9051 (camel_filter_driver_filter_folder): Same.
9053 2001-01-18 Dan Winship <danw@ximian.com>
9055 * camel-store.c (camel_folder_info_build): More tweaking... skip
9056 separator characters after the namespace character. (Gets rid of
9057 the shell folder registration warning some people have had with
9060 * providers/imap/camel-imap-store.c (imap_connect): I'm sure there
9061 was some clever reason I was storing the flags of the folder in
9062 the hash table rather than just "1", but I don't remember what it
9063 was now. Anyway, since we only ever test NULL/non-NULL, store 1,
9064 since flags is sometimes 0.
9066 * providers/imap/camel-imap-folder.c (imap_update_summary): Oops.
9067 Somewhere in one of the reorgs, the code to add new messages to
9068 the CamelFolderChangeInfo structure got removed. Fix that.
9070 2001-01-17 Jeffrey Stedfast <fejj@ximian.com>
9072 * providers/imap/camel-imap-summary.c (message_info_load): Add
9073 some g_warnings() to help debug later if I ever get the segfaults
9074 I was getting earlier. Can't seem to reproduce them after my
9077 * camel-folder-summary.c (camel_folder_summary_load): Undid my
9078 change here, NotZed said it was wrong and that if it gets a NULL
9079 mi then it should abort and not continue.
9081 2001-01-17 Jeffrey Stedfast <fejj@ximian.com>
9083 * camel-folder-summary.c (camel_folder_summary_load): Make sure
9084 that the message-info is non-null before we go accessing inner
9085 parts of it and/or adding it to the summary array. I may not have
9086 handled the error correctly, but it does seem to work
9087 correctly. If NotZed could double-check this it'd be great.
9089 * providers/smtp/camel-smtp-transport.c (get_smtp_error_string):
9090 New smtp error-code to string mapping function.
9091 (smtp_connect): Use the new error->string function for reporting
9093 (smtp_helo): Same. Also use a case-insensitive strstr for 8BITMIEM
9094 as it seems Exchange sends back lowercase for that one single SMTP
9095 extension. Everything else is uppercase. I'm seeing a lack of love
9096 for that extension by Microsoft dudes...
9097 (smtp_mail): Use get_smtp_error_string.
9103 2001-01-16 Jeffrey Stedfast <fejj@ximian.com>
9105 * camel-folder-summary.c (camel_folder_summary_array): Add an int
9106 i so this code will compile. Should I be worried about how well
9107 this code will work? ;-)
9109 2001-01-17 Not Zed <NotZed@Ximian.com>
9111 * camel-folder.c (free_summary): Call
9112 camel_folder_summary_array_free() to do the work.
9113 (get_summary): Use camel_folder_summary_array() to get the array
9114 atomically. These fixes allow folder/test8 to work again, and fix
9115 a sort of race where the summary size can change while we were
9116 making a copy of it.
9118 * camel-folder-summary.c (camel_folder_summary_array): Get the
9119 summary array atomically, so it can't contain empty records.
9120 (camel_folder_summary_array_free): And free it.
9122 * tests/lib/camel-test.c (die): If we are verbose & in threads,
9123 then goto sleep so we can debug.
9125 * tests/folder/test8.c (worker): Add a missing pull() for
9128 * camel-filter-search.c: Fix the symbol table, so match-all is an
9129 immediate function, as it should be.
9131 * tests/folder/test9.c (main): New test, tests some filtering
9134 * tests/message/test3.c (main): Dont use a boundary string with
9135 spaces in it. Folding can corrupt it. Maybe the folding isn't
9136 working entirely right, but anyway.
9138 * camel-session.c: Debug out the debug.
9140 * camel-filter-driver.c (camel_filter_driver_filter_folder): Plug
9143 2001-01-16 Dan Winship <danw@ximian.com>
9145 Delayed loading of IMAP message parts.
9147 * camel-types.h: typedef CamelMessageInfo and
9148 CamelMessageContentInfo here
9150 * camel-folder-summary.h: Add a "size" field to
9151 CamelMessageContentInfo.
9153 * camel-folder-summary.c (camel_folder_summary_content_info_new,
9154 camel_folder_summary_content_info_free): Renamed and made
9155 non-static for providers that construct their own content info.
9156 (content_info_load, content_info_save): load/save size
9158 * camel-data-wrapper.c (camel_data_wrapper_is_offline): New
9159 function to return if a data wrapper's contents are "offline". (So
9160 that, for example, we don't make thumbnails of images that haven't
9161 been loaded off the IMAP server yet.) Defaults to FALSE.
9163 * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
9164 Fix a bug in re-selecting a folder when messages have been
9165 expunged from it by another client in the meantime.
9166 (imap_get_message): Rewrite. If the message is larger than a
9167 certain size, just create a skeleton message containing
9168 CamelImapWrappers that will read parts as needed. This way, large
9169 attachments only need to be downloaded if the user looks at them,
9170 and multipart/alternative alternatives that aren't used will never
9171 be downloaded at all.
9172 (imap_update_summary): Rewrite this a bunch too to make the
9173 parsing more robust.
9175 * providers/imap/camel-imap-summary.c
9176 (CAMEL_IMAP_SUMMARY_VERSION): bump.
9177 (camel_imap_summary_new): Set build_content to TRUE.
9178 (content_info_load, content_info_save): Only save/load the content
9179 for messages that have it. (The content info gets created as a
9180 side effect of imap_get_message.)
9182 * providers/imap/camel-imap-utils.c (imap_parse_body): New routine
9183 (and helpers) to parse an IMAP 'body' FETCH response and fill in a
9184 CamelMessageContentInfo from it.
9186 * providers/imap/Makefile.am (libcamelimap_la_SOURCES,
9187 libcamelimap_la_HEADERS): add camel-imap-wrapper.
9189 2001-01-16 Dan Winship <danw@ximian.com>
9191 * camel-tcp-stream-raw.c (stream_getsockopt, stream_setsockopt):
9192 * camel-stream-fs.c (stream_read, stream_write):
9193 * camel-remote-store.c (socket_connect): fcntl(fd, F_GETFL)
9194 returns the flags as the return value, not via a passed in
9195 pointer. And F_SETFL looks for an int, not a long, and you have to
9196 pass it what it's expecting because it's a va_arg parameter. (Yes,
9197 the man page lies on Linux. But check the UNIX98 spec or the glibc
9198 source.) Also, fix another bug in socket_connect: if we manage to
9199 connect right away, unset O_NONBLOCK so it doesn't mess us up
9202 Fixes a bunch of problems with non-blocking I/O being done in the
9203 allegedly-blocking case and then returning EWOULDBLOCK.
9205 2001-01-16 Chris Toshok <toshok@ximian.com>
9207 * providers/Makefile.am (NNTP_DIR): set to nntp if ENABLE_NNTP
9208 (SUBDIRS): use $(NNTP_DIR)
9210 2001-01-16 Jeffrey Stedfast <fejj@ximian.com>
9212 * providers/smtp/camel-smtp-transport.c (smtp_rcpt): Don't check
9213 errno as it's not being set. Fixes bug #1150.
9215 2001-01-16 Jeffrey Stedfast <fejj@ximian.com>
9217 Ugh, this design is ugly like my butt.
9219 * camel-session.c (camel_session_query_cert_authenticator): New
9220 function which will be useful when we integrate SSL.
9222 * camel-tcp-stream-ssl.c (ssl_auth_cert): Callback to authenticate
9224 (ssl_bad_cert): Callback that gets the reason the certificate is
9225 bad and then calls camel's cert-authenticator callback to notify
9226 the user and to allow the user to override the check.
9227 (stream_connect): Set the URL we expect to connect with and setup
9228 the auth_cert and bad_cert callbacks.
9229 (camel_tcp_stream_ssl_new): Now takes a CamelSession and a
9230 expected_host argument that it will use for certificate
9232 (camel_tcp_stream_ssl_finalize): Unref the session and free the
9235 2001-01-16 Not Zed <NotZed@Ximian.com>
9237 * camel-filter-search.c (header_exists): Changed to support
9238 multiple args (or'd together).
9239 (header_contains): Cleaned up to match the search code. Why did
9240 fejj change it? I'll never know.
9242 (header_starts_with):
9243 (header_ends_with): Big cleanup of fejj's "i'm the cut & paste
9244 king" code. Also properly handle or'ing of additional args to
9245 match what the folder-search code should do.
9246 (check_match): New function which does the annoying matching
9247 stuff (for header matches).
9248 (check_header): Similarly, handles or'ing of the matches together.
9251 (header_starts_with):
9252 (header_ends_with): Call check_header to do the actual work.
9253 (header_soundex): And here too.
9254 (match_all): Yeah like match-all isn't passed expression results,
9255 its passed expression terms. Fix this so match-all works like it
9256 should, by executing the contained expression.
9257 (message_body_contains): Copied directly from
9258 camel-folder-search.c, a more robust/faster/simpler body search
9260 (mime_part_matches): Removed entirely.
9261 (handle_multipart): Removed entirely.
9262 (build_match_regex): Copied from camel-folder-search. Builds a
9263 set of simple strings into a regex pattern that matches any of
9264 them (for faster & simpler matching). Expanded to accept regex
9265 patterns itself, so it can merge them together.
9266 (body_contains): Use build match/match message to match using a
9268 (body_regex): Likewise, this time we tell it we're building a
9270 (header_full_regex): Use build_match_regex to take the drudgery
9271 out of it, and expand it to handle multiple regex's at once.
9272 (get_full_header): slightly cleaner (well i dunno, the sprintf
9273 stuff just got to me).
9274 (header_regex): Cleaned up to use build_match_Regex too, and to
9275 properly check types.
9276 (filter_message_search): Just allocate 'fms' on the stack.
9278 * camel-filter-driver.c (camel_filter_driver_finalise):
9279 (camel_filter_driver_init):
9280 (camel_filter_driver_class_init):
9281 (camel_filter_driver_get_type): Changed from gtk object to camel
9283 (camel_filter_driver_add_rule): New function to add a rule to be
9284 processed in sexp form.
9285 (camel_filter_driver_init): Init the rules list.
9286 (camel_filter_driver_finalise): Clear the rules/rules list.
9287 (camel_filter_driver_filter_message): Scan rules list directly
9288 rather than creating on the fly.
9290 * Makefile.am (libcamelinclude_HEADERS): Added camel-filter-driver.h
9291 (libcamel_la_SOURCES): Added camel-filter-driver.c, code taken
9292 from filter-driver, which can drive, uh, filters based on sexp's.
9293 (libcamelinclude_HEADERS):
9294 (libcamel_la_SOURCES): Added camel-filter-search.[ch]
9296 * camel-folder-summary.c (camel_folder_summary_decode_string):
9297 Chganged len back to be unsigned. And do a simple range check on
9298 the string value to try and detect corrupted summary files.
9300 * providers/imap/camel-imap-command.c (imap_read_untagged): Handle
9301 cancelled stream reads with an appropriate exception.
9303 * providers/imap/camel-imap-private.h: Fix the include-once
9304 macro. Doh, confliced with camel-private.h.
9306 * providers/imap/camel-imap-store.c (imap_store_refresh_folders):
9307 A copy of camel_remote_store_refresh_folders. We avoid locking
9308 each folder when we call it though. This should be removed when i
9309 can work out how to remove the folder lock from this function
9312 * camel-stream-fs.c (stream_write): Fix n' argument of select.
9313 (stream_read): Likewise.
9315 * camel-remote-store.c (socket_connect): Bump the connect timeout
9317 (socket_connect): Oops, fix the 'n' argument of select.
9319 * camel-session.c (camel_cancel_cancel): If we are given no
9320 cancellation node, then do it for all active ones.
9322 2001-01-15 Jeffrey Stedfast <fejj@ximian.com>
9324 * camel-stream-fs.c (stream_close): If the close() is successful,
9327 * camel-tcp-stream-raw.c: Removed the disconnect() method.
9328 (stream_close): If the close() is successful, set the sockfd to
9331 * camel-tcp-stream-ssl.c: Removed the disconnect() method.
9332 (stream_close): If the close() is successful, set the sockfd to
9335 * camel-tcp-stream.c (camel_tcp_stream_disconnect): Removed,
9336 easier to just use the close() method as it did the same thing
9339 2001-01-15 Jeffrey Stedfast <fejj@ximian.com>
9341 * camel-tcp-stream-raw.c (stream_getsockopt): Updated to be able
9342 to get the CAMEL_SOCKOPT_NONBLOCKING socket opt.
9343 (stream_setsockopt): Updated to be able to set the
9344 CAMEL_SOCKOPT_NONBLOCKING socket opt.
9346 2001-01-15 Peter Williams <peterw@ximian.com>
9348 * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Lock
9349 around the imap_rescan, which needs it.
9351 2001-01-15 Not Zed <NotZed@Ximian.com>
9353 * camel-remote-store.c (socket_connect): A cancellable connection
9355 (remote_send_string): Return cancelled exception if we were.
9356 (remote_send_stream): "
9357 (remote_recv_line): "
9359 * camel-stream-fs.c (stream_read): First cut at cancellation
9360 stuff. Its looking a bit ugly.
9362 2001-01-15 Jeffrey Stedfast <fejj@ximian.com>
9364 * camel-tcp-stream-ssl.c (stream_connect): Uses an SSL socket now
9365 although there's still a few things missing (like certificate
9368 * camel.c (camel_ssl_init): A replacement function for
9369 camel_init() that also initializes SSL.
9371 2001-01-14 Jeffrey Stedfast <fejj@ximian.com>
9373 * camel-tcp-stream-ssl.c (stream_getsockopt): Implemented.
9374 (stream_setsockopt): Implemented.
9376 * camel-tcp-stream-raw.c (stream_getsockopt): Implemented.
9377 (stream_setsockopt): Implemented.
9379 * camel-tcp-stream.c (camel_tcp_stream_getsockopt): New method.
9380 (camel_tcp_stream_setsockopt): Another new method. I think you get
9381 the idea of what these are for so I won't explain them.
9383 2001-01-14 Jeffrey Stedfast <fejj@helixcode.com>
9385 * camel-tcp-stream-ssl.[c,h]: New CamelTcpStream class that
9386 implements nspr sockets and eventually will use nss for
9387 SSL/TLS. Currently doesn't do any SSL/TLS but it should still
9388 work. It's functionally equivalent to CamelTcpStreamRaw at the
9389 moment only it uses nspr i/o.
9391 * camel-tcp-stream-raw.[c,h]: New CamelTcpStream class that
9392 implements native sockets. Should be usable but may have some bugs
9395 2001-01-13 Jeffrey Stedfast <fejj@ximian.com>
9397 * camel-tcp-stream.[c,h]: New abstract class for TCP streams. The
9398 next step is to write child classes (CamelTcpStreamBSD and
9399 CamelTcpStreamSSL). The BSD stream will use normal BSD sockets
9400 while SSL will use Mozilla's NSPR and NSS libraries to do Secure
9401 Socket Layers which wille ventually replace CamelStreamSSL which I
9402 just commit'd. Oh well.
9404 2001-01-13 Jeffrey Stedfast <fejj@ximian.com>
9406 * camel-stream-ssl.[c,h]: New stream for handling SSL/TLS
9409 2001-01-12 Not Zed <NotZed@Ximian.com>
9411 * camel-folder-thread.c (camel_folder_thread_messages_new):
9412 Perform a final pass, removing any pseudo nodes we added earlier.
9413 Quick patch to test the idea.
9414 (camel_folder_thread_messages_new): Added casts to rmeove some
9415 warnings for the analites out there.
9417 2001-01-11 Dan Winship <danw@ximian.com>
9419 * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
9420 Fix a bug in previous commit: don't check for deleted messages if
9421 there are no known messages in the folder (because it would end up
9422 sending "FETCH 0 ...").
9423 (imap_copy_message_to): Fix this up: sync flags to the server
9424 before copying so that they end up correct in the remote folder.
9425 And poke the destination folder after doing the copy so it notices
9426 the new message right away.
9427 (imap_move_message_to): Call imap_copy_message_to for most of the
9428 work rather than duplicating the code (since it's much more
9431 2001-01-11 Dan Winship <danw@ximian.com>
9433 * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
9434 New function to check for added/deleted messages when re-selecting
9436 (imap_refresh_info, imap_rescan, imap_update_summary): Various
9437 locking tweaks that turn out to be irrelevant since command_lock
9438 is recursive, but whatever.
9440 * providers/imap/camel-imap-command.c (camel_imap_command): When
9441 selecting a new folder, call camel_imap_folder_selected on it.
9443 * camel-folder.c (camel_folder_copy_message_to): Fix a locking
9444 problem. (One branch of an if statement was returning with the
9445 lock still locked.) Also remove the deprecation comments, to match
9448 2001-01-10 Jeffrey Stedfast <fejj@helixcode.com>
9450 * providers/local/camel-local-provider.c: Changed the descriptions
9451 for mh, mbox, and maildir to be more "user-friendly".
9453 2001-01-10 Dan Winship <danw@helixcode.com>
9455 * providers/imap/camel-imap-types.h: New header to prevent
9456 recursive #include problems
9458 * providers/imap/*.h: Replace some #includes with #include
9459 "camel-imap-types.h", remove typedefs that were moved to
9462 * providers/imap/*.c: Add #includes to make up for #includes
9463 removed from .h files
9465 * providers/imap/Makefile.am (libcamelimapinclude_HEADERS): Add
9468 2001-01-10 Dan Winship <danw@helixcode.com>
9470 * camel-store.c (camel_store_sync): New class function, parallel
9471 to camel_folder_sync. (The default implementation just calls
9472 camel_folder_sync on each cached folder.)
9474 * providers/imap/camel-imap-store.c (get_folder_info): Call
9475 camel_store_sync before doing anything else so that the IMAP
9476 server and Camel are working from the same data. Don't ask the
9477 server for the unread message count of the current folder, since
9478 UW will return often-incorrect cached data, and we can calculate
9479 it without talking to the server anyway.
9481 2001-01-09 Dan Winship <danw@helixcode.com>
9483 Mostly IMAP changes. Use the NAMESPACE extension (where
9484 available). Deal with servers that don't return LIST flags in
9485 response to LSUB (like UW) to get rid of the "not a selectable
9486 folder" error messages in the UI. Take advantage of the \Marked
9487 and \Unmarked flags to try to speed up the folder scan by not
9488 doing STATUS on unmarked folders. Some further tweaks on the shape
9489 of the resulting folder tree in various situations...
9491 * camel-store.h: Remove the (read) message_count, since nothing
9492 uses it, and we can speed up IMAP a bit this way.
9494 * camel-store.c (camel_folder_info_build): Redo this a bit to make
9495 it more useful for IMAP since that's the only thing that uses it.
9497 * camel-remote-store.c (camel_remote_store_connected): Public
9498 function to check if the store is connected, and try to connect it
9500 (remote_send_string, remote_send_stream, remote_recv_line): Use
9503 * providers/imap/camel-imap-store.c (camel_imap_store_finalize):
9505 (camel_imap_store_init): Initialize subscribed_folders to NULL
9506 rather than an empty hash table.
9507 (imap_connect): Get the list of subscribed folders here. If the
9508 server doesn't claim that any of them are either Marked or
9509 Unmarked, then assume that it doesn't do that for LSUB and
9510 remember that for later. If the server supports the NAMESPACE
9511 extension and the user didn't specify a namespace, use the
9512 server-provided one.
9513 (imap_disconnect): Free the list of subscribed folders, and the
9515 (get_folder): check camel_remote_store_connected
9516 (get_folder_info): check camel_remote_store_connected. Add a bunch
9517 of new cleverness. If we learned that the server doesn't do LSUB
9518 usefully, do a bunch of LISTs by hand. Then, if we're getting
9519 unread counts, only do it for folders that weren't listed as
9520 Unmarked. Also, deal with namespaces that end with the separator
9521 character, and update for changes to camel_folder_info_build.
9522 (folder_subscribed): Add a g_return_val_if_fail.
9523 (subscribe_folder, unsubscribe_folder): check
9524 camel_remote_store_connected.
9526 * providers/nntp/camel-nntp-store.c (build_folder_info,
9527 build_folder_info_from_grouplist, nntp_store_get_folder_info):
9528 Don't fill in message_count since it doesn't exist any more.
9530 2001-01-09 Dan Winship <danw@helixcode.com>
9532 Kill off a long-hated Camel kludge: "empty" URLs and
9533 query_auth_types_generic.
9535 * camel-url.c: Remove "empty" from CamelURL.
9536 (camel_url_new): No longer set it.
9537 (camel_url_to_string): Treat "" as equivalent to NULL for
9538 authmech. (Unrelated change, but it simplifies some stuff with the
9541 * camel-service.c (camel_service_new): Remove url->empty check: if
9542 the URL isn't valid, we don't create the service.
9543 (camel_service_query_auth_types): No longer need to switch between
9544 generic and connected variants.
9546 * providers/smtp/camel-smtp-transport.c (query_auth_types):
9547 * providers/pop3/camel-pop3-store.c (query_auth_types):
9548 * providers/nntp/camel-nntp-store.c (nntp_store_query_auth_types):
9549 * providers/imap/camel-imap-store.c (query_auth_types):
9550 * camel-remote-store.c (remote_query_auth_types): Remove generic
9551 version, rename connected version.
9553 2001-01-06 Not Zed <NotZed@HelixCode.com>
9555 * providers/vee/camel-vee-folder.c (vee_folder_build_folder): Dont
9556 try and unref a messageinfo that wasn't there, and use the right
9557 free function too. Modified patch from Iain.
9558 (vee_move_message_to): New method, call the real folders'
9559 move_message_to method.
9561 2001-01-04 JP Rosevear <jpr@helixcode.com>
9563 * tests/lib/Makefile.am: fix includes for compilation
9565 * tests/message/Makefile.am: Build test3 again
9567 * tests/message/test2.c: Kill warnings with header includes
9569 * tests/message/test3.c: ditto
9571 * tests/lib/streams.c: ditto
9573 * tests/lib/camel-test.c: ditto
9575 * tests/lib/messages.c: ditto
9577 * tests/lib/folders.c: ditto
9579 2001-01-04 Dan Winship <danw@helixcode.com>
9581 * providers/imap/camel-imap-folder.c (imap_rescan): Fix two
9582 problems in figuring out server-expunged messages.
9584 2001-01-04 Not Zed <NotZed@HelixCode.com>
9586 * camel-folder.c (thaw): If we have a lot of messages changed,
9587 promote it to a folder changed event.
9589 2000-01-03 Jeffrey Stedfast <fejj@helixcode.com>
9591 * camel-folder-search.c (search_header_matches): Implemented.
9592 (search_header_exists): Implemented.
9593 (search_header_starts_with): Implemented.
9594 (search_header_ends_with): Implemented.
9596 2001-01-03 Christopher James Lahey <clahey@helixcode.com>
9598 * providers/imap/camel-imap-folder.c (camel_imap_folder_new):
9599 Initialize the exists variable so that we don't do random things
9600 if the imap server misbehaves.
9602 2000-12-29 Not Zed <NotZed@HelixCode.com>
9604 * camel-folder.c (camel_folder_move_message_to): REmove warning,
9605 this isn't really deprecated, sigh.
9607 * camel-mime-utils.c (header_fold): Comment out some debug.
9609 2001-01-02 Christopher James Lahey <clahey@helixcode.com>
9611 * providers/maildir/, providers/mbox/, providers/mh/: Removed
9612 these directories since they're unused.
9614 2001-01-02 Dan Winship <danw@helixcode.com>
9618 * providers/imap/camel-imap-stream.[ch]: Remove. To be replaced.
9620 * providers/imap/Makefile.am (libcamelimapinclude_HEADERS): Remove
9623 * providers/imap/camel-imap-utils.c (imap_parse_flag_list): Take a
9624 char ** instead of char *, to return the position at the end of
9625 parsing like the string parsing functions.
9626 (imap_parse_string_generic): New function to parse a string,
9627 nstring, or astring.
9628 (imap_parse_nstring, imap_parse_astring): Now macros
9629 (imap_parse_string): Added
9631 * providers/imap/camel-imap-folder.h: Remove the "exists" field
9632 from CamelImapFolder.
9634 * providers/imap/camel-imap-folder.c: Remove unused include of
9635 camel-imap-stream.h.
9636 (camel_imap_folder_init): Remove no-longer-relevant summary
9638 (camel_imap_folder_new): Update for imap_parse_flag_list change,
9639 exists removal, and imap_rescan.
9640 (imap_rescan): New function that does most of the work of the old
9641 imap_refresh_info, but taking "exists" as an argument instead of
9642 getting it from the folder. Also calls camel_imap_folder_changed
9643 to do the summary updating and signalling, rather than duplicating
9645 (imap_refresh_info): Just call imap_rescan (using the size of the
9646 folder summary as "exists").
9647 (imap_update_summary): Update for imap_parse_flag_list change
9648 (camel_imap_folder_changed): Update for "exists" change.
9650 2001-01-02 Dan Winship <danw@helixcode.com>
9652 * camel-mime-utils.c (header_content_type_simple): New function to
9653 return just foo/bar with no parameters.
9655 * camel-data-wrapper.c (get_mime_type): Use
9656 header_content_type_simple rather than header_content_type_format.
9658 2000-12-28 Dan Winship <danw@helixcode.com>
9660 * gmime-content-field.[ch]: Remove this. It was only a thin
9661 wrapper around struct _header_content_type anyway, and didn't
9662 match the naming scheme of anything else.
9664 * Makefile.am: Remove gmime-content-field.[ch]
9666 * camel.h: Remove gmime-content-field.h
9668 * camel-types.h: Add CamelContentType as a typedef for struct
9669 _header_content_type (especially for use outside of camel).
9671 * camel-multipart.c:
9672 * camel-mime-part.c:
9673 * camel-mime-message.c:
9674 * camel-folder-summary.c:
9675 * camel-folder-search.c:
9676 * camel-data-wrapper.[ch]: Use CamelContentType and
9677 header_content_type_* functions rather than the GMime stuff.
9679 * camel-mime-part-utils.c:
9680 * camel-medium.c: Remove unused gmime-content-field.h include.
9682 2000-12-27 Dan Winship <danw@helixcode.com>
9684 * providers/pop3/camel-pop3-store.c (connect_to_server): Fix the
9685 APOP check to not crash on servers that don't return any
9686 information on the +OK greeting line.
9688 2000-12-24 Not Zed <NotZed@HelixCode.com>
9690 * providers/imap/camel-imap-search.c (imap_body_contains): Lock
9691 the command channel while searching.
9692 (imap_body_contains): If performing a whole uid search, then add
9693 references to our own summary items, dont look it up in the
9694 folder. This way they can't vanish unexpectedly.
9696 * providers/imap/camel-imap-folder.h (CamelImapFolder): Added a
9698 (CamelImapFolder): Removed summary again from here.
9700 * providers/imap/camel-imap-private.h: Added lock for imap
9703 * Merge from camel-mt-branch.
9705 * providers/imap/camel-imap-folder.c (imap_update_summary): Merge
9706 fix, use the folder->summary.
9707 (imap_get_message_flags, imap_set_message_flags,
9708 imap_get_message_user_flag, imap_set_message_user_flag): Removed
9710 (camel_imap_folder_init): Setup private data/lock.
9711 (imap_finalize): Free private data/search lock.
9712 (imap_search_free): Lock the search_lock.
9713 (imap_search_by_expression): Lock the search lock when using the
9714 search object. Also copy/ref hte summary, rather than getting it
9716 (imap_refresh_info): Free any info lookups. Use folder->summary
9717 not imap_folder->summary. And lock around commands.
9718 (camel_imap_folder_changed): Use folder->summary again.
9719 (camel_imap_folder_changed): Make sure we unref the summary lookup.
9721 2000-12-22 Dan Winship <danw@helixcode.com>
9723 * providers/imap/camel-imap-store.c (get_folder_info): When
9724 getting the top-level folder list, include INBOX even if it's not
9725 subscribed. Don't show subscribed folders outside of the given
9726 namespace. Do a better job of pruning the namespace from the
9727 returned folder tree.
9729 2000-12-21 Dan Winship <danw@helixcode.com>
9731 * providers/imap/camel-imap-search.c: New CamelFolderSearch
9732 subclass that just reimplements body_contains (using the IMAP
9733 SEARCH command). All other kinds of searching are done against the
9736 * providers/imap/camel-imap-folder.c (imap_search_by_expression):
9737 Use a CamelImapSearch to do searching.
9739 * providers/imap/camel-imap-utils.c (imap_translate_sexp, etc): No
9742 * camel-folder-search.h: Add missing CAMEL_FOLDER_SEARCH_TYPE
9745 2000-12-21 Dan Winship <danw@helixcode.com>
9747 * camel-stream-buffer.c (camel_stream_buffer_gets): Update the
9748 doc comment: since it always NUL-terminates the buffer, it reads
9749 at most @max-1 bytes, not @max.
9751 * camel-remote-store.c (remote_recv_line): Fix the "did
9752 camel_stream_buffer_gets fill the whole buffer" check. Fixes a bug
9753 when reading lines longer than 1024 characters (eg, IMAP SEARCH
9754 responses in very large folders).
9756 2000-12-19 Dan Winship <danw@helixcode.com>
9758 * providers/imap/camel-imap-folder.c (imap_refresh_info): Oops.
9759 Don't do "FETCH 1:0" when the folder is empty.
9760 (imap_protocol_get_summary_specifier): Request RFC822.SIZE too.
9761 (imap_update_summary): Parse RFC822.SIZE and add it to the
9764 2000-12-18 Dan Winship <danw@helixcode.com>
9766 * providers/imap/camel-imap-summary.c: Add "guint32 server_flags"
9767 to CamelImapMessageInfo to keep track of the last known message
9768 flag state on the server.
9769 (message_info_save, message_info_load): Save/load the
9772 * providers/imap/camel-imap-folder.c: Make this use
9773 CamelFolderChangeInfo and emit folder_changed notifications as it
9774 gets them rather than only on refresh_info.
9775 (imap_refresh_info): Notice flags that get cleared on the server
9776 as well as flags that get set.
9777 (imap_update_summary): Remove a comment that never actually
9778 applied to the committed code.
9780 2000-12-15 Dan Winship <danw@helixcode.com>
9782 * providers/imap/camel-imap-command.c (camel_imap_command): Change
9783 the semantics of fmt: Now %S (capital S) means an IMAP "string",
9784 (which can be sent as either a quoted string or a literal). If
9785 the server supports LITERAL+, these will be sent as extended
9786 literals (which don't require any special escaping). Otherwise
9787 they'll be sent as quoted strings (and it now properly deals with
9788 " or \ in the string).
9789 (imap_command_strdup_vprintf): Utility routine that does the real
9790 work for the functionality mentioned above.
9792 * providers/imap/camel-imap-utils.c (imap_quote_string): Turns a
9793 string into a proper IMAP "quoted string".
9795 * providers/imap/camel-imap-store.c:
9796 * providers/imap/camel-imap-folder.c: Use %S instead of "%s" where
9799 2000-12-22 Not Zed <NotZed@HelixCode.com>
9801 * camel-folder-summary.c (GLOBAL_INFO_UNLOCK): Doh, cut and paste
9802 victim again, call unlock instead of lock!
9803 (summary_assign_uid): Unlock around trying to get a new uid, if we
9806 2000-12-21 Not Zed <NotZed@HelixCode.com>
9808 * tests/folder/Makefile.am (TESTS): reenabled the tests here.
9810 * providers/nntp/camel-nntp-newsrc.c (CamelNNTPNewsrc): Add a
9811 lock. Made completely mt-safe. Sigh, this is all so i can
9812 support snooping of the set_flags stuff inside camel-nntp-folder,
9813 since i've removed the global folder lock from all of the other
9814 folder summary operations.
9815 (camel_nntp_newsrc_read_for_server): Setup lock.
9816 (camel_nntp_newsrc_get_highest_article_read): Lock internal access.
9817 (camel_nntp_newsrc_get_num_articles_read):
9818 (camel_nntp_newsrc_mark_article_read):
9819 (camel_nntp_newsrc_mark_range_read):
9820 (camel_nntp_newsrc_article_is_read):
9821 (camel_nntp_newsrc_group_is_subscribed):
9822 (camel_nntp_newsrc_unsubscribe_group):
9823 (camel_nntp_newsrc_subscribe_group):
9824 (camel_nntp_newsrc_get_subscribed_group_names):
9825 (camel_nntp_newsrc_get_all_group_names): "
9826 (camel_nntp_newsrc_write_to_file): Lock internal accesses.
9827 (camel_nntp_newsrc_write): Lock around diry stuff.
9829 * providers/local/camel-maildir-summary.c (maildir_summary_check):
9830 Lock around our internal poking of the summary hashtable/array.
9831 (maildir_summary_sync): And the same here too.
9833 * camel-folder-summary.c: Moved the summaryprivate data into
9834 camel-private.h. Only needed for the locks really.
9835 (camel_folder_summary_init): Setup locks.
9836 (camel_folder_summary_set_filename): Lock.
9837 (camel_folder_summary_index): lock
9838 (camel_folder_summary_uid): Lock
9839 (camel_folder_summary_next_uid): "
9840 (camel_folder_summary_set_uid): "
9841 (camel_folder_summary_load): Lock around whole load. Hrm,
9842 probably not required.
9843 (camel_folder_summary_save): Lock around whole save, this is
9844 reqwuired, unless we ref/copy the whole list first, and i couldn't
9846 (camel_folder_summary_add): lock
9847 (summary_assign_uid): Lock around internal accesses.
9848 (camel_folder_summary_info_new_from_parser): Lock around filtr stuff.
9849 (camel_folder_summary_info_ref): Add locking. Could probably use
9851 (camel_folder_summary_touch): Add locking, likewise.
9852 (camel_folder_summary_clear): Lock. If the preiovus two are
9853 changed, then so this will need mroe locking.
9854 (camel_folder_summary_info_free): Lock around refcounting.
9855 (camel_folder_summary_remove): Locking.
9856 (camel_folder_summary_remove_uid): Lock ref, unlock, unref. Also
9857 fixed a bug that would have made this never work, freeing the key,
9858 which isn't allocated.
9859 (camel_folder_summary_remove_index): lock, ref, unlock unref also.
9860 (camel_message_info_ref): Lock using a separate global lock, since
9861 we have no context here.
9862 (camel_message_info_free): Here too.
9863 (content_info_alloc): Use an alocation lock here. avoids races
9864 with setting up content_info_chunks, etc.
9865 (camel_folder_summary_info_new): And here too.
9866 (camel_folder_summary_load): Changed to use a differnet lock for
9868 (camel_folder_summary_init): Doh, i do need a reflock afterall,
9870 (camel_folder_summary_finalize): Free it.
9871 (camel_folder_summary_index): Add a reflock.
9872 (camel_folder_summary_uid): And here too.
9873 (camel_folder_summary_info_free): Use reflock instead of
9875 (camel_folder_summary_info_ref): Likewise.
9876 (camel_folder_summary_remove_uid): Add reflocking.
9877 (camel_folder_summary_remove_index): And here too.
9879 * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Setup a
9881 (vee_folder_build): Build each item into the real summary object.
9882 (vee_folder_add, vee_folder_add_uid, vee_folder_add_change): New
9883 functions to add a single record to the vfolder summary.
9884 (vee_folder_build_folder): Use a real summary.
9885 (vee_get_uids): Removed, use default impl.
9886 (vee_free_message_info): "
9887 (vee_get_message_info): "
9888 (vee_get_summary): "
9889 (vee_get_unread_message_count): "
9890 (vee_get_message_count): "
9891 (vee_sync): Make vee-folder-sync sync all subordinate folders.
9892 Well i dont think this is right, but enough peopl ehave aksed for
9894 (vee_expunge): Same for expunge.
9895 (vee_set_message_flags): Call parent class, then mirror flags to
9897 (vee_get_message_user_flag): Removed, we just use the default
9898 impl, and our flags should always match.
9899 (vee_set_message_user_flag): Snoop the set and set on subfolder.
9900 (vee_get_message_flags): Removed, jsut use parent impl, assume our
9901 copy matches the real ones.
9902 (get_real_message): Removed. We sort ofneed to keep the
9903 summaryitem refed while we use it, so this doesn't make as much
9904 sense as it did once.
9905 (camel_vee_folder_finalise): Unhook listening events as we unref
9907 (camel_vee_folder_new): Set the summary messageinfo data size
9909 (vfolder_remove_match): Fixed for summary change.
9910 (folder_changed): ditto. Also stopped changed items from being
9911 re-searched and possibly removed. Might have to resort to the old
9912 whole-search idea again.
9913 (message_changed): Similarly. Might be easier just not to bother
9914 with a whole search.
9916 * providers/vee/camel-vee-folder.h: Removes summary
9917 hashtable/array, and use a real summary object. Sigh, more work.
9919 * providers/nntp/camel-nntp-folder.c (nntp_folder_sync): Move
9920 summary to folder object.
9921 (nntp_folder_get_message_count): Removed, use default impl.
9922 (nntp_folder_set_message_flags): Call parent impl to do the work,
9923 but snoop for newsrc.
9924 (nntp_folder_get_uids): Removed, use default impl.
9925 (nntp_folder_get_summary): "
9926 (nntp_folder_get_message_info): "
9927 (nntp_folder_free_message_info): "
9928 (camel_nntp_folder_new): moved summary to folder class
9930 * providers/imap/camel-imap-folder.c (camel_imap_folder_init):
9931 Move summary to folder object.
9932 (camel_imap_folder_new): "
9933 (imap_finalize): No longer unref the summary (or infact, do
9934 anything else either).
9935 (imap_refresh_info): move summary to folder object.
9937 (imap_get_message_count): Removed, use default impl.
9938 (imap_get_unread_message_count): "
9940 (imap_get_summary): "
9941 (imap_free_summary): "
9942 (imap_get_message_info): "
9943 (imap_free_message_info): "
9944 (imap_get_message_flags): "
9945 (imap_set_message_flags): "
9946 (imap_get_message_user_flag): ", this changes functionality, but
9947 only by providing non-permanent flags.
9948 (imap_set_message_user_flag): "
9949 (imap_update_summary): move summary to folder object, and use
9950 camel_folder_summary_info_new_from_header, instead of calling the
9951 virtual function directly.
9953 * providers/local/camel-maildir-folder.c (maildir_append_message):
9954 move summary to folder object, again.
9955 (maildir_get_message): "
9957 * providers/local/camel-mh-folder.c (mh_append_message): move
9958 summary to folder object.
9961 * providers/local/camel-mbox-folder.c (mbox_append_message): Move
9962 summary to folder object
9963 (mbox_get_message): "
9964 (mbox_set_message_user_flag): We need our own copy of this, sigh,
9965 so we can track if the xev needs a rewrite (probably, its only a
9967 (mbox_set_message_user_tag): Same same with this one.
9968 (camel_mbox_folder_class_init): Link in these new virtual functions.
9970 * providers/local/camel-local-folder.h (CamelLocalFolder): removed
9973 * providers/local/camel-local-folder.c (local_get_message_count):
9974 (local_get_unread_message_count):
9976 (local_get_summary):
9977 (local_free_summary):
9978 (local_get_message_info):
9979 (local_free_message_info):
9980 (local_get_message_flags):
9981 (local_set_message_flags):
9982 (local_get_message_user_flag):
9983 (local_set_message_user_flag):
9984 (local_get_message_user_tag):
9985 (local_set_message_user_tag): Removed, all now use default
9987 (camel_local_folder_class_init): Removed overrides.
9988 (local_init): Clear folder->summary.
9989 (local_finalize): move summary to folder.
9990 (camel_local_folder_construct): "
9993 * camel-folder.c (free_summary): Provide a real impl.
9997 (free_message_info): "
9998 (get_message_info): "
9999 (set_message_user_tag): "
10000 (get_message_user_tag): "
10001 (set_message_user_flag): "
10002 (get_message_user_flag): " Sigh, the last so far.
10003 (get_message_flags): Sigh, 1 more afterall.
10004 (get_unread_message_count): And and this.
10005 (get_message_count): and this!
10006 (set_message_flags): Sigh, and this.
10007 (camel_folder_finalize): Unref the summary if we have it.
10008 (camel_folder_free_uids): Remove locking.
10009 (camel_folder_get_message_flags): Remove locks, since the summary
10011 (camel_folder_set_message_flags): "
10012 (camel_folder_get_message_user_flag): "
10013 (camel_folder_set_message_user_flag): "
10014 (camel_folder_get_message_user_tag): "
10015 (camel_folder_set_message_user_tag): "
10016 (camel_folder_get_message_info): "
10017 (camel_folder_free_message_info): "
10018 (camel_folder_get_uids): "
10019 (camel_folder_free_summary): "
10020 (camel_folder_get_unread_message_count): "
10021 (get_unread_message_count): Check we got info, no big deal, but
10022 the summary might change while we're counting, and upset the count
10024 (camel_folder_get_message_count): Remove locks.
10026 * camel-folder.h (struct _CamelFolder): Added CamelFolderSummary
10027 to the base folder object. Sigh, this is going to be a lot of
10030 * camel-service.c (camel_service_init, finalise): changed
10031 connect_lock to be recursive e_mutex.
10033 * camel-remote-store.c (camel_remote_store_init, finalise): Changed
10034 stream_lock to recursive e_mutex.
10036 * camel-private.h (RemoteStorePrivate, ServicePrivate): Use
10037 recursive mutexes for connect_lock & stream_lock. Ick. Because
10040 * providers/imap/camel-imap-private.h: Change the command_lock to
10043 * providers/imap/camel-imap-store.c (connect_to_server): Removed
10044 the command_lock stuff. If we are just connected again, it should
10045 be safe to assume we have exclusive access at this point without
10046 it (and yes, removes a deadlock).
10047 (imap_create): Remove a lock that wasn't even supposed to be
10049 (camel_imap_store_finalize, init): g_mutex->e_mutex(E_MUTEX_REC).
10050 Use a recursive mutex since the imap code is multiply recursivly
10051 calling some functions (sigh, it would be nice to fix this).
10053 2000-12-20 Not Zed <NotZed@HelixCode.com>
10055 * camel-folder.c (folder_changed): Change the locks to inside the
10056 if. Stops a deadloc,k and we dont need a lock to read a value.
10057 (message_changed): Likewise.
10059 * camel.c (camel_init): Blah, comment out g_thread_init, leave it
10060 to the caller, since it can only ever be done once.
10062 * camel-folder-thread.c (camel_folder_thread_messages_new): Ref
10063 and save the folder in the thread return. Also get the summary
10064 once, and access that for the messageinfo's. Added bonus that now
10065 threads should come out in a similar order. We need to do this so
10066 that the messageinfo's dont get unref'd under us, and using the
10067 summary directly simplifies memory management.
10068 (camel_folder_thread_messages_destroy): Free the summary/unref the
10071 * camel-folder-thread.h: Add a folder to CamelFolderThread struct.
10073 2000-12-19 Not Zed <NotZed@HelixCode.com>
10075 * providers/imap/camel-imap-utils.c (imap_translate_sexp): Unref
10076 using e_sexp_unref, since it is no longer an object.
10078 * tests/lib/camel-test.c: Added a global lock, and made it
10081 * camel-exception.c: Add a global lock. Not sure its really
10082 needed here, but it doesn't really hurt.
10083 (camel_exception_clear): Lock around access.
10084 (camel_exception_set): Same.
10085 (camel_exception_setv): "
10086 (camel_exception_xfer): "
10088 * providers/local/Makefile.am (noinst_HEADERS): Added, for
10089 camel-local-private.h
10091 * camel-folder.c (camel_folder_search_by_expression): Removed
10092 locking here, now upto the implementing class to lock.
10093 (camel_folder_search_free): Removed the folder lock here too, for
10094 consistency really, and the locking probably wasn't needed.
10096 * providers/local/camel-local-folder.c (local_get_summary):
10097 Changed to copy/ref the summary items.
10098 (local_free_summary): Unref the summary items/free the array.
10099 (local_get_unread_message_count): Free info lookups.
10100 (local_search_by_expression): Perform more fine-grained locking,
10101 and dont lock the whole folder while searching, just the search
10102 object. Dum de dum, it *would* be possible to not even have to
10103 lock the search, by using our own copy of the search object each
10104 time. Could be investigated.
10105 (local_init): Init priaate data/lock.
10106 (local_finalize): Free private data/lock.
10107 (local_search_free): Also lock around the search object, because
10108 it accesses global data inside.
10110 * README.mt: Some info about the mt code development.
10112 * camel-folder-search.c (match_message): Put in a warning, this
10113 plain deadlocks so far, but i'm going to bed now.
10114 (camel_folder_search_finalize): Use e_sexp_unref() since its no
10117 * camel-session.c (camel_session_init): Init private data/lock.
10118 (camel_session_finalise): Free private data/lock.
10119 (camel_session_register_provider): Lock hash insert.
10120 (service_cache_remove): Lock.
10121 (camel_session_list_providers): "
10122 (camel_session_get_service): Lock the whole function.
10124 * camel-session.h (struct _CamelSession): Added private data.
10126 * providers/imap/camel-imap-store.c (camel_imap_store_init): Setup
10128 (camel_imap_store_finalize): Free private data.
10129 (connect_to_server): Lock around command calls. I dont think its
10130 needed, but it shouldn't hurt either.
10131 (imap_connect): Lock around command calls. Again, I don think it
10132 is needed, but wont hurt.
10133 (imap_disconnect): ditto for this one.
10134 (imap_create): Lock around command.
10136 (get_folder_info): "
10137 (subscribe_folder): "
10138 (unsubscribe_folder): "
10139 (imap_keepalive): "
10141 * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Lock
10142 around calling a command.
10143 (imap_refresh_info): Likewise.
10145 (imap_append_message): "
10146 (imap_copy_message_to): "
10147 (imap_move_message_to): "
10148 (imap_get_message): "
10149 (imap_update_summary): "
10150 (imap_search_by_expression): ", also minor logic cleanup.
10151 (imap_get_summary): Copy/ref the summary items.
10152 (imap_free_summary): And free it now too.
10154 * providers/imap/camel-imap-auth.c (imap_try_kerberos_v4_auth):
10155 Lock the command stream for the command session.
10157 * providers/imap/camel-imap-private.h: Private (locking info)
10158 stuff for imap provider.
10159 (CAMEL_IMAP_STORE_UNLOCK): Fix to call unlock, rather than lock!
10161 * camel-service.c (camel_service_query_auth_types): Lock also for
10162 the connection here, incase the service needs to connect.
10164 * camel-remote-store.c (camel_remote_store_init): Init private
10166 (camel_remote_store_finalise): Readded, free private data/lock.
10167 (remote_send_stream): Changed to return the number of bytes
10168 written, like a good little stream function should.
10169 (camel_remote_store_send_string): Lock for stream access.
10170 (camel_remote_store_send_stream): Same here.
10171 (camel_remote_store_recv_line): And here.
10172 (camel_remote_store_refresh_folders): Lock the store for cache
10174 (timeout_cb): Lock for stream access.
10176 2000-12-18 Not Zed <NotZed@HelixCode.com>
10178 * camel-service.c (camel_service_init): Init private data.
10179 (camel_service_finalise): Free private data.
10180 (camel_service_connect): Lock around connection access.
10181 (camel_service_disconnect): "
10183 * camel-service.h (struct _CamelService): Added private field.
10185 * camel-store.c (camel_store_init): Init private data/lock.
10186 (camel_store_finalize): Free private data/lock.
10187 (camel_store_get_folder): Lock internal calls.
10188 (camel_store_delete_folder): "
10189 (camel_store_rename_folder): "
10190 (camel_store_get_root_folder): "
10191 (camel_store_get_default_folder): "
10192 (camel_store_get_folder_info): "
10193 (camel_store_folder_subscribed): "
10194 (camel_store_subscribe_folder): "
10195 (camel_store_unsubscribe_folder): "
10196 (lookup_folder): Lock accesses to the folder cache.
10198 (uncache_folder): And here too.
10200 * camel-store.h (struct _CamelStore): Added a private field.
10202 * Makefile.am (noinst_HEADERS): Add camel-private.h. There is a
10203 comment in that header as to why it ins't installed.
10205 * camel-private.h: New header for private data, that subclasses
10208 * tests/lib/camel-test.c (camel_test_init): If we do have threads
10209 enabled already, dont call g_thread_init().
10211 * tests/lib/folders.c (test_folder_counts): Add free of info.
10212 (test_folder_message): And here too.
10214 * providers/local/camel-maildir-summary.c (remove_summary): Free
10216 (maildir_summary_check): Free info lookups.
10218 * providers/local/camel-mh-summary.c (message_info_new): Removed,
10220 (remove_summary): free info after being used.
10221 (mh_summary_check): Free info lookups.
10222 (mh_summary_sync): and here too.
10224 * providers/local/camel-mbox-summary.c (summary_update): Free info
10226 (mbox_summary_sync_full): Likewise.
10227 (mbox_summary_sync_quick): And here.
10228 (mbox_summary_sync): ... and here.
10230 * providers/local/camel-maildir-folder.c (maildir_get_message):
10231 Free messageinfo lookups.
10233 * providers/local/camel-mh-folder.c (mh_get_message): Free
10234 messageinfo lookups.
10236 * providers/local/camel-mbox-folder.c (mbox_get_message): Free
10237 messageinfo lookups.
10239 * providers/local/camel-local-summary.c
10240 (message_info_new_from_message): Removed, since it wasn't doing
10242 (message_info_new_from_parser): Same. And some other dead code.
10244 * providers/local/camel-local-folder.c (local_get_message_info):
10246 (local_free_message_info):new func to free info.
10248 (local_get_message_flags):
10249 (local_set_message_flags):
10250 (local_get_message_user_flag):
10251 (local_set_message_user_flag):
10252 (local_get_message_user_tag):
10253 (local_set_message_user_tag): Free all info lookups.
10254 (local_expunge): Dont call camel_folder_* functions, to avoid a deadlock.
10256 * providers/nntp/camel-nntp-folder.c
10257 (nntp_folder_get_message_info): deconstify.
10258 (nntp_folder_free_message_info): Free summary item.
10259 (nntp_folder_get_message_flags): Free summary lookup.
10260 (nntp_folder_set_message_flags): and here.
10261 (nntp_folder_get_uids): And here.
10263 * providers/imap/camel-imap-auth.c: Make base64_*_simple optional
10264 with the HAVE_KRB4 flag.
10266 * providers/imap/camel-imap-folder.c (imap_free_message_info):
10267 Added a free of the message info.
10268 (imap_refresh_info):
10270 (imap_refresh_info):
10271 (imap_get_unread_message_count):
10273 (imap_get_message_flags):
10274 (imap_set_message_flags): Free any summary lookups.
10275 (imap_get_message_flags): Get the message info directly from the
10276 summary, not via the folder interface.
10277 (imap_move_message_to): Dont call folder functions directly
10278 (delete_message), as it will deadlock since we already have the
10281 * providers/vee/camel-vee-folder.c (vee_free_message_info): Free/unref
10283 (vee_get_message_info): First ref the internal copy, then return it.
10284 (folder_changed): Free all got message info's.
10285 (message_changed): And here.
10286 (get_real_message): And here.
10287 (vee_folder_build): and here.
10288 (vee_folder_build_folder): ... and here.
10290 * camel-folder-summary.c (camel_folder_summary_info_new):
10291 Initialise the messageinfo refcount to 1.
10292 (camel_folder_summary_info_free): Down the refcount till we need
10294 (camel_folder_summary_info_ref): New function to up the refcount.
10295 (camel_message_info_dup_to): Sewt the refcount of the dest to 1.
10296 (camel_message_info_new): Set refcount to 1.
10297 (camel_message_info_new_from_header): Dont allocate the mi
10299 (camel_message_info_free): Handle refcounting.
10300 (camel_message_info_ref): New function.
10301 (camel_folder_summary_index): Ref the messageinfo before returning
10303 (camel_folder_summary_uid): Likewise.
10304 (camel_folder_summary_save): Access the messageinfo array
10305 directly, rather than through accessors (saves ref/unref).
10306 (camel_folder_summary_clear): Likewise.
10307 (camel_folder_summary_remove_index): Likewise.
10308 (main): Free lookups.
10310 * camel-folder-summary.h (CamelMessageInfo): Added a refcount
10313 * camel-folder.c (camel_folder_free_message_info): New function to
10314 'free' a message info.
10315 (camel_folder_get_message_info): Deconstify return.
10316 (camel_folder_lock): New (internal) function to thread-lock the
10318 (camel_folder_unlock): Likewise for unlocking.
10320 (thaw): Lock around access to folder->frozen/changed_frozen.
10321 (folder_changed): Likewise.
10322 (message_changed): Likewise.
10323 (camel_folder_init): Init private data, locks and moved frozen
10325 (camel_folder_finalize): Free new private data, locks and moved
10327 (copy_message_to): Free the messageinfo after we've used it.
10328 (move_message_to): And here too.
10329 (camel_folder_sync): Lock around virtual method invocation. Just
10330 locking around any virtual method that is known to need it. This
10331 is the first cut at locking.
10332 (camel_folder_refresh_info): "
10333 (camel_folder_expunge): "
10334 (camel_folder_get_message_count): "
10335 (camel_folder_get_unread_message_count): "
10336 (camel_folder_append_message): "
10337 (camel_folder_set_message_flags): "
10338 (camel_folder_get_message_flags): "
10339 (camel_folder_get_message_user_flag): "
10340 (camel_folder_set_message_user_flag): "
10341 (camel_folder_get_message_user_tag): "
10342 (camel_folder_set_message_user_tag): "
10343 (camel_folder_get_message): "
10344 (camel_folder_get_uids): "
10345 (camel_folder_free_uids): "
10346 (camel_folder_get_summary): "
10347 (camel_folder_search_by_expression): "
10348 (camel_folder_free_summary): "
10349 (camel_folder_search_free): "
10350 (camel_folder_move_message_to): "
10351 (camel_folder_copy_message_to): "
10352 (copy_message_to): Dont call any of our own folder functions
10353 directly, otherwise we will deadlock.
10354 (move_message_to): Likewise.
10356 * camel-folder.h (CamelFolder): Added free_message_info() function
10357 & deconstify get_message_info()'s return.
10358 (CamelFolder): Add a private field (for locks).
10359 (struct _CamelFolder): Moved changed_changed/frozen into private
10360 data, since it really is private and now needs locked access.
10362 2000-12-15 Jeffrey Stedfast <fejj@helixcode.com>
10364 * camel-mime-utils.c (header_fold): When checking to see if we
10365 need to fold the header, when we come accross a \n, make sure to
10366 start at p + 1 the next time through the loop or else we get into
10369 2000-12-13 Dan Winship <danw@helixcode.com>
10371 * Namespace cleanup: change a bunch of IS_CAMEL_* macros to
10374 2000-12-13 Chris Toshok <toshok@helixcode.com>
10376 * providers/imap/camel-imap-auth.c: add #include <sys/types.h> for
10379 2000-12-12 Christopher James Lahey <clahey@helixcode.com>
10381 * camel-folder-summary.c, camel-folder-summary.h: Added #ifndef
10382 NO_WARNINGS around a #warning. Added (void) to the prototype and
10383 declaration of camel_message_info_new.
10385 * camel-mime-message.h: Added an include for
10386 camel-mime-filter-bestenc.h. Added a prototype for
10387 camel_mime_message_set_best_encoding. Reformatted prototypes to
10390 * camel-mime-parser.c: Added #if d(!)0 around the states string
10391 lookup table since it's only used in debugging output.
10393 * camel-seekable-substream.c (stream_flush): Added a cast.
10395 * providers/imap/camel-imap-auth.c: Added #include <netinet/in.h>.
10397 * providers/imap/camel-imap-folder.c (imap_refresh_info): Made uid
10398 and flags const to fix warnings here.
10400 * providers/imap/camel-imap-store.c (get_folder_info): Made p
10401 const to fix warnings here.
10403 2000-12-12 Dan Winship <danw@helixcode.com>
10405 * tests/lib/Makefile.am: Add missing .h file. (From campd.)
10407 2000-12-11 Not Zed <NotZed@HelixCode.com>
10409 * providers/smtp/camel-smtp-transport.c (smtp_data): Remove use of
10410 linewrap filter. Headers are now wrapped. encode_8bit already
10411 enforces a 998 octet line limit.
10412 (smtp_data): Also fixed a memleak, we always have to unref our own
10413 copy of the filters. We also dont need to remove them manually,
10414 so dont bother. The type's an int too ...
10416 * camel-internet-address.c (internet_unformat): When scanning past
10417 quotes, remove them also.
10418 (camel_internet_address_format_address): If the name contains "'s,
10419 or ','s then strip and quotes and wrap the whole lot in one set of
10422 * Makefile.am (noinst_HEADERS): We dont want to install
10423 camel-charset-map-private.h, ever. There are probably other
10426 * camel-mime-part.c (write_to_stream): Fold header lines
10427 appropriately as we're writing them out.
10429 * camel-mime-utils.c (header_fold): Add a new argument, headerlen,
10430 tells it how long the associated header token is.
10431 (header_fold): Also,k check to see if we need to fold first, using
10432 a better algorithm, and also accept already-folded lines, and
10433 re-process accordingly.
10434 (rfc2047_decode_word): Add a little buffer space to iconv output
10435 for shifting overheads?
10436 (rfc2047_decode_word): finish the iconv with a null call, to flush
10438 (rfc2047_encode_word): Attempt to break up long words into
10439 appropriately sized, independent, chunks. See rfc2047, section 2.
10440 (header_decode_mailbox): Dont add in extra spaces into the output
10441 if we are decoding adjacent encoded words. We can only guess this
10442 case, as some broken mailers put encoded words inside quoted
10444 (header_encode_phrase): Dont merge words if they are going to end
10445 up too long. Also change back ot only merge consecutive words of
10446 the same type. e.g. 'foo. blah fum.' -> "foo." blah "fum." or
10447 'iam an. idiot' -> iam "an." idiot
10449 * camel-medium.c (camel_medium_set_header): Hrm, we actually want
10450 to call set_header, not add_header here, probably explains some
10451 duplicate X-Evolution headers i was trying to track down. Also
10452 changed the api to handle a NULL value == remove the header.
10454 * providers/local/camel-maildir-summary.c
10455 (maildir_summary_decode_x_evolution): Always return error, we dont
10456 use x-evolution for maildir.
10457 (maildir_summary_encode_x_evolution): Always return a NULL string,
10459 (maildir_summary_add): Hook in here, since the _new function
10460 doesn't have access to any flags from the caller. If we have
10461 flags, then update the filename again. Not ideal, but should
10464 2000-12-08 JP Rosevear <jpr@helixcode.com>
10466 * tests/message/Makefile.am: Remove test3 from build until the files
10469 2000-12-09 Not Zed <NotZed@HelixCode.com>
10471 * camel-mime-message.c (camel_mime_message_set_date): Change the
10472 sign of the default date offset when none is supplied.
10473 (camel_mime_message_set_date): Also do dst if its dst (forward 1
10474 hour). Fixes #928 + some.
10476 2000-12-06 Not Zed <NotZed@HelixCode.com>
10478 * tests/lib/camel-test.h (check): Change line no format so that
10479 emacs can detect it.
10481 2000-12-06 Jeffrey Stedfast <fejj@helixcode.com>
10483 * providers/imap/camel-imap-folder.c (imap_refresh_info): We want
10484 to bitwise-or the server and cached flags here so that we keep the
10485 flags that we have set locally and set any additional flags that a
10486 parallel connection may have set.
10488 2000-12-05 Jeffrey Stedfast <fejj@helixcode.com>
10490 * providers/smtp/camel-smtp-transport.c (smtp_data): If the data
10491 wrapper fails to be written to the stream, unref it and the
10492 filters before returning.
10494 2000-12-05 Dan Winship <danw@helixcode.com>
10496 * providers/imap/camel-imap-folder.c (imap_get_message): use
10497 BODY.PEEK[] rather than RFC822, so the message doesn't get marked
10499 (imap_refresh_info): Fix a really really really dumb bug.
10501 2000-12-05 Dan Winship <danw@helixcode.com>
10503 * providers/imap/camel-imap-folder.c (imap_set_message_flags): Fix
10504 the check for "flags aren't actually changing".
10506 * providers/local/camel-local-folder.c (local_set_message_flags,
10507 local_set_message_user_flag, local_set_message_user_tag): Don't
10508 emit message_changed unless the flags actually changed.
10510 * providers/nntp/camel-nntp-folder.c
10511 (nntp_folder_set_message_flags): Don't emit message_changed unless
10512 the flags actually changed. Fix the check for marked as seen.
10514 2000-12-05 Not Zed <NotZed@HelixCode.com>
10516 * camel-seekable-substream.c (stream_flush): stream_flush does
10517 make sense for a substream afterall (if you have a stream_write).
10518 (stream_write): Implement this.
10519 (stream_seek): Change the STREAM_END behaviour to be more sane.
10520 if bounded go from the end of the bound, if unbounded, go from the
10521 end of the parent stream.
10523 * camel-stream-mem.c (stream_read): Dont return error if reading
10524 past the end of data, just return 0.
10526 * camel-stream-fs.c (camel_stream_fs_init): Initialise the stream
10528 (stream_seek): Fix the logic when seeking from the end of an
10530 (camel_stream_fs_new_with_fd): If the fd is invalid (-1), then
10531 return NULL immediately.
10532 (stream_seek): Range check a SEEK_END so it fits within
10535 2000-12-01 Not Zed <NotZed@HelixCode.com>
10537 * tests/lib/folders.c (test_folder_basic): New test to perform
10538 basic store operations on folders (taken from folders/test1).
10539 (test_folder_message_ops): Tkane the guts out of folders/test2.
10541 2000-12-04 Jeffrey Stedfast <fejj@helixcode.com>
10543 * providers/smtp/camel-smtp-transport.c (smtp_connect): i18n-ize
10545 (get_name): And here.
10546 (_send_to): Here too.
10547 (smtp_helo): And here and there...
10548 (smtp_mail): And around the square...
10549 (smtp_rcpt): Saying catch me if you can...
10550 (smtp_data): And here three.
10551 (smtp_rset): And here.
10552 (smtp_quit): And finally here.
10554 2000-12-01 Jeffrey Stedfast <fejj@helixcode.com>
10556 * camel-folder-search.h: Added system_flag to CamelFolderSearchClass
10558 * camel-folder-summary.c (camel_system_flag_get): Convenience
10559 function to return whether or not a flag is set using a string as
10561 (camel_system_flag): Return the integer value of the flag string.
10563 * camel-folder-search.c (search_system_flag): New ESExp callback
10564 for allowing vfoldering on CamelMessageInfo flags.
10566 2000-12-01 Dan Winship <danw@helixcode.com>
10568 * camel-service.c (camel_service_disconnect): Don't
10569 g_return_if_fail if the service is already disconnected. Just
10572 * providers/pop3/camel-pop3-store.c (pop3_try_authenticate):
10573 Return FALSE (don't try again) if we get CAMEL_POP3_FAIL.
10574 (pop3_connect): If we don't succeed, disconnect.
10576 2000-11-30 Jeffrey Stedfast <fejj@helixcode.com>
10578 * providers/imap/camel-imap-store.c
10579 (parse_list_response_as_folder_info): Fix a possible bug where
10580 'name' could be uninitialized.
10582 * camel-folder-summary.c (camel_message_info_new): New convenience
10583 function, doesn't do much but it sure makes code cleaner to read.
10584 (camel_message_info_new_from_header): This one makes my life heaven.
10586 2000-11-30 Jeffrey Stedfast <fejj@helixcode.com>
10588 * providers/imap/camel-imap-summary.c (camel_imap_summary_new):
10589 Handle the case where the summary failed to load - clear the
10590 summary and then set the dirty bit so that it is sure to save
10591 later. Is this the right fix?
10593 2000-11-30 Dan Winship <danw@helixcode.com>
10595 * camel-exception.c (camel_exception_setv): Remove unused
10598 2000-11-30 Not Zed <NotZed@HelixCode.com>
10600 * providers/local/camel-mbox-folder.c (mbox_get_message): Remove
10601 assertion that content is there, when it no longer can be.
10603 * camel-folder-summary.h: Removed pos/bodypos/endpos from
10604 camelmeessagecontentinfo.
10605 (CamelMessageFlags): Added an attachments flag.
10607 * providers/local/camel-local-summary.h: Added load virtual
10610 * tests/lib/folders.c (test_message_info): Accessors.
10611 (test_folder_message): "
10613 * camel-folder-thread.c (get_root_subject): Fix accessors.
10616 * camel-folder-search.c (camel_folder_search_execute_expression):
10617 Accessors for messageinfo.
10618 (search_match_all): "
10619 (search_header_contains): "
10620 (search_header_contains): "
10621 (search_body_contains): "
10622 (camel_folder_search_execute_expression): Use mepool_strdup.
10624 * providers/local/camel-mbox-summary.c (summary_update): Accessors
10626 (mbox_summary_sync_full): "
10628 * providers/local/camel-mh-summary.c (remove_summary): Accessors
10630 (mh_summary_check): "
10631 (mh_summary_sync_message): "
10632 (mh_summary_sync): "
10634 * providers/local/camel-mh-folder.c (mh_append_message): Use
10637 * providers/local/camel-local-summary.c
10638 (local_summary_decode_x_evolution): Use accessor to uid.
10639 (local_summary_encode_x_evolution): Likewise.
10640 (message_info_new): And here.
10641 (camel_local_summary_load): Call virtual load function.
10642 (local_summary_load): Default load function, load summary.
10643 (camel_local_summary_load): Check file exists before trying to
10645 (camel_local_summary_construct): Turn off building content info!
10646 (CAMEL_LOCAL_SUMMARY_VERSION): Bump, since we dont build content
10648 (camel_local_summary_load): After a successful load/check, do a
10649 save too so we dont have to go through it again randomly.
10651 * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): Use
10652 accessors for messageinfo.
10654 * providers/nntp/camel-nntp-folder.c (nntp_folder_get_uids): Use
10657 * providers/imap/camel-imap-folder.c (imap_refresh_info): Use
10659 (imap_sync): Likewise.
10660 (imap_get_uids): Likewise.
10661 (imap_update_summary): And here.
10663 * providers/vee/camel-vee-folder.c (vfolder_remove_match): Use
10665 (vfolder_add_match): Handle estrv stuff.
10666 (vfolder_change_match): Accessor for uid.
10667 (get_real_message): "
10669 (vee_folder_build): " + estrv.
10670 (vee_folder_build_folder): "
10672 * providers/local/camel-maildir-folder.c (maildir_append_message):
10673 Use acccessors for uid's.
10674 (maildir_get_message): Here too.
10676 * providers/local/camel-maildir-summary.c
10677 (camel_maildir_summary_init): Setup the string count for us.
10678 (message_info_new): Access the string array directly.
10679 (message_info_free): No need to free string if using array.
10680 (camel_maildir_summary_info_to_name): Use accessor to get to uid.
10681 (remove_summary): And here.
10682 (maildir_summary_check): Likewise.
10683 (maildir_summary_sync): And here.
10684 (maildir_summary_load): Load up a cache of uid->filename mappings
10685 before loading the actual summary file. This saves us having to
10686 waste the diskspace storing the filenames in the summary itself,
10687 and also helps us sync the summary better on load.
10688 (message_info_load): If we have the load_map setup, and the uid
10689 exists, then set the filename cache from it, and update the flags
10690 from the name, incase our summary mismatches it.
10692 * camel-folder-summary.c (camel_folder_summary_init): Setup string
10693 count for compressed info record. An optional compile mode which
10694 stores all strings for a given messageinfo into a packed array,
10695 which should save 36-50 bytes/record.
10696 (camel_folder_summary_info_new): Init the string array.
10697 (message_info_new): Set the string array items, as required.
10698 (message_info_load): And here too.
10699 (message_info_save): Use accessors to get to strings.
10700 (message_info_free): Free strings as one.
10701 (camel_message_info_dup_to): Handle packed array case.
10702 (camel_folder_summary_add): Use accessors. And pack the strv
10704 (summary_assign_uid): New function to assign a unique uid to a
10705 message, if it doesn't have one.
10706 (camel_folder_summary_add): Call assign_uid instead of doing it
10708 (camel_folder_summary_info_new_from_parser): "
10709 (camel_folder_summary_info_new_from_message): "
10710 (camel_folder_summary_encode_string): constify.
10711 (camel_folder_summary_encode_token): "
10712 (summary_build_content_info_message): Fix accessors to messageinfo.
10713 (CAMEL_FOLDER_SUMMARY_VERSION): Bumped, for removal of
10714 contentinfo->pos data.
10715 (camel_folder_summary_info_new_from_parser): Calculate the size
10716 based on the parser position, not the removed contentinfo stuff.
10717 (camel_folder_summary_info_new_from_message): Remove size stuff.
10718 (camel_folder_summary_offset_content): Removed, no longer means anything.
10719 (content_info_new):
10720 (content_info_load):
10721 (content_info_save):
10722 (summary_build_content_info): Remove stuff for contentinfo->pos*.
10723 (summary_build_content_info): Take a msginfo argument, set
10724 attachments flag if we find any attachments.
10725 (summary_build_content_info_message): set attachments flag if we
10726 find any attachments.
10727 (camel_folder_summary_info_new_from_parser): Always scan the
10728 content info, even if we dont save it.
10729 (camel_folder_summary_info_new_from_message): And here too.
10730 (summary_build_content_info): Only create the contentinfo stuff if
10731 we have it turned on, otherwise just parse and discard.
10732 (summary_build_content_info_message): Likewise.
10734 2000-11-29 Jeffrey Stedfast <fejj@helixcode.com>
10736 * camel-store.c (camel_store_get_folder): Updated the gtk-doc
10739 2000-11-29 Dan Winship <danw@helixcode.com>
10741 * camel-mime-utils.c:
10742 * camel-mime-filter-charset.c: Use iconv instead of unicode_iconv.
10744 * providers/imap/camel-imap-command.c (imap_read_untagged): Fix
10745 some off-by-one-ness.
10747 * camel-stream-buffer.c (stream_read): Fix another bug found in
10748 previously-unused code here.
10750 2000-11-29 Ettore Perazzoli <ettore@helixcode.com>
10752 * tests/lib/Makefile.am (INCLUDES): `$(top_srcdir)' for builddir
10753 != srcdir compilation.
10755 2000-11-29 Not Zed <NotZed@HelixCode.com>
10757 * tests/message/test2.c (main): Add a missed unref.
10759 * camel-stream-mem.c (camel_stream_mem_set_buffer): We must set
10760 ourselves as the owner of the byte-array.
10761 Weird, someone has modified this file (its been reindented), but i
10762 can't see any changelogs ...
10764 * tests/lib/messages.c (content_finalise): Fix memleak in tester,
10765 free byte array when our content object is deleted.
10767 * camel-folder-search.c (camel_folder_search_finalize): Yeah
10768 great, so the sexp is a gtk object, not a camel object. Isn't
10769 that going to be fun to fix?
10771 * camel-session.c (camel_session_finalise): Free the storage path.
10773 * providers/local/camel-local-store.c (camel_local_store_init): If
10774 store->folders is setup, free it first, then overwrite. Hmm,
10775 this seems a bit crappy to me.
10777 * camel-store.c (camel_store_init): Dont setup store->folders if
10780 * camel-exception.c (camel_exception_setv): Removed a memleak. no
10781 need to strdup after a strdup_printf!!!
10783 * camel-address.c (camel_address_finalize): Free the address
10784 ptrarray, once finished.
10786 * providers/local/camel-local-folder.c (local_finalize): Make sure
10787 we dont leave the folder locked on close.
10788 (local_finalize): Free summary/search.
10790 * providers/local/camel-mh-summary.c (mh_summary_next_uid_string):
10791 Small memleak, always free name after using it.
10793 * camel-mime-part.c (set_content_object): Free txt after setting
10796 * providers/local/camel-maildir-summary.c (maildir_summary_check):
10797 Fix a memleak, close the dir after scanning new.
10798 (message_info_free): Added so we can free the filename cached in
10800 (camel_maildir_summary_finalise): Free the hostname.
10802 * tests/folder/test[12].c (main): Clear out camel-test before
10805 * providers/local/camel-mbox-summary.c (mbox_summary_sync_quick):
10806 Because encode_x_evolution folds the line (sigh, because
10807 encode_param does, unlike every other function in
10808 camel-mime-utils), unfold the encoded result before comparing.
10809 (mbox_summary_sync_quick): Another small memleak, free xevnew once
10812 * camel-mime-utils.c (header_decode_quoted_string): Removed a
10813 redundant check for c=0.
10814 (header_unfold): New function to un-fold headers.
10816 * providers/local/camel-local-summary.c
10817 (local_summary_encode_x_evolution): some problems with encoding
10818 tags, using the wrong output strings.
10819 (local_summary_encode_x_evolution): We dont need to append a ;
10820 either, param_list_format_append() will do it for us.
10822 2000-11-28 JP Rosevear <jpr@helixcode.com>
10824 * camel-lock.c: No longer hard code the enabled lock types
10826 2000-11-28 Dan Winship <danw@helixcode.com>
10828 * camel-remote-store.c (remote_recv_line): Don't set exception to
10829 g_strerror (errno) when nread == 0, because it won't have been
10832 * providers/pop3/camel-pop3-folder.c (pop3_finalize): Don't try to
10833 free things if they haven't been set yet.
10835 2000-11-28 Jeffrey Stedfast <fejj@helixcode.com>
10837 * providers/smtp/camel-smtp-transport.c (smtp_connect): Clear the
10838 exception if EHLO fails before trying HELO in the cases where the
10839 SMTP provider doesn't announce its ESMTPness.
10841 2000-11-28 Not Zed <NotZed@HelixCode.com>
10843 * providers/local/camel-maildir-summary.c
10844 (camel_maildir_summary_init): Set the info size's properly, oops!
10846 * tests/lib/folders.[ch]: Folder testing helpers.
10848 * tests/folder/test2.c: Test basic message ops on folders.
10850 * tests/folder/test1.c (main): Test basic folder ops on (local)
10853 * providers/local/camel-local-provider.c
10854 (camel_provider_module_init): Removed some debug.
10856 * providers/local/camel-maildir-folder.c
10857 (camel_maildir_folder_class_init): fix parent class.
10859 * providers/local/camel-mh-folder.c (camel_mh_folder_class_init):
10860 Fix parent class (damn cut & paste).
10862 * providers/local/camel-maildir-store.c (get_folder): Call parent
10864 (camel_maildir_store_class_init): Fix parent class setup.
10865 (delete_folder): Check the folder exists before trying to delete
10867 (delete_folder): Try and make the delete operation atomic/rollback
10868 failures. e.g. if one directory isn't empty, then create the
10869 other empty ones back. Also clear the tmp directory fully first.
10871 * providers/local/camel-mbox-store.c (get_folder): Call parent
10873 (camel_mbox_store_class_init): parent class is camel_local_store,
10874 not camel_folder, oops.
10875 (delete_folder): Return an error if it doesn't exist, rather than
10878 * providers/local/camel-mh-store.c (get_folder): Call parent impl.
10879 (camel_mh_store_class_init): fix parent class setup.
10880 (delete_folder): Error if it doesn't exist now.
10882 * camel-folder.c (camel_folder_move_message_to):
10883 (camel_folder_copy_message_to): Added warnings as these functions
10884 are going to be removed later.
10886 * camel-store.c (camel_store_get_root_folder): Fix for an early
10887 api change. We want CAMEL_STORE_FOLDER_CREATE, not TRUE, since
10889 (camel_store_get_default_folder): And here too.
10891 * providers/local/camel-local-store.c (xrename): Handle renaming
10892 folders differently to renaming files.
10893 (get_default_folder_name): local stores dont have a default
10894 folder, so make it so. Or at least, it doesn't seem to make sense
10896 (get_root_folder_name): Same for root.
10897 (get_folder): Added parent implementation, that makes sure the
10898 service path exists, if we are creating a new folder (but doesn't
10899 create the folder).
10901 2000-11-27 Not Zed <NotZed@HelixCode.com>
10903 * providers/local/camel-local-store.c (xrename): Fixed races. Use
10904 link/unlink, rather than rename, to properly detect overwriting
10905 another file. And allow some files to be missing.
10907 2000-11-28 Radek Doulik <rodo@helixcode.com>
10909 * providers/local/camel-local-summary.c
10910 (local_summary_decode_x_evolution): add scan = scan->next; to
10911 avoid infinite loop
10913 2000-11-27 Dan Winship <danw@helixcode.com>
10915 * providers/imap/camel-imap-command.c (imap_read_untagged): Make
10916 this gratuitously more complicated. No wait, I mean, fix bugs. Now
10917 fully handles NULs in the data stream (which "can't happen" but
10918 do) and also handles responses containing multiple literals. Also
10919 does less copying than the original code.
10921 * camel-stream-buffer.c (stream_read): Fix a bug that could make
10922 it lose sync and/or overrun buffers.
10924 2000-11-27 JP Rosevear <jpr@helixcode.com>
10926 * providers/local/.cvsignore: shush
10928 2000-11-27 Not Zed <NotZed@HelixCode.com>
10930 * providers/Makefile.am: Removed mh, mbox, added local, to the default.
10932 2000-11-24 Not Zed <NotZed@HelixCode.com>
10934 * tests/data/getaddr.pl: little util to scan mailboxes for any and
10935 every address they contain.
10937 * tests/message/test2.c (main): Added a bunch of stuff to test
10938 decoding/reencoding/etc of internationalised addresses.
10940 * tests/message/lib/address-data.h: Copy of some unicode/other
10941 testing data. **Beware** of editing this file in emacs, it'll
10942 probably try and convert all the characters to something
10945 * tests/lib/camel-test.c (camel_test_break): Add a debugger hook
10948 * camel-mime-utils.c (quoted_encode): Check for space and convert
10950 (header_decode_mailbox): Fixed the 'check comments for realname'
10951 code, problem was the domain getting code was skipping all
10952 whitespace/comments before we could get a look-in. This is
10953 approximate but fairly robust.
10954 (header_decode_text): Dont use the c-type isspace func here, we
10955 want a specific whitespace only.
10956 (header_decode_text): If we have decoded words next to each other,
10957 do not insert whitespaces between them, which is what rfc2047 requires.
10958 (header_decode_text): Make c unsigned too.
10960 * tests/README: Added at least some explanation of all this stuff.
10962 * tests/lib/camel-test.h (check_msg): Added a non-gcc version of
10963 the fail command, we dont get the expression that failed, but no
10964 matter. Should be (more) portable now.
10965 (check, check_msg): Put the file/lineno in the default message.
10967 * Makefile.am (SUBDIRS): Add tests.
10969 * camel-mime-filter-basic.c (filter): Well, I'll add the extra
10970 bytes here too, lathough not strictly needed, might save a
10971 re-malloc when we get to complete().
10973 * camel-mime-filter-charset.c (filter): Make sure we have room if
10974 we only convert very short data.
10975 (complete): and here too.
10977 * tests/Makefile.am: Initial test harness & tests. Requires gcc
10980 * camel-internet-address.c (d): Turn off debug.
10982 * camel-charset-map.c (camel_charset_step): Oops, & masks for set
10983 intersection, not | them. Dunno how this got even close to
10986 2000-11-23 Not Zed <NotZed@HelixCode.com>
10988 * camel-mime-filter-basic.c (filter): For base64 encoding, the
10989 output size for 0, 1, or 2 bytes of input can exceed input*2, so
10990 make sure we account for that as well.
10991 (complete): And here.
10992 (complete): Similarly for qp encoding, if we have a trailing
10993 space, we need some extra bytes (not needed for 'filter()', as any
10994 such bytes are stored in state/save).
10996 * camel-mime-utils.c (quoted_decode_step): Removed fixme not required.
10997 (quoted_encode_close): Dont append a trailing afterall. Otherwise
10998 a pass through the encode/decode will grow the message each time.
11000 2000-11-22 Radek Doulik <rodo@helixcode.com>
11002 * camel-mime-utils.c (header_msgid_generate): check for return
11005 2000-11-21 Dan Winship <danw@helixcode.com>
11008 * camel-movemail.c: add #ifdef HAVE_ALLOCA_H
11010 2000-11-21 Not Zed <NotZed@HelixCode.com>
11012 * providers/local/camel-mh-summary.c (mh_summary_sync_message):
11013 Shite, -1 on error, >=0 on success. So i've just been truncating
11014 all the messages I touched, good one zed.
11015 (mh_summary_sync_message): Sigh, and write to the right damn fd as
11017 (mh_summary_sync_message): Argh, and we need to compare the length
11018 of the old xev -1 to the new xev, to check if we can optimise it.
11020 * camel-folder.c (camel_folder_change_info_new): Init the pool.
11021 (camel_folder_change_info_add_source): Allocate string in the
11023 (camel_folder_change_info_add_source_list):
11024 (camel_folder_change_info_add_update): No longer free the key, as
11026 (change_info_add_uid): Add a new arg, copy, telling it whether to
11027 copy the uid argument or not, and copy using mempool_strdup.
11028 (change_info_cat): Tell add_uid to copy the string.
11029 (camel_folder_change_info_add_update): Call add_uid directly.
11030 (change_info_remove): Call add_uid directly, with no copy, and
11032 (change_info_free_update): No longer required since we dont malloc
11034 (camel_folder_change_info_add_uid): Fix for add_uid change.
11035 (camel_folder_change_info_remove_uid):
11036 (camel_folder_change_info_change_uid):
11037 (change_info_clear): No longer needed, just set the size to 0 on
11038 the array directly.
11039 (camel_folder_change_info_clear): Empty the arrays directly, and
11040 flush the mempool too, and also clear uid_source, incase anyone
11041 was silly enough to call us in the wrong order.
11042 (camel_folder_change_info_free): Dont bother clearing the array's
11043 contents, just free the pool and throw away all the indexes.
11045 * camel-folder.h: Added a mempool to CamelFolderChangeInfo to
11046 store the uid's we get.
11048 * camel-folder-search.c (search_match_all): If we are only
11049 matching a single info, just use that/do the search.
11050 (camel_folder_search_match_expression): New function. Matches a
11051 single message info against an expression.
11052 (camel_folder_search_init): Init a hash table used to map the
11053 returned gptrarrays' to mempools.
11054 (camel_folder_search_execute_expression): Store all of the string
11055 data in a mempool, slightly faster, less wasted space (usually),.
11056 (camel_folder_search_free_result): Check for the mempool that
11057 stores the data for the list, and free that if we have it,
11058 otherwise assume we need to use g_free() (which should only happen
11059 if the list is empty at the moment).
11060 : commented out the debugging prints. Got sick of 'executing
11061 header search' crap.
11063 * providers/vee/camel-vee-folder.c (camel_vee_folder_init): Init
11065 (camel_vee_folder_finalise): Free changes.
11066 (vfolder_add_match): Simple helper to add a new matching info
11068 (camel_vee_folder_add_folder): Only trigger a changed event if we
11070 (vfolder_change_match): New function, changes our local vfolder
11071 info to match the source.
11072 (vfolder_add_match): Add a new info to the vfolder list.
11073 (vfolder_remove_match): Remove a no-longer matching info from the
11075 (message_changed): check if the message still matches, and
11076 remove/etc as required.
11077 (camel_vee_folder_finalise, init): init/free search object.
11078 (vee_folder_build_folder): Build the changes to the folder into
11079 the changes data, as we go.
11080 (folder_changed): If the folder gave us an explicit list of
11081 changes, then process each one separately (unless there's a lot
11084 * providers/vee/camel-vee-folder.h: Added a changes field to the
11087 * Makefile.am (libcamel_la_SOURCES): Added
11088 camel-folder-thread.[ch].
11090 * camel-folder-thread.c: message-threading algorithm, taken from
11091 evolutions' mail component, as it is generally more useful than
11092 just for evolution itself. Changed to use e-memchunks as well to
11093 speed it up a little and use less mem.
11095 2000-11-20 Jeffrey Stedfast <fejj@helixcode.com>
11097 * camel-remote-store.c (remote_recv_line): Fixed to return the
11098 correct bytecount in all cases which is the real fix to
11099 imap_parse_nstring.
11101 * providers/imap/camel-imap-command.c (imap_read_untagged): Again,
11102 don't use strlen for the post-data, use 'n'.
11104 * providers/imap/camel-imap-utils.c (imap_parse_nstring): Undo my
11107 2000-11-20 Not Zed <NotZed@HelixCode.com>
11109 * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): Fixes for
11110 the summary messageid changes. Hash the messageid and store it.
11111 (get_XOVER_headers): Use camel_folder_summary_info_new() to create
11112 the summary item before adding it.
11114 * camel-folder-summary.h (CamelMessageInfo): Changed the
11115 messgae-id to be an 8 byte md5 hash, and the references list to be
11118 * providers/local/camel-mh-summary.c (mh_summary_sync_message):
11119 New function, sync out the message info stuff. Only updates the
11120 X-Ev header if it can get away with it, otherwise writes out a
11122 (mh_summary_sync): Added more functionality. All summary info is
11123 now written to the X-Ev header, etc, and new messages re-written
11124 if required during the sync process.
11126 * providers/local/camel-local-folder.c
11127 (local_set_message_user_flag): Set the XEVCHANGE flag.
11128 (local_set_message_user_tag): And here too.
11130 * providers/local/camel-local-summary.h: New flag
11131 CAMEL_MESSAGE_FOLDER_XEVCHANGE to indicate the XEV header has
11132 probably changed size and needs to be rewritten in whole.
11134 * camel-folder-summary.c (next_uid_string): Want this static, not
11136 (message_info_new): Store the references and message-id values as
11137 64 bit, binary hashes.
11138 (message_info_load): fix for message-id/references changes.
11139 (message_info_save): Likewise.
11140 (camel_message_info_dup_to): And here.
11141 (camel_message_info_free): And here too. No longer free
11142 message_id, and simple free for references array.
11143 (CAMEL_FOLDER_SUMMARY_VERSION): Bumped file revision.
11144 (camel_folder_summary_init): Init memchunk allocators to empty.
11145 (camel_folder_summary_finalize): Free memchunk allocators if
11147 (message_info_new): Use the chunk allocator to allocate message
11149 (camel_folder_summary_info_new): New helper to allocate the
11150 message info, and setup the memchunk if required.
11151 (content_info_alloc): Likewise for content info's.
11152 (message_info_load): Use summary_info_new_empty.
11153 (content_info_new): Use content_info_alloc.
11154 (content_info_load): "
11155 (content_info_free): Free the content info as a memchunk.
11156 (message_info_free): Free everything directly and the base as a
11157 memchunk, rather than calling camel_message_info_free(), which
11158 assumes a malloc'd array.
11160 * providers/local/camel-local-summary.c: Include ctype.h, kill a
11162 (local_summary_decode_x_evolution): If we get a NULL message info,
11163 then dont try and set anything, just check for validity.
11164 (camel_local_summary_write_headers): New function to write a set
11165 of headers to an fd.
11166 (camel_local_summary_check): Added some statistic generation
11167 stuff for memory profiling.
11169 * providers/local/camel-mbox-summary.c (header_write): Changed to
11170 use stdoi functions to write out the header to a buffered stream,
11171 instead of using writev, which is apparently slow (and writing
11172 each line separately is slow anyway).
11173 (mbox_summary_sync_full): New implementation. Does things
11174 differently, doesn't use or require the content info stuff.
11175 (summary_rebuild): Dont return an error if we start scanning at
11177 (mbox_summary_sync_full): If we are not writing out new headers,
11178 make sure we copy the From line as we go, and update frompos
11180 (mbox_summary_sync_full): Always copy the From line from the
11181 existing one, rather than trying to make one up ourselves.
11182 (mbox_summary_sync): If we can get by with a quick-sync, then try
11183 it, if that fails, then try a full sync anyway.
11184 (mbox_summary_sync_quick): Quick sync. Only update system flags,
11186 (mbox_summary_sync_full): Use the proper local summary encode_xev
11188 (header_evolution_decode): Removed, no longer needed.
11189 (header_evolution_encode): Same.
11190 (copy_block): No longer needed, removed.
11191 (header_write): Removed, replaced with
11192 camel_local_summary_write_headers.
11193 (mbox_summary_sync_full): Fixed for header_write change.
11195 * camel-mime-parser.c (folder_scan_step): Implement the new
11196 optional parser state HSCAN_PRE_FROM, that returns the (currently
11197 unfiltered) input data.
11198 (folder_scan_drop_step): Do the right thing for the PRE_FROM
11200 (camel_mime_parser_scan_from): Update the doco.
11201 (camel_mime_parser_scan_pre_from): Ok, make this behaviour
11202 optional, it simplifies a lot of loops that dont otherwise need to
11204 (folder_scan_step): Made the PRE_FROM state optional.
11205 (struct _header_scan_state): Made the bool vars 1 bit.
11206 (folder_pull_part): Free the from_line buffer if it is there.
11207 (folder_scan_skip_line): Added a new arg, can save the skpped data
11208 to a byte_array, as we go.
11209 (folder_scan_step): Fixed calls to skip_line approrpiately. Now
11210 we save the from line as we parse it.
11211 (camel_mime_parser_read): New function to read from the mime
11212 parser buffer directly. Useful if you use the parser to read the
11213 first/some headers, then need to scan the rest of the data,
11214 without needing to use a seek(), or allocate your own buffers.
11216 * camel-mime-parser.h (struct _header_state): Added a new parser state,
11217 pre-from which returns any data found before a from line during
11218 parsing (all other data can be retrieved by the caller except
11221 2000-11-17 Jeffrey Stedfast <fejj@helixcode.com>
11223 * providers/imap/camel-imap-utils.c (imap_parse_nstring): When
11224 extracting a literal string, capture up until the end of the last
11225 line - this we we don't lose any data if the byte count is off.
11227 * providers/imap/camel-imap-command.c (imap_read_untagged): Use
11228 the byte-read count to decrement the number of bytes left to read
11229 rather than using strlen. Not only does this protect against a DoS
11230 (embedded NUL chars in the literal string would make strlen
11231 inaccurate) but it also improves performace a little.
11233 * camel-remote-store.c (remote_recv_line): *Sigh* Return the
11234 number of bytes read on success rather than 0. Also don't use
11235 camel_stream_buffer_read_line since we can't get an accurate octet
11238 2000-11-17 Not Zed <NotZed@HelixCode.com>
11240 * providers/local/camel-local-summary.c (local_summary_add): Clear
11241 the NOXEV/FLAGGED bits, since we do have an xev header. um m,
11242 maybe this is right, this assumes a write is following. Maybe
11243 this should be done in folder::append() instead ...
11245 * camel-stream-buffer.c (camel_stream_buffer_gets): We should
11246 always terminate the string. No need to check outptr is in range,
11247 its already been checked.
11249 * providers/local/camel-mbox-summary.c (mbox_summary_sync): When
11250 we update the summary, do it from mbox_summary->folder_size, not
11251 the content info endpos (which isn't any good anymore anyway).
11253 * providers/local/camel-mbox-folder.c (mbox_append_message): Set
11254 the frompos from the current folder size, since summary_add wont
11255 have initialised it to anything useful.
11257 2000-11-16 Not Zed <NotZed@HelixCode.com>
11259 * providers/local/camel-local-summary.c
11260 (local_summary_encode_x_evolution): Check the uid string is all
11261 digits before trying to write a 'standard' x-ev header.
11263 * providers/local/camel-maildir-summary.c
11264 (camel_maildir_summary_info_to_name): Convert an info into a
11265 maildir name:info filename.
11266 (camel_maildir_summary_name_to_info): Convert a name:info filename
11267 into an info, and tell us if it didn't match it.
11268 (message_info_new): When creating a new filename, gets its info
11269 from the flags field. Likewise if creating from an existing file,
11271 (maildir_summary_sync): Remove a small memleak. Also, if our
11272 flags and that requires a filename change, perform that here.
11273 (message_info_new): Get the received date from the filename.
11274 Also, dont overwirte the uid if we have one.
11275 (maildir_summary_check): Sort the summary in received order before
11277 (maildir_summary_next_uid_string): Test the name for collusions
11278 before we give it out. Retry, and if that fails, well, I guess we
11281 * providers/local/camel-mbox-folder.c (mbox_lock): Implement mbox
11283 (mbox_unlock): And unlocking.
11284 (mbox_append_message): Lock the folder for write before doing
11286 (mbox_get_message): Lock the folder for read before doing
11289 * providers/local/camel-local-folder.c (camel_local_folder_lock):
11290 Implement something here. We handle the recursive ability but
11291 pass the locking to the folder itself.
11292 (camel_local_folder_unlock): Likewise for unlocking.
11293 (local_lock): Default - do nothing, return success.
11294 (local_unlock): Same.
11295 (local_sync): Changed slightly for locking api changes, and also,
11296 only lock around the sync process itself.
11298 * camel-lock.c: New file - utility functions for locking using
11299 different strategies and/or for locking folders safely.
11301 * Makefile.am (libcamel_la_SOURCES): Adde camel-lock.[ch]
11303 2000-11-15 Radek Doulik <rodo@helixcode.com>
11305 * camel-mime-utils.c: mime_guess_type_from_file_name moved back to
11306 composer as it introduced unwanted VFS dependency
11307 removed #include <libgnomevfs/gnome-vfs.h>
11309 2000-11-15 Not Zed <NotZed@HelixCode.com>
11311 * providers/Makefile.am: Removed local again, not quite ready.
11313 2000-11-14 Not Zed <NotZed@HelixCode.com>
11315 * camel-folder-summary.c (message_info_new_from_message): Use
11316 message_info_new to create the summary from headers, instead of
11317 getting directly from the message.
11318 (format_recipients): No longer required.
11320 * providers/Makefile.am (SUBDIRS): Added local.
11322 2000-11-11 Not Zed <NotZed@HelixCode.com>
11324 * camel-mime-parser.c (folder_push_part): Make sure 'atleast' is
11325 at least 1, always. This is possibly a temporary fix for a
11326 bad failure mode on bad multipart messages.
11327 (folder_scan_content): Go until inend, not inend+1. Changed the
11328 continuation and retry logic to be simpler and more robust. If we
11329 can't find a marker within
11330 the atleast we need, just set it to 1, and try again, rather than
11331 just going to the next smaller limit (boundary check checks the
11333 (header_append): streamline the empty line case. And strip
11334 trailing \r's if there are any (\n's already stripped).
11335 (folder_scan_header): Reordered and cleaned up a lot. Check for
11336 continuation only once, and compress lwsp then. Assume the header
11337 buffer already has end of line's stripped, and simplify some things:
11338 Only check for end of headers once and easier.
11339 Dont check to remove end of line character
11340 Dont bother testing inptr-start if we get a boundary match - it is
11342 (folder_scan_header): Removed the unused part variable, and a few
11343 pointless assignments.
11344 (folder_scan_header): Change the end limit to be 1 higher, to make
11345 sure we get all content.
11346 (folder_scan_content): And here too.
11347 (folder_scan_header): Killed a warning.
11348 (folder_push_part): Removed a bad comment. Actually
11349 boundarylenfinal can be zero for a new message not in a
11350 multipart. So we fix that here.
11352 2000-11-09 Not Zed <NotZed@HelixCode.com>
11354 * camel-mime-utils.c (header_decode_param_list): Renamed from
11355 header_param_list_decode.
11356 (header_param_list_decode): New external function to decode a
11358 (header_param_list_format_append): Made public.
11359 (header_param_list_format): Another new public helper function for
11360 formatting just a param list.
11362 * camel-folder-summary.c (next_uid_string): Default implementation
11363 is the same as before.
11364 (camel_folder_summary_class_init): And set it up.
11366 * camel-folder-summary.h: Make next_uid_string a virtual function.
11368 * camel-folder.c (camel_folder_change_info_changed): New function
11369 to return true if the changeset contains any changes.
11371 2000-11-14 Jeffrey Stedfast <fejj@helixcode.com>
11373 * camel-stream.c (camel_stream_printf): Don't cast an int to a
11376 2000-11-10 Dan Winship <danw@helixcode.com>
11378 * providers/mbox/camel-mbox-summary.c
11379 (camel_mbox_summary_build_from): put a space before a single-digit
11380 day of the month since it seems some mailers are fantastically
11381 picky about this. (bugs.gnome.org #27232)
11383 2000-11-10 Radek Doulik <rodo@helixcode.com>
11385 * camel-mime-utils.c (header_msgid_generate): fix ids ending with '.'
11387 2000-11-09 Dan Winship <danw@helixcode.com>
11389 * providers/imap/camel-imap-auth.c (imap_try_kerberos_v4_auth):
11390 Fix error handling. (Only send a "*" to bail out of authentication
11391 if the server hasn't already bailed on us.)
11393 2000-11-08 Radek Doulik <rodo@helixcode.com>
11395 * camel-mime-utils.c (mime_guess_type_from_file_name): new
11396 function, moved from composer
11398 2000-11-08 Not Zed <NotZed@HelixCode.com>
11400 * camel-mime-message.c (find_best_encoding): Keep track of the
11401 caller bestenc flags that make sense.
11403 * camel-mime-filter-bestenc.c (filter): Added code to detect when
11404 we have "^From " lines in the sequence of text.
11405 (camel_mime_filter_bestenc_get_best_encoding): Added a new flag
11406 CAMEL_BESTENC_NO_FROM: if set, it will not allow any lines
11407 matching "^From " to appear in the output - currently forcing
11408 base64 encoding to achieve this.
11410 * camel-mime-parser.c (folder_scan_step): Call
11411 camel_mime-filter_complete() once we're done, rather than
11413 (folder_scan_content): Some fixes for state changing; so that when
11414 we do find another boundary it is properly flagged. Since we
11415 strip the last \n off all data, we must take that into account
11416 too. Sigh. Fixes a rather nasty set of bugs where multipart
11417 messages could start including following messages as parts, etc.
11418 (struct _header_scan_stack): Added new parameter,
11419 boundarylenfinal, which holds the length of the final boundary, if
11420 it is different (e.g. for From lines, whihc aren't)
11421 (folder_scan_step): Setup teh boundarylenfinal value when creating
11423 (folder_scan_content): Hmm, if we hit the end-of-buffer sentinal,
11424 reset the scanner back to leave 'atleast' chars in the buffer
11425 still, dump that content, and retry again. Stops us losing a
11426 check for a boundary on some data we haven't really looked at yet!
11427 (folder_scan_content): Use boundarylenfinal to calculate
11429 (folder_scan_header): And here too.
11430 (folder_boundary_check): Use the atleast value directly, dont
11431 truncate it. Use the boundarylen/boundarylenfinal values directly
11433 (struct _header_scan_stack): Add an atleast parameter to cache the
11435 (folder_push_part): Determine/set 'atleast', every time we add a
11437 (folder_scan_header): Get the cached atleast info from the current
11439 (folder_scan_content): And here too.
11440 (folder_scan_header): Fix a problem where a part starting with
11441 " text" would be interpreted as a followon header wrongly.
11443 * camel-mime-filter-charset.c (complete): Add some assertions to
11446 2000-11-07 Ettore Perazzoli <ettore@helixcode.com>
11448 * camel-service.c (get_name): Strdup the "???" string you return,
11449 so that the expected semantics for `::get_name()' is respected.
11451 2000-11-07 Dan Winship <danw@helixcode.com>
11453 * camel-stream-filter.c (d): Kill debugging, as it causes lots of
11454 evolution-mail spewage.
11456 2000-11-07 Not Zed <NotZed@HelixCode.com>
11458 * camel-mime-filter-bestenc.c (complete): Implement a complete()
11459 function, now we need one.
11460 (filter): Upgraded to match rfrc2045 properly. Checks also for
11461 length of line and valid CRLF sequences.
11462 (camel_mime_filter_bestenc_get_best_encoding): Do the work of
11463 working out what is the best encoding given what we found about
11466 * camel-mime-part.c (camel_mime_part_encoding_to_string): Use a
11467 lookup table to get the encoding naem, and add the binary type.
11468 (camel_mime_part_encoding_from_string): Likewise for the reverse.
11470 * camel-mime-part.h: Added the binary encoding type, see rfc2045.
11472 * camel-mime-utils.c (header_param_list_format_append): Dont put a
11473 space before ;'s in parameter lists, makes them more
11474 readable/consistent.
11476 * camel-mime-message.c (multipart_has_8bit_parts): Cleaned up the
11477 old stuff, well removed it.
11478 (camel_mime_message_set_best_encoding): Added another argument
11479 that lets you select what you want to set the best of. i.e. for
11480 smtp transport we only need 7 bit, and dont need to optimise the
11481 charset (although of course, we should always).
11482 (find_best_encoding): Implement this feature, if we are not
11483 getting the best charset, use the one we have.
11484 (best_encoding): Set the charset on the part appropriately. Sigh,
11485 the interfaces for this are nonexistant.
11486 (find_best_encoding): Tell the bestenc filter that lf should be
11487 treated as crlf for the purposes of determining encodings.
11489 2000-11-06 Not Zed <NotZed@HelixCode.com>
11491 * camel-charset-map.c (camel_charset_init): Init function for an
11492 iterative charset determinator.
11493 (camel_charset_step): Iterate another buffer.
11494 (camel_charset_mask): Removed, since it couldn't have worked.
11495 (camel_charset_best): Use the iterative interface to do the work.
11496 (camel_charset_best_name): Get the best name for a charset so far.
11498 * camel-mime-filter-bestenc.c: New class, a stream
11499 filter that can be used to memory-efficiently determine the best
11500 encoding and/or charset to use for a given stream of bytes.
11502 * Makefile.am (libcamelinclude_HEADERS): Added stream-null*.
11503 (libcamel_la_SOURCES): Added bestenc*
11505 * camel-stream-null.c: New class, a null-stream, that always
11506 succeeds, and never has any contents.
11508 * camel-stream.c: Minor pointless changes. Was going to do
11509 something else but changed my mind. Added trivial default
11510 implementations for all callbacks.
11512 * camel-mime-message.h: Cleaned up some old cruft.
11514 * camel-folder-summary.c (camel_folder_summary_format_address):
11515 address_list_format() no longer encodes, so we dont need to decode
11518 * camel-address.c (camel_address_unformat): New function, attempts
11519 to reverse the formatting process on display addresses.
11520 (camel_address_length): New function to get the number of
11521 addresses, without having to peek the structure.
11523 * camel-mime-message.c (camel_mime_message_set_from): Fix a typo.
11524 (camel_mime_message_finalize): Only unref from/reply_to if we have
11526 (camel_mime_message_set_recipients): New function - set the
11527 recipients as a CamelInternetAddress. This function effectively
11528 deprecates the older recipient setting functions.
11529 (camel_mime_message_add_recipient): What the hell, i'll bite the
11530 bullet. Terminate this function. The old api was ambiguious and
11531 inefficient and didn't work right anyway.
11532 (camel_mime_message_remove_recipient_address): And this one.
11533 (camel_mime_message_remove_recipient_name): And this one too.
11534 (camel_mime_message_set_recipients): If we set an empty header,
11535 then remove it from the header list. Allow a null receipient
11536 object to clear a header.
11537 (camel_mime_message_set_from): Likewise, if setting an empty from
11539 (camel_mime_message_encode_8bit_parts): Eeek!!
11540 camel_stream_mem_new_with_byte_array owns the byte_array we give
11541 it, so make sure we dont free any of it!
11542 (camel_mime_message_encode_8bit_parts): Infact, i'll just rewrite
11543 the whole lot, its a bit of a mess. Should really rename it and
11544 make it a little more useful too, lets see ...
11545 (best_encoding): This has a string interface? Oh boy.
11546 (camel_mime_message_foreach_part): New experimental function to
11547 iterate over all message parts. Might not remain.
11548 (camel_mime_message_has_8bit_parts): New implementation using
11549 foreach_part. Fixed a couple of problems.
11550 (find_best_encoding): New function, that finds the best encoding
11551 for a given part (will probably be moved to camel-mime-part), and
11552 also the best charset to use if it is a text part. Since one
11553 affects the other it is a two pass process, but uses streams and
11554 not memory to achieve this.
11555 (camel_mime_message_set_best_encoding): Uses the function above to
11556 configure an entire message for the best encoding possible given
11557 transport constraints.
11558 (camel_mime_message_encode_8bit_parts): Reimplemented to use the
11559 function above to perform the work.
11561 * camel-internet-address.c
11562 (camel_internet_address_format_address): Dont put <> around a lone
11563 address with no real name.
11564 (camel_internet_address_encode_address): Similarly.
11565 (internet_decode): Actually return the count of decoded addresses.
11566 (internet_unformat): Implement the unformatting routine.
11568 2000-11-05 Not Zed <NotZed@HelixCode.com>
11570 * providers/smtp/camel-smtp-transport.c (_send_to): Changed to get
11571 the internetaddress directly, rather than having to parse it
11574 * camel-address.c (camel_address_format): Added a new function
11575 which will format address, suitable for display.
11576 (camel_address_cat): Concatentate 1 camel address onto another.
11577 It is upto the caller to ensure the addresses are of compatible
11579 (camel_address_new_clone): New function to create a new address by
11580 copying an existing one of the same type.
11581 (camel_address_copy): New helper function to copy an address.
11583 * camel-mime-message.h (struct _CamelMimeMessage): Removed cached
11584 copy of date string.
11585 (struct _CamelMimeMessage): Added date_received info.
11587 * camel-mime-message.c (camel_mime_message_get_date_string):
11588 Removed. Nothing uses it anyway, and it is redundant.
11589 (camel_mime_message_finalize): No more date_str.
11590 (camel_mime_message_init): No more date_str, initialise
11592 (write_to_stream): Change the check for a date header.
11593 (process_header): No longer track the date_str.
11594 (camel_mime_message_get_received_date): Removed. totally invalid
11596 (camel_mime_message_get_sent_date): Removed. Redundant. The only
11597 'date' is the sent date, the received date is just made up.
11598 (camel_mime_message_get_date): Args changed to be more consistent
11599 with utility functions.
11600 (camel_mime_message_get_date): Dont set the date when we're asked
11601 for it (if its not set by the time its written, it'll be set
11603 (camel_mime_message_get_date_received): Actually do 'the right
11604 thing' here, if we have a received header, use that to determine
11605 the received date. And return the data in the same format as
11607 (camel_mime_message_set_from): Changed the api to better match
11608 what we should be doing. Pass a camelinternetaddress, etc.
11609 (camel_mime_message_set_reply_to): Cahnged similarly to take an
11611 (camel_mime_message_get_reply_to): Likewise.
11612 (camel_mime_message_finalize): Unref the from/reply_to objects.
11613 (format_address): Removed, no longer needed.
11614 (process_header): Changed to store the from/reply_to as
11616 (write_to_stream): Set the from header directly to empty, if we
11617 dont have one. Maybe we should just abort, and/or create one
11618 based on the current user.
11620 * camel-mime-utils.c (header_address_list_format): Renamed to
11621 header_address_list_encode, which is what it is actually doing.
11622 (header_address_list_format_append): Similarly.
11623 (encoding_map[]): Removed, no longer used.
11624 (header_address_list_encode_append): Take another arg, do we
11625 encode the address (for internet), or not (for display - utf8
11627 (header_address_list_format): Re-added this function, but now it
11628 generates a display version only. Surprise surprise, that is all
11629 anythign needs to generate anyway. Sigh.
11631 * camel-internet-address.c (camel_internet_address_get): Return
11632 false if we get an invalid index only.
11633 (camel_internet_address_encode_address): Helper function to encode
11634 a single address for mailing.
11635 (internet_encode): Use the above function to format it.
11636 (camel_internet_address_format_address): Format a single address
11638 (internet_format): Implement the display version.
11639 (camel_internet_address_class_init): Init the internet_format
11641 (internet_cat): Implement virtual function to concatenate
11644 * camel-folder-summary.c
11645 (camel_folder_summary_info_new_from_header): new function, only
11646 build the summary info, dont add it.
11647 (camel_folder_summary_info_new_from_parser): Likewise, for new
11649 (camel_folder_summary_add_from_parser): Cahnged to call function
11650 above to build info.
11651 (camel_folder_summary_add_from_header): Changed to call function
11652 above, to build info.
11653 (camel_folder_summary_info_free): New function to free the summary
11655 (camel_folder_summary_clear): Changed to clal above to free info.
11656 (camel_folder_summary_remove): Likewise.
11657 (camel_folder_summary_add): Cleaned up the clashing uid
11658 re-assignment logic a little bit.
11659 (camel_folder_summary_decode_uint32): Fixed a typo, 01 != -1.
11660 (camel_folder_summary_decode_time_t): Return -1 on error.
11661 (camel_folder_summary_encode_off_t): New function to encode an
11663 (camel_folder_summary_decode_off_t): And likewise for the reverse.
11664 (CAMEL_FOLDER_SUMMARY_VERSION): Bumped the summary version, since
11665 we're now encoding time/off_t's right.
11666 (summary_header_save): Use time_t encoder to save the timestamp.
11667 (summary_header_load): Likewise for decoding the timestamp.
11668 (content_info_load): Decode off_t types directly, now we can.
11669 (content_info_save): And likewise for encoding.
11670 (camel_folder_summary_add_from_message): New function, create a
11671 summary item from an existing message and add it.
11672 (camel_folder_summary_info_new_from_message): New function, create
11673 a summary item from an existing message.
11674 (summary_build_content_info_message): New function to do the dirty
11675 work of building the conent info/indexing, from a message source.
11676 (format_recipients): Format an internetaddress suitable for the
11678 (message_info_new_from_message): Build a new summary item from a
11680 (content_info_new_from_message): Build a new conent info from a
11682 (camel_folder_summary_class_init): Init the new class functions.
11683 (message_info_new_from_message): Fixed for message api change.
11685 Added documentation to the functions.
11687 2000-11-03 Radek Doulik <rodo@helixcode.com>
11689 * camel-mime-utils.c (header_msgid_generate): new function,
11690 generates simple message/content id
11692 2000-11-04 Not Zed <NotZed@HelixCode.com>
11694 * camel-mime-part-utils.c
11695 (camel_mime_part_construct_content_from_parser): Set the
11696 preface/postface from the parser into the multipart object.
11698 * camel-multipart.c (camel_multipart_set_postface): Function to
11699 set the postface text on a multipart.
11700 (camel_multipart_set_preface): Similarly for preface text.
11702 * camel-mime-parser.c (folder_scan_content): If we scan until a
11703 boundary, then we do not include the \n that starts the boundary
11704 line in the content.
11705 (struct _header_scan_stack): Added a ByteArray to store the
11706 multipart pre/post-text as we're scanning.
11707 (folder_pull_part): Free pre/posttext if they are allocated.
11708 (folder_scan_step): Build into the pre/posttext arrays as we
11710 (camel_mime_parser_preface): REturn the multipart preface text, if
11711 there is any scanned.
11712 (camel_mime_parser_postface): Likewise for postface text.
11713 (byte_array_to_string): helper function for above.
11715 * providers/mbox/camel-mbox-folder.c (mbox_append_message): Change
11716 the from line to be "\nFrom ..." always, so no need to
11717 check/append a \n to messages.
11718 (mbox_append_message): Open the output stream with append mode
11719 [assuming this is more efficient than seeking to the end]
11720 And dont prepend \n on the From line if its the first in the
11722 (mbox_append_message): Pass the offset of the real start of the
11723 "From " line when we perform the update (which may != 'seek')
11725 * camel-mime-filter-charset.c (complete): Removed the terminating
11728 * camel-stream-filter.c (do_read): Added some debug.
11729 (do_flush): And here.
11730 (do_write): And here too.
11731 (do_write): ARGH!!! ARGH! Ok, so the filter stream was writing a
11732 different number of bytes than the requester was asking it to
11733 write (because of filtering, of course!). So instead of returning
11734 the true number of written bytes, we'll return what they asked us
11735 to write - unless there is an error in which case we return -1.
11737 * camel-mime-utils.c (base64_encode_close): Sigh, forgot to make
11738 it unsigned. I think this is actually a gcc bug as (48 >> 2)
11739 somehow ended up negative, when it obviously should not, even if
11740 the data load was signed.
11742 2000-11-03 Jeffrey Stedfast <fejj@helixcode.com>
11744 * camel-url.c: Undo my incorrect fix - I misunderstood danw -
11747 2000-11-03 Dan Winship <danw@helixcode.com>
11749 * providers/pop3/camel-pop3-store.c (camel_pop3_store_expunge):
11752 2000-11-03 Jeffrey Stedfast <fejj@helixcode.com>
11754 * camel-url.c (camel_url_to_string): If show_pass, then base64 the
11755 password before writing it to the output string.
11756 (camel_url_new): Assume password has been base64 encoded and
11757 decode accordingly.
11759 2000-11-03 Dan Winship <danw@helixcode.com>
11761 * camel-provider.h: Add an "url_flags" field to CamelProvider.
11762 Move the CAMEL_SERVICE_URL_* defines here and remove the SERVICE_
11765 * camel-service.h: Remove CAMEL_SERVICE_URL_* flags and
11766 service->url_flags field.
11768 * camel-service.c (check_url, get_path): Get URL flags from
11769 service->provider, update for changed flag names.
11771 * providers/*/camel-*-provider.c: Add URL flags to provider
11774 * providers/*/camel-*-{store,transport}.c, camel-remote-store.c:
11775 Remove service->url_flags initialization.
11777 2000-11-02 Jeffrey Stedfast <fejj@helixcode.com>
11779 * providers/imap/camel-imap-store.c (get_folder_info): Quote
11780 foldernames when sending to the IMAP server because the folder
11781 name might contain spaces.
11783 2000-11-02 Not Zed <NotZed@HelixCode.com>
11785 * Merged in camel-incremental-branch.
11787 2000-11-01 Dan Winship <danw@helixcode.com>
11789 * providers/imap/camel-imap-store.c (get_folder_info): Remove old
11790 subbed folders from hash table after freeing them.
11792 * providers/imap/camel-imap-folder.c (imap_get_full_name): Deal
11793 correctly with namespace == ""
11795 2000-11-01 Gediminas Paulauskas <menesis@delfi.lt>
11797 * camel-charset-map.c, camel-charset-map-private.h: synced all charsets
11798 with ones found in libunicode. Just include more "iso/*.h" and rebuild
11799 ...private.h with this.
11801 2000-10-31 Dan Winship <danw@helixcode.com>
11803 * camel-service.c (service_disconnect): Add a new argument, clean,
11804 that says whether or not to try to disconnect cleanly.
11806 * camel-remote-store.c (remote_send_string, remote_send_stream,
11807 remote_recv_line): disconnect uncleanly on failure to prevent
11808 infinite loops when providers would normally send commands from
11809 disconnect(). Remove some unneeded CamelException goo.
11811 * providers/smtp/camel-smtp-transport.c (smtp_disconnect):
11812 * providers/pop3/camel-pop3-store.c (pop3_disconnect):
11813 * providers/nntp/camel-nntp-store.c (nntp_store_disconnect):
11814 * providers/imap/camel-imap-store.c (imap_disconnect): Don't send
11815 QUIT/LOGOUT if !clean.
11817 2000-10-30 Dan Winship <danw@helixcode.com>
11819 * providers/imap/camel-imap-auth.c: New file with code for IMAP
11820 authentication mechanisms. (Currently just krb4, and without
11821 integrity/privacy protection).
11823 * providers/imap/Makefile.am: Add camel-imap-auth.[ch] and krb4
11826 * providers/imap/camel-imap-store.c (connect_to_server): Split out
11827 from imap_connect. Just does the basic connect and CAPABILITY
11828 check. Redo the CAPABILITY code more robustly.
11829 (query_auth_types_connected): Do this right rather than punting to
11830 query_auth_types_generic. Check for KERBEROS_V4 if compiled with
11832 (query_auth_types_generic): Mention KERBEROS_V4 if compiled with
11834 (imap_connect): Use connect_to_server().
11836 * camel-mime-utils.c (base64_encode_step, base64_encode_close):
11837 Take an additional argument, "break_lines", saying whether or not
11838 to add '\n's to the output.
11840 * camel-multipart.c (set_boundary):
11841 * camel-mime-filter-basic.c (filter, complete): Update for base64
11844 2000-10-30 Peter Williams <peterw@helixcode.com>
11846 * providers/imap/camel-imap-store.c (unsubscribe_folder): Correct
11847 parameters to g_hash_table_lookup_extended.
11849 2000-10-29 Dan Winship <danw@helixcode.com>
11851 Improved IMAP namespace handling: leave the namespace in the
11852 folder names rather than constantly prepending it and stripping it
11853 off. Also some subscription fixes.
11855 * camel-store.c (camel_folder_info_build): Fix for the case where
11856 @top isn't in @folders.
11858 * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Add
11859 a "short_name" argument rather than figuring it out ourselves.
11860 (imap_get_full_name): Implementation of CamelFolder::get_full_name
11861 that strips off namespace so the user doesn't have to see it.
11862 (imap_append_message, imap_copy_message_to, imap_move_message_to):
11863 Use folder->full_name rather than calling
11864 camel_imap_store_get_folder_path.
11866 * providers/imap/camel-imap-utils.c (imap_parse_list_response):
11867 Update this: make @flags a bitmask and @sep a char rather than a
11868 string. Make all of the out arguments optional. Handle literals in
11869 the server response.
11871 * providers/imap/camel-imap-store.c (imap_connect): Do a better
11872 job of getting the correct dir_sep for the namespace we're using.
11873 Construct a base_url here that will be used by get_folder_info.
11874 (camel_imap_store_folder_path): Removed
11875 (imap_folder_exists): Add an argument to return the short name of
11876 the folder (parsed out of the LIST response). Update for
11877 imap_parse_list_response change.
11878 (get_folder): Update for the various other changes.
11879 (get_folder_info): Update for the various other changes. Be more
11880 consistent about the returned layout: put everything underneath
11881 the "namespace" directory, including INBOX, even if it doesn't
11882 belong there. Don't destroy the list of subscribed folders until
11883 we've actually gotten the new list.
11884 (folder_subscribed, subscribe_folder, unsubscribe_folder): Use
11885 folder_name directly rather than camel_imap_store_folder_Path.
11887 * providers/imap/camel-imap-command.c (camel_imap_command): Update
11888 for folder name changes.
11890 2000-10-29 Dan Winship <danw@helixcode.com>
11892 * camel.h: Remove md5-utils.h include since it's not part of Camel
11895 * camel-charset-map.c: Kill some warnings.
11897 * providers/nntp/camel-nntp-grouplist.c
11898 (camel_nntp_get_grouplist_from_file, camel_nntp_grouplist_save):
11899 Clean up warnings about time_t casts.
11901 * providers/smtp/camel-smtp-transport.c: Remove unused md5-utils.h
11904 * providers/pop3/camel-pop3-store.c: Undefine the "_" macro
11905 defined by krb4's des.h when compiling with krb support.
11906 Fix md5-utils.h include.
11908 2000-10-27 Dan Winship <danw@helixcode.com>
11910 * camel-mime-utils.c (header_param_list_format_append): Only quote
11911 Content-type parameters when the quoting is mandatory, and deal
11912 with embedded quotes/backslashes when quoting.
11914 2000-10-27 <jpr@helixcode.com>
11916 * providers/pop3/Makefile.am: Tidy up build
11918 * providers/smtp/Makefile.am: ditto
11920 * Makefile.am: Move md5-utils.[hc] to e-util because the
11921 addressbook is going to use md5 hashes for pilot syncing.
11922 Maybe the calendar conduits as well because this is a good idea
11925 2000-10-26 Kjartan Maraas <kmaraas@gnome.org>
11927 * camel-exceptions-list.def: Add newline to kill warnings.
11929 2000-10-25 Dan Winship <danw@helixcode.com>
11931 * providers/imap/camel-imap-store.c (get_folder_info): Fix folder
11932 listing code infinite loop.
11934 * camel-store.h: Add a "parent" field to CamelFolderInfo.
11936 * camel-store.c (camel_folder_info_build): Deal with "parent"
11937 (camel_store_folder_subscribed, camel_store_subscribe_folder,
11938 camel_store_unsubscribe_folder): Add g_return_if_fails checking
11939 that the folder supports subscriptions.
11941 * providers/imap/camel-imap-store.c (folder_subscribed,
11942 subscribe_folder, unsubscribe_folder): Remove "+ 1"s since the
11943 mail subscribe UI won't prepend / to the folder names now.
11944 (get_folder_info): Clear the "parent" field of the folderinfos
11945 when removing an empty top level.
11947 * providers/nntp/camel-nntp-store.c (nntp_store_folder_subscribed,
11948 nntp_store_subscribe_folder, nntp_store_unsubscribe_folder):
11949 Remove "+ 1"s since the mail subscribe UI won't prepend / to the
11952 2000-10-24 Chris Toshok <toshok@helixcode.com>
11954 * providers/imap/camel-imap-store.h: add subscribed_folders.
11956 * providers/imap/camel-imap-store.c (camel_imap_store_class_init):
11957 fill in vtable entries for subscription functions.
11958 (camel_imap_store_finalize): new function, so we can free up our
11959 subscribed_folders hashtable.
11960 (camel_imap_store_init): set CAMEL_STORE_SUBSCRIPTIONS in the
11961 CamelStore flags, and create our subscribed_folders hashtable.
11962 (camel_imap_store_get_type): camel_imap_store_finalize is our
11964 (get_folder_info): if we're looking at subscribed_only, clear out
11965 the subscribed_folders hashtable, use LSUB instead of LIST, and
11966 insert folder paths (prepended by their namespace if there is one)
11967 into subscribed_folders. INBOX subscription support needs work,
11968 since we always show it, regardless of it's subscribed state.
11969 (folder_subscribed): new function. just look up the folder_path
11971 (subscribe_folder): new function. use the imap SUBSCRIBE command,
11972 and if successful add it to the hashtable.
11973 (unsubscribe_folder): new function. use the imap UNSUBSCRIBE
11974 command, and if successful remove it from the hashtable.
11976 2000-10-24 Dan Winship <danw@helixcode.com>
11978 * providers/imap/camel-imap-store.c (get_folder_info): Fill in the
11979 message_count and unread_message_count flags (if !fast).
11981 2000-10-23 Dan Winship <danw@helixcode.com>
11983 * camel-object.h: #include gnome-i18n.h (and gnome-defs.h since
11984 the former depends on it.)
11986 * *: Add lots of _() and N_().
11988 2000-10-23 Chris Toshok <toshok@helixcode.com>
11990 * providers/nntp/Makefile.am (libcamelnntpinclude_HEADERS): add
11991 camel-nntp-types.h.
11993 2000-10-23 Dan Winship <danw@helixcode.com>
11995 * providers/imap/camel-imap-command.c (imap_read_untagged): Fix a
11996 "how could this have been working before" memory overrun bug
11999 * camel-op-queue.[ch], camel-thread-proxy.[ch]: These should have
12000 gone away a long time ago.
12002 2000-10-20 Chris Toshok <toshok@helixcode.com>
12004 * providers/Makefile.am (SUBDIRS): re-enable the nntp provider.
12006 2000-10-20 Chris Toshok <toshok@helixcode.com>
12008 * providers/nntp/camel-nntp-store.c (build_folder_info): add
12009 function to build a tree from the nntp group names (using '.' as a
12010 heirarchy separator.) #ifdefed INFO_AS_TREE only.
12011 (build_folder_info_from_grouplist): if INFO_AS_TREE is selected,
12012 call build_folder_info instead of appending a new CamelFolderInfo
12014 (ensure_news_dir_exists): use e_mkdir_hier instead of failing if a
12015 parent directory (~/evolution/news generally) isn't there.
12017 2000-10-19 Chris Toshok <toshok@helixcode.com>
12019 * camel-folder-search.c: #include <sys/types.h> before <regex.h>
12021 2000-10-19 Dan Winship <danw@helixcode.com>
12023 * providers/imap/camel-imap-utils.c (imap_parse_list_response):
12024 Fix a bug with "INBOX" (or anything else with NIL hierarchy
12025 separator) as the namespace.
12027 * providers/imap/camel-imap-folder.c (imap_refresh_info): Emit
12028 message_changed and folder_changed as appropriate.
12030 2000-10-19 Dan Winship <danw@helixcode.com>
12032 * camel-folder.c (camel_folder_refresh_info): Update comment here
12033 so refresh_info isn't just for reconnects any more. Make the
12034 default implementation a no-op rather than an error.
12036 * providers/nntp/camel-nntp-folder.c: Move refresh_info impl into
12037 camel_nntp_folder_new, since it would have leaked memory and not
12038 done anything useful if it was called later.
12040 * providers/mbox/camel-mbox-folder.c: Remove no-longer-necessary
12043 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
12044 Update imap_folder->exists, but don't actually load the new
12045 messages. This is a temporary workaround to deal with the IMAP
12046 provider stealing the message list focus at annoying times.
12047 (imap_copy_message_to, imap_move_message_to): Emit a
12048 folder_changed by hand, for now.
12050 2000-10-19 Ettore Perazzoli <ettore@helixcode.com>
12052 * providers/imap/Makefile.am (libcamelimapinclude_HEADERS): Add
12053 `camel-imap-stream.h'.
12055 * Makefile.am (libcamelinclude_HEADERS): Add `camel-charset-map.h'
12056 and `camel-charset-map-private.h'.
12058 2000-10-18 Jeffrey Stedfast <fejj@helixcode.com>
12060 * camel-mime-part.c (camel_mime_part_set_description): The correct
12061 fix this time - the description should be encoded here and not in
12062 the camel-medium layer.
12064 2000-10-30 Not Zed <NotZed@HelixCode.com>
12066 * camel-folder.c (camel_folder_change_info_add_update): Fixed the
12067 changeset logic, which was completely wrong.
12069 2000-10-27 Not Zed <NotZed@HelixCode.com>
12071 * camel-mime-utils.c (quoted_encode_step): Removed is_blank() stuff.
12072 (header_decode_init): When we set the 'space' bit, dont clear all
12074 (quoted_encode): Put back the safemask. Yes we totally need it,
12075 see rfc 2047 section 5, parts (1) and (3).
12076 (CHARS_PSPECIAL): Remove '=' and '_' from the list of allowed
12077 characters (this is an allowed list, not a not-allowed list, like
12079 (camel_mime_special_table): Updated for fixes to definitions.
12080 (CHARS_ESPECIAL): Added '_' to list of characters that should be
12083 2000-10-26 Not Zed <NotZed@HelixCode.com>
12085 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_update):
12086 Use the new camel_folder_change_info_* stuff to build the update
12087 diff, rather than doing it ourselves.
12089 * camel-folder.c (camel_folder_change_info_add_source): Add a
12090 'source' list, used to create change lists.
12091 (camel_folder_change_info_add_source_list): Add a list of uid's,
12092 convenience function.
12093 (camel_folder_change_info_add_update): Add a uid to the list of
12094 uid's in the new updated list.
12095 (camel_folder_change_info_add_update_list): Add a bunch of uid's
12096 at once for the same purpose.
12097 (camel_folder_change_info_build_diff): Take the source list, the
12098 update list, and find the differences, building on the added or
12099 removed list as appropriate.
12101 2000-10-20 Not Zed <NotZed@HelixCode.com>
12103 * providers/mbox/camel-mbox-summary.c (removed_uids): REnamed from
12105 (camel_mbox_summary_update): Oops, fix the reversed logic for
12106 determining the uid changesets.
12108 * camel-folder.c (message_changed): Oops, we want to change the
12111 2000-10-19 Not Zed <NotZed@HelixCode.com>
12113 * providers/mh/camel-mh-summary.c (camel_mh_summary_sync): Added a
12114 change list argument, and add expunged uid's to it.
12116 * providers/mh/camel-mh-folder.c (mh_init): Setup the change list.
12117 (mh_finalize): And free it.
12118 (mh_sync): Track changes, and send a folder_changed signal as
12120 (mh_expunge): Likewise.
12121 (mh_append_message): Add the new uid to the change list and
12122 trigger a folder_changed event.
12124 * providers/mbox/camel-mbox-folder.c (camel_mbox_folder_new):
12125 Setup a mbox list of changes structure.
12126 (mbox_finalize): And free it.
12127 (mbox_expunge): Include the change list with the folder_changed
12128 event, and clear it off.
12129 (mbox_sync): And the same for when we are just syncing the folder.
12130 (mbox_append_message): And do the same here, after we've updated
12133 * providers/mbox/camel-mbox-summary.c
12134 (camel_mbox_summary_build_from): Use gmtime_r to get the time
12136 (camel_mbox_summary_sync): Added a changeinfo argument. Add any
12137 removed or changed messages to the changelists as appropriate.
12138 (camel_mbox_summary_update): Added a changeinfo argument.
12139 Genereate a list of added/removed uid's based on the difference
12140 before and after rebuilding the summary.
12142 * camel-folder.c (camel_folder_change_info_new):
12143 (camel_folder_change_info_add_uid):
12144 (change_info_add_uid):
12145 (camel_folder_change_info_remove_uid):
12146 (camel_folder_change_info_change_uid):
12147 (change_info_clear):
12148 (camel_folder_change_info_clear):
12149 (camel_folder_change_info_free):
12151 (camel_folder_change_info_cat): Bunch of utility functions for
12152 working with change info lists.
12153 (camel_folder_init): Init the change info list.
12154 (camel_folder_finalize): And free it.
12155 (thaw): Changed to pass through a list of changes, or to get the
12156 changed message uids from the camelfolderchangeinfo struct, and
12158 (folder_changed): Add the changed lists to the frozen change list
12160 (message_changed): Add the message to the changed list if we are
12161 in the frozen state.
12163 * camel-folder.h (CamelFolderChangeInfo): New structure to hold
12164 information for the folder_changed event.
12166 2000-10-18 Ettore Perazzoli <ettore@helixcode.com>
12168 * camel-mime-filter-charset.c (complete): Put a zero at the start
12171 2000-10-18 Not Zed <NotZed@HelixCode.com>
12173 * camel-mime-part.c (add_header): No, we must not encode the
12174 headers here. These interfaces ARE raw interfaces as they are
12175 defined in camel_medium. Also removed a bogus/meaningless FIXME.
12176 (set_header): Likewise here, we must not.
12177 (process_header): Removed another bogus comment.
12179 * camel-object.c (shared_is_of_type): Comment out the spitting of
12180 a big warning when we're trying to determine types from code.
12182 * providers/mbox/camel-mbox-summary.c
12183 (message_info_new_from_parser): Only call ibex funcitons if we
12186 * providers/mh/camel-mh-summary.c (camel_mh_summary_add): Only
12187 call ibex functions if we have an index.
12188 (remove_summary): Likewise.
12189 (camel_mh_summary_check): Likewise.
12191 * providers/nntp/camel-nntp-store.c (nntp_store_get_folder):
12192 get_folder -> flags argument.
12194 * providers/vee/camel-vee-store.c (vee_get_folder): create->flags.
12196 * providers/pop3/camel-pop3-store.c (get_folder): Changed create
12199 * providers/imap/camel-imap-store.c (get_folder): Added flags
12202 * providers/mh/camel-mh-folder.c (camel_mh_folder_new): Added
12203 flags argument, and fixed code appropriately.
12205 * providers/mh/camel-mh-store.c (get_folder): Added flags argument.
12207 * camel-folder-search.c (message_body_contains): Perform a regex
12208 match on the contents of messages. This wont quite work yet as
12209 message contents are encoded when written to a stream.
12210 (build_match_regex): Converts a number of strings into a regex
12211 matching pattern, escaping special chars.
12212 (match_message): match a single message from a folder, by uid.
12214 (search_body_contains): Changed to support matching where no index
12215 is supplied. Matches are performed by retrieving message
12217 () WTF? camel should not be including any widget headers.
12219 * providers/mbox/camel-mbox-folder.c (camel_mbox_folder_new):
12220 Added flags argument.
12221 (mbox_refresh_info): Changed into a NOP, the refresh info code
12222 moved into the new function.
12223 (camel_mbox_folder_new): If we have an index requested, build one,
12224 otherwise, remove an old one, or just dont do anything.
12226 * providers/mbox/camel-mbox-store.c (get_folder): Changed create
12227 to flags, changed code to suit.
12229 * camel-store.c (camel_store_get_folder): Changed create to flags.
12230 (get_folder_internal): And here.
12231 (get_folder): And here too.
12233 * camel-store.h (camel_store_get_folder): Change the create
12234 argument to be a flags argument.
12236 2000-10-17 Dan Winship <danw@helixcode.com>
12238 * providers/imap/camel-imap-folder.c (imap_refresh_info): Remove
12239 cached info at the end of the summary when the folder shrinks
12240 between sessions. Also remove an untrue comment.
12241 (camel_imap_folder_new): Move the summary creation to after the
12242 folder selection again, since it depends on the uidvalidity
12245 * providers/imap/camel-imap-store.c (get_folder): Fix up
12246 summary_file to not include the namespace twice.
12248 2000-10-17 Jeffrey Stedfast <fejj@helixcode.com>
12250 * camel-mime-part.c (set_header): Encode the header value.
12251 (add_header): Same.
12253 2000-10-17 Not Zed <NotZed@HelixCode.com>
12255 * camel-mime-filter.c: Added some malloc check debugging stuff.
12257 * camel-mime-parser.c
12258 (struct _header_scan_state): Removed top_part, top_start, and
12259 pending. I can't even remember why they were there, and they're
12262 * camel-mime-filter-basic.c (filter): Forgot to up the space here
12265 2000-10-14 Not Zed <NotZed@HelixCode.com>
12267 * camel-mime-filter-basic.c (complete): Ok, so we hit a fixme, 3x
12268 just wasn't enough for some sequences.
12270 2000-10-16 Jeffrey Stedfast <fejj@helixcode.com>
12272 * providers/imap/camel-imap-command.c
12273 (imap_read_response): Don't imap_next_word(respbuf + 2), instead
12274 use imap_next_word(respbuf) or else we'll skip over the second
12277 2000-10-16 Jeffrey Stedfast <fejj@helixcode.com>
12279 * providers/imap/camel-imap-command.c
12280 (camel_imap_response_extract): Don't free 'resp' as it doesn't
12281 point to the beginning of the allocated data, instead free
12282 response->untagged->pdata[i]. Also, if '*resp' is equal to a space
12283 character, then set resp = imap_next_word (resp) rather than
12284 expecting resp++ to work (there's a list broken IMAP daemons that
12285 like to put extra spaces between tokens).
12286 (imap_read_response): Don't expect 'respbuf+2' to be where the
12287 untagged number response to start (see above fix for an
12290 2000-10-16 Chris Toshok <toshok@helixcode.com>
12292 * camel-service.c (get_path): when using the construct (flags &
12293 CAMEL_SERVICE_URL_NEED_*) make sure to do ((flags &
12294 CAMEL_SERVICE_URL_NEED_*) == CAMEL_SERVICE_URL_NEED_*)
12297 2000-10-16 Jeffrey Stedfast <fejj@helixcode.com>
12299 * providers/imap/camel-imap-store.c (imap_disconnect): Only send
12300 the LOGOUT command if the store is connected.
12301 (imap_connect): Set the 'connected' state to TRUE when we
12302 successfully connect.
12303 (get_folder_info): if (!topfi), 'topfi' was allocated but then
12304 'fi' was set. I think Dan meant to set topfi since fi is an
12305 uninitialized value at this point.
12307 * providers/imap/camel-imap-command.c (imap_read_response): Check
12308 for the untagged BYE response and set the 'connected' state to
12309 FALSE if we receive the BYE response. Return NULL if we get a BYE
12312 2000-10-16 Dan Winship <danw@helixcode.com>
12314 * providers/imap/camel-imap-store.c (get_folder_info): Deal with
12315 the possibility of not getting a LIST response back for the top
12318 2000-10-12 Dan Winship <danw@helixcode.com>
12320 * providers/imap/camel-imap-summary.c: Simple subclass of
12321 CamelFolderSummary that also keeps a UIDVALIDITY value (and
12322 doesn't, for the moment, build content info).
12324 * providers/imap/camel-imap-folder.c:
12325 (various): Use a CamelImapSummary to store/fetch summary info.
12326 (camel_imap_folder_new): Take a path to a file to use for the
12327 summary. Set the folder's permanent_flags correctly according to
12328 the server response. Read in the summary (checking the
12329 UIDVALIDITY) and update it if it's out of date.
12330 (imap_refresh_info): Just fetch UIDs and flags. If the UIDs all
12331 match, update the flags as needed and be done with it. Otherwise,
12332 delete messages that have been expunged from the server and fetch
12333 full summary info for any new messages.
12334 (imap_sync): Save the summary to disk.
12335 (imap_update_summary): Renamed from imap_get_summary_internal. Can
12336 now be told to get summary for only a subset of messages. Use
12337 camel-mime-utils functions rather than rolling our own header
12339 (imap_get_message_info_internal): Merged into imap_update_summary.
12340 (imap_set_message_flags): Don't marked the message FOLDER_FLAGGED
12341 if we're not actually changing the value of any of the flags.
12342 (camel_imap_folder_changed): Deal with EXISTS rather than RECENT.
12344 * providers/imap/camel-imap-store.c (imap_connect): Call
12345 camel_session_get_storage_path and save the value.
12346 (get_folder): Create a local directory to store summary
12347 information and pass a summary file name to camel_imap_folder_new.
12348 Don't call camel_folder_refresh_info from here any more since
12349 camel_imap_folder_new does it again.
12351 * providers/imap/camel-imap-command.c (camel_imap_command): Add a
12352 special case to this to make it possible to get the repsonses from
12353 a SELECT and still have store->current_folder be updated
12355 (imap_read_response): parse EXISTS rather than RECENT
12357 * camel-session.c (camel_session_get_storage_path): Use
12360 * camel-folder-summary.c (camel_folder_summary_remove_index): New
12363 * camel-mime-utils.c (header_raw_append_parse): fix this.
12364 (camel-mime-parser.c doesn't use this code because of the MEMPOOL
12365 optimization, so nothing was ever actually calling it before.)
12367 2000-10-11 Not Zed <NotZed@HelixCode.com>
12369 * camel-mime-part.h (struct _CamelMimePart): Removed
12370 temp_message_buffer, and content_input_stream fields which seem to
12371 have come from nowhere, and are unused.
12373 * camel-mime-utils.c: Added a note about touching this file.
12374 Nobody is to touch it without asking me first. That goes for you
12376 (header_decode_text): In what way is this broken?
12378 2000-10-10 Not Zed <NotZed@HelixCode.com>
12380 * providers/imap/camel-imap-folder.c (imap_get_summary_internal):
12381 Fix camel_summary_* function rename
12382 (imap_get_message_info_internal): Likewise.
12384 * camel-mime-parser.c (camel_mime_parser_finalise): Fixed a spelling mistake.
12386 * camel-folder-summary.c (camel_summary_format_address): Uh, why
12387 do we encode and then decode here ... sigh. This is not the way
12389 (camel_folder_summary_format_address): Renamed to a proper name,
12390 this was only supposed to be a private function.
12391 (camel_folder_summary_format_string): Likewise. Oh i see why it
12392 was made public, code reuse by cut & paste. Joy.
12394 2000-10-11 Chris Toshok <toshok@helixcode.com>
12396 * providers/nntp/camel-nntp-store.c (nntp_store_unsubscribe_folder): remove the leading '/'.
12397 (nntp_store_subscribe_folder): same.
12398 (nntp_store_folder_subscribed): same.
12400 2000-10-11 Jeffrey Stedfast <fejj@helixcode.com>
12402 * providers/imap/camel-imap-folder.c (imap_move_message_to): Quote
12403 the mailbox name as it may contain spaces.
12404 (imap_copy_message_to): Same.
12406 2000-10-10 Chris Toshok <toshok@helixcode.com>
12408 * providers/nntp/camel-nntp-store.c
12409 (build_folder_info_from_grouplist): fill in message_count and
12410 unread_message_count properly.
12412 * providers/nntp/camel-nntp-newsrc.h: reformat.
12414 * providers/nntp/camel-nntp-grouplist.c
12415 (camel_nntp_get_grouplist_from_file): remove spew.
12417 * providers/nntp/camel-nntp-newsrc.c
12418 (camel_nntp_newsrc_group_get_num_articles_read): new function.
12419 (camel_nntp_newsrc_group_get_highest_article_read): robustification.
12421 2000-10-10 Joe Shaw <joe@helixcode.com>
12423 * providers/imap/camel-imap-store.c
12424 (parse_list_response_as_folder_info): Check before dereferencing the
12427 2000-10-10 Jacob "Ulysses" Berkman <jacob@helixcode.com>
12429 * camel-*.c: teach camel about "its" vs. "it's"
12431 2000-10-09 Chris Toshok <toshok@helixcode.com>
12433 * providers/nntp/camel-nntp-store.c (finalize): write out the
12435 (nntp_store_get_name): if @brief, just return host.
12437 * providers/nntp/camel-nntp-newsrc.c: robustification and bug
12440 2000-10-06 Jeffrey Stedfast <fejj@helixcode.com>
12442 * camel-folder-summary.c (camel_summary_format_address): Decode
12443 the resulting string.
12445 2000-10-06 Chris Toshok <toshok@helixcode.com>
12447 * providers/nntp/camel-nntp-grouplist.c: new file.
12449 * providers/nntp/camel-nntp-grouplist.h: new file.
12451 * providers/nntp/camel-nntp-types.h: new file.
12453 2000-10-06 Jeffrey Stedfast <fejj@helixcode.com>
12455 * camel-mime-utils.c (quoted_encode): Fix so that we don't encode
12456 every single char in the word. Also, do we need a safemask? I
12457 don't see why we would.
12458 (header_encode_string): Don't strip off the last char!!
12460 2000-10-06 Chris Toshok <toshok@helixcode.com>
12462 * providers/nntp/Makefile.am (libcamelnntpinclude_HEADERS): add
12463 camel-nntp-grouplist.h
12464 (libcamelnntp_la_SOURCES): add camel-nntp-grouplist.c
12466 * providers/nntp/camel-nntp-provider.c: add our own hash functions
12469 * providers/nntp/camel-nntp-newsrc.c
12470 (camel_nntp_newsrc_group_is_subscribed): new function.
12471 (camel_nntp_newsrc_subscribe_group): new function.
12472 (camel_nntp_newsrc_unsubscribe_group): new function.
12474 * providers/nntp/camel-nntp-newsrc.h: add prototypes for
12475 _group_is_subscribed, _subscribe_group, and _unsubscribe_group.
12477 * providers/nntp/camel-nntp-store.c
12478 (build_folder_info_from_grouplist): new function.
12479 (nntp_store_get_folder_info): add subscribed_only_parameter. if
12480 it's FALSE, load the grouplist and call
12481 build_folder_info_from_grouplist.
12482 (nntp_store_folder_subscribed): implement.
12483 (nntp_store_subscribe_folder): implement.
12484 (nntp_store_unsubscribe_folder): implement.
12485 (camel_nntp_store_init): add CAMEL_STORE_SUBSCRIPTIONS to the
12488 * providers/mh/camel-mh-store.c (get_folder_info): add
12489 subscribed_only parameter.
12491 * providers/mbox/camel-mbox-store.c (get_folder_info): add
12492 subscribed_only parameter.
12494 * providers/imap/camel-imap-store.c (get_folder_info): add
12495 subscribed_only parameter.
12497 * camel-store.c (camel_store_supports_subscriptions): new function.
12498 (camel_store_folder_subscribed): new function.
12499 (camel_store_subscribe_folder): new function.
12500 (camel_store_unsubscribe_folder): new function.
12502 * camel-store.h: add prototypes and virtual functions for the
12503 subscribe implementation. also, add a subscribed_only argument to
12504 camel_store_get_folder_info.
12506 2000-10-05 Jeffrey Stedfast <fejj@helixcode.com>
12508 * camel-mime-utils.c (header_address_list_format_append): Encode
12509 the name part of the address and don't quote the name.
12510 (header_decode_text): Rewrote from scratch, the old code was badly
12513 2000-10-05 Jeffrey Stedfast <fejj@helixcode.com>
12515 * camel-mime-message.c (camel_mime_message_set_reply_to): Use the
12516 camel_address_encode function again.
12517 (camel_mime_message_set_from): Same.
12519 2000-10-05 Jeffrey Stedfast <fejj@helixcode.com>
12521 * camel-mime-utils.c (quoted_encode_step): Modified to not encode
12522 space chars in the middle of a line.
12523 (isblank): New macro if we're not on a system with the GNU isblank
12526 * camel-mime-message.c (camel_mime_message_set_from): Reversed my
12527 changes, don't header_encode_phrase - it generates broken headers.
12528 (camel_mime_message_set_reply_to): Same.
12530 2000-10-04 Chris Toshok <toshok@helixcode.com>
12532 * providers/nntp/camel-nntp-utils.c (camel_nntp_get_headers):
12533 revert to old method (only use XOVER if OVER is supported.)
12535 * providers/nntp/camel-nntp-store.c
12536 (camel_nntp_store_get_overview_fmt): handle the case where the
12537 OVER extension isn't listed but LIST OVERVIEW.FMT works (again,
12538 INN 2.2). enable the OVER extension in this case.
12540 2000-10-04 Chris Toshok <toshok@helixcode.com>
12542 * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): return a
12543 gboolean so we can tell if this command worked. we can't key off
12544 the OVER extension being present because at least one server (INN
12545 2.2) doesn't report the OVER extension but implements the XOVER
12546 command. This could of course just be because I'm a loser for
12547 thinking they were related in the first place.
12548 (camel_nntp_get_headers): always try XOVER first, and if it fails
12549 revert to the slow method.
12551 2000-10-04 Dan Winship <danw@helixcode.com>
12553 * providers/mbox/camel-mbox-store.c (get_folder): Fix a case where
12554 a variable was free'd and then possibly used in an error message.
12556 2000-10-04 Chris Toshok <toshok@helixcode.com>
12558 * providers/nntp/camel-nntp-provider.c
12559 (camel_provider_module_init): news: -> nntp:.
12561 2000-10-04 Chris Toshok <toshok@helixcode.com>
12563 * providers/nntp/camel-nntp-store.c (nntp_store_get_folder_info):
12564 use "nntp:" instead of "news:" since "news:" urls aren't supposed
12565 to have host/user/port info in them. also, if there's a user
12566 defined in the url, put it in the urls for our folders.
12568 2000-10-04 Chris Toshok <toshok@helixcode.com>
12570 * providers/nntp/camel-nntp-auth.c (camel_nntp_auth_authenticate):
12571 borrow some code from the imap provider to query the user for
12572 their password, and pass the user/passwd to nntp. be extra
12573 paranoid and zero out the password before freeing it.
12575 * providers/nntp/camel-nntp-store.c (camel_nntp_store_init): add
12576 ALLOW_USER/ALLOW_PASSWORD/ALLOW_AUTH to the url flags.
12577 (nntp_store_query_auth_types_generic): return our list of
12579 (nntp_store_query_auth_types_connected): broken, return same as in
12580 query_auth_types_generic.
12582 2000-10-04 Dan Winship <danw@helixcode.com>
12584 * providers/imap/camel-imap-store.c (imap_connect): IMAP4
12585 (pre-rev1) doesn't support the 'LIST "" ""' idiom, so don't use
12586 it. Just assume the dir_sep is '/'. Shrug.
12588 2000-10-04 Jeffrey Stedfast <fejj@helixcode.com>
12590 * camel-mime-message.c (camel_mime_message_set_reply_to): Use
12591 header_encode_phrase instead.
12592 (camel_mime_message_set_from): Same.
12594 2000-10-04 Not Zed <NotZed@HelixCode.com>
12596 * camel-mime-utils.c (header_content_type_is): Handle the case
12597 where ct != NULL, but type and subtype are, and also match that
12598 against text/plain.
12600 * camel-folder-summary.c: Bump summary file version.
12601 (message_info_save): Save the size from the messageinfo.
12602 (message_info_load): Load the size from the summary file.
12603 (message_info_load): Fixed up the time_t saving/loading. There
12604 was a reason the warning was left there ... obviously nobody could
12605 read the comment "/* warnings, leave them here */", why do i even
12607 (camel_folder_summary_decode_time_t): Decode a time_t value from
12609 (camel_folder_summary_encode_time_t): Encode a time_t value to the
12612 2000-10-03 Jeffrey Stedfast <fejj@helixcode.com>
12614 * providers/imap/camel-imap-command.c (camel_imap_command): Quote
12615 the mailbox name when sending a SELECT request otherwise mailboxes
12616 with spaces in their names will cause problems.
12618 * camel-mime-message.c (camel_mime_message_set_reply_to): encode
12620 (camel_mime_message_set_from): Same.
12622 2000-10-03 Dan Winship <danw@helixcode.com>
12624 * providers/imap/camel-imap-command.c: New file containing
12625 camel_imap_command and friends. Major camel_imap_command rewrite
12626 to remove duplicated code, make the parsing of literals be
12627 more safe/correct, deal with RECENT/EXPUNGE responses more
12628 consistently, and make it possible to implement the AUTHENTICATE
12631 * providers/imap/camel-imap-utils.c (imap_parse_nstring): New
12632 function, to parse an IMAP "nstring".
12634 * providers/imap/camel-imap-store.c: Move command stuff to
12635 camel-imap-command.c. Update for camel_imap_command changes.
12637 * providers/imap/camel-imap-folder.c: Update for
12638 camel_imap_command changes.
12639 (imap_append_message): CRLF filter the message before sending it.
12641 * providers/imap/Makefile.am: Add camel-imap-command.[ch], remove
12642 camel-imap-stream.[ch] for now.
12644 2000-10-02 Jeffrey Stedfast <fejj@helixcode.com>
12646 * camel-mime-message.c (camel_mime_message_has_8bit_parts): New
12647 convenience function to determine if there are any 8bit mime parts
12649 (camel_mime_message_encode_8bit_parts): New convenience function
12650 to recursively reencode all 8bit mime parts to either
12651 quoted-printable or base64 depending on which would be the best
12652 encoding for that part.
12654 * providers/smtp/camel-smtp-transport.c (smtp_data): If the mime
12655 message contains 8bit parts and the server doesn't support 8bit
12656 transfers, reencode those parts before proceding with the send.
12657 (smtp_mail): If the mime message contains 8bit parts and the
12658 server supports the 8BITMIME extension to SMTP, notify the server
12659 that we'll be sending it 8bit mime parts.
12660 (_send_to): Find out if the message contains 8bit parts.
12662 2000-10-02 Jeffrey Stedfast <fejj@helixcode.com>
12664 * providers/smtp/camel-smtp-transport.c (_send_to): Use the
12665 CamelInternetAddress parser.
12666 (smtp_get_email_addr_from_text): deprecated.
12668 2000-10-02 Dan Winship <danw@helixcode.com>
12670 * camel-provider.h: Remove default_ports.
12672 * camel-remote-store.c (remote_connect): Get default_port from
12673 CamelRemoteStore rather than CamelProvider.
12675 * providers/{imap,nntp,pop3}/camel-*-store.c: Initialize
12676 CamelRemoteStore::default_port
12678 * providers/*/camel-*-provider.c: Remove default_ports.
12680 2000-10-02 Dan Winship <danw@helixcode.com>
12682 * camel-folder.[ch]: Remove
12683 camel_folder_{get,free}_subfolder_info, as we want to be able to
12684 scan the whole subfolder tree without having to open any folders,
12685 so this needs to be in CamelStore. Remove can_hold_folders and
12686 can_hold_messages flags; things that don't hold messages are no
12687 longer considered CamelFolders.
12689 * camel-folder-summary.[ch]: Remove CamelFolderInfo stuff.
12691 * camel-store.[ch]: Add camel_store_{get,free}_folder_info, as
12692 well as camel_store_free_folder_info_full and ..._nop for default
12693 implementations, and camel_folder_info_free and
12694 camel_folder_info_build as convenience functions. Turn
12695 CamelFolderInfo into a tree structure and also add an "url"
12698 * providers/*/camel-*-folder.c: Remove subfolder_info and can_hold
12700 * providers/*/camel-*-store.c: Add folder_info stuff.
12702 * providers/imap/camel-imap-folder.c (imap_summary_free): Free the
12703 summary elements with camel_message_info_free, not
12704 camel_folder_info_free. Oops.
12706 * providers/imap/camel-imap-utils.c: const poison
12708 2000-09-28 Jeffrey Stedfast <fejj@helixcode.com>
12710 * providers/smtp/camel-smtp-transport.c: Fixed some memory leaks.
12711 (camel_smtp_transport_init): Initialize supports_8bit to FALSE.
12712 (smtp_helo): If server supports 8bit, set supports_8bit to TRUE.
12714 * camel-transport.h (struct _CamelTransport): Added variable
12715 gboolean supports_8bit (we'll need this eventually? - see bugzilla
12718 * providers/smtp/camel-smtp-transport.c
12719 (smtp_get_email_addr_from_text): Ugh, no wonder people were
12720 getting illegal seek warnings *sigh*. I guess I can only blame
12721 myself for this one though :-(
12723 2000-09-28 Jeffrey Stedfast <fejj@helixcode.com>
12725 * providers/smtp/camel-smtp-transport.c (_send_to): Don't send the
12726 recipient data through smtp_get_email_addr_from_text - this is a
12727 complete waste. In fact, we don't want to have to use that
12730 * camel-internet-address.c, camel-address.c: Added some gtk-doc
12733 2000-09-28 Jeffrey Stedfast <fejj@helixcode.com>
12735 * camel-mime-utils.c (header_encode_string): Make sure to add the
12736 space char after an encoded word when the encoding is iso-8859-1.
12738 2000-09-28 Jeffrey Stedfast <fejj@helixcode.com>
12740 * providers/imap/camel-imap-folder.c (imap_get_message): When
12741 getting a literal string response, don't include the \r\n after
12742 the closing } (as in: "... {798}\r\n...")
12744 * providers/imap/camel-imap-stream.c (stream_read): Same.
12746 2000-09-28 Not Zed <NotZed@HelixCode.com>
12748 * camel-mime-utils.c (header_fold): New function to fold headers.
12750 2000-09-27 Not Zed <NotZed@HelixCode.com>
12752 * camel-mime-parser.c (folder_scan_header): If we had an empty
12753 header, then it must be end of the headers too.
12754 (folder_scan_init): No we dont need to init the outbuf with a nul
12757 * camel-folder-summary.c (camel_folder_summary_set_uid): New
12758 function to reset the uid to a higher value.
12760 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
12761 "something failed (yo!)" what sort of crap is this? Fixed all the
12762 indenting again, what wanker keeps running stuff through indent?
12763 (message_info_new): Check the uid we loaded off the disk, if it
12764 existed already, assign a new one. If it didn't then make sure
12765 the nextuid is higher.
12767 * camel-charset-map.c: New file, used to build a large unicode
12768 decoding mapping table, and use it to determine what is the
12769 lowest charset a given word can be encoded with. Uses tables from
12770 libunicode's source.
12772 * camel-internet-address.c (internet_encode): Use
12773 header_phrase_encode to properly encode the fullname, as required.
12774 refixed indenting. Who keeps doing that?
12775 (camel_internet_address_find_address): Changed fatal return/warnings
12778 * camel-mime-utils.c (header_raw_append_parse): Check : explicitly
12779 (removed from is_fieldname() macro).
12780 (camel_mime_special_table): Changed to short, so we can represent
12782 (quoted_encode): Take a mask of the safe chars for this encoding.
12783 (header_address_decode): Removed a #warning that makes no sense
12785 (header_decode_date): Fixed the 'broken date' parser code, if it
12786 ever decoded it it just threw away the result.
12787 (header_encode_string): Use better charset matching for encoding
12790 2000-08-31 Not Zed <NotZed@HelixCode.com>
12792 * providers/mh/camel-mh-summary.c (camel_mh_summary_sync): Save
12793 the index if we do a sync.
12794 (camel_mh_summary_check): Save the index here too. Probably.
12796 2000-09-27 Dan Winship <danw@helixcode.com>
12798 * providers/imap/camel-imap-store.c (camel_imap_command_extended):
12799 Return untagged data in a GPtrArray rather than a string, since it
12800 saves processing time and is much easier to deal with for several
12801 commands. Update for camel_imap_folder_changed change.
12802 (camel_imap_fetch_command): Update for camel_imap_folder_changed
12804 (imap_connect, imap_folder_exists): Update for
12805 camel_imap_command_extended change.
12807 * providers/imap/camel-imap-folder.c
12808 (imap_get_message_count_internal,
12809 imap_get_subfolder_info_internal, imap_search_by_expression):
12810 Update for camel_imap_command_extended change.
12812 (imap_get_summary_internal, imap_get_message_info_internal): Use
12813 camel_imap_fetch_command here now to get around the
12814 camel_imap_command_extended change.
12816 (camel_imap_folder_changed): turn expunged into a GArray of ints
12817 rather than a GPtrArray of strings representing ints.
12819 2000-09-26 Jeffrey Stedfast <fejj@helixcode.com>
12821 * providers/imap/camel-imap-folder.c
12822 (imap_get_message_count_internal): Quote the folder name as it may
12824 (imap_get_subfolder_info_internal): Same.
12826 * providers/imap/camel-imap-utils.c (imap_parse_list_response): Do
12827 proper unquoting for folder names.
12828 (func_get_current_date): Implemented.
12830 * providers/imap/camel-imap-store.c
12831 (imap_folder_exists): Quote the folder name as it may have spaces.
12832 (imap_create): Same.
12833 (check_current_folder): Same.
12835 2000-09-22 Dan Winship <danw@helixcode.com>
12837 * providers/imap/camel-imap-folder.c
12838 (imap_get_subfolder_info_internal): The root folder's name is "",
12840 (camel_imap_folder_new): constify folder_name.
12842 * providers/imap/camel-imap-store.c (get_folder): Create the
12843 folder with folder_name, not folder_path.
12844 (camel_imap_command_preliminary): Don't free cmdid here.
12846 2000-09-21 Dan Winship <danw@helixcode.com>
12848 * providers/imap/camel-imap-utils.c (imap_create_flag_list): New
12849 function to convert Camel flags to an IMAP flag_list.
12850 (imap_parse_flag_list): Contrariwise.
12852 * providers/imap/camel-imap-store.c (camel_imap_command_*): Make
12853 the @ret arg actually optional, as (mostly) documented.
12854 (various): Don't pass "&result" to camel_imap_command_* if we're
12855 just going to immediately free it. Don't record status if we're
12856 not going to look at it.
12858 * providers/imap/camel-imap-folder.c: Likewise.
12859 (imap_summary_free): Use camel_folder_info_free.
12860 (imap_sync): Use imap_create_flag_list. Clear
12861 CAMEL_MESSAGE_FOLDER_FLAGGED after syncing so we don't keep
12863 (imap_append_message): Use imap_create_flag_list. Don't leak the
12864 memstream if the append fails.
12865 (imap_move_message_to): Use camel_folder_delete_message rather
12866 than doing it by hand.
12867 (imap_get_summary_internal, imap_get_message_info_internal): Use
12868 imap_parse_flag_list and header_raw_clear.
12869 (camel_imap_folder_changed): Use camel_message_info_free.
12871 2000-09-21 Dan Winship <danw@helixcode.com>
12873 * providers/imap/camel-imap-store.c (get_folder_name): INBOX is
12875 (get_root_folder_name): Make the root folder "" rather than "/".
12876 (get_folder): Update for root folder name change.
12877 (camel_imap_store_get_toplevel_dir): Removed. (Unused, unneeded.)
12878 (camel_imap_store_folder_path): New function to turn a Camel
12879 folder name into the corresponding namespaced IMAP path.
12880 (imap_folder_exists): Make this take a store and a path rather
12882 (imap_create): Likewise
12883 (get_folder): Update for camel_imap_store_folder_path and other
12885 (check_current_folder): Likewise.
12887 * providers/imap/camel-imap-folder.c: Change a bunch of CamelStore
12888 variables to CamelImapStore (and add a few more) to prevent excess
12889 gratuitous casting. Use camel_imap_store_folder_path where
12891 (camel_imap_folder_new): Update for root folder name change.
12893 2000-09-19 Jeffrey Stedfast <fejj@helixcode.com>
12895 * providers/smtp/camel-smtp-transport.c (smtp_data): Use the
12896 linewrap filter to achieve full RFC0821 compliance.
12898 * camel-mime-filter-linewrap.[c,h]: New mime-filter to word-wrap.
12900 2000-09-19 Jeffrey Stedfast <fejj@helixcode.com>
12902 * camel-internet-address.c (internet_encode): When encoding the
12903 internet address, quote the name as the name may have commas or
12904 any other token which may later confuse our address parser.
12906 2000-09-19 Dan Winship <danw@helixcode.com>
12908 * providers/imap/camel-imap-folder.c
12909 (imap_get_subfolder_info_internal): Fix the case where INBOX
12910 isn't returned in the folder listing.
12912 2000-09-19 Dan Winship <danw@helixcode.com>
12914 * camel-folder.c: (init): Removed
12915 (camel_folder_init, camel_folder_construct): New object init
12916 function and public object constructor to replace the old init
12917 method in a more Gtk-like fashion.
12919 (get_parent_folder, camel_folder_get_parent_folder): Removed. No
12920 CamelFolder subclass was ever setting the parent_folder member, no
12921 code has ever needed to look at it, and fixing it would actually
12924 (get_subfolder_info, camel_folder_get_subfolder_info): Renamed
12925 from ..._names. Deals in CamelFolderInfo now.
12926 (free_subfolder_info, camel_folder_free_subfolder_info): Likewise.
12928 (get_subfolder, camel_folder_get_subfolder): Removed.
12929 CamelFolderInfo contains the subfolder's full name, so this is
12930 unnecessary now, and removing it lets us get rid of the
12931 CamelFolder separator member, which is needed for the default
12932 implementation of this function, but not otherwise needed for most
12935 Also, lots of code style fixes.
12937 * providers/*: Update CamelFolder subclasses for changes, although
12938 none of them fill in the message counts in the CamelFolderInfo
12941 2000-09-18 Christopher James Lahey <clahey@helixcode.com>
12943 * camel-folder-search.c, camel-folder-search.h,
12944 camel-remote-store.c, providers/imap/camel-imap-folder.c,
12945 providers/imap/camel-imap-store.c: Fixed the #include lines to
12946 deal properly with gal.
12948 2000-09-17 Dan Winship <danw@helixcode.com>
12950 * camel-folder-summary.h: update CamelFolderInfo
12951 * camel-folder-summary.c (camel_folder_info_free): New function to
12952 free the contents of a CamelFolderInfo
12954 2000-09-15 Dan Winship <danw@helixcode.com>
12956 * camel.c (camel_init): Set camel_verbose_debug to TRUE if
12957 CAMEL_VERBOSE_DEBUG is set in the environment.
12959 * camel-remote-store.c (remote_send_line, remote_recv_line): only
12960 log if camel_verbose_debug is TRUE.
12962 2000-09-14 Jeffrey Stedfast <fejj@helixcode.com>
12964 * providers/imap/camel-imap-store.c (get_folder): Don't use
12965 dir_sep as top-level directory, use "/".
12967 * providers/imap/camel-imap-folder.c (imap_expunge): Get rid of
12970 2000-09-13 Dan Winship <danw@helixcode.com>
12972 * providers/imap/camel-imap-folder.c (imap_expunge): Don't look at
12973 the response of the command. camel_imap_command_extended()
12974 processes EXPUNGE responses itself, so if we do it here too we
12975 remove twice as many summary items as we should.
12977 2000-09-13 Jeffrey Stedfast <fejj@helixcode.com>
12979 * providers/imap/camel-imap-store.c (imap_folder_exists): Rewrote
12980 to take a third argument (gboolean *selectable) so that we can
12981 find out if the folder is selectable or not as we look to see if
12982 it exists. Also, don't use EXAMINE because that will not work on
12983 non-selectable folders, so use LIST instead.
12984 (get_folder): Check to see if the folder exists even vefore
12985 calling imap_create as this will save time. If the folder does
12986 exist, find out if it's selectable. Moved the call to refresh_info
12989 * providers/imap/camel-imap-folder.c (imap_get_uids): Check for a
12991 (camel_imap_folder_new): Don't call refresh_info here - call it in
12992 get_folder() because we don't know if this folder even exists on
12993 the server yet! And even if it does, we don't know if it can hold
12994 messages or not yet.
12996 2000-09-12 Jeffrey Stedfast <fejj@helixcode.com>
12998 * camel-mime-parser.c (folder_scan_step): Make sure *datalength is
12999 > 0 before calling camel_mime_filter_filter otherwise we will get
13000 a segfault if the filter calls iconv().
13002 2000-09-08 Christopher James Lahey <clahey@helixcode.com>
13004 * providers/nntp/camel-nntp-auth.c,
13005 providers/nntp/camel-nntp-auth.h: Fixed a warning.
13007 2000-09-07 Dan Winship <danw@helixcode.com>
13009 * camel-session.c (camel_session_get_storage_path): Make this not
13012 2000-09-07 Dan Winship <danw@helixcode.com>
13014 * camel-session.c (camel_session_new): Make this take a path to a
13015 directory that Camel can use for its own nefarious purposes.
13016 (camel_session_get_storage_path): New function to return a path
13017 that a service can use for its own nefarious sub-purposes.
13019 * camel-service.c (camel_service_get_path): New method (and
13020 useful default implementation) to get a (relative) pathname
13021 corresponding to the service.
13023 2000-09-06 Dan Winship <danw@helixcode.com>
13025 * providers/pop3/camel-pop3-store.c (connect_to_server): Make KPOP
13028 2000-09-06 Jeffrey Stedfast <fejj@helixcode.com>
13030 * camel-mime-message.c (camel_mime_message_get_received_date):
13031 Implemented (someone added these to camel-mime-message.h but never
13032 implemented them!!) - though it may not be right.
13033 (camel_mime_message_get_sent_date): Same.
13035 2000-09-05 Dan Winship <danw@helixcode.com>
13037 * camel-mime-part.c (camel_mime_part_get_filename): If a MIME part
13038 has no Content-Disposition, but does have a "name" on the
13039 Content-Type, return that as the filename.
13040 (process_header): strstrip the Content-Description
13042 2000-09-05 Chris Toshok <toshok@helixcode.com>
13044 * providers/nntp/camel-nntp-utils.c (get_OVER_headers): care about
13046 (get_HEAD_headers): same.
13047 (camel_nntp_get_headers): same.
13049 * providers/nntp/camel-nntp-store.h: get rid of
13050 CAMEL_NNTP_OK/ERR/FAIL.
13052 * providers/nntp/camel-nntp-store.c
13053 (camel_nntp_store_get_extensions): take CamelException arg and
13054 pass along to camel_nntp_command.
13055 (camel_nntp_store_get_overview_fmt): same.
13056 (nntp_store_connect): convert to using constants in
13057 camel-nntp-resp-codes.h
13058 (nntp_store_get_folder): make use of camel_nntp_folder_new.
13059 (camel_nntp_command_send_recv): new function to deal with auth
13061 (camel_nntp_command): split out most of this function into
13062 camel_nntp_command_send_recv. also, return the actual response
13063 code instead of CAMEL_NNTP_OK/ERR/FAIL.
13065 * providers/nntp/camel-nntp-resp-codes.h: new file.
13067 * providers/nntp/camel-nntp-folder.h: prototype for
13068 camel_nntp_folder_new.
13070 * providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new): new
13071 convenience function.
13072 (nntp_folder_get_message): care more about the actual response
13075 * providers/nntp/Makefile.am (libcamelnntp_la_SOURCES): add
13077 (libcamelnntpinclude_HEADERS): add camel-nntp-auth.h.
13079 * providers/nntp/camel-nntp-auth.h: new file.
13081 * providers/nntp/camel-nntp-auth.c: new file.
13083 2000-09-05 Peter Williams <peterw@helixcode.com>
13085 * providers/imap/camel-imap-store.c (imap_folder_exists): Don't free the
13086 result on error; the exception will have the relevant info.
13088 * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Check for
13091 * providers/imap/camel-imap-store.c (imap_connect): Check the exception
13092 on the refresh_folders call.
13094 * providers/imap/camel-imap-store.h: Clean up some now-unused fields.
13096 * camel.c (camel_init): Call unicode_init again, now that libunicode
13097 will not initialize itself twice.
13099 2000-09-02 Lauris Kaplinski <lauris@helixcode.com>
13101 * camel-folder-search (search_header_contains): Use e_utf8_strstrcase
13103 2000-09-01 Christopher James Lahey <clahey@helixcode.com>
13105 * providers/imap/camel-imap-utils.c: Removed some unused
13108 2000-09-01 Peter Williams <peterw@helixcode.com>
13110 * providers/nntp/camel-nntp-store.c (camel_nntp_command): Initialize
13111 the statically-allocated CamelException so that it doesn't contain
13112 junk data that camel_exception_set() may try to free.
13113 (camel_nntp_store_get_extensions): Same.
13114 (camel_nntp_store_get_overview_fmt): Same.
13116 * providers/pop3/camel-pop3-store.c (camel_pop3_command): Typo
13117 fix (if (*ret) -> if (ret)).
13119 * providers/pop3/camel-pop3-store.c (pop3_connect): Set the
13120 port # back to what was specified ASAP, so that the hash of
13121 the URL doesn't change (which causes a failure in
13122 service_cache_remove that leads to a segfault).
13124 * providers/imap/camel-imap-store.c (imap_connect): Clear the
13125 exception after a failed LOGIN so that it doesn't pass through
13126 to the upper level and make mail think that the login failed.
13128 * providers/pop3/camel-pop3-store.c (pop3_connect): As above.
13130 2000-08-31 Peter Williams <peterw@helixcode.com>
13132 * providers/pop3/camel-pop3-store.c (camel_pop3_store_get_type):
13133 Implement POP3 with the CamelRemoteStore now.
13134 (connect_to_server): Hack this a bit to get KPOP to work. Obey
13135 the new connection semantics of the remote store (implicitly).
13136 (query_auth_types_connected): Clear exceptions after attempts
13137 to connect; the code at the bottom will catch hard errors.
13138 Use camel_service_connect.
13139 (camel_pop3_command): Take a CamelException; now, when an error
13140 occurs, ret is set to NULL and the exception passes back the
13141 appropriate information.
13142 (pop3_get_response): Same as above.
13143 (pop3_try_authenticate): Give camel_pop3_command its exception
13144 and handle it properly.
13145 (pop3_connect): Call the parent classfuncs. Don't disconnect
13146 on error (done for us).
13148 * providers/pop3/camel-pop3-folder.c: Obey the camel_pop3_command
13151 * camel-remote-store.c (remote_query_auth_types_connected): Don't
13152 warn; just return NULL.
13153 (remote_query_auth_types_generic): Same.
13154 (remote_send_string): Filter out passwords in debugging output.
13156 * providers/pop3/camel-pop3-store.c (camel_pop3_store_init): Also
13157 set the ALLOW_AUTH flag.
13159 * providers/imap/camel-imap-store.c (camel_imap_store_init): Same.
13161 2000-08-31 Chris Toshok <toshok@helixcode.com>
13163 * providers/nntp/camel-nntp-store.c (camel_nntp_store_class_init):
13164 remove get_folder_name.
13165 (nntp_store_get_folder_name): remove.
13167 2000-08-31 Lauris Kaplinski <lauris@helixcode.com>
13169 * camel-mime-part.c (write_to-stream): Use filter only if we have one
13171 2000-08-31 Chris Toshok <toshok@helixcode.com>
13173 * providers/nntp/camel-nntp-utils.c (get_OVER_headers): use
13174 camel_remote_store_recv_line.
13176 * providers/nntp/camel-nntp-folder.c (nntp_folder_get_message):
13177 use camel_remote_store_recv_line to build message. also, free our
13178 buffer so we don't leak like mad.
13180 * providers/nntp/camel-nntp-store.c:
13181 (camel_nntp_store_get_additional_data) remove.
13182 (camel_nntp_store_get_extensions): use
13183 camel_remote_store_recv_line.
13184 (camel_nntp_store_get_overview_fmt): same. also, don't rely on
13185 _get_additional_data anymore since it's easier to parse without.
13186 (camel_nntp_command): use camel_remote_store_send_string and
13187 camel_remote_store_recv_line.
13189 * providers/nntp/camel-nntp-store.h: CamelRemoteStore is the
13190 parent class now. remove istream/ostream since CamelRemoteStore
13191 takes care of that for us. also remove the prototype for
13192 camel_nntp_store_get_additional_data.
13194 * providers/nntp/camel-nntp-newsrc.c (camel_nntp_newsrc_write):
13195 make sure to clear dirty bit.
13196 (camel_nntp_newsrc_read_for_server): don't worry about continually
13197 trying to open the file - if it fails we just return an
13198 unpopulated .newsrc file.
13200 2000-08-31 Chris Toshok <toshok@helixcode.com>
13202 * providers/nntp/camel-nntp-newsrc.c
13203 (camel_nntp_newsrc_read_for_server): make this a bit more robust.
13204 try to create an empty .newsrc file for the server if we can't
13205 open it for reading. also, don't allocate everything until we've
13208 * providers/nntp/camel-nntp-utils.c (get_OVER_headers): make use
13209 of our overview field indices.
13210 (camel_nntp_get_headers): only call get_OVER_headers if the
13211 extension is present. warn if it's not - since get_HEAD_headers
13212 needs work before it works.
13214 * providers/nntp/camel-nntp-store.c
13215 (camel_nntp_store_get_extensions): new function - query the server
13216 for it's extensions.
13217 (camel_nntp_store_get_overview_fmt): new function - query the
13218 server for the overview format and build our table of the indices
13219 we care about. support the "full" suffix on fields.
13220 (nntp_store_connect): call camel_nntp_store_get_extensions and
13221 camel_nntp_store_get_overview_fmt.
13223 * providers/nntp/camel-nntp-store.h: add codes for extensions
13224 found on news.mozilla.org. only one that we care about is OVER.
13225 also, add CamelNNTPOverField and an enum of the overview fields
13226 that we care about.
13228 2000-08-31 Jeffrey Stedfast <fejj@helixcode.com>
13230 * providers/imap/camel-imap-utils.c (imap_translate_sexp):
13231 Reimplemented. It should now work correctly for most possible
13234 2000-08-31 Jeffrey Stedfast <fejj@helixcode.com>
13236 * providers/imap/camel-imap-store.c (camel_imap_command_extended):
13237 Don't save any exceptions caused by camel_imap_folder_changed
13238 (camel_imap_fetch_command): Same.
13240 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
13241 Using a new way of calculating the first recent message that seems
13242 more accurate. Also added code to make sure we don't accidently
13243 add a duplicate summary.
13245 2000-08-31 Not Zed <NotZed@HelixCode.com>
13247 * camel-mime-part.c (write_to_stream): Use the proper type
13248 checking function to check for text types.
13249 (write_to_stream): If we have a charset on a text type that
13250 isn't us-ascii or utf-8, then we need to reencode it, so add a
13251 filter to do that too.
13252 (write_to_stream): Fix some warnings/use the right constructor,
13254 (write_to_stream): Rearrange the logic so it always does charset
13255 conversion, and not just if we have a qp/base64 block.
13257 * camel-mime-utils.c (append_latin1): New function - even though
13258 its broken, we'll assume mailers send latin1 headers instead of
13259 us-ascii. We just have to encode high chars into utf-8.
13260 (header_decode_text): Call append_latin1 for appending unencoded
13262 (append_latin1): Do an additional mask for account for c's
13263 undefined behaviour for sign extension whilst shifting right.
13265 2000-08-30 Jeffrey Stedfast <fejj@helixcode.com>
13267 * providers/imap/camel-imap-store.c (camel_imap_fetch_command):
13268 Rewrote to ignore strings that look like server responses until it
13269 is sure that it has finished reading the literal string response.
13271 2000-08-30 Jeffrey Stedfast <fejj@helixcode.com>
13273 * camel-remote-store.c (remote_send_string): Don't wrap printed
13274 strings in quotes, makes things messy
13276 * providers/imap/camel-imap-folder.c (imap_get_message): Updated
13277 to use the camel_imap_fetch_command
13279 * providers/imap/camel-imap-stream.c (stream_read): Updated to use
13280 camel_imap_fetch_command
13282 * providers/imap/camel-imap-store.c (camel_imap_command_extended):
13283 No longer handles FETCH requests so no longer needs to be
13284 concerned with checking to make sure that server responses are
13285 valid (they have to be).
13286 (camel_imap_fetch_command): New convenience function that handles
13289 2000-08-30 Peter Williams <peterw@helixcode.com>
13291 * camel-remote-store.c (remote_connect): Unify with remote_post_connect.
13292 (remote_disconnect): Unify with remote_pre_disconnect.
13293 (camel_remote_store_class_init): Don't use the post_connect and
13294 pre_disconnect classfuncs anymore ; they weren't especially useful.
13296 * providers/imap/camel-imap-store.c (imap_connect): Use this again
13297 instead of implementing post_connect.
13298 (imap_disconnect): Analogous to above.
13300 * camel-session.c (camel_session_get_service_connected): New function.
13301 Like camel_session_get_service() but also connects to the service
13302 if needed. camel_session_get_{store,transport} (defined in the header)
13303 used this now, preventing annoying when-to-connect problems.
13305 * camel-service.c (camel_service_new): Revert to the old behavior
13306 of not connecting until told to do so. Otherwise doing auth
13307 testing correctly is really hard.
13308 (camel_service_connect): Fix behavior here (set the connected
13310 (camel_service_disconnect): Unset the connected flag.
13312 2000-08-30 Jeffrey Stedfast <fejj@helixcode.com>
13314 * providers/imap/camel-imap-store.c: General cleanup / moving
13315 stuff around to make things easier to follow.
13317 2000-08-30 Jeffrey Stedfast <fejj@helixcode.com>
13319 * camel-remote-store.c: Prevent exceptions from being overwritten
13321 * providers/imap/camel-imap-folder.c (imap_expunge): Beautified
13322 (imap_get_subfolder_names_internal): Removed old code as the
13323 replacement code has now been tested and proven to work
13325 2000-08-29 Jeffrey Stedfast <fejj@helixcode.com>
13327 * providers/imap/camel-imap-utils.c: Removed old code that will
13328 never be needed again
13330 * providers/imap/camel-imap-store.c: Removed old code for
13331 try_connect - will never need this code
13332 (slurp_response): Update to make sure we aren't falsely detecting
13335 2000-08-29 Peter Williams <peterw@helixcode.com>
13337 * camel-service.c (camel_service_connect): Uncomment this.
13338 (camel_service_disconnect): Same.
13340 * camel-remote-store.[ch]: New files. Abstract remote storages
13341 (IMAP, POP3, NNTP) and hides the lower-level networky stuff.
13343 * camel-service.c (camel_service_new): Take an extra argument, the
13344 provider that created us, cause it's useful.
13345 (camel_service_finalize): Unref our new provider member.
13347 * camel-session.c (camel_session_get_service): Pass the proper number of
13348 arguments to camel_service_new().
13350 * camel-imap-store.c: Massive update: 1) use the CamelRemoteService to
13351 make our life Very Easy (TM). 2) Change the semantics of all
13352 camel_imap_command* functions to take exceptions, centralize tons of
13353 duplicate code, and use the handy RemoteStore utility functions
13355 * camel-imap-folder.c: Use the new semantics of camel_imap_command*
13357 * camel-imap-stream.c: Same.
13359 2000-08-29 Jeffrey Stedfast <fejj@helixcode.com>
13361 * providers/imap/camel-imap-store.c (camel_imap_command_extended):
13362 Updated to check for EXPUNGE notifications
13364 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
13365 Updated to account for messages which have been expunged (now
13366 takes a new arg, a GPtrArray of message id's that have been
13368 (imap_expunge): Updated (we may want to just use the code in
13369 folder_changed now instead of doing our own summary
13370 expunging...but that can be fixed later)
13371 (imap_append_message): Updated.
13372 (imap_copy_message_to): Updated.
13373 (imap_move_message_to): Updated.
13375 2000-08-28 Peter Williams <peterw@helixcode.com>
13377 * camel-folder.c (camel_folder_refresh_info): New member function,
13378 refresh_info, used for rereading folder state after its state has
13379 somehow become unknown. Tries to preserve last-known status of
13382 * providers/mbox/camel-mbox-folder.c (mbox_refresh_info): Implement
13383 ::refresh_info (split up ::init)
13385 * providers/mbox/camel-mbox-store.c (get_folder): Call ::refresh_info.
13387 * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Call
13388 ::refresh_info once initialized.
13389 (imap_refresh_info): New member function; reads the summary from
13390 the server (used to be in camel_imap_folder_new; split out).
13392 * providers/imap/camel-imap-store.c (imap_connect): Set
13393 CamelService::connected a little early so that
13394 camel_imap_command won't try to connect while already
13396 (camel_imap_command*): Try to connect if not connected already.
13398 * providers/pop3/camel-pop3-folder.c (pop3_refresh_info): Same as above.
13400 * providers/pop3/camel-pop3-folder.c (camel_pop3_folder_new): Same
13403 * providers/pop3/camel-pop3-store.c (pop3_connect): Set
13404 CamelService::connected a little early so that
13405 camel_pop3_command won't try to connect while already
13407 (connect_to_server): Same.
13409 * providers/nntp/camel-nntp-folder.c (nntp_folder_refresh_info): Same
13412 2000-08-28 Jeffrey Stedfast <fejj@helixcode.com>
13414 * providers/imap/camel-imap-folder.c (imap_get_message): Fixed the
13415 hack around quoted string responses - should now handle them
13416 according to the specifications in the RFC
13418 * providers/imap/camel-imap-stream.c (stream_read): Updated to
13419 match the code currently used in camel-imap-folder.c
13421 2000-08-28 Ettore Perazzoli <ettore@helixcode.com>
13423 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
13424 Never ever free `tmpname' as it comes from `alloca()'!
13426 2000-08-26 Ettore Perazzoli <ettore@helixcode.com>
13428 * camel-mime-utils.c (header_decode_text): Use `g_free()', not
13429 `free()', to free `decword'.
13431 2000-08-25 Peter Williams <peterw@helixcode.com>
13433 * camel.c (camel_init): Don't call unicode_init; code in e-util
13434 will do it, and if unicode_init is called twice, you get an
13435 infinite loop when looking up nonexistant encodings (patch
13436 has been submitted to libunicode's maintainer).
13438 * camel-provider.h: Add a new field, default_ports, which
13439 helps the configuration code guess about how to make CamelURL's
13442 * providers/*/camel-*-provider.c: Specify default ports.
13444 2000-08-25 Jeffrey Stedfast <fejj@helixcode.com>
13446 * providers/imap/camel-imap-folder.c
13447 (imap_get_subfolder_names_internal): If the url path is "/" and
13448 the folder path is "/", just LIST "" "*" (this should fix some
13449 cyrus imapd problems). Also, INBOX is case insensitive so use
13452 2000-08-24 Lauris Kaplinski <lauris@helixcode.com>
13454 * camel-folder-summary.c (summary_build_content_info):
13455 Use UTF-8 as default
13456 * camel-mime-part-utils.c (simple_data_wrapper_construct_from_parser):
13457 Use UTF-8 as default
13458 * camel-mime-utils.c (rfc2047_decode_word): Use UTF-8
13460 2000-08-17 Not Zed <NotZed@HelixCode.com>
13462 * providers/mh/camel-mh-folder.c (mh_finalize): And here too.
13464 * providers/mbox/camel-mbox-folder.c (mbox_finalize): Close index
13467 2000-08-23 Dan Winship <danw@helixcode.com>
13469 * camel-mime-utils.c (header_address_list_format_append): put
13470 commas between addresses.
13472 2000-08-22 Dan Winship <danw@helixcode.com>
13474 * providers/imap/camel-imap-folder.c
13475 (imap_protocol_get_summary_specifier): use BODY.PEEK, not BODY, so
13476 we don't set the message \Seen.
13478 2000-08-22 Christopher James Lahey <clahey@helixcode.com>
13480 * providers/pop3/camel-pop3-store.c: Fixed a small warning.
13482 2000-08-22 Peter Williams <peterw@helixcode.com>
13484 * camel-service.c (camel_service_new): Connect automatically if the
13486 (finalize): Disconnect automatically if connected.
13487 (camel_service_query_auth_types): Split into two functions; one to
13488 be called if we're connected to an actual server (_connected), one
13489 to be called if we're just gauging the general authtypes supported
13491 (is_connected): Remove.
13493 * camel-store.c (camel_store_get_folder): Don't connect explicitly to
13496 * providers/nntp/camel-nntp-store.c (query_auth_types_generic): Split
13497 the query_auth_types function. Hook it up in _new.
13498 (finalize): Don't try to disconnect here.
13500 * providers/pop3/camel-pop3-store.c (query_auth_types_generic): Same.
13501 (finalize): Don't try to disconnect here.
13503 * providers/imap/camel-imap-store.c (query_auth_types_generic): Same.
13504 (finalize): Don't try to disconnect here.
13506 * providers/smtp/camel-smtp-transport.c (query_auth_types_generic): Split
13507 the query_auth_types (dummy, in this case) function. Hook it up in _new.
13508 (finalize): Don't try to disconnect here.
13510 2000-08-21 JP Rosevear <jpr@helixcode.com>
13512 * providers/nntp/camel-nntp-folder.c (nntp_folder_get_subfolder_names):
13513 Make sure newsrc is not null
13514 (nntp_folder_get_subfolder_names): ditto
13516 * providers/nntp/camel-nntp-newsrc.c
13517 (camel_nntp_newsrc_get_subscribed_group_names): Programming check
13519 (camel_nntp_newsrc_get_all_group_names): ditto
13520 (camel_nntp_newsrc_write_to_file): ditto
13521 (camel_nntp_newsrc_write): ditto
13523 2000-08-21 JP Rosevear <jpr@helixcode.com>
13525 * providers/nntp/camel-nntp-store.c (camel_nntp_command):
13526 Make sure respbuffer is not null before manipulating it.
13527 If it is null, return CAMEL_NNTP_FAIL and a decent error
13530 2000-08-18 Peter Williams <peterw@helixcode.com>
13532 * camel-internet-address.c (internet_encode): If the name is "" we
13533 weren't outputting anything; output the address at least.
13535 2000-08-16 Peter Williams <peterw@helixcode.com>
13537 * camel-internet-address.c (internet_encode): Fix a leak when
13538 name = "". It's a single-byte leak, but it's the little things
13541 * camel-object.c (camel_type_lock_up): Don't leave the type
13542 system locked when a bad unlock happens.
13544 * providers/mbox/camel-mbox-store.c (get_folder): Fix a leak.
13546 2000-08-15 Peter Williams <peterw@helixcode.com>
13548 * providers/imap/camel-imap-folder.c (imap_copy_message_to): Typo fix.
13550 2000-08-14 Peter Williams <peterw@helixcode.com>
13552 * camel-folder-search.c (search_get_sent_date): New search function;
13553 returns the time_t when the message was sent.
13554 (search_get_receive_date): Same for when it was received.
13555 (search_get_current_date): Gets the current time for use with the
13556 above two. Is this in the right place?
13558 * camel-folder-search.h: Add the new functions above to the class.
13560 2000-08-13 Dan Winship <danw@helixcode.com>
13562 * providers/nntp/Makefile.am (libcamelnntpinclude_HEADERS): Add
13565 * providers/imap/camel-imap-folder.c
13566 (imap_get_subfolder_names_internal): do a strcasecmp rather than
13567 just a strcmp when checking if a folder is "INBOX", since it is
13568 a case-insensitive name.
13570 2000-08-12 Dan Winship <danw@helixcode.com>
13572 * providers/imap/camel-imap-folder.c (imap_get_summary_internal):
13573 Don't assume the FETCH results will come back in the order they
13575 (imap_get_subfolder_names_internal): Add "INBOX" to the list as
13576 g_malloc'ed memory, not a static string.
13578 2000-08-12 Jeffrey Stedfast <fejj@helixcode.com>
13580 * providers/imap/camel-imap-store.c
13581 (camel_imap_command_continuation): Now takes a char * parameter
13582 rather than a stream
13583 (camel_imap_command_continuation_with_stream): Same function as
13584 above but takes a stream parameter instead
13586 * providers/imap/camel-imap-folder.c (imap_append_message): Use
13587 camel_imap_command_continuation_with_stream
13589 2000-08-12 Dan Winship <danw@helixcode.com>
13591 * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): New
13592 function to do one round of attempted authentication.
13593 (pop3_connect): Move a bunch of code out into
13594 pop3_try_authenticate and fix some bugs in the edge cases.
13596 2000-08-12 Jeffrey Stedfast <fejj@helixcode.com>
13598 * providers/imap/camel-imap-store.c (query_auth_types): No longer
13599 calls try_connect() to get authtypes
13601 2000-08-11 Jeffrey Stedfast <fejj@helixcode.com>
13603 * providers/imap/camel-imap-store.c
13604 (camel_imap_command_continuation): Changed param order a bit and
13607 * providers/imap/camel-imap-folder.c (imap_append_message): Use
13608 the new multi-transactional convenience functions
13610 2000-08-11 Jeffrey Stedfast <fejj@helixcode.com>
13612 * providers/imap/camel-imap-store.c
13613 (camel_imap_command_preliminary): New convenience function for
13614 multi-transactional commands (opening request)
13615 (camel_imap_command_continuation): New convenience function for
13616 multi-transactional commands (followup data)
13618 2000-08-11 Christopher James Lahey <clahey@helixcode.com>
13620 * providers/mh/camel-mh-folder.c: Fixed a warning.
13622 2000-08-11 Chris Toshok <toshok@helixcode.com>
13624 * providers/nntp/camel-nntp-folder.c
13625 (camel_nntp_folder_class_init): remove get_name and get_full_name
13626 assignments, since the camel-folder.c implementation does what we
13629 2000-08-11 Chris Toshok <toshok@helixcode.com>
13631 * providers/nntp/camel-nntp-store.c
13632 (camel_nntp_store_get_toplevel_dir): use g_get_home_dir, since
13633 evolution_dir isn't available in the providers.
13635 2000-08-11 Peter Williams <peterw@helixcode.com>
13637 * camel-folder.c (thaw): Fix a bug where the message_changed
13638 signal wasn't being emitted.
13640 2000-08-11 Not Zed <NotZed@HelixCode.com>
13642 * providers/mh/camel-mh-folder.c (mh_set_message_user_tag):
13644 (mh_get_message_user_tag): Implement.
13646 * providers/mbox/camel-mbox-folder.c (mbox_get_message_user_tag):
13647 (mbox_set_message_user_tag): Implement.
13649 * camel-folder.c (move_message_to): Yay so lets fix an already
13651 (copy_message_to): and here too ... update for api change to append().
13652 And removed another warning.
13653 (camel_folder_set_message_user_tag): Routine to set message tags.
13654 (camel_folder_get_message_user_tag): And accessor.
13656 2000-08-10 Christopher James Lahey <clahey@helixcode.com>
13658 * camel-folder-search.c, camel-folder-summary.c, camel-medium.c,
13659 camel-mime-filter-charset.c, camel-mime-filter.c,
13660 camel-mime-filter.h, camel-mime-message.c, camel-mime-parser.c,
13661 camel-mime-part-utils.c, camel-mime-part.c, camel-mime-utils.c,
13662 camel-movemail.c, camel-multipart.c, camel-object.c,
13663 camel-stream-mem.c, providers/mbox/camel-mbox-folder.c,
13664 providers/mbox/camel-mbox-summary.c,
13665 providers/mh/camel-mh-folder.c,
13666 providers/smtp/camel-smtp-transport.c: Fixed some warnings.
13668 2000-08-11 Not Zed <NotZed@HelixCode.com>
13670 * providers/vee/camel-vee-folder.c (vee_folder_build_folder): Free
13671 the search properly.
13672 (vee_folder_build): And here too.
13674 2000-08-10 Jeffrey Stedfast <fejj@helixcode.com>
13676 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
13677 If we go over the max number of messages, don't keep requesting
13678 new message summaries, just break.
13680 2000-08-11 Not Zed <NotZed@HelixCode.com>
13682 * camel-mime-parser.c (folder_scan_header): A better way to
13683 compress leading whitespace. The code is probably invalid anyway,
13684 I dont think it will work across buffer boundaries.
13686 * providers/mbox/camel-mbox-folder.c (mbox_append_message): And
13687 write out proper format From lines here too.
13689 * providers/mbox/camel-mbox-summary.c
13690 (camel_mbox_summary_build_from): New function to build a more
13691 compatible mbox "From " line.
13692 (camel_mbox_summary_sync): Write From lines in the proper format.
13694 2000-08-10 Not Zed <NotZed@HelixCode.com>
13696 * providers/mh/camel-mh-store.c (get_folder): Remove warnin g.
13698 * providers/mbox/camel-mbox-store.c (xrename): Kill some warnings
13699 with constification.
13701 * providers/imap/camel-imap-folder.c (imap_append_message): Fixed
13702 for append api change. Eek this routine seriously wastes memory.
13704 * providers/mh/camel-mh-folder.c (mh_search_free): Impelemnt.
13705 (mh_append_message): Fix for api change, and include user flags
13706 and tags in new message.
13708 * providers/vee/camel-vee-folder.c (vee_search_by_expression): Fix
13709 for search api change.
13711 * camel-folder.c (camel_folder_search_free): New function for
13712 freeing search results.
13713 (search_free): Changed my mind, implement a default that actually
13714 does something. Free as to the old interface.
13715 (camel_folder_append_message): Changed to accept a
13716 camelmessageinfo rather than flags, which just doesn't have enough
13718 (copy_message_to): Change for append_message api change.
13719 (move_message_to): Likewise.
13721 * providers/mbox/camel-mbox-folder.c (mbox_search_free):
13723 (mbox_append_message): Fix for api change, and also copy user
13724 flags/tags across to new summary.
13726 * camel-folder-search.c (search_user_tag): A search expression
13727 that returns the current use flag by name.
13728 (camel_folder_search_free_result): New function to free the result
13731 * camel-folder-summary.c: Bump summary version.
13732 (message_info_new):
13733 (message_info_load):
13734 (message_info_save):
13735 (camel_message_info_dup_to):
13736 (camel_message_info_free): Added support for arbitrary tag/value
13737 pairs (CamelTag's).
13740 (camel_tag_list_size):
13741 (camel_tag_list_free): Operations for working with CamelTags.
13743 2000-08-09 Peter Williams <peterw@helixcode.com>
13745 * camel-store.c (camel_store_get_folder): Connect beforehand, if
13748 * providers/imap/camel-imap-store.c (camel_imap_store_init): Default
13749 the dir_sep to "/" so that certain functions can safely assume that
13750 dir_sep is valid (at least, nonnull).
13752 2000-08-09 Ettore Perazzoli <ettore@helixcode.com>
13754 * providers/nntp/camel-nntp-folder.c
13755 (nntp_folder_set_message_flags): Get rid of an unused variable.
13757 * providers/nntp/Makefile.am (INCLUDES): Fix includes so that we
13758 don't use installed headers anymore. [I copied this over from the
13759 IMAP provider, that does not seem to have this problem.]
13761 2000-08-09 Not Zed <NotZed@HelixCode.com>
13763 * camel-folder-search.c (camel_folder_search_execute_expression):
13764 Reorder search result in summary order if we searched with a
13767 2000-08-08 Dan Winship <danw@helixcode.com>
13769 * camel-uid-cache.c: New code to keep an on-disk cache of what
13770 UIDs have been seen in a folder.
13772 * camel-provider.h: Add new flags CAMEL_PROVIDER_IS_SOURCE (mail
13773 can arrive in it by non-Camel means) and CAMEL_PROVIDER_IS_STORAGE
13774 (you can work with mail directly without needing to copy it local).
13776 * providers/*/camel-*-provider.c: Add flags as needed: imap and
13777 mbox are SOURCE and STORAGE. mh and nntp are just STORAGE, pop3 is
13780 * camel-mime-message.c (process_header): Add another subject
13781 g_strstrip that fejj's earlier commit missed.
13783 2000-08-08 Peter Williams <peterw@helixcode.com>
13785 * camel-provider.h: Remove some GTK stuff that I missed.
13787 * providers/imap/camel-imap-store.c (imap_noop): Turn this
13788 back on with the new timeout interface in CamelSession.
13790 * camel-session.[ch] (camel_session_register_timeout): New
13791 interface for Camel to register timeouts. Basically the
13792 GTK timeout interface is copied. We do this because Camel isn't
13793 allowed to use GTK anymore.
13795 2000-08-07 Not Zed <NotZed@HelixCode.com>
13797 * providers/mh/camel-mh-folder.c (mh_append_message): Only retry
13798 another uid if we had a name clash, otherwise fail.
13800 2000-08-07 Jeffrey Stedfast <fejj@helixcode.com>
13802 * providers/imap/camel-imap-folder.c
13803 (imap_get_subfolder_names_internal): If we are trying to get a
13804 subfolder listing of the root folder, always make sure INBOX is
13807 * providers/imap/camel-imap-utils.c (imap_parse_list_response):
13808 Check for NIL as a directory separator.
13810 2000-08-07 Peter Williams <peterw@helixcode.com>
13812 * providers/nntp/Makefile.am: Reorder the INCLUDES to pull
13813 in the camel headers from the local source tree before
13814 the ones in $(includedir). This was causing compile problems
13815 because the installed, Gtk-based camel-object.h was included
13816 before the uninstall Camel-based one.
13818 2000-08-07 Jeffrey Stedfast <fejj@helixcode.com>
13820 * providers/imap/camel-imap-utils.c (imap_translate_sexp): Strip
13821 all \n's from the expression
13823 * string-utils.c (strip): New convenience function to strip
13824 occurences of a single char from a string
13826 * camel-mime-message.c (camel_mime_message_set_subject): Do a
13827 g_strstrip on the subject so we can stop getting those annoying
13830 2000-08-07 Dan Winship <danw@helixcode.com>
13832 * camel-folder.c (camel_folder_free_deep): Fix this to not require
13833 NULL-termination of the array.
13835 2000-08-04 Jeffrey Stedfast <fejj@helixcode.com>
13837 * providers/imap/camel-imap-store.c (imap_connect): If we fail to
13838 get a dir_sep, then supply the default of "/".
13839 (get_folder): Undo changes by Peter
13841 2000-08-04 Peter Williams <peterw@helixcode.com>
13843 * providers/imap/camel-imap-store.c (get_folder): Prevent a coredump
13844 when get_folder()ing from a store with dir_sep = NULL.
13846 2000-08-04 Peter Williams <peterw@helixcode.com>
13848 * camel-store.h: Include camel-object.h. Ettore said this wasn't
13851 2000-08-04 Not Zed <NotZed@HelixCode.com>
13853 * camel-url.c (camel_url_set_protocol):
13854 (camel_url_set_host):
13855 (camel_url_set_path):
13856 (camel_url_set_port): Url editing functions.
13858 2000-08-04 Dan Winship <danw@helixcode.com>
13860 * providers/pop3/camel-pop3-folder.c (pop3_set_message_flags):
13861 (pop3_sync): Indexes into the flags array are message_number minus
13862 1, not just message_number.
13864 * providers/pop3/camel-pop3-store.c: add a debugging macro for
13865 doing protocol tracing.
13867 2000-08-03 Jeffrey Stedfast <fejj@helixcode.com>
13869 * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Only
13870 call imap_get_summary_internal if the folder can hold messages
13872 * providers/nntp/camel-nntp-provider.c (camel_provider_module_init):
13873 Initialize the service_cache for the news/nntp providers
13875 2000-08-03 Peter Williams <peterw@helixcode.com>
13877 * providers/nntp/Makefile.am (INCLUDES): Add -I$(top_srcdir) to
13878 pull in libibex/ibex.h
13880 2000-08-02 Not Zed <NotZed@HelixCode.com>
13882 * providers/mh/camel-mh-summary.c (camel_mh_summary_sync): Expunge
13883 from the end, so the index isn't messed up when you remove a
13886 * providers/mh/camel-mh-folder.c (mh_append_message): Fix a bug
13887 where it would never open an output file/uid.
13889 * providers/mbox/camel-mbox-store.c (rename_folder):
13890 Implementation for mbox as well.
13892 * camel-store.c (camel_store_rename_folder): New method to rename folders.
13893 (rename_folder): Default implementation.
13895 * providers/mh/camel-mh-store.c (delete_folder): Implement this.
13896 (rename_folder): Implement a rename operation.
13898 2000-08-02 Dan Winship <danw@helixcode.com>
13900 * providers/MH: Kill this. It doesn't have any code to do anything
13901 the new mh provider doesn't do better.
13903 * providers/Makefile.am: Remove reference to MH subdir, and
13904 promote nntp to fully-supported status, since it does compile and
13907 * camel-mime-message.c (camel_mime_message_set_subject): Trim
13908 trailing space from the subject. I've now seen replies from two
13909 different people that tricked the threading code by (a) not having
13910 References/In-Reply-To, and (b) adding an extra space to the end
13911 of the subject line so the subject-based threading fails too. Who
13912 writes these broken mailers anyway?
13914 2000-08-01 Jeffrey Stedfast <fejj@helixcode.com>
13916 * providers/smtp/camel-smtp-transport.c (smtp_helo): When forced
13917 to use the IP, place it in square brackets.
13919 * providers/imap/camel-imap-utils.c (imap_translate_sexp): New and
13920 improved sexp parser. An honest try at using e-sexp is wrapped in
13921 a #ifdef at the bottom of the file but is currently not used
13923 * providers/imap/camel-imap-folder.c (imap_search_by_expression):
13924 We want to do a UID SEARCH so we get UIDs back instead of sequence
13927 2000-08-01 Not Zed <NotZed@HelixCode.com>
13929 * providers/mh: New mh provider implementation.
13931 * providers/Makefile.am (SUBDIRS): Added mh provider.
13933 2000-07-31 Jeffrey Stedfast <fejj@helixcode.com>
13935 * providers/imap/camel-imap-folder.c (imap_get_message_info_internal):
13936 Some IMAP servers don't wrap the UID in ()'s so don't depend on that
13937 (imap_get_summary_internal): Same
13939 * providers/imap/camel-imap-utils.c (free_sexp_node): Oops, forgot to
13940 free node->function - not good.
13942 2000-07-31 Peter Williams <peterw@helixcode.com>
13944 * providers/vee/camel-vee-folder.c (vee_search_by_expression): Add
13945 a NULL to the matches pointer array so that g_strfreev knows where
13948 2000-07-31 Jeffrey Stedfast <fejj@helixcode.com>
13950 * providers/imap/camel-imap-utils.c (imap_translate_sexp): New
13951 convenience function to translate a Camel sexp into the equivalent
13954 * providers/imap/camel-imap-store.c: More places now use
13957 * providers/imap/camel-imap-folder.c (imap_search_by_expression):
13958 Implemented initial version (this may or may not work quite right)
13960 2000-07-28 Jeffrey Stedfast <fejj@helixcode.com>
13962 * providers/imap/camel-imap-folder.c (imap_expunge): Make sure
13963 the third word/token (whatever) is "EXPUNGE" and not something
13964 else like "EXISTS" or "RECENT". When removing the message from
13965 the summary also make sure to free that data to avoid leakage.
13966 Also make sure to subtract 1 from the 'id' since IMAP starts
13967 at 1 and our summary starts at 0 :-)
13969 2000-07-28 Jeffrey Stedfast <fejj@helixcode.com>
13971 * providers/imap/camel-imap-store.c (camel_imap_status): Cleaned
13972 up a bit, now uses imap_next_word()
13973 (camel_imap_command_extended): Now uses imap_next_word(). When
13974 checking for RECENT, allow the first digit of the recent-count
13975 be between 0 and 9 inclusive instead of exclusive.
13977 * providers/imap/camel-imap-folder.c (imap_expunge): Optimized.
13978 No longer will it need to reload the summary as it now instead
13979 removes the appropriate message summaries from the cache.
13980 (camel_imap_folder_changed): If recent == 0 then return. If
13981 recent < 0 then just emit the folder_changed signal, don't reload
13984 2000-07-28 Jeffrey Stedfast <fejj@helixcode.com>
13986 * providers/imap/camel-imap-folder.c
13987 (imap_get_message_count_internal): Get message count when STATUS
13989 (imap_init): folder->has_search_capability is required for IMAP so
13990 should always be set to TRUE (is currently being set to FALSE as
13991 I've not yet implemented SEARCH support).
13992 (camel_imap_folder_changed): Seem to have fixed my optimization
13995 2000-07-28 Jon K Hellan <hellan@acm.org>
13997 * providers/imap/camel-imap-store.h (CamelImapServerLevel): New
13999 (CamelImapStore): Added server_level and has_status_capability
14002 * providers/imap/camel-imap-store.c (imap_connect): Detect
14003 IMAP4REV1, IMAP4 and STATUS in capability response.
14005 * providers/imap/camel-imap-folder.c
14006 (imap_get_message_count_internal): Use STATUS only if server
14007 supports it. TODO: Get message count when STATUS not supported.
14008 (imap_get_message, imap_get_summary_internal,
14009 imap_get_message_info_internal): Handle IMAP4 as well.
14010 (imap_protocol_get_summary_specifier): New function: Make a data
14011 item specifier for the header lines we need, appropriate to the
14014 2000-07-27 Peter Williams <peterw@helixcode.com>
14016 * camel-mime-utils.c (header_decode_lwsp): More
14017 checks for end of string.
14019 * providers/imap/camel-imap-store.c:
14020 (imap_command_extended): Free the elements of our
14021 array (huge mem leak)
14023 * providers/imap/camel-imap-folder.c:
14024 (summary_get_internal): Same as above.
14027 2000-07-27 Jeffrey Stedfast <fejj@helixcode.com>
14029 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
14030 Fixed my routine to only fetch new headers, my IDs were off by 1
14031 on the high end, so when it would fetch the last newly arrived
14032 message it would fail and end up fetching all of the summaries
14033 because of the corruption.
14035 2000-07-27 Jeffrey Stedfast <fejj@helixcode.com>
14037 * camel-url.c (camel_url_to_string): If the path doesn't begin
14038 with a / and there is a host, prepend a / to the path.
14040 2000-07-27 Jeffrey Stedfast <fejj@helixcode.com>
14042 * providers/imap/Makefile.am: Added camel-imap-utils.[c,h]
14044 * providers/imap/camel-imap-utils.[c,h]: Utilities for parsing
14045 server responses for use in both camel-imap-store.c and
14046 camel-imap-folder.c
14048 * providers/imap/camel-imap-folder.c (imap_get_summary_internal):
14049 Free all the pointers in the headers array.
14050 (imap_get_subfolder_names_internal): Updated to use
14051 imap_parse_list_response
14052 (imap_parse_subfolder_list): Removed in favor of
14053 imap_parse_list_response
14055 * providers/imap/camel-imap-store.c (camel_imap_command_extended):
14056 Free all the pointers in the data array.
14057 (imap_connect): Updated to use imap_parse_list_response and fixed
14059 (folder_is_selectable): Updated.
14061 2000-07-27 Jeffrey Stedfast <fejj@helixcode.com>
14063 * providers/imap/camel-imap-folder.c (imap_get_message_info): Now
14064 uses a hash table for looking up message info rather than a linear
14067 2000-07-27 Peter Williams <peterw@helixcode.com>
14069 * providers/*/Makefile.am: Don't specify SUBDIRS =
14070 [nothing]. Messes up distcheck.
14072 2000-07-26 Peter Williams <peterw@helixcode.com>
14074 * camel-mime-parser.c (folder_scan_init): Initialize
14075 outbuf to be "" -- it's not guaranteed to be zeroed.
14077 * camel-mime-utils.c (header_references_decode): Return
14078 if the header is NULL -> or "" <-. Don't do our stupid
14079 mailer trick if we point to \0.
14080 (header_decode_quoted_string): Don't rip past end of
14083 2000-07-26 Dan Winship <danw@helixcode.com>
14085 * camel-movemail.c (movemail_external): routine to call an
14086 external movemail program.
14087 (camel_movemail): Nuke return value, use movemail_external when
14088 available and useful, and don't delete "dest" on errors, since
14089 it might have started non-empty.
14091 2000-07-26 Jeffrey Stedfast <fejj@helixcode.com>
14093 * camel-url.c (camel_url_to_string): Should now always prepend a '/'
14094 before the path if it doesn't already exist.
14096 * providers/imap/camel-imap-folder.c: Fixed a few compiler warnings
14098 2000-07-25 Jeffrey Stedfast <fejj@helixcode.com>
14100 * providers/imap/camel-imap-folder.c (imap_summary_free): Fixed the
14101 real problem that Peter was running into.
14103 2000-07-25 Dan Winship <danw@helixcode.com>
14105 * camel-mime-message.c (write_to_stream): Don't add a Mime-Version
14106 header to a message that already has one.
14108 * camel-internet-address.c (internet_encode): Don't put <>s around
14109 addresses with no name part.
14111 2000-07-25 Peter Williams <peterw@helixcode.com>
14113 * providers/imap/camel-imap-folder.c (imap_expunge): Set
14114 imap_folder->summary to NULL after calling imap_summary_free,
14115 so we don't get stuck with a junk summary pointer. Should
14118 2000-07-25 Jeffrey Stedfast <fejj@helixcode.com>
14120 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
14121 Optimized to try and get the new message headers without reloading
14122 the entire summary from scratch.
14123 (imap_get_summary_internal): Will now sync() before attempting to
14124 reload the summary so that flags are set in the reloaded summary
14127 2000-07-24 Jeffrey Stedfast <fejj@helixcode.com>
14129 * providers/imap/camel-imap-store.c (get_folder): Updated to give
14130 special attention to the root folder.
14132 * providers/imap/camel-imap-folder.c
14133 (imap_get_subfolder_names_internal): Updated to handle the root
14135 (imap_get_message_count_internal): return 0 if folder can't hold
14137 (camel_imap_folder_new): Change so that root folder gets special
14138 attention and always gets can_hold_messages set to FALSE
14140 2000-07-24 Dan Winship <danw@helixcode.com>
14142 * camel-folder.c: Remove exceptions from a number of methods that
14143 work on what ought to be static data: get_parent_folder,
14144 get_parent_store, get_message_count, get_unread_message_count,
14145 get_permanent_flags, get_message_flags, set_message_flags,
14146 get_message_user_flag, set_message_user_flag, get_uids,
14147 get_summary, get_subfolder_names. Turn camel_folder_delete_message
14148 into a macro. (Mostly a pull-up from the camel-async branch.)
14150 * providers/{imap,mbox,nntp,pop3,vee}: Update for CamelFolder
14153 2000-07-24 Jeffrey Stedfast <fejj@helixcode.com>
14155 * providers/imap/camel-imap-folder.c (imap_get_message_info): Updated
14156 to port easily to the new Camel API
14157 (imap_init): Don't SELECT INBOX, we don't need to do that
14159 2000-07-24 Jeffrey Stedfast <fejj@helixcode.com>
14161 * providers/imap/camel-imap-folder.c (camel_imap_folder_new):
14162 Initialize the summary and subfolder listing.
14163 (imap_summary_free): Now takes a GPtrArray arg rather than a
14164 CamelImapFolder as it increases it's usefullness for free()'ing
14165 temporary summaries.
14166 (imap_get_message_count_internal): A new convenience function for
14167 getting the actual message count on a server to be used by
14168 imap_get_summary_internal)
14169 (imap_get_message_count): Since the Camel API is on the move again,
14170 the future version of this function will not be able to make a
14171 call to the store, it must only access previously fetched data (thus
14172 the creation of the _internal function)
14173 (imap_get_subfolder_names_internal): Again, because the future version
14174 of imap_get_subfolder_names will not take an exception, we must rename
14175 this function which will be called by camel_imap_folder_new()
14176 (imap_get_subfolder_names): We now return the previously collected
14177 subfolder listing that the _internal function fetched previously
14178 (imap_get_summary_internal): Again, same idea as the previous _internal
14180 (imap_get_summary): Again... now returns a previously aquired summary
14182 * providers/imap/camel-imap-store.c (imap_noop): This will hopefully
14183 prevent the imap store from disconnecting.
14184 (imap_connect): Modified to add a gtk timeout event that will call
14185 imap_noop() every 10 minutes (we may want to change this time value)
14186 (imap_disconnect): Modified to remove the NOOP timeout event from the
14188 (camel_imap_command_extended): Commented out the code that would try
14189 and detect if the store was disconnected and then reconnect if it was
14192 2000-07-24 Dan Winship <danw@helixcode.com>
14194 * camel-folder.[ch]: Remove camel_folder_get_message_uid, which
14195 was not used, and not implemented by any provider.
14197 * providers/nntp/camel-nntp-folder.c: Remove get_message_uid
14198 non-implementation.
14200 * camel-folder-pt-proxy.[ch], camel-arg-collector.c,
14201 camel-marshal-utils.[ch]: Bye bye bye.
14203 * Makefile.am: remove reference to camel-arg-collector.c
14205 2000-07-23 Jeffrey Stedfast <fejj@helixcode.com>
14207 * providers/imap/camel-imap-store.c (imap_disconnect): Made it a
14208 little more forgiving. Also set current_folder to NULL as there is
14209 no selected folder after a disconnect.
14210 (stream_is_alive): Detects whether or not a socket is "alive"
14211 (camel_imap_command_extended): Use stream_is_alive() to aid in the
14212 detection of a disconnected state.
14214 2000-07-22 Jeffrey Stedfast <fejj@helixcode.com>
14216 * providers/imap/camel-imap-store.c (get_folder): Clear
14217 CamelExceptions when appropriate (eg when folder is marked as
14218 \NoSelect). Still needs some cleanup and perhaps Dan will have a
14219 better way of doing this as this seems like a messy way of
14222 * providers/imap/camel-imap-folder.c (imap_get_uids): Took out
14223 some debug statements as they are no longer needed.
14225 2000-07-21 Jeffrey Stedfast <fejj@helixcode.com>
14227 * providers/imap/camel-imap-folder.c (imap_get_subfolder_names):
14228 Updated to not strip out subfolders that are marked as \NoSelect
14229 because this will be correctly handled in store->get_folder from
14232 * providers/imap/camel-imap-store.c (folder_is_selectable): New
14233 convenience function for use in get_folder().
14234 (parse_list_response): Now takes a char **flags argument which is
14235 needed by folder_is_selectable().
14236 (imap_connect): Updated to reflect changes to
14237 parse_list_response().
14239 2000-07-21 Jeffrey Stedfast <fejj@helixcode.com>
14241 * providers/imap/camel-imap-stream.c (stream_read): Updated with
14242 some of the same fixes I've made to camel-imap-folder.c like
14243 recalculating message part lengths.
14245 * providers/imap/camel-imap-store.c (camel_imap_command_extended):
14246 Rewrote the code to check for "* %d RECENT". Still needs to be
14247 modified, but should no longer cause an infinite loop by detecting
14248 mis-detecting RECENT messages.
14250 2000-07-20 Jeffrey Stedfast <fejj@helixcode.com>
14252 * providers/imap/camel-imap-folder.c (imap_get_summary):
14253 (imap_get_message_info): Oops. Fix UID parser to allow 0 and 9 to
14254 be in the range of valid UID chars.
14256 2000-07-20 Peter Williams <peterw@helixcode.com>
14258 * camel-object.c (camel_object_unref): Add a new global mutex
14259 'refcount' held when refcounting operations occur.
14261 2000-07-19 Peter Williams <peterw@helixcode.com>
14263 * camel-object.c (camel_type_lock_up): Correct the recursiveness;
14264 the locklevel is stored as a private, so each thread has its own
14265 idea of the locklevel. Thus one thread can relock, but a different
14266 one will think that it's a level 0 and try to lock the type_system
14269 2000-07-19 Jeffrey Stedfast <fejj@helixcode.com>
14271 * providers/imap/camel-imap-folder.c: General cleanup working
14272 towards getting Actions->Expunge working correctly.
14274 * providers/imap/camel-imap-store.c
14275 (cammel_imap_command_extended): Added code to look for "* %d
14276 RECENT" and to emit the folder_changed signal if there are any
14277 recent messages. Note: this is a hack and needs to be rewritten
14280 2000-07-19 Jeffrey Stedfast <fejj@helixcode.com>
14282 * providers/imap/camel-imap-folder.c (imap_get_summary): If the
14283 folder's message count is not the same as the number of summaries,
14284 free the old summary and create a new summary.
14286 2000-07-18 Jeffrey Stedfast <fejj@helixcode.com>
14288 * providers/imap/camel-imap-folder.c
14289 (camel_imap_folder_class_init): Added in
14290 imap_[g,s]et_message_user_flag() methods
14291 (imap_get_message_info): Rewrote to use the more efficient way of
14292 downloading summary information and also added a UID comparison so
14293 that if the UID requested doesn't match the UID received, it
14294 returns NULL. FIXME: When the mailer gets NULL when it requested
14295 message info, it seems that it displays a row for that message and
14296 when you try and select the blank row, it segfaults.
14298 * providers/imap/camel-imap-store.c (get_folder): Oops, this
14299 should not be checking against "/", it should be checking against
14302 * providers/imap/camel-imap-folder.c (imap_parse_subfolder_line):
14303 Updated to trim out the leading namespace.
14304 (imap_get_subfolder_names): Let the subfolder parser trim the
14305 namespace off the folder name.
14307 2000-07-17 Peter Williams <peterw@helixcode.com>
14309 * camel-object.c (camel_type_lock_up): New function; the
14310 Camel type_system lock is now fakey-recursive, being controlled
14311 by a semaphore that goes up and down and is protected by another
14312 lock. Theoretically all we need is the lock on the semaphore,
14313 but this we catch exceptions "better" (by deadlocking).
14314 (camel_type_lock_down): Corresponding to above.
14315 (all functions): s,G_LOCK,camel_type_lock_up, etc.
14317 2000-07-17 Jeffrey Stedfast <fejj@helixcode.com>
14319 * providers/imap/camel-imap-store.c (imap_disconnect): Send a
14322 * providers/imap/camel-imap-folder.c (imap_get_message): Hacks to
14323 get IMAP code to work with CommunigatePro and MS Exchange (and any
14324 other servers that send back a UID at the end of each FETCH inside
14325 of the main body of the message part).
14326 (imap_sync): Un-#if 0 the code that sets the flags on the IMAP
14327 server for messages that have changed. Oops, don't mask with
14328 DELETED to find out if the message has been answered ;-)
14329 (imap_expunge): sync before expunging.
14331 2000-07-16 Jeffrey Stedfast <fejj@helixcode.com>
14333 * providers/imap/camel-imap-store.c: All SELECT calls now pass
14334 a NULL folder argument to camel_imap_command_extended() since it's
14336 (imap_connect): Moved service_class->connect() to the point right
14337 after a connection is established with the server rather than
14338 waiting until the end of the function.
14339 (camel_imap_command): Updated the documentation comment
14340 (camel_imap_command_extended): Before sending a command, first
14341 check to make sure we are connected; if we aren't, then reconnect.
14342 Don't strncmp() command with "SELECT" as it's redundant.
14344 * providers/imap/camel-imap-folder.c: All SELECT calls now pass
14345 a NULL folder argument to camel_imap_command_extended() since it's
14346 not needed. Also s/camel_imap_command/camel_imap_command_extended as
14347 I will probably be doing away with camel_imap_command() or at least
14348 only using it for LOGIN and similar commands where the server won't
14349 notify us of any recent messages.
14351 2000-07-15 Jeffrey Stedfast <fejj@helixcode.com>
14353 * providers/imap/camel-imap-folder.c (camel_imap_folder_new):
14354 One last fix to get rid of hard-coded "/" directory separators
14356 2000-07-14 Peter Williams <peterw@helixcode.com>
14358 * camel-object.c : Implement 'events', which are suspiciously
14359 like signals except without all the marshalling baggage, and
14360 with quasi-thread-safety.
14361 (camel_object_class_declare_event): New func.
14362 (camel_object_hook_event): Ditto.
14363 (camel_object_trigger_event): Ditto.
14364 (obj_class_init): Declare the "finalize" event.
14365 (obj_class_finalize): Free the hashtable of events->preps
14366 (obj_finalize): Free the hashtable of events->hooklists
14367 (camel_object_unref): Trigger the finalize event (ourselves,
14368 to prevent massively unpleasant looping things.)
14370 2000-07-14 Peter Williams <peterw@helixcode.com>
14372 * camel-object.c (make_global_classfuncs): Change to return
14373 a CamelObjectClass. Change parents to a GSList and free it
14375 (camel_object_new): Don't allocate a classfuncs for every object;
14376 merely give it a reference to the global_classfuncs. Convert
14377 parents to a GSList and free it when done.
14378 (camel_object_unref): Don't free the classfuncs. Free the parents
14379 list, which is changed to a GSList.
14381 2000-07-14 Jeffrey Stedfast <fejj@helixcode.com>
14383 * string-utils.c (string_unquote): New convenience function
14384 to unquote a string if it's encapsulated by "'s
14386 * providers/imap/camel-imap-folder.c:
14387 * providers/imap/camel-imap-store.c: Made the necessary changes
14388 to stop using hard coded directory separators.
14390 2000-07-13 Dan Winship <danw@helixcode.com>
14392 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_load):
14393 If the summary is for a smaller mbox, and rebuilding from the
14394 last-known end position fails, try rebuilding from the beginning.
14395 Deals with the case where the user edits the mbox and makes it
14396 bigger, without adding new messages.
14398 2000-07-13 Peter Williams <peterw@helixcode.com>
14400 * camel-object.c: Rewritten to not be based on GtkObject,
14401 but a tiny threadsafe ripoff thereof. Objects still cannot
14402 be shared across threads, but ref/unref/destroy/new/etc
14403 will work. Signals are not implemented because doing it
14404 robustly would be a major pain in the butt, but class
14405 functions are. There's a small demonstration that it doesn't
14406 crash in ./temp-test.c: build it with ./make-test.sh.
14407 * camel-stream.c, camel-seekable-stream.c, camel-stream-mem.c:
14408 moved over to CamelObject. Proof of concept: two levels of
14409 subclass and class functions, all working without coredumps.
14410 To port to CamelObject:
14411 - s,GTK_,CAMEL_,g in the cast checks
14412 - s,gtk_type_new,camel_object_new,g
14413 - s,GtkType,CamelType,g
14414 - Change get_type function over to camel_type_declare
14415 - instead of hooking to finalize function, it goes into the
14418 - instead of GTK_OBJECT(so)->klass, CAMEL_OBJECT_GET_CLASS(so)
14419 - s,gtk_type_class,camel_type_get_global_classfuncs,g
14420 - don't chain finalize handlers; it will be done for you
14422 2000-07-13 Jeffrey Stedfast <fejj@helixcode.com>
14424 * providers/imap/camel-imap-folder.c:
14425 * providers/imap/camel-imap-store.c: If a SELECT fails, set
14426 imap_store->current_folder to NULL so a SELECT is forced before
14427 any message/folder operations are requested. Also, because some
14428 users don't use a namespace, make sure that if the url->path is
14429 "/" we don't use it when creating the folder_path.
14430 (camel_imap_command[_extended]): Since we allow the passing of
14431 a NULL folder which we can use to bypass a forced SELECT, no need
14432 to check for the individual commands that don't require a folder
14435 2000-07-13 Jeffrey Stedfast <fejj@helixcode.com>
14437 * providers/imap/camel-imap-folder.c:
14438 * providers/imap/camel-imap-store.c: Updated to use CAMEL_IMAP_OK,
14439 CAMEL_IMAP_NO, CAMEL_IMAP_BAD, and CAMEL_IMAP_FAIL rather than the
14440 ones copied from the POP3 provider.
14442 2000-07-13 Jeffrey Stedfast <fejj@helixcode.com>
14444 * providers/imap/camel-imap-folder.c (imap_get_summary): Oops.
14445 If the number of messages in the folder is 0, don't fetch
14446 summaries 1 thru 0, just return an empty summary.
14447 (imap_copy_message_to): Fixed to use message UID and also send
14448 the source folder as an arg to camel_imap_command rather than NULL.
14449 (imap_move_message_to): Same.
14450 (imap_init): If SELECT is successful, we need to set the current
14451 folder to the one selected, this was causing problems with move/copy
14453 2000-07-13 Dan Winship <danw@helixcode.com>
14455 * camel-service.h: define a set of CAMEL_SERVICE_URL_ALLOW_* flags
14456 parallel to the _NEED_* flags, and make the _NEED_* flags imply
14459 * providers/imap/camel-imap-store.c (camel_imap_store_init): imap
14462 2000-07-13 Jeffrey Stedfast <fejj@helixcode.com>
14464 * providers/imap/camel-imap-folder.c (imap_get_summary): New
14465 and improved approach to fetching an entire folder summary
14466 that should be much much faster than the old way as it gets
14467 the entire folder summary in 1 shot rather than requesting
14468 message by message. As with the last update, this version
14469 also only fetches the minimum number of header fields.
14470 (imap_get_summary): Oops, forgot to free the temp
14473 2000-07-13 Jeffrey Stedfast <fejj@helixcode.com>
14475 * providers/imap/camel-imap-folder.c (imap_get_summary): Don't
14476 fetch the entire RFC822 header, just fetch the fields we want.
14477 (imap_get_message_info): Same.
14479 2000-07-13 Not Zed <NotZed@HelixCode.com>
14481 * camel-mime-filter-basic.c (camel_mime_filter_basic_new_type):
14482 Reset filter on setup.
14483 (reset): When resetting qp encoding, set the state to -1, instead
14486 * camel-mime-utils.c (quoted_encode_step): Actually count the
14487 characters output sofar (it never counted any). Bunch of other
14489 (quoted_encode_close): Also flush out final character, if there's
14492 2000-07-12 Jeffrey Stedfast <fejj@helixcode.com>
14494 Chris forgot to add #include <e-util/e-util.h> to the source files
14496 * providers/imap/camel-imap-store.c (imap_connect): Fixed Peter's
14497 fix, we don't want to send a string to a %d.
14499 2000-07-12 Christopher James Lahey <clahey@helixcode.com>
14501 * camel-folder-search.c, providers/imap/camel-imap-store.c:
14502 Changed from strstrcase to e_strstrcase.
14504 * string-utils.c, string-utils.h: Removed strstrcase (in favor of
14505 e_strstrcase in e-util/e-util.c.)
14507 2000-07-12 Chris Toshok <toshok@helixcode.com>
14509 * providers/nntp/camel-nntp-folder.c
14510 (nntp_folder_set_message_flags): get the article num out of our
14511 uid and mark it read in the newsrc.
14512 (nntp_folder_get_message): get the message id out of the uid to
14515 * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): the uid
14516 is now <article-num>,<messageid>
14517 (get_HEAD_headers): same.
14519 * camel-mime-parser.c (folder_scan_step): go to HSCAN_MESSAGE
14520 state when ct->subtype is "news" as well as "rfc822". this makes
14521 attachments of type "message/news" display properly.
14523 2000-07-12 Dan Winship <danw@helixcode.com>
14525 * camel-folder.c (camel_folder_free_deep,
14526 camel_folder_free_shallow, camel_folder_free_nop): Useful default
14527 implementations for free_{uids,subfolder_names,summary}.
14528 (free_subfolder_names, free_uids): Make these g_warning-ing
14529 default implementations.
14531 * providers/*/camel-*-folder.c: Use the new functions where
14532 appropriate, remove duplicated code.
14534 2000-07-12 Peter Williams <peterw@helixcode.com>
14536 * providers/imap/camel-imap-store.c (query_auth_types): Check for
14537 NULL parameters when setting the exception so as to not crash on
14538 Solaris (can't handle a %s passed NULL).
14539 (imap_connect): Same.
14541 2000-07-12 Jeffrey Stedfast <fejj@helixcode.com>
14543 * providers/mbox/camel-mbox-folder.c (mbox_delete_message): Use
14544 mbox_set_message_flags () instead of setting the flags by hand. This
14545 fixes the problem of the "message_changed" signal not being emitted
14546 at the correct time.
14548 * providers/imap/camel-imap-folder.c: "folder_changed" signals should
14549 pass a third argument (which is ignored).
14551 * camel-folder.c: Undo gtk signal emits done in set_flags and
14554 (copy_message_to): Create info as a const CamelMessageInfo
14556 2000-07-12 Chris Toshok <toshok@helixcode.com>
14558 * providers/nntp/Makefile.am: don't add test-newsrc to the build
14559 since it needs libcamel (which isn't built at the time test-newsrc
14562 * providers/nntp/camel-nntp-utils.c (get_HEAD_headers): fill in
14563 MessageInfo->message_id.
14564 (get_XOVER_headers): same.
14566 * providers/nntp/camel-nntp-folder.c (nntp_folder_init): move
14567 summary loading here.
14568 (nntp_folder_sync): summary/newsrc changes should be stored here.
14569 put a comment to that effect.
14570 (nntp_folder_set_message_flags): don't save the newsrc here.
14571 (nntp_folder_get_uids): use g_ptr_array_index instead of the
14573 (nntp_folder_get_summary): no need to check if we should generate
14574 the summary here. already done.
14575 (nntp_folder_get_message_info): implement.
14577 * providers/nntp/camel-nntp-store.c
14578 (camel_nntp_store_get_toplevel_dir): use evolution_dir instead of
14579 computing it ourselves.
14580 (nntp_store_disconnect): call camel_nntp_newsrc_write.
14581 (ensure_news_dir_exists): new function to create the news/<news
14583 (camel_nntp_store_class_init): hook up connect/disconnect and
14585 (nntp_store_connect): if ensure_news_dir_exists fails throw an
14588 2000-07-12 Peter Williams <peterw@helixcode.com>
14590 * camel-folder.c (camel_folder_set_message_flags): Emit a message_changed
14591 signal once the flags are set on the message.
14592 (camel_folder_set_user_flag): Ditto.
14593 (camel_folder_expunge): Emit a folder_changed if no exception.
14595 2000-07-12 Jeffrey Stedfast <fejj@helixcode.com>
14597 * camel-stream.c: Use size_t and ssize_t for read/write methods
14599 * providers/imap/camel-imap-folder.c (imap_set_message_flags):
14600 Updated to emit the message_changed signal.
14601 (imap_delete_message): Updated to use imap_set_message_flags ().
14602 (imap_move_message_to): Updated to use imap_set_message_flags ()
14603 and to emit the folder_changed signal on the destination folder.
14604 (imap_copy_message_to): Updated to emit the folder_changed signal
14605 on the destination folder.
14606 (imap_append_message): Updated to emit the folder_changed signal
14607 on the destination folder.
14609 2000-07-11 Jeffrey Stedfast <fejj@helixcode.com>
14611 * camel-folder.c (camel_folder_append_message): Now takes a
14612 flags argument to specify the flags to be set on the message
14613 since we might not necessarily want the flags to be wiped clean.
14615 (copy_message_to): Updated to send a flags argument to
14616 append_message (); currently sends the original message's flags.
14618 * providers/mbox/camel-mbox-folder.c (mbox_append_message):
14619 * providers/imap/camel-imap-folder.c (imap_append_message):
14622 2000-07-11 Dan Winship <danw@helixcode.com>
14624 * camel-folder.c: Remove exceptions from a number of methods
14625 that work on what ought to be static data: get_parent_folder,
14626 get_parent_store, get_message_count, get_unread_message_count,
14627 get_permanent_flags, get_message_flags, set_message_flags,
14628 get_message_user_flag, set_message_user_flag, get_message_uid,
14629 get_uids, get_summary, get_subfolder_names. Turn
14630 camel_folder_delete_message into a macro.
14632 * providers/{mbox,pop3,vee}: Update for CamelFolder changes
14634 * providers/Makefile.am: Disable imap and nntp for now
14636 2000-07-11 Jeffrey Stedfast <fejj@helixcode.com>
14638 * providers/imap/camel-imap-folder.c (imap_search_by_expression):
14639 This shouldn't return NULL, it should return g_ptr_array_new ()
14640 so the mailer gets what it expects.
14642 2000-07-10 Jeffrey Stedfast <fejj@helixcode.com>
14644 * camel-folder-summary.c (camel_folder_summary_decode_string):
14645 Oops, an unsigned integer can never be < 0
14647 2000-07-10 Dan Winship <danw@helixcode.com>
14649 * providers/vee/camel-vee-folder.c (vee_search_by_expression):
14650 Initialize a variable to make this not crash again. And fix a bug
14651 so it actually does something.
14653 2000-07-10 Jeffrey Stedfast <fejj@helixcode.com>
14655 * camel-folder-summary.c: Cleaned up a bunch of compile warnings
14657 2000-07-10 Dan Winship <danw@helixcode.com>
14659 * providers/vee: kill more debugging messages
14661 2000-07-10 Jeffrey Stedfast <fejj@helixcode.com>
14663 * providers/mbox/camel-mbox-folder.c (mbox_get_unread_message_count):
14664 * providers/vee/camel-vee-folder.c (vee_get_unread_message_count):
14665 * providers/imap/camel-imap-folder.c (imap_get_unread_message_count):
14668 * camel-folder.c (camel_folder_get_unread_message_count): New
14669 convenience function to allow the mailer to query the number
14670 of unread messages in a folder (for displaying message stats
14671 in a folder tree?).
14673 2000-07-09 Dan Winship <danw@helixcode.com>
14675 * camel-mime-utils.c (header_references_dup): New function to copy
14676 a header_references structure.
14678 * camel-folder-summary.c (camel_message_info_dup_to): New function
14679 to (deep) copy the data from one CamelMessageInfo into another.
14680 (camel_message_info_free): And free the data.
14682 * providers/vee/camel-vee-folder.c (vee_sync): Implement. (empty).
14683 (vee_search_by_expression): belatedly update for
14684 camel_folder_search change.
14685 (vee_folder_build): belatedly update for camel_folder_search
14686 change. Use camel_message_info_dup_to and camel_message_info_free
14687 (in particular, so that we get message_id and references info so
14688 vfolders can be threaded).
14689 (vee_folder_build_folder): Ditto.
14691 2000-07-08 Jeffrey Stedfast <fejj@helixcode.com>
14693 * providers/nntp/camel-nntp-folder.c:
14694 * providers/nntp/camel-nntp-utils.c:
14695 * providers/nntp/camel-nntp-store.c: Update to reflect past changes
14696 in the Camel API. Use gtk macro casts wherever possible and use glib's
14697 memory functions instead of standard c's (since they are not
14700 * providers/smtp/camel-smtp-transport.c:
14701 * providers/imap/camel-imap-store.c: Wrap debug print statements
14704 * providers/imap/camel-imap-stream.c (stream_read): Make sure
14705 that we get up to and including the last \n of the mime part.
14707 * providers/imap/camel-imap-folder.c (imap_get_message): Make sure
14708 that we get up to and including the last \n of the mime part.
14709 Wrap debug print statements in a macro.
14711 * providers/imap/camel-imap-stream.c (stream_read): Only cache
14712 the important data (aka the mime part requested and no extra
14713 server response stuff)
14715 2000-07-07 Dan Winship <danw@helixcode.com>
14717 * camel-mime-utils.c (header_references_decode): Work around
14718 In-Reply-To's with unquoted punctuation. So many broken mailers.
14720 * camel-folder.c (camel_folder_search_by_expression): Make this
14721 return a GPtrArray rather than a GList.
14723 * camel-folder-search.c (camel_folder_search_execute_expression):
14724 * providers/imap/camel-imap-folder.c (imap_search_by_expression):
14725 * providers/mbox/camel-mbox-folder.c (mbox_search_by_expression):
14726 * providers/nntp/camel-nntp-folder.c (nntp_search_by_expression):
14727 Update to return a GPtrArray rather than a GList.
14729 2000-07-07 Jeffrey Stedfast <fejj@helixcode.com>
14731 * providers/smtp/camel-smtp-transport.c (esmtp_get_authtypes):
14732 Fixed the parser to actually work
14734 2000-07-06 Dan Winship <danw@helixcode.com>
14736 * camel-mime-utils.c (header_references_decode): Make this deal
14737 with the full RFC822 References/In-Reply-To format rather than
14738 just the more-nicely-behaved RFC1036 version. (Needed to parse
14739 In-Reply-To headers with extra junk in them.)
14741 2000-07-06 Jeffrey Stedfast <fejj@helixcode.com>
14743 * providers/imap/camel-imap-folder.c (imap_get_summary): Parse for
14744 more header information to allow message threading in IMAP.
14745 (imap_get_message_info): Same.
14747 * camel-folder-summary.c: Renamed summary_format_* to
14748 camel_summary_format_* and moved them into public scope.
14750 * providers/smtp/camel-smtp-transport.c (smtp_connect): Oops. Don't
14751 pass port # as a string in the error code (if it fails to connect).
14753 * providers/imap/camel-imap-folder.c (imap_append_message): Changed
14754 over to camel_imap_command_extended as that was the source of the
14755 problems - apparently appending replies with more than just 1 line.
14757 2000-07-05 Dan Winship <danw@helixcode.com>
14759 * camel-folder-search.c (search_header_contains): make header
14760 matching case-insensitive
14762 * camel-folder-summary.c:
14764 * providers/mbox/camel-mbox-folder.c:
14765 * providers/mbox/camel-mbox-summary.c: Remove some non-error case
14766 debugging-type messages.
14768 2000-07-05 Ettore Perazzoli <ettore@helixcode.com>
14770 * providers/mbox/camel-mbox-summary.c (d): Define to empty so that
14771 we get rid of a ton of debugging messages.
14773 2000-07-05 Jeffrey Stedfast <fejj@helixcode.com>
14775 * camel-mime-utils.h: Added prototype for uudecode_step
14777 * camel-mime-utils.c (uudecode_step): Cleaned up some junk that
14778 should have been cleaned up when debugging printf's were taken out.
14780 2000-07-05 Ettore Perazzoli <ettore@helixcode.com>
14782 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
14783 Update the X-Evolution: header even if the in-memory UID and the
14784 saved UID are not the same. Otherwise mboxes with clashing UIDs
14785 can never be fixed.
14787 * camel-folder-summary.c
14788 (camel_folder_summary_add_from_parser): Add the message to the
14789 summary before doing any ibex stuff. In fact, this might also
14790 have the side effect of reassigning the UID so it needs to be done
14791 before we start using the UID.
14793 * providers/mbox/camel-mbox-folder.c (mbox_append_message): Add
14794 debugging message to keep track of the UIDs we add.
14796 2000-07-05 Dan Winship <danw@helixcode.com>
14798 * camel-folder-summary.c: Add "Cc" to summary and bump summary
14801 * camel-folder-search.c (search_header_contains): make "Cc" a
14804 2000-07-03 Ettore Perazzoli <ettore@helixcode.com>
14806 * camel-folder-summary.c (camel_folder_summary_next_uid_string):
14808 (camel_folder_summary_add): Use
14809 `camel_folder_summary_next_uid_string()' instead of recomputing
14810 the UID manually here.
14811 (camel_folder_summary_add_from_parser): Likewise.
14813 2000-07-03 Ettore Perazzoli <ettore@helixcode.com>
14815 * camel-folder-summary.c (camel_folder_summary_set_uid): Removed.
14817 2000-07-03 Dan Winship <danw@helixcode.com>
14819 * camel-folder-summary.c (message_info_new): Parse In-Reply-To
14820 with header_references_decode, not header_msgid_decode.
14822 * camel-mime-message.c (camel_mime_message_class_init): message
14823 headers are case-insensitive.
14825 * providers/pop3/camel-pop3-store.c (camel_pop3_command): Fix a
14826 bug in error-setting code.
14827 (pop3_connect): Don't re-prompt for password in the KPOP case.
14828 (pop3_get_response): New function, split out from
14829 camel_pop3_command.
14830 (connect_to_server): Use pop3_get_response to parse the greeting
14831 message, and error out appropriately if it's -ERR.
14833 2000-07-02 Dan Winship <danw@helixcode.com>
14835 * camel-folder.c (camel_folder_freeze, camel_folder_thaw): New
14836 functions to freeze and thaw a folder (to prevent message/folder
14837 changed signals in the middle of a long series of operations).
14838 (camel_folder_class_init): Change signals to GTK_RUN_FIRST.
14839 (message_changed, folder_changed): Add default implementations
14840 that stop the emission and record info for later if the folder is
14843 * providers/mbox/camel-mbox-folder.c (mbox_sync): leftover fixes
14844 from the close->sync change: don't destroy the ibex, summary, and
14845 search when syncing.
14846 (append_message): emit "folder_changed" on a successful append.
14848 2000-07-02 Jeffrey Stedfast <fejj@helixcode.com>
14850 * camel-mime-utils.c (uudecode_step): A rather complex uudecoder
14851 written in the spirit of Zucchi-ness, is it up to par? Only the
14852 Z-man can tell us :-)
14854 2000-07-01 Dan Winship <danw@helixcode.com>
14856 * camel-service.c (camel_service_get_name): New method, to return
14857 an end-user-friendly name corresponding to a service. (eg, "POP
14858 service for danw on trna.helixcode.com").
14860 * providers/imap/camel-imap-store.c,
14861 providers/mbox/camel-mbox-store.c,
14862 providers/nntp/camel-nntp-store.c,
14863 providers/pop3/camel-pop3-store.c,
14864 providers/sendmail/camel-sendmail-transport.c,
14865 providers/smtp/camel-smtp-transport.c: Implement.
14867 * providers/imap/Makefile.am: remove unneeded
14868 libcamelimap_la_LDADD.
14870 * providers/pop3/camel-pop3-store.c (connect_to_server): fix the
14871 CAPA-parsing code to not get into an infinite loop.
14873 2000-07-01 Jeffrey Stedfast <fejj@helixcode.com>
14875 * providers/imap/camel-imap-folder.c (imap_get_message): Fixed
14876 the bug that would sometimes leave part of the server response
14877 tacked on to the end of the message.
14879 * camel-folder.c: Renamed _by_uid methods. Since we no longer
14880 have get-by-number methods, no need to have the _by_uid
14882 (get_message_by_uid): Renamed to get_message
14883 (delete_message_by_uid): Renamed to delete_message
14884 (summary_get_by_uid): Renamed to get_message_info
14886 * providers/mbox/camel-mbox-folder.c:
14887 * providers/pop3/camel-pop3-folder.c:
14888 * providers/imap/camel-imap-folder.c:
14889 * providers/vee/camel-vee-folder.c: Updated to reflect
14890 camel-folder changes.
14892 2000-06-30 Jeffrey Stedfast <fejj@helixcode.com>
14894 * camel-folder.c (camel_folder_copy_message_to): New function, to
14895 copy a message from one folder to another. The default
14896 implementation just uses append_message, but providers can
14897 implement more efficient versions for use when both folders are on
14900 * broken-date-parser.[c,h]: Utilities for parsing broken
14903 * providers/imap/camel-imap-folder.c (imap_move_message_to):
14904 (imap_copy_message_to): Implemented.
14906 * camel-mime-utils.c (header_decode_date): Wrote some code to try
14907 and un-mangle broken date formats and then parse that new string
14910 2000-06-30 Dan Winship <danw@helixcode.com>
14912 * camel-folder.c (camel_folder_move_message_to): New function, to
14913 move a message from one folder to another. The default
14914 implementation just uses append_message and delete_message, but
14915 providers can implement more efficient versions for use when both
14916 folders are on the same store.
14918 2000-06-29 Jeffrey Stedfast <fejj@helixcode.com>
14920 * providers/imap/camel-imap-folder.c (imap_expunge): Should now
14921 print a meaningful error message when it doesn't succeed
14923 2000-06-28 Jeffrey Stedfast <fejj@helixcode.com>
14925 * providers/imap/camel-imap-store.c (imap_connect): Changed to
14926 keep prompting user for a valid password until it either
14927 authenticates or until Canceled by the user.
14928 (camel_imap_command_extended): Improved speed (replaced the
14929 g_strjoinv call with a faster implementation)
14931 * providers/pop3/camel-pop3-store.c
14932 (camel_pop3_command_get_additional_data): Fixed.
14933 (pop3_connect): Changed to keep prompting the user for a
14934 password until it either works or until Canceled by the user.
14936 * providers/mbox/camel-mbox-summary.c: General cleanup
14937 (camel_mbox_summary_sync): Fixed a memory leak and added
14938 CamelException handling.
14940 * providers/mbox/camel-mbox-store.c (delete_folder): Fixed a
14943 * providers/mbox/camel-mbox-folder.c (mbox_append_message):
14944 Default 'off_t seek' to -1 so as to make sure it's initialized
14945 before it's used in the case of a bad stat() call.
14946 (mbox_sync): Updated
14947 (mbox_expunge): Updated
14949 2000-06-27 Jeffrey Stedfast <fejj@helixcode.com>
14951 * providers/imap/camel-imap-store.c (imap_connect): Move the
14952 CAPABILITY command here so we don't have to keep checking
14953 each time we open a folder.
14954 (camel_imap_command_extended): If we are doing an EXAMINE,
14955 don't bother doing a SELECT first.
14957 * providers/imap/camel-imap-folder.c (imap_init): Update so
14958 folder->has_search_capability depends on the parent IMAP store
14959 (since this is really dependant on the IMAP implementation and
14962 2000-06-27 Christopher James Lahey <clahey@helixcode.com>
14964 * providers/smtp/camel-smtp-transport.c: Don't close the filter
14965 stream when done with it (this causes the source stream to close);
14966 Instead, just flush it when done.
14968 2000-06-27 Michael Zucchi <zucchi@zedzone.mmc.com.au>
14970 * camel-folder-search.c (search_header_contains): Make header
14971 search 'to' match 'to', and not 'from', small typo, fixes #317.
14973 2000-06-26 Christopher James Lahey <clahey@helixcode.com>
14975 * providers/mbox/camel-mbox-summary.c: Added debugging
14978 2000-06-23 Jeffrey Stedfast <fejj@helixcode.com>
14980 * providers/imap/camel-imap-store.c:
14981 * providers/imap/camel-imap-folder.c: Improved folder parsing.
14982 Not specifying a namespace should no longer list the entire
14985 2000-06-22 Chris Toshok <toshok@helixcode.com>
14987 * providers/nntp/.cvsignore: ignore test-newsrc
14989 * providers/nntp/camel-nntp-store.c,
14990 providers/nntp/camel-nntp-store.h,
14991 providers/nntp/camel-nntp-folder.c,
14992 providers/nntp/camel-nntp-folder.h,
14993 providers/nntp/camel-nntp-utils.c: Bring the nntp provider up to a
14994 state where it builds and is usable with the current camel. there
14995 are still warts (semi-broken .newsrc file handling, and a lack of
14996 a subscribe ui -- in fact no way to add a new server, really), but
14997 it'll display news messages.
14999 * providers/nntp/Makefile.am (libcamelnntp_la_SOURCES): add
15000 camel-nntp-newsrc.c
15001 (libcamelnntpinclude_HEADERS): add camel-nntp-newsrc.h
15002 also, add test-newsrc stuff.
15004 * providers/nntp/test-newsrc.c: new file that tests the newsrc
15005 stuff by parsing and regurgitating a .newsrc file for a particular
15008 * providers/nntp/camel-nntp-newsrc.c,
15009 providers/nntp/camel-nntp-newsrc.h: new files, initial support for .newsrc files.
15011 2000-06-22 Jeffrey Stedfast <fejj@helixcode.com>
15013 * providers/imap/camel-imap-folder.c (imap_get_message_count):
15014 Oops. Now appends the namespace to the folder before querying
15015 for the number of messages.
15017 * providers/imap/camel-imap-store.c (imap_folder_exists): New
15018 convenience function for use by imap_create().
15019 (get_folder): If folder is specified as "/", we really want
15022 * providers/sendmail/camel-sendmail-provider.c:
15023 * providers/vee/camel-vee-provider.c:
15024 * providers/smtp/camel-smtp-provider.c:
15025 * providers/mbox/camel-mbox-provider.c:
15026 * providers/pop3/camel-pop3-provider.c:
15027 * providers/imap/camel-imap-provider.c: Updated
15029 * camel-session.c: Moved service_cache hash table into the
15031 (service_cache_remove): Updated.
15032 (camel_session_get_service): Updated.
15034 * camel-url.c (camel_url_hash): Took out the hashing of
15035 url->passwd. We don't want this anymore.
15037 * providers/imap/camel-imap-folder.c (imap_init): Took out
15038 references to 'namespace'
15039 (camel_imap_folder_init): Same
15041 * providers/imap/camel-imap-folder.h: No more namespace. We are
15042 instead going to use url->path as the namespace.
15044 2000-06-21 Jeffrey Stedfast <fejj@helixcode.com>
15046 * providers/imap/camel-imap-store.c (imap_create): Modified to
15047 use the "namespace" (url->path) if it exists.
15049 * providers/imap/camel-imap-folder.c (imap_delete_message_by_uid):
15050 Now just sets the deleted flag on the summary rather than speaking
15051 directly to the IMAP server. This is both faster and cleaner.
15053 2000-06-21 Dan Winship <danw@helixcode.com>
15055 * providers/pop3/camel-pop3-store.c (query_auth_types): Fix dumb
15058 2000-06-21 Jeffrey Stedfast <fejj@helixcode.com>
15060 * providers/imap/camel-imap-folder.c (imap_get_message_by_uid):
15061 We are getting mail in IMAP now!! whoo-hoo!. Stripped out the
15062 filtering so messages may have some dot-stuffing, but the
15063 filtering can always be added back in later when we know it
15064 works and isn't the problem.
15066 2000-06-21 Peter Williams <peterw@curious-george.helixcode.com>
15068 * providers/mbox/camel-mbox-folder.c (mbox_init): Use the basename
15069 of the mailbox so we don't get pathnames like ~/evolution/inbox///movemail.ibex
15071 2000-06-21 Dan Winship <danw@helixcode.com>
15073 * camel-folder-summary.c (message_info_new): Set date_received
15074 based on the first (most recent) "Received" header.
15076 2000-06-20 Dan Winship <danw@helixcode.com>
15078 * camel-mime-part.c (write_to_stream): flush the filter stream
15079 before unreffing it, so it will camel_mime_filter_complete.
15081 * camel-stream-filter.c (camel_stream_filter_class_init): Fix a
15082 braino so camel_stream_flush works here.
15084 * camel-stream-mem.c (stream_seek): Fix a bug that resulted in
15085 large attachments being silently dropped.
15087 * providers/pop3/camel-pop3-store.c
15088 (camel_pop3_command_get_additional_data): Don't use g_strjoinv
15089 here, since it is O(n^2) on the length of the output string, and
15092 * camel-mime-part-utils.c
15093 (simple_data_wrapper_construct_from_parser): add a CRLF decoder
15094 after the QP/B64 decoder if it's text.
15096 2000-06-20 Jeffrey Stedfast <fejj@helixcode.com>
15098 * providers/imap/camel-imap-folder.c (imap_get_summary): Only
15099 fetch the summary if the folder summary doesn't already exist.
15100 When the summary *does* exist, start fetching from 1, not 0.
15101 (imap_free_summary): Don't do anything here.
15102 (imap_finalize): Free the summary here instead of in
15103 imap_free_summary().
15104 (imap_set_message_flags): Implemented
15105 (imap_sync): Added code to set flags on messages that have had
15106 their flags changed (however I #if'd it out until we are more
15107 confidant in the IMAP code :)
15108 (imap_summary_get_by_uid): Now parese flags correctly.
15109 (imap_get_summary): Now parese flags correctly. Also correctly
15110 parses the UID correctly.
15112 * camel-url.c (check_equal): No need to check s1 if s2 is NULL
15113 (camel_url_equal): Don't check the passwd component of the url.
15115 2000-06-20 Dan Winship <danw@helixcode.com>
15117 * camel-folder-summary.c (camel_folder_summary_add): mark the
15118 message info with CAMEL_MESSAGE_FOLDER_FLAGGED if we change the
15119 uid, so the folder will know that it's dirty.
15121 2000-06-20 Jeffrey Stedfast <fejj@helixcode.com>
15123 * providers/imap/camel-imap-store.c (camel_imap_command_extended):
15124 Now returns the last line of data that the server sends back as
15125 well. This is needed for commands like SELECT (like Peter pointed
15127 (camel_imap_command): No longer checks for SELECT (no need)
15129 * providers/imap/camel-imap-folder.c: Added namespace stuff
15130 which we will need later on...
15131 (imap_parse_subfolder_line): Convenience function for use in
15132 get_subfolder_names()
15133 (imap_get_subfolder_names): Updated. Also changed it to use LIST
15134 instead of LSUB (temporary change).
15136 2000-06-19 Jeffrey Stedfast <fejj@helixcode.com>
15138 * providers/imap/camel-imap-folder.c (camel_imap_folder_init): Set
15139 summary equal to NULL.
15140 (imap_get_summary): Store the summary in the ImapFolder
15141 (imap_summary_get_by_uid): If we have a summary cache in the
15142 ImapFolder, first check to see if that message info is in the
15143 cached summary first, if not fetch it directly from the IMAP
15144 server and append it to the summary cache.
15145 (imap_get_message_flags): Don't free the message info that we get
15146 back from summary_get_by_uid as we don't want to be corrupting our
15149 2000-06-19 Peter Williams <peterw@curious-george.helixcode.com>
15151 * providers/imap/camel-imap-store.c (camel_imap_command{,_extended}): When
15152 SELECT'ing a folder for an IMAP command, use _extended to grab the entire
15153 response (before we just used camel_imap_command and missed the OK codes)
15155 2000-06-18 Jeffrey Stedfast <fejj@helixcode.com>
15157 * providers/imap/camel-imap-folder.c (imap_summary_get_by_uid):
15158 Now gets the message flags as it should.
15159 (imap_get_summary): Same as imap_summary_get_by_uid
15160 (imap_get_permanent_flags): Return the permanent flags stored
15162 (imap_get_message_flags): Return message flags associated with
15163 given uid. Note: we may want to somehow cache summary info so
15164 that we don't have to keep querying the IMAP provider in
15165 imap_summary_get_by_uid().
15167 2000-06-17 Jeffrey Stedfast <fejj@helixcode.com>
15169 * providers/imap/camel-imap-folder.c (imap_free_summary): We were
15170 leaking memory - but not anymore!
15171 (imap_get_summary): We now get the UIDs and the beginnings of the
15172 code to get the message flags as well.
15174 2000-06-17 Dan Winship <danw@helixcode.com>
15176 * camel-mime-parser.c (folder_scan_header): Don't copy newlines
15177 into the parsed header text, and turn any number of tabs and
15178 spaces after a newline into a single space.
15180 2000-06-17 Jeffrey Stedfast <fejj@helixcode.com>
15182 * providers/imap/camel-imap-folder.c (imap_init): Should now
15183 correctly do CAPABILITY.
15185 2000-06-17 Dan Winship <danw@helixcode.com>
15187 * providers/mbox/camel-mbox-summary.c: Add some debugging printfs
15188 when rebulding summary to help figure out why people's summaries
15189 are always being rebuilt.
15191 2000-06-17 Jeffrey Stedfast <fejj@helixcode.com>
15193 * providers/imap/camel-imap-folder.c (imap_search_by_expression):
15194 Began to implement, need to get information on how to
15195 deconstruct @expression into an IMAP search expression and
15197 (imap_init): Now queries the IMAP provider for CAPABILITY to
15198 determine if SEARCH is implemented or not.
15200 * providers/imap/imap.c: Removed - no longer a need to have
15201 this as an example for anyone interesting to help mecode IMAP
15204 2000-06-16 Jeffrey Stedfast <fejj@helixcode.com>
15206 * providers/imap/camel-imap-folder.c (imap_sync): Added code
15207 to expunge if called for (still need to finish coding this).
15208 (imap_get_uids): Implemented.
15209 (imap_get_summary): Found a way to get the date
15210 (imap_summary_get_by_uid): Same.
15211 (imap_free_summary): Implemented.
15213 * string-utils.c (strstrcase): Fixed a compile warning
15215 * providers/imap/camel-imap-summary.c: Removed - we don't
15216 need a CamelImapSummary structure.
15218 2000-06-16 Dan Winship <danw@helixcode.com>
15220 Move flag handling from CamelMimeMessage to CamelFolder. This
15221 simplifies several flag-handling pieces of code in the mailer, and
15222 lets you change a message's flags without having to fetch the
15223 message body. It also means that fully-constructed
15224 CamelMimeMessages are now essentially constant, which will help
15225 simplify locking issues later since it means two threads
15226 interested in the same message can just work with separate copies
15229 * camel-mime-message.h (struct _CamelMimeMessage): Removed flags
15230 and user_flags (moved to summary). Removed expunged and
15231 message_number which were unused. Removed message_uid and folder
15232 which are no longer needed in the new scheme.
15233 (struct CamelMimeMessageClass): Removed message_changed signal and
15234 get/set_message_number methods.
15236 * camel-mime-message.c: Updates for CamelMimeMessage changes.
15237 (camel_mime_message_get/set_flags,
15238 camel_mime_message_get/set_user_flag): Replaced with methods in
15240 (camel_flag_get, camel_flag_set, camel_flag_list_size,
15241 camel_flag_list_free): Moved verbatim to camel-folder-summary.c
15243 * camel-folder.c (camel_folder_get/set_message_flags,
15244 camel_folder_get/set_message_user_flag): New methods (and
15245 corresponding useless default implementations)
15246 (camel_folder_class_init): add a message_changed signal
15248 * camel-folder-summary.c (camel_flag_get, camel_flag_set,
15249 camel_flag_list_size, camel_flag_list_free): Moved here from
15250 camel-mime-message.c
15252 * providers/mbox/camel-mbox-folder.c (message_changed): Removed.
15253 (mbox_get_message_flags, mbox_set_message_flags,
15254 mbox_get_message_user_flag, mbox_set_message_user_flag): Tweak
15255 summary bits as appropriate. (Functionality moved here from
15257 (mbox_get_message_by_uid): Update for CamelMimeMessage changes
15258 (less stuff to initialize).
15260 * providers/imap/camel-imap-folder.c (message_changed): Remove
15261 this. It was just copied from the mbox provider and doesn't deal
15262 with the real IMAP flag stuff anyway. (So there's currently no
15263 flag support in the IMAP provider.)
15264 (imap_get_message_by_uid): Update for CamelMimeMessage changes.
15266 * providers/vee/camel-vee-folder.c: (message_changed): Remove old
15267 one. Add a new one to listen for message_changed on each folder
15268 and re-emit message_changed signals that correspond to messages in
15270 (vee_get/set_message_flags, vee_get/set_message_user_flag): Proxy
15271 flag setting to the underlying real messages.
15272 (vee_append_message): Removed for now; there's no way to translate
15273 this into the new CamelMimeMessage/CamelFolder scheme, but (a)
15274 there's also no code which would ever call it and (b) we're
15275 probably going want a better interface than append_message for
15276 message drag and drop to work anyway. To be revisited.
15278 2000-06-16 Dan Winship <danw@helixcode.com>
15280 * camel-mime-utils.c (rfc2047_decode_word):
15281 * camel-mime-part-utils.c (simple_data_wrapper_construct_from_parser):
15282 * camel-folder-summary.c (summary_build_content_info):
15283 KLUDGE! Since neither ETable nor GtkHTML supports UTF-8 yet,
15284 output ISO-8859-1 instead, so Ettore can read his Italian mail. :)
15285 This will be reverted later.
15287 2000-06-15 Jeffrey Stedfast <fejj@helixcode.com>
15289 * providers/imap/camel-imap-folder.c (imap_get_summary): Started to
15290 implement - may want to use ENVELOPE instead of BODY.PEEK[HEADER]
15291 (imap_summary_get_by_uid): Started to code, I've got to find a way to
15292 get the date in time_t format and also get the flags
15294 * string-utils.c (strstrcase): Added this convenience function - I
15295 know about strcasestr() but it's not portable.
15297 2000-06-15 Dan Winship <danw@helixcode.com>
15299 * camel-service.c: Remove camel_service_connect_with_url. (URLs
15300 must be specified when the service is requested from the session,
15301 so that there can only ever be one service for any URL.)
15303 * camel-folder.c: (camel_folder_open, camel_folder_is_open,
15304 camel_folder_get_mode): Kill. Folders are now always open, and
15305 handle "closing" sorts of operations at sync or finalize time.
15306 (camel_folder_sync): renamed from camel_folder_close. Syncs state
15307 to the store but doesn't necessarily close/disconnect.
15309 * providers/*/camel-*-folder.c: Merge "open" methods into "init"
15310 methods. Rename close to sync and update appropriately.
15312 * providers/imap/camel-imap-store.c: Remove camel_imap_store_open
15313 and camel_imap_store_close, which should not have been copied from
15314 the POP provider (where the exist to work around limitations of
15317 * providers/mbox/camel-mbox-summary.c: fix a bug. (don't expunge
15318 deleted messages if called with expunge == FALSE)
15320 * providers/pop3/camel-pop3-store.c (connect_to_server): Check
15321 server for various interesting extensions.
15323 * providers/pop3/camel-pop3-folder.c (get_uids): If the server
15324 supports UIDL, use real UIDs rather than fake ones.
15325 (etc): Map uids back to numbers appropriately
15327 * providers/mbox/camel-mbox-folder.c (mbox_append_message): Fix to
15328 previous change: make sure the "seek" variable ends up with the
15331 * providers/mbox/camel-mbox-summary.c (summary_rebuild): Update
15332 summary mtime as well as size.
15334 2000-06-14 Dan Winship <danw@helixcode.com>
15336 * providers/mbox/camel-mbox-folder.c (mbox_append_message): if the
15337 mbox doesn't end with a '\n', write one before appending the new
15340 2000-06-14 Jeffrey Stedfast <fejj@helixcode.com>
15342 * camel-mime-filter-crlf.c (filter): Updated the encoder to allocate
15343 more memory (since we are also now adding dots). Also updated the
15344 decoder as we have found that it sometimes passes the end of the
15347 * providers/pop3/camel-pop3-folder.c (get_message_by_uid): Took out the
15348 filter code (we already filter in
15349 camel_pop3_command_get_additional_data)
15351 * camel-folder.c (init): Updated: a separator is now a char* rather
15352 than a single char because IMAP can have a string for a directory
15353 separator. Also, since IMAP does not begin with a directory separator,
15354 there is a new argument (path_begins_with_sep) which decides if a
15355 directory should begin with a directory separator.
15357 * providers/imap/camel-imap-store.c (imap_create): Since, on connect,
15358 Camel tries to create INBOX (which already exists on every IMAP
15359 provider) we can return TRUE when the folder name is "INBOX".
15361 * providers/vee/camel-vee-folder.c (vee_init): Updated.
15363 * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Updated.
15365 * providers/mbox/camel-mbox-store.c (get_folder): Updated.
15367 * providers/mbox/camel-mbox-folder.c (mbox_init): Updated.
15369 * providers/pop3/camel-pop3-folder.c (camel_pop3_folder_new): Updated.
15371 2000-06-14 Dan Winship <danw@helixcode.com>
15373 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
15374 Renamed from camel_mbox_summary_expunge. Takes a gboolean saying
15375 whether to expunge or just sync the mbox file. Change some
15376 g_errors to g_warning so we don't abort. Make the quick
15377 X-Evolution updating code lseek around correctly. Update the
15378 mbox mtime in the summary file even in the quick case.
15380 * providers/mbox/camel-mbox-summary.h: make
15381 CAMEL_MESSAGE_FOLDER_NOXEV not conflict with
15382 CAMEL_MESSAGE_FOLDER_FLAGGED defined in camel-mime-message.h
15384 * providers/mbox/camel-mbox-folder.c (mbox_close): call
15385 camel_mbox_summary_sync to save flag state if not expunging.
15386 (mbox_expunge): Update for camel_mbox_summary_expunge rename.
15388 2000-06-13 Jeffrey Stedfast <fejj@helixcode.com>
15390 * providers/imap/camel-imap-store.c (camel_imap_store_open):
15391 (camel_imap_store_close): Added.
15392 (camel_imap_command_extended): Fixed a segfault and updated
15393 to use camel_imap_status()
15394 (camel_imap_command): Updated to use camel_imap_status()
15395 (camel_imap_status): New convenience function for parsing
15396 the return status of an IMAP command
15398 2000-06-12 Jeffrey Stedfast <fejj@helixcode.com>
15400 * providers/imap/camel-imap-folder.c (imap_get_message_by_uid):
15401 Works like the POP fetch code, should work temporarily until
15402 we get around to coding it the way it "Should Be".
15404 * providers/pop3/camel-pop3-folder.c (get_message_by_uid): Now uses
15405 the camel-mime-filter-crlf decoder when retrieving messages.
15407 * camel-mime-filter-smtp.c: Deprecated.
15409 * providers/smtp/camel-smtp-transport.c (smtp_data): Updated to use
15410 camel-mime-filter-crlf with my 'dot' extension in place of
15411 camel-mime-filter-smtp
15413 * camel-mime-part.c (write_to_stream): Updated to reflect changes
15414 made to camel-mime-filter-crlf.c
15416 * camel-mime-filter-crlf.c (filter): Modified to be able to
15417 encode/decode dots ("\n.\n"<->"\n..\n"). Also fixed the decoder
15418 so that it should no longer get caught in an infinite loop.
15420 2000-06-12 Dan Winship <danw@helixcode.com>
15422 * providers/*/Makefile.am: don't pass a second (incorrect) -rpath
15423 in addition to the (correct) one automatically provided by
15426 * camel-mime-filter-crlf.c: New filter to do CRLF<->LF conversion.
15427 (Currently only tested in the LF->CRLF direction.)
15429 * camel-mime-part.c (write_to_stream): if content-type is text,
15430 and it's QP or B64 encoded, pass through the CRLF filter before
15431 the other filter to satisfy the "canonical encoding" rules in the
15434 2000-06-09 Dan Winship <danw@helixcode.com>
15436 * camel-session.c (camel_session_query_authenticator): Add another
15437 argument, "mode", which can be CAMEL_AUTHENTICATOR_ASK or
15438 CAMEL_AUTHENTICATOR_TELL, so callers can get the app to un-cache
15441 * providers/pop3/camel-pop3-store.c (pop3_connect): uncache the
15442 password if it doesn't work.
15444 2000-06-09 Jeffrey Stedfast <fejj@helixcode.com>
15446 * providers/imap/camel-imap-stream.c (stream_read): Updated to reflect
15447 changes made in camel-imap-store.c
15449 * providers/imap/camel-imap-store.c (imap_create): No longer checks to
15450 make sure a folder doesn't already exists (as this is no longer needed)
15451 (camel_imap_command): Now takes a CamelFolder argument so it can detect
15452 whether or not it needs to SELECT a folder or not
15453 (camel_imap_command_extended): Same.
15455 * providers/smtp/camel-smtp-transport.c (smtp_connect): Will now always
15456 send EHLO first, if that fails it will fall back on HELO.
15457 (esmtp_get_authtypes): Should now correctly parse authtypes.
15459 2000-06-07 Jeffrey Stedfast <fejj@helixcode.com>
15461 * providers/imap/camel-imap-summary.c: Now builds (not that it's worth
15464 * providers/imap/camel-imap-folder.c (imap_get_uids): Now uses the
15465 correct cast to a CamelImapMessageInfo structure (should get rid of
15468 * providers/imap/Makefile.am: Added rules to build
15471 * providers/imap/camel-imap-store.c (get_folder): Update.
15472 Moved imap_create here.
15474 * providers/imap/camel-imap-folder.c (delete_messages): Remove.
15475 (imap_create): Removed.
15476 (imap_delete): Removed.
15477 (imap_exists): Removed.
15479 * providers/imap/camel-imap-stream.h: Added typedef's for the stream
15481 * providers/imap/camel-imap-stream.c: Modified to build cleanly
15483 2000-06-07 Not Zed <NotZed@HelixCode.com>
15485 * camel-mime-utils.c (header_msgid_decode_internal): Properly
15486 dereference warning/debug messages.
15487 (header_references_decode): Check we actually have msgid stuff
15488 before trying to decode it ...
15490 2000-06-06 Jeffrey Stedfast <fejj@helixcode.com>
15492 * camel-imap-stream.[c,h]: Removed
15494 * providers/imap/camel-imap-stream.[c,h]: Relocated to this
15497 * providers/imap/camel-imap-summary.c: Added
15499 2000-06-06 Dan Winship <danw@helixcode.com>
15501 * camel-folder.c: Remove exists, create, delete. A CamelFolder
15502 now always references an existing folder. Remove delete_messages
15503 too since it wasn't being used. Add a "create" flag to
15504 get_subfolder saying whether or not to create the subfolder if it
15507 * camel-store.c (camel_store_get_folder): Add a "create" flag to
15508 say whether or not to create the folder if it doesn't yet exist.
15509 (camel_store_delete_folder): New method, moved from CamelFolder.
15510 (cache_folder, uncache_folder): Fix up a bit.
15511 (get_folder_name): Explain what this is for.
15513 * providers/mbox/camel-mbox-folder.c:
15514 * providers/mbox/camel-mbox-store.c: Update. Remove support for
15515 hierarchical folders to simplify this for now, since we're not
15516 using it, and it's not completely clear how they should work in an
15517 ELocalStorage world. Needs to be revisited.
15519 * providers/pop3/camel-pop3-folder.c (delete_messages): Remove.
15520 * providers/pop3/camel-pop3-store.c (get_folder): Update.
15522 * providers/vee/camel-vee-folder.c (exists): Remove.
15523 * providers/vee/camel-vee-store.c (vee_get_folder): Update.
15525 2000-06-06 Jeffrey Stedfast <fejj@helixcode.com>
15527 * providers/imap/camel-imap-*.[c,h]: Started on getting
15528 imap to build cleanly (tho some work has not been completed
15529 so it still won't build until camel-imap-summary is finished
15530 along with a few methods in camel-imap-folder)
15532 * camel-stream.[c,h]: Changed the read and write method prototypes
15533 to return an ssize_t type rather than an int and also changed
15534 the 'number of bytes' to read or write to a size_t type
15536 * camel-stream-fs.c: same as above
15538 * camel-stream-mem.c: again, same as above
15540 * camel-stream-buffer.c: same
15542 * camel-imap-stream.[c,h]: Added this new stream, cache's previously
15543 read data so each successive call will instead read from the cache
15545 2000-06-05 Dan Winship <danw@helixcode.com>
15547 * camel-mime-part.c (camel_mime_part_set_disposition): fix
15548 typo/braino (set "Content-Disposition", not "Content-Description")
15549 (camel_mime_part_set_filename): const poison
15551 2000-06-02 Not Zed <NotZed@HelixCode.com>
15553 * camel-mime-utils.c (base64_encode_step): Ick, damn signs! Fix a
15554 bug with sign extended bytes.
15556 * camel-mime-filter-smtp.c (filter): Changed layout/logic slightly
15557 (to match From filter)
15559 2000-06-02 Jeffrey Stedfast <fejj@helixcode.com>
15561 * camel-mime-filter-smtp.c (filter): Fixed the filter so that it
15562 wouldn't insert garbage under certain conditions.
15564 2000-06-02 Christopher James Lahey <clahey@helixcode.com>
15566 * camel-session.c: Don't ref the services in the cache.
15568 2000-06-02 Jeffrey Stedfast <fejj@helixcode.com>
15570 * providers/smtp/camel-smtp-transport.c: Rearanged where debug
15571 fprintf statements we placed so that any data the server sends
15572 back is printed out before an exception is set and the function
15575 2000-06-02 Not Zed <NotZed@HelixCode.com>
15577 * camel-mime-utils.c (header_decode_date): If we get a funny
15578 result, just throw it out. Basically a fix for the one true
15579 broken TradeClient.
15581 2000-06-01 Not Zed <NotZed@HelixCode.com>
15583 * camel-folder-summary.c (message_info_free): Free
15584 references/messsage id.
15585 (message_info_save): Save them.
15586 (message_info_load): Load them.
15587 (message_info_new): And get them from the new message.
15588 (CAMEL_FOLDER_SUMMARY_VERSION): Bumped for new changes.
15590 * camel-folder-summary.h: Added references and messageid to
15593 2000-06-02 Christopher James Lahey <clahey@helixcode.com>
15595 * camel-session.c: Ref and unref objects in the service cache
15598 * camel-store.c: Ref the folder when returning it using
15599 lookup_folder. Used the folder's full name for the key for the
15600 folder cache since that's used to uncache it.
15602 2000-06-02 Dan Winship <danw@helixcode.com>
15606 * providers/pop3/camel-pop3-store.c (pop3_connect): free msg on
15607 success as well as failure.
15608 (camel_pop3_command_get_additional_data): free buf after reading
15609 the last line (".").
15611 * providers/pop3/camel-pop3-folder.c (get_message_by_uid): free
15612 body data after creating the memstream from it (which will copy
15615 * providers/mbox/camel-mbox-folder.c (mbox_finalize): free summary
15618 * camel-data-wrapper.c (finalize): unref the stream, if it exists.
15620 2000-06-01 Not Zed <NotZed@HelixCode.com>
15622 * camel-mime-part.c (construct_from_parser): For a message part,
15623 set the default content-type to message/rfc822. Maybe needs to be
15624 done for multiparts too?
15626 2000-05-31 Not Zed <NotZed@HelixCode.com>
15628 * camel-mime-message.c (construct_from_parser): Typo in assersion.
15630 * camel-mime-parser.c (folder_scan_step): Use a default type of
15631 message/rfc822 for multipart/digest. Bug Z192.
15632 (folder_scan_drop_step): Remove warning.
15634 2000-05-30 Not Zed <NotZed@HelixCode.com>
15636 * providers/mbox/camel-mbox-folder.c (mbox_append_message): Init
15637 filter_from to NULL, for exception case.
15638 (mbox_get_message_by_uid): Cast off_t to long int for diagnostics.
15640 * camel-url.c (camel_url_hash): Hash funciton for using camel
15641 url's as hash keys.
15642 (camel_url_equal): equal function for same.
15644 * camel-session.c (camel_session_finalise): Free cached services.
15645 (camel_session_init): Init service cache.
15646 (service_cache_remove): destroy callback to remove a service from
15649 * camel-store.c (get_folder_internal): Remove the extra ref of the
15650 folder. That seems the right behaviour ...?
15651 (camel_store_get_type): Doh, actually call store init, so the
15653 (cache_folder): strdup the folder name! no wonder it never found
15656 2000-05-30 Jeffrey Stedfast <fejj@helixcode.com>
15658 * providers/imap/camel-imap-folder.c: Implemented a few more
15659 methods like imap_append and 1 or 2 others
15661 2000-05-29 Not Zed <NotZed@HelixCode.com>
15663 * camel-store.c (camel_store_init): Move it to here. If this
15664 level is going to maintain it, it should set it up. Lets see what
15665 caching folders breaks :(
15667 * providers/pop3/camel-pop3-store.c (camel_pop3_store_init): Dont
15668 init folder cache here.
15670 * providers/mbox/camel-mbox-summary.c
15671 (camel_mbox_summary_expunge): Make sure we copy messages which are
15672 still intact to the new folder.
15673 (camel_mbox_summary_expunge): Update the frompos as well when
15674 moving the content.
15675 (camel_mbox_summary_expunge): Remove some debug, and dont offset
15678 * providers/vee/camel-vee-folder.c (vee_folder_build): Check the
15679 searched folder is open before trying to search it.
15680 (message_changed): Track changes to the source message in the
15682 (folder_changed): Track folder changes, re-query the folder that
15683 changed, and cascade the changed event as well.
15684 (camel_vee_folder_finalise): Free subfolder and subfolder summary.
15686 2000-05-29 Dan Winship <danw@helixcode.com>
15688 * camel-service.c (camel_service_new): Fix up some glib
15689 precondition stuff. Try to set the URL in camel_service_new before
15690 checking whether or not it's "empty" so that you can successfully
15691 set "sendmail:" as a URL.
15693 2000-05-28 Dan Winship <danw@helixcode.com>
15695 * camel-provider.h: Add a domain field to CamelProvider, to say
15696 what kind of data it provides.
15698 * providers/imap/camel-imap-provider.c:
15699 * providers/mbox/camel-mbox-provider.c:
15700 * providers/pop3/camel-pop3-provider.c:
15701 * providers/sendmail/camel-sendmail-provider.c:
15702 * providers/smtp/camel-smtp-provider.c: Set domain to "mail".
15704 * providers/nntp/camel-nntp-provider.c: Set domain to "news".
15706 * providers/vee/camel-vee-provider.c: Set domain to "vfolder". (So
15707 it doesn't end up being listed as a potential mail source in the
15708 mail config wizard.)
15710 * providers/pop3/camel-pop3-store.c: Split apart password and APOP
15711 auth, since some servers seem to do both, but don't really.
15712 (connect_to_server): Renamed from try_connect. Now actually does
15713 the connection up to the point of checking the greeting for APOP
15715 (query_auth_types): Return APOP, if appropriate. Call
15716 pop3_disconnect after connect_to_server since we don't really want
15718 (pop3_connect): Use connect_to_server rather than duplicating
15719 code. Fix a one-byte buffer overrun in the APOP code.
15720 (pop3_disconnect): Make this able to clean up after a partial
15722 (connect_to_server): Remove port number from error message since
15723 it's not terribly useful and we were getting it from the wrong
15726 * camel-mime-utils.c (header_address_list_format_append): Use
15727 `foo@bar' rather than `"" <foo@bar>' for email addresses with no
15730 2000-05-27 Jeffrey Stedfast <fejj@helixcode.com>
15732 * providers/imap/camel-imap-store.c: Removed
15733 camel_imap_command_get_additional_data() as it was
15734 completely useless, replaced with
15735 camel_imap_command_extended() which may eventually replace
15736 camel_imap_command() as well.
15738 * providers/imap/camel-imap-store.h: Modified to reflect
15739 changes made to camel-imap-store.c
15741 * providers/imap/camel-imap-folder.c: Wrote the first of many
15742 methods: camel_imap_init(), imap_open(), imap_expunge(),
15743 imap_get_message_count(), and imap_get_subfolder_names()
15745 2000-05-26 Dan Winship <danw@helixcode.com>
15747 * camel-multipart.c (camel_multipart_init): Don't set a default
15748 boundary. Require the caller to do that.
15749 (set_boundary): if boundary is NULL, generate a "random" boundary.
15751 * camel-mime-part-utils.c
15752 (camel_mime_part_construct_content_from_parser): Add a call to
15753 camel_multipart_set_boundary after creating a new multipart.
15755 2000-05-25 Jeffrey Stedfast <fejj@helixcode.com>
15757 * providers/imap/camel-imap-store.c (try_connect): Removed
15758 Exception code - Pop doesn't seem to set exceptions
15760 * providers/imap/camel-imap-folder.c: Initial code, mostly
15761 just a template for future code
15763 * providers/imap/imap.[c,h]: Source code from my personal
15764 mailer - for reference only!
15766 2000-05-25 NotZed <NotZed@HelixCode.com>
15768 * camel-mime-part-utils.c
15769 (camel_mime_part_construct_content_from_parser): Replace simple
15770 data wrapper here too, oops.
15772 * Makefile.am (libcamel_la_SOURCES): Removed
15773 camel-simple-data-wrapper again. Less code to maintain == better
15776 * camel-data-wrapper.c (construct_from_stream): Fixes for bug
15777 where text attachments dont work. Made data-wrapper concrete for
15780 2000-05-23 NotZed <NotZed@HelixCode.com>
15782 * providers/vee/camel-vee-folder.c (vee_folder_build_folder):
15783 Update the vfolder details for a single folder.
15785 2000-05-25 Jeffrey Stedfast <fejj@helixcode.com>
15787 * providers/smtp/camel-smtp-transport.c (_send_to): Took out code
15788 that had been there to reconnect to the server if it was not
15789 already connected - Mailer code was fixed so that this should not
15792 * providers/imap/camel-imap-store.[c,h]: Initial code.
15794 2000-05-24 Dan Winship <danw@helixcode.com>
15796 * camel.h: Re-add camel-simple-data-wrapper.h, which was removed
15799 2000-05-24 Jeffrey Stedfast <fejj@helixcode.com>
15801 * providers/smtp/camel-smtp-transport.[c,h]: Moved global
15802 variables into struct CamelSmtpTransport to make SMTP
15805 * providers/imap/camel-imap-*.h: Stolen from Mbox. Rough structure
15808 2000-05-23 Jeffrey Stedfast <fejj@helixcode.com>
15810 * providers/imap: Added some initial code to the camel tree
15813 * providers/imap/.cvsignore: Added to repository
15815 * providers/smtp/camel-smtp-transport.c: Added debug fprintf's
15816 so that testers can provide more information. Tested with simple
15817 messages and a reply to the hello@helixcode.com default message
15818 but should really be tested more.
15819 (smtp_data): Fixed to use data_wrapper_write_to_stream.
15821 * camel-mime-filter-smtp.c (filter): Modified to escape all lines
15822 beginning with a '.' and to place a \r before each \n if one did
15823 not previously exist. Removed code to escape "From " as it was
15824 found to not be needed for SMTP.
15826 2000-05-22 Jeffrey Stedfast <fejj@helixcode.com>
15828 * providers/smtp/camel-smtp-transport.c (smtp_data): Fixed the
15829 filtered stream. Fixes for stream changes, updated to use
15830 camel-mime-filter-smtp.
15832 * Makefile.am: Added camel-mime-filter-smtp.c
15834 * camel-mime-filter-smtp.[c,h]: Added to camel tree
15835 Smtp filter used to change \n into \r\n, escape lone dots,
15836 and escape "From "'s.
15838 2000-05-19 NotZed <NotZed@HelixCode.com>
15840 * camel-simple-data-wrapper.c (construct_from_stream): If we
15841 already have been constructed, unref our content.
15842 (write_to_stream): Check we've been constructued, and change for
15843 stream api changes.
15845 * camel-mime-parser.c: Removed exception stuff.
15847 * md5-utils.c (md5_get_digest_from_stream): repaired.
15849 * camel-mime-message.c: Remove exception from write_to_stream, and
15850 fix, and fix formatting.
15852 * providers/sendmail/camel-sendmail-transport.c (_send_internal):
15853 Fix for stream changes.
15855 * providers/pop3/camel-pop3-store.c (camel_pop3_command): Fixes
15856 for stream changes.
15858 * providers/mbox/camel-mbox-folder.c, and elsewhere, fix all
15859 stream api changes.
15860 (mbox_append_message): Use stream_close() now its back.
15861 (mbox_append_message): unref the from filter.
15863 * camel-stream-mem.c: And here.
15865 * camel-stream-fs.[ch]: Here too.
15867 * camel-stream-filter.c: Likewise. This is getting tedious.
15869 * camel-stream-buffer.c (stream_write): Fix a few little problems.
15870 (stream_close): Reimplement.
15871 (camel_stream_buffer_read_line): Slightly more efficient version,
15872 that also only allocates the right amount of memory for strings.
15874 * camel-seekable-substream.c: Likewise.
15876 * camel-seekable-stream.[ch]: Remove exceptions, fix formatting,
15877 changes for stream (re)fixes. set_bounds returns an error.
15879 * camel-stream.[ch]: Remove exceptions. Make flush and reset return
15880 an error code, repair all the screwed up formatting, and put back
15883 * camel-mime-part-utils.c
15884 (camel_mime_part_construct_content_from_parser): And here.
15886 * camel-mime-part.c (camel_mime_part_set_content): And this too.
15887 (write_to_stream): Fixed for stream changes.
15891 * providers/vee/camel-vee-folder.c (vee_search_by_expression):
15892 Implement. Performs an intersection of the two searches.
15893 (camel_vee_folder_finalise): Unref search folders.
15894 (vee_append_message): Implement append.
15896 2000-05-18 Dan Winship <danw@helixcode.com>
15898 * camel-folder.c: remove message_number_capability and require uid
15900 (camel_folder_list_subfolders, camel_folder_get_uid_list,
15901 camel_folder_get_subfolder_info, camel_folder_get_message_info):
15903 (camel_folder_get_subfolder_names,
15904 camel_folder_free_subfolder_names): new subfolder interfaces.
15905 (camel_folder_get_uids, camel_folder_free_uids): new uid
15907 (camel_folder_get_summary, camel_folder_free_summary): new summary
15910 * providers/mbox/camel-mbox-folder.c,
15911 * providers/nntp/camel-nntp-folder.c:
15912 * providers/vee/camel-vee-folder.c: Update for changes
15914 * providers/pop3/camel-pop3-folder.c: Implement get_uids, update
15917 2000-05-18 NotZed <NotZed@HelixCode.com>
15919 * providers/vee/camel-vee-folder.c: Guess!
15921 * camel-folder-search.c (search_user_flag): Implement user_flag
15924 * camel-folder-search.h: Added user_flag search capability
15927 * providers/mbox/camel-mbox-folder.c (mbox_init): Set USER flag in
15928 permanent flags for the folder.
15930 2000-05-17 Dan Winship <danw@helixcode.com>
15932 * camel-folder.c: Remove unused async open/close and
15933 copy_message_to functions.
15934 Rename functions without initial _. Fix glib preconditions and
15937 2000-05-17 Dan Winship <danw@helixcode.com>
15939 * camel-data-wrapper.c: remove get/set_output_stream operations.
15940 They're redundant with write_to_stream, and CamelMimePart and
15941 CamelMimeMessage only implement the latter, meaning that trying to
15942 get_output_stream on a CamelMimeMessage that was built from pieces
15943 rather than being parsed from a stream doesn't work. Anything that
15944 uses get_output_stream can be rewritten to use write_to_stream, so
15945 we'll standardize on that.
15946 (camel_data_wrapper_new): remove this: CamelDataWrapper is
15947 supposed to be an abstract class.
15948 (write_to_stream): remove default implementation. (Moved to
15949 CamelSimpleDataWrapper)
15951 * camel-simple-data-wrapper.c: resurrect, although it's not really
15952 the same thing it was before. A simple data wrapper, which is
15953 backed by a CamelStream.
15955 * camel-mime-part-utils.c
15956 (simple_data_wrapper_construct_from_parser): Use
15957 construct_from_stream rather than set_output_stream.
15958 (camel_mime_part_construct_content_from_parser): Change
15959 camel_data_wrapper_new to camel_simple_data_wrapper_new.
15961 * camel-mime-part.c (camel_mime_part_set_content): Change
15962 camel_data_wrapper_new to camel_simple_data_wrapper_new.
15965 2000-05-17 Darin Adler <darin@eazel.com>
15967 * camel-folder-summary.c: (message_info_load):
15968 Quick fix to get it to compile. I hope I don't get into trouble.
15970 2000-05-17 Dan Winship <danw@helixcode.com>
15972 * camel.h: Don't include the no-longer-distributed
15973 possibly-to-be-removed headers.
15975 * providers/smtp/camel-smtp-transport.c
15976 (smtp_get_email_addr_from_text): fix an off-by-one error in
15978 (smtp_data): use camel_data_wrapper_get_output_stream rather than
15979 data_wrapper->output_stream
15981 2000-05-17 NotZed <NotZed@HelixCode.com>
15983 * providers/mbox/camel-mbox-folder.c (message_changed): Snoop
15984 changes to user flags on the message into the summary as well.
15986 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_init):
15987 Changed version init to include the parent class version info
15988 (i.e. add it not overwrite it).
15990 * camel-folder-summary.c (message_info_new): Initialise user_flags
15992 (message_info_load): And load user flags.
15993 (message_info_save): And save user flags.
15994 (message_info_free): And free them.
15995 (CAMEL_FOLDER_SUMMARY_VERSION): Bumped file revision.
15997 * camel-folder-summary.h: Added user-flags to summary.
15999 * camel-mime-message.c (camel_mime_message_set_user_flag): Dont
16000 use a hashtable for user flags.
16001 (camel_mime_message_get_user_flag): And changed here too.
16002 (camel_flag_get): New interface to get a flag from a flag
16003 list. Flag lists are easier to work with than hash tables, and
16005 (camel_flag_set): And set.
16006 (camel_flag_list_free): And free.
16007 (free_key_only): Discard.
16008 (finalize): Remove the flag list.
16010 2000-05-17 Jeffrey Stedfast <fejj@stampede.org>
16012 * providers/smtp/camel-smtp-transport.c: (smtp_helo): Error
16013 checking on gethostbyaddr() eliminating a possible segfault.
16015 2000-05-16 NotZed <NotZed@HelixCode.com>
16017 * providers/mbox/camel-mbox-folder.c (mbox_delete_message_by_uid):
16020 2000-05-12 NotZed <NotZed@HelixCode.com>
16022 * camel-movemail.c (camel_movemail): Open the destination with
16023 O_APPEND, so we dont blow away a partially transferred mbox.
16024 (camel_movemail): Loop if we get errno=INTR, and not fail.
16026 2000-05-11 NotZed <NotZed@HelixCode.com>
16028 * providers/mbox/camel-mbox-summary.c (summary_rebuild): Update
16029 the summarised file size, if everything went ok.
16030 (camel_mbox_summary_expunge): Clear header flags after updating.
16032 2000-05-16 Chris Toshok <toshok@helixcode.com>
16034 * providers/nntp/camel-nntp-folder.c:
16035 * providers/nntp/camel-nntp-folder.h:
16036 * providers/nntp/camel-nntp-provider.c:
16037 * providers/nntp/camel-nntp-store.c:
16038 * providers/nntp/camel-nntp-utils.c:
16039 * providers/nntp/camel-nntp-utils.h:
16040 get things working with new camel summary stuff.
16042 * providers/nntp/camel-nntp-summary.c:
16043 * providers/nntp/camel-nntp-summary.h:
16044 removed files since camel-folder-summary does all we need.
16046 2000-05-15 Jeffrey Stedfast <fejj@stampede.org>
16048 * providers/smtp/camel-smtp-transport.c: Added some preliminary
16051 2000-05-15 Dan Winship <danw@helixcode.com>
16053 * camel-folder.h: Remove camel_folder_get_summary, which no longer
16056 2000-05-11 Dan Winship <danw@helixcode.com>
16058 * Makefile.am: remove some cruft that we're not currently using.
16060 * camel-stream-mem.c (camel_stream_mem_new_with_buffer): Change
16061 to match prototype (size_t vs unsigned int) so it works on 64-bit
16062 machines. Noted by msw.
16064 2000-05-11 NotZed <NotZed@HelixCode.com>
16066 * providers/mbox/camel-mbox-folder.c (message_changed): Indicate
16067 the summary changed also.
16069 2000-05-11 Jeffrey Stedfast <fejj@stampede.org>
16071 * providers/smtp/camel-smtp-transport.c: (smtp_helo):
16072 Updated to more closely comply with RFC 821 standards
16074 2000-05-11 NotZed <NotZed@HelixCode.com>
16076 * camel-mime-part.c (write_to_stream): Unref the filter after
16077 adding it to the filtering stream.
16079 * providers/mbox/camel-mbox-summary.c
16080 (camel_mbox_summary_finalise): Free the folder path.
16081 (camel_mbox_summary_update): Also save summary when done.
16082 (camel_mbox_summary_expunge): Unindex items when deleting them.
16083 (camel_mbox_summary_expunge): Save the index as well as the
16086 * camel-folder-summary.c (camel_folder_summary_finalise): Free the
16088 (camel_folder_summary_touch): New function, indicate the summary
16090 (camel_folder_summary_remove): Dirty here.
16092 * camel-internet-address.c (internet_decode): Free multiple entry
16093 addresses properly.
16095 * camel-mime-utils.c (header_decode_mailbox): Plugged another
16096 memleak, free text after converting it.
16097 (header_decode_addrspec): More leaks plugged.
16099 * camel-mime-message.c (finalize): Free message_uid.
16100 (finalize): Free the recipients hashtable.
16102 2000-05-11 <notzed@helixcode.com>
16104 * camel-folder-summary.c (camel_folder_summary_finalise): Free
16105 summary items and charset filters.
16107 2000-05-10 <notzed@helixcode.com>
16109 * camel-folder-summary.c (camel_folder_summary_finalise): Don't
16110 free stuff in p, after we've free'd p.
16112 * providers/mbox/camel-mbox-folder.c (mbox_append_message): Unref
16113 the stream we created for appending.
16115 2000-05-10 Jeffrey Stedfast <fejj@stampede.org>
16117 * providers/smtp/camel-smtp-transport.c: (camel_smtp_transport_class_init):
16118 Added initialization for service_class
16120 2000-05-10 Dan Winship <danw@helixcode.com>
16122 * camel-multipart.c (write_to_stream): fix a stupid typo. Thank
16125 * camel-mime-part.c (write_to_stream): don't ref the stream before
16126 wrapper a filter around it, since nothing will ever unref it.
16128 2000-05-10 Christopher James Lahey <clahey@helixcode.com>
16130 * Makefile.am: Added camel-types.h, camel-folder-pt-proxy.h, and
16131 camel-thread-proxy.h.
16133 2000-05-09 Dan Winship <danw@helixcode.com>
16135 * providers/sendmail/camel-sendmail-transport.c (_send_internal):
16136 Bleah. Can't fsync a pipe. As a quick kludge, just don't
16137 stream_flush it. The right fix will require bringing back
16138 stream_close though.
16140 2000-05-09 Jeffrey Stedfast <fejj@stampede.org>
16141 * camel-internet-address.[c,h]: Undid my changes (moved
16142 struct _address back into came-internet-address.c)
16143 * providers/smtp/camel-smtp-transport.c: (_send): changed
16144 from using it's own address manipulation (using struct _address)
16145 to using camel_internet_address_get(). Also some format changes
16146 to keep consistant with the rest of Camel
16148 2000-05-09 Jeffrey Stedfast <fejj@stampede.org>
16150 * camel-internet-address.[c,h]: Moved struct _address from
16151 camel-internet-address.c to camel-internet-address.h
16152 (hopefully this doesn't break anything...)
16153 * providers/smtp/camel-smtp-transport.c: (_send): now
16154 populates the recipient list with To, Cc, and Bcc addresses.
16155 Should now be able to use this module.
16157 2000-05-09 Dan Winship <danw@helixcode.com>
16159 * providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid):
16160 one more refcounting fix I missed before.
16162 2000-05-08 Jeffrey Stedfast <fejj@stampede.org>
16164 * providers/smtp/camel-smtp-transport.c: no longer frees memory it
16165 shouldn't, updated to reflect camel-stream changes involving
16166 CamelException (perhaps it should use a different CamelException
16167 variable than is passed to the camel smtp module?)
16169 2000-05-08 Dan Winship <danw@helixcode.com>
16171 * camel-stream.c (camel_stream_read, camel_stream_write,
16172 camel_stream_flush, camel_stream_reset, camel_stream_printf,
16173 camel_stream_write_to_stream): Use CamelException to signal
16175 (camel_stream_write_strings): Remove. camel_stream_printf is more
16176 useful in most of the places that used this.
16177 (camel_stream_write_string): Change from macro to function to
16178 prevent problems with double-evaluation.
16180 * camel-seekable-stream.c (camel_seekable_stream_seek,
16181 camel_seekable_stream_set_bounds): Use CamelException.
16184 * camel-seekable-substream.c, camel-stream-buffer.c,
16185 camel-stream-filter.c, camel-stream-fs.c, camel-stream-mem.c:
16188 * camel-stream-fs.c: Remove the virtual init functions and move
16189 the code into the creator functions. Add CamelExceptions to
16190 creation functions that could fail.
16192 * camel-data-wrapper.c (camel_data_wrapper_write_to_stream): Use
16194 * camel-mime-message.c, camel-mime-part.c, camel-multipart.c
16195 (write_to_stream): Update.
16197 * camel-mime-parser.c: add an exception to the mime parser private
16198 data and pass that to stream functions as needed.
16200 * gmime-content-field.c, md5-utils.c: Update (badly) for stream
16203 * camel-exception.h (camel_exception_is_set): convenience macro.
16205 * providers/Makefile.am: disable SMTP for now
16207 * providers/mbox/camel-mbox-folder.c (mbox_append_message): Pass
16208 CamelException to the functions that now need it. Check the
16209 exception after calling camel_stream_flush, and fail if it fails.
16210 (mbox_get_message_by_uid): More updates.
16212 * providers/pop/camel-pop3-folder.c,
16213 providers/pop/camel-pop3-store.c,
16214 providers/sendmail/camel-sendmail/transport.c: Update.
16217 2000-05-08 NotZed <NotZed@HelixCode.com>
16219 * camel-mime-message.c (process_header): Format From and Reply-To
16220 to at least a decoded string. Should probably store them as an
16221 camelinternetaddress.
16223 * Merged NEW_SUMMARY branch back to trunk, and resolved conflicts.
16225 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_update):
16227 (camel_mbox_summary_expunge): Force an update of the summary
16228 before we do anything.
16229 (camel_mbox_summary_expunge): Build new xev line in xevnew, and
16230 free that, and consify xev.
16231 (camel_mbox_summary_load): If we are rebuilding from scratch, make
16232 sure we clear the summary content.
16234 * camel-stream-filter.c (do_close): We NEED a stream close.
16236 2000-05-07 Dan Winship <danw@helixcode.com>
16238 Make camel not leak like a sieve.
16240 * camel-object.c: New subclass of GtkObject which is now the base
16241 of the Camel object hierarchy. Currently the only difference
16242 between CamelObject and GtkObject is that CamelObjects don't start
16245 * *.h: Move a bunch of typedefs to camel-types.h. Standardize on
16246 using <camel/foo.h> in header files rather than <foo.h>, "foo.h",
16247 or "camel/foo.h". Remove some unneeded includes.
16249 * camel-address.c, camel-data-wrapper.c, camel-folder-search.c,
16250 camel-folder-summary.c, camel-folder.c, camel-mime-filter.c,
16251 camel-mime-parser.c, camel-service.c, camel-session.c,
16252 camel-stream.c: These are now subclasses of CamelObject.
16254 * camel-data-wrapper.c (set_output_stream):
16255 * camel-medium.c (set_content_object):
16256 * camel-seekable-substream.c
16257 (init_with_seekable_stream_and_bounds):
16258 * providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid):
16259 remove gtk_object_sink calls.
16261 * camel-stream-buffer.c (init_vbuf):
16262 * camel-stream-filter.c (camel_stream_filter_new_with_stream):
16263 ref the original stream.
16265 * camel-folder-summary.c (camel_folder_summary_finalise): unref
16266 the filters when finalizing.
16268 * camel-mime-part-utils.c
16269 (simple_data_wrapper_construct_from_parser,
16270 camel_mime_part_construct_content_from_parser):
16271 * camel-mime-part.c (camel_mime_part_set_content): Unref objects
16272 that are created only to be handed off to other objects. If
16273 they're going to be needed later, they will have been additionally
16274 ref'ed by the object that needs them.
16276 * providers/pop3/camel-pop3-folder.c (get_message_by_number):
16277 unref the message stream after creating the data from it.
16279 * camel-stream.c, camel-stream-buffer.c, camel-stream-filter.c,
16280 camel-stream-fs.c, camel-stream-mem.c: Remove camel_stream_close,
16281 since its semantics are dubious (what happens when you close a
16282 stream other people still have references on?).
16284 * providers/nntp/camel-nntp-store.c:
16285 * providers/smtp/camel-smtp-transport.c:
16286 * providers/pop3/camel-pop3-store.c:
16287 replace camel_stream_close calls with gtk_object_unref.
16289 * providers/mbox/camel-mbox-folder.c:
16290 * providers/nntp/camel-nntp-folder.c:
16291 * providers/sendmail/camel-sendmail-transport.c:
16292 replace camel_stream_close with camel_stream_flush +
16295 2000-05-06 Dan Winship <danw@helixcode.com>
16297 * providers/pop3/camel-pop3-store.c (query_auth_types): A machine
16298 which serves neither POP nor KPOP is not a POP server.
16300 * providers/smtp/camel-smtp-provider.c: Note in the description
16301 that this provider is not yet tested.
16303 2000-05-08 <notzed@helixcode.com>
16305 * camel-mime-part.c (write_to_stream): Free the filter stream when
16308 * camel-mime-parser.c (folder_seek): Make sure we add the \n
16309 terminal when we seek as well (frob!).
16311 * camel-mime-utils.c (header_decode_addrspec): Plug minor memleak.
16313 * camel-mime-part.c (finalize): Free header tables once finished.
16315 * camel-folder-summary.c (camel_folder_summary_remove): Dont try
16316 to access info after its free'd.
16318 2000-05-07 NotZed <NotZed@HelixCode.com>
16320 * camel-mime-part.c (write_to_stream): Apply encoding to content
16321 part, when writing to a stream *sigh*.
16323 * camel-stream-filter.c (do_write): implement write for the
16324 filtering stream. Writes shouldn't be mixed with reads.
16325 (do_flush): Implemented flush. Again write/flush shouldn't be
16326 mixed with reads. Only flushes if the last op was write.
16327 (do_close): Force flush on close.
16329 * camel-mime-filter.c (filter_run): Oops, make sure we include the
16330 backlen in the total length before passing onto the filter.
16332 * camel-mime-filter-from.c: New filter, munges 'From ' lines into
16333 '>From ', for mbox.
16335 * camel-mime-parser.c (camel_mime_parser_header_remove): New
16336 function to remove the parser's raw header, rather than
16337 manipulating the header directly (wich doesn't work with
16340 * camel-mime-utils.c (header_address_list_clear): Fixed some
16341 broken(tm) logic, which would leak entries on multivalued lists.
16343 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_load):
16344 Use ibex_save() to save the ibex. Makes a big difference to
16345 startup times for very large mailboxes.
16346 (camel_mbox_summary_expunge): Dum de dum, reimplemented. Designed
16347 to be much more robust, and to stop immediately if anything awry
16349 (copy_block): Utility function to copy n bytes from one fd to
16351 (header_write): Utility function to write out raw headers to an
16353 (camel_mbox_summary_update): Incremental summary updater.
16355 * providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid):
16356 Dont unref the stream, because of the broken(tm) ref model of gtk
16357 widget that for some odd reason is being perpetuated in camel.
16358 (mbox_expunge): Reenable expunge again.
16359 (mbox_append_message): Removed the optimised mbox append. If its
16360 an issue, it can go back later. Cleaned up a lot, checks error
16361 returns, and automagically translates 'From ' into '>From' as
16364 2000-05-07 <notzed@helixcode.com>
16366 * camel-mime-filter.c (filter_run): Oops, forgot to add the
16367 backlen to the pre-buffer (*poof*).
16369 2000-05-07 NotZed <NotZed@HelixCode.com>
16371 * camel-mime-message.c (construct_from_parser): Allow
16372 HSCAN_FROM_END to terminate the processing of a message.
16374 * camel-folder-summary.c (perform_content_info_load): Ick, dont
16375 try and append a node onto its own list.
16376 (camel_folder_summary_clear): Actually clear the indexes after
16377 we've removed the messages.
16378 (camel_folder_summary_clear): Set dirty if it changes.
16379 (camel_folder_summary_load): Clear dirty.
16380 (camel_folder_summary_save): Only save if dirty.
16382 * providers/mbox/camel-mbox-summary.c (summary_header_load): Oops,
16383 remember to call that parent class first ...
16384 (summary_header_save): Here too.
16385 (camel_mbox_summary_load): Do more checking to verify the index
16386 contents as well as teh summary contents, against the mbox
16388 (camel_mbox_summary_load): Removed some fo that checking, it needs
16389 more code to work reliably.
16391 2000-05-07 <notzed@helixcode.com>
16393 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_load):
16394 Set the size and mtime of the mbox we indexed once done.
16396 * camel-folder-summary.c (camel_folder_summary_set_index): Dont
16397 write the index if it changes - let the claler fix it (uh, kind of
16398 impacts performance).
16399 (camel_folder_summary_load): close in.
16401 * camel-folder-summary.c (summary_format_string): Check header
16402 exists before trying to strip its leading spaces.
16404 2000-05-06 NotZed <NotZed@HelixCode.com>
16406 * camel-folder.h: Removed summary info from here, and include
16407 camel-folder-summary.h as well.
16409 * camel-mime-parser.c (camel_mime_parser_step): Allow it to accept
16412 * providers/mbox/camel-mbox-summary.c: Totally new file, now
16413 subclasses camel-folder-summary.
16415 * camel-folder-summary.c (message_info_load): Load the uid as a
16417 (message_info_save): And save too.
16418 (camel_folder_summary_clear): New function, clears the contents of
16421 * providers/mbox/camel-mbox-folder.c: Fixes for summary changes.
16422 (mbox_get_message_by_uid): Completely redone. Now cross-checks
16423 the summary information to make sure we get a real message.
16424 (mbox_append_message): Disabled the copy version of append for
16426 (mbox_expunge): Temporarily disabled the expunge function, until
16427 it is put back in camel-mbox-summary.c
16429 2000-05-05 NotZed <NotZed@HelixCode.com>
16431 * camel-folder-summary.c: And same here ...
16432 (camel_folder_summary_encode_fixed_int32): Ugh, fwrite doesn't
16433 return -1 on error ..
16434 (camel_folder_summary_decode_fixed_int32): Neither deos fread.
16435 (camel_folder_summary_encode_token): Fix here too.
16436 (summary_build_content_info): Use start-headers to get the pos of
16437 the message, not parser_tell(), which might not be what we
16438 expected because of parser_unstep().
16439 (camel_folder_summary_encode_token): Use bserch() to tokenise the
16440 values, rather than a linear search.
16442 * camel-mime-utils.c: Defined out some memory profiling stuff I
16443 left there by mistake.
16444 (header_decode_mailbox): Dont try to append the word part of a
16445 local address if we ran out of words.
16447 * camel-mime-parser.c (folder_scan_content): Apply the fix from
16448 the header scanner to here too.
16449 (folder_scan_header): Only check for end of header if we have
16450 space for it (didn't end the read with a newline)
16451 (folder_scan_header): inptr is the only real thing we need
16452 registerised for performance. Try to help the compiler be smart
16454 (folder_scan_header): Simplified the save header case a tad.
16456 Commented out some memory profiling stuff.
16458 2000-05-05 <notzed@helixcode.com>
16460 * camel-mime-utils.c (header_decode_mailbox): Plug a memory leak.
16461 (header_decode_text): Fixed memory leaks with g_string_append().
16462 (header_encode_string): And here too, and a few other places. The
16463 glib api is so awful ...
16464 (header_content_type_decode): More memory leaks.
16466 2000-05-05 <notzed@helixcode.com>
16468 * camel-mime-parser.c (folder_scan_init_with_fd): Make sure we
16469 init the end of buffer sentinal!
16470 (folder_scan_init_with_stream): And here too ...
16472 2000-05-04 NotZed <NotZed@HelixCode.com>
16474 * providers/mbox/camel-mbox-folder.c (summary_get_message_info):
16475 Maxcount is minimum of the max and the requested count, not the
16478 * camel-mime-parser.c (folder_scan_content): Properly set midline,
16479 so we dont falsely catch offset boundary markers (i.e. From inside
16481 (folder_read): Set a sentinal on the end of the read data (\n) so
16482 we dont have to check the buffer boundary in the inner loop.
16483 (mempool_*): New experimental memory management routines, speed
16484 up simple structure parsing by about 25% ... not compiled in by
16485 default. Something similar may be needed for camel-mime-utils to
16486 address performance issues with g_malloc and friends.
16488 * camel-mime-utils.c: Added a macro w(x) used to wrap all warnings
16489 about mime/rfc violations, so they can be turned off.
16491 * camel-folder-summary.c (summary_build_content_info): Step after
16492 the end of a message ...
16493 Turn into a stand-alone program for testing and profiling.
16495 2000-05-04 Dan Winship <danw@helixcode.com>
16497 * providers/pop3/camel-pop3-store.c (pop3_connect): Don't fall
16498 back to plaintext passwords if APOP fails, since it should also
16501 2000-05-04 Dan Winship <danw@helixcode.com>
16503 * camel-session.c (camel_session_list_providers): New function to
16504 replace camel_provider_scan. Returns a list of either (a) all
16505 currently-loaded providers, or (b) all available providers.
16507 * camel-url.[ch]: Add an "empty" flag to CamelURL (indicating that
16508 it contains only a protocol).
16510 * camel-service.c (camel_service_query_auth_types): Make this take
16511 a CamelException (since it may have to try to connect to the
16512 server, and it might not able to.)
16514 * providers/pop3/camel-pop3-store.c: add KPOP (Kerberized POP)
16515 support. This is mostly so I have two kinds of authmech to play
16516 with instead of just one. (But it does actually work.)
16518 * providers/smtp/camel-smtp-transport.c (query_auth_types): update
16519 for prototype change, but disable the functionality, since it
16520 doesn't really support any auth types yet.
16521 (camel_smtp_transport_get_type): add an object init function to
16522 set the service url_flags.
16524 2000-05-04 NotZed <NotZed@HelixCode.com>
16526 * providers/mbox/camel-mbox-summary.c: Yes, and anotherone.
16528 * camel-mime-utils.c: And another one.
16530 * camel-mime-part.c: And another one.
16532 * camel-mime-part-utils.c: And another one.
16534 * camel-folder-search.c: And another one.
16536 * camel-mime-parser.c: Reverted a change wihtout a ChangeLog entry.
16538 2000-05-04 NotZed <NotZed@HelixCode.com>
16540 * camel-folder-summary.[hc]: Yes, CamelFolderSummary is back ...
16541 ... re-usable class to summarise and index any stream or message
16542 and to manage/load/save the created summaries.
16544 * camel-folder.c: Include string.h to kill a warning.
16546 2000-05-03 Jason Leach <leach@wam.umd.edu>
16548 * Makefile.am (INCLUDES): add $(UNICODE_CFLAGS) to the INCLUDES,
16549 people who installed libunicde in non-standard include paths need
16552 2000-05-03 NotZed <NotZed@HelixCode.com>
16554 * camel-folder.h: Added pos/bodypos/endpos to the basic message
16555 content info object. Size to be removed? Moved the
16556 messageconentinfo and messageinfo back to camel-folder-summary.h.
16558 * camel-mime-filter-index.c (camel_mime_filter_index_set_ibex):
16559 New function to (re)set the index to use on a filter.
16561 * camel-mime-parser.c (camel_mime_parser_scan_from): Whole bunch
16563 (camel_mime_parser_drop_step): New function to drop a state from
16564 the parser. Needs more testing.
16566 * camel-mime-utils.c (rfc2047_decode_word): If the iconv handle is
16567 -1, then dont try and convert (crashes unicode_iconv?).
16568 (rfc2047_decode_word): Use alloca for variables instead of
16569 g_malloc - by the rfc they should always be short.
16570 (rfc2047_decode_word): If we can't do the charset conversion, undo
16571 the quoted-printable/base64 at least? Should probably convert
16572 unknown characters to the utf-8 unknown character.
16574 2000-05-02 Larry Ewing <lewing@helixcode.com>
16576 * camel-mime-utils.c (header_decode_date): fix typo when
16577 dereferencing saveoffset.
16579 2000-05-02 NotZed <NotZed@HelixCode.com>
16581 * camel-folder-search.c: Added some header doco.
16583 * camel.h: REmove gmime-utils.h from here.
16585 * providers/mbox/camel-mbox-search.[ch]: Removed. Functionally
16588 * providers/mbox/camel-mbox-folder.c (mbox_search_by_expression):
16589 Use the new CamelFolderSearch class to do the actual searching,
16590 just setup the search here.
16592 * camel-folder-search.[ch]: A helper class that providers may
16593 subclass to provide their own search functionality, or they can
16594 simply use as is, it supports body searches if an ibex is
16595 supplied, and header searches if a summary is supplied.
16597 2000-05-02 Matt Loper <matt@helixcode.com>
16599 * Makefile.am: set G_LOG_DOMAIN.
16600 * providers/MH/Makefile.am: same.
16601 * providers/maildir/Makefile.am: same.
16602 * providers/mbox/Makefile.am: same.
16603 * providers/nntp/Makefile.am: same.
16604 * providers/pop3/Makefile.am: same.
16605 * providers/sendmail/Makefile.am: same.
16606 * providers/smtp/Makefile.am: same.
16608 2000-05-02 NotZed <NotZed@HelixCode.com>
16610 * providers/mbox/camel-mbox-search.c
16611 (camel_mbox_folder_search_by_expression): Dont store/remove
16612 current search from the search list.
16614 * providers/mbox/camel-mbox-folder.h: Removed searches list,
16615 searches are all sync now.
16617 * gmime-utils.[ch]: What the hell, remove it. This will break the
16618 nntp provider. The mime parser can be used instead though.
16619 Removed from all code including it (but none were using it).
16621 * gmime-utils.c (_store_header_pair_from_string): Removed bizarre
16622 string_dichotomy version of this. This code is somewhat redundant
16623 now, and is headed for death anyway.
16625 * gstring-util.c (g_string_dichotomy): Same with this one.
16626 (g_string_clone): Removed a memory leak, g_string_new() allocates
16628 (g_string_append_g_string): Allow to append an empty gstring onto
16629 another gstring, dont abort()!
16631 * string-utils.c (string_dichotomy): Removed this incredibly weird
16634 * camel-folder.c (_create): Replaced the rather obtuse use of
16635 "string_dichotomy" function with a simple strrchr(). Still not
16638 * camel-folder-summary.c: cvs removed a long-removed file.
16640 * camel-mime-parser.c (folder_scan_header): Fix the previous
16641 overflow problem properly (can happen in 2 places).
16642 (header_append): A new macro to include the code changed above, so
16643 it only appears in one place.
16644 (folder_scan_step): Change the content type to text/plain if the
16645 multipart is broken. Doesn't actually change the header though.
16646 (header_append): Also move the header-start tracking stuff here.
16647 Could be a static function to save code.
16649 2000-05-02 <notzed@helixcode.com>
16651 * camel-mime-part-utils.c
16652 (simple_data_wrapper_construct_from_parser): Dont use autofill on
16653 these fucking long function anmes!!!!!!
16655 2000-05-02 NotZed <NotZed@HelixCode.com>
16657 * providers/mbox/camel-mbox-summary.c
16658 (camel_mbox_summary_expunge): Fix the offset for the summary when
16659 an item is expunged to take account of the From line.
16661 2000-05-01 NotZed <NotZed@HelixCode.com>
16663 * providers/mbox/camel-mbox-folder.h (CamelMboxFolder): Removed
16666 * providers/mbox/camel-mbox-search.c
16667 (camel_mbox_folder_search_cancel): Remove.d
16668 (camel_mbox_folder_search_complete): Removed.
16669 (camel_mbox_folder_search_by_expression): Changed back to sync
16671 (struct _searchcontext): Removed cancelled flag.
16672 (find_context): Removed.
16673 (func_header_contains): Debug out some search stuff.
16675 * providers/mbox/camel-mbox-search.h
16676 (camel_mbox_folder_search_by_expression): Moved back to sync api.
16678 * providers/mbox/camel-mbox-summary.c
16679 (camel_mbox_summary_set_flags_by_uid): New function to update the
16680 flags in the summary.
16681 (camel_mbox_summary_expunge): Expunge messages from a folder.
16682 (offset_content): Re-align offsets of summary when messages
16683 added/removed to an existing summary.
16684 (camel_mbox_summary_remove_uid): Remove a message summary entry by
16686 (index_folder): Restore flags from X-Evolution header, if they are set.
16687 (index_folder): Make sure we index using a decimal uid, since
16688 thats what everything else indexes off (oops).
16689 Upped SUMMARY_VERSION as a result.
16690 (camel_mbox_summary_expunge): Oops, my wrong, use the string uid
16693 * providers/mbox/camel-mbox-folder.c (_get_message_by_uid):
16694 Connect to the message_changed signal.
16695 (_init): Set permanent flags to something reasonable. No user
16697 (message_changed): If the flags of the message change, update the
16698 flags in the summary.
16699 (mbox_expunge): Implement the expunge.
16700 (camel_mbox_folder_class_init): Renamed all leading _'s to mbox_'s
16701 (mbox_expunge): Emit a folder_changed signal on expunge (uh, even
16704 * camel-folder.c (_finalize): Uh, dont free permanent_flags
16705 anymore (this wouldn't failed anyway, it was a GList !!!)
16706 (camel_folder_search_complete): Removed.
16707 (camel_folder_search_cancel): Removed.
16708 (camel_folder_expunge): Changed to only allow expunge on an open
16709 folder. It doesn't make sense for mbox, otherwise (?)
16710 (camel_folder_class_init): Added a folder_changed signal.
16712 * camel-folder.h (struct _CamelFolder): Change permanent_flags to
16714 (list_permanent_flags): Renamed to get_permanent_flags, and
16715 returns a bitfield.
16716 (camel_folder_expunge): Changed expunge to a void type. The
16717 messages would no longer be useful after they have been removed
16719 (CamelFolderClass): New function summary_get_by_uid() to get a single
16721 (*search*): Moved back to synchronous search api ... *sigh*
16723 * camel-folder.h: Removed CamelSearchFunc.
16725 * camel-mime-message.c (set_flag): Removed.
16726 (camel_mime_message_set_flag): Removed.
16727 (get_flag): Removed.
16728 (camel_mime_message_get_flag): Removed.
16729 (add_flag_to_list): Removed.
16730 (get_flag_list): Removed.
16731 (camel_mime_message_get_flag_list): Removed.
16732 (camel_mime_message_get_flags): New interface to get system flags.
16733 (camel_mime_message_set_flags): " to set ".
16734 (camel_mime_message_get_user_flag): To get a user flag.
16735 (camel_mime_message_set_user_flag): To set a user flag.
16736 (finalize): Hmm, the old one free'd the key and data, not good
16737 when the data is a boolean ...
16739 2000-04-30 Dan Winship <danw@helixcode.com>
16741 * camel-provider.h: Tweak the definition of CamelProvider. Among
16742 other things, a provider may now be both a store and a transport.
16744 * camel-provider.c: Remove a lot of code we had no intention of
16745 using. This now only contains two functions: camel_provider_init
16746 to read the installed .urls files, and camel_provider_load to
16747 load and register a new provider.
16749 * camel-session.c: Remove more unused code and simplify some of
16750 the remaining code. The list of available provider modules is now
16751 stored in the session, and it handles calling camel_provider_load
16752 to load them as needed. Provider registration is now done by
16753 calling back from the module init routine, which allows a single
16754 module to register providers for multiple URL types.
16756 * providers/*: Update provider structures and init routines for
16757 the new stuff. Add a .urls file to each provider specifying what
16758 urls it handles, and install that with the library.
16760 * providers/nntp/camel-nntp-provider.c: Add hints towards
16761 supporting both news: and nntp: URLs, and using nntp as both a
16762 store and a transport.
16764 2000-04-29 Dan Winship <danw@helixcode.com>
16766 * camel-internet-address.c (camel_internet_address_get): const
16769 * camel-mime-part-utils.c
16770 (simple_data_wrapper_construct_from_parser):
16771 camel_mime_parser_tell() returns an offset from where it started
16772 parsing, not necessarily from the start of data. Since we're
16773 parsing a bounded seekable_stream, we need to add the stream's
16774 starting bound to camel_mime_parser_tell's return value to
16775 create the substream in the right place.
16777 * camel-seekable-substream.c
16778 (camel_seekable_substream_new_with_seekable_stream_and_bounds):
16779 say CAMEL_STREAM_UNBOUND rather than -1 in doc.
16781 * camel-seekable-stream.c (camel_seekable_stream_seek): Add more
16784 2000-04-28 Dan Winship <danw@helixcode.com>
16786 * camel-mime-parser.c (folder_scan_header): fix a bug that would
16787 cause corruption with very long headers.
16789 2000-04-27 Ettore Perazzoli <ettore@helixcode.com>
16791 * providers/pop3/Makefile.am (INCLUDES): Add `-I$(srcdir)/../../..'
16792 to pick the Camel includes.
16793 * providers/sendmail/Makefile.am (INCLUDES): Likewise.
16795 * camel.h: Don't #include <camel/data-wrapper-repository.h> anymore.
16797 2000-04-27 NotZed <NotZed@HelixCode.com>
16799 * camel-mime-utils.c (check_header): Dont try and check a NULL
16802 * camel-recipient.[ch]: Dead. Its not pining.
16804 * camel-mime-message.h: Dont include recipients.h anymore.
16806 * camel-mime-message.c (camel_mime_message_add_recipient): Accept
16807 name/address separately, and store in an CamelInternetAddress.
16808 (add_recipient): Removed.
16809 (remove_recipient): Removed.
16810 (remove_recipient_address): Renamed from remove_receipient, works
16812 (camel_mime_message_remove_recipient_name): New function to remove
16814 (get_recipients): Removed.
16815 (camel_mime_message_get_recipients): Return a camel-internet-address.
16816 (write_to_stream): No longer write receipients directly.
16817 (write_recipients_to_stream): Removed.
16818 (write_one_recipient_to_stream): Removed.
16819 (camel_mime_message_init): Setup recipients hashtable, rather than
16820 usign the recipients stuff.
16821 (set_recipient_list_from_string): Killed, a violent and lengthy
16823 (process_header): Simplified recipient handling code a lot.
16824 (received_date_str, sent_date_str, reply_to_str, subject_str,
16825 from_str): Removed some oddly-defined global statics.
16826 (camel_mime_message_class_init): Dont initialise above variables
16828 (init_header_name_table): Removed, use a table to init this, and
16829 do it in class init (2 lines of code ...).
16831 * camel-news-address.c: Class to represent news addresses -
16832 currently empty, and not built.
16834 * camel-internet-address.h: Class to represent internet (email)
16837 * camel-address.h: Abstract class to represent (lists of)
16840 2000-04-27 Dan Winship <danw@helixcode.com>
16842 * camel-mime-part.c (write_to_stream): Revert previous change. I
16845 * camel-url.[ch] (camel_url_encode, camel_url_decode): expose
16848 2000-04-26 Dan Winship <danw@helixcode.com>
16850 * camel-mime-part.c (write_to_stream): Only write a newline
16851 between the headers and the content object if the content object
16852 is not a CamelMedium. (If the content is a medium, it may have its
16853 own headers, which then need to go before the blank line.)
16855 * camel-mime-body-part.[ch]: Remove. We weren't using the fields
16856 that made this different from camel-mime-part, so it basically
16857 just forced us to do lots of gratuitous typecasting.
16859 * camel-multipart.[ch]: Use CamelMimePart. Remove the multipart
16860 parent stuff, since we weren't using that either.
16862 * etc: update for CamelMimeBodyPart -> CamelMimePart
16864 2000-04-26 Dan Winship <danw@helixcode.com>
16866 * camel-medium.c (set_content_object): sink the content object
16867 after referencing it.
16869 * camel-mime-part.c: fix various little things in the handling
16870 of CamelMedium methods. Change camel_mime_part_set_text to the
16871 more generic camel_mime_part_set_content.
16873 * camel.h: sync to current reality
16875 * camel-folder-utils.[ch]: removed
16877 * camel-mime-utils.c (header_format_date): fix format specifier
16878 for time zone. Fix typo in month names array.
16880 2000-04-26 NotZed <NotZed@HelixCode.com>
16882 * camel-seekable-substream.c (stream_seek): Changed to have
16883 absolute seek semantics, not relative to the bounds.
16885 * camel-seekable-stream.c (reset): When we reset, seek to the
16886 start of the bound, if there is one.
16887 (stream_tell): Make tell virtual.
16889 * camel-stream-filter.c (do_available): Removed.
16891 * camel-stream-buffer.c: Remove leading _'s from static functions.
16892 (stream_read): Renamed from read(). Fancy that conflicting! (my
16895 * providers/pop3/camel-pop3-folder.c (get_message_by_number):
16896 Changed to stream_mem interface.
16898 * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): Fixed
16899 for streamfs interface changes, and implement a failure case.
16900 (_append_message): Changed for fs stream interface change.
16902 * camel-multipart.c (print_part): Iterate rahter than callback. I
16903 hate glists's interface (hence, move this to write_to_stream).
16904 (write_to_stream): Return an error (yuck, this is a royal PITA to
16905 do with the stream write interface).
16907 * camel-mime-message.c: Removed leading _ from static names.
16909 * camel-mime-part.h: construct_from_parser() now returns an error
16912 * camel-mime-part-utils.c
16913 (camel_mime_part_construct_content_from_parser): Changed to use a
16914 camel-data-wrapper instead of a camel-simple-data-wrapper (no
16915 change needed elsewhere?).
16916 (simple_data_wrapper_construct_from_parser): Fixes for stream-mem
16919 * camel-simple-data-wrapper.[ch],
16920 camel-simple-data-wrapper-stream.[ch],
16921 camel-stream-data-wrapper.[ch], removed. Fixed including of these
16924 * camel-mime-part.c (camel_mime_part_set_text): Remove the use of
16925 the camel-simple-data-wrapper-stream, just use a mem stream.
16926 (write_to_stream): Renamed from my_*
16927 (construct_from_stream): Return an error on error.
16929 * camel-stream-mem.c (camel_stream_mem_new*): Remove mode
16932 * camel-stream-mem.h (enum CamelStreamMemMode): Removed. It
16933 wasn't used at all.
16935 * camel-data-wrapper.h: Add camel_data_wrapper_new() to create
16937 (write_to_stream, construct_from_stream): Return an error
16938 indicator for success. Fixed all methods to match (ICK).
16940 * Makefile.am (libcamel_la_SOURCES): Remove
16941 camel-simple-data-wrapper.c, camel-simple-data-wrapper-stream.c,
16942 camel-stream-data-wrapper.c. Obsoleted by code re-use!
16944 * camel-data-wrapper.c (construct_from_stream): Change the default
16945 implementation to just set the output stream == construction
16946 stream. Well, this lets me get rid of both simple-data-wrapper
16947 and stream-data-wrapper (unused anyway), and
16948 simple-data-wrapper-stream in one hit. CamelDataWrapper is now
16949 also a concrete class.
16950 (write_to_stream): Use camel_stream_write_to_stream() to
16951 calculate/return values (and save code).
16952 Include <errno.h> for obvious reasons.
16954 * camel-stream.c (eos): Provide a default implementation of .eos().
16955 (camel_stream_write_to_stream): Make it return an error code on
16957 (camel_stream_printf): Changed to return the number of bytes
16959 (camel_stream_available): Removed.
16961 * camel-stream-fs.h (enum CamelStreamFsMode): Removed. Changed to
16962 use unix modes and so forth (wasn't used for anything but new file
16963 creation and didn't work well either).
16965 * camel-stream-fs.c: Removed leading _'s for names. And removed
16966 some virtual method 'documentation'.
16967 (destroy): Dont try and close a closed/error fd. Only report
16968 error if close returns -1. Moved all the code to finalise(), and
16969 killed this function.
16970 (init_with_fd): Properly setup the seek offset, if it is a
16971 valid and seekable file descriptor.
16972 (init_with_fd_and_bounds): Use off_t for bounds, set bounds on the
16974 (init_with_name): Return error codes.
16975 (init_with_name_and_bounds): Ditto.
16976 (camel_stream_fs_new_with_name): REturn NULL object if it failed.
16977 (camel_stream_fs_new_with_name_and_bounds): Return NULL object on
16978 failure. Changed with_name* api's to take unix open style args
16980 (read): The bounded stream bounds checking seemed off, simplified
16982 (write): Implement bounds checking for writing, the comment was
16983 wrong, it could make sense to bound writing. Cleaned up a little.
16985 (eos): Removed. Use CamelStream's implementation now.
16986 (close): Reset the fd to -1, provide a warning for bad usage.
16987 (seek): Cleaned up. Changed the behaviour a little, the returned
16988 offset is the absolute position in the file, even in bounded
16990 (seek): Seek from end mirrors lseek() behaviour (reverse seeking).
16992 2000-04-25 NotZed <NotZed@HelixCode.com>
16994 * camel-stream-fs.h (struct _CamelStreamFs): Moved bounds and eof
16995 indicator to other parent classes.
16997 * camel-stream.c (camel_stream_printf): New utility
16998 function. Obvious use.
17000 * camel-stream-mem.c: Removed leading _'s from static func's.
17001 (camel_stream_mem_new_with_byte_array): Fixed for api changes, set
17002 the owner for the byte array to us.
17003 : Removed A bunch of gtk doc stuff for static (implementation) functions.
17004 (available): Removed.
17005 (write): Fixed the write implementation so that seek() works on a
17006 seekable memory stream, as expected. Seeking past the end of the
17007 buffer has unix semantics (filling with 0).
17008 (available): Removed.
17009 (write): Implement seekable stream bounded stream.
17010 (read): Implement seekable stream bounded stream.
17011 (close): Dont free the stream_mem if we're not the owner.
17012 (seek): Allow to seek beyond the end of memory area,
17013 implement bounds checking.
17014 (seek): Set errno on bad policy.
17016 * camel-stream-mem.h (struct _CamelStreamMem): Changed position to off_t.
17017 (new_with_buffer): Changed len to be a size_t.
17018 (set_buffer, set_byte_array): New interface functions.
17019 (struct _CamelStreamMem): Removed position, it is stored in the
17022 * camel-stream.h: Removed some of the seemingly random
17023 whitespace. Removed the available method (its not
17024 impelemented/useful enough).
17026 * camel-seekable-substream.c
17027 (init_with_seekable_stream_and_bounds): Remove the data_available
17028 stuff, it hasn't been properly implemented/finished, and may never
17029 work (unfortunately *sigh).
17030 (reemit_parent_signal): Removed part of the above change.
17031 (set_bounds): Removed (moved to seekable-stream).
17032 : Fixed up some of the generally unreadable indenting (sorry,
17033 wrapping at 80 characters with
17034 camels_really_long_function_names()
17035 just_doesnt_work_very_well_does_it().
17036 (available): Removed.
17037 (stream_seek): Fixup for object changes. Make sure we return -1
17038 if the parent stream can't seek.
17040 * camel-seekable-stream.c (ccamel_seekable_stream_set_bounds): New
17041 function to bound any seekable stream.
17043 (camel_seekable_stream_class_init): Implement an init function, to
17044 setup the stream bounds to unbound.
17046 * camel-seekable-stream.h (CamelSeekableStreamClass): New virtual
17047 method set_bounds for seekable streams.
17048 (CAMEL_STREAM_UNBOUND): New define for no bound.
17050 * camel-seekable-substream.h (struct _CamelSeekableSubstream):
17051 Removed sup_bound and inf_bound, moved to CamelSeekableStream (and
17052 renamed, and changed to off_t's).
17053 (new_with_seekable_stream_and_bounds): Use off_t as the bounds.
17054 (CamelSeekableSubstreamClass): Uh, why was the intialiser virtual?
17057 * camel-seekable-stream.[ch] (CamelSeekableStreamClass): Changed seek
17058 to accept an off_t as the offset.
17059 (struct _CamelSeekableStream): Renamed cur_pos to position and
17060 changed it to an off_t type.
17061 (enum CamelStreamSeekPolicy): Set to match the SEEK_* constants
17063 (get_current_position): Renamed to tell().
17065 * camel-stream-buffer.h: Commented out set_vbuf - never implemented.
17067 2000-04-25 Dan Winship <danw@helixcode.com>
17069 * camel-stream-buffer.c (_eos): only return TRUE if the parent is
17070 at eos AND the buffer has been exhausted
17072 * camel-mime-message.c: fix some incorrect macro usage that
17073 resulted in bogus casts
17075 2000-04-24 Dan Winship <danw@helixcode.com>
17077 * camel-mime-part-utils.c
17078 (simple_data_wrapper_construct_from_parser): fix a cut-and-pasto.
17080 * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): ref
17081 (and sink) the message stream if we're going to unref it later.
17082 Otherwise it could get destroyed while there are still substreams
17083 attached to it. This needs a cleaner solution.
17085 * camel.h: remove data-wrapper-repository.h include(s)
17087 2000-04-24 NotZed <NotZed@HelixCode.com>
17089 * camel-mime-message.c (construct_from_parser): Allow MESSAGE_END
17090 _or_ EOF as valid termination conditions.
17092 * providers/mbox/camel-mbox-summary.c (message_struct_new): Decode
17093 and then re-encode the addresses, so they are consistently
17096 * camel-mime-utils.c (header_decode_mailbox): Store the address in
17097 a _header_address. And try to get a comment-stored name if there
17099 (header_decode_address): Actually return an address.
17100 (header_to_decode): Renamed to header_address_decode()
17101 (header_mailbox_decode): New function to get a single mailbox.
17102 (header_mime_decode): Return the major/minor value, as
17104 (header_address_new, and friends): Whole bunch of utility
17105 functions for working with the address thingies.
17106 (header_decode_domain): Free the string header, and dont expand
17109 * camel.c (camel_init): No longer call
17110 data_wrapper_repository_init.
17112 * camel-medium.c (write_to_stream): Moved (back) to
17117 (get_header): Make all these abstract, and spit warnings if
17118 called. I guess it could manage the list, but well, it doesn't.
17120 * camel-medium.h (struct _CamelMedium): Dont store headers here,
17121 the implementor is the only one who knows their format.
17122 (CamelMediumClass): Changed header values to be void *'s. They
17123 need not be strings?
17125 * camel-simple-data-wrapper.c (construct_from_stream): And we're
17126 back. Set the output stream.
17127 (construct_from_parser): Moved to camel-mime-part-utils.
17129 * camel-mime-part-utils.c
17130 (camel_mime_part_construct_content_from_parser): Create the
17131 contents of multipart and simple messages.
17132 (camel_mime_part_construct_content_from_parser): Oops, this was
17133 totally screwed up, try creating the right cotnent on the right
17136 * camel-multipart.c (construct_from_parser): Moved to
17137 camel-mime-part-utils.
17138 (separate_part): Removed.
17140 * camel-mime-part.c (construct_from_stream): Back again! This now
17141 switches over to using a mime parser for any mime parts, only.
17142 (my_write_to_stream): Write our headers and so forth here.
17143 (add_header): Add header directly, parent class is abstract.
17144 (remove_header): Ditto.
17145 (set_header): Ditto.
17147 * camel-data-wrapper.c (camel_data_wrapper_construct_from_stream):
17149 (camel_data_wrapper_construct_from_parser): Moved to
17152 * camel-data-wrapper.h: Put back construct_from_stream.
17154 * camel-mime-part.h: Put construct_from_parser in here, the
17155 data-wrapper shouldn't know about mime. Ok, so now to undo half
17156 of the last hours changes ... duh.
17158 2000-04-23 Dan Winship <danw@helixcode.com>
17160 * camel-mime-utils.c (header_to_decode, header_mime_decode): fix
17161 some obvious minor bugs noted by -Wall.
17163 2000-04-23 NotZed <NotZed@HelixCode.com>
17165 * providers/pop3/camel-pop3-folder.c (get_message_by_number): Use
17166 construct_from_stream instead of set_input_stream().
17168 * camel-simple-data-wrapper-stream.c
17169 (camel_simple_data_wrapper_stream_construct): REmoved the destroy
17171 (wrapper_destroy_cb): Removed.
17173 * camel-simple-data-wrapper.h: Add prototype for _construct()
17176 * camel.c: Include unicode.h to kill a warning.
17178 * camel-data-wrapper.h (CameldataWrapperClass): Removed
17179 construct_from_stream virtual method.
17180 Removed get/set input stream.
17182 * data-wrapper-repository.[ch]: Removed&from build. Obsoleted?
17183 The justification as is follows: It is mixing storage
17184 protocol/format with message architecture. It really just doesn't
17185 serve any purpose, as each medium implementor will have to have its
17186 own type->handler mapping, and the only current implementor,
17187 mimepart has a very simple structure and no need for this.
17189 * camel-medium.c (write_to_stream): Moved here from most of the
17190 stuff in camel-mime-part. Well, the MEDIUM is the one that knows
17191 what the headers are, and the content is, let it write it out.
17193 * camel-mime-part-utils.c (camel_mime_part_construct_content):
17194 Copied from camel-mime-part.c, removed handling of message
17195 followon state (moved to camel-mime-message).
17196 (camel_mime_part_construct_content_from_parser): Renamed from
17198 (camel_mime_part_construct_headers_from_stream):
17199 (camel_mime_part_construct_content_from_stream):
17200 (camel_mime_part_store_stream_in_buffer): Removed. Replaced by
17201 the new construct from parser stuff.
17203 * camel-mime-message.c (construct_from_parser): Do
17204 construct_from_parser for mime-message.
17205 (_write_to_stream): Set the mime-version header for medium to
17206 write out, rather than writing it out ourselves.
17208 * camel-data-wrapper.c (set_mime_type_field): Ref the
17209 content_field when we get it?
17210 (construct_from_stream): Removed.
17211 (camel_data_wrapper_construct_from_stream): Changed to a helper
17212 function, creates a mime_parser, and constructs from that.
17213 (set_input_stream): Removed.
17214 (camel_data_wrapper_set_input_stream): Removed.
17215 (get_input_stream): Removed.
17216 (camel_data_wrapper_get_input_stream): Removed.
17218 * camel-mime-parser.c (camel_mime_parser_unstep): New function.
17219 Cause a subsequent call to mime_parser_step() to return the same
17222 * providers/mbox/camel-mbox-folder.c (_get_message_by_uid):
17223 Initial test code using the mime parser to construct the message.
17224 (_get_message_by_uid): Use construct_from_stream() instead of
17225 creating our own parser.
17227 * camel-mime-part.c (construct_from_parser): part constructor.
17228 (camel_mime_part_construct_content): Basically a simpler
17229 replacement for the datawrapper repository.
17230 (camel_mime_part_init): Set the default type to text/plain.
17231 (camel_mime_part_construct_content): Removed to
17232 camel-mime-part-utils.c
17233 (my_get_output_stream): Removed. The streeam is in the
17235 (my_get_content_object): Removed. The content object is stored in
17236 the medium. If none is there, the object wasn't created properly.
17237 (my_write_content_to_stream): Removed. The content object is the
17238 one that knows how to write itself out!!!!!!!!
17239 (my_write_to_stream): Remove the base header writing stuff - has
17240 been moved to camel-medium, where it belongs. This can just be
17241 used to check for mandatory headers.
17242 (my_construct_from_stream): Removed.
17243 (my_set_input_stream): What the hell, i'll remove this too.
17244 Nobody seems to understand how it differs from create from stream,
17245 and they both seem to serve the same purpose ...
17247 * camel-simple-data-wrapper.c (construct_from_parser): Initial
17248 implementation of a content constructor.
17249 (construct_from_stream): Removed! Job taken over by
17250 construct_from_parser.
17252 * camel-multipart.c (construct_from_parser): Multipart
17253 construction routine.
17254 (camel_multipart_init): Set the default multipart type to
17255 multipart/mixed. Duh, no subtype is not allowed anyway.
17256 (set_input_stream): REmoved. Replaced by construct_from_parser.
17258 2000-04-22 Dan Winship <danw@helixcode.com>
17260 * camel-multipart.[ch]: clean, document, etc.
17261 (camel_multipart_init): pick a prettier default boundary. Still
17262 need to deal with the larger problem
17264 2000-04-22 NotZed <NotZed@HelixCode.com>
17266 * camel-mime-message.h (struct _CamelMimeMessage): Removed
17267 send_date, and received_date, and replaced it with a time_t
17268 'date' (this is what the header is called), and date_offset to
17269 store the GMT offset of the date.
17271 * camel-mime-message.c (camel_mime_message_set_from): Update raw
17273 (_set_from): Removed.
17274 (_get_from): Removed.
17275 (camel_mime_message_get_from): Moved implementation here.
17276 (camel_mime_message_get_subject): Move implementation here.
17277 (_get_subject): Nuked.
17278 (camel_mime_message_set_subject): Handle utf-8 input, and also
17279 update raw header when changed.
17280 (_set_subject): Removed.
17281 (_set_received_date): Removed.
17282 (camel_mime_message_set_received_date): Removed.
17283 (_get_received_date): Removed.
17284 (camel_mime_message_get_received_date): Removed.
17285 (_get_sent_date): Removed.
17286 (camel_mime_message_get_sent_date): Removed.
17287 (camel_mime_message_get_date): New function to get the date as a
17289 (camel_mime_message_set_date): Set the date as a time_t/offset.
17290 (camel_mime_message_get_date_string): Get the date as a string.
17291 (camel_mime_message_init): Initialise the current date as
17292 'CMAEL_MESSAGE_DATE_CURRENT'.
17293 (_set_reply_to): Removed.
17294 (camel_mime_message_set_reply_to): Moved implementation here.
17295 This is still broken, reply-to can have multiple addresses.
17296 (_get_reply_to): Removed.
17297 (_set_field): Removed, no longer used anywhere.
17298 (_get_field): Also removed.
17299 (_init_header_name_table): Add the Date header.
17300 (process_header): Also handle snooping of Date header here.
17302 * camel-stream-filter.c (finalise): Unref the source stream on
17303 finalise, and also call the parent class (oops).
17305 * camel-mime-parser.c (camel_mime_parser_state): New function to
17306 get the current parser state.
17307 (camel_mime_parser_stream): Allow you to get the stream back from
17309 (camel_mime_parser_fd): Alternative to allow you to get the fd
17310 back from the mime_parser.
17311 (folder_scan_init_with_stream): Properly ref/unref the stream.
17312 (folder_scan_close): Properly unref the stream/close the fd on
17314 (folder_scan_init_with_fd): Close the old fd if there is one.
17316 * camel-data-wrapper.c (camel_data_wrapper_construct_from_parser):
17317 New method, construct a data wrapper from an initialised parser.
17318 (construct_from_parser): Empty implementation.
17320 * providers/mbox/camel-mbox-summary.c (message_struct_new):
17321 Convert subject line to unicode, before storing in the summary.
17322 (strdup_trim): Removed, no longer needed.
17324 * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): Ref
17325 the folder after setting it in the new message.
17327 * camel-mime-part.c (my_set_content_object): Have the headers
17328 follow the content-type change here too.
17329 (my_write_to_stream): Dont write content-type here, automatically
17330 stored in the headers ...
17331 (my_write_to_stream): Use header_disposition_format() to format
17332 the content-disposition header.
17333 (my_write_to_stream): Removed old code, all headers are now stored
17334 in the camel-medium level, always. Need to do the same with
17335 camel-mime-message i suppose ...
17336 (my_write_to_stream): Write the content using the parent class,
17337 not some weird function.
17338 (camel_mime_part_class_init): Dont override get_output_stream.
17339 (camel_mime_part_encoding_from_string): Bleh, make it
17342 * camel-mime-utils.c (header_content_type_is): Handle empty types.
17343 (header_encode_string): Start of an implementation of the rfc2047
17344 encoder. It does iso-8859-1, and us-ascii, and utf-8 (others get
17346 (rfc2047_encode_word): Convert a single word/string into rfc2047
17348 (quoted_encode): Different quoted-printable encoding for rfc2047
17349 encoding of headers.
17351 * gmime-content-field.c (gmime_content_field_write_to_stream): Use
17352 header_content_type_format() to format it.
17354 2000-04-21 NotZed <NotZed@HelixCode.com>
17356 * camel-mime-utils.h: Add prototype for header_param_list_free.
17358 * camel-recipient.c: New function to remove all the types of a
17359 recipient list. I think this whole object needs a major review.
17361 * camel-mime-message.c (camel_mime_message_class_init): Removed
17362 parse_header_pair override, override add_header instead.
17363 (_parse_header_pair): Renamed to add_header.
17364 (remove_header): Add this method, to make sure we keep upto date
17365 with removed headers too.
17366 (_set_field): If given a NULL value, clear it out.
17367 (_set_recipient_list_from_string): Constify.
17368 (set_header): Override set_header from camel_medium.
17369 (process_header): Local function to handle set/add/remove of each
17370 header we know about.
17372 * camel-mime-part.c (camel_mime_part_class_init): Removed
17373 parse_header_pair setup.
17374 (my_parse_header_pair): Moved into add_header(), removed.
17375 (my_set_disposition): Allow a NULL disposition to clear it.
17376 (my_set_content_id): Allow NULL content id to clear it.
17377 (remove_header): Track removed headers.
17378 (my_set_description): Allow NULL description to clear it.
17379 (my_set_content_MD5): Make sure we copy the md5 value, and allow a
17380 NULL value to reset it.
17381 (my_set_filename): Copy the filename.
17382 (my_set_header_lines): Removed. Nothing uses it, it doesn't
17383 actually serve any purpose.
17384 (camel_mime_part_set_header_lines): Ditto.
17385 (my_get_header_lines): Ditto.
17386 (camel_mime_part_get_header_lines): Ditto.
17387 (camel_mime_part_class_init): Remove *_header_lines setup.
17388 (camel_mime_part_init): Remove header_lines init.
17389 (my_finalize): Remove header_lines finalise.
17390 (my_write_to_stream): Write the headers here. This is just WRONG,
17391 camel_medium should be doing this.
17392 (my_get_output_stream): Kill a warning.
17393 (camel_mime_part_encoding_to_string): Ditto.
17394 (camel_mime_part_set_description): Unvirtualiase, use add_header()
17395 to do the processing.
17396 (my_set_description): Removed.
17397 (set_disposition): Renamed from my_set_disposition.
17398 (camel_mime_part_get_description): Get the descriptionf rom the
17400 (my_get_description): Removed.
17401 (my_set_filename): Removed.
17402 (camel_mime_part_get_filename): Get the parameter from the
17404 (camel_mime_part_encoding_from_string): Handle NULL string.
17405 (camel_mime_part_init): Remove reference to filename.
17406 (my_finalize): Dont free filename.
17408 * camel-mime-part.h (CamelMimePartClass): Removed
17409 parse_header_pair() method, it doesn't add anything that
17410 add_header() can't be used for.
17411 (CamelMimePartClass): Remove *_header_lines methods.
17412 (struct _CamelMimePart): Remove header_lines list.
17413 (struct _CamelMimePart): Removed filename attribute.
17415 * camel-medium.c (camel_medium_init): Init headers to null, not a
17417 (add_header): Append the headers as a list.
17418 (remove_header): Remove headers as a list.
17419 (get_header): Likewise for lookup.
17420 (free_header): Removed, no longer needed.
17421 (finalize): Free headers using header_raw_clear().
17422 (camel_medium_set_header): New function, to reset and override all
17423 values of a header with a new value.
17425 * camel-medium.h (struct _CamelMedium): Changed to use a
17426 header_raw struct rather than a hash table, to store headers
17427 (many headers can occur multiple times).
17429 * camel-mime-utils.c (header_raw_find_next): New function, allows
17430 you to find multi-valued header fields.
17431 (header_disposition_format): New function to format/create
17432 content-disposition header string.
17433 (header_param_list_format_append): Function to format parameter
17434 lists into a GString.
17435 (header_content_type_format): Function to format content-type into
17437 (header_set_param): allow NULL value to remove the parameter.
17438 (decode_token): Renamed from header_decode_token.
17439 (header_decode_token): New interface for external use.
17440 (quoted_decode): Made static to kill annoying warnings.
17441 (g_strdup_len): Killed, replaced with calls to g_strndup().
17442 (rfc2047_decode_word): Made static to kill warnings.
17443 (decode_coded_string): Terminated.
17444 (g_string_append_len): Made static to kill warnings.
17445 (header_decode_text): Made static to kill warnings.
17446 (header_decode_text): Constify.
17447 (rfc2047_decode_word): Constify.
17448 (header_param): Constify.
17449 (header_content_type_new): Copy the type/subtype strings.
17450 (header_param_list_decode): Made static.
17451 (header_param_list_format_append): Made static.
17452 (quoted_decode): Constify.
17453 (g_string_append_len): Constify.
17454 (header_token_decode): New function to decode a single token.
17456 * providers/mbox/camel-mbox-summary.c (header_write): Append a
17457 trailing \n when writing headers.
17458 (strdup_trim): Killed a warning.
17459 (camel_mbox_summary_set_uid): Make sure the next uid is at least 1
17460 higher than any existing one.
17461 (header_evolution_decode): Use header_token_decode to get the
17464 * camel-mime-parser.c (folder_scan_header): Strip the trailing \n
17465 of the end of all header lines.
17467 2000-04-20 NotZed <NotZed@HelixCode.com>
17469 * providers/mbox/camel-mbox-utils.[ch]: Removed.
17471 * providers/mbox/camel-mbox-parser.[ch]: Removed. Removed
17474 2000-04-20 Dan Winship <danw@helixcode.com>
17476 * camel-mime-utils.c (rfc2047_decode_word): use libunicode iconv
17477 functions rather than libc ones (since libc might not have them).
17478 (header_decode_date): add autoconfiscation on timezone code
17480 * camel.c (camel_init): call unicode_init ()
17482 2000-04-20 NotZed <NotZed@HelixCode.com>
17484 * providers/mbox/camel-mbox-summary.c (message_struct_new): Trim
17485 leading/trailing spaces off the raw headers.
17487 * MERGE NEW_PARSER branch into HEAD, fixed conflicts.
17489 * gmime-content-field.c (_print_parameter): Duh, removed again
17492 * camel-mime-utils.c (header_content_type_is): Constify.
17493 (header_content_type_unref): Killed a couple warnings.
17495 * camel-folder.c (_init): Removed more log crap.
17497 * providers/Makefile.am (SUBDIRS): Removed nntp, pending fixes for
17500 * providers/mbox/camel-mbox-folder.c (_get_message_by_number):
17501 Fixed for new summary interface. Added a warning for using this
17503 (_get_message_by_uid): Fixed for message new with session
17506 2000-04-19 Dan Winship <danw@helixcode.com>
17508 * camel-simple-data-wrapper-stream.c
17509 (camel_simple_data_wrapper_stream_get_type): This is a subtype of
17510 CamelSeekableStream, not CamelStream.
17512 * camel-seekable-substream.c: clean up a lot.
17513 (eos): When testing for end-of-stream, reset the parent position
17514 before testing if it is at end-of-stream, since either (a) it may
17515 have been seek'ed to eos by someone else, or (b) we may have been
17516 seek'ed away from eos and it hasn't been synced yet.
17518 * camel-medium.[ch] (camel_medium_add_header): const poison.
17519 (Belatedly goes with my change of 2000-02-23.)
17520 (camel_medium_init): Use g_strcase_{hash,equal} on the header
17523 2000-04-18 Dan Winship <danw@helixcode.com>
17525 * camel-mime-part.c (my_set_input_stream):
17526 * camel-data-wrapper.c (set_input_stream, set_output_stream): do
17527 better reference counting of streams so they actually go away
17530 * camel-log.[ch], *: Nuke camel log stuff. Replace calls to
17531 CAMEL_LOG_WARNING with calls to g_warning.
17533 * camel-data-wrapper.[ch]:
17534 * camel-simple-data-wrapper.[ch]:
17535 * camel-medium.[ch]: Clean, polish, document. Most of the gtk-doc
17536 comments added to camel-data-wrapper.c note serious problems that
17539 2000-04-17 Dan Winship <danw@helixcode.com>
17541 * camel-mime-message.[ch]: Remove the "session" field from
17542 CamelMimeMessage. Nothing uses it, about half of the existing
17543 calls to camel_mime_message_new_with_session pass NULL, and
17544 there's no obvious reason for it to be there.
17546 * providers/MH/camel-mh-folder.c:
17547 * providers/maildir/camel-maildir-folder.c:
17548 * providers/mbox/camel-mbox-folder.c:
17549 * providers/mbox/camel-mbox-utils.c:
17550 * providers/nntp/camel-nntp-folder.c:
17551 * providers/pop3/camel-pop3-folder.c: Use camel_mime_message_new
17552 instead of camel_mime_message_new_with_session.
17554 * camel-session.c (get_store_for_protocol_with_url): Set the
17555 exception if no provider is found.
17557 * camel-url.c: Add code to encode and decode %-escapes in URLs,
17558 and do some additional correctness-checking on URL syntax. From
17559 Tiago Antà o with modifications by me.
17561 2000-04-14 Chris Toshok <toshok@helixcode.com>
17563 * providers/Makefile.am (SUBDIRS): add nntp
17565 2000-04-14 Christopher James Lahey <clahey@helixcode.com>
17567 * providers/mbox/camel-mbox-folder.c: Fix switch statement.
17569 2000-04-14 Chris Toshok <toshok@helixcode.com>
17571 * providers/nntp/camel-nntp-folder.c (_exists): always return TRUE
17572 for now. we need to check the server response to make sure the
17574 (_get_message_by_uid): make sure to account for the \n we add to
17575 the string after every line.
17577 * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): function
17578 to get the headers using the XOVER command.
17579 (get_HEAD_headers): function to get the headers using the HEAD
17580 command on each message. slooooooow.
17581 (camel_nntp_get_headers): make this function use either XOVER or HEAD
17582 versions depending on whether or not the server extension is present.
17584 2000-04-14 Dan Winship <danw@helixcode.com>
17586 * camel-formatter.[ch]: This didn't belong in Camel. Move to mail/
17588 * Makefile.am, camel-types.h: remove references to
17591 2000-04-12 Matt Loper <matt@helixcode.com>
17593 * camel-folder-pt-proxy.c (_folder_open_cb): Print warning message
17594 for broken function.
17595 (_folder_close_cb): Same.
17597 2000-04-12 Miguel de Icaza <miguel@gnu.org>
17599 * Makefile.am (pthread_SRC): Use correct names for the pthread
17602 2000-04-10 Dan Winship <danw@helixcode.com>
17604 * providers/pop3/camel-pop3-store.c (pop3_connect): fix various
17605 bugs in APOP code (still untested) and some of the error cases.
17607 * camel-provider.h: Clarify what provider.protocol, provider.name,
17608 and provider.description should be.
17610 * providers/mbox/camel-mbox-provider.c:
17611 * providers/pop3/camel-pop3-provider.c:
17612 * providers/sendmail/camel-sendmail-provider.c:
17613 * providers/smtp/camel-smtp-provider.c: update protocols, names,
17616 * providers/mbox/camel-mbox-folder.c (_get_message_by_number):
17617 implement get_message_by_number for the mail fetch code.
17619 2000-04-09 Jeffrey Stedfast <fejj@stampede.org>
17621 * providers/smtp/camel-smtp-transport.c: reformatted to fit
17622 the standard indent format used by helix code
17624 2000-04-09 Dan Winship <danw@helixcode.com>
17626 * camel-movemail.c: New file with new function to dot-lock an mbox
17627 file and copy it to a safe private directory.
17629 2000-04-08 Christopher James Lahey <clahey@helixcode.com>
17631 * providers/smtp/.cvsignore: Added a .cvsignore file.
17633 2000-04-08 Dan Winship <danw@helixcode.com>
17635 * providers/sendmail/camel-sendmail-transport.c (_send_internal):
17636 actually record the pid returned by fork(). Noticed by clahey.
17638 * providers/smtp/camel-smtp-transport.c: #include <sys/param.h>
17639 for MAXHOSTNAMELEN. (This is a stopgap: some of the uses of
17640 MAXHOSTNAMELEN are wrong anyway...)
17642 2000-04-07 Jeffrey Stedfast <fejj@stampede.org>
17644 * providers/smtp/camel-smtp-transport.c: fixes to numerous bugs;
17645 should now build fine.
17646 * providers/Makefile.am: Readded smtp now that smtp builds without
17649 2000-04-20 NotZed <NotZed@HelixCode.com>
17651 * providers/mbox/camel-mbox-summary.c
17652 (camel_mbox_summary_next_uid): Public function to get the next
17653 uid, makes sure its saved to disk too.
17655 * camel-mime-part.c (my_finalize): Fix disposition crap with a
17657 (my_set_disposition): Likewise.
17658 (my_get_disposition): And here.
17659 (my_write_to_stream): And here, needs more cleanup.
17661 * providers/mbox/camel-mbox-folder.c (_append_message): Assign a
17662 new uid at this point.
17664 * gmime-content-field.c (gmime_content_field_write_to_stream):
17665 Make something up if we have an invalid/missing content type
17668 2000-04-19 NotZed <NotZed@HelixCode.com>
17670 * providers/mbox/camel-mbox-folder.c (_delete): Fixed completely
17671 broken switch() syntax, only compiled because errno is a macro on
17673 (_list_subfolders): Likewise.
17675 2000-04-18 NotZed <NotZed@HelixCode.com>
17677 * camel-mime-parser.c (folder_scan_init): init stream to null.
17679 * providers/mbox/camel-mbox-summary.c
17680 (CAMEL_MBOX_SUMMARY_VERSION): Moved to .c file, incremented.
17681 (index_folder): Changed to have index passed via the summary.
17682 (decode_string): Do a sanity check on the string size, so we dont
17683 visit g_malloc()'s friendly abort().
17685 * camel-folder-pt-proxy.c (camel_folder_pt_proxy_class_init):
17686 Removed reference to set_name.
17687 (_set_name): Removed.
17689 * providers/mbox/camel-mbox-utils.c
17690 (parsed_information_to_mbox_summary): Removed. Most of this file
17691 is about to be binned.
17693 * providers/mbox/camel-mbox-search.c (func_header_contains): Fixes
17694 for changes to summary interface.
17695 (struct _searchcontext): Remove pointer to message info, get it
17696 straight from the mboxsummary.
17697 (camel_mbox_folder_search_by_expression): New summary interface.
17698 (camel_mbox_folder_search_by_expression): Uh, the summary is not
17699 an object anymore (well not yet).
17701 * providers/mbox/camel-mbox-folder.c
17702 (camel_mbox_folder_class_init): Removed set_name init.
17703 (_set_name): Removed.
17704 (_open): Call new summary interface.
17705 (_close): Use new summary interface.
17706 (_create): Removed a summary object leak.
17707 (_get_message_count): New summary interface.
17708 (_get_uid_list): Use new summary interface. FIXME: this is leaky.
17709 (_get_message_by_uid): Use the new summary interface, some
17711 (_append_message): Totally changed, basically just appends the
17712 message directly, ignores the summary (for now), the summary will
17713 fix itself up if it needs to.
17714 (_check_get_or_maybe_generate_summary_file): Bye bye old code.
17715 (summary_get_message_info): Implement get_message_info again, for
17718 * camel-folder.c (camel_folder_class_init): Removed set_name
17720 (_set_name): Moved contents into _init.
17721 (_init): Perform the old functions of set_name here.
17723 * camel-folder.h: Removed the set_name internal interface.
17725 2000-04-14 NotZed <NotZed@HelixCode.com>
17727 * providers/mbox/camel-mbox-summary.[ch]: Completely replaced with
17730 * Makefile.am (libcamel_la_SOURCES): Removed
17731 camel-folder-summary.[ch].
17733 * camel-folder.h (struct _CamelFolder): Removed summary.
17734 (struct _CamelFolder): Changed flags to be 1 bit bitfields.
17736 * camel-folder-summary.[ch]: Class removed entirely.
17738 * camel-folder.c (camel_folder_get_summary): Removed.
17739 (camel_folder_summary_get_message_info): Moved from
17740 camel-folder-summary.c
17741 (camel_folder_summary_get_subfolder_info): Moved from
17742 camel-folder-summary.c
17744 * camel-mime-parser.c (folder_scan_step): Store the start of
17745 headers and start of from in the scan state.
17746 (camel_mime_parser_tell_start_headers): Query the start of the
17748 (camel_mime_parser_tell_start_from): Query the cached start of
17751 2000-04-13 NotZed <NotZed@HelixCode.com>
17753 * gmime-content-field.c (gmime_content_field_free): Removed this
17754 function. If its too dangerous to use, it shouldn't be here.
17755 (gmime_content_field_ref): Also ref the embedded content-type.
17756 (gmime_content_field_unref): Ditto to unref it.
17758 * camel-mime-utils.h: Add a refcount for content-type header.
17760 * camel-mime-utils.c (header_content_type_unref): Implement unref
17762 (header_content_type_ref): Implement ref for header content type.
17764 2000-04-12 NotZed <NotZed@HelixCode.com>
17766 * gmime-content-field.h: Changed to use a _header_content_type.
17767 Added type/subtype back for compatability with clients.
17769 * gmime-content-field.c: Basically a total rewrite, and now just a
17770 thin wrapper ontop of header_content_type.
17771 (_free_parameter): Got rid of it.
17772 (gmime_content_field_new): Use header_content_type_* functions.
17773 (gmime_content_field_set_parameter): Likewise.
17774 (_print_parameter): Blow away.
17775 (gmime_content_field_write_to_stream): Get details from the
17776 content_type field. Should check if it needs to escape chars in
17777 the paramter value.
17778 (gmime_content_field_get_mime_type): Likewise.
17779 (___debug_print_parameter): Get rid of this rather annoyingly
17781 (gmime_content_field_get_parameter): Simplified function.
17782 (gmime_content_field_construct_from_string): Fixed this to use a
17784 (gmime_content_field_is_type): New function to test if a type matches.
17785 (gmime_content_field_construct_from_string): Track type/subtype
17786 from subordinate content_type header struct.
17788 * gmime-rfc2047.[ch]: Removed. Unused.
17790 * camel-stream-b64.[ch]: Blown away more duplicated code.
17792 * Makefile.am: Removed camel-stream-b64.[ch], and
17795 * camel-mime-part.c (my_get_content_object): Replaced
17796 camel-stream-b64 with camel-stream-filter/camel-mime-filter-basic.
17797 (my_write_content_to_stream): Replaced camel-stream-b64 with the
17798 camel-stream-filter with an encoder.
17799 (my_get_content_object): Also implement quoted-printable decoding.
17800 (my_write_content_to_stream): Also implement quoted-printable
17802 (my_get_output_stream): Took out stream-b64 code (nothing's being
17803 executed yet anyway).
17805 * gmime-base64.[ch]: Blown away. Not used, dont need it.
17807 * camel-mime-utils.h: Added offset for this header. Records where
17808 it is in the source.
17810 * camel-mime-utils.c (header_raw_append_parse): Add offset
17811 parameter, to store where the header is stored in the stream.
17812 (header_raw_append): Added offset param.
17813 (header_raw_find): Return offset, if a pointer supplied for it.
17814 (header_raw_replace): Add offset param.
17815 (header_content_type_new): New function, to create an empty
17817 (header_content_type_set_param): Set a parameter in the
17819 (header_set_param): Generic header parameter setting function.
17820 (header_decode_string): Handle NULL input.
17822 * camel-mime-parser.c (camel_mime_parser_headers_raw): New
17823 function to get access to all the raw headers.
17824 (folder_scan_header): Keep track of the header start position, and
17825 store it when saving the header.
17827 2000-04-11 NotZed <NotZed@HelixCode.com>
17829 * camel-mime-utils.c: Moved a bunch of printf's to debug.
17831 * camel-mime-parser.c: Moved a bunch of printf's to debug.
17832 (folder_scan_header): Detect end of each header line using the
17833 last scanned char, and not the last scanned position.
17835 * camel-mime-filter-index.[ch]: Indexing filter. Indexes unicode
17836 sequences into ibex files.
17838 2000-04-09 NotZed <NotZed@HelixCode.com>
17840 * camel-mime-part.c: Dont include gmime-base64.h
17842 * camel-mime-filter-charset.c (complete): Implement the completion
17845 * camel-mime-parser.c (folder_scan_step): If we get to the end of
17846 the body data, check any filters for outstanding completion data.
17847 (camel_mime_parser_scan_from): Set whether we scan for "From "
17850 * camel-stream-filter.c (do_read): If we get to end of stream on
17851 the source, then call the filtering completion function to see if
17852 we have any more data to return.
17854 * camel-mime-filter-basic.c (filter): Implement quoted printable
17855 encoding and decoding filters.
17856 (complete): And the complete function as well.
17858 * camel-mime-utils.c (base64_encode_close): Also take an input
17859 buffer, allow closing of filters.
17860 (quoted_encode_step): First cut, simple quoted-printable encoder.
17861 Doesn't handle trailing spaces/tabs on end of line properly yet.
17862 (quoted_encode_close): Complete a quoted-encoding.
17863 (is_qpsafe): New type check, for quoted-printable safe characters
17864 (that do not need encoding). Thats all bits used in the type
17865 table! Rebuilt the types table.
17866 (header_content_type_is): Checks a content type against at
17867 type/subtype match.
17868 (header_content_type_param): Handle NULL content type pointer.
17870 2000-04-08 NotZed <NotZed@HelixCode.com>
17872 * camel-mime-filter-basic.c (filter): Implement the base64
17873 encoder. Problem is, there is no way to know when to close it.
17874 Close/Reset will have to provide the same args as filter, so it can
17875 flush remaining data *sigh*
17877 * camel-mime-utils.c (base64_encode_step): A rather complex base64
17879 (base64_step_close): Companion function to finish off the base64
17882 * camel-mime-part.c (my_write_content_to_stream): Changed to use
17883 camel_stream_write_to_stream().
17885 * camel-stream.[ch] (camel_stream_write_to_stream): From
17886 camel_stream_b64_write_to_stream(). Fixed some infinite loop
17887 bugs with error conditions.
17889 * camel-stream-b64.[ch] (camel_stream_b64_write_to_stream): Removed.
17890 This has nothing to do with stream-b64, so i've moved it to
17893 * camel-mime-utils.h: Add a comment about refcounting
17894 header_content_type struct.
17896 * Makefile.am: Added camel-stream-filter*.[ch].
17898 * camel-stream-filter.[ch]: Class to implement a generic
17899 (multipass) filter ontop of a stream. Only implements a read-only
17902 * camel-mime-parser.c (camel_mime_parser_filter_add): Ref the
17903 filter we just added.
17905 * Makefile.am: Added camel-mime-filter*.[ch].
17907 * camel-mime-filter-charset.[ch]: A filter to preform character set
17908 conversion (uses unicode_iconv).
17910 * camel-mime-filter-save.[ch]: A simple filter which will save all
17911 data directly to a file or file descriptor.
17913 * camel-mime-filter-basic.[ch]: Implements the basic mime filters,
17914 base64 and quoted-printable decoding (encoding not implemented yet).
17916 * camel-mime-filter.[ch]: A filtering class, which can filter streams
17917 of data without having to copy them. Simpler than stream classes,
17918 and can be plugged into a single stream class (when i write it).
17920 2000-04-07 Dan Winship <danw@helixcode.com>
17922 * providers/pop3/camel-pop3-store.c (pop3_connect): Clarify error
17924 (finalize): fix a bug in camel_exception usage
17925 (pop3_connect): Remember the password after asking for it the
17928 2000-04-07 NotZed <NotZed@HelixCode.com>
17930 * Makefile.am: Added camel-mime-parser/camel-mime-utils.
17932 * camel-mime-parser.c: Fast mime parser.
17934 * camel-mime-utils.c: Mime utility functions, and email header
17937 2000-04-07 NotZed <NotZed@HelixCode.com>
17939 * providers/Makefile.am: Removed smtp for now, its a long way from
17941 * providers/smtp/Makefile.in: Removed file that shouldn't have been
17944 2000-04-06 Matt Loper <matt@helixcode.com>
17946 * camel-folder-pt-proxy.c (_get_full_name): Remove exception param
17947 from get_full_name() called, since get_full_name() was changed to
17948 not have an exception in the last param (see dan's notes below).
17951 2000-04-06 Dan Winship <danw@helixcode.com>
17953 * camel-store.[ch]: Reorganize the folder-fetching methods and
17954 implement a folder cache so that multiple requests for the same
17955 folder will yield the same CamelFolder object (as long as it
17956 remains active). Includes some code to remove no-longer-active
17957 folders from the cache, but it doesn't get used since nothing is
17958 ever unref'ed in Camel right now...
17960 * providers/mbox/camel-mbox-store.c:
17961 * providers/pop3/camel-pop3-store.c: update for CamelStore
17964 * camel-folder.[ch]: Remove the (unused) CamelException argument
17965 from camel_folder_get_name and camel_folder_get_full_name.
17966 (camel_folder_set_name): make this go away since changing a
17967 folder's name after it has been created could result in it
17968 conflicting with a separately-issued folder.
17970 2000-04-05 Dan Winship <danw@helixcode.com>
17972 * g_url_new really wanted to take a CamelException. So, rename
17973 Gurl to CamelURL, g_url_* to camel_url_* (with camel_url_new
17974 taking an exception), and url-util.[ch] to camel-url.[ch]. Also
17975 force url->port to be numeric and remove camel_service_getport. (I
17976 was confused before: the URL RFC says the port must be numeric, so
17977 we don't want to do getportbyname.)
17979 2000-04-01 Dan Winship <danw@helixcode.com>
17981 * providers/mbox/camel-mbox-folder.c
17982 (_check_get_or_maybe_generate_summary_file): Compare
17983 mbox_file_size and mbox_modtime to the results of stat()ing the
17984 mbox file, not the summary file. Duh.
17985 (_close): Update the summary's mbox_file_size and mbox_modtime
17986 before writing it to disk.
17988 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_save,
17989 camel_mbox_summary_load): Wow. I must have been tired when I wrote
17990 this code. First, the comparison bug above. Second, it was using
17991 ntohs and htons instead of ntohl and htonl. Third, I was reading
17992 the status flag byte in two different places and thus getting out
17993 of sync. Fourth, it was writing out field_length bytes of each
17994 header field after having converted field_length to network byte
17995 order, resulting in lots of random crap being appended, and the
17996 summary files being huge. (Fortunately, since the size/modtime
17997 comparison was biffed, the garbage summary read from disk was
17998 always immediately discarded.)
18000 * providers/mbox/camel-mbox-parser.c (camel_mbox_parse_file): fix
18001 an off-by-one error that caused the last-used UID to be reused if
18002 the summary file was regenerated. (That one wasn't my fault. :-)
18004 2000-03-31 Dan Winship <danw@helixcode.com>
18006 * camel-stream-mem.c: implement unimplemented methods
18008 * gmime-content-field.c
18009 (gmime_content_field_construct_from_string):
18010 * data-wrapper-repository.c
18011 (data_wrapper_repository_get_data_wrapper_type):
18012 * camel-simple-data-wrapper.c (my_write_to_stream):
18013 * camel-mime-part.c (my_set_input_stream):
18014 remove debugging printf()s that no longer seem useful.
18016 2000-03-31 Matt Loper <matt@helixcode.com>
18018 * camel-formatter.c (text_to_html): Added "convert_newlines_to_br"
18019 boolean param, to give the option of not converting '\n's to <br>
18020 tags. This way, when we stick stuff in a <pre> tag, newlines stay
18023 2000-03-30 Matt Loper <matt@helixcode.com>
18025 * camel-formatter.c (handle_text_plain): Use <pre> tag to force
18026 the use of monospaced fonts.
18028 2000-03-30 Dan Winship <danw@helixcode.com>
18030 * camel-service.c (camel_service_getport): Add a htons in the
18031 default_number case, and document the fact that the function
18032 returns the port in network byte order.
18034 * providers/pop3/camel-pop3-store.c (pop3_connect): Revert
18035 Miguel's change. The port number bug was actually somewhere
18036 else, and the IP address copying code was fine already.
18038 2000-03-29 Miguel de Icaza <miguel@gnu.org>
18040 * providers/pop3/camel-pop3-store.c (pop3_connect): Add htons
18041 (port), and only copy 4 bytes for the IP address to prevent a DNS
18044 2000-03-28 Dan Winship <danw@helixcode.com>
18046 * camel-seekable-substream.c
18047 (camel_seekable_substream_new_with_seekable_stream_and_bounds):
18048 make this return a CamelStream rather than a
18049 CamelSeekableSubstream, because that's the way Gtk objects tend to
18052 * camel-service.c (camel_service_gethost,
18053 camel_service_getport): convenience functions to canonicalize
18054 the host and port values of a service's URL.
18055 * providers/pop3/camel-pop3-store.c: use them
18057 * providers/mbox/camel-mbox-folder.c
18058 (_check_get_or_maybe_generate_summary_file): Make this work when
18059 the inbox file doesn't yet exist.
18061 2000-03-27 Dan Winship <danw@helixcode.com>
18063 * providers/mbox/camel-mbox-folder.c (_append_message): uncomment
18064 the call to unlink the temp file: there's no way to tell
18065 camel_stream_fs to truncate a file, so reusing the same file was
18066 resulting in junk at the ends of messages.
18068 * camel-folder.[ch]: add delete_message_by_{number,uid}.
18070 * providers/pop3/camel-pop3-folder.[ch]: implement
18071 delete_message_by_uid. Add a close method to do expunging
18072 of deleted messages if requested.
18074 * providers/pop3/camel-pop3-store.[ch]: support for
18075 CamelPop3Folder::close. (You have to close the connection
18076 in order to expunge the folder, thus the store may be
18077 connected in the CamelService::is_connected sense when it
18078 is not actually connected to the server.) Also some bugfixes.
18080 2000-03-27 NotZed <NotZed@HelixCode.com>
18082 * providers/mbox/camel-mbox-folder.c (_append_message): Unref the
18083 output_stream when done, close doesn't do it.
18084 (_append_message): Clear all uid's from the appending messages, so
18085 they are reassigned proper unique id's.
18087 * gmime-utils.c (get_header_array_from_stream): Actually free the
18088 header, it is copied elsewhere.
18090 2000-03-26 NotZed <NotZed@HelixCode.com>
18092 * providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev): Added
18093 folder parameter to function. Fixed callers.
18094 (index_message): Index a message as it is assigned a unique id.
18096 * camel-mime-part.c (my_set_content_id): Make sure we malloc and
18097 copy the content_id, otherwise *poof*
18099 2000-03-25 NotZed <NotZed@HelixCode.com>
18101 * camel-medium.c (_finalize): Another leak, unref the content if
18104 * camel-recipient.c (camel_recipient_table_free): Plug another
18105 memory leak - actually free the recipient table.
18107 * camel-mime-message.c (_finalize): Plugged a memory leak with the
18110 * gmime-utils.c (_store_header_pair_from_string): A simpler, more
18111 debuggable and functionally identical header extraction function.
18113 2000-03-24 NotZed <NotZed@HelixCode.com>
18115 * gmime-content-field.c (gmime_content_field_set_parameter):
18116 Remove the hash table entry before freeing its key and data.
18118 2000-03-27 Dan Winship <danw@helixcode.com>
18120 * providers/Makefile.am (SUBDIRS): Add pop3.
18122 * providers/pop3/camel-pop3-store.c: keep separate input and
18123 output streams so the output doesn't end up being buffered.
18125 * providers/pop3/camel-pop3-folder.c (get_message_by_number):
18126 finish implementing this.
18128 2000-03-27 Michael Meeks <michael@helixcode.com>
18130 * camel-mime-part.c (my_set_disposition): fix so less broken.
18131 (my_finalize): remove dodgy disposition free.
18133 * camel-data-wrapper.c (my_set_mime_type_field): unref instead of
18136 2000-03-27 Dan Winship <danw@helixcode.com>
18138 * camel-service.c (camel_service_free_auth_types): new routine to
18139 free the data allocated by camel_service_query_auth_types.
18141 * providers/pop3/camel-pop3-store.c (free_auth_types): implement
18143 * camel-stream-mem.c (camel_stream_mem_new_with_buffer): rename
18144 camel_stream_mem_new_with_buffer to ..._with_byte_array and add a
18145 new ..._with_buffer that takes a char * rather than a GByteArray.
18147 * Remove CamelStreamBufferedFs, since CamelStreamBuffer makes it
18150 2000-03-25 Dan Winship <danw@helixcode.com>
18152 * camel-folder-summary.[ch]: change the CamelFolderSummary
18153 interfaces to allow partial summary queries (for dealing
18154 with very large folders). Remove the "extended_fields" from
18155 CamelFolderInfo and CamelMessageInfo: this is better dealt
18158 * providers/mbox/camel-mbox-summary.[ch]: Make CamelMboxSummary a
18159 subclass of CamelFolderSummary. Update interfaces for that. Remove
18160 the internal/external summary distinction. Remove the (unused) md5
18161 checksum in the folder summary. Change the summary file format
18162 (primarily to make it no longer byte-order dependent) and add a
18163 version number to it so it will be easier to change in the future.
18165 * providers/mbox/camel-mbox-folder.[ch]
18166 * providers/mbox/camel-mbox-search.c
18167 * providers/mbox/camel-mbox-utils.c: update for summary changes
18169 * camel-exception-list.def: add
18170 CAMEL_EXCEPTION_FOLDER_SUMMARY_INVALID
18172 2000-03-23 NotZed <NotZed@HelixCode.com>
18174 * providers/mbox/camel-mbox-provider.c: Added flag to provider
18175 initialisation, to match changed structure.
18177 2000-03-22 NotZed <NotZed@HelixCode.com>
18179 * camel-folder.[ch]: Added async search api.
18181 * providers/mbox/camel-mbox-search.c
18182 (camel_mbox_folder_search_by_expression): Changed to use an
18183 asynchronous interface.
18184 (camel_mbox_folder_search_cancel): Cancel function for async
18187 2000-03-23 Dan Winship <danw@helixcode.com>
18189 * camel-stream-buffer.c (camel_stream_buffer_read_line): Function
18190 to read one line of any size from a stream and return it in
18193 2000-03-22 Dan Winship <danw@helixcode.com>
18195 * camel-service.c (camel_service_query_auth_types): New function
18196 to query a service for the authentication protocols it supports.
18197 * providers/pop3/camel-pop3-store.c (query_auth_types): implement
18199 * camel-provider.c (camel_provider_scan): New function to
18200 scan the provider dir and return a list of all providers.
18202 * providers/pop3/camel-pop3-folder.c: fill this in partially
18203 * providers/pop3/camel-pop3-store.c: make camel_pop3_command
18204 return the text after "+OK"/"-ERR" and add a separate
18205 camel_pop3_get_additional_data to get the message body or
18206 whatever. Also make them take a CamelPop3Store rather than
18207 a CamelStreamBuffer.
18209 2000-03-22 Matt Loper <matt@helixcode.com>
18211 * camel-formatter.c (debug): Disabled some useless debug
18214 2000-03-21 Dan Winship <danw@helixcode.com>
18216 * providers/pop3: some initial bits of the POP3 provider, to
18217 make Matt happy. Incomplete, untested, etc.
18219 2000-03-21 bertrand <bertrand@helixcode.com>
18221 * providers/mbox/camel-mbox-summary.c
18222 (camel_mbox_summary_append_internal_to_external): copy the size field
18224 * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): initialize
18225 message_info to NULL
18227 * camel-folder-summary.h: added the size field.
18229 * providers/mbox/camel-mbox-summary.h:
18230 added the received_date field.
18232 * providers/mbox/camel-mbox-summary.c:
18233 documented all functions.
18235 * camel-folder-summary.h: name change and
18238 * providers/mbox/camel-mbox-search.c: update to
18239 conform to name change in the summary fields.
18241 2000-03-10 bertrand <bertrand@helixcode.com>
18243 * camel-service.h: cosmetic changes.
18245 2000-03-09 Dan Winship <danw@helixcode.com>
18247 * s/HelixCode/Helix Code, Inc./ in the copyrights
18249 2000-03-07 bertrand <bertrand@helixcode.com>
18251 * camel-formatter.c (handle_mime_part):
18252 plug mem leaks due to bad documentation
18253 of camel_content_field_get_mime_type
18254 (print_camel_body_part): idem
18255 (handle_multipart_alternative): idem
18257 * gmime-content-field.c (gmime_content_field_get_mime_type):
18261 * camel-mime-part.c (my_finalize): unref the
18262 content_input_stream if any.
18264 2000-03-06 bertrand <bertrand@helixcode.com>
18266 * camel-stream-fs.c (_seek): fix a bogus calculation
18267 in the return position.
18269 2000-03-05 bertrand <bertrand@helixcode.com>
18271 * camel-session.h: cosmetic fixes.
18273 * camel-stream-fs.c (_read):
18274 (_seek): fixed the current position so that it refers
18275 to the current position in the stream, not in its parent.
18277 2000-03-04 NotZed <NotZed@HelixCode.com>
18279 * providers/mbox/camel-mbox-search.c
18280 (camel_mbox_folder_search_by_expression): Ref the summary
18281 after we have got it.
18283 2000-03-04 bertrand <bertrand@helixcode.com>
18285 * camel-mime-part.c (my_write_content_to_stream):
18286 stream the raw content instead of nothing if the encoding
18289 * camel-stream-fs.c (_seek): handle eos more
18292 * camel-formatter.c (get_bonobo_tag_for_object):
18293 bonobo-goad-id is the good key to look for.
18294 (get_bonobo_tag_for_object): close the <object> tag.
18295 (get_bonobo_tag_for_object): the correct syntax for the
18296 to set a parameter inside an <object> tag is :
18297 <object classid="..."> <param name="uid" value="..."> <param ...>
18300 2000-03-03 bertrand <bertrand@helixcode.com>
18302 * providers/mbox/camel-mbox-folder.c (_get_message_by_uid):
18303 use set_input_stream instead of construct_from_stream
18304 to feed the message object.
18306 * camel-data-wrapper.c (my_write_to_stream): reset output stream.
18307 (my_set_input_stream): unref the previous input stream.
18308 use the set_output_stream for default behaviour.
18309 (my_set_output_stream): unref previous output stream.
18311 * camel-mime-part.c (my_write_content_to_stream): reset content
18312 object output stream.
18314 2000-03-03 NotZed <NotZed@HelixCode.com>
18316 * providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev): Make
18317 sure we open with create with a creation mask.
18319 2000-03-01 NotZed <NotZed@HelixCode.com>
18321 * camel-mime-part-utils.c
18322 (camel_mime_part_construct_content_from_stream): DO NOT assert on
18323 content type, we have fallback code 4 lines below it ... *sigh*
18325 2000-02-29 NotZed <NotZed@HelixCode.com>
18327 * Makefile.am (libcamelinclude_HEADERS): Added camel-stream-buffer
18330 * camel-stream-buffer.[ch]: Generic buffer which can be applied to
18333 2000-03-03 bertrand <bertrand@helixcode.com>
18335 * camel-formatter.c (handle_image): in the case
18336 of images, put the content object output stream
18337 in the url. This allows the message browser
18338 to show inline images.
18340 * camel-stream-b64.c (my_read_encode): fixed state
18343 2000-03-02 bertrand <bertrand@helixcode.com>
18345 * camel-stream-b64.c (my_read_encode): don't forget to
18346 set the state to 0 after 3.
18347 (my_read_encode): don't forget to encode, even in state 3.
18349 * camel-simple-data-wrapper.c: static functions are prefixed
18350 with my_ instead of _
18351 * camel-multipart.c: static functions are prefixed
18352 with my_ instead of _
18353 (my_write_to_stream): commented.
18354 (my_write_to_stream): warning in case the boudary is set
18355 but is a zero length string.
18357 * camel-mime-part.c (camel_mime_part_encoding_from_string):
18358 remove debug trace.
18360 * camel-mime-part.c: Replaced all static functions
18361 with name begining with _ by the same name begining
18362 with "my_" to prevent the possible conflicts
18363 with system symbols Dan warned us about.
18365 * camel-stream-b64.c (camel_stream_b64_write_to_stream):
18366 use CamelStreamB64 type for the input stream.
18368 * camel-mime-part.c (_get_content_object): remove
18370 (_write_content_to_stream): implement the b64
18371 encoding the new way (that is using camel_stream_b64)
18373 * camel-data-wrapper.c (my_write_to_stream):
18374 fix implementation so that it writes properly
18375 to the output stream even.
18377 * camel-stream-b64.c (camel_stream_b64_write_to_stream):
18378 fix implementation.
18380 2000-02-29 bertrand <bertrand@helixcode.com>
18382 * camel-stream-b64.c (camel_stream_b64_write_to_stream): new
18385 * camel-data-wrapper.c (_write_to_stream): default
18388 * gmime-utils.c (_store_header_pair_from_string):
18389 revert strange changes.
18391 * camel-stream-b64.c (my_read_decode): set eos to true when we
18392 have read the whole input stream.
18393 (my_reset): set eos to FALSE.
18395 2000-02-28 NotZed <NotZed@HelixCode.com>
18397 * camel-mime-part.c (_parse_header_pair): Dont free this either.
18399 * camel-medium.c (_remove_header): Ugh, dont free the header
18400 before we actually remove it.
18401 (_add_header): Ugh, dont free hashtable entries which may be
18402 duplicated (hash_insert _will_ reference that memory).
18404 * string-utils.c (string_trim): Trimming a 0-length string is not
18407 * camel-mime-message.c (_parse_header_pair): Fixed very broken
18408 memory handling of header_name/value.
18410 * providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev):
18411 Initialise end_of_last_message always.
18412 (camel_mbox_copy_file_chunk): Stop trying to read if we run out of
18413 data, rather than looping forever.
18414 (camel_mbox_write_xev): Use an open flag when opening with create.
18416 * camel-folder.c (camel_folder_search_by_expression): No, its not
18417 a fatal error to search on a non-searchable folder, you just dont
18419 (_open): Dont open an opened folder (i dont see why this is really
18420 a bug, but what the hell ...)
18422 * providers/mbox/camel-mbox-folder.c (_init): Set search cap on.
18423 (_open): Call parent class to perform open. Remove folder-open
18424 check to parent instead.
18425 (_create): open takes a creation mask, dont use umask to try and
18427 (_delete): Dont bother checking folder==NULL, its already been
18428 checked on the external interface (changed to an assertion, this
18429 would have to be a camel bug).
18430 (_delete_messages): Likewise.
18432 (_init): Dont go and clear all the paths and shit that the parent
18433 open just setup for us.
18434 (_delete_messages): Get rid of more umask stuff.
18435 (_append_message): Make sure we pass file mode to open with create.
18436 (_append_message): Cleaned up some indenting to make it readable.
18438 * camel-stream-b64.c (my_read_encode): Fixed a typo.
18440 * providers/mbox/camel-mbox-search.c: Changed to use e-sexp,
18441 rather than filter-sexp.
18443 2000-02-28 bertrand <bertrand@helixcode.com>
18445 * camel-stream-b64.c (my_read_encode): encoding
18448 2000-02-23 bertrand <Bertrand.Guiheneuf@aful.org>
18450 * camel-stream-b64.c: changed the __static
18451 suffix into a my_ prefix.
18452 (camel_stream_b64_set_mode): reset the persistent
18454 (my_read_decode): remove superfluous %
18456 * providers/mbox/camel-mbox-utils.c (camel_mbox_copy_file_chunk):
18457 fix exception description message.
18459 2000-02-24 Dan Winship <danw@helixcode.com>
18461 * camel-session.c: Add camel_session_get_transport_for_protocol.
18463 * camel-transport.h:
18464 * camel-transport.c: Add an abstract CamelTransport class.
18466 * providers/sendmail/*: A CamelTransport that uses sendmail
18469 2000-02-24 Dan Winship <danw@helixcode.com>
18471 * camel-folder.c: use CamelExceptions for run-time errors, not
18472 incorrect code. Don't bother validating that an object exists from
18473 inside one of its methods, since you couldn't have gotten there if
18474 it didn't. Fix some code style bugs.
18476 (_init): Rename init_with_store to init and add parent_folder,
18477 separator, and name arguments.
18478 (_set_name): Get separator from self, not parent_store now.
18481 * camel-store.c: Remove get/set_separator.
18483 * providers/mbox/: Update for above.
18485 2000-02-23 Dan Winship <danw@helixcode.com>
18487 * camel-medium.c (_finalize): Free the data in the headers hash
18489 (_add_header): g_strdup the header name and value when adding it.
18491 * camel-mime-part-utils.c
18492 (camel_mime_part_construct_headers_from_stream): Free the header
18493 data after calling camel_medium_add_header, since it will have
18494 g_strdup()ed it itself.
18496 2000-02-22 NotZed <NotZed@HelixCode.com>
18498 * providers/mbox/camel-mbox-search.c: Dont compile by default.
18500 * providers/mbox/Makefile.am: Fuck off the filter code.
18502 2000-02-22 bertrand <Bertrand.Guiheneuf@aful.org>
18504 * camel-stream-b64.c (read_decode__static):
18505 don't read the char if we reached the length
18506 of the output buffer. Hours lost on this
18509 * camel-folder.c (camel_folder_get_subfolder):
18510 (camel_folder_create):
18511 (camel_folder_delete):
18512 (camel_folder_delete_messages):
18513 (camel_folder_list_subfolders):
18514 (camel_folder_expunge):
18515 (camel_folder_get_message_by_number):
18516 (camel_folder_get_message_count):
18517 (camel_folder_append_message):
18518 (camel_folder_copy_message_to):
18519 (camel_folder_get_summary):
18520 (camel_folder_get_message_uid):
18521 (camel_folder_get_message_by_uid):
18522 (camel_folder_get_uid_list):
18523 Check folder state (open/close) and raise an
18524 exception if it is not ok.
18526 * providers/mbox/camel-mbox-folder.c (_create):
18527 create the file and the path with two different
18530 * camel-folder.c (_create): handle the case
18531 when the folder name starts with '/'
18533 * camel-exception.c (camel_exception_new): use
18534 (void) instead of () in decl.
18536 * camel-exception.h: cosmetic fixes.
18538 * camel-exception.c (camel_exception_init): new routine.
18539 Fix a bug in mail/message-list.c
18542 * camel-folder.h: cosmetic changes.
18544 * camel-stream-b64.c (reset__static): added a
18545 reset method. Thanks message-browser to find
18548 * providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): readd
18551 2000-02-21 bertrand <Bertrand.Guiheneuf@aful.org>
18553 * camel-formatter.c (lookup_unique_id):
18554 awful hack to test get_output_stream.
18555 * camel-stream-b64.[ch] :
18556 b64 encoding/decoding is now implemented as
18560 2000-02-21 bertrand <Bertrand.Guiheneuf@aful.org>
18562 * camel-seekable-substream.c (_reemit_parent_signal):
18563 emit "data_available" when parent stream emits it.
18566 2000-02-21 NotZed <NotZed@HelixCode.com>
18568 * providers/mbox/Makefile.am: Uh, fixed LIBADD again. What was
18569 there was never ever going to work, wasn't it tested?
18572 2000-02-21 Dan Winship <danw@helixcode.com>
18574 * camel-session.h: (struct _CamelSession): Add authenticator.
18576 * camel-session.c (camel_session_new): Add authenticator.
18577 (camel_session_query_authenticator): New function to query the
18578 session authenticator for password, etc, information.
18580 2000-02-21 Dan Winship <danw@helixcode.com>
18582 * camel-session.c: add CamelExceptions to several functions. Use
18583 camel_session_new to initialize the session and URL fields of
18584 created CamelStores as appropriate.
18589 * camel-service.c: Move the session and url (and associated
18590 functions) from CamelStore to CamelService. Add url_flags to
18591 CamelService so subclasses can specify which URL components
18592 are mandatory for them. Add camel_session_new for
18593 camel_session_get_store* to use.
18595 * providers/mbox/camel-mbox-folder.c:
18596 * providers/mbox/camel-mbox-store.c:
18597 * providers/mbox/camel-mbox-store.h: Update for above changes.
18599 * camel-exception-list.def: Once camel is being used for real,
18600 exceptions won't be renumberable. So renumber them now to make
18601 more room to add exceptions to the various categories later, and
18602 add a big warning message.
18604 2000-02-20 Dan Winship <danw@helixcode.com>
18606 * providers/mbox/Makefile.am: add libibex back to
18607 libcamelmbox_la_LIBADD
18609 2000-02-18 NotZed <NotZed@HelixCode.com>
18611 * providers/mbox/camel-mbox-search.h
18612 (camel_mbox_folder_search_by_expression): Added exception to call,
18615 * providers/mbox/camel-mbox-search.c
18616 (camel_mbox_folder_search_by_expression): Major changes, to use
18617 the sexp evaluator from filter/filter-sexp.c to implement the
18619 (func_body_contains): Changed to support multiple strings in 1
18620 command (results or'd together)
18622 * url-util.c (g_url_new): Fixed a typo (colon == 0 isn't right),
18623 and made it so full url's are absolute pathed (Dan, this is how it
18624 has to work!). Also, always include a path part, even if it is an
18627 2000-02-18 Dan Winship <danw@helixcode.com>
18629 * camel/camel-types.h: New header with the typedefs for all camel
18630 classes. Now the class headers can just include this and the
18631 header for the parent type. This makes it possible for
18632 CamelService to include a CamelSession without creating an
18636 * composer/e-msg-composer-attachment-bar.h:
18637 * mail/folder-browser.c:
18638 * mail/message-list.c: frob #includes to match the new reality
18640 2000-02-17 Dan Winship <danw@helixcode.com>
18642 * camel/camel-service.h:
18643 * camel/camel-service.c: Make camel-service us a Gurl internally.
18644 Remove the login/password interfaces and instead provide
18645 camel_service_connect_with_url. Add CamelExceptions
18647 2000-02-17 bertrand <Bertrand.Guiheneuf@aful.org>
18649 * camel/camel-formatter.c (handle_text_plain):
18650 (handle_text_html): use camel_stream_reset instead
18651 of seek. The formatter should be able to work
18652 with all streams, not only seekable streams.
18653 In the case where some provider implementation
18654 would not be able to provide a reset method
18655 to their stream, implementors would have
18656 to find a workaround.
18658 * camel/camel-session.c (camel_session_new): use
18659 (void) instean of () in function decl.
18661 * camel/camel-folder.c: ifdef async operation
18664 * camel/camel-seekable-stream.c (_seek): added a warning.
18665 (_reset): default implementation of reset for seekable
18668 * camel/camel-mime-message.h: set_received_date declaration fix.
18671 * camel/providers/mbox/camel-mbox-provider.c (camel_provider_module_init):
18672 use (void) instead of ().
18674 * camel/camel-stream.c (camel_stream_reset):
18675 new method for CamelStream.
18677 2000-02-17 Dan Winship <danw@helixcode.com>
18679 * camel/url-util.c (g_url_to_string): New function to convert
18680 a Gurl back into a char *.
18682 2000-02-17 bertrand <Bertrand.Guiheneuf@aful.org>
18684 * camel/camel-formatter.c (handle_text_plain):
18685 revamped so that it uses the output stream
18686 of the data wrapper
18687 (handle_text_html): ditto.
18690 * camel/camel-simple-data-wrapper.h:
18691 * camel/camel-simple-data-wrapper.c (camel_simple_data_wrapper_new):
18692 use (void) instead of ().
18693 (_get_output_stream): simple implementation.
18695 2000-02-16 bertrand <Bertrand.Guiheneuf@aful.org>
18697 * camel/camel-data-wrapper.c (_set_input_stream): ref input stream
18698 (_set_output_stream): ref output stream
18699 (_finalize): unref input and output streams
18701 * camel/camel-seekable-substream.c (_set_bounds): don't
18702 seek the begining of the substream.
18703 (_eos): fix eos condition testing.
18704 (_finalize): unref parent stream
18705 (_init_with_seekable_stream_and_bounds): ref parent stream
18707 * camel/gstring-util.c (g_string_equal_for_hash):
18708 (g_string_equal_for_glist): return type is int.
18711 * camel/camel.c (camel_init): use (void)
18714 2000-02-16 NotZed <NotZed@HelixCode.com>
18716 * providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): Added
18717 libfilter to link line (temporarily?). Required for
18720 2000-02-15 bertrand <bertrand@helixcode.com>
18722 * camel/camel-multipart.c (_localize_part):
18723 this routine replaces the _read_part routine
18724 and does not store the part in a buffer.
18725 (_set_input_stream): use the set_input_stream
18726 instead of the construct_from_stream.
18727 each bodypart is given an input stream.
18729 * camel/camel-mime-part-utils.c:
18730 include the data-wrapper-repository header.
18731 (camel_mime_part_construct_content_from_stream):
18732 use the set_input_stream instead of the
18733 construct_from_stream method.
18735 * camel/camel-seekable-substream.c (_set_bounds):
18736 cur position is set to 0 not to inf_bound.
18738 2000-02-15 bertrand <Bertrand.Guiheneuf@aful.org>
18740 * camel/camel-mime-part.c: include gmime-base64.h
18741 various compilation and runtime fixes.
18742 (_set_input_stream): store the input substream
18743 for the content object.
18745 * camel/camel-data-wrapper.h: declare the
18746 set/get function on input/output stream.
18748 * camel/camel-mime-part.c (_get_content_object):
18749 don't use a temporary mem stream.
18751 * camel/camel-seekable-substream.c (_seek):
18753 (_read): the substream can be unlimited in length
18755 * camel/camel-data-wrapper.c (camel_data_wrapper_class_init):
18756 set the get/set_input/output_stream methods.
18758 * camel/camel-multipart.c (_construct_from_stream):
18759 camel_stream_seek -> camel_seekable_stream_seek
18761 2000-02-14 Miguel de Icaza <miguel@gnu.org>
18763 * camel/providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): Add
18764 the unicode libraries as well.
18766 * camel/camel-provider.c (camel_provider_register_as_module): Add
18767 error reporting here. Desire to use Solaris increases. Hair loss
18768 in the last two hours: 5,400.
18770 * camel/providers/mbox/camel-mbox-provider.c
18771 (camel_mbox_get_provider): Renamed function.
18773 * camel/camel.h: All include files use camel/ now here.
18775 * camel/providers/mbox/Makefile.am: Drop all the dynamism from
18776 Camel, and make this a standard library.
18778 2000-02-14 bertrand <Bertrand.Guiheneuf@aful.org>
18780 * camel/gmime-utils.c (get_header_array_from_stream): use the
18782 (gmime_read_line_from_stream): ditto.
18784 * camel/camel-stream-fs.h (struct ): add the eof field
18787 * camel/camel-stream-fs.c (camel_stream_fs_init): set eof.
18788 (_read): set eof on end of file.
18789 (_eos): implemented.
18791 * camel/gmime-utils.c (get_header_array_from_stream):
18792 make a blocking version of the header parser.
18793 When the fs stream uses gnome-vfs, this should
18795 (gmime_read_line_from_stream): ditto.
18797 2000-02-11 bertrand <Bertrand.Guiheneuf@aful.org>
18799 * camel/camel-stream-fs.c:
18800 everywhere, when using the cur_pos field, do it
18801 on the CamelSeekableStream object.
18802 (_seek): small fix.
18804 * camel/camel-seekable-stream.c (camel_seekable_stream_seek):
18805 s/camel_stream_seek/camel_seekable_stream_seek/g
18807 * camel/camel-seekable-stream.h:
18808 (struct ): added a field to store the
18811 * camel/camel-seekable-stream.c (camel_seekable_stream_get_current_position):
18812 New function. Allows to get the current position
18813 of a seekable stream.
18816 2000-02-13 NotZed <notzed@zedzone.helixcode.com>
18818 * providers/mbox/camel-mbox-search.c: New file, implements the
18819 search api for mbox folders.
18821 * providers/mbox/Makefile.am: Link with ibex.
18823 * camel-folder.c (camel_folder_has_search_capability): Api
18825 (camel_folder_search_by_expression): Ditto.
18827 2000-02-12 NotZed <notzed@zedzone.helixcode.com>
18829 * providers/mbox/camel-mbox-folder.c (_set_name): Setup index
18831 (_init_with_store): Init index filename. Hmm, none of these
18832 names ever seem to get free'd (FIXME?)
18834 * providers/mbox/camel-mbox-folder.h: Add index file name.
18836 2000-02-12 NotZed <notzed@helixcode.com>
18838 * camel-folder.h: Add folder search functions.
18840 ** Created ChangeLog just for camel **
18841 - refer to ../ChangeLog for changes prior to this date.