1 2002-05-09 Jeffrey Stedfast <fejj@ximian.com>
3 * camel-filter-search.c (shell_exec): New filter function to pipe
4 a message to another program.
6 2002-05-09 Not Zed <NotZed@Ximian.com>
8 * camel-service.c (camel_service_disconnect): Instead of testing
9 for SERVICE_CONNECTED, we need to also handle SERVICE_CONNECTING
10 too, as it will often have setup some details before it failed.
11 Make it !DISCONNECTED (and !DISCONNECTING for recursive calls,
12 which happen). Fixes #23782, and maybe also #21604 and many other
15 2002-05-08 Jeffrey Stedfast <fejj@ximian.com>
17 * camel-digest-store.c (digest_setv): Implemented.
18 (digest_getv): Implemented.
20 * camel-disco-store.c (disco_setv): Implemented.
21 (disco_getv): Implemented.
23 * camel-remote-store.c (remote_store_setv): Implemented.
24 (remote_store_getv): Implemented.
26 * camel-transport.c (camel_transport_class_init): Implemented.
27 (transport_setv): Implemented.
28 (transport_getv): Implemented.
30 * camel-store.c (store_setv): Implemented.
31 (store_getv): Implemented.
33 * camel-service.c (service_setv): Implemented.
34 (service_getv): Implemented.
36 * providers/pop3/camel-pop3-store.c (pop3_try_authenticate):
37 camel_pop3_engine_iterate doesn't return the state, it returns -1
38 on fail, 0 when finished processing request or >0 if more ops are
39 in the queue, so don't check status against CAMEL_POP3_STATE_OK,
40 instead check pcp->state against that.
42 2002-05-07 Jeffrey Stedfast <fejj@ximian.com>
44 * camel-object.h: s/class/klass for arguments so that c++
45 developers don't complain later.
47 2002-05-07 Dan Winship <danw@ximian.com>
49 * camel-object.c (camel_object_class_cast): Fix a crash in a
52 2002-05-07 Not Zed <NotZed@Ximian.com>
54 * camel-remote-store.c (remote_send_string): Check for LOGIN xxxx
55 as well if debug is on, so we dont print passwords to evolution
58 * providers/imap/camel-imap-utils.c (imap_is_atom_char): This was
59 really broken. 1. isprint() is locale dependent, and 2. it looked
60 up an 8 bit value in a 7 bit table without truncating it. I've
61 removed the isprint() stuff and just put it directly into the
62 special table, which i've expanded to the right size too.
64 * providers/imap/*: Applied patch from Preston Elder
65 <prez@magick.tm> to make camel only use literals if it needs to
66 for simple strings. Changed slightly to use imap_is_atom() and
67 more consistent formatting.
68 providers/imap/camel-imap-utils.c (imap_is_atom): Chagned from
71 ** Merged in camel-object2 branch. Simpler camelobject
72 implementation + object args interface.
74 * camel.c (camel_init): Call camel_object_get_type() to make sure
75 camel_object_type is initialised.
77 * camel-object.h (CAMEL_OBJECT_TYPE): Changed to return global
78 camel_object_type pointer, not call camel_object_get_type.
80 2002-05-06 Jeffrey Stedfast <fejj@ximian.com>
82 * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): If
83 the pop3 command status is -1, then we probably have a TCP error
84 (?) so set a SYSTEM exception so our caller can distinguish
85 between a "bad password" and a "tcp error".
86 (pop3_connect): Only uncache the password on "bad password"
89 * camel-pgp-mime.c (pgp_mime_part_sign_prepare_part): Use
90 CamelMimeFilterBestenc to get a more appropriate encoding rather
91 than just blindling assigning QP.
93 * providers/imap/camel-imap-folder.c (do_append): Call
94 camel_mime_message_encode_8bit_parts() which fixes bug #10885.
96 * camel-tcp-stream-raw.c (socket_connect): Don't bother with
97 counting down the timeout.
99 2002-05-02 Jeffrey Stedfast <fejj@ximian.com>
101 * camel-stream-fs.c (stream_read): Same fix as the tcp stream.
102 (stream_write): Again here. Just like tcp stream's stream_write(),
103 also make sure to save errno before calling fcntl to restore the
106 * camel-tcp-stream-raw.c (stream_read): Handle EINTR errors for
108 (stream_write): Same and also preserve errno when setting the fd
109 flags back. If w == -1, return -1.
111 2002-05-02 Jeffrey Stedfast <fejj@ximian.com>
113 * camel-mime-utils.c (header_decode_mailbox): Fixed the fix for
114 stupidly-broken-mailer bug #5 to work when multiple unescaped
115 characters were in a row. Fixes bug #24140.
117 * camel-tcp-stream-raw.c (socket_connect): Check select() for
120 * camel-pgp-context.c (crypto_exec_with_passwd): Change the order
121 of some code so that we check if the select() failed before we
122 check for user-cancellation.
124 * camel-service.c (camel_gethostbyname): Check for EINTR when
126 (camel_gethostbyaddr): Same.
128 2002-04-29 Jeffrey Stedfast <fejj@ximian.com>
130 * camel-provider.c (camel_provider_auto_detect): Now takes a
131 CamelURL argument rather than a GHashTable *settings argument.
133 2002-04-29 Not Zed <NotZed@Ximian.com>
135 * providers/local/camel-spool-store.c (get_folder_info): We want
136 to set unread_count to get_unread_message_count, not
137 get_message_count(). Might fix #17174. Also removed FIXME: as it
140 2002-04-26 Jeffrey Stedfast <fejj@ximian.com>
142 * providers/local/Makefile.am: Don't link to libibex.a anymore.
144 * providers/nntp/Makefile.am: Same.
146 * providers/imap/Makefile.am: And again here.
148 * camel-store-summary.h: No longer want to #include
151 * camel-provider.c (camel_provider_auto_detect): New function to
152 auto-detect configuration settings.
154 2002-04-26 Not Zed <NotZed@Ximian.com>
156 * camel-block-file.c (block_file_validate_root): Remove the
157 excessive \n's, after printfs.
159 * camel-text-index.c (text_index_compress_nosync): @!#$@#$!@$#!.
160 Since the rename op was fixed, this broke compression's rename,
161 resulting in the index 'vanishing' after every compress
162 (i.e. after every reindex). Fix this code to account for the
163 fixed rename operation.
165 2002-04-25 Jeffrey Stedfast <fejj@ximian.com>
167 * providers/smtp/camel-smtp-transport.c (smtp_rcpt): Don't put a
168 space between the "RCPT TO:" and the "<recipient>" strings -
169 rfc0821 was not clear on this but it seems rfc2821 defines a
170 grammar excluding that SP.
173 2002-04-24 Jeffrey Stedfast <fejj@ximian.com>
175 * providers/local/camel-local-provider.c
176 (camel_provider_module_init): Configure the default paths for mh,
177 mbox, maildir, spools, etc.
179 * camel-provider.h: Add a CAMEL_PROVIDER_CONF_LABEL enum and
180 define some default CamelProviderConfEntry macros.
182 2002-04-19 Jeffrey Stedfast <fejj@ximian.com>
184 * providers/pop3/camel-pop3-folder.c (pop3_refresh_info): Free the
187 * camel-data-cache.c (data_cache_finalise): Free the cdc->path.
189 * camel-multipart.c (write_to_stream): Don't g_return_val_if_fail
190 here if the boundary is an empty string. See bug #23676 for
191 details. The way I see it, we have 2 options: 1) leave this fix
192 the way it is, thus allowing multipart boundaries to be
193 empty-strings; or 2) make camel_multipart_get_boundary() change
194 the boundary to something legal if the boundary is an
195 empty-string. Since the parser should be able to handle an
196 empty-string boundary *and* more importantly because we want to
197 keep the same boundaries as the original raw message so as to be
198 able to verify multipart/signed parts, I vote for solution #1.
200 2002-04-19 Not Zed <NotZed@Ximian.com>
202 * devel-docs/camel-index.txt: Start of a white-paperish document
203 describing camel-index and older libibex.
205 2002-04-18 Not Zed <NotZed@Ximian.com>
207 * providers/local/camel-local-store.c (rename_folder): If we get a
208 failure, make sure we set an exception.
210 * camel-text-index.c (camel_text_index_rename): If the file
211 doesn't exist, just assume it never did, dont return failure.
212 (text_index_rename): Add '.index' to the path name we're using,
213 since we dont get it passed in.
215 * camel-folder-search.c (check_header): When doing a contains
216 match, split the words and perform an and on it.
217 (match_words_messages): If we have an index, but were forced to do
218 a full search, first lookup a subset of messages using
219 the index and a simplified word set. Only do a manual search of
222 2002-04-17 Not Zed <NotZed@Ximian.com>
224 * camel-folder-search.c (match_message_index): Changed to take a
225 utf8 string not a regex pattern.
226 (match_words_index): Matches against a camel_search_words list.
227 (match_words_1message): Matches a single message against a
228 camel_search_words list.
229 (match_words_message): Same, but gets the message from the folder
231 (match_words_messages): Matches a list of messages against a words
233 (search_body_contains): Rewritten to handle multiple word
234 searches. For #23371.
236 * providers/imap/camel-imap-search.c (sync_match): Split words
237 when searching, to support multiple search words. Also, try
238 searching specifying charset of utf8 if we can, if that fails,
239 fall back to not specifying charset. TODO: It should translate
240 the strings into the locale default charset?
242 * providers/imap/camel-imap-store.c (connect_to_server): Added new
243 cap - utf8_search, if set, we tell the server we're searching
244 using utf8, otherwise we dont (incorrectly, since we always use
247 * camel-search-private.c (camel_ustrstrcase): Make this class public.
248 (camel_search_words_split): Split a word into multiple words based
249 on whitespace, and keep track of whether the word is simple
250 (indexable directly), or not.
251 (camel_search_words_free): Free 'em.
253 2002-04-17 Jeffrey Stedfast <fejj@ximian.com>
255 * camel-vee-folder.c (vee_search_by_expression): If the vee-folder
256 is the unmatched, we don't have our own expression so we cannot
257 merge them. Instead, just use the expression passed in. This fixes
258 a Null-Pointer-Read crash on Solaris systems at least.
260 2002-04-16 Jeffrey Stedfast <fejj@ximian.com>
262 * camel-filter-driver.c (camel_filter_driver_filter_folder): Get
263 rid of an unused variable.
265 * providers/smtp/camel-smtp-transport.c (smtp_helo): Use
266 camel_gethostbyaddr since gethostbyaddr is not reentrant.
268 * camel-http-stream.c (http_connect): Updated after the rename of
269 camel_get_host_byname.
271 * camel-service.c (camel_gethostbyname): Renamed.
272 (camel_gethostbyaddr): New cancellable/reentrant version of
275 2002-04-14 Jeffrey Stedfast <fejj@ximian.com>
277 * providers/local/camel-spoold-store.c: Added #include
278 <sys/types.h> for dirent.h which needs it on MacOS X.
280 * providers/local/camel-maildir-store.c: Same.
282 * providers/nntp/camel-nntp-store.c: Same.
284 * providers/imap/camel-imap-message-cache.c: Same.
286 * camel-provider.c: Same.
288 * camel-data-cache.c: Same.
290 2002-04-12 Jeffrey Stedfast <fejj@ximian.com>
292 * broken-date-parser.c (datetok): Treat commas as token
294 (WEEKDAY_CHARS): Use full weekday names in case the broken mailer
296 (MONTH_CHARS): Same as above but for months.
298 2002-04-15 Not Zed <NotZed@Ximian.com>
300 * *.c: Fix callers for api changes to camel-object, mainly
301 declare_event->add_event, and classfuncs->klass, and a couple
302 of missing #include <config.h>'s
304 * camel-arg.[ch], Makefile.am: New support code for
305 camel_object_get/set arg.
307 * *.h: Fixed all uses of get_type to return a CamelType rather
308 than a guint (now a pointer).
310 * camel-object.[ch]: Major cleanup of object implementation. Also
311 added a get/set interface, and some debugging options.
313 2002-04-11 Not Zed <NotZed@Ximian.com>
315 * providers/local/camel-spool-summary.c (spool_summary_sync_full):
316 If the last message(s) were deleted, and we had any messages
317 output, account for the lost \n of the following From line by
318 adding an extra \n. fix for #8214.
320 2002-04-10 Not Zed <NotZed@Ximian.com>
322 * camel-mime-part-utils.c (convert_buffer): If we get a 0 length
323 input, return a 0 lenght output as valid - fixes bugs with some
324 iconv impl and its simpler anyway.
326 2002-04-11 Jeffrey Stedfast <fejj@ximian.com>
328 * providers/imap/camel-imap-folder.c: Set the UID_SET_LIMIT value
329 to 4096. I ran into an issue tonight where apparently the IMAP
330 server changed the UIDVALIDITY and so Evo needed to re-fetch all
331 headers and it was trying to send a uid set of some 25k (yes, I
332 have a very large INBOX). Anyways, it was set to unlimited
333 before. Courier IMAPd can safely handle up to ~16k per token, but
334 UW IMAPd can only handle 8k per command-line, so I set it to 4k
337 2002-04-10 Jeffrey Stedfast <fejj@ximian.com>
339 * camel-mime-part-utils.c (convert_buffer): Fixed a bug that would
340 miscalculate how much data to copy into the GByteArray (negative
341 value) thus causing a segfault. Also optimized it while I was at
344 2002-04-09 Jeffrey Stedfast <fejj@ximian.com>
346 * camel-store.c (camel_store_init): Make the folder_lock
347 recursive. See bug #22363 for details. Basically,
348 get_folder_info() is requesting a diary folder which in turn
349 connects which requests then calls get_folder() but deadlocks
350 because get_folder_info already holds the lock.
352 * camel-mime-message.c (camel_mime_message_set_date): Don't adjust
353 the timezone offset if we used tm.tm_gmtoff because it is already
356 2002-04-09 Not Zed <NotZed@Ximian.com>
358 * camel-mime-part.c (construct_from_parser): If we get multiple
359 Content-Type header values, change subsequent headers to
360 X-Invalid-Content-Type so it doesn't wreck processing. This fixes
361 the reported case in #18929, but i dont know if it fixes the
362 original posters problems.
364 2002-04-08 Not Zed <NotZed@Ximian.com>
366 * camel-vtrash-folder.c (vtrash_move_messages_to): If we find
367 we're moving from the vtrash to another folder, we need to convert
368 the uid from a vfolder uid to the source uid (+8). Fix for
369 #20886. Also changed to batch multiple moves to different folders
370 so they are done as efficiently as possible rather than one at a
373 * camel-mime-utils.c (base64_decode_step): If we only get passed
374 '=', we back track only if we actually output any data. Fix for
376 (quoted_decode): Pass out size_t instead of int, and use 0 instead
377 of -1 for error since its not signed. This will fix similar bug
378 to above in different circumstances since the result is taken as
379 unsigned. This is only an internal func.
380 (quoted_encode): Return size_t just for consistency.
382 * camel-block-file.c (block_file_validate_root): Comment out the
383 debug and move it into a warning when the validation fails.
385 2002-04-08 Jeffrey Stedfast <fejj@ximian.com>
387 * camel-mime-utils.c (uuencode_close): Don't count our filler when
388 encoding our line-length octet.
390 2002-04-05 Jeffrey Stedfast <fejj@ximian.com>
392 * camel-http-stream.c (http_get_headers): Don't get the statuscode
394 (http_method_invoke): Use a User-Agent header and do basic proxy
396 (stream_read): Handle redirects.
397 (camel_http_stream_set_user_agent): New function to allow client
398 to set the User-Agent string.
399 (camel_http_stream_set_proxy): New function for setting the proxy
401 (camel_http_stream_set_proxy_authrealm): New function for setting
402 the proxy auth realm.
403 (camel_http_stream_set_proxy_authpass): New function for setting
404 the proxy auth password.
406 2002-04-04 Jeffrey Stedfast <fejj@ximian.com>
408 * camel-folder-summary.c (message_info_new): Simplified since we
409 can now decode in-reply-to without getting extra cruft. Get rid of
410 the FIXME about having to check scan->id because of the
411 possibility of it being NULL, this can no longer happen.
413 * camel-mime-utils.c (header_references_inreplyto_decode): New
414 function to decode in-reply-to headers. Only grabs the first thing
415 that looks like a message-id and then returns.
416 (header_references_decode): Loop calling
417 header_references_decode_single (a new internal function).
419 2002-04-04 Not Zed <NotZed@Ximian.com>
421 * providers/imap/camel-imap-search.c (imap_body_contains): If
422 (body-contains) is not passed any arguments, return empty/false.
423 Fixes a crash exposed by #15001.
425 * camel-remote-store.c (remote_connect): Reset the keepalive
426 timeout to 10 minutes rather than the 30 seconds I was using for
429 2002-04-03 Dan Winship <danw@ximian.com>
431 * camel-provider.h (CamelProvider): make service_cache be an array
432 of CAMEL_NUM_PROVIDER_TYPES elements so you can have a single
433 provider offer both stores and transports. (Eg, Exchange, NNTP)
435 * providers/imap/camel-imap-provider.c: Don't initialize
436 service_cache here. (The session code can do it itself since the
437 url_hash and url_equal functions are stored as part of the
440 * providers/nntp/camel-nntp-provider.c: Likewise.
442 * providers/local/camel-local-provider.c: Likewise.
444 * providers/pop3/camel-pop3-provider.c: Likewise.
446 * providers/sendmail/camel-sendmail-provider.c: Likewise.
448 * providers/smtp/camel-smtp-provider.c: Likewise.
450 * camel-session.c (register_provider): Initialize the provider's
451 service cache(s) here.
452 (camel_session_class_init): Don't initialize.
453 vee_provider.service_cache here.
454 (camel_session_destroy_provider): Update to destroy multiple
456 (service_cache_remove, get_service): Tweak these a bit to deal
457 with multiple service_caches.
459 2002-04-02 Jeffrey Stedfast <fejj@ximian.com>
461 * camel-tcp-stream-ssl.c (set_errno): Handle a ton more nspr i/o
463 (stream_connect): Act as if we are doing a non-blocking
464 connect. This is to try and work around bug #15120 where users get
465 an EINPROGRESS error. Maybe importing a PRFileDesc into SSL mode
466 automagically makes it non-blocking? I dunno.
468 2002-04-01 Jeffrey Stedfast <fejj@ximian.com>
470 * camel-folder-summary.c (message_info_new): Updated the
471 construction of the references to match JWZ's updated algorithm
472 initialization (ie, append any In-Reply-To reference onto any
473 References header and never take more than a single message-id
474 from the In-Reply-To header since anything after the first will
475 probably just be email addresses). Fixes bug #1336.
477 2002-04-03 Not Zed <NotZed@Ximian.com>
479 * providers/local/camel-local-folder.c
480 (camel_local_folder_construct): Turn indexing back on, fingers
483 * camel-block-file.c (sync_nolock): #!@$@$#@~#$
484 DF@#$!Q@$#!@$#!#%. Well it helps if we're iterating a list to
485 iterate the node pointer ...
487 * camel-text-index.c (text_index_sync): Sync the key tables
489 (text_index_sync): Debug out frag info.
490 (camel_text_index_dump): Added a (rather large, but optional) raw
491 dumping mode for debugging purposes.
493 * camel-partition-table.c (camel_key_table_finalise): Sync root
495 (camel_key_table_sync): New function, sync key table (root) explicitly.
496 (camel_partition_table_sync): Method to explicitly sync the
499 2002-04-02 Not Zed <NotZed@Ximian.com>
501 * camel-block-file.c (camel_block_file_free_block): Mark root
502 block dirty when we change it (this function isn't used yet
505 * camel-text-index.c (text_index_add_name_to_word): Touch the root
506 block when we modify the counts. Also, abort processing on any
508 (text_index_sync): Fix typo in comments. Sync the block file
510 (text_index_compress_nosync): Lock the old index while we're
512 (text_index_compress_nosync): Remove the bogus while() at the end
513 of the while() loops! Also plug a memleak - records weren't
515 (text_index_rename): Lock around rename op.
516 (text_index_add_name): More typos.
517 (text_index_sync): Touch root when changing it.
518 (text_index_add_name): "
519 (text_index_delete_name): "
520 (camel_text_index_new): Touch root if we change it.
521 (text_index_cursor_reset): Make sure we NULL pointers after we
522 free them (nothing uses this yet).
524 * camel-partition-table.c (hash_key): Remove some debug
525 accidentally left in.
526 (camel_partition_table_add): When linking in the next block list,
527 set the right previous pointer.
528 (camel_key_table_add): Simplify the 'left' calculation (it was
530 (camel_key_table_next): Initialise returns before processing.
531 Broaden the lock slightly, and simplify validity calculations.
533 * providers/imap/camel-imap-store.c (imap_keepalive): Put back in
534 the exception setup stuff i disabled for debugging.
536 * providers/local/camel-local-folder.c
537 (camel_local_folder_construct): Temporarily disable indexing.
539 2002-03-28 Not Zed <NotZed@Ximian.com>
541 * camel-partition-table.c (camel_key_table_lookup): Change range
542 checking assert to a warning.
544 * providers/pop3/camel-pop3-folder.c (pop3_finalize): Make sure we
545 flush out all outstanding commands before finalising, stops being
546 finalised while outsanding requests are processed by the store
548 (pop3_get_message): Instead of pre-fetching all messages, just
549 pre-fetch a maxiumum number at any one time, stops us running out
552 * providers/nntp/camel-nntp-folder.c (nntp_folder_init/finalise):
553 Setup priv data + locks, & free.
555 * providers/imap/camel-imap-folder.c (imap_rescan): Batch all
556 message_chagned events into a single folder_changed event
557 (otherwise updates can be >>> expensive, like >5 hours for 80K
558 messages changing!). Alternately it could use folder
559 freeze/unfreeze perhaps.
561 2002-03-27 Not Zed <NotZed@Ximian.com>
563 * providers/imap/camel-imap-store.c (imap_keepalive): Pass an
564 exception to called code so it behaves properly since it uses the
565 passed exception to check returns.
567 2002-04-01 Dan Winship <danw@ximian.com>
569 * providers/imap/Makefile.am (libcamelimap_la_LDFLAGS): Use
570 -avoid-version instead of -version-info 0:0:0, and specify
571 -module. (From Max Horn <max@quendi.de>).
573 * providers/local/Makefile.am (libcamellocal_la_LDFLAGS): Likewise.
575 * providers/nntp/Makefile.am (libcamelnntp_la_LDFLAGS): Likewise.
577 * providers/sendmail/Makefile.am (libcamelsendmail_la_LDFLAGS):
580 * providers/smtp/Makefile.am (libcamelsmtp_la_LDFLAGS): Likewise.
582 * providers/pop3/Makefile.am (libcamelpop3_la_LDFLAGS): Likewise.
583 Also remove $(KRB4_LDFLAGS) since KPOP is gone.
584 (INCLUDES): and $(KRB4_CFLAGS)
586 2002-03-28 Jeffrey Stedfast <fejj@ximian.com>
588 * camel-filter-driver.c (do_copy): We now have to check to make
589 sure that p->message is non-NULL because we only load the message
591 (do_move): Same here.
593 2002-03-28 Dan Winship <danw@ximian.com>
595 * camel-transport.c (camel_transport_send_to): Change the message
596 arg to a CamelMimeMessage instead of a CamelMedium. Even the NNTP
597 provider returns CamelMimeMessages, and we're never going to
598 support anything more exotic than that. Also do a few more
599 g_return_if_fails here instead of in the providers.
600 (camel_transport_can_send): No longer needed.
601 (camel_transport_send): Remove this too. It wasn't being used any
602 more, and it doesn't behave exactly the same in sendmail and smtp.
604 * providers/smtp/camel-smtp-transport.c (smtp_send,
605 smtp_can_send): Gone.
606 (smtp_send_to): Update for arg change.
607 (smtp_data): Make this take a CamelMimeMessage too.
609 * providers/sendmail/camel-sendmail-transport.c (sendmail_send,
610 sendmail_can_send): Gone.
611 (sendmail_send_to): Update for arg change, and merge in the part
612 that used to be shared with sendmail_send.
614 2002-03-27 Jeffrey Stedfast <fejj@ximian.com>
616 * camel-filter-driver.c (camel_filter_driver_filter_folder):
617 Construct the source_url the right way. The previous way was
618 generating urls like pop://fejj@ximian.com;keep_on_server/inbox
621 2002-03-26 Not Zed <NotZed@Ximian.com>
623 * camel-text-index.c (text_index_normalise): Changed to use just
624 g_utf8_strdown instead of utf8_normalise, to match the indexing
625 code. utf8_normalise is just far too expensive (saves approx 25%
628 2002-03-25 Not Zed <NotZed@Ximian.com>
630 * camel-text-index.c (text_index_add_name): When we add a new
631 name, up all of the cache limits, because we're probably going to
633 (text_index_sync): Drop the cache limits back down again, we dont
634 need them when looking words up.
636 ** MERGE camel_index branch.
638 * camel-text-index.[ch]: Added files i forgot to add (eep nearly
641 * camel-block-file.c (sync_nolock): Fix an infinite loop in syncing.
643 2002-03-21 Jeffrey Stedfast <fejj@ximian.com>
645 * camel-folder-summary.c (camel_message_info_new_from_header): Use
646 the date in the received header for the received_date.
648 2002-03-22 Not Zed <NotZed@Ximian.com>
650 * providers/local/camel-local-folder.c
651 (camel_local_folder_construct): Use the right option to remove the
652 index file and reset the index file on creation.
653 (camel_local_folder_construct): Remove any existing '.ibex' files
654 - these are the old format index files.
656 * camel-block-file.c (camel_block_file_rename): Lock io lock while
658 (camel_key_file_rename): Lock around rename.
659 (block_file_validate_root): Implement sync flag checking.
660 (camel_block_file_touch_block): Turn off the sync flag if we're
661 touching any non-root block and write it to disk. Shoudl this
663 (sync_nolock): sync the root block only if we need to.
665 * providers/local/camel-local-store.c (rename_folder): Re-enable
666 index rename code. Not sure how race-free it is though.
667 (delete_folder): Delete the index file properly.
669 * camel-partition-table.c (camel_key_table_lookup): Initialise
670 output values to 0 before doing anything.
671 (camel_key_table_add): Do some range-checking on values.
673 * camel-text-index.c (text_index_compress): Changed to call sync here.
674 (text_index_compress_nolock): and not here - stops a recursive
675 sync call when sync performs a compress also.
676 (text_index_compress_nolock): Change to _nosync, since the locking
677 is irrelevent (recursive lock). Fixed callers.
678 (text_index_add_name_to_word): If we get a failure with key table
679 ops, fail immediately.
680 (text_index_compress_nosync): Likewise.
681 (text_index_write_name): If the nameid is 0, do nothing.
682 (text_index_add_name): If we can't get a keyid, dont add it to the
684 (camel_text_index_remove): Function to delete an index file.
685 (text_index_compress_nosync): Clean up temp files when done.
687 * camel-folder-search.c (match_messages_index): New function,
688 split from body_contains, matches a regex against all words in an
690 (match_message_index): Similar to above but matches against an
692 (search_body_contains): Changed to use above functions for
693 matching - substring matches should now work on indexed data.
695 2002-03-21 Not Zed <NotZed@Ximian.com>
697 * camel-index.c (camel_index_words/names): New virtual
698 methods/stubs to get a cursor of all words and names.
700 * camel-text-index.c (text_index_compress_nolock): Split from
701 text_index_compress, so we can call the compressor while locked
702 also, removed lock calls.
703 (text_index_compress): Changed to stub which calls
704 text_index_compress_nolock.
705 (camel_text_index_key_cursor_new): New object to iterate through
707 (text_index_words, text_index_names): Implement virtual functions
708 for iterating through all words or names.
710 * camel-block-file.c: Turn off some debug.
712 2002-03-20 Not Zed <NotZed@Ximian.com>
714 ** New body index implementation.
716 * camel-index*: Code for camel index, a new class to replace ibex.
718 * camel-block-file.[ch]: block-based and link based
719 filesystem-in-a-file classes.
721 * camel-partition-table.[ch]: An implementation of a partition
722 table (automatically extending on-disk hash-table using ideal
723 hash), and a key-table, a key<>name mapping table. Used by
726 * providers/local/*, camel-folder-summary.[ch]: Changed to use
727 camel-index interface rather than ibex.
729 2002-03-05 Not Zed <NotZed@Ximian.com>
731 * providers/local/camel-maildir-summary.c (maildir_summary_check):
732 Do progress reporting of operations.
733 (maildir_summary_sync): Same here.
735 2002-03-04 Not Zed <NotZed@Ximian.com>
737 * providers/local/camel-spoold-store.c (scan_dir): Kill a warning
740 * providers/local/camel-*.c: Changed for ibex->camelindex.
742 * camel-folder-search.c (camel_folder_search_set_summary): Init
743 summary_hash to point to 'static' uid strings.
744 (search_body_contains): Use the static uid memory to return
745 results rather than the values from the index library.
747 * camel-folder-search.[ch]: Changed to use camelindex object.
749 * camel-folder-summary.c (summary_build_content_info_message):
750 Use a stream to index content, also filter html mail first.
751 (camel_folder_summary_info_new_from_message): Use a stream
752 filtered to index content.
753 (main): Removed the test main code. Added headers for open call
754 (ibex must've had them before).
756 * camel-folder-summary.[ch]: Changed from ibex to CamelIndex.
758 * camel-mime-filter-index.c (camel_mime_filter_index_finalize):
761 * camel-mime-filter-index.[ch]: Changed from ibex to CamelIndex.
763 2002-03-19 Jeffrey Stedfast <fejj@ximian.com>
765 * camel-mime-utils.c (header_encode_param): Fix this to work
766 right. We need to convert the input buffer to the charset we claim
767 in the encoded param (duh).
769 2002-03-18 Jeffrey Stedfast <fejj@ximian.com>
771 * providers/smtp/camel-smtp-transport.c
772 (connect_to_server_wrapper): Updated to use the same logic as the
775 * providers/pop3/camel-pop3-store.c (connect_to_server): No longer
776 takes a stls_supported argument since we no longer need it with
778 (connect_to_server_wrapper): New logic: First try connecting to
779 the SSL port (995 by default), if that fails with
780 SERVICE_UNAVAILABLE, then we attempt to connect (to port 110 by
781 default) and try to use STARTTLS.
783 2002-03-15 Jeffrey Stedfast <fejj@ximian.com>
787 * camel-private.h: Don't allow any empty structs. If
788 !ENABLE_THREADS, provide a gpointer dummy member. Fixes bug #6382.
790 2002-03-13 Jeffrey Stedfast <fejj@ximian.com>
792 * providers/smtp/camel-smtp-transport.c (smtp_auth): Added a
793 work-around for SMTP servers that can't read the RFCs and thus
794 implement SASL incorrectly. Oh well, that's life in the world of
795 mail clients I guess.
797 2002-03-12 Jeffrey Stedfast <fejj@ximian.com>
799 * camel-digest-store.c (camel_digest_store_new): Now takes a url
802 * camel-digest-folder.c (digest_add_multipart): Fixed some memory
803 corruption and also modified to use CAMEL_IS_MIME_MESSAGE() rather
804 than comparing content-type strings.
805 (digest_get_message): Fixed a logic blooper.
807 * camel-folder-summary.c (camel_message_info_new_from_header): Set
808 the date fields of the CamelMessageInfo as well. This may even fix
809 some filter-related bugs where the user was trying to compare
812 2002-03-11 Jeffrey Stedfast <fejj@ximian.com>
814 * camel-digest-store.c: A pretty empty store implementation to be
815 the parent store of a CamelDigestFolder.
817 * camel-digest-folder.c: Updated to reference it's parent store.
819 2002-03-11 Jeffrey Stedfast <fejj@ximian.com>
821 * camel-digest-folder.c (camel_digest_folder_new): Allow any leaf
822 part to be a message/rfc822 part.
823 (digest_get_uids): Recurse the mime structure and add all
824 message/rfc822 parts and use a uid scheme similar to IMAP's mime
825 part naming convention.
826 (digest_get_message): Decode the uid to get the correct mime part.
828 2002-03-11 Ettore Perazzoli <ettore@ximian.com>
830 * camel-mime-utils.c: Change the order of the mailing list magic
831 patterns so that the more mailing-list specific ones are on the
834 2002-03-11 Jeffrey Stedfast <fejj@ximian.com>
836 These fixes should fix bug #21737.
838 * providers/smtp/camel-smtp-transport.c
839 (connect_to_server_wrapper): Same as with the POP code.
841 * providers/pop3/camel-pop3-store.c (connect_to_server_wrapper):
842 Slight restructuring of the if-statements for the USE_SSL_ALWAYS
843 case so that we can't possibly return TRUE unless we really did
844 connect successfully.
846 2002-03-10 Dan Winship <danw@ximian.com>
848 Rename the OpenSSL implementation of things to match the NSS
849 implementation so that callers don't need to care which one is
852 * camel-tcp-stream-openssl.c: Implement CamelTcpStreamSSL, not
853 CamelTcpStreamOpenSSL. Rename methods as well. Replace the
854 camel-tcp-stream-openssl.h include with camel-tcp-stream-ssl.h.
856 * camel-tcp-stream-openssl.h: Gone.
858 * camel-tcp-stream-ssl.c: Add a note explaining that this
859 implementation is only used for NSS, and that OpenSSL's
860 implementation is in another file. (Should probably do some CVS
861 renaming magic at some point.)
863 * camel-http-stream.c (http_connect): Remove OpenSSL refs; the
864 previously-NSS-specific code works for both now.
866 * camel-remote-store.c: Likewise.
868 * providers/smtp/camel-smtp-transport.c: Likewise.
870 * providers/pop3/camel-pop3-store.c: Likewise.
872 * Makefile.am (libcamelinclude_HEADERS): Remove
873 camel-tcp-stream-openssl.h
875 2002-03-10 Dan Winship <danw@ximian.com>
877 * camel-tcp-stream.c (camel_tcp_stream_get_socket): Remove this:
878 it couldn't be generically used, because different subclasses
879 returned entirely different types of data.
880 (camel_tcp_stream_get_local_address,
881 camel_tcp_stream_get_remote_address): Add these to replace what
882 get_socket was being used for.
883 (camel_tcp_address_new, camel_tcp_address_free): Utility functions
884 for get_{local,remote}_address.
886 * providers/smtp/camel-smtp-transport.c: Change localaddr to a
888 (connect_to_server): Call camel_tcp_stream_get_local_address to
889 get the local IP address.
890 (smtp_disconnect): free localaddr.
891 (smtp_helo): Update for localaddr change.
893 * camel-tcp-stream-raw.c (stream_get_socket): Remove
894 (stream_get_local_address, stream_get_remote_address): Implement.
896 * camel-tcp-stream-ssl.c (stream_get_socket): Remove
897 (stream_get_local_address, stream_get_remote_address): Implement.
899 * camel-tcp-stream-openssl.c (stream_get_socket): Remove
900 (stream_get_local_address, stream_get_remote_address): Implement.
902 2002-03-08 Jeffrey Stedfast <fejj@ximian.com>
904 * providers/pop3/camel-pop3-provider.c
905 (camel_provider_module_init): Don't call
906 camel_remote_store_get_authtypes since we no longer subclass
909 * providers/pop3/camel-pop3-engine.c: Added STARTTLS to the
910 capabilities to look for.
911 (camel_pop3_engine_reget_capabilities): New function to re-get
914 * providers/pop3/camel-pop3-store.c: Updated to not subclass
916 (connect_to_server): Rewritten to not depend on CamelRemoteStore's
917 connect implementation. Also added support for STLS (aka
920 2002-03-07 Jeffrey Stedfast <fejj@ximian.com>
922 * camel-pgp-mime.c (camel_pgp_mime_part_sign): Add support for
925 * camel-cipher-context.h: Add RIPEMD160 hash type.
927 * camel-pgp-context.c (pgp_sign): Updated to consider hash
928 function for pgp5 and pgp6.
929 (pgp_clearsign): Same.
931 * camel-tcp-stream-openssl.c (stream_read): Add a timeout on the
933 (stream_write): Same.
935 2002-03-06 Jeffrey Stedfast <fejj@ximian.com>
937 * providers/smtp/camel-smtp-transport.c (connect_to_server): Fix
938 to work with OpenSSL.
940 * camel-tcp-stream-openssl.c: compile fixes.
941 (camel_tcp_stream_openssl_enable_ssl): Check to make sure that the
942 sockfd != -1, it's not enough to check that it is non-zero. Also
943 set the sockfd to -1 on fail (open_ssl_connection will close the
946 2002-03-06 Dan Winship <danw@ximian.com>
948 * providers/smtp/camel-smtp-transport.c (smtp_construct): Make
951 2002-03-05 Jeffrey Stedfast <fejj@ximian.com>
953 * camel-tcp-stream-ssl.c (save_ssl_cert): Removed. Glory glory
955 (ssl_bad_cert): No longer calls ssl_save_cert or
958 2002-03-05 Jeffrey Stedfast <fejj@ximian.com>
960 * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_new_raw):
961 Start the ssl stream off in non-ssl mode (useful for STARTTLS).
962 (camel_tcp_stream_openssl_enable_ssl): New function to toggle an
963 ssl stream into ssl mode.
964 (open_ssl_connection): Close the sockfd on fail so our caller
965 doesn't have to - this also allows us to save the original errno.
966 (stream_connect): If we want ssl mode, do our ssl stuff.
967 (camel_tcp_stream_openssl_class_init): Init some SSL stuff here
968 instead of in open_ssl_connection since these only ever need to be
970 (stream_read): Only use SSL_read if we are in ssl mode.
971 (stream_write): Only use SSL_write if we are in ssl mode.
973 * providers/smtp/camel-smtp-transport.c (smtp_helo): Check for the
975 (connect_to_server): Try to use STARTTLS whenever possible rather
976 than the old way of doing things.
977 (connect_to_server_wrapper): Wrapper around connect_to_server() to
978 first try STARTTLS and then attempt normal SSL mode if we can't
979 connect via STARTTLS.
981 * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_enable_ssl): New
982 function to toggle an ssl stream into ssl mode.
983 (camel_tcp_stream_ssl_new_raw): Start the ssl stream off in
984 non-ssl mode (useful for STARTTLS).
985 (stream_connect): Only connect in SSL mode if required.
987 2002-03-01 Jeffrey Stedfast <fejj@ximian.com>
989 * camel-vtrash-folder.h:
991 * camel-vee-folder.h:
992 * camel-stream-null.h:
993 * camel-stream-filter.h:
994 * camel-store-summary.h:
995 * camel-news-address.h:
996 * camel-mime-utils.h:
997 * camel-mime-parser.h:
998 * camel-mime-filter-save.h:
999 * camel-mime-filter-linewrap.h:
1000 * camel-mime-filter-index.h:
1001 * camel-mime-filter-html.h:
1002 * camel-mime-filter.h:
1003 * camel-mime-filter-from.h:
1004 * camel-mime-filter-crlf.h:
1005 * camel-mime-filter-chomp.h:
1006 * camel-mime-filter-charset.h:
1007 * camel-mime-filter-bestenc.h:
1008 * camel-mime-filter-basic.h:
1009 * camel-internet-address.h:
1010 * camel-folder-thread.h:
1011 * camel-folder-summary.h:
1012 * camel-folder-search.h:
1013 * camel-filter-driver.h:
1014 * camel-charset-map.h:
1015 * camel-address.h: Add c++ armoring.
1017 * camel-object.h: s/class/klass
1019 2002-03-01 Jeffrey Stedfast <fejj@ximian.com>
1021 * camel-mime-part-utils.c
1022 (camel_mime_part_construct_content_from_parser): Reverted my
1023 pgp/mime fixes here too.
1025 * camel-mime-part.c (write_to_stream): Removed my pgp/mime raw
1026 stream hack, this is causing problems such as some messages to not
1027 displaying, view->source not working at all, etc.
1029 2002-02-28 Jeffrey Stedfast <fejj@ximian.com>
1031 * camel-mime-parser.c: Changed offset variables from int's to
1032 off_t's since the system may support large files.
1034 * camel-mime-part-utils.c
1035 (camel_mime_part_construct_content_from_parser): Rearrange the
1036 save filter stuff so that we save raw streams for all mime
1037 parts. If the mime part turns out to be a multupart, then don't
1038 bother saving the raw stream, we only need to save the raw stream
1041 2002-02-27 Jeffrey Stedfast <fejj@ximian.com>
1043 * camel-folder-summary.h: Don't #include camel-mime-filter-save.h,
1046 * camel-file-utils.c: Fixed a few 'might be used uninitialized'
1047 warnings which were real problems.
1049 * camel-mime-part-utils.c
1050 (camel_mime_part_construct_content_from_parser): Save the raw mime
1051 stream for any/all signed parts.
1053 * camel-mime-part.c (camel_mime_part_init): Initialize our raw
1055 (camel_mime_part_finalize): Unref our raw stream, if we have one.
1056 (write_to_stream): If we have a raw stream, write that out instead
1059 * camel-mime-filter-save.[c,h]: Rewritten to save to a stream
1062 2002-02-28 Not Zed <NotZed@Ximian.com>
1064 * camel-mime-utils.c (header_fold): Use the FOLD_SIZE as a
1065 recommended folding size, but add a new FOLD_MAX_SIZE (=998, the
1066 smtp max line size) as the hard limit for any output.
1068 2002-02-27 Jeffrey Stedfast <fejj@ximian.com>
1070 * camel-mime-filter-chomp.c (camel_mime_filter_chomp_new): New
1071 stream filter that chomps excess trailing whitespace from the end
1072 of the stream. This is needed to update the PGP/MIME code to
1073 comply with rfc3156.
1075 * camel-pgp-mime.c (camel_pgp_mime_part_verify): Don't attach a
1076 from filter, if it ain't from-filtered already, then we'll just be
1077 breaking stuff. To become rfc3156 compliant, add a chomp filter
1079 (camel_pgp_mime_part_sign): Add a chomp filter here too.
1081 2002-02-27 Not Zed <NotZed@Ximian.com>
1083 * camel-mime-part.c (init_header_name_table): Changed header
1084 formatted table to contain a pointer to an output function, and
1085 added in-reply-to and references headers.
1086 (write_references): New function to write out references header,
1087 folded properly. It only approximates based on the last >, but it
1088 should be adequate and will also handle invalid headers.
1089 (write_fold): Function to write out headers folded. Since this is
1090 the default it isn't required.
1091 (write_raw): Write out an already formatted header, e.g. most of
1093 (write_to_stream): Lookup header output function, if we have one,
1094 use that, otherwise fold header using basic (dumb) function.
1096 This is all for #14779. A better fix is probably do have the
1097 headers always stored formatted, but that can wait.
1099 2002-02-25 Jeffrey Stedfast <fejj@ximian.com>
1101 * camel-digest-folder.c (camel_digest_folder_new): Allow all
1102 multiparts that contain message/rfc822 attachments.
1103 (digest_get_uids): Only assign uids to message parts.
1105 2002-02-22 Jeffrey Stedfast <fejj@ximian.com>
1107 * camel-mime-part.c (camel_mime_part_set_filename): Set the 'name'
1108 parameter on the Content-Type too. Fixes bug #20779.
1110 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
1112 * camel-pgp-context.c (pgp_sign): Pass --always-trust to gpg
1113 (requested by users).
1114 (pgp_clearsign): Same.
1115 (pgp_encrypt): Here too.
1117 2002-02-12 Jeffrey Stedfast <fejj@ximian.com>
1119 * providers/smtp/camel-smtp-transport.c (smtp_helo): Since the
1120 AUTH token sometimes uses '=' instead of whitespace, don't use
1121 smtp_token_next here.
1123 2002-02-09 Not Zed <NotZed@Ximian.com>
1125 * providers/pop3/camel-pop3-engine.c (get_capabilities): Duh, when
1126 we grab the apop stamp it needs to include the <> as well, I even
1127 read the rfc, silly me.
1129 * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): Doh,
1130 when iterating the authtype list, it helps to goto the next node.
1131 Found with help from miles.
1133 2002-02-08 Not Zed <NotZed@Ximian.com>
1135 * providers/local/camel-spool-summary.c
1136 (camel_spool_summary_build_from): The day number has to be 2 chars
1137 wide, space filled to work properly with pine, etc.
1139 * providers/local/camel-spoold-store.[ch]: new type of provider
1140 'spool directory', which lets you view external mbox dirs without
1141 adding any extra cruft. Perhaps it should use . files to store
1142 summaries? Still a bit experimental, there's a warning when you
1143 select it in the account editor. Finished off most of #1185.
1144 Can't rename or move folders.
1146 * camel-mime-utils.c (header_decode_date): If the date is
1147 100->1900 then we actually want to use it as the year in the tm
1148 struct, not year+100. e.g. year 102 -> 2002, not 2102.
1150 2002-02-07 Not Zed <NotZed@Ximian.com>
1152 * providers/local/camel-spool-store.c (get_folder): Pass path into
1155 * providers/local/camel-spool-folder.c (camel_spool_folder_new):
1156 (camel_spool_folder_construct): Take the full path to the folder
1157 and use that as the file path, independent of the full_name we
1160 2002-02-07 Not Zed <NotZed@Ximian.com>
1162 * providers/local/camel-local-provider.c: Added new type, spoold
1163 provider, spoold: for local directories.
1165 * providers/imap/camel-imap-store.c (get_one_folder_offline):
1166 Create offline uri's in a compatible manner to online ones.
1168 2002-02-07 Dan Winship <danw@ximian.com>
1170 * camel-sasl-ntlm.c: Implementation of NTLM (aka "Secure Password
1171 Authentication") auth, taken from soup.
1173 * Makefile.am (libcamel_la_SOURCES, libcamel_la_HEADERS): Add
1176 * camel-sasl.c: Add refs to camel-sasl-ntlm.
1178 * providers/imap/camel-imap-store.c (try_auth): Use
1179 imap_next_word() to skip over the "+ " of the continuation rather
1180 than just "resp + 2" since Exchange (incorrectly) returns "+"
1181 instead of "+ " for an empty continuation response.
1183 2002-02-06 Jeffrey Stedfast <fejj@ximian.com>
1185 * camel-folder-summary.h: Remove the CAMEL_MESSAGE_NEEDS_REPLY
1186 flag, we no longer will be using this.
1188 2002-02-04 Jeffrey Stedfast <fejj@ximian.com>
1190 * camel-http-stream.c (stream_read): Use camel_mime_parser_read to
1191 read internal parser data.
1192 (camel_http_stream_get_content_type): Implemented.
1193 (http_method_invoke): Use HTTP/1.0 instead of 1.1
1195 * camel-mime-utils.c (header_decode_int): Made public.
1197 * camel-http-stream.[c,h]: Added. New stream for HTTP requests
1198 (currently supported are GET and HEAD).
1200 * camel-tcp-stream-ssl.c (stream_connect): Call set_errno
1203 2002-01-31 Not Zed <NotZed@Ximian.com>
1205 * camel-mime-utils.c (header_decode_domain): Oops, this was
1206 converting foo@[blah] to foo@[ blah ], fixed.
1208 2002-01-30 Jeffrey Stedfast <fejj@ximian.com>
1210 * providers/pop3/camel-pop3-provider.c: Use "pop" instead of
1211 "pop3" so current configurations continue to work.
1213 2002-01-30 Not Zed <NotZed@Ximian.com>
1215 * camel-sasl-login.c: Changed name from "NT Login" to simply
1218 * providers/pop3/*: Entirely new pop implmentation, supporting
1221 2002-01-29 Not Zed <NotZed@Ximian.com>
1223 * camel-data-cache.c (free_busy): We dont want to unref the
1224 stream, instead, stop listening to the finalised events, and free
1227 2002-01-25 Not Zed <NotZed@Ximian.com>
1229 * camel-data-cache.c (stream_finalised): Remove the object from
1230 the busy_stream hashtable, not the busy_path hashtable.
1232 2002-01-29 Jeffrey Stedfast <fejj@ximian.com>
1234 * providers/imap/camel-imap-folder.c (imap_update_summary): Added
1235 more kludge to an existing Exchange IMAP 5.5 kludge to work around
1236 it returning multiple messages with the same UIDs.
1238 2002-01-28 Jeffrey Stedfast <fejj@ximian.com>
1240 * camel-mime-message.c (process_header): Handle Resent headers
1243 * camel-mime-message.h: Added Resent-* #defines.
1245 * camel-filter-driver.c (camel_filter_driver_remove_rule_by_name):
1246 Use while (node->next) instead of while (node)
1248 * providers/smtp/camel-smtp-transport.c (smtp_decode_status_code):
1249 New function to decode an enhanced status code.
1250 (smtp_set_exception): Sets an exception based on the
1251 Enhanced-Status-Code.
1252 (esmtp_get_authtypes): Don't diplicate the key in the hash since
1253 the key and value are the same.
1254 (smtp_rcpt): Include the failed recipient in the error message to
1255 be more helpful to the user.
1257 * camel-mime-utils.c (hex_decode): Make sure to allocate enough
1260 2002-01-28 Jeffrey Stedfast <fejj@ximian.com>
1262 * providers/smtp/camel-smtp-transport.c (smtp_construct):
1263 (connect_to_server): Use flags rather than a bunch of gboolean
1265 (smtp_connect): Same.
1266 (smtp_mail): Here too. Use the enhanced status codes if available.
1267 (smtp_data): And again here.
1268 (smtp_helo): Finally here. Also detect the ENHANCEDSTATUSCODES
1270 (smtp_rcpt): Use the enhanced status codes if available.
1271 (smtp_rset): Here too.
1272 (smtp_quit): And finally here.
1274 * camel-transport.h: Removed gboolean supports_8bit since this is
1275 pretty local to only SMTP for now.
1277 2002-01-24 Ettore Perazzoli <ettore@ximian.com>
1279 * Makefile.am: Remove some old cruft.
1281 2002-01-24 Ettore Perazzoli <ettore@ximian.com>
1283 * tests/folder/Makefile.am: s/MAILER_LIBS/EVOLUTION_MAIL_LIBS/.
1284 * tests/message/Makefile.am: Likewise.
1285 * tests/mime-filter/Makefile.am: Likewise.
1286 * tests/misc/Makefile.am: Likewise.
1287 * tests/smime/Makefile.am: Likewise.
1288 * tests/stream/Makefile.am: Likewise.
1290 2002-01-24 Jeffrey Stedfast <fejj@ximian.com>
1292 * camel-filter-driver.c (do_beep): Call the beep callback
1294 (camel_filter_driver_set_system_beep_func): New function to set
1297 2002-01-22 Jeffrey Stedfast <fejj@ximian.com>
1299 * camel-filter-driver.c (camel_filter_driver_remove_rule_by_name):
1300 New function to remove a filter rule by name.
1302 2002-01-21 Jeffrey Stedfast <fejj@ximian.com>
1304 * camel-filter-driver.c (do_beep): As a temporary solution, just
1305 printf ("\a"); to make a beep :-)
1307 * providers/imap/camel-imap-command.c
1308 (imap_command_strdup_vprintf): Encode the mailbox to UTF-7 here.
1310 * providers/imap/camel-imap-utils.c (imap_parse_list_response):
1311 Decode the mailbox name as we parse the list response.
1312 (imap_mailbox_decode): It's only an illegal mailbox name if it
1313 didn't switch back to US-ASCII mode.
1315 2002-01-18 Jeffrey Stedfast <fejj@ximian.com>
1317 * providers/imap/camel-imap-utils.c (imap_mailbox_decode): New
1318 function to decode an IMAP mailbox name from modified UTF-7
1320 (imap_mailbox_encode): New function to convert a mailbox name from
1321 UTF-8 to IMAP's modified UTF-7 encoding.
1323 2002-01-17 Jeffrey Stedfast <fejj@ximian.com>
1325 * camel-mime-filter-basic.c (filter): Stop uudecoding once the
1326 CAMEL_UUDECODE_STATE_END state bit gets set. Set the
1327 CAMEL_UUDECODE_STATE_BEGIN state bit once we find the begin line.
1328 (reset): No longer have uu_begin or uulen state variables, these
1329 are now stuffed into a single state variable.
1331 * camel-mime-utils.c (uudecode_step): No longer needs a uulen
1332 argument and also keeps track of whether or not the end of the
1333 encoded data has been found in 'state'.
1334 (uuencode_step): Now stuffs uulen into state so that the uulen
1335 argument is no longer needed.
1336 (uuencode_close): Same.
1338 2002-01-16 Jeffrey Stedfast <fejj@ximian.com>
1340 * camel-mime-filter-basic.c (filter): If we don't want to corrupt
1341 the uuencoded data by overwriting it with base64 decoded data
1342 afterward, we need to add a break statement!
1344 * camel-folder-summary.c (summary_build_content_info): Add code to
1346 (camel_folder_summary_finalize): Unref the uuencode filter.
1348 2002-01-16 Jeffrey Stedfast <fejj@ximian.com>
1350 * camel-mime-filter-basic.c (filter): Fixed slight logic error to
1351 find the uuencode begin line. Fixes bug #18754.
1353 2002-01-15 Jeffrey Stedfast <fejj@ximian.com>
1355 * providers/smtp/camel-smtp-transport.c (smtp_send_to): Updated to
1356 match the new send_to API.
1357 (smtp_send): Get the from address and pass that along to
1360 * providers/sendmail/camel-sendmail-transport.c
1361 (sendmail_send_to): Updated to match the new send_to API.
1363 * camel-transport.c (camel_transport_send_to): Now takes a from
1366 * providers/imap/camel-imap-folder.c (imap_update_summary): Sort
1367 the needheaders UID array and fixed to respect the
1368 UID_SET_LIMIT. This should now finish the fixification of bug
1369 #2529. There's still the possible issue that a command-line (The
1370 only command-line I can think of that can still be too long is a
1371 SEARCH command, but this can't possibly be fixed until we rewrite
1372 the imap code to use Zucchi's ImapEngine idea).
1374 2002-01-14 Jeffrey Stedfast <fejj@ximian.com>
1376 * providers/imap/camel-imap-folder.c (imap_expunge_uids_online):
1377 Move the command-lock outside the loop.
1379 2002-01-14 Jeffrey Stedfast <fejj@ximian.com>
1381 * providers/imap/camel-imap-folder.c (imap_expunge_uids_online):
1382 Updated to use the new imap_uid_array_to_set() interface.
1383 (imap_expunge_uids_resyncing): Same.
1384 (do_copy): Here too.
1385 (imap_update_summary): Added a FIXME comment to rewrite allowing
1386 for a uid-set limitation.
1387 (get_matching): Copy some of the logic over from
1388 imap_uid_adday_to_set() to limit the length of the uid-set string.
1389 (imap_sync_online): Added a comment to explain what is going on
1390 with get_matching() since the behavior has changed slightly.
1392 * providers/imap/camel-imap-utils.c (imap_uid_array_to_set):
1393 Modify the interface so that we can limit the size of the uid set
1396 2002-01-14 Not Zed <NotZed@Ximian.com>
1398 * providers/imap/camel-imap-search.c (imap_body_contains):
1399 Rewritten to use a cache for body searches when online. Will need
1400 some heavy testing but so far seems to be beneficial.
1402 * providers/imap/camel-imap-folder.c (imap_search_by_expression,
1403 search_by_uids): dont initialise search object here.
1404 (camel_imap_folder_new): Setup search object here with pointer to
1407 2001-12-01 Not Zed <NotZed@Ximian.com>
1409 * camel-store-summary.[ch]: New class to store a store's folder
1410 list in. Not yet completed.
1412 2002-01-11 Jeffrey Stedfast <fejj@ximian.com>
1414 * providers/imap/camel-imap-folder.c (imap_update_summary): Kludge
1415 around a bug in Exchange 5.5 that reports 2 messages with the same
1416 UID. Fixes bug #17694. Replaces the fix from yesterday.
1418 2002-01-10 Jeffrey Stedfast <fejj@ximian.com>
1420 * providers/local/camel-local-folder.c: If PATH_MAX doesn't exist,
1421 use _POSIX_PATH_MAX.
1423 * providers/imap/camel-imap-folder.c (imap_update_summary): If mi
1424 is NULL, don't bother updating it. Should fix bug #17694.
1426 2002-01-10 Jeffrey Stedfast <fejj@ximian.com>
1428 * camel.h: #include camel-mime-filter-tohtml.h
1430 * providers/imap/camel-imap-folder.c (imap_update_summary): Kludge
1431 around Microsoft Exchange 5.5 (bug #5348) by forgetting our
1432 currently selected folder and re-SELECTing it so that the Exchange
1433 server has a chance to realise it has new messages.
1435 2002-01-09 Jeffrey Stedfast <fejj@ximian.com>
1437 * providers/local/camel-local-folder.c
1438 (camel_local_folder_construct): If the mbox file is a symlink,
1439 follow the symlink and get the One True Path so that we can
1440 rewrite the mbox later without worrying about clobbering the
1443 2002-01-08 Jeffrey Stedfast <fejj@ximian.com>
1445 * camel-filter-search.c (TODO): There are a few sexp callbacks
1446 that could be modified to use fms->info rather than using a
1447 message object (like date and possibly mlist stuff) but *only* if
1448 the date exists on the CamelMessageInfo object (since it may be
1449 blank except for message flags).
1450 (camel_filter_search_get_message): New internal convenience
1451 function to make sure that the FilterMessageSearch has loaded the
1452 message (and to load the message if this isn't the case).
1453 (check_header): Call camel_filter_search_get_message().
1454 (header_exists): Same.
1455 (header_regex): Here too.
1456 (header_full_regex): And here.
1457 (body_contains): Again here.
1458 (body_regex): Here too.
1459 (get_sent_date): Here also.
1460 (get_received_date): Same.
1461 (get_source): Here if we need to.
1462 (camel_filter_search_match): Now takes a callback function/data
1463 pair for on-demand message loading so that we don't necessarily
1464 have to load the message if the defined filter rules don't require
1467 * camel-filter-driver.c (camel_filter_driver_filter_folder): Don't
1468 bother fetching the message here, let
1469 camel_filter_driver_filter_message() worry about this.
1470 (get_message_cb): New utility callback to fetch a message.
1471 (camel_filter_driver_filter_message): Only fetch the message if we
1472 absolutely need it to get a CamelMessageInfo. Instead of passing a
1473 message object to camel_filter_search_match(), pass get_message_cb
1474 and some user_data so that the matching code can fetch the message
1477 2002-01-07 Jeffrey Stedfast <fejj@ximian.com>
1479 * camel-folder.c (filter_filter): Flush the only-once actions.
1481 * camel-filter-driver.c (camel_filter_driver_filter_message):
1482 Don't increment a filtered_count here any longer.
1483 (camel_filter_driver_reset_filtered_count): Removed.
1484 (camel_filter_driver_get_filtered_count): Removed.
1485 (do_beep): New action.
1486 (play_sound): New action to play a sound
1487 (do_only_once): Another new action.
1488 (camel_filter_driver_finalise): Free the only_once hash if the
1489 driver has not been "flushed".
1490 (camel_filter_driver_flush): Flush all of the only-once actions.
1492 * camel-charset-map.c: Moved windows-1251 to the end of the list
1493 since it contains the euro and we'd prefer to use iso-8859-15 when
1494 the euro is requested than a windows charset if possible.
1496 * camel-charset-map-private.h: Regenerated.
1498 2001-12-12 Jeffrey Stedfast <fejj@ximian.com>
1500 * camel-folder-summary.c (content_info_load): Don't try setting a
1501 content-type parameter if either the name or value is NULL.
1503 * camel-mime-utils.c (header_set_param): NULL-protection.
1505 2002-01-02 Jeffrey Stedfast <fejj@ximian.com>
1507 * camel-tcp-stream-ssl.c (ssl_bad_cert): Do more like what mutt
1508 does so hopefully this'll fix bug #16363 and #16300.
1510 2001-12-21 Jeffrey Stedfast <fejj@ximian.com>
1512 * broken-date-parser.c (parse_broken_date): Completely
1513 rewritten. It is now a load faster and a heck of a lot more
1514 accurate, also now returns a time_t and sets the saveoffset
1515 variable rather than returning a new char* buffer for the normal
1516 camel date parser to re-parse. This saves a fair number of cpu
1519 * camel-mime-utils.c (header_decode_date): Cleanup the broken date
1522 2001-12-20 Jeffrey Stedfast <fejj@ximian.com>
1524 * camel-address.h: Change the prototype for camel_address_get_type
1525 to return a CamelType (since internally this is what it returns
1526 and also in case we decide to write a replacement for the current
1527 CamelObject it'd be easier to drop in).
1529 * camel-internet-address.h: Same but for
1530 camel_internet_address_get_type()
1532 * providers/smtp/camel-smtp-transport.c (smtp_send_to): Updated to
1533 use a CamelAddress of recipients.
1534 (smtp_send): Since smtp_send_to now takes a CamelAddress
1535 recipients argument, our lives have been simplified and we can now
1536 just concat To/Cc/Bcc into a recipients addr and send away.
1538 * providers/sendmail/camel-sendmail-transport.c
1539 (sendmail_send_to): Updated to use a CamelAddress of recipients.
1541 * camel-transport.c (camel_transport_send_to): Now takes a
1542 CamelAddress argument for the recipient list rather than a GList.
1544 2001-12-19 Jeffrey Stedfast <fejj@ximian.com>
1546 * providers/smtp/Makefile.am: Remove the providerdir variable.
1548 * providers/sendmail/Makefile.am: Same.
1550 2001-12-17 Jeffrey Stedfast <fejj@ximian.com>
1552 * camel-charset-map.c (camel_charset_iso_to_windows): New function
1553 to map ISO charsets to the Windows charsets.
1555 * camel-mime-part-utils.c (broken_windows_charset): Detect Windows
1557 (simple_data_wrapper_construct_from_parser): Simplify a tad and
1558 also check for iso-8859-* charsets that are really Windows
1559 charsets. Fixes bug #12631.
1561 2001-12-17 Dan Winship <danw@ximian.com>
1563 * Makefile.am (INCLUDES): define CAMEL_PROVIDERDIR to be the
1564 configure.in-defined camel_providerdir.
1566 * providers/Makefile.am: Remove some outdated comments
1568 * providers/imap/Makefile.am (camel_provider_LTLIBRARIES,
1569 camel_provider_DATA): renamed from provider_LTLIBRARIES,
1572 * providers/local/Makefile.am: Likewise
1574 * providers/nntp/Makefile.am: Likewise
1576 * providers/pop3/Makefile.am: Likewise
1578 * providers/sendmail/Makefile.am: Likewise
1580 * providers/smtp/Makefile.am: Likewise
1582 2001-12-16 Jeffrey Stedfast <fejj@ximian.com>
1584 * providers/imap/camel-imap-folder.c (get_content): Reverted my
1585 previous changes here since it doesn't actually work afterall.
1587 * providers/imap/camel-imap-wrapper.c (imap_wrapper_hydrate):
1588 Update to do uudecoding when appropriate.
1590 2001-12-16 Jeffrey Stedfast <fejj@ximian.com>
1592 * providers/imap/camel-imap-folder.c (get_content): Try to use the
1593 original boundary so luis will stop bugging me about "data
1594 corruption". Also preserve other params in the multipart
1595 content-type by dumping it to a string and setting it on the mime
1598 2001-12-14 Jeffrey Stedfast <fejj@ximian.com>
1600 * camel-filter-driver.c
1601 (camel_filter_driver_reset_filtered_count): Reset the
1602 filtered_count to zero.
1603 (camel_filter_driver_get_filtered_count): Return the private
1604 filtered_count value.
1605 (camel_filter_driver_filter_message): Increment the
1607 (camel_filter_driver_set_shell_exec_func): New function to set the
1609 (shell_exec): New ESExp filter action callback.
1611 2001-12-14 Jeffrey Stedfast <fejj@ximian.com>
1613 * camel-pgp-mime.c (camel_pgp_mime_part_verify): Removed
1614 x-inline-pgp-hack kludge because it doesn't work.
1615 (camel_pgp_mime_part_decrypt): Same.
1617 2001-12-13 Chris Toshok <toshok@ximian.com>
1619 * camel-data-cache.c: include stdlib.h (for alloca on freebsd) and
1620 only include alloca.h if HAVE_ALLOCA_H is defined.
1622 2001-12-11 Zbigniew Chyla <cyba@gnome.pl>
1626 * camel-charset-map.c: Added #include <errno.h>.
1628 * camel-charset-map-private.h:
1629 Recreated (following instructions from camel-charset-map.c)
1631 2001-12-11 Jeffrey Stedfast <fejj@ximian.com>
1633 * camel-object.c (camel_type_register): Keep a name-to-type hash
1634 so that we can make sure that the type has not yet been registered
1635 (prevents a race condition such as the one in bug #16559).
1637 * camel-service.c (camel_service_connect): Make sure that the
1638 connect_op is non-NULL before unregistering/unreffing it.
1640 2001-12-04 Jeffrey Stedfast <fejj@ximian.com>
1642 * camel-mime-utils.c (header_content_type_simple): Protect against
1643 either of the types being NULL.
1645 2001-12-05 Jeffrey Stedfast <fejj@ximian.com>
1647 * camel-mime-filter-basic.c (filter): If complete() allocates
1648 len+2 bytes for the out buffer, so should this. See bug #16371 for
1651 2001-12-05 Jeffrey Stedfast <fejj@ximian.com>
1653 * camel-sasl-digest-md5.c: iconv() returns a size_t, not an int.
1655 * camel-pgp-context.c: The return value of iconv() is a size_t,
1658 * camel-mime-part-utils.c (convert_buffer): Always use size_t args
1661 * camel-mime-filter-charset.c (complete): Always use size_t args
1665 * camel-mime-utils.c (header_address_fold): Make headerlen a
1666 size_t instead of an int.
1667 (header_fold): Same.
1668 (base64_encode_close): We should be returning a size_t and inlen
1669 should also be a size_t.
1670 (base64_encode_step): Same here.
1671 (base64_decode_step): Here too.
1672 (base64_encode_simple): And here...
1673 (base64_decode_simple): Same.
1674 (uuencode_close): We should also use size_t's here...
1675 (uuencode_step): And here too.
1676 (uudecode_step): And also here.
1677 (quoted_encode_close): Same idea here.
1678 (quoted_encode_step): Again here.
1679 (quoted_decode_step): Here too.
1680 (quoted_encode): Input length should be a size_t.
1681 (rfc2047_decode_word): Same.
1682 (g_string_append_len): Here too.
1684 (rfc2047_encode_word): "
1687 (rfc2184_decode): Use size_t's with iconv().
1688 (header_decode_param): Same.
1690 2001-12-09 Jon Trowbridge <trow@ximian.com>
1692 * camel-folder-summary.c: Add "NeedsReply" to the flag_names array
1693 for CAMEL_MESSAGE_NEEDS_REPLY.
1695 * camel-folder-summary.h: Added CAMEL_MESSAGE_NEEDS_REPLY flag.
1697 2001-12-07 Dan Winship <danw@ximian.com>
1699 * camel-mime-message.c (camel_mime_message_set_date): Fix the
1700 tm_gmtoff case (its sign is the opposite of "timezone"). Fixes
1703 2001-11-29 Jeffrey Stedfast <fejj@ximian.com>
1705 * camel-folder-search.c (search_body_contains): Don't use regex
1706 matching. Fixes bug #16227.
1708 * camel-mime-message.c (best_encoding): Check the content-object's
1709 mime type, not the mime part types. Should fix bug #15843.
1711 2001-11-27 Jeffrey Stedfast <fejj@ximian.com>
1713 * providers/imap/camel-imap-folder.c (get_content): Return NULL if
1714 construct_from_stream fails.
1715 (get_message): Same.
1716 (get_message_simple): Here too.
1717 (add_message_from_data): And here.
1719 2001-11-14 <NotZed@Ximian.com>
1721 * camel-vee-folder.c (folder_changed_remove_uid): Use the uid
1722 rather than vuid for unmatched. Also add the uid to unmatched if
1723 it wasn't in the unmatched_uids table at all.
1724 (folder_changed_change): If checking for added, if the new ones
1725 dont match, then try to add them to unmatched. Fixes #6893.
1727 * camel-folder-summary.c (camel_folder_summary_index): Change lock
1728 order, always summary_lock before ref_lock.
1729 (camel_folder_summary_array): "
1730 (camel_folder_summary_uid): "
1731 (camel_folder_summary_remove_uid): " Fixes a deadlock.
1733 2001-11-30 Not Zed <NotZed@Ximian.com>
1735 * providers/nntp/camel-nntp-*.c: Completely new implementation of
1738 Doesn't support subscriptions yet (lists all folders), but should
1739 be more reliable (faster?), and has an integrated cache.
1741 * camel-exception.c (camel_exception_new): Use e_memchunks for
1743 (camel_exception_free): Same.
1745 * camel-data-cache.[ch]: New object for managing on-disk caches of
1746 anything that can be stored in a camel-stream.
1748 * camel-file-utils.c (camel_file_util_mkdir): New function, just a
1749 nicer place to put this (than camel-store), should be removed from
1751 (camel_file_util_safe_filename): New function to url-encode a
1754 * camel-mime-parser.c (drop_states): New func to drop the parser
1755 state to initial state.
1756 (folder_scan_init_with_fd):
1757 (folder_scan_init_with_stream): Call above func to reset state if
1758 the stream is changed on us so we can change streams to reuse a
1761 2001-11-25 Not Zed <NotZed@Ximian.com>
1763 * providers/nntp/camel-nntp-folder.c (nntp_folder_get_message): If
1764 the uid doesn't have a ',' in it, fail to crash.
1766 * providers/nntp/camel-nntp-newsrc.c
1767 (camel_nntp_newsrc_article_is_read): check group != NULL before
1769 (camel_nntp_newsrc_get_highest_article_read): "
1770 (camel_nntp_newsrc_get_num_articles_read): "
1771 (camel_nntp_newsrc_mark_range_read): "
1773 * providers/nntp/camel-nntp-store.c
1774 (camel_nntp_store_get_overview_fmt): IF we dont have
1775 nntp_list_follows, dont try and get a list response.
1776 (nntp_store_get_folder_info): Set path part of folderinfo.
1778 2001-11-20 Jeffrey Stedfast <fejj@ximian.com>
1780 * providers/smtp/camel-smtp-transport.c (get_smtp_error_string):
1781 Check to see that errno is non-zero before returning
1782 g_strerror. If it's 0, then we have an unknown error.
1784 2001-11-26 Jeffrey Stedfast <fejj@ximian.com>
1786 * camel-mime-filter-basic.c: For the uudecoding mode, garble up
1787 the "begin <mode> <filename>" line before decoding.
1789 * camel-mime-part-utils.c
1790 (simple_data_wrapper_construct_from_parser): Add a uudecoder if
1791 the transfer encoding is x-uuencode.
1793 * camel-mime-part.c (write_to_stream): Handle x-uuencoded content
1796 2001-11-19 Jeffrey Stedfast <fejj@ximian.com>
1798 * camel-tcp-stream-ssl.c (stream_read): Added a check to see if
1799 the operation has been cancelled.
1800 (stream_write): Same.
1802 2001-11-19 Jeffrey Stedfast <fejj@ximian.com>
1804 Updates for compliance with rfc2231
1806 * camel-mime-utils.c (header_encode_param):
1807 camel_mime_special_table[c] & IS_ESAFE should have been
1808 !(camel_mime_special_table[c] & IS_ESAFE). Also added a few
1809 comments for how to improve the code at some future date.
1810 (header_decode_param): Now takes an argument rfc2184_part so our
1811 caller can get this information as well.
1812 (header_decode_param_list): Pass an rfc2184_part argument to
1813 header_decode_param and also added a few comments on where to
1814 improve on rfc2184/rfc2231 compliance.
1815 (rfc2047_decode_word): Updated to respect the updated ABNF syntax
1816 of rfc2047 encoded words, yay.
1818 2001-11-16 Jeffrey Stedfast <fejj@ximian.com>
1820 * providers/imap/camel-imap-utils.c (imap_parse_body): Abort if
1823 * camel-mime-filter-tohtml.c (camel_mime_filter_tohtml_new): New
1824 mime filter to convert plain text to html.
1826 2001-11-16 Jeffrey Stedfast <fejj@ximian.com>
1828 Since some mail clients like Outlook are broken, we need to set a
1829 name parameter on pgp signed and encrypted parts.
1831 * camel-pgp-mime.c (camel_pgp_mime_part_encrypt): Set a name
1833 (camel_pgp_mime_part_sign): Same.
1835 2001-11-14 Jeffrey Stedfast <fejj@ximian.com>
1837 * providers/imap/camel-imap-command.c
1838 (camel_imap_command_response): If we get a BYE response, call
1839 camel_service_disconnect() and set an exception. Also do the check
1840 for "* BYE" first instead of passing it off imap_read_untagged()
1841 since we'll just waste time in there mallocing left and right only
1842 to arrive at the single response line "* BYE" again :-)
1844 2001-11-13 <NotZed@Ximian.com>
1846 * camel-filter-search.c (get_source): If we have no source string,
1847 then use undefined, which should always evaluate to FALSE. Fix
1850 2001-11-12 Jeffrey Stedfast <fejj@ximian.com>
1852 * camel-store.c (camel_store_get_folder): Added a
1853 g_return_val_if_fail for folder_name != NULL.
1855 2001-11-08 Jeffrey Stedfast <fejj@ximian.com>
1857 * camel-pgp-context.c (crypto_exec_with_passwd): If any of the
1858 pipe()'s fail, clean up any pipes that may have succeeded. Also
1859 close the password fds.
1861 2001-11-09 <NotZed@Ximian.com>
1863 * providers/imap/camel-imap-store.c (imap_auth_loop): If we get a
1864 user cancel and that causes us to fail to authenticate, abort
1865 rather than loop forever. Fix for #14951.
1867 2001-11-06 Jeffrey Stedfast <fejj@ximian.com>
1869 * providers/imap/camel-imap-command.c
1870 (camel_imap_command_continuation): Now takes a command-length
1871 argument so we can 1) avoid duping the command string yet again,
1872 yay. 2) we now don't have to worry about embedded nul-chars
1873 screwing us over (we still need to avoid allowing them into the
1874 string but at least now it won't mess us up).
1876 * providers/imap/camel-imap-folder.c (do_append): Instead of
1877 appending a nul char to the end of the byte array and then passing
1878 that off as if it were a string to
1879 camel_imap_command_continuation, instead pass the byte-array
1880 length since that function now takes a length argument. Yay. Also
1881 encode any 8bit parts to avoid the possibility of sending embedded
1882 nul chars to the imap server.
1884 * providers/imap/camel-imap-store.c (try_auth): Updated to pass a
1885 command-length argument to camel_imap_command_continuation().
1887 2001-11-07 Jeffrey Stedfast <fejj@ximian.com>
1889 * camel-tcp-stream-ssl.c (save_ssl_cert): Oops, pass a mode
1890 argument to the open() call.
1892 * camel-tcp-stream-openssl.c (save_ssl_cert): Oops, pass a mode
1893 argument to the open() call.
1895 2001-11-07 Jeffrey Stedfast <fejj@ximian.com>
1897 * camel-pgp-mime.c (camel_pgp_mime_part_decrypt): Add code to
1898 kludge around any x-inline-pgp-hacks by prepending some content
1899 headers to the decrypted data.
1901 2001-11-02 Jeffrey Stedfast <fejj@ximian.com>
1903 * camel-data-wrapper.c (camel_data_wrapper_init): Initialize our
1905 (camel_data_wrapper_finalize): Destroy our private mutex.
1906 (write_to_stream): Lock around camel_stream_write_to_stream() so
1907 that we don't get 2 threads trying to read from our stream at the
1910 2001-11-01 <NotZed@Ximian.com>
1912 * camel-vee-folder.c (folder_changed_change): Move all searching
1913 operations outside of any locks except subfolder lock, same as
1914 build_folder. Fix for #14294.
1916 2001-10-31 <NotZed@Ximian.com>
1918 * providers/local/camel-spool-folder.c (spool_get_message): Same
1921 * providers/local/camel-maildir-folder.c (maildir_get_message):
1924 * providers/local/camel-mbox-folder.c (mbox_get_message): Set
1925 USER_CANCEL if failed due to EINTR.
1927 * camel-filter-driver.c (camel_filter_driver_filter_mbox): If
1928 construct from parser fails due to user cancel, set USER_CANCEL on
1931 * camel-mime-part.c (construct_from_parser): Return error if the
1932 parser had an io error.
1934 * camel-mime-message.c (construct_from_parser): Check error on
1935 parser/return error.
1937 * camel-mime-parser.c (folder_scan_init): Init error number.
1938 (camel_mime_parser_errno): New function, return errno of any io
1940 (folder_read): Set errno if a failure occured.
1941 (folder_seek): Same.
1942 (folder_scan_init_with_fd): Setup errno depeding on ok/failure.
1943 (folder_scan_init_with_stream): Same.
1945 2001-10-30 <NotZed@Ximian.com>
1947 * camel-operation.c (camel_operation_new): Dont setup cancel_fd.
1948 (camel_operation_cancel_fd): If cancel_fd not created, set it up.
1949 (camel_operation_cancel): Set cancel flag before sending message.
1950 (cancel_thread): Same.
1952 * camel-filter-driver.c (camel_filter_driver_filter_mbox): Make
1953 sure we unref the mimeparse when we're done (successfully). This
1954 was leaking an fd every get-mail! :(
1956 * camel-lock-client.c (camel_lock_helper_init): Close all fd's
1959 * providers/local/camel-mbox-folder.c (mbox_get_message): Remove
1960 the X-Evolution header before anyone else gets to see this private
1961 thing. Shoudl fix 11676 since we were inheriting flags from
1962 X-Evolution headers we didn't want to.
1964 * camel-folder-search.c (match_message): If we can't retrieve the
1965 message, ignore it, it can't match.
1967 * providers/imap/camel-imap-search.c
1968 (camel_imap_search_class_init): Setup parent class pointer.
1969 (imap_body_contains): If offline, just use the parent
1970 body_contains method which will get the messages and search them
1973 * providers/imap/camel-imap-folder.c (imap_search_by_expression,
1974 imap_search_by_uids): Remove offline check.
1976 2001-10-30 Dan Winship <danw@ximian.com>
1978 * camel-mime-part.c (free_headers): Fix this to match get_headers.
1980 2001-10-30 <NotZed@Ximian.com>
1982 * providers/local/camel-local-store.c (rename_folder): Dont try to
1983 move ibex if we have none.
1985 * camel-tcp-stream-openssl.c (stream_write): Fixed compilation
1988 2001-10-29 Jeffrey Stedfast <fejj@ximian.com>
1990 * camel-mime-utils.c (camel_mime_utils_init): Removed unused
1993 2001-10-30 <NotZed@Ximian.com>
1995 * camel-mime-utils.c (header_decode_mailbox): w(x) out some warnings.
1997 * providers/local/camel-local-summary.c
1998 (camel_local_summary_load): Remove the warning about not loading
1999 summary file - its a valid case for new folders.
2001 2001-10-29 Jeffrey Stedfast <fejj@ximian.com>
2003 * camel-tcp-stream-openssl.c (my_SSL_write): Removed.
2004 (stream_write): Keep looping (non-blocking case) if errno is
2005 EAGAIN, EINTR or EWOULDBLOCK. For NONBLOCKing I/O, sync up with
2006 CamelTcpStreamRaw. As with CamelTcpStreamRaw/SSL - make sure to
2007 write out everything before returning.
2008 (my_SSL_read): Removed.
2009 (stream_read): Just call ssl_error_to_errno() and check the errno
2010 values that we care about so we can keep the general look of all
2011 this stream code the same. Also when checking the return value of
2012 SSL_read, check for <0 instead of ==-1 since the man page for
2013 SSL_read doesn't say it will return -1 on fail, it just says <0.
2014 (stream_flush): Don't fsync() since syncing on a socket is a Bad
2017 * camel-tcp-stream-ssl.c (stream_write): Make sure we write out
2018 everything just like in camel-tcp-stream-raw.c.
2020 * camel-stream-buffer.c (camel_stream_buffer_gets): If
2021 camel_stream_read() returns -1, don't necessarily return -1 to our
2022 caller since it's possible that we did actually "read" some data
2023 (ie, we copied some pre-buffered data into the out buffer).
2025 * camel-stream-buffer.h: Removed CAMEL_STREAM_BUFFER_NEWLINE since
2026 it never got used anywhere and it isn't supported anyway.
2028 2001-10-30 <NotZed@Ximian.com>
2030 * providers/imap/camel-imap-store.c
2031 (parse_list_response_as_folder_info): If we get an empty name,
2032 then mark that as NoSelect. Workaround fix for #13239.
2034 2001-10-29 Dan Winship <danw@ximian.com>
2036 * providers/imap/camel-imap-folder.c (get_message_simple,
2037 imap_get_message): Set an X-Evolution-Source header on the
2038 returned message so replies come from the right identity.
2040 2001-10-29 <NotZed@Ximian.com>
2042 * camel-vee-folder.c (folder_changed_change): If we're not going
2043 to search on a changed uid, make sure we change out copy still.
2046 2001-10-29 Jeffrey Stedfast <fejj@ximian.com>
2048 * providers/imap/camel-imap-store.c (subscribe_folder): Don't emit
2049 a folder_subscribed signal if we are in the process of renaming
2051 (unsubscribe_folder): Same here but for the unsubscribe signal.
2052 (rename_folder): Unsubscribe from the folder being renamed and any
2053 subfolders it may have before actually renaming. Once the folder
2054 has been renamed, re-subscribe to it and it's subfolders with the
2057 * camel-store.c (camel_folder_info_build): Sort the folder info's
2058 before constructing the tree.
2060 * camel-mime-utils.c (header_decode_param): Minor fix - should
2061 have been using a strNcmp when checking if it was an rfc2047
2064 * camel-pgp-context.c (pgp_sign): Notify the user that PGP 2.6.x
2065 is no longer supported and use camel_exception_set() instead of
2066 setv() where appropriate.
2067 (pgp_clearsign): Same.
2068 (pgp_verify): And again here.
2069 (pgp_encrypt): Here too.
2070 (pgp_decrypt): And finally here.
2072 2001-10-29 Dan Winship <danw@ximian.com>
2074 * providers/imap/camel-imap-store.c (unsubscribe_folder): Don't
2075 free the hash table key if the folder wasn't found in the hash
2076 table. I'm not sure where the bug is/was that made it possible to
2077 add a folder to the tree after creating it failed, but now if that
2078 happens, it won't crash if you try to delete it again. (#11492)
2080 * camel-disco-store.c (camel_disco_store_status): if the service
2081 is being connected and thinks it's online, but the session is
2082 offline, then mark the service offline as well. Fixes 13683.
2084 2001-10-29 <NotZed@Ximian.com>
2086 * camel-mime-utils.c: Turn off w() -> warnings.
2088 * providers/imap/camel-imap-store.c (rename_folder): Also rename
2090 (rename_folder): Fix subscribed folders table with rename(s).
2092 * providers/imap/camel-imap-folder.c (imap_rename): Implement,
2093 rename the cache dir pointer.
2095 * providers/imap/camel-imap-message-cache.c
2096 (camel_imap_message_cache_set_path): New method to set the path
2097 used by a message cache.
2099 * camel-vee-store.c (build_info): Fix the 'is this a matching
2100 subfolder or subfolder' logic to match camel-store
2103 * camel-store.c (get_subfolders): Fix the 'is this a matching
2104 folder or subfolder' logic.
2106 2001-10-28 <NotZed@Ximian.com>
2108 * providers/local/camel-local-store.c (rename_folder): Changed to
2109 call ibex_move to rename it internally.
2111 * camel-store.c (camel_store_rename_folder): Use the right
2114 2001-10-28 Jeffrey Stedfast <fejj@ximian.com>
2116 * camel-stream-buffer.c (camel_stream_buffer_read_line): Make sure
2117 we've actually read data before checking if p[-] is '\r' or not.
2119 * camel-tcp-stream-raw.c (stream_write): Same.
2121 * camel-stream-fs.c (stream_write): If errno isn't EAGAIN, just
2122 exit with -1 and instead of using continue (which doesn't go to
2123 the top of the do-while thus making our logic suck), just set w to
2124 0. Still seems to be a bug in select() if it's telling us the
2125 socket is ready for data when it really isn't but oh well.
2127 2001-10-28 <NotZed@Ximian.com>
2129 * providers/local/camel-local-folder.c
2130 (camel_local_folder_construct): Use path not protocol as the path
2131 part of the uri of the folder_created event.
2133 * providers/local/camel-maildir-store.c (scan_dir): If FAST is
2134 set, dont try and scan for unread counts.
2136 * providers/local/camel-local-store.c (create_folder): Implement,
2137 just return the folderinfo of the folder matched, not all of it.
2139 * camel-store.c (camel_store_rename_folder): Rename the
2140 camelfolders before emitting the folderchanged event (otherwise
2141 vstore fails to pick up change.
2143 2001-10-27 <NotZed@Ximian.com>
2145 * camel-store.c (camel_store_init): Always use a default dir_sep
2148 * camel-store.h (struct _CamelStore): Added a dir_sep to the base
2149 store so rename and whatnot can work, temporary fix for mixed dir
2150 separator in folder name api's.
2152 * providers/imap/camel-imap-store.c (rename_folder): Finished
2154 (imap_connect_online): Also set the store's dir_sep here.
2155 (imap_connect_offline): "
2157 * providers/local/camel-local-folder.c (local_rename): Implement
2158 local rename of folder objects.
2160 2001-10-26 <NotZed@Ximian.com>
2162 * camel-vee-folder.c (camel_vee_folder_class_init): Hook into
2164 (vee_rename): Implement the veefolder rename function.
2165 (camel_vee_folder_class_init):
2166 (folder_changed_change): Kill a warning with a cast.
2168 * camel-vee-store.c (vee_rename_folder): Emit a folder_renamed
2169 event properly, also call parent to do some rename stuff.
2171 * camel-store.h: Added a CamelRenameInfo for the rename event.
2173 * camel-folder.c (camel_folder_rename): New function to rename a
2175 (camel_folder_class_init): Added a renamed event.
2176 (folder_rename): Default impl, set full_name, and set name
2177 assuming the dir separator is '/'.
2179 * camel-store.c (camel_store_class_init): Added folder_renamed
2181 (camel_store_rename_folder): Rename an active folder object if we
2182 have one, and update the folder table.
2183 (rename_folder): Make a default implementation that handles
2184 updating the folder tree.
2186 2001-10-26 Jeffrey Stedfast <fejj@ximian.com>
2188 * providers/imap/camel-imap-store.c (delete_folder): Don't bother
2189 checking ex since we can rely on the response being NULL on error.
2190 (rename_folder): Implemented.
2192 2001-10-26 Jeffrey Stedfast <fejj@ximian.com>
2194 * providers/imap/camel-imap-folder.c (imap_get_message): Check to
2195 make sure that the dataset is non-NULL before using and/or
2198 * camel-tcp-stream-raw.c (stream_write): Check for EWOULDBLOCK
2200 (stream_read): Same.
2201 (stream_flush): Return 0 always, fsync() and tcp sockets don't
2204 * providers/imap/camel-imap-message-cache.c
2205 (camel_imap_message_cache_get): Lets try putting a
2206 camel_stream_reset() here. Logic being that the stream may have
2207 been read from since it was cached and thus our caller may try
2208 reading from it and get no data from it since it is already at the
2209 EOS. This may fix bug #12943.
2211 2001-10-25 <NotZed@Ximian.com>
2213 * camel-search-private.c (utf8_get): Remove the stupid warning
2214 that should never have been there in the first place.
2216 * camel-sasl-digest-md5.c (digest_response): s/iconv/e_iconv/
2218 * camel-pgp-context.c (pgp_verify): "
2220 * camel-mime-utils.c (rfc2047_decode_word, rfc2047_decode_word,
2221 append_8bit, rfc2047_encode_word, rfc2184_decode,
2222 header_decode_param): "
2224 * camel-mime-part-utils.c (convert_buffer, convert_buffer): "
2226 * camel-mime-filter-charset.c (reset, complete, filter): "
2228 2001-10-24 <NotZed@Ximian.com>
2230 * camel-mime-filter-basic.c (complete): For qp decoding, if the
2231 data isn't really qp encoded, we could possible grow the buffer by
2232 upto 2 bytes above the input size, fix allocations/assertions
2235 * camel-vee-folder.c (folder_changed_change): If we're not
2236 autoupdate, only search for new matches against changed uid's that
2237 we dont already have.
2239 2001-10-24 Dan Winship <danw@ximian.com>
2241 * providers/imap/camel-imap-store.c (unsubscribe_folder): Don't
2242 let fi->name be NULL.
2244 2001-10-24 Jeffrey Stedfast <fejj@ximian.com>
2246 * camel-stream-fs.c (stream_read): Same as in the TcpStreamRaw code.
2247 (stream_write): And again here...
2249 * camel-tcp-stream-raw.c (stream_read): Handle the EAGAIN error
2251 (stream_write): Same here, this might fix the SMTP truncation
2254 2001-10-23 Dan Winship <danw@ximian.com>
2256 * camel-mime-utils.c (mail_list_magic): Remove an extra * in one
2257 of the regexps that glibc apparently doesn't mind but bsd does.
2259 2001-10-23 <NotZed@Ximian.com>
2261 * providers/local/camel-mbox-summary.c: made d(x) x recompile again.
2263 2001-10-22 <NotZed@Ximian.com>
2265 * providers/local/camel-spool-summary.c (summary_rebuild): No, use
2266 Storing, as the other code does :p
2267 (spool_summary_check): Check for consistency.
2269 2001-10-22 Jon Trowbridge <trow@ximian.com>
2271 * providers/local/camel-spool-summary.c (summary_rebuild):
2272 s/summarising/summarizing/.
2273 (spool_summary_check): s/summarise/summarize/.
2275 2001-10-22 Jeffrey Stedfast <fejj@ximian.com>
2277 * camel-pgp-mime.c (camel_pgp_mime_part_verify): If we are
2278 kludging around a inline-pgp signed part, do some charset
2279 conversion to protect any 8bit text.
2281 2001-10-22 <NotZed@Ximian.com>
2283 * camel-filter-search.c, camel-folder-search.c (check_header): Use
2284 search_type_mlist for mailing list searches.
2286 * camel.c (camel_init): call camel-mime-utils-init func.
2288 * camel-mime-utils.c: Changed mail mail_list_magic to include a
2289 domain part, also pre-compile all the patterns. They are all
2290 backward compatible except List-Id: which now uses the
2291 mail-address-like <list-name.host.name> part rather than the
2292 plain-text part (which might've been blank anyway).
2293 (camel_mime_utils_init): Initialisation function to setup any
2294 static data required by camel-mime-utils at run-time. We now
2295 setup the base64/charset class tables here, so it doesn't need to
2297 (camel_mime_special_table, camel_mime_base64_rank): No longer
2298 statically initialise these.
2299 (main): Removed + the tests at the end of the file.
2300 (header_raw_check_mailing_list): Dont compile regex's here,
2301 already compiled in utils_init. Use the regex patterns to remove
2302 leading <'s from addresses. Also, if there is a domain part
2303 matched, add that after a '@' is added.
2305 * camel-search-private.c (camel_search_header_match): Match check
2306 against all addresses in a multiple address match. Should fix
2308 (camel_search_header_match): Oops, missing i=0.
2309 (camel_search_header_match): Added SEARCH_TYPE_MLIST for mlist
2310 search types. It ignores the domain part if either (but not both)
2311 of the values dont have it.
2313 2001-10-22 Dan Winship <danw@ximian.com>
2315 * camel-pgp-mime.c (camel_pgp_mime_part_verify): Add a hack: if
2316 the multipart/signed part has a "x-inline-pgp-hack" parameter in
2317 its Content-Type, don't pass the MIME headers as part of the data
2320 2001-10-22 Rodrigo Moya <rodrigo@ximian.com>
2322 * Makefile.am: added $GNOME_INCLUDEDIR to INCLUDES, needed for latest
2323 libgnome, which install headers in $(prefix)/gnome-1.0
2325 2001-10-21 Jeffrey Stedfast <fejj@ximian.com>
2327 * camel-mime-part-utils.c
2328 (simple_data_wrapper_construct_from_parser): Only do the rawtext
2329 checks if the part is a text part, otherwise don't bother wasting
2332 * camel-store.c (camel_folder_info_build): Updated comments to
2333 make the code a bit more clear.
2335 2001-10-21 <NotZed@Ximian.com>
2337 * camel-store.c (CS_CLASS): Dont do the macro stuff - basically so
2338 you can actually debug calls.
2339 (camel_store_uri_cmp): New function to compare store objects.
2341 * camel-vee-folder.c (vee_folder_add_info): oops, dont free the
2342 vuid, since its alloca'd now.
2343 (folder_changed_change): Kill a compile warning.
2345 2001-10-20 <NotZed@Ximian.com>
2347 * camel-folder.c (move_messages_to): If no exception supplied, use
2349 (move_message_to): Set the seen flag also when we delete it.
2351 2001-10-19 Jeffrey Stedfast <fejj@ximian.com>
2353 * camel-vtrash-folder.c (vtrash_move_messages_to): If the
2354 destination folder is the vfolder source folder, then
2355 set_message_flags on it.
2357 2001-10-19 <NotZed@Ximian.com>
2359 * camel-session.c (register_provider): When registering provider,
2360 translate all strings.
2362 * camel-vee-folder.c (camel_vee_folder_remove_folder): Lock the
2363 right lock for unmatched subfolder list stuff. If the sub folder
2364 is deleted & part of unmatched, or the last ref to the sub folder
2365 is gone from unmatched, blow it away completely from unmatched,
2366 but only do it once.
2367 (vee_folder_remove_folder): Added arg to kill unmatched
2368 unconditionally. Also handle deleted folders, always remove
2370 (folder_changed_change): Lock subfolder lock for entirety of
2371 operation, and also check to see if the subfolder is still there
2372 before doing any fancy work (incase it got removed while we were
2373 waiting to execute).
2374 (folder_changed_change_uid): Use alloca for vuid, and not
2376 (vee_search_by_expression): Dont use sprintf for vuid.
2377 (vee_search_by_uids): "
2378 (vee_folder_add_info): "
2379 (folder_changed_remove_uid): "
2380 (folder_changed_change): "
2381 (folder_changed_change_uid): Also check folder_unmatched for
2382 changed uid's so we properly update/propagate unmatched changes.
2383 (folder_changed_change): Ok, so dont hold the subfolder lock for
2384 the whole duration of the changed event, although we probably
2385 should, requires a recursive mutex.
2386 (folder_changed_change): Change logic, we always add changed stuff
2387 if it now matches, but dont remove it unless its auto-remove, only
2388 propagate changes for it.
2389 (vee_set_message_flags): Call parent method after doing our work.
2390 (vee_set_message_user_flag): Same here.
2392 2001-10-18 Jeffrey Stedfast <fejj@ximian.com>
2394 * camel-mime-part-utils.c
2395 (simple_data_wrapper_construct_from_parser): If a charset isn't
2396 specified or claims to be utf-8, check the validity of the text
2397 and if it's invalid, set the rawtext bit to TRUE. If the charset
2398 is x-unknown or some other x- charset, always set the rawtext bit
2401 2001-10-18 <NotZed@Ximian.com>
2403 * camel-store.c (camel_store_unsubscribe_folder): If we are
2404 unsubscribing from a folder we have loaded, set the folder
2405 deleted, as with the delete_folder case.
2407 * providers/(imap|local|pop3|sendmail|smtp)/Makefile.am: Added
2408 CAMEL_CFLAGS so we get the right iconv stuff, patch from Yanko
2409 Kaneti <yaneti@declera.com>
2411 2001-10-18 Jeffrey Stedfast <fejj@ximian.com>
2413 * camel-pgp-context.c (crypto_exec_with_passwd): Make sure the
2416 2001-10-18 Jeffrey Stedfast <fejj@ximian.com>
2418 * providers/imap/camel-imap-message-cache.c (insert_finish): Flush
2419 the stream here, not sure it really matters but it might
2420 (hopefully) fix bug #12943.
2422 * camel-pgp-context.c (crypto_exec_with_passwd): Make
2425 * providers/local/camel-local-provider.c: String cleanup for bug
2428 * providers/imap/camel-imap-folder.c (imap_sync_online): Fix my
2429 Cyrus imapd workaround...instead of checking to see if info->flags
2430 == FLAGGED, just check to see if it contains any IMAP flags.
2432 2001-10-17 <NotZed@Ximian.com>
2434 * providers/local/camel-maildir-folder.c
2435 (camel_maildir_folder_new): Use '.' as the inbox name for filter
2438 * camel-store.c (camel_folder_info_clone): New function to clone a
2441 2001-10-17 Jeffrey Stedfast <fejj@ximian.com>
2443 * providers/local/camel-mh-folder.c (mh_append_message): Same as
2444 maildir and mbox append-message.
2446 * providers/local/camel-maildir-folder.c (maildir_append_message):
2447 Same as mbox append.
2449 * camel-exception.c (camel_exception_set): Make sure the new
2450 description isn't the same as the old description pointer before
2451 freeing the old one.
2452 (camel_exception_setv): Don't free the old description until we
2453 set the new one this way we can reuse the old description in the
2456 * providers/local/camel-mbox-folder.c (mbox_append_message): If
2457 errno == EINTR, then we got a user-cancel so set the exception
2458 appropriately so that we don't make the user shit his pants.
2460 * camel-filter-driver.c (do_copy): Add an optimization for when
2461 destination folder is the same as the source folder.
2463 2001-10-17 <NotZed@Ximian.com>
2465 * providers/imap/camel-imap-store.c (get_folder_info_online):
2466 (parse_list_response_as_folder_info): Patch from Danw, Use unread
2467 count of -1 to mark unflagged messages. Make sure any folder we
2468 dont lookup explicitly is marked as -1. Should fix #9947 and
2471 * providers/local/camel-mbox-summary.c (mbox_summary_sync): Only
2472 touch the summary if the timestamp or size changed.
2474 2001-10-17 Jeffrey Stedfast <fejj@ximian.com>
2476 * camel-filter-driver.c (camel_filter_driver_filter_message): Set
2477 the DELETED flag on directly on the info if the source folder
2478 doesn't have summary capability.
2480 2001-10-17 Not Zed <NotZed@Ximian.com>
2482 * camel-tcp-stream-raw.c (stream_write): As below.
2484 * camel-stream-fs.c (stream_write): If not checking cancellation,
2485 make sure we write out everything asked of us.
2487 2001-10-16 Jeffrey Stedfast <fejj@ximian.com>
2489 * camel-pgp-context.c (pgp_verify): Rearange the order of the gpg
2490 options slightly otherwise it might try to use "--no-tty" as the
2491 filename to verify :-)
2493 * camel-object.[c,h]: If CAMEL_DEBUG is defined, print some useful
2496 * providers/imap/camel-imap-store.c (delete_folder): Fixed an
2499 * camel-uid-cache.c (camel_uid_cache_new): Make sure that the
2500 parent directory exists before trying to open the filename, if it
2503 2001-10-16 <NotZed@Ximian.com>
2505 * camel-mime-utils.c (header_address_decode): If no content, dont
2506 try and decode further and spit meaningless warnings.
2508 2001-10-16 Jeffrey Stedfast <fejj@ximian.com>
2510 * camel-filter-driver.c (do_flag): Only perform the operation on
2511 the folder if the folder has summary capability, else just poke
2512 the info directly. Fixes the "Filters don't work" bug.
2514 (do_colour): And here too.
2516 2001-10-15 Jeffrey Stedfast <fejj@ximian.com>
2518 * camel-stream-fs.c (stream_read): Save the errno before calling
2519 fcntl so fcntl doesn't overwrite errno in case of a previous
2521 (stream_write): Same.
2523 2001-10-13 Jeffrey Stedfast <fejj@ximian.com>
2525 * providers/smtp/camel-smtp-transport.c (smtp_data): Replace the
2526 Bcc headers in a single location and don't flush the data unless
2527 the write was successful.
2529 2001-10-12 Jeffrey Stedfast <fejj@ximian.com>
2531 * Makefile.am: Remove the stripheader filter from the build.
2533 * camel-mime-filter-stripheader.[c,h]: Removed.
2535 * providers/smtp/camel-smtp-transport.c (smtp_data): Check the
2536 return value of camel_stream_flush to make sure it flushed the
2537 data successfully before continuing. Don't use the stripheader
2538 filter, it was completely broken - instead remove the header and
2539 set it again after we send.
2541 2001-10-12 <NotZed@Ximian.com>
2543 * camel-vee-folder.c (camel_vee_folder_remove_folder): Unhook from
2544 all events before removing folder.
2545 (camel_vee_folder_add_folder): Hook onto delete event.
2546 (camel_vee_folder_finalise): Unhook from deleted event for suibfolder.
2547 (subfolder_deleted): When the folder is deleted, remove it from
2548 the vfolder automagically.
2550 2001-10-11 <NotZed@Ximian.com>
2552 * camel-vee-folder.c (vee_search_by_uids): convert the uids list
2553 to a subset appropriate for each subfolder before trying to search
2556 * camel-charset-map.[ch]: Removed charset/locale charset lookup
2557 and iconv_open/close functions, moved to gal. Fixed all callers.
2559 2001-10-11 Jeffrey Stedfast <fejj@ximian.com>
2561 * camel-tcp-stream-ssl.c (ssl_cert_is_saved): Same.
2563 * camel-tcp-stream-openssl.c (ssl_cert_is_saved): Instead of
2564 opening the file, stat it and make sure that it belongs to us.
2566 2001-10-10 Jeffrey Stedfast <fejj@ximian.com>
2568 * camel-tcp-stream-openssl.c (ssl_verify): Same hack as below.
2570 * camel-tcp-stream-ssl.c (ssl_bad_cert): Hack around the fact that
2571 adding a cert to nss's certdb seems to not work.
2573 2001-10-10 <NotZed@Ximian.com>
2575 * camel-vee-folder.c (vee_sync): Only re-build the folder if we're
2576 expunging. Also only clear out the changed folders list if we're
2577 expungung and everything worked.
2579 2001-10-10 Jeffrey Stedfast <fejj@ximian.com>
2581 * camel-charset-map.c (camel_charset_map_init): Added a hack for
2584 2001-10-10 <NotZed@Ximian.com>
2586 * providers/local/camel-maildir-store.c (scan_dir): oops, we want
2587 get_unread_message_count, not get_message_count!
2589 2001-10-09 <NotZed@Ximian.com>
2591 * camel-service.c (camel_service_disconnect): Duplicate connect
2592 code that unregisters a cancel op if we created one.
2594 * camel-operation.c (camel_operation_progress): Another go at
2595 getting the logic right again. Make transients only update after
2596 5 seconds (CAMEL_OPERATION_TRANSIENT_DELAY)
2597 (camel_operation_end): Likewise.
2599 * providers/local/camel-spool-folder.c (spool_search_by_uids):
2602 * providers/imap/camel-imap-search.c (imap_body_contains): If
2603 searching a sub-set of the total message count, then use a UID
2604 range to search only specific messages.
2606 * camel-vee-folder.c (vee_folder_change_match): Removed.
2607 (folder_changed_add_uid): Helper func for changed code.
2608 (folder_changed_remove_uid): "
2609 (folder_changed_change_uid): "
2610 (folder_changed): Rewritten. Supports proper auto-updating of
2611 changes, but not removals till a sync occurs.
2612 (vee_search_by_uids): Implement.
2613 (folder_changed): Changed to call an async threaded function to do
2614 the actual folder updating.
2616 * camel-folder-summary.c (camel_flag_list_copy): New func to copy
2617 a whole list of flags.
2618 (camel_tag_list_copy): New func to copy a whole list of flags.
2620 * providers/imap/camel-imap-folder.c (imap_search_by_uids):
2623 * providers/local/camel-local-folder.c (local_search_by_uids):
2626 * camel-folder.c (camel_folder_search_by_uids): New function,
2627 search a subset of uid's.
2628 (search_by_uids): Default impl, return error.
2630 2001-10-08 Dan Winship <danw@ximian.com>
2632 * camel-folder.h (struct _CamelFolder): replace the ever-growing
2633 list of gbooleans with a single guint32 for flags.
2635 * camel-folder.c: Update folder flag setting/checking.
2637 * providers/pop3/camel-pop3-folder.c (camel_pop3_folder_init):
2638 * providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new):
2639 * providers/local/camel-spool-folder.c (spool_init,
2640 camel_spool_folder_new):
2641 * providers/local/camel-maildir-folder.c (camel_maildir_folder_new):
2642 * providers/local/camel-local-folder.c (local_init):
2643 * providers/imap/camel-imap-folder.c (camel_imap_folder_init,
2644 camel_imap_folder_new):
2645 * camel-vtrash-folder.c (camel_vtrash_folder_init):
2646 * camel-vee-folder.c (camel_vee_folder_init):
2647 * camel-digest-folder.c (camel_digest_folder_init): update folder
2650 2001-10-07 Dan Winship <danw@ximian.com>
2652 * providers/imap/camel-imap-store.c (get_folder_online): Unlock
2653 the store before returning error. (noted by NotZed)
2655 2001-10-06 Jeffrey Stedfast <fejj@ximian.com>
2657 * camel-mime-utils.c (header_decode_text): Fix a slight error in
2658 logic. Just because the last word was an encoded word doesn't mean
2659 we ignore the lwsp padding, we only ignore it if the last word and
2660 *this* word are encoded.
2662 2001-10-06 Jeffrey Stedfast <fejj@ximian.com>
2664 * camel-mime-filter-basic.c (filter): Implemented uuencoding and
2666 (complete): Implemented uuencoding and decoding.
2668 * camel-mime-utils.c (uuencode_close): New function to flush the
2670 (uuencode_step): New function to uuencode a block of data.
2672 2001-10-05 <NotZed@Ximian.com>
2674 * providers/imap/camel-imap-store.c (subscribe_folder): Use a
2675 folder_subscribed event rather than a folder_created one.
2676 (unsubscribe_folder): Similarly for unsubscribed/deleted.
2677 (create_folder): Emit a folder_created event on the folders we
2678 added. Not sure hsould probably check which ones are new and
2679 which ones are just existing ones?
2680 (delete_folder): Emit a folder_deletd event when we've deleted the
2681 folder. Part of fix for #11831.
2683 * camel-store.c (camel_store_class_init): Added
2684 folder_subscribed/unsubscribed events.
2686 2001-10-05 Jeffrey Stedfast <fejj@ximian.com>
2688 * camel-service.c (camel_service_finalize): Turn off warnings.
2691 * camel-sasl.c (sasl_challenge): Turn off warnings.
2693 * camel-tcp-stream.c (tcp_connect): Turn off warnings.
2694 (tcp_getsockopt): Same.
2695 (tcp_setsockopt): Here too.
2696 (tcp_get_socket): And here.
2698 * camel-folder.c (folder_sync): Turn off warnings.
2700 (append_message): Here too.
2701 (get_message): And here.
2702 (search_by_expression): And again here.
2703 (folder_changed): Here too.
2705 * camel-store.c (get_folder): Set an exception and turn off
2706 debugging g_warnings.
2707 (create_folder): Same.
2708 (delete_folder): Here too.
2709 (rename_folder): And here.
2710 (get_trash): And here.
2711 (get_folder_info): Same.
2712 (free_folder_info): And again here.
2713 (camel_folder_info_build): Here too.
2714 (folder_subscribed): Same.
2715 (subscribe_folder): Here too.
2716 (unsubscribe_folder): And here.
2718 2001-10-05 <NotZed@Ximian.com>
2720 * camel-mime-utils.c (header_decode_mailbox): Try harder to get
2721 broken names out of addresses. Unencoded ,'s in names will still
2722 break it, but well what can you do eh?
2723 (header_decode_mailbox): Always add .'s into address we've scanned
2724 past a '.', even if we can't decode the next part. Fix for some
2727 2001-10-04 <NotZed@Ximian.com>
2729 * camel-store.c (camel_store_delete_folder): Change the order of
2730 execution slightly. We delete the folder first, then call the
2731 classes delete folder, then cleanup the hashtable afterwards.
2732 This is so deletes of vfolders work, since vee-store uses the
2733 folder hashtable to store all of is vfolders :-/
2735 2001-10-04 Jeffrey Stedfast <fejj@ximian.com>
2737 * camel-service.c (camel_service_connect): Unregister the
2738 operation before unreffing it.
2740 2001-10-03 <NotZed@Ximian.com>
2742 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
2743 Remove now unused 'recents' array/freeing func.
2745 * camel-object.c (camel_object_trigger_event): Oops, always run
2746 the prep function, even if we have no hooks listening. Causes
2747 incoming imap recents to get ignored bythe camel-folder filter
2750 * providers/local/camel-local-folder.c (local_sync): Dont
2751 explicitly save metadata, its saved in summary_sync.
2753 * providers/local/camel-mh-summary.c: Call superclass.
2754 (mh_summary_check): Dont save ibex.
2756 * providers/local/camel-maildir-summary.c: Call superclass method.
2757 (maildir_summary_check): Dont save ibex explictly.
2759 * providers/local/camel-mbox-summary.c: Call super-class sync when
2760 done, saves summary/ibex, etc.
2761 (mbox_summary_check): Dont save ibex.
2762 (mbox_summary_sync): Call summary_check rather than trying to
2763 update from our known position.
2765 * providers/local/camel-local-summary.c
2766 (camel_local_summary_check): Dont save the summary or index here.
2767 (local_summary_sync): Save the summary/index here.
2769 * camel-search-private.c (camel_search_build_match_regex): Added
2770 MATCH_NEWLINE flag, -> REG_NEWLINE.
2772 * camel-lock-helper.c: Include <string.h> to kill some warnings.
2774 * camel-filter-search.c (get_full_header): Put \n's between each
2776 (header_full_regex): Dont drop the first argument to the command
2778 (header_full_regex): Set match_newline for building regex.
2779 (body_regex): And here too. These all fix #9877.
2781 2001-10-03 Jeffrey Stedfast <fejj@ximian.com>
2783 * camel-store.c (camel_store_delete_folder): Call
2784 camel_folder_delete() on the folder if it's "alive".
2786 * camel-folder.c (camel_folder_delete): Mark the folder as
2787 deleted, perform any folder specific cleanup and emit the deleted
2789 (camel_folder_sync): Only sync the folder if it hasn't been
2791 (camel_folder_expunge): Same.
2793 2001-10-03 Dan Winship <danw@ximian.com>
2795 * providers/local/camel-local-provider.c (local_url_equal):
2796 Strange are the ways of alloca. Fixes 11543.
2798 2001-10-02 Jeffrey Stedfast <fejj@ximian.com>
2800 * camel-tcp-stream-ssl.c (ssl_bad_cert): Import the certificate if
2801 the user accepts it.
2803 2001-10-02 <NotZed@Ximian.com>
2805 * providers/local/camel-local-provider.c (local_url_hash,
2806 local_url_equal): for hashing/comparing local url's, we ignore
2807 trailing /'s in paths (maybe shuld handle multiple /'s too).
2808 (camel_provider_module_init): Use local_url_hash/equal for all
2811 * camel-sasl-digest-md5.c (digest_response): Change to
2812 camel_charset_iconv_open/close.
2814 * camel-pgp-context.c (pgp_verify): Change to
2815 camel_charset_iconv_open/close.
2817 * camel-mime-part-utils.c (convert_buffer): Change to
2818 camel_charset_iconv_open().
2820 * camel-mime-filter-charset.c
2821 (camel_mime_filter_charset_new_convert, finalise): Change to
2822 camel_charset_iconv_open, etc.
2824 * camel-mime-utils.c: Use the camel_charset_iconv_open/close()
2825 functions to open/close it.
2827 * camel-charset-map.c (camel_charset_iconv_open): New function,
2828 wrap iconv_open, so we can cache ic's.
2829 (camel_charset_iconv_close): Likewise for close.
2830 (camel_charset_map_init,shutdown): Init/free iconv cache.
2832 2001-10-02 Jeffrey Stedfast <fejj@ximian.com>
2834 * camel-charset-map.c (camel_charset_to_iconv): Revert my
2835 x-unknown special-case hack - this may mask other problems.
2837 * camel-mime-utils.c (rfc2047_decode_word): If the iconv
2838 conversion fails, for whatever reason, retry using the user's
2841 2001-10-02 <NotZed@Ximian.com>
2843 * providers/local/camel-maildir-store.c (get_folder_info): Go back
2844 to using the store url's path, not the toplevel_dir thing.
2846 * camel-operation.c (camel_operation_progress): Fix the progress
2847 logic, so we dont update too often.
2849 * camel-object.c (camel_object_get_hooks): Change the lock to a
2851 (camel_object_hook_event): Maintain list length of hook list.
2852 (camel_object_unhook_event): "
2853 (camel_object_unhook_event): If we are in an event, just mark the
2854 pair as removed, without removing it.
2855 (camel_object_trigger_event): Before running events, copy the
2856 list, and also ignore 'removed' events. After running events, if
2857 we're all out of events, then free up any pending-removed events.
2858 (camel_object_free_hooks): Add some new assertions on the state of
2860 Removed the #error if threads not defined. It _should_ actually
2861 work without threads.
2862 (camel_object_free_hooks): Free mutex when done.
2864 2001-10-01 Jeffrey Stedfast <fejj@ximian.com>
2866 * providers/imap/camel-imap-store.c (delete_folder): Remove any
2867 cached messages that belonged to the deleted folder.
2868 (subscribe_folder): Don't ever let the info->name be NULL and
2869 don't use the stupid concat kludge to generate the URL, just use a
2870 CamelURL to do it. This way we don't risk breaking stuff by having
2871 a url like imap://fejj@imap//folder
2873 * camel-charset-map.c (camel_charset_to_iconv): If the charset is
2874 x-unknown, return the locale_charset.
2876 2001-10-01 Dan Winship <danw@ximian.com>
2878 * camel-provider.h: Fix up the provider flags to specify things
2879 more completely so we don't have to hardcode provider names in the
2882 * providers/local/camel-local-provider.c: MH, mbox, and Maildir
2883 are LOCAL. MH and mbox are no longer STORAGE by the new
2886 * camel-session.c (vee_provider): The vfolder store is a STORAGE.
2888 2001-10-01 Dan Winship <danw@ximian.com>
2890 * providers/local/camel-local-store.c (construct): Don't munge the
2891 URL; CamelSession's caching relies on it not changing. Instead,
2892 add a toplevel_dir field to CamelLocalStore, and set that to the
2893 path, but always ending with /.
2894 (camel_local_store_finalize): Free toplevel_dir
2895 (camel_local_store_get_toplevel_dir): Return toplevel_dir rather
2898 * providers/local/*: Lots of s/url->path/toplevel_dir/
2900 * providers/local/camel-spool-store.c (construct): Likewise, don't
2901 try to strip a trailing / from url->path here, but I didn't make
2902 the corresponding toplevel_dir change, because there's no good
2903 reason someone should expect "/var/spool/mail/danw/" to work since
2904 that's not a directory.
2906 * providers/pop3/camel-pop3-folder.c (pop3_refresh_info): if STAT
2907 returns 0, don't bother sending UIDL. Speeds things up slightly
2908 and also works around a bug in a particular random POP server.
2911 2001-09-29 Jeffrey Stedfast <fejj@ximian.com>
2913 * camel-pgp-context.c (pgp_sign): Add --no-secmem-warning and
2914 --no-greeting to the gpg command-line options.
2915 (pgp_clearsign): Same.
2916 (pgp_verify): Here too.
2917 (pgp_encrypt): And here.
2918 (pgp_decrypt): And finally here.
2920 2001-09-28 Jeffrey Stedfast <fejj@ximian.com>
2922 * camel-filter-search.c (get_source): Same here.
2924 * camel-mime-message.c (camel_mime_message_set_source): Don't use
2925 the e_url_shroud hack, use CamelURL functions instead.
2927 2001-09-28 Jeffrey Stedfast <fejj@ximian.com>
2929 * providers/nntp/camel-nntp-provider.c
2930 (camel_provider_module_init): Init the nntp url hash and url_equal
2933 * providers/sendmail/camel-sendmail-provider.c
2934 (camel_provider_module_init): Init the sendmail url hash and
2935 url_equal functions.
2937 * providers/smtp/camel-smtp-provider.c
2938 (camel_provider_module_init): Init the smtp url hash and url_equal
2941 * providers/pop3/camel-pop3-provider.c
2942 (camel_provider_module_init): Init the pop3 url hash and url_equal
2945 * providers/imap/camel-imap-provider.c
2946 (camel_provider_module_init): Init the imap url hash and url_equal
2949 * providers/local/camel-local-provider.c
2950 (camel_provider_module_init): Init the local url hash and
2951 url_equal functions.
2953 * camel-session.c (camel_session_class_init): Init the vfolder url
2954 hash and url_equal functions.
2956 * camel-provider.h: Added url_hash and url_equal function pointers
2959 * camel-vtrash-folder.c (vtrash_move_messages_to): Oops, a
2960 CamelFolder is not a CamelFolderClass.
2962 2001-09-28 Dan Winship <danw@ximian.com>
2964 * camel-tcp-stream-openssl.c (ssl_error_to_errno): Make this take
2965 an SSL * instead of a CamelTcpStreamSSL *, since it can get called
2966 from open_ssl_connection, when the CamelTcpStreamSSL isn't set up
2967 right yet. Fixes a crash on connection failure.
2969 2001-09-27 Dan Winship <danw@ximian.com>
2971 * providers/imap/camel-imap-folder.c
2972 (camel_imap_folder_fetch_data): Grab the store's command_lock
2973 before grabbing the folder's cache_lock to prevent deadlock if
2974 another thread is processing an EXPUNGE response.
2976 * providers/imap/camel-imap-folder.c
2977 (imap_expunge_uids_resyncing): Fix a compiler warning that might
2978 point out a real bug...
2980 * providers/imap/camel-imap-folder.c (get_content): and one that
2983 2001-09-27 <NotZed@Ximian.com>
2985 * camel-service.c (camel_service_connect): Dont re-register the
2986 connect_op if we got it by calling 'operation_registered', which
2987 returns an already-registered one.
2988 (camel_service_disconnect): Likewise here. This removes all the
2989 re-registered warnings.
2991 * camel-object.c (camel_object_unref): Fill the finalised data
2992 with nonsense, rather than 0's - more easily detect bad data.
2993 (camel_object_new): Clear instance data when we retrieve it off
2996 * camel-object.h (_CamelObject): Added an event lock pointer for
2997 uh, locking event stuff. Also change the hooklist hashtable into
2998 a list. Changed all the code to handle it. Result: thread-safe
2999 events, event-hooks, and save memory too, and SHOULD FINALLY FIX
3000 THAT UNREAD COUNT PROBLEM.
3002 2001-09-27 Jeffrey Stedfast <fejj@ximian.com>
3004 * camel-pgp-mime.c (camel_pgp_mime_part_decrypt): CRLF decode the
3005 stream before parsing it into a MIME part. This fixes bug #10521.
3007 * camel-store.c: Remove the old folder from the vTrash folder.
3009 2001-09-27 Dan Winship <danw@ximian.com>
3011 * camel-service.c: Change "gboolean connected" to
3012 "CamelServiceConnectionStatus status", which can be disconnected,
3013 connecting, connected, or disconnecting.
3014 (camel_service_init, camel_service_finalize): create/destroy the
3015 connect_op_lock. Refer to service->status rather than
3017 (camel_service_connect): When connecting, note the current
3018 operation (and create a new one if there's none registered) and
3019 mark the connection "connecting" until we succeed or fail.
3020 (camel_service_disconnect): Likewise in reverse.
3021 (camel_service_cancel_connect): New function to cancel a
3023 (cancel_connect): Default implementation: Call
3024 camel_operation_cancel on the connect_op.
3026 * camel-disco-store.c (disco_connect): Only call
3027 CamelRemoteStore's connect func if we're online.
3028 (disco_cancel_connect): Fall back to offline if a connection gets
3030 (disco_get_folder_info): Kludge: call connect explicitly before
3031 deciding whether to do the online or offline version, so if the
3032 connect fails, we fall back correctly.
3034 * camel-session.c (camel_session_get_service_connected):
3035 s/svc->connected/svc->status/
3037 * camel-remote-store.c (camel_remote_store_finalise):
3038 Change service->connected check to service->status check.
3039 (remote_connect): Don't set service->connected here:
3040 camel_service_connect() itself does that.
3042 * camel-operation.c (camel_operation_registered): Deal with the
3043 possibility that there's no registered op.
3045 2001-09-26 <NotZed@Ximian.com>
3047 * camel-filter-driver.c (camel_filter_driver_filter_message): If
3048 we get a search error, just abort, dont try and fall back and copy
3050 (camel_filter_driver_filter_message): Make sure we ALWAYS use
3051 exceptions for important things - like moving messages to inbox!
3052 (camel_filter_driver_filter_message): If we have the source
3053 folder, use camel_folder_set_message_flags rather then poking the
3054 info directly, which skips changed events. This means filtering
3055 immediate doesn't lose changed events.
3056 (do_flag): Same here.
3057 (do_colour): Same thing but using set_tag.
3058 (do_score): Same again.
3059 (camel_filter_driver_filter_folder): Use ~0 as the 'set' arg to
3060 set_flags, just saves typing.
3061 (open_folder): We cache folders that we couldn't open as well as
3062 those ones we could. Use magic token FOLDER_INVALID =
3063 (void *)~0 as the marker.
3064 (close_folder): Handle FOLDER_INVALID case properly.
3066 2001-09-26 Jeffrey Stedfast <fejj@ximian.com>
3068 * camel-mime-message.c
3069 (camel_mime_message_get_part_by_content_id): New function to
3070 convenience Larry ;-)
3071 (check_content_id): Oops, return !found instead of found. This
3072 callback has to return whether or not to keep searching, not
3073 whether or not it found what it's looking for. Do'h!
3075 * camel-pgp-mime.c (camel_pgp_mime_is_rfc2015_signed): block out
3076 some code if ENABLE_PEDANTIC_PGPMIME is not defined.
3078 2001-09-26 <NotZed@Ximian.com>
3080 * camel-vee-store.c: Emptied VeeStorePrivate, member wasn't used.
3082 * camel-vee-folder.c (camel_vee_folder_set_expression): Lock
3083 changed list separately.
3084 (camel_vee_folder_remove_folder): "
3085 (camel_vee_folder_set_folders): Use changed_lock for changed list.
3086 (vee_refresh_info): Use changed_lock, also just grab the list,
3087 reset it in the lock, and do the work unlocked.
3088 (vee_sync): Use changed lock for changed list.
3089 (folder_changed): ". All this kills a deadlock with sync/expunge.
3091 * camel-private.h (CamelVeeFolderPrivate): Added a new lock for
3092 the folders-changed list.
3093 (CamelVeeStorePrivate): Removed, defined in camel-vee-store.c,
3094 thanks to a pedantic.
3096 2001-09-26 Jeffrey Stedfast <fejj@ximian.com>
3098 * Makefile.am: Fix Ettore's fix.
3100 2001-09-25 Jeffrey Stedfast <fejj@ximian.com>
3102 * camel-pgp-context.c (camel_pgp_context_new): No longer takes a
3104 (pgp_sign): Only uncache the passphrase on failure.
3105 (pgp_clearsign): Same.
3106 (pgp_encrypt): Here too.
3107 (pgp_decrypt): And here.
3108 (pass_free): New function to zero the passphrase before freeing
3111 2001-09-25 Ettore Perazzoli <ettore@ximian.com>
3113 [Patch for Automake 1.5 compatibility pointed out by Richard
3114 Boulton <richard@tartarus.org>, as per #9258.]
3116 * providers/nntp/Makefile.am: Remove some commented parts that
3117 make Automake 1.5 choke.
3119 * Makefile.am (camel-lock-helper): Add $(EXEEXT) for Automake 1.5
3122 2001-09-25 <NotZed@Ximian.com>
3124 * camel-folder.c (get_unread_message_count): Only unref info if we
3127 * camel-operation.c (camel_operation_unref): Fix for !threads
3128 enabled not ccompiling.
3129 (camel_operation_ref): Assert refcount > 0.
3130 (struct _CamelOperation): Removed the lock. On further
3131 investigation, I dont think this will always work, the
3132 registration operations assume that a lookup in the
3133 operation_active table will return a ref, that will remain valid
3134 until we ref it, which needn't be the case. So now i'm using a
3135 single global lock, since we'd need to do that for unref anyway,
3136 and every operation is fast & memory-bound. Changed all the code
3138 (camel_operation_progress_count): Since the code is identical,
3139 just call progress() for now.
3140 (camel_operation_register): No longer refcount, use unref to
3141 check/clear the active table.
3142 (camel_operation_unregister): Same here.
3143 (camel_operation_unref): Check if operation is in active table, if
3146 2001-09-25 Dan Winship <danw@ximian.com>
3148 * camel-tcp-stream-openssl.c (my_SSL_read, my_SSL_write): call
3149 SSL_read/write, looping on SSL_ERROR_WANT_READ/WRITE. I'm sure
3150 there's a perfectly good reason that the API works this way. No,
3152 (stream_read, stream_write): use my_SSL_read and my_SSL_write.
3153 Fixes at least ximian 8593, and probably 6024 and maybe 10366,
3154 at least for OpenSSL. There may be a parallel NSS bug?
3156 2001-09-25 <NotZed@Ximian.com>
3158 * camel-stream-buffer.c (stream_write_all): A "safe write"
3159 function that always writes out all data asked of it, till
3161 (stream_write): Rewritten. What was i on when i wrote that
3162 originally, how did it ever work with tcp streams ...
3164 2001-09-24 <NotZed@Ximian.com>
3166 * camel-folder.c (append_message): Set the exception to
3167 FOLDER_INVALID rather than making out it worked. A fix for #7025.
3168 (search_by_expression): Here too.
3170 * providers/imap/camel-imap-folder.c (imap_update_summary): In the
3171 'lose' case, free messages, not fetch_data twice!
3173 * camel-filter-search.c (check_header): If the type is encoded,
3174 get the fallback charset from the message content-type.
3176 * camel-mime-part-utils.c (check_html_charset): Dont check for
3177 charset==null before calling charset_to_iconv.
3178 (simple_data_wrapper_construct_from_parser): "
3180 * camel-mime-message.c (process_header): Try use content-type
3181 charset param as the fallback charset.
3183 * camel-charset-map.c (camel_charset_to_iconv): Handle name ==
3186 * camel-folder-summary.c (camel_folder_summary_format_address):
3187 (camel_folder_summary_format_string): Made private again, removed
3188 #warning about it. Renamed to s/camel_folder//.
3189 (summary_format_string): Take default charset param.
3190 (camel_message_info_new_from_header, message_info_new): Decode
3191 content-type field to get the charset parameter to use as the
3192 default charset for decoding strings.
3194 * camel-search-private.c (camel_search_header_match): Pass NULL as
3195 the charset, the locale charset is always tried.
3196 (camel_search_header_match): Supply a default_charset parameter to
3197 be used with TYPE_ENCODED params.
3199 * camel-mime-utils.c
3200 (header_param): get rid of the g_strcasecmp crap.
3201 (header_set_param): Same here.
3202 (header_decode_param_list): And here.
3203 (header_decode_text): Totally rewritten. 30% of its size. If the
3204 word is not rfc2047 encoded, always try default_charset if
3205 supplied, if that fails, try locale charset if it exists, if that
3206 fails then assume latin1/7 bit ascii.
3207 (append_8bit): Changed to return FALSE if we can't convert for
3208 whatever reason, and dont append anything.
3210 * camel-mime-part.h (struct _CamelMimePart): Move content_type and
3211 headers out of the 'private' section.
3213 * camel-mime-part.c (get_headers): Dont do any conversion on the
3215 (process_header): Get the content-type charset as the fallback
3216 charset for decode_string.
3217 (construct_from_parser): IF we have a content-type header, process
3218 it before doing anything else, so we have access to a fallback
3219 charset for invalid headers.
3221 2001-09-23 Jeffrey Stedfast <fejj@ximian.com>
3223 * camel-tcp-stream-openssl.c (ssl_verify): Don't even try to alert
3224 the user if the session isn't interactive.
3225 (errlib_error_to_errno): Make the default errno EINTR so that we
3226 act just like CamelTcpStreamSSL.
3228 * camel-pgp-context.c (pgp_sign): When the password is not
3229 provided, set the exception to USER_CANCEL.
3230 (pgp_clearsign): Same.
3231 (pgp_encrypt): And here.
3232 (pgp_decrypt): Here too.
3234 2001-09-21 <NotZed@Ximian.com>
3236 * camel-store.c (create_folder): Set the exception if
3237 create_folder isn't implemented.
3239 2001-09-21 Jeffrey Stedfast <fejj@ximian.com>
3241 * providers/imap/camel-imap-store.c (create_folder): Go back to
3242 not using camel_folder_info_build() here because this seems to
3243 break folder creation (returning nodes from the root path when it
3246 2001-09-21 <NotZed@Ximian.com>
3248 * camel-vee-store.c (vee_get_folder_info): Force a refresh of
3249 vfolders before storing their count. This essentially makes
3250 'get_folderinfo' refresh all vfolders, so that get-mail works as
3253 * camel-vee-folder.c (camel_vee_folder_finalise): Clear lists.
3254 (folder_changed): If we're not autoupdating the folder, then
3255 add this folder to the list of 'changed' folders for this vfolder.
3256 (camel_vee_folder_set_expression): Reset the folders_changed list.
3257 (camel_vee_folder_remove_folder): Remove the folder from the
3258 folders_changed list.
3259 (camel_vee_folder_set_folders): If we have a folder already, but
3260 its changed, use this opportunity to update it.
3261 (vee_sync): Remove any synced folders from the folders_changed
3263 (vee_refresh_info): Refresh folder, re-run queries on any changed
3266 2001-09-20 <NotZed@Ximian.com>
3268 * camel-folder-summary.c (camel_folder_summary_header_load): New
3269 function to just load the summary. Not much use yet, until unread
3270 counts are stored in the summary (which now looks like too much
3273 * camel-mime-utils.c (header_decode_mailbox): Crappy fix for
3274 stupid mailers. If we get 'name b. name <foo>' then treat it as
3275 '"name b. name" <foo>'. See 8147.
3276 (header_decode_mailbox): Another fix for really broken mailers
3277 that have things that look like addresses followed by <address>
3279 (rfc2047_encode_word): Escape ??= to avoid some bizarre warning
3282 * providers/local/camel-local-folder.c
3283 (camel_local_folder_construct): Setup unread count properly, and
3284 also setup the url properly.
3286 * providers/local/camel-maildir-store.c (camel_folder_info_new):
3287 Build the path on the folderinfo.
3288 (scan_dir): Dont include empty host part in url for folder.
3289 (scan_dir): Lookup folder counts for any folders we currenty have
3291 (scan_dir): If we dont have the folder open, then scan the 'new'
3292 and 'cur' folders for new and unread messages to count instead.
3294 * providers/local/camel-spool-store.c (get_folder_info): If we
3295 have this folder open, then set unread from the folder itself.
3296 (get_folder_info): Change the INBOX path to not include the
3299 * providers/local/camel-spool-folder.c
3300 (camel_spool_folder_construct): Fix path.
3301 (camel_spool_folder_construct): Properly setup the url field when
3302 we say we've got a new folder created.
3304 * providers/imap/camel-imap-store.c (unsubscribe_folder): Build
3307 * camel-store.c (camel_folder_info_build_path): Prepend / to path.
3309 * camel-vee-folder.c (camel_vee_folder_construct): Use macro for
3310 unmatched folder name.
3311 (camel_vee_folder_new): "
3313 * camel-vee-store.c (vee_get_folder_info): Use macro for unmatched
3315 (vee_delete_folder): "
3316 (vee_rename_folder): "
3317 (vee_get_folder): Prepend / onto path.
3318 (vee_delete_folder): Setup path in folderinfo.
3319 (vee_get_folder_info): Fix path in folderinfo.
3321 * camel-vee-folder.h (CAMEL_UNMATCHED_NAME): New define for
3322 unmatched (internal) name.
3324 2001-09-20 Jeffrey Stedfast <fejj@ximian.com>
3326 * providers/local/camel-spool-folder.c
3327 (camel_spool_folder_construct): And finally here.
3329 * providers/local/camel-local-folder.c
3330 (camel_local_folder_construct): And here.
3332 * camel-vee-store.c (vee_get_folder): ANd here too.
3333 (vee_get_folder_info): And here.
3335 * providers/imap/camel-imap-store.c (create_folder): Use
3336 camel_folder_info_build() and do better error checking.
3337 (subscribe_folder): Set the path on the folder info.
3339 * camel-store.c (camel_folder_info_build): Set the folder-info
3340 path if it hasn't already been set by the caller.
3341 (camel_folder_info_free): Free the path.
3343 * camel-store.h: Added a path member to the FolderInfo type.
3345 2001-09-20 Dan Winship <danw@ximian.com>
3347 * camel-charset-map.c (camel_charset_to_iconv): Nuke debug warning.
3349 2001-09-19 Jeffrey Stedfast <fejj@ximian.com>
3351 * camel-pgp-context.c: Updated exception strings to be more clear.
3353 * camel-pgp-mime.c (pgp_mime_part_sign_restore_part): Stupid
3354 mistake, fixes bug #9975.
3356 * camel-tcp-stream-ssl.c (ssl_bad_cert): Oops, don't fail if
3357 `data' isn't a CamelService...cuz it's not supposed to be! It's a
3358 CamelTcpStreamSSL object...doh!
3360 2001-09-19 <NotZed@Ximian.com>
3362 * General cleanup of camel debug printfs.
3364 * camel-lock.c (camel_lock_fcntl): Changed to return 'success' if
3365 the error indicates file locking isn't supported on this
3366 filesystem. Still return a warning just incase (if its the first
3367 time). Might fix a lot of reported bugs.
3369 * providers/local/camel-spool-store.c (get_folder_info): Dont
3370 include the empty // host part in the uri. This 'breaks' the
3373 2001-09-18 Jeffrey Stedfast <fejj@ximian.com>
3375 * camel-mime-utils.c: Match mailing-list header List-Owner.
3377 2001-09-18 <NotZed@Ximian.com>
3379 * camel-vee-store.c (vee_get_folder): Fix the uri genereated for
3380 the folderinfo for the folder_created event.
3382 * camel-store.h: Added 'total' to CamelFolderInfo.
3384 2000-09-18 <NotZed@Ximian.com>
3386 * providers/local/camel-maildir-folder.c
3387 (camel_maildir_folder_new): If filter inbox is set on the store,
3388 and we're opening inbox '', then enable filtering on new messages.
3390 * providers/local/camel-local-folder.c
3391 (camel_local_folder_construct): After loading the summary, check
3392 it, and only abort if that fails. Also maintain the changes
3395 * providers/local/camel-local-summary.c
3396 (camel_local_summary_load): Remove summary_check code from here.
3397 (camel_local_summary_check): Sync index/summary here, if we were
3400 * providers/local/camel-spool-folder.c
3401 (camel_spool_folder_new): If we have filter-new-messages-on-inbox
3402 set and we just opened inbox, turn on filtering on this folder.
3403 (camel_spool_folder_construct): Keep track of changes for the
3404 folder, so that filter-new-messages works right (?)
3406 * providers/local/camel-spool-store.c (get_folder): Pass 'INBOX'
3407 as the folder name, not the path.
3409 * camel-folder-search.c (search_not): Modified patch from
3410 <peterw@ximian.com> since the summary is messageinfo's, not
3413 ** Ok so the problem with the stuff below is that maildir/spool
3414 'summary_load' throws away all events, including recents, joy eh?
3416 * providers/local/camel-maildir-summary.c (maildir_summary_check):
3417 Add new messages to the recent changeinfo.
3419 * providers/local/camel-spool-summary.c: Mark 'new' message as
3420 recent, for later processing if required (i.e. 'filter new
3423 * camel-store.c (construct): new function, cascade up construct
3424 method and check for 'filter' param, and set accordingly for any
3425 one that might want it.
3427 * providers/imap/camel-imap-store.c (construct): map the
3428 param_filter_inbox flag to the store->flags as
3429 CAMEL_STORE_FILTER_INBOX.
3431 * camel-store.h (CAMEL_STORE_FILTER_INBOX): new flag to tell it to
3434 * providers/imap/camel-imap-folder.h: Removed do_filtering flag
3435 from CamelImapFolder.
3437 * providers/imap/camel-imap-folder.c (imap_update_summary): Remove
3438 the 'recents' parameter, use the 'changes' parameter instead to
3440 (camel_imap_folder_changed): Changed for update_summary api
3441 change. Now always just emit the changed event if we have any
3442 changes to report, filtering code removed, handled upstream.
3444 (filter_free): Removed old filtering code.
3445 (camel_imap_folder_new): Set the filter_recent flag on the folder
3446 if we're the inbox and filtering of inbox is enabled.
3448 * camel-folder.c (folder_changed): If we have 'recent' messages,
3449 and are set to filter recents, then freeze the folder and launch a
3450 thread to do the processing (or similar if threading not enabled).
3451 (thaw): Make sure we emit the changed signal outside of owning the
3452 lock and if things have changed. Also, no longer bother
3453 downgrading folder_changed events to message_changed events.
3455 * camel-folder.h (struct _CamelFolder): Added filter_recent flag
3456 -> signifies all recent messages in folder should be filtered.
3458 * camel-session.c: (camel_session_thread_msg_new,
3459 camel_session_thread_msg_free, camel_session_thread_queue,
3460 camel_session_thread_wait): code to handle async operations as
3461 part of camel processing.
3462 (camel_session_finalise): free thread_lock, destroy thread, active
3464 (camel_session_init): init thread, active hash, etc.
3465 (camel_session_class_init): Init virtual functions.
3466 (session_thread_msg_new, session_thread_msg_free,
3467 session_thread_destroy, session_thread_received,
3468 session_thread_queue, session_thread_wait): default implementation
3469 of session threads stuff.
3471 2001-09-17 <NotZed@Ximian.com>
3473 * camel-folder.c (camel_folder_change_info_recent_uid): New
3474 function to add a 'recent' uid to the change info.
3475 (camel_folder_change_info_clear): Clear recent list.
3476 (camel_folder_change_info_free): Free recent list.
3477 (camel_folder_change_info_new): Setup recent list.
3479 * camel-folder.h: Added a uid_recent item to the folder_changed
3482 * providers/local/camel-maildir-store.c (scan_dir): Free new in
3485 * providers/local/camel-local-provider.c: Add local config entries
3486 to filter on new messages in spool and maildir provider.
3488 * camel-vee-folder.c (vee_folder_construct): Remove the assertion
3489 which stops ? in names from being allowed.
3491 2001-09-18 Dan Winship <danw@ximian.com>
3493 * camel-data-wrapper.c (camel_data_wrapper_is_offline): Virtualize
3496 * camel-medium.c (is_offline): A medium is offline if its content
3499 * camel-multipart.c (is_offline): A multipart is offline if any of
3500 its subparts are offline.
3502 2001-09-18 Jeffrey Stedfast <fejj@ximian.com>
3504 * camel-charset-map.c: Added korean charset conversion.
3506 2001-09-17 Jeffrey Stedfast <fejj@ximian.com>
3508 * providers/imap/camel-imap-store.c (delete_folder): Don't process
3509 the ImapResponse data, we don't want to block forever on data we
3511 (create_folder): Use get_folders_online() instead of
3512 get_folder_info_online().
3514 * camel-folder.c: Reverted previous changes.
3516 2001-09-17 JP Rosevear <jpr@ximian.com>
3518 * Makefile.am: Helpful install-exec-hook debugging output
3520 2001-09-16 Jeffrey Stedfast <fejj@ximian.com>
3522 * camel-folder.c (camel_folder_get_uri): New function to get the
3524 (get_uri): Default implementation.
3526 2001-09-14 <NotZed@Ximian.com>
3528 * camel-vee-folder.c (camel_vee_folder_set_folders): New function,
3529 set the complete list of folders on a vfolder, all at once.
3530 (camel_vee_folder_set_expression): If we set the query to be the
3531 same thing, dont do anything.
3533 * camel-vee-store.c (camel_vee_store_init): Turn off vtrash for
3536 * camel-store.c (camel_store_init): Enable vtrash by default via
3538 (camel_store_get_trash): REturn NULL if the store doesn't support
3540 (init_trash): Dont init if store doesn't support vtrash.
3542 * camel-store.h: Add a new flags CAMEL_STORE_VTRASH -> store
3545 2001-09-13 <NotZed@Ximian.com>
3547 * camel-vee-store.c (vee_get_folder_info): Implement.
3548 (build_info): Used to build a folder record from the folders
3550 (vee_delete_folder): Implemented, remove folder from hashtable.
3551 (vee_rename_folder): Implemented, remove old folder from
3552 hashtable, add new one and rename its guts too.
3554 * camel-store.c (camel_store_rename_folder): Do nothing if we're
3555 not asked to actually change names. Also dont do the renamed
3556 cache check till after we've called the subclass.
3557 (camel_store_delete_folder): Call the subclass delete firs,t then
3558 make sure the cache is right.
3560 * camel-vee-folder.c (vee_folder_construct): Remove support for
3561 name?query syntax to setup vfolder. Abort if such syntax is used.
3562 (camel_vee_folder_new): Removed code that handles ? syntax, etc.
3563 (vee_folder_build_folder): Handle unset expression, treat it as an
3565 (camel_vee_folder_set_expression): Oops, actually set the
3568 * camel-vtrash-folder.c (camel_vtrash_folder_new): Dont use
3569 name?query syntax to setup vfolder, but set the expression
3570 directly. Also fixes a small memleak.
3572 2001-09-12 <NotZed@Ximian.com>
3574 * camel-store.c (camel_store_delete_folder): Fixed warnings with a
3576 (camel_store_rename_folder): "
3578 2001-09-14 Jeffrey Stedfast <fejj@ximian.com>
3580 * camel-url.c (camel_url_set_param): Use g_datalist_set_data_full
3581 so that the data will be free'd when we clear the list.
3583 2001-09-14 Dan Winship <danw@ximian.com>
3585 * camel-file-utils.c (camel_file_util_encode_string,
3586 camel_file_util_decode_string): Don't claim failure when
3587 reading/writing the empty string.
3589 2001-09-14 JP Rosevear <jpr@ximian.com>
3591 * Makefile.am: use install hook instead of install rule to
3592 guarantee we run after installation
3594 2001-09-13 Jeffrey Stedfast <fejj@ximian.com>
3596 * camel-filter-driver.c (camel_filter_driver_filter_folder): Don't
3597 reuse the exception if it has already been set.
3598 (camel_filter_driver_filter_message): Same here. Also use the new
3599 return value from camel_filter_search_match().
3601 * camel-filter-search.c (camel_filter_search_match): Return an
3602 integer (matched, no-match, or error).
3604 * providers/local/camel-mbox-folder.c (mbox_append_message): Do
3605 error-checking based on function return values rather than
3606 exceptions as it's possible for them to be NULL.
3607 (mbox_get_message): Same.
3609 * providers/imap/camel-imap-folder.c (imap_append_offline): Pass
3610 an exception to the cache.
3611 (imap_append_online): Same.
3612 (imap_append_resyncing): Here too.
3613 (imap_copy_offline): And here.
3614 (handle_copyuid): Pass NULL as the exception here...
3615 (parse_fetch_response): And finally here.
3617 * providers/imap/camel-imap-message-cache.c
3618 (camel_imap_message_cache_insert):
3620 (camel_imap_message_cache_insert_stream):
3621 (camel_imap_message_cache_insert_wrapper):
3622 (camel_imap_message_cache_copy): Take an exception argument and
3625 * camel-mime-part-utils.c
3626 (simple_data_wrapper_construct_from_parser): Convert the charset
3627 to the iconv-friendly name.
3629 * camel-charset-map.c (camel_charset_to_iconv): Add code to
3630 convert windows-[cp]#### charsets to their iconv-friendly format
3633 * camel-pgp-context.c (crypto_exec_with_passwd): Return -1 on
3636 2001-09-12 Larry Ewing <lewing@ximian.com>
3638 * camel-filter-driver.c (camel_filter_driver_filter_mbox): free
3639 the source url in the nonfailure case.
3641 2001-09-12 <NotZed@Ximian.com>
3643 * camel-folder-search.h: Change the 'not' virtual method from an
3644 immediate e-sexp function to a non-immediate one, which is what it
3647 * camel-folder-search.c (search_not): Implement a 'not' function
3648 ourselves. If 'not' on a vector value, then not over all items
3650 (builtings[]): Change the 'not' builtin to be a non-immediate
3653 2001-09-12 Jeffrey Stedfast <fejj@ximian.com>
3655 * camel-filter-driver.c (camel_filter_driver_filter_mbox): Unref
3658 2001-09-10 <NotZed@Ximian.com>
3660 * providers/local/camel-maildir-store.c (get_folder_info): Pass in
3661 a hashtalbe used for finding visited nodes.
3664 (inode_free): Helper functions for visited node checks, hashes on
3665 inode + device number.
3666 (scan_dir): Dont re-visited directories we've already visited, use
3667 inodes + device number.
3668 Also, if the folder doesn't contain cur/tmp/new, mark it as
3669 noselect, but continue to recurse folders, if asked.
3671 * camel-folder.c (move_messages_to): Progress reporting while
3674 * camel-store.c (camel_store_delete_folder): Make sure we remove
3675 the folder from our vtrash, if we have it in our opened set, and
3676 also remove it from our hashtable.
3677 (camel_store_rename_folder): Remove the old folder name from the
3678 folder cahce, if it is there.
3680 2001-09-10 Jeffrey Stedfast <fejj@ximian.com>
3682 * camel-charset-map.c (camel_charset_to_iconv): Get rid of the
3683 g_warning, we no longer really need that.
3685 2001-09-10 <NotZed@Ximian.com>
3687 * providers/imap/camel-imap-store.c (camel_imap_msg_new): Forgot
3688 to return the newly allocated msg.
3690 2001-09-08 Not Zed <NotZed@Ximian.com>
3692 * providers/local/camel-spool-summary.c (spool_summary_sync_full):
3695 * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
3698 * camel-tcp-stream-raw.c (stream_read): Save errno around fcntl
3699 call in cancellable read case. Also, loop while we get EINTR.
3700 This might fix some weird reconnect behaviour with pop.
3703 2001-09-07 Jeffrey Stedfast <fejj@ximian.com>
3705 * camel-tcp-stream-ssl.c (ssl_bad_cert): #if 0 out the code that
3706 was hopefully going to fix bug #5325 because the functions I used
3707 seem to have been deprecated. *sigh*.
3709 * camel-remote-store.c (camel_remote_store_finalise): Disconnect
3710 from the service here otherwise the locks will be destroyed and by
3711 the time CamelService finalizes we'll crash or hang.
3713 * providers/smtp/camel-smtp-transport.c (smtp_data): Make sure to
3714 unref the mime filters when we finish with them.
3716 2001-09-07 Ettore Perazzoli <ettore@ximian.com>
3718 * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
3719 s/Synchronising/Synchronizing/.
3720 (mbox_summary_sync_quick): Likewise.
3721 (summary_rebuild): s/Summarising/Summarizing/.
3723 2001-09-07 Jeffrey Stedfast <fejj@ximian.com>
3725 * camel-multipart.c (camel_multipart_set_boundary): Take a const
3726 char * instead of a char *.
3728 * camel-mime-part-utils.c
3729 (camel_mime_part_construct_content_from_parser): Reuse the
3730 original boundary instead of generating our own.
3732 2001-09-06 <NotZed@Ximian.com>
3734 * providers/imap/camel-imap-folder.c (filter_proc): Thread
3735 function to perform filtering.
3736 (filter_free): Free the filter object.
3737 (camel_imap_folder_changed): If we have threads enabled, then
3738 queue up a request to perform filtering. For bug #4422.
3740 * providers/imap/camel-imap-store.c (camel_imap_msg_new): Create a
3742 (camel_imap_msg_queue): Queue an 'imap msg'.
3743 (async_received): Handle receiving of imap msg in async thread.
3744 (async_destroy): Handle destroying of imap msg.
3745 (camel_imap_store_finalize): Destroy thread when done.
3746 (camel_imap_store_init): Setup thread.
3748 * providers/imap/camel-imap-store.h: Added an ethread to the
3749 store, for async processing.
3751 2001-09-06 Jeffrey Stedfast <fejj@ximian.com>
3753 * camel-remote-store.c (remote_recv_line): Use
3754 camel_stream_buffer_read_line() instead of duplicationing the
3755 functionality. Also, the previous way was broken anyway. What if a
3756 line was the same length as our buffer? Then we'd go and read a
3757 second line and a third and so on until they weren't the same
3758 length, leaving \r's in the middle of the buffer.
3760 2001-09-06 Dan Winship <danw@ximian.com>
3762 * providers/pop3/camel-pop3-store.c (pop3_get_response): Fix this
3763 to always set an exception if it returns POP3_FAIL, as documented.
3765 * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
3768 2001-09-06 Jeffrey Stedfast <fejj@ximian.com>
3770 * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
3771 Set an exception on POP3_FAIL as well.
3773 2001-09-06 Dan Winship <danw@ximian.com>
3775 * providers/pop3/camel-pop3-provider.c: #ifdef out the "delete
3776 after N days" option in pop3_conf_entries, since it won't be done
3779 2001-09-04 Jeffrey Stedfast <fejj@ximian.com>
3781 * camel-remote-store.c (remote_disconnect): Too late to sync the
3782 folders here... if this is gonna happen at all it should be done
3785 * camel-service.c (camel_service_finalize): Do a clean disconnect.
3787 2001-08-30 Jeffrey Stedfast <fejj@ximian.com>
3789 * providers/local/camel-spool-store.c (get_inbox): Return the
3790 default folder (ie. INBOX) rather than saying we don't support an
3793 * camel-tcp-stream-ssl.c: #include pk11func.h.
3794 (ssl_bad_cert): Use CERT_GetDefaultCertDB.
3796 2001-08-29 Jeffrey Stedfast <fejj@ximian.com>
3798 * camel-smime-context.c (smime_sign_prepare): Do the same here as
3799 what we did in the pgp code a moment ago.
3800 (smime_sign_restore): And again here.
3801 (smime_sign): And update thise code to pass in the address of the
3802 encodings list when restoring parts.
3804 * camel-pgp-mime.c (pgp_mime_part_sign_prepare_part): Special-case
3805 message/rfc822 mime parts - don't set an encoding on these,
3806 instead traverse into their subparts and set the encodings for
3808 (pgp_mime_part_sign_restore_part): Reverse any operations done to
3809 message/rfc822 parts in the above prepare_part() function and also
3810 take a pointer to a GSList of encodings instead of just a GSList
3811 so we can properly keep track of which encoding we are on.
3812 (camel_pgp_mime_part_sign): Pass in the address to the encodings
3813 list when restoring parts.
3815 2001-08-29 Not Zed <NotZed@Ximian.com>
3817 * providers/pop3/camel-pop3-folder.c (pop3_sync): Add progress
3818 reporting to deleting messages. Dont change the calculation to a
3819 bloody float. Bug #6189.
3821 2001-08-28 Jeffrey Stedfast <fejj@ximian.com>
3823 * camel-pgp-context.c (crypto_exec_with_passwd): Initialize buf
3824 and diag_buf to NULL, hopefully this fixes the crash if the
3826 (pgp_encrypt): Argh. What was I thinking? Don't use "-r recipient"
3827 as an argument, instead use "-r" and "recipient" as 2 separate
3828 arguments to pgp. This might fix the "gpg only encrypts to my
3831 2001-08-28 Peter Williams <peterw@ximian.com>
3833 * providers/imap/camel-imap-store.c (create_folder): Whoops.
3834 Double-free and FMR = bad.
3836 * camel-remote-store.c (remote_send_string): Don't reveal the
3837 user's IMAP password if their server supports LITERALPLUS. Also
3838 add some more dashes to make it line up nicely :-)
3840 2001-08-28 Jeffrey Stedfast <fejj@ximian.com>
3842 * camel-tcp-stream-ssl.c (ssl_bad_cert): If the user accepts the
3843 certificate, add it to the database as a trusted CA.
3845 2001-08-28 Peter Williams <peterw@ximian.com>
3847 * camel-object.c (camel_object_unref): Make the locking more
3848 fine-grained on destruction; specifically, don't hold the
3849 type lock while calling the finalize functions.
3851 2001-08-27 Jeffrey Stedfast <fejj@ximian.com>
3853 * providers/local/camel-local-provider.c: Changed the
3854 description/names of some of the local providers to try and
3855 clarify the meanings.
3857 * providers/pop3/camel-pop3-provider.c: Simplify the POP
3858 description - we want short but sweet.
3860 * providers/imap/camel-imap-provider.c: s/IMAPv4/IMAP
3862 2001-08-27 Not Zed <NotZed@Ximian.com>
3864 * camel-mime-part-utils.c (convert_buffer): re-read the iconv man
3865 page, and treat the return value properly. It returns the number
3866 of non-reversible conversions performed, not the number of output
3868 (check_html_charset): Changed to just take a buffer of data, and
3869 not the mime parser.
3870 (simple_data_wrapper_construct_from_parser): Since we dont need
3871 the charset till we have all the data, search for the charset
3872 after we've read the data, if we have html data with no charset in
3874 (simple_data_wrapper_construct_from_parser): Remove the
3875 seekable_source stuff.
3877 * Re-apply patches from before.
3879 2001-08-25 Not Zed <NotZed@Ximian.com>
3881 ["Summarising" and "Synchronising" are spelt with a "s" in
3884 * providers/local/camel-mbox-summary.c (mbox_summary_sync_quick):
3885 s/Synchronizing/Synchronising/.
3887 * providers/local/camel-mbox-summary.c (summary_rebuild):
3888 s/Summarizing/Summarising/
3890 2001-08-24 Jeffrey Stedfast <fejj@ximian.com>
3892 * camel-disco-diary.c (camel_disco_diary_replay): Use fseek
3893 instead of fseeko since we want to be portable and use ftell
3894 rather than ftello for the same reason.
3895 (camel_disco_diary_empty): Same here.
3897 2001-08-24 Peter Williams <peterw@ximian.com>
3899 * Revert Not Zed's previous commits as they apparently can cause
3900 serious data loss for POP3 users.
3902 2001-08-24 Ettore Perazzoli <ettore@ximian.com>
3904 ["Summarizing" and "Synchronizing" are spelt with a "z" in the
3905 default locale, that happens to be "en_US".]
3907 * providers/local/camel-mbox-summary.c (mbox_summary_sync_quick):
3908 s/Synchronising/Synchronizing/.
3910 * providers/local/camel-mbox-summary.c (summary_rebuild):
3911 s/Summarising/Summarizing/
3913 2001-08-24 Not Zed <NotZed@Ximian.com>
3915 * camel-mime-part-utils.c (convert_buffer): Limit the maximum
3916 output buffer size. iconv bugs? returns E2BIG forever on some
3919 * providers/local/camel-spool-summary.c (summary_rebuild):
3922 * providers/local/camel-mbox-summary.c (summary_rebuild):
3923 Summarising is spelt with an s.
3925 2001-08-23 Not Zed <NotZed@Ximian.com>
3927 * camel-mime-part.c (write_to_stream): If we have rawtext, then
3928 dont do any charset conversion, only encoding/crlf conversion.
3930 * camel-data-wrapper.h (struct _CamelDataWrapper): Added 'rawtext'
3931 member, says the character encoding is raw, not utf8.
3933 * providers/local/camel-spool-summary.c
3934 (spool_summary_sync_quick): Synchronising is spelt with an s, not
3936 (spool_summary_sync_full): "
3938 * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
3939 No, synchronising is spelt with an s.
3940 (mbox_summary_sync_quick): "
3942 * camel-mime-part-utils.c
3943 (camel_mime_part_construct_content_from_parser): Remove the
3944 warnings which aren't going anywhere fast.
3945 (convert_buffer): Function to convert a bytearray of textual
3946 content from one charset to another. If the charset doesn't exist
3947 or fails, then do no conversion.
3948 (simple_data_wrapper_construct_from_parser): First, read in data,
3949 then try and convert it using the specified charset if supplied.
3950 If that fails, then dont do any conversion, and leave as raw.
3951 Also, if we have any x-* charsets, then dont do any processing.
3953 2001-08-23 Peter Williams <peterw@ximian.com>
3955 * providers/local/camel-mbox-summary.c (summary_rebuild): Add a
3956 missing \n to the end of a printf.
3958 * providers/local/camel-spool-summary.c (summary_rebuild): Same.
3960 2001-08-22 Jeffrey Stedfast <fejj@ximian.com>
3962 * providers/pop3/camel-pop3-folder.c (pop3_generate_uids):
3963 Oops. Fixed a mis-use of GPtrArray. If we set_size, then using
3964 g_ptr_array_add will assume `size' elements have already been
3965 initialized and will start appending on to the end.
3967 2001-08-21 Jeffrey Stedfast <fejj@ximian.com>
3969 * camel-pgp-context.c (pgp_verify): Turn on --batch and reenable
3970 gpg keyserver lookups.
3971 (pgp_decrypt): Disable keyserver lookups if we are disconnected.
3973 2001-08-21 Dan Winship <danw@ximian.com>
3975 * camel-folder-thread.c
3976 (camel_folder_thread_messages_new_summary): Fix the duplicate
3977 message check so it doesn't mess up threading when a reply appears
3978 in the folder before the message it's a reply to. Fixes bug #3357.
3979 (camel_folder_thread_messages_new): Likewise, although I don't
3980 think this function is used any more.
3982 2001-08-20 JP Rosevear <jpr@ximian.com>
3984 * Makefile.am: build a static camel for the addressbook conduit
3986 2001-08-20 Ettore Perazzoli <ettore@ximian.com>
3988 * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
3989 s/Synchronising/Synchronizing/.
3990 (mbox_summary_sync_quick): Likewise. *
3991 providers/local/camel-spool-summary.c (spool_summary_sync_full):
3993 (spool_summary_sync_quick): Likewise.
3995 2001-08-20 Jeffrey Stedfast <fejj@ximian.com>
3997 * providers/imap/camel-imap-store.c (create_folder): Get the
3998 entire directory structure for the folder we just created, meaning
3999 if we created a folder named "test.mailbox" where test didn't
4000 previously exist, get the listing for "test" and "test.mailbox".
4002 * providers/imap/camel-imap-utils.c (imap_parse_folder_name): New
4005 2001-08-19 Chris Toshok <toshok@ximian.com>
4007 * camel-store.h: #include <sys/types.h> for mode_t on freebsd.
4009 2001-08-19 Jeffrey Stedfast <fejj@ximian.com>
4011 * providers/pop3/camel-pop3-folder.c (pop3_generate_uids): Make
4012 sure the generated UID is non-NULL before appending it to the
4013 array of UIDs. How would this even happen? I have no clue...
4015 2001-08-17 Jeffrey Stedfast <fejj@ximian.com>
4017 * providers/imap/camel-imap-folder.c (imap_update_summary): Start
4018 scanning new messages at maxuid + 1 rather than uidval + 1? Maybe
4019 I'm missing the logic, but anyways...this might fix bug #5348.
4021 2001-08-16 Jeffrey Stedfast <fejj@ximian.com>
4023 * providers/imap/camel-imap-store.c (imap_keepalive): If we are
4024 online and message flags have changed in the current folder, sync
4025 the flags else do a NOOP. This fixes bug #4666. Also lock around
4028 * providers/imap/camel-imap-folder.c (imap_sync_online): Don't
4029 ever send "STORE FLAGS.SILENT ()" since Cyrus imapd doesn't like
4030 this (and maybe others too?) so what we'll do instead is to send
4031 "STORE -FLAGS.SILENT (\Seen \Answered \Deleted \Marked)" to clear
4032 all the flags (since this is in essence what we want to do
4035 2001-08-16 Peter Williams <peterw@ximian.com>
4037 * providers/imap/camel-imap-store.c (imap_connect_online): Fix
4038 this again. Sigh. Problem of namespace = "" may not yet be
4041 2001-08-15 Peter Williams <peterw@ximian.com>
4043 * camel-tcp-stream-openssl.c (ssl_error_to_errno): New
4044 function. Try to approximate the SSL error into errno.
4045 (errlib_error_to_errno): New function, try to approximate
4046 OpenSSl's error library's error (ERR_*) into errno.
4047 (stream_read): Try to set errno using ssl_error_to_errno.
4048 (stream_write): Same.
4049 (open_ssl_connection): Same.
4051 * providers/imap/camel-imap-store.c (imap_connect_online): Oh
4052 crap, huge killer typo.
4054 2001-08-14 Peter Williams <peterw@ximian.com>
4056 * providers/imap/camel-imap-store.c (imap_connect_online):
4057 Canonicalize store->namespace to end in store->dir_sep, once both
4058 values are known. The %F-related code makes this
4059 assumption. Probably fixes a bug reported on the mailing list.
4061 2001-08-13 Jeffrey Stedfast <fejj@ximian.com>
4063 * camel-store.c (camel_store_get_folder): After talking to NotZed,
4064 it turns out I was wrong after all.
4065 (store_sync): Create a copy of the folder-cache that owns a ref on
4066 each of the folders so that if one of the folders get's finalized
4067 inside store_sync(), we don't run into any locking issues. This is
4068 mostly meant to solve a problem in IMAP (#6089).
4070 2001-08-13 Peter Williams <peterw@ximian.com>
4072 * providers/imap/camel-imap-store.c (delete_folder): Fix a leak.
4074 * providers/imap/camel-imap-utils.c (imap_namespace_concat): Bleah,
4075 handle when namespace = NULL (can happen upon initial open of mailbox.)
4077 * providers/imap/camel-imap-command.c (imap_command_strdup_vprintf):
4078 Don't crash when %F'ing with an empty folder name and NULL namespace.
4080 2001-08-13 Jeffrey Stedfast <fejj@ximian.com>
4082 * camel-store.c (camel_store_get_folder): We need to be ref'ing
4083 the folder if/when we add it to the hash. This may fix bug #6089?
4084 (camel_store_get_folder): Nevermind, reverted the fix.
4085 (camel_store_get_folder): No, I wasn't on crack before after
4086 all...if we don't ref here, then we're open to a race condition
4089 2001-08-11 Ettore Perazzoli <ettore@ximian.com>
4091 * providers/local/camel-spool-summary.c (summary_rebuild):
4092 s/summarising/summarizing/.
4093 (summary_rebuild): Likewise.
4095 * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
4096 s/summarise/summarize/.
4097 (mbox_summary_sync_quick): Likewise.
4098 (summary_rebuild): Likewise.
4099 (mbox_summary_check): Likewise.
4101 2001-08-10 Jeffrey Stedfast <fejj@ximian.com>
4103 * providers/imap/camel-imap-utils.c (imap_quote_string): Added an
4104 assert - at this point a backtrace would be more useful than a
4105 transaction log for debugging.
4107 * providers/imap/camel-imap-command.c (imap_command_start): Return
4108 FALSE here, not NULL.
4110 * providers/imap/camel-imap-folder.c (imap_rescan): Don't
4111 g_strdup() the uid into the trigger_event call.
4113 * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
4114 Set the total bytes expected to 0 if the response is empty too.
4115 (pop3_refresh_info): Return of there was an error generating pop3
4118 * camel-mime-utils.c (header_raw_check_mailing_list): regfree the
4119 pattern before continue'ing. This was showing up quite a bit under
4122 2001-08-09 Jeffrey Stedfast <fejj@ximian.com>
4124 * providers/imap/camel-imap-utils.c (imap_parse_string_generic): A
4125 quoted string cannot contain \n's so check for those as well.
4126 (imap_atom_specials): Update this to fix bug #6553.
4128 2001-08-08 Jon Trowbridge <trow@ximian.com>
4130 * camel-filter-search.c (get_source): Remove trailing stuff from
4131 URLs before returning. (Done in an evil way, not in the good way
4132 suggested by fejj. :)) (Bug #4876)
4134 2001-08-08 jacob berkman <jacob@ximian.com>
4136 * camel-search-private.c (camel_search_header_match): check for
4137 NULL name and addr (fixes a bug i was about to report)
4139 2001-08-08 Not Zed <NotZed@Ximian.com>
4141 * camel-filter-search.c (check_header): Properly determine match
4142 type to pass to header_match.
4143 (address_matches_exactly): Removed, effectively added to
4144 camel_search_header_match.
4146 * camel-folder-search.c (check_header): Properly determine the
4147 match type to pass to header_match.
4149 * camel-search-private.c (camel_search_header_match): Add a new
4150 parameter 'type' which is the type of header we're matching
4151 against. ASIS means utf8 format, ADDRESS means an internet
4152 address ('formatted'), ADDRESS_ENCODED means a raw address header,
4153 ENCODED means rfc 2047 encoded text.
4154 (header_match): Move original logic here, have search_header_match
4155 call it as appropriate for the 'type' of match.
4157 2001-08-07 Not Zed <NotZed@Ximian.com>
4159 * camel-session.c (camel_session_class_init): Only init the vee
4160 provider struct once (if we're subclassed this will get called
4163 * camel-object.c (obj_finalize): Removed a bit of a debug that
4164 crept in with jacob's poolv patch (?).
4166 2001-08-07 Jeffrey Stedfast <fejj@ximian.com>
4168 * camel-filter-search.c (address_matches_exactly): New function to
4169 do danw's address "is" comparison (as specified in bug #5886.
4170 (check_header): Special-case address-type headers when we are
4171 doing an exact match to use the address_matches_exactly function.
4173 2001-08-06 Jeffrey Stedfast <fejj@ximian.com>
4175 * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
4176 Modify to take a headers_only argument which will then only fetch
4178 (pop3_generate_uids): Pass in TRUE for headers_only.
4179 (pop3_get_message): Pass in FALSE for headers_only and move the
4180 camel_operation() stuff out of get_message_stream and in to here
4182 (pop3_generate_uids): We also need to be using i+ 1 as the id
4183 since we are starting at 0.
4185 2001-08-06 Jeffrey Stedfast <fejj@ximian.com>
4187 * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
4188 New internal function to get a message stream by message sequence
4189 id (so that we can share code between pop3_get_message and
4190 pop3_generate_uids).
4191 (pop3_get_message): Use pop3_get_message_stream.
4192 (pop3_generate_uids): New function to generate UIDs based on the
4193 message - this fixes bug #1256.
4194 (pop3_refresh_info): If the server doesn't support UIDL, call
4195 pop3_generate_uids to get our list of UIDs.
4197 * providers/imap/camel-imap-store.c (get_folder_info_online):
4198 Don't strstr for noselect=yes, that's just plain broken.
4200 2001-08-06 Dan Winship <danw@ximian.com>
4202 * providers/imap/camel-imap-folder.c (imap_rescan): Fix off-by-one
4203 error in cleaning up deleted messages at the end of the folder.
4204 Fixes bug #5585 and maybe others.
4206 * providers/imap/camel-imap-store.c (get_folder_info_online): Do a
4207 refresh_info on the selected folder before looking at its unread
4208 count. Should fix bug #4944.
4210 2001-08-06 Peter Williams <peterw@ximian.com>
4212 Completely hide the namespace from everything external to the IMAP
4213 code, which Dan W says is the way it should be.
4215 * providers/imap/camel-imap-command.c
4216 (imap_command_strdup_vprintf): Add a new %F argument, which is like
4217 %S but will add the namespace (for folder names).
4218 (camel_imap_command): Use %F here.
4220 * providers/imap/camel-imap-utils.c (imap_parse_list_response):
4221 Changed to strip out the namespec when returning *folder. In order
4222 to do this we need to be passed the CamelImapStore.
4223 (imap_concat): Move to here from camel-imap-store.c, un-static
4224 (imap_namespace_concat): New function, adds the namespace to the
4225 folder name, unless it's INBOX.
4227 * providers/imap/camel-imap-utils.h: Prototypes.
4229 * providers/imap/camel-imap-store.c (imap_connect_online): Extra
4230 arg to imap_parse_list_response.
4231 (imap_connect_offline): Here too.
4232 (get_folder_status): Use %F.
4233 (get_folder_online): Here too.
4234 (delete_folder): Here too.
4235 (create_folder): Here too, and arg to imap_parse_list_response.
4236 (parse_list_response_as_folder_info): Arg to i_p_l_r.
4237 (get_subscribed_folders_by_hand): Use %F.
4238 (get_folders_online): Here too.
4239 (get_folder_info_online): Instead of checking for NULL @name, check
4240 for name = NULL or "", and set to "" instead of namespace. Pass ""
4241 instead of namespace to camel_folder_info_build.
4242 (subscribe_folder): Use %F.
4243 (unsubscribe_folder): Here too.
4245 * providers/imap/camel-imap-folder.c (imap_get_full_name): This
4246 now just returns folder->full_name.
4248 (do_copy): Here too.
4250 2001-08-06 Jeffrey Stedfast <fejj@ximian.com>
4252 * camel-pgp-context.c (pgp_verify): Always do --no-auto-key-retrieve.
4254 2001-08-03 Jeffrey Stedfast <fejj@ximian.com>
4256 * camel-pgp-context.c (pgp_verify): Minor changes to the iconv
4257 code so that it does the check in the return value of iconv() just
4258 like the code in camel-mime-utils.c in case this fixes Bo Rosen's
4259 gpg bugs (but I doubt this will change anything?).
4261 2001-08-03 Jeffrey Stedfast <fejj@ximian.com>
4263 * providers/smtp/camel-smtp-transport.c (smtp_connect): First
4264 check to make sure that service->url->authmech is non-NULL before
4265 passing it into strcmp to avoid a segfault.
4267 * camel-pgp-context.c (pgp_decrypt): Sigh, if gpg returns '1' it
4268 means that the key is bad but it did succeede in decrypting the
4269 block so to make users happy (even though I find this a
4270 questionable action) we are going to ignore the error and show it
4271 to the user anyway. This fixes bug #6136.
4273 2001-08-03 Not Zed <NotZed@Ximian.com>
4275 * providers/smtp/camel-smtp-transport.c (smtp_connect): special
4276 case popb4smtp auth before we try and connect, and do the magic
4279 2001-08-02 Not Zed <NotZed@Ximian.com>
4281 * providers/smtp/camel-smtp-transport.c (smtp_connect): Check for
4282 POPB4SMTP separate to the esmtp auth list.
4283 (smtp_auth): If creating the sasl object means it is
4284 already authenticated, then exit early. Sort of 'clean hack' to
4285 help popb4smtp work.
4286 (smtp_auth): Unref the sasl object, clean up a memleak i think.
4288 * providers/smtp/camel-smtp-provider.c
4289 (camel_provider_module_init): Added POPB4SMTP auth type.
4291 * camel-sasl.c (camel_sasl_authtype): Added POPB4SMTP type.
4293 * camel-sasl-popb4smtp.c: New file for pop before smtp
4296 * Makefile.am (libcamel_la_SOURCES, HEADERS): Add
4297 camel-sasl-popb4smtp.[ch].
4299 2001-08-01 Not Zed <NotZed@Ximian.com>
4301 * providers/local/camel-mbox-folder.c (mbox_lock): If we fail to
4302 get the lock, make sure we close our locking fd, and reset it.
4303 Fixes the crash part of 5095.
4305 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
4306 Slightly re-arranged filter/change notification logic. If we;re
4307 filtering, freeze the folder till we're finished to smooth the ui
4310 2001-07-31 Not Zed <NotZed@Ximian.com>
4312 * camel-folder.c (camel_folder_init): Chagned mutexes to
4313 e_mutexes, folder lock recursive. This fixes the imap filtering
4314 bug, or at least some cases of it.
4315 (camel_folder_finalize): Free mutexes.
4317 * camel-private.h (CamelFolderPrivate): Changed mutexes to
4320 2001-07-25 Not Zed <NotZed@Ximian.com>
4322 * camel-folder.c (camel_folder_change_info_*): Change the
4323 return if fail's into asserts.
4324 (camel_folder_change_info_free): Don't let it accept a NULL
4325 argument. This isn't g_lib so we dont have to.
4327 2001-07-27 Jeffrey Stedfast <fejj@ximian.com>
4329 * camel-mime-utils.c (header_decode_param): Fix the fix that fixes
4330 broken mailer behavior. We want to make sure that the user's
4331 locale charset is non-NULL before we pass it off to
4332 iconv_open(). If it *is* NULL, we want to use iso-8859-1.
4334 2001-07-26 Jeffrey Stedfast <fejj@ximian.com>
4336 * camel-url.c (camel_url_free): Allow the url to be NULL just like
4337 the libc free convention.
4339 2001-07-26 Dan Winship <danw@ximian.com>
4341 * providers/imap/camel-imap-command.c (camel_imap_command_start):
4342 Send an IMAP command, but don't wait for responses.
4343 (camel_imap_command_response): Read a single line of response from
4345 (camel_imap_command, etc): Reimplement in terms of the new code.
4347 * providers/imap/camel-imap-folder.c (imap_rescan): Use
4348 camel_imap_command_start and camel_imap_command_response, and
4349 call camel_operation_progress after each line read from the
4351 (imap_update_summary): Likewise, although with more fudging on the
4352 precentages... Also, fix this so that if none of the new messages
4353 are cached, it only does a single FETCH, and if some of them are
4354 cached, it does two FETCHes (one to get the UIDs, FLAGS, and
4355 SIZEs, and another to get the bodies of all of the messages that
4356 aren't cached now that it knows the relevant UIDs). This should
4357 speed up startup a bunch (especially if you have high bandwidth
4358 but also high latency to the IMAP server).
4360 2001-07-25 Dan Winship <danw@ximian.com>
4362 * camel-mime-utils.c (mail_mlist_magic): Add another Sender
4365 2001-07-24 Not Zed <NotZed@Ximian.com>
4367 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
4368 Change the break into a continue, we should process as many as we
4371 * camel-folder.c (camel_folder_move_messages_to): If we have no
4372 uid's to copy, exit here before going any further. Some code
4373 internally [imap] assumes there are uids to copy otherwise it can
4375 (camel_folder_copy_messages_to): Same.
4377 2001-07-24 Jeffrey Stedfast <fejj@ximian.com>
4379 * camel-mime-utils.c (header_decode_param): Handle broken mailers
4380 that send unencoded 8bit header params. And there was much
4383 * camel-url.h (CAMEL_URL_HIDE_ALL): New #define, and there was
4384 much rejoicing. Rah.
4386 2001-07-24 Not Zed <NotZed@Ximian.com>
4388 * camel-operation.c (camel_operation_register, unregister): Added
4389 some warnings for bad cases.
4391 2001-07-23 Not Zed <NotZed@Ximian.com>
4393 * camel-operation.c (camel_operation_register): Only insert a hash
4394 entry if we haven't already.
4395 (camel_operation_unregister): Only remove the has entry if the id
4398 2001-07-23 Jeffrey Stedfast <fejj@ximian.com>
4400 * camel-filter-driver.c (do_move): Slight fix for when source ==
4401 destination (we don't want to do this action because on-demand
4402 filtering would then delete the messages it supposedly "moved").
4404 2001-07-23 Not Zed <NotZed@Ximian.com>
4406 * providers/smtp/camel-smtp-transport.c (smtp_auth, smtp_helo,
4407 send_to): Added some operation progress reporting. Actual data
4408 transfer is 'tricky' because of the layers used.
4409 (smtp_auth): Instead of checking exception_is_set, use
4410 challenge==NULL to test if sasl_challenge_base64 failed.
4412 * providers/local/camel-mbox-summary.c (mbox_summary_sync): Remove
4413 peters changes below and put in a better fix. These functions
4414 already return -1 on error, just use that, and not worry about
4415 building our own exception redundantly.
4417 * camel-service.c (camel_get_host_byname): Turn the progress into
4420 2001-07-20 Peter Williams <peterw@ximian.com>
4422 * providers/local/camel-mbox-summary.c (mbox_summary_sync): More
4423 usage fixes for CamelException. Check our own exception for
4424 summary_update and xfer it out if an error occurred.
4426 2001-07-20 JP Rosevear <jpr@ximian.com>
4428 * Pull up test fixes to get them building again
4430 2001-07-20 Not Zed <NotZed@Ximian.com>
4432 * camel-charset-map.c (camel_charset_get_iconv_friendly_name):
4433 renamed to camel_charset_to_iconv() to make it just a little more
4434 consistent and not so long & fixed callers.
4436 2001-07-19 Jeffrey Stedfast <fejj@ximian.com>
4438 * camel-mime-filter-charset.c
4439 (camel_mime_filter_charset_new_convert): Convert to the
4440 iconv-friendly charset names.
4442 * providers/imap/camel-imap-store.c (create_folder): Fixed a
4443 compiler warning about returning without a value in a non-void
4446 * camel-mime-part.c (process_header): Pass the locale charset as
4447 the default_charset to header_decode_string().
4449 * camel-folder-summary.c (camel_folder_summary_format_string):
4450 Pass the locale charset as the default_charset to
4451 header_decode_string().
4452 (content_info_new): Same.
4454 * camel-mime-message.c (process_header): Pass the locale charset
4455 as the default_charset to header_decode_string().
4457 * camel-mime-utils.c (append_8bit): New helper function who's
4458 purpose is similar to append_latin1() but for 8bit text that we
4459 are assuming is not latin1.
4460 (header_decode_text): Now takes a default_charset parameter and
4461 calls append_8bit when appropriate.
4462 (header_decode_string): Also takes a default_charset parameter
4464 (header_decode_mailbox): Pass NULL as the default_charset to
4465 header_decode_string().
4467 2001-07-19 Jeffrey Stedfast <fejj@ximian.com>
4469 * camel-pgp-context.c (pgp_verify): Modified to treat the return
4470 value from camel_charset_locale_name() as a const char*.
4472 * camel-sasl-digest-md5.c (digest_response): Modified to treat the
4473 return value from camel_charset_locale_name() as a const char*.
4475 * camel-charset-map.c (camel_charset_locale_name): Modify to
4476 return const char* by returning the static locale_charset which is
4477 created inside of camel_charset_map_init().
4478 (camel_charset_map_init): Find the locale charset here and set the
4481 2001-07-19 Peter Williams <peterw@ximian.com>
4483 Policy change: NULL url's are no longer allowed in
4484 CamelFolderInfos. They used to signify that the folder was, in
4485 IMAP jargon, NoSelect; now the same effect is achieved by adding a
4486 "noselect=yes" parameter to the end of the URL. As far as I know,
4487 IMAP is the only affected provider.
4489 * providers/imap/camel-imap-store.c (delete_folder): New
4490 function. Implement folder deletion.
4491 (camel_imap_store_class_init): Set the delete_folder class
4493 (get_folder_status): New function. Utility wrapper around the
4495 (create_folder): If the parent folder is NoSelect but is empty,
4496 delete it and recreate it as a a subfolder-containing folder. If
4497 it is NoSelect but contains messages, set an exception.
4498 (parse_list_response_as_folder_info): Always set the FolderInfo's
4499 URL, but add a NoSelect parameter if it isn't selectable.
4500 (get_folder_info_online): Change logic of removing the namespace
4501 to reflect URL change. Same for logic of checking unread counts.
4502 (get_folder_info_online): Use get_folder_status to simplify this.
4504 * camel-store.c (camel_folder_info_build): When creating dummy
4505 parents, copy the child's URL and set the NoSelect parameter.
4507 2001-07-19 Jeffrey Stedfast <fejj@ximian.com>
4509 * camel-mime-part-utils.c
4510 (simple_data_wrapper_construct_from_parser): No need for
4512 (check_html_charset): Return a const char* and also use
4513 camel_charset_get_iconv_friendly_name() internally.
4515 * camel-mime-utils.c (rfc2047_decode_word): Remove my iso8859-1 ->
4516 iso-8859-1 hack and use camel_charset_get_iconv_friendly_name()
4518 (rfc2184_decode): Use camel_charset_get_iconv_friendly_name()
4520 * camel.c (camel_init): Call camel_charset_map_init().
4522 * camel-charset-map.c (camel_charset_map_init): New function to
4523 initialize the charset-equivalent lookup table. To be called by
4525 (camel_charset_get_iconv_friendly_name): New function to try and
4526 convert a charset into something that iconv is more likely to
4529 2001-07-19 Peter Williams <peterw@ximian.com>
4531 * Revert 7/11/2001 patch for IMAP INBOX filtering at NotZed's
4534 2001-07-17 Peter Williams <peterw@ximian.com>
4536 Clean up some exception misusage.
4538 * providers/imap/camel-imap-command.c (camel_imap_command): Use
4539 our own internal exception for sending the string and transfer it
4540 to @ex if anything goes wrong.
4541 (imap_read_response): Use our own internal exception for reading
4542 the untagged responses and blah blah blah.
4544 * camel-session.c (get_service): Use our own internal exception
4545 when constructing the service and transfer it to @ex if anything
4548 * camel-remote-store.c (remote_recv_line): Instead of having
4549 gboolean exception, use our own internal exception and copy
4550 it to @ex if anything goes wrong.
4552 * camel-store.c (store_sync): Create an internal exception
4553 because sync_folder() checks it for validity. Transfer it to
4556 * camel-exception.c (camel_exception_get_description): If @ex is
4557 NULL, complain - passing NULL exceptions to Camel is okay, but
4558 there should be no circumstances under which they're then
4560 (camel_exception_get_id): Same here,
4561 (camel_exception_xfer): NULL-protect and warn if transferring from
4564 2001-07-17 Jeffrey Stedfast <fejj@ximian.com>
4566 * camel-store.c (init_trash): Use CAMEL_VTRASH_NAME.
4568 * camel-vtrash-folder.h: #define CAMEL_VTRASH_NAME
4570 2001-07-16 Dan Winship <danw@ximian.com>
4572 * providers/imap/camel-imap-command.c (camel_imap_response_free):
4576 We have to pass 3, not 4 to camel_imap_folder_changed for the
4577 exists count. Fixes ximian bug #2112 (finally!).
4579 2001-07-14 Jeffrey Stedfast <fejj@ximian.com>
4581 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
4582 If the message info for an expunged message is NULL, then just
4583 break out - maybe a message was expunged that we were never
4584 notified even existed?
4586 2001-07-13 Jeffrey Stedfast <fejj@ximian.com>
4588 * camel-mime-utils.c (rfc2047_decode_word): Added a hack to
4589 convert charsets in the format iso8859-1 to iso-8859-1 because it
4590 seems to be more iconv friendly. It has been reported that on some
4591 systems, iconv doesn't know about iso8859-1 while it *does* know
4592 about iso-8859-1. See bug #4530.
4594 2001-07-13 Peter Williams <peterw@ximian.com>
4596 * Makefile.am (install-exec-local): Let people install as
4597 non-root, but give them a bigass warning so they're not allowed to
4598 complain when it doesn't work right.
4600 * camel-remote-store.c (sync_remote_folder): New function: hash
4602 (remote_disconnect): If cleanly disconnecting, sync our
4603 folders. Fixes deadlocks on exit (folders syncing after store
4604 disconnects) and also makes sense.
4606 2001-07-13 Jeffrey Stedfast <fejj@ximian.com>
4608 * camel-uid-cache.c (camel_uid_cache_new): We now use a structure
4609 as the bucket data rather than just a cache level so set the save
4611 (maybe_write_uid): We only save the uid if the cache levels are
4612 the same *and* if the save state is TRUE.
4613 (free_uid): Free the state value.
4614 (camel_uid_cache_get_new_uids): New uids that get added to the
4615 cache start with a save state of FALSE.
4616 (camel_uid_cache_save_uid): Set the save state of the uid to
4617 TRUE. What should we do if the uid isn't already in the cache?
4618 Currently I make it add the uid, but maybe it shouldn't?
4620 * providers/imap/camel-imap-folder.c (imap_filter_timeout): Update
4621 to reflect CamelFilterDriver API changes.
4623 * camel-filter-driver.c (camel_filter_driver_filter_folder): Take
4624 a cache argument so we can tell the cache whether or not the uid
4625 should be saved (meaning we have successfully filtered it).
4627 2001-07-12 Jeffrey Stedfast <fejj@ximian.com>
4629 * camel-filter-driver.c (camel_filter_driver_filter_message):
4630 Okay, I've decided that that user is just on crack. We don't want
4631 to allow filtering of deleted messages or we could get some
4632 unexpected behavior.
4633 (do_move): Oops. My last fix needs to be after the if-statement,
4635 (do_copy): And here too.
4637 2001-07-12 Jeffrey Stedfast <fejj@ximian.com>
4639 * camel-filter-driver.c (do_move): Only set p->copied and
4640 p->deleted if the messages are copied without an exception.
4641 (do_copy): Same - but obviously we don't set the p->deleted here
4643 (camel_filter_driver_filter_message): Since users complained that
4644 they couldn't filter deleted messages for "safe keeping" (WTF?
4645 safe keeping? why were they deleted in the first place then??), I
4646 have taken out the code that optimized filtering by not allowing
4647 deleted messages to be filtered. This fixes bug #4473.
4649 Note: Users have a warped sense of logic.
4651 2001-07-12 Not Zed <NotZed@Ximian.com>
4653 * camel-mime-part-utils.c (extract_metatag_charset): Removed.
4654 (check_html_charset): Replaced with this.
4655 (simple_data_wrapper_construct_from_parser): Call
4656 check_html_charset if we dont have a charset on the content-type,
4657 and we have text/html data.
4658 (check_html_charset): We also need to do qp/base64 decoding
4661 * camel-mime-utils.c (html_meta_param_list_decode): Removed. This
4662 was very wrong, the rules for mail headers vastly different from
4663 rules for decoding html elements.
4664 (rfc2184_decode): Move the malloc inside the iconv_open worked,
4665 otherwise we have a memleak.
4667 * camel-mime-filter-html.c (camel_mime_filter_html_finalize, init,
4668 run, reset): Changed to use camelhtmlparser, and fixed a tiny
4671 * camel-html-parser.c: Made the html indexer tokeniser re-usable.
4672 ONLY TO BE USED INTERNAL TO CAMEL HOWEVER.
4673 (tokenise_step): Slight fix to non-quoted values.
4675 * camel-folder-summary.c
4676 (camel_folder_summary_info_new_from_message): Removed some code i
4677 wasn't supposed to commit.
4679 * providers/local/camel-local-summary.c (local_summary_add): Only
4680 set info->size if it is not zero.
4681 (local_summary_add): If we dont get a size from the info passed
4682 in, calculate it using a null stream write. Should do #4392.
4684 2001-07-11 Jeffrey Stedfast <fejj@ximian.com>
4686 * camel-mime-part-utils.c (extract_metatag_charset): New function
4687 to extract a meta-tag charset value if it exists.
4688 (simple_data_wrapper_construct_from_parser): Along the same lines
4689 as the code I previously ripped out, but this time use the
4690 mime-parser's seek ability to help us along. Currently I read up
4691 to a 2k buffer size - this is probably overkill, 1k is probably
4694 * camel-mime-utils.c (html_meta_param_list_decode): When we get to
4695 an `=', we must skip past it before trying to grab the param
4698 2001-07-11 Jeffrey Stedfast <fejj@ximian.com>
4700 * camel-mime-part-utils.c
4701 (simple_data_wrapper_construct_from_parser): Ripped out my code
4702 since it was never being used since the mime parser is not using a
4703 seekable stream (ever?) which pretty much means my code needs to
4704 be done someplace else.
4706 2001-07-11 Peter Williams <peterw@ximian.com>
4708 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
4709 Run the filter in its own thread to prevent locking issues.
4710 (imap_filter_timeout): New function that does the filtering called
4711 as a CamelSession timeout.
4713 2001-07-11 Not Zed <NotZed@Ximian.com>
4715 * camel-filter-driver.c (camel_filter_driver_filter_mbox): Create
4716 the messageinfo itself, so we can properly set the size.
4718 * camel-movemail.c (camel_movemail_solaris): Write out the from
4719 line between each message.
4721 2001-07-10 Not Zed <NotZed@Ximian.com>
4723 * providers/local/camel-local-summary.c (local_summary_add): Copy
4724 the size across from the source message info if supplied.
4726 * camel-stream-null.c: Added a 'written' member which keeps track
4727 of how much has been written to the stream.
4729 * camel-movemail.c (camel_movemail): If we have BROKEN_SPOOL
4730 defined, then use the solaris movemail to quote from lines that
4732 (camel_movemail_solaris): Compile this in if BROKEN_SPOOL defined.
4734 2001-07-10 Jeffrey Stedfast <fejj@ximian.com>
4736 * camel-mime-utils.c (html_meta_param_list_decode): New function
4737 to parse an HTML meta-tag.
4739 * camel-mime-part-utils.c
4740 (simple_data_wrapper_construct_from_parser): If the Content-Type
4741 did not contain a charset parameter and it's also a text/html
4742 part, we have 1 last place to look - in the META html tags. *sigh*
4744 * camel-mime-message.c (camel_mime_message_get_source):
4745 s/gint/unsigned since that's what it should be.
4747 2001-07-09 Jeffrey Stedfast <fejj@ximian.com>
4749 * camel-pgp-context.c (pgp_sign): Forget the passphrase if the
4750 user has set that option.
4751 (pgp_clearsign): Same.
4752 (pgp_encrypt): And here...
4753 (pgp_decrypt): And finally here.
4754 (camel_pgp_context_new): Take a `remember' argument.
4756 2001-07-09 Not Zed <NotZed@Ximian.com>
4758 * providers/local/camel-maildir-summary.c (maildir_summary_sync):
4759 Oops, e_poolv_set free's it for us, so dont double-free here.
4761 2001-07-06 Not Zed <NotZed@Ximian.com>
4763 * camel-vee-folder.c (camel_vee_folder_finalise): Changed so we
4764 dont have the list changing under us, just going to the next node
4765 before we call a function that might change the list is
4766 potentially dangerous (slight mod of peters fix). Hmm, i think it
4767 would've double-unref'd it too(?)
4769 2001-07-08 Chris Toshok <toshok@ximian.com>
4771 * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_finalize):
4772 openssl_table is gone. we now store/get the stream from the
4774 (stream_read): rework the non-blocking case to account for SSL
4775 possibly buffering data (in which case select will block even
4776 though data is ready to be read), and to account for FreeBSD's
4777 strange behavior of returning -1/EAGAIN even though select said
4778 the fd was ready to be read.
4779 (ssl_verify): openssl_table is gone.
4780 (open_ssl_connection): set the SSL_CTX's app_data to be the
4781 stream, remove the openssl_table code.
4783 2001-07-06 Jeffrey Stedfast <fejj@ximian.com>
4785 * camel-mime-utils.c (header_encode_param): Don't allow in to be
4786 NULL, so instead of doing if (in == NULL) return;, make it a
4787 g_return_val_if_fail and later we can make it an assert or
4790 * providers/local/camel-maildir-store.c (get_inbox): Fixes bug
4793 * providers/local/camel-mbox-summary.c
4794 (camel_mbox_summary_build_from): Make the `day-of-month' digit
4795 take up 2 chars by using "%2d". Fixes bug #3989 for lame mailers
4798 * camel-pgp-context.c (crypto_exec_with_passwd): Set the pipe fd's
4801 2001-07-06 Peter Williams <peterw@ximian.com>
4803 * camel-object.c (camel_object_unref): Make sure that after the
4804 finalization event has happened and the finalization functions
4805 have been called that the object still has a zero refcount.
4807 2001-07-06 Joe Shaw <joe@ximian.com>
4809 * providers/nntp/camel-nntp-grouplist.c: Add locking to
4810 camel_nntp_get_grouplist_from_server().
4812 * providers/nntp/camel-nntp-resp-codes.h: Added
4813 NNTP_EXTENSIONS_SUPPORTED (202).
4815 * providers/nntp/camel-nntp-store.c (camel_nntp_store_get_extensions):
4816 Check for both NNTP_LIST_FOLLOWS and NNTP_EXTENSIONS_SUPPORTED from
4817 a LIST EXTENSIONS request. (Dunno if NNTP_LIST_FOLLOWS ever comes
4818 out of this, but that's what was already there...) Also, put some
4820 (finalize): e_mutex_destroy() the command lock
4821 (camel_nntp_store_init): e_mutex_new() the command lock.
4823 * providers/nntp/camel-nntp-store.h: Add locking macros.
4825 2001-07-05 Jeffrey Stedfast <fejj@ximian.com>
4827 * camel-folder-summary.c (camel_message_info_string): Added an
4828 assert to make sure that `mi' isn't NULL.
4829 (camel_message_info_set_string): Same.
4831 * providers/imap/camel-imap-command.c (camel_imap_response_free):
4832 Create and use a temporary CamelException for use with
4833 camel_imap_folder_changed.
4835 2001-07-05 Jeffrey Stedfast <fejj@ximian.com>
4837 * camel-pgp-context.c (pgp_verify): Send the
4838 --no-auto-key-retrieve argument to gpg if we are in offline mode
4839 so that we don't have to worry about gpg hanging if it can't
4840 connect to the key servers, because now it shouldn't even attempt
4843 2001-07-05 Chris Toshok <toshok@ximian.com>
4845 * camel-tcp-stream-openssl.c (ssl_verify): use
4846 X509_STORE_CTX_get_ex_data to get at the SSL* - don't use the
4847 X509_STORE_CTX to look up our stream, since it's not what we used
4848 to insert our stream into the hashtable.
4849 (open_ssl_connection): insert the stream into the hashtable before
4850 calling SSL_connect, as this can cause ssl_verify to be called,
4851 and we need to look up the stream there. remove the stream from
4852 the hashtable if there's an error connecting.
4853 (stream_connect): pass the CamelTcpStreamOpenSSL* to
4854 open_ssl_connection since it handles the hashtable stuff. remove
4855 hashtable stuff from here.
4857 2001-07-05 Jeffrey Stedfast <fejj@ximian.com>
4859 * camel-folder.c (camel_folder_copy_messages_to): if source ==
4862 2001-07-05 Peter Williams <peterw@ximian.com>
4864 * camel-vee-folder.c (camel_vee_folder_finalise): Move this before the
4865 camel_vee_folder_remove_folder because that function modifies p->folders
4866 messing up our iteration.
4867 (camel_vee_folder_finalise): Don't unref our summary; camel-folder now
4870 * camel-object.h (CamelObject): Add a 'destroying' flag to CamelObject.
4872 * camel-object.c (obj_init): Clear 'destroying'.
4873 (camel_object_unref): If 'destroying' then do not send the finalize
4874 event and do not call finalize functions. Otherwise, set destroying
4875 so just in case we get refed (eg event code) we don't get doubly
4878 2001-07-05 Not Zed <NotZed@Ximian.com>
4880 * camel-mime-filter-basic.c (filter): Fix the assertion slightly,
4881 if we have a little bit of input the output size could be larger,
4882 since we store upto 3 chars in the state.
4884 * camel-folder-summary.c
4885 (camel_folder_summary_info_new_from_message): When indexing a new
4886 record, create a pseudo word 'ibexindexed' so we can always tell
4887 that a message has already been idnexed, even if it contains no
4888 words of its own. Things like maildir use this check to see if
4889 its already been processed, and it matters if it is incorrect in
4890 this case (not just wasted cycles).
4891 (camel_message_info_dup_to): Assign the to->strings from the
4892 e_poolv_cpy() call, since it may allocaote a new poolv if the
4893 lengths do not match.
4895 (camel_folder_summary_info_new_from_parser): And same here.
4897 * providers/local/camel-maildir-summary.c (maildir_summary_sync):
4898 Changed the logicfor epoolv code to be different, we dont need to
4899 update hash references or any tricky stuff.
4900 (maildir_summary_check): Samehere.
4902 * camel-folder-summary.h: Removed include of e-memory.h.
4904 2001-07-03 Joe Shaw <joe@ximian.com>
4906 * providers/nntp/camel-nntp-resp-codes.h: Added NNTP_NO_PERMISSION
4907 (502) to the list of response codes.
4909 * providers/nntp/camel-nntp-store.c (nntp_store_connect): If we
4910 receive a NNTP_NO_PERMISSION, don't get into an infinite loop trying
4911 to reconnect, get extensions, etc. Just give up and return FALSE.
4913 2001-07-03 Dan Winship <danw@ximian.com>
4915 * providers/imap/camel-imap-message-cache.c
4916 (camel_imap_message_cache_clear): Doh. Don't remove things from
4917 the hash table while foreach'ing it. (And can't use foreach_remove
4918 either because we have to remove them in a weird order). Fixes
4921 * providers/imap/camel-imap-folder.c (imap_get_message): If the
4922 server returns OK from the FETCH BODY, but there's no parseable
4923 BODY response, it's probably because there's an UN-parseable BODY
4924 response, implying the message is badly formatted, MIMEwise. In
4925 that case, fall back to fetching the message as a single part.
4927 2001-07-02 Sam Creasey <sammy@oh.verio.com>
4929 * providers/nntp/camel-nntp-folder.c: Implemented
4930 nntp_folder_search_by_expression and
4931 nntp_folder_search_free. Basic search functionality e.g. unread
4932 marking now works for NNTP folders.
4934 * camel_filter_search.c (get_size): Added get-size sexp directive
4935 to get the size of a message for filters.
4937 * providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new):
4938 Always check with the NNTP server after summary load -- this
4939 function now always expires old summary entries and syncs with
4942 * providers/nntp/camel-nntp-utils.c (camel_nntp_get_headers):
4943 Only fetch headers for articles not already logged in
4946 * providers/nntp/camel-nntp-grouplist.c
4947 (camel_nntp_get_grouplist_from_*): change from g_list_append()
4948 to g_list_prepend() + g_list_reverse. Traversing 40,000
4949 element linked lists sucks.
4951 * providers/nntp/camel-nntp-store.c (camel_nntp_command):
4952 Should the NNTP connection die with
4953 CAMEL_EXCEPTION_SERVICE_NOT_CONNECTED, make a single retry
4954 attempt. Timing out the NNTP link is less painful this way.
4956 2001-07-02 Peter Williams <peterw@ximian.com>
4958 * README (Introduction): Add comment noting that Camel actually
4961 2001-07-02 Dan Winship <danw@ximian.com>
4963 * camel-session.c (camel_session_get_filter_driver): new method to
4964 get an application-initialized filter driver.
4966 * camel-filter-driver.c (camel_filter_driver_new): Remove the
4967 get_folder function and data args from here...
4968 (camel_filter_driver_set_folder_func): ...and add this function to
4971 * providers/imap/camel-imap-folder.c (camel_imap_folder_new): If
4972 this folder is INBOX and we're filtering INBOX, set a flag on the
4974 (imap_update_summary): Add another argument (GPtrArray *recents),
4975 and if it's non-NULL, add the uids of any \Recent new messages to
4977 (camel_imap_folder_changed): If doing filtering in this folder,
4978 create a recents array and pass it to imap_update_summary. Then
4979 get a filter driver and use it to filter the recent messages.
4981 * providers/imap/camel-imap-summary.h:
4982 * providers/imap/camel-imap-utils.c (imap_parse_flag_list): Add
4983 support for the \Recent flag.
4985 * providers/imap/camel-imap-provider.c (imap_conf_entries): enable
4986 the "filter" option.
4988 * camel-types.h: add CamelFilterDriver typedef here
4990 2001-07-02 Not Zed <NotZed@Ximian.com>
4992 * camel-lock-client.c (camel_lock_helper_init): properly return
4993 error if we can't create pipes.
4995 * camel-folder-summary.c (summary_build_content_info): re-enable
4998 * camel-mime-filter-html.c: Completely re-implemented using a
5001 2001-07-02 Dan Winship <danw@ximian.com>
5003 * tests/misc/url.c (main): Change a camel_exception_clear to
5004 camel_exception_init to fix a sometimes-crash
5006 2001-06-29 Jeffrey Stedfast <fejj@ximian.com>
5008 * camel-mime-utils.c: Added Originator: header as a header to look
5009 for when looking for the mailing list.
5011 * tests/mime-filter/Makefile.am: Build the test-crlf test program.
5013 * tests/mime-filter/test-crlf.c: New test suite for the crlf
5016 * camel-mime-filter-crlf.c (filter): Fixed to correctly encode and
5019 2001-06-28 Peter Williams <peterw@ximian.com>
5021 * camel-mime-filter-stripheader.c: New file. Filter that strips a
5022 header from mime output.
5024 * camel-mime-filter-stripheader.h: New file. Header for the above.
5026 * providers/smtp/camel-smtp-transport.c (smtp_data): Use the
5027 stripheader filter to remove the "Bcc" header.
5029 * Makefile.am: Add the stripheader files.
5031 * tests/lib/Makefile.am (INCLUDES): Get this to compile again.
5033 * tests/mime-filter/test-stripheader.c: New file. Test suite for
5034 the CamelMimeFilterStripHeader.
5036 * tests/mime-filter/Makefile.am: New test section: mime filters.
5038 2001-06-28 Jeffrey Stedfast <fejj@ximian.com>
5040 * camel-mime-utils.c (header_decode_param_list): Fix a memory
5041 leak. Also if the decoded value is NULL, that means it wasn't
5042 encoded so we don't want to toss the old value.
5043 (header_param_list_format_append): Correctly wrap long parameter
5044 values according to rfc2184.
5046 2001-06-28 Dan Winship <danw@ximian.com>
5048 * providers/imap/camel-imap-folder.c (imap_refresh_info): If the
5049 folder is frozen, don't refresh, just record that we need to do it
5051 (imap_append_online): If the APPEND doesn't trigger an immediate
5052 EXISTS response (because the folder isn't the selected folder, or
5053 because the server doesn't do that until the next command), call
5054 imap_refresh_info on the folder.
5055 (imap_copy_online): Likewise. (Replacing the unconditional NOOP
5056 that was there before, which absolutely killed filter performance
5057 by forcing the IMAP provider to switch back and forth between
5058 folders after every copy or move.)
5059 (imap_thaw): If the folder needs a refresh, do it.
5061 * camel-folder.c (camel_folder_is_frozen): New method
5063 2001-06-27 Jeffrey Stedfast <fejj@ximian.com>
5065 * camel-transport.c (camel_transport_init): Initialize the private
5067 (camel_transport_finalize): Free the private send_lock.
5068 (camel_transport_get_type): Set the init and finalize functions.
5069 (camel_transport_send): Lock the transport.
5070 (camel_transport_send_to): Same.
5072 * camel-private.h: Add CAMEL_TRANSPORT_(UN)LOCK macros.
5074 2001-06-27 Jeffrey Stedfast <fejj@ximian.com>
5076 * tests/folder/test9.c (main): Updated to match the current API.
5078 * tests/folder/test3.c: #include <gtk/gtk.h> since we use
5081 * camel-internet-address.c
5082 (camel_internet_address_encode_address): Use the new
5083 header_address_fold.
5085 * camel-mime-utils.c: Removed some old #if 0'd code of mine.
5086 (rfc2047_encode_word): If enclen is 0, don't write an encoded word
5087 token (=?iso-8859-7?Q??= would be an invalid token).
5088 (header_address_fold): New function to wrap address headers -
5089 header_fold() was force-wrapping rfc2047 encoded words which was
5090 making the test suite fail. The *real* solution, however, is to
5091 not create rfc2047 encoded words longer than 72 chars.
5093 2001-06-26 Jeffrey Stedfast <fejj@ximian.com>
5095 * camel-filter-driver.c (open_folder): Since we want an error
5096 opening a folder to result in the message being copied to Inbox
5097 (assuming no other filters get a chance to `move` it), don't
5098 record any exceptions that may occur in this function.
5100 2001-06-26 Dan Winship <danw@ximian.com>
5102 * providers/imap/camel-imap-folder.c (camel_imap_folder_selected,
5103 imap_append_offline, imap_append_online,
5104 camel_imap_folder_changed): lock the cache around accesses
5106 * providers/imap/camel-imap-store.c (get_folder_online): ref the
5107 newly-created folder (as current_folder) before calling
5108 camel_imap_folder_selected, in case that needs to do something
5109 that causes another folder to become current...
5111 * camel-service.c (camel_service_get_url): D'oh.
5112 s/FALSE/CAMEL_URL_HIDE_PASSWORD/
5114 2001-06-25 Jeffrey Stedfast <fejj@ximian.com>
5116 * camel-filter-search.c (get_source): g_strdup() the message
5117 source here or we will have problems later when we go to free the
5120 2001-06-25 Dan Winship <danw@ximian.com>
5122 * providers/imap/camel-imap-store.c (try_auth): Fix this: IMAP
5123 doesn't allow an extra argument to AUTHENTICATE to avoid a useless
5124 round trip like some other SASL bindings do.
5126 * providers/imap/camel-imap-command.c (imap_read_response): Deal
5127 with IMAP servers that (incorrectly) return "+\r\n" rather than
5128 "+ \r\n" for an empty continuation response.
5129 (camel_imap_response_extract_continuation): Likewise.
5131 2001-06-21 Jeffrey Stedfast <fejj@ximian.com>
5133 * camel-mime-utils.c (word_types_compatable): New function that
5134 decides if 2 word types are mergeable. An atom and a qstring are
5135 mergeable; 2 qstrings are mergeable; and 2 encoded words are
5137 (header_encode_phrase_merge_words): If 2 words are merged, the new
5138 word type is the MAX of the combined types. This means that if we
5139 merge a qstring and an atom, the resulting word type is a
5142 * camel-internet-address.c (internet_format):
5143 s/g_string_sprintfa/g_string_append since this makes more sense in
5144 this particular case.
5145 (internet_encode): Same here.
5147 2001-06-21 Jeffrey Stedfast <fejj@ximian.com>
5149 * providers/smtp/camel-smtp-transport.c (smtp_send): Use
5150 camel_address_length() rather than casting and accessing data
5153 2001-06-20 Jeffrey Stedfast <fejj@ximian.com>
5155 * camel-mime-utils.c (header_raw_check_mailing_list): If the first
5156 char of the mailing-list name is '<', chop it off to make Ettore
5157 happy. Fixes bug #2153.
5159 2001-06-19 Not Zed <NotZed@Ximian.com>
5161 * camel-lock-helper.c (unlock_id): Fixed a bug when not running
5162 setuid it wouldn't unlock.
5164 * camel-movemail.c (camel_movemail): use new
5165 locking daemon, also return an error code.
5167 2001-06-18 Jeffrey Stedfast <fejj@ximian.com>
5169 Note: Except for the info_free(), the NULL checks are
5170 g_return's. I felt that since g_free() handles NULL that our
5171 _free() functions should also.
5173 * camel-folder.c (camel_folder_change_info_free): Check to make
5174 sure that the info pointer isn't NULL.
5175 (camel_folder_change_info_change_uid): Same.
5176 (camel_folder_change_info_changed): Same.
5177 (camel_folder_change_info_remove_uid): Same.
5178 (camel_folder_change_info_add_uid): Same.
5179 (camel_folder_change_info_build_diff): Same.
5180 (camel_folder_change_info_cat): Same.
5181 (camel_folder_change_info_add_source): Same.
5182 (camel_folder_change_info_add_source_list): Same.
5183 (camel_folder_change_info_add_update): Same.
5184 (camel_folder_change_info_add_update_list): Same.
5186 2001-06-18 Dan Winship <danw@ximian.com>
5188 * tests/stream/Makefile.am (LDADD):
5189 * tests/smime/Makefile.am (LDADD):
5190 * tests/misc/Makefile.am (LDADD):
5191 * tests/message/Makefile.am (LDADD):
5192 * tests/folder/Makefile.am (LDADD): Remove DB3_LDADD
5194 * Makefile.am (install-exec-local): Set camel-lock-help setgid or
5197 2001-06-18 Not Zed <NotZed@Ximian.com>
5199 * camel-folder-summary.c
5200 (camel_folder_summary_info_new_from_parser): Only create a missing
5201 uid if we have indexing turned on.
5203 * camel-lock-helper.c (setup_process): Function to setup
5204 process/sanity/security checks. Change to the real uid as soon as
5206 (lock_path): First try to lock as the real uid, if that fails, try
5208 (unlock_id): Unlock as the uid we created the lock as.
5210 * Makefile.am (INCLUDES): Added -DCAMEL_SBINDIR for lock helper
5213 * providers/local/camel-spool-folder.c (spool_lock): Implemented,
5214 using lock helper locking. Need to work out if the locking
5215 requires a root created lock?
5216 (spool_unlock): Likewise.
5218 2001-06-15 Not Zed <NotZed@Ximian.com>
5220 * camel-lock-helper.c: Setuid Lock helper process. Creates and manages
5221 .locks, keeping them active, removing them, etc. What real perms it
5222 needs is a little system dependent.
5224 2001-06-14 Not Zed <NotZed@Ximian.com>
5226 * providers/local/camel-maildir-store.c (get_folder_info): Implement.
5227 (scan_dir): Does the work of scanning for maildir directories.
5229 2001-06-13 Not Zed <NotZed@Ximian.com>
5231 * providers/local/camel-spool-store.c (get_folder_info):
5232 Implemented, just returns a hardcoded INBOX folder.
5233 (free_folder_info): implemented, free's the 1 possible level of
5236 * providers/local/camel-spool-folder.c
5237 (camel_spool_folder_construct): Set the real unread message
5238 count on the folder_created thing.
5240 2001-06-15 Dan Winship <danw@ximian.com>
5242 * providers/imap/camel-imap-message-cache.c
5243 (camel_imap_message_cache_max_uid): Return the largest real UID in
5244 the cache (as an integer). Eventually to be used for an
5245 optimization in the new-message fetch code.
5246 (cache_put): Keep track of max_uid.
5248 2001-06-14 Jeffrey Stedfast <fejj@ximian.com>
5250 * camel-mime-utils.c: Added Mailing-List header regex so that we
5251 can do mlist magic on that header.
5253 2001-05-28 Jeffrey Stedfast <fejj@ximian.com>
5255 * camel-mime-utils.c (header_decode_param): Properly handle
5256 correct and incorrect (for the common case, ie Outlook and
5257 Netscape/Mozilla) rfc2184 values.
5258 (header_decode_rfc2184_param): Get the param name and see if we
5259 should expect a rfc2184 parameter value.
5260 (rfc2184_decode): Decode a rfc2184 value.
5261 (hex_decode): hex decode a string.
5262 (header_decode_param_list): Handle rfc2184 encoded parameters (ie
5263 parameters that have been split and perhaps encoded).
5264 (header_param_list_format_append): Encode the value before seeing
5265 if it will fit on the line. If the value does get encoded, be sure
5266 to put a '*' before the equal-sign.
5267 (header_encode_param): New function to rfc2184 encode a parameter
5268 value (maybe it should be renamed?)
5270 2001-06-14 Jeffrey Stedfast <fejj@ximian.com>
5272 * camel-mime-part.c (init_header_name_table): Don't try to format
5273 the Reply-To header - we don't want to wrap the reply-to address.
5275 2001-06-12 Not Zed <NotZed@Ximian.com>
5277 * providers/local/camel-spool-*.[ch]: A new provider, for spool
5278 mailboxes. Mostly a cut and paste of the mbox code, but not a
5279 subclass CamelLocal*. Not tested a lot, doesn't lock yet, use
5280 with extreme caution.
5282 * tests/lib/folders.c (test_folder_message_ops): Added spool arg,
5283 spool folders can't be deleted, renamed, etc.
5284 (test_folder_basic): Same.
5286 * tests/folder/test2.c (main): Added checks for spool type.
5288 * tests/[message|stream|folder|misc|smime]/Makefile.am (LDADD):
5289 Added db3 flags, so make check compiles, doesn't run though.
5291 2001-05-24 Not Zed <NotZed@Ximian.com>
5293 * providers/local/camel-local-provider.c
5294 (camel_provider_module_init): Added spool provider.
5296 2001-06-07 Jon Trowbridge <trow@ximian.com>
5298 * camel-filter-driver.c (camel_filter_driver_filter_folder): Add a
5299 separator between the service url and the folder name, if needed.
5301 * camel-filter-driver.c (camel_filter_driver_filter_mbox): Added
5302 an argument, so that the original source URI of the mbox can be
5303 passed in. This is needed because this function is called
5304 post-movemail, so we are never reading from the original mbox
5305 anymore. Without the original mbox URI, the X-Evolution-Source
5306 tag gets set incorrectly and filter-on-source will fail to work.
5307 (camel_filter_driver_filter_message): Also take an extra arg
5308 for the original source URI. It is the original URI, not the
5309 source URI, that is used for filtering and for setting the
5310 X-Evolution-Source tag.
5312 2001-06-05 Dan Winship <danw@ximian.com>
5314 * providers/imap/camel-imap-folder.c (imap_rescan): Don't fetch
5315 the UID and FLAGS of messages we don't know about yet, since
5316 they'll just get discarded.
5318 2001-06-01 Jeffrey Stedfast <fejj@ximian.com>
5320 * tests/smime/pgp.c: Fix to not get into a recursive loop in
5323 * tests/smime/pgp-mime.c: Same.
5325 2001-05-31 Jeffrey Stedfast <fejj@ximian.com>
5327 * camel-smime-context.c: Numerous fixes to get it to compile.
5329 * camel.h: Added camel-cipher-context.h, camel-cms-context.h,
5330 camel-smime-context.h, and camel-smime-utils.h
5332 * camel-cms-context.[c,h]: New virtual class for manipulating
5333 cryptographic message syntax messages (like S/MIME).
5335 * camel-smime-context.[c,h]: Modified to inherit from the
5336 CamelCMSContext class rather than the CamelCipherContext class.
5338 * camel-smime.[c,h]: Removed - just use camel-smime-context
5341 * camel-smime-utils.[c,h]: New source files. Moved the 2 useful
5342 functions from camel-smime.[c,h] into here.
5344 2001-05-30 Dan Winship <danw@ximian.com>
5346 * camel-charset-map.c: Redo the BUILD_MAP code to not depend on
5347 libunicode. Now it only generates a map of "popular" 8bit
5348 encodings. (It's not worthwhile to support obscure encodings,
5349 because any mailer that supports them will support UTF8 too. And
5350 Chinese and Japanese use mostly the same UTF8 characters so you
5351 need to decide between those encodings based on the locale or
5352 the charset of the message you're replying to or the input
5353 method you used. So this is sufficient for camel_charset_best's
5356 * camel-charset-map-private.h: Regenerated.
5358 * camel.c (camel_shutdown): Move #ifdefs around to prevent a
5361 2001-05-29 Dan Winship <danw@ximian.com>
5363 * camel-disco-diary.c: Code for logging and replaying offline
5366 * camel-disco-store.c (disco_construct): Set disco->status here
5367 (where we can base it on the session's offline status) rather than
5369 (disco_connect): If we connect online and have a non-empty diary,
5370 switch to RESYNCING mode and replay the diary to the server.
5371 (disco_get_folder, disco_get_folder_info): Add _resyncing
5374 * camel-disco-folder.c (disco_sync, disco_expunge_uids,
5375 disco_append_message, disco_copy_messages_to,
5376 disco_move_messages_to): Add _resyncing variants to switches.
5377 (disco_expunge_uids, disco_append_message, disco_copy_messages_to,
5378 disco_move_messages_to): Remove #ifdef'ed out diary code: let the
5380 (disco_append_message): Redo the append methods to no longer
5381 return the UID, since we're no longer doing the logging from here.
5383 * providers/imap/camel-imap-store.c (imap_connect_online,
5384 imap_connect_offline): Create a CamelDiscoDiary.
5385 (imap_disconnect_offline): And free it.
5387 * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
5388 If RESYNCING, don't do any sort of checking that the remote folder
5389 matches the summary, beyond making sure that the UIDVALIDITY is
5391 (imap_rescan): Add a missing camel_folder_summary_info_free when
5392 removing a UID from the summary.
5393 (imap_expunge_uids_offline): Implement. Fairly simple.
5394 (imap_expunge_uids_resyncing): Implement. If the store supports
5395 UIDPLUS, we can just use imap_expunge_uids_online. If not, we need
5396 to temporarily undelete any messages marked deleted on the server
5397 that aren't supposed to get expunged.
5398 (imap_append_offline): Implement, using cache and summary
5399 operations, and triggering the folder_changed event by hand.
5400 (imap_append_resyncing): Implement. Redo imap_append_online a bit
5401 in the process to make them able to share more code.
5402 (imap_copy_offline): Implement.
5403 (imap_copy_online): Move parts of this out into a helper.
5404 (imap_copy_resyncing): Implement. In most cases this is just like
5405 imap_copy_online, but if you are copying a message that was itself
5406 copied or appended into the folder, and the server doesn't do
5407 UIDPLUS, it will be necessary to replace at least part of the copy
5408 operation with one or more appends.
5410 * providers/imap/camel-imap-command.c (imap_read_response): Don't
5411 record the current folder in the response when in RESYNCING mode.
5412 (This means that EXISTS and EXPUNGE responses won't be processed,
5413 which is needed because the summary may not match the folder at
5415 (imap_read_response): On error, call
5416 camel_imap_response_free_without_processing, not
5417 camel_imap_response_free.
5419 * providers/imap/camel-imap-utils.c (imap_uid_array_to_set): Make
5420 this work better when operating on UIDs that aren't in the summary.
5422 * providers/imap/camel-imap-summary.c
5423 (camel_imap_summary_add_offline): New routine used by
5424 imap_append_offline and imap_copy_offline to create new summary
5427 2001-05-28 Jeffrey Stedfast <fejj@ximian.com>
5429 * camel-mime-utils.c (header_set_param): Use g_strcasecmp()
5430 because some systems don't have strcasecmp(). Also, when removing
5431 a param, make sure to free the param->name too.
5433 2001-05-27 Dan Winship <danw@ximian.com>
5435 * tests/lib/messages.c (test_message_read_file): Fix an fd leak
5437 * tests/lib/session.c, tests/lib/session.h: a CamelSession
5438 subclass for the test programs.
5440 * tests/lib/Makefile.am: include session.[ch]
5442 * tests/folder/test*.c: Use a CamelTestSession from libcameltest
5443 instead of cut+pasting everywhere.
5445 * tests/misc/url.c (main): Update for a camel_url_new change at
5448 * tests/*/.cvsignore: Add stuff.
5450 * camel-mime-utils.c (rfc2047_encode_word): Fix a silly ==/!=
5453 2001-05-26 Dan Winship <danw@ximian.com>
5455 * providers/imap/camel-imap-folder.c: Add a "need_rescan" flag
5456 saying if we want to rescan the entire folder for flag changes
5457 next time it's selected.
5458 (camel_imap_folder_init): Set need_rescan TRUE.
5459 (camel_imap_folder_selected): If need_rescan is TRUE, call
5461 (imap_refresh_info): Only do a full rescan if need_rescan is TRUE.
5462 Otherwise just do a NOOP, making this a MUCH more lightweight
5463 operation. Also, don't call imap_rescan directly if the folder
5464 isn't selected, since that could end up causing the folder to be
5465 scanned *twice* (imap_rescan -> camel_imap_command ->
5466 camel_imap_folder_selected -> imap_rescan).
5467 (imap_rescan): Set need_rescan FALSE.
5468 (imap_sync_online): Don't NOOP if no changes were pushed: the
5469 caller will call refresh_info if it wants to poll for changes.
5470 Fixes evolution-mail doing lots of unnecessary extra work at
5473 * providers/imap/camel-imap-store.c (refresh_folder_info): Set
5474 need_rescan on each folder before calling refresh_info.
5476 2001-05-25 Jeffrey Stedfast <fejj@ximian.com>
5478 * providers/smtp/camel-smtp-transport.c (smtp_auth): Oops. Use a
5479 strNcmp to make sure the response begins with a 334 code, not a
5482 * providers/local/camel-maildir-folder.c (maildir_append_message):
5483 remove the summary info so we are not out-of-sync with the maildir
5486 * providers/local/camel-mh-folder.c (mh_append_message): remove
5487 the summary info so we are not out-of-sync with the mh folder.
5489 * providers/local/camel-mbox-folder.c (mbox_append_message):
5490 remove the summary info so we are not out-of-sync with the mbox.
5492 2001-05-24 Jeffrey Stedfast <fejj@ximian.com>
5494 * camel-smime-context.c (camel_smime_context_new): Oops, I spelled
5495 the get-default-db function name wrong.
5497 2001-05-23 Jeffrey Stedfast <fejj@ximian.com>
5499 * providers/local/camel-local-folder.c
5500 (camel_local_folder_construct): s/folder_deleted/folder_created -
5501 result of a bad copy/paste.
5503 * providers/imap/camel-imap-search.c (imap_body_contains):
5504 Optimize the match "" case.
5506 2001-05-21 Jeffrey Stedfast <fejj@ximian.com>
5508 * providers/imap/camel-imap-store.c (get_folder_info_online):
5509 Store the CamelFolderInfo tree that was returned from
5510 camel_folder_info_build() in a new variable, 'tree', rather than
5511 'fi' since we later use 'fi' when syncing folders. Not only does
5512 this fix a memory leak, but it also fixes the bug where the user
5513 would only see the last folder in the folder list and/or it's
5516 2001-05-16 Jeffrey Stedfast <fejj@ximian.com>
5518 * camel-session.c (camel_session_forget_password): The service can
5519 be NULL here too, thanks to Wayne Davis for pointing this out.
5521 * camel-smime-context.c (camel_smime_context_new): We don't need
5522 to be passed the certdb path anymore.
5524 2001-05-16 Dan Winship <danw@ximian.com>
5526 * camel-medium.c (camel_medium_get_headers): New function to
5527 return an array of all headers.
5528 (camel_medium_free_headers): And free them.
5530 * camel-mime-part.c (get_headers, free_headers): Implement this
5531 for CamelMimePart. (Works for CamelMimeMessage too.)
5533 2001-05-15 Jeffrey Stedfast <fejj@ximian.com>
5535 * camel-smime-context.c (camel_smime_context_finalise): Don't
5536 close or free (it wasn't allocated) the certdb.
5537 (camel_smime_context_new): If we get a NULL certdb handle, then
5538 don't bother trying to create a new certdb handle since NSS_Init*
5539 should have done that.
5541 2001-05-15 Jeffrey Stedfast <fejj@ximian.com>
5543 * Makefile.am: Don't use EXTRA_GNOME_*, use the new CAMEL_*
5544 variables so we don't link in tons of extra cruft that we don't
5547 * tests/smime/pkcs7.c: Added to the test suite - tests the S/MIME
5550 2001-05-14 Jeffrey Stedfast <fejj@ximian.com>
5552 * camel-smime-context.c: Lots of fixes to get this to compile.
5554 * camel-smime.c (camel_smime_part_verify): Updated to pass in a
5555 hash argument to camel_smime_verify().
5557 * camel-pgp-mime.c (camel_pgp_mime_part_verify): Update according
5558 to the changes in the context API.
5560 * camel-pgp-context.c (pgp_verify): Updated to take a
5561 CamelCipherHash argument.
5563 * camel-cipher-context.c (camel_cipher_verify): Now takes a hash
5564 argument since the S/MIME code needs this.
5566 * Makefile.am: Add camel-smime-context.[c,h] and camel-smime.[c,h]
5569 * camel-smime.[c,h]: New source files for manipulating S/MIME
5572 2001-05-14 Jon Trowbridge <trow@ximian.com>
5574 * camel-search-private.c (utf8_get): Replicate the semantics of
5575 the libunicode utf8 functions by returning NULL in the arg
5578 * camel-pgp-context.c (pgp_verify): Check for valid utf8,
5579 terminate loop if something looks wrong.
5581 * camel-mime-utils.c (header_encode_phrase_get_words): Properly
5582 check for invalid utf8.
5583 (header_encode_string): Properly check for invalid utf8.
5585 * camel-charset-map.c (camel_charset_step): Properly check for
5588 2001-05-14 Jeffrey Stedfast <fejj@ximian.com>
5590 * tests/folder/test9.c:
5591 * tests/folder/test8.c:
5592 * tests/folder/test7.c:
5593 * tests/folder/test6.c:
5594 * tests/folder/test5.c:
5595 * tests/folder/test4.c:
5596 * tests/folder/test3.c:
5597 * tests/folder/test2.c:
5598 * tests/folder/test1.c:
5599 * tests/smime/pgp-mime.c:
5600 * tests/smime/pgp.c: Subclass CamelSession since we can no longer
5601 specify the passwd callback any other way and update code
5604 2001-05-11 Dan Winship <danw@ximian.com>
5606 * camel-mime-utils.c (header_location_decode): Decode
5607 Content-Location, either correctly or Netscape-generated-brokenly.
5609 * camel-mime-part.c (camel_mime_part_set_content_location,
5610 camel_mime_part_get_content_location, etc): Deal with
5611 Content-Location header.
5613 2001-05-11 Jeffrey Stedfast <fejj@ximian.com>
5615 * providers/smtp/camel-smtp-transport.c (smtp_auth): Don't check
5616 the initial auth response until we get into the while-loop
5617 otherwise we have problems if the SASL mechanism supported a
5618 client initiated challenge (like PLAIN and LOGIN do).
5620 2001-05-11 Dan Winship <danw@ximian.com>
5622 * camel-stream-null.c (camel_stream_null_new): Make this return
5623 CamelStream * (like the other stream new functions) instead of
5626 2001-05-10 Chris Toshok <toshok@ximian.com>
5628 * camel-tcp-stream-ssl.c (stream_connect): call SSL_Enable after
5629 the SSL_ImportFD and before PR_Connect. Otherwise, NSS aborts
5632 2001-05-10 Jeffrey Stedfast <fejj@ximian.com>
5634 * camel-session.c (camel_session_get_password): Don't abort if the
5635 Service is NULL, this is perfectly valid for cipher contexts.
5637 2001-05-09 Peter Williams <peterw@ximian.com>
5639 * providers/imap/camel-imap-folder.c (imap_move_messages_to): Pass
5640 appropriate parameters to CF_CLASS and add comment explaining why
5641 my initial attempt at a solution didn't work.
5643 2001-05-09 Dan Winship <danw@ximian.com>
5645 * camel-disco-store.c (camel_disco_set_status): Set the
5646 disconnected status.
5647 (camel_disco_store_can_work_offline): Return whether or not a
5648 given CamelDiscoStore can work offline or not.
5650 * camel-disco-folder.c (camel_disco_folder_cache_message):
5651 Explicitly tell a folder to cache a message. (Better than using
5652 get_message, because for IMAP that doesn't guarantee you'll get
5653 all the message parts.)
5654 (camel_disco_folder_prepare_for_offline): Prepare a folder for
5655 offline use by caching all messages meeting given search criteria
5656 (and doing anything else the particular folder implementation
5659 * camel-session.c (camel_session_set_online,
5660 camel_session_is_online): A session-wide online/offline toggle.
5661 (camel_session_init): Set online to TRUE.
5663 * providers/imap/camel-imap-store.c (can_work_offline):
5664 Implementation of CamelDiscoStore::can_work_offline. (Checks that
5665 the store has been used online at least once.)
5666 (imap_get_folder_online, imap_get_folder_offline): Deal with
5667 request for "inbox" properly. ("Don't you mean... 'INBOX'?").
5669 * providers/imap/camel-imap-folder.c (imap_cache_message):
5670 Implementation of CamelDiscoFolder::cache_message.
5672 * camel.h: Add camel-disco-store.h and camel-disco-folder.h
5674 2001-05-09 Jeffrey Stedfast <fejj@ximian.com>
5676 * camel-mime-part.c (camel_mime_part_set_content_id): Wrap the
5677 content-id with <>'s.
5679 2001-05-04 Jeffrey Stedfast <fejj@ximian.com>
5681 * providers/smtp/camel-smtp-transport.c (connect_to_server): Add
5682 support for using OpenSSL.
5684 * camel-remote-store.c (remote_connect): Add support for using the
5685 OpenSSL implementation.
5687 * camel-tcp-stream-ssl.c (ssl_bad_cert): Hmmmm, don't pass in a
5688 NULL as the last argument to alert_user - prototype doesn't take
5689 that argument anymore?
5691 * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_finalize):
5692 (ssl_verify): Use a global hash table to try and lookup the
5693 CamelTcpStreamOpenSSL object given the ssl context since OpenSSL
5694 doesn't think one needs to pass data around, we should all be
5695 living in a world of global variables, duh!
5697 2001-05-06 Dan Winship <danw@ximian.com>
5699 * Makefile.am (libcamelinclude_HEADERS): Fix another build
5700 problem. (Um, anyone else could have done this...)
5702 2001-05-04 Dan Winship <danw@ximian.com>
5704 * providers/imap/camel-imap-store.c (get_folder_online): Fix up
5705 refcounting on current_folder.
5707 * camel-disco-folder.c, camel-disco-store.h: Remove
5708 CamelDiscoDiary refs that weren't supposed to escape yet.
5710 2001-05-03 Dan Winship <danw@ximian.com>
5712 * camel-disco-store.c: new abstract class for disconnectable
5715 * camel-disco-folder.c: new abstract class for folders on
5716 disconnectable stores.
5718 * Makefile.am: Add camel-disco-folder.[ch] and
5719 camel-disco-store.[ch].
5721 * providers/imap/camel-imap-store.c: Make this a subclass of
5722 CamelDiscoStore, and fix up the offline interfaces for the changes
5723 since they were first written (particularly the fact that some
5724 IMAP stores don't just use subscribed folders).
5726 * providers/imap/camel-imap-folder.c: Make this a subclass of
5727 CamelDiscoFolder, although most ops still fail in disconnected
5730 * camel-store.c (camel_store_get_folder_info): Change gboolean,
5731 gboolean, gboolean to guint32 in the prototype for this function.
5733 * providers/local/camel-local-store.c (get_folder_info): Update
5734 for prototype change.
5736 2001-05-02 Dan Winship <danw@ximian.com>
5738 * providers/imap/camel-imap-store.h: Clean this up a bit. Add a
5739 "tag_prefix" member. Move "useful_lsub" into capabilities.
5741 * providers/imap/camel-imap-store.c (camel_imap_store_init):
5742 Initialize the tag_prefix, based on a static variable.
5744 * providers/imap/camel-imap-command.c (camel_imap_command): Use
5745 the store's tag_prefix character rather than "A" at the start of
5746 the tag. Makes the verbose debug output easier to parse when
5747 connected to multiple IMAP servers. (Well, unless you're connected
5748 to more than 26 servers...)
5750 * providers/imap/camel-imap-utils.c (imap_uid_array_to_set): Fix
5751 this up... it was losing count in some cases and giving a more
5752 verbose answer than it needed to.
5754 * providers/pop3/camel-pop3-store.c: Rescue the KPOP code from bit
5757 2001-05-01 Dan Winship <danw@ximian.com>
5759 * providers/imap/camel-imap-command.c (camel_imap_command): Redo
5760 command locking. Since command_lock is recursive, we can just get
5761 a lock here, and release it either on error, or when the caller
5762 frees the response data. (This simplifies a lot of stuff, and
5763 fixes some problems with camel_imap_folder_changed being called
5764 without the command_lock locked because of the 2001-03-22 change.)
5766 (camel_imap_response_free):
5767 (camel_imap_response_free_without_processing):
5768 (camel_imap_response_extract):
5769 (camel_imap_response_extract_continuation): These all take a
5770 CamelImapStore now as well, to deal with locking.
5772 * providers/imap/camel-imap-private.h: Add
5773 CAMEL_IMAP_STORE_ASSERT_LOCKED, which defaults to a noop, but can
5774 be made to call e_mutex_assert_locked.
5776 * providers/imap/camel-imap-folder.c, camel-imap-search.c,
5777 camel-imap-store.c: Simplify using new locking stuff. Add a few
5778 CAMEL_IMAP_STORE_ASSERT_LOCKED checks.
5780 2001-05-01 Dan Winship <danw@ximian.com>
5782 Support the IMAP UIDPLUS extension (RFC 2359), which lets you
5783 resync after disconnected operation more efficiently, but also
5784 makes it possible to do appends and moves/copies more efficiently
5787 * providers/imap/camel-imap-folder.c (imap_append_message): If the
5788 server supports UIDPLUS, grab the APPENDUID response and cache the
5789 message into the folder's message cache.
5790 (imap_copy_messages_to): Likewise, for COPYUID, copy any message
5791 parts we have cached between the source and destination folder
5793 (imap_get_message): If the entire message is already in the cache,
5794 just return that rather than building it from parts.
5795 (imap_update_summary): Fetch just the "UID FLAGS RFC822.SIZE" of
5796 the new messages first, then only fetch the headers for messages
5797 where we don't already have the headers cached.
5799 * providers/imap/camel-imap-message-cache.c: Add gtk-doc comments.
5800 (cache_put): Fix refcounting stuff here.
5801 (camel_imap_message_cache_insert_stream,
5802 camel_imap_message_cache_insert_wrapper): New.
5803 (camel_imap_message_cache_get): Fix a bug here so the memory
5804 caching actually works.
5805 (camel_imap_message_cache_copy): New routine, used by
5806 imap_copy_messages_to.
5808 * providers/imap/camel-imap-utils.c (imap_uid_set_to_array):
5809 Inverse operation of imap_uid_array_to_set. Used to parse COPYUID
5812 2001-04-30 Dan Winship <danw@ximian.com>
5814 * providers/imap/camel-imap-utils.c (imap_uid_array_to_set):
5815 New-and-improved version of get_uid_set() from
5816 camel-imap-folder.c. Looks at the summary as it goes so that if
5817 you ask for messages 5, 6, 8, and 9, and there is no message 7,
5818 then you get "5:9" instead of "5:6,8:9"
5820 * providers/imap/camel-imap-folder.c (imap_copy_messages_to): Use
5821 imap_uid_array_to_set() rather than get_uid_set().
5824 2001-04-27 Dan Winship <danw@ximian.com>
5826 * camel-session.c: Redo this a lot so that instead of having a
5827 class full of callbacks, we have a subclassable class. Also,
5828 replace the increasingly horrifying
5829 camel_session_query_authenticator with three new routines,
5830 camel_session_get_password, camel_session_forget_password, and
5831 camel_session_alert_user.
5833 * camel-pgp-context.c:
5834 * camel-pkcs7-context.c:
5835 * camel-smime-context.c:
5836 * providers/imap/camel-imap-store.c:
5837 * providers/pop3/camel-pop3-store.c:
5838 * providers/smtp/camel-smtp-transport.c:
5839 Use camel_session_get_password / camel_session_forget_password.
5841 * camel-tcp-stream-ssl.c (ssl_bad_cert): Use
5842 camel_session_alert_user.
5844 2001-04-26 Jeffrey Stedfast <fejj@ximian.com>
5846 * camel.c (camel_init): Automagically call camel_shutdown()
5848 (camel_init): Also initialize NSS databases as read/write for
5849 S/MIME and if NSS fails to init, try initializing with volatile
5852 * camel-file-utils.h: #include <sys/types.h> for off_t.
5854 2001-04-26 Dan Winship <danw@ximian.com>
5856 * camel-file-utils.c: New file, with the int, string, time_t, and
5857 off_t encode/decode routines from camel-folder-summary.c moved
5858 here and renamed, for the enjoyment of non-CamelFolderSummary
5861 * Makefile.am (libcamel_la_SOURCES): Add camel-file-utils.c
5862 (libcamelinclude_HEADERS): and camel-file-utils.h
5864 * camel-folder-summary.c: Remove functions that were moved to
5865 camel-file-utils.c, update uses of them for the new names.
5866 (camel_folder_summary_{en,de}code_token are still here.)
5868 * providers/local/camel-mbox-summary.c: Use camel_file_util_*
5871 * providers/imap/camel-imap-summary.c: Use camel_file_util_* names
5873 * providers/imap/camel-imap-store.c (imap_store_setup_online,
5874 imap_store_setup_offline): Use camel_file_util_* names, which
5875 makes much more sense since this isn't folder summary stuff.
5877 2001-04-26 Dan Winship <danw@ximian.com>
5879 * Makefile.am (INCLUDES): Remove UNICODE_CFLAGS (and some other
5880 stuff that's redundant with EXTRA_GNOME_CFLAGS)
5881 (libcamel_la_LIBADD): Replace UNICODE_LIBS with GAL_LIBS.
5883 * camel-search-private.c:
5884 * camel-pgp-context.c:
5885 * camel-mime-utils.c: Use gunicode interfaces rather than
5888 * camel-charset-map.c: Use gunicode rather than libunicode. (The
5889 charmap-regen code still depends on libunicode though.)
5891 * camel-mime-filter-charset.h:
5892 * tests/message/test2.c (convert): Use iconv rather than
5895 * providers/smtp/Makefile.am (libcamelsmtp_la_LIBADD):
5896 * providers/pop3/Makefile.am (libcamelpop3_la_LIBADD):
5897 * providers/local/Makefile.am (libcamellocal_la_LIBADD): Remove
5900 * camel.c (camel_init): Remove call to unicode_init.
5902 * camel-mime-parser.c: Remove unused unicode.h include.
5904 2001-04-26 Dan Winship <danw@ximian.com>
5906 * camel-service.c (get_host): Use e_gethostbyname_r.
5907 (camel_service_gethost): Remove unused var.
5909 2001-04-26 Not Zed <NotZed@Ximian.com>
5911 * Applied jacob's patches for e-poolv stuff.
5913 2001-04-23 Jeffrey Stedfast <fejj@ximian.com>
5915 * camel.h: Add camel-vee-folder.h and camel-digest-folder.h
5917 * camel-digest-folder.[c,h]: New class that can be used to browse
5918 a multipart/digest message as if it were a CamelFolder.
5920 2001-04-22 Jeffrey Stedfast <fejj@ximian.com>
5922 * camel-pgp-context.c (pgp_verify): Oops, don't use the return
5923 value of iconv() as a string length, it only tells us the number
5924 of non-reversable character conversions. This fixes it so we
5925 actually see the gpg output in the message viewer.
5927 2001-04-23 Mikael Hallendal <micke@codefactory.se>
5929 * providers/nntp/Makefile.am (INCLUDES):
5930 Changed GTK_INCLUDEDIR to EXTRA_GNOME_CFLAGS.
5932 2001-04-20 Jeffrey Stedfast <fejj@ximian.com>
5934 * camel-smime-context.c (smime_sign): Implemented using the
5935 secmime.h convenience functions.
5936 (smime_clearsign): We just error our here, there is no clearsign
5938 (smime_verify): Copied code over from the pkcs7 verify - same
5939 state, ugly and unknown :-)
5940 (smime_encrypt): Implemented using the secmime.h convenience
5942 (smime_decrypt): Same as the code in pkcs7-context.
5944 2001-04-19 Jeffrey Stedfast <fejj@ximian.com>
5946 * camel-pkcs7-context.c (pkcs7_sign): Implemented.
5947 (pkcs7_clearsign): Implemented.
5948 (get_zero_len_passwd): Convenience function to try a 0-length key
5949 on the certificate db - if this works then there is no need to
5951 (get_password): Callback to get the password.
5952 (camel_cipher_hash_to_nss): Convenience function to convert a
5953 CamelCipherHash to an NSS HASH_HashType.
5954 (nss_hash_to_sec_oid): Converts a HASH_HashType to a SecOidTag.
5955 (pkcs7_digest): Digest function for use with pkcs7_sign().
5956 (sign_encode_cb): Callback to write the signed data to the output
5958 (pkcs7_verify): Hacked on a bit more but am still a bit on the
5959 confused side. This might work but I wouldn't hold my breath. The
5960 sign/clearsign should be close if not correct, but this one...god
5962 (pkcs7_decrypt): Implemented.
5963 (pkcs7_encrypt): Implemented (mostly, still need to handle when
5966 2001-04-18 Dan Winship <danw@ximian.com>
5968 * providers/imap/camel-imap-store.c (camel_imap_store_finalize):
5969 Free base_url and storage_path.
5971 * providers/pop3/camel-pop3-store.c (finalize): Free the
5972 implementation string.
5973 (camel_pop3_command): Clarify documentation to mention that
5974 @ex isn't set (and *@ret is) on CAMEL_POP3_ERR.
5975 (connect_to_server): Set @ex properly on CAMEL_POP3_ERR.
5977 * providers/pop3/camel-pop3-folder.c (pop3_refresh_info,
5978 pop3_get_message): Set @ex properly on CAMEL_POP3_ERR.
5980 2001-04-17 Jeffrey Stedfast <fejj@ximian.com>
5982 * camel-pkcs7-context.[c,h]: New source files to handle Pkcs7
5983 encryption, decryption, signing, and verifying. Not yet
5984 complete. I'm sensing this is going to take a while seeing as how
5985 NSS is just so well documented.
5987 2001-04-17 Dan Winship <danw@ximian.com>
5989 * camel-filter-driver.c (camel_filter_driver_filter_message): Fix
5990 a memory leak in the error case.
5992 2001-04-16 Jeffrey Stedfast <fejj@ximian.com>
5994 * providers/local/camel-mbox-summary.c (summary_rebuild): Don't we
5995 want to tell where we are by using the start of the message? I
5996 think this should be using camel_mime_parser_tell_start_from()
5997 instead. Also divide by the size *before* multiplying by 100 so
5998 that we don't overflow the int which was giving us negative values
5999 for our progress status (oops).
6001 2001-04-16 Jeffrey Stedfast <fejj@ximian.com>
6003 * camel-operation.c: Added a prototype for stamp().
6005 * camel-charset-map.c (camel_charset_locale_name): #include
6006 string.h so we don't get a warning about strchr being undefined
6007 and also init charset to NULL.
6009 * camel-pgp-context.c (pgp_verify): Go back to doing the utf8
6010 conversion by hand so that we don't depend on gal.
6012 * Makefile.am: Remove the EXTRA_GNOME_CFLAGS include.
6014 * camel-store.c (camel_mkdir_hier): Convenience function that it
6015 seems a number of camel-store implementations used gal for.
6017 * providers/nntp/camel-nntp-store.c (ensure_news_dir_exists): Lets
6018 not depend on gal for just e_mkdir_hier() - use camel_mkdir_hier()
6021 * providers/nntp/camel-imap-store.c: Lets not depend on gal for
6022 just e_mkdir_hier() - use camel_mkdir_hier() instead.
6024 * camel-session.c (camel_session_get_storage_path): Don't depend
6025 on e_mkdir_heir() anymore, use the CamelStore version.
6027 * camel-folder-search.h: Removed gal dependency, why was this even
6028 there in the first place?
6030 * providers/imap/camel-imap-folder.c: Don't need gal/util/e-util.h
6033 * string-utils.c (strstrcase): New function, well more like old
6034 function brought back to life so we don't have to depend on gal.
6036 * providers/imap/camel-imap-store.c (imap_store_setup_online): Use
6037 strstrcase rather than e_strstrcase so we don't depend on gal.
6038 (get_unread_online): Same here.
6040 * providers/smtp/camel-smtp-transport.c (smtp_helo): Use
6043 2001-04-15 Jeffrey Stedfast <fejj@ximian.com>
6045 * camel-mime-utils.c (header_raw_check_mailing_list): regex
6046 doesn't set errno and regcomp returns 0 on success and any other
6047 value for an error (so don't *just* check for -1).
6049 2001-04-14 Jeffrey Stedfast <fejj@ximian.com>
6051 * camel-cipher-context.c: Check to make sure the context is a
6052 valid context in all the user functions.
6054 2001-04-13 Jon Trowbridge <trow@ximian.com>
6056 * providers/imap/camel-imap-store.c (imap_disconnect):
6057 s/imap_store/store/, fixing a typo that was causing the build to
6060 * camel-filter-search.c (get_source): Make the (previously unused)
6061 get-source command actually do the right thing, properly shrouding
6062 any passed-in source and falling back to use the source attached
6063 to the mime message.
6065 2001-04-13 Dan Winship <danw@ximian.com>
6067 * camel-object.c (camel_object_hook_event):
6068 * camel-uid-cache.c (camel_uid_cache_get_new_uids):
6069 * camel-url.c (camel_url_new_with_base): Plug leaks.
6071 * camel-remote-store.c (camel_remote_store_init): Don't
6072 re-initialize the folders hash table.
6074 * providers/imap/camel-imap-store.c (imap_disconnect): Free
6075 authtypes since they'll be re-read on re-connect.
6076 (get_folder_info): Free folderinfos that we're discarding from the
6079 2001-04-12 Jeffrey Stedfast <fejj@ximian.com>
6081 * camel-pgp-context.c (camel_pgp_context_get_type): Oops, lets not
6082 get into a recursive call here ;-)
6084 * tests/smime/pgp.c: Updated to reflect changes to the PGP code.
6086 * tests/smime/pgp-mime.c: Same.
6088 2001-04-12 Jeffrey Stedfast <fejj@ximian.com>
6090 * camel-pgp-mime.c: Updated to reflect the few changes made to the
6091 CamelPgpContext class.
6093 * camel-pgp-context.c: Updated to subclass of CamelCipherContext.
6095 * camel-cipher-context.[c,h]: New base class for
6096 CamelPgpContext. Also contains the replacement for
6097 CamelPgpValidity, CamelCipherValidity.
6099 2001-04-12 Dan Winship <danw@ximian.com>
6101 * camel-mime-filter-crlf.c (filter): Fix a pair of array bounds
6102 reads noted by purify
6104 2001-04-12 Jeffrey Stedfast <fejj@ximian.com>
6106 * camel.h: #include the pgp stuff.
6108 2001-04-12 Dan Winship <danw@ximian.com>
6110 * providers/imap/camel-imap-message-cache.c
6111 (camel_imap_message_cache_remove):
6112 * camel-url.c (camel_url_to_string): Plug memory leaks.
6114 2001-04-11 Dan Winship <danw@ximian.com>
6116 * providers/imap/camel-imap-utils.c (imap_parse_string_generic):
6117 Simplify peterw's imap_is_atom_char fix.
6119 2001-04-11 Jeffrey Stedfast <fejj@ximian.com>
6121 * tests/smime/Makefile.am: Added pgp-mime.c to the tests.
6123 * tests/smime/pgp-mime.c: Test suite for camel-pgp-mime.c functions.
6125 * Makefile.am: Add camel-pgp-mime.[c,h] to the build.
6127 * camel-pgp-mime.c: Made a number of fixes to get it to compile
6128 and also fixed a few logic errors (mostly forgetting to reset
6129 streams) so that it worked (thanks to the pgp-mime test program).
6131 2001-04-11 JP Rosevear <jpr@ximian.com>
6133 * providers/imap/Makefile.am: user GNOME_INCLUDEDIR since gnome
6134 files are included in the top level camel headers and the gtk
6135 include dir is now versioned and such
6137 * providers/local/Makefile.am: ditto
6139 * providers/pop3/Makefile.am: ditto
6141 * providers/smtp/Makefile.am: ditto
6143 * providers/sendmail/Makefile.am: ditto
6145 * camel-service.c: use five arg version of gethostbyname_r if
6147 (camel_get_host_byname): check if msg->herr is non-zero instead of
6148 checking if msg->hp is null since we may not always have msg->hp
6150 2001-04-11 Jeffrey Stedfast <fejj@ximian.com>
6152 * camel-sasl-digest-md5.c (digest_response): Use
6153 camel_charset_locale_name() to get the locale charset rather than
6154 checking the CHARSET environment variable. This is a much less
6155 ugly hack. Also: If we fail to be able to convert to UTF8, then
6156 disavow all knowledge of the charset parameter.
6158 * camel-charset-map.c (camel_charset_locale_name): New function to
6159 return the locale charset (or NULL if US-ASCII).
6161 2001-04-11 Jeffrey Stedfast <fejj@ximian.com>
6163 * camel-pgp-context.c (camel_pgp_verify): Use
6164 e_utf8_from_locale_string() rather than trying to do it manually
6165 since Lauris's version works much better.
6167 2001-04-06 Jeffrey Stedfast <fejj@ximian.com>
6169 * Makefile.am: Added camel-pgp-context.[c,h] to the build. Also
6170 added tests/smime/pgp.c and Makefile.am
6172 * tests/smime/pgp.c: New test suite for PGP functions.
6174 * camel-pgp-context.c: Various fixes to get it to build.
6176 2001-04-07 Peter Williams <peterw@ximian.com>
6178 * providers/imap/camel-imap-utils.c (imap_parse_string_generic): It
6179 would be a good idea to recognize '\0'. Before, this code was running
6180 off the ends of strings and intermittently coredumping (if it didn't
6181 hit an imap_atom_char first) -- whoops!
6183 2001-04-05 Not Zed <NotZed@Ximian.com>
6185 * merge from evolution-0-10-branch to evolution-0-10-merge-0
6187 2001-04-03 Jeffrey Stedfast <fejj@ximian.com>
6189 * Makefile.am: Added tests/ back in
6191 * camel-mime-utils.c (header_decode_text): Ignore whitespace
6192 between encoded words (there were a few cases where it didn't
6194 (header_encode_string): Preserve whitespace between words that are
6195 to be encoded by encoding them too.
6196 (header_encode_phrase): Same here but with phrases.
6198 2001-04-03 Dan Winship <danw@ximian.com>
6200 * providers/imap/camel-imap-folder.c (imap_sync): If we don't
6201 change any flags or expunge, send a NOOP to give the server a
6202 chance to send EXISTS, etc, messages.
6203 (imap_get_message): If the server_level < IMAP4rev1, always fetch
6204 messages all-at-once, since they don't support the [#.MIME]
6206 (imap_update_summary): When reading message flags, set the
6207 server_flags field as well, and don't overwrite any flags set by
6208 camel_folder_summary_info_new_from_message. Might help with some
6209 of the flag problems...
6211 2001-04-02 Dan Winship <danw@ximian.com>
6213 * camel-service.h: Remove the "quick_login" member, which is
6216 * providers/smtp/camel-smtp-transport.c (smtp_auth): Remove the
6217 references to quick_login and fix this to use the CamelSasl
6218 interfaces correctly to do the same thing.
6219 (connect_to_server): Split this out of smtp_connect
6220 (smtp_connect): Use connect_to_server. When re-EHLO'ing after
6221 auth, ignore errors.
6222 (query_auth_types): Use connect_to_server rather than
6223 smtp_connect, so it doesn't try to authenticate. Add LOGIN
6224 authtype to the list of authtypes to check for.
6226 * providers/smtp/camel-smtp-provider.c
6227 (camel_provider_module_init): Add LOGIN authtype to the authtypes
6230 * camel-sasl.c (camel_sasl_authtype_list): Don't list LOGIN here:
6231 it's not a real SASL authtype and is only used for SMTP.
6233 * camel-sasl-plain.c:
6234 * camel-sasl-login.c:
6235 * camel-sasl-kerberos4.c:
6236 * camel-sasl-cram-md5.c:
6237 * camel-sasl-anonymous.c:
6238 * providers/pop3/camel-pop3-provider.c: Remove "quick_login"
6239 argument from authtypes.
6241 2001-04-02 Gediminas Paulauskas <menesis@delfi.lt>
6243 * camel-filter-driver.c: marked missing report status' for translation.
6245 2001-04-02 Jeffrey Stedfast <fejj@ximian.com>
6247 * camel-pgp-context.c (camel_pgp_sign): mutex lock & unlock the
6249 (camel_pgp_clearsign): Same.
6250 (camel_pgp_verify): Same.
6251 (camel_pgp_encrypt): Same.
6252 (camel_pgp_decrypt): And finally here...
6254 * camel-pgp-context.h: Update the function prototypes to match
6255 those found in camel-pgp-context.c.
6257 * camel-pgp-context.c: Updated.
6259 * camel-pgp-mime.c (camel_pgp_mime_part_sign): Implemented.
6260 (camel_pgp_mime_part_verify): Implemented.
6261 (camel_pgp_mime_part_encrypt): Implemented.
6262 (camel_pgp_mime_part_decrypt): Implemented.
6264 2001-04-01 Jeffrey Stedfast <fejj@ximian.com>
6266 * camel-sasl-login.[c,h]: New files to handle the LOGIN SASL
6269 * camel-sasl-plain.c: Removed the definition of
6270 camel_sasl_login_authtype.
6272 * camel-sasl.c (camel_sasl_new): Oops. I thought LOGIN was an
6273 alias to PLAIN. I was wrong. These two SASL objects have to be
6276 * providers/smtp/camel-smtp-transport.c (smtp_auth): Updated to
6277 check for and use authmech->quick_login when available.
6279 2001-04-01 Jeffrey Stedfast <fejj@ximian.com>
6281 * providers/pop3/camel-pop3-provider.c: Updated the authtypes here
6284 * camel-sasl-plain.c:
6285 * camel-sasl-anonymous.c:
6286 * camel-sasl-digest-md5.c:
6287 * camel-sasl-cram-md5.c:
6288 * camel-sasl-kerberos4.c: Updated the authtype values.
6290 * camel-service.h: Added another field to CamelServiceAuthType
6291 that specifies whether or not the mechanism supports "quick auth"
6292 which means that the client can send the initial challenge in the
6295 * camel-sasl.c (camel_sasl_new): Add support for LOGIN.
6296 (camel_sasl_authtype_list): Here too.
6297 (camel_sasl_authtype): And finally here.
6299 * camel-sasl-plain.c: Define camel_sasl_login_authtype.
6301 * providers/smtp/camel-smtp-transport.c (smtp_auth): Only unref
6302 the SASL object if it exists.
6304 2001-03-30 Dan Winship <danw@ximian.com>
6306 * providers/pop3/camel-pop3-store.c (connect_to_server,
6307 query_auth_types, pop3_connect): Move things around here to make
6308 this all work right again (so you don't get prompted for a
6309 password when checking the supported authtypes.)
6311 2001-03-30 Jon Trowbridge <trow@ximian.com>
6313 * camel-mime-message.c (camel_mime_message_set_source): Shrould
6314 our source URL before putting it into X-Evolution-Source.
6316 2001-03-29 Jeffrey Stedfast <fejj@ximian.com>
6318 * providers/imap/camel-imap-store.c (get_folder_info): Don't
6319 blindly append "/INBOX", construct a CamelURL and set the path
6321 (parse_list_response_as_folder_info): Don't blindly append
6322 "/<foldername>", construct a CamelURL and set the path that way
6324 (get_folders_offline): And again here.
6326 2001-03-30 Not Zed <NotZed@Ximian.com>
6328 * camel-service.c (camel_get_host_byname): Dont overwrite an
6329 exception if we got one already. Added camel_operation status to
6330 it, and comment out some debug.
6332 2001-03-29 Not Zed <NotZed@Ximian.com>
6334 * providers/smtp/camel-smtp-transport.c (smtp_connect): Free host
6335 name info when done ... blah blah.
6337 * camel-sasl-kerberos4.c (krb4_challenge): Free host name info
6338 after we're done with it.
6340 * camel-sasl-digest-md5.c (digest_md5_challenge): Free host name
6341 info after we're done with it.
6343 * camel-remote-store.c (remote_connect): Free the host name info
6344 from get_host after we're finished with it.
6346 * camel-service.c (camel_get_host_byname): New function to
6347 lookup a name, and still be cancellable.
6348 (camel_free_host): And a function to free the structure
6350 (camel_service_gethost): Call get_host_byname for this.
6352 2001-03-29 Jon Trowbridge <trow@ximian.com>
6354 * camel-filter-driver.c (camel_filter_driver_filter_message): Save
6355 the source URL using camel_mime_message_set_source.
6357 * camel-mime-message.c (camel_mime_message_set_source): Renamed
6358 camel_mime_message_set_identity to this. Sets the X-Evolution-Source
6360 (camel_mime_message_get_source): Returns the X-Evolution-Source
6363 2001-03-29 Kjartan Maraas <kmaraas@gnome.org>
6365 * broken-date-parser.c: #include <stdio.h>, <stdlib.h> and <string.h>
6366 * broken-date-parser.h: Remove all includes but <glib.h>
6367 * camel-address.h: Added #include <glib.h>
6368 * camel-data-wrapper.c: Move system includes to the top.
6369 * camel-data-wrapper.h: #include <glib.h>
6370 * camel-exception.c: #ifdef HAVE_CONFIG_H
6371 * camel-exception.h: Remove #include <glib.h>
6372 * camel-filter-driver.c: #ifdef HAVE_CONFIG_H and move system
6373 headers to top. Mark strings in camel_exception_set*() for i18n.
6374 * camel-filter-driver.h: #include <glib.h>
6375 * camel-filter-search.c: #ifdef HAVE_CONFIG_H
6376 * camel-folder-search.c: #include <config.h>
6377 * camel-folder-search.h: Header shuffling
6378 * camel-folder-summary.h: Same here
6379 * camel-folder-thread.c: #ifdef HAVE_CONFIG_H
6380 * camel-folder.c: Here too.
6381 * camel-folder.h: #include <glib.h>
6382 * camel-internet-address.c: Move system headers up
6383 * camel-lock.c: #ifdef HAVE_CONFIG_H
6384 * camel-medium.c: Same here
6385 * camel-mime-filter-bestenc.c: Move system headers up
6386 * camel-mime-filter-from.c: Same here
6387 * camel-mime-filter-linewrap.c: And here
6388 * camel-mime-filter.c: #include <string.h> to fix warnings from new gcc
6389 * camel-mime-filter.h: System headers moved up
6390 * camel-mime-message.c: Here too. #ifdef HAVE_CONFIG_H added
6391 * camel-mime-part-utils.c: #ifdef HAVE_CONFIG_H added
6392 * camel-mime-part.c: Here too, and shuffle headers
6393 * camel-mime-utils.c: #ifdef HAVE_CONFIG_H. Remove const from two
6394 variables to remove warning.
6395 * camel-mime-utils.h: Shuffle headers
6396 * camel-movemail.c: #ifdef HAVE_CONFIG_H. Mark string in camel_exception_set
6397 * camel-multipart.c: #ifdef HAVE_CONFIG_H. Added includes to remove
6398 warnings from new gcc
6399 * camel-object.c: #ifdef HAVE_CONFIG_H
6400 * camel-object.h: Shuffle headers
6401 * camel-operation.c: #ifdef HAVE_CONFIG_H
6402 * camel-provider.c: #ifdef HAVE_CONFIG_H. Shuffle headers. Mark a string
6403 * camel-remote-store.c: #ifdef HAVE_CONFIG_H
6404 * camel-sasl-anonymous.c: #ifdef HAVE_CONFIG_H. #include <string.h>
6405 * camel-sasl-cram-md5.c: #ifdef HAVE_CONFIG_H. #include <string.h> and
6406 <stdio.h> to remove warnings.
6407 * camel-sasl-digest-md5.c: #ifdef HAVE_CONFIG_H. shuffle headers
6408 * camel-sasl-digest-md5.h: Shuffle headers.
6409 * camel-sasl-kerberos4.c: #ifdef HAVE_CONFIG_H. Shuffle headers.
6410 * camel-sasl-kerberos4.h: Shuffle headers.
6411 * camel-sasl-plain.c: #ifdef HAVE_CONFIG_H. Shuffle
6412 * camel-sasl.c: #ifdef HAVE_CONFIG_H. #include <string.h>
6413 * camel-search-private.c: #include <config.h>
6414 * camel-seekable-stream.c: #ifdef HAVE_CONFIG_H
6415 * camel-seekable-stream.h: Shuffle
6416 * camel-seekable-substream.c: #ifdef HAVE_CONFIG_H
6417 * camel-service.c: Same
6418 * camel-service.h: Shuffle
6419 * camel-session.c: #ifdef HAVE_CONFIG_H
6420 * camel-store.c: Same
6421 * camel-stream-buffer.c: Here too
6422 * camel-stream-buffer.h: Shuffle
6423 * camel-stream-filter.c: #include <string.h>
6424 * camel-stream-fs.c: #ifdef HAVE_CONFIG_H
6425 * camel-stream-fs.h: Shuffle headers
6426 * camel-stream-mem.c: Same as above
6427 * camel-stream-mem.h: Here too
6428 * camel-stream-null.c: #ifdef HAVE_CONFIG_H
6429 * camel-stream.c: Here too
6430 * camel-stream.h: Shuffle
6431 * camel-tcp-stream-openssl.c: #ifdef HAVE_CONFIG_H
6432 * camel-tcp-stream-raw.c: Same here. and move local includes down
6433 * camel-tcp-stream-ssl.c: Same as above
6434 * camel-tcp-stream.c: #ifdef HAVE_CONFIG_H
6435 * camel-tcp-stream.h: move local include down
6436 * camel-transport.c: #ifdef HAVE_CONFIG_H
6437 * camel-transport.h: #include <glib.h>
6438 * camel-uid-cache.c: #ifdef HAVE_CONFIG_H. Shuffle headers
6439 * camel-uid-cache.h: Shuffle
6440 * camel-url.c: #ifdef HAVE_CONFIG_H
6441 * camel-vee-folder.c: #ifdef HAVE_CONFIG_H. Shuffle headers
6442 * camel-vee-folder.h: #include <glib.h>
6443 * camel-vee-store.h: Same here
6444 * camel.c: #ifdef HAVE_CONFIG_H
6445 * gstring-util.c: Here too
6446 * hash-table-utils.c: Remove #include <glib.h>
6447 * hash-table-utils.h: #include it here instead.
6448 * string-utils.c: #ifdef HAVE_CONFIG_H
6449 * providers/cache/camel-cache-map.c: #ifdef HAVE_CONFIG_H, shuffle
6450 headers and mark strings in camel_exception_set*()
6451 * providers/cache/camel-cache-provider.c: #ifdef HAVE_CONFIG_H
6452 * providers/cache/camel-cache-store.c: Same here, and mark a string.
6453 * providers/imap/camel-imap-command.c: #ifdef HAVE_CONFIG_H
6454 * providers/imap/camel-imap-command.h: Shuffle header
6455 * providers/imap/camel-imap-folder.c: #ifdef HAVE_CONFIG_H
6456 * providers/imap/camel-imap-message-cache.c: #ifdef HAVE_CONFIG_H
6457 * providers/imap/camel-imap-provider.c: #ifdef HAVE_CONFIG_H and
6459 * providers/imap/camel-imap-search.c: #ifdef HAVE_CONFIG_H
6460 * providers/imap/camel-imap-store.c: #ifdef HAVE_CONFIG_H and mark
6462 * providers/imap/camel-imap-summary.c: Shuffle headers
6463 * providers/imap/camel-imap-wrapper.c: #ifdef HAVE_CONFIG_H. Shuffle
6464 * providers/local/camel-local-folder.c: #ifdef HAVE_CONFIG_H
6465 * providers/local/camel-local-provider.c: #ifdef HAVE_CONFIG_H
6466 * providers/local/camel-local-store.c: Same here
6467 * providers/local/camel-local-summary.c: Here too, shuffle, mark a string
6468 * providers/local/camel-maildir-folder.c: #ifdef HAVE_CONFIG_H
6469 * providers/local/camel-maildir-store.c: Same
6470 * providers/local/camel-maildir-summary.c: Here too
6471 * providers/local/camel-mbox-summary.c: And here
6472 * providers/local/camel-mbox-store.c: And here
6473 * providers/local/camel-mbox-summary.c: #include <config.h>
6474 * providers/local/camel-mh-folder.c: #ifdef HAVE_CONFIG_H
6475 * providers/local/camel-mh-store.c: same
6476 * providers/local/camel-mh-summary.c: #ifdef HAVE_CONFIG_H, shuffle headers
6477 and mark a string for translation.
6478 * providers/nntp/camel-nntp-auth.c: #include <config.h>
6479 * providers/nntp/camel-nntp-store.c: Remove superfluous arg to
6480 CAMEL_SERVICE_CLASS to make it compile
6481 * providers/pop3/camel-pop3-provider.c: #ifdef HAVE_CONFIG_H
6482 * providers/pop3/camel-pop3-store.c: Same here
6483 * providers/sendmail/camel-sendmail-provider.c: Here too
6484 * providers/sendmail/camel-sendmail-transport.c: Here too
6485 * providers/smtp/camel-smtp-provider.c: Same
6486 * providers/smtp/camel-smtp-transport.c: #ifdef HAVE_CONFIG_H, mark
6487 strings for translations.
6489 2001-03-29 Dan Winship <danw@ximian.com>
6491 * camel-url.c (camel_url_to_string): change "gboolean show_passwd"
6494 * tests/misc/url.c (main): Update calls to camel_url_to_string
6496 * providers/imap/camel-imap-store.c (construct): Call
6497 camel_url_to_string with flags to hide password, authtype, and
6498 params to create the base_url.
6499 (etc): Update for the fact that the base_url no longer has the "/"
6502 * camel-service.c (construct): Update calls to camel_url_to_string
6503 (pass CAMEL_URL_HIDE_PASSWORD)
6505 2001-04-03 Jeffrey Stedfast <fejj@ximian.com>
6507 * camel-mime-utils.c (header_decode_text): Ignore whitespace
6508 between encoded words (there were a few cases where it didn't
6510 (header_encode_string): Preserve whitespace between words that are
6511 to be encoded by encoding them too.
6512 (header_encode_phrase): Same here but with phrases.
6514 2001-04-04 Kjartan Maraas <kmaraas@gnome.org>
6516 * camel-filter-driver.c: Added #include <config.h>. Marked
6517 a bunch of strings for translation.
6518 * camel-folder-search.c: Added #include <config.h>.
6519 * camel-folder-summary.c: Same here.
6520 * camel-movemail.c: Marked strings for translation.
6521 * camel-provider.c: Same here.
6522 * camel-search-private.c: #include <config.h>
6523 * camel-vee-folder.c: Mark string for translation.
6524 * providers/local/camel-mbox-summary.c: #include <config.h>
6526 2001-04-03 Dan Winship <danw@ximian.com>
6528 * providers/imap/camel-imap-folder.c (imap_sync): If we don't
6529 change any flags or expunge, send a NOOP to give the server a
6530 chance to send EXISTS, etc, messages.
6531 (imap_get_message): If the server_level < IMAP4rev1, always fetch
6532 messages all-at-once, since they don't support the [#.MIME]
6535 2001-04-01 Jeffrey Stedfast <fejj@ximian.com>
6537 * providers/imap/camel-imap-store.c (get_folder_info): Don't
6538 blindly append "/INBOX", construct a CamelURL and set the path
6540 (parse_list_response_as_folder_info): Don't blindly append
6541 "/<foldername>", construct a CamelURL and set the path that way
6543 (get_folders_offline): And again here.
6545 2001-03-31 Not Zed <NotZed@Ximian.com>
6547 * camel-operation.c (struct _status_stack): change stamp to
6548 unsigned to avoid overflow.
6549 (camel_operation_end):
6550 (camel_operation_progress_count):
6551 (camel_operation_progress): Double the delay before transient
6552 events start showing their own progress.
6554 2001-03-30 Not Zed <NotZed@Ximian.com>
6556 * providers/pop3/camel-pop3-folder.c (pop3_get_message): Change
6557 the pop download into a transient event.
6559 * camel-operation.c (stamp): Get a timestamp that changes 4x a
6560 second (or rather, arbitrarily more often than 1/second).
6561 (camel_operation_progress): Use stamp() for time updates.
6562 (camel_operation_progress_count): "
6563 (camel_operation_start): Store the status as a struct status_stack
6565 (camel_operation_start_transient): New function to start a
6566 transient event, which is only reported if it runs for too
6567 long/and is reset afterwards.
6568 (camel_operation_progress):
6569 (camel_operation_progress_count): Fix for status_stack changes,
6570 and account for transient updates.
6572 * camel-filter-driver.c (camel_filter_driver_filter_folder): When
6573 we remove things (set deleted), always set seen too, to mirror
6574 interface behaviour when you delete.
6575 (camel_filter_driver_filter_message): And same here too.
6577 2001-03-30 Dan Winship <danw@ximian.com>
6579 * providers/pop3/camel-pop3-store.c (connect_to_server,
6580 query_auth_types, pop3_connect): Move things around here to make
6581 this all work right again (so you don't get prompted for a
6582 password when checking the supported authtypes.)
6584 2001-03-29 Dan Winship <danw@ximian.com>
6586 * camel-url.c (camel_url_to_string): change "gboolean show_passwd"
6589 * tests/misc/url.c (main): Update calls to camel_url_to_string
6591 * providers/imap/camel-imap-store.c (construct): Call
6592 camel_url_to_string with flags to hide password, authtype, and
6593 params to create the base_url.
6594 (etc): Update for the fact that the base_url no longer has the "/"
6597 * camel-service.c (construct): Update calls to camel_url_to_string
6598 (pass CAMEL_URL_HIDE_PASSWORD)
6600 2001-03-28 Jeffrey Stedfast <fejj@ximian.com>
6602 * camel-pgp-context.[c,h]: New class for PGP encrypting,
6603 decrypting, signing and verifying. Next I'll be moving the
6604 contents of mail/mail-crypto into Camel. These files will
6605 basically replace mail/openpgp-utils.[c,h].
6607 2001-03-29 Not Zed <NotZed@Ximian.com>
6609 * camel-folder-search.c (search_body_contains): Optimise the match
6610 "" case, just match everything in the folder (if we have it).
6612 * camel-vtrash-folder.c (vtrash_move_messages_to): Access the
6613 folder directly from the message info.
6614 (vtrash_move_messages_to): I think we also need to call the real
6615 move_messages_to, and not try and bypass the lock, since we dont
6616 have the lock for that folder.
6618 * camel-vee-folder.h: Move CamelVeeMessageInfo to public, so
6619 subclasses can get to it.
6621 * camel-vee-folder.c (camel_vee_folder_add_folder): Dont let you
6622 add a vfolder to itself.
6624 (vee_folder_remove_folder):
6625 (vee_folder_build_folder): Copy changes before triggering changed
6626 events, so we can do them outside of locks.
6627 (camel_vee_folder_get_message_folder): Removed function.
6628 (camel_vee_folder_hash_folder): Made public (renamed from
6629 hash_folder), simply for subclasses (probably not needed).
6630 (vee_expunge): Oops, call the class sync, not superclass sync.
6631 (vee_sync): Remove some accidental debug.
6633 2001-03-27 Jeffrey Stedfast <fejj@ximian.com>
6635 * camel-service.c (get_path): Add the port (if user defined) to
6636 the path to fix bug #1996.
6638 Danw: I'm iffy on the "fix" so I'd like you to comment.
6640 2001-03-27 Jeffrey Stedfast <fejj@ximian.com>
6642 * providers/pop3/camel-pop3-folder.c (pop3_sync): If we aren't
6643 going to even check the resp/free buffer that gets returned from
6644 camel_pop3_command, don't even bother using it. Send in NULL
6646 (pop3_get_message): Check to make sure that the `result' string is
6647 non-NULL. It's possible that some POP servers may return with
6648 "+OK\r\n<message>..." rather than the expected
6649 "+OK ### octets\r\n<message>..."
6651 2001-03-27 Not Zed <NotZed@Ximian.com>
6653 * camel-folder-summary.c (camel_folder_summary_finalize): Unref
6654 the html filter when done.
6655 (summary_build_content_info): Disable using the html parser to
6656 help index html mails until it gets sorted out.
6658 * camel-vee-folder.c (folder_changed): Fix a cut n paste bug, we
6659 want uid_removed not uid_changed deref, fixes bug #1999.
6661 2001-03-27 Dan Winship <danw@ximian.com>
6663 * camel-sasl.c (camel_sasl_authtype_list): add an argument to say
6664 whether or not you want "PLAIN" in the list (so you don't end up
6665 with "Password" twice in the config dialog).
6667 * providers/imap/camel-imap-provider.c (camel_provider_module_init):
6668 * providers/imap/camel-imap-store.c (query_auth_types): We don't
6671 * providers/smtp/camel-smtp-provider.c (camel_provider_module_init):
6672 * providers/smtp/camel-smtp-transport.c (query_auth_types): But we
6675 2001-03-27 Dan Winship <danw@ximian.com>
6677 * camel-provider.h: Add an "extra_conf" field to CamelProvider
6678 with structures and defines and stuff, for providers to specify
6679 additional configuration options that they want. Also add a
6680 "supports ssl" flag to the provider flags.
6682 * camel-url.c (camel_url_new_with_base): Fix parsing of params.
6683 (output_param): And unparsing...
6685 * camel-remote-store.c: add a "default_ssl_port" field.
6686 (remote_construct): If the URL has the "use_ssl" parameter, set
6687 the store's use_ssl flag.
6688 (remote_connect): If using SSL and no port specified, use the
6689 default_ssl_port rather than the default_port.
6691 * providers/smtp/camel-smtp-provider.c (smtp_provider): add
6692 CAMEL_PROVIDER_SUPPORTS_SSL and CAMEL_URL_ALLOW_USER. (The config
6693 gui code knows that the ALLOW_USER and ALLOW_AUTH go together.)
6694 (ssmtp_provider): gone
6696 * providers/smtp/camel-smtp-transport.c (smtp_construct): Set a
6697 flag if "use_ssl" param is set.
6698 (smtp_connect): Check the CamelSmtpTransport use_ssl flag rather
6699 than checking if this is smtp or ssmtp.
6701 * providers/imap/camel-imap-provider.c (imap_conf_entries): Add a
6702 bunch of IMAP-specific configuration options, like "check for new
6703 mail in all folders" (default TRUE), "show only subscribed
6704 folders" (default TRUE), "ignore server-supplied namespace", and
6705 "apply filters to INBOX" (not yet implemented).
6706 (imap_provider): We support SSL and we no longer allow a path in
6707 the URL. (namespace is handled via extra_conf)
6708 (simap_provider): Gone
6710 * providers/imap/camel-imap-store.c (camel_imap_store_init): Set
6711 default_ssl_port, don't set CAMEL_STORE_SUBSCRIPTIONS here
6712 (construct): remove simap stuff, deal with "use_lsub",
6713 "namespace", "check_all", and "filter" parameters. Set base_url
6714 to not include params.
6715 (imap_store_setup_online): Don't ask for the namespace if it was
6716 set explicitly. Don't get subscribed folders if !use_lsub.
6717 (imap_concat): Fix a bug.
6718 (get_folder_info): Support for not checking all folders.
6720 * providers/imap/camel-imap-folder.c (imap_get_full_name): Rewrite
6721 to use imap_store->namespace, not service->url->path
6723 * providers/pop3/camel-pop3-provider.c (pop3_conf_entries): "keep
6724 on server" (currently still implemented by the mailer code, not
6725 here), "delete after N days" (not yet implemented).
6726 (pop3_provider): we support SSL
6727 (spop_provider): gone
6729 * providers/pop3/camel-pop3-store.c (camel_pop3_store_init): Set
6731 (pop3_connect): Remove spop code
6733 2001-03-26 Jeffrey Stedfast <fejj@ximian.com>
6735 * camel-vee-folder.c (vee_folder_construct): Move all of the
6736 camel_vee_folder_construct() internals here.
6737 (camel_vee_folder_construct): This function basically becomes a
6738 wrapper for vee_folder_construct and also checks to make sure that
6739 the UNMATCHED vfodler is constructed otherwise constructs it.
6740 (camel_vee_folder_new): Call vee_folder_construct() instead so
6741 that we don't get into a dead-lock.
6743 2001-03-26 Jeffrey Stedfast <fejj@ximian.com>
6745 * camel-store.c (init_trash): Use camel_vtrash_folder_new() to
6746 create the vtrash folder now.
6748 * camel-vtrash-folder.[c,h]: New subclass of CamelVeeFolder for
6751 * camel-folder.c (camel_folder_copy_messages_to): Don't watch for
6752 vtrash folders anymore.
6753 (camel_folder_move_messages_to): Same.
6755 * camel-vee-folder.c (camel_vee_folder_class_init): Update.
6756 (vee_move_messages_to): Rewrite to use the new move API.
6758 * camel-filter-driver.c (do_copy): Updated to reflect
6759 copy_message_to changes. Create a temporary uid array and use
6762 (camel_filter_driver_filter_message): And again, here...
6764 * providers/imap/camel-imap-folder.c (imap_copy_messages_to):
6765 Update to the new API.
6766 (imap_move_messages_to): Same.
6767 (get_uid_set): New function to create a `set' string based on an
6768 array of UIDs for use with imap_copy_messages_to.
6770 * camel-folder.c (camel_folder_copy_messages_to): Replaces
6771 camel_folder_copy_message_to
6772 (camel_folder_move_message_to): Replaces
6773 camel_folder_move_message_to.
6775 2001-03-27 Not Zed <NotZed@Ximian.com>
6777 * camel-vee-store.c (vee_get_folder): Added folder_created event
6780 * camel-vee-folder.c (unmatched_finalise): Removed, moved into
6782 (message_changed): Just create a new change entry and promote it
6783 to a folder_changed thing.
6784 (vee_sync): Always rebuild folder on sync, even when not expunge.
6785 (folder_changed): If not autoupdating, make sure we remove any
6787 (vee_folder_build_folder):
6788 (vee_folder_remove_folder): NOP if we're called on
6790 (vee_search_by_expression): Only search each folder once. Should
6791 we also order the result in summary order?
6793 2001-03-20 Not Zed <NotZed@Ximian.com>
6795 * camel-store.c (init_trash): Fix calling for vee_folder_new().
6797 * camel-folder-summary.c (camel_folder_summary_remove_index):
6798 Optimise slightly, use ptr_array_remove_index rather than have to
6799 search for the index by using summary_remove.
6801 * camel-vee-folder.h: Removed local member from VeeFolder, since
6804 * camel-vee-store.c (camel_vee_store_finalise): Setup finalise
6807 * camel-vee-folder.c (camel_vee_folder_set_expression): New
6808 function to set the query of an existing vfolder.
6809 (camel_vee_folder_construct): New function for
6810 convenience/subclasses.
6811 (camel_vee_folder_new): Removed exception parameter, no longer
6812 needed (since we dont search yet).
6813 (camel_vee_folder_new): Changed to use folder_construct, and no
6814 longer raise the folder created signal.
6815 (vee_folder_build_folder): Make it return error on exception, so
6816 we can work without exceptions.
6817 (vee_folder_remove_folder): Use remove index rather than
6818 remove_uid, this is ok since we have the summary locked for our
6820 (camel_vee_folder_add_folder): Only add the folder to the
6821 unmatched private if it is not a private folder.
6822 (camel_vee_folder_remove_folder): Only remove the folder from
6823 unmatched if it is not private.
6824 (vee_expunge): Just call sync with expunge set.
6825 (vee_sync): If expunging, also refresh the search.
6826 (vee_folder_build_folder): We do our own locking now, removed from
6827 callers, also trigger changed events here too (within locks),
6828 fixed callers appropriately.
6829 (vee_folder_remove_folder): Do our own locking, and trigger
6831 (vee_folder_add_info): Renamed of vee_folder_add, we now take a
6832 hash of the folder name, rather than use the folders address.
6833 (hash_folder): Convert a folder name into an 8 character hash.
6834 (vee_get_message, vee_search_by_expression, vee_set_message_flags,
6835 vee_set_message_user_flag, vee_move_message_to): Changed the uid
6836 to be an 8 byte hash + original uid, with no ':' anymore.
6838 2001-03-26 Jeffrey Stedfast <fejj@ximian.com>
6840 * camel-mime-utils.c (header_decode_text): When writing the last
6841 token (if not rfc2047 encoded), don't use g_string_append_len, use
6844 * camel-mime-message.c (write_to_stream): Don't spew a warning if
6845 the message-id wasn't set by the application, not a big deal since
6846 we create one right here.
6848 2001-03-26 Dan Winship <danw@ximian.com>
6850 * providers/imap/camel-imap-command.c (camel_imap_command): keep a
6851 reference on the store's current_folder.
6853 * providers/imap/camel-imap-store.c (camel_imap_store_finalize):
6854 (imap_disconnect): unref the current_folder before clearing it.
6856 * camel-url.c (camel_url_get_param): Add missing accessor.
6858 * camel-session.c (camel_session_get_provider): New. Return
6859 the provider for a URL.
6861 2001-03-25 Dan Winship <danw@ximian.com>
6863 * camel-url.c (camel_url_new_with_base): New URL parser with full
6864 RFC1808 relative URL support. Yum.
6865 (camel_url_new): Wrapper around camel_url_new_with_base now.
6867 * tests/Makefile.am: add misc subdir
6869 * tests/misc/url.c: relative URL test cases from RFC 1808
6871 2001-03-25 Jeffrey Stedfast <fejj@ximian.com>
6873 * camel-filter-driver.c (do_copy): Don't use copy_to if the source
6874 folder doesn't support summary info's.
6876 (camel_filter_driver_filter_message): And again here. I think
6877 this will fix the problem of "colour" tags not staying with the
6878 message when it's copied to a folder during the filter process.
6880 2001-03-24 Jeffrey Stedfast <fejj@ximian.com>
6882 * camel-sasl-digest-md5.c (digest_response): Do charset conversion
6883 on the username param here if needed.
6884 (parse_server_challenge): Protect against possibly empty-string
6887 2001-03-23 Jon Trowbridge <trow@ximian.com>
6889 * camel-filter-driver.c (camel_filter_driver_filter_message):
6890 Don't call camel_mime_message_set_identity. (The call is
6891 commented out, left over from some earlier experimentation that I
6892 want to be able to remember later...)
6894 * camel-mime-message.c (camel_mime_message_set_identity): Added.
6895 A function to set the X-Evolution-Identity header.
6897 2001-03-22 Dan Winship <danw@ximian.com>
6899 * providers/imap/camel-imap-command.c (imap_read_response): Don't
6900 look at untagged responses other than "* BYE"...
6901 (camel_imap_response_free): ...do it here instead...
6902 (camel_imap_response_free_without_processing): ...but not here.
6904 * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
6905 Remove the "EXISTS" line from the response so
6906 camel_imap_response_free won't try to process it.
6907 (camel_imap_folder_selected): If we get an EXISTS response mixed
6908 in with the FETCH responses, record the new EXISTS value.
6909 Use camel_imap_response_free_without_processing so that an EXISTS
6910 response won't cause a loop.
6911 (imap_rescan): Use camel_imap_response_free_without_processing.
6912 (imap_update_summary): Use
6913 camel_imap_response_free_without_processing. If an EXISTS response
6914 shows up, call imap_update_summary again to get the new messages.
6915 (imap_protocol_get_summary_specifier): Use BODY.PEEK[0], not
6916 RFC822.HEADER for prev IMAP4rev1, since the FETCH parser won't
6917 deal with RFC822.HEADER responses.
6919 * providers/imap/camel-imap-store.c (get_folder_info): Fix an
6920 uninitialized variable
6922 2001-03-21 Dan Winship <danw@ximian.com>
6924 * camel-provider.h: (CamelProvider) add a "GList *authtypes", so
6925 you can get the list of authtypes used by a provider without
6926 needing to have an actual CamelService object handy. (Will be
6927 needed by the new config druid.)
6928 (CAMEL_PROVIDER_ALLOWS, CAMEL_PROVIDER_NEEDS): New macros to test
6929 the URL part stuff, since the way it works is too complicated and
6930 everyone always does it wrong.
6932 * camel-service.c (camel_service_query_auth_types): Remove the
6933 @connected arg again: if you don't want to connect, you can just
6934 get the list of authtypes off the provider.
6935 (camel_service_free_auth_types): Remove this. All existing
6936 implementations do authtypes the same way, so just say the caller
6937 should "g_list_free" the list. (Oh, look, removing this function
6938 doesn't actually cause the mailer to not build. How 'bout that.)
6939 (construct, get_path): Use the new URL part macros.
6941 * camel-remote-store.c (remote_query_auth_types): Update
6942 (remote_free_auth_types): Nuke
6943 (camel_remote_store_authtype_list): New function for use by
6946 * providers/imap/camel-imap-provider.c:
6947 * providers/pop3/camel-pop3-provider.c:
6948 * providers/smtp/camel-smtp-provider.c: Update CamelProvider
6950 (camel_provider_module_init): Put all the SSL parts together so
6951 there's only 1 #ifdef. Set up the provider authtypes field using
6952 the SASL, CamelRemoteStore, and standard authtypes, as
6953 appropriate. Copy that from the normal provider to the SSL
6956 * providers/local/camel-local-provider.c:
6957 * providers/sendmail/camel-sendmail-provider.c:
6958 * camel-session.c: Update CamelProvider structures.
6960 * providers/imap/camel-imap-store.c (query_auth_types):
6961 * providers/pop3/camel-pop3-store.c (query_auth_types): Update
6963 * providers/smtp/camel-smtp-store.c (query_auth_types): Update.
6964 Remove the no_authtype, because that's what "ALLOW_AUTH" rather
6965 than "NEED_AUTH" means.
6966 (free_auth_types): Nuke.
6968 2001-03-21 Jeffrey Stedfast <fejj@ximian.com>
6970 * camel-filter-driver.c (camel_filter_driver_filter_message):
6972 (camel_filter_driver_filter_folder): Same.
6973 (camel_filter_driver_filter_mbox): Same.
6974 (camel_filter_driver_filter_folder): Return -1 if an exception was
6977 2001-03-19 Jeffrey Stedfast <fejj@ximian.com>
6979 * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_finalize):
6980 Free the expected host.
6981 (camel_tcp_stream_openssl_new): Now takes a Service and an
6982 expected_host. Set them.
6984 2001-03-20 Dan Winship <danw@ximian.com>
6986 * providers/imap/camel-imap-store.c
6987 (camel_imap_store_check_online): Function to check if the store is
6988 online and set an exception if not. Currently controlled by an
6989 environment variable, but eventually there will be both a global
6990 (session-level) setting and a per-store setting.
6991 (construct): Set up storage_path and base_url here rather than at
6993 (imap_auth_loop): Split out from imap_connect.
6994 (imap_setup_online): Split out from imap_connect. Do the
6995 post-authentication connection setup, and cache the results to
6997 (imap_setup_offline): Set up a CamelImapStore with information
6998 saved from a previous imap_setup_online.
6999 (imap_connect): If online, do connect_to_server(),
7000 imap_auth_loop(), and imap_setup_online(). Otherwise, do
7001 imap_setup_offline().
7002 (get_folder, get_folder_info): Add offline support.
7003 (create_folder, subscribe_folder, unsubscribe_folder): Disable
7004 these when offline (for now).
7006 * providers/imap/camel-imap-folder.c (camel_imap_folder_new):
7007 Remove the sync'ing-with-server stuff... it's done by
7008 camel_imap_folder_selected now, which only gets called if the
7010 (camel_imap_folder_selected): add the code removed from
7011 camel_imap_folder_new. Besides simplifying the folder_new and
7012 summary_new code, this also means now that we'll DTRT if a
7013 folder's UIDVALIDITY changes while we're connected. Also, when
7014 that happens, clear the message cache explicitly.
7015 (imap_refresh_info, imap_sync): These are no-ops when offline.
7016 (imap_expunge, imap_append_message, imap_copy_message_to,
7017 imap_search_by_expression): These don't yet work offline.
7018 (imap_get_message, camel_imap_folder_fetch_data): Return an error
7019 when trying to fetch a non-cached body part when we're offline.
7021 * providers/imap/camel-imap-summary.c (camel_imap_summary_new):
7022 Rewrite to not check the validity here. (We'll do it from
7023 camel_imap_folder_selected instead.)
7025 * providers/imap/camel-imap-command.c (camel_imap_command): Call
7026 camel_imap_folder_selected even when the selection is all we're
7027 doing, to match the changes in camel-imap-folder.c.
7029 * providers/imap/camel-imap-message-cache.c
7030 (camel_imap_message_cache_clear): New function to clear out a
7033 2001-03-19 Christopher James Lahey <clahey@ximian.com>
7035 * Makefile.am (INCLUDES): Added $(EXTRA_GNOME_CFLAGS)
7037 2001-03-19 Jeffrey Stedfast <fejj@ximian.com>
7039 * providers/pop3/camel-pop3-store.c (pop3_connect): Set the errbuf
7040 to NULL after freeing it? I don't think this should fix bug #1801
7041 but I guess it can't hurt.
7043 2001-03-18 Jeffrey Stedfast <fejj@ximian.com>
7045 * camel-remote-store.c (remote_recv_line): Protect against a
7046 possibly NULL exception.
7048 * camel-filter-driver.c (camel_filter_driver_filter_message):
7049 Document and modify to return a boolean value denoting whether or
7050 not errors occured during processing.
7051 (camel_filter_driver_filter_mbox): Same as above and also modified
7052 to check return codes of filter_message rather than relying only
7053 on whether or not the exception was set (as it's possible to pass
7054 in NULL for the exception).
7055 (camel_filter_driver_filter_folder): Same as above.
7057 * camel-mime-utils.c (header_param_list_format_append): Quote the
7058 param value if it contains whitespace as well.
7060 2001-03-17 Jeffrey Stedfast <fejj@ximian.com>
7062 * Makefile.am: Don't include system include dir.
7064 * camel.c: Use quotes around the nss.h include so it doesn't try
7065 to use the systen nss.h file.
7067 * camel-tcp-stream-ssl.c: Same here.
7069 2001-03-17 Not Zed <NotZed@Ximian.com>
7071 * providers/local/camel-maildir-summary.c (maildir_summary_sync):
7072 Modified patch from Dan Berger <dberger@ix.netcom.com> to re-check
7073 the maildir directory for new/updated messages at sync time.
7075 * camel-folder.c (camel_folder_ref_message_info): Implemented.
7076 (ref_message_info): And default implementation.
7078 * camel-folder.h: Added ref_message_info virtual method.
7080 2001-03-16 Not Zed <NotZed@Ximian.com>
7082 * camel-folder-thread.c
7083 (camel_folder_thread_messages_new_summary): New function to create
7084 a thread tree from a supplied summary array.
7085 (camel_folder_thread_messages_destroy): Handle thread trees
7086 generated by the above function properly.
7088 2001-03-16 Jeffrey Stedfast <fejj@ximian.com>
7090 * camel-private.h: Same.
7092 * camel-remote-store.h: Fixed #include to use <>'s instead of ""'s
7094 2001-03-16 Jeffrey Stedfast <fejj@ximian.com>
7096 * camel-tcp-stream-ssl.c (ssl_bad_cert): Print info about the
7097 issuer of the certificate.
7099 * providers/smtp/camel-smtp-transport.c (smtp_connect): Use
7100 camel_tcp_stream_get_socket().
7102 * camel-tcp-stream-openssl.c (stream_get_socket): Implemented.
7104 * camel-tcp-stream-ssl.c (stream_get_socket): Implemented.
7106 * camel-tcp-stream-raw.c (stream_get_socket): Implemented.
7108 * camel-tcp-stream.c (camel_tcp_stream_get_socket): New function.
7110 2001-03-16 Kjartan Maraas <kmaraas@gnome.org>
7112 * providers/pop3/camel-pop3-folder.c: Added #include <config.h>
7114 2001-03-16 Dan Winship <danw@ximian.com>
7116 * camel-mime-utils.c (header_msgid_generate): Don't use
7117 getdomainname: it's NIS crap, not DNS.
7119 2001-03-15 Jeffrey Stedfast <fejj@ximian.com>
7121 * camel.c (camel_init): Don't use the hardcoded cert db directory,
7122 use the one passed in.
7124 * camel-tcp-stream-ssl.c (ssl_get_client_auth): Wrote the default
7125 implementation. Not that we'll use this though, since this is the
7126 default implementation provided by NSS anyway. This more or less
7127 serves as a reference in case we want to change anything.
7128 (ssl_auth_cert): Same.
7129 (ssl_bad_cert): Changed the prompt string and free it when we're
7132 2001-03-15 Dan Winship <danw@ximian.com>
7134 First batch of disconnected IMAP-related stuff. This adds local
7135 caching of message parts, but NOT any actual disconnected support.
7136 (But it should speed up IMAP use.)
7138 * providers/imap/camel-imap-message-cache.c: New class for caching
7139 message data to disk, and removing it when it's no longer
7140 relevant. Will eventually also support merging message parts
7141 together to save on files. Or maybe using a db instead of files?
7143 * providers/imap/camel-imap-private.h: Add a cache_lock to
7144 CamelImapFolderPrivate. This lock must be recursive, so make both
7145 locks EMutexes rather than GMutex.
7147 * providers/imap/camel-imap-folder.c (parse_fetch_response): "The
7148 only FETCH response parser you need!" Replaces the various
7149 almost-correct bits of code formerly scattered throughout this
7150 file with a single fully-correct function that can handle any
7151 FETCH response at any time, so we don't get confused by seeing a
7152 flags update when we were only expecting a message body, etc.
7153 (camel_imap_folder_fetch_data): FETCH a message body part either
7154 from the cache or the server
7155 (camel_imap_folder_changed): Remove expunged messages from the
7157 (camel_imap_folder_new): Change to take a directory instead of a
7158 summary file name. Create a CamelImapMessageCache for the folder.
7159 (imap_finalize): Unref the message cache.
7160 (camel_imap_folder_selected, imap_rescan, get_content,
7161 get_message, imap_get_message, imap_update_summary): Redone a
7162 bunch to use parse_fetch_data, CamelImapMessageCache, etc.
7164 * providers/imap/camel-imap-store.c (get_folder): Pass directory
7165 name to camel_imap_folder_new, not summary filename. Use
7166 e_path_to_physical to generate a path with /subfolders/ inserted
7167 between directory components.
7169 * providers/imap/camel-imap-wrapper.c (camel_imap_wrapper_new):
7170 Call camel_imap_folder_fetch_data (with cache_only TRUE) and if
7171 the data is cached, return an online datawrapper rather than an
7173 (write_to_stream): Use camel_imap_folder_fetch_data (with
7174 cache_only FALSE) here too
7176 * providers/imap/camel-imap-utils.c (imap_skip_list): Renamed from
7177 skip_list and made non-static.
7179 2001-03-15 Jeffrey Stedfast <fejj@ximian.com>
7181 * camel-tcp-stream-ssl.h: Uninclude prnetdb.h since it's not
7184 * providers/smtp/camel-smtp-transport.c: #include prnetdb.h here
7185 instead of making camel-tcp-stream-ssl.h include it. Prevents some
7188 * providers/smtp/Makefile.am: Include the NSPR_CFLAGS and
7191 2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
7193 * providers/smtp/camel-smtp-transport.c (smtp_connect): Update for
7194 using CamelTcpStreams and also for using SSL.
7196 * providers/smtp/libcamelsmtp.urls: defined "ssmtp"
7198 * providers/smtp/camel-smtp-provider.c: Defined the Secure SMTP
7200 (camel_provider_module_init): Register the Secure SMTP provider.
7202 2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
7204 * providers/imap/camel-imap-store.c (imap_connect): Check for
7205 "simap" instead of "imaps".
7207 * providers/pop3/camel-pop3-store.c (pop3_connect): Change the
7208 port to be 995 for spop.
7210 * providers/pop3/libcamelpop3.urls: Change to "spop".
7212 * providers/imap/libcamelimap.urls: Change "imaps" to "simap" to
7213 correspond to /etc/services.
7215 2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
7217 * providers/pop3/camel-pop3-store.c (pop3_connect): Check to see
7218 if we are using "pops" and then set the appropriate SSL settings.
7220 * providers/pop3/libcamelpop3.urls: Add "pops"
7222 * providers/pop3/camel-pop3-provider.c: Defined the pops provider.
7223 (camel_provider_module_init): Register the pops provider.
7225 2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
7227 * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_new): Ya know what?
7228 Lets not ref the service because otherwise we'll start having the
7229 same problems we had back with vtrash. Besides, since the store
7230 owns the stream, it's not like the store is going anywhere without
7232 (camel_tcp_stream_ssl_finalize): No need to unref the service.
7234 2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
7236 * camel-remote-store.c (remote_connect): Pass the service into the
7237 SSL stream, not the session.
7239 * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_init): Set the
7241 (camel_tcp_stream_ssl_finalize): Unref the service.
7242 (camel_tcp_stream_ssl_new): Takes a CamelService arg now rather
7243 than a CamelSession arg.
7245 2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
7247 * camel.c (camel_init): So it turns out that NSS_Init *isn't*
7248 idempotent, so we have to protect against initializing it more
7249 than once(contrary to what their design specs suggest).
7251 * camel-session.c (camel_session_get_service): Use
7252 camel_exception_is_set() - Makes no difference but it's more
7253 consistant with how we normally do it.
7255 * camel-provider.h (CAMEL_URL_ALLOW_SSL): We don't need this.
7257 * providers/imap/camel-imap-provider.c: Define the imaps provider.
7258 (camel_provider_module_init): Register the imaps provider.
7260 * camel-provider.c (camel_provider_init): Only add the protocol to
7261 the hash table if it's non empty. Also, g_strdup() the filename
7262 into the hash table.
7264 * providers/imap/camel-imap-store.c (camel_imap_store_init): Eek!
7265 So the service's URL isn't set until after this is
7266 initialized. This means we can't check for SSL here.
7267 (imap_connect): Set the SSL options here instead.
7269 2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
7271 * camel-tcp-stream-ssl.c: Numerous fixes to get it to build
7272 correctly with NSS enabled.
7274 * camel-remote-store.c (remote_connect): Pass in the session and
7275 expected host args, oops.
7277 * camel-provider.h (CAMEL_URL_ALLOW_SSL): Defined.
7279 * providers/imap/camel-imap-store.c (camel_imap_store_init): Check
7280 to see if we are supposed to use SSL and set the options
7282 (imap_connect): Return FALSE here instead of NULL.
7284 * providers/imap/camel-imap-provider.c: Add CAMEL_URL_ALLOW_SSL.
7286 * providers/imap/libcamelimap.urls: Add "imaps" which is the
7287 protocol for Secure IMAP.
7289 2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
7291 * camel-tcp-stream-openssl.[c,h]: Added
7293 * Makefile.am: Added camel-tcp-stream-openssl.[c,h] to the build.
7295 * camel-types.h: Added CamelTcpStreamSSL and CamelTcpStreamOpenSSL
7297 2001-03-14 Not Zed <NotZed@Ximian.com>
7299 * camel-mime-filter-charset.c (filter, complete): re-constify
7300 inbuf, to remove a warning.
7302 * camel-mime-parser.c (folder_scan_step): When we're out of data,
7303 run the filter_complete. For some reason the logic that was there
7304 was never being run, always try it now, i think it was to work
7305 around a buggy filter, rather than fix it the right way.
7307 * camel-folder-summary.c (summary_build_content_info): If indexing
7308 html parts, use the html filter to convert it to some indexable
7310 (summary_build_content_info): Reset the filters before adding them
7311 back to the stream, if they get re-used in a given instance
7314 * Makefile.am (libcamelinclude_HEADERS): Added
7315 camel-mime-filter-html.[ch].
7316 (INCLUDES): Added xml clags
7318 2001-03-05 Not Zed <NotZed@Ximian.com>
7320 * camel-folder-search.c (camel_folder_search_class_init): Setup a
7321 new function, "uid" which matches uids.
7322 (search_uid): Implement the "match uid" command.
7324 2001-03-13 Jeffrey Stedfast <fejj@ximian.com>
7326 * camel-mime-utils.c: Check for a new type of mailing list header.
7328 2001-03-13 Jeffrey Stedfast <fejj@ximian.com>
7330 * camel-tcp-stream-raw.c (stream_read): Made cancellable.
7331 (stream_write): Same.
7332 (stream_connect): Removed checks for DIVINE_INTERVENTION as the
7335 * camel-tcp-stream-ssl.c (stream_write): get rid of 'w' as it
7336 wasn't really needed.
7337 (set_errno): New function to set errno based on the NSPR error
7339 (stream_read): If an error occured, call set_errno().
7340 (stream_write): Same.
7342 2001-03-13 Jeffrey Stedfast <fejj@ximian.com>
7344 * Makefile.am: Added camel-tcp-stream-ssl to the build.
7346 * camel-remote-store.h: Add a use_ssl member to the
7347 CamelRemoteStore object.
7349 2001-03-13 Jeffrey Stedfast <fejj@ximian.com>
7351 * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_get_type):
7352 Oops. Make this a subclass of CamelTcpStream, not CamelStream.
7354 * camel-types.h: Add the defs for CamelTcpStream and
7357 * Makefile.am: Add camel-tcp-stream and camel-tcp-stream-raw to
7360 * camel-remote-store.c (remote_connect): Update to use
7363 * camel-tcp-stream-raw.c (stream_connect): Made cancellable by
7364 copying the currently used code in camel-remote-store.c.
7365 (stream_setsockopt): Oops, flags = fcntl (..., GET_FL);
7366 (camel_tcp_stream_raw_get_type): Oops. Make this a subclass of
7367 CamelTcpStream, not CamelStream.
7369 2001-03-13 Jeffrey Stedfast <fejj@ximian.com>
7371 * camel.c (camel_init): Since all of the Mozilla libs (including
7372 NSPR and NSS) correctly handle reinitializations, we might as well
7373 init both NSPR and NSS in camel_init so we can be sure of that
7374 these libs have been initialized.
7375 (camel_shutdown): New function to call the NSS cleanup stuff.
7377 2001-03-13 Jeffrey Stedfast <fejj@ximian.com>
7379 * camel-folder.c (camel_folder_copy_message_to): Don't allow the
7380 user to copy a message to or from the vtrash folder. Set an
7381 exception if they try.
7382 (camel_folder_move_message_to): This one is a bit more
7383 complicated: 1) If the user tried to move a message from the
7384 vtrash into the original folder, just undelete the message. 2) If
7385 the user tries to move the message to the vtrash folder, then just
7386 mark the message as deleted. 3) If the user tries to move the
7387 message from the vTrash to a folder other than the original, use
7388 the original folder as the source. As another optimization, I've
7389 made it so that if the user tries to move a message to the same
7391 (move_message_to): Unset the deleted flag before moving (assuming
7393 (copy_message_to): Same.
7395 * camel-vee-folder.c (camel_vee_folder_get_message_folder): New
7396 convenience function to get the folder from which the message uid
7399 2001-03-13 Dan Winship <danw@ximian.com>
7401 * providers/imap/camel-imap-store.c (imap_connect): When trying
7402 again after a failed password attempt, check if the connection got
7403 dropped (which Courier will do) and deal accordingly.
7405 * providers/sendmail/camel-sendmail-transport.c (sendmail_send_to,
7406 sendmail_send): More fixing for exim: It can't deal with "-tif",
7407 you need to say "-t -i -f".
7409 2001-03-12 Jeffrey Stedfast <fejj@ximian.com>
7411 * camel-store.c (init_trash): Rename the folder to "Trash" and
7414 2001-03-09 Jeffrey Stedfast <fejj@ximian.com>
7416 * camel-tcp-stream-ssl.h: Comment out everything unless HAVE_NSS
7419 * camel-tcp-stream-ssl.c (stream_read): Don't use errno, use
7420 nspr's error code stuff.
7421 (stream_write): Same.
7423 2001-03-09 Jeffrey Stedfast <fejj@ximian.com>
7425 * camel-session.c (camel_session_query_authenticator): Created a
7426 new mode (CAMEL_AUTHENTICATOR_ACCEPT) which is a Yes/No prompt to
7427 the user. This will be needed by the SSL/TLS code to come. Also
7428 changed the return value to a gpointer rather than a char* to
7429 allow the returning of TRUE/FALSE values.
7431 * camel.c: Wrap stuff with HAVE_NSS
7433 2001-03-09 Dan Winship <danw@ximian.com>
7435 * providers/sendmail/camel-sendmail-transport.c (sendmail_send,
7436 sendmail_send_to): Remove the "-U" for now, because it breaks
7437 exim's "sendmail" wrapper. (And it doesn't actually do all that
7438 much to sendmail's behavior, and it was working fine before
7441 * camel-mime-utils.c (header_fold): Fix a bug that could make this
7442 walk off the end of a string. (The bug has been there since
7443 December... maybe this will fix some unreproduceable crashes?)
7445 2001-03-08 Jeffrey Stedfast <fejj@ximian.com>
7447 * camel-store.c (camel_store_get_folder): Changes so that the
7448 folder gets added to the vtrash reguardless of whether or not the
7449 store is holding it's own folder lookup hash.
7450 (init_trash): Oops, lets try locking the cache before we go and
7451 add all the cached folders to the vtrash.
7453 2001-03-08 Jeffrey Stedfast <fejj@ximian.com>
7454 These fixes make it so that the CamelStore does not actually hold
7455 a ref on it's vTrash folder. The vTrash folder is now created ONLY
7456 when it is requested. This solves the problem of not being able to
7457 unref a Store and have it disconnect/finalize like we expect it to.
7459 * camel-store.c (init_trash): When we create the vtrash, add all
7460 previously opened folders to it and hook on to the finalize event
7461 so that we can then set the store->vtrash to NULL.
7462 (get_trash): If a vtrash folder for the store doesn't exist,
7463 init_trash() and then try.
7464 (construct): No longer need this.
7465 (camel_store_class_init): Don't override the construct method.
7466 (camel_store_finalize): We no longer hold a ref on the vtrash so
7469 2001-03-07 Jeffrey Stedfast <fejj@ximian.com>
7471 * providers/pop3/camel-pop3-store.c (init_trash): Implement.
7472 (get_trash): Implement.
7473 (camel_pop3_store_class_init): Override the default init_trash and
7474 get_trash virtual functions. Hopefully this should fix the problem
7475 of pop3 sotre's not disconnecting after the send&recv code
7476 finishes downloading mail.
7478 Wonder if I should override the default implementation for the
7479 mbox, mh, and maildir too?
7481 2001-03-07 Dan Winship <danw@ximian.com>
7483 * camel-remote-store.c (camel_remote_store_connected): Return the
7484 return value of camel_service_connect rather than returning
7485 !camel_exception_is_set(), since that will be wrong if ex==NULL...
7486 Fixes a crash in the IMAP keepalive code, but this same problem
7487 probably exists in other places too...
7488 (remote_recv_line): Fix another problem...
7490 * providers/local/camel-mbox-provider.c:
7491 * providers/vee/.cvsignore:
7492 * providers/vee/libcamelvee.urls: Remove some unused stuff
7494 2001-03-06 Jeffrey Stedfast <fejj@ximian.com>
7496 * camel-sasl-digest-md5.c (compute_response): Redone so as to save
7497 on memory allocations and speed.
7499 2001-03-05 Jeffrey Stedfast <fejj@ximian.com>
7501 * camel-sasl-plain.c (plain_challenge): Don't return NULL if the
7502 token is non-NULL. This is why:
7504 sending : AUTH PLAIN
7505 received: 334 ok. go on. <-- this is why
7506 sending : ZGZPaQpAZ214Lm5ldBBnb29jYXI=
7507 received: 235 {mp005-rz3} go ahead
7509 * camel-sasl.c (camel_sasl_authtype): Add the PLAIN type here.
7510 (camel_sasl_authtype_list): And here too.
7512 * camel-sasl-plain.c: Initialize the camel_sasl_plain_authtype.
7514 * camel-sasl-plain.h: extern the camel_sasl_plain_authtype.
7516 2001-03-05 Jeffrey Stedfast <fejj@ximian.com>
7518 * providers/imap/camel-imap-store.c (imap_connect): i18n'd some
7521 * providers/smtp/camel-smtp-transport.c (smtp_connect): Keep
7522 trying to authenticate until either we succeed or until the user
7525 2001-03-04 Jeffrey Stedfast <fejj@ximian.com>
7527 * camel-mime-utils.c: Wrote a new version of header_fold() that
7528 takes a 'force' option and uses another new function called
7529 header_fold_next_space() in place of strchr(inptr, ' ') to get the
7530 next whitespace char. The idea of header_fold_next_space() is to
7531 not treat spaces between a set of quotes as a space - this way it
7532 will be possible to fold (for example) the Content-Type MIME
7533 header without worrying about breaking up a boundary string.
7534 Note: This code is #if 0'd out until Zucchi approves of the patch.
7535 Another Note: We will probably still want to use the "don't fold
7536 this header" hash lookup for headers like the Message-Id and
7537 possibly a few others.
7539 2001-03-04 Jeffrey Stedfast <fejj@ximian.com>
7541 * camel-internet-address.c
7542 (camel_internet_address_encode_address): Make sure there is a
7543 space between the name and the address tokens.
7545 * camel-mime-utils.c (rfc2047_decode_word): encoded string
7546 segments need to be at least 8 chars (7 doesn't leave room for an
7547 ecoding value. To be more realistic, even 8 chars isn't enough as
7548 this assumes there is no charset nor any encoded text. If the
7549 encoding value is not 'Q' or 'B', then return NULL. This fixes bug
7552 2001-03-03 Not Zed <NotZed@Ximian.com>
7554 * camel-vee-folder.c (vee_folder_remove_folder): New function to
7555 remove a folder from a vfolder.
7556 (camel_vee_folder_remove_folder): New public function to remove a
7557 folder from a vfolder.
7559 2001-03-02 Jeffrey Stedfast <fejj@ximian.com>
7561 * providers/smtp/camel-smtp-provider.c: Doh! Set the
7562 CAMEL_URL_ALLOW_AUTH flag.
7564 * providers/smtp/camel-smtp-transport.c (get_smtp_error_string):
7565 Updated with the extended AUTH return codes.
7567 2001-03-02 Jeffrey Stedfast <fejj@ximian.com>
7569 * providers/imap/camel-imap-store.c (try_auth): Don't forget to
7570 unref the SASL object.
7572 * providers/smtp/camel-smtp-transport.c (query_auth_types):
7574 (smtp_auth): Implemented.
7575 (smtp_helo): Don't bother parsing the authtypes if we already have
7577 (smtp_connect): call smtp_auth() here if we found any authtypes.
7578 (smtp_disconnect): Updated as I now use a hash table for the
7579 supported authtypes rather than a linked list.
7580 (esmtp_get_authtypes): modify to use a hash table instead of a
7581 linked list and also use isspace() rather than == ' '.
7583 2001-03-02 Dan Winship <danw@ximian.com>
7585 * providers/sendmail/camel-sendmail-transport.c (sendmail_send_to,
7586 sendmail_send): Use "-f" to set the envelope from address so
7587 bounces go to the right place. Also, pass "-U" since the man page
7588 says we're supposed to...
7590 2001-03-01 Jeffrey Stedfast <fejj@ximian.com>
7592 * camel-sasl.c: #include "camel-sasl-digest-md5.h"
7593 (camel_sasl_authtype_list): add DIGEST-MD5 stuff here.
7594 (camel_sasl_authtype): And here too.
7595 (camel_sasl_new): And here...
7597 * camel-sasl-digest-md5.[c,h]: new SASL class for DIGEST-MD5 (has
7598 been tested and proven to work).
7600 2001-03-01 Dan Winship <danw@ximian.com>
7602 * camel-sasl.c (camel_sasl_challenge): Take a GByteArray as input
7603 as well. Comment that you can pass %NULL for @token to get the
7604 initial auth data for mechanisms that are client-initiated.
7605 (camel_sasl_challenge_base64): Convenience function for protocols
7606 that use base64-encoded SASL.
7607 (camel_sasl_authenticated): Implement this... (it was prototyped
7609 (camel_sasl_new): Function to take a service name, a mechanism
7610 name, and a CamelService, and return a CamelSasl for it.
7611 (camel_sasl_authtype, camel_sasl_authtype_list): Functions to
7612 return CamelServiceAuthType information about SASL mechanisms, to
7613 allow providers to deal with them generically.
7615 * camel-sasl-anonymous.c, camel-sasl-plain.c: Update/simplify for
7616 CamelSasl changes. Both of these are single-round
7617 (client-initiated) mechanisms, so they don't need to keep state.
7618 (camel_sasl_plain_new): Removed; use camel_sasl_new instead.
7619 (Can't get rid of camel_sasl_anonymous_new though...)
7621 * camel-sasl-cram-md5.c: Update/simplify for CamelSasl changes.
7622 (camel_sasl_cram_md5_new): Removed; use camel_sasl_new instead.
7623 (cram_md5_challenge): Use md5_get_digest where possible, and
7624 various other minor simplifications. CRAM-MD5 only has a single
7625 round, so there's no need to keep track of state. This code is now
7626 tested (against Cyrus IMAPd) and known to work.
7628 * camel-sasl-kerberos4.h: Update/simplify for CamelSasl changes.
7629 Make only a single #ifdef HAVE_KRB4. Remove stuff from priv that
7630 isn't needed between rounds.
7631 (camel_sasl_kerberos4_new): Removed; use camel_sasl_new instead
7632 (krb4_challenge): Fix up the logic I broke in my previous "at
7633 least make it compile" fixes, update to match other changes, and
7634 remove IMAP-isms that shouldn't be in the generic code. This still
7635 isn't tested, because we're stuck behind a NAT right now...
7637 * providers/imap/camel-imap-store.c: Add an "authtypes" hash table
7638 to CamelImapStore recording the supported authtypes.
7639 (connect_to_server): Record supported authtypes in the authtypes
7640 hash rather than the capabilities bitmask, since now the IMAP code
7641 is no longer responsible for keeping track of which authtypes we
7643 (query_auth_types): Use camel_sasl_authtype_list to get the
7644 SASL-supported authtypes.
7645 (try_auth): New function to try a SASL auth mechanism. Sort of
7646 formerly imap_try_kerberos_v4_auth.
7647 (imap_connect): Get rid of the krb4-specific bits and genericize
7648 them for any SASL authtype.
7650 * providers/imap/Makefile.am: Remove camel-imap-auth.[ch] (moved
7651 into camel-imap-store.c since it's now constant size) and the
7652 KRB4_CFLAGS and KRB4_LDFLAGS references.
7654 2001-03-01 Jeffrey Stedfast <fejj@ximian.com>
7656 * camel-sasl-anonymous.c (anon_challenge): Don't base64 encode the
7657 data, leave that up to the provider to do if it needs to. Also
7658 save on some memory allocations and stuff.
7660 * camel-sasl-cram-md5.c (cram_md5_challenge): Same here. Also get
7661 rid of the need for the temp buf as we can just write it to the
7664 2001-03-02 Not Zed <NotZed@Ximian.com>
7666 * camel-mime-utils.c (rfc2047_encode_word, rfc2047_decode_word):
7667 Reconstify variables to match iconv.
7669 * camel-search-private.c (camel_ustrstrcase): Change some
7670 assertions back into valid returns.
7672 2001-03-01 Dan Winship <danw@ximian.com>
7674 * Makefile.am (libcamel_la_LIBADD, INCLUDES): camel depends on
7675 krb4 now (where available), for camel-sasl-kerberos4.c
7677 * camel-sasl-kerberos4.[ch]: Make this at least compile. Dunno if
7680 2001-03-01 Peter Williams <peterw@ximian.com>
7682 * camel-url.c (camel_url_new): Assert url_string != NULL.
7684 2001-02-28 Jeffrey Stedfast <fejj@ximian.com>
7686 * Makefile.am: Added camel-sasl-anonymous.[c,h] to the build.
7688 * camel-sasl-anonymous.[c,h]: new SASL class for ANONYMOUS
7690 * camel-sasl-plain.c (plain_challenge): Oops, have a state for
7691 setting sasl->authenticated = TRUE;
7693 * camel-sasl-cram-md5.c (cram_md5_challenge): Same here.
7695 2001-02-28 Jeffrey Stedfast <fejj@ximian.com>
7697 * camel-mime-utils.c (header_decode_date): A fix for broken
7698 mailers that send 2-digit years (ie "Wed, 28 Feb 01
7699 04:59:41"). Fixes bug #1633.
7701 * camel-filter-driver.c (camel_filter_driver_filter_folder): Check
7702 to make sure message isn't NULL.
7704 2001-02-28 Dan Winship <danw@ximian.com>
7706 * camel-remote-store.c (remote_recv_line): If we get back 0 bytes
7707 from camel_stream_buffer_gets, that means the socket got
7708 disconnected, so set an exception. (Noticed because of a message
7709 that crashes our IMAP server when you try to look at it. :)
7711 2001-02-28 Jeffrey Stedfast <fejj@ximian.com>
7713 * Makefile.am: Added camel-sasl*.[c,h] to the build.
7715 * camel-sasl.[c,h]: new "abstract" SASL class
7717 * camel-sasl-kerberos4.[c,h]: new SASL class for KERBEROS_V4
7719 * camel-sasl-cram-md5.[c,h]: new SASL class for CRAM-MD5
7721 * camel-sasl-plain.[c,h]: new SASL class for PLAIN
7723 * providers/imap/camel-imap-auth.c: Removed the base64 functions.
7725 * camel-mime-utils.c (base64_encode_simple): Moved here from
7727 (base64_decode_simple): Same.
7729 2001-02-26 Dan Winship <danw@ximian.com>
7731 * providers/imap/camel-imap-folder.c (imap_sync): Group messages
7732 into sets with the same flags and use the IMAP message set
7733 notation rather than doing a separate STORE FLAGS for each one.
7734 This cuts the network traffic down to just a handful of commands
7735 per sync rather than one per changed message. Removed the progress
7736 notification stuff since it's no longer meaningful and should
7737 hopefully be unnecessary.
7738 (imap_copy_message_to): move the former sync_message function
7739 into here, since it's no longer shared with imap_sync.
7741 2001-02-26 Jeffrey Stedfast <fejj@ximian.com>
7743 * camel-mime-utils.c: Made thread-safe and moved to above the test
7746 * camel-mime-message.c (camel_mime_message_init): Set the
7748 (camel_mime_message_finalize): Free the message_id.
7749 (camel_mime_message_set_message_id): New function to set the
7751 (camel_mime_message_get_message_id): New function to get the
7753 (process_header): Decode the message-id.
7755 2001-02-24 Jeffrey Stedfast <fejj@ximian.com>
7757 * camel-store.c (construct): init the vTrash folder here instead
7759 (camel_store_class_init): init service_class->construct.
7760 (camel_store_finalize): We only need to unref the vtrash folder.
7761 (init_trash): don't create a vstore since we don't need it.
7763 2001-02-23 Jeffrey Stedfast <fejj@ximian.com>
7765 * camel-store.c (camel_store_class_init): init get_trash and
7767 (camel_store_init): call the virtual init_trash function.
7768 (camel_store_finalize): unref the vtrash folder/store if present.
7769 (camel_store_get_folder): Add the new folder to the vtrash
7771 (init_trash): default implementation of init_trash.
7772 (get_trash): default implementation of get_trash.
7774 * camel-vee-store.c (vee_init_trash): No-op.
7775 (vee_get_trash): return NULL
7777 2001-02-23 Not Zed <NotZed@Ximian.com>
7779 * camel-folder-summary.c (camel_message_info_new_from_header):
7780 Doh, cut and paste problem, use mlist not cc.
7782 * camel-folder.c (move_message_to):
7783 (copy_message_to): If the source folder doesn't support a
7784 summary, dont try and get the message info from it.
7786 * camel-filter-search.c (check_header): Implement a pseudo-header
7787 "x-camel-mlist" which just looks up in the message info for a
7790 * camel-folder-search.c (check_header): Add pseudo-header
7791 "x-camel-mlist" which can be used to match on mailing list.
7793 * providers/imap/camel-imap-folder.c (imap_sync): Add some
7794 internal progress reporting.
7795 (imap_rescan): Do some progress reporting.
7797 * camel-mime-part.c (init_header_name_table): Add the message-id
7798 to the formatted table, so we dont try and wrap it, and break it.
7800 2001-02-22 Jeffrey Stedfast <fejj@ximian.com>
7802 * camel-folder.h: Remove the 'FIXME: remove because this isn't
7803 required...' comment for copy_message_to since we now need and
7804 cherish its existance in the filter-driver code ;-)
7806 * camel-filter-driver.c (camel_filter_driver_filter_message): Now
7807 takes a UID and CamelFolder arguments (which can be NULL) to allow
7808 for possible optimizations when copying messages between folders
7810 (camel_filter_driver_filter_mbox): Updated (passes NULL for both
7811 since this case can't be optimized anyway).
7812 (camel_filter_driver_filter_folder): Updated to pass in the uid
7813 and folder of the message.
7815 2001-02-22 Dan Winship <danw@ximian.com>
7817 * providers/imap/camel-imap-summary.h (CAMEL_IMAP_SERVER_FLAGS):
7818 #define this as the set of all IMAP system flags
7820 * providers/imap/camel-imap-folder.c (sync_message): after syncing
7821 flags, set server_flags to (flags & CAMEL_IMAP_SERVER_FLAGS)
7822 rather than just "flags", since any other flags won't have been
7823 synced. Prevents the CAMEL_MESSAGE_ATTACHMENTS flag from getting
7826 2001-02-22 Not Zed <NotZed@Ximian.com>
7828 * providers/vee/*: Removed all files.
7830 * camel-private.h: Move camel-vee-private.h stuff into here.
7832 * camel-session.c: Move the vee_provider here, and initialise it
7833 always as part of a session. The vfolder provider is always
7836 * providers/Makefile.am: Remove "vee" from the build list, now
7837 built as part of the main library.
7839 * Makefile.am (libcamelinclude_HEADERS):
7840 (libcamel_la_SOURCES): Added camel-vee-store.[ch],
7841 camel-vee-folder.[ch].
7843 * providers/vee/camel-vee-folder.c (vee_folder_build): Removed,
7845 (camel_vee_folder_new): Removed call to build_folder.
7846 (vee_get_message): Dont try and free the mi if we didn't get it.
7848 * camel-folder.c (camel_folder_change_info_new): Added a hash
7849 table of what we have in the lists, plus moved private things into
7851 (camel_folder_change_info_add_source): Fixed up private accesses.
7852 (camel_folder_change_info_add_uid): Changed to use a hashtable to
7853 see if we already have the uid, etc.
7854 (camel_folder_change_info_remove_uid): Similar.
7855 (change_info_remove): Likewise.
7856 (camel_folder_change_info_clear): Fixes for privatisations.
7857 (camel_folder_change_info_free): "
7859 2001-02-21 Dan Winship <danw@ximian.com>
7861 * providers/imap/camel-imap-folder.c (fetch_medium): Fixes for
7862 IMAP4-pre-rev1 from Torsten Schulz.
7864 2001-02-20 Not Zed <NotZed@Ximian.com>
7866 * camel-mime-utils.c (mail_list_magic): Take the ^Header: part out
7867 of the expression, since we look that up ourselves.
7868 (header_raw_check_mailing_list): When getting the match, get match
7869 1, not match 0, we dont want the full string match.
7871 * camel-folder-summary.c (CAMEL_FOLDER_SUMMARY_VERSION): Bumped
7873 (message_info_new): Extract the mlist info from the headers.
7874 (message_info_load): Load mlist from summary.
7875 (message_info_save): Save mlist to summary.
7876 (message_info_free): Save the mlist entry.
7877 (camel_message_info_new_from_header): Extract mailing list header.
7878 (camel_message_info_dup_to): Copy the mlist entry.
7879 (camel_message_info_free): Free mlist.
7880 (message_info_dump): Dump the mlist.
7882 * camel-folder-summary.h: Add an mlist (mailing list) string to
7885 2001-02-19 Not Zed <NotZed@Ximian.com>
7887 * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Added
7889 (message_changed): Add support for the auto-update flag, in which
7890 case we auto-match the content as it changes.
7891 (camel_vee_folder_init): Remoive "DYNAMIC" optionality
7892 (camel_vee_folder_finalise): "
7893 (vee_expunge): As we expunge folders, re-sync their content by
7894 rerunning the query.
7896 * providers/vee/camel-vee-store.c (vee_get_folder): Pass flags to
7899 2001-02-18 Not Zed <NotZed@Ximian.com>
7901 * providers/vee/Makefile.am (noinst_HEADERS): Added
7902 camel-vee-private.h.
7904 * providers/vee/camel-vee-private.h: New file to add locking stuff
7907 * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Add
7908 locking around unmatched setup.
7909 (camel_vee_folder_init): Setup lock.
7910 (camel_vee_folder_finalise): Free locks.
7911 (folder_changed): Add locking.
7912 (unmatched_finalise): "
7913 (message_changed): "
7914 (vee_folder_build): "
7916 2001-02-17 Not Zed <NotZed@Ximian.com>
7918 * providers/vee/camel-vee-folder.c (vee_folder_add): Check uid
7919 doesn't exist before adding it.
7921 2001-02-16 Not Zed <NotZed@Ximian.com>
7923 * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Create
7924 a new virtual virtual folder UNMATCHED, to store all messages that
7925 dont match other vfolders.
7926 (unmatched_folder_changed): When a vfolder issues a changed event,
7927 use its info to update the unmatched folder info.
7928 (unmatched_finalise): When a vfolder is finalised, remove any uids
7929 it has as if we had a removed event for it.
7931 2001-02-16 Jeffrey Stedfast <fejj@ximian.com>
7933 * camel-filter-driver.c (camel_filter_driver_finalise): Thaw the
7935 (camel_filter_driver_set_default_folder): Thaw the defaultfolder
7936 we're about to replace, and freeze the new defaultfolder.
7938 2001-02-15 Jeffrey Stedfast <fejj@ximian.com>
7940 * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Emit
7941 the folder_created signal here.
7943 * providers/local/camel-local-folder.c
7944 (camel_local_folder_construct): Emit the folder_created signal.
7946 * providers/local/camel-local-store.c (delete_folder): On error,
7947 free the 'name' string so we don't leak. Also emit the
7948 folder_deleted signal.
7950 * providers/imap/camel-imap-store.c (subscribe_folder): Emit the
7951 folder_created signal.
7952 (unsubscribe_folder): Emit the folder_deleted signal.
7954 * camel-store.c (camel_store_class_init): Added folder_created and
7955 folder_deleted signal defs.
7957 2001-02-15 Dan Winship <danw@ximian.com>
7959 * camel-folder-thread.c (container_parent_child): Deal with
7960 out-of-order References headers so they don't cause messages to
7961 disappear in threaded view.
7963 * providers/imap/camel-imap-folder.c (fetch_medium): IMAP4
7964 (pre-rev1) doesn't allow BODY.PEEK[], so use RFC822.PEEK instead
7967 2001-02-14 Christopher James Lahey <clahey@ximian.com>
7969 * camel-mime-filter-charset.c (complete, filter),
7970 camel-mime-utils.c (rfc2047_decode_word, rfc2047_encode_word):
7971 Changed this code to match the glibc iconv signature.
7973 2001-02-14 Dan Winship <danw@ximian.com>
7975 * camel-store.c (camel_store_create_folder): New method to create
7976 a folder when you don't know its full name.
7978 * providers/imap/camel-imap-store.c (create_folder): Implement.
7979 (create_folder): Oops, and fix bug involving namespaces
7981 2001-02-12 Not Zed <NotZed@Ximian.com>
7983 * camel-mime-part.c (init_header_name_table): Add address headers
7984 to list that we dont fold when writing. The are properly
7985 formatted as we build them.
7986 (write_to_stream): DOH, lookup the header name in the formatted
7987 hash table, not the value, that would never have worked.
7989 * camel-internet-address.c
7990 (camel_internet_address_encode_address): Changed to take a
7991 parameter saying how much we've printed so far. We now fold the
7992 header as we format it. We dont fold addresses, even if they are
7993 too long, we simply put them on another line by themselves: this
7994 should make the result more parsable by mailers that can't handle
7995 split up addresses (which are legal).
7996 (internet_encode): Fix for changes to above.
7998 2001-02-12 Jeffrey Stedfast <fejj@ximian.com>
8000 * providers/local/camel-local-provider.c: mbox, mh, and maildir
8001 camel-url's need absolute paths.
8003 * camel-provider.h (CAMEL_URL_PATH_IS_ABSOLUTE): New flaggy flag.
8005 2001-02-08 Dan Winship <danw@ximian.com>
8007 * camel-store.c: Rewrite a bunch. Replace the existing folder
8008 cache stuff with much simpler code that still handles all the
8009 existing cases. Now the folder hash table is always created by the
8010 base class, using hash and compare functions provided by the class
8011 implementation. (If they are set to NULL, CamelStore won't cache
8012 folders.) lookup_folder, cache_folder, and uncache_folder are no
8013 longer class methods, and get_name is gone completely.
8015 (camel_store_get_inbox): Renamed from
8016 camel_store_get_default_folder, since that wasn't being used, and
8017 this is what we actually need.
8018 (camel_store_get_root_folder): Removed, since it's not needed for
8019 anything given get_folder_info.
8021 * camel-remote-store.c:
8022 * providers/local/camel-local-store.c:
8023 * providers/local/camel-mbox-store.c:
8024 * providers/local/camel-mh-store.c:
8025 * providers/local/camel-maildir-store.c:
8026 * providers/nntp/camel-nntp-store.c:
8027 * providers/pop3/camel-pop3-store.c:
8028 * providers/vee/camel-vee-store.c: Minor updates for CamelStore
8031 * providers/imap/camel-imap-store.c (camel_imap_store_class_init):
8032 Update for CamelStore changes.
8033 (hash_folder_name, compare_folder_name): treat INBOX
8034 case-insensitively, otherwise use g_str_hash and g_str_equal.
8036 * camel-service.c (camel_service_construct): Remove
8037 camel_service_new and create camel_service_construct (as a class
8038 method) in its place.
8040 * camel-session.c (camel_session_get_service): Use
8041 camel_object_new and camel_service_construct to replace
8044 * providers/local/camel-local-store.c (construct): Append a '/' to
8045 the URL path if it doesn't end with one
8047 2001-01-31 Jeffrey Stedfast <fejj@helixcode.com>
8049 * camel-tcp-stream-ssl.c: Oops, include the camel-tcp-stream-ssl
8050 header instead of the raw one.
8052 2001-02-07 Not Zed <NotZed@Ximian.com>
8054 * camel-operation.c (camel_operation_start): Changed to push the
8055 operation into a status stack.
8056 (camel_operation_progress): Changed to only accept % complete.
8057 (camel_operation_reset): Free status stack as well.
8059 * providers/pop3/camel-pop3-folder.c (pop3_get_message): Get the
8060 octect count from the return line, and pass it to
8061 get_additional_data().
8062 (pop3_refresh_info): Added status stuff.
8064 * providers/pop3/camel-pop3-store.c
8065 (camel_pop3_command_get_additional_data): Added a total bytes
8066 expected argument for progress reporting & fixed callers.
8067 (camel_pop3_command_get_additional_data): Added progress
8070 * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
8071 (mbox_summary_sync_quick):
8072 (summary_rebuild): Added progress reporting stuff.
8074 2001-02-07 Jeffrey Stedfast <fejj@ximian.com>
8076 * camel-search-private.c (CAMEL_SEARCH_COMPARE): Macro for making
8078 (camel_ustrcasecmp): Use CAMEL_SEARCH_COMPARE and check for
8079 end-of-string before the utf-8 error check.
8080 (camel_ustrncasecmp): Same.
8081 (camel_search_header_match): Strip leading spaces before doing
8082 anything else. Also use vlen and mlen so as to not need to do 500
8084 (camel_ustrcasecmp): Don't get_utf8() for the 2 strings in the
8085 comparison part of the loop because of short-circuit expression
8086 evaluation. (blame JPR if this is the wrong term!)
8087 (camel_ustrncasecmp): Same.
8089 2001-02-06 Jeffrey Stedfast <fejj@ximian.com>
8091 * camel-search-private.c (utf8_get): Rewrote using unicode_get_utf8().
8092 (camel_ustrcasecmp): Use unicode_char_t
8093 (camel_ustrncasecmp): Same.
8095 2001-02-06 Christopher James Lahey <clahey@ximian.com>
8097 * camel-mime-filter-charset.c (complete, filter),
8098 camel-mime-utils.c (rfc2047_decode_word, rfc2047_encode_word):
8099 Made these pass char ** as the second parameter to iconv.
8101 2001-02-06 Not Zed <NotZed@Ximian.com>
8103 * camel-session.c: Removed all the camel_cancel stuff.
8105 * camel-stream-fs.c (stream_read): Change to use camel_operation.
8108 * camel-remote-store.c (socket_connect): Change to use
8109 camel_operation rather than camel_cancel stuff.
8110 Removed gal include, WTF is that doing there anyway?
8112 * Makefile.am (libcamel_la_SOURCES):
8113 (libcamelinclude_HEADERS): Added camel-operation.[ch], stuff to
8114 handle notification and cancellation.
8116 * camel-search-private.c: Removed unwanted header. It was never
8117 put in for a reason. Stop fixing irrelevant warnings.
8119 (camel_ustrstrcase): Our own strstrcase impl for utf8 strings.
8120 (camel_ustrcasecmp): Ditto for strcasecmp.
8121 (camel_ustrncasecmp): And strncasecmp.
8122 (utf8_get): Simpler interface to utf8 string processing.
8123 (camel_search_header_match): Use the new things.
8125 2001-02-05 Not Zed <NotZed@Ximian.com>
8127 * camel-folder.c (get_summary): Removed some old variables/a small
8129 (free_summary): Removed old variables.
8131 * camel-mime-utils.c (header_raw_check_mailing_list): New utility
8132 function to get the mailing list (if any) that a set of headers
8135 2001-02-05 Christopher James Lahey <clahey@helixcode.com>
8137 * camel-stream-fs.c: Added a missing #include.
8139 * camel-search-private.c: Added a missing #include.
8141 2001-02-05 Jeffrey Stedfast <fejj@ximian.com>
8143 * camel-remote-store.c (remote_query_auth_types): Oops. Change
8146 * providers/smtp/camel-smtp-transport.c (query_auth_types): Updated.
8148 * providers/nntp/camel-nntp-store.c (nntp_store_query_auth_types):
8151 * providers/pop3/camel-pop3-store.c (query_auth_types): Updated.
8153 * providers/imap/camel-imap-store.c (query_auth_types): Updated.
8155 * camel-service.c (camel_service_query_auth_types): Now takes a
8156 boolean value to specify whether or not to connect when
8157 constructing a supported authtype list.
8159 2001-02-05 Not Zed <NotZed@Ximian.com>
8161 * camel-stream-filter.c (do_write): Revert jeff's earlier change,
8162 the change below is the more-correct fix. All his was doing was
8163 ignoring the return code & looping actually :)
8165 * camel-stream-fs.c (stream_write): Since we are non-blocking on
8166 the outgoing fd, keep looping if writing out large blocks, so we
8167 can keep checking for cancel, etc.
8169 2001-02-02 Not Zed <NotZed@Ximian.com>
8171 * camel-folder-thread.c (camel_folder_thread_messages_new): When
8172 we drop a fake node, dont skip checking the next in the list.
8173 (camel_folder_thread_messages_new): Add an assertion check just to
8174 make sure we dont get any pseudo nodes, and spit a warning if we
8177 2001-02-04 Jeffrey Stedfast <fejj@ximian.com>
8179 * camel-stream-filter.c (do_write): Make do_write loop until the
8180 entire buffer is written.
8182 2001-02-02 Not Zed <NotZed@Ximian.com>
8184 * camel-stream-fs.c: Add missing header for cancel check stuff.
8186 * camel-session.c (camel_cancel_cancel): Fix a wrong cast.
8188 * camel-mime-part.c (init_header_name_table): Setup a new table
8189 header_formatted_table, that lists headers that we dont want to
8190 fold (they've already been folded).
8191 (write_to_stream): Check for already formatted headers, and dont
8192 try and fold them. This is a fix for bug #1097.
8194 2001-02-01 Not Zed <NotZed@Ximian.com>
8196 * camel-mime-utils.c (header_fold): If we are folding, drop the
8197 space at the end of the line.
8199 2001-01-30 Not Zed <NotZed@Ximian.com>
8201 * camel-remote-store.c (timeout_cb): Remvoe the stream locking
8202 here. I think this was leading to a deadlock when a keepalive is
8203 being sent, in imap.
8205 2001-01-29 Not Zed <NotZed@Ximian.com>
8207 * providers/imap/camel-imap-command.c
8208 (imap_command_strdup_vprintf): Include the terminating NUL in the
8209 calculated string length. This hit memcheck.
8211 2001-01-25 Not Zed <NotZed@Ximian.com>
8213 * tests/folder/test3.c: Changed the subject search to handle case
8214 sensitive when it is mixed case.
8216 * Makefile.am (libcamel_la_SOURCES): Added camel-ssearch-private.c
8217 (noinst_HEADERS): Added camel-search-private.h
8219 * camel-folder-search.c (check_header): New function to do the
8220 work of the various header checks.
8221 (search_header_matches):
8222 (search_header_starts_with):
8223 (search_header_ends_with):
8224 (search_header_contains): Use check_header to do the work.
8225 (build_match_regex): Removed.
8227 * camel-search-private.c (header_soundex): New
8228 function to match words to phrases using soundex algorithm.
8230 * camel-filter-search.c (soundexcmp): Removed.
8231 (check_match): Moved to search-private.h
8233 2001-01-24 Not Zed <NotZed@Ximian.com>
8235 * camel-search-private.c (camel_search_build_match_regex): Added
8236 extra flags, so the same function can be used for
8237 start/end/whole/partial matches.
8238 (camel_search_header_match): Convenience function to check a
8239 single header against all sorts of different matches.
8241 * providers/imap/camel-imap-search.c (imap_body_contains): Fix for
8244 * camel-folder-search.c: Fix for e_sexp api changes.
8245 (search_header_contains): Free args/quit on unknown header.
8246 (search_header_matches): "
8247 (search_header_starts_with): "
8248 (search_header_ends_with): "
8249 (match_message): Add an exception argument.
8250 (search_body_contains): Free args/quit on fatal error.
8251 (message_body_contains): Removed (moved to
8252 camel-search-private.c), fixed callers.
8254 * camel-filter-search.c: Fix for e_sexp api changes.
8255 (build_match_regex, message_body_contains): Moved into
8256 camel-filter-private.c Fixed callers.
8257 (check_header): moved guts to camel-search-private, and
8258 changed to use regex's for everything. Just calls that with the
8260 (check_header): GEts the header, decodes it, and checks for
8261 failure, and whatnot.
8262 (check_match): Removed.
8263 (header_soundex): Changed significantly. Now it soundexes each
8264 word in the header separately, and compares it to the first
8267 * tests/folder/test9.c (main): Fix for api changes.
8268 (main): Added tests to see that invalid match and action
8269 rules are properly detected.
8271 * camel-filter-driver.c (camel_filter_driver_filter_mbox): Remove
8272 the 'finished message' bit.
8273 (camel_filter_driver_filter_message): Remove an accidentally
8275 (camel_filter_driver_filter_message): Fix for e-sexp api changes.
8277 2001-01-23 Dan Winship <danw@ximian.com>
8279 * providers/imap/camel-imap-wrapper.c: Add a lock around the
8280 delayed loading, so two threads won't try to do it at the same
8283 2001-01-22 Dan Winship <danw@ximian.com>
8285 * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Set the
8286 CamelFolder::name to just the base part of the vfolder name (the
8289 2001-01-23 Not Zed <NotZed@Ximian.com>
8291 * camel-filter-search.c (camel_filter_search_match): Perform error
8292 checking on parsing/execution.
8294 * camel-folder-search.c (camel_folder_search_execute_expression):
8295 Perform error handling on search expression.
8296 (CamelFolderSearchPrivate): Add a camelexception for error
8298 (camel_folder_search_execute_expression): Setup exception pointer.
8299 (search_match_all): Quit on error.
8301 * providers/imap/camel-imap-summary.c (message_info_load): Removed
8302 some debug 'warnings', as they should now be displayed at the
8303 toplevel loader, and just made the code match similar code
8306 * providers/local/camel-mbox-summary.c (message_info_load): Error
8308 (message_info_save): more error handling.
8310 * camel-folder-summary.c (message_info_load): Add error handling
8311 and sanity checking.
8312 (camel_folder_summary_load): Add error checks.
8313 (perform_content_info_load): Error + sanity checks.
8314 (content_info_load): error + sanity checks.
8316 * camel-filter-driver.c (close_folder): avoid /0 by updating after
8317 we've done the sync.
8318 (close_folders): Setup the first progress report to start it off.
8319 (camel_filter_driver_filter_message): Fix a fixme, check errors in
8320 e_sexp parsing, etc.
8322 2001-01-22 Christopher James Lahey <clahey@helixcode.com>
8324 * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
8325 Initialize the value of the variable exists here.
8327 2001-01-22 Not Zed <NotZed@Ximian.com>
8329 * .cvsignore */*/.cvsignore: Added profiling temp
8332 * camel-folder-thread.c (camel_folder_thread_messages_new): When
8333 removing phantom nodes, check for the end node too.
8335 * camel-filter-driver.[ch]: Changed status vars to be
8336 CAMEL_FILTER_STATUS_ etc.
8338 2001-01-21 Jeffrey Stedfast <fejj@ximian.com>
8340 * camel-mime-utils.c (header_param_list_format_append): Make the
8341 output a little prettier. Okay, so I'm anal...
8343 2001-01-21 Not Zed <NotZed@Ximian.com>
8345 * camel-filter-driver.h: Added an exception to
8346 CamelFilterGetFolderFunc.
8348 * camel-filter-driver.c (camel_filter_driver_filter_message):
8349 Remove source parameter, as it is determined elsewhere now.
8350 (camel_filter_driver_filter_folder): Same here.
8351 (camel_filter_driver_filter_mbox): And here.
8352 (do_move): If we cannot open a folder, quit, rather than ignoring
8354 (do_copy): Here too.
8355 (open_folder): Pass an exception into get_folder callback.
8356 (camel_filter_driver_filter_folder): Report that we're syncing,
8358 (camel_filter_driver_filter_mbox): And here too.
8359 (close_folder): And here.
8361 2001-01-19 Jeffrey Stedfast <fejj@ximian.com>
8363 * camel-filter-driver.c (camel_filter_driver_filter_message): Set
8364 the deleted bit *before* copying to the default folder, this way
8365 if they are importing mail and have a rule to delete it, it
8366 doesn't get copied to the default folder un-deleted.
8368 2001-01-19 Dan Winship <danw@ximian.com>
8370 * providers/imap/camel-imap-store.c
8371 (get_subscribed_folders_by_hand): If LISTing a subscribed folder
8372 doesn't return a LIST response, just ignore that folder. Yay
8374 (subscribe_folder): add a missing UNLOCK
8376 2001-01-19 Kjartan Maraas <kmaraas@gnome.org>
8378 * providers/smtp/camel-smtp-provider.c: Mark strings for translation.
8380 2001-01-19 Not Zed <NotZed@Ximian.com>
8382 * camel-filter-driver.c (report_status): Add a percentage complete
8383 indicator to the status thing.
8384 (camel_filter_driver_filter_mbox): Add percentage complete to
8386 (camel_filter_driver_filter_folder): Same.
8388 2001-01-18 Dan Winship <danw@ximian.com>
8390 * camel-store.c (camel_folder_info_build): More tweaking... skip
8391 separator characters after the namespace character. (Gets rid of
8392 the shell folder registration warning some people have had with
8395 * providers/imap/camel-imap-store.c (imap_connect): I'm sure there
8396 was some clever reason I was storing the flags of the folder in
8397 the hash table rather than just "1", but I don't remember what it
8398 was now. Anyway, since we only ever test NULL/non-NULL, store 1,
8399 since flags is sometimes 0.
8401 * providers/imap/camel-imap-folder.c (imap_update_summary): Oops.
8402 Somewhere in one of the reorgs, the code to add new messages to
8403 the CamelFolderChangeInfo structure got removed. Fix that.
8405 2001-01-17 Jeffrey Stedfast <fejj@ximian.com>
8407 * providers/imap/camel-imap-summary.c (message_info_load): Add
8408 some g_warnings() to help debug later if I ever get the segfaults
8409 I was getting earlier. Can't seem to reproduce them after my
8412 * camel-folder-summary.c (camel_folder_summary_load): Undid my
8413 change here, NotZed said it was wrong and that if it gets a NULL
8414 mi then it should abort and not continue.
8416 2001-01-17 Jeffrey Stedfast <fejj@ximian.com>
8418 * camel-folder-summary.c (camel_folder_summary_load): Make sure
8419 that the message-info is non-null before we go accessing inner
8420 parts of it and/or adding it to the summary array. I may not have
8421 handled the error correctly, but it does seem to work
8422 correctly. If NotZed could double-check this it'd be great.
8424 * providers/smtp/camel-smtp-transport.c (get_smtp_error_string):
8425 New smtp error-code to string mapping function.
8426 (smtp_connect): Use the new error->string function for reporting
8428 (smtp_helo): Same. Also use a case-insensitive strstr for 8BITMIEM
8429 as it seems Exchange sends back lowercase for that one single SMTP
8430 extension. Everything else is uppercase. I'm seeing a lack of love
8431 for that extension by Microsoft dudes...
8432 (smtp_mail): Use get_smtp_error_string.
8438 2001-01-16 Jeffrey Stedfast <fejj@ximian.com>
8440 * camel-folder-summary.c (camel_folder_summary_array): Add an int
8441 i so this code will compile. Should I be worried about how well
8442 this code will work? ;-)
8444 2001-01-17 Not Zed <NotZed@Ximian.com>
8446 * camel-folder.c (free_summary): Call
8447 camel_folder_summary_array_free() to do the work.
8448 (get_summary): Use camel_folder_summary_array() to get the array
8449 atomically. These fixes allow folder/test8 to work again, and fix
8450 a sort of race where the summary size can change while we were
8451 making a copy of it.
8453 * camel-folder-summary.c (camel_folder_summary_array): Get the
8454 summary array atomically, so it can't contain empty records.
8455 (camel_folder_summary_array_free): And free it.
8457 * tests/lib/camel-test.c (die): If we are verbose & in threads,
8458 then goto sleep so we can debug.
8460 * tests/folder/test8.c (worker): Add a missing pull() for
8463 * camel-filter-search.c: Fix the symbol table, so match-all is an
8464 immediate function, as it should be.
8466 * tests/folder/test9.c (main): New test, tests some filtering
8469 * tests/message/test3.c (main): Dont use a boundary string with
8470 spaces in it. Folding can corrupt it. Maybe the folding isn't
8471 working entirely right, but anyway.
8473 * camel-session.c: Debug out the debug.
8475 * camel-filter-driver.c (camel_filter_driver_filter_folder): Plug
8478 2001-01-16 Dan Winship <danw@ximian.com>
8480 Delayed loading of IMAP message parts.
8482 * camel-types.h: typedef CamelMessageInfo and
8483 CamelMessageContentInfo here
8485 * camel-folder-summary.h: Add a "size" field to
8486 CamelMessageContentInfo.
8488 * camel-folder-summary.c (camel_folder_summary_content_info_new,
8489 camel_folder_summary_content_info_free): Renamed and made
8490 non-static for providers that construct their own content info.
8491 (content_info_load, content_info_save): load/save size
8493 * camel-data-wrapper.c (camel_data_wrapper_is_offline): New
8494 function to return if a data wrapper's contents are "offline". (So
8495 that, for example, we don't make thumbnails of images that haven't
8496 been loaded off the IMAP server yet.) Defaults to FALSE.
8498 * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
8499 Fix a bug in re-selecting a folder when messages have been
8500 expunged from it by another client in the meantime.
8501 (imap_get_message): Rewrite. If the message is larger than a
8502 certain size, just create a skeleton message containing
8503 CamelImapWrappers that will read parts as needed. This way, large
8504 attachments only need to be downloaded if the user looks at them,
8505 and multipart/alternative alternatives that aren't used will never
8506 be downloaded at all.
8507 (imap_update_summary): Rewrite this a bunch too to make the
8508 parsing more robust.
8510 * providers/imap/camel-imap-summary.c
8511 (CAMEL_IMAP_SUMMARY_VERSION): bump.
8512 (camel_imap_summary_new): Set build_content to TRUE.
8513 (content_info_load, content_info_save): Only save/load the content
8514 for messages that have it. (The content info gets created as a
8515 side effect of imap_get_message.)
8517 * providers/imap/camel-imap-utils.c (imap_parse_body): New routine
8518 (and helpers) to parse an IMAP 'body' FETCH response and fill in a
8519 CamelMessageContentInfo from it.
8521 * providers/imap/Makefile.am (libcamelimap_la_SOURCES,
8522 libcamelimap_la_HEADERS): add camel-imap-wrapper.
8524 2001-01-16 Dan Winship <danw@ximian.com>
8526 * camel-tcp-stream-raw.c (stream_getsockopt, stream_setsockopt):
8527 * camel-stream-fs.c (stream_read, stream_write):
8528 * camel-remote-store.c (socket_connect): fcntl(fd, F_GETFL)
8529 returns the flags as the return value, not via a passed in
8530 pointer. And F_SETFL looks for an int, not a long, and you have to
8531 pass it what it's expecting because it's a va_arg parameter. (Yes,
8532 the man page lies on Linux. But check the UNIX98 spec or the glibc
8533 source.) Also, fix another bug in socket_connect: if we manage to
8534 connect right away, unset O_NONBLOCK so it doesn't mess us up
8537 Fixes a bunch of problems with non-blocking I/O being done in the
8538 allegedly-blocking case and then returning EWOULDBLOCK.
8540 2001-01-16 Chris Toshok <toshok@ximian.com>
8542 * providers/Makefile.am (NNTP_DIR): set to nntp if ENABLE_NNTP
8543 (SUBDIRS): use $(NNTP_DIR)
8545 2001-01-16 Jeffrey Stedfast <fejj@ximian.com>
8547 * providers/smtp/camel-smtp-transport.c (smtp_rcpt): Don't check
8548 errno as it's not being set. Fixes bug #1150.
8550 2001-01-16 Jeffrey Stedfast <fejj@ximian.com>
8552 Ugh, this design is ugly like my butt.
8554 * camel-session.c (camel_session_query_cert_authenticator): New
8555 function which will be useful when we integrate SSL.
8557 * camel-tcp-stream-ssl.c (ssl_auth_cert): Callback to authenticate
8559 (ssl_bad_cert): Callback that gets the reason the certificate is
8560 bad and then calls camel's cert-authenticator callback to notify
8561 the user and to allow the user to override the check.
8562 (stream_connect): Set the URL we expect to connect with and setup
8563 the auth_cert and bad_cert callbacks.
8564 (camel_tcp_stream_ssl_new): Now takes a CamelSession and a
8565 expected_host argument that it will use for certificate
8567 (camel_tcp_stream_ssl_finalize): Unref the session and free the
8570 2001-01-16 Not Zed <NotZed@Ximian.com>
8572 * camel-filter-search.c (header_exists): Changed to support
8573 multiple args (or'd together).
8574 (header_contains): Cleaned up to match the search code. Why did
8575 fejj change it? I'll never know.
8577 (header_starts_with):
8578 (header_ends_with): Big cleanup of fejj's "i'm the cut & paste
8579 king" code. Also properly handle or'ing of additional args to
8580 match what the folder-search code should do.
8581 (check_match): New function which does the annoying matching
8582 stuff (for header matches).
8583 (check_header): Similarly, handles or'ing of the matches together.
8586 (header_starts_with):
8587 (header_ends_with): Call check_header to do the actual work.
8588 (header_soundex): And here too.
8589 (match_all): Yeah like match-all isn't passed expression results,
8590 its passed expression terms. Fix this so match-all works like it
8591 should, by executing the contained expression.
8592 (message_body_contains): Copied directly from
8593 camel-folder-search.c, a more robust/faster/simpler body search
8595 (mime_part_matches): Removed entirely.
8596 (handle_multipart): Removed entirely.
8597 (build_match_regex): Copied from camel-folder-search. Builds a
8598 set of simple strings into a regex pattern that matches any of
8599 them (for faster & simpler matching). Expanded to accept regex
8600 patterns itself, so it can merge them together.
8601 (body_contains): Use build match/match message to match using a
8603 (body_regex): Likewise, this time we tell it we're building a
8605 (header_full_regex): Use build_match_regex to take the drudgery
8606 out of it, and expand it to handle multiple regex's at once.
8607 (get_full_header): slightly cleaner (well i dunno, the sprintf
8608 stuff just got to me).
8609 (header_regex): Cleaned up to use build_match_Regex too, and to
8610 properly check types.
8611 (filter_message_search): Just allocate 'fms' on the stack.
8613 * camel-filter-driver.c (camel_filter_driver_finalise):
8614 (camel_filter_driver_init):
8615 (camel_filter_driver_class_init):
8616 (camel_filter_driver_get_type): Changed from gtk object to camel
8618 (camel_filter_driver_add_rule): New function to add a rule to be
8619 processed in sexp form.
8620 (camel_filter_driver_init): Init the rules list.
8621 (camel_filter_driver_finalise): Clear the rules/rules list.
8622 (camel_filter_driver_filter_message): Scan rules list directly
8623 rather than creating on the fly.
8625 * Makefile.am (libcamelinclude_HEADERS): Added camel-filter-driver.h
8626 (libcamel_la_SOURCES): Added camel-filter-driver.c, code taken
8627 from filter-driver, which can drive, uh, filters based on sexp's.
8628 (libcamelinclude_HEADERS):
8629 (libcamel_la_SOURCES): Added camel-filter-search.[ch]
8631 * camel-folder-summary.c (camel_folder_summary_decode_string):
8632 Chganged len back to be unsigned. And do a simple range check on
8633 the string value to try and detect corrupted summary files.
8635 * providers/imap/camel-imap-command.c (imap_read_untagged): Handle
8636 cancelled stream reads with an appropriate exception.
8638 * providers/imap/camel-imap-private.h: Fix the include-once
8639 macro. Doh, confliced with camel-private.h.
8641 * providers/imap/camel-imap-store.c (imap_store_refresh_folders):
8642 A copy of camel_remote_store_refresh_folders. We avoid locking
8643 each folder when we call it though. This should be removed when i
8644 can work out how to remove the folder lock from this function
8647 * camel-stream-fs.c (stream_write): Fix n' argument of select.
8648 (stream_read): Likewise.
8650 * camel-remote-store.c (socket_connect): Bump the connect timeout
8652 (socket_connect): Oops, fix the 'n' argument of select.
8654 * camel-session.c (camel_cancel_cancel): If we are given no
8655 cancellation node, then do it for all active ones.
8657 2001-01-15 Jeffrey Stedfast <fejj@ximian.com>
8659 * camel-stream-fs.c (stream_close): If the close() is successful,
8662 * camel-tcp-stream-raw.c: Removed the disconnect() method.
8663 (stream_close): If the close() is successful, set the sockfd to
8666 * camel-tcp-stream-ssl.c: Removed the disconnect() method.
8667 (stream_close): If the close() is successful, set the sockfd to
8670 * camel-tcp-stream.c (camel_tcp_stream_disconnect): Removed,
8671 easier to just use the close() method as it did the same thing
8674 2001-01-15 Jeffrey Stedfast <fejj@ximian.com>
8676 * camel-tcp-stream-raw.c (stream_getsockopt): Updated to be able
8677 to get the CAMEL_SOCKOPT_NONBLOCKING socket opt.
8678 (stream_setsockopt): Updated to be able to set the
8679 CAMEL_SOCKOPT_NONBLOCKING socket opt.
8681 2001-01-15 Peter Williams <peterw@ximian.com>
8683 * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Lock
8684 around the imap_rescan, which needs it.
8686 2001-01-15 Not Zed <NotZed@Ximian.com>
8688 * camel-remote-store.c (socket_connect): A cancellable connection
8690 (remote_send_string): Return cancelled exception if we were.
8691 (remote_send_stream): "
8692 (remote_recv_line): "
8694 * camel-stream-fs.c (stream_read): First cut at cancellation
8695 stuff. Its looking a bit ugly.
8697 2001-01-15 Jeffrey Stedfast <fejj@ximian.com>
8699 * camel-tcp-stream-ssl.c (stream_connect): Uses an SSL socket now
8700 although there's still a few things missing (like certificate
8703 * camel.c (camel_ssl_init): A replacement function for
8704 camel_init() that also initializes SSL.
8706 2001-01-14 Jeffrey Stedfast <fejj@ximian.com>
8708 * camel-tcp-stream-ssl.c (stream_getsockopt): Implemented.
8709 (stream_setsockopt): Implemented.
8711 * camel-tcp-stream-raw.c (stream_getsockopt): Implemented.
8712 (stream_setsockopt): Implemented.
8714 * camel-tcp-stream.c (camel_tcp_stream_getsockopt): New method.
8715 (camel_tcp_stream_setsockopt): Another new method. I think you get
8716 the idea of what these are for so I won't explain them.
8718 2001-01-14 Jeffrey Stedfast <fejj@helixcode.com>
8720 * camel-tcp-stream-ssl.[c,h]: New CamelTcpStream class that
8721 implements nspr sockets and eventually will use nss for
8722 SSL/TLS. Currently doesn't do any SSL/TLS but it should still
8723 work. It's functionally equivalent to CamelTcpStreamRaw at the
8724 moment only it uses nspr i/o.
8726 * camel-tcp-stream-raw.[c,h]: New CamelTcpStream class that
8727 implements native sockets. Should be usable but may have some bugs
8730 2001-01-13 Jeffrey Stedfast <fejj@ximian.com>
8732 * camel-tcp-stream.[c,h]: New abstract class for TCP streams. The
8733 next step is to write child classes (CamelTcpStreamBSD and
8734 CamelTcpStreamSSL). The BSD stream will use normal BSD sockets
8735 while SSL will use Mozilla's NSPR and NSS libraries to do Secure
8736 Socket Layers which wille ventually replace CamelStreamSSL which I
8737 just commit'd. Oh well.
8739 2001-01-13 Jeffrey Stedfast <fejj@ximian.com>
8741 * camel-stream-ssl.[c,h]: New stream for handling SSL/TLS
8744 2001-01-12 Not Zed <NotZed@Ximian.com>
8746 * camel-folder-thread.c (camel_folder_thread_messages_new):
8747 Perform a final pass, removing any pseudo nodes we added earlier.
8748 Quick patch to test the idea.
8749 (camel_folder_thread_messages_new): Added casts to rmeove some
8750 warnings for the analites out there.
8752 2001-01-11 Dan Winship <danw@ximian.com>
8754 * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
8755 Fix a bug in previous commit: don't check for deleted messages if
8756 there are no known messages in the folder (because it would end up
8757 sending "FETCH 0 ...").
8758 (imap_copy_message_to): Fix this up: sync flags to the server
8759 before copying so that they end up correct in the remote folder.
8760 And poke the destination folder after doing the copy so it notices
8761 the new message right away.
8762 (imap_move_message_to): Call imap_copy_message_to for most of the
8763 work rather than duplicating the code (since it's much more
8766 2001-01-11 Dan Winship <danw@ximian.com>
8768 * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
8769 New function to check for added/deleted messages when re-selecting
8771 (imap_refresh_info, imap_rescan, imap_update_summary): Various
8772 locking tweaks that turn out to be irrelevant since command_lock
8773 is recursive, but whatever.
8775 * providers/imap/camel-imap-command.c (camel_imap_command): When
8776 selecting a new folder, call camel_imap_folder_selected on it.
8778 * camel-folder.c (camel_folder_copy_message_to): Fix a locking
8779 problem. (One branch of an if statement was returning with the
8780 lock still locked.) Also remove the deprecation comments, to match
8783 2001-01-10 Jeffrey Stedfast <fejj@helixcode.com>
8785 * providers/local/camel-local-provider.c: Changed the descriptions
8786 for mh, mbox, and maildir to be more "user-friendly".
8788 2001-01-10 Dan Winship <danw@helixcode.com>
8790 * providers/imap/camel-imap-types.h: New header to prevent
8791 recursive #include problems
8793 * providers/imap/*.h: Replace some #includes with #include
8794 "camel-imap-types.h", remove typedefs that were moved to
8797 * providers/imap/*.c: Add #includes to make up for #includes
8798 removed from .h files
8800 * providers/imap/Makefile.am (libcamelimapinclude_HEADERS): Add
8803 2001-01-10 Dan Winship <danw@helixcode.com>
8805 * camel-store.c (camel_store_sync): New class function, parallel
8806 to camel_folder_sync. (The default implementation just calls
8807 camel_folder_sync on each cached folder.)
8809 * providers/imap/camel-imap-store.c (get_folder_info): Call
8810 camel_store_sync before doing anything else so that the IMAP
8811 server and Camel are working from the same data. Don't ask the
8812 server for the unread message count of the current folder, since
8813 UW will return often-incorrect cached data, and we can calculate
8814 it without talking to the server anyway.
8816 2001-01-09 Dan Winship <danw@helixcode.com>
8818 Mostly IMAP changes. Use the NAMESPACE extension (where
8819 available). Deal with servers that don't return LIST flags in
8820 response to LSUB (like UW) to get rid of the "not a selectable
8821 folder" error messages in the UI. Take advantage of the \Marked
8822 and \Unmarked flags to try to speed up the folder scan by not
8823 doing STATUS on unmarked folders. Some further tweaks on the shape
8824 of the resulting folder tree in various situations...
8826 * camel-store.h: Remove the (read) message_count, since nothing
8827 uses it, and we can speed up IMAP a bit this way.
8829 * camel-store.c (camel_folder_info_build): Redo this a bit to make
8830 it more useful for IMAP since that's the only thing that uses it.
8832 * camel-remote-store.c (camel_remote_store_connected): Public
8833 function to check if the store is connected, and try to connect it
8835 (remote_send_string, remote_send_stream, remote_recv_line): Use
8838 * providers/imap/camel-imap-store.c (camel_imap_store_finalize):
8840 (camel_imap_store_init): Initialize subscribed_folders to NULL
8841 rather than an empty hash table.
8842 (imap_connect): Get the list of subscribed folders here. If the
8843 server doesn't claim that any of them are either Marked or
8844 Unmarked, then assume that it doesn't do that for LSUB and
8845 remember that for later. If the server supports the NAMESPACE
8846 extension and the user didn't specify a namespace, use the
8847 server-provided one.
8848 (imap_disconnect): Free the list of subscribed folders, and the
8850 (get_folder): check camel_remote_store_connected
8851 (get_folder_info): check camel_remote_store_connected. Add a bunch
8852 of new cleverness. If we learned that the server doesn't do LSUB
8853 usefully, do a bunch of LISTs by hand. Then, if we're getting
8854 unread counts, only do it for folders that weren't listed as
8855 Unmarked. Also, deal with namespaces that end with the separator
8856 character, and update for changes to camel_folder_info_build.
8857 (folder_subscribed): Add a g_return_val_if_fail.
8858 (subscribe_folder, unsubscribe_folder): check
8859 camel_remote_store_connected.
8861 * providers/nntp/camel-nntp-store.c (build_folder_info,
8862 build_folder_info_from_grouplist, nntp_store_get_folder_info):
8863 Don't fill in message_count since it doesn't exist any more.
8865 2001-01-09 Dan Winship <danw@helixcode.com>
8867 Kill off a long-hated Camel kludge: "empty" URLs and
8868 query_auth_types_generic.
8870 * camel-url.c: Remove "empty" from CamelURL.
8871 (camel_url_new): No longer set it.
8872 (camel_url_to_string): Treat "" as equivalent to NULL for
8873 authmech. (Unrelated change, but it simplifies some stuff with the
8876 * camel-service.c (camel_service_new): Remove url->empty check: if
8877 the URL isn't valid, we don't create the service.
8878 (camel_service_query_auth_types): No longer need to switch between
8879 generic and connected variants.
8881 * providers/smtp/camel-smtp-transport.c (query_auth_types):
8882 * providers/pop3/camel-pop3-store.c (query_auth_types):
8883 * providers/nntp/camel-nntp-store.c (nntp_store_query_auth_types):
8884 * providers/imap/camel-imap-store.c (query_auth_types):
8885 * camel-remote-store.c (remote_query_auth_types): Remove generic
8886 version, rename connected version.
8888 2001-01-06 Not Zed <NotZed@HelixCode.com>
8890 * providers/vee/camel-vee-folder.c (vee_folder_build_folder): Dont
8891 try and unref a messageinfo that wasn't there, and use the right
8892 free function too. Modified patch from Iain.
8893 (vee_move_message_to): New method, call the real folders'
8894 move_message_to method.
8896 2001-01-04 JP Rosevear <jpr@helixcode.com>
8898 * tests/lib/Makefile.am: fix includes for compilation
8900 * tests/message/Makefile.am: Build test3 again
8902 * tests/message/test2.c: Kill warnings with header includes
8904 * tests/message/test3.c: ditto
8906 * tests/lib/streams.c: ditto
8908 * tests/lib/camel-test.c: ditto
8910 * tests/lib/messages.c: ditto
8912 * tests/lib/folders.c: ditto
8914 2001-01-04 Dan Winship <danw@helixcode.com>
8916 * providers/imap/camel-imap-folder.c (imap_rescan): Fix two
8917 problems in figuring out server-expunged messages.
8919 2001-01-04 Not Zed <NotZed@HelixCode.com>
8921 * camel-folder.c (thaw): If we have a lot of messages changed,
8922 promote it to a folder changed event.
8924 2000-01-03 Jeffrey Stedfast <fejj@helixcode.com>
8926 * camel-folder-search.c (search_header_matches): Implemented.
8927 (search_header_exists): Implemented.
8928 (search_header_starts_with): Implemented.
8929 (search_header_ends_with): Implemented.
8931 2001-01-03 Christopher James Lahey <clahey@helixcode.com>
8933 * providers/imap/camel-imap-folder.c (camel_imap_folder_new):
8934 Initialize the exists variable so that we don't do random things
8935 if the imap server misbehaves.
8937 2000-12-29 Not Zed <NotZed@HelixCode.com>
8939 * camel-folder.c (camel_folder_move_message_to): REmove warning,
8940 this isn't really deprecated, sigh.
8942 * camel-mime-utils.c (header_fold): Comment out some debug.
8944 2001-01-02 Christopher James Lahey <clahey@helixcode.com>
8946 * providers/maildir/, providers/mbox/, providers/mh/: Removed
8947 these directories since they're unused.
8949 2001-01-02 Dan Winship <danw@helixcode.com>
8953 * providers/imap/camel-imap-stream.[ch]: Remove. To be replaced.
8955 * providers/imap/Makefile.am (libcamelimapinclude_HEADERS): Remove
8958 * providers/imap/camel-imap-utils.c (imap_parse_flag_list): Take a
8959 char ** instead of char *, to return the position at the end of
8960 parsing like the string parsing functions.
8961 (imap_parse_string_generic): New function to parse a string,
8962 nstring, or astring.
8963 (imap_parse_nstring, imap_parse_astring): Now macros
8964 (imap_parse_string): Added
8966 * providers/imap/camel-imap-folder.h: Remove the "exists" field
8967 from CamelImapFolder.
8969 * providers/imap/camel-imap-folder.c: Remove unused include of
8970 camel-imap-stream.h.
8971 (camel_imap_folder_init): Remove no-longer-relevant summary
8973 (camel_imap_folder_new): Update for imap_parse_flag_list change,
8974 exists removal, and imap_rescan.
8975 (imap_rescan): New function that does most of the work of the old
8976 imap_refresh_info, but taking "exists" as an argument instead of
8977 getting it from the folder. Also calls camel_imap_folder_changed
8978 to do the summary updating and signalling, rather than duplicating
8980 (imap_refresh_info): Just call imap_rescan (using the size of the
8981 folder summary as "exists").
8982 (imap_update_summary): Update for imap_parse_flag_list change
8983 (camel_imap_folder_changed): Update for "exists" change.
8985 2001-01-02 Dan Winship <danw@helixcode.com>
8987 * camel-mime-utils.c (header_content_type_simple): New function to
8988 return just foo/bar with no parameters.
8990 * camel-data-wrapper.c (get_mime_type): Use
8991 header_content_type_simple rather than header_content_type_format.
8993 2000-12-28 Dan Winship <danw@helixcode.com>
8995 * gmime-content-field.[ch]: Remove this. It was only a thin
8996 wrapper around struct _header_content_type anyway, and didn't
8997 match the naming scheme of anything else.
8999 * Makefile.am: Remove gmime-content-field.[ch]
9001 * camel.h: Remove gmime-content-field.h
9003 * camel-types.h: Add CamelContentType as a typedef for struct
9004 _header_content_type (especially for use outside of camel).
9006 * camel-multipart.c:
9007 * camel-mime-part.c:
9008 * camel-mime-message.c:
9009 * camel-folder-summary.c:
9010 * camel-folder-search.c:
9011 * camel-data-wrapper.[ch]: Use CamelContentType and
9012 header_content_type_* functions rather than the GMime stuff.
9014 * camel-mime-part-utils.c:
9015 * camel-medium.c: Remove unused gmime-content-field.h include.
9017 2000-12-27 Dan Winship <danw@helixcode.com>
9019 * providers/pop3/camel-pop3-store.c (connect_to_server): Fix the
9020 APOP check to not crash on servers that don't return any
9021 information on the +OK greeting line.
9023 2000-12-24 Not Zed <NotZed@HelixCode.com>
9025 * providers/imap/camel-imap-search.c (imap_body_contains): Lock
9026 the command channel while searching.
9027 (imap_body_contains): If performing a whole uid search, then add
9028 references to our own summary items, dont look it up in the
9029 folder. This way they can't vanish unexpectedly.
9031 * providers/imap/camel-imap-folder.h (CamelImapFolder): Added a
9033 (CamelImapFolder): Removed summary again from here.
9035 * providers/imap/camel-imap-private.h: Added lock for imap
9038 * Merge from camel-mt-branch.
9040 * providers/imap/camel-imap-folder.c (imap_update_summary): Merge
9041 fix, use the folder->summary.
9042 (imap_get_message_flags, imap_set_message_flags,
9043 imap_get_message_user_flag, imap_set_message_user_flag): Removed
9045 (camel_imap_folder_init): Setup private data/lock.
9046 (imap_finalize): Free private data/search lock.
9047 (imap_search_free): Lock the search_lock.
9048 (imap_search_by_expression): Lock the search lock when using the
9049 search object. Also copy/ref hte summary, rather than getting it
9051 (imap_refresh_info): Free any info lookups. Use folder->summary
9052 not imap_folder->summary. And lock around commands.
9053 (camel_imap_folder_changed): Use folder->summary again.
9054 (camel_imap_folder_changed): Make sure we unref the summary lookup.
9056 2000-12-22 Dan Winship <danw@helixcode.com>
9058 * providers/imap/camel-imap-store.c (get_folder_info): When
9059 getting the top-level folder list, include INBOX even if it's not
9060 subscribed. Don't show subscribed folders outside of the given
9061 namespace. Do a better job of pruning the namespace from the
9062 returned folder tree.
9064 2000-12-21 Dan Winship <danw@helixcode.com>
9066 * providers/imap/camel-imap-search.c: New CamelFolderSearch
9067 subclass that just reimplements body_contains (using the IMAP
9068 SEARCH command). All other kinds of searching are done against the
9071 * providers/imap/camel-imap-folder.c (imap_search_by_expression):
9072 Use a CamelImapSearch to do searching.
9074 * providers/imap/camel-imap-utils.c (imap_translate_sexp, etc): No
9077 * camel-folder-search.h: Add missing CAMEL_FOLDER_SEARCH_TYPE
9080 2000-12-21 Dan Winship <danw@helixcode.com>
9082 * camel-stream-buffer.c (camel_stream_buffer_gets): Update the
9083 doc comment: since it always NUL-terminates the buffer, it reads
9084 at most @max-1 bytes, not @max.
9086 * camel-remote-store.c (remote_recv_line): Fix the "did
9087 camel_stream_buffer_gets fill the whole buffer" check. Fixes a bug
9088 when reading lines longer than 1024 characters (eg, IMAP SEARCH
9089 responses in very large folders).
9091 2000-12-19 Dan Winship <danw@helixcode.com>
9093 * providers/imap/camel-imap-folder.c (imap_refresh_info): Oops.
9094 Don't do "FETCH 1:0" when the folder is empty.
9095 (imap_protocol_get_summary_specifier): Request RFC822.SIZE too.
9096 (imap_update_summary): Parse RFC822.SIZE and add it to the
9099 2000-12-18 Dan Winship <danw@helixcode.com>
9101 * providers/imap/camel-imap-summary.c: Add "guint32 server_flags"
9102 to CamelImapMessageInfo to keep track of the last known message
9103 flag state on the server.
9104 (message_info_save, message_info_load): Save/load the
9107 * providers/imap/camel-imap-folder.c: Make this use
9108 CamelFolderChangeInfo and emit folder_changed notifications as it
9109 gets them rather than only on refresh_info.
9110 (imap_refresh_info): Notice flags that get cleared on the server
9111 as well as flags that get set.
9112 (imap_update_summary): Remove a comment that never actually
9113 applied to the committed code.
9115 2000-12-15 Dan Winship <danw@helixcode.com>
9117 * providers/imap/camel-imap-command.c (camel_imap_command): Change
9118 the semantics of fmt: Now %S (capital S) means an IMAP "string",
9119 (which can be sent as either a quoted string or a literal). If
9120 the server supports LITERAL+, these will be sent as extended
9121 literals (which don't require any special escaping). Otherwise
9122 they'll be sent as quoted strings (and it now properly deals with
9123 " or \ in the string).
9124 (imap_command_strdup_vprintf): Utility routine that does the real
9125 work for the functionality mentioned above.
9127 * providers/imap/camel-imap-utils.c (imap_quote_string): Turns a
9128 string into a proper IMAP "quoted string".
9130 * providers/imap/camel-imap-store.c:
9131 * providers/imap/camel-imap-folder.c: Use %S instead of "%s" where
9134 2000-12-22 Not Zed <NotZed@HelixCode.com>
9136 * camel-folder-summary.c (GLOBAL_INFO_UNLOCK): Doh, cut and paste
9137 victim again, call unlock instead of lock!
9138 (summary_assign_uid): Unlock around trying to get a new uid, if we
9141 2000-12-21 Not Zed <NotZed@HelixCode.com>
9143 * tests/folder/Makefile.am (TESTS): reenabled the tests here.
9145 * providers/nntp/camel-nntp-newsrc.c (CamelNNTPNewsrc): Add a
9146 lock. Made completely mt-safe. Sigh, this is all so i can
9147 support snooping of the set_flags stuff inside camel-nntp-folder,
9148 since i've removed the global folder lock from all of the other
9149 folder summary operations.
9150 (camel_nntp_newsrc_read_for_server): Setup lock.
9151 (camel_nntp_newsrc_get_highest_article_read): Lock internal access.
9152 (camel_nntp_newsrc_get_num_articles_read):
9153 (camel_nntp_newsrc_mark_article_read):
9154 (camel_nntp_newsrc_mark_range_read):
9155 (camel_nntp_newsrc_article_is_read):
9156 (camel_nntp_newsrc_group_is_subscribed):
9157 (camel_nntp_newsrc_unsubscribe_group):
9158 (camel_nntp_newsrc_subscribe_group):
9159 (camel_nntp_newsrc_get_subscribed_group_names):
9160 (camel_nntp_newsrc_get_all_group_names): "
9161 (camel_nntp_newsrc_write_to_file): Lock internal accesses.
9162 (camel_nntp_newsrc_write): Lock around diry stuff.
9164 * providers/local/camel-maildir-summary.c (maildir_summary_check):
9165 Lock around our internal poking of the summary hashtable/array.
9166 (maildir_summary_sync): And the same here too.
9168 * camel-folder-summary.c: Moved the summaryprivate data into
9169 camel-private.h. Only needed for the locks really.
9170 (camel_folder_summary_init): Setup locks.
9171 (camel_folder_summary_set_filename): Lock.
9172 (camel_folder_summary_index): lock
9173 (camel_folder_summary_uid): Lock
9174 (camel_folder_summary_next_uid): "
9175 (camel_folder_summary_set_uid): "
9176 (camel_folder_summary_load): Lock around whole load. Hrm,
9177 probably not required.
9178 (camel_folder_summary_save): Lock around whole save, this is
9179 reqwuired, unless we ref/copy the whole list first, and i couldn't
9181 (camel_folder_summary_add): lock
9182 (summary_assign_uid): Lock around internal accesses.
9183 (camel_folder_summary_info_new_from_parser): Lock around filtr stuff.
9184 (camel_folder_summary_info_ref): Add locking. Could probably use
9186 (camel_folder_summary_touch): Add locking, likewise.
9187 (camel_folder_summary_clear): Lock. If the preiovus two are
9188 changed, then so this will need mroe locking.
9189 (camel_folder_summary_info_free): Lock around refcounting.
9190 (camel_folder_summary_remove): Locking.
9191 (camel_folder_summary_remove_uid): Lock ref, unlock, unref. Also
9192 fixed a bug that would have made this never work, freeing the key,
9193 which isn't allocated.
9194 (camel_folder_summary_remove_index): lock, ref, unlock unref also.
9195 (camel_message_info_ref): Lock using a separate global lock, since
9196 we have no context here.
9197 (camel_message_info_free): Here too.
9198 (content_info_alloc): Use an alocation lock here. avoids races
9199 with setting up content_info_chunks, etc.
9200 (camel_folder_summary_info_new): And here too.
9201 (camel_folder_summary_load): Changed to use a differnet lock for
9203 (camel_folder_summary_init): Doh, i do need a reflock afterall,
9205 (camel_folder_summary_finalize): Free it.
9206 (camel_folder_summary_index): Add a reflock.
9207 (camel_folder_summary_uid): And here too.
9208 (camel_folder_summary_info_free): Use reflock instead of
9210 (camel_folder_summary_info_ref): Likewise.
9211 (camel_folder_summary_remove_uid): Add reflocking.
9212 (camel_folder_summary_remove_index): And here too.
9214 * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Setup a
9216 (vee_folder_build): Build each item into the real summary object.
9217 (vee_folder_add, vee_folder_add_uid, vee_folder_add_change): New
9218 functions to add a single record to the vfolder summary.
9219 (vee_folder_build_folder): Use a real summary.
9220 (vee_get_uids): Removed, use default impl.
9221 (vee_free_message_info): "
9222 (vee_get_message_info): "
9223 (vee_get_summary): "
9224 (vee_get_unread_message_count): "
9225 (vee_get_message_count): "
9226 (vee_sync): Make vee-folder-sync sync all subordinate folders.
9227 Well i dont think this is right, but enough peopl ehave aksed for
9229 (vee_expunge): Same for expunge.
9230 (vee_set_message_flags): Call parent class, then mirror flags to
9232 (vee_get_message_user_flag): Removed, we just use the default
9233 impl, and our flags should always match.
9234 (vee_set_message_user_flag): Snoop the set and set on subfolder.
9235 (vee_get_message_flags): Removed, jsut use parent impl, assume our
9236 copy matches the real ones.
9237 (get_real_message): Removed. We sort ofneed to keep the
9238 summaryitem refed while we use it, so this doesn't make as much
9239 sense as it did once.
9240 (camel_vee_folder_finalise): Unhook listening events as we unref
9242 (camel_vee_folder_new): Set the summary messageinfo data size
9244 (vfolder_remove_match): Fixed for summary change.
9245 (folder_changed): ditto. Also stopped changed items from being
9246 re-searched and possibly removed. Might have to resort to the old
9247 whole-search idea again.
9248 (message_changed): Similarly. Might be easier just not to bother
9249 with a whole search.
9251 * providers/vee/camel-vee-folder.h: Removes summary
9252 hashtable/array, and use a real summary object. Sigh, more work.
9254 * providers/nntp/camel-nntp-folder.c (nntp_folder_sync): Move
9255 summary to folder object.
9256 (nntp_folder_get_message_count): Removed, use default impl.
9257 (nntp_folder_set_message_flags): Call parent impl to do the work,
9258 but snoop for newsrc.
9259 (nntp_folder_get_uids): Removed, use default impl.
9260 (nntp_folder_get_summary): "
9261 (nntp_folder_get_message_info): "
9262 (nntp_folder_free_message_info): "
9263 (camel_nntp_folder_new): moved summary to folder class
9265 * providers/imap/camel-imap-folder.c (camel_imap_folder_init):
9266 Move summary to folder object.
9267 (camel_imap_folder_new): "
9268 (imap_finalize): No longer unref the summary (or infact, do
9269 anything else either).
9270 (imap_refresh_info): move summary to folder object.
9272 (imap_get_message_count): Removed, use default impl.
9273 (imap_get_unread_message_count): "
9275 (imap_get_summary): "
9276 (imap_free_summary): "
9277 (imap_get_message_info): "
9278 (imap_free_message_info): "
9279 (imap_get_message_flags): "
9280 (imap_set_message_flags): "
9281 (imap_get_message_user_flag): ", this changes functionality, but
9282 only by providing non-permanent flags.
9283 (imap_set_message_user_flag): "
9284 (imap_update_summary): move summary to folder object, and use
9285 camel_folder_summary_info_new_from_header, instead of calling the
9286 virtual function directly.
9288 * providers/local/camel-maildir-folder.c (maildir_append_message):
9289 move summary to folder object, again.
9290 (maildir_get_message): "
9292 * providers/local/camel-mh-folder.c (mh_append_message): move
9293 summary to folder object.
9296 * providers/local/camel-mbox-folder.c (mbox_append_message): Move
9297 summary to folder object
9298 (mbox_get_message): "
9299 (mbox_set_message_user_flag): We need our own copy of this, sigh,
9300 so we can track if the xev needs a rewrite (probably, its only a
9302 (mbox_set_message_user_tag): Same same with this one.
9303 (camel_mbox_folder_class_init): Link in these new virtual functions.
9305 * providers/local/camel-local-folder.h (CamelLocalFolder): removed
9308 * providers/local/camel-local-folder.c (local_get_message_count):
9309 (local_get_unread_message_count):
9311 (local_get_summary):
9312 (local_free_summary):
9313 (local_get_message_info):
9314 (local_free_message_info):
9315 (local_get_message_flags):
9316 (local_set_message_flags):
9317 (local_get_message_user_flag):
9318 (local_set_message_user_flag):
9319 (local_get_message_user_tag):
9320 (local_set_message_user_tag): Removed, all now use default
9322 (camel_local_folder_class_init): Removed overrides.
9323 (local_init): Clear folder->summary.
9324 (local_finalize): move summary to folder.
9325 (camel_local_folder_construct): "
9328 * camel-folder.c (free_summary): Provide a real impl.
9332 (free_message_info): "
9333 (get_message_info): "
9334 (set_message_user_tag): "
9335 (get_message_user_tag): "
9336 (set_message_user_flag): "
9337 (get_message_user_flag): " Sigh, the last so far.
9338 (get_message_flags): Sigh, 1 more afterall.
9339 (get_unread_message_count): And and this.
9340 (get_message_count): and this!
9341 (set_message_flags): Sigh, and this.
9342 (camel_folder_finalize): Unref the summary if we have it.
9343 (camel_folder_free_uids): Remove locking.
9344 (camel_folder_get_message_flags): Remove locks, since the summary
9346 (camel_folder_set_message_flags): "
9347 (camel_folder_get_message_user_flag): "
9348 (camel_folder_set_message_user_flag): "
9349 (camel_folder_get_message_user_tag): "
9350 (camel_folder_set_message_user_tag): "
9351 (camel_folder_get_message_info): "
9352 (camel_folder_free_message_info): "
9353 (camel_folder_get_uids): "
9354 (camel_folder_free_summary): "
9355 (camel_folder_get_unread_message_count): "
9356 (get_unread_message_count): Check we got info, no big deal, but
9357 the summary might change while we're counting, and upset the count
9359 (camel_folder_get_message_count): Remove locks.
9361 * camel-folder.h (struct _CamelFolder): Added CamelFolderSummary
9362 to the base folder object. Sigh, this is going to be a lot of
9365 * camel-service.c (camel_service_init, finalise): changed
9366 connect_lock to be recursive e_mutex.
9368 * camel-remote-store.c (camel_remote_store_init, finalise): Changed
9369 stream_lock to recursive e_mutex.
9371 * camel-private.h (RemoteStorePrivate, ServicePrivate): Use
9372 recursive mutexes for connect_lock & stream_lock. Ick. Because
9375 * providers/imap/camel-imap-private.h: Change the command_lock to
9378 * providers/imap/camel-imap-store.c (connect_to_server): Removed
9379 the command_lock stuff. If we are just connected again, it should
9380 be safe to assume we have exclusive access at this point without
9381 it (and yes, removes a deadlock).
9382 (imap_create): Remove a lock that wasn't even supposed to be
9384 (camel_imap_store_finalize, init): g_mutex->e_mutex(E_MUTEX_REC).
9385 Use a recursive mutex since the imap code is multiply recursivly
9386 calling some functions (sigh, it would be nice to fix this).
9388 2000-12-20 Not Zed <NotZed@HelixCode.com>
9390 * camel-folder.c (folder_changed): Change the locks to inside the
9391 if. Stops a deadloc,k and we dont need a lock to read a value.
9392 (message_changed): Likewise.
9394 * camel.c (camel_init): Blah, comment out g_thread_init, leave it
9395 to the caller, since it can only ever be done once.
9397 * camel-folder-thread.c (camel_folder_thread_messages_new): Ref
9398 and save the folder in the thread return. Also get the summary
9399 once, and access that for the messageinfo's. Added bonus that now
9400 threads should come out in a similar order. We need to do this so
9401 that the messageinfo's dont get unref'd under us, and using the
9402 summary directly simplifies memory management.
9403 (camel_folder_thread_messages_destroy): Free the summary/unref the
9406 * camel-folder-thread.h: Add a folder to CamelFolderThread struct.
9408 2000-12-19 Not Zed <NotZed@HelixCode.com>
9410 * providers/imap/camel-imap-utils.c (imap_translate_sexp): Unref
9411 using e_sexp_unref, since it is no longer an object.
9413 * tests/lib/camel-test.c: Added a global lock, and made it
9416 * camel-exception.c: Add a global lock. Not sure its really
9417 needed here, but it doesn't really hurt.
9418 (camel_exception_clear): Lock around access.
9419 (camel_exception_set): Same.
9420 (camel_exception_setv): "
9421 (camel_exception_xfer): "
9423 * providers/local/Makefile.am (noinst_HEADERS): Added, for
9424 camel-local-private.h
9426 * camel-folder.c (camel_folder_search_by_expression): Removed
9427 locking here, now upto the implementing class to lock.
9428 (camel_folder_search_free): Removed the folder lock here too, for
9429 consistency really, and the locking probably wasn't needed.
9431 * providers/local/camel-local-folder.c (local_get_summary):
9432 Changed to copy/ref the summary items.
9433 (local_free_summary): Unref the summary items/free the array.
9434 (local_get_unread_message_count): Free info lookups.
9435 (local_search_by_expression): Perform more fine-grained locking,
9436 and dont lock the whole folder while searching, just the search
9437 object. Dum de dum, it *would* be possible to not even have to
9438 lock the search, by using our own copy of the search object each
9439 time. Could be investigated.
9440 (local_init): Init priaate data/lock.
9441 (local_finalize): Free private data/lock.
9442 (local_search_free): Also lock around the search object, because
9443 it accesses global data inside.
9445 * README.mt: Some info about the mt code development.
9447 * camel-folder-search.c (match_message): Put in a warning, this
9448 plain deadlocks so far, but i'm going to bed now.
9449 (camel_folder_search_finalize): Use e_sexp_unref() since its no
9452 * camel-session.c (camel_session_init): Init private data/lock.
9453 (camel_session_finalise): Free private data/lock.
9454 (camel_session_register_provider): Lock hash insert.
9455 (service_cache_remove): Lock.
9456 (camel_session_list_providers): "
9457 (camel_session_get_service): Lock the whole function.
9459 * camel-session.h (struct _CamelSession): Added private data.
9461 * providers/imap/camel-imap-store.c (camel_imap_store_init): Setup
9463 (camel_imap_store_finalize): Free private data.
9464 (connect_to_server): Lock around command calls. I dont think its
9465 needed, but it shouldn't hurt either.
9466 (imap_connect): Lock around command calls. Again, I don think it
9467 is needed, but wont hurt.
9468 (imap_disconnect): ditto for this one.
9469 (imap_create): Lock around command.
9471 (get_folder_info): "
9472 (subscribe_folder): "
9473 (unsubscribe_folder): "
9476 * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Lock
9477 around calling a command.
9478 (imap_refresh_info): Likewise.
9480 (imap_append_message): "
9481 (imap_copy_message_to): "
9482 (imap_move_message_to): "
9483 (imap_get_message): "
9484 (imap_update_summary): "
9485 (imap_search_by_expression): ", also minor logic cleanup.
9486 (imap_get_summary): Copy/ref the summary items.
9487 (imap_free_summary): And free it now too.
9489 * providers/imap/camel-imap-auth.c (imap_try_kerberos_v4_auth):
9490 Lock the command stream for the command session.
9492 * providers/imap/camel-imap-private.h: Private (locking info)
9493 stuff for imap provider.
9494 (CAMEL_IMAP_STORE_UNLOCK): Fix to call unlock, rather than lock!
9496 * camel-service.c (camel_service_query_auth_types): Lock also for
9497 the connection here, incase the service needs to connect.
9499 * camel-remote-store.c (camel_remote_store_init): Init private
9501 (camel_remote_store_finalise): Readded, free private data/lock.
9502 (remote_send_stream): Changed to return the number of bytes
9503 written, like a good little stream function should.
9504 (camel_remote_store_send_string): Lock for stream access.
9505 (camel_remote_store_send_stream): Same here.
9506 (camel_remote_store_recv_line): And here.
9507 (camel_remote_store_refresh_folders): Lock the store for cache
9509 (timeout_cb): Lock for stream access.
9511 2000-12-18 Not Zed <NotZed@HelixCode.com>
9513 * camel-service.c (camel_service_init): Init private data.
9514 (camel_service_finalise): Free private data.
9515 (camel_service_connect): Lock around connection access.
9516 (camel_service_disconnect): "
9518 * camel-service.h (struct _CamelService): Added private field.
9520 * camel-store.c (camel_store_init): Init private data/lock.
9521 (camel_store_finalize): Free private data/lock.
9522 (camel_store_get_folder): Lock internal calls.
9523 (camel_store_delete_folder): "
9524 (camel_store_rename_folder): "
9525 (camel_store_get_root_folder): "
9526 (camel_store_get_default_folder): "
9527 (camel_store_get_folder_info): "
9528 (camel_store_folder_subscribed): "
9529 (camel_store_subscribe_folder): "
9530 (camel_store_unsubscribe_folder): "
9531 (lookup_folder): Lock accesses to the folder cache.
9533 (uncache_folder): And here too.
9535 * camel-store.h (struct _CamelStore): Added a private field.
9537 * Makefile.am (noinst_HEADERS): Add camel-private.h. There is a
9538 comment in that header as to why it ins't installed.
9540 * camel-private.h: New header for private data, that subclasses
9543 * tests/lib/camel-test.c (camel_test_init): If we do have threads
9544 enabled already, dont call g_thread_init().
9546 * tests/lib/folders.c (test_folder_counts): Add free of info.
9547 (test_folder_message): And here too.
9549 * providers/local/camel-maildir-summary.c (remove_summary): Free
9551 (maildir_summary_check): Free info lookups.
9553 * providers/local/camel-mh-summary.c (message_info_new): Removed,
9555 (remove_summary): free info after being used.
9556 (mh_summary_check): Free info lookups.
9557 (mh_summary_sync): and here too.
9559 * providers/local/camel-mbox-summary.c (summary_update): Free info
9561 (mbox_summary_sync_full): Likewise.
9562 (mbox_summary_sync_quick): And here.
9563 (mbox_summary_sync): ... and here.
9565 * providers/local/camel-maildir-folder.c (maildir_get_message):
9566 Free messageinfo lookups.
9568 * providers/local/camel-mh-folder.c (mh_get_message): Free
9569 messageinfo lookups.
9571 * providers/local/camel-mbox-folder.c (mbox_get_message): Free
9572 messageinfo lookups.
9574 * providers/local/camel-local-summary.c
9575 (message_info_new_from_message): Removed, since it wasn't doing
9577 (message_info_new_from_parser): Same. And some other dead code.
9579 * providers/local/camel-local-folder.c (local_get_message_info):
9581 (local_free_message_info):new func to free info.
9583 (local_get_message_flags):
9584 (local_set_message_flags):
9585 (local_get_message_user_flag):
9586 (local_set_message_user_flag):
9587 (local_get_message_user_tag):
9588 (local_set_message_user_tag): Free all info lookups.
9589 (local_expunge): Dont call camel_folder_* functions, to avoid a deadlock.
9591 * providers/nntp/camel-nntp-folder.c
9592 (nntp_folder_get_message_info): deconstify.
9593 (nntp_folder_free_message_info): Free summary item.
9594 (nntp_folder_get_message_flags): Free summary lookup.
9595 (nntp_folder_set_message_flags): and here.
9596 (nntp_folder_get_uids): And here.
9598 * providers/imap/camel-imap-auth.c: Make base64_*_simple optional
9599 with the HAVE_KRB4 flag.
9601 * providers/imap/camel-imap-folder.c (imap_free_message_info):
9602 Added a free of the message info.
9603 (imap_refresh_info):
9605 (imap_refresh_info):
9606 (imap_get_unread_message_count):
9608 (imap_get_message_flags):
9609 (imap_set_message_flags): Free any summary lookups.
9610 (imap_get_message_flags): Get the message info directly from the
9611 summary, not via the folder interface.
9612 (imap_move_message_to): Dont call folder functions directly
9613 (delete_message), as it will deadlock since we already have the
9616 * providers/vee/camel-vee-folder.c (vee_free_message_info): Free/unref
9618 (vee_get_message_info): First ref the internal copy, then return it.
9619 (folder_changed): Free all got message info's.
9620 (message_changed): And here.
9621 (get_real_message): And here.
9622 (vee_folder_build): and here.
9623 (vee_folder_build_folder): ... and here.
9625 * camel-folder-summary.c (camel_folder_summary_info_new):
9626 Initialise the messageinfo refcount to 1.
9627 (camel_folder_summary_info_free): Down the refcount till we need
9629 (camel_folder_summary_info_ref): New function to up the refcount.
9630 (camel_message_info_dup_to): Sewt the refcount of the dest to 1.
9631 (camel_message_info_new): Set refcount to 1.
9632 (camel_message_info_new_from_header): Dont allocate the mi
9634 (camel_message_info_free): Handle refcounting.
9635 (camel_message_info_ref): New function.
9636 (camel_folder_summary_index): Ref the messageinfo before returning
9638 (camel_folder_summary_uid): Likewise.
9639 (camel_folder_summary_save): Access the messageinfo array
9640 directly, rather than through accessors (saves ref/unref).
9641 (camel_folder_summary_clear): Likewise.
9642 (camel_folder_summary_remove_index): Likewise.
9643 (main): Free lookups.
9645 * camel-folder-summary.h (CamelMessageInfo): Added a refcount
9648 * camel-folder.c (camel_folder_free_message_info): New function to
9649 'free' a message info.
9650 (camel_folder_get_message_info): Deconstify return.
9651 (camel_folder_lock): New (internal) function to thread-lock the
9653 (camel_folder_unlock): Likewise for unlocking.
9655 (thaw): Lock around access to folder->frozen/changed_frozen.
9656 (folder_changed): Likewise.
9657 (message_changed): Likewise.
9658 (camel_folder_init): Init private data, locks and moved frozen
9660 (camel_folder_finalize): Free new private data, locks and moved
9662 (copy_message_to): Free the messageinfo after we've used it.
9663 (move_message_to): And here too.
9664 (camel_folder_sync): Lock around virtual method invocation. Just
9665 locking around any virtual method that is known to need it. This
9666 is the first cut at locking.
9667 (camel_folder_refresh_info): "
9668 (camel_folder_expunge): "
9669 (camel_folder_get_message_count): "
9670 (camel_folder_get_unread_message_count): "
9671 (camel_folder_append_message): "
9672 (camel_folder_set_message_flags): "
9673 (camel_folder_get_message_flags): "
9674 (camel_folder_get_message_user_flag): "
9675 (camel_folder_set_message_user_flag): "
9676 (camel_folder_get_message_user_tag): "
9677 (camel_folder_set_message_user_tag): "
9678 (camel_folder_get_message): "
9679 (camel_folder_get_uids): "
9680 (camel_folder_free_uids): "
9681 (camel_folder_get_summary): "
9682 (camel_folder_search_by_expression): "
9683 (camel_folder_free_summary): "
9684 (camel_folder_search_free): "
9685 (camel_folder_move_message_to): "
9686 (camel_folder_copy_message_to): "
9687 (copy_message_to): Dont call any of our own folder functions
9688 directly, otherwise we will deadlock.
9689 (move_message_to): Likewise.
9691 * camel-folder.h (CamelFolder): Added free_message_info() function
9692 & deconstify get_message_info()'s return.
9693 (CamelFolder): Add a private field (for locks).
9694 (struct _CamelFolder): Moved changed_changed/frozen into private
9695 data, since it really is private and now needs locked access.
9697 2000-12-15 Jeffrey Stedfast <fejj@helixcode.com>
9699 * camel-mime-utils.c (header_fold): When checking to see if we
9700 need to fold the header, when we come accross a \n, make sure to
9701 start at p + 1 the next time through the loop or else we get into
9704 2000-12-13 Dan Winship <danw@helixcode.com>
9706 * Namespace cleanup: change a bunch of IS_CAMEL_* macros to
9709 2000-12-13 Chris Toshok <toshok@helixcode.com>
9711 * providers/imap/camel-imap-auth.c: add #include <sys/types.h> for
9714 2000-12-12 Christopher James Lahey <clahey@helixcode.com>
9716 * camel-folder-summary.c, camel-folder-summary.h: Added #ifndef
9717 NO_WARNINGS around a #warning. Added (void) to the prototype and
9718 declaration of camel_message_info_new.
9720 * camel-mime-message.h: Added an include for
9721 camel-mime-filter-bestenc.h. Added a prototype for
9722 camel_mime_message_set_best_encoding. Reformatted prototypes to
9725 * camel-mime-parser.c: Added #if d(!)0 around the states string
9726 lookup table since it's only used in debugging output.
9728 * camel-seekable-substream.c (stream_flush): Added a cast.
9730 * providers/imap/camel-imap-auth.c: Added #include <netinet/in.h>.
9732 * providers/imap/camel-imap-folder.c (imap_refresh_info): Made uid
9733 and flags const to fix warnings here.
9735 * providers/imap/camel-imap-store.c (get_folder_info): Made p
9736 const to fix warnings here.
9738 2000-12-12 Dan Winship <danw@helixcode.com>
9740 * tests/lib/Makefile.am: Add missing .h file. (From campd.)
9742 2000-12-11 Not Zed <NotZed@HelixCode.com>
9744 * providers/smtp/camel-smtp-transport.c (smtp_data): Remove use of
9745 linewrap filter. Headers are now wrapped. encode_8bit already
9746 enforces a 998 octet line limit.
9747 (smtp_data): Also fixed a memleak, we always have to unref our own
9748 copy of the filters. We also dont need to remove them manually,
9749 so dont bother. The type's an int too ...
9751 * camel-internet-address.c (internet_unformat): When scanning past
9752 quotes, remove them also.
9753 (camel_internet_address_format_address): If the name contains "'s,
9754 or ','s then strip and quotes and wrap the whole lot in one set of
9757 * Makefile.am (noinst_HEADERS): We dont want to install
9758 camel-charset-map-private.h, ever. There are probably other
9761 * camel-mime-part.c (write_to_stream): Fold header lines
9762 appropriately as we're writing them out.
9764 * camel-mime-utils.c (header_fold): Add a new argument, headerlen,
9765 tells it how long the associated header token is.
9766 (header_fold): Also,k check to see if we need to fold first, using
9767 a better algorithm, and also accept already-folded lines, and
9768 re-process accordingly.
9769 (rfc2047_decode_word): Add a little buffer space to iconv output
9770 for shifting overheads?
9771 (rfc2047_decode_word): finish the iconv with a null call, to flush
9773 (rfc2047_encode_word): Attempt to break up long words into
9774 appropriately sized, independent, chunks. See rfc2047, section 2.
9775 (header_decode_mailbox): Dont add in extra spaces into the output
9776 if we are decoding adjacent encoded words. We can only guess this
9777 case, as some broken mailers put encoded words inside quoted
9779 (header_encode_phrase): Dont merge words if they are going to end
9780 up too long. Also change back ot only merge consecutive words of
9781 the same type. e.g. 'foo. blah fum.' -> "foo." blah "fum." or
9782 'iam an. idiot' -> iam "an." idiot
9784 * camel-medium.c (camel_medium_set_header): Hrm, we actually want
9785 to call set_header, not add_header here, probably explains some
9786 duplicate X-Evolution headers i was trying to track down. Also
9787 changed the api to handle a NULL value == remove the header.
9789 * providers/local/camel-maildir-summary.c
9790 (maildir_summary_decode_x_evolution): Always return error, we dont
9791 use x-evolution for maildir.
9792 (maildir_summary_encode_x_evolution): Always return a NULL string,
9794 (maildir_summary_add): Hook in here, since the _new function
9795 doesn't have access to any flags from the caller. If we have
9796 flags, then update the filename again. Not ideal, but should
9799 2000-12-08 JP Rosevear <jpr@helixcode.com>
9801 * tests/message/Makefile.am: Remove test3 from build until the files
9804 2000-12-09 Not Zed <NotZed@HelixCode.com>
9806 * camel-mime-message.c (camel_mime_message_set_date): Change the
9807 sign of the default date offset when none is supplied.
9808 (camel_mime_message_set_date): Also do dst if its dst (forward 1
9809 hour). Fixes #928 + some.
9811 2000-12-06 Not Zed <NotZed@HelixCode.com>
9813 * tests/lib/camel-test.h (check): Change line no format so that
9814 emacs can detect it.
9816 2000-12-06 Jeffrey Stedfast <fejj@helixcode.com>
9818 * providers/imap/camel-imap-folder.c (imap_refresh_info): We want
9819 to bitwise-or the server and cached flags here so that we keep the
9820 flags that we have set locally and set any additional flags that a
9821 parallel connection may have set.
9823 2000-12-05 Jeffrey Stedfast <fejj@helixcode.com>
9825 * providers/smtp/camel-smtp-transport.c (smtp_data): If the data
9826 wrapper fails to be written to the stream, unref it and the
9827 filters before returning.
9829 2000-12-05 Dan Winship <danw@helixcode.com>
9831 * providers/imap/camel-imap-folder.c (imap_get_message): use
9832 BODY.PEEK[] rather than RFC822, so the message doesn't get marked
9834 (imap_refresh_info): Fix a really really really dumb bug.
9836 2000-12-05 Dan Winship <danw@helixcode.com>
9838 * providers/imap/camel-imap-folder.c (imap_set_message_flags): Fix
9839 the check for "flags aren't actually changing".
9841 * providers/local/camel-local-folder.c (local_set_message_flags,
9842 local_set_message_user_flag, local_set_message_user_tag): Don't
9843 emit message_changed unless the flags actually changed.
9845 * providers/nntp/camel-nntp-folder.c
9846 (nntp_folder_set_message_flags): Don't emit message_changed unless
9847 the flags actually changed. Fix the check for marked as seen.
9849 2000-12-05 Not Zed <NotZed@HelixCode.com>
9851 * camel-seekable-substream.c (stream_flush): stream_flush does
9852 make sense for a substream afterall (if you have a stream_write).
9853 (stream_write): Implement this.
9854 (stream_seek): Change the STREAM_END behaviour to be more sane.
9855 if bounded go from the end of the bound, if unbounded, go from the
9856 end of the parent stream.
9858 * camel-stream-mem.c (stream_read): Dont return error if reading
9859 past the end of data, just return 0.
9861 * camel-stream-fs.c (camel_stream_fs_init): Initialise the stream
9863 (stream_seek): Fix the logic when seeking from the end of an
9865 (camel_stream_fs_new_with_fd): If the fd is invalid (-1), then
9866 return NULL immediately.
9867 (stream_seek): Range check a SEEK_END so it fits within
9870 2000-12-01 Not Zed <NotZed@HelixCode.com>
9872 * tests/lib/folders.c (test_folder_basic): New test to perform
9873 basic store operations on folders (taken from folders/test1).
9874 (test_folder_message_ops): Tkane the guts out of folders/test2.
9876 2000-12-04 Jeffrey Stedfast <fejj@helixcode.com>
9878 * providers/smtp/camel-smtp-transport.c (smtp_connect): i18n-ize
9880 (get_name): And here.
9881 (_send_to): Here too.
9882 (smtp_helo): And here and there...
9883 (smtp_mail): And around the square...
9884 (smtp_rcpt): Saying catch me if you can...
9885 (smtp_data): And here three.
9886 (smtp_rset): And here.
9887 (smtp_quit): And finally here.
9889 2000-12-01 Jeffrey Stedfast <fejj@helixcode.com>
9891 * camel-folder-search.h: Added system_flag to CamelFolderSearchClass
9893 * camel-folder-summary.c (camel_system_flag_get): Convenience
9894 function to return whether or not a flag is set using a string as
9896 (camel_system_flag): Return the integer value of the flag string.
9898 * camel-folder-search.c (search_system_flag): New ESExp callback
9899 for allowing vfoldering on CamelMessageInfo flags.
9901 2000-12-01 Dan Winship <danw@helixcode.com>
9903 * camel-service.c (camel_service_disconnect): Don't
9904 g_return_if_fail if the service is already disconnected. Just
9907 * providers/pop3/camel-pop3-store.c (pop3_try_authenticate):
9908 Return FALSE (don't try again) if we get CAMEL_POP3_FAIL.
9909 (pop3_connect): If we don't succeed, disconnect.
9911 2000-11-30 Jeffrey Stedfast <fejj@helixcode.com>
9913 * providers/imap/camel-imap-store.c
9914 (parse_list_response_as_folder_info): Fix a possible bug where
9915 'name' could be uninitialized.
9917 * camel-folder-summary.c (camel_message_info_new): New convenience
9918 function, doesn't do much but it sure makes code cleaner to read.
9919 (camel_message_info_new_from_header): This one makes my life heaven.
9921 2000-11-30 Jeffrey Stedfast <fejj@helixcode.com>
9923 * providers/imap/camel-imap-summary.c (camel_imap_summary_new):
9924 Handle the case where the summary failed to load - clear the
9925 summary and then set the dirty bit so that it is sure to save
9926 later. Is this the right fix?
9928 2000-11-30 Dan Winship <danw@helixcode.com>
9930 * camel-exception.c (camel_exception_setv): Remove unused
9933 2000-11-30 Not Zed <NotZed@HelixCode.com>
9935 * providers/local/camel-mbox-folder.c (mbox_get_message): Remove
9936 assertion that content is there, when it no longer can be.
9938 * camel-folder-summary.h: Removed pos/bodypos/endpos from
9939 camelmeessagecontentinfo.
9940 (CamelMessageFlags): Added an attachments flag.
9942 * providers/local/camel-local-summary.h: Added load virtual
9945 * tests/lib/folders.c (test_message_info): Accessors.
9946 (test_folder_message): "
9948 * camel-folder-thread.c (get_root_subject): Fix accessors.
9951 * camel-folder-search.c (camel_folder_search_execute_expression):
9952 Accessors for messageinfo.
9953 (search_match_all): "
9954 (search_header_contains): "
9955 (search_header_contains): "
9956 (search_body_contains): "
9957 (camel_folder_search_execute_expression): Use mepool_strdup.
9959 * providers/local/camel-mbox-summary.c (summary_update): Accessors
9961 (mbox_summary_sync_full): "
9963 * providers/local/camel-mh-summary.c (remove_summary): Accessors
9965 (mh_summary_check): "
9966 (mh_summary_sync_message): "
9967 (mh_summary_sync): "
9969 * providers/local/camel-mh-folder.c (mh_append_message): Use
9972 * providers/local/camel-local-summary.c
9973 (local_summary_decode_x_evolution): Use accessor to uid.
9974 (local_summary_encode_x_evolution): Likewise.
9975 (message_info_new): And here.
9976 (camel_local_summary_load): Call virtual load function.
9977 (local_summary_load): Default load function, load summary.
9978 (camel_local_summary_load): Check file exists before trying to
9980 (camel_local_summary_construct): Turn off building content info!
9981 (CAMEL_LOCAL_SUMMARY_VERSION): Bump, since we dont build content
9983 (camel_local_summary_load): After a successful load/check, do a
9984 save too so we dont have to go through it again randomly.
9986 * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): Use
9987 accessors for messageinfo.
9989 * providers/nntp/camel-nntp-folder.c (nntp_folder_get_uids): Use
9992 * providers/imap/camel-imap-folder.c (imap_refresh_info): Use
9994 (imap_sync): Likewise.
9995 (imap_get_uids): Likewise.
9996 (imap_update_summary): And here.
9998 * providers/vee/camel-vee-folder.c (vfolder_remove_match): Use
10000 (vfolder_add_match): Handle estrv stuff.
10001 (vfolder_change_match): Accessor for uid.
10002 (get_real_message): "
10004 (vee_folder_build): " + estrv.
10005 (vee_folder_build_folder): "
10007 * providers/local/camel-maildir-folder.c (maildir_append_message):
10008 Use acccessors for uid's.
10009 (maildir_get_message): Here too.
10011 * providers/local/camel-maildir-summary.c
10012 (camel_maildir_summary_init): Setup the string count for us.
10013 (message_info_new): Access the string array directly.
10014 (message_info_free): No need to free string if using array.
10015 (camel_maildir_summary_info_to_name): Use accessor to get to uid.
10016 (remove_summary): And here.
10017 (maildir_summary_check): Likewise.
10018 (maildir_summary_sync): And here.
10019 (maildir_summary_load): Load up a cache of uid->filename mappings
10020 before loading the actual summary file. This saves us having to
10021 waste the diskspace storing the filenames in the summary itself,
10022 and also helps us sync the summary better on load.
10023 (message_info_load): If we have the load_map setup, and the uid
10024 exists, then set the filename cache from it, and update the flags
10025 from the name, incase our summary mismatches it.
10027 * camel-folder-summary.c (camel_folder_summary_init): Setup string
10028 count for compressed info record. An optional compile mode which
10029 stores all strings for a given messageinfo into a packed array,
10030 which should save 36-50 bytes/record.
10031 (camel_folder_summary_info_new): Init the string array.
10032 (message_info_new): Set the string array items, as required.
10033 (message_info_load): And here too.
10034 (message_info_save): Use accessors to get to strings.
10035 (message_info_free): Free strings as one.
10036 (camel_message_info_dup_to): Handle packed array case.
10037 (camel_folder_summary_add): Use accessors. And pack the strv
10039 (summary_assign_uid): New function to assign a unique uid to a
10040 message, if it doesn't have one.
10041 (camel_folder_summary_add): Call assign_uid instead of doing it
10043 (camel_folder_summary_info_new_from_parser): "
10044 (camel_folder_summary_info_new_from_message): "
10045 (camel_folder_summary_encode_string): constify.
10046 (camel_folder_summary_encode_token): "
10047 (summary_build_content_info_message): Fix accessors to messageinfo.
10048 (CAMEL_FOLDER_SUMMARY_VERSION): Bumped, for removal of
10049 contentinfo->pos data.
10050 (camel_folder_summary_info_new_from_parser): Calculate the size
10051 based on the parser position, not the removed contentinfo stuff.
10052 (camel_folder_summary_info_new_from_message): Remove size stuff.
10053 (camel_folder_summary_offset_content): Removed, no longer means anything.
10054 (content_info_new):
10055 (content_info_load):
10056 (content_info_save):
10057 (summary_build_content_info): Remove stuff for contentinfo->pos*.
10058 (summary_build_content_info): Take a msginfo argument, set
10059 attachments flag if we find any attachments.
10060 (summary_build_content_info_message): set attachments flag if we
10061 find any attachments.
10062 (camel_folder_summary_info_new_from_parser): Always scan the
10063 content info, even if we dont save it.
10064 (camel_folder_summary_info_new_from_message): And here too.
10065 (summary_build_content_info): Only create the contentinfo stuff if
10066 we have it turned on, otherwise just parse and discard.
10067 (summary_build_content_info_message): Likewise.
10069 2000-11-29 Jeffrey Stedfast <fejj@helixcode.com>
10071 * camel-store.c (camel_store_get_folder): Updated the gtk-doc
10074 2000-11-29 Dan Winship <danw@helixcode.com>
10076 * camel-mime-utils.c:
10077 * camel-mime-filter-charset.c: Use iconv instead of unicode_iconv.
10079 * providers/imap/camel-imap-command.c (imap_read_untagged): Fix
10080 some off-by-one-ness.
10082 * camel-stream-buffer.c (stream_read): Fix another bug found in
10083 previously-unused code here.
10085 2000-11-29 Ettore Perazzoli <ettore@helixcode.com>
10087 * tests/lib/Makefile.am (INCLUDES): `$(top_srcdir)' for builddir
10088 != srcdir compilation.
10090 2000-11-29 Not Zed <NotZed@HelixCode.com>
10092 * tests/message/test2.c (main): Add a missed unref.
10094 * camel-stream-mem.c (camel_stream_mem_set_buffer): We must set
10095 ourselves as the owner of the byte-array.
10096 Weird, someone has modified this file (its been reindented), but i
10097 can't see any changelogs ...
10099 * tests/lib/messages.c (content_finalise): Fix memleak in tester,
10100 free byte array when our content object is deleted.
10102 * camel-folder-search.c (camel_folder_search_finalize): Yeah
10103 great, so the sexp is a gtk object, not a camel object. Isn't
10104 that going to be fun to fix?
10106 * camel-session.c (camel_session_finalise): Free the storage path.
10108 * providers/local/camel-local-store.c (camel_local_store_init): If
10109 store->folders is setup, free it first, then overwrite. Hmm,
10110 this seems a bit crappy to me.
10112 * camel-store.c (camel_store_init): Dont setup store->folders if
10115 * camel-exception.c (camel_exception_setv): Removed a memleak. no
10116 need to strdup after a strdup_printf!!!
10118 * camel-address.c (camel_address_finalize): Free the address
10119 ptrarray, once finished.
10121 * providers/local/camel-local-folder.c (local_finalize): Make sure
10122 we dont leave the folder locked on close.
10123 (local_finalize): Free summary/search.
10125 * providers/local/camel-mh-summary.c (mh_summary_next_uid_string):
10126 Small memleak, always free name after using it.
10128 * camel-mime-part.c (set_content_object): Free txt after setting
10131 * providers/local/camel-maildir-summary.c (maildir_summary_check):
10132 Fix a memleak, close the dir after scanning new.
10133 (message_info_free): Added so we can free the filename cached in
10135 (camel_maildir_summary_finalise): Free the hostname.
10137 * tests/folder/test[12].c (main): Clear out camel-test before
10140 * providers/local/camel-mbox-summary.c (mbox_summary_sync_quick):
10141 Because encode_x_evolution folds the line (sigh, because
10142 encode_param does, unlike every other function in
10143 camel-mime-utils), unfold the encoded result before comparing.
10144 (mbox_summary_sync_quick): Another small memleak, free xevnew once
10147 * camel-mime-utils.c (header_decode_quoted_string): Removed a
10148 redundant check for c=0.
10149 (header_unfold): New function to un-fold headers.
10151 * providers/local/camel-local-summary.c
10152 (local_summary_encode_x_evolution): some problems with encoding
10153 tags, using the wrong output strings.
10154 (local_summary_encode_x_evolution): We dont need to append a ;
10155 either, param_list_format_append() will do it for us.
10157 2000-11-28 JP Rosevear <jpr@helixcode.com>
10159 * camel-lock.c: No longer hard code the enabled lock types
10161 2000-11-28 Dan Winship <danw@helixcode.com>
10163 * camel-remote-store.c (remote_recv_line): Don't set exception to
10164 g_strerror (errno) when nread == 0, because it won't have been
10167 * providers/pop3/camel-pop3-folder.c (pop3_finalize): Don't try to
10168 free things if they haven't been set yet.
10170 2000-11-28 Jeffrey Stedfast <fejj@helixcode.com>
10172 * providers/smtp/camel-smtp-transport.c (smtp_connect): Clear the
10173 exception if EHLO fails before trying HELO in the cases where the
10174 SMTP provider doesn't announce its ESMTPness.
10176 2000-11-28 Not Zed <NotZed@HelixCode.com>
10178 * providers/local/camel-maildir-summary.c
10179 (camel_maildir_summary_init): Set the info size's properly, oops!
10181 * tests/lib/folders.[ch]: Folder testing helpers.
10183 * tests/folder/test2.c: Test basic message ops on folders.
10185 * tests/folder/test1.c (main): Test basic folder ops on (local)
10188 * providers/local/camel-local-provider.c
10189 (camel_provider_module_init): Removed some debug.
10191 * providers/local/camel-maildir-folder.c
10192 (camel_maildir_folder_class_init): fix parent class.
10194 * providers/local/camel-mh-folder.c (camel_mh_folder_class_init):
10195 Fix parent class (damn cut & paste).
10197 * providers/local/camel-maildir-store.c (get_folder): Call parent
10199 (camel_maildir_store_class_init): Fix parent class setup.
10200 (delete_folder): Check the folder exists before trying to delete
10202 (delete_folder): Try and make the delete operation atomic/rollback
10203 failures. e.g. if one directory isn't empty, then create the
10204 other empty ones back. Also clear the tmp directory fully first.
10206 * providers/local/camel-mbox-store.c (get_folder): Call parent
10208 (camel_mbox_store_class_init): parent class is camel_local_store,
10209 not camel_folder, oops.
10210 (delete_folder): Return an error if it doesn't exist, rather than
10213 * providers/local/camel-mh-store.c (get_folder): Call parent impl.
10214 (camel_mh_store_class_init): fix parent class setup.
10215 (delete_folder): Error if it doesn't exist now.
10217 * camel-folder.c (camel_folder_move_message_to):
10218 (camel_folder_copy_message_to): Added warnings as these functions
10219 are going to be removed later.
10221 * camel-store.c (camel_store_get_root_folder): Fix for an early
10222 api change. We want CAMEL_STORE_FOLDER_CREATE, not TRUE, since
10224 (camel_store_get_default_folder): And here too.
10226 * providers/local/camel-local-store.c (xrename): Handle renaming
10227 folders differently to renaming files.
10228 (get_default_folder_name): local stores dont have a default
10229 folder, so make it so. Or at least, it doesn't seem to make sense
10231 (get_root_folder_name): Same for root.
10232 (get_folder): Added parent implementation, that makes sure the
10233 service path exists, if we are creating a new folder (but doesn't
10234 create the folder).
10236 2000-11-27 Not Zed <NotZed@HelixCode.com>
10238 * providers/local/camel-local-store.c (xrename): Fixed races. Use
10239 link/unlink, rather than rename, to properly detect overwriting
10240 another file. And allow some files to be missing.
10242 2000-11-28 Radek Doulik <rodo@helixcode.com>
10244 * providers/local/camel-local-summary.c
10245 (local_summary_decode_x_evolution): add scan = scan->next; to
10246 avoid infinite loop
10248 2000-11-27 Dan Winship <danw@helixcode.com>
10250 * providers/imap/camel-imap-command.c (imap_read_untagged): Make
10251 this gratuitously more complicated. No wait, I mean, fix bugs. Now
10252 fully handles NULs in the data stream (which "can't happen" but
10253 do) and also handles responses containing multiple literals. Also
10254 does less copying than the original code.
10256 * camel-stream-buffer.c (stream_read): Fix a bug that could make
10257 it lose sync and/or overrun buffers.
10259 2000-11-27 JP Rosevear <jpr@helixcode.com>
10261 * providers/local/.cvsignore: shush
10263 2000-11-27 Not Zed <NotZed@HelixCode.com>
10265 * providers/Makefile.am: Removed mh, mbox, added local, to the default.
10267 2000-11-24 Not Zed <NotZed@HelixCode.com>
10269 * tests/data/getaddr.pl: little util to scan mailboxes for any and
10270 every address they contain.
10272 * tests/message/test2.c (main): Added a bunch of stuff to test
10273 decoding/reencoding/etc of internationalised addresses.
10275 * tests/message/lib/address-data.h: Copy of some unicode/other
10276 testing data. **Beware** of editing this file in emacs, it'll
10277 probably try and convert all the characters to something
10280 * tests/lib/camel-test.c (camel_test_break): Add a debugger hook
10283 * camel-mime-utils.c (quoted_encode): Check for space and convert
10285 (header_decode_mailbox): Fixed the 'check comments for realname'
10286 code, problem was the domain getting code was skipping all
10287 whitespace/comments before we could get a look-in. This is
10288 approximate but fairly robust.
10289 (header_decode_text): Dont use the c-type isspace func here, we
10290 want a specific whitespace only.
10291 (header_decode_text): If we have decoded words next to each other,
10292 do not insert whitespaces between them, which is what rfc2047 requires.
10293 (header_decode_text): Make c unsigned too.
10295 * tests/README: Added at least some explanation of all this stuff.
10297 * tests/lib/camel-test.h (check_msg): Added a non-gcc version of
10298 the fail command, we dont get the expression that failed, but no
10299 matter. Should be (more) portable now.
10300 (check, check_msg): Put the file/lineno in the default message.
10302 * Makefile.am (SUBDIRS): Add tests.
10304 * camel-mime-filter-basic.c (filter): Well, I'll add the extra
10305 bytes here too, lathough not strictly needed, might save a
10306 re-malloc when we get to complete().
10308 * camel-mime-filter-charset.c (filter): Make sure we have room if
10309 we only convert very short data.
10310 (complete): and here too.
10312 * tests/Makefile.am: Initial test harness & tests. Requires gcc
10315 * camel-internet-address.c (d): Turn off debug.
10317 * camel-charset-map.c (camel_charset_step): Oops, & masks for set
10318 intersection, not | them. Dunno how this got even close to
10321 2000-11-23 Not Zed <NotZed@HelixCode.com>
10323 * camel-mime-filter-basic.c (filter): For base64 encoding, the
10324 output size for 0, 1, or 2 bytes of input can exceed input*2, so
10325 make sure we account for that as well.
10326 (complete): And here.
10327 (complete): Similarly for qp encoding, if we have a trailing
10328 space, we need some extra bytes (not needed for 'filter()', as any
10329 such bytes are stored in state/save).
10331 * camel-mime-utils.c (quoted_decode_step): Removed fixme not required.
10332 (quoted_encode_close): Dont append a trailing afterall. Otherwise
10333 a pass through the encode/decode will grow the message each time.
10335 2000-11-22 Radek Doulik <rodo@helixcode.com>
10337 * camel-mime-utils.c (header_msgid_generate): check for return
10340 2000-11-21 Dan Winship <danw@helixcode.com>
10343 * camel-movemail.c: add #ifdef HAVE_ALLOCA_H
10345 2000-11-21 Not Zed <NotZed@HelixCode.com>
10347 * providers/local/camel-mh-summary.c (mh_summary_sync_message):
10348 Shite, -1 on error, >=0 on success. So i've just been truncating
10349 all the messages I touched, good one zed.
10350 (mh_summary_sync_message): Sigh, and write to the right damn fd as
10352 (mh_summary_sync_message): Argh, and we need to compare the length
10353 of the old xev -1 to the new xev, to check if we can optimise it.
10355 * camel-folder.c (camel_folder_change_info_new): Init the pool.
10356 (camel_folder_change_info_add_source): Allocate string in the
10358 (camel_folder_change_info_add_source_list):
10359 (camel_folder_change_info_add_update): No longer free the key, as
10361 (change_info_add_uid): Add a new arg, copy, telling it whether to
10362 copy the uid argument or not, and copy using mempool_strdup.
10363 (change_info_cat): Tell add_uid to copy the string.
10364 (camel_folder_change_info_add_update): Call add_uid directly.
10365 (change_info_remove): Call add_uid directly, with no copy, and
10367 (change_info_free_update): No longer required since we dont malloc
10369 (camel_folder_change_info_add_uid): Fix for add_uid change.
10370 (camel_folder_change_info_remove_uid):
10371 (camel_folder_change_info_change_uid):
10372 (change_info_clear): No longer needed, just set the size to 0 on
10373 the array directly.
10374 (camel_folder_change_info_clear): Empty the arrays directly, and
10375 flush the mempool too, and also clear uid_source, incase anyone
10376 was silly enough to call us in the wrong order.
10377 (camel_folder_change_info_free): Dont bother clearing the array's
10378 contents, just free the pool and throw away all the indexes.
10380 * camel-folder.h: Added a mempool to CamelFolderChangeInfo to
10381 store the uid's we get.
10383 * camel-folder-search.c (search_match_all): If we are only
10384 matching a single info, just use that/do the search.
10385 (camel_folder_search_match_expression): New function. Matches a
10386 single message info against an expression.
10387 (camel_folder_search_init): Init a hash table used to map the
10388 returned gptrarrays' to mempools.
10389 (camel_folder_search_execute_expression): Store all of the string
10390 data in a mempool, slightly faster, less wasted space (usually),.
10391 (camel_folder_search_free_result): Check for the mempool that
10392 stores the data for the list, and free that if we have it,
10393 otherwise assume we need to use g_free() (which should only happen
10394 if the list is empty at the moment).
10395 : commented out the debugging prints. Got sick of 'executing
10396 header search' crap.
10398 * providers/vee/camel-vee-folder.c (camel_vee_folder_init): Init
10400 (camel_vee_folder_finalise): Free changes.
10401 (vfolder_add_match): Simple helper to add a new matching info
10403 (camel_vee_folder_add_folder): Only trigger a changed event if we
10405 (vfolder_change_match): New function, changes our local vfolder
10406 info to match the source.
10407 (vfolder_add_match): Add a new info to the vfolder list.
10408 (vfolder_remove_match): Remove a no-longer matching info from the
10410 (message_changed): check if the message still matches, and
10411 remove/etc as required.
10412 (camel_vee_folder_finalise, init): init/free search object.
10413 (vee_folder_build_folder): Build the changes to the folder into
10414 the changes data, as we go.
10415 (folder_changed): If the folder gave us an explicit list of
10416 changes, then process each one separately (unless there's a lot
10419 * providers/vee/camel-vee-folder.h: Added a changes field to the
10422 * Makefile.am (libcamel_la_SOURCES): Added
10423 camel-folder-thread.[ch].
10425 * camel-folder-thread.c: message-threading algorithm, taken from
10426 evolutions' mail component, as it is generally more useful than
10427 just for evolution itself. Changed to use e-memchunks as well to
10428 speed it up a little and use less mem.
10430 2000-11-20 Jeffrey Stedfast <fejj@helixcode.com>
10432 * camel-remote-store.c (remote_recv_line): Fixed to return the
10433 correct bytecount in all cases which is the real fix to
10434 imap_parse_nstring.
10436 * providers/imap/camel-imap-command.c (imap_read_untagged): Again,
10437 don't use strlen for the post-data, use 'n'.
10439 * providers/imap/camel-imap-utils.c (imap_parse_nstring): Undo my
10442 2000-11-20 Not Zed <NotZed@HelixCode.com>
10444 * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): Fixes for
10445 the summary messageid changes. Hash the messageid and store it.
10446 (get_XOVER_headers): Use camel_folder_summary_info_new() to create
10447 the summary item before adding it.
10449 * camel-folder-summary.h (CamelMessageInfo): Changed the
10450 messgae-id to be an 8 byte md5 hash, and the references list to be
10453 * providers/local/camel-mh-summary.c (mh_summary_sync_message):
10454 New function, sync out the message info stuff. Only updates the
10455 X-Ev header if it can get away with it, otherwise writes out a
10457 (mh_summary_sync): Added more functionality. All summary info is
10458 now written to the X-Ev header, etc, and new messages re-written
10459 if required during the sync process.
10461 * providers/local/camel-local-folder.c
10462 (local_set_message_user_flag): Set the XEVCHANGE flag.
10463 (local_set_message_user_tag): And here too.
10465 * providers/local/camel-local-summary.h: New flag
10466 CAMEL_MESSAGE_FOLDER_XEVCHANGE to indicate the XEV header has
10467 probably changed size and needs to be rewritten in whole.
10469 * camel-folder-summary.c (next_uid_string): Want this static, not
10471 (message_info_new): Store the references and message-id values as
10472 64 bit, binary hashes.
10473 (message_info_load): fix for message-id/references changes.
10474 (message_info_save): Likewise.
10475 (camel_message_info_dup_to): And here.
10476 (camel_message_info_free): And here too. No longer free
10477 message_id, and simple free for references array.
10478 (CAMEL_FOLDER_SUMMARY_VERSION): Bumped file revision.
10479 (camel_folder_summary_init): Init memchunk allocators to empty.
10480 (camel_folder_summary_finalize): Free memchunk allocators if
10482 (message_info_new): Use the chunk allocator to allocate message
10484 (camel_folder_summary_info_new): New helper to allocate the
10485 message info, and setup the memchunk if required.
10486 (content_info_alloc): Likewise for content info's.
10487 (message_info_load): Use summary_info_new_empty.
10488 (content_info_new): Use content_info_alloc.
10489 (content_info_load): "
10490 (content_info_free): Free the content info as a memchunk.
10491 (message_info_free): Free everything directly and the base as a
10492 memchunk, rather than calling camel_message_info_free(), which
10493 assumes a malloc'd array.
10495 * providers/local/camel-local-summary.c: Include ctype.h, kill a
10497 (local_summary_decode_x_evolution): If we get a NULL message info,
10498 then dont try and set anything, just check for validity.
10499 (camel_local_summary_write_headers): New function to write a set
10500 of headers to an fd.
10501 (camel_local_summary_check): Added some statistic generation
10502 stuff for memory profiling.
10504 * providers/local/camel-mbox-summary.c (header_write): Changed to
10505 use stdoi functions to write out the header to a buffered stream,
10506 instead of using writev, which is apparently slow (and writing
10507 each line separately is slow anyway).
10508 (mbox_summary_sync_full): New implementation. Does things
10509 differently, doesn't use or require the content info stuff.
10510 (summary_rebuild): Dont return an error if we start scanning at
10512 (mbox_summary_sync_full): If we are not writing out new headers,
10513 make sure we copy the From line as we go, and update frompos
10515 (mbox_summary_sync_full): Always copy the From line from the
10516 existing one, rather than trying to make one up ourselves.
10517 (mbox_summary_sync): If we can get by with a quick-sync, then try
10518 it, if that fails, then try a full sync anyway.
10519 (mbox_summary_sync_quick): Quick sync. Only update system flags,
10521 (mbox_summary_sync_full): Use the proper local summary encode_xev
10523 (header_evolution_decode): Removed, no longer needed.
10524 (header_evolution_encode): Same.
10525 (copy_block): No longer needed, removed.
10526 (header_write): Removed, replaced with
10527 camel_local_summary_write_headers.
10528 (mbox_summary_sync_full): Fixed for header_write change.
10530 * camel-mime-parser.c (folder_scan_step): Implement the new
10531 optional parser state HSCAN_PRE_FROM, that returns the (currently
10532 unfiltered) input data.
10533 (folder_scan_drop_step): Do the right thing for the PRE_FROM
10535 (camel_mime_parser_scan_from): Update the doco.
10536 (camel_mime_parser_scan_pre_from): Ok, make this behaviour
10537 optional, it simplifies a lot of loops that dont otherwise need to
10539 (folder_scan_step): Made the PRE_FROM state optional.
10540 (struct _header_scan_state): Made the bool vars 1 bit.
10541 (folder_pull_part): Free the from_line buffer if it is there.
10542 (folder_scan_skip_line): Added a new arg, can save the skpped data
10543 to a byte_array, as we go.
10544 (folder_scan_step): Fixed calls to skip_line approrpiately. Now
10545 we save the from line as we parse it.
10546 (camel_mime_parser_read): New function to read from the mime
10547 parser buffer directly. Useful if you use the parser to read the
10548 first/some headers, then need to scan the rest of the data,
10549 without needing to use a seek(), or allocate your own buffers.
10551 * camel-mime-parser.h (struct _header_state): Added a new parser state,
10552 pre-from which returns any data found before a from line during
10553 parsing (all other data can be retrieved by the caller except
10556 2000-11-17 Jeffrey Stedfast <fejj@helixcode.com>
10558 * providers/imap/camel-imap-utils.c (imap_parse_nstring): When
10559 extracting a literal string, capture up until the end of the last
10560 line - this we we don't lose any data if the byte count is off.
10562 * providers/imap/camel-imap-command.c (imap_read_untagged): Use
10563 the byte-read count to decrement the number of bytes left to read
10564 rather than using strlen. Not only does this protect against a DoS
10565 (embedded NUL chars in the literal string would make strlen
10566 inaccurate) but it also improves performace a little.
10568 * camel-remote-store.c (remote_recv_line): *Sigh* Return the
10569 number of bytes read on success rather than 0. Also don't use
10570 camel_stream_buffer_read_line since we can't get an accurate octet
10573 2000-11-17 Not Zed <NotZed@HelixCode.com>
10575 * providers/local/camel-local-summary.c (local_summary_add): Clear
10576 the NOXEV/FLAGGED bits, since we do have an xev header. um m,
10577 maybe this is right, this assumes a write is following. Maybe
10578 this should be done in folder::append() instead ...
10580 * camel-stream-buffer.c (camel_stream_buffer_gets): We should
10581 always terminate the string. No need to check outptr is in range,
10582 its already been checked.
10584 * providers/local/camel-mbox-summary.c (mbox_summary_sync): When
10585 we update the summary, do it from mbox_summary->folder_size, not
10586 the content info endpos (which isn't any good anymore anyway).
10588 * providers/local/camel-mbox-folder.c (mbox_append_message): Set
10589 the frompos from the current folder size, since summary_add wont
10590 have initialised it to anything useful.
10592 2000-11-16 Not Zed <NotZed@HelixCode.com>
10594 * providers/local/camel-local-summary.c
10595 (local_summary_encode_x_evolution): Check the uid string is all
10596 digits before trying to write a 'standard' x-ev header.
10598 * providers/local/camel-maildir-summary.c
10599 (camel_maildir_summary_info_to_name): Convert an info into a
10600 maildir name:info filename.
10601 (camel_maildir_summary_name_to_info): Convert a name:info filename
10602 into an info, and tell us if it didn't match it.
10603 (message_info_new): When creating a new filename, gets its info
10604 from the flags field. Likewise if creating from an existing file,
10606 (maildir_summary_sync): Remove a small memleak. Also, if our
10607 flags and that requires a filename change, perform that here.
10608 (message_info_new): Get the received date from the filename.
10609 Also, dont overwirte the uid if we have one.
10610 (maildir_summary_check): Sort the summary in received order before
10612 (maildir_summary_next_uid_string): Test the name for collusions
10613 before we give it out. Retry, and if that fails, well, I guess we
10616 * providers/local/camel-mbox-folder.c (mbox_lock): Implement mbox
10618 (mbox_unlock): And unlocking.
10619 (mbox_append_message): Lock the folder for write before doing
10621 (mbox_get_message): Lock the folder for read before doing
10624 * providers/local/camel-local-folder.c (camel_local_folder_lock):
10625 Implement something here. We handle the recursive ability but
10626 pass the locking to the folder itself.
10627 (camel_local_folder_unlock): Likewise for unlocking.
10628 (local_lock): Default - do nothing, return success.
10629 (local_unlock): Same.
10630 (local_sync): Changed slightly for locking api changes, and also,
10631 only lock around the sync process itself.
10633 * camel-lock.c: New file - utility functions for locking using
10634 different strategies and/or for locking folders safely.
10636 * Makefile.am (libcamel_la_SOURCES): Adde camel-lock.[ch]
10638 2000-11-15 Radek Doulik <rodo@helixcode.com>
10640 * camel-mime-utils.c: mime_guess_type_from_file_name moved back to
10641 composer as it introduced unwanted VFS dependency
10642 removed #include <libgnomevfs/gnome-vfs.h>
10644 2000-11-15 Not Zed <NotZed@HelixCode.com>
10646 * providers/Makefile.am: Removed local again, not quite ready.
10648 2000-11-14 Not Zed <NotZed@HelixCode.com>
10650 * camel-folder-summary.c (message_info_new_from_message): Use
10651 message_info_new to create the summary from headers, instead of
10652 getting directly from the message.
10653 (format_recipients): No longer required.
10655 * providers/Makefile.am (SUBDIRS): Added local.
10657 2000-11-11 Not Zed <NotZed@HelixCode.com>
10659 * camel-mime-parser.c (folder_push_part): Make sure 'atleast' is
10660 at least 1, always. This is possibly a temporary fix for a
10661 bad failure mode on bad multipart messages.
10662 (folder_scan_content): Go until inend, not inend+1. Changed the
10663 continuation and retry logic to be simpler and more robust. If we
10664 can't find a marker within
10665 the atleast we need, just set it to 1, and try again, rather than
10666 just going to the next smaller limit (boundary check checks the
10668 (header_append): streamline the empty line case. And strip
10669 trailing \r's if there are any (\n's already stripped).
10670 (folder_scan_header): Reordered and cleaned up a lot. Check for
10671 continuation only once, and compress lwsp then. Assume the header
10672 buffer already has end of line's stripped, and simplify some things:
10673 Only check for end of headers once and easier.
10674 Dont check to remove end of line character
10675 Dont bother testing inptr-start if we get a boundary match - it is
10677 (folder_scan_header): Removed the unused part variable, and a few
10678 pointless assignments.
10679 (folder_scan_header): Change the end limit to be 1 higher, to make
10680 sure we get all content.
10681 (folder_scan_content): And here too.
10682 (folder_scan_header): Killed a warning.
10683 (folder_push_part): Removed a bad comment. Actually
10684 boundarylenfinal can be zero for a new message not in a
10685 multipart. So we fix that here.
10687 2000-11-09 Not Zed <NotZed@HelixCode.com>
10689 * camel-mime-utils.c (header_decode_param_list): Renamed from
10690 header_param_list_decode.
10691 (header_param_list_decode): New external function to decode a
10693 (header_param_list_format_append): Made public.
10694 (header_param_list_format): Another new public helper function for
10695 formatting just a param list.
10697 * camel-folder-summary.c (next_uid_string): Default implementation
10698 is the same as before.
10699 (camel_folder_summary_class_init): And set it up.
10701 * camel-folder-summary.h: Make next_uid_string a virtual function.
10703 * camel-folder.c (camel_folder_change_info_changed): New function
10704 to return true if the changeset contains any changes.
10706 2000-11-14 Jeffrey Stedfast <fejj@helixcode.com>
10708 * camel-stream.c (camel_stream_printf): Don't cast an int to a
10711 2000-11-10 Dan Winship <danw@helixcode.com>
10713 * providers/mbox/camel-mbox-summary.c
10714 (camel_mbox_summary_build_from): put a space before a single-digit
10715 day of the month since it seems some mailers are fantastically
10716 picky about this. (bugs.gnome.org #27232)
10718 2000-11-10 Radek Doulik <rodo@helixcode.com>
10720 * camel-mime-utils.c (header_msgid_generate): fix ids ending with '.'
10722 2000-11-09 Dan Winship <danw@helixcode.com>
10724 * providers/imap/camel-imap-auth.c (imap_try_kerberos_v4_auth):
10725 Fix error handling. (Only send a "*" to bail out of authentication
10726 if the server hasn't already bailed on us.)
10728 2000-11-08 Radek Doulik <rodo@helixcode.com>
10730 * camel-mime-utils.c (mime_guess_type_from_file_name): new
10731 function, moved from composer
10733 2000-11-08 Not Zed <NotZed@HelixCode.com>
10735 * camel-mime-message.c (find_best_encoding): Keep track of the
10736 caller bestenc flags that make sense.
10738 * camel-mime-filter-bestenc.c (filter): Added code to detect when
10739 we have "^From " lines in the sequence of text.
10740 (camel_mime_filter_bestenc_get_best_encoding): Added a new flag
10741 CAMEL_BESTENC_NO_FROM: if set, it will not allow any lines
10742 matching "^From " to appear in the output - currently forcing
10743 base64 encoding to achieve this.
10745 * camel-mime-parser.c (folder_scan_step): Call
10746 camel_mime-filter_complete() once we're done, rather than
10748 (folder_scan_content): Some fixes for state changing; so that when
10749 we do find another boundary it is properly flagged. Since we
10750 strip the last \n off all data, we must take that into account
10751 too. Sigh. Fixes a rather nasty set of bugs where multipart
10752 messages could start including following messages as parts, etc.
10753 (struct _header_scan_stack): Added new parameter,
10754 boundarylenfinal, which holds the length of the final boundary, if
10755 it is different (e.g. for From lines, whihc aren't)
10756 (folder_scan_step): Setup teh boundarylenfinal value when creating
10758 (folder_scan_content): Hmm, if we hit the end-of-buffer sentinal,
10759 reset the scanner back to leave 'atleast' chars in the buffer
10760 still, dump that content, and retry again. Stops us losing a
10761 check for a boundary on some data we haven't really looked at yet!
10762 (folder_scan_content): Use boundarylenfinal to calculate
10764 (folder_scan_header): And here too.
10765 (folder_boundary_check): Use the atleast value directly, dont
10766 truncate it. Use the boundarylen/boundarylenfinal values directly
10768 (struct _header_scan_stack): Add an atleast parameter to cache the
10770 (folder_push_part): Determine/set 'atleast', every time we add a
10772 (folder_scan_header): Get the cached atleast info from the current
10774 (folder_scan_content): And here too.
10775 (folder_scan_header): Fix a problem where a part starting with
10776 " text" would be interpreted as a followon header wrongly.
10778 * camel-mime-filter-charset.c (complete): Add some assertions to
10781 2000-11-07 Ettore Perazzoli <ettore@helixcode.com>
10783 * camel-service.c (get_name): Strdup the "???" string you return,
10784 so that the expected semantics for `::get_name()' is respected.
10786 2000-11-07 Dan Winship <danw@helixcode.com>
10788 * camel-stream-filter.c (d): Kill debugging, as it causes lots of
10789 evolution-mail spewage.
10791 2000-11-07 Not Zed <NotZed@HelixCode.com>
10793 * camel-mime-filter-bestenc.c (complete): Implement a complete()
10794 function, now we need one.
10795 (filter): Upgraded to match rfrc2045 properly. Checks also for
10796 length of line and valid CRLF sequences.
10797 (camel_mime_filter_bestenc_get_best_encoding): Do the work of
10798 working out what is the best encoding given what we found about
10801 * camel-mime-part.c (camel_mime_part_encoding_to_string): Use a
10802 lookup table to get the encoding naem, and add the binary type.
10803 (camel_mime_part_encoding_from_string): Likewise for the reverse.
10805 * camel-mime-part.h: Added the binary encoding type, see rfc2045.
10807 * camel-mime-utils.c (header_param_list_format_append): Dont put a
10808 space before ;'s in parameter lists, makes them more
10809 readable/consistent.
10811 * camel-mime-message.c (multipart_has_8bit_parts): Cleaned up the
10812 old stuff, well removed it.
10813 (camel_mime_message_set_best_encoding): Added another argument
10814 that lets you select what you want to set the best of. i.e. for
10815 smtp transport we only need 7 bit, and dont need to optimise the
10816 charset (although of course, we should always).
10817 (find_best_encoding): Implement this feature, if we are not
10818 getting the best charset, use the one we have.
10819 (best_encoding): Set the charset on the part appropriately. Sigh,
10820 the interfaces for this are nonexistant.
10821 (find_best_encoding): Tell the bestenc filter that lf should be
10822 treated as crlf for the purposes of determining encodings.
10824 2000-11-06 Not Zed <NotZed@HelixCode.com>
10826 * camel-charset-map.c (camel_charset_init): Init function for an
10827 iterative charset determinator.
10828 (camel_charset_step): Iterate another buffer.
10829 (camel_charset_mask): Removed, since it couldn't have worked.
10830 (camel_charset_best): Use the iterative interface to do the work.
10831 (camel_charset_best_name): Get the best name for a charset so far.
10833 * camel-mime-filter-bestenc.c: New class, a stream
10834 filter that can be used to memory-efficiently determine the best
10835 encoding and/or charset to use for a given stream of bytes.
10837 * Makefile.am (libcamelinclude_HEADERS): Added stream-null*.
10838 (libcamel_la_SOURCES): Added bestenc*
10840 * camel-stream-null.c: New class, a null-stream, that always
10841 succeeds, and never has any contents.
10843 * camel-stream.c: Minor pointless changes. Was going to do
10844 something else but changed my mind. Added trivial default
10845 implementations for all callbacks.
10847 * camel-mime-message.h: Cleaned up some old cruft.
10849 * camel-folder-summary.c (camel_folder_summary_format_address):
10850 address_list_format() no longer encodes, so we dont need to decode
10853 * camel-address.c (camel_address_unformat): New function, attempts
10854 to reverse the formatting process on display addresses.
10855 (camel_address_length): New function to get the number of
10856 addresses, without having to peek the structure.
10858 * camel-mime-message.c (camel_mime_message_set_from): Fix a typo.
10859 (camel_mime_message_finalize): Only unref from/reply_to if we have
10861 (camel_mime_message_set_recipients): New function - set the
10862 recipients as a CamelInternetAddress. This function effectively
10863 deprecates the older recipient setting functions.
10864 (camel_mime_message_add_recipient): What the hell, i'll bite the
10865 bullet. Terminate this function. The old api was ambiguious and
10866 inefficient and didn't work right anyway.
10867 (camel_mime_message_remove_recipient_address): And this one.
10868 (camel_mime_message_remove_recipient_name): And this one too.
10869 (camel_mime_message_set_recipients): If we set an empty header,
10870 then remove it from the header list. Allow a null receipient
10871 object to clear a header.
10872 (camel_mime_message_set_from): Likewise, if setting an empty from
10874 (camel_mime_message_encode_8bit_parts): Eeek!!
10875 camel_stream_mem_new_with_byte_array owns the byte_array we give
10876 it, so make sure we dont free any of it!
10877 (camel_mime_message_encode_8bit_parts): Infact, i'll just rewrite
10878 the whole lot, its a bit of a mess. Should really rename it and
10879 make it a little more useful too, lets see ...
10880 (best_encoding): This has a string interface? Oh boy.
10881 (camel_mime_message_foreach_part): New experimental function to
10882 iterate over all message parts. Might not remain.
10883 (camel_mime_message_has_8bit_parts): New implementation using
10884 foreach_part. Fixed a couple of problems.
10885 (find_best_encoding): New function, that finds the best encoding
10886 for a given part (will probably be moved to camel-mime-part), and
10887 also the best charset to use if it is a text part. Since one
10888 affects the other it is a two pass process, but uses streams and
10889 not memory to achieve this.
10890 (camel_mime_message_set_best_encoding): Uses the function above to
10891 configure an entire message for the best encoding possible given
10892 transport constraints.
10893 (camel_mime_message_encode_8bit_parts): Reimplemented to use the
10894 function above to perform the work.
10896 * camel-internet-address.c
10897 (camel_internet_address_format_address): Dont put <> around a lone
10898 address with no real name.
10899 (camel_internet_address_encode_address): Similarly.
10900 (internet_decode): Actually return the count of decoded addresses.
10901 (internet_unformat): Implement the unformatting routine.
10903 2000-11-05 Not Zed <NotZed@HelixCode.com>
10905 * providers/smtp/camel-smtp-transport.c (_send_to): Changed to get
10906 the internetaddress directly, rather than having to parse it
10909 * camel-address.c (camel_address_format): Added a new function
10910 which will format address, suitable for display.
10911 (camel_address_cat): Concatentate 1 camel address onto another.
10912 It is upto the caller to ensure the addresses are of compatible
10914 (camel_address_new_clone): New function to create a new address by
10915 copying an existing one of the same type.
10916 (camel_address_copy): New helper function to copy an address.
10918 * camel-mime-message.h (struct _CamelMimeMessage): Removed cached
10919 copy of date string.
10920 (struct _CamelMimeMessage): Added date_received info.
10922 * camel-mime-message.c (camel_mime_message_get_date_string):
10923 Removed. Nothing uses it anyway, and it is redundant.
10924 (camel_mime_message_finalize): No more date_str.
10925 (camel_mime_message_init): No more date_str, initialise
10927 (write_to_stream): Change the check for a date header.
10928 (process_header): No longer track the date_str.
10929 (camel_mime_message_get_received_date): Removed. totally invalid
10931 (camel_mime_message_get_sent_date): Removed. Redundant. The only
10932 'date' is the sent date, the received date is just made up.
10933 (camel_mime_message_get_date): Args changed to be more consistent
10934 with utility functions.
10935 (camel_mime_message_get_date): Dont set the date when we're asked
10936 for it (if its not set by the time its written, it'll be set
10938 (camel_mime_message_get_date_received): Actually do 'the right
10939 thing' here, if we have a received header, use that to determine
10940 the received date. And return the data in the same format as
10942 (camel_mime_message_set_from): Changed the api to better match
10943 what we should be doing. Pass a camelinternetaddress, etc.
10944 (camel_mime_message_set_reply_to): Cahnged similarly to take an
10946 (camel_mime_message_get_reply_to): Likewise.
10947 (camel_mime_message_finalize): Unref the from/reply_to objects.
10948 (format_address): Removed, no longer needed.
10949 (process_header): Changed to store the from/reply_to as
10951 (write_to_stream): Set the from header directly to empty, if we
10952 dont have one. Maybe we should just abort, and/or create one
10953 based on the current user.
10955 * camel-mime-utils.c (header_address_list_format): Renamed to
10956 header_address_list_encode, which is what it is actually doing.
10957 (header_address_list_format_append): Similarly.
10958 (encoding_map[]): Removed, no longer used.
10959 (header_address_list_encode_append): Take another arg, do we
10960 encode the address (for internet), or not (for display - utf8
10962 (header_address_list_format): Re-added this function, but now it
10963 generates a display version only. Surprise surprise, that is all
10964 anythign needs to generate anyway. Sigh.
10966 * camel-internet-address.c (camel_internet_address_get): Return
10967 false if we get an invalid index only.
10968 (camel_internet_address_encode_address): Helper function to encode
10969 a single address for mailing.
10970 (internet_encode): Use the above function to format it.
10971 (camel_internet_address_format_address): Format a single address
10973 (internet_format): Implement the display version.
10974 (camel_internet_address_class_init): Init the internet_format
10976 (internet_cat): Implement virtual function to concatenate
10979 * camel-folder-summary.c
10980 (camel_folder_summary_info_new_from_header): new function, only
10981 build the summary info, dont add it.
10982 (camel_folder_summary_info_new_from_parser): Likewise, for new
10984 (camel_folder_summary_add_from_parser): Cahnged to call function
10985 above to build info.
10986 (camel_folder_summary_add_from_header): Changed to call function
10987 above, to build info.
10988 (camel_folder_summary_info_free): New function to free the summary
10990 (camel_folder_summary_clear): Changed to clal above to free info.
10991 (camel_folder_summary_remove): Likewise.
10992 (camel_folder_summary_add): Cleaned up the clashing uid
10993 re-assignment logic a little bit.
10994 (camel_folder_summary_decode_uint32): Fixed a typo, 01 != -1.
10995 (camel_folder_summary_decode_time_t): Return -1 on error.
10996 (camel_folder_summary_encode_off_t): New function to encode an
10998 (camel_folder_summary_decode_off_t): And likewise for the reverse.
10999 (CAMEL_FOLDER_SUMMARY_VERSION): Bumped the summary version, since
11000 we're now encoding time/off_t's right.
11001 (summary_header_save): Use time_t encoder to save the timestamp.
11002 (summary_header_load): Likewise for decoding the timestamp.
11003 (content_info_load): Decode off_t types directly, now we can.
11004 (content_info_save): And likewise for encoding.
11005 (camel_folder_summary_add_from_message): New function, create a
11006 summary item from an existing message and add it.
11007 (camel_folder_summary_info_new_from_message): New function, create
11008 a summary item from an existing message.
11009 (summary_build_content_info_message): New function to do the dirty
11010 work of building the conent info/indexing, from a message source.
11011 (format_recipients): Format an internetaddress suitable for the
11013 (message_info_new_from_message): Build a new summary item from a
11015 (content_info_new_from_message): Build a new conent info from a
11017 (camel_folder_summary_class_init): Init the new class functions.
11018 (message_info_new_from_message): Fixed for message api change.
11020 Added documentation to the functions.
11022 2000-11-03 Radek Doulik <rodo@helixcode.com>
11024 * camel-mime-utils.c (header_msgid_generate): new function,
11025 generates simple message/content id
11027 2000-11-04 Not Zed <NotZed@HelixCode.com>
11029 * camel-mime-part-utils.c
11030 (camel_mime_part_construct_content_from_parser): Set the
11031 preface/postface from the parser into the multipart object.
11033 * camel-multipart.c (camel_multipart_set_postface): Function to
11034 set the postface text on a multipart.
11035 (camel_multipart_set_preface): Similarly for preface text.
11037 * camel-mime-parser.c (folder_scan_content): If we scan until a
11038 boundary, then we do not include the \n that starts the boundary
11039 line in the content.
11040 (struct _header_scan_stack): Added a ByteArray to store the
11041 multipart pre/post-text as we're scanning.
11042 (folder_pull_part): Free pre/posttext if they are allocated.
11043 (folder_scan_step): Build into the pre/posttext arrays as we
11045 (camel_mime_parser_preface): REturn the multipart preface text, if
11046 there is any scanned.
11047 (camel_mime_parser_postface): Likewise for postface text.
11048 (byte_array_to_string): helper function for above.
11050 * providers/mbox/camel-mbox-folder.c (mbox_append_message): Change
11051 the from line to be "\nFrom ..." always, so no need to
11052 check/append a \n to messages.
11053 (mbox_append_message): Open the output stream with append mode
11054 [assuming this is more efficient than seeking to the end]
11055 And dont prepend \n on the From line if its the first in the
11057 (mbox_append_message): Pass the offset of the real start of the
11058 "From " line when we perform the update (which may != 'seek')
11060 * camel-mime-filter-charset.c (complete): Removed the terminating
11063 * camel-stream-filter.c (do_read): Added some debug.
11064 (do_flush): And here.
11065 (do_write): And here too.
11066 (do_write): ARGH!!! ARGH! Ok, so the filter stream was writing a
11067 different number of bytes than the requester was asking it to
11068 write (because of filtering, of course!). So instead of returning
11069 the true number of written bytes, we'll return what they asked us
11070 to write - unless there is an error in which case we return -1.
11072 * camel-mime-utils.c (base64_encode_close): Sigh, forgot to make
11073 it unsigned. I think this is actually a gcc bug as (48 >> 2)
11074 somehow ended up negative, when it obviously should not, even if
11075 the data load was signed.
11077 2000-11-03 Jeffrey Stedfast <fejj@helixcode.com>
11079 * camel-url.c: Undo my incorrect fix - I misunderstood danw -
11082 2000-11-03 Dan Winship <danw@helixcode.com>
11084 * providers/pop3/camel-pop3-store.c (camel_pop3_store_expunge):
11087 2000-11-03 Jeffrey Stedfast <fejj@helixcode.com>
11089 * camel-url.c (camel_url_to_string): If show_pass, then base64 the
11090 password before writing it to the output string.
11091 (camel_url_new): Assume password has been base64 encoded and
11092 decode accordingly.
11094 2000-11-03 Dan Winship <danw@helixcode.com>
11096 * camel-provider.h: Add an "url_flags" field to CamelProvider.
11097 Move the CAMEL_SERVICE_URL_* defines here and remove the SERVICE_
11100 * camel-service.h: Remove CAMEL_SERVICE_URL_* flags and
11101 service->url_flags field.
11103 * camel-service.c (check_url, get_path): Get URL flags from
11104 service->provider, update for changed flag names.
11106 * providers/*/camel-*-provider.c: Add URL flags to provider
11109 * providers/*/camel-*-{store,transport}.c, camel-remote-store.c:
11110 Remove service->url_flags initialization.
11112 2000-11-02 Jeffrey Stedfast <fejj@helixcode.com>
11114 * providers/imap/camel-imap-store.c (get_folder_info): Quote
11115 foldernames when sending to the IMAP server because the folder
11116 name might contain spaces.
11118 2000-11-02 Not Zed <NotZed@HelixCode.com>
11120 * Merged in camel-incremental-branch.
11122 2000-11-01 Dan Winship <danw@helixcode.com>
11124 * providers/imap/camel-imap-store.c (get_folder_info): Remove old
11125 subbed folders from hash table after freeing them.
11127 * providers/imap/camel-imap-folder.c (imap_get_full_name): Deal
11128 correctly with namespace == ""
11130 2000-11-01 Gediminas Paulauskas <menesis@delfi.lt>
11132 * camel-charset-map.c, camel-charset-map-private.h: synced all charsets
11133 with ones found in libunicode. Just include more "iso/*.h" and rebuild
11134 ...private.h with this.
11136 2000-10-31 Dan Winship <danw@helixcode.com>
11138 * camel-service.c (service_disconnect): Add a new argument, clean,
11139 that says whether or not to try to disconnect cleanly.
11141 * camel-remote-store.c (remote_send_string, remote_send_stream,
11142 remote_recv_line): disconnect uncleanly on failure to prevent
11143 infinite loops when providers would normally send commands from
11144 disconnect(). Remove some unneeded CamelException goo.
11146 * providers/smtp/camel-smtp-transport.c (smtp_disconnect):
11147 * providers/pop3/camel-pop3-store.c (pop3_disconnect):
11148 * providers/nntp/camel-nntp-store.c (nntp_store_disconnect):
11149 * providers/imap/camel-imap-store.c (imap_disconnect): Don't send
11150 QUIT/LOGOUT if !clean.
11152 2000-10-30 Dan Winship <danw@helixcode.com>
11154 * providers/imap/camel-imap-auth.c: New file with code for IMAP
11155 authentication mechanisms. (Currently just krb4, and without
11156 integrity/privacy protection).
11158 * providers/imap/Makefile.am: Add camel-imap-auth.[ch] and krb4
11161 * providers/imap/camel-imap-store.c (connect_to_server): Split out
11162 from imap_connect. Just does the basic connect and CAPABILITY
11163 check. Redo the CAPABILITY code more robustly.
11164 (query_auth_types_connected): Do this right rather than punting to
11165 query_auth_types_generic. Check for KERBEROS_V4 if compiled with
11167 (query_auth_types_generic): Mention KERBEROS_V4 if compiled with
11169 (imap_connect): Use connect_to_server().
11171 * camel-mime-utils.c (base64_encode_step, base64_encode_close):
11172 Take an additional argument, "break_lines", saying whether or not
11173 to add '\n's to the output.
11175 * camel-multipart.c (set_boundary):
11176 * camel-mime-filter-basic.c (filter, complete): Update for base64
11179 2000-10-30 Peter Williams <peterw@helixcode.com>
11181 * providers/imap/camel-imap-store.c (unsubscribe_folder): Correct
11182 parameters to g_hash_table_lookup_extended.
11184 2000-10-29 Dan Winship <danw@helixcode.com>
11186 Improved IMAP namespace handling: leave the namespace in the
11187 folder names rather than constantly prepending it and stripping it
11188 off. Also some subscription fixes.
11190 * camel-store.c (camel_folder_info_build): Fix for the case where
11191 @top isn't in @folders.
11193 * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Add
11194 a "short_name" argument rather than figuring it out ourselves.
11195 (imap_get_full_name): Implementation of CamelFolder::get_full_name
11196 that strips off namespace so the user doesn't have to see it.
11197 (imap_append_message, imap_copy_message_to, imap_move_message_to):
11198 Use folder->full_name rather than calling
11199 camel_imap_store_get_folder_path.
11201 * providers/imap/camel-imap-utils.c (imap_parse_list_response):
11202 Update this: make @flags a bitmask and @sep a char rather than a
11203 string. Make all of the out arguments optional. Handle literals in
11204 the server response.
11206 * providers/imap/camel-imap-store.c (imap_connect): Do a better
11207 job of getting the correct dir_sep for the namespace we're using.
11208 Construct a base_url here that will be used by get_folder_info.
11209 (camel_imap_store_folder_path): Removed
11210 (imap_folder_exists): Add an argument to return the short name of
11211 the folder (parsed out of the LIST response). Update for
11212 imap_parse_list_response change.
11213 (get_folder): Update for the various other changes.
11214 (get_folder_info): Update for the various other changes. Be more
11215 consistent about the returned layout: put everything underneath
11216 the "namespace" directory, including INBOX, even if it doesn't
11217 belong there. Don't destroy the list of subscribed folders until
11218 we've actually gotten the new list.
11219 (folder_subscribed, subscribe_folder, unsubscribe_folder): Use
11220 folder_name directly rather than camel_imap_store_folder_Path.
11222 * providers/imap/camel-imap-command.c (camel_imap_command): Update
11223 for folder name changes.
11225 2000-10-29 Dan Winship <danw@helixcode.com>
11227 * camel.h: Remove md5-utils.h include since it's not part of Camel
11230 * camel-charset-map.c: Kill some warnings.
11232 * providers/nntp/camel-nntp-grouplist.c
11233 (camel_nntp_get_grouplist_from_file, camel_nntp_grouplist_save):
11234 Clean up warnings about time_t casts.
11236 * providers/smtp/camel-smtp-transport.c: Remove unused md5-utils.h
11239 * providers/pop3/camel-pop3-store.c: Undefine the "_" macro
11240 defined by krb4's des.h when compiling with krb support.
11241 Fix md5-utils.h include.
11243 2000-10-27 Dan Winship <danw@helixcode.com>
11245 * camel-mime-utils.c (header_param_list_format_append): Only quote
11246 Content-type parameters when the quoting is mandatory, and deal
11247 with embedded quotes/backslashes when quoting.
11249 2000-10-27 <jpr@helixcode.com>
11251 * providers/pop3/Makefile.am: Tidy up build
11253 * providers/smtp/Makefile.am: ditto
11255 * Makefile.am: Move md5-utils.[hc] to e-util because the
11256 addressbook is going to use md5 hashes for pilot syncing.
11257 Maybe the calendar conduits as well because this is a good idea
11260 2000-10-26 Kjartan Maraas <kmaraas@gnome.org>
11262 * camel-exceptions-list.def: Add newline to kill warnings.
11264 2000-10-25 Dan Winship <danw@helixcode.com>
11266 * providers/imap/camel-imap-store.c (get_folder_info): Fix folder
11267 listing code infinite loop.
11269 * camel-store.h: Add a "parent" field to CamelFolderInfo.
11271 * camel-store.c (camel_folder_info_build): Deal with "parent"
11272 (camel_store_folder_subscribed, camel_store_subscribe_folder,
11273 camel_store_unsubscribe_folder): Add g_return_if_fails checking
11274 that the folder supports subscriptions.
11276 * providers/imap/camel-imap-store.c (folder_subscribed,
11277 subscribe_folder, unsubscribe_folder): Remove "+ 1"s since the
11278 mail subscribe UI won't prepend / to the folder names now.
11279 (get_folder_info): Clear the "parent" field of the folderinfos
11280 when removing an empty top level.
11282 * providers/nntp/camel-nntp-store.c (nntp_store_folder_subscribed,
11283 nntp_store_subscribe_folder, nntp_store_unsubscribe_folder):
11284 Remove "+ 1"s since the mail subscribe UI won't prepend / to the
11287 2000-10-24 Chris Toshok <toshok@helixcode.com>
11289 * providers/imap/camel-imap-store.h: add subscribed_folders.
11291 * providers/imap/camel-imap-store.c (camel_imap_store_class_init):
11292 fill in vtable entries for subscription functions.
11293 (camel_imap_store_finalize): new function, so we can free up our
11294 subscribed_folders hashtable.
11295 (camel_imap_store_init): set CAMEL_STORE_SUBSCRIPTIONS in the
11296 CamelStore flags, and create our subscribed_folders hashtable.
11297 (camel_imap_store_get_type): camel_imap_store_finalize is our
11299 (get_folder_info): if we're looking at subscribed_only, clear out
11300 the subscribed_folders hashtable, use LSUB instead of LIST, and
11301 insert folder paths (prepended by their namespace if there is one)
11302 into subscribed_folders. INBOX subscription support needs work,
11303 since we always show it, regardless of it's subscribed state.
11304 (folder_subscribed): new function. just look up the folder_path
11306 (subscribe_folder): new function. use the imap SUBSCRIBE command,
11307 and if successful add it to the hashtable.
11308 (unsubscribe_folder): new function. use the imap UNSUBSCRIBE
11309 command, and if successful remove it from the hashtable.
11311 2000-10-24 Dan Winship <danw@helixcode.com>
11313 * providers/imap/camel-imap-store.c (get_folder_info): Fill in the
11314 message_count and unread_message_count flags (if !fast).
11316 2000-10-23 Dan Winship <danw@helixcode.com>
11318 * camel-object.h: #include gnome-i18n.h (and gnome-defs.h since
11319 the former depends on it.)
11321 * *: Add lots of _() and N_().
11323 2000-10-23 Chris Toshok <toshok@helixcode.com>
11325 * providers/nntp/Makefile.am (libcamelnntpinclude_HEADERS): add
11326 camel-nntp-types.h.
11328 2000-10-23 Dan Winship <danw@helixcode.com>
11330 * providers/imap/camel-imap-command.c (imap_read_untagged): Fix a
11331 "how could this have been working before" memory overrun bug
11334 * camel-op-queue.[ch], camel-thread-proxy.[ch]: These should have
11335 gone away a long time ago.
11337 2000-10-20 Chris Toshok <toshok@helixcode.com>
11339 * providers/Makefile.am (SUBDIRS): re-enable the nntp provider.
11341 2000-10-20 Chris Toshok <toshok@helixcode.com>
11343 * providers/nntp/camel-nntp-store.c (build_folder_info): add
11344 function to build a tree from the nntp group names (using '.' as a
11345 heirarchy separator.) #ifdefed INFO_AS_TREE only.
11346 (build_folder_info_from_grouplist): if INFO_AS_TREE is selected,
11347 call build_folder_info instead of appending a new CamelFolderInfo
11349 (ensure_news_dir_exists): use e_mkdir_hier instead of failing if a
11350 parent directory (~/evolution/news generally) isn't there.
11352 2000-10-19 Chris Toshok <toshok@helixcode.com>
11354 * camel-folder-search.c: #include <sys/types.h> before <regex.h>
11356 2000-10-19 Dan Winship <danw@helixcode.com>
11358 * providers/imap/camel-imap-utils.c (imap_parse_list_response):
11359 Fix a bug with "INBOX" (or anything else with NIL hierarchy
11360 separator) as the namespace.
11362 * providers/imap/camel-imap-folder.c (imap_refresh_info): Emit
11363 message_changed and folder_changed as appropriate.
11365 2000-10-19 Dan Winship <danw@helixcode.com>
11367 * camel-folder.c (camel_folder_refresh_info): Update comment here
11368 so refresh_info isn't just for reconnects any more. Make the
11369 default implementation a no-op rather than an error.
11371 * providers/nntp/camel-nntp-folder.c: Move refresh_info impl into
11372 camel_nntp_folder_new, since it would have leaked memory and not
11373 done anything useful if it was called later.
11375 * providers/mbox/camel-mbox-folder.c: Remove no-longer-necessary
11378 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
11379 Update imap_folder->exists, but don't actually load the new
11380 messages. This is a temporary workaround to deal with the IMAP
11381 provider stealing the message list focus at annoying times.
11382 (imap_copy_message_to, imap_move_message_to): Emit a
11383 folder_changed by hand, for now.
11385 2000-10-19 Ettore Perazzoli <ettore@helixcode.com>
11387 * providers/imap/Makefile.am (libcamelimapinclude_HEADERS): Add
11388 `camel-imap-stream.h'.
11390 * Makefile.am (libcamelinclude_HEADERS): Add `camel-charset-map.h'
11391 and `camel-charset-map-private.h'.
11393 2000-10-18 Jeffrey Stedfast <fejj@helixcode.com>
11395 * camel-mime-part.c (camel_mime_part_set_description): The correct
11396 fix this time - the description should be encoded here and not in
11397 the camel-medium layer.
11399 2000-10-30 Not Zed <NotZed@HelixCode.com>
11401 * camel-folder.c (camel_folder_change_info_add_update): Fixed the
11402 changeset logic, which was completely wrong.
11404 2000-10-27 Not Zed <NotZed@HelixCode.com>
11406 * camel-mime-utils.c (quoted_encode_step): Removed is_blank() stuff.
11407 (header_decode_init): When we set the 'space' bit, dont clear all
11409 (quoted_encode): Put back the safemask. Yes we totally need it,
11410 see rfc 2047 section 5, parts (1) and (3).
11411 (CHARS_PSPECIAL): Remove '=' and '_' from the list of allowed
11412 characters (this is an allowed list, not a not-allowed list, like
11414 (camel_mime_special_table): Updated for fixes to definitions.
11415 (CHARS_ESPECIAL): Added '_' to list of characters that should be
11418 2000-10-26 Not Zed <NotZed@HelixCode.com>
11420 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_update):
11421 Use the new camel_folder_change_info_* stuff to build the update
11422 diff, rather than doing it ourselves.
11424 * camel-folder.c (camel_folder_change_info_add_source): Add a
11425 'source' list, used to create change lists.
11426 (camel_folder_change_info_add_source_list): Add a list of uid's,
11427 convenience function.
11428 (camel_folder_change_info_add_update): Add a uid to the list of
11429 uid's in the new updated list.
11430 (camel_folder_change_info_add_update_list): Add a bunch of uid's
11431 at once for the same purpose.
11432 (camel_folder_change_info_build_diff): Take the source list, the
11433 update list, and find the differences, building on the added or
11434 removed list as appropriate.
11436 2000-10-20 Not Zed <NotZed@HelixCode.com>
11438 * providers/mbox/camel-mbox-summary.c (removed_uids): REnamed from
11440 (camel_mbox_summary_update): Oops, fix the reversed logic for
11441 determining the uid changesets.
11443 * camel-folder.c (message_changed): Oops, we want to change the
11446 2000-10-19 Not Zed <NotZed@HelixCode.com>
11448 * providers/mh/camel-mh-summary.c (camel_mh_summary_sync): Added a
11449 change list argument, and add expunged uid's to it.
11451 * providers/mh/camel-mh-folder.c (mh_init): Setup the change list.
11452 (mh_finalize): And free it.
11453 (mh_sync): Track changes, and send a folder_changed signal as
11455 (mh_expunge): Likewise.
11456 (mh_append_message): Add the new uid to the change list and
11457 trigger a folder_changed event.
11459 * providers/mbox/camel-mbox-folder.c (camel_mbox_folder_new):
11460 Setup a mbox list of changes structure.
11461 (mbox_finalize): And free it.
11462 (mbox_expunge): Include the change list with the folder_changed
11463 event, and clear it off.
11464 (mbox_sync): And the same for when we are just syncing the folder.
11465 (mbox_append_message): And do the same here, after we've updated
11468 * providers/mbox/camel-mbox-summary.c
11469 (camel_mbox_summary_build_from): Use gmtime_r to get the time
11471 (camel_mbox_summary_sync): Added a changeinfo argument. Add any
11472 removed or changed messages to the changelists as appropriate.
11473 (camel_mbox_summary_update): Added a changeinfo argument.
11474 Genereate a list of added/removed uid's based on the difference
11475 before and after rebuilding the summary.
11477 * camel-folder.c (camel_folder_change_info_new):
11478 (camel_folder_change_info_add_uid):
11479 (change_info_add_uid):
11480 (camel_folder_change_info_remove_uid):
11481 (camel_folder_change_info_change_uid):
11482 (change_info_clear):
11483 (camel_folder_change_info_clear):
11484 (camel_folder_change_info_free):
11486 (camel_folder_change_info_cat): Bunch of utility functions for
11487 working with change info lists.
11488 (camel_folder_init): Init the change info list.
11489 (camel_folder_finalize): And free it.
11490 (thaw): Changed to pass through a list of changes, or to get the
11491 changed message uids from the camelfolderchangeinfo struct, and
11493 (folder_changed): Add the changed lists to the frozen change list
11495 (message_changed): Add the message to the changed list if we are
11496 in the frozen state.
11498 * camel-folder.h (CamelFolderChangeInfo): New structure to hold
11499 information for the folder_changed event.
11501 2000-10-18 Ettore Perazzoli <ettore@helixcode.com>
11503 * camel-mime-filter-charset.c (complete): Put a zero at the start
11506 2000-10-18 Not Zed <NotZed@HelixCode.com>
11508 * camel-mime-part.c (add_header): No, we must not encode the
11509 headers here. These interfaces ARE raw interfaces as they are
11510 defined in camel_medium. Also removed a bogus/meaningless FIXME.
11511 (set_header): Likewise here, we must not.
11512 (process_header): Removed another bogus comment.
11514 * camel-object.c (shared_is_of_type): Comment out the spitting of
11515 a big warning when we're trying to determine types from code.
11517 * providers/mbox/camel-mbox-summary.c
11518 (message_info_new_from_parser): Only call ibex funcitons if we
11521 * providers/mh/camel-mh-summary.c (camel_mh_summary_add): Only
11522 call ibex functions if we have an index.
11523 (remove_summary): Likewise.
11524 (camel_mh_summary_check): Likewise.
11526 * providers/nntp/camel-nntp-store.c (nntp_store_get_folder):
11527 get_folder -> flags argument.
11529 * providers/vee/camel-vee-store.c (vee_get_folder): create->flags.
11531 * providers/pop3/camel-pop3-store.c (get_folder): Changed create
11534 * providers/imap/camel-imap-store.c (get_folder): Added flags
11537 * providers/mh/camel-mh-folder.c (camel_mh_folder_new): Added
11538 flags argument, and fixed code appropriately.
11540 * providers/mh/camel-mh-store.c (get_folder): Added flags argument.
11542 * camel-folder-search.c (message_body_contains): Perform a regex
11543 match on the contents of messages. This wont quite work yet as
11544 message contents are encoded when written to a stream.
11545 (build_match_regex): Converts a number of strings into a regex
11546 matching pattern, escaping special chars.
11547 (match_message): match a single message from a folder, by uid.
11549 (search_body_contains): Changed to support matching where no index
11550 is supplied. Matches are performed by retrieving message
11552 () WTF? camel should not be including any widget headers.
11554 * providers/mbox/camel-mbox-folder.c (camel_mbox_folder_new):
11555 Added flags argument.
11556 (mbox_refresh_info): Changed into a NOP, the refresh info code
11557 moved into the new function.
11558 (camel_mbox_folder_new): If we have an index requested, build one,
11559 otherwise, remove an old one, or just dont do anything.
11561 * providers/mbox/camel-mbox-store.c (get_folder): Changed create
11562 to flags, changed code to suit.
11564 * camel-store.c (camel_store_get_folder): Changed create to flags.
11565 (get_folder_internal): And here.
11566 (get_folder): And here too.
11568 * camel-store.h (camel_store_get_folder): Change the create
11569 argument to be a flags argument.
11571 2000-10-17 Dan Winship <danw@helixcode.com>
11573 * providers/imap/camel-imap-folder.c (imap_refresh_info): Remove
11574 cached info at the end of the summary when the folder shrinks
11575 between sessions. Also remove an untrue comment.
11576 (camel_imap_folder_new): Move the summary creation to after the
11577 folder selection again, since it depends on the uidvalidity
11580 * providers/imap/camel-imap-store.c (get_folder): Fix up
11581 summary_file to not include the namespace twice.
11583 2000-10-17 Jeffrey Stedfast <fejj@helixcode.com>
11585 * camel-mime-part.c (set_header): Encode the header value.
11586 (add_header): Same.
11588 2000-10-17 Not Zed <NotZed@HelixCode.com>
11590 * camel-mime-filter.c: Added some malloc check debugging stuff.
11592 * camel-mime-parser.c
11593 (struct _header_scan_state): Removed top_part, top_start, and
11594 pending. I can't even remember why they were there, and they're
11597 * camel-mime-filter-basic.c (filter): Forgot to up the space here
11600 2000-10-14 Not Zed <NotZed@HelixCode.com>
11602 * camel-mime-filter-basic.c (complete): Ok, so we hit a fixme, 3x
11603 just wasn't enough for some sequences.
11605 2000-10-16 Jeffrey Stedfast <fejj@helixcode.com>
11607 * providers/imap/camel-imap-command.c
11608 (imap_read_response): Don't imap_next_word(respbuf + 2), instead
11609 use imap_next_word(respbuf) or else we'll skip over the second
11612 2000-10-16 Jeffrey Stedfast <fejj@helixcode.com>
11614 * providers/imap/camel-imap-command.c
11615 (camel_imap_response_extract): Don't free 'resp' as it doesn't
11616 point to the beginning of the allocated data, instead free
11617 response->untagged->pdata[i]. Also, if '*resp' is equal to a space
11618 character, then set resp = imap_next_word (resp) rather than
11619 expecting resp++ to work (there's a list broken IMAP daemons that
11620 like to put extra spaces between tokens).
11621 (imap_read_response): Don't expect 'respbuf+2' to be where the
11622 untagged number response to start (see above fix for an
11625 2000-10-16 Chris Toshok <toshok@helixcode.com>
11627 * camel-service.c (get_path): when using the construct (flags &
11628 CAMEL_SERVICE_URL_NEED_*) make sure to do ((flags &
11629 CAMEL_SERVICE_URL_NEED_*) == CAMEL_SERVICE_URL_NEED_*)
11632 2000-10-16 Jeffrey Stedfast <fejj@helixcode.com>
11634 * providers/imap/camel-imap-store.c (imap_disconnect): Only send
11635 the LOGOUT command if the store is connected.
11636 (imap_connect): Set the 'connected' state to TRUE when we
11637 successfully connect.
11638 (get_folder_info): if (!topfi), 'topfi' was allocated but then
11639 'fi' was set. I think Dan meant to set topfi since fi is an
11640 uninitialized value at this point.
11642 * providers/imap/camel-imap-command.c (imap_read_response): Check
11643 for the untagged BYE response and set the 'connected' state to
11644 FALSE if we receive the BYE response. Return NULL if we get a BYE
11647 2000-10-16 Dan Winship <danw@helixcode.com>
11649 * providers/imap/camel-imap-store.c (get_folder_info): Deal with
11650 the possibility of not getting a LIST response back for the top
11653 2000-10-12 Dan Winship <danw@helixcode.com>
11655 * providers/imap/camel-imap-summary.c: Simple subclass of
11656 CamelFolderSummary that also keeps a UIDVALIDITY value (and
11657 doesn't, for the moment, build content info).
11659 * providers/imap/camel-imap-folder.c:
11660 (various): Use a CamelImapSummary to store/fetch summary info.
11661 (camel_imap_folder_new): Take a path to a file to use for the
11662 summary. Set the folder's permanent_flags correctly according to
11663 the server response. Read in the summary (checking the
11664 UIDVALIDITY) and update it if it's out of date.
11665 (imap_refresh_info): Just fetch UIDs and flags. If the UIDs all
11666 match, update the flags as needed and be done with it. Otherwise,
11667 delete messages that have been expunged from the server and fetch
11668 full summary info for any new messages.
11669 (imap_sync): Save the summary to disk.
11670 (imap_update_summary): Renamed from imap_get_summary_internal. Can
11671 now be told to get summary for only a subset of messages. Use
11672 camel-mime-utils functions rather than rolling our own header
11674 (imap_get_message_info_internal): Merged into imap_update_summary.
11675 (imap_set_message_flags): Don't marked the message FOLDER_FLAGGED
11676 if we're not actually changing the value of any of the flags.
11677 (camel_imap_folder_changed): Deal with EXISTS rather than RECENT.
11679 * providers/imap/camel-imap-store.c (imap_connect): Call
11680 camel_session_get_storage_path and save the value.
11681 (get_folder): Create a local directory to store summary
11682 information and pass a summary file name to camel_imap_folder_new.
11683 Don't call camel_folder_refresh_info from here any more since
11684 camel_imap_folder_new does it again.
11686 * providers/imap/camel-imap-command.c (camel_imap_command): Add a
11687 special case to this to make it possible to get the repsonses from
11688 a SELECT and still have store->current_folder be updated
11690 (imap_read_response): parse EXISTS rather than RECENT
11692 * camel-session.c (camel_session_get_storage_path): Use
11695 * camel-folder-summary.c (camel_folder_summary_remove_index): New
11698 * camel-mime-utils.c (header_raw_append_parse): fix this.
11699 (camel-mime-parser.c doesn't use this code because of the MEMPOOL
11700 optimization, so nothing was ever actually calling it before.)
11702 2000-10-11 Not Zed <NotZed@HelixCode.com>
11704 * camel-mime-part.h (struct _CamelMimePart): Removed
11705 temp_message_buffer, and content_input_stream fields which seem to
11706 have come from nowhere, and are unused.
11708 * camel-mime-utils.c: Added a note about touching this file.
11709 Nobody is to touch it without asking me first. That goes for you
11711 (header_decode_text): In what way is this broken?
11713 2000-10-10 Not Zed <NotZed@HelixCode.com>
11715 * providers/imap/camel-imap-folder.c (imap_get_summary_internal):
11716 Fix camel_summary_* function rename
11717 (imap_get_message_info_internal): Likewise.
11719 * camel-mime-parser.c (camel_mime_parser_finalise): Fixed a spelling mistake.
11721 * camel-folder-summary.c (camel_summary_format_address): Uh, why
11722 do we encode and then decode here ... sigh. This is not the way
11724 (camel_folder_summary_format_address): Renamed to a proper name,
11725 this was only supposed to be a private function.
11726 (camel_folder_summary_format_string): Likewise. Oh i see why it
11727 was made public, code reuse by cut & paste. Joy.
11729 2000-10-11 Chris Toshok <toshok@helixcode.com>
11731 * providers/nntp/camel-nntp-store.c (nntp_store_unsubscribe_folder): remove the leading '/'.
11732 (nntp_store_subscribe_folder): same.
11733 (nntp_store_folder_subscribed): same.
11735 2000-10-11 Jeffrey Stedfast <fejj@helixcode.com>
11737 * providers/imap/camel-imap-folder.c (imap_move_message_to): Quote
11738 the mailbox name as it may contain spaces.
11739 (imap_copy_message_to): Same.
11741 2000-10-10 Chris Toshok <toshok@helixcode.com>
11743 * providers/nntp/camel-nntp-store.c
11744 (build_folder_info_from_grouplist): fill in message_count and
11745 unread_message_count properly.
11747 * providers/nntp/camel-nntp-newsrc.h: reformat.
11749 * providers/nntp/camel-nntp-grouplist.c
11750 (camel_nntp_get_grouplist_from_file): remove spew.
11752 * providers/nntp/camel-nntp-newsrc.c
11753 (camel_nntp_newsrc_group_get_num_articles_read): new function.
11754 (camel_nntp_newsrc_group_get_highest_article_read): robustification.
11756 2000-10-10 Joe Shaw <joe@helixcode.com>
11758 * providers/imap/camel-imap-store.c
11759 (parse_list_response_as_folder_info): Check before dereferencing the
11762 2000-10-10 Jacob "Ulysses" Berkman <jacob@helixcode.com>
11764 * camel-*.c: teach camel about "its" vs. "it's"
11766 2000-10-09 Chris Toshok <toshok@helixcode.com>
11768 * providers/nntp/camel-nntp-store.c (finalize): write out the
11770 (nntp_store_get_name): if @brief, just return host.
11772 * providers/nntp/camel-nntp-newsrc.c: robustification and bug
11775 2000-10-06 Jeffrey Stedfast <fejj@helixcode.com>
11777 * camel-folder-summary.c (camel_summary_format_address): Decode
11778 the resulting string.
11780 2000-10-06 Chris Toshok <toshok@helixcode.com>
11782 * providers/nntp/camel-nntp-grouplist.c: new file.
11784 * providers/nntp/camel-nntp-grouplist.h: new file.
11786 * providers/nntp/camel-nntp-types.h: new file.
11788 2000-10-06 Jeffrey Stedfast <fejj@helixcode.com>
11790 * camel-mime-utils.c (quoted_encode): Fix so that we don't encode
11791 every single char in the word. Also, do we need a safemask? I
11792 don't see why we would.
11793 (header_encode_string): Don't strip off the last char!!
11795 2000-10-06 Chris Toshok <toshok@helixcode.com>
11797 * providers/nntp/Makefile.am (libcamelnntpinclude_HEADERS): add
11798 camel-nntp-grouplist.h
11799 (libcamelnntp_la_SOURCES): add camel-nntp-grouplist.c
11801 * providers/nntp/camel-nntp-provider.c: add our own hash functions
11804 * providers/nntp/camel-nntp-newsrc.c
11805 (camel_nntp_newsrc_group_is_subscribed): new function.
11806 (camel_nntp_newsrc_subscribe_group): new function.
11807 (camel_nntp_newsrc_unsubscribe_group): new function.
11809 * providers/nntp/camel-nntp-newsrc.h: add prototypes for
11810 _group_is_subscribed, _subscribe_group, and _unsubscribe_group.
11812 * providers/nntp/camel-nntp-store.c
11813 (build_folder_info_from_grouplist): new function.
11814 (nntp_store_get_folder_info): add subscribed_only_parameter. if
11815 it's FALSE, load the grouplist and call
11816 build_folder_info_from_grouplist.
11817 (nntp_store_folder_subscribed): implement.
11818 (nntp_store_subscribe_folder): implement.
11819 (nntp_store_unsubscribe_folder): implement.
11820 (camel_nntp_store_init): add CAMEL_STORE_SUBSCRIPTIONS to the
11823 * providers/mh/camel-mh-store.c (get_folder_info): add
11824 subscribed_only parameter.
11826 * providers/mbox/camel-mbox-store.c (get_folder_info): add
11827 subscribed_only parameter.
11829 * providers/imap/camel-imap-store.c (get_folder_info): add
11830 subscribed_only parameter.
11832 * camel-store.c (camel_store_supports_subscriptions): new function.
11833 (camel_store_folder_subscribed): new function.
11834 (camel_store_subscribe_folder): new function.
11835 (camel_store_unsubscribe_folder): new function.
11837 * camel-store.h: add prototypes and virtual functions for the
11838 subscribe implementation. also, add a subscribed_only argument to
11839 camel_store_get_folder_info.
11841 2000-10-05 Jeffrey Stedfast <fejj@helixcode.com>
11843 * camel-mime-utils.c (header_address_list_format_append): Encode
11844 the name part of the address and don't quote the name.
11845 (header_decode_text): Rewrote from scratch, the old code was badly
11848 2000-10-05 Jeffrey Stedfast <fejj@helixcode.com>
11850 * camel-mime-message.c (camel_mime_message_set_reply_to): Use the
11851 camel_address_encode function again.
11852 (camel_mime_message_set_from): Same.
11854 2000-10-05 Jeffrey Stedfast <fejj@helixcode.com>
11856 * camel-mime-utils.c (quoted_encode_step): Modified to not encode
11857 space chars in the middle of a line.
11858 (isblank): New macro if we're not on a system with the GNU isblank
11861 * camel-mime-message.c (camel_mime_message_set_from): Reversed my
11862 changes, don't header_encode_phrase - it generates broken headers.
11863 (camel_mime_message_set_reply_to): Same.
11865 2000-10-04 Chris Toshok <toshok@helixcode.com>
11867 * providers/nntp/camel-nntp-utils.c (camel_nntp_get_headers):
11868 revert to old method (only use XOVER if OVER is supported.)
11870 * providers/nntp/camel-nntp-store.c
11871 (camel_nntp_store_get_overview_fmt): handle the case where the
11872 OVER extension isn't listed but LIST OVERVIEW.FMT works (again,
11873 INN 2.2). enable the OVER extension in this case.
11875 2000-10-04 Chris Toshok <toshok@helixcode.com>
11877 * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): return a
11878 gboolean so we can tell if this command worked. we can't key off
11879 the OVER extension being present because at least one server (INN
11880 2.2) doesn't report the OVER extension but implements the XOVER
11881 command. This could of course just be because I'm a loser for
11882 thinking they were related in the first place.
11883 (camel_nntp_get_headers): always try XOVER first, and if it fails
11884 revert to the slow method.
11886 2000-10-04 Dan Winship <danw@helixcode.com>
11888 * providers/mbox/camel-mbox-store.c (get_folder): Fix a case where
11889 a variable was free'd and then possibly used in an error message.
11891 2000-10-04 Chris Toshok <toshok@helixcode.com>
11893 * providers/nntp/camel-nntp-provider.c
11894 (camel_provider_module_init): news: -> nntp:.
11896 2000-10-04 Chris Toshok <toshok@helixcode.com>
11898 * providers/nntp/camel-nntp-store.c (nntp_store_get_folder_info):
11899 use "nntp:" instead of "news:" since "news:" urls aren't supposed
11900 to have host/user/port info in them. also, if there's a user
11901 defined in the url, put it in the urls for our folders.
11903 2000-10-04 Chris Toshok <toshok@helixcode.com>
11905 * providers/nntp/camel-nntp-auth.c (camel_nntp_auth_authenticate):
11906 borrow some code from the imap provider to query the user for
11907 their password, and pass the user/passwd to nntp. be extra
11908 paranoid and zero out the password before freeing it.
11910 * providers/nntp/camel-nntp-store.c (camel_nntp_store_init): add
11911 ALLOW_USER/ALLOW_PASSWORD/ALLOW_AUTH to the url flags.
11912 (nntp_store_query_auth_types_generic): return our list of
11914 (nntp_store_query_auth_types_connected): broken, return same as in
11915 query_auth_types_generic.
11917 2000-10-04 Dan Winship <danw@helixcode.com>
11919 * providers/imap/camel-imap-store.c (imap_connect): IMAP4
11920 (pre-rev1) doesn't support the 'LIST "" ""' idiom, so don't use
11921 it. Just assume the dir_sep is '/'. Shrug.
11923 2000-10-04 Jeffrey Stedfast <fejj@helixcode.com>
11925 * camel-mime-message.c (camel_mime_message_set_reply_to): Use
11926 header_encode_phrase instead.
11927 (camel_mime_message_set_from): Same.
11929 2000-10-04 Not Zed <NotZed@HelixCode.com>
11931 * camel-mime-utils.c (header_content_type_is): Handle the case
11932 where ct != NULL, but type and subtype are, and also match that
11933 against text/plain.
11935 * camel-folder-summary.c: Bump summary file version.
11936 (message_info_save): Save the size from the messageinfo.
11937 (message_info_load): Load the size from the summary file.
11938 (message_info_load): Fixed up the time_t saving/loading. There
11939 was a reason the warning was left there ... obviously nobody could
11940 read the comment "/* warnings, leave them here */", why do i even
11942 (camel_folder_summary_decode_time_t): Decode a time_t value from
11944 (camel_folder_summary_encode_time_t): Encode a time_t value to the
11947 2000-10-03 Jeffrey Stedfast <fejj@helixcode.com>
11949 * providers/imap/camel-imap-command.c (camel_imap_command): Quote
11950 the mailbox name when sending a SELECT request otherwise mailboxes
11951 with spaces in their names will cause problems.
11953 * camel-mime-message.c (camel_mime_message_set_reply_to): encode
11955 (camel_mime_message_set_from): Same.
11957 2000-10-03 Dan Winship <danw@helixcode.com>
11959 * providers/imap/camel-imap-command.c: New file containing
11960 camel_imap_command and friends. Major camel_imap_command rewrite
11961 to remove duplicated code, make the parsing of literals be
11962 more safe/correct, deal with RECENT/EXPUNGE responses more
11963 consistently, and make it possible to implement the AUTHENTICATE
11966 * providers/imap/camel-imap-utils.c (imap_parse_nstring): New
11967 function, to parse an IMAP "nstring".
11969 * providers/imap/camel-imap-store.c: Move command stuff to
11970 camel-imap-command.c. Update for camel_imap_command changes.
11972 * providers/imap/camel-imap-folder.c: Update for
11973 camel_imap_command changes.
11974 (imap_append_message): CRLF filter the message before sending it.
11976 * providers/imap/Makefile.am: Add camel-imap-command.[ch], remove
11977 camel-imap-stream.[ch] for now.
11979 2000-10-02 Jeffrey Stedfast <fejj@helixcode.com>
11981 * camel-mime-message.c (camel_mime_message_has_8bit_parts): New
11982 convenience function to determine if there are any 8bit mime parts
11984 (camel_mime_message_encode_8bit_parts): New convenience function
11985 to recursively reencode all 8bit mime parts to either
11986 quoted-printable or base64 depending on which would be the best
11987 encoding for that part.
11989 * providers/smtp/camel-smtp-transport.c (smtp_data): If the mime
11990 message contains 8bit parts and the server doesn't support 8bit
11991 transfers, reencode those parts before proceding with the send.
11992 (smtp_mail): If the mime message contains 8bit parts and the
11993 server supports the 8BITMIME extension to SMTP, notify the server
11994 that we'll be sending it 8bit mime parts.
11995 (_send_to): Find out if the message contains 8bit parts.
11997 2000-10-02 Jeffrey Stedfast <fejj@helixcode.com>
11999 * providers/smtp/camel-smtp-transport.c (_send_to): Use the
12000 CamelInternetAddress parser.
12001 (smtp_get_email_addr_from_text): deprecated.
12003 2000-10-02 Dan Winship <danw@helixcode.com>
12005 * camel-provider.h: Remove default_ports.
12007 * camel-remote-store.c (remote_connect): Get default_port from
12008 CamelRemoteStore rather than CamelProvider.
12010 * providers/{imap,nntp,pop3}/camel-*-store.c: Initialize
12011 CamelRemoteStore::default_port
12013 * providers/*/camel-*-provider.c: Remove default_ports.
12015 2000-10-02 Dan Winship <danw@helixcode.com>
12017 * camel-folder.[ch]: Remove
12018 camel_folder_{get,free}_subfolder_info, as we want to be able to
12019 scan the whole subfolder tree without having to open any folders,
12020 so this needs to be in CamelStore. Remove can_hold_folders and
12021 can_hold_messages flags; things that don't hold messages are no
12022 longer considered CamelFolders.
12024 * camel-folder-summary.[ch]: Remove CamelFolderInfo stuff.
12026 * camel-store.[ch]: Add camel_store_{get,free}_folder_info, as
12027 well as camel_store_free_folder_info_full and ..._nop for default
12028 implementations, and camel_folder_info_free and
12029 camel_folder_info_build as convenience functions. Turn
12030 CamelFolderInfo into a tree structure and also add an "url"
12033 * providers/*/camel-*-folder.c: Remove subfolder_info and can_hold
12035 * providers/*/camel-*-store.c: Add folder_info stuff.
12037 * providers/imap/camel-imap-folder.c (imap_summary_free): Free the
12038 summary elements with camel_message_info_free, not
12039 camel_folder_info_free. Oops.
12041 * providers/imap/camel-imap-utils.c: const poison
12043 2000-09-28 Jeffrey Stedfast <fejj@helixcode.com>
12045 * providers/smtp/camel-smtp-transport.c: Fixed some memory leaks.
12046 (camel_smtp_transport_init): Initialize supports_8bit to FALSE.
12047 (smtp_helo): If server supports 8bit, set supports_8bit to TRUE.
12049 * camel-transport.h (struct _CamelTransport): Added variable
12050 gboolean supports_8bit (we'll need this eventually? - see bugzilla
12053 * providers/smtp/camel-smtp-transport.c
12054 (smtp_get_email_addr_from_text): Ugh, no wonder people were
12055 getting illegal seek warnings *sigh*. I guess I can only blame
12056 myself for this one though :-(
12058 2000-09-28 Jeffrey Stedfast <fejj@helixcode.com>
12060 * providers/smtp/camel-smtp-transport.c (_send_to): Don't send the
12061 recipient data through smtp_get_email_addr_from_text - this is a
12062 complete waste. In fact, we don't want to have to use that
12065 * camel-internet-address.c, camel-address.c: Added some gtk-doc
12068 2000-09-28 Jeffrey Stedfast <fejj@helixcode.com>
12070 * camel-mime-utils.c (header_encode_string): Make sure to add the
12071 space char after an encoded word when the encoding is iso-8859-1.
12073 2000-09-28 Jeffrey Stedfast <fejj@helixcode.com>
12075 * providers/imap/camel-imap-folder.c (imap_get_message): When
12076 getting a literal string response, don't include the \r\n after
12077 the closing } (as in: "... {798}\r\n...")
12079 * providers/imap/camel-imap-stream.c (stream_read): Same.
12081 2000-09-28 Not Zed <NotZed@HelixCode.com>
12083 * camel-mime-utils.c (header_fold): New function to fold headers.
12085 2000-09-27 Not Zed <NotZed@HelixCode.com>
12087 * camel-mime-parser.c (folder_scan_header): If we had an empty
12088 header, then it must be end of the headers too.
12089 (folder_scan_init): No we dont need to init the outbuf with a nul
12092 * camel-folder-summary.c (camel_folder_summary_set_uid): New
12093 function to reset the uid to a higher value.
12095 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
12096 "something failed (yo!)" what sort of crap is this? Fixed all the
12097 indenting again, what wanker keeps running stuff through indent?
12098 (message_info_new): Check the uid we loaded off the disk, if it
12099 existed already, assign a new one. If it didn't then make sure
12100 the nextuid is higher.
12102 * camel-charset-map.c: New file, used to build a large unicode
12103 decoding mapping table, and use it to determine what is the
12104 lowest charset a given word can be encoded with. Uses tables from
12105 libunicode's source.
12107 * camel-internet-address.c (internet_encode): Use
12108 header_phrase_encode to properly encode the fullname, as required.
12109 refixed indenting. Who keeps doing that?
12110 (camel_internet_address_find_address): Changed fatal return/warnings
12113 * camel-mime-utils.c (header_raw_append_parse): Check : explicitly
12114 (removed from is_fieldname() macro).
12115 (camel_mime_special_table): Changed to short, so we can represent
12117 (quoted_encode): Take a mask of the safe chars for this encoding.
12118 (header_address_decode): Removed a #warning that makes no sense
12120 (header_decode_date): Fixed the 'broken date' parser code, if it
12121 ever decoded it it just threw away the result.
12122 (header_encode_string): Use better charset matching for encoding
12125 2000-08-31 Not Zed <NotZed@HelixCode.com>
12127 * providers/mh/camel-mh-summary.c (camel_mh_summary_sync): Save
12128 the index if we do a sync.
12129 (camel_mh_summary_check): Save the index here too. Probably.
12131 2000-09-27 Dan Winship <danw@helixcode.com>
12133 * providers/imap/camel-imap-store.c (camel_imap_command_extended):
12134 Return untagged data in a GPtrArray rather than a string, since it
12135 saves processing time and is much easier to deal with for several
12136 commands. Update for camel_imap_folder_changed change.
12137 (camel_imap_fetch_command): Update for camel_imap_folder_changed
12139 (imap_connect, imap_folder_exists): Update for
12140 camel_imap_command_extended change.
12142 * providers/imap/camel-imap-folder.c
12143 (imap_get_message_count_internal,
12144 imap_get_subfolder_info_internal, imap_search_by_expression):
12145 Update for camel_imap_command_extended change.
12147 (imap_get_summary_internal, imap_get_message_info_internal): Use
12148 camel_imap_fetch_command here now to get around the
12149 camel_imap_command_extended change.
12151 (camel_imap_folder_changed): turn expunged into a GArray of ints
12152 rather than a GPtrArray of strings representing ints.
12154 2000-09-26 Jeffrey Stedfast <fejj@helixcode.com>
12156 * providers/imap/camel-imap-folder.c
12157 (imap_get_message_count_internal): Quote the folder name as it may
12159 (imap_get_subfolder_info_internal): Same.
12161 * providers/imap/camel-imap-utils.c (imap_parse_list_response): Do
12162 proper unquoting for folder names.
12163 (func_get_current_date): Implemented.
12165 * providers/imap/camel-imap-store.c
12166 (imap_folder_exists): Quote the folder name as it may have spaces.
12167 (imap_create): Same.
12168 (check_current_folder): Same.
12170 2000-09-22 Dan Winship <danw@helixcode.com>
12172 * providers/imap/camel-imap-folder.c
12173 (imap_get_subfolder_info_internal): The root folder's name is "",
12175 (camel_imap_folder_new): constify folder_name.
12177 * providers/imap/camel-imap-store.c (get_folder): Create the
12178 folder with folder_name, not folder_path.
12179 (camel_imap_command_preliminary): Don't free cmdid here.
12181 2000-09-21 Dan Winship <danw@helixcode.com>
12183 * providers/imap/camel-imap-utils.c (imap_create_flag_list): New
12184 function to convert Camel flags to an IMAP flag_list.
12185 (imap_parse_flag_list): Contrariwise.
12187 * providers/imap/camel-imap-store.c (camel_imap_command_*): Make
12188 the @ret arg actually optional, as (mostly) documented.
12189 (various): Don't pass "&result" to camel_imap_command_* if we're
12190 just going to immediately free it. Don't record status if we're
12191 not going to look at it.
12193 * providers/imap/camel-imap-folder.c: Likewise.
12194 (imap_summary_free): Use camel_folder_info_free.
12195 (imap_sync): Use imap_create_flag_list. Clear
12196 CAMEL_MESSAGE_FOLDER_FLAGGED after syncing so we don't keep
12198 (imap_append_message): Use imap_create_flag_list. Don't leak the
12199 memstream if the append fails.
12200 (imap_move_message_to): Use camel_folder_delete_message rather
12201 than doing it by hand.
12202 (imap_get_summary_internal, imap_get_message_info_internal): Use
12203 imap_parse_flag_list and header_raw_clear.
12204 (camel_imap_folder_changed): Use camel_message_info_free.
12206 2000-09-21 Dan Winship <danw@helixcode.com>
12208 * providers/imap/camel-imap-store.c (get_folder_name): INBOX is
12210 (get_root_folder_name): Make the root folder "" rather than "/".
12211 (get_folder): Update for root folder name change.
12212 (camel_imap_store_get_toplevel_dir): Removed. (Unused, unneeded.)
12213 (camel_imap_store_folder_path): New function to turn a Camel
12214 folder name into the corresponding namespaced IMAP path.
12215 (imap_folder_exists): Make this take a store and a path rather
12217 (imap_create): Likewise
12218 (get_folder): Update for camel_imap_store_folder_path and other
12220 (check_current_folder): Likewise.
12222 * providers/imap/camel-imap-folder.c: Change a bunch of CamelStore
12223 variables to CamelImapStore (and add a few more) to prevent excess
12224 gratuitous casting. Use camel_imap_store_folder_path where
12226 (camel_imap_folder_new): Update for root folder name change.
12228 2000-09-19 Jeffrey Stedfast <fejj@helixcode.com>
12230 * providers/smtp/camel-smtp-transport.c (smtp_data): Use the
12231 linewrap filter to achieve full RFC0821 compliance.
12233 * camel-mime-filter-linewrap.[c,h]: New mime-filter to word-wrap.
12235 2000-09-19 Jeffrey Stedfast <fejj@helixcode.com>
12237 * camel-internet-address.c (internet_encode): When encoding the
12238 internet address, quote the name as the name may have commas or
12239 any other token which may later confuse our address parser.
12241 2000-09-19 Dan Winship <danw@helixcode.com>
12243 * providers/imap/camel-imap-folder.c
12244 (imap_get_subfolder_info_internal): Fix the case where INBOX
12245 isn't returned in the folder listing.
12247 2000-09-19 Dan Winship <danw@helixcode.com>
12249 * camel-folder.c: (init): Removed
12250 (camel_folder_init, camel_folder_construct): New object init
12251 function and public object constructor to replace the old init
12252 method in a more Gtk-like fashion.
12254 (get_parent_folder, camel_folder_get_parent_folder): Removed. No
12255 CamelFolder subclass was ever setting the parent_folder member, no
12256 code has ever needed to look at it, and fixing it would actually
12259 (get_subfolder_info, camel_folder_get_subfolder_info): Renamed
12260 from ..._names. Deals in CamelFolderInfo now.
12261 (free_subfolder_info, camel_folder_free_subfolder_info): Likewise.
12263 (get_subfolder, camel_folder_get_subfolder): Removed.
12264 CamelFolderInfo contains the subfolder's full name, so this is
12265 unnecessary now, and removing it lets us get rid of the
12266 CamelFolder separator member, which is needed for the default
12267 implementation of this function, but not otherwise needed for most
12270 Also, lots of code style fixes.
12272 * providers/*: Update CamelFolder subclasses for changes, although
12273 none of them fill in the message counts in the CamelFolderInfo
12276 2000-09-18 Christopher James Lahey <clahey@helixcode.com>
12278 * camel-folder-search.c, camel-folder-search.h,
12279 camel-remote-store.c, providers/imap/camel-imap-folder.c,
12280 providers/imap/camel-imap-store.c: Fixed the #include lines to
12281 deal properly with gal.
12283 2000-09-17 Dan Winship <danw@helixcode.com>
12285 * camel-folder-summary.h: update CamelFolderInfo
12286 * camel-folder-summary.c (camel_folder_info_free): New function to
12287 free the contents of a CamelFolderInfo
12289 2000-09-15 Dan Winship <danw@helixcode.com>
12291 * camel.c (camel_init): Set camel_verbose_debug to TRUE if
12292 CAMEL_VERBOSE_DEBUG is set in the environment.
12294 * camel-remote-store.c (remote_send_line, remote_recv_line): only
12295 log if camel_verbose_debug is TRUE.
12297 2000-09-14 Jeffrey Stedfast <fejj@helixcode.com>
12299 * providers/imap/camel-imap-store.c (get_folder): Don't use
12300 dir_sep as top-level directory, use "/".
12302 * providers/imap/camel-imap-folder.c (imap_expunge): Get rid of
12305 2000-09-13 Dan Winship <danw@helixcode.com>
12307 * providers/imap/camel-imap-folder.c (imap_expunge): Don't look at
12308 the response of the command. camel_imap_command_extended()
12309 processes EXPUNGE responses itself, so if we do it here too we
12310 remove twice as many summary items as we should.
12312 2000-09-13 Jeffrey Stedfast <fejj@helixcode.com>
12314 * providers/imap/camel-imap-store.c (imap_folder_exists): Rewrote
12315 to take a third argument (gboolean *selectable) so that we can
12316 find out if the folder is selectable or not as we look to see if
12317 it exists. Also, don't use EXAMINE because that will not work on
12318 non-selectable folders, so use LIST instead.
12319 (get_folder): Check to see if the folder exists even vefore
12320 calling imap_create as this will save time. If the folder does
12321 exist, find out if it's selectable. Moved the call to refresh_info
12324 * providers/imap/camel-imap-folder.c (imap_get_uids): Check for a
12326 (camel_imap_folder_new): Don't call refresh_info here - call it in
12327 get_folder() because we don't know if this folder even exists on
12328 the server yet! And even if it does, we don't know if it can hold
12329 messages or not yet.
12331 2000-09-12 Jeffrey Stedfast <fejj@helixcode.com>
12333 * camel-mime-parser.c (folder_scan_step): Make sure *datalength is
12334 > 0 before calling camel_mime_filter_filter otherwise we will get
12335 a segfault if the filter calls iconv().
12337 2000-09-08 Christopher James Lahey <clahey@helixcode.com>
12339 * providers/nntp/camel-nntp-auth.c,
12340 providers/nntp/camel-nntp-auth.h: Fixed a warning.
12342 2000-09-07 Dan Winship <danw@helixcode.com>
12344 * camel-session.c (camel_session_get_storage_path): Make this not
12347 2000-09-07 Dan Winship <danw@helixcode.com>
12349 * camel-session.c (camel_session_new): Make this take a path to a
12350 directory that Camel can use for its own nefarious purposes.
12351 (camel_session_get_storage_path): New function to return a path
12352 that a service can use for its own nefarious sub-purposes.
12354 * camel-service.c (camel_service_get_path): New method (and
12355 useful default implementation) to get a (relative) pathname
12356 corresponding to the service.
12358 2000-09-06 Dan Winship <danw@helixcode.com>
12360 * providers/pop3/camel-pop3-store.c (connect_to_server): Make KPOP
12363 2000-09-06 Jeffrey Stedfast <fejj@helixcode.com>
12365 * camel-mime-message.c (camel_mime_message_get_received_date):
12366 Implemented (someone added these to camel-mime-message.h but never
12367 implemented them!!) - though it may not be right.
12368 (camel_mime_message_get_sent_date): Same.
12370 2000-09-05 Dan Winship <danw@helixcode.com>
12372 * camel-mime-part.c (camel_mime_part_get_filename): If a MIME part
12373 has no Content-Disposition, but does have a "name" on the
12374 Content-Type, return that as the filename.
12375 (process_header): strstrip the Content-Description
12377 2000-09-05 Chris Toshok <toshok@helixcode.com>
12379 * providers/nntp/camel-nntp-utils.c (get_OVER_headers): care about
12381 (get_HEAD_headers): same.
12382 (camel_nntp_get_headers): same.
12384 * providers/nntp/camel-nntp-store.h: get rid of
12385 CAMEL_NNTP_OK/ERR/FAIL.
12387 * providers/nntp/camel-nntp-store.c
12388 (camel_nntp_store_get_extensions): take CamelException arg and
12389 pass along to camel_nntp_command.
12390 (camel_nntp_store_get_overview_fmt): same.
12391 (nntp_store_connect): convert to using constants in
12392 camel-nntp-resp-codes.h
12393 (nntp_store_get_folder): make use of camel_nntp_folder_new.
12394 (camel_nntp_command_send_recv): new function to deal with auth
12396 (camel_nntp_command): split out most of this function into
12397 camel_nntp_command_send_recv. also, return the actual response
12398 code instead of CAMEL_NNTP_OK/ERR/FAIL.
12400 * providers/nntp/camel-nntp-resp-codes.h: new file.
12402 * providers/nntp/camel-nntp-folder.h: prototype for
12403 camel_nntp_folder_new.
12405 * providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new): new
12406 convenience function.
12407 (nntp_folder_get_message): care more about the actual response
12410 * providers/nntp/Makefile.am (libcamelnntp_la_SOURCES): add
12412 (libcamelnntpinclude_HEADERS): add camel-nntp-auth.h.
12414 * providers/nntp/camel-nntp-auth.h: new file.
12416 * providers/nntp/camel-nntp-auth.c: new file.
12418 2000-09-05 Peter Williams <peterw@helixcode.com>
12420 * providers/imap/camel-imap-store.c (imap_folder_exists): Don't free the
12421 result on error; the exception will have the relevant info.
12423 * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Check for
12426 * providers/imap/camel-imap-store.c (imap_connect): Check the exception
12427 on the refresh_folders call.
12429 * providers/imap/camel-imap-store.h: Clean up some now-unused fields.
12431 * camel.c (camel_init): Call unicode_init again, now that libunicode
12432 will not initialize itself twice.
12434 2000-09-02 Lauris Kaplinski <lauris@helixcode.com>
12436 * camel-folder-search (search_header_contains): Use e_utf8_strstrcase
12438 2000-09-01 Christopher James Lahey <clahey@helixcode.com>
12440 * providers/imap/camel-imap-utils.c: Removed some unused
12443 2000-09-01 Peter Williams <peterw@helixcode.com>
12445 * providers/nntp/camel-nntp-store.c (camel_nntp_command): Initialize
12446 the statically-allocated CamelException so that it doesn't contain
12447 junk data that camel_exception_set() may try to free.
12448 (camel_nntp_store_get_extensions): Same.
12449 (camel_nntp_store_get_overview_fmt): Same.
12451 * providers/pop3/camel-pop3-store.c (camel_pop3_command): Typo
12452 fix (if (*ret) -> if (ret)).
12454 * providers/pop3/camel-pop3-store.c (pop3_connect): Set the
12455 port # back to what was specified ASAP, so that the hash of
12456 the URL doesn't change (which causes a failure in
12457 service_cache_remove that leads to a segfault).
12459 * providers/imap/camel-imap-store.c (imap_connect): Clear the
12460 exception after a failed LOGIN so that it doesn't pass through
12461 to the upper level and make mail think that the login failed.
12463 * providers/pop3/camel-pop3-store.c (pop3_connect): As above.
12465 2000-08-31 Peter Williams <peterw@helixcode.com>
12467 * providers/pop3/camel-pop3-store.c (camel_pop3_store_get_type):
12468 Implement POP3 with the CamelRemoteStore now.
12469 (connect_to_server): Hack this a bit to get KPOP to work. Obey
12470 the new connection semantics of the remote store (implicitly).
12471 (query_auth_types_connected): Clear exceptions after attempts
12472 to connect; the code at the bottom will catch hard errors.
12473 Use camel_service_connect.
12474 (camel_pop3_command): Take a CamelException; now, when an error
12475 occurs, ret is set to NULL and the exception passes back the
12476 appropriate information.
12477 (pop3_get_response): Same as above.
12478 (pop3_try_authenticate): Give camel_pop3_command its exception
12479 and handle it properly.
12480 (pop3_connect): Call the parent classfuncs. Don't disconnect
12481 on error (done for us).
12483 * providers/pop3/camel-pop3-folder.c: Obey the camel_pop3_command
12486 * camel-remote-store.c (remote_query_auth_types_connected): Don't
12487 warn; just return NULL.
12488 (remote_query_auth_types_generic): Same.
12489 (remote_send_string): Filter out passwords in debugging output.
12491 * providers/pop3/camel-pop3-store.c (camel_pop3_store_init): Also
12492 set the ALLOW_AUTH flag.
12494 * providers/imap/camel-imap-store.c (camel_imap_store_init): Same.
12496 2000-08-31 Chris Toshok <toshok@helixcode.com>
12498 * providers/nntp/camel-nntp-store.c (camel_nntp_store_class_init):
12499 remove get_folder_name.
12500 (nntp_store_get_folder_name): remove.
12502 2000-08-31 Lauris Kaplinski <lauris@helixcode.com>
12504 * camel-mime-part.c (write_to-stream): Use filter only if we have one
12506 2000-08-31 Chris Toshok <toshok@helixcode.com>
12508 * providers/nntp/camel-nntp-utils.c (get_OVER_headers): use
12509 camel_remote_store_recv_line.
12511 * providers/nntp/camel-nntp-folder.c (nntp_folder_get_message):
12512 use camel_remote_store_recv_line to build message. also, free our
12513 buffer so we don't leak like mad.
12515 * providers/nntp/camel-nntp-store.c:
12516 (camel_nntp_store_get_additional_data) remove.
12517 (camel_nntp_store_get_extensions): use
12518 camel_remote_store_recv_line.
12519 (camel_nntp_store_get_overview_fmt): same. also, don't rely on
12520 _get_additional_data anymore since it's easier to parse without.
12521 (camel_nntp_command): use camel_remote_store_send_string and
12522 camel_remote_store_recv_line.
12524 * providers/nntp/camel-nntp-store.h: CamelRemoteStore is the
12525 parent class now. remove istream/ostream since CamelRemoteStore
12526 takes care of that for us. also remove the prototype for
12527 camel_nntp_store_get_additional_data.
12529 * providers/nntp/camel-nntp-newsrc.c (camel_nntp_newsrc_write):
12530 make sure to clear dirty bit.
12531 (camel_nntp_newsrc_read_for_server): don't worry about continually
12532 trying to open the file - if it fails we just return an
12533 unpopulated .newsrc file.
12535 2000-08-31 Chris Toshok <toshok@helixcode.com>
12537 * providers/nntp/camel-nntp-newsrc.c
12538 (camel_nntp_newsrc_read_for_server): make this a bit more robust.
12539 try to create an empty .newsrc file for the server if we can't
12540 open it for reading. also, don't allocate everything until we've
12543 * providers/nntp/camel-nntp-utils.c (get_OVER_headers): make use
12544 of our overview field indices.
12545 (camel_nntp_get_headers): only call get_OVER_headers if the
12546 extension is present. warn if it's not - since get_HEAD_headers
12547 needs work before it works.
12549 * providers/nntp/camel-nntp-store.c
12550 (camel_nntp_store_get_extensions): new function - query the server
12551 for it's extensions.
12552 (camel_nntp_store_get_overview_fmt): new function - query the
12553 server for the overview format and build our table of the indices
12554 we care about. support the "full" suffix on fields.
12555 (nntp_store_connect): call camel_nntp_store_get_extensions and
12556 camel_nntp_store_get_overview_fmt.
12558 * providers/nntp/camel-nntp-store.h: add codes for extensions
12559 found on news.mozilla.org. only one that we care about is OVER.
12560 also, add CamelNNTPOverField and an enum of the overview fields
12561 that we care about.
12563 2000-08-31 Jeffrey Stedfast <fejj@helixcode.com>
12565 * providers/imap/camel-imap-utils.c (imap_translate_sexp):
12566 Reimplemented. It should now work correctly for most possible
12569 2000-08-31 Jeffrey Stedfast <fejj@helixcode.com>
12571 * providers/imap/camel-imap-store.c (camel_imap_command_extended):
12572 Don't save any exceptions caused by camel_imap_folder_changed
12573 (camel_imap_fetch_command): Same.
12575 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
12576 Using a new way of calculating the first recent message that seems
12577 more accurate. Also added code to make sure we don't accidently
12578 add a duplicate summary.
12580 2000-08-31 Not Zed <NotZed@HelixCode.com>
12582 * camel-mime-part.c (write_to_stream): Use the proper type
12583 checking function to check for text types.
12584 (write_to_stream): If we have a charset on a text type that
12585 isn't us-ascii or utf-8, then we need to reencode it, so add a
12586 filter to do that too.
12587 (write_to_stream): Fix some warnings/use the right constructor,
12589 (write_to_stream): Rearrange the logic so it always does charset
12590 conversion, and not just if we have a qp/base64 block.
12592 * camel-mime-utils.c (append_latin1): New function - even though
12593 its broken, we'll assume mailers send latin1 headers instead of
12594 us-ascii. We just have to encode high chars into utf-8.
12595 (header_decode_text): Call append_latin1 for appending unencoded
12597 (append_latin1): Do an additional mask for account for c's
12598 undefined behaviour for sign extension whilst shifting right.
12600 2000-08-30 Jeffrey Stedfast <fejj@helixcode.com>
12602 * providers/imap/camel-imap-store.c (camel_imap_fetch_command):
12603 Rewrote to ignore strings that look like server responses until it
12604 is sure that it has finished reading the literal string response.
12606 2000-08-30 Jeffrey Stedfast <fejj@helixcode.com>
12608 * camel-remote-store.c (remote_send_string): Don't wrap printed
12609 strings in quotes, makes things messy
12611 * providers/imap/camel-imap-folder.c (imap_get_message): Updated
12612 to use the camel_imap_fetch_command
12614 * providers/imap/camel-imap-stream.c (stream_read): Updated to use
12615 camel_imap_fetch_command
12617 * providers/imap/camel-imap-store.c (camel_imap_command_extended):
12618 No longer handles FETCH requests so no longer needs to be
12619 concerned with checking to make sure that server responses are
12620 valid (they have to be).
12621 (camel_imap_fetch_command): New convenience function that handles
12624 2000-08-30 Peter Williams <peterw@helixcode.com>
12626 * camel-remote-store.c (remote_connect): Unify with remote_post_connect.
12627 (remote_disconnect): Unify with remote_pre_disconnect.
12628 (camel_remote_store_class_init): Don't use the post_connect and
12629 pre_disconnect classfuncs anymore ; they weren't especially useful.
12631 * providers/imap/camel-imap-store.c (imap_connect): Use this again
12632 instead of implementing post_connect.
12633 (imap_disconnect): Analogous to above.
12635 * camel-session.c (camel_session_get_service_connected): New function.
12636 Like camel_session_get_service() but also connects to the service
12637 if needed. camel_session_get_{store,transport} (defined in the header)
12638 used this now, preventing annoying when-to-connect problems.
12640 * camel-service.c (camel_service_new): Revert to the old behavior
12641 of not connecting until told to do so. Otherwise doing auth
12642 testing correctly is really hard.
12643 (camel_service_connect): Fix behavior here (set the connected
12645 (camel_service_disconnect): Unset the connected flag.
12647 2000-08-30 Jeffrey Stedfast <fejj@helixcode.com>
12649 * providers/imap/camel-imap-store.c: General cleanup / moving
12650 stuff around to make things easier to follow.
12652 2000-08-30 Jeffrey Stedfast <fejj@helixcode.com>
12654 * camel-remote-store.c: Prevent exceptions from being overwritten
12656 * providers/imap/camel-imap-folder.c (imap_expunge): Beautified
12657 (imap_get_subfolder_names_internal): Removed old code as the
12658 replacement code has now been tested and proven to work
12660 2000-08-29 Jeffrey Stedfast <fejj@helixcode.com>
12662 * providers/imap/camel-imap-utils.c: Removed old code that will
12663 never be needed again
12665 * providers/imap/camel-imap-store.c: Removed old code for
12666 try_connect - will never need this code
12667 (slurp_response): Update to make sure we aren't falsely detecting
12670 2000-08-29 Peter Williams <peterw@helixcode.com>
12672 * camel-service.c (camel_service_connect): Uncomment this.
12673 (camel_service_disconnect): Same.
12675 * camel-remote-store.[ch]: New files. Abstract remote storages
12676 (IMAP, POP3, NNTP) and hides the lower-level networky stuff.
12678 * camel-service.c (camel_service_new): Take an extra argument, the
12679 provider that created us, cause it's useful.
12680 (camel_service_finalize): Unref our new provider member.
12682 * camel-session.c (camel_session_get_service): Pass the proper number of
12683 arguments to camel_service_new().
12685 * camel-imap-store.c: Massive update: 1) use the CamelRemoteService to
12686 make our life Very Easy (TM). 2) Change the semantics of all
12687 camel_imap_command* functions to take exceptions, centralize tons of
12688 duplicate code, and use the handy RemoteStore utility functions
12690 * camel-imap-folder.c: Use the new semantics of camel_imap_command*
12692 * camel-imap-stream.c: Same.
12694 2000-08-29 Jeffrey Stedfast <fejj@helixcode.com>
12696 * providers/imap/camel-imap-store.c (camel_imap_command_extended):
12697 Updated to check for EXPUNGE notifications
12699 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
12700 Updated to account for messages which have been expunged (now
12701 takes a new arg, a GPtrArray of message id's that have been
12703 (imap_expunge): Updated (we may want to just use the code in
12704 folder_changed now instead of doing our own summary
12705 expunging...but that can be fixed later)
12706 (imap_append_message): Updated.
12707 (imap_copy_message_to): Updated.
12708 (imap_move_message_to): Updated.
12710 2000-08-28 Peter Williams <peterw@helixcode.com>
12712 * camel-folder.c (camel_folder_refresh_info): New member function,
12713 refresh_info, used for rereading folder state after its state has
12714 somehow become unknown. Tries to preserve last-known status of
12717 * providers/mbox/camel-mbox-folder.c (mbox_refresh_info): Implement
12718 ::refresh_info (split up ::init)
12720 * providers/mbox/camel-mbox-store.c (get_folder): Call ::refresh_info.
12722 * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Call
12723 ::refresh_info once initialized.
12724 (imap_refresh_info): New member function; reads the summary from
12725 the server (used to be in camel_imap_folder_new; split out).
12727 * providers/imap/camel-imap-store.c (imap_connect): Set
12728 CamelService::connected a little early so that
12729 camel_imap_command won't try to connect while already
12731 (camel_imap_command*): Try to connect if not connected already.
12733 * providers/pop3/camel-pop3-folder.c (pop3_refresh_info): Same as above.
12735 * providers/pop3/camel-pop3-folder.c (camel_pop3_folder_new): Same
12738 * providers/pop3/camel-pop3-store.c (pop3_connect): Set
12739 CamelService::connected a little early so that
12740 camel_pop3_command won't try to connect while already
12742 (connect_to_server): Same.
12744 * providers/nntp/camel-nntp-folder.c (nntp_folder_refresh_info): Same
12747 2000-08-28 Jeffrey Stedfast <fejj@helixcode.com>
12749 * providers/imap/camel-imap-folder.c (imap_get_message): Fixed the
12750 hack around quoted string responses - should now handle them
12751 according to the specifications in the RFC
12753 * providers/imap/camel-imap-stream.c (stream_read): Updated to
12754 match the code currently used in camel-imap-folder.c
12756 2000-08-28 Ettore Perazzoli <ettore@helixcode.com>
12758 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
12759 Never ever free `tmpname' as it comes from `alloca()'!
12761 2000-08-26 Ettore Perazzoli <ettore@helixcode.com>
12763 * camel-mime-utils.c (header_decode_text): Use `g_free()', not
12764 `free()', to free `decword'.
12766 2000-08-25 Peter Williams <peterw@helixcode.com>
12768 * camel.c (camel_init): Don't call unicode_init; code in e-util
12769 will do it, and if unicode_init is called twice, you get an
12770 infinite loop when looking up nonexistant encodings (patch
12771 has been submitted to libunicode's maintainer).
12773 * camel-provider.h: Add a new field, default_ports, which
12774 helps the configuration code guess about how to make CamelURL's
12777 * providers/*/camel-*-provider.c: Specify default ports.
12779 2000-08-25 Jeffrey Stedfast <fejj@helixcode.com>
12781 * providers/imap/camel-imap-folder.c
12782 (imap_get_subfolder_names_internal): If the url path is "/" and
12783 the folder path is "/", just LIST "" "*" (this should fix some
12784 cyrus imapd problems). Also, INBOX is case insensitive so use
12787 2000-08-24 Lauris Kaplinski <lauris@helixcode.com>
12789 * camel-folder-summary.c (summary_build_content_info):
12790 Use UTF-8 as default
12791 * camel-mime-part-utils.c (simple_data_wrapper_construct_from_parser):
12792 Use UTF-8 as default
12793 * camel-mime-utils.c (rfc2047_decode_word): Use UTF-8
12795 2000-08-17 Not Zed <NotZed@HelixCode.com>
12797 * providers/mh/camel-mh-folder.c (mh_finalize): And here too.
12799 * providers/mbox/camel-mbox-folder.c (mbox_finalize): Close index
12802 2000-08-23 Dan Winship <danw@helixcode.com>
12804 * camel-mime-utils.c (header_address_list_format_append): put
12805 commas between addresses.
12807 2000-08-22 Dan Winship <danw@helixcode.com>
12809 * providers/imap/camel-imap-folder.c
12810 (imap_protocol_get_summary_specifier): use BODY.PEEK, not BODY, so
12811 we don't set the message \Seen.
12813 2000-08-22 Christopher James Lahey <clahey@helixcode.com>
12815 * providers/pop3/camel-pop3-store.c: Fixed a small warning.
12817 2000-08-22 Peter Williams <peterw@helixcode.com>
12819 * camel-service.c (camel_service_new): Connect automatically if the
12821 (finalize): Disconnect automatically if connected.
12822 (camel_service_query_auth_types): Split into two functions; one to
12823 be called if we're connected to an actual server (_connected), one
12824 to be called if we're just gauging the general authtypes supported
12826 (is_connected): Remove.
12828 * camel-store.c (camel_store_get_folder): Don't connect explicitly to
12831 * providers/nntp/camel-nntp-store.c (query_auth_types_generic): Split
12832 the query_auth_types function. Hook it up in _new.
12833 (finalize): Don't try to disconnect here.
12835 * providers/pop3/camel-pop3-store.c (query_auth_types_generic): Same.
12836 (finalize): Don't try to disconnect here.
12838 * providers/imap/camel-imap-store.c (query_auth_types_generic): Same.
12839 (finalize): Don't try to disconnect here.
12841 * providers/smtp/camel-smtp-transport.c (query_auth_types_generic): Split
12842 the query_auth_types (dummy, in this case) function. Hook it up in _new.
12843 (finalize): Don't try to disconnect here.
12845 2000-08-21 JP Rosevear <jpr@helixcode.com>
12847 * providers/nntp/camel-nntp-folder.c (nntp_folder_get_subfolder_names):
12848 Make sure newsrc is not null
12849 (nntp_folder_get_subfolder_names): ditto
12851 * providers/nntp/camel-nntp-newsrc.c
12852 (camel_nntp_newsrc_get_subscribed_group_names): Programming check
12854 (camel_nntp_newsrc_get_all_group_names): ditto
12855 (camel_nntp_newsrc_write_to_file): ditto
12856 (camel_nntp_newsrc_write): ditto
12858 2000-08-21 JP Rosevear <jpr@helixcode.com>
12860 * providers/nntp/camel-nntp-store.c (camel_nntp_command):
12861 Make sure respbuffer is not null before manipulating it.
12862 If it is null, return CAMEL_NNTP_FAIL and a decent error
12865 2000-08-18 Peter Williams <peterw@helixcode.com>
12867 * camel-internet-address.c (internet_encode): If the name is "" we
12868 weren't outputting anything; output the address at least.
12870 2000-08-16 Peter Williams <peterw@helixcode.com>
12872 * camel-internet-address.c (internet_encode): Fix a leak when
12873 name = "". It's a single-byte leak, but it's the little things
12876 * camel-object.c (camel_type_lock_up): Don't leave the type
12877 system locked when a bad unlock happens.
12879 * providers/mbox/camel-mbox-store.c (get_folder): Fix a leak.
12881 2000-08-15 Peter Williams <peterw@helixcode.com>
12883 * providers/imap/camel-imap-folder.c (imap_copy_message_to): Typo fix.
12885 2000-08-14 Peter Williams <peterw@helixcode.com>
12887 * camel-folder-search.c (search_get_sent_date): New search function;
12888 returns the time_t when the message was sent.
12889 (search_get_receive_date): Same for when it was received.
12890 (search_get_current_date): Gets the current time for use with the
12891 above two. Is this in the right place?
12893 * camel-folder-search.h: Add the new functions above to the class.
12895 2000-08-13 Dan Winship <danw@helixcode.com>
12897 * providers/nntp/Makefile.am (libcamelnntpinclude_HEADERS): Add
12900 * providers/imap/camel-imap-folder.c
12901 (imap_get_subfolder_names_internal): do a strcasecmp rather than
12902 just a strcmp when checking if a folder is "INBOX", since it is
12903 a case-insensitive name.
12905 2000-08-12 Dan Winship <danw@helixcode.com>
12907 * providers/imap/camel-imap-folder.c (imap_get_summary_internal):
12908 Don't assume the FETCH results will come back in the order they
12910 (imap_get_subfolder_names_internal): Add "INBOX" to the list as
12911 g_malloc'ed memory, not a static string.
12913 2000-08-12 Jeffrey Stedfast <fejj@helixcode.com>
12915 * providers/imap/camel-imap-store.c
12916 (camel_imap_command_continuation): Now takes a char * parameter
12917 rather than a stream
12918 (camel_imap_command_continuation_with_stream): Same function as
12919 above but takes a stream parameter instead
12921 * providers/imap/camel-imap-folder.c (imap_append_message): Use
12922 camel_imap_command_continuation_with_stream
12924 2000-08-12 Dan Winship <danw@helixcode.com>
12926 * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): New
12927 function to do one round of attempted authentication.
12928 (pop3_connect): Move a bunch of code out into
12929 pop3_try_authenticate and fix some bugs in the edge cases.
12931 2000-08-12 Jeffrey Stedfast <fejj@helixcode.com>
12933 * providers/imap/camel-imap-store.c (query_auth_types): No longer
12934 calls try_connect() to get authtypes
12936 2000-08-11 Jeffrey Stedfast <fejj@helixcode.com>
12938 * providers/imap/camel-imap-store.c
12939 (camel_imap_command_continuation): Changed param order a bit and
12942 * providers/imap/camel-imap-folder.c (imap_append_message): Use
12943 the new multi-transactional convenience functions
12945 2000-08-11 Jeffrey Stedfast <fejj@helixcode.com>
12947 * providers/imap/camel-imap-store.c
12948 (camel_imap_command_preliminary): New convenience function for
12949 multi-transactional commands (opening request)
12950 (camel_imap_command_continuation): New convenience function for
12951 multi-transactional commands (followup data)
12953 2000-08-11 Christopher James Lahey <clahey@helixcode.com>
12955 * providers/mh/camel-mh-folder.c: Fixed a warning.
12957 2000-08-11 Chris Toshok <toshok@helixcode.com>
12959 * providers/nntp/camel-nntp-folder.c
12960 (camel_nntp_folder_class_init): remove get_name and get_full_name
12961 assignments, since the camel-folder.c implementation does what we
12964 2000-08-11 Chris Toshok <toshok@helixcode.com>
12966 * providers/nntp/camel-nntp-store.c
12967 (camel_nntp_store_get_toplevel_dir): use g_get_home_dir, since
12968 evolution_dir isn't available in the providers.
12970 2000-08-11 Peter Williams <peterw@helixcode.com>
12972 * camel-folder.c (thaw): Fix a bug where the message_changed
12973 signal wasn't being emitted.
12975 2000-08-11 Not Zed <NotZed@HelixCode.com>
12977 * providers/mh/camel-mh-folder.c (mh_set_message_user_tag):
12979 (mh_get_message_user_tag): Implement.
12981 * providers/mbox/camel-mbox-folder.c (mbox_get_message_user_tag):
12982 (mbox_set_message_user_tag): Implement.
12984 * camel-folder.c (move_message_to): Yay so lets fix an already
12986 (copy_message_to): and here too ... update for api change to append().
12987 And removed another warning.
12988 (camel_folder_set_message_user_tag): Routine to set message tags.
12989 (camel_folder_get_message_user_tag): And accessor.
12991 2000-08-10 Christopher James Lahey <clahey@helixcode.com>
12993 * camel-folder-search.c, camel-folder-summary.c, camel-medium.c,
12994 camel-mime-filter-charset.c, camel-mime-filter.c,
12995 camel-mime-filter.h, camel-mime-message.c, camel-mime-parser.c,
12996 camel-mime-part-utils.c, camel-mime-part.c, camel-mime-utils.c,
12997 camel-movemail.c, camel-multipart.c, camel-object.c,
12998 camel-stream-mem.c, providers/mbox/camel-mbox-folder.c,
12999 providers/mbox/camel-mbox-summary.c,
13000 providers/mh/camel-mh-folder.c,
13001 providers/smtp/camel-smtp-transport.c: Fixed some warnings.
13003 2000-08-11 Not Zed <NotZed@HelixCode.com>
13005 * providers/vee/camel-vee-folder.c (vee_folder_build_folder): Free
13006 the search properly.
13007 (vee_folder_build): And here too.
13009 2000-08-10 Jeffrey Stedfast <fejj@helixcode.com>
13011 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
13012 If we go over the max number of messages, don't keep requesting
13013 new message summaries, just break.
13015 2000-08-11 Not Zed <NotZed@HelixCode.com>
13017 * camel-mime-parser.c (folder_scan_header): A better way to
13018 compress leading whitespace. The code is probably invalid anyway,
13019 I dont think it will work across buffer boundaries.
13021 * providers/mbox/camel-mbox-folder.c (mbox_append_message): And
13022 write out proper format From lines here too.
13024 * providers/mbox/camel-mbox-summary.c
13025 (camel_mbox_summary_build_from): New function to build a more
13026 compatible mbox "From " line.
13027 (camel_mbox_summary_sync): Write From lines in the proper format.
13029 2000-08-10 Not Zed <NotZed@HelixCode.com>
13031 * providers/mh/camel-mh-store.c (get_folder): Remove warnin g.
13033 * providers/mbox/camel-mbox-store.c (xrename): Kill some warnings
13034 with constification.
13036 * providers/imap/camel-imap-folder.c (imap_append_message): Fixed
13037 for append api change. Eek this routine seriously wastes memory.
13039 * providers/mh/camel-mh-folder.c (mh_search_free): Impelemnt.
13040 (mh_append_message): Fix for api change, and include user flags
13041 and tags in new message.
13043 * providers/vee/camel-vee-folder.c (vee_search_by_expression): Fix
13044 for search api change.
13046 * camel-folder.c (camel_folder_search_free): New function for
13047 freeing search results.
13048 (search_free): Changed my mind, implement a default that actually
13049 does something. Free as to the old interface.
13050 (camel_folder_append_message): Changed to accept a
13051 camelmessageinfo rather than flags, which just doesn't have enough
13053 (copy_message_to): Change for append_message api change.
13054 (move_message_to): Likewise.
13056 * providers/mbox/camel-mbox-folder.c (mbox_search_free):
13058 (mbox_append_message): Fix for api change, and also copy user
13059 flags/tags across to new summary.
13061 * camel-folder-search.c (search_user_tag): A search expression
13062 that returns the current use flag by name.
13063 (camel_folder_search_free_result): New function to free the result
13066 * camel-folder-summary.c: Bump summary version.
13067 (message_info_new):
13068 (message_info_load):
13069 (message_info_save):
13070 (camel_message_info_dup_to):
13071 (camel_message_info_free): Added support for arbitrary tag/value
13072 pairs (CamelTag's).
13075 (camel_tag_list_size):
13076 (camel_tag_list_free): Operations for working with CamelTags.
13078 2000-08-09 Peter Williams <peterw@helixcode.com>
13080 * camel-store.c (camel_store_get_folder): Connect beforehand, if
13083 * providers/imap/camel-imap-store.c (camel_imap_store_init): Default
13084 the dir_sep to "/" so that certain functions can safely assume that
13085 dir_sep is valid (at least, nonnull).
13087 2000-08-09 Ettore Perazzoli <ettore@helixcode.com>
13089 * providers/nntp/camel-nntp-folder.c
13090 (nntp_folder_set_message_flags): Get rid of an unused variable.
13092 * providers/nntp/Makefile.am (INCLUDES): Fix includes so that we
13093 don't use installed headers anymore. [I copied this over from the
13094 IMAP provider, that does not seem to have this problem.]
13096 2000-08-09 Not Zed <NotZed@HelixCode.com>
13098 * camel-folder-search.c (camel_folder_search_execute_expression):
13099 Reorder search result in summary order if we searched with a
13102 2000-08-08 Dan Winship <danw@helixcode.com>
13104 * camel-uid-cache.c: New code to keep an on-disk cache of what
13105 UIDs have been seen in a folder.
13107 * camel-provider.h: Add new flags CAMEL_PROVIDER_IS_SOURCE (mail
13108 can arrive in it by non-Camel means) and CAMEL_PROVIDER_IS_STORAGE
13109 (you can work with mail directly without needing to copy it local).
13111 * providers/*/camel-*-provider.c: Add flags as needed: imap and
13112 mbox are SOURCE and STORAGE. mh and nntp are just STORAGE, pop3 is
13115 * camel-mime-message.c (process_header): Add another subject
13116 g_strstrip that fejj's earlier commit missed.
13118 2000-08-08 Peter Williams <peterw@helixcode.com>
13120 * camel-provider.h: Remove some GTK stuff that I missed.
13122 * providers/imap/camel-imap-store.c (imap_noop): Turn this
13123 back on with the new timeout interface in CamelSession.
13125 * camel-session.[ch] (camel_session_register_timeout): New
13126 interface for Camel to register timeouts. Basically the
13127 GTK timeout interface is copied. We do this because Camel isn't
13128 allowed to use GTK anymore.
13130 2000-08-07 Not Zed <NotZed@HelixCode.com>
13132 * providers/mh/camel-mh-folder.c (mh_append_message): Only retry
13133 another uid if we had a name clash, otherwise fail.
13135 2000-08-07 Jeffrey Stedfast <fejj@helixcode.com>
13137 * providers/imap/camel-imap-folder.c
13138 (imap_get_subfolder_names_internal): If we are trying to get a
13139 subfolder listing of the root folder, always make sure INBOX is
13142 * providers/imap/camel-imap-utils.c (imap_parse_list_response):
13143 Check for NIL as a directory separator.
13145 2000-08-07 Peter Williams <peterw@helixcode.com>
13147 * providers/nntp/Makefile.am: Reorder the INCLUDES to pull
13148 in the camel headers from the local source tree before
13149 the ones in $(includedir). This was causing compile problems
13150 because the installed, Gtk-based camel-object.h was included
13151 before the uninstall Camel-based one.
13153 2000-08-07 Jeffrey Stedfast <fejj@helixcode.com>
13155 * providers/imap/camel-imap-utils.c (imap_translate_sexp): Strip
13156 all \n's from the expression
13158 * string-utils.c (strip): New convenience function to strip
13159 occurences of a single char from a string
13161 * camel-mime-message.c (camel_mime_message_set_subject): Do a
13162 g_strstrip on the subject so we can stop getting those annoying
13165 2000-08-07 Dan Winship <danw@helixcode.com>
13167 * camel-folder.c (camel_folder_free_deep): Fix this to not require
13168 NULL-termination of the array.
13170 2000-08-04 Jeffrey Stedfast <fejj@helixcode.com>
13172 * providers/imap/camel-imap-store.c (imap_connect): If we fail to
13173 get a dir_sep, then supply the default of "/".
13174 (get_folder): Undo changes by Peter
13176 2000-08-04 Peter Williams <peterw@helixcode.com>
13178 * providers/imap/camel-imap-store.c (get_folder): Prevent a coredump
13179 when get_folder()ing from a store with dir_sep = NULL.
13181 2000-08-04 Peter Williams <peterw@helixcode.com>
13183 * camel-store.h: Include camel-object.h. Ettore said this wasn't
13186 2000-08-04 Not Zed <NotZed@HelixCode.com>
13188 * camel-url.c (camel_url_set_protocol):
13189 (camel_url_set_host):
13190 (camel_url_set_path):
13191 (camel_url_set_port): Url editing functions.
13193 2000-08-04 Dan Winship <danw@helixcode.com>
13195 * providers/pop3/camel-pop3-folder.c (pop3_set_message_flags):
13196 (pop3_sync): Indexes into the flags array are message_number minus
13197 1, not just message_number.
13199 * providers/pop3/camel-pop3-store.c: add a debugging macro for
13200 doing protocol tracing.
13202 2000-08-03 Jeffrey Stedfast <fejj@helixcode.com>
13204 * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Only
13205 call imap_get_summary_internal if the folder can hold messages
13207 * providers/nntp/camel-nntp-provider.c (camel_provider_module_init):
13208 Initialize the service_cache for the news/nntp providers
13210 2000-08-03 Peter Williams <peterw@helixcode.com>
13212 * providers/nntp/Makefile.am (INCLUDES): Add -I$(top_srcdir) to
13213 pull in libibex/ibex.h
13215 2000-08-02 Not Zed <NotZed@HelixCode.com>
13217 * providers/mh/camel-mh-summary.c (camel_mh_summary_sync): Expunge
13218 from the end, so the index isn't messed up when you remove a
13221 * providers/mh/camel-mh-folder.c (mh_append_message): Fix a bug
13222 where it would never open an output file/uid.
13224 * providers/mbox/camel-mbox-store.c (rename_folder):
13225 Implementation for mbox as well.
13227 * camel-store.c (camel_store_rename_folder): New method to rename folders.
13228 (rename_folder): Default implementation.
13230 * providers/mh/camel-mh-store.c (delete_folder): Implement this.
13231 (rename_folder): Implement a rename operation.
13233 2000-08-02 Dan Winship <danw@helixcode.com>
13235 * providers/MH: Kill this. It doesn't have any code to do anything
13236 the new mh provider doesn't do better.
13238 * providers/Makefile.am: Remove reference to MH subdir, and
13239 promote nntp to fully-supported status, since it does compile and
13242 * camel-mime-message.c (camel_mime_message_set_subject): Trim
13243 trailing space from the subject. I've now seen replies from two
13244 different people that tricked the threading code by (a) not having
13245 References/In-Reply-To, and (b) adding an extra space to the end
13246 of the subject line so the subject-based threading fails too. Who
13247 writes these broken mailers anyway?
13249 2000-08-01 Jeffrey Stedfast <fejj@helixcode.com>
13251 * providers/smtp/camel-smtp-transport.c (smtp_helo): When forced
13252 to use the IP, place it in square brackets.
13254 * providers/imap/camel-imap-utils.c (imap_translate_sexp): New and
13255 improved sexp parser. An honest try at using e-sexp is wrapped in
13256 a #ifdef at the bottom of the file but is currently not used
13258 * providers/imap/camel-imap-folder.c (imap_search_by_expression):
13259 We want to do a UID SEARCH so we get UIDs back instead of sequence
13262 2000-08-01 Not Zed <NotZed@HelixCode.com>
13264 * providers/mh: New mh provider implementation.
13266 * providers/Makefile.am (SUBDIRS): Added mh provider.
13268 2000-07-31 Jeffrey Stedfast <fejj@helixcode.com>
13270 * providers/imap/camel-imap-folder.c (imap_get_message_info_internal):
13271 Some IMAP servers don't wrap the UID in ()'s so don't depend on that
13272 (imap_get_summary_internal): Same
13274 * providers/imap/camel-imap-utils.c (free_sexp_node): Oops, forgot to
13275 free node->function - not good.
13277 2000-07-31 Peter Williams <peterw@helixcode.com>
13279 * providers/vee/camel-vee-folder.c (vee_search_by_expression): Add
13280 a NULL to the matches pointer array so that g_strfreev knows where
13283 2000-07-31 Jeffrey Stedfast <fejj@helixcode.com>
13285 * providers/imap/camel-imap-utils.c (imap_translate_sexp): New
13286 convenience function to translate a Camel sexp into the equivalent
13289 * providers/imap/camel-imap-store.c: More places now use
13292 * providers/imap/camel-imap-folder.c (imap_search_by_expression):
13293 Implemented initial version (this may or may not work quite right)
13295 2000-07-28 Jeffrey Stedfast <fejj@helixcode.com>
13297 * providers/imap/camel-imap-folder.c (imap_expunge): Make sure
13298 the third word/token (whatever) is "EXPUNGE" and not something
13299 else like "EXISTS" or "RECENT". When removing the message from
13300 the summary also make sure to free that data to avoid leakage.
13301 Also make sure to subtract 1 from the 'id' since IMAP starts
13302 at 1 and our summary starts at 0 :-)
13304 2000-07-28 Jeffrey Stedfast <fejj@helixcode.com>
13306 * providers/imap/camel-imap-store.c (camel_imap_status): Cleaned
13307 up a bit, now uses imap_next_word()
13308 (camel_imap_command_extended): Now uses imap_next_word(). When
13309 checking for RECENT, allow the first digit of the recent-count
13310 be between 0 and 9 inclusive instead of exclusive.
13312 * providers/imap/camel-imap-folder.c (imap_expunge): Optimized.
13313 No longer will it need to reload the summary as it now instead
13314 removes the appropriate message summaries from the cache.
13315 (camel_imap_folder_changed): If recent == 0 then return. If
13316 recent < 0 then just emit the folder_changed signal, don't reload
13319 2000-07-28 Jeffrey Stedfast <fejj@helixcode.com>
13321 * providers/imap/camel-imap-folder.c
13322 (imap_get_message_count_internal): Get message count when STATUS
13324 (imap_init): folder->has_search_capability is required for IMAP so
13325 should always be set to TRUE (is currently being set to FALSE as
13326 I've not yet implemented SEARCH support).
13327 (camel_imap_folder_changed): Seem to have fixed my optimization
13330 2000-07-28 Jon K Hellan <hellan@acm.org>
13332 * providers/imap/camel-imap-store.h (CamelImapServerLevel): New
13334 (CamelImapStore): Added server_level and has_status_capability
13337 * providers/imap/camel-imap-store.c (imap_connect): Detect
13338 IMAP4REV1, IMAP4 and STATUS in capability response.
13340 * providers/imap/camel-imap-folder.c
13341 (imap_get_message_count_internal): Use STATUS only if server
13342 supports it. TODO: Get message count when STATUS not supported.
13343 (imap_get_message, imap_get_summary_internal,
13344 imap_get_message_info_internal): Handle IMAP4 as well.
13345 (imap_protocol_get_summary_specifier): New function: Make a data
13346 item specifier for the header lines we need, appropriate to the
13349 2000-07-27 Peter Williams <peterw@helixcode.com>
13351 * camel-mime-utils.c (header_decode_lwsp): More
13352 checks for end of string.
13354 * providers/imap/camel-imap-store.c:
13355 (imap_command_extended): Free the elements of our
13356 array (huge mem leak)
13358 * providers/imap/camel-imap-folder.c:
13359 (summary_get_internal): Same as above.
13362 2000-07-27 Jeffrey Stedfast <fejj@helixcode.com>
13364 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
13365 Fixed my routine to only fetch new headers, my IDs were off by 1
13366 on the high end, so when it would fetch the last newly arrived
13367 message it would fail and end up fetching all of the summaries
13368 because of the corruption.
13370 2000-07-27 Jeffrey Stedfast <fejj@helixcode.com>
13372 * camel-url.c (camel_url_to_string): If the path doesn't begin
13373 with a / and there is a host, prepend a / to the path.
13375 2000-07-27 Jeffrey Stedfast <fejj@helixcode.com>
13377 * providers/imap/Makefile.am: Added camel-imap-utils.[c,h]
13379 * providers/imap/camel-imap-utils.[c,h]: Utilities for parsing
13380 server responses for use in both camel-imap-store.c and
13381 camel-imap-folder.c
13383 * providers/imap/camel-imap-folder.c (imap_get_summary_internal):
13384 Free all the pointers in the headers array.
13385 (imap_get_subfolder_names_internal): Updated to use
13386 imap_parse_list_response
13387 (imap_parse_subfolder_list): Removed in favor of
13388 imap_parse_list_response
13390 * providers/imap/camel-imap-store.c (camel_imap_command_extended):
13391 Free all the pointers in the data array.
13392 (imap_connect): Updated to use imap_parse_list_response and fixed
13394 (folder_is_selectable): Updated.
13396 2000-07-27 Jeffrey Stedfast <fejj@helixcode.com>
13398 * providers/imap/camel-imap-folder.c (imap_get_message_info): Now
13399 uses a hash table for looking up message info rather than a linear
13402 2000-07-27 Peter Williams <peterw@helixcode.com>
13404 * providers/*/Makefile.am: Don't specify SUBDIRS =
13405 [nothing]. Messes up distcheck.
13407 2000-07-26 Peter Williams <peterw@helixcode.com>
13409 * camel-mime-parser.c (folder_scan_init): Initialize
13410 outbuf to be "" -- it's not guaranteed to be zeroed.
13412 * camel-mime-utils.c (header_references_decode): Return
13413 if the header is NULL -> or "" <-. Don't do our stupid
13414 mailer trick if we point to \0.
13415 (header_decode_quoted_string): Don't rip past end of
13418 2000-07-26 Dan Winship <danw@helixcode.com>
13420 * camel-movemail.c (movemail_external): routine to call an
13421 external movemail program.
13422 (camel_movemail): Nuke return value, use movemail_external when
13423 available and useful, and don't delete "dest" on errors, since
13424 it might have started non-empty.
13426 2000-07-26 Jeffrey Stedfast <fejj@helixcode.com>
13428 * camel-url.c (camel_url_to_string): Should now always prepend a '/'
13429 before the path if it doesn't already exist.
13431 * providers/imap/camel-imap-folder.c: Fixed a few compiler warnings
13433 2000-07-25 Jeffrey Stedfast <fejj@helixcode.com>
13435 * providers/imap/camel-imap-folder.c (imap_summary_free): Fixed the
13436 real problem that Peter was running into.
13438 2000-07-25 Dan Winship <danw@helixcode.com>
13440 * camel-mime-message.c (write_to_stream): Don't add a Mime-Version
13441 header to a message that already has one.
13443 * camel-internet-address.c (internet_encode): Don't put <>s around
13444 addresses with no name part.
13446 2000-07-25 Peter Williams <peterw@helixcode.com>
13448 * providers/imap/camel-imap-folder.c (imap_expunge): Set
13449 imap_folder->summary to NULL after calling imap_summary_free,
13450 so we don't get stuck with a junk summary pointer. Should
13453 2000-07-25 Jeffrey Stedfast <fejj@helixcode.com>
13455 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
13456 Optimized to try and get the new message headers without reloading
13457 the entire summary from scratch.
13458 (imap_get_summary_internal): Will now sync() before attempting to
13459 reload the summary so that flags are set in the reloaded summary
13462 2000-07-24 Jeffrey Stedfast <fejj@helixcode.com>
13464 * providers/imap/camel-imap-store.c (get_folder): Updated to give
13465 special attention to the root folder.
13467 * providers/imap/camel-imap-folder.c
13468 (imap_get_subfolder_names_internal): Updated to handle the root
13470 (imap_get_message_count_internal): return 0 if folder can't hold
13472 (camel_imap_folder_new): Change so that root folder gets special
13473 attention and always gets can_hold_messages set to FALSE
13475 2000-07-24 Dan Winship <danw@helixcode.com>
13477 * camel-folder.c: Remove exceptions from a number of methods that
13478 work on what ought to be static data: get_parent_folder,
13479 get_parent_store, get_message_count, get_unread_message_count,
13480 get_permanent_flags, get_message_flags, set_message_flags,
13481 get_message_user_flag, set_message_user_flag, get_uids,
13482 get_summary, get_subfolder_names. Turn camel_folder_delete_message
13483 into a macro. (Mostly a pull-up from the camel-async branch.)
13485 * providers/{imap,mbox,nntp,pop3,vee}: Update for CamelFolder
13488 2000-07-24 Jeffrey Stedfast <fejj@helixcode.com>
13490 * providers/imap/camel-imap-folder.c (imap_get_message_info): Updated
13491 to port easily to the new Camel API
13492 (imap_init): Don't SELECT INBOX, we don't need to do that
13494 2000-07-24 Jeffrey Stedfast <fejj@helixcode.com>
13496 * providers/imap/camel-imap-folder.c (camel_imap_folder_new):
13497 Initialize the summary and subfolder listing.
13498 (imap_summary_free): Now takes a GPtrArray arg rather than a
13499 CamelImapFolder as it increases it's usefullness for free()'ing
13500 temporary summaries.
13501 (imap_get_message_count_internal): A new convenience function for
13502 getting the actual message count on a server to be used by
13503 imap_get_summary_internal)
13504 (imap_get_message_count): Since the Camel API is on the move again,
13505 the future version of this function will not be able to make a
13506 call to the store, it must only access previously fetched data (thus
13507 the creation of the _internal function)
13508 (imap_get_subfolder_names_internal): Again, because the future version
13509 of imap_get_subfolder_names will not take an exception, we must rename
13510 this function which will be called by camel_imap_folder_new()
13511 (imap_get_subfolder_names): We now return the previously collected
13512 subfolder listing that the _internal function fetched previously
13513 (imap_get_summary_internal): Again, same idea as the previous _internal
13515 (imap_get_summary): Again... now returns a previously aquired summary
13517 * providers/imap/camel-imap-store.c (imap_noop): This will hopefully
13518 prevent the imap store from disconnecting.
13519 (imap_connect): Modified to add a gtk timeout event that will call
13520 imap_noop() every 10 minutes (we may want to change this time value)
13521 (imap_disconnect): Modified to remove the NOOP timeout event from the
13523 (camel_imap_command_extended): Commented out the code that would try
13524 and detect if the store was disconnected and then reconnect if it was
13527 2000-07-24 Dan Winship <danw@helixcode.com>
13529 * camel-folder.[ch]: Remove camel_folder_get_message_uid, which
13530 was not used, and not implemented by any provider.
13532 * providers/nntp/camel-nntp-folder.c: Remove get_message_uid
13533 non-implementation.
13535 * camel-folder-pt-proxy.[ch], camel-arg-collector.c,
13536 camel-marshal-utils.[ch]: Bye bye bye.
13538 * Makefile.am: remove reference to camel-arg-collector.c
13540 2000-07-23 Jeffrey Stedfast <fejj@helixcode.com>
13542 * providers/imap/camel-imap-store.c (imap_disconnect): Made it a
13543 little more forgiving. Also set current_folder to NULL as there is
13544 no selected folder after a disconnect.
13545 (stream_is_alive): Detects whether or not a socket is "alive"
13546 (camel_imap_command_extended): Use stream_is_alive() to aid in the
13547 detection of a disconnected state.
13549 2000-07-22 Jeffrey Stedfast <fejj@helixcode.com>
13551 * providers/imap/camel-imap-store.c (get_folder): Clear
13552 CamelExceptions when appropriate (eg when folder is marked as
13553 \NoSelect). Still needs some cleanup and perhaps Dan will have a
13554 better way of doing this as this seems like a messy way of
13557 * providers/imap/camel-imap-folder.c (imap_get_uids): Took out
13558 some debug statements as they are no longer needed.
13560 2000-07-21 Jeffrey Stedfast <fejj@helixcode.com>
13562 * providers/imap/camel-imap-folder.c (imap_get_subfolder_names):
13563 Updated to not strip out subfolders that are marked as \NoSelect
13564 because this will be correctly handled in store->get_folder from
13567 * providers/imap/camel-imap-store.c (folder_is_selectable): New
13568 convenience function for use in get_folder().
13569 (parse_list_response): Now takes a char **flags argument which is
13570 needed by folder_is_selectable().
13571 (imap_connect): Updated to reflect changes to
13572 parse_list_response().
13574 2000-07-21 Jeffrey Stedfast <fejj@helixcode.com>
13576 * providers/imap/camel-imap-stream.c (stream_read): Updated with
13577 some of the same fixes I've made to camel-imap-folder.c like
13578 recalculating message part lengths.
13580 * providers/imap/camel-imap-store.c (camel_imap_command_extended):
13581 Rewrote the code to check for "* %d RECENT". Still needs to be
13582 modified, but should no longer cause an infinite loop by detecting
13583 mis-detecting RECENT messages.
13585 2000-07-20 Jeffrey Stedfast <fejj@helixcode.com>
13587 * providers/imap/camel-imap-folder.c (imap_get_summary):
13588 (imap_get_message_info): Oops. Fix UID parser to allow 0 and 9 to
13589 be in the range of valid UID chars.
13591 2000-07-20 Peter Williams <peterw@helixcode.com>
13593 * camel-object.c (camel_object_unref): Add a new global mutex
13594 'refcount' held when refcounting operations occur.
13596 2000-07-19 Peter Williams <peterw@helixcode.com>
13598 * camel-object.c (camel_type_lock_up): Correct the recursiveness;
13599 the locklevel is stored as a private, so each thread has its own
13600 idea of the locklevel. Thus one thread can relock, but a different
13601 one will think that it's a level 0 and try to lock the type_system
13604 2000-07-19 Jeffrey Stedfast <fejj@helixcode.com>
13606 * providers/imap/camel-imap-folder.c: General cleanup working
13607 towards getting Actions->Expunge working correctly.
13609 * providers/imap/camel-imap-store.c
13610 (cammel_imap_command_extended): Added code to look for "* %d
13611 RECENT" and to emit the folder_changed signal if there are any
13612 recent messages. Note: this is a hack and needs to be rewritten
13615 2000-07-19 Jeffrey Stedfast <fejj@helixcode.com>
13617 * providers/imap/camel-imap-folder.c (imap_get_summary): If the
13618 folder's message count is not the same as the number of summaries,
13619 free the old summary and create a new summary.
13621 2000-07-18 Jeffrey Stedfast <fejj@helixcode.com>
13623 * providers/imap/camel-imap-folder.c
13624 (camel_imap_folder_class_init): Added in
13625 imap_[g,s]et_message_user_flag() methods
13626 (imap_get_message_info): Rewrote to use the more efficient way of
13627 downloading summary information and also added a UID comparison so
13628 that if the UID requested doesn't match the UID received, it
13629 returns NULL. FIXME: When the mailer gets NULL when it requested
13630 message info, it seems that it displays a row for that message and
13631 when you try and select the blank row, it segfaults.
13633 * providers/imap/camel-imap-store.c (get_folder): Oops, this
13634 should not be checking against "/", it should be checking against
13637 * providers/imap/camel-imap-folder.c (imap_parse_subfolder_line):
13638 Updated to trim out the leading namespace.
13639 (imap_get_subfolder_names): Let the subfolder parser trim the
13640 namespace off the folder name.
13642 2000-07-17 Peter Williams <peterw@helixcode.com>
13644 * camel-object.c (camel_type_lock_up): New function; the
13645 Camel type_system lock is now fakey-recursive, being controlled
13646 by a semaphore that goes up and down and is protected by another
13647 lock. Theoretically all we need is the lock on the semaphore,
13648 but this we catch exceptions "better" (by deadlocking).
13649 (camel_type_lock_down): Corresponding to above.
13650 (all functions): s,G_LOCK,camel_type_lock_up, etc.
13652 2000-07-17 Jeffrey Stedfast <fejj@helixcode.com>
13654 * providers/imap/camel-imap-store.c (imap_disconnect): Send a
13657 * providers/imap/camel-imap-folder.c (imap_get_message): Hacks to
13658 get IMAP code to work with CommunigatePro and MS Exchange (and any
13659 other servers that send back a UID at the end of each FETCH inside
13660 of the main body of the message part).
13661 (imap_sync): Un-#if 0 the code that sets the flags on the IMAP
13662 server for messages that have changed. Oops, don't mask with
13663 DELETED to find out if the message has been answered ;-)
13664 (imap_expunge): sync before expunging.
13666 2000-07-16 Jeffrey Stedfast <fejj@helixcode.com>
13668 * providers/imap/camel-imap-store.c: All SELECT calls now pass
13669 a NULL folder argument to camel_imap_command_extended() since it's
13671 (imap_connect): Moved service_class->connect() to the point right
13672 after a connection is established with the server rather than
13673 waiting until the end of the function.
13674 (camel_imap_command): Updated the documentation comment
13675 (camel_imap_command_extended): Before sending a command, first
13676 check to make sure we are connected; if we aren't, then reconnect.
13677 Don't strncmp() command with "SELECT" as it's redundant.
13679 * providers/imap/camel-imap-folder.c: All SELECT calls now pass
13680 a NULL folder argument to camel_imap_command_extended() since it's
13681 not needed. Also s/camel_imap_command/camel_imap_command_extended as
13682 I will probably be doing away with camel_imap_command() or at least
13683 only using it for LOGIN and similar commands where the server won't
13684 notify us of any recent messages.
13686 2000-07-15 Jeffrey Stedfast <fejj@helixcode.com>
13688 * providers/imap/camel-imap-folder.c (camel_imap_folder_new):
13689 One last fix to get rid of hard-coded "/" directory separators
13691 2000-07-14 Peter Williams <peterw@helixcode.com>
13693 * camel-object.c : Implement 'events', which are suspiciously
13694 like signals except without all the marshalling baggage, and
13695 with quasi-thread-safety.
13696 (camel_object_class_declare_event): New func.
13697 (camel_object_hook_event): Ditto.
13698 (camel_object_trigger_event): Ditto.
13699 (obj_class_init): Declare the "finalize" event.
13700 (obj_class_finalize): Free the hashtable of events->preps
13701 (obj_finalize): Free the hashtable of events->hooklists
13702 (camel_object_unref): Trigger the finalize event (ourselves,
13703 to prevent massively unpleasant looping things.)
13705 2000-07-14 Peter Williams <peterw@helixcode.com>
13707 * camel-object.c (make_global_classfuncs): Change to return
13708 a CamelObjectClass. Change parents to a GSList and free it
13710 (camel_object_new): Don't allocate a classfuncs for every object;
13711 merely give it a reference to the global_classfuncs. Convert
13712 parents to a GSList and free it when done.
13713 (camel_object_unref): Don't free the classfuncs. Free the parents
13714 list, which is changed to a GSList.
13716 2000-07-14 Jeffrey Stedfast <fejj@helixcode.com>
13718 * string-utils.c (string_unquote): New convenience function
13719 to unquote a string if it's encapsulated by "'s
13721 * providers/imap/camel-imap-folder.c:
13722 * providers/imap/camel-imap-store.c: Made the necessary changes
13723 to stop using hard coded directory separators.
13725 2000-07-13 Dan Winship <danw@helixcode.com>
13727 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_load):
13728 If the summary is for a smaller mbox, and rebuilding from the
13729 last-known end position fails, try rebuilding from the beginning.
13730 Deals with the case where the user edits the mbox and makes it
13731 bigger, without adding new messages.
13733 2000-07-13 Peter Williams <peterw@helixcode.com>
13735 * camel-object.c: Rewritten to not be based on GtkObject,
13736 but a tiny threadsafe ripoff thereof. Objects still cannot
13737 be shared across threads, but ref/unref/destroy/new/etc
13738 will work. Signals are not implemented because doing it
13739 robustly would be a major pain in the butt, but class
13740 functions are. There's a small demonstration that it doesn't
13741 crash in ./temp-test.c: build it with ./make-test.sh.
13742 * camel-stream.c, camel-seekable-stream.c, camel-stream-mem.c:
13743 moved over to CamelObject. Proof of concept: two levels of
13744 subclass and class functions, all working without coredumps.
13745 To port to CamelObject:
13746 - s,GTK_,CAMEL_,g in the cast checks
13747 - s,gtk_type_new,camel_object_new,g
13748 - s,GtkType,CamelType,g
13749 - Change get_type function over to camel_type_declare
13750 - instead of hooking to finalize function, it goes into the
13753 - instead of GTK_OBJECT(so)->klass, CAMEL_OBJECT_GET_CLASS(so)
13754 - s,gtk_type_class,camel_type_get_global_classfuncs,g
13755 - don't chain finalize handlers; it will be done for you
13757 2000-07-13 Jeffrey Stedfast <fejj@helixcode.com>
13759 * providers/imap/camel-imap-folder.c:
13760 * providers/imap/camel-imap-store.c: If a SELECT fails, set
13761 imap_store->current_folder to NULL so a SELECT is forced before
13762 any message/folder operations are requested. Also, because some
13763 users don't use a namespace, make sure that if the url->path is
13764 "/" we don't use it when creating the folder_path.
13765 (camel_imap_command[_extended]): Since we allow the passing of
13766 a NULL folder which we can use to bypass a forced SELECT, no need
13767 to check for the individual commands that don't require a folder
13770 2000-07-13 Jeffrey Stedfast <fejj@helixcode.com>
13772 * providers/imap/camel-imap-folder.c:
13773 * providers/imap/camel-imap-store.c: Updated to use CAMEL_IMAP_OK,
13774 CAMEL_IMAP_NO, CAMEL_IMAP_BAD, and CAMEL_IMAP_FAIL rather than the
13775 ones copied from the POP3 provider.
13777 2000-07-13 Jeffrey Stedfast <fejj@helixcode.com>
13779 * providers/imap/camel-imap-folder.c (imap_get_summary): Oops.
13780 If the number of messages in the folder is 0, don't fetch
13781 summaries 1 thru 0, just return an empty summary.
13782 (imap_copy_message_to): Fixed to use message UID and also send
13783 the source folder as an arg to camel_imap_command rather than NULL.
13784 (imap_move_message_to): Same.
13785 (imap_init): If SELECT is successful, we need to set the current
13786 folder to the one selected, this was causing problems with move/copy
13788 2000-07-13 Dan Winship <danw@helixcode.com>
13790 * camel-service.h: define a set of CAMEL_SERVICE_URL_ALLOW_* flags
13791 parallel to the _NEED_* flags, and make the _NEED_* flags imply
13794 * providers/imap/camel-imap-store.c (camel_imap_store_init): imap
13797 2000-07-13 Jeffrey Stedfast <fejj@helixcode.com>
13799 * providers/imap/camel-imap-folder.c (imap_get_summary): New
13800 and improved approach to fetching an entire folder summary
13801 that should be much much faster than the old way as it gets
13802 the entire folder summary in 1 shot rather than requesting
13803 message by message. As with the last update, this version
13804 also only fetches the minimum number of header fields.
13805 (imap_get_summary): Oops, forgot to free the temp
13808 2000-07-13 Jeffrey Stedfast <fejj@helixcode.com>
13810 * providers/imap/camel-imap-folder.c (imap_get_summary): Don't
13811 fetch the entire RFC822 header, just fetch the fields we want.
13812 (imap_get_message_info): Same.
13814 2000-07-13 Not Zed <NotZed@HelixCode.com>
13816 * camel-mime-filter-basic.c (camel_mime_filter_basic_new_type):
13817 Reset filter on setup.
13818 (reset): When resetting qp encoding, set the state to -1, instead
13821 * camel-mime-utils.c (quoted_encode_step): Actually count the
13822 characters output sofar (it never counted any). Bunch of other
13824 (quoted_encode_close): Also flush out final character, if there's
13827 2000-07-12 Jeffrey Stedfast <fejj@helixcode.com>
13829 Chris forgot to add #include <e-util/e-util.h> to the source files
13831 * providers/imap/camel-imap-store.c (imap_connect): Fixed Peter's
13832 fix, we don't want to send a string to a %d.
13834 2000-07-12 Christopher James Lahey <clahey@helixcode.com>
13836 * camel-folder-search.c, providers/imap/camel-imap-store.c:
13837 Changed from strstrcase to e_strstrcase.
13839 * string-utils.c, string-utils.h: Removed strstrcase (in favor of
13840 e_strstrcase in e-util/e-util.c.)
13842 2000-07-12 Chris Toshok <toshok@helixcode.com>
13844 * providers/nntp/camel-nntp-folder.c
13845 (nntp_folder_set_message_flags): get the article num out of our
13846 uid and mark it read in the newsrc.
13847 (nntp_folder_get_message): get the message id out of the uid to
13850 * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): the uid
13851 is now <article-num>,<messageid>
13852 (get_HEAD_headers): same.
13854 * camel-mime-parser.c (folder_scan_step): go to HSCAN_MESSAGE
13855 state when ct->subtype is "news" as well as "rfc822". this makes
13856 attachments of type "message/news" display properly.
13858 2000-07-12 Dan Winship <danw@helixcode.com>
13860 * camel-folder.c (camel_folder_free_deep,
13861 camel_folder_free_shallow, camel_folder_free_nop): Useful default
13862 implementations for free_{uids,subfolder_names,summary}.
13863 (free_subfolder_names, free_uids): Make these g_warning-ing
13864 default implementations.
13866 * providers/*/camel-*-folder.c: Use the new functions where
13867 appropriate, remove duplicated code.
13869 2000-07-12 Peter Williams <peterw@helixcode.com>
13871 * providers/imap/camel-imap-store.c (query_auth_types): Check for
13872 NULL parameters when setting the exception so as to not crash on
13873 Solaris (can't handle a %s passed NULL).
13874 (imap_connect): Same.
13876 2000-07-12 Jeffrey Stedfast <fejj@helixcode.com>
13878 * providers/mbox/camel-mbox-folder.c (mbox_delete_message): Use
13879 mbox_set_message_flags () instead of setting the flags by hand. This
13880 fixes the problem of the "message_changed" signal not being emitted
13881 at the correct time.
13883 * providers/imap/camel-imap-folder.c: "folder_changed" signals should
13884 pass a third argument (which is ignored).
13886 * camel-folder.c: Undo gtk signal emits done in set_flags and
13889 (copy_message_to): Create info as a const CamelMessageInfo
13891 2000-07-12 Chris Toshok <toshok@helixcode.com>
13893 * providers/nntp/Makefile.am: don't add test-newsrc to the build
13894 since it needs libcamel (which isn't built at the time test-newsrc
13897 * providers/nntp/camel-nntp-utils.c (get_HEAD_headers): fill in
13898 MessageInfo->message_id.
13899 (get_XOVER_headers): same.
13901 * providers/nntp/camel-nntp-folder.c (nntp_folder_init): move
13902 summary loading here.
13903 (nntp_folder_sync): summary/newsrc changes should be stored here.
13904 put a comment to that effect.
13905 (nntp_folder_set_message_flags): don't save the newsrc here.
13906 (nntp_folder_get_uids): use g_ptr_array_index instead of the
13908 (nntp_folder_get_summary): no need to check if we should generate
13909 the summary here. already done.
13910 (nntp_folder_get_message_info): implement.
13912 * providers/nntp/camel-nntp-store.c
13913 (camel_nntp_store_get_toplevel_dir): use evolution_dir instead of
13914 computing it ourselves.
13915 (nntp_store_disconnect): call camel_nntp_newsrc_write.
13916 (ensure_news_dir_exists): new function to create the news/<news
13918 (camel_nntp_store_class_init): hook up connect/disconnect and
13920 (nntp_store_connect): if ensure_news_dir_exists fails throw an
13923 2000-07-12 Peter Williams <peterw@helixcode.com>
13925 * camel-folder.c (camel_folder_set_message_flags): Emit a message_changed
13926 signal once the flags are set on the message.
13927 (camel_folder_set_user_flag): Ditto.
13928 (camel_folder_expunge): Emit a folder_changed if no exception.
13930 2000-07-12 Jeffrey Stedfast <fejj@helixcode.com>
13932 * camel-stream.c: Use size_t and ssize_t for read/write methods
13934 * providers/imap/camel-imap-folder.c (imap_set_message_flags):
13935 Updated to emit the message_changed signal.
13936 (imap_delete_message): Updated to use imap_set_message_flags ().
13937 (imap_move_message_to): Updated to use imap_set_message_flags ()
13938 and to emit the folder_changed signal on the destination folder.
13939 (imap_copy_message_to): Updated to emit the folder_changed signal
13940 on the destination folder.
13941 (imap_append_message): Updated to emit the folder_changed signal
13942 on the destination folder.
13944 2000-07-11 Jeffrey Stedfast <fejj@helixcode.com>
13946 * camel-folder.c (camel_folder_append_message): Now takes a
13947 flags argument to specify the flags to be set on the message
13948 since we might not necessarily want the flags to be wiped clean.
13950 (copy_message_to): Updated to send a flags argument to
13951 append_message (); currently sends the original message's flags.
13953 * providers/mbox/camel-mbox-folder.c (mbox_append_message):
13954 * providers/imap/camel-imap-folder.c (imap_append_message):
13957 2000-07-11 Dan Winship <danw@helixcode.com>
13959 * camel-folder.c: Remove exceptions from a number of methods
13960 that work on what ought to be static data: get_parent_folder,
13961 get_parent_store, get_message_count, get_unread_message_count,
13962 get_permanent_flags, get_message_flags, set_message_flags,
13963 get_message_user_flag, set_message_user_flag, get_message_uid,
13964 get_uids, get_summary, get_subfolder_names. Turn
13965 camel_folder_delete_message into a macro.
13967 * providers/{mbox,pop3,vee}: Update for CamelFolder changes
13969 * providers/Makefile.am: Disable imap and nntp for now
13971 2000-07-11 Jeffrey Stedfast <fejj@helixcode.com>
13973 * providers/imap/camel-imap-folder.c (imap_search_by_expression):
13974 This shouldn't return NULL, it should return g_ptr_array_new ()
13975 so the mailer gets what it expects.
13977 2000-07-10 Jeffrey Stedfast <fejj@helixcode.com>
13979 * camel-folder-summary.c (camel_folder_summary_decode_string):
13980 Oops, an unsigned integer can never be < 0
13982 2000-07-10 Dan Winship <danw@helixcode.com>
13984 * providers/vee/camel-vee-folder.c (vee_search_by_expression):
13985 Initialize a variable to make this not crash again. And fix a bug
13986 so it actually does something.
13988 2000-07-10 Jeffrey Stedfast <fejj@helixcode.com>
13990 * camel-folder-summary.c: Cleaned up a bunch of compile warnings
13992 2000-07-10 Dan Winship <danw@helixcode.com>
13994 * providers/vee: kill more debugging messages
13996 2000-07-10 Jeffrey Stedfast <fejj@helixcode.com>
13998 * providers/mbox/camel-mbox-folder.c (mbox_get_unread_message_count):
13999 * providers/vee/camel-vee-folder.c (vee_get_unread_message_count):
14000 * providers/imap/camel-imap-folder.c (imap_get_unread_message_count):
14003 * camel-folder.c (camel_folder_get_unread_message_count): New
14004 convenience function to allow the mailer to query the number
14005 of unread messages in a folder (for displaying message stats
14006 in a folder tree?).
14008 2000-07-09 Dan Winship <danw@helixcode.com>
14010 * camel-mime-utils.c (header_references_dup): New function to copy
14011 a header_references structure.
14013 * camel-folder-summary.c (camel_message_info_dup_to): New function
14014 to (deep) copy the data from one CamelMessageInfo into another.
14015 (camel_message_info_free): And free the data.
14017 * providers/vee/camel-vee-folder.c (vee_sync): Implement. (empty).
14018 (vee_search_by_expression): belatedly update for
14019 camel_folder_search change.
14020 (vee_folder_build): belatedly update for camel_folder_search
14021 change. Use camel_message_info_dup_to and camel_message_info_free
14022 (in particular, so that we get message_id and references info so
14023 vfolders can be threaded).
14024 (vee_folder_build_folder): Ditto.
14026 2000-07-08 Jeffrey Stedfast <fejj@helixcode.com>
14028 * providers/nntp/camel-nntp-folder.c:
14029 * providers/nntp/camel-nntp-utils.c:
14030 * providers/nntp/camel-nntp-store.c: Update to reflect past changes
14031 in the Camel API. Use gtk macro casts wherever possible and use glib's
14032 memory functions instead of standard c's (since they are not
14035 * providers/smtp/camel-smtp-transport.c:
14036 * providers/imap/camel-imap-store.c: Wrap debug print statements
14039 * providers/imap/camel-imap-stream.c (stream_read): Make sure
14040 that we get up to and including the last \n of the mime part.
14042 * providers/imap/camel-imap-folder.c (imap_get_message): Make sure
14043 that we get up to and including the last \n of the mime part.
14044 Wrap debug print statements in a macro.
14046 * providers/imap/camel-imap-stream.c (stream_read): Only cache
14047 the important data (aka the mime part requested and no extra
14048 server response stuff)
14050 2000-07-07 Dan Winship <danw@helixcode.com>
14052 * camel-mime-utils.c (header_references_decode): Work around
14053 In-Reply-To's with unquoted punctuation. So many broken mailers.
14055 * camel-folder.c (camel_folder_search_by_expression): Make this
14056 return a GPtrArray rather than a GList.
14058 * camel-folder-search.c (camel_folder_search_execute_expression):
14059 * providers/imap/camel-imap-folder.c (imap_search_by_expression):
14060 * providers/mbox/camel-mbox-folder.c (mbox_search_by_expression):
14061 * providers/nntp/camel-nntp-folder.c (nntp_search_by_expression):
14062 Update to return a GPtrArray rather than a GList.
14064 2000-07-07 Jeffrey Stedfast <fejj@helixcode.com>
14066 * providers/smtp/camel-smtp-transport.c (esmtp_get_authtypes):
14067 Fixed the parser to actually work
14069 2000-07-06 Dan Winship <danw@helixcode.com>
14071 * camel-mime-utils.c (header_references_decode): Make this deal
14072 with the full RFC822 References/In-Reply-To format rather than
14073 just the more-nicely-behaved RFC1036 version. (Needed to parse
14074 In-Reply-To headers with extra junk in them.)
14076 2000-07-06 Jeffrey Stedfast <fejj@helixcode.com>
14078 * providers/imap/camel-imap-folder.c (imap_get_summary): Parse for
14079 more header information to allow message threading in IMAP.
14080 (imap_get_message_info): Same.
14082 * camel-folder-summary.c: Renamed summary_format_* to
14083 camel_summary_format_* and moved them into public scope.
14085 * providers/smtp/camel-smtp-transport.c (smtp_connect): Oops. Don't
14086 pass port # as a string in the error code (if it fails to connect).
14088 * providers/imap/camel-imap-folder.c (imap_append_message): Changed
14089 over to camel_imap_command_extended as that was the source of the
14090 problems - apparently appending replies with more than just 1 line.
14092 2000-07-05 Dan Winship <danw@helixcode.com>
14094 * camel-folder-search.c (search_header_contains): make header
14095 matching case-insensitive
14097 * camel-folder-summary.c:
14099 * providers/mbox/camel-mbox-folder.c:
14100 * providers/mbox/camel-mbox-summary.c: Remove some non-error case
14101 debugging-type messages.
14103 2000-07-05 Ettore Perazzoli <ettore@helixcode.com>
14105 * providers/mbox/camel-mbox-summary.c (d): Define to empty so that
14106 we get rid of a ton of debugging messages.
14108 2000-07-05 Jeffrey Stedfast <fejj@helixcode.com>
14110 * camel-mime-utils.h: Added prototype for uudecode_step
14112 * camel-mime-utils.c (uudecode_step): Cleaned up some junk that
14113 should have been cleaned up when debugging printf's were taken out.
14115 2000-07-05 Ettore Perazzoli <ettore@helixcode.com>
14117 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
14118 Update the X-Evolution: header even if the in-memory UID and the
14119 saved UID are not the same. Otherwise mboxes with clashing UIDs
14120 can never be fixed.
14122 * camel-folder-summary.c
14123 (camel_folder_summary_add_from_parser): Add the message to the
14124 summary before doing any ibex stuff. In fact, this might also
14125 have the side effect of reassigning the UID so it needs to be done
14126 before we start using the UID.
14128 * providers/mbox/camel-mbox-folder.c (mbox_append_message): Add
14129 debugging message to keep track of the UIDs we add.
14131 2000-07-05 Dan Winship <danw@helixcode.com>
14133 * camel-folder-summary.c: Add "Cc" to summary and bump summary
14136 * camel-folder-search.c (search_header_contains): make "Cc" a
14139 2000-07-03 Ettore Perazzoli <ettore@helixcode.com>
14141 * camel-folder-summary.c (camel_folder_summary_next_uid_string):
14143 (camel_folder_summary_add): Use
14144 `camel_folder_summary_next_uid_string()' instead of recomputing
14145 the UID manually here.
14146 (camel_folder_summary_add_from_parser): Likewise.
14148 2000-07-03 Ettore Perazzoli <ettore@helixcode.com>
14150 * camel-folder-summary.c (camel_folder_summary_set_uid): Removed.
14152 2000-07-03 Dan Winship <danw@helixcode.com>
14154 * camel-folder-summary.c (message_info_new): Parse In-Reply-To
14155 with header_references_decode, not header_msgid_decode.
14157 * camel-mime-message.c (camel_mime_message_class_init): message
14158 headers are case-insensitive.
14160 * providers/pop3/camel-pop3-store.c (camel_pop3_command): Fix a
14161 bug in error-setting code.
14162 (pop3_connect): Don't re-prompt for password in the KPOP case.
14163 (pop3_get_response): New function, split out from
14164 camel_pop3_command.
14165 (connect_to_server): Use pop3_get_response to parse the greeting
14166 message, and error out appropriately if it's -ERR.
14168 2000-07-02 Dan Winship <danw@helixcode.com>
14170 * camel-folder.c (camel_folder_freeze, camel_folder_thaw): New
14171 functions to freeze and thaw a folder (to prevent message/folder
14172 changed signals in the middle of a long series of operations).
14173 (camel_folder_class_init): Change signals to GTK_RUN_FIRST.
14174 (message_changed, folder_changed): Add default implementations
14175 that stop the emission and record info for later if the folder is
14178 * providers/mbox/camel-mbox-folder.c (mbox_sync): leftover fixes
14179 from the close->sync change: don't destroy the ibex, summary, and
14180 search when syncing.
14181 (append_message): emit "folder_changed" on a successful append.
14183 2000-07-02 Jeffrey Stedfast <fejj@helixcode.com>
14185 * camel-mime-utils.c (uudecode_step): A rather complex uudecoder
14186 written in the spirit of Zucchi-ness, is it up to par? Only the
14187 Z-man can tell us :-)
14189 2000-07-01 Dan Winship <danw@helixcode.com>
14191 * camel-service.c (camel_service_get_name): New method, to return
14192 an end-user-friendly name corresponding to a service. (eg, "POP
14193 service for danw on trna.helixcode.com").
14195 * providers/imap/camel-imap-store.c,
14196 providers/mbox/camel-mbox-store.c,
14197 providers/nntp/camel-nntp-store.c,
14198 providers/pop3/camel-pop3-store.c,
14199 providers/sendmail/camel-sendmail-transport.c,
14200 providers/smtp/camel-smtp-transport.c: Implement.
14202 * providers/imap/Makefile.am: remove unneeded
14203 libcamelimap_la_LDADD.
14205 * providers/pop3/camel-pop3-store.c (connect_to_server): fix the
14206 CAPA-parsing code to not get into an infinite loop.
14208 2000-07-01 Jeffrey Stedfast <fejj@helixcode.com>
14210 * providers/imap/camel-imap-folder.c (imap_get_message): Fixed
14211 the bug that would sometimes leave part of the server response
14212 tacked on to the end of the message.
14214 * camel-folder.c: Renamed _by_uid methods. Since we no longer
14215 have get-by-number methods, no need to have the _by_uid
14217 (get_message_by_uid): Renamed to get_message
14218 (delete_message_by_uid): Renamed to delete_message
14219 (summary_get_by_uid): Renamed to get_message_info
14221 * providers/mbox/camel-mbox-folder.c:
14222 * providers/pop3/camel-pop3-folder.c:
14223 * providers/imap/camel-imap-folder.c:
14224 * providers/vee/camel-vee-folder.c: Updated to reflect
14225 camel-folder changes.
14227 2000-06-30 Jeffrey Stedfast <fejj@helixcode.com>
14229 * camel-folder.c (camel_folder_copy_message_to): New function, to
14230 copy a message from one folder to another. The default
14231 implementation just uses append_message, but providers can
14232 implement more efficient versions for use when both folders are on
14235 * broken-date-parser.[c,h]: Utilities for parsing broken
14238 * providers/imap/camel-imap-folder.c (imap_move_message_to):
14239 (imap_copy_message_to): Implemented.
14241 * camel-mime-utils.c (header_decode_date): Wrote some code to try
14242 and un-mangle broken date formats and then parse that new string
14245 2000-06-30 Dan Winship <danw@helixcode.com>
14247 * camel-folder.c (camel_folder_move_message_to): New function, to
14248 move a message from one folder to another. The default
14249 implementation just uses append_message and delete_message, but
14250 providers can implement more efficient versions for use when both
14251 folders are on the same store.
14253 2000-06-29 Jeffrey Stedfast <fejj@helixcode.com>
14255 * providers/imap/camel-imap-folder.c (imap_expunge): Should now
14256 print a meaningful error message when it doesn't succeed
14258 2000-06-28 Jeffrey Stedfast <fejj@helixcode.com>
14260 * providers/imap/camel-imap-store.c (imap_connect): Changed to
14261 keep prompting user for a valid password until it either
14262 authenticates or until Canceled by the user.
14263 (camel_imap_command_extended): Improved speed (replaced the
14264 g_strjoinv call with a faster implementation)
14266 * providers/pop3/camel-pop3-store.c
14267 (camel_pop3_command_get_additional_data): Fixed.
14268 (pop3_connect): Changed to keep prompting the user for a
14269 password until it either works or until Canceled by the user.
14271 * providers/mbox/camel-mbox-summary.c: General cleanup
14272 (camel_mbox_summary_sync): Fixed a memory leak and added
14273 CamelException handling.
14275 * providers/mbox/camel-mbox-store.c (delete_folder): Fixed a
14278 * providers/mbox/camel-mbox-folder.c (mbox_append_message):
14279 Default 'off_t seek' to -1 so as to make sure it's initialized
14280 before it's used in the case of a bad stat() call.
14281 (mbox_sync): Updated
14282 (mbox_expunge): Updated
14284 2000-06-27 Jeffrey Stedfast <fejj@helixcode.com>
14286 * providers/imap/camel-imap-store.c (imap_connect): Move the
14287 CAPABILITY command here so we don't have to keep checking
14288 each time we open a folder.
14289 (camel_imap_command_extended): If we are doing an EXAMINE,
14290 don't bother doing a SELECT first.
14292 * providers/imap/camel-imap-folder.c (imap_init): Update so
14293 folder->has_search_capability depends on the parent IMAP store
14294 (since this is really dependant on the IMAP implementation and
14297 2000-06-27 Christopher James Lahey <clahey@helixcode.com>
14299 * providers/smtp/camel-smtp-transport.c: Don't close the filter
14300 stream when done with it (this causes the source stream to close);
14301 Instead, just flush it when done.
14303 2000-06-27 Michael Zucchi <zucchi@zedzone.mmc.com.au>
14305 * camel-folder-search.c (search_header_contains): Make header
14306 search 'to' match 'to', and not 'from', small typo, fixes #317.
14308 2000-06-26 Christopher James Lahey <clahey@helixcode.com>
14310 * providers/mbox/camel-mbox-summary.c: Added debugging
14313 2000-06-23 Jeffrey Stedfast <fejj@helixcode.com>
14315 * providers/imap/camel-imap-store.c:
14316 * providers/imap/camel-imap-folder.c: Improved folder parsing.
14317 Not specifying a namespace should no longer list the entire
14320 2000-06-22 Chris Toshok <toshok@helixcode.com>
14322 * providers/nntp/.cvsignore: ignore test-newsrc
14324 * providers/nntp/camel-nntp-store.c,
14325 providers/nntp/camel-nntp-store.h,
14326 providers/nntp/camel-nntp-folder.c,
14327 providers/nntp/camel-nntp-folder.h,
14328 providers/nntp/camel-nntp-utils.c: Bring the nntp provider up to a
14329 state where it builds and is usable with the current camel. there
14330 are still warts (semi-broken .newsrc file handling, and a lack of
14331 a subscribe ui -- in fact no way to add a new server, really), but
14332 it'll display news messages.
14334 * providers/nntp/Makefile.am (libcamelnntp_la_SOURCES): add
14335 camel-nntp-newsrc.c
14336 (libcamelnntpinclude_HEADERS): add camel-nntp-newsrc.h
14337 also, add test-newsrc stuff.
14339 * providers/nntp/test-newsrc.c: new file that tests the newsrc
14340 stuff by parsing and regurgitating a .newsrc file for a particular
14343 * providers/nntp/camel-nntp-newsrc.c,
14344 providers/nntp/camel-nntp-newsrc.h: new files, initial support for .newsrc files.
14346 2000-06-22 Jeffrey Stedfast <fejj@helixcode.com>
14348 * providers/imap/camel-imap-folder.c (imap_get_message_count):
14349 Oops. Now appends the namespace to the folder before querying
14350 for the number of messages.
14352 * providers/imap/camel-imap-store.c (imap_folder_exists): New
14353 convenience function for use by imap_create().
14354 (get_folder): If folder is specified as "/", we really want
14357 * providers/sendmail/camel-sendmail-provider.c:
14358 * providers/vee/camel-vee-provider.c:
14359 * providers/smtp/camel-smtp-provider.c:
14360 * providers/mbox/camel-mbox-provider.c:
14361 * providers/pop3/camel-pop3-provider.c:
14362 * providers/imap/camel-imap-provider.c: Updated
14364 * camel-session.c: Moved service_cache hash table into the
14366 (service_cache_remove): Updated.
14367 (camel_session_get_service): Updated.
14369 * camel-url.c (camel_url_hash): Took out the hashing of
14370 url->passwd. We don't want this anymore.
14372 * providers/imap/camel-imap-folder.c (imap_init): Took out
14373 references to 'namespace'
14374 (camel_imap_folder_init): Same
14376 * providers/imap/camel-imap-folder.h: No more namespace. We are
14377 instead going to use url->path as the namespace.
14379 2000-06-21 Jeffrey Stedfast <fejj@helixcode.com>
14381 * providers/imap/camel-imap-store.c (imap_create): Modified to
14382 use the "namespace" (url->path) if it exists.
14384 * providers/imap/camel-imap-folder.c (imap_delete_message_by_uid):
14385 Now just sets the deleted flag on the summary rather than speaking
14386 directly to the IMAP server. This is both faster and cleaner.
14388 2000-06-21 Dan Winship <danw@helixcode.com>
14390 * providers/pop3/camel-pop3-store.c (query_auth_types): Fix dumb
14393 2000-06-21 Jeffrey Stedfast <fejj@helixcode.com>
14395 * providers/imap/camel-imap-folder.c (imap_get_message_by_uid):
14396 We are getting mail in IMAP now!! whoo-hoo!. Stripped out the
14397 filtering so messages may have some dot-stuffing, but the
14398 filtering can always be added back in later when we know it
14399 works and isn't the problem.
14401 2000-06-21 Peter Williams <peterw@curious-george.helixcode.com>
14403 * providers/mbox/camel-mbox-folder.c (mbox_init): Use the basename
14404 of the mailbox so we don't get pathnames like ~/evolution/inbox///movemail.ibex
14406 2000-06-21 Dan Winship <danw@helixcode.com>
14408 * camel-folder-summary.c (message_info_new): Set date_received
14409 based on the first (most recent) "Received" header.
14411 2000-06-20 Dan Winship <danw@helixcode.com>
14413 * camel-mime-part.c (write_to_stream): flush the filter stream
14414 before unreffing it, so it will camel_mime_filter_complete.
14416 * camel-stream-filter.c (camel_stream_filter_class_init): Fix a
14417 braino so camel_stream_flush works here.
14419 * camel-stream-mem.c (stream_seek): Fix a bug that resulted in
14420 large attachments being silently dropped.
14422 * providers/pop3/camel-pop3-store.c
14423 (camel_pop3_command_get_additional_data): Don't use g_strjoinv
14424 here, since it is O(n^2) on the length of the output string, and
14427 * camel-mime-part-utils.c
14428 (simple_data_wrapper_construct_from_parser): add a CRLF decoder
14429 after the QP/B64 decoder if it's text.
14431 2000-06-20 Jeffrey Stedfast <fejj@helixcode.com>
14433 * providers/imap/camel-imap-folder.c (imap_get_summary): Only
14434 fetch the summary if the folder summary doesn't already exist.
14435 When the summary *does* exist, start fetching from 1, not 0.
14436 (imap_free_summary): Don't do anything here.
14437 (imap_finalize): Free the summary here instead of in
14438 imap_free_summary().
14439 (imap_set_message_flags): Implemented
14440 (imap_sync): Added code to set flags on messages that have had
14441 their flags changed (however I #if'd it out until we are more
14442 confidant in the IMAP code :)
14443 (imap_summary_get_by_uid): Now parese flags correctly.
14444 (imap_get_summary): Now parese flags correctly. Also correctly
14445 parses the UID correctly.
14447 * camel-url.c (check_equal): No need to check s1 if s2 is NULL
14448 (camel_url_equal): Don't check the passwd component of the url.
14450 2000-06-20 Dan Winship <danw@helixcode.com>
14452 * camel-folder-summary.c (camel_folder_summary_add): mark the
14453 message info with CAMEL_MESSAGE_FOLDER_FLAGGED if we change the
14454 uid, so the folder will know that it's dirty.
14456 2000-06-20 Jeffrey Stedfast <fejj@helixcode.com>
14458 * providers/imap/camel-imap-store.c (camel_imap_command_extended):
14459 Now returns the last line of data that the server sends back as
14460 well. This is needed for commands like SELECT (like Peter pointed
14462 (camel_imap_command): No longer checks for SELECT (no need)
14464 * providers/imap/camel-imap-folder.c: Added namespace stuff
14465 which we will need later on...
14466 (imap_parse_subfolder_line): Convenience function for use in
14467 get_subfolder_names()
14468 (imap_get_subfolder_names): Updated. Also changed it to use LIST
14469 instead of LSUB (temporary change).
14471 2000-06-19 Jeffrey Stedfast <fejj@helixcode.com>
14473 * providers/imap/camel-imap-folder.c (camel_imap_folder_init): Set
14474 summary equal to NULL.
14475 (imap_get_summary): Store the summary in the ImapFolder
14476 (imap_summary_get_by_uid): If we have a summary cache in the
14477 ImapFolder, first check to see if that message info is in the
14478 cached summary first, if not fetch it directly from the IMAP
14479 server and append it to the summary cache.
14480 (imap_get_message_flags): Don't free the message info that we get
14481 back from summary_get_by_uid as we don't want to be corrupting our
14484 2000-06-19 Peter Williams <peterw@curious-george.helixcode.com>
14486 * providers/imap/camel-imap-store.c (camel_imap_command{,_extended}): When
14487 SELECT'ing a folder for an IMAP command, use _extended to grab the entire
14488 response (before we just used camel_imap_command and missed the OK codes)
14490 2000-06-18 Jeffrey Stedfast <fejj@helixcode.com>
14492 * providers/imap/camel-imap-folder.c (imap_summary_get_by_uid):
14493 Now gets the message flags as it should.
14494 (imap_get_summary): Same as imap_summary_get_by_uid
14495 (imap_get_permanent_flags): Return the permanent flags stored
14497 (imap_get_message_flags): Return message flags associated with
14498 given uid. Note: we may want to somehow cache summary info so
14499 that we don't have to keep querying the IMAP provider in
14500 imap_summary_get_by_uid().
14502 2000-06-17 Jeffrey Stedfast <fejj@helixcode.com>
14504 * providers/imap/camel-imap-folder.c (imap_free_summary): We were
14505 leaking memory - but not anymore!
14506 (imap_get_summary): We now get the UIDs and the beginnings of the
14507 code to get the message flags as well.
14509 2000-06-17 Dan Winship <danw@helixcode.com>
14511 * camel-mime-parser.c (folder_scan_header): Don't copy newlines
14512 into the parsed header text, and turn any number of tabs and
14513 spaces after a newline into a single space.
14515 2000-06-17 Jeffrey Stedfast <fejj@helixcode.com>
14517 * providers/imap/camel-imap-folder.c (imap_init): Should now
14518 correctly do CAPABILITY.
14520 2000-06-17 Dan Winship <danw@helixcode.com>
14522 * providers/mbox/camel-mbox-summary.c: Add some debugging printfs
14523 when rebulding summary to help figure out why people's summaries
14524 are always being rebuilt.
14526 2000-06-17 Jeffrey Stedfast <fejj@helixcode.com>
14528 * providers/imap/camel-imap-folder.c (imap_search_by_expression):
14529 Began to implement, need to get information on how to
14530 deconstruct @expression into an IMAP search expression and
14532 (imap_init): Now queries the IMAP provider for CAPABILITY to
14533 determine if SEARCH is implemented or not.
14535 * providers/imap/imap.c: Removed - no longer a need to have
14536 this as an example for anyone interesting to help mecode IMAP
14539 2000-06-16 Jeffrey Stedfast <fejj@helixcode.com>
14541 * providers/imap/camel-imap-folder.c (imap_sync): Added code
14542 to expunge if called for (still need to finish coding this).
14543 (imap_get_uids): Implemented.
14544 (imap_get_summary): Found a way to get the date
14545 (imap_summary_get_by_uid): Same.
14546 (imap_free_summary): Implemented.
14548 * string-utils.c (strstrcase): Fixed a compile warning
14550 * providers/imap/camel-imap-summary.c: Removed - we don't
14551 need a CamelImapSummary structure.
14553 2000-06-16 Dan Winship <danw@helixcode.com>
14555 Move flag handling from CamelMimeMessage to CamelFolder. This
14556 simplifies several flag-handling pieces of code in the mailer, and
14557 lets you change a message's flags without having to fetch the
14558 message body. It also means that fully-constructed
14559 CamelMimeMessages are now essentially constant, which will help
14560 simplify locking issues later since it means two threads
14561 interested in the same message can just work with separate copies
14564 * camel-mime-message.h (struct _CamelMimeMessage): Removed flags
14565 and user_flags (moved to summary). Removed expunged and
14566 message_number which were unused. Removed message_uid and folder
14567 which are no longer needed in the new scheme.
14568 (struct CamelMimeMessageClass): Removed message_changed signal and
14569 get/set_message_number methods.
14571 * camel-mime-message.c: Updates for CamelMimeMessage changes.
14572 (camel_mime_message_get/set_flags,
14573 camel_mime_message_get/set_user_flag): Replaced with methods in
14575 (camel_flag_get, camel_flag_set, camel_flag_list_size,
14576 camel_flag_list_free): Moved verbatim to camel-folder-summary.c
14578 * camel-folder.c (camel_folder_get/set_message_flags,
14579 camel_folder_get/set_message_user_flag): New methods (and
14580 corresponding useless default implementations)
14581 (camel_folder_class_init): add a message_changed signal
14583 * camel-folder-summary.c (camel_flag_get, camel_flag_set,
14584 camel_flag_list_size, camel_flag_list_free): Moved here from
14585 camel-mime-message.c
14587 * providers/mbox/camel-mbox-folder.c (message_changed): Removed.
14588 (mbox_get_message_flags, mbox_set_message_flags,
14589 mbox_get_message_user_flag, mbox_set_message_user_flag): Tweak
14590 summary bits as appropriate. (Functionality moved here from
14592 (mbox_get_message_by_uid): Update for CamelMimeMessage changes
14593 (less stuff to initialize).
14595 * providers/imap/camel-imap-folder.c (message_changed): Remove
14596 this. It was just copied from the mbox provider and doesn't deal
14597 with the real IMAP flag stuff anyway. (So there's currently no
14598 flag support in the IMAP provider.)
14599 (imap_get_message_by_uid): Update for CamelMimeMessage changes.
14601 * providers/vee/camel-vee-folder.c: (message_changed): Remove old
14602 one. Add a new one to listen for message_changed on each folder
14603 and re-emit message_changed signals that correspond to messages in
14605 (vee_get/set_message_flags, vee_get/set_message_user_flag): Proxy
14606 flag setting to the underlying real messages.
14607 (vee_append_message): Removed for now; there's no way to translate
14608 this into the new CamelMimeMessage/CamelFolder scheme, but (a)
14609 there's also no code which would ever call it and (b) we're
14610 probably going want a better interface than append_message for
14611 message drag and drop to work anyway. To be revisited.
14613 2000-06-16 Dan Winship <danw@helixcode.com>
14615 * camel-mime-utils.c (rfc2047_decode_word):
14616 * camel-mime-part-utils.c (simple_data_wrapper_construct_from_parser):
14617 * camel-folder-summary.c (summary_build_content_info):
14618 KLUDGE! Since neither ETable nor GtkHTML supports UTF-8 yet,
14619 output ISO-8859-1 instead, so Ettore can read his Italian mail. :)
14620 This will be reverted later.
14622 2000-06-15 Jeffrey Stedfast <fejj@helixcode.com>
14624 * providers/imap/camel-imap-folder.c (imap_get_summary): Started to
14625 implement - may want to use ENVELOPE instead of BODY.PEEK[HEADER]
14626 (imap_summary_get_by_uid): Started to code, I've got to find a way to
14627 get the date in time_t format and also get the flags
14629 * string-utils.c (strstrcase): Added this convenience function - I
14630 know about strcasestr() but it's not portable.
14632 2000-06-15 Dan Winship <danw@helixcode.com>
14634 * camel-service.c: Remove camel_service_connect_with_url. (URLs
14635 must be specified when the service is requested from the session,
14636 so that there can only ever be one service for any URL.)
14638 * camel-folder.c: (camel_folder_open, camel_folder_is_open,
14639 camel_folder_get_mode): Kill. Folders are now always open, and
14640 handle "closing" sorts of operations at sync or finalize time.
14641 (camel_folder_sync): renamed from camel_folder_close. Syncs state
14642 to the store but doesn't necessarily close/disconnect.
14644 * providers/*/camel-*-folder.c: Merge "open" methods into "init"
14645 methods. Rename close to sync and update appropriately.
14647 * providers/imap/camel-imap-store.c: Remove camel_imap_store_open
14648 and camel_imap_store_close, which should not have been copied from
14649 the POP provider (where the exist to work around limitations of
14652 * providers/mbox/camel-mbox-summary.c: fix a bug. (don't expunge
14653 deleted messages if called with expunge == FALSE)
14655 * providers/pop3/camel-pop3-store.c (connect_to_server): Check
14656 server for various interesting extensions.
14658 * providers/pop3/camel-pop3-folder.c (get_uids): If the server
14659 supports UIDL, use real UIDs rather than fake ones.
14660 (etc): Map uids back to numbers appropriately
14662 * providers/mbox/camel-mbox-folder.c (mbox_append_message): Fix to
14663 previous change: make sure the "seek" variable ends up with the
14666 * providers/mbox/camel-mbox-summary.c (summary_rebuild): Update
14667 summary mtime as well as size.
14669 2000-06-14 Dan Winship <danw@helixcode.com>
14671 * providers/mbox/camel-mbox-folder.c (mbox_append_message): if the
14672 mbox doesn't end with a '\n', write one before appending the new
14675 2000-06-14 Jeffrey Stedfast <fejj@helixcode.com>
14677 * camel-mime-filter-crlf.c (filter): Updated the encoder to allocate
14678 more memory (since we are also now adding dots). Also updated the
14679 decoder as we have found that it sometimes passes the end of the
14682 * providers/pop3/camel-pop3-folder.c (get_message_by_uid): Took out the
14683 filter code (we already filter in
14684 camel_pop3_command_get_additional_data)
14686 * camel-folder.c (init): Updated: a separator is now a char* rather
14687 than a single char because IMAP can have a string for a directory
14688 separator. Also, since IMAP does not begin with a directory separator,
14689 there is a new argument (path_begins_with_sep) which decides if a
14690 directory should begin with a directory separator.
14692 * providers/imap/camel-imap-store.c (imap_create): Since, on connect,
14693 Camel tries to create INBOX (which already exists on every IMAP
14694 provider) we can return TRUE when the folder name is "INBOX".
14696 * providers/vee/camel-vee-folder.c (vee_init): Updated.
14698 * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Updated.
14700 * providers/mbox/camel-mbox-store.c (get_folder): Updated.
14702 * providers/mbox/camel-mbox-folder.c (mbox_init): Updated.
14704 * providers/pop3/camel-pop3-folder.c (camel_pop3_folder_new): Updated.
14706 2000-06-14 Dan Winship <danw@helixcode.com>
14708 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
14709 Renamed from camel_mbox_summary_expunge. Takes a gboolean saying
14710 whether to expunge or just sync the mbox file. Change some
14711 g_errors to g_warning so we don't abort. Make the quick
14712 X-Evolution updating code lseek around correctly. Update the
14713 mbox mtime in the summary file even in the quick case.
14715 * providers/mbox/camel-mbox-summary.h: make
14716 CAMEL_MESSAGE_FOLDER_NOXEV not conflict with
14717 CAMEL_MESSAGE_FOLDER_FLAGGED defined in camel-mime-message.h
14719 * providers/mbox/camel-mbox-folder.c (mbox_close): call
14720 camel_mbox_summary_sync to save flag state if not expunging.
14721 (mbox_expunge): Update for camel_mbox_summary_expunge rename.
14723 2000-06-13 Jeffrey Stedfast <fejj@helixcode.com>
14725 * providers/imap/camel-imap-store.c (camel_imap_store_open):
14726 (camel_imap_store_close): Added.
14727 (camel_imap_command_extended): Fixed a segfault and updated
14728 to use camel_imap_status()
14729 (camel_imap_command): Updated to use camel_imap_status()
14730 (camel_imap_status): New convenience function for parsing
14731 the return status of an IMAP command
14733 2000-06-12 Jeffrey Stedfast <fejj@helixcode.com>
14735 * providers/imap/camel-imap-folder.c (imap_get_message_by_uid):
14736 Works like the POP fetch code, should work temporarily until
14737 we get around to coding it the way it "Should Be".
14739 * providers/pop3/camel-pop3-folder.c (get_message_by_uid): Now uses
14740 the camel-mime-filter-crlf decoder when retrieving messages.
14742 * camel-mime-filter-smtp.c: Deprecated.
14744 * providers/smtp/camel-smtp-transport.c (smtp_data): Updated to use
14745 camel-mime-filter-crlf with my 'dot' extension in place of
14746 camel-mime-filter-smtp
14748 * camel-mime-part.c (write_to_stream): Updated to reflect changes
14749 made to camel-mime-filter-crlf.c
14751 * camel-mime-filter-crlf.c (filter): Modified to be able to
14752 encode/decode dots ("\n.\n"<->"\n..\n"). Also fixed the decoder
14753 so that it should no longer get caught in an infinite loop.
14755 2000-06-12 Dan Winship <danw@helixcode.com>
14757 * providers/*/Makefile.am: don't pass a second (incorrect) -rpath
14758 in addition to the (correct) one automatically provided by
14761 * camel-mime-filter-crlf.c: New filter to do CRLF<->LF conversion.
14762 (Currently only tested in the LF->CRLF direction.)
14764 * camel-mime-part.c (write_to_stream): if content-type is text,
14765 and it's QP or B64 encoded, pass through the CRLF filter before
14766 the other filter to satisfy the "canonical encoding" rules in the
14769 2000-06-09 Dan Winship <danw@helixcode.com>
14771 * camel-session.c (camel_session_query_authenticator): Add another
14772 argument, "mode", which can be CAMEL_AUTHENTICATOR_ASK or
14773 CAMEL_AUTHENTICATOR_TELL, so callers can get the app to un-cache
14776 * providers/pop3/camel-pop3-store.c (pop3_connect): uncache the
14777 password if it doesn't work.
14779 2000-06-09 Jeffrey Stedfast <fejj@helixcode.com>
14781 * providers/imap/camel-imap-stream.c (stream_read): Updated to reflect
14782 changes made in camel-imap-store.c
14784 * providers/imap/camel-imap-store.c (imap_create): No longer checks to
14785 make sure a folder doesn't already exists (as this is no longer needed)
14786 (camel_imap_command): Now takes a CamelFolder argument so it can detect
14787 whether or not it needs to SELECT a folder or not
14788 (camel_imap_command_extended): Same.
14790 * providers/smtp/camel-smtp-transport.c (smtp_connect): Will now always
14791 send EHLO first, if that fails it will fall back on HELO.
14792 (esmtp_get_authtypes): Should now correctly parse authtypes.
14794 2000-06-07 Jeffrey Stedfast <fejj@helixcode.com>
14796 * providers/imap/camel-imap-summary.c: Now builds (not that it's worth
14799 * providers/imap/camel-imap-folder.c (imap_get_uids): Now uses the
14800 correct cast to a CamelImapMessageInfo structure (should get rid of
14803 * providers/imap/Makefile.am: Added rules to build
14806 * providers/imap/camel-imap-store.c (get_folder): Update.
14807 Moved imap_create here.
14809 * providers/imap/camel-imap-folder.c (delete_messages): Remove.
14810 (imap_create): Removed.
14811 (imap_delete): Removed.
14812 (imap_exists): Removed.
14814 * providers/imap/camel-imap-stream.h: Added typedef's for the stream
14816 * providers/imap/camel-imap-stream.c: Modified to build cleanly
14818 2000-06-07 Not Zed <NotZed@HelixCode.com>
14820 * camel-mime-utils.c (header_msgid_decode_internal): Properly
14821 dereference warning/debug messages.
14822 (header_references_decode): Check we actually have msgid stuff
14823 before trying to decode it ...
14825 2000-06-06 Jeffrey Stedfast <fejj@helixcode.com>
14827 * camel-imap-stream.[c,h]: Removed
14829 * providers/imap/camel-imap-stream.[c,h]: Relocated to this
14832 * providers/imap/camel-imap-summary.c: Added
14834 2000-06-06 Dan Winship <danw@helixcode.com>
14836 * camel-folder.c: Remove exists, create, delete. A CamelFolder
14837 now always references an existing folder. Remove delete_messages
14838 too since it wasn't being used. Add a "create" flag to
14839 get_subfolder saying whether or not to create the subfolder if it
14842 * camel-store.c (camel_store_get_folder): Add a "create" flag to
14843 say whether or not to create the folder if it doesn't yet exist.
14844 (camel_store_delete_folder): New method, moved from CamelFolder.
14845 (cache_folder, uncache_folder): Fix up a bit.
14846 (get_folder_name): Explain what this is for.
14848 * providers/mbox/camel-mbox-folder.c:
14849 * providers/mbox/camel-mbox-store.c: Update. Remove support for
14850 hierarchical folders to simplify this for now, since we're not
14851 using it, and it's not completely clear how they should work in an
14852 ELocalStorage world. Needs to be revisited.
14854 * providers/pop3/camel-pop3-folder.c (delete_messages): Remove.
14855 * providers/pop3/camel-pop3-store.c (get_folder): Update.
14857 * providers/vee/camel-vee-folder.c (exists): Remove.
14858 * providers/vee/camel-vee-store.c (vee_get_folder): Update.
14860 2000-06-06 Jeffrey Stedfast <fejj@helixcode.com>
14862 * providers/imap/camel-imap-*.[c,h]: Started on getting
14863 imap to build cleanly (tho some work has not been completed
14864 so it still won't build until camel-imap-summary is finished
14865 along with a few methods in camel-imap-folder)
14867 * camel-stream.[c,h]: Changed the read and write method prototypes
14868 to return an ssize_t type rather than an int and also changed
14869 the 'number of bytes' to read or write to a size_t type
14871 * camel-stream-fs.c: same as above
14873 * camel-stream-mem.c: again, same as above
14875 * camel-stream-buffer.c: same
14877 * camel-imap-stream.[c,h]: Added this new stream, cache's previously
14878 read data so each successive call will instead read from the cache
14880 2000-06-05 Dan Winship <danw@helixcode.com>
14882 * camel-mime-part.c (camel_mime_part_set_disposition): fix
14883 typo/braino (set "Content-Disposition", not "Content-Description")
14884 (camel_mime_part_set_filename): const poison
14886 2000-06-02 Not Zed <NotZed@HelixCode.com>
14888 * camel-mime-utils.c (base64_encode_step): Ick, damn signs! Fix a
14889 bug with sign extended bytes.
14891 * camel-mime-filter-smtp.c (filter): Changed layout/logic slightly
14892 (to match From filter)
14894 2000-06-02 Jeffrey Stedfast <fejj@helixcode.com>
14896 * camel-mime-filter-smtp.c (filter): Fixed the filter so that it
14897 wouldn't insert garbage under certain conditions.
14899 2000-06-02 Christopher James Lahey <clahey@helixcode.com>
14901 * camel-session.c: Don't ref the services in the cache.
14903 2000-06-02 Jeffrey Stedfast <fejj@helixcode.com>
14905 * providers/smtp/camel-smtp-transport.c: Rearanged where debug
14906 fprintf statements we placed so that any data the server sends
14907 back is printed out before an exception is set and the function
14910 2000-06-02 Not Zed <NotZed@HelixCode.com>
14912 * camel-mime-utils.c (header_decode_date): If we get a funny
14913 result, just throw it out. Basically a fix for the one true
14914 broken TradeClient.
14916 2000-06-01 Not Zed <NotZed@HelixCode.com>
14918 * camel-folder-summary.c (message_info_free): Free
14919 references/messsage id.
14920 (message_info_save): Save them.
14921 (message_info_load): Load them.
14922 (message_info_new): And get them from the new message.
14923 (CAMEL_FOLDER_SUMMARY_VERSION): Bumped for new changes.
14925 * camel-folder-summary.h: Added references and messageid to
14928 2000-06-02 Christopher James Lahey <clahey@helixcode.com>
14930 * camel-session.c: Ref and unref objects in the service cache
14933 * camel-store.c: Ref the folder when returning it using
14934 lookup_folder. Used the folder's full name for the key for the
14935 folder cache since that's used to uncache it.
14937 2000-06-02 Dan Winship <danw@helixcode.com>
14941 * providers/pop3/camel-pop3-store.c (pop3_connect): free msg on
14942 success as well as failure.
14943 (camel_pop3_command_get_additional_data): free buf after reading
14944 the last line (".").
14946 * providers/pop3/camel-pop3-folder.c (get_message_by_uid): free
14947 body data after creating the memstream from it (which will copy
14950 * providers/mbox/camel-mbox-folder.c (mbox_finalize): free summary
14953 * camel-data-wrapper.c (finalize): unref the stream, if it exists.
14955 2000-06-01 Not Zed <NotZed@HelixCode.com>
14957 * camel-mime-part.c (construct_from_parser): For a message part,
14958 set the default content-type to message/rfc822. Maybe needs to be
14959 done for multiparts too?
14961 2000-05-31 Not Zed <NotZed@HelixCode.com>
14963 * camel-mime-message.c (construct_from_parser): Typo in assersion.
14965 * camel-mime-parser.c (folder_scan_step): Use a default type of
14966 message/rfc822 for multipart/digest. Bug Z192.
14967 (folder_scan_drop_step): Remove warning.
14969 2000-05-30 Not Zed <NotZed@HelixCode.com>
14971 * providers/mbox/camel-mbox-folder.c (mbox_append_message): Init
14972 filter_from to NULL, for exception case.
14973 (mbox_get_message_by_uid): Cast off_t to long int for diagnostics.
14975 * camel-url.c (camel_url_hash): Hash funciton for using camel
14976 url's as hash keys.
14977 (camel_url_equal): equal function for same.
14979 * camel-session.c (camel_session_finalise): Free cached services.
14980 (camel_session_init): Init service cache.
14981 (service_cache_remove): destroy callback to remove a service from
14984 * camel-store.c (get_folder_internal): Remove the extra ref of the
14985 folder. That seems the right behaviour ...?
14986 (camel_store_get_type): Doh, actually call store init, so the
14988 (cache_folder): strdup the folder name! no wonder it never found
14991 2000-05-30 Jeffrey Stedfast <fejj@helixcode.com>
14993 * providers/imap/camel-imap-folder.c: Implemented a few more
14994 methods like imap_append and 1 or 2 others
14996 2000-05-29 Not Zed <NotZed@HelixCode.com>
14998 * camel-store.c (camel_store_init): Move it to here. If this
14999 level is going to maintain it, it should set it up. Lets see what
15000 caching folders breaks :(
15002 * providers/pop3/camel-pop3-store.c (camel_pop3_store_init): Dont
15003 init folder cache here.
15005 * providers/mbox/camel-mbox-summary.c
15006 (camel_mbox_summary_expunge): Make sure we copy messages which are
15007 still intact to the new folder.
15008 (camel_mbox_summary_expunge): Update the frompos as well when
15009 moving the content.
15010 (camel_mbox_summary_expunge): Remove some debug, and dont offset
15013 * providers/vee/camel-vee-folder.c (vee_folder_build): Check the
15014 searched folder is open before trying to search it.
15015 (message_changed): Track changes to the source message in the
15017 (folder_changed): Track folder changes, re-query the folder that
15018 changed, and cascade the changed event as well.
15019 (camel_vee_folder_finalise): Free subfolder and subfolder summary.
15021 2000-05-29 Dan Winship <danw@helixcode.com>
15023 * camel-service.c (camel_service_new): Fix up some glib
15024 precondition stuff. Try to set the URL in camel_service_new before
15025 checking whether or not it's "empty" so that you can successfully
15026 set "sendmail:" as a URL.
15028 2000-05-28 Dan Winship <danw@helixcode.com>
15030 * camel-provider.h: Add a domain field to CamelProvider, to say
15031 what kind of data it provides.
15033 * providers/imap/camel-imap-provider.c:
15034 * providers/mbox/camel-mbox-provider.c:
15035 * providers/pop3/camel-pop3-provider.c:
15036 * providers/sendmail/camel-sendmail-provider.c:
15037 * providers/smtp/camel-smtp-provider.c: Set domain to "mail".
15039 * providers/nntp/camel-nntp-provider.c: Set domain to "news".
15041 * providers/vee/camel-vee-provider.c: Set domain to "vfolder". (So
15042 it doesn't end up being listed as a potential mail source in the
15043 mail config wizard.)
15045 * providers/pop3/camel-pop3-store.c: Split apart password and APOP
15046 auth, since some servers seem to do both, but don't really.
15047 (connect_to_server): Renamed from try_connect. Now actually does
15048 the connection up to the point of checking the greeting for APOP
15050 (query_auth_types): Return APOP, if appropriate. Call
15051 pop3_disconnect after connect_to_server since we don't really want
15053 (pop3_connect): Use connect_to_server rather than duplicating
15054 code. Fix a one-byte buffer overrun in the APOP code.
15055 (pop3_disconnect): Make this able to clean up after a partial
15057 (connect_to_server): Remove port number from error message since
15058 it's not terribly useful and we were getting it from the wrong
15061 * camel-mime-utils.c (header_address_list_format_append): Use
15062 `foo@bar' rather than `"" <foo@bar>' for email addresses with no
15065 2000-05-27 Jeffrey Stedfast <fejj@helixcode.com>
15067 * providers/imap/camel-imap-store.c: Removed
15068 camel_imap_command_get_additional_data() as it was
15069 completely useless, replaced with
15070 camel_imap_command_extended() which may eventually replace
15071 camel_imap_command() as well.
15073 * providers/imap/camel-imap-store.h: Modified to reflect
15074 changes made to camel-imap-store.c
15076 * providers/imap/camel-imap-folder.c: Wrote the first of many
15077 methods: camel_imap_init(), imap_open(), imap_expunge(),
15078 imap_get_message_count(), and imap_get_subfolder_names()
15080 2000-05-26 Dan Winship <danw@helixcode.com>
15082 * camel-multipart.c (camel_multipart_init): Don't set a default
15083 boundary. Require the caller to do that.
15084 (set_boundary): if boundary is NULL, generate a "random" boundary.
15086 * camel-mime-part-utils.c
15087 (camel_mime_part_construct_content_from_parser): Add a call to
15088 camel_multipart_set_boundary after creating a new multipart.
15090 2000-05-25 Jeffrey Stedfast <fejj@helixcode.com>
15092 * providers/imap/camel-imap-store.c (try_connect): Removed
15093 Exception code - Pop doesn't seem to set exceptions
15095 * providers/imap/camel-imap-folder.c: Initial code, mostly
15096 just a template for future code
15098 * providers/imap/imap.[c,h]: Source code from my personal
15099 mailer - for reference only!
15101 2000-05-25 NotZed <NotZed@HelixCode.com>
15103 * camel-mime-part-utils.c
15104 (camel_mime_part_construct_content_from_parser): Replace simple
15105 data wrapper here too, oops.
15107 * Makefile.am (libcamel_la_SOURCES): Removed
15108 camel-simple-data-wrapper again. Less code to maintain == better
15111 * camel-data-wrapper.c (construct_from_stream): Fixes for bug
15112 where text attachments dont work. Made data-wrapper concrete for
15115 2000-05-23 NotZed <NotZed@HelixCode.com>
15117 * providers/vee/camel-vee-folder.c (vee_folder_build_folder):
15118 Update the vfolder details for a single folder.
15120 2000-05-25 Jeffrey Stedfast <fejj@helixcode.com>
15122 * providers/smtp/camel-smtp-transport.c (_send_to): Took out code
15123 that had been there to reconnect to the server if it was not
15124 already connected - Mailer code was fixed so that this should not
15127 * providers/imap/camel-imap-store.[c,h]: Initial code.
15129 2000-05-24 Dan Winship <danw@helixcode.com>
15131 * camel.h: Re-add camel-simple-data-wrapper.h, which was removed
15134 2000-05-24 Jeffrey Stedfast <fejj@helixcode.com>
15136 * providers/smtp/camel-smtp-transport.[c,h]: Moved global
15137 variables into struct CamelSmtpTransport to make SMTP
15140 * providers/imap/camel-imap-*.h: Stolen from Mbox. Rough structure
15143 2000-05-23 Jeffrey Stedfast <fejj@helixcode.com>
15145 * providers/imap: Added some initial code to the camel tree
15148 * providers/imap/.cvsignore: Added to repository
15150 * providers/smtp/camel-smtp-transport.c: Added debug fprintf's
15151 so that testers can provide more information. Tested with simple
15152 messages and a reply to the hello@helixcode.com default message
15153 but should really be tested more.
15154 (smtp_data): Fixed to use data_wrapper_write_to_stream.
15156 * camel-mime-filter-smtp.c (filter): Modified to escape all lines
15157 beginning with a '.' and to place a \r before each \n if one did
15158 not previously exist. Removed code to escape "From " as it was
15159 found to not be needed for SMTP.
15161 2000-05-22 Jeffrey Stedfast <fejj@helixcode.com>
15163 * providers/smtp/camel-smtp-transport.c (smtp_data): Fixed the
15164 filtered stream. Fixes for stream changes, updated to use
15165 camel-mime-filter-smtp.
15167 * Makefile.am: Added camel-mime-filter-smtp.c
15169 * camel-mime-filter-smtp.[c,h]: Added to camel tree
15170 Smtp filter used to change \n into \r\n, escape lone dots,
15171 and escape "From "'s.
15173 2000-05-19 NotZed <NotZed@HelixCode.com>
15175 * camel-simple-data-wrapper.c (construct_from_stream): If we
15176 already have been constructed, unref our content.
15177 (write_to_stream): Check we've been constructued, and change for
15178 stream api changes.
15180 * camel-mime-parser.c: Removed exception stuff.
15182 * md5-utils.c (md5_get_digest_from_stream): repaired.
15184 * camel-mime-message.c: Remove exception from write_to_stream, and
15185 fix, and fix formatting.
15187 * providers/sendmail/camel-sendmail-transport.c (_send_internal):
15188 Fix for stream changes.
15190 * providers/pop3/camel-pop3-store.c (camel_pop3_command): Fixes
15191 for stream changes.
15193 * providers/mbox/camel-mbox-folder.c, and elsewhere, fix all
15194 stream api changes.
15195 (mbox_append_message): Use stream_close() now its back.
15196 (mbox_append_message): unref the from filter.
15198 * camel-stream-mem.c: And here.
15200 * camel-stream-fs.[ch]: Here too.
15202 * camel-stream-filter.c: Likewise. This is getting tedious.
15204 * camel-stream-buffer.c (stream_write): Fix a few little problems.
15205 (stream_close): Reimplement.
15206 (camel_stream_buffer_read_line): Slightly more efficient version,
15207 that also only allocates the right amount of memory for strings.
15209 * camel-seekable-substream.c: Likewise.
15211 * camel-seekable-stream.[ch]: Remove exceptions, fix formatting,
15212 changes for stream (re)fixes. set_bounds returns an error.
15214 * camel-stream.[ch]: Remove exceptions. Make flush and reset return
15215 an error code, repair all the screwed up formatting, and put back
15218 * camel-mime-part-utils.c
15219 (camel_mime_part_construct_content_from_parser): And here.
15221 * camel-mime-part.c (camel_mime_part_set_content): And this too.
15222 (write_to_stream): Fixed for stream changes.
15226 * providers/vee/camel-vee-folder.c (vee_search_by_expression):
15227 Implement. Performs an intersection of the two searches.
15228 (camel_vee_folder_finalise): Unref search folders.
15229 (vee_append_message): Implement append.
15231 2000-05-18 Dan Winship <danw@helixcode.com>
15233 * camel-folder.c: remove message_number_capability and require uid
15235 (camel_folder_list_subfolders, camel_folder_get_uid_list,
15236 camel_folder_get_subfolder_info, camel_folder_get_message_info):
15238 (camel_folder_get_subfolder_names,
15239 camel_folder_free_subfolder_names): new subfolder interfaces.
15240 (camel_folder_get_uids, camel_folder_free_uids): new uid
15242 (camel_folder_get_summary, camel_folder_free_summary): new summary
15245 * providers/mbox/camel-mbox-folder.c,
15246 * providers/nntp/camel-nntp-folder.c:
15247 * providers/vee/camel-vee-folder.c: Update for changes
15249 * providers/pop3/camel-pop3-folder.c: Implement get_uids, update
15252 2000-05-18 NotZed <NotZed@HelixCode.com>
15254 * providers/vee/camel-vee-folder.c: Guess!
15256 * camel-folder-search.c (search_user_flag): Implement user_flag
15259 * camel-folder-search.h: Added user_flag search capability
15262 * providers/mbox/camel-mbox-folder.c (mbox_init): Set USER flag in
15263 permanent flags for the folder.
15265 2000-05-17 Dan Winship <danw@helixcode.com>
15267 * camel-folder.c: Remove unused async open/close and
15268 copy_message_to functions.
15269 Rename functions without initial _. Fix glib preconditions and
15272 2000-05-17 Dan Winship <danw@helixcode.com>
15274 * camel-data-wrapper.c: remove get/set_output_stream operations.
15275 They're redundant with write_to_stream, and CamelMimePart and
15276 CamelMimeMessage only implement the latter, meaning that trying to
15277 get_output_stream on a CamelMimeMessage that was built from pieces
15278 rather than being parsed from a stream doesn't work. Anything that
15279 uses get_output_stream can be rewritten to use write_to_stream, so
15280 we'll standardize on that.
15281 (camel_data_wrapper_new): remove this: CamelDataWrapper is
15282 supposed to be an abstract class.
15283 (write_to_stream): remove default implementation. (Moved to
15284 CamelSimpleDataWrapper)
15286 * camel-simple-data-wrapper.c: resurrect, although it's not really
15287 the same thing it was before. A simple data wrapper, which is
15288 backed by a CamelStream.
15290 * camel-mime-part-utils.c
15291 (simple_data_wrapper_construct_from_parser): Use
15292 construct_from_stream rather than set_output_stream.
15293 (camel_mime_part_construct_content_from_parser): Change
15294 camel_data_wrapper_new to camel_simple_data_wrapper_new.
15296 * camel-mime-part.c (camel_mime_part_set_content): Change
15297 camel_data_wrapper_new to camel_simple_data_wrapper_new.
15300 2000-05-17 Darin Adler <darin@eazel.com>
15302 * camel-folder-summary.c: (message_info_load):
15303 Quick fix to get it to compile. I hope I don't get into trouble.
15305 2000-05-17 Dan Winship <danw@helixcode.com>
15307 * camel.h: Don't include the no-longer-distributed
15308 possibly-to-be-removed headers.
15310 * providers/smtp/camel-smtp-transport.c
15311 (smtp_get_email_addr_from_text): fix an off-by-one error in
15313 (smtp_data): use camel_data_wrapper_get_output_stream rather than
15314 data_wrapper->output_stream
15316 2000-05-17 NotZed <NotZed@HelixCode.com>
15318 * providers/mbox/camel-mbox-folder.c (message_changed): Snoop
15319 changes to user flags on the message into the summary as well.
15321 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_init):
15322 Changed version init to include the parent class version info
15323 (i.e. add it not overwrite it).
15325 * camel-folder-summary.c (message_info_new): Initialise user_flags
15327 (message_info_load): And load user flags.
15328 (message_info_save): And save user flags.
15329 (message_info_free): And free them.
15330 (CAMEL_FOLDER_SUMMARY_VERSION): Bumped file revision.
15332 * camel-folder-summary.h: Added user-flags to summary.
15334 * camel-mime-message.c (camel_mime_message_set_user_flag): Dont
15335 use a hashtable for user flags.
15336 (camel_mime_message_get_user_flag): And changed here too.
15337 (camel_flag_get): New interface to get a flag from a flag
15338 list. Flag lists are easier to work with than hash tables, and
15340 (camel_flag_set): And set.
15341 (camel_flag_list_free): And free.
15342 (free_key_only): Discard.
15343 (finalize): Remove the flag list.
15345 2000-05-17 Jeffrey Stedfast <fejj@stampede.org>
15347 * providers/smtp/camel-smtp-transport.c: (smtp_helo): Error
15348 checking on gethostbyaddr() eliminating a possible segfault.
15350 2000-05-16 NotZed <NotZed@HelixCode.com>
15352 * providers/mbox/camel-mbox-folder.c (mbox_delete_message_by_uid):
15355 2000-05-12 NotZed <NotZed@HelixCode.com>
15357 * camel-movemail.c (camel_movemail): Open the destination with
15358 O_APPEND, so we dont blow away a partially transferred mbox.
15359 (camel_movemail): Loop if we get errno=INTR, and not fail.
15361 2000-05-11 NotZed <NotZed@HelixCode.com>
15363 * providers/mbox/camel-mbox-summary.c (summary_rebuild): Update
15364 the summarised file size, if everything went ok.
15365 (camel_mbox_summary_expunge): Clear header flags after updating.
15367 2000-05-16 Chris Toshok <toshok@helixcode.com>
15369 * providers/nntp/camel-nntp-folder.c:
15370 * providers/nntp/camel-nntp-folder.h:
15371 * providers/nntp/camel-nntp-provider.c:
15372 * providers/nntp/camel-nntp-store.c:
15373 * providers/nntp/camel-nntp-utils.c:
15374 * providers/nntp/camel-nntp-utils.h:
15375 get things working with new camel summary stuff.
15377 * providers/nntp/camel-nntp-summary.c:
15378 * providers/nntp/camel-nntp-summary.h:
15379 removed files since camel-folder-summary does all we need.
15381 2000-05-15 Jeffrey Stedfast <fejj@stampede.org>
15383 * providers/smtp/camel-smtp-transport.c: Added some preliminary
15386 2000-05-15 Dan Winship <danw@helixcode.com>
15388 * camel-folder.h: Remove camel_folder_get_summary, which no longer
15391 2000-05-11 Dan Winship <danw@helixcode.com>
15393 * Makefile.am: remove some cruft that we're not currently using.
15395 * camel-stream-mem.c (camel_stream_mem_new_with_buffer): Change
15396 to match prototype (size_t vs unsigned int) so it works on 64-bit
15397 machines. Noted by msw.
15399 2000-05-11 NotZed <NotZed@HelixCode.com>
15401 * providers/mbox/camel-mbox-folder.c (message_changed): Indicate
15402 the summary changed also.
15404 2000-05-11 Jeffrey Stedfast <fejj@stampede.org>
15406 * providers/smtp/camel-smtp-transport.c: (smtp_helo):
15407 Updated to more closely comply with RFC 821 standards
15409 2000-05-11 NotZed <NotZed@HelixCode.com>
15411 * camel-mime-part.c (write_to_stream): Unref the filter after
15412 adding it to the filtering stream.
15414 * providers/mbox/camel-mbox-summary.c
15415 (camel_mbox_summary_finalise): Free the folder path.
15416 (camel_mbox_summary_update): Also save summary when done.
15417 (camel_mbox_summary_expunge): Unindex items when deleting them.
15418 (camel_mbox_summary_expunge): Save the index as well as the
15421 * camel-folder-summary.c (camel_folder_summary_finalise): Free the
15423 (camel_folder_summary_touch): New function, indicate the summary
15425 (camel_folder_summary_remove): Dirty here.
15427 * camel-internet-address.c (internet_decode): Free multiple entry
15428 addresses properly.
15430 * camel-mime-utils.c (header_decode_mailbox): Plugged another
15431 memleak, free text after converting it.
15432 (header_decode_addrspec): More leaks plugged.
15434 * camel-mime-message.c (finalize): Free message_uid.
15435 (finalize): Free the recipients hashtable.
15437 2000-05-11 <notzed@helixcode.com>
15439 * camel-folder-summary.c (camel_folder_summary_finalise): Free
15440 summary items and charset filters.
15442 2000-05-10 <notzed@helixcode.com>
15444 * camel-folder-summary.c (camel_folder_summary_finalise): Don't
15445 free stuff in p, after we've free'd p.
15447 * providers/mbox/camel-mbox-folder.c (mbox_append_message): Unref
15448 the stream we created for appending.
15450 2000-05-10 Jeffrey Stedfast <fejj@stampede.org>
15452 * providers/smtp/camel-smtp-transport.c: (camel_smtp_transport_class_init):
15453 Added initialization for service_class
15455 2000-05-10 Dan Winship <danw@helixcode.com>
15457 * camel-multipart.c (write_to_stream): fix a stupid typo. Thank
15460 * camel-mime-part.c (write_to_stream): don't ref the stream before
15461 wrapper a filter around it, since nothing will ever unref it.
15463 2000-05-10 Christopher James Lahey <clahey@helixcode.com>
15465 * Makefile.am: Added camel-types.h, camel-folder-pt-proxy.h, and
15466 camel-thread-proxy.h.
15468 2000-05-09 Dan Winship <danw@helixcode.com>
15470 * providers/sendmail/camel-sendmail-transport.c (_send_internal):
15471 Bleah. Can't fsync a pipe. As a quick kludge, just don't
15472 stream_flush it. The right fix will require bringing back
15473 stream_close though.
15475 2000-05-09 Jeffrey Stedfast <fejj@stampede.org>
15476 * camel-internet-address.[c,h]: Undid my changes (moved
15477 struct _address back into came-internet-address.c)
15478 * providers/smtp/camel-smtp-transport.c: (_send): changed
15479 from using it's own address manipulation (using struct _address)
15480 to using camel_internet_address_get(). Also some format changes
15481 to keep consistant with the rest of Camel
15483 2000-05-09 Jeffrey Stedfast <fejj@stampede.org>
15485 * camel-internet-address.[c,h]: Moved struct _address from
15486 camel-internet-address.c to camel-internet-address.h
15487 (hopefully this doesn't break anything...)
15488 * providers/smtp/camel-smtp-transport.c: (_send): now
15489 populates the recipient list with To, Cc, and Bcc addresses.
15490 Should now be able to use this module.
15492 2000-05-09 Dan Winship <danw@helixcode.com>
15494 * providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid):
15495 one more refcounting fix I missed before.
15497 2000-05-08 Jeffrey Stedfast <fejj@stampede.org>
15499 * providers/smtp/camel-smtp-transport.c: no longer frees memory it
15500 shouldn't, updated to reflect camel-stream changes involving
15501 CamelException (perhaps it should use a different CamelException
15502 variable than is passed to the camel smtp module?)
15504 2000-05-08 Dan Winship <danw@helixcode.com>
15506 * camel-stream.c (camel_stream_read, camel_stream_write,
15507 camel_stream_flush, camel_stream_reset, camel_stream_printf,
15508 camel_stream_write_to_stream): Use CamelException to signal
15510 (camel_stream_write_strings): Remove. camel_stream_printf is more
15511 useful in most of the places that used this.
15512 (camel_stream_write_string): Change from macro to function to
15513 prevent problems with double-evaluation.
15515 * camel-seekable-stream.c (camel_seekable_stream_seek,
15516 camel_seekable_stream_set_bounds): Use CamelException.
15519 * camel-seekable-substream.c, camel-stream-buffer.c,
15520 camel-stream-filter.c, camel-stream-fs.c, camel-stream-mem.c:
15523 * camel-stream-fs.c: Remove the virtual init functions and move
15524 the code into the creator functions. Add CamelExceptions to
15525 creation functions that could fail.
15527 * camel-data-wrapper.c (camel_data_wrapper_write_to_stream): Use
15529 * camel-mime-message.c, camel-mime-part.c, camel-multipart.c
15530 (write_to_stream): Update.
15532 * camel-mime-parser.c: add an exception to the mime parser private
15533 data and pass that to stream functions as needed.
15535 * gmime-content-field.c, md5-utils.c: Update (badly) for stream
15538 * camel-exception.h (camel_exception_is_set): convenience macro.
15540 * providers/Makefile.am: disable SMTP for now
15542 * providers/mbox/camel-mbox-folder.c (mbox_append_message): Pass
15543 CamelException to the functions that now need it. Check the
15544 exception after calling camel_stream_flush, and fail if it fails.
15545 (mbox_get_message_by_uid): More updates.
15547 * providers/pop/camel-pop3-folder.c,
15548 providers/pop/camel-pop3-store.c,
15549 providers/sendmail/camel-sendmail/transport.c: Update.
15552 2000-05-08 NotZed <NotZed@HelixCode.com>
15554 * camel-mime-message.c (process_header): Format From and Reply-To
15555 to at least a decoded string. Should probably store them as an
15556 camelinternetaddress.
15558 * Merged NEW_SUMMARY branch back to trunk, and resolved conflicts.
15560 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_update):
15562 (camel_mbox_summary_expunge): Force an update of the summary
15563 before we do anything.
15564 (camel_mbox_summary_expunge): Build new xev line in xevnew, and
15565 free that, and consify xev.
15566 (camel_mbox_summary_load): If we are rebuilding from scratch, make
15567 sure we clear the summary content.
15569 * camel-stream-filter.c (do_close): We NEED a stream close.
15571 2000-05-07 Dan Winship <danw@helixcode.com>
15573 Make camel not leak like a sieve.
15575 * camel-object.c: New subclass of GtkObject which is now the base
15576 of the Camel object hierarchy. Currently the only difference
15577 between CamelObject and GtkObject is that CamelObjects don't start
15580 * *.h: Move a bunch of typedefs to camel-types.h. Standardize on
15581 using <camel/foo.h> in header files rather than <foo.h>, "foo.h",
15582 or "camel/foo.h". Remove some unneeded includes.
15584 * camel-address.c, camel-data-wrapper.c, camel-folder-search.c,
15585 camel-folder-summary.c, camel-folder.c, camel-mime-filter.c,
15586 camel-mime-parser.c, camel-service.c, camel-session.c,
15587 camel-stream.c: These are now subclasses of CamelObject.
15589 * camel-data-wrapper.c (set_output_stream):
15590 * camel-medium.c (set_content_object):
15591 * camel-seekable-substream.c
15592 (init_with_seekable_stream_and_bounds):
15593 * providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid):
15594 remove gtk_object_sink calls.
15596 * camel-stream-buffer.c (init_vbuf):
15597 * camel-stream-filter.c (camel_stream_filter_new_with_stream):
15598 ref the original stream.
15600 * camel-folder-summary.c (camel_folder_summary_finalise): unref
15601 the filters when finalizing.
15603 * camel-mime-part-utils.c
15604 (simple_data_wrapper_construct_from_parser,
15605 camel_mime_part_construct_content_from_parser):
15606 * camel-mime-part.c (camel_mime_part_set_content): Unref objects
15607 that are created only to be handed off to other objects. If
15608 they're going to be needed later, they will have been additionally
15609 ref'ed by the object that needs them.
15611 * providers/pop3/camel-pop3-folder.c (get_message_by_number):
15612 unref the message stream after creating the data from it.
15614 * camel-stream.c, camel-stream-buffer.c, camel-stream-filter.c,
15615 camel-stream-fs.c, camel-stream-mem.c: Remove camel_stream_close,
15616 since its semantics are dubious (what happens when you close a
15617 stream other people still have references on?).
15619 * providers/nntp/camel-nntp-store.c:
15620 * providers/smtp/camel-smtp-transport.c:
15621 * providers/pop3/camel-pop3-store.c:
15622 replace camel_stream_close calls with gtk_object_unref.
15624 * providers/mbox/camel-mbox-folder.c:
15625 * providers/nntp/camel-nntp-folder.c:
15626 * providers/sendmail/camel-sendmail-transport.c:
15627 replace camel_stream_close with camel_stream_flush +
15630 2000-05-06 Dan Winship <danw@helixcode.com>
15632 * providers/pop3/camel-pop3-store.c (query_auth_types): A machine
15633 which serves neither POP nor KPOP is not a POP server.
15635 * providers/smtp/camel-smtp-provider.c: Note in the description
15636 that this provider is not yet tested.
15638 2000-05-08 <notzed@helixcode.com>
15640 * camel-mime-part.c (write_to_stream): Free the filter stream when
15643 * camel-mime-parser.c (folder_seek): Make sure we add the \n
15644 terminal when we seek as well (frob!).
15646 * camel-mime-utils.c (header_decode_addrspec): Plug minor memleak.
15648 * camel-mime-part.c (finalize): Free header tables once finished.
15650 * camel-folder-summary.c (camel_folder_summary_remove): Dont try
15651 to access info after its free'd.
15653 2000-05-07 NotZed <NotZed@HelixCode.com>
15655 * camel-mime-part.c (write_to_stream): Apply encoding to content
15656 part, when writing to a stream *sigh*.
15658 * camel-stream-filter.c (do_write): implement write for the
15659 filtering stream. Writes shouldn't be mixed with reads.
15660 (do_flush): Implemented flush. Again write/flush shouldn't be
15661 mixed with reads. Only flushes if the last op was write.
15662 (do_close): Force flush on close.
15664 * camel-mime-filter.c (filter_run): Oops, make sure we include the
15665 backlen in the total length before passing onto the filter.
15667 * camel-mime-filter-from.c: New filter, munges 'From ' lines into
15668 '>From ', for mbox.
15670 * camel-mime-parser.c (camel_mime_parser_header_remove): New
15671 function to remove the parser's raw header, rather than
15672 manipulating the header directly (wich doesn't work with
15675 * camel-mime-utils.c (header_address_list_clear): Fixed some
15676 broken(tm) logic, which would leak entries on multivalued lists.
15678 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_load):
15679 Use ibex_save() to save the ibex. Makes a big difference to
15680 startup times for very large mailboxes.
15681 (camel_mbox_summary_expunge): Dum de dum, reimplemented. Designed
15682 to be much more robust, and to stop immediately if anything awry
15684 (copy_block): Utility function to copy n bytes from one fd to
15686 (header_write): Utility function to write out raw headers to an
15688 (camel_mbox_summary_update): Incremental summary updater.
15690 * providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid):
15691 Dont unref the stream, because of the broken(tm) ref model of gtk
15692 widget that for some odd reason is being perpetuated in camel.
15693 (mbox_expunge): Reenable expunge again.
15694 (mbox_append_message): Removed the optimised mbox append. If its
15695 an issue, it can go back later. Cleaned up a lot, checks error
15696 returns, and automagically translates 'From ' into '>From' as
15699 2000-05-07 <notzed@helixcode.com>
15701 * camel-mime-filter.c (filter_run): Oops, forgot to add the
15702 backlen to the pre-buffer (*poof*).
15704 2000-05-07 NotZed <NotZed@HelixCode.com>
15706 * camel-mime-message.c (construct_from_parser): Allow
15707 HSCAN_FROM_END to terminate the processing of a message.
15709 * camel-folder-summary.c (perform_content_info_load): Ick, dont
15710 try and append a node onto its own list.
15711 (camel_folder_summary_clear): Actually clear the indexes after
15712 we've removed the messages.
15713 (camel_folder_summary_clear): Set dirty if it changes.
15714 (camel_folder_summary_load): Clear dirty.
15715 (camel_folder_summary_save): Only save if dirty.
15717 * providers/mbox/camel-mbox-summary.c (summary_header_load): Oops,
15718 remember to call that parent class first ...
15719 (summary_header_save): Here too.
15720 (camel_mbox_summary_load): Do more checking to verify the index
15721 contents as well as teh summary contents, against the mbox
15723 (camel_mbox_summary_load): Removed some fo that checking, it needs
15724 more code to work reliably.
15726 2000-05-07 <notzed@helixcode.com>
15728 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_load):
15729 Set the size and mtime of the mbox we indexed once done.
15731 * camel-folder-summary.c (camel_folder_summary_set_index): Dont
15732 write the index if it changes - let the claler fix it (uh, kind of
15733 impacts performance).
15734 (camel_folder_summary_load): close in.
15736 * camel-folder-summary.c (summary_format_string): Check header
15737 exists before trying to strip its leading spaces.
15739 2000-05-06 NotZed <NotZed@HelixCode.com>
15741 * camel-folder.h: Removed summary info from here, and include
15742 camel-folder-summary.h as well.
15744 * camel-mime-parser.c (camel_mime_parser_step): Allow it to accept
15747 * providers/mbox/camel-mbox-summary.c: Totally new file, now
15748 subclasses camel-folder-summary.
15750 * camel-folder-summary.c (message_info_load): Load the uid as a
15752 (message_info_save): And save too.
15753 (camel_folder_summary_clear): New function, clears the contents of
15756 * providers/mbox/camel-mbox-folder.c: Fixes for summary changes.
15757 (mbox_get_message_by_uid): Completely redone. Now cross-checks
15758 the summary information to make sure we get a real message.
15759 (mbox_append_message): Disabled the copy version of append for
15761 (mbox_expunge): Temporarily disabled the expunge function, until
15762 it is put back in camel-mbox-summary.c
15764 2000-05-05 NotZed <NotZed@HelixCode.com>
15766 * camel-folder-summary.c: And same here ...
15767 (camel_folder_summary_encode_fixed_int32): Ugh, fwrite doesn't
15768 return -1 on error ..
15769 (camel_folder_summary_decode_fixed_int32): Neither deos fread.
15770 (camel_folder_summary_encode_token): Fix here too.
15771 (summary_build_content_info): Use start-headers to get the pos of
15772 the message, not parser_tell(), which might not be what we
15773 expected because of parser_unstep().
15774 (camel_folder_summary_encode_token): Use bserch() to tokenise the
15775 values, rather than a linear search.
15777 * camel-mime-utils.c: Defined out some memory profiling stuff I
15778 left there by mistake.
15779 (header_decode_mailbox): Dont try to append the word part of a
15780 local address if we ran out of words.
15782 * camel-mime-parser.c (folder_scan_content): Apply the fix from
15783 the header scanner to here too.
15784 (folder_scan_header): Only check for end of header if we have
15785 space for it (didn't end the read with a newline)
15786 (folder_scan_header): inptr is the only real thing we need
15787 registerised for performance. Try to help the compiler be smart
15789 (folder_scan_header): Simplified the save header case a tad.
15791 Commented out some memory profiling stuff.
15793 2000-05-05 <notzed@helixcode.com>
15795 * camel-mime-utils.c (header_decode_mailbox): Plug a memory leak.
15796 (header_decode_text): Fixed memory leaks with g_string_append().
15797 (header_encode_string): And here too, and a few other places. The
15798 glib api is so awful ...
15799 (header_content_type_decode): More memory leaks.
15801 2000-05-05 <notzed@helixcode.com>
15803 * camel-mime-parser.c (folder_scan_init_with_fd): Make sure we
15804 init the end of buffer sentinal!
15805 (folder_scan_init_with_stream): And here too ...
15807 2000-05-04 NotZed <NotZed@HelixCode.com>
15809 * providers/mbox/camel-mbox-folder.c (summary_get_message_info):
15810 Maxcount is minimum of the max and the requested count, not the
15813 * camel-mime-parser.c (folder_scan_content): Properly set midline,
15814 so we dont falsely catch offset boundary markers (i.e. From inside
15816 (folder_read): Set a sentinal on the end of the read data (\n) so
15817 we dont have to check the buffer boundary in the inner loop.
15818 (mempool_*): New experimental memory management routines, speed
15819 up simple structure parsing by about 25% ... not compiled in by
15820 default. Something similar may be needed for camel-mime-utils to
15821 address performance issues with g_malloc and friends.
15823 * camel-mime-utils.c: Added a macro w(x) used to wrap all warnings
15824 about mime/rfc violations, so they can be turned off.
15826 * camel-folder-summary.c (summary_build_content_info): Step after
15827 the end of a message ...
15828 Turn into a stand-alone program for testing and profiling.
15830 2000-05-04 Dan Winship <danw@helixcode.com>
15832 * providers/pop3/camel-pop3-store.c (pop3_connect): Don't fall
15833 back to plaintext passwords if APOP fails, since it should also
15836 2000-05-04 Dan Winship <danw@helixcode.com>
15838 * camel-session.c (camel_session_list_providers): New function to
15839 replace camel_provider_scan. Returns a list of either (a) all
15840 currently-loaded providers, or (b) all available providers.
15842 * camel-url.[ch]: Add an "empty" flag to CamelURL (indicating that
15843 it contains only a protocol).
15845 * camel-service.c (camel_service_query_auth_types): Make this take
15846 a CamelException (since it may have to try to connect to the
15847 server, and it might not able to.)
15849 * providers/pop3/camel-pop3-store.c: add KPOP (Kerberized POP)
15850 support. This is mostly so I have two kinds of authmech to play
15851 with instead of just one. (But it does actually work.)
15853 * providers/smtp/camel-smtp-transport.c (query_auth_types): update
15854 for prototype change, but disable the functionality, since it
15855 doesn't really support any auth types yet.
15856 (camel_smtp_transport_get_type): add an object init function to
15857 set the service url_flags.
15859 2000-05-04 NotZed <NotZed@HelixCode.com>
15861 * providers/mbox/camel-mbox-summary.c: Yes, and anotherone.
15863 * camel-mime-utils.c: And another one.
15865 * camel-mime-part.c: And another one.
15867 * camel-mime-part-utils.c: And another one.
15869 * camel-folder-search.c: And another one.
15871 * camel-mime-parser.c: Reverted a change wihtout a ChangeLog entry.
15873 2000-05-04 NotZed <NotZed@HelixCode.com>
15875 * camel-folder-summary.[hc]: Yes, CamelFolderSummary is back ...
15876 ... re-usable class to summarise and index any stream or message
15877 and to manage/load/save the created summaries.
15879 * camel-folder.c: Include string.h to kill a warning.
15881 2000-05-03 Jason Leach <leach@wam.umd.edu>
15883 * Makefile.am (INCLUDES): add $(UNICODE_CFLAGS) to the INCLUDES,
15884 people who installed libunicde in non-standard include paths need
15887 2000-05-03 NotZed <NotZed@HelixCode.com>
15889 * camel-folder.h: Added pos/bodypos/endpos to the basic message
15890 content info object. Size to be removed? Moved the
15891 messageconentinfo and messageinfo back to camel-folder-summary.h.
15893 * camel-mime-filter-index.c (camel_mime_filter_index_set_ibex):
15894 New function to (re)set the index to use on a filter.
15896 * camel-mime-parser.c (camel_mime_parser_scan_from): Whole bunch
15898 (camel_mime_parser_drop_step): New function to drop a state from
15899 the parser. Needs more testing.
15901 * camel-mime-utils.c (rfc2047_decode_word): If the iconv handle is
15902 -1, then dont try and convert (crashes unicode_iconv?).
15903 (rfc2047_decode_word): Use alloca for variables instead of
15904 g_malloc - by the rfc they should always be short.
15905 (rfc2047_decode_word): If we can't do the charset conversion, undo
15906 the quoted-printable/base64 at least? Should probably convert
15907 unknown characters to the utf-8 unknown character.
15909 2000-05-02 Larry Ewing <lewing@helixcode.com>
15911 * camel-mime-utils.c (header_decode_date): fix typo when
15912 dereferencing saveoffset.
15914 2000-05-02 NotZed <NotZed@HelixCode.com>
15916 * camel-folder-search.c: Added some header doco.
15918 * camel.h: REmove gmime-utils.h from here.
15920 * providers/mbox/camel-mbox-search.[ch]: Removed. Functionally
15923 * providers/mbox/camel-mbox-folder.c (mbox_search_by_expression):
15924 Use the new CamelFolderSearch class to do the actual searching,
15925 just setup the search here.
15927 * camel-folder-search.[ch]: A helper class that providers may
15928 subclass to provide their own search functionality, or they can
15929 simply use as is, it supports body searches if an ibex is
15930 supplied, and header searches if a summary is supplied.
15932 2000-05-02 Matt Loper <matt@helixcode.com>
15934 * Makefile.am: set G_LOG_DOMAIN.
15935 * providers/MH/Makefile.am: same.
15936 * providers/maildir/Makefile.am: same.
15937 * providers/mbox/Makefile.am: same.
15938 * providers/nntp/Makefile.am: same.
15939 * providers/pop3/Makefile.am: same.
15940 * providers/sendmail/Makefile.am: same.
15941 * providers/smtp/Makefile.am: same.
15943 2000-05-02 NotZed <NotZed@HelixCode.com>
15945 * providers/mbox/camel-mbox-search.c
15946 (camel_mbox_folder_search_by_expression): Dont store/remove
15947 current search from the search list.
15949 * providers/mbox/camel-mbox-folder.h: Removed searches list,
15950 searches are all sync now.
15952 * gmime-utils.[ch]: What the hell, remove it. This will break the
15953 nntp provider. The mime parser can be used instead though.
15954 Removed from all code including it (but none were using it).
15956 * gmime-utils.c (_store_header_pair_from_string): Removed bizarre
15957 string_dichotomy version of this. This code is somewhat redundant
15958 now, and is headed for death anyway.
15960 * gstring-util.c (g_string_dichotomy): Same with this one.
15961 (g_string_clone): Removed a memory leak, g_string_new() allocates
15963 (g_string_append_g_string): Allow to append an empty gstring onto
15964 another gstring, dont abort()!
15966 * string-utils.c (string_dichotomy): Removed this incredibly weird
15969 * camel-folder.c (_create): Replaced the rather obtuse use of
15970 "string_dichotomy" function with a simple strrchr(). Still not
15973 * camel-folder-summary.c: cvs removed a long-removed file.
15975 * camel-mime-parser.c (folder_scan_header): Fix the previous
15976 overflow problem properly (can happen in 2 places).
15977 (header_append): A new macro to include the code changed above, so
15978 it only appears in one place.
15979 (folder_scan_step): Change the content type to text/plain if the
15980 multipart is broken. Doesn't actually change the header though.
15981 (header_append): Also move the header-start tracking stuff here.
15982 Could be a static function to save code.
15984 2000-05-02 <notzed@helixcode.com>
15986 * camel-mime-part-utils.c
15987 (simple_data_wrapper_construct_from_parser): Dont use autofill on
15988 these fucking long function anmes!!!!!!
15990 2000-05-02 NotZed <NotZed@HelixCode.com>
15992 * providers/mbox/camel-mbox-summary.c
15993 (camel_mbox_summary_expunge): Fix the offset for the summary when
15994 an item is expunged to take account of the From line.
15996 2000-05-01 NotZed <NotZed@HelixCode.com>
15998 * providers/mbox/camel-mbox-folder.h (CamelMboxFolder): Removed
16001 * providers/mbox/camel-mbox-search.c
16002 (camel_mbox_folder_search_cancel): Remove.d
16003 (camel_mbox_folder_search_complete): Removed.
16004 (camel_mbox_folder_search_by_expression): Changed back to sync
16006 (struct _searchcontext): Removed cancelled flag.
16007 (find_context): Removed.
16008 (func_header_contains): Debug out some search stuff.
16010 * providers/mbox/camel-mbox-search.h
16011 (camel_mbox_folder_search_by_expression): Moved back to sync api.
16013 * providers/mbox/camel-mbox-summary.c
16014 (camel_mbox_summary_set_flags_by_uid): New function to update the
16015 flags in the summary.
16016 (camel_mbox_summary_expunge): Expunge messages from a folder.
16017 (offset_content): Re-align offsets of summary when messages
16018 added/removed to an existing summary.
16019 (camel_mbox_summary_remove_uid): Remove a message summary entry by
16021 (index_folder): Restore flags from X-Evolution header, if they are set.
16022 (index_folder): Make sure we index using a decimal uid, since
16023 thats what everything else indexes off (oops).
16024 Upped SUMMARY_VERSION as a result.
16025 (camel_mbox_summary_expunge): Oops, my wrong, use the string uid
16028 * providers/mbox/camel-mbox-folder.c (_get_message_by_uid):
16029 Connect to the message_changed signal.
16030 (_init): Set permanent flags to something reasonable. No user
16032 (message_changed): If the flags of the message change, update the
16033 flags in the summary.
16034 (mbox_expunge): Implement the expunge.
16035 (camel_mbox_folder_class_init): Renamed all leading _'s to mbox_'s
16036 (mbox_expunge): Emit a folder_changed signal on expunge (uh, even
16039 * camel-folder.c (_finalize): Uh, dont free permanent_flags
16040 anymore (this wouldn't failed anyway, it was a GList !!!)
16041 (camel_folder_search_complete): Removed.
16042 (camel_folder_search_cancel): Removed.
16043 (camel_folder_expunge): Changed to only allow expunge on an open
16044 folder. It doesn't make sense for mbox, otherwise (?)
16045 (camel_folder_class_init): Added a folder_changed signal.
16047 * camel-folder.h (struct _CamelFolder): Change permanent_flags to
16049 (list_permanent_flags): Renamed to get_permanent_flags, and
16050 returns a bitfield.
16051 (camel_folder_expunge): Changed expunge to a void type. The
16052 messages would no longer be useful after they have been removed
16054 (CamelFolderClass): New function summary_get_by_uid() to get a single
16056 (*search*): Moved back to synchronous search api ... *sigh*
16058 * camel-folder.h: Removed CamelSearchFunc.
16060 * camel-mime-message.c (set_flag): Removed.
16061 (camel_mime_message_set_flag): Removed.
16062 (get_flag): Removed.
16063 (camel_mime_message_get_flag): Removed.
16064 (add_flag_to_list): Removed.
16065 (get_flag_list): Removed.
16066 (camel_mime_message_get_flag_list): Removed.
16067 (camel_mime_message_get_flags): New interface to get system flags.
16068 (camel_mime_message_set_flags): " to set ".
16069 (camel_mime_message_get_user_flag): To get a user flag.
16070 (camel_mime_message_set_user_flag): To set a user flag.
16071 (finalize): Hmm, the old one free'd the key and data, not good
16072 when the data is a boolean ...
16074 2000-04-30 Dan Winship <danw@helixcode.com>
16076 * camel-provider.h: Tweak the definition of CamelProvider. Among
16077 other things, a provider may now be both a store and a transport.
16079 * camel-provider.c: Remove a lot of code we had no intention of
16080 using. This now only contains two functions: camel_provider_init
16081 to read the installed .urls files, and camel_provider_load to
16082 load and register a new provider.
16084 * camel-session.c: Remove more unused code and simplify some of
16085 the remaining code. The list of available provider modules is now
16086 stored in the session, and it handles calling camel_provider_load
16087 to load them as needed. Provider registration is now done by
16088 calling back from the module init routine, which allows a single
16089 module to register providers for multiple URL types.
16091 * providers/*: Update provider structures and init routines for
16092 the new stuff. Add a .urls file to each provider specifying what
16093 urls it handles, and install that with the library.
16095 * providers/nntp/camel-nntp-provider.c: Add hints towards
16096 supporting both news: and nntp: URLs, and using nntp as both a
16097 store and a transport.
16099 2000-04-29 Dan Winship <danw@helixcode.com>
16101 * camel-internet-address.c (camel_internet_address_get): const
16104 * camel-mime-part-utils.c
16105 (simple_data_wrapper_construct_from_parser):
16106 camel_mime_parser_tell() returns an offset from where it started
16107 parsing, not necessarily from the start of data. Since we're
16108 parsing a bounded seekable_stream, we need to add the stream's
16109 starting bound to camel_mime_parser_tell's return value to
16110 create the substream in the right place.
16112 * camel-seekable-substream.c
16113 (camel_seekable_substream_new_with_seekable_stream_and_bounds):
16114 say CAMEL_STREAM_UNBOUND rather than -1 in doc.
16116 * camel-seekable-stream.c (camel_seekable_stream_seek): Add more
16119 2000-04-28 Dan Winship <danw@helixcode.com>
16121 * camel-mime-parser.c (folder_scan_header): fix a bug that would
16122 cause corruption with very long headers.
16124 2000-04-27 Ettore Perazzoli <ettore@helixcode.com>
16126 * providers/pop3/Makefile.am (INCLUDES): Add `-I$(srcdir)/../../..'
16127 to pick the Camel includes.
16128 * providers/sendmail/Makefile.am (INCLUDES): Likewise.
16130 * camel.h: Don't #include <camel/data-wrapper-repository.h> anymore.
16132 2000-04-27 NotZed <NotZed@HelixCode.com>
16134 * camel-mime-utils.c (check_header): Dont try and check a NULL
16137 * camel-recipient.[ch]: Dead. Its not pining.
16139 * camel-mime-message.h: Dont include recipients.h anymore.
16141 * camel-mime-message.c (camel_mime_message_add_recipient): Accept
16142 name/address separately, and store in an CamelInternetAddress.
16143 (add_recipient): Removed.
16144 (remove_recipient): Removed.
16145 (remove_recipient_address): Renamed from remove_receipient, works
16147 (camel_mime_message_remove_recipient_name): New function to remove
16149 (get_recipients): Removed.
16150 (camel_mime_message_get_recipients): Return a camel-internet-address.
16151 (write_to_stream): No longer write receipients directly.
16152 (write_recipients_to_stream): Removed.
16153 (write_one_recipient_to_stream): Removed.
16154 (camel_mime_message_init): Setup recipients hashtable, rather than
16155 usign the recipients stuff.
16156 (set_recipient_list_from_string): Killed, a violent and lengthy
16158 (process_header): Simplified recipient handling code a lot.
16159 (received_date_str, sent_date_str, reply_to_str, subject_str,
16160 from_str): Removed some oddly-defined global statics.
16161 (camel_mime_message_class_init): Dont initialise above variables
16163 (init_header_name_table): Removed, use a table to init this, and
16164 do it in class init (2 lines of code ...).
16166 * camel-news-address.c: Class to represent news addresses -
16167 currently empty, and not built.
16169 * camel-internet-address.h: Class to represent internet (email)
16172 * camel-address.h: Abstract class to represent (lists of)
16175 2000-04-27 Dan Winship <danw@helixcode.com>
16177 * camel-mime-part.c (write_to_stream): Revert previous change. I
16180 * camel-url.[ch] (camel_url_encode, camel_url_decode): expose
16183 2000-04-26 Dan Winship <danw@helixcode.com>
16185 * camel-mime-part.c (write_to_stream): Only write a newline
16186 between the headers and the content object if the content object
16187 is not a CamelMedium. (If the content is a medium, it may have its
16188 own headers, which then need to go before the blank line.)
16190 * camel-mime-body-part.[ch]: Remove. We weren't using the fields
16191 that made this different from camel-mime-part, so it basically
16192 just forced us to do lots of gratuitous typecasting.
16194 * camel-multipart.[ch]: Use CamelMimePart. Remove the multipart
16195 parent stuff, since we weren't using that either.
16197 * etc: update for CamelMimeBodyPart -> CamelMimePart
16199 2000-04-26 Dan Winship <danw@helixcode.com>
16201 * camel-medium.c (set_content_object): sink the content object
16202 after referencing it.
16204 * camel-mime-part.c: fix various little things in the handling
16205 of CamelMedium methods. Change camel_mime_part_set_text to the
16206 more generic camel_mime_part_set_content.
16208 * camel.h: sync to current reality
16210 * camel-folder-utils.[ch]: removed
16212 * camel-mime-utils.c (header_format_date): fix format specifier
16213 for time zone. Fix typo in month names array.
16215 2000-04-26 NotZed <NotZed@HelixCode.com>
16217 * camel-seekable-substream.c (stream_seek): Changed to have
16218 absolute seek semantics, not relative to the bounds.
16220 * camel-seekable-stream.c (reset): When we reset, seek to the
16221 start of the bound, if there is one.
16222 (stream_tell): Make tell virtual.
16224 * camel-stream-filter.c (do_available): Removed.
16226 * camel-stream-buffer.c: Remove leading _'s from static functions.
16227 (stream_read): Renamed from read(). Fancy that conflicting! (my
16230 * providers/pop3/camel-pop3-folder.c (get_message_by_number):
16231 Changed to stream_mem interface.
16233 * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): Fixed
16234 for streamfs interface changes, and implement a failure case.
16235 (_append_message): Changed for fs stream interface change.
16237 * camel-multipart.c (print_part): Iterate rahter than callback. I
16238 hate glists's interface (hence, move this to write_to_stream).
16239 (write_to_stream): Return an error (yuck, this is a royal PITA to
16240 do with the stream write interface).
16242 * camel-mime-message.c: Removed leading _ from static names.
16244 * camel-mime-part.h: construct_from_parser() now returns an error
16247 * camel-mime-part-utils.c
16248 (camel_mime_part_construct_content_from_parser): Changed to use a
16249 camel-data-wrapper instead of a camel-simple-data-wrapper (no
16250 change needed elsewhere?).
16251 (simple_data_wrapper_construct_from_parser): Fixes for stream-mem
16254 * camel-simple-data-wrapper.[ch],
16255 camel-simple-data-wrapper-stream.[ch],
16256 camel-stream-data-wrapper.[ch], removed. Fixed including of these
16259 * camel-mime-part.c (camel_mime_part_set_text): Remove the use of
16260 the camel-simple-data-wrapper-stream, just use a mem stream.
16261 (write_to_stream): Renamed from my_*
16262 (construct_from_stream): Return an error on error.
16264 * camel-stream-mem.c (camel_stream_mem_new*): Remove mode
16267 * camel-stream-mem.h (enum CamelStreamMemMode): Removed. It
16268 wasn't used at all.
16270 * camel-data-wrapper.h: Add camel_data_wrapper_new() to create
16272 (write_to_stream, construct_from_stream): Return an error
16273 indicator for success. Fixed all methods to match (ICK).
16275 * Makefile.am (libcamel_la_SOURCES): Remove
16276 camel-simple-data-wrapper.c, camel-simple-data-wrapper-stream.c,
16277 camel-stream-data-wrapper.c. Obsoleted by code re-use!
16279 * camel-data-wrapper.c (construct_from_stream): Change the default
16280 implementation to just set the output stream == construction
16281 stream. Well, this lets me get rid of both simple-data-wrapper
16282 and stream-data-wrapper (unused anyway), and
16283 simple-data-wrapper-stream in one hit. CamelDataWrapper is now
16284 also a concrete class.
16285 (write_to_stream): Use camel_stream_write_to_stream() to
16286 calculate/return values (and save code).
16287 Include <errno.h> for obvious reasons.
16289 * camel-stream.c (eos): Provide a default implementation of .eos().
16290 (camel_stream_write_to_stream): Make it return an error code on
16292 (camel_stream_printf): Changed to return the number of bytes
16294 (camel_stream_available): Removed.
16296 * camel-stream-fs.h (enum CamelStreamFsMode): Removed. Changed to
16297 use unix modes and so forth (wasn't used for anything but new file
16298 creation and didn't work well either).
16300 * camel-stream-fs.c: Removed leading _'s for names. And removed
16301 some virtual method 'documentation'.
16302 (destroy): Dont try and close a closed/error fd. Only report
16303 error if close returns -1. Moved all the code to finalise(), and
16304 killed this function.
16305 (init_with_fd): Properly setup the seek offset, if it is a
16306 valid and seekable file descriptor.
16307 (init_with_fd_and_bounds): Use off_t for bounds, set bounds on the
16309 (init_with_name): Return error codes.
16310 (init_with_name_and_bounds): Ditto.
16311 (camel_stream_fs_new_with_name): REturn NULL object if it failed.
16312 (camel_stream_fs_new_with_name_and_bounds): Return NULL object on
16313 failure. Changed with_name* api's to take unix open style args
16315 (read): The bounded stream bounds checking seemed off, simplified
16317 (write): Implement bounds checking for writing, the comment was
16318 wrong, it could make sense to bound writing. Cleaned up a little.
16320 (eos): Removed. Use CamelStream's implementation now.
16321 (close): Reset the fd to -1, provide a warning for bad usage.
16322 (seek): Cleaned up. Changed the behaviour a little, the returned
16323 offset is the absolute position in the file, even in bounded
16325 (seek): Seek from end mirrors lseek() behaviour (reverse seeking).
16327 2000-04-25 NotZed <NotZed@HelixCode.com>
16329 * camel-stream-fs.h (struct _CamelStreamFs): Moved bounds and eof
16330 indicator to other parent classes.
16332 * camel-stream.c (camel_stream_printf): New utility
16333 function. Obvious use.
16335 * camel-stream-mem.c: Removed leading _'s from static func's.
16336 (camel_stream_mem_new_with_byte_array): Fixed for api changes, set
16337 the owner for the byte array to us.
16338 : Removed A bunch of gtk doc stuff for static (implementation) functions.
16339 (available): Removed.
16340 (write): Fixed the write implementation so that seek() works on a
16341 seekable memory stream, as expected. Seeking past the end of the
16342 buffer has unix semantics (filling with 0).
16343 (available): Removed.
16344 (write): Implement seekable stream bounded stream.
16345 (read): Implement seekable stream bounded stream.
16346 (close): Dont free the stream_mem if we're not the owner.
16347 (seek): Allow to seek beyond the end of memory area,
16348 implement bounds checking.
16349 (seek): Set errno on bad policy.
16351 * camel-stream-mem.h (struct _CamelStreamMem): Changed position to off_t.
16352 (new_with_buffer): Changed len to be a size_t.
16353 (set_buffer, set_byte_array): New interface functions.
16354 (struct _CamelStreamMem): Removed position, it is stored in the
16357 * camel-stream.h: Removed some of the seemingly random
16358 whitespace. Removed the available method (its not
16359 impelemented/useful enough).
16361 * camel-seekable-substream.c
16362 (init_with_seekable_stream_and_bounds): Remove the data_available
16363 stuff, it hasn't been properly implemented/finished, and may never
16364 work (unfortunately *sigh).
16365 (reemit_parent_signal): Removed part of the above change.
16366 (set_bounds): Removed (moved to seekable-stream).
16367 : Fixed up some of the generally unreadable indenting (sorry,
16368 wrapping at 80 characters with
16369 camels_really_long_function_names()
16370 just_doesnt_work_very_well_does_it().
16371 (available): Removed.
16372 (stream_seek): Fixup for object changes. Make sure we return -1
16373 if the parent stream can't seek.
16375 * camel-seekable-stream.c (ccamel_seekable_stream_set_bounds): New
16376 function to bound any seekable stream.
16378 (camel_seekable_stream_class_init): Implement an init function, to
16379 setup the stream bounds to unbound.
16381 * camel-seekable-stream.h (CamelSeekableStreamClass): New virtual
16382 method set_bounds for seekable streams.
16383 (CAMEL_STREAM_UNBOUND): New define for no bound.
16385 * camel-seekable-substream.h (struct _CamelSeekableSubstream):
16386 Removed sup_bound and inf_bound, moved to CamelSeekableStream (and
16387 renamed, and changed to off_t's).
16388 (new_with_seekable_stream_and_bounds): Use off_t as the bounds.
16389 (CamelSeekableSubstreamClass): Uh, why was the intialiser virtual?
16392 * camel-seekable-stream.[ch] (CamelSeekableStreamClass): Changed seek
16393 to accept an off_t as the offset.
16394 (struct _CamelSeekableStream): Renamed cur_pos to position and
16395 changed it to an off_t type.
16396 (enum CamelStreamSeekPolicy): Set to match the SEEK_* constants
16398 (get_current_position): Renamed to tell().
16400 * camel-stream-buffer.h: Commented out set_vbuf - never implemented.
16402 2000-04-25 Dan Winship <danw@helixcode.com>
16404 * camel-stream-buffer.c (_eos): only return TRUE if the parent is
16405 at eos AND the buffer has been exhausted
16407 * camel-mime-message.c: fix some incorrect macro usage that
16408 resulted in bogus casts
16410 2000-04-24 Dan Winship <danw@helixcode.com>
16412 * camel-mime-part-utils.c
16413 (simple_data_wrapper_construct_from_parser): fix a cut-and-pasto.
16415 * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): ref
16416 (and sink) the message stream if we're going to unref it later.
16417 Otherwise it could get destroyed while there are still substreams
16418 attached to it. This needs a cleaner solution.
16420 * camel.h: remove data-wrapper-repository.h include(s)
16422 2000-04-24 NotZed <NotZed@HelixCode.com>
16424 * camel-mime-message.c (construct_from_parser): Allow MESSAGE_END
16425 _or_ EOF as valid termination conditions.
16427 * providers/mbox/camel-mbox-summary.c (message_struct_new): Decode
16428 and then re-encode the addresses, so they are consistently
16431 * camel-mime-utils.c (header_decode_mailbox): Store the address in
16432 a _header_address. And try to get a comment-stored name if there
16434 (header_decode_address): Actually return an address.
16435 (header_to_decode): Renamed to header_address_decode()
16436 (header_mailbox_decode): New function to get a single mailbox.
16437 (header_mime_decode): Return the major/minor value, as
16439 (header_address_new, and friends): Whole bunch of utility
16440 functions for working with the address thingies.
16441 (header_decode_domain): Free the string header, and dont expand
16444 * camel.c (camel_init): No longer call
16445 data_wrapper_repository_init.
16447 * camel-medium.c (write_to_stream): Moved (back) to
16452 (get_header): Make all these abstract, and spit warnings if
16453 called. I guess it could manage the list, but well, it doesn't.
16455 * camel-medium.h (struct _CamelMedium): Dont store headers here,
16456 the implementor is the only one who knows their format.
16457 (CamelMediumClass): Changed header values to be void *'s. They
16458 need not be strings?
16460 * camel-simple-data-wrapper.c (construct_from_stream): And we're
16461 back. Set the output stream.
16462 (construct_from_parser): Moved to camel-mime-part-utils.
16464 * camel-mime-part-utils.c
16465 (camel_mime_part_construct_content_from_parser): Create the
16466 contents of multipart and simple messages.
16467 (camel_mime_part_construct_content_from_parser): Oops, this was
16468 totally screwed up, try creating the right cotnent on the right
16471 * camel-multipart.c (construct_from_parser): Moved to
16472 camel-mime-part-utils.
16473 (separate_part): Removed.
16475 * camel-mime-part.c (construct_from_stream): Back again! This now
16476 switches over to using a mime parser for any mime parts, only.
16477 (my_write_to_stream): Write our headers and so forth here.
16478 (add_header): Add header directly, parent class is abstract.
16479 (remove_header): Ditto.
16480 (set_header): Ditto.
16482 * camel-data-wrapper.c (camel_data_wrapper_construct_from_stream):
16484 (camel_data_wrapper_construct_from_parser): Moved to
16487 * camel-data-wrapper.h: Put back construct_from_stream.
16489 * camel-mime-part.h: Put construct_from_parser in here, the
16490 data-wrapper shouldn't know about mime. Ok, so now to undo half
16491 of the last hours changes ... duh.
16493 2000-04-23 Dan Winship <danw@helixcode.com>
16495 * camel-mime-utils.c (header_to_decode, header_mime_decode): fix
16496 some obvious minor bugs noted by -Wall.
16498 2000-04-23 NotZed <NotZed@HelixCode.com>
16500 * providers/pop3/camel-pop3-folder.c (get_message_by_number): Use
16501 construct_from_stream instead of set_input_stream().
16503 * camel-simple-data-wrapper-stream.c
16504 (camel_simple_data_wrapper_stream_construct): REmoved the destroy
16506 (wrapper_destroy_cb): Removed.
16508 * camel-simple-data-wrapper.h: Add prototype for _construct()
16511 * camel.c: Include unicode.h to kill a warning.
16513 * camel-data-wrapper.h (CameldataWrapperClass): Removed
16514 construct_from_stream virtual method.
16515 Removed get/set input stream.
16517 * data-wrapper-repository.[ch]: Removed&from build. Obsoleted?
16518 The justification as is follows: It is mixing storage
16519 protocol/format with message architecture. It really just doesn't
16520 serve any purpose, as each medium implementor will have to have its
16521 own type->handler mapping, and the only current implementor,
16522 mimepart has a very simple structure and no need for this.
16524 * camel-medium.c (write_to_stream): Moved here from most of the
16525 stuff in camel-mime-part. Well, the MEDIUM is the one that knows
16526 what the headers are, and the content is, let it write it out.
16528 * camel-mime-part-utils.c (camel_mime_part_construct_content):
16529 Copied from camel-mime-part.c, removed handling of message
16530 followon state (moved to camel-mime-message).
16531 (camel_mime_part_construct_content_from_parser): Renamed from
16533 (camel_mime_part_construct_headers_from_stream):
16534 (camel_mime_part_construct_content_from_stream):
16535 (camel_mime_part_store_stream_in_buffer): Removed. Replaced by
16536 the new construct from parser stuff.
16538 * camel-mime-message.c (construct_from_parser): Do
16539 construct_from_parser for mime-message.
16540 (_write_to_stream): Set the mime-version header for medium to
16541 write out, rather than writing it out ourselves.
16543 * camel-data-wrapper.c (set_mime_type_field): Ref the
16544 content_field when we get it?
16545 (construct_from_stream): Removed.
16546 (camel_data_wrapper_construct_from_stream): Changed to a helper
16547 function, creates a mime_parser, and constructs from that.
16548 (set_input_stream): Removed.
16549 (camel_data_wrapper_set_input_stream): Removed.
16550 (get_input_stream): Removed.
16551 (camel_data_wrapper_get_input_stream): Removed.
16553 * camel-mime-parser.c (camel_mime_parser_unstep): New function.
16554 Cause a subsequent call to mime_parser_step() to return the same
16557 * providers/mbox/camel-mbox-folder.c (_get_message_by_uid):
16558 Initial test code using the mime parser to construct the message.
16559 (_get_message_by_uid): Use construct_from_stream() instead of
16560 creating our own parser.
16562 * camel-mime-part.c (construct_from_parser): part constructor.
16563 (camel_mime_part_construct_content): Basically a simpler
16564 replacement for the datawrapper repository.
16565 (camel_mime_part_init): Set the default type to text/plain.
16566 (camel_mime_part_construct_content): Removed to
16567 camel-mime-part-utils.c
16568 (my_get_output_stream): Removed. The streeam is in the
16570 (my_get_content_object): Removed. The content object is stored in
16571 the medium. If none is there, the object wasn't created properly.
16572 (my_write_content_to_stream): Removed. The content object is the
16573 one that knows how to write itself out!!!!!!!!
16574 (my_write_to_stream): Remove the base header writing stuff - has
16575 been moved to camel-medium, where it belongs. This can just be
16576 used to check for mandatory headers.
16577 (my_construct_from_stream): Removed.
16578 (my_set_input_stream): What the hell, i'll remove this too.
16579 Nobody seems to understand how it differs from create from stream,
16580 and they both seem to serve the same purpose ...
16582 * camel-simple-data-wrapper.c (construct_from_parser): Initial
16583 implementation of a content constructor.
16584 (construct_from_stream): Removed! Job taken over by
16585 construct_from_parser.
16587 * camel-multipart.c (construct_from_parser): Multipart
16588 construction routine.
16589 (camel_multipart_init): Set the default multipart type to
16590 multipart/mixed. Duh, no subtype is not allowed anyway.
16591 (set_input_stream): REmoved. Replaced by construct_from_parser.
16593 2000-04-22 Dan Winship <danw@helixcode.com>
16595 * camel-multipart.[ch]: clean, document, etc.
16596 (camel_multipart_init): pick a prettier default boundary. Still
16597 need to deal with the larger problem
16599 2000-04-22 NotZed <NotZed@HelixCode.com>
16601 * camel-mime-message.h (struct _CamelMimeMessage): Removed
16602 send_date, and received_date, and replaced it with a time_t
16603 'date' (this is what the header is called), and date_offset to
16604 store the GMT offset of the date.
16606 * camel-mime-message.c (camel_mime_message_set_from): Update raw
16608 (_set_from): Removed.
16609 (_get_from): Removed.
16610 (camel_mime_message_get_from): Moved implementation here.
16611 (camel_mime_message_get_subject): Move implementation here.
16612 (_get_subject): Nuked.
16613 (camel_mime_message_set_subject): Handle utf-8 input, and also
16614 update raw header when changed.
16615 (_set_subject): Removed.
16616 (_set_received_date): Removed.
16617 (camel_mime_message_set_received_date): Removed.
16618 (_get_received_date): Removed.
16619 (camel_mime_message_get_received_date): Removed.
16620 (_get_sent_date): Removed.
16621 (camel_mime_message_get_sent_date): Removed.
16622 (camel_mime_message_get_date): New function to get the date as a
16624 (camel_mime_message_set_date): Set the date as a time_t/offset.
16625 (camel_mime_message_get_date_string): Get the date as a string.
16626 (camel_mime_message_init): Initialise the current date as
16627 'CMAEL_MESSAGE_DATE_CURRENT'.
16628 (_set_reply_to): Removed.
16629 (camel_mime_message_set_reply_to): Moved implementation here.
16630 This is still broken, reply-to can have multiple addresses.
16631 (_get_reply_to): Removed.
16632 (_set_field): Removed, no longer used anywhere.
16633 (_get_field): Also removed.
16634 (_init_header_name_table): Add the Date header.
16635 (process_header): Also handle snooping of Date header here.
16637 * camel-stream-filter.c (finalise): Unref the source stream on
16638 finalise, and also call the parent class (oops).
16640 * camel-mime-parser.c (camel_mime_parser_state): New function to
16641 get the current parser state.
16642 (camel_mime_parser_stream): Allow you to get the stream back from
16644 (camel_mime_parser_fd): Alternative to allow you to get the fd
16645 back from the mime_parser.
16646 (folder_scan_init_with_stream): Properly ref/unref the stream.
16647 (folder_scan_close): Properly unref the stream/close the fd on
16649 (folder_scan_init_with_fd): Close the old fd if there is one.
16651 * camel-data-wrapper.c (camel_data_wrapper_construct_from_parser):
16652 New method, construct a data wrapper from an initialised parser.
16653 (construct_from_parser): Empty implementation.
16655 * providers/mbox/camel-mbox-summary.c (message_struct_new):
16656 Convert subject line to unicode, before storing in the summary.
16657 (strdup_trim): Removed, no longer needed.
16659 * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): Ref
16660 the folder after setting it in the new message.
16662 * camel-mime-part.c (my_set_content_object): Have the headers
16663 follow the content-type change here too.
16664 (my_write_to_stream): Dont write content-type here, automatically
16665 stored in the headers ...
16666 (my_write_to_stream): Use header_disposition_format() to format
16667 the content-disposition header.
16668 (my_write_to_stream): Removed old code, all headers are now stored
16669 in the camel-medium level, always. Need to do the same with
16670 camel-mime-message i suppose ...
16671 (my_write_to_stream): Write the content using the parent class,
16672 not some weird function.
16673 (camel_mime_part_class_init): Dont override get_output_stream.
16674 (camel_mime_part_encoding_from_string): Bleh, make it
16677 * camel-mime-utils.c (header_content_type_is): Handle empty types.
16678 (header_encode_string): Start of an implementation of the rfc2047
16679 encoder. It does iso-8859-1, and us-ascii, and utf-8 (others get
16681 (rfc2047_encode_word): Convert a single word/string into rfc2047
16683 (quoted_encode): Different quoted-printable encoding for rfc2047
16684 encoding of headers.
16686 * gmime-content-field.c (gmime_content_field_write_to_stream): Use
16687 header_content_type_format() to format it.
16689 2000-04-21 NotZed <NotZed@HelixCode.com>
16691 * camel-mime-utils.h: Add prototype for header_param_list_free.
16693 * camel-recipient.c: New function to remove all the types of a
16694 recipient list. I think this whole object needs a major review.
16696 * camel-mime-message.c (camel_mime_message_class_init): Removed
16697 parse_header_pair override, override add_header instead.
16698 (_parse_header_pair): Renamed to add_header.
16699 (remove_header): Add this method, to make sure we keep upto date
16700 with removed headers too.
16701 (_set_field): If given a NULL value, clear it out.
16702 (_set_recipient_list_from_string): Constify.
16703 (set_header): Override set_header from camel_medium.
16704 (process_header): Local function to handle set/add/remove of each
16705 header we know about.
16707 * camel-mime-part.c (camel_mime_part_class_init): Removed
16708 parse_header_pair setup.
16709 (my_parse_header_pair): Moved into add_header(), removed.
16710 (my_set_disposition): Allow a NULL disposition to clear it.
16711 (my_set_content_id): Allow NULL content id to clear it.
16712 (remove_header): Track removed headers.
16713 (my_set_description): Allow NULL description to clear it.
16714 (my_set_content_MD5): Make sure we copy the md5 value, and allow a
16715 NULL value to reset it.
16716 (my_set_filename): Copy the filename.
16717 (my_set_header_lines): Removed. Nothing uses it, it doesn't
16718 actually serve any purpose.
16719 (camel_mime_part_set_header_lines): Ditto.
16720 (my_get_header_lines): Ditto.
16721 (camel_mime_part_get_header_lines): Ditto.
16722 (camel_mime_part_class_init): Remove *_header_lines setup.
16723 (camel_mime_part_init): Remove header_lines init.
16724 (my_finalize): Remove header_lines finalise.
16725 (my_write_to_stream): Write the headers here. This is just WRONG,
16726 camel_medium should be doing this.
16727 (my_get_output_stream): Kill a warning.
16728 (camel_mime_part_encoding_to_string): Ditto.
16729 (camel_mime_part_set_description): Unvirtualiase, use add_header()
16730 to do the processing.
16731 (my_set_description): Removed.
16732 (set_disposition): Renamed from my_set_disposition.
16733 (camel_mime_part_get_description): Get the descriptionf rom the
16735 (my_get_description): Removed.
16736 (my_set_filename): Removed.
16737 (camel_mime_part_get_filename): Get the parameter from the
16739 (camel_mime_part_encoding_from_string): Handle NULL string.
16740 (camel_mime_part_init): Remove reference to filename.
16741 (my_finalize): Dont free filename.
16743 * camel-mime-part.h (CamelMimePartClass): Removed
16744 parse_header_pair() method, it doesn't add anything that
16745 add_header() can't be used for.
16746 (CamelMimePartClass): Remove *_header_lines methods.
16747 (struct _CamelMimePart): Remove header_lines list.
16748 (struct _CamelMimePart): Removed filename attribute.
16750 * camel-medium.c (camel_medium_init): Init headers to null, not a
16752 (add_header): Append the headers as a list.
16753 (remove_header): Remove headers as a list.
16754 (get_header): Likewise for lookup.
16755 (free_header): Removed, no longer needed.
16756 (finalize): Free headers using header_raw_clear().
16757 (camel_medium_set_header): New function, to reset and override all
16758 values of a header with a new value.
16760 * camel-medium.h (struct _CamelMedium): Changed to use a
16761 header_raw struct rather than a hash table, to store headers
16762 (many headers can occur multiple times).
16764 * camel-mime-utils.c (header_raw_find_next): New function, allows
16765 you to find multi-valued header fields.
16766 (header_disposition_format): New function to format/create
16767 content-disposition header string.
16768 (header_param_list_format_append): Function to format parameter
16769 lists into a GString.
16770 (header_content_type_format): Function to format content-type into
16772 (header_set_param): allow NULL value to remove the parameter.
16773 (decode_token): Renamed from header_decode_token.
16774 (header_decode_token): New interface for external use.
16775 (quoted_decode): Made static to kill annoying warnings.
16776 (g_strdup_len): Killed, replaced with calls to g_strndup().
16777 (rfc2047_decode_word): Made static to kill warnings.
16778 (decode_coded_string): Terminated.
16779 (g_string_append_len): Made static to kill warnings.
16780 (header_decode_text): Made static to kill warnings.
16781 (header_decode_text): Constify.
16782 (rfc2047_decode_word): Constify.
16783 (header_param): Constify.
16784 (header_content_type_new): Copy the type/subtype strings.
16785 (header_param_list_decode): Made static.
16786 (header_param_list_format_append): Made static.
16787 (quoted_decode): Constify.
16788 (g_string_append_len): Constify.
16789 (header_token_decode): New function to decode a single token.
16791 * providers/mbox/camel-mbox-summary.c (header_write): Append a
16792 trailing \n when writing headers.
16793 (strdup_trim): Killed a warning.
16794 (camel_mbox_summary_set_uid): Make sure the next uid is at least 1
16795 higher than any existing one.
16796 (header_evolution_decode): Use header_token_decode to get the
16799 * camel-mime-parser.c (folder_scan_header): Strip the trailing \n
16800 of the end of all header lines.
16802 2000-04-20 NotZed <NotZed@HelixCode.com>
16804 * providers/mbox/camel-mbox-utils.[ch]: Removed.
16806 * providers/mbox/camel-mbox-parser.[ch]: Removed. Removed
16809 2000-04-20 Dan Winship <danw@helixcode.com>
16811 * camel-mime-utils.c (rfc2047_decode_word): use libunicode iconv
16812 functions rather than libc ones (since libc might not have them).
16813 (header_decode_date): add autoconfiscation on timezone code
16815 * camel.c (camel_init): call unicode_init ()
16817 2000-04-20 NotZed <NotZed@HelixCode.com>
16819 * providers/mbox/camel-mbox-summary.c (message_struct_new): Trim
16820 leading/trailing spaces off the raw headers.
16822 * MERGE NEW_PARSER branch into HEAD, fixed conflicts.
16824 * gmime-content-field.c (_print_parameter): Duh, removed again
16827 * camel-mime-utils.c (header_content_type_is): Constify.
16828 (header_content_type_unref): Killed a couple warnings.
16830 * camel-folder.c (_init): Removed more log crap.
16832 * providers/Makefile.am (SUBDIRS): Removed nntp, pending fixes for
16835 * providers/mbox/camel-mbox-folder.c (_get_message_by_number):
16836 Fixed for new summary interface. Added a warning for using this
16838 (_get_message_by_uid): Fixed for message new with session
16841 2000-04-19 Dan Winship <danw@helixcode.com>
16843 * camel-simple-data-wrapper-stream.c
16844 (camel_simple_data_wrapper_stream_get_type): This is a subtype of
16845 CamelSeekableStream, not CamelStream.
16847 * camel-seekable-substream.c: clean up a lot.
16848 (eos): When testing for end-of-stream, reset the parent position
16849 before testing if it is at end-of-stream, since either (a) it may
16850 have been seek'ed to eos by someone else, or (b) we may have been
16851 seek'ed away from eos and it hasn't been synced yet.
16853 * camel-medium.[ch] (camel_medium_add_header): const poison.
16854 (Belatedly goes with my change of 2000-02-23.)
16855 (camel_medium_init): Use g_strcase_{hash,equal} on the header
16858 2000-04-18 Dan Winship <danw@helixcode.com>
16860 * camel-mime-part.c (my_set_input_stream):
16861 * camel-data-wrapper.c (set_input_stream, set_output_stream): do
16862 better reference counting of streams so they actually go away
16865 * camel-log.[ch], *: Nuke camel log stuff. Replace calls to
16866 CAMEL_LOG_WARNING with calls to g_warning.
16868 * camel-data-wrapper.[ch]:
16869 * camel-simple-data-wrapper.[ch]:
16870 * camel-medium.[ch]: Clean, polish, document. Most of the gtk-doc
16871 comments added to camel-data-wrapper.c note serious problems that
16874 2000-04-17 Dan Winship <danw@helixcode.com>
16876 * camel-mime-message.[ch]: Remove the "session" field from
16877 CamelMimeMessage. Nothing uses it, about half of the existing
16878 calls to camel_mime_message_new_with_session pass NULL, and
16879 there's no obvious reason for it to be there.
16881 * providers/MH/camel-mh-folder.c:
16882 * providers/maildir/camel-maildir-folder.c:
16883 * providers/mbox/camel-mbox-folder.c:
16884 * providers/mbox/camel-mbox-utils.c:
16885 * providers/nntp/camel-nntp-folder.c:
16886 * providers/pop3/camel-pop3-folder.c: Use camel_mime_message_new
16887 instead of camel_mime_message_new_with_session.
16889 * camel-session.c (get_store_for_protocol_with_url): Set the
16890 exception if no provider is found.
16892 * camel-url.c: Add code to encode and decode %-escapes in URLs,
16893 and do some additional correctness-checking on URL syntax. From
16894 Tiago Antà o with modifications by me.
16896 2000-04-14 Chris Toshok <toshok@helixcode.com>
16898 * providers/Makefile.am (SUBDIRS): add nntp
16900 2000-04-14 Christopher James Lahey <clahey@helixcode.com>
16902 * providers/mbox/camel-mbox-folder.c: Fix switch statement.
16904 2000-04-14 Chris Toshok <toshok@helixcode.com>
16906 * providers/nntp/camel-nntp-folder.c (_exists): always return TRUE
16907 for now. we need to check the server response to make sure the
16909 (_get_message_by_uid): make sure to account for the \n we add to
16910 the string after every line.
16912 * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): function
16913 to get the headers using the XOVER command.
16914 (get_HEAD_headers): function to get the headers using the HEAD
16915 command on each message. slooooooow.
16916 (camel_nntp_get_headers): make this function use either XOVER or HEAD
16917 versions depending on whether or not the server extension is present.
16919 2000-04-14 Dan Winship <danw@helixcode.com>
16921 * camel-formatter.[ch]: This didn't belong in Camel. Move to mail/
16923 * Makefile.am, camel-types.h: remove references to
16926 2000-04-12 Matt Loper <matt@helixcode.com>
16928 * camel-folder-pt-proxy.c (_folder_open_cb): Print warning message
16929 for broken function.
16930 (_folder_close_cb): Same.
16932 2000-04-12 Miguel de Icaza <miguel@gnu.org>
16934 * Makefile.am (pthread_SRC): Use correct names for the pthread
16937 2000-04-10 Dan Winship <danw@helixcode.com>
16939 * providers/pop3/camel-pop3-store.c (pop3_connect): fix various
16940 bugs in APOP code (still untested) and some of the error cases.
16942 * camel-provider.h: Clarify what provider.protocol, provider.name,
16943 and provider.description should be.
16945 * providers/mbox/camel-mbox-provider.c:
16946 * providers/pop3/camel-pop3-provider.c:
16947 * providers/sendmail/camel-sendmail-provider.c:
16948 * providers/smtp/camel-smtp-provider.c: update protocols, names,
16951 * providers/mbox/camel-mbox-folder.c (_get_message_by_number):
16952 implement get_message_by_number for the mail fetch code.
16954 2000-04-09 Jeffrey Stedfast <fejj@stampede.org>
16956 * providers/smtp/camel-smtp-transport.c: reformatted to fit
16957 the standard indent format used by helix code
16959 2000-04-09 Dan Winship <danw@helixcode.com>
16961 * camel-movemail.c: New file with new function to dot-lock an mbox
16962 file and copy it to a safe private directory.
16964 2000-04-08 Christopher James Lahey <clahey@helixcode.com>
16966 * providers/smtp/.cvsignore: Added a .cvsignore file.
16968 2000-04-08 Dan Winship <danw@helixcode.com>
16970 * providers/sendmail/camel-sendmail-transport.c (_send_internal):
16971 actually record the pid returned by fork(). Noticed by clahey.
16973 * providers/smtp/camel-smtp-transport.c: #include <sys/param.h>
16974 for MAXHOSTNAMELEN. (This is a stopgap: some of the uses of
16975 MAXHOSTNAMELEN are wrong anyway...)
16977 2000-04-07 Jeffrey Stedfast <fejj@stampede.org>
16979 * providers/smtp/camel-smtp-transport.c: fixes to numerous bugs;
16980 should now build fine.
16981 * providers/Makefile.am: Readded smtp now that smtp builds without
16984 2000-04-20 NotZed <NotZed@HelixCode.com>
16986 * providers/mbox/camel-mbox-summary.c
16987 (camel_mbox_summary_next_uid): Public function to get the next
16988 uid, makes sure its saved to disk too.
16990 * camel-mime-part.c (my_finalize): Fix disposition crap with a
16992 (my_set_disposition): Likewise.
16993 (my_get_disposition): And here.
16994 (my_write_to_stream): And here, needs more cleanup.
16996 * providers/mbox/camel-mbox-folder.c (_append_message): Assign a
16997 new uid at this point.
16999 * gmime-content-field.c (gmime_content_field_write_to_stream):
17000 Make something up if we have an invalid/missing content type
17003 2000-04-19 NotZed <NotZed@HelixCode.com>
17005 * providers/mbox/camel-mbox-folder.c (_delete): Fixed completely
17006 broken switch() syntax, only compiled because errno is a macro on
17008 (_list_subfolders): Likewise.
17010 2000-04-18 NotZed <NotZed@HelixCode.com>
17012 * camel-mime-parser.c (folder_scan_init): init stream to null.
17014 * providers/mbox/camel-mbox-summary.c
17015 (CAMEL_MBOX_SUMMARY_VERSION): Moved to .c file, incremented.
17016 (index_folder): Changed to have index passed via the summary.
17017 (decode_string): Do a sanity check on the string size, so we dont
17018 visit g_malloc()'s friendly abort().
17020 * camel-folder-pt-proxy.c (camel_folder_pt_proxy_class_init):
17021 Removed reference to set_name.
17022 (_set_name): Removed.
17024 * providers/mbox/camel-mbox-utils.c
17025 (parsed_information_to_mbox_summary): Removed. Most of this file
17026 is about to be binned.
17028 * providers/mbox/camel-mbox-search.c (func_header_contains): Fixes
17029 for changes to summary interface.
17030 (struct _searchcontext): Remove pointer to message info, get it
17031 straight from the mboxsummary.
17032 (camel_mbox_folder_search_by_expression): New summary interface.
17033 (camel_mbox_folder_search_by_expression): Uh, the summary is not
17034 an object anymore (well not yet).
17036 * providers/mbox/camel-mbox-folder.c
17037 (camel_mbox_folder_class_init): Removed set_name init.
17038 (_set_name): Removed.
17039 (_open): Call new summary interface.
17040 (_close): Use new summary interface.
17041 (_create): Removed a summary object leak.
17042 (_get_message_count): New summary interface.
17043 (_get_uid_list): Use new summary interface. FIXME: this is leaky.
17044 (_get_message_by_uid): Use the new summary interface, some
17046 (_append_message): Totally changed, basically just appends the
17047 message directly, ignores the summary (for now), the summary will
17048 fix itself up if it needs to.
17049 (_check_get_or_maybe_generate_summary_file): Bye bye old code.
17050 (summary_get_message_info): Implement get_message_info again, for
17053 * camel-folder.c (camel_folder_class_init): Removed set_name
17055 (_set_name): Moved contents into _init.
17056 (_init): Perform the old functions of set_name here.
17058 * camel-folder.h: Removed the set_name internal interface.
17060 2000-04-14 NotZed <NotZed@HelixCode.com>
17062 * providers/mbox/camel-mbox-summary.[ch]: Completely replaced with
17065 * Makefile.am (libcamel_la_SOURCES): Removed
17066 camel-folder-summary.[ch].
17068 * camel-folder.h (struct _CamelFolder): Removed summary.
17069 (struct _CamelFolder): Changed flags to be 1 bit bitfields.
17071 * camel-folder-summary.[ch]: Class removed entirely.
17073 * camel-folder.c (camel_folder_get_summary): Removed.
17074 (camel_folder_summary_get_message_info): Moved from
17075 camel-folder-summary.c
17076 (camel_folder_summary_get_subfolder_info): Moved from
17077 camel-folder-summary.c
17079 * camel-mime-parser.c (folder_scan_step): Store the start of
17080 headers and start of from in the scan state.
17081 (camel_mime_parser_tell_start_headers): Query the start of the
17083 (camel_mime_parser_tell_start_from): Query the cached start of
17086 2000-04-13 NotZed <NotZed@HelixCode.com>
17088 * gmime-content-field.c (gmime_content_field_free): Removed this
17089 function. If its too dangerous to use, it shouldn't be here.
17090 (gmime_content_field_ref): Also ref the embedded content-type.
17091 (gmime_content_field_unref): Ditto to unref it.
17093 * camel-mime-utils.h: Add a refcount for content-type header.
17095 * camel-mime-utils.c (header_content_type_unref): Implement unref
17097 (header_content_type_ref): Implement ref for header content type.
17099 2000-04-12 NotZed <NotZed@HelixCode.com>
17101 * gmime-content-field.h: Changed to use a _header_content_type.
17102 Added type/subtype back for compatability with clients.
17104 * gmime-content-field.c: Basically a total rewrite, and now just a
17105 thin wrapper ontop of header_content_type.
17106 (_free_parameter): Got rid of it.
17107 (gmime_content_field_new): Use header_content_type_* functions.
17108 (gmime_content_field_set_parameter): Likewise.
17109 (_print_parameter): Blow away.
17110 (gmime_content_field_write_to_stream): Get details from the
17111 content_type field. Should check if it needs to escape chars in
17112 the paramter value.
17113 (gmime_content_field_get_mime_type): Likewise.
17114 (___debug_print_parameter): Get rid of this rather annoyingly
17116 (gmime_content_field_get_parameter): Simplified function.
17117 (gmime_content_field_construct_from_string): Fixed this to use a
17119 (gmime_content_field_is_type): New function to test if a type matches.
17120 (gmime_content_field_construct_from_string): Track type/subtype
17121 from subordinate content_type header struct.
17123 * gmime-rfc2047.[ch]: Removed. Unused.
17125 * camel-stream-b64.[ch]: Blown away more duplicated code.
17127 * Makefile.am: Removed camel-stream-b64.[ch], and
17130 * camel-mime-part.c (my_get_content_object): Replaced
17131 camel-stream-b64 with camel-stream-filter/camel-mime-filter-basic.
17132 (my_write_content_to_stream): Replaced camel-stream-b64 with the
17133 camel-stream-filter with an encoder.
17134 (my_get_content_object): Also implement quoted-printable decoding.
17135 (my_write_content_to_stream): Also implement quoted-printable
17137 (my_get_output_stream): Took out stream-b64 code (nothing's being
17138 executed yet anyway).
17140 * gmime-base64.[ch]: Blown away. Not used, dont need it.
17142 * camel-mime-utils.h: Added offset for this header. Records where
17143 it is in the source.
17145 * camel-mime-utils.c (header_raw_append_parse): Add offset
17146 parameter, to store where the header is stored in the stream.
17147 (header_raw_append): Added offset param.
17148 (header_raw_find): Return offset, if a pointer supplied for it.
17149 (header_raw_replace): Add offset param.
17150 (header_content_type_new): New function, to create an empty
17152 (header_content_type_set_param): Set a parameter in the
17154 (header_set_param): Generic header parameter setting function.
17155 (header_decode_string): Handle NULL input.
17157 * camel-mime-parser.c (camel_mime_parser_headers_raw): New
17158 function to get access to all the raw headers.
17159 (folder_scan_header): Keep track of the header start position, and
17160 store it when saving the header.
17162 2000-04-11 NotZed <NotZed@HelixCode.com>
17164 * camel-mime-utils.c: Moved a bunch of printf's to debug.
17166 * camel-mime-parser.c: Moved a bunch of printf's to debug.
17167 (folder_scan_header): Detect end of each header line using the
17168 last scanned char, and not the last scanned position.
17170 * camel-mime-filter-index.[ch]: Indexing filter. Indexes unicode
17171 sequences into ibex files.
17173 2000-04-09 NotZed <NotZed@HelixCode.com>
17175 * camel-mime-part.c: Dont include gmime-base64.h
17177 * camel-mime-filter-charset.c (complete): Implement the completion
17180 * camel-mime-parser.c (folder_scan_step): If we get to the end of
17181 the body data, check any filters for outstanding completion data.
17182 (camel_mime_parser_scan_from): Set whether we scan for "From "
17185 * camel-stream-filter.c (do_read): If we get to end of stream on
17186 the source, then call the filtering completion function to see if
17187 we have any more data to return.
17189 * camel-mime-filter-basic.c (filter): Implement quoted printable
17190 encoding and decoding filters.
17191 (complete): And the complete function as well.
17193 * camel-mime-utils.c (base64_encode_close): Also take an input
17194 buffer, allow closing of filters.
17195 (quoted_encode_step): First cut, simple quoted-printable encoder.
17196 Doesn't handle trailing spaces/tabs on end of line properly yet.
17197 (quoted_encode_close): Complete a quoted-encoding.
17198 (is_qpsafe): New type check, for quoted-printable safe characters
17199 (that do not need encoding). Thats all bits used in the type
17200 table! Rebuilt the types table.
17201 (header_content_type_is): Checks a content type against at
17202 type/subtype match.
17203 (header_content_type_param): Handle NULL content type pointer.
17205 2000-04-08 NotZed <NotZed@HelixCode.com>
17207 * camel-mime-filter-basic.c (filter): Implement the base64
17208 encoder. Problem is, there is no way to know when to close it.
17209 Close/Reset will have to provide the same args as filter, so it can
17210 flush remaining data *sigh*
17212 * camel-mime-utils.c (base64_encode_step): A rather complex base64
17214 (base64_step_close): Companion function to finish off the base64
17217 * camel-mime-part.c (my_write_content_to_stream): Changed to use
17218 camel_stream_write_to_stream().
17220 * camel-stream.[ch] (camel_stream_write_to_stream): From
17221 camel_stream_b64_write_to_stream(). Fixed some infinite loop
17222 bugs with error conditions.
17224 * camel-stream-b64.[ch] (camel_stream_b64_write_to_stream): Removed.
17225 This has nothing to do with stream-b64, so i've moved it to
17228 * camel-mime-utils.h: Add a comment about refcounting
17229 header_content_type struct.
17231 * Makefile.am: Added camel-stream-filter*.[ch].
17233 * camel-stream-filter.[ch]: Class to implement a generic
17234 (multipass) filter ontop of a stream. Only implements a read-only
17237 * camel-mime-parser.c (camel_mime_parser_filter_add): Ref the
17238 filter we just added.
17240 * Makefile.am: Added camel-mime-filter*.[ch].
17242 * camel-mime-filter-charset.[ch]: A filter to preform character set
17243 conversion (uses unicode_iconv).
17245 * camel-mime-filter-save.[ch]: A simple filter which will save all
17246 data directly to a file or file descriptor.
17248 * camel-mime-filter-basic.[ch]: Implements the basic mime filters,
17249 base64 and quoted-printable decoding (encoding not implemented yet).
17251 * camel-mime-filter.[ch]: A filtering class, which can filter streams
17252 of data without having to copy them. Simpler than stream classes,
17253 and can be plugged into a single stream class (when i write it).
17255 2000-04-07 Dan Winship <danw@helixcode.com>
17257 * providers/pop3/camel-pop3-store.c (pop3_connect): Clarify error
17259 (finalize): fix a bug in camel_exception usage
17260 (pop3_connect): Remember the password after asking for it the
17263 2000-04-07 NotZed <NotZed@HelixCode.com>
17265 * Makefile.am: Added camel-mime-parser/camel-mime-utils.
17267 * camel-mime-parser.c: Fast mime parser.
17269 * camel-mime-utils.c: Mime utility functions, and email header
17272 2000-04-07 NotZed <NotZed@HelixCode.com>
17274 * providers/Makefile.am: Removed smtp for now, its a long way from
17276 * providers/smtp/Makefile.in: Removed file that shouldn't have been
17279 2000-04-06 Matt Loper <matt@helixcode.com>
17281 * camel-folder-pt-proxy.c (_get_full_name): Remove exception param
17282 from get_full_name() called, since get_full_name() was changed to
17283 not have an exception in the last param (see dan's notes below).
17286 2000-04-06 Dan Winship <danw@helixcode.com>
17288 * camel-store.[ch]: Reorganize the folder-fetching methods and
17289 implement a folder cache so that multiple requests for the same
17290 folder will yield the same CamelFolder object (as long as it
17291 remains active). Includes some code to remove no-longer-active
17292 folders from the cache, but it doesn't get used since nothing is
17293 ever unref'ed in Camel right now...
17295 * providers/mbox/camel-mbox-store.c:
17296 * providers/pop3/camel-pop3-store.c: update for CamelStore
17299 * camel-folder.[ch]: Remove the (unused) CamelException argument
17300 from camel_folder_get_name and camel_folder_get_full_name.
17301 (camel_folder_set_name): make this go away since changing a
17302 folder's name after it has been created could result in it
17303 conflicting with a separately-issued folder.
17305 2000-04-05 Dan Winship <danw@helixcode.com>
17307 * g_url_new really wanted to take a CamelException. So, rename
17308 Gurl to CamelURL, g_url_* to camel_url_* (with camel_url_new
17309 taking an exception), and url-util.[ch] to camel-url.[ch]. Also
17310 force url->port to be numeric and remove camel_service_getport. (I
17311 was confused before: the URL RFC says the port must be numeric, so
17312 we don't want to do getportbyname.)
17314 2000-04-01 Dan Winship <danw@helixcode.com>
17316 * providers/mbox/camel-mbox-folder.c
17317 (_check_get_or_maybe_generate_summary_file): Compare
17318 mbox_file_size and mbox_modtime to the results of stat()ing the
17319 mbox file, not the summary file. Duh.
17320 (_close): Update the summary's mbox_file_size and mbox_modtime
17321 before writing it to disk.
17323 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_save,
17324 camel_mbox_summary_load): Wow. I must have been tired when I wrote
17325 this code. First, the comparison bug above. Second, it was using
17326 ntohs and htons instead of ntohl and htonl. Third, I was reading
17327 the status flag byte in two different places and thus getting out
17328 of sync. Fourth, it was writing out field_length bytes of each
17329 header field after having converted field_length to network byte
17330 order, resulting in lots of random crap being appended, and the
17331 summary files being huge. (Fortunately, since the size/modtime
17332 comparison was biffed, the garbage summary read from disk was
17333 always immediately discarded.)
17335 * providers/mbox/camel-mbox-parser.c (camel_mbox_parse_file): fix
17336 an off-by-one error that caused the last-used UID to be reused if
17337 the summary file was regenerated. (That one wasn't my fault. :-)
17339 2000-03-31 Dan Winship <danw@helixcode.com>
17341 * camel-stream-mem.c: implement unimplemented methods
17343 * gmime-content-field.c
17344 (gmime_content_field_construct_from_string):
17345 * data-wrapper-repository.c
17346 (data_wrapper_repository_get_data_wrapper_type):
17347 * camel-simple-data-wrapper.c (my_write_to_stream):
17348 * camel-mime-part.c (my_set_input_stream):
17349 remove debugging printf()s that no longer seem useful.
17351 2000-03-31 Matt Loper <matt@helixcode.com>
17353 * camel-formatter.c (text_to_html): Added "convert_newlines_to_br"
17354 boolean param, to give the option of not converting '\n's to <br>
17355 tags. This way, when we stick stuff in a <pre> tag, newlines stay
17358 2000-03-30 Matt Loper <matt@helixcode.com>
17360 * camel-formatter.c (handle_text_plain): Use <pre> tag to force
17361 the use of monospaced fonts.
17363 2000-03-30 Dan Winship <danw@helixcode.com>
17365 * camel-service.c (camel_service_getport): Add a htons in the
17366 default_number case, and document the fact that the function
17367 returns the port in network byte order.
17369 * providers/pop3/camel-pop3-store.c (pop3_connect): Revert
17370 Miguel's change. The port number bug was actually somewhere
17371 else, and the IP address copying code was fine already.
17373 2000-03-29 Miguel de Icaza <miguel@gnu.org>
17375 * providers/pop3/camel-pop3-store.c (pop3_connect): Add htons
17376 (port), and only copy 4 bytes for the IP address to prevent a DNS
17379 2000-03-28 Dan Winship <danw@helixcode.com>
17381 * camel-seekable-substream.c
17382 (camel_seekable_substream_new_with_seekable_stream_and_bounds):
17383 make this return a CamelStream rather than a
17384 CamelSeekableSubstream, because that's the way Gtk objects tend to
17387 * camel-service.c (camel_service_gethost,
17388 camel_service_getport): convenience functions to canonicalize
17389 the host and port values of a service's URL.
17390 * providers/pop3/camel-pop3-store.c: use them
17392 * providers/mbox/camel-mbox-folder.c
17393 (_check_get_or_maybe_generate_summary_file): Make this work when
17394 the inbox file doesn't yet exist.
17396 2000-03-27 Dan Winship <danw@helixcode.com>
17398 * providers/mbox/camel-mbox-folder.c (_append_message): uncomment
17399 the call to unlink the temp file: there's no way to tell
17400 camel_stream_fs to truncate a file, so reusing the same file was
17401 resulting in junk at the ends of messages.
17403 * camel-folder.[ch]: add delete_message_by_{number,uid}.
17405 * providers/pop3/camel-pop3-folder.[ch]: implement
17406 delete_message_by_uid. Add a close method to do expunging
17407 of deleted messages if requested.
17409 * providers/pop3/camel-pop3-store.[ch]: support for
17410 CamelPop3Folder::close. (You have to close the connection
17411 in order to expunge the folder, thus the store may be
17412 connected in the CamelService::is_connected sense when it
17413 is not actually connected to the server.) Also some bugfixes.
17415 2000-03-27 NotZed <NotZed@HelixCode.com>
17417 * providers/mbox/camel-mbox-folder.c (_append_message): Unref the
17418 output_stream when done, close doesn't do it.
17419 (_append_message): Clear all uid's from the appending messages, so
17420 they are reassigned proper unique id's.
17422 * gmime-utils.c (get_header_array_from_stream): Actually free the
17423 header, it is copied elsewhere.
17425 2000-03-26 NotZed <NotZed@HelixCode.com>
17427 * providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev): Added
17428 folder parameter to function. Fixed callers.
17429 (index_message): Index a message as it is assigned a unique id.
17431 * camel-mime-part.c (my_set_content_id): Make sure we malloc and
17432 copy the content_id, otherwise *poof*
17434 2000-03-25 NotZed <NotZed@HelixCode.com>
17436 * camel-medium.c (_finalize): Another leak, unref the content if
17439 * camel-recipient.c (camel_recipient_table_free): Plug another
17440 memory leak - actually free the recipient table.
17442 * camel-mime-message.c (_finalize): Plugged a memory leak with the
17445 * gmime-utils.c (_store_header_pair_from_string): A simpler, more
17446 debuggable and functionally identical header extraction function.
17448 2000-03-24 NotZed <NotZed@HelixCode.com>
17450 * gmime-content-field.c (gmime_content_field_set_parameter):
17451 Remove the hash table entry before freeing its key and data.
17453 2000-03-27 Dan Winship <danw@helixcode.com>
17455 * providers/Makefile.am (SUBDIRS): Add pop3.
17457 * providers/pop3/camel-pop3-store.c: keep separate input and
17458 output streams so the output doesn't end up being buffered.
17460 * providers/pop3/camel-pop3-folder.c (get_message_by_number):
17461 finish implementing this.
17463 2000-03-27 Michael Meeks <michael@helixcode.com>
17465 * camel-mime-part.c (my_set_disposition): fix so less broken.
17466 (my_finalize): remove dodgy disposition free.
17468 * camel-data-wrapper.c (my_set_mime_type_field): unref instead of
17471 2000-03-27 Dan Winship <danw@helixcode.com>
17473 * camel-service.c (camel_service_free_auth_types): new routine to
17474 free the data allocated by camel_service_query_auth_types.
17476 * providers/pop3/camel-pop3-store.c (free_auth_types): implement
17478 * camel-stream-mem.c (camel_stream_mem_new_with_buffer): rename
17479 camel_stream_mem_new_with_buffer to ..._with_byte_array and add a
17480 new ..._with_buffer that takes a char * rather than a GByteArray.
17482 * Remove CamelStreamBufferedFs, since CamelStreamBuffer makes it
17485 2000-03-25 Dan Winship <danw@helixcode.com>
17487 * camel-folder-summary.[ch]: change the CamelFolderSummary
17488 interfaces to allow partial summary queries (for dealing
17489 with very large folders). Remove the "extended_fields" from
17490 CamelFolderInfo and CamelMessageInfo: this is better dealt
17493 * providers/mbox/camel-mbox-summary.[ch]: Make CamelMboxSummary a
17494 subclass of CamelFolderSummary. Update interfaces for that. Remove
17495 the internal/external summary distinction. Remove the (unused) md5
17496 checksum in the folder summary. Change the summary file format
17497 (primarily to make it no longer byte-order dependent) and add a
17498 version number to it so it will be easier to change in the future.
17500 * providers/mbox/camel-mbox-folder.[ch]
17501 * providers/mbox/camel-mbox-search.c
17502 * providers/mbox/camel-mbox-utils.c: update for summary changes
17504 * camel-exception-list.def: add
17505 CAMEL_EXCEPTION_FOLDER_SUMMARY_INVALID
17507 2000-03-23 NotZed <NotZed@HelixCode.com>
17509 * providers/mbox/camel-mbox-provider.c: Added flag to provider
17510 initialisation, to match changed structure.
17512 2000-03-22 NotZed <NotZed@HelixCode.com>
17514 * camel-folder.[ch]: Added async search api.
17516 * providers/mbox/camel-mbox-search.c
17517 (camel_mbox_folder_search_by_expression): Changed to use an
17518 asynchronous interface.
17519 (camel_mbox_folder_search_cancel): Cancel function for async
17522 2000-03-23 Dan Winship <danw@helixcode.com>
17524 * camel-stream-buffer.c (camel_stream_buffer_read_line): Function
17525 to read one line of any size from a stream and return it in
17528 2000-03-22 Dan Winship <danw@helixcode.com>
17530 * camel-service.c (camel_service_query_auth_types): New function
17531 to query a service for the authentication protocols it supports.
17532 * providers/pop3/camel-pop3-store.c (query_auth_types): implement
17534 * camel-provider.c (camel_provider_scan): New function to
17535 scan the provider dir and return a list of all providers.
17537 * providers/pop3/camel-pop3-folder.c: fill this in partially
17538 * providers/pop3/camel-pop3-store.c: make camel_pop3_command
17539 return the text after "+OK"/"-ERR" and add a separate
17540 camel_pop3_get_additional_data to get the message body or
17541 whatever. Also make them take a CamelPop3Store rather than
17542 a CamelStreamBuffer.
17544 2000-03-22 Matt Loper <matt@helixcode.com>
17546 * camel-formatter.c (debug): Disabled some useless debug
17549 2000-03-21 Dan Winship <danw@helixcode.com>
17551 * providers/pop3: some initial bits of the POP3 provider, to
17552 make Matt happy. Incomplete, untested, etc.
17554 2000-03-21 bertrand <bertrand@helixcode.com>
17556 * providers/mbox/camel-mbox-summary.c
17557 (camel_mbox_summary_append_internal_to_external): copy the size field
17559 * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): initialize
17560 message_info to NULL
17562 * camel-folder-summary.h: added the size field.
17564 * providers/mbox/camel-mbox-summary.h:
17565 added the received_date field.
17567 * providers/mbox/camel-mbox-summary.c:
17568 documented all functions.
17570 * camel-folder-summary.h: name change and
17573 * providers/mbox/camel-mbox-search.c: update to
17574 conform to name change in the summary fields.
17576 2000-03-10 bertrand <bertrand@helixcode.com>
17578 * camel-service.h: cosmetic changes.
17580 2000-03-09 Dan Winship <danw@helixcode.com>
17582 * s/HelixCode/Helix Code, Inc./ in the copyrights
17584 2000-03-07 bertrand <bertrand@helixcode.com>
17586 * camel-formatter.c (handle_mime_part):
17587 plug mem leaks due to bad documentation
17588 of camel_content_field_get_mime_type
17589 (print_camel_body_part): idem
17590 (handle_multipart_alternative): idem
17592 * gmime-content-field.c (gmime_content_field_get_mime_type):
17596 * camel-mime-part.c (my_finalize): unref the
17597 content_input_stream if any.
17599 2000-03-06 bertrand <bertrand@helixcode.com>
17601 * camel-stream-fs.c (_seek): fix a bogus calculation
17602 in the return position.
17604 2000-03-05 bertrand <bertrand@helixcode.com>
17606 * camel-session.h: cosmetic fixes.
17608 * camel-stream-fs.c (_read):
17609 (_seek): fixed the current position so that it refers
17610 to the current position in the stream, not in its parent.
17612 2000-03-04 NotZed <NotZed@HelixCode.com>
17614 * providers/mbox/camel-mbox-search.c
17615 (camel_mbox_folder_search_by_expression): Ref the summary
17616 after we have got it.
17618 2000-03-04 bertrand <bertrand@helixcode.com>
17620 * camel-mime-part.c (my_write_content_to_stream):
17621 stream the raw content instead of nothing if the encoding
17624 * camel-stream-fs.c (_seek): handle eos more
17627 * camel-formatter.c (get_bonobo_tag_for_object):
17628 bonobo-goad-id is the good key to look for.
17629 (get_bonobo_tag_for_object): close the <object> tag.
17630 (get_bonobo_tag_for_object): the correct syntax for the
17631 to set a parameter inside an <object> tag is :
17632 <object classid="..."> <param name="uid" value="..."> <param ...>
17635 2000-03-03 bertrand <bertrand@helixcode.com>
17637 * providers/mbox/camel-mbox-folder.c (_get_message_by_uid):
17638 use set_input_stream instead of construct_from_stream
17639 to feed the message object.
17641 * camel-data-wrapper.c (my_write_to_stream): reset output stream.
17642 (my_set_input_stream): unref the previous input stream.
17643 use the set_output_stream for default behaviour.
17644 (my_set_output_stream): unref previous output stream.
17646 * camel-mime-part.c (my_write_content_to_stream): reset content
17647 object output stream.
17649 2000-03-03 NotZed <NotZed@HelixCode.com>
17651 * providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev): Make
17652 sure we open with create with a creation mask.
17654 2000-03-01 NotZed <NotZed@HelixCode.com>
17656 * camel-mime-part-utils.c
17657 (camel_mime_part_construct_content_from_stream): DO NOT assert on
17658 content type, we have fallback code 4 lines below it ... *sigh*
17660 2000-02-29 NotZed <NotZed@HelixCode.com>
17662 * Makefile.am (libcamelinclude_HEADERS): Added camel-stream-buffer
17665 * camel-stream-buffer.[ch]: Generic buffer which can be applied to
17668 2000-03-03 bertrand <bertrand@helixcode.com>
17670 * camel-formatter.c (handle_image): in the case
17671 of images, put the content object output stream
17672 in the url. This allows the message browser
17673 to show inline images.
17675 * camel-stream-b64.c (my_read_encode): fixed state
17678 2000-03-02 bertrand <bertrand@helixcode.com>
17680 * camel-stream-b64.c (my_read_encode): don't forget to
17681 set the state to 0 after 3.
17682 (my_read_encode): don't forget to encode, even in state 3.
17684 * camel-simple-data-wrapper.c: static functions are prefixed
17685 with my_ instead of _
17686 * camel-multipart.c: static functions are prefixed
17687 with my_ instead of _
17688 (my_write_to_stream): commented.
17689 (my_write_to_stream): warning in case the boudary is set
17690 but is a zero length string.
17692 * camel-mime-part.c (camel_mime_part_encoding_from_string):
17693 remove debug trace.
17695 * camel-mime-part.c: Replaced all static functions
17696 with name begining with _ by the same name begining
17697 with "my_" to prevent the possible conflicts
17698 with system symbols Dan warned us about.
17700 * camel-stream-b64.c (camel_stream_b64_write_to_stream):
17701 use CamelStreamB64 type for the input stream.
17703 * camel-mime-part.c (_get_content_object): remove
17705 (_write_content_to_stream): implement the b64
17706 encoding the new way (that is using camel_stream_b64)
17708 * camel-data-wrapper.c (my_write_to_stream):
17709 fix implementation so that it writes properly
17710 to the output stream even.
17712 * camel-stream-b64.c (camel_stream_b64_write_to_stream):
17713 fix implementation.
17715 2000-02-29 bertrand <bertrand@helixcode.com>
17717 * camel-stream-b64.c (camel_stream_b64_write_to_stream): new
17720 * camel-data-wrapper.c (_write_to_stream): default
17723 * gmime-utils.c (_store_header_pair_from_string):
17724 revert strange changes.
17726 * camel-stream-b64.c (my_read_decode): set eos to true when we
17727 have read the whole input stream.
17728 (my_reset): set eos to FALSE.
17730 2000-02-28 NotZed <NotZed@HelixCode.com>
17732 * camel-mime-part.c (_parse_header_pair): Dont free this either.
17734 * camel-medium.c (_remove_header): Ugh, dont free the header
17735 before we actually remove it.
17736 (_add_header): Ugh, dont free hashtable entries which may be
17737 duplicated (hash_insert _will_ reference that memory).
17739 * string-utils.c (string_trim): Trimming a 0-length string is not
17742 * camel-mime-message.c (_parse_header_pair): Fixed very broken
17743 memory handling of header_name/value.
17745 * providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev):
17746 Initialise end_of_last_message always.
17747 (camel_mbox_copy_file_chunk): Stop trying to read if we run out of
17748 data, rather than looping forever.
17749 (camel_mbox_write_xev): Use an open flag when opening with create.
17751 * camel-folder.c (camel_folder_search_by_expression): No, its not
17752 a fatal error to search on a non-searchable folder, you just dont
17754 (_open): Dont open an opened folder (i dont see why this is really
17755 a bug, but what the hell ...)
17757 * providers/mbox/camel-mbox-folder.c (_init): Set search cap on.
17758 (_open): Call parent class to perform open. Remove folder-open
17759 check to parent instead.
17760 (_create): open takes a creation mask, dont use umask to try and
17762 (_delete): Dont bother checking folder==NULL, its already been
17763 checked on the external interface (changed to an assertion, this
17764 would have to be a camel bug).
17765 (_delete_messages): Likewise.
17767 (_init): Dont go and clear all the paths and shit that the parent
17768 open just setup for us.
17769 (_delete_messages): Get rid of more umask stuff.
17770 (_append_message): Make sure we pass file mode to open with create.
17771 (_append_message): Cleaned up some indenting to make it readable.
17773 * camel-stream-b64.c (my_read_encode): Fixed a typo.
17775 * providers/mbox/camel-mbox-search.c: Changed to use e-sexp,
17776 rather than filter-sexp.
17778 2000-02-28 bertrand <bertrand@helixcode.com>
17780 * camel-stream-b64.c (my_read_encode): encoding
17783 2000-02-23 bertrand <Bertrand.Guiheneuf@aful.org>
17785 * camel-stream-b64.c: changed the __static
17786 suffix into a my_ prefix.
17787 (camel_stream_b64_set_mode): reset the persistent
17789 (my_read_decode): remove superfluous %
17791 * providers/mbox/camel-mbox-utils.c (camel_mbox_copy_file_chunk):
17792 fix exception description message.
17794 2000-02-24 Dan Winship <danw@helixcode.com>
17796 * camel-session.c: Add camel_session_get_transport_for_protocol.
17798 * camel-transport.h:
17799 * camel-transport.c: Add an abstract CamelTransport class.
17801 * providers/sendmail/*: A CamelTransport that uses sendmail
17804 2000-02-24 Dan Winship <danw@helixcode.com>
17806 * camel-folder.c: use CamelExceptions for run-time errors, not
17807 incorrect code. Don't bother validating that an object exists from
17808 inside one of its methods, since you couldn't have gotten there if
17809 it didn't. Fix some code style bugs.
17811 (_init): Rename init_with_store to init and add parent_folder,
17812 separator, and name arguments.
17813 (_set_name): Get separator from self, not parent_store now.
17816 * camel-store.c: Remove get/set_separator.
17818 * providers/mbox/: Update for above.
17820 2000-02-23 Dan Winship <danw@helixcode.com>
17822 * camel-medium.c (_finalize): Free the data in the headers hash
17824 (_add_header): g_strdup the header name and value when adding it.
17826 * camel-mime-part-utils.c
17827 (camel_mime_part_construct_headers_from_stream): Free the header
17828 data after calling camel_medium_add_header, since it will have
17829 g_strdup()ed it itself.
17831 2000-02-22 NotZed <NotZed@HelixCode.com>
17833 * providers/mbox/camel-mbox-search.c: Dont compile by default.
17835 * providers/mbox/Makefile.am: Fuck off the filter code.
17837 2000-02-22 bertrand <Bertrand.Guiheneuf@aful.org>
17839 * camel-stream-b64.c (read_decode__static):
17840 don't read the char if we reached the length
17841 of the output buffer. Hours lost on this
17844 * camel-folder.c (camel_folder_get_subfolder):
17845 (camel_folder_create):
17846 (camel_folder_delete):
17847 (camel_folder_delete_messages):
17848 (camel_folder_list_subfolders):
17849 (camel_folder_expunge):
17850 (camel_folder_get_message_by_number):
17851 (camel_folder_get_message_count):
17852 (camel_folder_append_message):
17853 (camel_folder_copy_message_to):
17854 (camel_folder_get_summary):
17855 (camel_folder_get_message_uid):
17856 (camel_folder_get_message_by_uid):
17857 (camel_folder_get_uid_list):
17858 Check folder state (open/close) and raise an
17859 exception if it is not ok.
17861 * providers/mbox/camel-mbox-folder.c (_create):
17862 create the file and the path with two different
17865 * camel-folder.c (_create): handle the case
17866 when the folder name starts with '/'
17868 * camel-exception.c (camel_exception_new): use
17869 (void) instead of () in decl.
17871 * camel-exception.h: cosmetic fixes.
17873 * camel-exception.c (camel_exception_init): new routine.
17874 Fix a bug in mail/message-list.c
17877 * camel-folder.h: cosmetic changes.
17879 * camel-stream-b64.c (reset__static): added a
17880 reset method. Thanks message-browser to find
17883 * providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): readd
17886 2000-02-21 bertrand <Bertrand.Guiheneuf@aful.org>
17888 * camel-formatter.c (lookup_unique_id):
17889 awful hack to test get_output_stream.
17890 * camel-stream-b64.[ch] :
17891 b64 encoding/decoding is now implemented as
17895 2000-02-21 bertrand <Bertrand.Guiheneuf@aful.org>
17897 * camel-seekable-substream.c (_reemit_parent_signal):
17898 emit "data_available" when parent stream emits it.
17901 2000-02-21 NotZed <NotZed@HelixCode.com>
17903 * providers/mbox/Makefile.am: Uh, fixed LIBADD again. What was
17904 there was never ever going to work, wasn't it tested?
17907 2000-02-21 Dan Winship <danw@helixcode.com>
17909 * camel-session.h: (struct _CamelSession): Add authenticator.
17911 * camel-session.c (camel_session_new): Add authenticator.
17912 (camel_session_query_authenticator): New function to query the
17913 session authenticator for password, etc, information.
17915 2000-02-21 Dan Winship <danw@helixcode.com>
17917 * camel-session.c: add CamelExceptions to several functions. Use
17918 camel_session_new to initialize the session and URL fields of
17919 created CamelStores as appropriate.
17924 * camel-service.c: Move the session and url (and associated
17925 functions) from CamelStore to CamelService. Add url_flags to
17926 CamelService so subclasses can specify which URL components
17927 are mandatory for them. Add camel_session_new for
17928 camel_session_get_store* to use.
17930 * providers/mbox/camel-mbox-folder.c:
17931 * providers/mbox/camel-mbox-store.c:
17932 * providers/mbox/camel-mbox-store.h: Update for above changes.
17934 * camel-exception-list.def: Once camel is being used for real,
17935 exceptions won't be renumberable. So renumber them now to make
17936 more room to add exceptions to the various categories later, and
17937 add a big warning message.
17939 2000-02-20 Dan Winship <danw@helixcode.com>
17941 * providers/mbox/Makefile.am: add libibex back to
17942 libcamelmbox_la_LIBADD
17944 2000-02-18 NotZed <NotZed@HelixCode.com>
17946 * providers/mbox/camel-mbox-search.h
17947 (camel_mbox_folder_search_by_expression): Added exception to call,
17950 * providers/mbox/camel-mbox-search.c
17951 (camel_mbox_folder_search_by_expression): Major changes, to use
17952 the sexp evaluator from filter/filter-sexp.c to implement the
17954 (func_body_contains): Changed to support multiple strings in 1
17955 command (results or'd together)
17957 * url-util.c (g_url_new): Fixed a typo (colon == 0 isn't right),
17958 and made it so full url's are absolute pathed (Dan, this is how it
17959 has to work!). Also, always include a path part, even if it is an
17962 2000-02-18 Dan Winship <danw@helixcode.com>
17964 * camel/camel-types.h: New header with the typedefs for all camel
17965 classes. Now the class headers can just include this and the
17966 header for the parent type. This makes it possible for
17967 CamelService to include a CamelSession without creating an
17971 * composer/e-msg-composer-attachment-bar.h:
17972 * mail/folder-browser.c:
17973 * mail/message-list.c: frob #includes to match the new reality
17975 2000-02-17 Dan Winship <danw@helixcode.com>
17977 * camel/camel-service.h:
17978 * camel/camel-service.c: Make camel-service us a Gurl internally.
17979 Remove the login/password interfaces and instead provide
17980 camel_service_connect_with_url. Add CamelExceptions
17982 2000-02-17 bertrand <Bertrand.Guiheneuf@aful.org>
17984 * camel/camel-formatter.c (handle_text_plain):
17985 (handle_text_html): use camel_stream_reset instead
17986 of seek. The formatter should be able to work
17987 with all streams, not only seekable streams.
17988 In the case where some provider implementation
17989 would not be able to provide a reset method
17990 to their stream, implementors would have
17991 to find a workaround.
17993 * camel/camel-session.c (camel_session_new): use
17994 (void) instean of () in function decl.
17996 * camel/camel-folder.c: ifdef async operation
17999 * camel/camel-seekable-stream.c (_seek): added a warning.
18000 (_reset): default implementation of reset for seekable
18003 * camel/camel-mime-message.h: set_received_date declaration fix.
18006 * camel/providers/mbox/camel-mbox-provider.c (camel_provider_module_init):
18007 use (void) instead of ().
18009 * camel/camel-stream.c (camel_stream_reset):
18010 new method for CamelStream.
18012 2000-02-17 Dan Winship <danw@helixcode.com>
18014 * camel/url-util.c (g_url_to_string): New function to convert
18015 a Gurl back into a char *.
18017 2000-02-17 bertrand <Bertrand.Guiheneuf@aful.org>
18019 * camel/camel-formatter.c (handle_text_plain):
18020 revamped so that it uses the output stream
18021 of the data wrapper
18022 (handle_text_html): ditto.
18025 * camel/camel-simple-data-wrapper.h:
18026 * camel/camel-simple-data-wrapper.c (camel_simple_data_wrapper_new):
18027 use (void) instead of ().
18028 (_get_output_stream): simple implementation.
18030 2000-02-16 bertrand <Bertrand.Guiheneuf@aful.org>
18032 * camel/camel-data-wrapper.c (_set_input_stream): ref input stream
18033 (_set_output_stream): ref output stream
18034 (_finalize): unref input and output streams
18036 * camel/camel-seekable-substream.c (_set_bounds): don't
18037 seek the begining of the substream.
18038 (_eos): fix eos condition testing.
18039 (_finalize): unref parent stream
18040 (_init_with_seekable_stream_and_bounds): ref parent stream
18042 * camel/gstring-util.c (g_string_equal_for_hash):
18043 (g_string_equal_for_glist): return type is int.
18046 * camel/camel.c (camel_init): use (void)
18049 2000-02-16 NotZed <NotZed@HelixCode.com>
18051 * providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): Added
18052 libfilter to link line (temporarily?). Required for
18055 2000-02-15 bertrand <bertrand@helixcode.com>
18057 * camel/camel-multipart.c (_localize_part):
18058 this routine replaces the _read_part routine
18059 and does not store the part in a buffer.
18060 (_set_input_stream): use the set_input_stream
18061 instead of the construct_from_stream.
18062 each bodypart is given an input stream.
18064 * camel/camel-mime-part-utils.c:
18065 include the data-wrapper-repository header.
18066 (camel_mime_part_construct_content_from_stream):
18067 use the set_input_stream instead of the
18068 construct_from_stream method.
18070 * camel/camel-seekable-substream.c (_set_bounds):
18071 cur position is set to 0 not to inf_bound.
18073 2000-02-15 bertrand <Bertrand.Guiheneuf@aful.org>
18075 * camel/camel-mime-part.c: include gmime-base64.h
18076 various compilation and runtime fixes.
18077 (_set_input_stream): store the input substream
18078 for the content object.
18080 * camel/camel-data-wrapper.h: declare the
18081 set/get function on input/output stream.
18083 * camel/camel-mime-part.c (_get_content_object):
18084 don't use a temporary mem stream.
18086 * camel/camel-seekable-substream.c (_seek):
18088 (_read): the substream can be unlimited in length
18090 * camel/camel-data-wrapper.c (camel_data_wrapper_class_init):
18091 set the get/set_input/output_stream methods.
18093 * camel/camel-multipart.c (_construct_from_stream):
18094 camel_stream_seek -> camel_seekable_stream_seek
18096 2000-02-14 Miguel de Icaza <miguel@gnu.org>
18098 * camel/providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): Add
18099 the unicode libraries as well.
18101 * camel/camel-provider.c (camel_provider_register_as_module): Add
18102 error reporting here. Desire to use Solaris increases. Hair loss
18103 in the last two hours: 5,400.
18105 * camel/providers/mbox/camel-mbox-provider.c
18106 (camel_mbox_get_provider): Renamed function.
18108 * camel/camel.h: All include files use camel/ now here.
18110 * camel/providers/mbox/Makefile.am: Drop all the dynamism from
18111 Camel, and make this a standard library.
18113 2000-02-14 bertrand <Bertrand.Guiheneuf@aful.org>
18115 * camel/gmime-utils.c (get_header_array_from_stream): use the
18117 (gmime_read_line_from_stream): ditto.
18119 * camel/camel-stream-fs.h (struct ): add the eof field
18122 * camel/camel-stream-fs.c (camel_stream_fs_init): set eof.
18123 (_read): set eof on end of file.
18124 (_eos): implemented.
18126 * camel/gmime-utils.c (get_header_array_from_stream):
18127 make a blocking version of the header parser.
18128 When the fs stream uses gnome-vfs, this should
18130 (gmime_read_line_from_stream): ditto.
18132 2000-02-11 bertrand <Bertrand.Guiheneuf@aful.org>
18134 * camel/camel-stream-fs.c:
18135 everywhere, when using the cur_pos field, do it
18136 on the CamelSeekableStream object.
18137 (_seek): small fix.
18139 * camel/camel-seekable-stream.c (camel_seekable_stream_seek):
18140 s/camel_stream_seek/camel_seekable_stream_seek/g
18142 * camel/camel-seekable-stream.h:
18143 (struct ): added a field to store the
18146 * camel/camel-seekable-stream.c (camel_seekable_stream_get_current_position):
18147 New function. Allows to get the current position
18148 of a seekable stream.
18151 2000-02-13 NotZed <notzed@zedzone.helixcode.com>
18153 * providers/mbox/camel-mbox-search.c: New file, implements the
18154 search api for mbox folders.
18156 * providers/mbox/Makefile.am: Link with ibex.
18158 * camel-folder.c (camel_folder_has_search_capability): Api
18160 (camel_folder_search_by_expression): Ditto.
18162 2000-02-12 NotZed <notzed@zedzone.helixcode.com>
18164 * providers/mbox/camel-mbox-folder.c (_set_name): Setup index
18166 (_init_with_store): Init index filename. Hmm, none of these
18167 names ever seem to get free'd (FIXME?)
18169 * providers/mbox/camel-mbox-folder.h: Add index file name.
18171 2000-02-12 NotZed <notzed@helixcode.com>
18173 * camel-folder.h: Add folder search functions.
18175 ** Created ChangeLog just for camel **
18176 - refer to ../ChangeLog for changes prior to this date.