1 2002-04-26 Jeffrey Stedfast <fejj@ximian.com>
3 * providers/local/Makefile.am: Don't link to libibex.a anymore.
5 * providers/nntp/Makefile.am: Same.
7 * providers/imap/Makefile.am: And again here.
9 * camel-store-summary.h: No longer want to #include
12 * camel-provider.c (camel_provider_auto_detect): New function to
13 auto-detect configuration settings.
15 2002-04-26 Not Zed <NotZed@Ximian.com>
17 * camel-block-file.c (block_file_validate_root): Remove the
18 excessive \n's, after printfs.
20 * camel-text-index.c (text_index_compress_nosync): @!#$@#$!@$#!.
21 Since the rename op was fixed, this broke compression's rename,
22 resulting in the index 'vanishing' after every compress
23 (i.e. after every reindex). Fix this code to account for the
24 fixed rename operation.
26 2002-04-25 Jeffrey Stedfast <fejj@ximian.com>
28 * providers/smtp/camel-smtp-transport.c (smtp_rcpt): Don't put a
29 space between the "RCPT TO:" and the "<recipient>" strings -
30 rfc0821 was not clear on this but it seems rfc2821 defines a
31 grammar excluding that SP.
34 2002-04-24 Jeffrey Stedfast <fejj@ximian.com>
36 * providers/local/camel-local-provider.c
37 (camel_provider_module_init): Configure the default paths for mh,
38 mbox, maildir, spools, etc.
40 * camel-provider.h: Add a CAMEL_PROVIDER_CONF_LABEL enum and
41 define some default CamelProviderConfEntry macros.
43 2002-04-19 Jeffrey Stedfast <fejj@ximian.com>
45 * providers/pop3/camel-pop3-folder.c (pop3_refresh_info): Free the
48 * camel-data-cache.c (data_cache_finalise): Free the cdc->path.
50 * camel-multipart.c (write_to_stream): Don't g_return_val_if_fail
51 here if the boundary is an empty string. See bug #23676 for
52 details. The way I see it, we have 2 options: 1) leave this fix
53 the way it is, thus allowing multipart boundaries to be
54 empty-strings; or 2) make camel_multipart_get_boundary() change
55 the boundary to something legal if the boundary is an
56 empty-string. Since the parser should be able to handle an
57 empty-string boundary *and* more importantly because we want to
58 keep the same boundaries as the original raw message so as to be
59 able to verify multipart/signed parts, I vote for solution #1.
61 2002-04-19 Not Zed <NotZed@Ximian.com>
63 * devel-docs/camel-index.txt: Start of a white-paperish document
64 describing camel-index and older libibex.
66 2002-04-18 Not Zed <NotZed@Ximian.com>
68 * providers/local/camel-local-store.c (rename_folder): If we get a
69 failure, make sure we set an exception.
71 * camel-text-index.c (camel_text_index_rename): If the file
72 doesn't exist, just assume it never did, dont return failure.
73 (text_index_rename): Add '.index' to the path name we're using,
74 since we dont get it passed in.
76 * camel-folder-search.c (check_header): When doing a contains
77 match, split the words and perform an and on it.
78 (match_words_messages): If we have an index, but were forced to do
79 a full search, first lookup a subset of messages using
80 the index and a simplified word set. Only do a manual search of
83 2002-04-17 Not Zed <NotZed@Ximian.com>
85 * camel-folder-search.c (match_message_index): Changed to take a
86 utf8 string not a regex pattern.
87 (match_words_index): Matches against a camel_search_words list.
88 (match_words_1message): Matches a single message against a
89 camel_search_words list.
90 (match_words_message): Same, but gets the message from the folder
92 (match_words_messages): Matches a list of messages against a words
94 (search_body_contains): Rewritten to handle multiple word
97 * providers/imap/camel-imap-search.c (sync_match): Split words
98 when searching, to support multiple search words. Also, try
99 searching specifying charset of utf8 if we can, if that fails,
100 fall back to not specifying charset. TODO: It should translate
101 the strings into the locale default charset?
103 * providers/imap/camel-imap-store.c (connect_to_server): Added new
104 cap - utf8_search, if set, we tell the server we're searching
105 using utf8, otherwise we dont (incorrectly, since we always use
108 * camel-search-private.c (camel_ustrstrcase): Make this class public.
109 (camel_search_words_split): Split a word into multiple words based
110 on whitespace, and keep track of whether the word is simple
111 (indexable directly), or not.
112 (camel_search_words_free): Free 'em.
114 2002-04-17 Jeffrey Stedfast <fejj@ximian.com>
116 * camel-vee-folder.c (vee_search_by_expression): If the vee-folder
117 is the unmatched, we don't have our own expression so we cannot
118 merge them. Instead, just use the expression passed in. This fixes
119 a Null-Pointer-Read crash on Solaris systems at least.
121 2002-04-16 Jeffrey Stedfast <fejj@ximian.com>
123 * camel-filter-driver.c (camel_filter_driver_filter_folder): Get
124 rid of an unused variable.
126 * providers/smtp/camel-smtp-transport.c (smtp_helo): Use
127 camel_gethostbyaddr since gethostbyaddr is not reentrant.
129 * camel-http-stream.c (http_connect): Updated after the rename of
130 camel_get_host_byname.
132 * camel-service.c (camel_gethostbyname): Renamed.
133 (camel_gethostbyaddr): New cancellable/reentrant version of
136 2002-04-14 Jeffrey Stedfast <fejj@ximian.com>
138 * providers/local/camel-spoold-store.c: Added #include
139 <sys/types.h> for dirent.h which needs it on MacOS X.
141 * providers/local/camel-maildir-store.c: Same.
143 * providers/nntp/camel-nntp-store.c: Same.
145 * providers/imap/camel-imap-message-cache.c: Same.
147 * camel-provider.c: Same.
149 * camel-data-cache.c: Same.
151 2002-04-12 Jeffrey Stedfast <fejj@ximian.com>
153 * broken-date-parser.c (datetok): Treat commas as token
155 (WEEKDAY_CHARS): Use full weekday names in case the broken mailer
157 (MONTH_CHARS): Same as above but for months.
159 2002-04-11 Not Zed <NotZed@Ximian.com>
161 * providers/local/camel-spool-summary.c (spool_summary_sync_full):
162 If the last message(s) were deleted, and we had any messages
163 output, account for the lost \n of the following From line by
164 adding an extra \n. fix for #8214.
166 2002-04-10 Not Zed <NotZed@Ximian.com>
168 * camel-mime-part-utils.c (convert_buffer): If we get a 0 length
169 input, return a 0 lenght output as valid - fixes bugs with some
170 iconv impl and its simpler anyway.
172 2002-04-11 Jeffrey Stedfast <fejj@ximian.com>
174 * providers/imap/camel-imap-folder.c: Set the UID_SET_LIMIT value
175 to 4096. I ran into an issue tonight where apparently the IMAP
176 server changed the UIDVALIDITY and so Evo needed to re-fetch all
177 headers and it was trying to send a uid set of some 25k (yes, I
178 have a very large INBOX). Anyways, it was set to unlimited
179 before. Courier IMAPd can safely handle up to ~16k per token, but
180 UW IMAPd can only handle 8k per command-line, so I set it to 4k
183 2002-04-10 Jeffrey Stedfast <fejj@ximian.com>
185 * camel-mime-part-utils.c (convert_buffer): Fixed a bug that would
186 miscalculate how much data to copy into the GByteArray (negative
187 value) thus causing a segfault. Also optimized it while I was at
190 2002-04-09 Jeffrey Stedfast <fejj@ximian.com>
192 * camel-store.c (camel_store_init): Make the folder_lock
193 recursive. See bug #22363 for details. Basically,
194 get_folder_info() is requesting a diary folder which in turn
195 connects which requests then calls get_folder() but deadlocks
196 because get_folder_info already holds the lock.
198 * camel-mime-message.c (camel_mime_message_set_date): Don't adjust
199 the timezone offset if we used tm.tm_gmtoff because it is already
202 2002-04-09 Not Zed <NotZed@Ximian.com>
204 * camel-mime-part.c (construct_from_parser): If we get multiple
205 Content-Type header values, change subsequent headers to
206 X-Invalid-Content-Type so it doesn't wreck processing. This fixes
207 the reported case in #18929, but i dont know if it fixes the
208 original posters problems.
210 2002-04-08 Not Zed <NotZed@Ximian.com>
212 * camel-vtrash-folder.c (vtrash_move_messages_to): If we find
213 we're moving from the vtrash to another folder, we need to convert
214 the uid from a vfolder uid to the source uid (+8). Fix for
215 #20886. Also changed to batch multiple moves to different folders
216 so they are done as efficiently as possible rather than one at a
219 * camel-mime-utils.c (base64_decode_step): If we only get passed
220 '=', we back track only if we actually output any data. Fix for
222 (quoted_decode): Pass out size_t instead of int, and use 0 instead
223 of -1 for error since its not signed. This will fix similar bug
224 to above in different circumstances since the result is taken as
225 unsigned. This is only an internal func.
226 (quoted_encode): Return size_t just for consistency.
228 * camel-block-file.c (block_file_validate_root): Comment out the
229 debug and move it into a warning when the validation fails.
231 2002-04-08 Jeffrey Stedfast <fejj@ximian.com>
233 * camel-mime-utils.c (uuencode_close): Don't count our filler when
234 encoding our line-length octet.
236 2002-04-05 Jeffrey Stedfast <fejj@ximian.com>
238 * camel-http-stream.c (http_get_headers): Don't get the statuscode
240 (http_method_invoke): Use a User-Agent header and do basic proxy
242 (stream_read): Handle redirects.
243 (camel_http_stream_set_user_agent): New function to allow client
244 to set the User-Agent string.
245 (camel_http_stream_set_proxy): New function for setting the proxy
247 (camel_http_stream_set_proxy_authrealm): New function for setting
248 the proxy auth realm.
249 (camel_http_stream_set_proxy_authpass): New function for setting
250 the proxy auth password.
252 2002-04-04 Jeffrey Stedfast <fejj@ximian.com>
254 * camel-folder-summary.c (message_info_new): Simplified since we
255 can now decode in-reply-to without getting extra cruft. Get rid of
256 the FIXME about having to check scan->id because of the
257 possibility of it being NULL, this can no longer happen.
259 * camel-mime-utils.c (header_references_inreplyto_decode): New
260 function to decode in-reply-to headers. Only grabs the first thing
261 that looks like a message-id and then returns.
262 (header_references_decode): Loop calling
263 header_references_decode_single (a new internal function).
265 2002-04-04 Not Zed <NotZed@Ximian.com>
267 * providers/imap/camel-imap-search.c (imap_body_contains): If
268 (body-contains) is not passed any arguments, return empty/false.
269 Fixes a crash exposed by #15001.
271 * camel-remote-store.c (remote_connect): Reset the keepalive
272 timeout to 10 minutes rather than the 30 seconds I was using for
275 2002-04-03 Dan Winship <danw@ximian.com>
277 * camel-provider.h (CamelProvider): make service_cache be an array
278 of CAMEL_NUM_PROVIDER_TYPES elements so you can have a single
279 provider offer both stores and transports. (Eg, Exchange, NNTP)
281 * providers/imap/camel-imap-provider.c: Don't initialize
282 service_cache here. (The session code can do it itself since the
283 url_hash and url_equal functions are stored as part of the
286 * providers/nntp/camel-nntp-provider.c: Likewise.
288 * providers/local/camel-local-provider.c: Likewise.
290 * providers/pop3/camel-pop3-provider.c: Likewise.
292 * providers/sendmail/camel-sendmail-provider.c: Likewise.
294 * providers/smtp/camel-smtp-provider.c: Likewise.
296 * camel-session.c (register_provider): Initialize the provider's
297 service cache(s) here.
298 (camel_session_class_init): Don't initialize.
299 vee_provider.service_cache here.
300 (camel_session_destroy_provider): Update to destroy multiple
302 (service_cache_remove, get_service): Tweak these a bit to deal
303 with multiple service_caches.
305 2002-04-02 Jeffrey Stedfast <fejj@ximian.com>
307 * camel-tcp-stream-ssl.c (set_errno): Handle a ton more nspr i/o
309 (stream_connect): Act as if we are doing a non-blocking
310 connect. This is to try and work around bug #15120 where users get
311 an EINPROGRESS error. Maybe importing a PRFileDesc into SSL mode
312 automagically makes it non-blocking? I dunno.
314 2002-04-01 Jeffrey Stedfast <fejj@ximian.com>
316 * camel-folder-summary.c (message_info_new): Updated the
317 construction of the references to match JWZ's updated algorithm
318 initialization (ie, append any In-Reply-To reference onto any
319 References header and never take more than a single message-id
320 from the In-Reply-To header since anything after the first will
321 probably just be email addresses). Fixes bug #1336.
323 2002-04-03 Not Zed <NotZed@Ximian.com>
325 * providers/local/camel-local-folder.c
326 (camel_local_folder_construct): Turn indexing back on, fingers
329 * camel-block-file.c (sync_nolock): #!@$@$#@~#$
330 DF@#$!Q@$#!@$#!#%. Well it helps if we're iterating a list to
331 iterate the node pointer ...
333 * camel-text-index.c (text_index_sync): Sync the key tables
335 (text_index_sync): Debug out frag info.
336 (camel_text_index_dump): Added a (rather large, but optional) raw
337 dumping mode for debugging purposes.
339 * camel-partition-table.c (camel_key_table_finalise): Sync root
341 (camel_key_table_sync): New function, sync key table (root) explicitly.
342 (camel_partition_table_sync): Method to explicitly sync the
345 2002-04-02 Not Zed <NotZed@Ximian.com>
347 * camel-block-file.c (camel_block_file_free_block): Mark root
348 block dirty when we change it (this function isn't used yet
351 * camel-text-index.c (text_index_add_name_to_word): Touch the root
352 block when we modify the counts. Also, abort processing on any
354 (text_index_sync): Fix typo in comments. Sync the block file
356 (text_index_compress_nosync): Lock the old index while we're
358 (text_index_compress_nosync): Remove the bogus while() at the end
359 of the while() loops! Also plug a memleak - records weren't
361 (text_index_rename): Lock around rename op.
362 (text_index_add_name): More typos.
363 (text_index_sync): Touch root when changing it.
364 (text_index_add_name): "
365 (text_index_delete_name): "
366 (camel_text_index_new): Touch root if we change it.
367 (text_index_cursor_reset): Make sure we NULL pointers after we
368 free them (nothing uses this yet).
370 * camel-partition-table.c (hash_key): Remove some debug
371 accidentally left in.
372 (camel_partition_table_add): When linking in the next block list,
373 set the right previous pointer.
374 (camel_key_table_add): Simplify the 'left' calculation (it was
376 (camel_key_table_next): Initialise returns before processing.
377 Broaden the lock slightly, and simplify validity calculations.
379 * providers/imap/camel-imap-store.c (imap_keepalive): Put back in
380 the exception setup stuff i disabled for debugging.
382 * providers/local/camel-local-folder.c
383 (camel_local_folder_construct): Temporarily disable indexing.
385 2002-03-28 Not Zed <NotZed@Ximian.com>
387 * camel-partition-table.c (camel_key_table_lookup): Change range
388 checking assert to a warning.
390 * providers/pop3/camel-pop3-folder.c (pop3_finalize): Make sure we
391 flush out all outstanding commands before finalising, stops being
392 finalised while outsanding requests are processed by the store
394 (pop3_get_message): Instead of pre-fetching all messages, just
395 pre-fetch a maxiumum number at any one time, stops us running out
398 * providers/nntp/camel-nntp-folder.c (nntp_folder_init/finalise):
399 Setup priv data + locks, & free.
401 * providers/imap/camel-imap-folder.c (imap_rescan): Batch all
402 message_chagned events into a single folder_changed event
403 (otherwise updates can be >>> expensive, like >5 hours for 80K
404 messages changing!). Alternately it could use folder
405 freeze/unfreeze perhaps.
407 2002-03-27 Not Zed <NotZed@Ximian.com>
409 * providers/imap/camel-imap-store.c (imap_keepalive): Pass an
410 exception to called code so it behaves properly since it uses the
411 passed exception to check returns.
413 2002-04-01 Dan Winship <danw@ximian.com>
415 * providers/imap/Makefile.am (libcamelimap_la_LDFLAGS): Use
416 -avoid-version instead of -version-info 0:0:0, and specify
417 -module. (From Max Horn <max@quendi.de>).
419 * providers/local/Makefile.am (libcamellocal_la_LDFLAGS): Likewise.
421 * providers/nntp/Makefile.am (libcamelnntp_la_LDFLAGS): Likewise.
423 * providers/sendmail/Makefile.am (libcamelsendmail_la_LDFLAGS):
426 * providers/smtp/Makefile.am (libcamelsmtp_la_LDFLAGS): Likewise.
428 * providers/pop3/Makefile.am (libcamelpop3_la_LDFLAGS): Likewise.
429 Also remove $(KRB4_LDFLAGS) since KPOP is gone.
430 (INCLUDES): and $(KRB4_CFLAGS)
432 2002-03-28 Jeffrey Stedfast <fejj@ximian.com>
434 * camel-filter-driver.c (do_copy): We now have to check to make
435 sure that p->message is non-NULL because we only load the message
437 (do_move): Same here.
439 2002-03-28 Dan Winship <danw@ximian.com>
441 * camel-transport.c (camel_transport_send_to): Change the message
442 arg to a CamelMimeMessage instead of a CamelMedium. Even the NNTP
443 provider returns CamelMimeMessages, and we're never going to
444 support anything more exotic than that. Also do a few more
445 g_return_if_fails here instead of in the providers.
446 (camel_transport_can_send): No longer needed.
447 (camel_transport_send): Remove this too. It wasn't being used any
448 more, and it doesn't behave exactly the same in sendmail and smtp.
450 * providers/smtp/camel-smtp-transport.c (smtp_send,
451 smtp_can_send): Gone.
452 (smtp_send_to): Update for arg change.
453 (smtp_data): Make this take a CamelMimeMessage too.
455 * providers/sendmail/camel-sendmail-transport.c (sendmail_send,
456 sendmail_can_send): Gone.
457 (sendmail_send_to): Update for arg change, and merge in the part
458 that used to be shared with sendmail_send.
460 2002-03-27 Jeffrey Stedfast <fejj@ximian.com>
462 * camel-filter-driver.c (camel_filter_driver_filter_folder):
463 Construct the source_url the right way. The previous way was
464 generating urls like pop://fejj@ximian.com;keep_on_server/inbox
467 2002-03-26 Not Zed <NotZed@Ximian.com>
469 * camel-text-index.c (text_index_normalise): Changed to use just
470 g_utf8_strdown instead of utf8_normalise, to match the indexing
471 code. utf8_normalise is just far too expensive (saves approx 25%
474 2002-03-25 Not Zed <NotZed@Ximian.com>
476 * camel-text-index.c (text_index_add_name): When we add a new
477 name, up all of the cache limits, because we're probably going to
479 (text_index_sync): Drop the cache limits back down again, we dont
480 need them when looking words up.
482 ** MERGE camel_index branch.
484 * camel-text-index.[ch]: Added files i forgot to add (eep nearly
487 * camel-block-file.c (sync_nolock): Fix an infinite loop in syncing.
489 2002-03-21 Jeffrey Stedfast <fejj@ximian.com>
491 * camel-folder-summary.c (camel_message_info_new_from_header): Use
492 the date in the received header for the received_date.
494 2002-03-22 Not Zed <NotZed@Ximian.com>
496 * providers/local/camel-local-folder.c
497 (camel_local_folder_construct): Use the right option to remove the
498 index file and reset the index file on creation.
499 (camel_local_folder_construct): Remove any existing '.ibex' files
500 - these are the old format index files.
502 * camel-block-file.c (camel_block_file_rename): Lock io lock while
504 (camel_key_file_rename): Lock around rename.
505 (block_file_validate_root): Implement sync flag checking.
506 (camel_block_file_touch_block): Turn off the sync flag if we're
507 touching any non-root block and write it to disk. Shoudl this
509 (sync_nolock): sync the root block only if we need to.
511 * providers/local/camel-local-store.c (rename_folder): Re-enable
512 index rename code. Not sure how race-free it is though.
513 (delete_folder): Delete the index file properly.
515 * camel-partition-table.c (camel_key_table_lookup): Initialise
516 output values to 0 before doing anything.
517 (camel_key_table_add): Do some range-checking on values.
519 * camel-text-index.c (text_index_compress): Changed to call sync here.
520 (text_index_compress_nolock): and not here - stops a recursive
521 sync call when sync performs a compress also.
522 (text_index_compress_nolock): Change to _nosync, since the locking
523 is irrelevent (recursive lock). Fixed callers.
524 (text_index_add_name_to_word): If we get a failure with key table
525 ops, fail immediately.
526 (text_index_compress_nosync): Likewise.
527 (text_index_write_name): If the nameid is 0, do nothing.
528 (text_index_add_name): If we can't get a keyid, dont add it to the
530 (camel_text_index_remove): Function to delete an index file.
531 (text_index_compress_nosync): Clean up temp files when done.
533 * camel-folder-search.c (match_messages_index): New function,
534 split from body_contains, matches a regex against all words in an
536 (match_message_index): Similar to above but matches against an
538 (search_body_contains): Changed to use above functions for
539 matching - substring matches should now work on indexed data.
541 2002-03-21 Not Zed <NotZed@Ximian.com>
543 * camel-index.c (camel_index_words/names): New virtual
544 methods/stubs to get a cursor of all words and names.
546 * camel-text-index.c (text_index_compress_nolock): Split from
547 text_index_compress, so we can call the compressor while locked
548 also, removed lock calls.
549 (text_index_compress): Changed to stub which calls
550 text_index_compress_nolock.
551 (camel_text_index_key_cursor_new): New object to iterate through
553 (text_index_words, text_index_names): Implement virtual functions
554 for iterating through all words or names.
556 * camel-block-file.c: Turn off some debug.
558 2002-03-20 Not Zed <NotZed@Ximian.com>
560 ** New body index implementation.
562 * camel-index*: Code for camel index, a new class to replace ibex.
564 * camel-block-file.[ch]: block-based and link based
565 filesystem-in-a-file classes.
567 * camel-partition-table.[ch]: An implementation of a partition
568 table (automatically extending on-disk hash-table using ideal
569 hash), and a key-table, a key<>name mapping table. Used by
572 * providers/local/*, camel-folder-summary.[ch]: Changed to use
573 camel-index interface rather than ibex.
575 2002-03-05 Not Zed <NotZed@Ximian.com>
577 * providers/local/camel-maildir-summary.c (maildir_summary_check):
578 Do progress reporting of operations.
579 (maildir_summary_sync): Same here.
581 2002-03-04 Not Zed <NotZed@Ximian.com>
583 * providers/local/camel-spoold-store.c (scan_dir): Kill a warning
586 * providers/local/camel-*.c: Changed for ibex->camelindex.
588 * camel-folder-search.c (camel_folder_search_set_summary): Init
589 summary_hash to point to 'static' uid strings.
590 (search_body_contains): Use the static uid memory to return
591 results rather than the values from the index library.
593 * camel-folder-search.[ch]: Changed to use camelindex object.
595 * camel-folder-summary.c (summary_build_content_info_message):
596 Use a stream to index content, also filter html mail first.
597 (camel_folder_summary_info_new_from_message): Use a stream
598 filtered to index content.
599 (main): Removed the test main code. Added headers for open call
600 (ibex must've had them before).
602 * camel-folder-summary.[ch]: Changed from ibex to CamelIndex.
604 * camel-mime-filter-index.c (camel_mime_filter_index_finalize):
607 * camel-mime-filter-index.[ch]: Changed from ibex to CamelIndex.
609 2002-03-19 Jeffrey Stedfast <fejj@ximian.com>
611 * camel-mime-utils.c (header_encode_param): Fix this to work
612 right. We need to convert the input buffer to the charset we claim
613 in the encoded param (duh).
615 2002-03-18 Jeffrey Stedfast <fejj@ximian.com>
617 * providers/smtp/camel-smtp-transport.c
618 (connect_to_server_wrapper): Updated to use the same logic as the
621 * providers/pop3/camel-pop3-store.c (connect_to_server): No longer
622 takes a stls_supported argument since we no longer need it with
624 (connect_to_server_wrapper): New logic: First try connecting to
625 the SSL port (995 by default), if that fails with
626 SERVICE_UNAVAILABLE, then we attempt to connect (to port 110 by
627 default) and try to use STARTTLS.
629 2002-03-15 Jeffrey Stedfast <fejj@ximian.com>
633 * camel-private.h: Don't allow any empty structs. If
634 !ENABLE_THREADS, provide a gpointer dummy member. Fixes bug #6382.
636 2002-03-13 Jeffrey Stedfast <fejj@ximian.com>
638 * providers/smtp/camel-smtp-transport.c (smtp_auth): Added a
639 work-around for SMTP servers that can't read the RFCs and thus
640 implement SASL incorrectly. Oh well, that's life in the world of
641 mail clients I guess.
643 2002-03-12 Jeffrey Stedfast <fejj@ximian.com>
645 * camel-digest-store.c (camel_digest_store_new): Now takes a url
648 * camel-digest-folder.c (digest_add_multipart): Fixed some memory
649 corruption and also modified to use CAMEL_IS_MIME_MESSAGE() rather
650 than comparing content-type strings.
651 (digest_get_message): Fixed a logic blooper.
653 * camel-folder-summary.c (camel_message_info_new_from_header): Set
654 the date fields of the CamelMessageInfo as well. This may even fix
655 some filter-related bugs where the user was trying to compare
658 2002-03-11 Jeffrey Stedfast <fejj@ximian.com>
660 * camel-digest-store.c: A pretty empty store implementation to be
661 the parent store of a CamelDigestFolder.
663 * camel-digest-folder.c: Updated to reference it's parent store.
665 2002-03-11 Jeffrey Stedfast <fejj@ximian.com>
667 * camel-digest-folder.c (camel_digest_folder_new): Allow any leaf
668 part to be a message/rfc822 part.
669 (digest_get_uids): Recurse the mime structure and add all
670 message/rfc822 parts and use a uid scheme similar to IMAP's mime
671 part naming convention.
672 (digest_get_message): Decode the uid to get the correct mime part.
674 2002-03-11 Ettore Perazzoli <ettore@ximian.com>
676 * camel-mime-utils.c: Change the order of the mailing list magic
677 patterns so that the more mailing-list specific ones are on the
680 2002-03-11 Jeffrey Stedfast <fejj@ximian.com>
682 These fixes should fix bug #21737.
684 * providers/smtp/camel-smtp-transport.c
685 (connect_to_server_wrapper): Same as with the POP code.
687 * providers/pop3/camel-pop3-store.c (connect_to_server_wrapper):
688 Slight restructuring of the if-statements for the USE_SSL_ALWAYS
689 case so that we can't possibly return TRUE unless we really did
690 connect successfully.
692 2002-03-10 Dan Winship <danw@ximian.com>
694 Rename the OpenSSL implementation of things to match the NSS
695 implementation so that callers don't need to care which one is
698 * camel-tcp-stream-openssl.c: Implement CamelTcpStreamSSL, not
699 CamelTcpStreamOpenSSL. Rename methods as well. Replace the
700 camel-tcp-stream-openssl.h include with camel-tcp-stream-ssl.h.
702 * camel-tcp-stream-openssl.h: Gone.
704 * camel-tcp-stream-ssl.c: Add a note explaining that this
705 implementation is only used for NSS, and that OpenSSL's
706 implementation is in another file. (Should probably do some CVS
707 renaming magic at some point.)
709 * camel-http-stream.c (http_connect): Remove OpenSSL refs; the
710 previously-NSS-specific code works for both now.
712 * camel-remote-store.c: Likewise.
714 * providers/smtp/camel-smtp-transport.c: Likewise.
716 * providers/pop3/camel-pop3-store.c: Likewise.
718 * Makefile.am (libcamelinclude_HEADERS): Remove
719 camel-tcp-stream-openssl.h
721 2002-03-10 Dan Winship <danw@ximian.com>
723 * camel-tcp-stream.c (camel_tcp_stream_get_socket): Remove this:
724 it couldn't be generically used, because different subclasses
725 returned entirely different types of data.
726 (camel_tcp_stream_get_local_address,
727 camel_tcp_stream_get_remote_address): Add these to replace what
728 get_socket was being used for.
729 (camel_tcp_address_new, camel_tcp_address_free): Utility functions
730 for get_{local,remote}_address.
732 * providers/smtp/camel-smtp-transport.c: Change localaddr to a
734 (connect_to_server): Call camel_tcp_stream_get_local_address to
735 get the local IP address.
736 (smtp_disconnect): free localaddr.
737 (smtp_helo): Update for localaddr change.
739 * camel-tcp-stream-raw.c (stream_get_socket): Remove
740 (stream_get_local_address, stream_get_remote_address): Implement.
742 * camel-tcp-stream-ssl.c (stream_get_socket): Remove
743 (stream_get_local_address, stream_get_remote_address): Implement.
745 * camel-tcp-stream-openssl.c (stream_get_socket): Remove
746 (stream_get_local_address, stream_get_remote_address): Implement.
748 2002-03-08 Jeffrey Stedfast <fejj@ximian.com>
750 * providers/pop3/camel-pop3-provider.c
751 (camel_provider_module_init): Don't call
752 camel_remote_store_get_authtypes since we no longer subclass
755 * providers/pop3/camel-pop3-engine.c: Added STARTTLS to the
756 capabilities to look for.
757 (camel_pop3_engine_reget_capabilities): New function to re-get
760 * providers/pop3/camel-pop3-store.c: Updated to not subclass
762 (connect_to_server): Rewritten to not depend on CamelRemoteStore's
763 connect implementation. Also added support for STLS (aka
766 2002-03-07 Jeffrey Stedfast <fejj@ximian.com>
768 * camel-pgp-mime.c (camel_pgp_mime_part_sign): Add support for
771 * camel-cipher-context.h: Add RIPEMD160 hash type.
773 * camel-pgp-context.c (pgp_sign): Updated to consider hash
774 function for pgp5 and pgp6.
775 (pgp_clearsign): Same.
777 * camel-tcp-stream-openssl.c (stream_read): Add a timeout on the
779 (stream_write): Same.
781 2002-03-06 Jeffrey Stedfast <fejj@ximian.com>
783 * providers/smtp/camel-smtp-transport.c (connect_to_server): Fix
784 to work with OpenSSL.
786 * camel-tcp-stream-openssl.c: compile fixes.
787 (camel_tcp_stream_openssl_enable_ssl): Check to make sure that the
788 sockfd != -1, it's not enough to check that it is non-zero. Also
789 set the sockfd to -1 on fail (open_ssl_connection will close the
792 2002-03-06 Dan Winship <danw@ximian.com>
794 * providers/smtp/camel-smtp-transport.c (smtp_construct): Make
797 2002-03-05 Jeffrey Stedfast <fejj@ximian.com>
799 * camel-tcp-stream-ssl.c (save_ssl_cert): Removed. Glory glory
801 (ssl_bad_cert): No longer calls ssl_save_cert or
804 2002-03-05 Jeffrey Stedfast <fejj@ximian.com>
806 * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_new_raw):
807 Start the ssl stream off in non-ssl mode (useful for STARTTLS).
808 (camel_tcp_stream_openssl_enable_ssl): New function to toggle an
809 ssl stream into ssl mode.
810 (open_ssl_connection): Close the sockfd on fail so our caller
811 doesn't have to - this also allows us to save the original errno.
812 (stream_connect): If we want ssl mode, do our ssl stuff.
813 (camel_tcp_stream_openssl_class_init): Init some SSL stuff here
814 instead of in open_ssl_connection since these only ever need to be
816 (stream_read): Only use SSL_read if we are in ssl mode.
817 (stream_write): Only use SSL_write if we are in ssl mode.
819 * providers/smtp/camel-smtp-transport.c (smtp_helo): Check for the
821 (connect_to_server): Try to use STARTTLS whenever possible rather
822 than the old way of doing things.
823 (connect_to_server_wrapper): Wrapper around connect_to_server() to
824 first try STARTTLS and then attempt normal SSL mode if we can't
825 connect via STARTTLS.
827 * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_enable_ssl): New
828 function to toggle an ssl stream into ssl mode.
829 (camel_tcp_stream_ssl_new_raw): Start the ssl stream off in
830 non-ssl mode (useful for STARTTLS).
831 (stream_connect): Only connect in SSL mode if required.
833 2002-03-01 Jeffrey Stedfast <fejj@ximian.com>
835 * camel-vtrash-folder.h:
837 * camel-vee-folder.h:
838 * camel-stream-null.h:
839 * camel-stream-filter.h:
840 * camel-store-summary.h:
841 * camel-news-address.h:
842 * camel-mime-utils.h:
843 * camel-mime-parser.h:
844 * camel-mime-filter-save.h:
845 * camel-mime-filter-linewrap.h:
846 * camel-mime-filter-index.h:
847 * camel-mime-filter-html.h:
848 * camel-mime-filter.h:
849 * camel-mime-filter-from.h:
850 * camel-mime-filter-crlf.h:
851 * camel-mime-filter-chomp.h:
852 * camel-mime-filter-charset.h:
853 * camel-mime-filter-bestenc.h:
854 * camel-mime-filter-basic.h:
855 * camel-internet-address.h:
856 * camel-folder-thread.h:
857 * camel-folder-summary.h:
858 * camel-folder-search.h:
859 * camel-filter-driver.h:
860 * camel-charset-map.h:
861 * camel-address.h: Add c++ armoring.
863 * camel-object.h: s/class/klass
865 2002-03-01 Jeffrey Stedfast <fejj@ximian.com>
867 * camel-mime-part-utils.c
868 (camel_mime_part_construct_content_from_parser): Reverted my
869 pgp/mime fixes here too.
871 * camel-mime-part.c (write_to_stream): Removed my pgp/mime raw
872 stream hack, this is causing problems such as some messages to not
873 displaying, view->source not working at all, etc.
875 2002-02-28 Jeffrey Stedfast <fejj@ximian.com>
877 * camel-mime-parser.c: Changed offset variables from int's to
878 off_t's since the system may support large files.
880 * camel-mime-part-utils.c
881 (camel_mime_part_construct_content_from_parser): Rearrange the
882 save filter stuff so that we save raw streams for all mime
883 parts. If the mime part turns out to be a multupart, then don't
884 bother saving the raw stream, we only need to save the raw stream
887 2002-02-27 Jeffrey Stedfast <fejj@ximian.com>
889 * camel-folder-summary.h: Don't #include camel-mime-filter-save.h,
892 * camel-file-utils.c: Fixed a few 'might be used uninitialized'
893 warnings which were real problems.
895 * camel-mime-part-utils.c
896 (camel_mime_part_construct_content_from_parser): Save the raw mime
897 stream for any/all signed parts.
899 * camel-mime-part.c (camel_mime_part_init): Initialize our raw
901 (camel_mime_part_finalize): Unref our raw stream, if we have one.
902 (write_to_stream): If we have a raw stream, write that out instead
905 * camel-mime-filter-save.[c,h]: Rewritten to save to a stream
908 2002-02-28 Not Zed <NotZed@Ximian.com>
910 * camel-mime-utils.c (header_fold): Use the FOLD_SIZE as a
911 recommended folding size, but add a new FOLD_MAX_SIZE (=998, the
912 smtp max line size) as the hard limit for any output.
914 2002-02-27 Jeffrey Stedfast <fejj@ximian.com>
916 * camel-mime-filter-chomp.c (camel_mime_filter_chomp_new): New
917 stream filter that chomps excess trailing whitespace from the end
918 of the stream. This is needed to update the PGP/MIME code to
921 * camel-pgp-mime.c (camel_pgp_mime_part_verify): Don't attach a
922 from filter, if it ain't from-filtered already, then we'll just be
923 breaking stuff. To become rfc3156 compliant, add a chomp filter
925 (camel_pgp_mime_part_sign): Add a chomp filter here too.
927 2002-02-27 Not Zed <NotZed@Ximian.com>
929 * camel-mime-part.c (init_header_name_table): Changed header
930 formatted table to contain a pointer to an output function, and
931 added in-reply-to and references headers.
932 (write_references): New function to write out references header,
933 folded properly. It only approximates based on the last >, but it
934 should be adequate and will also handle invalid headers.
935 (write_fold): Function to write out headers folded. Since this is
936 the default it isn't required.
937 (write_raw): Write out an already formatted header, e.g. most of
939 (write_to_stream): Lookup header output function, if we have one,
940 use that, otherwise fold header using basic (dumb) function.
942 This is all for #14779. A better fix is probably do have the
943 headers always stored formatted, but that can wait.
945 2002-02-25 Jeffrey Stedfast <fejj@ximian.com>
947 * camel-digest-folder.c (camel_digest_folder_new): Allow all
948 multiparts that contain message/rfc822 attachments.
949 (digest_get_uids): Only assign uids to message parts.
951 2002-02-22 Jeffrey Stedfast <fejj@ximian.com>
953 * camel-mime-part.c (camel_mime_part_set_filename): Set the 'name'
954 parameter on the Content-Type too. Fixes bug #20779.
956 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
958 * camel-pgp-context.c (pgp_sign): Pass --always-trust to gpg
959 (requested by users).
960 (pgp_clearsign): Same.
961 (pgp_encrypt): Here too.
963 2002-02-12 Jeffrey Stedfast <fejj@ximian.com>
965 * providers/smtp/camel-smtp-transport.c (smtp_helo): Since the
966 AUTH token sometimes uses '=' instead of whitespace, don't use
967 smtp_token_next here.
969 2002-02-09 Not Zed <NotZed@Ximian.com>
971 * providers/pop3/camel-pop3-engine.c (get_capabilities): Duh, when
972 we grab the apop stamp it needs to include the <> as well, I even
973 read the rfc, silly me.
975 * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): Doh,
976 when iterating the authtype list, it helps to goto the next node.
977 Found with help from miles.
979 2002-02-08 Not Zed <NotZed@Ximian.com>
981 * providers/local/camel-spool-summary.c
982 (camel_spool_summary_build_from): The day number has to be 2 chars
983 wide, space filled to work properly with pine, etc.
985 * providers/local/camel-spoold-store.[ch]: new type of provider
986 'spool directory', which lets you view external mbox dirs without
987 adding any extra cruft. Perhaps it should use . files to store
988 summaries? Still a bit experimental, there's a warning when you
989 select it in the account editor. Finished off most of #1185.
990 Can't rename or move folders.
992 * camel-mime-utils.c (header_decode_date): If the date is
993 100->1900 then we actually want to use it as the year in the tm
994 struct, not year+100. e.g. year 102 -> 2002, not 2102.
996 2002-02-07 Not Zed <NotZed@Ximian.com>
998 * providers/local/camel-spool-store.c (get_folder): Pass path into
1001 * providers/local/camel-spool-folder.c (camel_spool_folder_new):
1002 (camel_spool_folder_construct): Take the full path to the folder
1003 and use that as the file path, independent of the full_name we
1006 2002-02-07 Not Zed <NotZed@Ximian.com>
1008 * providers/local/camel-local-provider.c: Added new type, spoold
1009 provider, spoold: for local directories.
1011 * providers/imap/camel-imap-store.c (get_one_folder_offline):
1012 Create offline uri's in a compatible manner to online ones.
1014 2002-02-07 Dan Winship <danw@ximian.com>
1016 * camel-sasl-ntlm.c: Implementation of NTLM (aka "Secure Password
1017 Authentication") auth, taken from soup.
1019 * Makefile.am (libcamel_la_SOURCES, libcamel_la_HEADERS): Add
1022 * camel-sasl.c: Add refs to camel-sasl-ntlm.
1024 * providers/imap/camel-imap-store.c (try_auth): Use
1025 imap_next_word() to skip over the "+ " of the continuation rather
1026 than just "resp + 2" since Exchange (incorrectly) returns "+"
1027 instead of "+ " for an empty continuation response.
1029 2002-02-06 Jeffrey Stedfast <fejj@ximian.com>
1031 * camel-folder-summary.h: Remove the CAMEL_MESSAGE_NEEDS_REPLY
1032 flag, we no longer will be using this.
1034 2002-02-04 Jeffrey Stedfast <fejj@ximian.com>
1036 * camel-http-stream.c (stream_read): Use camel_mime_parser_read to
1037 read internal parser data.
1038 (camel_http_stream_get_content_type): Implemented.
1039 (http_method_invoke): Use HTTP/1.0 instead of 1.1
1041 * camel-mime-utils.c (header_decode_int): Made public.
1043 * camel-http-stream.[c,h]: Added. New stream for HTTP requests
1044 (currently supported are GET and HEAD).
1046 * camel-tcp-stream-ssl.c (stream_connect): Call set_errno
1049 2002-01-31 Not Zed <NotZed@Ximian.com>
1051 * camel-mime-utils.c (header_decode_domain): Oops, this was
1052 converting foo@[blah] to foo@[ blah ], fixed.
1054 2002-01-30 Jeffrey Stedfast <fejj@ximian.com>
1056 * providers/pop3/camel-pop3-provider.c: Use "pop" instead of
1057 "pop3" so current configurations continue to work.
1059 2002-01-30 Not Zed <NotZed@Ximian.com>
1061 * camel-sasl-login.c: Changed name from "NT Login" to simply
1064 * providers/pop3/*: Entirely new pop implmentation, supporting
1067 2002-01-29 Not Zed <NotZed@Ximian.com>
1069 * camel-data-cache.c (free_busy): We dont want to unref the
1070 stream, instead, stop listening to the finalised events, and free
1073 2002-01-25 Not Zed <NotZed@Ximian.com>
1075 * camel-data-cache.c (stream_finalised): Remove the object from
1076 the busy_stream hashtable, not the busy_path hashtable.
1078 2002-01-29 Jeffrey Stedfast <fejj@ximian.com>
1080 * providers/imap/camel-imap-folder.c (imap_update_summary): Added
1081 more kludge to an existing Exchange IMAP 5.5 kludge to work around
1082 it returning multiple messages with the same UIDs.
1084 2002-01-28 Jeffrey Stedfast <fejj@ximian.com>
1086 * camel-mime-message.c (process_header): Handle Resent headers
1089 * camel-mime-message.h: Added Resent-* #defines.
1091 * camel-filter-driver.c (camel_filter_driver_remove_rule_by_name):
1092 Use while (node->next) instead of while (node)
1094 * providers/smtp/camel-smtp-transport.c (smtp_decode_status_code):
1095 New function to decode an enhanced status code.
1096 (smtp_set_exception): Sets an exception based on the
1097 Enhanced-Status-Code.
1098 (esmtp_get_authtypes): Don't diplicate the key in the hash since
1099 the key and value are the same.
1100 (smtp_rcpt): Include the failed recipient in the error message to
1101 be more helpful to the user.
1103 * camel-mime-utils.c (hex_decode): Make sure to allocate enough
1106 2002-01-28 Jeffrey Stedfast <fejj@ximian.com>
1108 * providers/smtp/camel-smtp-transport.c (smtp_construct):
1109 (connect_to_server): Use flags rather than a bunch of gboolean
1111 (smtp_connect): Same.
1112 (smtp_mail): Here too. Use the enhanced status codes if available.
1113 (smtp_data): And again here.
1114 (smtp_helo): Finally here. Also detect the ENHANCEDSTATUSCODES
1116 (smtp_rcpt): Use the enhanced status codes if available.
1117 (smtp_rset): Here too.
1118 (smtp_quit): And finally here.
1120 * camel-transport.h: Removed gboolean supports_8bit since this is
1121 pretty local to only SMTP for now.
1123 2002-01-24 Ettore Perazzoli <ettore@ximian.com>
1125 * Makefile.am: Remove some old cruft.
1127 2002-01-24 Ettore Perazzoli <ettore@ximian.com>
1129 * tests/folder/Makefile.am: s/MAILER_LIBS/EVOLUTION_MAIL_LIBS/.
1130 * tests/message/Makefile.am: Likewise.
1131 * tests/mime-filter/Makefile.am: Likewise.
1132 * tests/misc/Makefile.am: Likewise.
1133 * tests/smime/Makefile.am: Likewise.
1134 * tests/stream/Makefile.am: Likewise.
1136 2002-01-24 Jeffrey Stedfast <fejj@ximian.com>
1138 * camel-filter-driver.c (do_beep): Call the beep callback
1140 (camel_filter_driver_set_system_beep_func): New function to set
1143 2002-01-22 Jeffrey Stedfast <fejj@ximian.com>
1145 * camel-filter-driver.c (camel_filter_driver_remove_rule_by_name):
1146 New function to remove a filter rule by name.
1148 2002-01-21 Jeffrey Stedfast <fejj@ximian.com>
1150 * camel-filter-driver.c (do_beep): As a temporary solution, just
1151 printf ("\a"); to make a beep :-)
1153 * providers/imap/camel-imap-command.c
1154 (imap_command_strdup_vprintf): Encode the mailbox to UTF-7 here.
1156 * providers/imap/camel-imap-utils.c (imap_parse_list_response):
1157 Decode the mailbox name as we parse the list response.
1158 (imap_mailbox_decode): It's only an illegal mailbox name if it
1159 didn't switch back to US-ASCII mode.
1161 2002-01-18 Jeffrey Stedfast <fejj@ximian.com>
1163 * providers/imap/camel-imap-utils.c (imap_mailbox_decode): New
1164 function to decode an IMAP mailbox name from modified UTF-7
1166 (imap_mailbox_encode): New function to convert a mailbox name from
1167 UTF-8 to IMAP's modified UTF-7 encoding.
1169 2002-01-17 Jeffrey Stedfast <fejj@ximian.com>
1171 * camel-mime-filter-basic.c (filter): Stop uudecoding once the
1172 CAMEL_UUDECODE_STATE_END state bit gets set. Set the
1173 CAMEL_UUDECODE_STATE_BEGIN state bit once we find the begin line.
1174 (reset): No longer have uu_begin or uulen state variables, these
1175 are now stuffed into a single state variable.
1177 * camel-mime-utils.c (uudecode_step): No longer needs a uulen
1178 argument and also keeps track of whether or not the end of the
1179 encoded data has been found in 'state'.
1180 (uuencode_step): Now stuffs uulen into state so that the uulen
1181 argument is no longer needed.
1182 (uuencode_close): Same.
1184 2002-01-16 Jeffrey Stedfast <fejj@ximian.com>
1186 * camel-mime-filter-basic.c (filter): If we don't want to corrupt
1187 the uuencoded data by overwriting it with base64 decoded data
1188 afterward, we need to add a break statement!
1190 * camel-folder-summary.c (summary_build_content_info): Add code to
1192 (camel_folder_summary_finalize): Unref the uuencode filter.
1194 2002-01-16 Jeffrey Stedfast <fejj@ximian.com>
1196 * camel-mime-filter-basic.c (filter): Fixed slight logic error to
1197 find the uuencode begin line. Fixes bug #18754.
1199 2002-01-15 Jeffrey Stedfast <fejj@ximian.com>
1201 * providers/smtp/camel-smtp-transport.c (smtp_send_to): Updated to
1202 match the new send_to API.
1203 (smtp_send): Get the from address and pass that along to
1206 * providers/sendmail/camel-sendmail-transport.c
1207 (sendmail_send_to): Updated to match the new send_to API.
1209 * camel-transport.c (camel_transport_send_to): Now takes a from
1212 * providers/imap/camel-imap-folder.c (imap_update_summary): Sort
1213 the needheaders UID array and fixed to respect the
1214 UID_SET_LIMIT. This should now finish the fixification of bug
1215 #2529. There's still the possible issue that a command-line (The
1216 only command-line I can think of that can still be too long is a
1217 SEARCH command, but this can't possibly be fixed until we rewrite
1218 the imap code to use Zucchi's ImapEngine idea).
1220 2002-01-14 Jeffrey Stedfast <fejj@ximian.com>
1222 * providers/imap/camel-imap-folder.c (imap_expunge_uids_online):
1223 Move the command-lock outside the loop.
1225 2002-01-14 Jeffrey Stedfast <fejj@ximian.com>
1227 * providers/imap/camel-imap-folder.c (imap_expunge_uids_online):
1228 Updated to use the new imap_uid_array_to_set() interface.
1229 (imap_expunge_uids_resyncing): Same.
1230 (do_copy): Here too.
1231 (imap_update_summary): Added a FIXME comment to rewrite allowing
1232 for a uid-set limitation.
1233 (get_matching): Copy some of the logic over from
1234 imap_uid_adday_to_set() to limit the length of the uid-set string.
1235 (imap_sync_online): Added a comment to explain what is going on
1236 with get_matching() since the behavior has changed slightly.
1238 * providers/imap/camel-imap-utils.c (imap_uid_array_to_set):
1239 Modify the interface so that we can limit the size of the uid set
1242 2002-01-14 Not Zed <NotZed@Ximian.com>
1244 * providers/imap/camel-imap-search.c (imap_body_contains):
1245 Rewritten to use a cache for body searches when online. Will need
1246 some heavy testing but so far seems to be beneficial.
1248 * providers/imap/camel-imap-folder.c (imap_search_by_expression,
1249 search_by_uids): dont initialise search object here.
1250 (camel_imap_folder_new): Setup search object here with pointer to
1253 2001-12-01 Not Zed <NotZed@Ximian.com>
1255 * camel-store-summary.[ch]: New class to store a store's folder
1256 list in. Not yet completed.
1258 2002-01-11 Jeffrey Stedfast <fejj@ximian.com>
1260 * providers/imap/camel-imap-folder.c (imap_update_summary): Kludge
1261 around a bug in Exchange 5.5 that reports 2 messages with the same
1262 UID. Fixes bug #17694. Replaces the fix from yesterday.
1264 2002-01-10 Jeffrey Stedfast <fejj@ximian.com>
1266 * providers/local/camel-local-folder.c: If PATH_MAX doesn't exist,
1267 use _POSIX_PATH_MAX.
1269 * providers/imap/camel-imap-folder.c (imap_update_summary): If mi
1270 is NULL, don't bother updating it. Should fix bug #17694.
1272 2002-01-10 Jeffrey Stedfast <fejj@ximian.com>
1274 * camel.h: #include camel-mime-filter-tohtml.h
1276 * providers/imap/camel-imap-folder.c (imap_update_summary): Kludge
1277 around Microsoft Exchange 5.5 (bug #5348) by forgetting our
1278 currently selected folder and re-SELECTing it so that the Exchange
1279 server has a chance to realise it has new messages.
1281 2002-01-09 Jeffrey Stedfast <fejj@ximian.com>
1283 * providers/local/camel-local-folder.c
1284 (camel_local_folder_construct): If the mbox file is a symlink,
1285 follow the symlink and get the One True Path so that we can
1286 rewrite the mbox later without worrying about clobbering the
1289 2002-01-08 Jeffrey Stedfast <fejj@ximian.com>
1291 * camel-filter-search.c (TODO): There are a few sexp callbacks
1292 that could be modified to use fms->info rather than using a
1293 message object (like date and possibly mlist stuff) but *only* if
1294 the date exists on the CamelMessageInfo object (since it may be
1295 blank except for message flags).
1296 (camel_filter_search_get_message): New internal convenience
1297 function to make sure that the FilterMessageSearch has loaded the
1298 message (and to load the message if this isn't the case).
1299 (check_header): Call camel_filter_search_get_message().
1300 (header_exists): Same.
1301 (header_regex): Here too.
1302 (header_full_regex): And here.
1303 (body_contains): Again here.
1304 (body_regex): Here too.
1305 (get_sent_date): Here also.
1306 (get_received_date): Same.
1307 (get_source): Here if we need to.
1308 (camel_filter_search_match): Now takes a callback function/data
1309 pair for on-demand message loading so that we don't necessarily
1310 have to load the message if the defined filter rules don't require
1313 * camel-filter-driver.c (camel_filter_driver_filter_folder): Don't
1314 bother fetching the message here, let
1315 camel_filter_driver_filter_message() worry about this.
1316 (get_message_cb): New utility callback to fetch a message.
1317 (camel_filter_driver_filter_message): Only fetch the message if we
1318 absolutely need it to get a CamelMessageInfo. Instead of passing a
1319 message object to camel_filter_search_match(), pass get_message_cb
1320 and some user_data so that the matching code can fetch the message
1323 2002-01-07 Jeffrey Stedfast <fejj@ximian.com>
1325 * camel-folder.c (filter_filter): Flush the only-once actions.
1327 * camel-filter-driver.c (camel_filter_driver_filter_message):
1328 Don't increment a filtered_count here any longer.
1329 (camel_filter_driver_reset_filtered_count): Removed.
1330 (camel_filter_driver_get_filtered_count): Removed.
1331 (do_beep): New action.
1332 (play_sound): New action to play a sound
1333 (do_only_once): Another new action.
1334 (camel_filter_driver_finalise): Free the only_once hash if the
1335 driver has not been "flushed".
1336 (camel_filter_driver_flush): Flush all of the only-once actions.
1338 * camel-charset-map.c: Moved windows-1251 to the end of the list
1339 since it contains the euro and we'd prefer to use iso-8859-15 when
1340 the euro is requested than a windows charset if possible.
1342 * camel-charset-map-private.h: Regenerated.
1344 2001-12-12 Jeffrey Stedfast <fejj@ximian.com>
1346 * camel-folder-summary.c (content_info_load): Don't try setting a
1347 content-type parameter if either the name or value is NULL.
1349 * camel-mime-utils.c (header_set_param): NULL-protection.
1351 2002-01-02 Jeffrey Stedfast <fejj@ximian.com>
1353 * camel-tcp-stream-ssl.c (ssl_bad_cert): Do more like what mutt
1354 does so hopefully this'll fix bug #16363 and #16300.
1356 2001-12-21 Jeffrey Stedfast <fejj@ximian.com>
1358 * broken-date-parser.c (parse_broken_date): Completely
1359 rewritten. It is now a load faster and a heck of a lot more
1360 accurate, also now returns a time_t and sets the saveoffset
1361 variable rather than returning a new char* buffer for the normal
1362 camel date parser to re-parse. This saves a fair number of cpu
1365 * camel-mime-utils.c (header_decode_date): Cleanup the broken date
1368 2001-12-20 Jeffrey Stedfast <fejj@ximian.com>
1370 * camel-address.h: Change the prototype for camel_address_get_type
1371 to return a CamelType (since internally this is what it returns
1372 and also in case we decide to write a replacement for the current
1373 CamelObject it'd be easier to drop in).
1375 * camel-internet-address.h: Same but for
1376 camel_internet_address_get_type()
1378 * providers/smtp/camel-smtp-transport.c (smtp_send_to): Updated to
1379 use a CamelAddress of recipients.
1380 (smtp_send): Since smtp_send_to now takes a CamelAddress
1381 recipients argument, our lives have been simplified and we can now
1382 just concat To/Cc/Bcc into a recipients addr and send away.
1384 * providers/sendmail/camel-sendmail-transport.c
1385 (sendmail_send_to): Updated to use a CamelAddress of recipients.
1387 * camel-transport.c (camel_transport_send_to): Now takes a
1388 CamelAddress argument for the recipient list rather than a GList.
1390 2001-12-19 Jeffrey Stedfast <fejj@ximian.com>
1392 * providers/smtp/Makefile.am: Remove the providerdir variable.
1394 * providers/sendmail/Makefile.am: Same.
1396 2001-12-17 Jeffrey Stedfast <fejj@ximian.com>
1398 * camel-charset-map.c (camel_charset_iso_to_windows): New function
1399 to map ISO charsets to the Windows charsets.
1401 * camel-mime-part-utils.c (broken_windows_charset): Detect Windows
1403 (simple_data_wrapper_construct_from_parser): Simplify a tad and
1404 also check for iso-8859-* charsets that are really Windows
1405 charsets. Fixes bug #12631.
1407 2001-12-17 Dan Winship <danw@ximian.com>
1409 * Makefile.am (INCLUDES): define CAMEL_PROVIDERDIR to be the
1410 configure.in-defined camel_providerdir.
1412 * providers/Makefile.am: Remove some outdated comments
1414 * providers/imap/Makefile.am (camel_provider_LTLIBRARIES,
1415 camel_provider_DATA): renamed from provider_LTLIBRARIES,
1418 * providers/local/Makefile.am: Likewise
1420 * providers/nntp/Makefile.am: Likewise
1422 * providers/pop3/Makefile.am: Likewise
1424 * providers/sendmail/Makefile.am: Likewise
1426 * providers/smtp/Makefile.am: Likewise
1428 2001-12-16 Jeffrey Stedfast <fejj@ximian.com>
1430 * providers/imap/camel-imap-folder.c (get_content): Reverted my
1431 previous changes here since it doesn't actually work afterall.
1433 * providers/imap/camel-imap-wrapper.c (imap_wrapper_hydrate):
1434 Update to do uudecoding when appropriate.
1436 2001-12-16 Jeffrey Stedfast <fejj@ximian.com>
1438 * providers/imap/camel-imap-folder.c (get_content): Try to use the
1439 original boundary so luis will stop bugging me about "data
1440 corruption". Also preserve other params in the multipart
1441 content-type by dumping it to a string and setting it on the mime
1444 2001-12-14 Jeffrey Stedfast <fejj@ximian.com>
1446 * camel-filter-driver.c
1447 (camel_filter_driver_reset_filtered_count): Reset the
1448 filtered_count to zero.
1449 (camel_filter_driver_get_filtered_count): Return the private
1450 filtered_count value.
1451 (camel_filter_driver_filter_message): Increment the
1453 (camel_filter_driver_set_shell_exec_func): New function to set the
1455 (shell_exec): New ESExp filter action callback.
1457 2001-12-14 Jeffrey Stedfast <fejj@ximian.com>
1459 * camel-pgp-mime.c (camel_pgp_mime_part_verify): Removed
1460 x-inline-pgp-hack kludge because it doesn't work.
1461 (camel_pgp_mime_part_decrypt): Same.
1463 2001-12-13 Chris Toshok <toshok@ximian.com>
1465 * camel-data-cache.c: include stdlib.h (for alloca on freebsd) and
1466 only include alloca.h if HAVE_ALLOCA_H is defined.
1468 2001-12-11 Zbigniew Chyla <cyba@gnome.pl>
1472 * camel-charset-map.c: Added #include <errno.h>.
1474 * camel-charset-map-private.h:
1475 Recreated (following instructions from camel-charset-map.c)
1477 2001-12-11 Jeffrey Stedfast <fejj@ximian.com>
1479 * camel-object.c (camel_type_register): Keep a name-to-type hash
1480 so that we can make sure that the type has not yet been registered
1481 (prevents a race condition such as the one in bug #16559).
1483 * camel-service.c (camel_service_connect): Make sure that the
1484 connect_op is non-NULL before unregistering/unreffing it.
1486 2001-12-04 Jeffrey Stedfast <fejj@ximian.com>
1488 * camel-mime-utils.c (header_content_type_simple): Protect against
1489 either of the types being NULL.
1491 2001-12-05 Jeffrey Stedfast <fejj@ximian.com>
1493 * camel-mime-filter-basic.c (filter): If complete() allocates
1494 len+2 bytes for the out buffer, so should this. See bug #16371 for
1497 2001-12-05 Jeffrey Stedfast <fejj@ximian.com>
1499 * camel-sasl-digest-md5.c: iconv() returns a size_t, not an int.
1501 * camel-pgp-context.c: The return value of iconv() is a size_t,
1504 * camel-mime-part-utils.c (convert_buffer): Always use size_t args
1507 * camel-mime-filter-charset.c (complete): Always use size_t args
1511 * camel-mime-utils.c (header_address_fold): Make headerlen a
1512 size_t instead of an int.
1513 (header_fold): Same.
1514 (base64_encode_close): We should be returning a size_t and inlen
1515 should also be a size_t.
1516 (base64_encode_step): Same here.
1517 (base64_decode_step): Here too.
1518 (base64_encode_simple): And here...
1519 (base64_decode_simple): Same.
1520 (uuencode_close): We should also use size_t's here...
1521 (uuencode_step): And here too.
1522 (uudecode_step): And also here.
1523 (quoted_encode_close): Same idea here.
1524 (quoted_encode_step): Again here.
1525 (quoted_decode_step): Here too.
1526 (quoted_encode): Input length should be a size_t.
1527 (rfc2047_decode_word): Same.
1528 (g_string_append_len): Here too.
1530 (rfc2047_encode_word): "
1533 (rfc2184_decode): Use size_t's with iconv().
1534 (header_decode_param): Same.
1536 2001-12-09 Jon Trowbridge <trow@ximian.com>
1538 * camel-folder-summary.c: Add "NeedsReply" to the flag_names array
1539 for CAMEL_MESSAGE_NEEDS_REPLY.
1541 * camel-folder-summary.h: Added CAMEL_MESSAGE_NEEDS_REPLY flag.
1543 2001-12-07 Dan Winship <danw@ximian.com>
1545 * camel-mime-message.c (camel_mime_message_set_date): Fix the
1546 tm_gmtoff case (its sign is the opposite of "timezone"). Fixes
1549 2001-11-29 Jeffrey Stedfast <fejj@ximian.com>
1551 * camel-folder-search.c (search_body_contains): Don't use regex
1552 matching. Fixes bug #16227.
1554 * camel-mime-message.c (best_encoding): Check the content-object's
1555 mime type, not the mime part types. Should fix bug #15843.
1557 2001-11-27 Jeffrey Stedfast <fejj@ximian.com>
1559 * providers/imap/camel-imap-folder.c (get_content): Return NULL if
1560 construct_from_stream fails.
1561 (get_message): Same.
1562 (get_message_simple): Here too.
1563 (add_message_from_data): And here.
1565 2001-11-14 <NotZed@Ximian.com>
1567 * camel-vee-folder.c (folder_changed_remove_uid): Use the uid
1568 rather than vuid for unmatched. Also add the uid to unmatched if
1569 it wasn't in the unmatched_uids table at all.
1570 (folder_changed_change): If checking for added, if the new ones
1571 dont match, then try to add them to unmatched. Fixes #6893.
1573 * camel-folder-summary.c (camel_folder_summary_index): Change lock
1574 order, always summary_lock before ref_lock.
1575 (camel_folder_summary_array): "
1576 (camel_folder_summary_uid): "
1577 (camel_folder_summary_remove_uid): " Fixes a deadlock.
1579 2001-11-30 Not Zed <NotZed@Ximian.com>
1581 * providers/nntp/camel-nntp-*.c: Completely new implementation of
1584 Doesn't support subscriptions yet (lists all folders), but should
1585 be more reliable (faster?), and has an integrated cache.
1587 * camel-exception.c (camel_exception_new): Use e_memchunks for
1589 (camel_exception_free): Same.
1591 * camel-data-cache.[ch]: New object for managing on-disk caches of
1592 anything that can be stored in a camel-stream.
1594 * camel-file-utils.c (camel_file_util_mkdir): New function, just a
1595 nicer place to put this (than camel-store), should be removed from
1597 (camel_file_util_safe_filename): New function to url-encode a
1600 * camel-mime-parser.c (drop_states): New func to drop the parser
1601 state to initial state.
1602 (folder_scan_init_with_fd):
1603 (folder_scan_init_with_stream): Call above func to reset state if
1604 the stream is changed on us so we can change streams to reuse a
1607 2001-11-25 Not Zed <NotZed@Ximian.com>
1609 * providers/nntp/camel-nntp-folder.c (nntp_folder_get_message): If
1610 the uid doesn't have a ',' in it, fail to crash.
1612 * providers/nntp/camel-nntp-newsrc.c
1613 (camel_nntp_newsrc_article_is_read): check group != NULL before
1615 (camel_nntp_newsrc_get_highest_article_read): "
1616 (camel_nntp_newsrc_get_num_articles_read): "
1617 (camel_nntp_newsrc_mark_range_read): "
1619 * providers/nntp/camel-nntp-store.c
1620 (camel_nntp_store_get_overview_fmt): IF we dont have
1621 nntp_list_follows, dont try and get a list response.
1622 (nntp_store_get_folder_info): Set path part of folderinfo.
1624 2001-11-20 Jeffrey Stedfast <fejj@ximian.com>
1626 * providers/smtp/camel-smtp-transport.c (get_smtp_error_string):
1627 Check to see that errno is non-zero before returning
1628 g_strerror. If it's 0, then we have an unknown error.
1630 2001-11-26 Jeffrey Stedfast <fejj@ximian.com>
1632 * camel-mime-filter-basic.c: For the uudecoding mode, garble up
1633 the "begin <mode> <filename>" line before decoding.
1635 * camel-mime-part-utils.c
1636 (simple_data_wrapper_construct_from_parser): Add a uudecoder if
1637 the transfer encoding is x-uuencode.
1639 * camel-mime-part.c (write_to_stream): Handle x-uuencoded content
1642 2001-11-19 Jeffrey Stedfast <fejj@ximian.com>
1644 * camel-tcp-stream-ssl.c (stream_read): Added a check to see if
1645 the operation has been cancelled.
1646 (stream_write): Same.
1648 2001-11-19 Jeffrey Stedfast <fejj@ximian.com>
1650 Updates for compliance with rfc2231
1652 * camel-mime-utils.c (header_encode_param):
1653 camel_mime_special_table[c] & IS_ESAFE should have been
1654 !(camel_mime_special_table[c] & IS_ESAFE). Also added a few
1655 comments for how to improve the code at some future date.
1656 (header_decode_param): Now takes an argument rfc2184_part so our
1657 caller can get this information as well.
1658 (header_decode_param_list): Pass an rfc2184_part argument to
1659 header_decode_param and also added a few comments on where to
1660 improve on rfc2184/rfc2231 compliance.
1661 (rfc2047_decode_word): Updated to respect the updated ABNF syntax
1662 of rfc2047 encoded words, yay.
1664 2001-11-16 Jeffrey Stedfast <fejj@ximian.com>
1666 * providers/imap/camel-imap-utils.c (imap_parse_body): Abort if
1669 * camel-mime-filter-tohtml.c (camel_mime_filter_tohtml_new): New
1670 mime filter to convert plain text to html.
1672 2001-11-16 Jeffrey Stedfast <fejj@ximian.com>
1674 Since some mail clients like Outlook are broken, we need to set a
1675 name parameter on pgp signed and encrypted parts.
1677 * camel-pgp-mime.c (camel_pgp_mime_part_encrypt): Set a name
1679 (camel_pgp_mime_part_sign): Same.
1681 2001-11-14 Jeffrey Stedfast <fejj@ximian.com>
1683 * providers/imap/camel-imap-command.c
1684 (camel_imap_command_response): If we get a BYE response, call
1685 camel_service_disconnect() and set an exception. Also do the check
1686 for "* BYE" first instead of passing it off imap_read_untagged()
1687 since we'll just waste time in there mallocing left and right only
1688 to arrive at the single response line "* BYE" again :-)
1690 2001-11-13 <NotZed@Ximian.com>
1692 * camel-filter-search.c (get_source): If we have no source string,
1693 then use undefined, which should always evaluate to FALSE. Fix
1696 2001-11-12 Jeffrey Stedfast <fejj@ximian.com>
1698 * camel-store.c (camel_store_get_folder): Added a
1699 g_return_val_if_fail for folder_name != NULL.
1701 2001-11-08 Jeffrey Stedfast <fejj@ximian.com>
1703 * camel-pgp-context.c (crypto_exec_with_passwd): If any of the
1704 pipe()'s fail, clean up any pipes that may have succeeded. Also
1705 close the password fds.
1707 2001-11-09 <NotZed@Ximian.com>
1709 * providers/imap/camel-imap-store.c (imap_auth_loop): If we get a
1710 user cancel and that causes us to fail to authenticate, abort
1711 rather than loop forever. Fix for #14951.
1713 2001-11-06 Jeffrey Stedfast <fejj@ximian.com>
1715 * providers/imap/camel-imap-command.c
1716 (camel_imap_command_continuation): Now takes a command-length
1717 argument so we can 1) avoid duping the command string yet again,
1718 yay. 2) we now don't have to worry about embedded nul-chars
1719 screwing us over (we still need to avoid allowing them into the
1720 string but at least now it won't mess us up).
1722 * providers/imap/camel-imap-folder.c (do_append): Instead of
1723 appending a nul char to the end of the byte array and then passing
1724 that off as if it were a string to
1725 camel_imap_command_continuation, instead pass the byte-array
1726 length since that function now takes a length argument. Yay. Also
1727 encode any 8bit parts to avoid the possibility of sending embedded
1728 nul chars to the imap server.
1730 * providers/imap/camel-imap-store.c (try_auth): Updated to pass a
1731 command-length argument to camel_imap_command_continuation().
1733 2001-11-07 Jeffrey Stedfast <fejj@ximian.com>
1735 * camel-tcp-stream-ssl.c (save_ssl_cert): Oops, pass a mode
1736 argument to the open() call.
1738 * camel-tcp-stream-openssl.c (save_ssl_cert): Oops, pass a mode
1739 argument to the open() call.
1741 2001-11-07 Jeffrey Stedfast <fejj@ximian.com>
1743 * camel-pgp-mime.c (camel_pgp_mime_part_decrypt): Add code to
1744 kludge around any x-inline-pgp-hacks by prepending some content
1745 headers to the decrypted data.
1747 2001-11-02 Jeffrey Stedfast <fejj@ximian.com>
1749 * camel-data-wrapper.c (camel_data_wrapper_init): Initialize our
1751 (camel_data_wrapper_finalize): Destroy our private mutex.
1752 (write_to_stream): Lock around camel_stream_write_to_stream() so
1753 that we don't get 2 threads trying to read from our stream at the
1756 2001-11-01 <NotZed@Ximian.com>
1758 * camel-vee-folder.c (folder_changed_change): Move all searching
1759 operations outside of any locks except subfolder lock, same as
1760 build_folder. Fix for #14294.
1762 2001-10-31 <NotZed@Ximian.com>
1764 * providers/local/camel-spool-folder.c (spool_get_message): Same
1767 * providers/local/camel-maildir-folder.c (maildir_get_message):
1770 * providers/local/camel-mbox-folder.c (mbox_get_message): Set
1771 USER_CANCEL if failed due to EINTR.
1773 * camel-filter-driver.c (camel_filter_driver_filter_mbox): If
1774 construct from parser fails due to user cancel, set USER_CANCEL on
1777 * camel-mime-part.c (construct_from_parser): Return error if the
1778 parser had an io error.
1780 * camel-mime-message.c (construct_from_parser): Check error on
1781 parser/return error.
1783 * camel-mime-parser.c (folder_scan_init): Init error number.
1784 (camel_mime_parser_errno): New function, return errno of any io
1786 (folder_read): Set errno if a failure occured.
1787 (folder_seek): Same.
1788 (folder_scan_init_with_fd): Setup errno depeding on ok/failure.
1789 (folder_scan_init_with_stream): Same.
1791 2001-10-30 <NotZed@Ximian.com>
1793 * camel-operation.c (camel_operation_new): Dont setup cancel_fd.
1794 (camel_operation_cancel_fd): If cancel_fd not created, set it up.
1795 (camel_operation_cancel): Set cancel flag before sending message.
1796 (cancel_thread): Same.
1798 * camel-filter-driver.c (camel_filter_driver_filter_mbox): Make
1799 sure we unref the mimeparse when we're done (successfully). This
1800 was leaking an fd every get-mail! :(
1802 * camel-lock-client.c (camel_lock_helper_init): Close all fd's
1805 * providers/local/camel-mbox-folder.c (mbox_get_message): Remove
1806 the X-Evolution header before anyone else gets to see this private
1807 thing. Shoudl fix 11676 since we were inheriting flags from
1808 X-Evolution headers we didn't want to.
1810 * camel-folder-search.c (match_message): If we can't retrieve the
1811 message, ignore it, it can't match.
1813 * providers/imap/camel-imap-search.c
1814 (camel_imap_search_class_init): Setup parent class pointer.
1815 (imap_body_contains): If offline, just use the parent
1816 body_contains method which will get the messages and search them
1819 * providers/imap/camel-imap-folder.c (imap_search_by_expression,
1820 imap_search_by_uids): Remove offline check.
1822 2001-10-30 Dan Winship <danw@ximian.com>
1824 * camel-mime-part.c (free_headers): Fix this to match get_headers.
1826 2001-10-30 <NotZed@Ximian.com>
1828 * providers/local/camel-local-store.c (rename_folder): Dont try to
1829 move ibex if we have none.
1831 * camel-tcp-stream-openssl.c (stream_write): Fixed compilation
1834 2001-10-29 Jeffrey Stedfast <fejj@ximian.com>
1836 * camel-mime-utils.c (camel_mime_utils_init): Removed unused
1839 2001-10-30 <NotZed@Ximian.com>
1841 * camel-mime-utils.c (header_decode_mailbox): w(x) out some warnings.
1843 * providers/local/camel-local-summary.c
1844 (camel_local_summary_load): Remove the warning about not loading
1845 summary file - its a valid case for new folders.
1847 2001-10-29 Jeffrey Stedfast <fejj@ximian.com>
1849 * camel-tcp-stream-openssl.c (my_SSL_write): Removed.
1850 (stream_write): Keep looping (non-blocking case) if errno is
1851 EAGAIN, EINTR or EWOULDBLOCK. For NONBLOCKing I/O, sync up with
1852 CamelTcpStreamRaw. As with CamelTcpStreamRaw/SSL - make sure to
1853 write out everything before returning.
1854 (my_SSL_read): Removed.
1855 (stream_read): Just call ssl_error_to_errno() and check the errno
1856 values that we care about so we can keep the general look of all
1857 this stream code the same. Also when checking the return value of
1858 SSL_read, check for <0 instead of ==-1 since the man page for
1859 SSL_read doesn't say it will return -1 on fail, it just says <0.
1860 (stream_flush): Don't fsync() since syncing on a socket is a Bad
1863 * camel-tcp-stream-ssl.c (stream_write): Make sure we write out
1864 everything just like in camel-tcp-stream-raw.c.
1866 * camel-stream-buffer.c (camel_stream_buffer_gets): If
1867 camel_stream_read() returns -1, don't necessarily return -1 to our
1868 caller since it's possible that we did actually "read" some data
1869 (ie, we copied some pre-buffered data into the out buffer).
1871 * camel-stream-buffer.h: Removed CAMEL_STREAM_BUFFER_NEWLINE since
1872 it never got used anywhere and it isn't supported anyway.
1874 2001-10-30 <NotZed@Ximian.com>
1876 * providers/imap/camel-imap-store.c
1877 (parse_list_response_as_folder_info): If we get an empty name,
1878 then mark that as NoSelect. Workaround fix for #13239.
1880 2001-10-29 Dan Winship <danw@ximian.com>
1882 * providers/imap/camel-imap-folder.c (get_message_simple,
1883 imap_get_message): Set an X-Evolution-Source header on the
1884 returned message so replies come from the right identity.
1886 2001-10-29 <NotZed@Ximian.com>
1888 * camel-vee-folder.c (folder_changed_change): If we're not going
1889 to search on a changed uid, make sure we change out copy still.
1892 2001-10-29 Jeffrey Stedfast <fejj@ximian.com>
1894 * providers/imap/camel-imap-store.c (subscribe_folder): Don't emit
1895 a folder_subscribed signal if we are in the process of renaming
1897 (unsubscribe_folder): Same here but for the unsubscribe signal.
1898 (rename_folder): Unsubscribe from the folder being renamed and any
1899 subfolders it may have before actually renaming. Once the folder
1900 has been renamed, re-subscribe to it and it's subfolders with the
1903 * camel-store.c (camel_folder_info_build): Sort the folder info's
1904 before constructing the tree.
1906 * camel-mime-utils.c (header_decode_param): Minor fix - should
1907 have been using a strNcmp when checking if it was an rfc2047
1910 * camel-pgp-context.c (pgp_sign): Notify the user that PGP 2.6.x
1911 is no longer supported and use camel_exception_set() instead of
1912 setv() where appropriate.
1913 (pgp_clearsign): Same.
1914 (pgp_verify): And again here.
1915 (pgp_encrypt): Here too.
1916 (pgp_decrypt): And finally here.
1918 2001-10-29 Dan Winship <danw@ximian.com>
1920 * providers/imap/camel-imap-store.c (unsubscribe_folder): Don't
1921 free the hash table key if the folder wasn't found in the hash
1922 table. I'm not sure where the bug is/was that made it possible to
1923 add a folder to the tree after creating it failed, but now if that
1924 happens, it won't crash if you try to delete it again. (#11492)
1926 * camel-disco-store.c (camel_disco_store_status): if the service
1927 is being connected and thinks it's online, but the session is
1928 offline, then mark the service offline as well. Fixes 13683.
1930 2001-10-29 <NotZed@Ximian.com>
1932 * camel-mime-utils.c: Turn off w() -> warnings.
1934 * providers/imap/camel-imap-store.c (rename_folder): Also rename
1936 (rename_folder): Fix subscribed folders table with rename(s).
1938 * providers/imap/camel-imap-folder.c (imap_rename): Implement,
1939 rename the cache dir pointer.
1941 * providers/imap/camel-imap-message-cache.c
1942 (camel_imap_message_cache_set_path): New method to set the path
1943 used by a message cache.
1945 * camel-vee-store.c (build_info): Fix the 'is this a matching
1946 subfolder or subfolder' logic to match camel-store
1949 * camel-store.c (get_subfolders): Fix the 'is this a matching
1950 folder or subfolder' logic.
1952 2001-10-28 <NotZed@Ximian.com>
1954 * providers/local/camel-local-store.c (rename_folder): Changed to
1955 call ibex_move to rename it internally.
1957 * camel-store.c (camel_store_rename_folder): Use the right
1960 2001-10-28 Jeffrey Stedfast <fejj@ximian.com>
1962 * camel-stream-buffer.c (camel_stream_buffer_read_line): Make sure
1963 we've actually read data before checking if p[-] is '\r' or not.
1965 * camel-tcp-stream-raw.c (stream_write): Same.
1967 * camel-stream-fs.c (stream_write): If errno isn't EAGAIN, just
1968 exit with -1 and instead of using continue (which doesn't go to
1969 the top of the do-while thus making our logic suck), just set w to
1970 0. Still seems to be a bug in select() if it's telling us the
1971 socket is ready for data when it really isn't but oh well.
1973 2001-10-28 <NotZed@Ximian.com>
1975 * providers/local/camel-local-folder.c
1976 (camel_local_folder_construct): Use path not protocol as the path
1977 part of the uri of the folder_created event.
1979 * providers/local/camel-maildir-store.c (scan_dir): If FAST is
1980 set, dont try and scan for unread counts.
1982 * providers/local/camel-local-store.c (create_folder): Implement,
1983 just return the folderinfo of the folder matched, not all of it.
1985 * camel-store.c (camel_store_rename_folder): Rename the
1986 camelfolders before emitting the folderchanged event (otherwise
1987 vstore fails to pick up change.
1989 2001-10-27 <NotZed@Ximian.com>
1991 * camel-store.c (camel_store_init): Always use a default dir_sep
1994 * camel-store.h (struct _CamelStore): Added a dir_sep to the base
1995 store so rename and whatnot can work, temporary fix for mixed dir
1996 separator in folder name api's.
1998 * providers/imap/camel-imap-store.c (rename_folder): Finished
2000 (imap_connect_online): Also set the store's dir_sep here.
2001 (imap_connect_offline): "
2003 * providers/local/camel-local-folder.c (local_rename): Implement
2004 local rename of folder objects.
2006 2001-10-26 <NotZed@Ximian.com>
2008 * camel-vee-folder.c (camel_vee_folder_class_init): Hook into
2010 (vee_rename): Implement the veefolder rename function.
2011 (camel_vee_folder_class_init):
2012 (folder_changed_change): Kill a warning with a cast.
2014 * camel-vee-store.c (vee_rename_folder): Emit a folder_renamed
2015 event properly, also call parent to do some rename stuff.
2017 * camel-store.h: Added a CamelRenameInfo for the rename event.
2019 * camel-folder.c (camel_folder_rename): New function to rename a
2021 (camel_folder_class_init): Added a renamed event.
2022 (folder_rename): Default impl, set full_name, and set name
2023 assuming the dir separator is '/'.
2025 * camel-store.c (camel_store_class_init): Added folder_renamed
2027 (camel_store_rename_folder): Rename an active folder object if we
2028 have one, and update the folder table.
2029 (rename_folder): Make a default implementation that handles
2030 updating the folder tree.
2032 2001-10-26 Jeffrey Stedfast <fejj@ximian.com>
2034 * providers/imap/camel-imap-store.c (delete_folder): Don't bother
2035 checking ex since we can rely on the response being NULL on error.
2036 (rename_folder): Implemented.
2038 2001-10-26 Jeffrey Stedfast <fejj@ximian.com>
2040 * providers/imap/camel-imap-folder.c (imap_get_message): Check to
2041 make sure that the dataset is non-NULL before using and/or
2044 * camel-tcp-stream-raw.c (stream_write): Check for EWOULDBLOCK
2046 (stream_read): Same.
2047 (stream_flush): Return 0 always, fsync() and tcp sockets don't
2050 * providers/imap/camel-imap-message-cache.c
2051 (camel_imap_message_cache_get): Lets try putting a
2052 camel_stream_reset() here. Logic being that the stream may have
2053 been read from since it was cached and thus our caller may try
2054 reading from it and get no data from it since it is already at the
2055 EOS. This may fix bug #12943.
2057 2001-10-25 <NotZed@Ximian.com>
2059 * camel-search-private.c (utf8_get): Remove the stupid warning
2060 that should never have been there in the first place.
2062 * camel-sasl-digest-md5.c (digest_response): s/iconv/e_iconv/
2064 * camel-pgp-context.c (pgp_verify): "
2066 * camel-mime-utils.c (rfc2047_decode_word, rfc2047_decode_word,
2067 append_8bit, rfc2047_encode_word, rfc2184_decode,
2068 header_decode_param): "
2070 * camel-mime-part-utils.c (convert_buffer, convert_buffer): "
2072 * camel-mime-filter-charset.c (reset, complete, filter): "
2074 2001-10-24 <NotZed@Ximian.com>
2076 * camel-mime-filter-basic.c (complete): For qp decoding, if the
2077 data isn't really qp encoded, we could possible grow the buffer by
2078 upto 2 bytes above the input size, fix allocations/assertions
2081 * camel-vee-folder.c (folder_changed_change): If we're not
2082 autoupdate, only search for new matches against changed uid's that
2083 we dont already have.
2085 2001-10-24 Dan Winship <danw@ximian.com>
2087 * providers/imap/camel-imap-store.c (unsubscribe_folder): Don't
2088 let fi->name be NULL.
2090 2001-10-24 Jeffrey Stedfast <fejj@ximian.com>
2092 * camel-stream-fs.c (stream_read): Same as in the TcpStreamRaw code.
2093 (stream_write): And again here...
2095 * camel-tcp-stream-raw.c (stream_read): Handle the EAGAIN error
2097 (stream_write): Same here, this might fix the SMTP truncation
2100 2001-10-23 Dan Winship <danw@ximian.com>
2102 * camel-mime-utils.c (mail_list_magic): Remove an extra * in one
2103 of the regexps that glibc apparently doesn't mind but bsd does.
2105 2001-10-23 <NotZed@Ximian.com>
2107 * providers/local/camel-mbox-summary.c: made d(x) x recompile again.
2109 2001-10-22 <NotZed@Ximian.com>
2111 * providers/local/camel-spool-summary.c (summary_rebuild): No, use
2112 Storing, as the other code does :p
2113 (spool_summary_check): Check for consistency.
2115 2001-10-22 Jon Trowbridge <trow@ximian.com>
2117 * providers/local/camel-spool-summary.c (summary_rebuild):
2118 s/summarising/summarizing/.
2119 (spool_summary_check): s/summarise/summarize/.
2121 2001-10-22 Jeffrey Stedfast <fejj@ximian.com>
2123 * camel-pgp-mime.c (camel_pgp_mime_part_verify): If we are
2124 kludging around a inline-pgp signed part, do some charset
2125 conversion to protect any 8bit text.
2127 2001-10-22 <NotZed@Ximian.com>
2129 * camel-filter-search.c, camel-folder-search.c (check_header): Use
2130 search_type_mlist for mailing list searches.
2132 * camel.c (camel_init): call camel-mime-utils-init func.
2134 * camel-mime-utils.c: Changed mail mail_list_magic to include a
2135 domain part, also pre-compile all the patterns. They are all
2136 backward compatible except List-Id: which now uses the
2137 mail-address-like <list-name.host.name> part rather than the
2138 plain-text part (which might've been blank anyway).
2139 (camel_mime_utils_init): Initialisation function to setup any
2140 static data required by camel-mime-utils at run-time. We now
2141 setup the base64/charset class tables here, so it doesn't need to
2143 (camel_mime_special_table, camel_mime_base64_rank): No longer
2144 statically initialise these.
2145 (main): Removed + the tests at the end of the file.
2146 (header_raw_check_mailing_list): Dont compile regex's here,
2147 already compiled in utils_init. Use the regex patterns to remove
2148 leading <'s from addresses. Also, if there is a domain part
2149 matched, add that after a '@' is added.
2151 * camel-search-private.c (camel_search_header_match): Match check
2152 against all addresses in a multiple address match. Should fix
2154 (camel_search_header_match): Oops, missing i=0.
2155 (camel_search_header_match): Added SEARCH_TYPE_MLIST for mlist
2156 search types. It ignores the domain part if either (but not both)
2157 of the values dont have it.
2159 2001-10-22 Dan Winship <danw@ximian.com>
2161 * camel-pgp-mime.c (camel_pgp_mime_part_verify): Add a hack: if
2162 the multipart/signed part has a "x-inline-pgp-hack" parameter in
2163 its Content-Type, don't pass the MIME headers as part of the data
2166 2001-10-22 Rodrigo Moya <rodrigo@ximian.com>
2168 * Makefile.am: added $GNOME_INCLUDEDIR to INCLUDES, needed for latest
2169 libgnome, which install headers in $(prefix)/gnome-1.0
2171 2001-10-21 Jeffrey Stedfast <fejj@ximian.com>
2173 * camel-mime-part-utils.c
2174 (simple_data_wrapper_construct_from_parser): Only do the rawtext
2175 checks if the part is a text part, otherwise don't bother wasting
2178 * camel-store.c (camel_folder_info_build): Updated comments to
2179 make the code a bit more clear.
2181 2001-10-21 <NotZed@Ximian.com>
2183 * camel-store.c (CS_CLASS): Dont do the macro stuff - basically so
2184 you can actually debug calls.
2185 (camel_store_uri_cmp): New function to compare store objects.
2187 * camel-vee-folder.c (vee_folder_add_info): oops, dont free the
2188 vuid, since its alloca'd now.
2189 (folder_changed_change): Kill a compile warning.
2191 2001-10-20 <NotZed@Ximian.com>
2193 * camel-folder.c (move_messages_to): If no exception supplied, use
2195 (move_message_to): Set the seen flag also when we delete it.
2197 2001-10-19 Jeffrey Stedfast <fejj@ximian.com>
2199 * camel-vtrash-folder.c (vtrash_move_messages_to): If the
2200 destination folder is the vfolder source folder, then
2201 set_message_flags on it.
2203 2001-10-19 <NotZed@Ximian.com>
2205 * camel-session.c (register_provider): When registering provider,
2206 translate all strings.
2208 * camel-vee-folder.c (camel_vee_folder_remove_folder): Lock the
2209 right lock for unmatched subfolder list stuff. If the sub folder
2210 is deleted & part of unmatched, or the last ref to the sub folder
2211 is gone from unmatched, blow it away completely from unmatched,
2212 but only do it once.
2213 (vee_folder_remove_folder): Added arg to kill unmatched
2214 unconditionally. Also handle deleted folders, always remove
2216 (folder_changed_change): Lock subfolder lock for entirety of
2217 operation, and also check to see if the subfolder is still there
2218 before doing any fancy work (incase it got removed while we were
2219 waiting to execute).
2220 (folder_changed_change_uid): Use alloca for vuid, and not
2222 (vee_search_by_expression): Dont use sprintf for vuid.
2223 (vee_search_by_uids): "
2224 (vee_folder_add_info): "
2225 (folder_changed_remove_uid): "
2226 (folder_changed_change): "
2227 (folder_changed_change_uid): Also check folder_unmatched for
2228 changed uid's so we properly update/propagate unmatched changes.
2229 (folder_changed_change): Ok, so dont hold the subfolder lock for
2230 the whole duration of the changed event, although we probably
2231 should, requires a recursive mutex.
2232 (folder_changed_change): Change logic, we always add changed stuff
2233 if it now matches, but dont remove it unless its auto-remove, only
2234 propagate changes for it.
2235 (vee_set_message_flags): Call parent method after doing our work.
2236 (vee_set_message_user_flag): Same here.
2238 2001-10-18 Jeffrey Stedfast <fejj@ximian.com>
2240 * camel-mime-part-utils.c
2241 (simple_data_wrapper_construct_from_parser): If a charset isn't
2242 specified or claims to be utf-8, check the validity of the text
2243 and if it's invalid, set the rawtext bit to TRUE. If the charset
2244 is x-unknown or some other x- charset, always set the rawtext bit
2247 2001-10-18 <NotZed@Ximian.com>
2249 * camel-store.c (camel_store_unsubscribe_folder): If we are
2250 unsubscribing from a folder we have loaded, set the folder
2251 deleted, as with the delete_folder case.
2253 * providers/(imap|local|pop3|sendmail|smtp)/Makefile.am: Added
2254 CAMEL_CFLAGS so we get the right iconv stuff, patch from Yanko
2255 Kaneti <yaneti@declera.com>
2257 2001-10-18 Jeffrey Stedfast <fejj@ximian.com>
2259 * camel-pgp-context.c (crypto_exec_with_passwd): Make sure the
2262 2001-10-18 Jeffrey Stedfast <fejj@ximian.com>
2264 * providers/imap/camel-imap-message-cache.c (insert_finish): Flush
2265 the stream here, not sure it really matters but it might
2266 (hopefully) fix bug #12943.
2268 * camel-pgp-context.c (crypto_exec_with_passwd): Make
2271 * providers/local/camel-local-provider.c: String cleanup for bug
2274 * providers/imap/camel-imap-folder.c (imap_sync_online): Fix my
2275 Cyrus imapd workaround...instead of checking to see if info->flags
2276 == FLAGGED, just check to see if it contains any IMAP flags.
2278 2001-10-17 <NotZed@Ximian.com>
2280 * providers/local/camel-maildir-folder.c
2281 (camel_maildir_folder_new): Use '.' as the inbox name for filter
2284 * camel-store.c (camel_folder_info_clone): New function to clone a
2287 2001-10-17 Jeffrey Stedfast <fejj@ximian.com>
2289 * providers/local/camel-mh-folder.c (mh_append_message): Same as
2290 maildir and mbox append-message.
2292 * providers/local/camel-maildir-folder.c (maildir_append_message):
2293 Same as mbox append.
2295 * camel-exception.c (camel_exception_set): Make sure the new
2296 description isn't the same as the old description pointer before
2297 freeing the old one.
2298 (camel_exception_setv): Don't free the old description until we
2299 set the new one this way we can reuse the old description in the
2302 * providers/local/camel-mbox-folder.c (mbox_append_message): If
2303 errno == EINTR, then we got a user-cancel so set the exception
2304 appropriately so that we don't make the user shit his pants.
2306 * camel-filter-driver.c (do_copy): Add an optimization for when
2307 destination folder is the same as the source folder.
2309 2001-10-17 <NotZed@Ximian.com>
2311 * providers/imap/camel-imap-store.c (get_folder_info_online):
2312 (parse_list_response_as_folder_info): Patch from Danw, Use unread
2313 count of -1 to mark unflagged messages. Make sure any folder we
2314 dont lookup explicitly is marked as -1. Should fix #9947 and
2317 * providers/local/camel-mbox-summary.c (mbox_summary_sync): Only
2318 touch the summary if the timestamp or size changed.
2320 2001-10-17 Jeffrey Stedfast <fejj@ximian.com>
2322 * camel-filter-driver.c (camel_filter_driver_filter_message): Set
2323 the DELETED flag on directly on the info if the source folder
2324 doesn't have summary capability.
2326 2001-10-17 Not Zed <NotZed@Ximian.com>
2328 * camel-tcp-stream-raw.c (stream_write): As below.
2330 * camel-stream-fs.c (stream_write): If not checking cancellation,
2331 make sure we write out everything asked of us.
2333 2001-10-16 Jeffrey Stedfast <fejj@ximian.com>
2335 * camel-pgp-context.c (pgp_verify): Rearange the order of the gpg
2336 options slightly otherwise it might try to use "--no-tty" as the
2337 filename to verify :-)
2339 * camel-object.[c,h]: If CAMEL_DEBUG is defined, print some useful
2342 * providers/imap/camel-imap-store.c (delete_folder): Fixed an
2345 * camel-uid-cache.c (camel_uid_cache_new): Make sure that the
2346 parent directory exists before trying to open the filename, if it
2349 2001-10-16 <NotZed@Ximian.com>
2351 * camel-mime-utils.c (header_address_decode): If no content, dont
2352 try and decode further and spit meaningless warnings.
2354 2001-10-16 Jeffrey Stedfast <fejj@ximian.com>
2356 * camel-filter-driver.c (do_flag): Only perform the operation on
2357 the folder if the folder has summary capability, else just poke
2358 the info directly. Fixes the "Filters don't work" bug.
2360 (do_colour): And here too.
2362 2001-10-15 Jeffrey Stedfast <fejj@ximian.com>
2364 * camel-stream-fs.c (stream_read): Save the errno before calling
2365 fcntl so fcntl doesn't overwrite errno in case of a previous
2367 (stream_write): Same.
2369 2001-10-13 Jeffrey Stedfast <fejj@ximian.com>
2371 * providers/smtp/camel-smtp-transport.c (smtp_data): Replace the
2372 Bcc headers in a single location and don't flush the data unless
2373 the write was successful.
2375 2001-10-12 Jeffrey Stedfast <fejj@ximian.com>
2377 * Makefile.am: Remove the stripheader filter from the build.
2379 * camel-mime-filter-stripheader.[c,h]: Removed.
2381 * providers/smtp/camel-smtp-transport.c (smtp_data): Check the
2382 return value of camel_stream_flush to make sure it flushed the
2383 data successfully before continuing. Don't use the stripheader
2384 filter, it was completely broken - instead remove the header and
2385 set it again after we send.
2387 2001-10-12 <NotZed@Ximian.com>
2389 * camel-vee-folder.c (camel_vee_folder_remove_folder): Unhook from
2390 all events before removing folder.
2391 (camel_vee_folder_add_folder): Hook onto delete event.
2392 (camel_vee_folder_finalise): Unhook from deleted event for suibfolder.
2393 (subfolder_deleted): When the folder is deleted, remove it from
2394 the vfolder automagically.
2396 2001-10-11 <NotZed@Ximian.com>
2398 * camel-vee-folder.c (vee_search_by_uids): convert the uids list
2399 to a subset appropriate for each subfolder before trying to search
2402 * camel-charset-map.[ch]: Removed charset/locale charset lookup
2403 and iconv_open/close functions, moved to gal. Fixed all callers.
2405 2001-10-11 Jeffrey Stedfast <fejj@ximian.com>
2407 * camel-tcp-stream-ssl.c (ssl_cert_is_saved): Same.
2409 * camel-tcp-stream-openssl.c (ssl_cert_is_saved): Instead of
2410 opening the file, stat it and make sure that it belongs to us.
2412 2001-10-10 Jeffrey Stedfast <fejj@ximian.com>
2414 * camel-tcp-stream-openssl.c (ssl_verify): Same hack as below.
2416 * camel-tcp-stream-ssl.c (ssl_bad_cert): Hack around the fact that
2417 adding a cert to nss's certdb seems to not work.
2419 2001-10-10 <NotZed@Ximian.com>
2421 * camel-vee-folder.c (vee_sync): Only re-build the folder if we're
2422 expunging. Also only clear out the changed folders list if we're
2423 expungung and everything worked.
2425 2001-10-10 Jeffrey Stedfast <fejj@ximian.com>
2427 * camel-charset-map.c (camel_charset_map_init): Added a hack for
2430 2001-10-10 <NotZed@Ximian.com>
2432 * providers/local/camel-maildir-store.c (scan_dir): oops, we want
2433 get_unread_message_count, not get_message_count!
2435 2001-10-09 <NotZed@Ximian.com>
2437 * camel-service.c (camel_service_disconnect): Duplicate connect
2438 code that unregisters a cancel op if we created one.
2440 * camel-operation.c (camel_operation_progress): Another go at
2441 getting the logic right again. Make transients only update after
2442 5 seconds (CAMEL_OPERATION_TRANSIENT_DELAY)
2443 (camel_operation_end): Likewise.
2445 * providers/local/camel-spool-folder.c (spool_search_by_uids):
2448 * providers/imap/camel-imap-search.c (imap_body_contains): If
2449 searching a sub-set of the total message count, then use a UID
2450 range to search only specific messages.
2452 * camel-vee-folder.c (vee_folder_change_match): Removed.
2453 (folder_changed_add_uid): Helper func for changed code.
2454 (folder_changed_remove_uid): "
2455 (folder_changed_change_uid): "
2456 (folder_changed): Rewritten. Supports proper auto-updating of
2457 changes, but not removals till a sync occurs.
2458 (vee_search_by_uids): Implement.
2459 (folder_changed): Changed to call an async threaded function to do
2460 the actual folder updating.
2462 * camel-folder-summary.c (camel_flag_list_copy): New func to copy
2463 a whole list of flags.
2464 (camel_tag_list_copy): New func to copy a whole list of flags.
2466 * providers/imap/camel-imap-folder.c (imap_search_by_uids):
2469 * providers/local/camel-local-folder.c (local_search_by_uids):
2472 * camel-folder.c (camel_folder_search_by_uids): New function,
2473 search a subset of uid's.
2474 (search_by_uids): Default impl, return error.
2476 2001-10-08 Dan Winship <danw@ximian.com>
2478 * camel-folder.h (struct _CamelFolder): replace the ever-growing
2479 list of gbooleans with a single guint32 for flags.
2481 * camel-folder.c: Update folder flag setting/checking.
2483 * providers/pop3/camel-pop3-folder.c (camel_pop3_folder_init):
2484 * providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new):
2485 * providers/local/camel-spool-folder.c (spool_init,
2486 camel_spool_folder_new):
2487 * providers/local/camel-maildir-folder.c (camel_maildir_folder_new):
2488 * providers/local/camel-local-folder.c (local_init):
2489 * providers/imap/camel-imap-folder.c (camel_imap_folder_init,
2490 camel_imap_folder_new):
2491 * camel-vtrash-folder.c (camel_vtrash_folder_init):
2492 * camel-vee-folder.c (camel_vee_folder_init):
2493 * camel-digest-folder.c (camel_digest_folder_init): update folder
2496 2001-10-07 Dan Winship <danw@ximian.com>
2498 * providers/imap/camel-imap-store.c (get_folder_online): Unlock
2499 the store before returning error. (noted by NotZed)
2501 2001-10-06 Jeffrey Stedfast <fejj@ximian.com>
2503 * camel-mime-utils.c (header_decode_text): Fix a slight error in
2504 logic. Just because the last word was an encoded word doesn't mean
2505 we ignore the lwsp padding, we only ignore it if the last word and
2506 *this* word are encoded.
2508 2001-10-06 Jeffrey Stedfast <fejj@ximian.com>
2510 * camel-mime-filter-basic.c (filter): Implemented uuencoding and
2512 (complete): Implemented uuencoding and decoding.
2514 * camel-mime-utils.c (uuencode_close): New function to flush the
2516 (uuencode_step): New function to uuencode a block of data.
2518 2001-10-05 <NotZed@Ximian.com>
2520 * providers/imap/camel-imap-store.c (subscribe_folder): Use a
2521 folder_subscribed event rather than a folder_created one.
2522 (unsubscribe_folder): Similarly for unsubscribed/deleted.
2523 (create_folder): Emit a folder_created event on the folders we
2524 added. Not sure hsould probably check which ones are new and
2525 which ones are just existing ones?
2526 (delete_folder): Emit a folder_deletd event when we've deleted the
2527 folder. Part of fix for #11831.
2529 * camel-store.c (camel_store_class_init): Added
2530 folder_subscribed/unsubscribed events.
2532 2001-10-05 Jeffrey Stedfast <fejj@ximian.com>
2534 * camel-service.c (camel_service_finalize): Turn off warnings.
2537 * camel-sasl.c (sasl_challenge): Turn off warnings.
2539 * camel-tcp-stream.c (tcp_connect): Turn off warnings.
2540 (tcp_getsockopt): Same.
2541 (tcp_setsockopt): Here too.
2542 (tcp_get_socket): And here.
2544 * camel-folder.c (folder_sync): Turn off warnings.
2546 (append_message): Here too.
2547 (get_message): And here.
2548 (search_by_expression): And again here.
2549 (folder_changed): Here too.
2551 * camel-store.c (get_folder): Set an exception and turn off
2552 debugging g_warnings.
2553 (create_folder): Same.
2554 (delete_folder): Here too.
2555 (rename_folder): And here.
2556 (get_trash): And here.
2557 (get_folder_info): Same.
2558 (free_folder_info): And again here.
2559 (camel_folder_info_build): Here too.
2560 (folder_subscribed): Same.
2561 (subscribe_folder): Here too.
2562 (unsubscribe_folder): And here.
2564 2001-10-05 <NotZed@Ximian.com>
2566 * camel-mime-utils.c (header_decode_mailbox): Try harder to get
2567 broken names out of addresses. Unencoded ,'s in names will still
2568 break it, but well what can you do eh?
2569 (header_decode_mailbox): Always add .'s into address we've scanned
2570 past a '.', even if we can't decode the next part. Fix for some
2573 2001-10-04 <NotZed@Ximian.com>
2575 * camel-store.c (camel_store_delete_folder): Change the order of
2576 execution slightly. We delete the folder first, then call the
2577 classes delete folder, then cleanup the hashtable afterwards.
2578 This is so deletes of vfolders work, since vee-store uses the
2579 folder hashtable to store all of is vfolders :-/
2581 2001-10-04 Jeffrey Stedfast <fejj@ximian.com>
2583 * camel-service.c (camel_service_connect): Unregister the
2584 operation before unreffing it.
2586 2001-10-03 <NotZed@Ximian.com>
2588 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
2589 Remove now unused 'recents' array/freeing func.
2591 * camel-object.c (camel_object_trigger_event): Oops, always run
2592 the prep function, even if we have no hooks listening. Causes
2593 incoming imap recents to get ignored bythe camel-folder filter
2596 * providers/local/camel-local-folder.c (local_sync): Dont
2597 explicitly save metadata, its saved in summary_sync.
2599 * providers/local/camel-mh-summary.c: Call superclass.
2600 (mh_summary_check): Dont save ibex.
2602 * providers/local/camel-maildir-summary.c: Call superclass method.
2603 (maildir_summary_check): Dont save ibex explictly.
2605 * providers/local/camel-mbox-summary.c: Call super-class sync when
2606 done, saves summary/ibex, etc.
2607 (mbox_summary_check): Dont save ibex.
2608 (mbox_summary_sync): Call summary_check rather than trying to
2609 update from our known position.
2611 * providers/local/camel-local-summary.c
2612 (camel_local_summary_check): Dont save the summary or index here.
2613 (local_summary_sync): Save the summary/index here.
2615 * camel-search-private.c (camel_search_build_match_regex): Added
2616 MATCH_NEWLINE flag, -> REG_NEWLINE.
2618 * camel-lock-helper.c: Include <string.h> to kill some warnings.
2620 * camel-filter-search.c (get_full_header): Put \n's between each
2622 (header_full_regex): Dont drop the first argument to the command
2624 (header_full_regex): Set match_newline for building regex.
2625 (body_regex): And here too. These all fix #9877.
2627 2001-10-03 Jeffrey Stedfast <fejj@ximian.com>
2629 * camel-store.c (camel_store_delete_folder): Call
2630 camel_folder_delete() on the folder if it's "alive".
2632 * camel-folder.c (camel_folder_delete): Mark the folder as
2633 deleted, perform any folder specific cleanup and emit the deleted
2635 (camel_folder_sync): Only sync the folder if it hasn't been
2637 (camel_folder_expunge): Same.
2639 2001-10-03 Dan Winship <danw@ximian.com>
2641 * providers/local/camel-local-provider.c (local_url_equal):
2642 Strange are the ways of alloca. Fixes 11543.
2644 2001-10-02 Jeffrey Stedfast <fejj@ximian.com>
2646 * camel-tcp-stream-ssl.c (ssl_bad_cert): Import the certificate if
2647 the user accepts it.
2649 2001-10-02 <NotZed@Ximian.com>
2651 * providers/local/camel-local-provider.c (local_url_hash,
2652 local_url_equal): for hashing/comparing local url's, we ignore
2653 trailing /'s in paths (maybe shuld handle multiple /'s too).
2654 (camel_provider_module_init): Use local_url_hash/equal for all
2657 * camel-sasl-digest-md5.c (digest_response): Change to
2658 camel_charset_iconv_open/close.
2660 * camel-pgp-context.c (pgp_verify): Change to
2661 camel_charset_iconv_open/close.
2663 * camel-mime-part-utils.c (convert_buffer): Change to
2664 camel_charset_iconv_open().
2666 * camel-mime-filter-charset.c
2667 (camel_mime_filter_charset_new_convert, finalise): Change to
2668 camel_charset_iconv_open, etc.
2670 * camel-mime-utils.c: Use the camel_charset_iconv_open/close()
2671 functions to open/close it.
2673 * camel-charset-map.c (camel_charset_iconv_open): New function,
2674 wrap iconv_open, so we can cache ic's.
2675 (camel_charset_iconv_close): Likewise for close.
2676 (camel_charset_map_init,shutdown): Init/free iconv cache.
2678 2001-10-02 Jeffrey Stedfast <fejj@ximian.com>
2680 * camel-charset-map.c (camel_charset_to_iconv): Revert my
2681 x-unknown special-case hack - this may mask other problems.
2683 * camel-mime-utils.c (rfc2047_decode_word): If the iconv
2684 conversion fails, for whatever reason, retry using the user's
2687 2001-10-02 <NotZed@Ximian.com>
2689 * providers/local/camel-maildir-store.c (get_folder_info): Go back
2690 to using the store url's path, not the toplevel_dir thing.
2692 * camel-operation.c (camel_operation_progress): Fix the progress
2693 logic, so we dont update too often.
2695 * camel-object.c (camel_object_get_hooks): Change the lock to a
2697 (camel_object_hook_event): Maintain list length of hook list.
2698 (camel_object_unhook_event): "
2699 (camel_object_unhook_event): If we are in an event, just mark the
2700 pair as removed, without removing it.
2701 (camel_object_trigger_event): Before running events, copy the
2702 list, and also ignore 'removed' events. After running events, if
2703 we're all out of events, then free up any pending-removed events.
2704 (camel_object_free_hooks): Add some new assertions on the state of
2706 Removed the #error if threads not defined. It _should_ actually
2707 work without threads.
2708 (camel_object_free_hooks): Free mutex when done.
2710 2001-10-01 Jeffrey Stedfast <fejj@ximian.com>
2712 * providers/imap/camel-imap-store.c (delete_folder): Remove any
2713 cached messages that belonged to the deleted folder.
2714 (subscribe_folder): Don't ever let the info->name be NULL and
2715 don't use the stupid concat kludge to generate the URL, just use a
2716 CamelURL to do it. This way we don't risk breaking stuff by having
2717 a url like imap://fejj@imap//folder
2719 * camel-charset-map.c (camel_charset_to_iconv): If the charset is
2720 x-unknown, return the locale_charset.
2722 2001-10-01 Dan Winship <danw@ximian.com>
2724 * camel-provider.h: Fix up the provider flags to specify things
2725 more completely so we don't have to hardcode provider names in the
2728 * providers/local/camel-local-provider.c: MH, mbox, and Maildir
2729 are LOCAL. MH and mbox are no longer STORAGE by the new
2732 * camel-session.c (vee_provider): The vfolder store is a STORAGE.
2734 2001-10-01 Dan Winship <danw@ximian.com>
2736 * providers/local/camel-local-store.c (construct): Don't munge the
2737 URL; CamelSession's caching relies on it not changing. Instead,
2738 add a toplevel_dir field to CamelLocalStore, and set that to the
2739 path, but always ending with /.
2740 (camel_local_store_finalize): Free toplevel_dir
2741 (camel_local_store_get_toplevel_dir): Return toplevel_dir rather
2744 * providers/local/*: Lots of s/url->path/toplevel_dir/
2746 * providers/local/camel-spool-store.c (construct): Likewise, don't
2747 try to strip a trailing / from url->path here, but I didn't make
2748 the corresponding toplevel_dir change, because there's no good
2749 reason someone should expect "/var/spool/mail/danw/" to work since
2750 that's not a directory.
2752 * providers/pop3/camel-pop3-folder.c (pop3_refresh_info): if STAT
2753 returns 0, don't bother sending UIDL. Speeds things up slightly
2754 and also works around a bug in a particular random POP server.
2757 2001-09-29 Jeffrey Stedfast <fejj@ximian.com>
2759 * camel-pgp-context.c (pgp_sign): Add --no-secmem-warning and
2760 --no-greeting to the gpg command-line options.
2761 (pgp_clearsign): Same.
2762 (pgp_verify): Here too.
2763 (pgp_encrypt): And here.
2764 (pgp_decrypt): And finally here.
2766 2001-09-28 Jeffrey Stedfast <fejj@ximian.com>
2768 * camel-filter-search.c (get_source): Same here.
2770 * camel-mime-message.c (camel_mime_message_set_source): Don't use
2771 the e_url_shroud hack, use CamelURL functions instead.
2773 2001-09-28 Jeffrey Stedfast <fejj@ximian.com>
2775 * providers/nntp/camel-nntp-provider.c
2776 (camel_provider_module_init): Init the nntp url hash and url_equal
2779 * providers/sendmail/camel-sendmail-provider.c
2780 (camel_provider_module_init): Init the sendmail url hash and
2781 url_equal functions.
2783 * providers/smtp/camel-smtp-provider.c
2784 (camel_provider_module_init): Init the smtp url hash and url_equal
2787 * providers/pop3/camel-pop3-provider.c
2788 (camel_provider_module_init): Init the pop3 url hash and url_equal
2791 * providers/imap/camel-imap-provider.c
2792 (camel_provider_module_init): Init the imap url hash and url_equal
2795 * providers/local/camel-local-provider.c
2796 (camel_provider_module_init): Init the local url hash and
2797 url_equal functions.
2799 * camel-session.c (camel_session_class_init): Init the vfolder url
2800 hash and url_equal functions.
2802 * camel-provider.h: Added url_hash and url_equal function pointers
2805 * camel-vtrash-folder.c (vtrash_move_messages_to): Oops, a
2806 CamelFolder is not a CamelFolderClass.
2808 2001-09-28 Dan Winship <danw@ximian.com>
2810 * camel-tcp-stream-openssl.c (ssl_error_to_errno): Make this take
2811 an SSL * instead of a CamelTcpStreamSSL *, since it can get called
2812 from open_ssl_connection, when the CamelTcpStreamSSL isn't set up
2813 right yet. Fixes a crash on connection failure.
2815 2001-09-27 Dan Winship <danw@ximian.com>
2817 * providers/imap/camel-imap-folder.c
2818 (camel_imap_folder_fetch_data): Grab the store's command_lock
2819 before grabbing the folder's cache_lock to prevent deadlock if
2820 another thread is processing an EXPUNGE response.
2822 * providers/imap/camel-imap-folder.c
2823 (imap_expunge_uids_resyncing): Fix a compiler warning that might
2824 point out a real bug...
2826 * providers/imap/camel-imap-folder.c (get_content): and one that
2829 2001-09-27 <NotZed@Ximian.com>
2831 * camel-service.c (camel_service_connect): Dont re-register the
2832 connect_op if we got it by calling 'operation_registered', which
2833 returns an already-registered one.
2834 (camel_service_disconnect): Likewise here. This removes all the
2835 re-registered warnings.
2837 * camel-object.c (camel_object_unref): Fill the finalised data
2838 with nonsense, rather than 0's - more easily detect bad data.
2839 (camel_object_new): Clear instance data when we retrieve it off
2842 * camel-object.h (_CamelObject): Added an event lock pointer for
2843 uh, locking event stuff. Also change the hooklist hashtable into
2844 a list. Changed all the code to handle it. Result: thread-safe
2845 events, event-hooks, and save memory too, and SHOULD FINALLY FIX
2846 THAT UNREAD COUNT PROBLEM.
2848 2001-09-27 Jeffrey Stedfast <fejj@ximian.com>
2850 * camel-pgp-mime.c (camel_pgp_mime_part_decrypt): CRLF decode the
2851 stream before parsing it into a MIME part. This fixes bug #10521.
2853 * camel-store.c: Remove the old folder from the vTrash folder.
2855 2001-09-27 Dan Winship <danw@ximian.com>
2857 * camel-service.c: Change "gboolean connected" to
2858 "CamelServiceConnectionStatus status", which can be disconnected,
2859 connecting, connected, or disconnecting.
2860 (camel_service_init, camel_service_finalize): create/destroy the
2861 connect_op_lock. Refer to service->status rather than
2863 (camel_service_connect): When connecting, note the current
2864 operation (and create a new one if there's none registered) and
2865 mark the connection "connecting" until we succeed or fail.
2866 (camel_service_disconnect): Likewise in reverse.
2867 (camel_service_cancel_connect): New function to cancel a
2869 (cancel_connect): Default implementation: Call
2870 camel_operation_cancel on the connect_op.
2872 * camel-disco-store.c (disco_connect): Only call
2873 CamelRemoteStore's connect func if we're online.
2874 (disco_cancel_connect): Fall back to offline if a connection gets
2876 (disco_get_folder_info): Kludge: call connect explicitly before
2877 deciding whether to do the online or offline version, so if the
2878 connect fails, we fall back correctly.
2880 * camel-session.c (camel_session_get_service_connected):
2881 s/svc->connected/svc->status/
2883 * camel-remote-store.c (camel_remote_store_finalise):
2884 Change service->connected check to service->status check.
2885 (remote_connect): Don't set service->connected here:
2886 camel_service_connect() itself does that.
2888 * camel-operation.c (camel_operation_registered): Deal with the
2889 possibility that there's no registered op.
2891 2001-09-26 <NotZed@Ximian.com>
2893 * camel-filter-driver.c (camel_filter_driver_filter_message): If
2894 we get a search error, just abort, dont try and fall back and copy
2896 (camel_filter_driver_filter_message): Make sure we ALWAYS use
2897 exceptions for important things - like moving messages to inbox!
2898 (camel_filter_driver_filter_message): If we have the source
2899 folder, use camel_folder_set_message_flags rather then poking the
2900 info directly, which skips changed events. This means filtering
2901 immediate doesn't lose changed events.
2902 (do_flag): Same here.
2903 (do_colour): Same thing but using set_tag.
2904 (do_score): Same again.
2905 (camel_filter_driver_filter_folder): Use ~0 as the 'set' arg to
2906 set_flags, just saves typing.
2907 (open_folder): We cache folders that we couldn't open as well as
2908 those ones we could. Use magic token FOLDER_INVALID =
2909 (void *)~0 as the marker.
2910 (close_folder): Handle FOLDER_INVALID case properly.
2912 2001-09-26 Jeffrey Stedfast <fejj@ximian.com>
2914 * camel-mime-message.c
2915 (camel_mime_message_get_part_by_content_id): New function to
2916 convenience Larry ;-)
2917 (check_content_id): Oops, return !found instead of found. This
2918 callback has to return whether or not to keep searching, not
2919 whether or not it found what it's looking for. Do'h!
2921 * camel-pgp-mime.c (camel_pgp_mime_is_rfc2015_signed): block out
2922 some code if ENABLE_PEDANTIC_PGPMIME is not defined.
2924 2001-09-26 <NotZed@Ximian.com>
2926 * camel-vee-store.c: Emptied VeeStorePrivate, member wasn't used.
2928 * camel-vee-folder.c (camel_vee_folder_set_expression): Lock
2929 changed list separately.
2930 (camel_vee_folder_remove_folder): "
2931 (camel_vee_folder_set_folders): Use changed_lock for changed list.
2932 (vee_refresh_info): Use changed_lock, also just grab the list,
2933 reset it in the lock, and do the work unlocked.
2934 (vee_sync): Use changed lock for changed list.
2935 (folder_changed): ". All this kills a deadlock with sync/expunge.
2937 * camel-private.h (CamelVeeFolderPrivate): Added a new lock for
2938 the folders-changed list.
2939 (CamelVeeStorePrivate): Removed, defined in camel-vee-store.c,
2940 thanks to a pedantic.
2942 2001-09-26 Jeffrey Stedfast <fejj@ximian.com>
2944 * Makefile.am: Fix Ettore's fix.
2946 2001-09-25 Jeffrey Stedfast <fejj@ximian.com>
2948 * camel-pgp-context.c (camel_pgp_context_new): No longer takes a
2950 (pgp_sign): Only uncache the passphrase on failure.
2951 (pgp_clearsign): Same.
2952 (pgp_encrypt): Here too.
2953 (pgp_decrypt): And here.
2954 (pass_free): New function to zero the passphrase before freeing
2957 2001-09-25 Ettore Perazzoli <ettore@ximian.com>
2959 [Patch for Automake 1.5 compatibility pointed out by Richard
2960 Boulton <richard@tartarus.org>, as per #9258.]
2962 * providers/nntp/Makefile.am: Remove some commented parts that
2963 make Automake 1.5 choke.
2965 * Makefile.am (camel-lock-helper): Add $(EXEEXT) for Automake 1.5
2968 2001-09-25 <NotZed@Ximian.com>
2970 * camel-folder.c (get_unread_message_count): Only unref info if we
2973 * camel-operation.c (camel_operation_unref): Fix for !threads
2974 enabled not ccompiling.
2975 (camel_operation_ref): Assert refcount > 0.
2976 (struct _CamelOperation): Removed the lock. On further
2977 investigation, I dont think this will always work, the
2978 registration operations assume that a lookup in the
2979 operation_active table will return a ref, that will remain valid
2980 until we ref it, which needn't be the case. So now i'm using a
2981 single global lock, since we'd need to do that for unref anyway,
2982 and every operation is fast & memory-bound. Changed all the code
2984 (camel_operation_progress_count): Since the code is identical,
2985 just call progress() for now.
2986 (camel_operation_register): No longer refcount, use unref to
2987 check/clear the active table.
2988 (camel_operation_unregister): Same here.
2989 (camel_operation_unref): Check if operation is in active table, if
2992 2001-09-25 Dan Winship <danw@ximian.com>
2994 * camel-tcp-stream-openssl.c (my_SSL_read, my_SSL_write): call
2995 SSL_read/write, looping on SSL_ERROR_WANT_READ/WRITE. I'm sure
2996 there's a perfectly good reason that the API works this way. No,
2998 (stream_read, stream_write): use my_SSL_read and my_SSL_write.
2999 Fixes at least ximian 8593, and probably 6024 and maybe 10366,
3000 at least for OpenSSL. There may be a parallel NSS bug?
3002 2001-09-25 <NotZed@Ximian.com>
3004 * camel-stream-buffer.c (stream_write_all): A "safe write"
3005 function that always writes out all data asked of it, till
3007 (stream_write): Rewritten. What was i on when i wrote that
3008 originally, how did it ever work with tcp streams ...
3010 2001-09-24 <NotZed@Ximian.com>
3012 * camel-folder.c (append_message): Set the exception to
3013 FOLDER_INVALID rather than making out it worked. A fix for #7025.
3014 (search_by_expression): Here too.
3016 * providers/imap/camel-imap-folder.c (imap_update_summary): In the
3017 'lose' case, free messages, not fetch_data twice!
3019 * camel-filter-search.c (check_header): If the type is encoded,
3020 get the fallback charset from the message content-type.
3022 * camel-mime-part-utils.c (check_html_charset): Dont check for
3023 charset==null before calling charset_to_iconv.
3024 (simple_data_wrapper_construct_from_parser): "
3026 * camel-mime-message.c (process_header): Try use content-type
3027 charset param as the fallback charset.
3029 * camel-charset-map.c (camel_charset_to_iconv): Handle name ==
3032 * camel-folder-summary.c (camel_folder_summary_format_address):
3033 (camel_folder_summary_format_string): Made private again, removed
3034 #warning about it. Renamed to s/camel_folder//.
3035 (summary_format_string): Take default charset param.
3036 (camel_message_info_new_from_header, message_info_new): Decode
3037 content-type field to get the charset parameter to use as the
3038 default charset for decoding strings.
3040 * camel-search-private.c (camel_search_header_match): Pass NULL as
3041 the charset, the locale charset is always tried.
3042 (camel_search_header_match): Supply a default_charset parameter to
3043 be used with TYPE_ENCODED params.
3045 * camel-mime-utils.c
3046 (header_param): get rid of the g_strcasecmp crap.
3047 (header_set_param): Same here.
3048 (header_decode_param_list): And here.
3049 (header_decode_text): Totally rewritten. 30% of its size. If the
3050 word is not rfc2047 encoded, always try default_charset if
3051 supplied, if that fails, try locale charset if it exists, if that
3052 fails then assume latin1/7 bit ascii.
3053 (append_8bit): Changed to return FALSE if we can't convert for
3054 whatever reason, and dont append anything.
3056 * camel-mime-part.h (struct _CamelMimePart): Move content_type and
3057 headers out of the 'private' section.
3059 * camel-mime-part.c (get_headers): Dont do any conversion on the
3061 (process_header): Get the content-type charset as the fallback
3062 charset for decode_string.
3063 (construct_from_parser): IF we have a content-type header, process
3064 it before doing anything else, so we have access to a fallback
3065 charset for invalid headers.
3067 2001-09-23 Jeffrey Stedfast <fejj@ximian.com>
3069 * camel-tcp-stream-openssl.c (ssl_verify): Don't even try to alert
3070 the user if the session isn't interactive.
3071 (errlib_error_to_errno): Make the default errno EINTR so that we
3072 act just like CamelTcpStreamSSL.
3074 * camel-pgp-context.c (pgp_sign): When the password is not
3075 provided, set the exception to USER_CANCEL.
3076 (pgp_clearsign): Same.
3077 (pgp_encrypt): And here.
3078 (pgp_decrypt): Here too.
3080 2001-09-21 <NotZed@Ximian.com>
3082 * camel-store.c (create_folder): Set the exception if
3083 create_folder isn't implemented.
3085 2001-09-21 Jeffrey Stedfast <fejj@ximian.com>
3087 * providers/imap/camel-imap-store.c (create_folder): Go back to
3088 not using camel_folder_info_build() here because this seems to
3089 break folder creation (returning nodes from the root path when it
3092 2001-09-21 <NotZed@Ximian.com>
3094 * camel-vee-store.c (vee_get_folder_info): Force a refresh of
3095 vfolders before storing their count. This essentially makes
3096 'get_folderinfo' refresh all vfolders, so that get-mail works as
3099 * camel-vee-folder.c (camel_vee_folder_finalise): Clear lists.
3100 (folder_changed): If we're not autoupdating the folder, then
3101 add this folder to the list of 'changed' folders for this vfolder.
3102 (camel_vee_folder_set_expression): Reset the folders_changed list.
3103 (camel_vee_folder_remove_folder): Remove the folder from the
3104 folders_changed list.
3105 (camel_vee_folder_set_folders): If we have a folder already, but
3106 its changed, use this opportunity to update it.
3107 (vee_sync): Remove any synced folders from the folders_changed
3109 (vee_refresh_info): Refresh folder, re-run queries on any changed
3112 2001-09-20 <NotZed@Ximian.com>
3114 * camel-folder-summary.c (camel_folder_summary_header_load): New
3115 function to just load the summary. Not much use yet, until unread
3116 counts are stored in the summary (which now looks like too much
3119 * camel-mime-utils.c (header_decode_mailbox): Crappy fix for
3120 stupid mailers. If we get 'name b. name <foo>' then treat it as
3121 '"name b. name" <foo>'. See 8147.
3122 (header_decode_mailbox): Another fix for really broken mailers
3123 that have things that look like addresses followed by <address>
3125 (rfc2047_encode_word): Escape ??= to avoid some bizarre warning
3128 * providers/local/camel-local-folder.c
3129 (camel_local_folder_construct): Setup unread count properly, and
3130 also setup the url properly.
3132 * providers/local/camel-maildir-store.c (camel_folder_info_new):
3133 Build the path on the folderinfo.
3134 (scan_dir): Dont include empty host part in url for folder.
3135 (scan_dir): Lookup folder counts for any folders we currenty have
3137 (scan_dir): If we dont have the folder open, then scan the 'new'
3138 and 'cur' folders for new and unread messages to count instead.
3140 * providers/local/camel-spool-store.c (get_folder_info): If we
3141 have this folder open, then set unread from the folder itself.
3142 (get_folder_info): Change the INBOX path to not include the
3145 * providers/local/camel-spool-folder.c
3146 (camel_spool_folder_construct): Fix path.
3147 (camel_spool_folder_construct): Properly setup the url field when
3148 we say we've got a new folder created.
3150 * providers/imap/camel-imap-store.c (unsubscribe_folder): Build
3153 * camel-store.c (camel_folder_info_build_path): Prepend / to path.
3155 * camel-vee-folder.c (camel_vee_folder_construct): Use macro for
3156 unmatched folder name.
3157 (camel_vee_folder_new): "
3159 * camel-vee-store.c (vee_get_folder_info): Use macro for unmatched
3161 (vee_delete_folder): "
3162 (vee_rename_folder): "
3163 (vee_get_folder): Prepend / onto path.
3164 (vee_delete_folder): Setup path in folderinfo.
3165 (vee_get_folder_info): Fix path in folderinfo.
3167 * camel-vee-folder.h (CAMEL_UNMATCHED_NAME): New define for
3168 unmatched (internal) name.
3170 2001-09-20 Jeffrey Stedfast <fejj@ximian.com>
3172 * providers/local/camel-spool-folder.c
3173 (camel_spool_folder_construct): And finally here.
3175 * providers/local/camel-local-folder.c
3176 (camel_local_folder_construct): And here.
3178 * camel-vee-store.c (vee_get_folder): ANd here too.
3179 (vee_get_folder_info): And here.
3181 * providers/imap/camel-imap-store.c (create_folder): Use
3182 camel_folder_info_build() and do better error checking.
3183 (subscribe_folder): Set the path on the folder info.
3185 * camel-store.c (camel_folder_info_build): Set the folder-info
3186 path if it hasn't already been set by the caller.
3187 (camel_folder_info_free): Free the path.
3189 * camel-store.h: Added a path member to the FolderInfo type.
3191 2001-09-20 Dan Winship <danw@ximian.com>
3193 * camel-charset-map.c (camel_charset_to_iconv): Nuke debug warning.
3195 2001-09-19 Jeffrey Stedfast <fejj@ximian.com>
3197 * camel-pgp-context.c: Updated exception strings to be more clear.
3199 * camel-pgp-mime.c (pgp_mime_part_sign_restore_part): Stupid
3200 mistake, fixes bug #9975.
3202 * camel-tcp-stream-ssl.c (ssl_bad_cert): Oops, don't fail if
3203 `data' isn't a CamelService...cuz it's not supposed to be! It's a
3204 CamelTcpStreamSSL object...doh!
3206 2001-09-19 <NotZed@Ximian.com>
3208 * General cleanup of camel debug printfs.
3210 * camel-lock.c (camel_lock_fcntl): Changed to return 'success' if
3211 the error indicates file locking isn't supported on this
3212 filesystem. Still return a warning just incase (if its the first
3213 time). Might fix a lot of reported bugs.
3215 * providers/local/camel-spool-store.c (get_folder_info): Dont
3216 include the empty // host part in the uri. This 'breaks' the
3219 2001-09-18 Jeffrey Stedfast <fejj@ximian.com>
3221 * camel-mime-utils.c: Match mailing-list header List-Owner.
3223 2001-09-18 <NotZed@Ximian.com>
3225 * camel-vee-store.c (vee_get_folder): Fix the uri genereated for
3226 the folderinfo for the folder_created event.
3228 * camel-store.h: Added 'total' to CamelFolderInfo.
3230 2000-09-18 <NotZed@Ximian.com>
3232 * providers/local/camel-maildir-folder.c
3233 (camel_maildir_folder_new): If filter inbox is set on the store,
3234 and we're opening inbox '', then enable filtering on new messages.
3236 * providers/local/camel-local-folder.c
3237 (camel_local_folder_construct): After loading the summary, check
3238 it, and only abort if that fails. Also maintain the changes
3241 * providers/local/camel-local-summary.c
3242 (camel_local_summary_load): Remove summary_check code from here.
3243 (camel_local_summary_check): Sync index/summary here, if we were
3246 * providers/local/camel-spool-folder.c
3247 (camel_spool_folder_new): If we have filter-new-messages-on-inbox
3248 set and we just opened inbox, turn on filtering on this folder.
3249 (camel_spool_folder_construct): Keep track of changes for the
3250 folder, so that filter-new-messages works right (?)
3252 * providers/local/camel-spool-store.c (get_folder): Pass 'INBOX'
3253 as the folder name, not the path.
3255 * camel-folder-search.c (search_not): Modified patch from
3256 <peterw@ximian.com> since the summary is messageinfo's, not
3259 ** Ok so the problem with the stuff below is that maildir/spool
3260 'summary_load' throws away all events, including recents, joy eh?
3262 * providers/local/camel-maildir-summary.c (maildir_summary_check):
3263 Add new messages to the recent changeinfo.
3265 * providers/local/camel-spool-summary.c: Mark 'new' message as
3266 recent, for later processing if required (i.e. 'filter new
3269 * camel-store.c (construct): new function, cascade up construct
3270 method and check for 'filter' param, and set accordingly for any
3271 one that might want it.
3273 * providers/imap/camel-imap-store.c (construct): map the
3274 param_filter_inbox flag to the store->flags as
3275 CAMEL_STORE_FILTER_INBOX.
3277 * camel-store.h (CAMEL_STORE_FILTER_INBOX): new flag to tell it to
3280 * providers/imap/camel-imap-folder.h: Removed do_filtering flag
3281 from CamelImapFolder.
3283 * providers/imap/camel-imap-folder.c (imap_update_summary): Remove
3284 the 'recents' parameter, use the 'changes' parameter instead to
3286 (camel_imap_folder_changed): Changed for update_summary api
3287 change. Now always just emit the changed event if we have any
3288 changes to report, filtering code removed, handled upstream.
3290 (filter_free): Removed old filtering code.
3291 (camel_imap_folder_new): Set the filter_recent flag on the folder
3292 if we're the inbox and filtering of inbox is enabled.
3294 * camel-folder.c (folder_changed): If we have 'recent' messages,
3295 and are set to filter recents, then freeze the folder and launch a
3296 thread to do the processing (or similar if threading not enabled).
3297 (thaw): Make sure we emit the changed signal outside of owning the
3298 lock and if things have changed. Also, no longer bother
3299 downgrading folder_changed events to message_changed events.
3301 * camel-folder.h (struct _CamelFolder): Added filter_recent flag
3302 -> signifies all recent messages in folder should be filtered.
3304 * camel-session.c: (camel_session_thread_msg_new,
3305 camel_session_thread_msg_free, camel_session_thread_queue,
3306 camel_session_thread_wait): code to handle async operations as
3307 part of camel processing.
3308 (camel_session_finalise): free thread_lock, destroy thread, active
3310 (camel_session_init): init thread, active hash, etc.
3311 (camel_session_class_init): Init virtual functions.
3312 (session_thread_msg_new, session_thread_msg_free,
3313 session_thread_destroy, session_thread_received,
3314 session_thread_queue, session_thread_wait): default implementation
3315 of session threads stuff.
3317 2001-09-17 <NotZed@Ximian.com>
3319 * camel-folder.c (camel_folder_change_info_recent_uid): New
3320 function to add a 'recent' uid to the change info.
3321 (camel_folder_change_info_clear): Clear recent list.
3322 (camel_folder_change_info_free): Free recent list.
3323 (camel_folder_change_info_new): Setup recent list.
3325 * camel-folder.h: Added a uid_recent item to the folder_changed
3328 * providers/local/camel-maildir-store.c (scan_dir): Free new in
3331 * providers/local/camel-local-provider.c: Add local config entries
3332 to filter on new messages in spool and maildir provider.
3334 * camel-vee-folder.c (vee_folder_construct): Remove the assertion
3335 which stops ? in names from being allowed.
3337 2001-09-18 Dan Winship <danw@ximian.com>
3339 * camel-data-wrapper.c (camel_data_wrapper_is_offline): Virtualize
3342 * camel-medium.c (is_offline): A medium is offline if its content
3345 * camel-multipart.c (is_offline): A multipart is offline if any of
3346 its subparts are offline.
3348 2001-09-18 Jeffrey Stedfast <fejj@ximian.com>
3350 * camel-charset-map.c: Added korean charset conversion.
3352 2001-09-17 Jeffrey Stedfast <fejj@ximian.com>
3354 * providers/imap/camel-imap-store.c (delete_folder): Don't process
3355 the ImapResponse data, we don't want to block forever on data we
3357 (create_folder): Use get_folders_online() instead of
3358 get_folder_info_online().
3360 * camel-folder.c: Reverted previous changes.
3362 2001-09-17 JP Rosevear <jpr@ximian.com>
3364 * Makefile.am: Helpful install-exec-hook debugging output
3366 2001-09-16 Jeffrey Stedfast <fejj@ximian.com>
3368 * camel-folder.c (camel_folder_get_uri): New function to get the
3370 (get_uri): Default implementation.
3372 2001-09-14 <NotZed@Ximian.com>
3374 * camel-vee-folder.c (camel_vee_folder_set_folders): New function,
3375 set the complete list of folders on a vfolder, all at once.
3376 (camel_vee_folder_set_expression): If we set the query to be the
3377 same thing, dont do anything.
3379 * camel-vee-store.c (camel_vee_store_init): Turn off vtrash for
3382 * camel-store.c (camel_store_init): Enable vtrash by default via
3384 (camel_store_get_trash): REturn NULL if the store doesn't support
3386 (init_trash): Dont init if store doesn't support vtrash.
3388 * camel-store.h: Add a new flags CAMEL_STORE_VTRASH -> store
3391 2001-09-13 <NotZed@Ximian.com>
3393 * camel-vee-store.c (vee_get_folder_info): Implement.
3394 (build_info): Used to build a folder record from the folders
3396 (vee_delete_folder): Implemented, remove folder from hashtable.
3397 (vee_rename_folder): Implemented, remove old folder from
3398 hashtable, add new one and rename its guts too.
3400 * camel-store.c (camel_store_rename_folder): Do nothing if we're
3401 not asked to actually change names. Also dont do the renamed
3402 cache check till after we've called the subclass.
3403 (camel_store_delete_folder): Call the subclass delete firs,t then
3404 make sure the cache is right.
3406 * camel-vee-folder.c (vee_folder_construct): Remove support for
3407 name?query syntax to setup vfolder. Abort if such syntax is used.
3408 (camel_vee_folder_new): Removed code that handles ? syntax, etc.
3409 (vee_folder_build_folder): Handle unset expression, treat it as an
3411 (camel_vee_folder_set_expression): Oops, actually set the
3414 * camel-vtrash-folder.c (camel_vtrash_folder_new): Dont use
3415 name?query syntax to setup vfolder, but set the expression
3416 directly. Also fixes a small memleak.
3418 2001-09-12 <NotZed@Ximian.com>
3420 * camel-store.c (camel_store_delete_folder): Fixed warnings with a
3422 (camel_store_rename_folder): "
3424 2001-09-14 Jeffrey Stedfast <fejj@ximian.com>
3426 * camel-url.c (camel_url_set_param): Use g_datalist_set_data_full
3427 so that the data will be free'd when we clear the list.
3429 2001-09-14 Dan Winship <danw@ximian.com>
3431 * camel-file-utils.c (camel_file_util_encode_string,
3432 camel_file_util_decode_string): Don't claim failure when
3433 reading/writing the empty string.
3435 2001-09-14 JP Rosevear <jpr@ximian.com>
3437 * Makefile.am: use install hook instead of install rule to
3438 guarantee we run after installation
3440 2001-09-13 Jeffrey Stedfast <fejj@ximian.com>
3442 * camel-filter-driver.c (camel_filter_driver_filter_folder): Don't
3443 reuse the exception if it has already been set.
3444 (camel_filter_driver_filter_message): Same here. Also use the new
3445 return value from camel_filter_search_match().
3447 * camel-filter-search.c (camel_filter_search_match): Return an
3448 integer (matched, no-match, or error).
3450 * providers/local/camel-mbox-folder.c (mbox_append_message): Do
3451 error-checking based on function return values rather than
3452 exceptions as it's possible for them to be NULL.
3453 (mbox_get_message): Same.
3455 * providers/imap/camel-imap-folder.c (imap_append_offline): Pass
3456 an exception to the cache.
3457 (imap_append_online): Same.
3458 (imap_append_resyncing): Here too.
3459 (imap_copy_offline): And here.
3460 (handle_copyuid): Pass NULL as the exception here...
3461 (parse_fetch_response): And finally here.
3463 * providers/imap/camel-imap-message-cache.c
3464 (camel_imap_message_cache_insert):
3466 (camel_imap_message_cache_insert_stream):
3467 (camel_imap_message_cache_insert_wrapper):
3468 (camel_imap_message_cache_copy): Take an exception argument and
3471 * camel-mime-part-utils.c
3472 (simple_data_wrapper_construct_from_parser): Convert the charset
3473 to the iconv-friendly name.
3475 * camel-charset-map.c (camel_charset_to_iconv): Add code to
3476 convert windows-[cp]#### charsets to their iconv-friendly format
3479 * camel-pgp-context.c (crypto_exec_with_passwd): Return -1 on
3482 2001-09-12 Larry Ewing <lewing@ximian.com>
3484 * camel-filter-driver.c (camel_filter_driver_filter_mbox): free
3485 the source url in the nonfailure case.
3487 2001-09-12 <NotZed@Ximian.com>
3489 * camel-folder-search.h: Change the 'not' virtual method from an
3490 immediate e-sexp function to a non-immediate one, which is what it
3493 * camel-folder-search.c (search_not): Implement a 'not' function
3494 ourselves. If 'not' on a vector value, then not over all items
3496 (builtings[]): Change the 'not' builtin to be a non-immediate
3499 2001-09-12 Jeffrey Stedfast <fejj@ximian.com>
3501 * camel-filter-driver.c (camel_filter_driver_filter_mbox): Unref
3504 2001-09-10 <NotZed@Ximian.com>
3506 * providers/local/camel-maildir-store.c (get_folder_info): Pass in
3507 a hashtalbe used for finding visited nodes.
3510 (inode_free): Helper functions for visited node checks, hashes on
3511 inode + device number.
3512 (scan_dir): Dont re-visited directories we've already visited, use
3513 inodes + device number.
3514 Also, if the folder doesn't contain cur/tmp/new, mark it as
3515 noselect, but continue to recurse folders, if asked.
3517 * camel-folder.c (move_messages_to): Progress reporting while
3520 * camel-store.c (camel_store_delete_folder): Make sure we remove
3521 the folder from our vtrash, if we have it in our opened set, and
3522 also remove it from our hashtable.
3523 (camel_store_rename_folder): Remove the old folder name from the
3524 folder cahce, if it is there.
3526 2001-09-10 Jeffrey Stedfast <fejj@ximian.com>
3528 * camel-charset-map.c (camel_charset_to_iconv): Get rid of the
3529 g_warning, we no longer really need that.
3531 2001-09-10 <NotZed@Ximian.com>
3533 * providers/imap/camel-imap-store.c (camel_imap_msg_new): Forgot
3534 to return the newly allocated msg.
3536 2001-09-08 Not Zed <NotZed@Ximian.com>
3538 * providers/local/camel-spool-summary.c (spool_summary_sync_full):
3541 * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
3544 * camel-tcp-stream-raw.c (stream_read): Save errno around fcntl
3545 call in cancellable read case. Also, loop while we get EINTR.
3546 This might fix some weird reconnect behaviour with pop.
3549 2001-09-07 Jeffrey Stedfast <fejj@ximian.com>
3551 * camel-tcp-stream-ssl.c (ssl_bad_cert): #if 0 out the code that
3552 was hopefully going to fix bug #5325 because the functions I used
3553 seem to have been deprecated. *sigh*.
3555 * camel-remote-store.c (camel_remote_store_finalise): Disconnect
3556 from the service here otherwise the locks will be destroyed and by
3557 the time CamelService finalizes we'll crash or hang.
3559 * providers/smtp/camel-smtp-transport.c (smtp_data): Make sure to
3560 unref the mime filters when we finish with them.
3562 2001-09-07 Ettore Perazzoli <ettore@ximian.com>
3564 * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
3565 s/Synchronising/Synchronizing/.
3566 (mbox_summary_sync_quick): Likewise.
3567 (summary_rebuild): s/Summarising/Summarizing/.
3569 2001-09-07 Jeffrey Stedfast <fejj@ximian.com>
3571 * camel-multipart.c (camel_multipart_set_boundary): Take a const
3572 char * instead of a char *.
3574 * camel-mime-part-utils.c
3575 (camel_mime_part_construct_content_from_parser): Reuse the
3576 original boundary instead of generating our own.
3578 2001-09-06 <NotZed@Ximian.com>
3580 * providers/imap/camel-imap-folder.c (filter_proc): Thread
3581 function to perform filtering.
3582 (filter_free): Free the filter object.
3583 (camel_imap_folder_changed): If we have threads enabled, then
3584 queue up a request to perform filtering. For bug #4422.
3586 * providers/imap/camel-imap-store.c (camel_imap_msg_new): Create a
3588 (camel_imap_msg_queue): Queue an 'imap msg'.
3589 (async_received): Handle receiving of imap msg in async thread.
3590 (async_destroy): Handle destroying of imap msg.
3591 (camel_imap_store_finalize): Destroy thread when done.
3592 (camel_imap_store_init): Setup thread.
3594 * providers/imap/camel-imap-store.h: Added an ethread to the
3595 store, for async processing.
3597 2001-09-06 Jeffrey Stedfast <fejj@ximian.com>
3599 * camel-remote-store.c (remote_recv_line): Use
3600 camel_stream_buffer_read_line() instead of duplicationing the
3601 functionality. Also, the previous way was broken anyway. What if a
3602 line was the same length as our buffer? Then we'd go and read a
3603 second line and a third and so on until they weren't the same
3604 length, leaving \r's in the middle of the buffer.
3606 2001-09-06 Dan Winship <danw@ximian.com>
3608 * providers/pop3/camel-pop3-store.c (pop3_get_response): Fix this
3609 to always set an exception if it returns POP3_FAIL, as documented.
3611 * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
3614 2001-09-06 Jeffrey Stedfast <fejj@ximian.com>
3616 * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
3617 Set an exception on POP3_FAIL as well.
3619 2001-09-06 Dan Winship <danw@ximian.com>
3621 * providers/pop3/camel-pop3-provider.c: #ifdef out the "delete
3622 after N days" option in pop3_conf_entries, since it won't be done
3625 2001-09-04 Jeffrey Stedfast <fejj@ximian.com>
3627 * camel-remote-store.c (remote_disconnect): Too late to sync the
3628 folders here... if this is gonna happen at all it should be done
3631 * camel-service.c (camel_service_finalize): Do a clean disconnect.
3633 2001-08-30 Jeffrey Stedfast <fejj@ximian.com>
3635 * providers/local/camel-spool-store.c (get_inbox): Return the
3636 default folder (ie. INBOX) rather than saying we don't support an
3639 * camel-tcp-stream-ssl.c: #include pk11func.h.
3640 (ssl_bad_cert): Use CERT_GetDefaultCertDB.
3642 2001-08-29 Jeffrey Stedfast <fejj@ximian.com>
3644 * camel-smime-context.c (smime_sign_prepare): Do the same here as
3645 what we did in the pgp code a moment ago.
3646 (smime_sign_restore): And again here.
3647 (smime_sign): And update thise code to pass in the address of the
3648 encodings list when restoring parts.
3650 * camel-pgp-mime.c (pgp_mime_part_sign_prepare_part): Special-case
3651 message/rfc822 mime parts - don't set an encoding on these,
3652 instead traverse into their subparts and set the encodings for
3654 (pgp_mime_part_sign_restore_part): Reverse any operations done to
3655 message/rfc822 parts in the above prepare_part() function and also
3656 take a pointer to a GSList of encodings instead of just a GSList
3657 so we can properly keep track of which encoding we are on.
3658 (camel_pgp_mime_part_sign): Pass in the address to the encodings
3659 list when restoring parts.
3661 2001-08-29 Not Zed <NotZed@Ximian.com>
3663 * providers/pop3/camel-pop3-folder.c (pop3_sync): Add progress
3664 reporting to deleting messages. Dont change the calculation to a
3665 bloody float. Bug #6189.
3667 2001-08-28 Jeffrey Stedfast <fejj@ximian.com>
3669 * camel-pgp-context.c (crypto_exec_with_passwd): Initialize buf
3670 and diag_buf to NULL, hopefully this fixes the crash if the
3672 (pgp_encrypt): Argh. What was I thinking? Don't use "-r recipient"
3673 as an argument, instead use "-r" and "recipient" as 2 separate
3674 arguments to pgp. This might fix the "gpg only encrypts to my
3677 2001-08-28 Peter Williams <peterw@ximian.com>
3679 * providers/imap/camel-imap-store.c (create_folder): Whoops.
3680 Double-free and FMR = bad.
3682 * camel-remote-store.c (remote_send_string): Don't reveal the
3683 user's IMAP password if their server supports LITERALPLUS. Also
3684 add some more dashes to make it line up nicely :-)
3686 2001-08-28 Jeffrey Stedfast <fejj@ximian.com>
3688 * camel-tcp-stream-ssl.c (ssl_bad_cert): If the user accepts the
3689 certificate, add it to the database as a trusted CA.
3691 2001-08-28 Peter Williams <peterw@ximian.com>
3693 * camel-object.c (camel_object_unref): Make the locking more
3694 fine-grained on destruction; specifically, don't hold the
3695 type lock while calling the finalize functions.
3697 2001-08-27 Jeffrey Stedfast <fejj@ximian.com>
3699 * providers/local/camel-local-provider.c: Changed the
3700 description/names of some of the local providers to try and
3701 clarify the meanings.
3703 * providers/pop3/camel-pop3-provider.c: Simplify the POP
3704 description - we want short but sweet.
3706 * providers/imap/camel-imap-provider.c: s/IMAPv4/IMAP
3708 2001-08-27 Not Zed <NotZed@Ximian.com>
3710 * camel-mime-part-utils.c (convert_buffer): re-read the iconv man
3711 page, and treat the return value properly. It returns the number
3712 of non-reversible conversions performed, not the number of output
3714 (check_html_charset): Changed to just take a buffer of data, and
3715 not the mime parser.
3716 (simple_data_wrapper_construct_from_parser): Since we dont need
3717 the charset till we have all the data, search for the charset
3718 after we've read the data, if we have html data with no charset in
3720 (simple_data_wrapper_construct_from_parser): Remove the
3721 seekable_source stuff.
3723 * Re-apply patches from before.
3725 2001-08-25 Not Zed <NotZed@Ximian.com>
3727 ["Summarising" and "Synchronising" are spelt with a "s" in
3730 * providers/local/camel-mbox-summary.c (mbox_summary_sync_quick):
3731 s/Synchronizing/Synchronising/.
3733 * providers/local/camel-mbox-summary.c (summary_rebuild):
3734 s/Summarizing/Summarising/
3736 2001-08-24 Jeffrey Stedfast <fejj@ximian.com>
3738 * camel-disco-diary.c (camel_disco_diary_replay): Use fseek
3739 instead of fseeko since we want to be portable and use ftell
3740 rather than ftello for the same reason.
3741 (camel_disco_diary_empty): Same here.
3743 2001-08-24 Peter Williams <peterw@ximian.com>
3745 * Revert Not Zed's previous commits as they apparently can cause
3746 serious data loss for POP3 users.
3748 2001-08-24 Ettore Perazzoli <ettore@ximian.com>
3750 ["Summarizing" and "Synchronizing" are spelt with a "z" in the
3751 default locale, that happens to be "en_US".]
3753 * providers/local/camel-mbox-summary.c (mbox_summary_sync_quick):
3754 s/Synchronising/Synchronizing/.
3756 * providers/local/camel-mbox-summary.c (summary_rebuild):
3757 s/Summarising/Summarizing/
3759 2001-08-24 Not Zed <NotZed@Ximian.com>
3761 * camel-mime-part-utils.c (convert_buffer): Limit the maximum
3762 output buffer size. iconv bugs? returns E2BIG forever on some
3765 * providers/local/camel-spool-summary.c (summary_rebuild):
3768 * providers/local/camel-mbox-summary.c (summary_rebuild):
3769 Summarising is spelt with an s.
3771 2001-08-23 Not Zed <NotZed@Ximian.com>
3773 * camel-mime-part.c (write_to_stream): If we have rawtext, then
3774 dont do any charset conversion, only encoding/crlf conversion.
3776 * camel-data-wrapper.h (struct _CamelDataWrapper): Added 'rawtext'
3777 member, says the character encoding is raw, not utf8.
3779 * providers/local/camel-spool-summary.c
3780 (spool_summary_sync_quick): Synchronising is spelt with an s, not
3782 (spool_summary_sync_full): "
3784 * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
3785 No, synchronising is spelt with an s.
3786 (mbox_summary_sync_quick): "
3788 * camel-mime-part-utils.c
3789 (camel_mime_part_construct_content_from_parser): Remove the
3790 warnings which aren't going anywhere fast.
3791 (convert_buffer): Function to convert a bytearray of textual
3792 content from one charset to another. If the charset doesn't exist
3793 or fails, then do no conversion.
3794 (simple_data_wrapper_construct_from_parser): First, read in data,
3795 then try and convert it using the specified charset if supplied.
3796 If that fails, then dont do any conversion, and leave as raw.
3797 Also, if we have any x-* charsets, then dont do any processing.
3799 2001-08-23 Peter Williams <peterw@ximian.com>
3801 * providers/local/camel-mbox-summary.c (summary_rebuild): Add a
3802 missing \n to the end of a printf.
3804 * providers/local/camel-spool-summary.c (summary_rebuild): Same.
3806 2001-08-22 Jeffrey Stedfast <fejj@ximian.com>
3808 * providers/pop3/camel-pop3-folder.c (pop3_generate_uids):
3809 Oops. Fixed a mis-use of GPtrArray. If we set_size, then using
3810 g_ptr_array_add will assume `size' elements have already been
3811 initialized and will start appending on to the end.
3813 2001-08-21 Jeffrey Stedfast <fejj@ximian.com>
3815 * camel-pgp-context.c (pgp_verify): Turn on --batch and reenable
3816 gpg keyserver lookups.
3817 (pgp_decrypt): Disable keyserver lookups if we are disconnected.
3819 2001-08-21 Dan Winship <danw@ximian.com>
3821 * camel-folder-thread.c
3822 (camel_folder_thread_messages_new_summary): Fix the duplicate
3823 message check so it doesn't mess up threading when a reply appears
3824 in the folder before the message it's a reply to. Fixes bug #3357.
3825 (camel_folder_thread_messages_new): Likewise, although I don't
3826 think this function is used any more.
3828 2001-08-20 JP Rosevear <jpr@ximian.com>
3830 * Makefile.am: build a static camel for the addressbook conduit
3832 2001-08-20 Ettore Perazzoli <ettore@ximian.com>
3834 * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
3835 s/Synchronising/Synchronizing/.
3836 (mbox_summary_sync_quick): Likewise. *
3837 providers/local/camel-spool-summary.c (spool_summary_sync_full):
3839 (spool_summary_sync_quick): Likewise.
3841 2001-08-20 Jeffrey Stedfast <fejj@ximian.com>
3843 * providers/imap/camel-imap-store.c (create_folder): Get the
3844 entire directory structure for the folder we just created, meaning
3845 if we created a folder named "test.mailbox" where test didn't
3846 previously exist, get the listing for "test" and "test.mailbox".
3848 * providers/imap/camel-imap-utils.c (imap_parse_folder_name): New
3851 2001-08-19 Chris Toshok <toshok@ximian.com>
3853 * camel-store.h: #include <sys/types.h> for mode_t on freebsd.
3855 2001-08-19 Jeffrey Stedfast <fejj@ximian.com>
3857 * providers/pop3/camel-pop3-folder.c (pop3_generate_uids): Make
3858 sure the generated UID is non-NULL before appending it to the
3859 array of UIDs. How would this even happen? I have no clue...
3861 2001-08-17 Jeffrey Stedfast <fejj@ximian.com>
3863 * providers/imap/camel-imap-folder.c (imap_update_summary): Start
3864 scanning new messages at maxuid + 1 rather than uidval + 1? Maybe
3865 I'm missing the logic, but anyways...this might fix bug #5348.
3867 2001-08-16 Jeffrey Stedfast <fejj@ximian.com>
3869 * providers/imap/camel-imap-store.c (imap_keepalive): If we are
3870 online and message flags have changed in the current folder, sync
3871 the flags else do a NOOP. This fixes bug #4666. Also lock around
3874 * providers/imap/camel-imap-folder.c (imap_sync_online): Don't
3875 ever send "STORE FLAGS.SILENT ()" since Cyrus imapd doesn't like
3876 this (and maybe others too?) so what we'll do instead is to send
3877 "STORE -FLAGS.SILENT (\Seen \Answered \Deleted \Marked)" to clear
3878 all the flags (since this is in essence what we want to do
3881 2001-08-16 Peter Williams <peterw@ximian.com>
3883 * providers/imap/camel-imap-store.c (imap_connect_online): Fix
3884 this again. Sigh. Problem of namespace = "" may not yet be
3887 2001-08-15 Peter Williams <peterw@ximian.com>
3889 * camel-tcp-stream-openssl.c (ssl_error_to_errno): New
3890 function. Try to approximate the SSL error into errno.
3891 (errlib_error_to_errno): New function, try to approximate
3892 OpenSSl's error library's error (ERR_*) into errno.
3893 (stream_read): Try to set errno using ssl_error_to_errno.
3894 (stream_write): Same.
3895 (open_ssl_connection): Same.
3897 * providers/imap/camel-imap-store.c (imap_connect_online): Oh
3898 crap, huge killer typo.
3900 2001-08-14 Peter Williams <peterw@ximian.com>
3902 * providers/imap/camel-imap-store.c (imap_connect_online):
3903 Canonicalize store->namespace to end in store->dir_sep, once both
3904 values are known. The %F-related code makes this
3905 assumption. Probably fixes a bug reported on the mailing list.
3907 2001-08-13 Jeffrey Stedfast <fejj@ximian.com>
3909 * camel-store.c (camel_store_get_folder): After talking to NotZed,
3910 it turns out I was wrong after all.
3911 (store_sync): Create a copy of the folder-cache that owns a ref on
3912 each of the folders so that if one of the folders get's finalized
3913 inside store_sync(), we don't run into any locking issues. This is
3914 mostly meant to solve a problem in IMAP (#6089).
3916 2001-08-13 Peter Williams <peterw@ximian.com>
3918 * providers/imap/camel-imap-store.c (delete_folder): Fix a leak.
3920 * providers/imap/camel-imap-utils.c (imap_namespace_concat): Bleah,
3921 handle when namespace = NULL (can happen upon initial open of mailbox.)
3923 * providers/imap/camel-imap-command.c (imap_command_strdup_vprintf):
3924 Don't crash when %F'ing with an empty folder name and NULL namespace.
3926 2001-08-13 Jeffrey Stedfast <fejj@ximian.com>
3928 * camel-store.c (camel_store_get_folder): We need to be ref'ing
3929 the folder if/when we add it to the hash. This may fix bug #6089?
3930 (camel_store_get_folder): Nevermind, reverted the fix.
3931 (camel_store_get_folder): No, I wasn't on crack before after
3932 all...if we don't ref here, then we're open to a race condition
3935 2001-08-11 Ettore Perazzoli <ettore@ximian.com>
3937 * providers/local/camel-spool-summary.c (summary_rebuild):
3938 s/summarising/summarizing/.
3939 (summary_rebuild): Likewise.
3941 * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
3942 s/summarise/summarize/.
3943 (mbox_summary_sync_quick): Likewise.
3944 (summary_rebuild): Likewise.
3945 (mbox_summary_check): Likewise.
3947 2001-08-10 Jeffrey Stedfast <fejj@ximian.com>
3949 * providers/imap/camel-imap-utils.c (imap_quote_string): Added an
3950 assert - at this point a backtrace would be more useful than a
3951 transaction log for debugging.
3953 * providers/imap/camel-imap-command.c (imap_command_start): Return
3954 FALSE here, not NULL.
3956 * providers/imap/camel-imap-folder.c (imap_rescan): Don't
3957 g_strdup() the uid into the trigger_event call.
3959 * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
3960 Set the total bytes expected to 0 if the response is empty too.
3961 (pop3_refresh_info): Return of there was an error generating pop3
3964 * camel-mime-utils.c (header_raw_check_mailing_list): regfree the
3965 pattern before continue'ing. This was showing up quite a bit under
3968 2001-08-09 Jeffrey Stedfast <fejj@ximian.com>
3970 * providers/imap/camel-imap-utils.c (imap_parse_string_generic): A
3971 quoted string cannot contain \n's so check for those as well.
3972 (imap_atom_specials): Update this to fix bug #6553.
3974 2001-08-08 Jon Trowbridge <trow@ximian.com>
3976 * camel-filter-search.c (get_source): Remove trailing stuff from
3977 URLs before returning. (Done in an evil way, not in the good way
3978 suggested by fejj. :)) (Bug #4876)
3980 2001-08-08 jacob berkman <jacob@ximian.com>
3982 * camel-search-private.c (camel_search_header_match): check for
3983 NULL name and addr (fixes a bug i was about to report)
3985 2001-08-08 Not Zed <NotZed@Ximian.com>
3987 * camel-filter-search.c (check_header): Properly determine match
3988 type to pass to header_match.
3989 (address_matches_exactly): Removed, effectively added to
3990 camel_search_header_match.
3992 * camel-folder-search.c (check_header): Properly determine the
3993 match type to pass to header_match.
3995 * camel-search-private.c (camel_search_header_match): Add a new
3996 parameter 'type' which is the type of header we're matching
3997 against. ASIS means utf8 format, ADDRESS means an internet
3998 address ('formatted'), ADDRESS_ENCODED means a raw address header,
3999 ENCODED means rfc 2047 encoded text.
4000 (header_match): Move original logic here, have search_header_match
4001 call it as appropriate for the 'type' of match.
4003 2001-08-07 Not Zed <NotZed@Ximian.com>
4005 * camel-session.c (camel_session_class_init): Only init the vee
4006 provider struct once (if we're subclassed this will get called
4009 * camel-object.c (obj_finalize): Removed a bit of a debug that
4010 crept in with jacob's poolv patch (?).
4012 2001-08-07 Jeffrey Stedfast <fejj@ximian.com>
4014 * camel-filter-search.c (address_matches_exactly): New function to
4015 do danw's address "is" comparison (as specified in bug #5886.
4016 (check_header): Special-case address-type headers when we are
4017 doing an exact match to use the address_matches_exactly function.
4019 2001-08-06 Jeffrey Stedfast <fejj@ximian.com>
4021 * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
4022 Modify to take a headers_only argument which will then only fetch
4024 (pop3_generate_uids): Pass in TRUE for headers_only.
4025 (pop3_get_message): Pass in FALSE for headers_only and move the
4026 camel_operation() stuff out of get_message_stream and in to here
4028 (pop3_generate_uids): We also need to be using i+ 1 as the id
4029 since we are starting at 0.
4031 2001-08-06 Jeffrey Stedfast <fejj@ximian.com>
4033 * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
4034 New internal function to get a message stream by message sequence
4035 id (so that we can share code between pop3_get_message and
4036 pop3_generate_uids).
4037 (pop3_get_message): Use pop3_get_message_stream.
4038 (pop3_generate_uids): New function to generate UIDs based on the
4039 message - this fixes bug #1256.
4040 (pop3_refresh_info): If the server doesn't support UIDL, call
4041 pop3_generate_uids to get our list of UIDs.
4043 * providers/imap/camel-imap-store.c (get_folder_info_online):
4044 Don't strstr for noselect=yes, that's just plain broken.
4046 2001-08-06 Dan Winship <danw@ximian.com>
4048 * providers/imap/camel-imap-folder.c (imap_rescan): Fix off-by-one
4049 error in cleaning up deleted messages at the end of the folder.
4050 Fixes bug #5585 and maybe others.
4052 * providers/imap/camel-imap-store.c (get_folder_info_online): Do a
4053 refresh_info on the selected folder before looking at its unread
4054 count. Should fix bug #4944.
4056 2001-08-06 Peter Williams <peterw@ximian.com>
4058 Completely hide the namespace from everything external to the IMAP
4059 code, which Dan W says is the way it should be.
4061 * providers/imap/camel-imap-command.c
4062 (imap_command_strdup_vprintf): Add a new %F argument, which is like
4063 %S but will add the namespace (for folder names).
4064 (camel_imap_command): Use %F here.
4066 * providers/imap/camel-imap-utils.c (imap_parse_list_response):
4067 Changed to strip out the namespec when returning *folder. In order
4068 to do this we need to be passed the CamelImapStore.
4069 (imap_concat): Move to here from camel-imap-store.c, un-static
4070 (imap_namespace_concat): New function, adds the namespace to the
4071 folder name, unless it's INBOX.
4073 * providers/imap/camel-imap-utils.h: Prototypes.
4075 * providers/imap/camel-imap-store.c (imap_connect_online): Extra
4076 arg to imap_parse_list_response.
4077 (imap_connect_offline): Here too.
4078 (get_folder_status): Use %F.
4079 (get_folder_online): Here too.
4080 (delete_folder): Here too.
4081 (create_folder): Here too, and arg to imap_parse_list_response.
4082 (parse_list_response_as_folder_info): Arg to i_p_l_r.
4083 (get_subscribed_folders_by_hand): Use %F.
4084 (get_folders_online): Here too.
4085 (get_folder_info_online): Instead of checking for NULL @name, check
4086 for name = NULL or "", and set to "" instead of namespace. Pass ""
4087 instead of namespace to camel_folder_info_build.
4088 (subscribe_folder): Use %F.
4089 (unsubscribe_folder): Here too.
4091 * providers/imap/camel-imap-folder.c (imap_get_full_name): This
4092 now just returns folder->full_name.
4094 (do_copy): Here too.
4096 2001-08-06 Jeffrey Stedfast <fejj@ximian.com>
4098 * camel-pgp-context.c (pgp_verify): Always do --no-auto-key-retrieve.
4100 2001-08-03 Jeffrey Stedfast <fejj@ximian.com>
4102 * camel-pgp-context.c (pgp_verify): Minor changes to the iconv
4103 code so that it does the check in the return value of iconv() just
4104 like the code in camel-mime-utils.c in case this fixes Bo Rosen's
4105 gpg bugs (but I doubt this will change anything?).
4107 2001-08-03 Jeffrey Stedfast <fejj@ximian.com>
4109 * providers/smtp/camel-smtp-transport.c (smtp_connect): First
4110 check to make sure that service->url->authmech is non-NULL before
4111 passing it into strcmp to avoid a segfault.
4113 * camel-pgp-context.c (pgp_decrypt): Sigh, if gpg returns '1' it
4114 means that the key is bad but it did succeede in decrypting the
4115 block so to make users happy (even though I find this a
4116 questionable action) we are going to ignore the error and show it
4117 to the user anyway. This fixes bug #6136.
4119 2001-08-03 Not Zed <NotZed@Ximian.com>
4121 * providers/smtp/camel-smtp-transport.c (smtp_connect): special
4122 case popb4smtp auth before we try and connect, and do the magic
4125 2001-08-02 Not Zed <NotZed@Ximian.com>
4127 * providers/smtp/camel-smtp-transport.c (smtp_connect): Check for
4128 POPB4SMTP separate to the esmtp auth list.
4129 (smtp_auth): If creating the sasl object means it is
4130 already authenticated, then exit early. Sort of 'clean hack' to
4131 help popb4smtp work.
4132 (smtp_auth): Unref the sasl object, clean up a memleak i think.
4134 * providers/smtp/camel-smtp-provider.c
4135 (camel_provider_module_init): Added POPB4SMTP auth type.
4137 * camel-sasl.c (camel_sasl_authtype): Added POPB4SMTP type.
4139 * camel-sasl-popb4smtp.c: New file for pop before smtp
4142 * Makefile.am (libcamel_la_SOURCES, HEADERS): Add
4143 camel-sasl-popb4smtp.[ch].
4145 2001-08-01 Not Zed <NotZed@Ximian.com>
4147 * providers/local/camel-mbox-folder.c (mbox_lock): If we fail to
4148 get the lock, make sure we close our locking fd, and reset it.
4149 Fixes the crash part of 5095.
4151 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
4152 Slightly re-arranged filter/change notification logic. If we;re
4153 filtering, freeze the folder till we're finished to smooth the ui
4156 2001-07-31 Not Zed <NotZed@Ximian.com>
4158 * camel-folder.c (camel_folder_init): Chagned mutexes to
4159 e_mutexes, folder lock recursive. This fixes the imap filtering
4160 bug, or at least some cases of it.
4161 (camel_folder_finalize): Free mutexes.
4163 * camel-private.h (CamelFolderPrivate): Changed mutexes to
4166 2001-07-25 Not Zed <NotZed@Ximian.com>
4168 * camel-folder.c (camel_folder_change_info_*): Change the
4169 return if fail's into asserts.
4170 (camel_folder_change_info_free): Don't let it accept a NULL
4171 argument. This isn't g_lib so we dont have to.
4173 2001-07-27 Jeffrey Stedfast <fejj@ximian.com>
4175 * camel-mime-utils.c (header_decode_param): Fix the fix that fixes
4176 broken mailer behavior. We want to make sure that the user's
4177 locale charset is non-NULL before we pass it off to
4178 iconv_open(). If it *is* NULL, we want to use iso-8859-1.
4180 2001-07-26 Jeffrey Stedfast <fejj@ximian.com>
4182 * camel-url.c (camel_url_free): Allow the url to be NULL just like
4183 the libc free convention.
4185 2001-07-26 Dan Winship <danw@ximian.com>
4187 * providers/imap/camel-imap-command.c (camel_imap_command_start):
4188 Send an IMAP command, but don't wait for responses.
4189 (camel_imap_command_response): Read a single line of response from
4191 (camel_imap_command, etc): Reimplement in terms of the new code.
4193 * providers/imap/camel-imap-folder.c (imap_rescan): Use
4194 camel_imap_command_start and camel_imap_command_response, and
4195 call camel_operation_progress after each line read from the
4197 (imap_update_summary): Likewise, although with more fudging on the
4198 precentages... Also, fix this so that if none of the new messages
4199 are cached, it only does a single FETCH, and if some of them are
4200 cached, it does two FETCHes (one to get the UIDs, FLAGS, and
4201 SIZEs, and another to get the bodies of all of the messages that
4202 aren't cached now that it knows the relevant UIDs). This should
4203 speed up startup a bunch (especially if you have high bandwidth
4204 but also high latency to the IMAP server).
4206 2001-07-25 Dan Winship <danw@ximian.com>
4208 * camel-mime-utils.c (mail_mlist_magic): Add another Sender
4211 2001-07-24 Not Zed <NotZed@Ximian.com>
4213 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
4214 Change the break into a continue, we should process as many as we
4217 * camel-folder.c (camel_folder_move_messages_to): If we have no
4218 uid's to copy, exit here before going any further. Some code
4219 internally [imap] assumes there are uids to copy otherwise it can
4221 (camel_folder_copy_messages_to): Same.
4223 2001-07-24 Jeffrey Stedfast <fejj@ximian.com>
4225 * camel-mime-utils.c (header_decode_param): Handle broken mailers
4226 that send unencoded 8bit header params. And there was much
4229 * camel-url.h (CAMEL_URL_HIDE_ALL): New #define, and there was
4230 much rejoicing. Rah.
4232 2001-07-24 Not Zed <NotZed@Ximian.com>
4234 * camel-operation.c (camel_operation_register, unregister): Added
4235 some warnings for bad cases.
4237 2001-07-23 Not Zed <NotZed@Ximian.com>
4239 * camel-operation.c (camel_operation_register): Only insert a hash
4240 entry if we haven't already.
4241 (camel_operation_unregister): Only remove the has entry if the id
4244 2001-07-23 Jeffrey Stedfast <fejj@ximian.com>
4246 * camel-filter-driver.c (do_move): Slight fix for when source ==
4247 destination (we don't want to do this action because on-demand
4248 filtering would then delete the messages it supposedly "moved").
4250 2001-07-23 Not Zed <NotZed@Ximian.com>
4252 * providers/smtp/camel-smtp-transport.c (smtp_auth, smtp_helo,
4253 send_to): Added some operation progress reporting. Actual data
4254 transfer is 'tricky' because of the layers used.
4255 (smtp_auth): Instead of checking exception_is_set, use
4256 challenge==NULL to test if sasl_challenge_base64 failed.
4258 * providers/local/camel-mbox-summary.c (mbox_summary_sync): Remove
4259 peters changes below and put in a better fix. These functions
4260 already return -1 on error, just use that, and not worry about
4261 building our own exception redundantly.
4263 * camel-service.c (camel_get_host_byname): Turn the progress into
4266 2001-07-20 Peter Williams <peterw@ximian.com>
4268 * providers/local/camel-mbox-summary.c (mbox_summary_sync): More
4269 usage fixes for CamelException. Check our own exception for
4270 summary_update and xfer it out if an error occurred.
4272 2001-07-20 JP Rosevear <jpr@ximian.com>
4274 * Pull up test fixes to get them building again
4276 2001-07-20 Not Zed <NotZed@Ximian.com>
4278 * camel-charset-map.c (camel_charset_get_iconv_friendly_name):
4279 renamed to camel_charset_to_iconv() to make it just a little more
4280 consistent and not so long & fixed callers.
4282 2001-07-19 Jeffrey Stedfast <fejj@ximian.com>
4284 * camel-mime-filter-charset.c
4285 (camel_mime_filter_charset_new_convert): Convert to the
4286 iconv-friendly charset names.
4288 * providers/imap/camel-imap-store.c (create_folder): Fixed a
4289 compiler warning about returning without a value in a non-void
4292 * camel-mime-part.c (process_header): Pass the locale charset as
4293 the default_charset to header_decode_string().
4295 * camel-folder-summary.c (camel_folder_summary_format_string):
4296 Pass the locale charset as the default_charset to
4297 header_decode_string().
4298 (content_info_new): Same.
4300 * camel-mime-message.c (process_header): Pass the locale charset
4301 as the default_charset to header_decode_string().
4303 * camel-mime-utils.c (append_8bit): New helper function who's
4304 purpose is similar to append_latin1() but for 8bit text that we
4305 are assuming is not latin1.
4306 (header_decode_text): Now takes a default_charset parameter and
4307 calls append_8bit when appropriate.
4308 (header_decode_string): Also takes a default_charset parameter
4310 (header_decode_mailbox): Pass NULL as the default_charset to
4311 header_decode_string().
4313 2001-07-19 Jeffrey Stedfast <fejj@ximian.com>
4315 * camel-pgp-context.c (pgp_verify): Modified to treat the return
4316 value from camel_charset_locale_name() as a const char*.
4318 * camel-sasl-digest-md5.c (digest_response): Modified to treat the
4319 return value from camel_charset_locale_name() as a const char*.
4321 * camel-charset-map.c (camel_charset_locale_name): Modify to
4322 return const char* by returning the static locale_charset which is
4323 created inside of camel_charset_map_init().
4324 (camel_charset_map_init): Find the locale charset here and set the
4327 2001-07-19 Peter Williams <peterw@ximian.com>
4329 Policy change: NULL url's are no longer allowed in
4330 CamelFolderInfos. They used to signify that the folder was, in
4331 IMAP jargon, NoSelect; now the same effect is achieved by adding a
4332 "noselect=yes" parameter to the end of the URL. As far as I know,
4333 IMAP is the only affected provider.
4335 * providers/imap/camel-imap-store.c (delete_folder): New
4336 function. Implement folder deletion.
4337 (camel_imap_store_class_init): Set the delete_folder class
4339 (get_folder_status): New function. Utility wrapper around the
4341 (create_folder): If the parent folder is NoSelect but is empty,
4342 delete it and recreate it as a a subfolder-containing folder. If
4343 it is NoSelect but contains messages, set an exception.
4344 (parse_list_response_as_folder_info): Always set the FolderInfo's
4345 URL, but add a NoSelect parameter if it isn't selectable.
4346 (get_folder_info_online): Change logic of removing the namespace
4347 to reflect URL change. Same for logic of checking unread counts.
4348 (get_folder_info_online): Use get_folder_status to simplify this.
4350 * camel-store.c (camel_folder_info_build): When creating dummy
4351 parents, copy the child's URL and set the NoSelect parameter.
4353 2001-07-19 Jeffrey Stedfast <fejj@ximian.com>
4355 * camel-mime-part-utils.c
4356 (simple_data_wrapper_construct_from_parser): No need for
4358 (check_html_charset): Return a const char* and also use
4359 camel_charset_get_iconv_friendly_name() internally.
4361 * camel-mime-utils.c (rfc2047_decode_word): Remove my iso8859-1 ->
4362 iso-8859-1 hack and use camel_charset_get_iconv_friendly_name()
4364 (rfc2184_decode): Use camel_charset_get_iconv_friendly_name()
4366 * camel.c (camel_init): Call camel_charset_map_init().
4368 * camel-charset-map.c (camel_charset_map_init): New function to
4369 initialize the charset-equivalent lookup table. To be called by
4371 (camel_charset_get_iconv_friendly_name): New function to try and
4372 convert a charset into something that iconv is more likely to
4375 2001-07-19 Peter Williams <peterw@ximian.com>
4377 * Revert 7/11/2001 patch for IMAP INBOX filtering at NotZed's
4380 2001-07-17 Peter Williams <peterw@ximian.com>
4382 Clean up some exception misusage.
4384 * providers/imap/camel-imap-command.c (camel_imap_command): Use
4385 our own internal exception for sending the string and transfer it
4386 to @ex if anything goes wrong.
4387 (imap_read_response): Use our own internal exception for reading
4388 the untagged responses and blah blah blah.
4390 * camel-session.c (get_service): Use our own internal exception
4391 when constructing the service and transfer it to @ex if anything
4394 * camel-remote-store.c (remote_recv_line): Instead of having
4395 gboolean exception, use our own internal exception and copy
4396 it to @ex if anything goes wrong.
4398 * camel-store.c (store_sync): Create an internal exception
4399 because sync_folder() checks it for validity. Transfer it to
4402 * camel-exception.c (camel_exception_get_description): If @ex is
4403 NULL, complain - passing NULL exceptions to Camel is okay, but
4404 there should be no circumstances under which they're then
4406 (camel_exception_get_id): Same here,
4407 (camel_exception_xfer): NULL-protect and warn if transferring from
4410 2001-07-17 Jeffrey Stedfast <fejj@ximian.com>
4412 * camel-store.c (init_trash): Use CAMEL_VTRASH_NAME.
4414 * camel-vtrash-folder.h: #define CAMEL_VTRASH_NAME
4416 2001-07-16 Dan Winship <danw@ximian.com>
4418 * providers/imap/camel-imap-command.c (camel_imap_response_free):
4422 We have to pass 3, not 4 to camel_imap_folder_changed for the
4423 exists count. Fixes ximian bug #2112 (finally!).
4425 2001-07-14 Jeffrey Stedfast <fejj@ximian.com>
4427 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
4428 If the message info for an expunged message is NULL, then just
4429 break out - maybe a message was expunged that we were never
4430 notified even existed?
4432 2001-07-13 Jeffrey Stedfast <fejj@ximian.com>
4434 * camel-mime-utils.c (rfc2047_decode_word): Added a hack to
4435 convert charsets in the format iso8859-1 to iso-8859-1 because it
4436 seems to be more iconv friendly. It has been reported that on some
4437 systems, iconv doesn't know about iso8859-1 while it *does* know
4438 about iso-8859-1. See bug #4530.
4440 2001-07-13 Peter Williams <peterw@ximian.com>
4442 * Makefile.am (install-exec-local): Let people install as
4443 non-root, but give them a bigass warning so they're not allowed to
4444 complain when it doesn't work right.
4446 * camel-remote-store.c (sync_remote_folder): New function: hash
4448 (remote_disconnect): If cleanly disconnecting, sync our
4449 folders. Fixes deadlocks on exit (folders syncing after store
4450 disconnects) and also makes sense.
4452 2001-07-13 Jeffrey Stedfast <fejj@ximian.com>
4454 * camel-uid-cache.c (camel_uid_cache_new): We now use a structure
4455 as the bucket data rather than just a cache level so set the save
4457 (maybe_write_uid): We only save the uid if the cache levels are
4458 the same *and* if the save state is TRUE.
4459 (free_uid): Free the state value.
4460 (camel_uid_cache_get_new_uids): New uids that get added to the
4461 cache start with a save state of FALSE.
4462 (camel_uid_cache_save_uid): Set the save state of the uid to
4463 TRUE. What should we do if the uid isn't already in the cache?
4464 Currently I make it add the uid, but maybe it shouldn't?
4466 * providers/imap/camel-imap-folder.c (imap_filter_timeout): Update
4467 to reflect CamelFilterDriver API changes.
4469 * camel-filter-driver.c (camel_filter_driver_filter_folder): Take
4470 a cache argument so we can tell the cache whether or not the uid
4471 should be saved (meaning we have successfully filtered it).
4473 2001-07-12 Jeffrey Stedfast <fejj@ximian.com>
4475 * camel-filter-driver.c (camel_filter_driver_filter_message):
4476 Okay, I've decided that that user is just on crack. We don't want
4477 to allow filtering of deleted messages or we could get some
4478 unexpected behavior.
4479 (do_move): Oops. My last fix needs to be after the if-statement,
4481 (do_copy): And here too.
4483 2001-07-12 Jeffrey Stedfast <fejj@ximian.com>
4485 * camel-filter-driver.c (do_move): Only set p->copied and
4486 p->deleted if the messages are copied without an exception.
4487 (do_copy): Same - but obviously we don't set the p->deleted here
4489 (camel_filter_driver_filter_message): Since users complained that
4490 they couldn't filter deleted messages for "safe keeping" (WTF?
4491 safe keeping? why were they deleted in the first place then??), I
4492 have taken out the code that optimized filtering by not allowing
4493 deleted messages to be filtered. This fixes bug #4473.
4495 Note: Users have a warped sense of logic.
4497 2001-07-12 Not Zed <NotZed@Ximian.com>
4499 * camel-mime-part-utils.c (extract_metatag_charset): Removed.
4500 (check_html_charset): Replaced with this.
4501 (simple_data_wrapper_construct_from_parser): Call
4502 check_html_charset if we dont have a charset on the content-type,
4503 and we have text/html data.
4504 (check_html_charset): We also need to do qp/base64 decoding
4507 * camel-mime-utils.c (html_meta_param_list_decode): Removed. This
4508 was very wrong, the rules for mail headers vastly different from
4509 rules for decoding html elements.
4510 (rfc2184_decode): Move the malloc inside the iconv_open worked,
4511 otherwise we have a memleak.
4513 * camel-mime-filter-html.c (camel_mime_filter_html_finalize, init,
4514 run, reset): Changed to use camelhtmlparser, and fixed a tiny
4517 * camel-html-parser.c: Made the html indexer tokeniser re-usable.
4518 ONLY TO BE USED INTERNAL TO CAMEL HOWEVER.
4519 (tokenise_step): Slight fix to non-quoted values.
4521 * camel-folder-summary.c
4522 (camel_folder_summary_info_new_from_message): Removed some code i
4523 wasn't supposed to commit.
4525 * providers/local/camel-local-summary.c (local_summary_add): Only
4526 set info->size if it is not zero.
4527 (local_summary_add): If we dont get a size from the info passed
4528 in, calculate it using a null stream write. Should do #4392.
4530 2001-07-11 Jeffrey Stedfast <fejj@ximian.com>
4532 * camel-mime-part-utils.c (extract_metatag_charset): New function
4533 to extract a meta-tag charset value if it exists.
4534 (simple_data_wrapper_construct_from_parser): Along the same lines
4535 as the code I previously ripped out, but this time use the
4536 mime-parser's seek ability to help us along. Currently I read up
4537 to a 2k buffer size - this is probably overkill, 1k is probably
4540 * camel-mime-utils.c (html_meta_param_list_decode): When we get to
4541 an `=', we must skip past it before trying to grab the param
4544 2001-07-11 Jeffrey Stedfast <fejj@ximian.com>
4546 * camel-mime-part-utils.c
4547 (simple_data_wrapper_construct_from_parser): Ripped out my code
4548 since it was never being used since the mime parser is not using a
4549 seekable stream (ever?) which pretty much means my code needs to
4550 be done someplace else.
4552 2001-07-11 Peter Williams <peterw@ximian.com>
4554 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
4555 Run the filter in its own thread to prevent locking issues.
4556 (imap_filter_timeout): New function that does the filtering called
4557 as a CamelSession timeout.
4559 2001-07-11 Not Zed <NotZed@Ximian.com>
4561 * camel-filter-driver.c (camel_filter_driver_filter_mbox): Create
4562 the messageinfo itself, so we can properly set the size.
4564 * camel-movemail.c (camel_movemail_solaris): Write out the from
4565 line between each message.
4567 2001-07-10 Not Zed <NotZed@Ximian.com>
4569 * providers/local/camel-local-summary.c (local_summary_add): Copy
4570 the size across from the source message info if supplied.
4572 * camel-stream-null.c: Added a 'written' member which keeps track
4573 of how much has been written to the stream.
4575 * camel-movemail.c (camel_movemail): If we have BROKEN_SPOOL
4576 defined, then use the solaris movemail to quote from lines that
4578 (camel_movemail_solaris): Compile this in if BROKEN_SPOOL defined.
4580 2001-07-10 Jeffrey Stedfast <fejj@ximian.com>
4582 * camel-mime-utils.c (html_meta_param_list_decode): New function
4583 to parse an HTML meta-tag.
4585 * camel-mime-part-utils.c
4586 (simple_data_wrapper_construct_from_parser): If the Content-Type
4587 did not contain a charset parameter and it's also a text/html
4588 part, we have 1 last place to look - in the META html tags. *sigh*
4590 * camel-mime-message.c (camel_mime_message_get_source):
4591 s/gint/unsigned since that's what it should be.
4593 2001-07-09 Jeffrey Stedfast <fejj@ximian.com>
4595 * camel-pgp-context.c (pgp_sign): Forget the passphrase if the
4596 user has set that option.
4597 (pgp_clearsign): Same.
4598 (pgp_encrypt): And here...
4599 (pgp_decrypt): And finally here.
4600 (camel_pgp_context_new): Take a `remember' argument.
4602 2001-07-09 Not Zed <NotZed@Ximian.com>
4604 * providers/local/camel-maildir-summary.c (maildir_summary_sync):
4605 Oops, e_poolv_set free's it for us, so dont double-free here.
4607 2001-07-06 Not Zed <NotZed@Ximian.com>
4609 * camel-vee-folder.c (camel_vee_folder_finalise): Changed so we
4610 dont have the list changing under us, just going to the next node
4611 before we call a function that might change the list is
4612 potentially dangerous (slight mod of peters fix). Hmm, i think it
4613 would've double-unref'd it too(?)
4615 2001-07-08 Chris Toshok <toshok@ximian.com>
4617 * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_finalize):
4618 openssl_table is gone. we now store/get the stream from the
4620 (stream_read): rework the non-blocking case to account for SSL
4621 possibly buffering data (in which case select will block even
4622 though data is ready to be read), and to account for FreeBSD's
4623 strange behavior of returning -1/EAGAIN even though select said
4624 the fd was ready to be read.
4625 (ssl_verify): openssl_table is gone.
4626 (open_ssl_connection): set the SSL_CTX's app_data to be the
4627 stream, remove the openssl_table code.
4629 2001-07-06 Jeffrey Stedfast <fejj@ximian.com>
4631 * camel-mime-utils.c (header_encode_param): Don't allow in to be
4632 NULL, so instead of doing if (in == NULL) return;, make it a
4633 g_return_val_if_fail and later we can make it an assert or
4636 * providers/local/camel-maildir-store.c (get_inbox): Fixes bug
4639 * providers/local/camel-mbox-summary.c
4640 (camel_mbox_summary_build_from): Make the `day-of-month' digit
4641 take up 2 chars by using "%2d". Fixes bug #3989 for lame mailers
4644 * camel-pgp-context.c (crypto_exec_with_passwd): Set the pipe fd's
4647 2001-07-06 Peter Williams <peterw@ximian.com>
4649 * camel-object.c (camel_object_unref): Make sure that after the
4650 finalization event has happened and the finalization functions
4651 have been called that the object still has a zero refcount.
4653 2001-07-06 Joe Shaw <joe@ximian.com>
4655 * providers/nntp/camel-nntp-grouplist.c: Add locking to
4656 camel_nntp_get_grouplist_from_server().
4658 * providers/nntp/camel-nntp-resp-codes.h: Added
4659 NNTP_EXTENSIONS_SUPPORTED (202).
4661 * providers/nntp/camel-nntp-store.c (camel_nntp_store_get_extensions):
4662 Check for both NNTP_LIST_FOLLOWS and NNTP_EXTENSIONS_SUPPORTED from
4663 a LIST EXTENSIONS request. (Dunno if NNTP_LIST_FOLLOWS ever comes
4664 out of this, but that's what was already there...) Also, put some
4666 (finalize): e_mutex_destroy() the command lock
4667 (camel_nntp_store_init): e_mutex_new() the command lock.
4669 * providers/nntp/camel-nntp-store.h: Add locking macros.
4671 2001-07-05 Jeffrey Stedfast <fejj@ximian.com>
4673 * camel-folder-summary.c (camel_message_info_string): Added an
4674 assert to make sure that `mi' isn't NULL.
4675 (camel_message_info_set_string): Same.
4677 * providers/imap/camel-imap-command.c (camel_imap_response_free):
4678 Create and use a temporary CamelException for use with
4679 camel_imap_folder_changed.
4681 2001-07-05 Jeffrey Stedfast <fejj@ximian.com>
4683 * camel-pgp-context.c (pgp_verify): Send the
4684 --no-auto-key-retrieve argument to gpg if we are in offline mode
4685 so that we don't have to worry about gpg hanging if it can't
4686 connect to the key servers, because now it shouldn't even attempt
4689 2001-07-05 Chris Toshok <toshok@ximian.com>
4691 * camel-tcp-stream-openssl.c (ssl_verify): use
4692 X509_STORE_CTX_get_ex_data to get at the SSL* - don't use the
4693 X509_STORE_CTX to look up our stream, since it's not what we used
4694 to insert our stream into the hashtable.
4695 (open_ssl_connection): insert the stream into the hashtable before
4696 calling SSL_connect, as this can cause ssl_verify to be called,
4697 and we need to look up the stream there. remove the stream from
4698 the hashtable if there's an error connecting.
4699 (stream_connect): pass the CamelTcpStreamOpenSSL* to
4700 open_ssl_connection since it handles the hashtable stuff. remove
4701 hashtable stuff from here.
4703 2001-07-05 Jeffrey Stedfast <fejj@ximian.com>
4705 * camel-folder.c (camel_folder_copy_messages_to): if source ==
4708 2001-07-05 Peter Williams <peterw@ximian.com>
4710 * camel-vee-folder.c (camel_vee_folder_finalise): Move this before the
4711 camel_vee_folder_remove_folder because that function modifies p->folders
4712 messing up our iteration.
4713 (camel_vee_folder_finalise): Don't unref our summary; camel-folder now
4716 * camel-object.h (CamelObject): Add a 'destroying' flag to CamelObject.
4718 * camel-object.c (obj_init): Clear 'destroying'.
4719 (camel_object_unref): If 'destroying' then do not send the finalize
4720 event and do not call finalize functions. Otherwise, set destroying
4721 so just in case we get refed (eg event code) we don't get doubly
4724 2001-07-05 Not Zed <NotZed@Ximian.com>
4726 * camel-mime-filter-basic.c (filter): Fix the assertion slightly,
4727 if we have a little bit of input the output size could be larger,
4728 since we store upto 3 chars in the state.
4730 * camel-folder-summary.c
4731 (camel_folder_summary_info_new_from_message): When indexing a new
4732 record, create a pseudo word 'ibexindexed' so we can always tell
4733 that a message has already been idnexed, even if it contains no
4734 words of its own. Things like maildir use this check to see if
4735 its already been processed, and it matters if it is incorrect in
4736 this case (not just wasted cycles).
4737 (camel_message_info_dup_to): Assign the to->strings from the
4738 e_poolv_cpy() call, since it may allocaote a new poolv if the
4739 lengths do not match.
4741 (camel_folder_summary_info_new_from_parser): And same here.
4743 * providers/local/camel-maildir-summary.c (maildir_summary_sync):
4744 Changed the logicfor epoolv code to be different, we dont need to
4745 update hash references or any tricky stuff.
4746 (maildir_summary_check): Samehere.
4748 * camel-folder-summary.h: Removed include of e-memory.h.
4750 2001-07-03 Joe Shaw <joe@ximian.com>
4752 * providers/nntp/camel-nntp-resp-codes.h: Added NNTP_NO_PERMISSION
4753 (502) to the list of response codes.
4755 * providers/nntp/camel-nntp-store.c (nntp_store_connect): If we
4756 receive a NNTP_NO_PERMISSION, don't get into an infinite loop trying
4757 to reconnect, get extensions, etc. Just give up and return FALSE.
4759 2001-07-03 Dan Winship <danw@ximian.com>
4761 * providers/imap/camel-imap-message-cache.c
4762 (camel_imap_message_cache_clear): Doh. Don't remove things from
4763 the hash table while foreach'ing it. (And can't use foreach_remove
4764 either because we have to remove them in a weird order). Fixes
4767 * providers/imap/camel-imap-folder.c (imap_get_message): If the
4768 server returns OK from the FETCH BODY, but there's no parseable
4769 BODY response, it's probably because there's an UN-parseable BODY
4770 response, implying the message is badly formatted, MIMEwise. In
4771 that case, fall back to fetching the message as a single part.
4773 2001-07-02 Sam Creasey <sammy@oh.verio.com>
4775 * providers/nntp/camel-nntp-folder.c: Implemented
4776 nntp_folder_search_by_expression and
4777 nntp_folder_search_free. Basic search functionality e.g. unread
4778 marking now works for NNTP folders.
4780 * camel_filter_search.c (get_size): Added get-size sexp directive
4781 to get the size of a message for filters.
4783 * providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new):
4784 Always check with the NNTP server after summary load -- this
4785 function now always expires old summary entries and syncs with
4788 * providers/nntp/camel-nntp-utils.c (camel_nntp_get_headers):
4789 Only fetch headers for articles not already logged in
4792 * providers/nntp/camel-nntp-grouplist.c
4793 (camel_nntp_get_grouplist_from_*): change from g_list_append()
4794 to g_list_prepend() + g_list_reverse. Traversing 40,000
4795 element linked lists sucks.
4797 * providers/nntp/camel-nntp-store.c (camel_nntp_command):
4798 Should the NNTP connection die with
4799 CAMEL_EXCEPTION_SERVICE_NOT_CONNECTED, make a single retry
4800 attempt. Timing out the NNTP link is less painful this way.
4802 2001-07-02 Peter Williams <peterw@ximian.com>
4804 * README (Introduction): Add comment noting that Camel actually
4807 2001-07-02 Dan Winship <danw@ximian.com>
4809 * camel-session.c (camel_session_get_filter_driver): new method to
4810 get an application-initialized filter driver.
4812 * camel-filter-driver.c (camel_filter_driver_new): Remove the
4813 get_folder function and data args from here...
4814 (camel_filter_driver_set_folder_func): ...and add this function to
4817 * providers/imap/camel-imap-folder.c (camel_imap_folder_new): If
4818 this folder is INBOX and we're filtering INBOX, set a flag on the
4820 (imap_update_summary): Add another argument (GPtrArray *recents),
4821 and if it's non-NULL, add the uids of any \Recent new messages to
4823 (camel_imap_folder_changed): If doing filtering in this folder,
4824 create a recents array and pass it to imap_update_summary. Then
4825 get a filter driver and use it to filter the recent messages.
4827 * providers/imap/camel-imap-summary.h:
4828 * providers/imap/camel-imap-utils.c (imap_parse_flag_list): Add
4829 support for the \Recent flag.
4831 * providers/imap/camel-imap-provider.c (imap_conf_entries): enable
4832 the "filter" option.
4834 * camel-types.h: add CamelFilterDriver typedef here
4836 2001-07-02 Not Zed <NotZed@Ximian.com>
4838 * camel-lock-client.c (camel_lock_helper_init): properly return
4839 error if we can't create pipes.
4841 * camel-folder-summary.c (summary_build_content_info): re-enable
4844 * camel-mime-filter-html.c: Completely re-implemented using a
4847 2001-07-02 Dan Winship <danw@ximian.com>
4849 * tests/misc/url.c (main): Change a camel_exception_clear to
4850 camel_exception_init to fix a sometimes-crash
4852 2001-06-29 Jeffrey Stedfast <fejj@ximian.com>
4854 * camel-mime-utils.c: Added Originator: header as a header to look
4855 for when looking for the mailing list.
4857 * tests/mime-filter/Makefile.am: Build the test-crlf test program.
4859 * tests/mime-filter/test-crlf.c: New test suite for the crlf
4862 * camel-mime-filter-crlf.c (filter): Fixed to correctly encode and
4865 2001-06-28 Peter Williams <peterw@ximian.com>
4867 * camel-mime-filter-stripheader.c: New file. Filter that strips a
4868 header from mime output.
4870 * camel-mime-filter-stripheader.h: New file. Header for the above.
4872 * providers/smtp/camel-smtp-transport.c (smtp_data): Use the
4873 stripheader filter to remove the "Bcc" header.
4875 * Makefile.am: Add the stripheader files.
4877 * tests/lib/Makefile.am (INCLUDES): Get this to compile again.
4879 * tests/mime-filter/test-stripheader.c: New file. Test suite for
4880 the CamelMimeFilterStripHeader.
4882 * tests/mime-filter/Makefile.am: New test section: mime filters.
4884 2001-06-28 Jeffrey Stedfast <fejj@ximian.com>
4886 * camel-mime-utils.c (header_decode_param_list): Fix a memory
4887 leak. Also if the decoded value is NULL, that means it wasn't
4888 encoded so we don't want to toss the old value.
4889 (header_param_list_format_append): Correctly wrap long parameter
4890 values according to rfc2184.
4892 2001-06-28 Dan Winship <danw@ximian.com>
4894 * providers/imap/camel-imap-folder.c (imap_refresh_info): If the
4895 folder is frozen, don't refresh, just record that we need to do it
4897 (imap_append_online): If the APPEND doesn't trigger an immediate
4898 EXISTS response (because the folder isn't the selected folder, or
4899 because the server doesn't do that until the next command), call
4900 imap_refresh_info on the folder.
4901 (imap_copy_online): Likewise. (Replacing the unconditional NOOP
4902 that was there before, which absolutely killed filter performance
4903 by forcing the IMAP provider to switch back and forth between
4904 folders after every copy or move.)
4905 (imap_thaw): If the folder needs a refresh, do it.
4907 * camel-folder.c (camel_folder_is_frozen): New method
4909 2001-06-27 Jeffrey Stedfast <fejj@ximian.com>
4911 * camel-transport.c (camel_transport_init): Initialize the private
4913 (camel_transport_finalize): Free the private send_lock.
4914 (camel_transport_get_type): Set the init and finalize functions.
4915 (camel_transport_send): Lock the transport.
4916 (camel_transport_send_to): Same.
4918 * camel-private.h: Add CAMEL_TRANSPORT_(UN)LOCK macros.
4920 2001-06-27 Jeffrey Stedfast <fejj@ximian.com>
4922 * tests/folder/test9.c (main): Updated to match the current API.
4924 * tests/folder/test3.c: #include <gtk/gtk.h> since we use
4927 * camel-internet-address.c
4928 (camel_internet_address_encode_address): Use the new
4929 header_address_fold.
4931 * camel-mime-utils.c: Removed some old #if 0'd code of mine.
4932 (rfc2047_encode_word): If enclen is 0, don't write an encoded word
4933 token (=?iso-8859-7?Q??= would be an invalid token).
4934 (header_address_fold): New function to wrap address headers -
4935 header_fold() was force-wrapping rfc2047 encoded words which was
4936 making the test suite fail. The *real* solution, however, is to
4937 not create rfc2047 encoded words longer than 72 chars.
4939 2001-06-26 Jeffrey Stedfast <fejj@ximian.com>
4941 * camel-filter-driver.c (open_folder): Since we want an error
4942 opening a folder to result in the message being copied to Inbox
4943 (assuming no other filters get a chance to `move` it), don't
4944 record any exceptions that may occur in this function.
4946 2001-06-26 Dan Winship <danw@ximian.com>
4948 * providers/imap/camel-imap-folder.c (camel_imap_folder_selected,
4949 imap_append_offline, imap_append_online,
4950 camel_imap_folder_changed): lock the cache around accesses
4952 * providers/imap/camel-imap-store.c (get_folder_online): ref the
4953 newly-created folder (as current_folder) before calling
4954 camel_imap_folder_selected, in case that needs to do something
4955 that causes another folder to become current...
4957 * camel-service.c (camel_service_get_url): D'oh.
4958 s/FALSE/CAMEL_URL_HIDE_PASSWORD/
4960 2001-06-25 Jeffrey Stedfast <fejj@ximian.com>
4962 * camel-filter-search.c (get_source): g_strdup() the message
4963 source here or we will have problems later when we go to free the
4966 2001-06-25 Dan Winship <danw@ximian.com>
4968 * providers/imap/camel-imap-store.c (try_auth): Fix this: IMAP
4969 doesn't allow an extra argument to AUTHENTICATE to avoid a useless
4970 round trip like some other SASL bindings do.
4972 * providers/imap/camel-imap-command.c (imap_read_response): Deal
4973 with IMAP servers that (incorrectly) return "+\r\n" rather than
4974 "+ \r\n" for an empty continuation response.
4975 (camel_imap_response_extract_continuation): Likewise.
4977 2001-06-21 Jeffrey Stedfast <fejj@ximian.com>
4979 * camel-mime-utils.c (word_types_compatable): New function that
4980 decides if 2 word types are mergeable. An atom and a qstring are
4981 mergeable; 2 qstrings are mergeable; and 2 encoded words are
4983 (header_encode_phrase_merge_words): If 2 words are merged, the new
4984 word type is the MAX of the combined types. This means that if we
4985 merge a qstring and an atom, the resulting word type is a
4988 * camel-internet-address.c (internet_format):
4989 s/g_string_sprintfa/g_string_append since this makes more sense in
4990 this particular case.
4991 (internet_encode): Same here.
4993 2001-06-21 Jeffrey Stedfast <fejj@ximian.com>
4995 * providers/smtp/camel-smtp-transport.c (smtp_send): Use
4996 camel_address_length() rather than casting and accessing data
4999 2001-06-20 Jeffrey Stedfast <fejj@ximian.com>
5001 * camel-mime-utils.c (header_raw_check_mailing_list): If the first
5002 char of the mailing-list name is '<', chop it off to make Ettore
5003 happy. Fixes bug #2153.
5005 2001-06-19 Not Zed <NotZed@Ximian.com>
5007 * camel-lock-helper.c (unlock_id): Fixed a bug when not running
5008 setuid it wouldn't unlock.
5010 * camel-movemail.c (camel_movemail): use new
5011 locking daemon, also return an error code.
5013 2001-06-18 Jeffrey Stedfast <fejj@ximian.com>
5015 Note: Except for the info_free(), the NULL checks are
5016 g_return's. I felt that since g_free() handles NULL that our
5017 _free() functions should also.
5019 * camel-folder.c (camel_folder_change_info_free): Check to make
5020 sure that the info pointer isn't NULL.
5021 (camel_folder_change_info_change_uid): Same.
5022 (camel_folder_change_info_changed): Same.
5023 (camel_folder_change_info_remove_uid): Same.
5024 (camel_folder_change_info_add_uid): Same.
5025 (camel_folder_change_info_build_diff): Same.
5026 (camel_folder_change_info_cat): Same.
5027 (camel_folder_change_info_add_source): Same.
5028 (camel_folder_change_info_add_source_list): Same.
5029 (camel_folder_change_info_add_update): Same.
5030 (camel_folder_change_info_add_update_list): Same.
5032 2001-06-18 Dan Winship <danw@ximian.com>
5034 * tests/stream/Makefile.am (LDADD):
5035 * tests/smime/Makefile.am (LDADD):
5036 * tests/misc/Makefile.am (LDADD):
5037 * tests/message/Makefile.am (LDADD):
5038 * tests/folder/Makefile.am (LDADD): Remove DB3_LDADD
5040 * Makefile.am (install-exec-local): Set camel-lock-help setgid or
5043 2001-06-18 Not Zed <NotZed@Ximian.com>
5045 * camel-folder-summary.c
5046 (camel_folder_summary_info_new_from_parser): Only create a missing
5047 uid if we have indexing turned on.
5049 * camel-lock-helper.c (setup_process): Function to setup
5050 process/sanity/security checks. Change to the real uid as soon as
5052 (lock_path): First try to lock as the real uid, if that fails, try
5054 (unlock_id): Unlock as the uid we created the lock as.
5056 * Makefile.am (INCLUDES): Added -DCAMEL_SBINDIR for lock helper
5059 * providers/local/camel-spool-folder.c (spool_lock): Implemented,
5060 using lock helper locking. Need to work out if the locking
5061 requires a root created lock?
5062 (spool_unlock): Likewise.
5064 2001-06-15 Not Zed <NotZed@Ximian.com>
5066 * camel-lock-helper.c: Setuid Lock helper process. Creates and manages
5067 .locks, keeping them active, removing them, etc. What real perms it
5068 needs is a little system dependent.
5070 2001-06-14 Not Zed <NotZed@Ximian.com>
5072 * providers/local/camel-maildir-store.c (get_folder_info): Implement.
5073 (scan_dir): Does the work of scanning for maildir directories.
5075 2001-06-13 Not Zed <NotZed@Ximian.com>
5077 * providers/local/camel-spool-store.c (get_folder_info):
5078 Implemented, just returns a hardcoded INBOX folder.
5079 (free_folder_info): implemented, free's the 1 possible level of
5082 * providers/local/camel-spool-folder.c
5083 (camel_spool_folder_construct): Set the real unread message
5084 count on the folder_created thing.
5086 2001-06-15 Dan Winship <danw@ximian.com>
5088 * providers/imap/camel-imap-message-cache.c
5089 (camel_imap_message_cache_max_uid): Return the largest real UID in
5090 the cache (as an integer). Eventually to be used for an
5091 optimization in the new-message fetch code.
5092 (cache_put): Keep track of max_uid.
5094 2001-06-14 Jeffrey Stedfast <fejj@ximian.com>
5096 * camel-mime-utils.c: Added Mailing-List header regex so that we
5097 can do mlist magic on that header.
5099 2001-05-28 Jeffrey Stedfast <fejj@ximian.com>
5101 * camel-mime-utils.c (header_decode_param): Properly handle
5102 correct and incorrect (for the common case, ie Outlook and
5103 Netscape/Mozilla) rfc2184 values.
5104 (header_decode_rfc2184_param): Get the param name and see if we
5105 should expect a rfc2184 parameter value.
5106 (rfc2184_decode): Decode a rfc2184 value.
5107 (hex_decode): hex decode a string.
5108 (header_decode_param_list): Handle rfc2184 encoded parameters (ie
5109 parameters that have been split and perhaps encoded).
5110 (header_param_list_format_append): Encode the value before seeing
5111 if it will fit on the line. If the value does get encoded, be sure
5112 to put a '*' before the equal-sign.
5113 (header_encode_param): New function to rfc2184 encode a parameter
5114 value (maybe it should be renamed?)
5116 2001-06-14 Jeffrey Stedfast <fejj@ximian.com>
5118 * camel-mime-part.c (init_header_name_table): Don't try to format
5119 the Reply-To header - we don't want to wrap the reply-to address.
5121 2001-06-12 Not Zed <NotZed@Ximian.com>
5123 * providers/local/camel-spool-*.[ch]: A new provider, for spool
5124 mailboxes. Mostly a cut and paste of the mbox code, but not a
5125 subclass CamelLocal*. Not tested a lot, doesn't lock yet, use
5126 with extreme caution.
5128 * tests/lib/folders.c (test_folder_message_ops): Added spool arg,
5129 spool folders can't be deleted, renamed, etc.
5130 (test_folder_basic): Same.
5132 * tests/folder/test2.c (main): Added checks for spool type.
5134 * tests/[message|stream|folder|misc|smime]/Makefile.am (LDADD):
5135 Added db3 flags, so make check compiles, doesn't run though.
5137 2001-05-24 Not Zed <NotZed@Ximian.com>
5139 * providers/local/camel-local-provider.c
5140 (camel_provider_module_init): Added spool provider.
5142 2001-06-07 Jon Trowbridge <trow@ximian.com>
5144 * camel-filter-driver.c (camel_filter_driver_filter_folder): Add a
5145 separator between the service url and the folder name, if needed.
5147 * camel-filter-driver.c (camel_filter_driver_filter_mbox): Added
5148 an argument, so that the original source URI of the mbox can be
5149 passed in. This is needed because this function is called
5150 post-movemail, so we are never reading from the original mbox
5151 anymore. Without the original mbox URI, the X-Evolution-Source
5152 tag gets set incorrectly and filter-on-source will fail to work.
5153 (camel_filter_driver_filter_message): Also take an extra arg
5154 for the original source URI. It is the original URI, not the
5155 source URI, that is used for filtering and for setting the
5156 X-Evolution-Source tag.
5158 2001-06-05 Dan Winship <danw@ximian.com>
5160 * providers/imap/camel-imap-folder.c (imap_rescan): Don't fetch
5161 the UID and FLAGS of messages we don't know about yet, since
5162 they'll just get discarded.
5164 2001-06-01 Jeffrey Stedfast <fejj@ximian.com>
5166 * tests/smime/pgp.c: Fix to not get into a recursive loop in
5169 * tests/smime/pgp-mime.c: Same.
5171 2001-05-31 Jeffrey Stedfast <fejj@ximian.com>
5173 * camel-smime-context.c: Numerous fixes to get it to compile.
5175 * camel.h: Added camel-cipher-context.h, camel-cms-context.h,
5176 camel-smime-context.h, and camel-smime-utils.h
5178 * camel-cms-context.[c,h]: New virtual class for manipulating
5179 cryptographic message syntax messages (like S/MIME).
5181 * camel-smime-context.[c,h]: Modified to inherit from the
5182 CamelCMSContext class rather than the CamelCipherContext class.
5184 * camel-smime.[c,h]: Removed - just use camel-smime-context
5187 * camel-smime-utils.[c,h]: New source files. Moved the 2 useful
5188 functions from camel-smime.[c,h] into here.
5190 2001-05-30 Dan Winship <danw@ximian.com>
5192 * camel-charset-map.c: Redo the BUILD_MAP code to not depend on
5193 libunicode. Now it only generates a map of "popular" 8bit
5194 encodings. (It's not worthwhile to support obscure encodings,
5195 because any mailer that supports them will support UTF8 too. And
5196 Chinese and Japanese use mostly the same UTF8 characters so you
5197 need to decide between those encodings based on the locale or
5198 the charset of the message you're replying to or the input
5199 method you used. So this is sufficient for camel_charset_best's
5202 * camel-charset-map-private.h: Regenerated.
5204 * camel.c (camel_shutdown): Move #ifdefs around to prevent a
5207 2001-05-29 Dan Winship <danw@ximian.com>
5209 * camel-disco-diary.c: Code for logging and replaying offline
5212 * camel-disco-store.c (disco_construct): Set disco->status here
5213 (where we can base it on the session's offline status) rather than
5215 (disco_connect): If we connect online and have a non-empty diary,
5216 switch to RESYNCING mode and replay the diary to the server.
5217 (disco_get_folder, disco_get_folder_info): Add _resyncing
5220 * camel-disco-folder.c (disco_sync, disco_expunge_uids,
5221 disco_append_message, disco_copy_messages_to,
5222 disco_move_messages_to): Add _resyncing variants to switches.
5223 (disco_expunge_uids, disco_append_message, disco_copy_messages_to,
5224 disco_move_messages_to): Remove #ifdef'ed out diary code: let the
5226 (disco_append_message): Redo the append methods to no longer
5227 return the UID, since we're no longer doing the logging from here.
5229 * providers/imap/camel-imap-store.c (imap_connect_online,
5230 imap_connect_offline): Create a CamelDiscoDiary.
5231 (imap_disconnect_offline): And free it.
5233 * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
5234 If RESYNCING, don't do any sort of checking that the remote folder
5235 matches the summary, beyond making sure that the UIDVALIDITY is
5237 (imap_rescan): Add a missing camel_folder_summary_info_free when
5238 removing a UID from the summary.
5239 (imap_expunge_uids_offline): Implement. Fairly simple.
5240 (imap_expunge_uids_resyncing): Implement. If the store supports
5241 UIDPLUS, we can just use imap_expunge_uids_online. If not, we need
5242 to temporarily undelete any messages marked deleted on the server
5243 that aren't supposed to get expunged.
5244 (imap_append_offline): Implement, using cache and summary
5245 operations, and triggering the folder_changed event by hand.
5246 (imap_append_resyncing): Implement. Redo imap_append_online a bit
5247 in the process to make them able to share more code.
5248 (imap_copy_offline): Implement.
5249 (imap_copy_online): Move parts of this out into a helper.
5250 (imap_copy_resyncing): Implement. In most cases this is just like
5251 imap_copy_online, but if you are copying a message that was itself
5252 copied or appended into the folder, and the server doesn't do
5253 UIDPLUS, it will be necessary to replace at least part of the copy
5254 operation with one or more appends.
5256 * providers/imap/camel-imap-command.c (imap_read_response): Don't
5257 record the current folder in the response when in RESYNCING mode.
5258 (This means that EXISTS and EXPUNGE responses won't be processed,
5259 which is needed because the summary may not match the folder at
5261 (imap_read_response): On error, call
5262 camel_imap_response_free_without_processing, not
5263 camel_imap_response_free.
5265 * providers/imap/camel-imap-utils.c (imap_uid_array_to_set): Make
5266 this work better when operating on UIDs that aren't in the summary.
5268 * providers/imap/camel-imap-summary.c
5269 (camel_imap_summary_add_offline): New routine used by
5270 imap_append_offline and imap_copy_offline to create new summary
5273 2001-05-28 Jeffrey Stedfast <fejj@ximian.com>
5275 * camel-mime-utils.c (header_set_param): Use g_strcasecmp()
5276 because some systems don't have strcasecmp(). Also, when removing
5277 a param, make sure to free the param->name too.
5279 2001-05-27 Dan Winship <danw@ximian.com>
5281 * tests/lib/messages.c (test_message_read_file): Fix an fd leak
5283 * tests/lib/session.c, tests/lib/session.h: a CamelSession
5284 subclass for the test programs.
5286 * tests/lib/Makefile.am: include session.[ch]
5288 * tests/folder/test*.c: Use a CamelTestSession from libcameltest
5289 instead of cut+pasting everywhere.
5291 * tests/misc/url.c (main): Update for a camel_url_new change at
5294 * tests/*/.cvsignore: Add stuff.
5296 * camel-mime-utils.c (rfc2047_encode_word): Fix a silly ==/!=
5299 2001-05-26 Dan Winship <danw@ximian.com>
5301 * providers/imap/camel-imap-folder.c: Add a "need_rescan" flag
5302 saying if we want to rescan the entire folder for flag changes
5303 next time it's selected.
5304 (camel_imap_folder_init): Set need_rescan TRUE.
5305 (camel_imap_folder_selected): If need_rescan is TRUE, call
5307 (imap_refresh_info): Only do a full rescan if need_rescan is TRUE.
5308 Otherwise just do a NOOP, making this a MUCH more lightweight
5309 operation. Also, don't call imap_rescan directly if the folder
5310 isn't selected, since that could end up causing the folder to be
5311 scanned *twice* (imap_rescan -> camel_imap_command ->
5312 camel_imap_folder_selected -> imap_rescan).
5313 (imap_rescan): Set need_rescan FALSE.
5314 (imap_sync_online): Don't NOOP if no changes were pushed: the
5315 caller will call refresh_info if it wants to poll for changes.
5316 Fixes evolution-mail doing lots of unnecessary extra work at
5319 * providers/imap/camel-imap-store.c (refresh_folder_info): Set
5320 need_rescan on each folder before calling refresh_info.
5322 2001-05-25 Jeffrey Stedfast <fejj@ximian.com>
5324 * providers/smtp/camel-smtp-transport.c (smtp_auth): Oops. Use a
5325 strNcmp to make sure the response begins with a 334 code, not a
5328 * providers/local/camel-maildir-folder.c (maildir_append_message):
5329 remove the summary info so we are not out-of-sync with the maildir
5332 * providers/local/camel-mh-folder.c (mh_append_message): remove
5333 the summary info so we are not out-of-sync with the mh folder.
5335 * providers/local/camel-mbox-folder.c (mbox_append_message):
5336 remove the summary info so we are not out-of-sync with the mbox.
5338 2001-05-24 Jeffrey Stedfast <fejj@ximian.com>
5340 * camel-smime-context.c (camel_smime_context_new): Oops, I spelled
5341 the get-default-db function name wrong.
5343 2001-05-23 Jeffrey Stedfast <fejj@ximian.com>
5345 * providers/local/camel-local-folder.c
5346 (camel_local_folder_construct): s/folder_deleted/folder_created -
5347 result of a bad copy/paste.
5349 * providers/imap/camel-imap-search.c (imap_body_contains):
5350 Optimize the match "" case.
5352 2001-05-21 Jeffrey Stedfast <fejj@ximian.com>
5354 * providers/imap/camel-imap-store.c (get_folder_info_online):
5355 Store the CamelFolderInfo tree that was returned from
5356 camel_folder_info_build() in a new variable, 'tree', rather than
5357 'fi' since we later use 'fi' when syncing folders. Not only does
5358 this fix a memory leak, but it also fixes the bug where the user
5359 would only see the last folder in the folder list and/or it's
5362 2001-05-16 Jeffrey Stedfast <fejj@ximian.com>
5364 * camel-session.c (camel_session_forget_password): The service can
5365 be NULL here too, thanks to Wayne Davis for pointing this out.
5367 * camel-smime-context.c (camel_smime_context_new): We don't need
5368 to be passed the certdb path anymore.
5370 2001-05-16 Dan Winship <danw@ximian.com>
5372 * camel-medium.c (camel_medium_get_headers): New function to
5373 return an array of all headers.
5374 (camel_medium_free_headers): And free them.
5376 * camel-mime-part.c (get_headers, free_headers): Implement this
5377 for CamelMimePart. (Works for CamelMimeMessage too.)
5379 2001-05-15 Jeffrey Stedfast <fejj@ximian.com>
5381 * camel-smime-context.c (camel_smime_context_finalise): Don't
5382 close or free (it wasn't allocated) the certdb.
5383 (camel_smime_context_new): If we get a NULL certdb handle, then
5384 don't bother trying to create a new certdb handle since NSS_Init*
5385 should have done that.
5387 2001-05-15 Jeffrey Stedfast <fejj@ximian.com>
5389 * Makefile.am: Don't use EXTRA_GNOME_*, use the new CAMEL_*
5390 variables so we don't link in tons of extra cruft that we don't
5393 * tests/smime/pkcs7.c: Added to the test suite - tests the S/MIME
5396 2001-05-14 Jeffrey Stedfast <fejj@ximian.com>
5398 * camel-smime-context.c: Lots of fixes to get this to compile.
5400 * camel-smime.c (camel_smime_part_verify): Updated to pass in a
5401 hash argument to camel_smime_verify().
5403 * camel-pgp-mime.c (camel_pgp_mime_part_verify): Update according
5404 to the changes in the context API.
5406 * camel-pgp-context.c (pgp_verify): Updated to take a
5407 CamelCipherHash argument.
5409 * camel-cipher-context.c (camel_cipher_verify): Now takes a hash
5410 argument since the S/MIME code needs this.
5412 * Makefile.am: Add camel-smime-context.[c,h] and camel-smime.[c,h]
5415 * camel-smime.[c,h]: New source files for manipulating S/MIME
5418 2001-05-14 Jon Trowbridge <trow@ximian.com>
5420 * camel-search-private.c (utf8_get): Replicate the semantics of
5421 the libunicode utf8 functions by returning NULL in the arg
5424 * camel-pgp-context.c (pgp_verify): Check for valid utf8,
5425 terminate loop if something looks wrong.
5427 * camel-mime-utils.c (header_encode_phrase_get_words): Properly
5428 check for invalid utf8.
5429 (header_encode_string): Properly check for invalid utf8.
5431 * camel-charset-map.c (camel_charset_step): Properly check for
5434 2001-05-14 Jeffrey Stedfast <fejj@ximian.com>
5436 * tests/folder/test9.c:
5437 * tests/folder/test8.c:
5438 * tests/folder/test7.c:
5439 * tests/folder/test6.c:
5440 * tests/folder/test5.c:
5441 * tests/folder/test4.c:
5442 * tests/folder/test3.c:
5443 * tests/folder/test2.c:
5444 * tests/folder/test1.c:
5445 * tests/smime/pgp-mime.c:
5446 * tests/smime/pgp.c: Subclass CamelSession since we can no longer
5447 specify the passwd callback any other way and update code
5450 2001-05-11 Dan Winship <danw@ximian.com>
5452 * camel-mime-utils.c (header_location_decode): Decode
5453 Content-Location, either correctly or Netscape-generated-brokenly.
5455 * camel-mime-part.c (camel_mime_part_set_content_location,
5456 camel_mime_part_get_content_location, etc): Deal with
5457 Content-Location header.
5459 2001-05-11 Jeffrey Stedfast <fejj@ximian.com>
5461 * providers/smtp/camel-smtp-transport.c (smtp_auth): Don't check
5462 the initial auth response until we get into the while-loop
5463 otherwise we have problems if the SASL mechanism supported a
5464 client initiated challenge (like PLAIN and LOGIN do).
5466 2001-05-11 Dan Winship <danw@ximian.com>
5468 * camel-stream-null.c (camel_stream_null_new): Make this return
5469 CamelStream * (like the other stream new functions) instead of
5472 2001-05-10 Chris Toshok <toshok@ximian.com>
5474 * camel-tcp-stream-ssl.c (stream_connect): call SSL_Enable after
5475 the SSL_ImportFD and before PR_Connect. Otherwise, NSS aborts
5478 2001-05-10 Jeffrey Stedfast <fejj@ximian.com>
5480 * camel-session.c (camel_session_get_password): Don't abort if the
5481 Service is NULL, this is perfectly valid for cipher contexts.
5483 2001-05-09 Peter Williams <peterw@ximian.com>
5485 * providers/imap/camel-imap-folder.c (imap_move_messages_to): Pass
5486 appropriate parameters to CF_CLASS and add comment explaining why
5487 my initial attempt at a solution didn't work.
5489 2001-05-09 Dan Winship <danw@ximian.com>
5491 * camel-disco-store.c (camel_disco_set_status): Set the
5492 disconnected status.
5493 (camel_disco_store_can_work_offline): Return whether or not a
5494 given CamelDiscoStore can work offline or not.
5496 * camel-disco-folder.c (camel_disco_folder_cache_message):
5497 Explicitly tell a folder to cache a message. (Better than using
5498 get_message, because for IMAP that doesn't guarantee you'll get
5499 all the message parts.)
5500 (camel_disco_folder_prepare_for_offline): Prepare a folder for
5501 offline use by caching all messages meeting given search criteria
5502 (and doing anything else the particular folder implementation
5505 * camel-session.c (camel_session_set_online,
5506 camel_session_is_online): A session-wide online/offline toggle.
5507 (camel_session_init): Set online to TRUE.
5509 * providers/imap/camel-imap-store.c (can_work_offline):
5510 Implementation of CamelDiscoStore::can_work_offline. (Checks that
5511 the store has been used online at least once.)
5512 (imap_get_folder_online, imap_get_folder_offline): Deal with
5513 request for "inbox" properly. ("Don't you mean... 'INBOX'?").
5515 * providers/imap/camel-imap-folder.c (imap_cache_message):
5516 Implementation of CamelDiscoFolder::cache_message.
5518 * camel.h: Add camel-disco-store.h and camel-disco-folder.h
5520 2001-05-09 Jeffrey Stedfast <fejj@ximian.com>
5522 * camel-mime-part.c (camel_mime_part_set_content_id): Wrap the
5523 content-id with <>'s.
5525 2001-05-04 Jeffrey Stedfast <fejj@ximian.com>
5527 * providers/smtp/camel-smtp-transport.c (connect_to_server): Add
5528 support for using OpenSSL.
5530 * camel-remote-store.c (remote_connect): Add support for using the
5531 OpenSSL implementation.
5533 * camel-tcp-stream-ssl.c (ssl_bad_cert): Hmmmm, don't pass in a
5534 NULL as the last argument to alert_user - prototype doesn't take
5535 that argument anymore?
5537 * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_finalize):
5538 (ssl_verify): Use a global hash table to try and lookup the
5539 CamelTcpStreamOpenSSL object given the ssl context since OpenSSL
5540 doesn't think one needs to pass data around, we should all be
5541 living in a world of global variables, duh!
5543 2001-05-06 Dan Winship <danw@ximian.com>
5545 * Makefile.am (libcamelinclude_HEADERS): Fix another build
5546 problem. (Um, anyone else could have done this...)
5548 2001-05-04 Dan Winship <danw@ximian.com>
5550 * providers/imap/camel-imap-store.c (get_folder_online): Fix up
5551 refcounting on current_folder.
5553 * camel-disco-folder.c, camel-disco-store.h: Remove
5554 CamelDiscoDiary refs that weren't supposed to escape yet.
5556 2001-05-03 Dan Winship <danw@ximian.com>
5558 * camel-disco-store.c: new abstract class for disconnectable
5561 * camel-disco-folder.c: new abstract class for folders on
5562 disconnectable stores.
5564 * Makefile.am: Add camel-disco-folder.[ch] and
5565 camel-disco-store.[ch].
5567 * providers/imap/camel-imap-store.c: Make this a subclass of
5568 CamelDiscoStore, and fix up the offline interfaces for the changes
5569 since they were first written (particularly the fact that some
5570 IMAP stores don't just use subscribed folders).
5572 * providers/imap/camel-imap-folder.c: Make this a subclass of
5573 CamelDiscoFolder, although most ops still fail in disconnected
5576 * camel-store.c (camel_store_get_folder_info): Change gboolean,
5577 gboolean, gboolean to guint32 in the prototype for this function.
5579 * providers/local/camel-local-store.c (get_folder_info): Update
5580 for prototype change.
5582 2001-05-02 Dan Winship <danw@ximian.com>
5584 * providers/imap/camel-imap-store.h: Clean this up a bit. Add a
5585 "tag_prefix" member. Move "useful_lsub" into capabilities.
5587 * providers/imap/camel-imap-store.c (camel_imap_store_init):
5588 Initialize the tag_prefix, based on a static variable.
5590 * providers/imap/camel-imap-command.c (camel_imap_command): Use
5591 the store's tag_prefix character rather than "A" at the start of
5592 the tag. Makes the verbose debug output easier to parse when
5593 connected to multiple IMAP servers. (Well, unless you're connected
5594 to more than 26 servers...)
5596 * providers/imap/camel-imap-utils.c (imap_uid_array_to_set): Fix
5597 this up... it was losing count in some cases and giving a more
5598 verbose answer than it needed to.
5600 * providers/pop3/camel-pop3-store.c: Rescue the KPOP code from bit
5603 2001-05-01 Dan Winship <danw@ximian.com>
5605 * providers/imap/camel-imap-command.c (camel_imap_command): Redo
5606 command locking. Since command_lock is recursive, we can just get
5607 a lock here, and release it either on error, or when the caller
5608 frees the response data. (This simplifies a lot of stuff, and
5609 fixes some problems with camel_imap_folder_changed being called
5610 without the command_lock locked because of the 2001-03-22 change.)
5612 (camel_imap_response_free):
5613 (camel_imap_response_free_without_processing):
5614 (camel_imap_response_extract):
5615 (camel_imap_response_extract_continuation): These all take a
5616 CamelImapStore now as well, to deal with locking.
5618 * providers/imap/camel-imap-private.h: Add
5619 CAMEL_IMAP_STORE_ASSERT_LOCKED, which defaults to a noop, but can
5620 be made to call e_mutex_assert_locked.
5622 * providers/imap/camel-imap-folder.c, camel-imap-search.c,
5623 camel-imap-store.c: Simplify using new locking stuff. Add a few
5624 CAMEL_IMAP_STORE_ASSERT_LOCKED checks.
5626 2001-05-01 Dan Winship <danw@ximian.com>
5628 Support the IMAP UIDPLUS extension (RFC 2359), which lets you
5629 resync after disconnected operation more efficiently, but also
5630 makes it possible to do appends and moves/copies more efficiently
5633 * providers/imap/camel-imap-folder.c (imap_append_message): If the
5634 server supports UIDPLUS, grab the APPENDUID response and cache the
5635 message into the folder's message cache.
5636 (imap_copy_messages_to): Likewise, for COPYUID, copy any message
5637 parts we have cached between the source and destination folder
5639 (imap_get_message): If the entire message is already in the cache,
5640 just return that rather than building it from parts.
5641 (imap_update_summary): Fetch just the "UID FLAGS RFC822.SIZE" of
5642 the new messages first, then only fetch the headers for messages
5643 where we don't already have the headers cached.
5645 * providers/imap/camel-imap-message-cache.c: Add gtk-doc comments.
5646 (cache_put): Fix refcounting stuff here.
5647 (camel_imap_message_cache_insert_stream,
5648 camel_imap_message_cache_insert_wrapper): New.
5649 (camel_imap_message_cache_get): Fix a bug here so the memory
5650 caching actually works.
5651 (camel_imap_message_cache_copy): New routine, used by
5652 imap_copy_messages_to.
5654 * providers/imap/camel-imap-utils.c (imap_uid_set_to_array):
5655 Inverse operation of imap_uid_array_to_set. Used to parse COPYUID
5658 2001-04-30 Dan Winship <danw@ximian.com>
5660 * providers/imap/camel-imap-utils.c (imap_uid_array_to_set):
5661 New-and-improved version of get_uid_set() from
5662 camel-imap-folder.c. Looks at the summary as it goes so that if
5663 you ask for messages 5, 6, 8, and 9, and there is no message 7,
5664 then you get "5:9" instead of "5:6,8:9"
5666 * providers/imap/camel-imap-folder.c (imap_copy_messages_to): Use
5667 imap_uid_array_to_set() rather than get_uid_set().
5670 2001-04-27 Dan Winship <danw@ximian.com>
5672 * camel-session.c: Redo this a lot so that instead of having a
5673 class full of callbacks, we have a subclassable class. Also,
5674 replace the increasingly horrifying
5675 camel_session_query_authenticator with three new routines,
5676 camel_session_get_password, camel_session_forget_password, and
5677 camel_session_alert_user.
5679 * camel-pgp-context.c:
5680 * camel-pkcs7-context.c:
5681 * camel-smime-context.c:
5682 * providers/imap/camel-imap-store.c:
5683 * providers/pop3/camel-pop3-store.c:
5684 * providers/smtp/camel-smtp-transport.c:
5685 Use camel_session_get_password / camel_session_forget_password.
5687 * camel-tcp-stream-ssl.c (ssl_bad_cert): Use
5688 camel_session_alert_user.
5690 2001-04-26 Jeffrey Stedfast <fejj@ximian.com>
5692 * camel.c (camel_init): Automagically call camel_shutdown()
5694 (camel_init): Also initialize NSS databases as read/write for
5695 S/MIME and if NSS fails to init, try initializing with volatile
5698 * camel-file-utils.h: #include <sys/types.h> for off_t.
5700 2001-04-26 Dan Winship <danw@ximian.com>
5702 * camel-file-utils.c: New file, with the int, string, time_t, and
5703 off_t encode/decode routines from camel-folder-summary.c moved
5704 here and renamed, for the enjoyment of non-CamelFolderSummary
5707 * Makefile.am (libcamel_la_SOURCES): Add camel-file-utils.c
5708 (libcamelinclude_HEADERS): and camel-file-utils.h
5710 * camel-folder-summary.c: Remove functions that were moved to
5711 camel-file-utils.c, update uses of them for the new names.
5712 (camel_folder_summary_{en,de}code_token are still here.)
5714 * providers/local/camel-mbox-summary.c: Use camel_file_util_*
5717 * providers/imap/camel-imap-summary.c: Use camel_file_util_* names
5719 * providers/imap/camel-imap-store.c (imap_store_setup_online,
5720 imap_store_setup_offline): Use camel_file_util_* names, which
5721 makes much more sense since this isn't folder summary stuff.
5723 2001-04-26 Dan Winship <danw@ximian.com>
5725 * Makefile.am (INCLUDES): Remove UNICODE_CFLAGS (and some other
5726 stuff that's redundant with EXTRA_GNOME_CFLAGS)
5727 (libcamel_la_LIBADD): Replace UNICODE_LIBS with GAL_LIBS.
5729 * camel-search-private.c:
5730 * camel-pgp-context.c:
5731 * camel-mime-utils.c: Use gunicode interfaces rather than
5734 * camel-charset-map.c: Use gunicode rather than libunicode. (The
5735 charmap-regen code still depends on libunicode though.)
5737 * camel-mime-filter-charset.h:
5738 * tests/message/test2.c (convert): Use iconv rather than
5741 * providers/smtp/Makefile.am (libcamelsmtp_la_LIBADD):
5742 * providers/pop3/Makefile.am (libcamelpop3_la_LIBADD):
5743 * providers/local/Makefile.am (libcamellocal_la_LIBADD): Remove
5746 * camel.c (camel_init): Remove call to unicode_init.
5748 * camel-mime-parser.c: Remove unused unicode.h include.
5750 2001-04-26 Dan Winship <danw@ximian.com>
5752 * camel-service.c (get_host): Use e_gethostbyname_r.
5753 (camel_service_gethost): Remove unused var.
5755 2001-04-26 Not Zed <NotZed@Ximian.com>
5757 * Applied jacob's patches for e-poolv stuff.
5759 2001-04-23 Jeffrey Stedfast <fejj@ximian.com>
5761 * camel.h: Add camel-vee-folder.h and camel-digest-folder.h
5763 * camel-digest-folder.[c,h]: New class that can be used to browse
5764 a multipart/digest message as if it were a CamelFolder.
5766 2001-04-22 Jeffrey Stedfast <fejj@ximian.com>
5768 * camel-pgp-context.c (pgp_verify): Oops, don't use the return
5769 value of iconv() as a string length, it only tells us the number
5770 of non-reversable character conversions. This fixes it so we
5771 actually see the gpg output in the message viewer.
5773 2001-04-23 Mikael Hallendal <micke@codefactory.se>
5775 * providers/nntp/Makefile.am (INCLUDES):
5776 Changed GTK_INCLUDEDIR to EXTRA_GNOME_CFLAGS.
5778 2001-04-20 Jeffrey Stedfast <fejj@ximian.com>
5780 * camel-smime-context.c (smime_sign): Implemented using the
5781 secmime.h convenience functions.
5782 (smime_clearsign): We just error our here, there is no clearsign
5784 (smime_verify): Copied code over from the pkcs7 verify - same
5785 state, ugly and unknown :-)
5786 (smime_encrypt): Implemented using the secmime.h convenience
5788 (smime_decrypt): Same as the code in pkcs7-context.
5790 2001-04-19 Jeffrey Stedfast <fejj@ximian.com>
5792 * camel-pkcs7-context.c (pkcs7_sign): Implemented.
5793 (pkcs7_clearsign): Implemented.
5794 (get_zero_len_passwd): Convenience function to try a 0-length key
5795 on the certificate db - if this works then there is no need to
5797 (get_password): Callback to get the password.
5798 (camel_cipher_hash_to_nss): Convenience function to convert a
5799 CamelCipherHash to an NSS HASH_HashType.
5800 (nss_hash_to_sec_oid): Converts a HASH_HashType to a SecOidTag.
5801 (pkcs7_digest): Digest function for use with pkcs7_sign().
5802 (sign_encode_cb): Callback to write the signed data to the output
5804 (pkcs7_verify): Hacked on a bit more but am still a bit on the
5805 confused side. This might work but I wouldn't hold my breath. The
5806 sign/clearsign should be close if not correct, but this one...god
5808 (pkcs7_decrypt): Implemented.
5809 (pkcs7_encrypt): Implemented (mostly, still need to handle when
5812 2001-04-18 Dan Winship <danw@ximian.com>
5814 * providers/imap/camel-imap-store.c (camel_imap_store_finalize):
5815 Free base_url and storage_path.
5817 * providers/pop3/camel-pop3-store.c (finalize): Free the
5818 implementation string.
5819 (camel_pop3_command): Clarify documentation to mention that
5820 @ex isn't set (and *@ret is) on CAMEL_POP3_ERR.
5821 (connect_to_server): Set @ex properly on CAMEL_POP3_ERR.
5823 * providers/pop3/camel-pop3-folder.c (pop3_refresh_info,
5824 pop3_get_message): Set @ex properly on CAMEL_POP3_ERR.
5826 2001-04-17 Jeffrey Stedfast <fejj@ximian.com>
5828 * camel-pkcs7-context.[c,h]: New source files to handle Pkcs7
5829 encryption, decryption, signing, and verifying. Not yet
5830 complete. I'm sensing this is going to take a while seeing as how
5831 NSS is just so well documented.
5833 2001-04-17 Dan Winship <danw@ximian.com>
5835 * camel-filter-driver.c (camel_filter_driver_filter_message): Fix
5836 a memory leak in the error case.
5838 2001-04-16 Jeffrey Stedfast <fejj@ximian.com>
5840 * providers/local/camel-mbox-summary.c (summary_rebuild): Don't we
5841 want to tell where we are by using the start of the message? I
5842 think this should be using camel_mime_parser_tell_start_from()
5843 instead. Also divide by the size *before* multiplying by 100 so
5844 that we don't overflow the int which was giving us negative values
5845 for our progress status (oops).
5847 2001-04-16 Jeffrey Stedfast <fejj@ximian.com>
5849 * camel-operation.c: Added a prototype for stamp().
5851 * camel-charset-map.c (camel_charset_locale_name): #include
5852 string.h so we don't get a warning about strchr being undefined
5853 and also init charset to NULL.
5855 * camel-pgp-context.c (pgp_verify): Go back to doing the utf8
5856 conversion by hand so that we don't depend on gal.
5858 * Makefile.am: Remove the EXTRA_GNOME_CFLAGS include.
5860 * camel-store.c (camel_mkdir_hier): Convenience function that it
5861 seems a number of camel-store implementations used gal for.
5863 * providers/nntp/camel-nntp-store.c (ensure_news_dir_exists): Lets
5864 not depend on gal for just e_mkdir_hier() - use camel_mkdir_hier()
5867 * providers/nntp/camel-imap-store.c: Lets not depend on gal for
5868 just e_mkdir_hier() - use camel_mkdir_hier() instead.
5870 * camel-session.c (camel_session_get_storage_path): Don't depend
5871 on e_mkdir_heir() anymore, use the CamelStore version.
5873 * camel-folder-search.h: Removed gal dependency, why was this even
5874 there in the first place?
5876 * providers/imap/camel-imap-folder.c: Don't need gal/util/e-util.h
5879 * string-utils.c (strstrcase): New function, well more like old
5880 function brought back to life so we don't have to depend on gal.
5882 * providers/imap/camel-imap-store.c (imap_store_setup_online): Use
5883 strstrcase rather than e_strstrcase so we don't depend on gal.
5884 (get_unread_online): Same here.
5886 * providers/smtp/camel-smtp-transport.c (smtp_helo): Use
5889 2001-04-15 Jeffrey Stedfast <fejj@ximian.com>
5891 * camel-mime-utils.c (header_raw_check_mailing_list): regex
5892 doesn't set errno and regcomp returns 0 on success and any other
5893 value for an error (so don't *just* check for -1).
5895 2001-04-14 Jeffrey Stedfast <fejj@ximian.com>
5897 * camel-cipher-context.c: Check to make sure the context is a
5898 valid context in all the user functions.
5900 2001-04-13 Jon Trowbridge <trow@ximian.com>
5902 * providers/imap/camel-imap-store.c (imap_disconnect):
5903 s/imap_store/store/, fixing a typo that was causing the build to
5906 * camel-filter-search.c (get_source): Make the (previously unused)
5907 get-source command actually do the right thing, properly shrouding
5908 any passed-in source and falling back to use the source attached
5909 to the mime message.
5911 2001-04-13 Dan Winship <danw@ximian.com>
5913 * camel-object.c (camel_object_hook_event):
5914 * camel-uid-cache.c (camel_uid_cache_get_new_uids):
5915 * camel-url.c (camel_url_new_with_base): Plug leaks.
5917 * camel-remote-store.c (camel_remote_store_init): Don't
5918 re-initialize the folders hash table.
5920 * providers/imap/camel-imap-store.c (imap_disconnect): Free
5921 authtypes since they'll be re-read on re-connect.
5922 (get_folder_info): Free folderinfos that we're discarding from the
5925 2001-04-12 Jeffrey Stedfast <fejj@ximian.com>
5927 * camel-pgp-context.c (camel_pgp_context_get_type): Oops, lets not
5928 get into a recursive call here ;-)
5930 * tests/smime/pgp.c: Updated to reflect changes to the PGP code.
5932 * tests/smime/pgp-mime.c: Same.
5934 2001-04-12 Jeffrey Stedfast <fejj@ximian.com>
5936 * camel-pgp-mime.c: Updated to reflect the few changes made to the
5937 CamelPgpContext class.
5939 * camel-pgp-context.c: Updated to subclass of CamelCipherContext.
5941 * camel-cipher-context.[c,h]: New base class for
5942 CamelPgpContext. Also contains the replacement for
5943 CamelPgpValidity, CamelCipherValidity.
5945 2001-04-12 Dan Winship <danw@ximian.com>
5947 * camel-mime-filter-crlf.c (filter): Fix a pair of array bounds
5948 reads noted by purify
5950 2001-04-12 Jeffrey Stedfast <fejj@ximian.com>
5952 * camel.h: #include the pgp stuff.
5954 2001-04-12 Dan Winship <danw@ximian.com>
5956 * providers/imap/camel-imap-message-cache.c
5957 (camel_imap_message_cache_remove):
5958 * camel-url.c (camel_url_to_string): Plug memory leaks.
5960 2001-04-11 Dan Winship <danw@ximian.com>
5962 * providers/imap/camel-imap-utils.c (imap_parse_string_generic):
5963 Simplify peterw's imap_is_atom_char fix.
5965 2001-04-11 Jeffrey Stedfast <fejj@ximian.com>
5967 * tests/smime/Makefile.am: Added pgp-mime.c to the tests.
5969 * tests/smime/pgp-mime.c: Test suite for camel-pgp-mime.c functions.
5971 * Makefile.am: Add camel-pgp-mime.[c,h] to the build.
5973 * camel-pgp-mime.c: Made a number of fixes to get it to compile
5974 and also fixed a few logic errors (mostly forgetting to reset
5975 streams) so that it worked (thanks to the pgp-mime test program).
5977 2001-04-11 JP Rosevear <jpr@ximian.com>
5979 * providers/imap/Makefile.am: user GNOME_INCLUDEDIR since gnome
5980 files are included in the top level camel headers and the gtk
5981 include dir is now versioned and such
5983 * providers/local/Makefile.am: ditto
5985 * providers/pop3/Makefile.am: ditto
5987 * providers/smtp/Makefile.am: ditto
5989 * providers/sendmail/Makefile.am: ditto
5991 * camel-service.c: use five arg version of gethostbyname_r if
5993 (camel_get_host_byname): check if msg->herr is non-zero instead of
5994 checking if msg->hp is null since we may not always have msg->hp
5996 2001-04-11 Jeffrey Stedfast <fejj@ximian.com>
5998 * camel-sasl-digest-md5.c (digest_response): Use
5999 camel_charset_locale_name() to get the locale charset rather than
6000 checking the CHARSET environment variable. This is a much less
6001 ugly hack. Also: If we fail to be able to convert to UTF8, then
6002 disavow all knowledge of the charset parameter.
6004 * camel-charset-map.c (camel_charset_locale_name): New function to
6005 return the locale charset (or NULL if US-ASCII).
6007 2001-04-11 Jeffrey Stedfast <fejj@ximian.com>
6009 * camel-pgp-context.c (camel_pgp_verify): Use
6010 e_utf8_from_locale_string() rather than trying to do it manually
6011 since Lauris's version works much better.
6013 2001-04-06 Jeffrey Stedfast <fejj@ximian.com>
6015 * Makefile.am: Added camel-pgp-context.[c,h] to the build. Also
6016 added tests/smime/pgp.c and Makefile.am
6018 * tests/smime/pgp.c: New test suite for PGP functions.
6020 * camel-pgp-context.c: Various fixes to get it to build.
6022 2001-04-07 Peter Williams <peterw@ximian.com>
6024 * providers/imap/camel-imap-utils.c (imap_parse_string_generic): It
6025 would be a good idea to recognize '\0'. Before, this code was running
6026 off the ends of strings and intermittently coredumping (if it didn't
6027 hit an imap_atom_char first) -- whoops!
6029 2001-04-05 Not Zed <NotZed@Ximian.com>
6031 * merge from evolution-0-10-branch to evolution-0-10-merge-0
6033 2001-04-03 Jeffrey Stedfast <fejj@ximian.com>
6035 * Makefile.am: Added tests/ back in
6037 * camel-mime-utils.c (header_decode_text): Ignore whitespace
6038 between encoded words (there were a few cases where it didn't
6040 (header_encode_string): Preserve whitespace between words that are
6041 to be encoded by encoding them too.
6042 (header_encode_phrase): Same here but with phrases.
6044 2001-04-03 Dan Winship <danw@ximian.com>
6046 * providers/imap/camel-imap-folder.c (imap_sync): If we don't
6047 change any flags or expunge, send a NOOP to give the server a
6048 chance to send EXISTS, etc, messages.
6049 (imap_get_message): If the server_level < IMAP4rev1, always fetch
6050 messages all-at-once, since they don't support the [#.MIME]
6052 (imap_update_summary): When reading message flags, set the
6053 server_flags field as well, and don't overwrite any flags set by
6054 camel_folder_summary_info_new_from_message. Might help with some
6055 of the flag problems...
6057 2001-04-02 Dan Winship <danw@ximian.com>
6059 * camel-service.h: Remove the "quick_login" member, which is
6062 * providers/smtp/camel-smtp-transport.c (smtp_auth): Remove the
6063 references to quick_login and fix this to use the CamelSasl
6064 interfaces correctly to do the same thing.
6065 (connect_to_server): Split this out of smtp_connect
6066 (smtp_connect): Use connect_to_server. When re-EHLO'ing after
6067 auth, ignore errors.
6068 (query_auth_types): Use connect_to_server rather than
6069 smtp_connect, so it doesn't try to authenticate. Add LOGIN
6070 authtype to the list of authtypes to check for.
6072 * providers/smtp/camel-smtp-provider.c
6073 (camel_provider_module_init): Add LOGIN authtype to the authtypes
6076 * camel-sasl.c (camel_sasl_authtype_list): Don't list LOGIN here:
6077 it's not a real SASL authtype and is only used for SMTP.
6079 * camel-sasl-plain.c:
6080 * camel-sasl-login.c:
6081 * camel-sasl-kerberos4.c:
6082 * camel-sasl-cram-md5.c:
6083 * camel-sasl-anonymous.c:
6084 * providers/pop3/camel-pop3-provider.c: Remove "quick_login"
6085 argument from authtypes.
6087 2001-04-02 Gediminas Paulauskas <menesis@delfi.lt>
6089 * camel-filter-driver.c: marked missing report status' for translation.
6091 2001-04-02 Jeffrey Stedfast <fejj@ximian.com>
6093 * camel-pgp-context.c (camel_pgp_sign): mutex lock & unlock the
6095 (camel_pgp_clearsign): Same.
6096 (camel_pgp_verify): Same.
6097 (camel_pgp_encrypt): Same.
6098 (camel_pgp_decrypt): And finally here...
6100 * camel-pgp-context.h: Update the function prototypes to match
6101 those found in camel-pgp-context.c.
6103 * camel-pgp-context.c: Updated.
6105 * camel-pgp-mime.c (camel_pgp_mime_part_sign): Implemented.
6106 (camel_pgp_mime_part_verify): Implemented.
6107 (camel_pgp_mime_part_encrypt): Implemented.
6108 (camel_pgp_mime_part_decrypt): Implemented.
6110 2001-04-01 Jeffrey Stedfast <fejj@ximian.com>
6112 * camel-sasl-login.[c,h]: New files to handle the LOGIN SASL
6115 * camel-sasl-plain.c: Removed the definition of
6116 camel_sasl_login_authtype.
6118 * camel-sasl.c (camel_sasl_new): Oops. I thought LOGIN was an
6119 alias to PLAIN. I was wrong. These two SASL objects have to be
6122 * providers/smtp/camel-smtp-transport.c (smtp_auth): Updated to
6123 check for and use authmech->quick_login when available.
6125 2001-04-01 Jeffrey Stedfast <fejj@ximian.com>
6127 * providers/pop3/camel-pop3-provider.c: Updated the authtypes here
6130 * camel-sasl-plain.c:
6131 * camel-sasl-anonymous.c:
6132 * camel-sasl-digest-md5.c:
6133 * camel-sasl-cram-md5.c:
6134 * camel-sasl-kerberos4.c: Updated the authtype values.
6136 * camel-service.h: Added another field to CamelServiceAuthType
6137 that specifies whether or not the mechanism supports "quick auth"
6138 which means that the client can send the initial challenge in the
6141 * camel-sasl.c (camel_sasl_new): Add support for LOGIN.
6142 (camel_sasl_authtype_list): Here too.
6143 (camel_sasl_authtype): And finally here.
6145 * camel-sasl-plain.c: Define camel_sasl_login_authtype.
6147 * providers/smtp/camel-smtp-transport.c (smtp_auth): Only unref
6148 the SASL object if it exists.
6150 2001-03-30 Dan Winship <danw@ximian.com>
6152 * providers/pop3/camel-pop3-store.c (connect_to_server,
6153 query_auth_types, pop3_connect): Move things around here to make
6154 this all work right again (so you don't get prompted for a
6155 password when checking the supported authtypes.)
6157 2001-03-30 Jon Trowbridge <trow@ximian.com>
6159 * camel-mime-message.c (camel_mime_message_set_source): Shrould
6160 our source URL before putting it into X-Evolution-Source.
6162 2001-03-29 Jeffrey Stedfast <fejj@ximian.com>
6164 * providers/imap/camel-imap-store.c (get_folder_info): Don't
6165 blindly append "/INBOX", construct a CamelURL and set the path
6167 (parse_list_response_as_folder_info): Don't blindly append
6168 "/<foldername>", construct a CamelURL and set the path that way
6170 (get_folders_offline): And again here.
6172 2001-03-30 Not Zed <NotZed@Ximian.com>
6174 * camel-service.c (camel_get_host_byname): Dont overwrite an
6175 exception if we got one already. Added camel_operation status to
6176 it, and comment out some debug.
6178 2001-03-29 Not Zed <NotZed@Ximian.com>
6180 * providers/smtp/camel-smtp-transport.c (smtp_connect): Free host
6181 name info when done ... blah blah.
6183 * camel-sasl-kerberos4.c (krb4_challenge): Free host name info
6184 after we're done with it.
6186 * camel-sasl-digest-md5.c (digest_md5_challenge): Free host name
6187 info after we're done with it.
6189 * camel-remote-store.c (remote_connect): Free the host name info
6190 from get_host after we're finished with it.
6192 * camel-service.c (camel_get_host_byname): New function to
6193 lookup a name, and still be cancellable.
6194 (camel_free_host): And a function to free the structure
6196 (camel_service_gethost): Call get_host_byname for this.
6198 2001-03-29 Jon Trowbridge <trow@ximian.com>
6200 * camel-filter-driver.c (camel_filter_driver_filter_message): Save
6201 the source URL using camel_mime_message_set_source.
6203 * camel-mime-message.c (camel_mime_message_set_source): Renamed
6204 camel_mime_message_set_identity to this. Sets the X-Evolution-Source
6206 (camel_mime_message_get_source): Returns the X-Evolution-Source
6209 2001-03-29 Kjartan Maraas <kmaraas@gnome.org>
6211 * broken-date-parser.c: #include <stdio.h>, <stdlib.h> and <string.h>
6212 * broken-date-parser.h: Remove all includes but <glib.h>
6213 * camel-address.h: Added #include <glib.h>
6214 * camel-data-wrapper.c: Move system includes to the top.
6215 * camel-data-wrapper.h: #include <glib.h>
6216 * camel-exception.c: #ifdef HAVE_CONFIG_H
6217 * camel-exception.h: Remove #include <glib.h>
6218 * camel-filter-driver.c: #ifdef HAVE_CONFIG_H and move system
6219 headers to top. Mark strings in camel_exception_set*() for i18n.
6220 * camel-filter-driver.h: #include <glib.h>
6221 * camel-filter-search.c: #ifdef HAVE_CONFIG_H
6222 * camel-folder-search.c: #include <config.h>
6223 * camel-folder-search.h: Header shuffling
6224 * camel-folder-summary.h: Same here
6225 * camel-folder-thread.c: #ifdef HAVE_CONFIG_H
6226 * camel-folder.c: Here too.
6227 * camel-folder.h: #include <glib.h>
6228 * camel-internet-address.c: Move system headers up
6229 * camel-lock.c: #ifdef HAVE_CONFIG_H
6230 * camel-medium.c: Same here
6231 * camel-mime-filter-bestenc.c: Move system headers up
6232 * camel-mime-filter-from.c: Same here
6233 * camel-mime-filter-linewrap.c: And here
6234 * camel-mime-filter.c: #include <string.h> to fix warnings from new gcc
6235 * camel-mime-filter.h: System headers moved up
6236 * camel-mime-message.c: Here too. #ifdef HAVE_CONFIG_H added
6237 * camel-mime-part-utils.c: #ifdef HAVE_CONFIG_H added
6238 * camel-mime-part.c: Here too, and shuffle headers
6239 * camel-mime-utils.c: #ifdef HAVE_CONFIG_H. Remove const from two
6240 variables to remove warning.
6241 * camel-mime-utils.h: Shuffle headers
6242 * camel-movemail.c: #ifdef HAVE_CONFIG_H. Mark string in camel_exception_set
6243 * camel-multipart.c: #ifdef HAVE_CONFIG_H. Added includes to remove
6244 warnings from new gcc
6245 * camel-object.c: #ifdef HAVE_CONFIG_H
6246 * camel-object.h: Shuffle headers
6247 * camel-operation.c: #ifdef HAVE_CONFIG_H
6248 * camel-provider.c: #ifdef HAVE_CONFIG_H. Shuffle headers. Mark a string
6249 * camel-remote-store.c: #ifdef HAVE_CONFIG_H
6250 * camel-sasl-anonymous.c: #ifdef HAVE_CONFIG_H. #include <string.h>
6251 * camel-sasl-cram-md5.c: #ifdef HAVE_CONFIG_H. #include <string.h> and
6252 <stdio.h> to remove warnings.
6253 * camel-sasl-digest-md5.c: #ifdef HAVE_CONFIG_H. shuffle headers
6254 * camel-sasl-digest-md5.h: Shuffle headers.
6255 * camel-sasl-kerberos4.c: #ifdef HAVE_CONFIG_H. Shuffle headers.
6256 * camel-sasl-kerberos4.h: Shuffle headers.
6257 * camel-sasl-plain.c: #ifdef HAVE_CONFIG_H. Shuffle
6258 * camel-sasl.c: #ifdef HAVE_CONFIG_H. #include <string.h>
6259 * camel-search-private.c: #include <config.h>
6260 * camel-seekable-stream.c: #ifdef HAVE_CONFIG_H
6261 * camel-seekable-stream.h: Shuffle
6262 * camel-seekable-substream.c: #ifdef HAVE_CONFIG_H
6263 * camel-service.c: Same
6264 * camel-service.h: Shuffle
6265 * camel-session.c: #ifdef HAVE_CONFIG_H
6266 * camel-store.c: Same
6267 * camel-stream-buffer.c: Here too
6268 * camel-stream-buffer.h: Shuffle
6269 * camel-stream-filter.c: #include <string.h>
6270 * camel-stream-fs.c: #ifdef HAVE_CONFIG_H
6271 * camel-stream-fs.h: Shuffle headers
6272 * camel-stream-mem.c: Same as above
6273 * camel-stream-mem.h: Here too
6274 * camel-stream-null.c: #ifdef HAVE_CONFIG_H
6275 * camel-stream.c: Here too
6276 * camel-stream.h: Shuffle
6277 * camel-tcp-stream-openssl.c: #ifdef HAVE_CONFIG_H
6278 * camel-tcp-stream-raw.c: Same here. and move local includes down
6279 * camel-tcp-stream-ssl.c: Same as above
6280 * camel-tcp-stream.c: #ifdef HAVE_CONFIG_H
6281 * camel-tcp-stream.h: move local include down
6282 * camel-transport.c: #ifdef HAVE_CONFIG_H
6283 * camel-transport.h: #include <glib.h>
6284 * camel-uid-cache.c: #ifdef HAVE_CONFIG_H. Shuffle headers
6285 * camel-uid-cache.h: Shuffle
6286 * camel-url.c: #ifdef HAVE_CONFIG_H
6287 * camel-vee-folder.c: #ifdef HAVE_CONFIG_H. Shuffle headers
6288 * camel-vee-folder.h: #include <glib.h>
6289 * camel-vee-store.h: Same here
6290 * camel.c: #ifdef HAVE_CONFIG_H
6291 * gstring-util.c: Here too
6292 * hash-table-utils.c: Remove #include <glib.h>
6293 * hash-table-utils.h: #include it here instead.
6294 * string-utils.c: #ifdef HAVE_CONFIG_H
6295 * providers/cache/camel-cache-map.c: #ifdef HAVE_CONFIG_H, shuffle
6296 headers and mark strings in camel_exception_set*()
6297 * providers/cache/camel-cache-provider.c: #ifdef HAVE_CONFIG_H
6298 * providers/cache/camel-cache-store.c: Same here, and mark a string.
6299 * providers/imap/camel-imap-command.c: #ifdef HAVE_CONFIG_H
6300 * providers/imap/camel-imap-command.h: Shuffle header
6301 * providers/imap/camel-imap-folder.c: #ifdef HAVE_CONFIG_H
6302 * providers/imap/camel-imap-message-cache.c: #ifdef HAVE_CONFIG_H
6303 * providers/imap/camel-imap-provider.c: #ifdef HAVE_CONFIG_H and
6305 * providers/imap/camel-imap-search.c: #ifdef HAVE_CONFIG_H
6306 * providers/imap/camel-imap-store.c: #ifdef HAVE_CONFIG_H and mark
6308 * providers/imap/camel-imap-summary.c: Shuffle headers
6309 * providers/imap/camel-imap-wrapper.c: #ifdef HAVE_CONFIG_H. Shuffle
6310 * providers/local/camel-local-folder.c: #ifdef HAVE_CONFIG_H
6311 * providers/local/camel-local-provider.c: #ifdef HAVE_CONFIG_H
6312 * providers/local/camel-local-store.c: Same here
6313 * providers/local/camel-local-summary.c: Here too, shuffle, mark a string
6314 * providers/local/camel-maildir-folder.c: #ifdef HAVE_CONFIG_H
6315 * providers/local/camel-maildir-store.c: Same
6316 * providers/local/camel-maildir-summary.c: Here too
6317 * providers/local/camel-mbox-summary.c: And here
6318 * providers/local/camel-mbox-store.c: And here
6319 * providers/local/camel-mbox-summary.c: #include <config.h>
6320 * providers/local/camel-mh-folder.c: #ifdef HAVE_CONFIG_H
6321 * providers/local/camel-mh-store.c: same
6322 * providers/local/camel-mh-summary.c: #ifdef HAVE_CONFIG_H, shuffle headers
6323 and mark a string for translation.
6324 * providers/nntp/camel-nntp-auth.c: #include <config.h>
6325 * providers/nntp/camel-nntp-store.c: Remove superfluous arg to
6326 CAMEL_SERVICE_CLASS to make it compile
6327 * providers/pop3/camel-pop3-provider.c: #ifdef HAVE_CONFIG_H
6328 * providers/pop3/camel-pop3-store.c: Same here
6329 * providers/sendmail/camel-sendmail-provider.c: Here too
6330 * providers/sendmail/camel-sendmail-transport.c: Here too
6331 * providers/smtp/camel-smtp-provider.c: Same
6332 * providers/smtp/camel-smtp-transport.c: #ifdef HAVE_CONFIG_H, mark
6333 strings for translations.
6335 2001-03-29 Dan Winship <danw@ximian.com>
6337 * camel-url.c (camel_url_to_string): change "gboolean show_passwd"
6340 * tests/misc/url.c (main): Update calls to camel_url_to_string
6342 * providers/imap/camel-imap-store.c (construct): Call
6343 camel_url_to_string with flags to hide password, authtype, and
6344 params to create the base_url.
6345 (etc): Update for the fact that the base_url no longer has the "/"
6348 * camel-service.c (construct): Update calls to camel_url_to_string
6349 (pass CAMEL_URL_HIDE_PASSWORD)
6351 2001-04-03 Jeffrey Stedfast <fejj@ximian.com>
6353 * camel-mime-utils.c (header_decode_text): Ignore whitespace
6354 between encoded words (there were a few cases where it didn't
6356 (header_encode_string): Preserve whitespace between words that are
6357 to be encoded by encoding them too.
6358 (header_encode_phrase): Same here but with phrases.
6360 2001-04-04 Kjartan Maraas <kmaraas@gnome.org>
6362 * camel-filter-driver.c: Added #include <config.h>. Marked
6363 a bunch of strings for translation.
6364 * camel-folder-search.c: Added #include <config.h>.
6365 * camel-folder-summary.c: Same here.
6366 * camel-movemail.c: Marked strings for translation.
6367 * camel-provider.c: Same here.
6368 * camel-search-private.c: #include <config.h>
6369 * camel-vee-folder.c: Mark string for translation.
6370 * providers/local/camel-mbox-summary.c: #include <config.h>
6372 2001-04-03 Dan Winship <danw@ximian.com>
6374 * providers/imap/camel-imap-folder.c (imap_sync): If we don't
6375 change any flags or expunge, send a NOOP to give the server a
6376 chance to send EXISTS, etc, messages.
6377 (imap_get_message): If the server_level < IMAP4rev1, always fetch
6378 messages all-at-once, since they don't support the [#.MIME]
6381 2001-04-01 Jeffrey Stedfast <fejj@ximian.com>
6383 * providers/imap/camel-imap-store.c (get_folder_info): Don't
6384 blindly append "/INBOX", construct a CamelURL and set the path
6386 (parse_list_response_as_folder_info): Don't blindly append
6387 "/<foldername>", construct a CamelURL and set the path that way
6389 (get_folders_offline): And again here.
6391 2001-03-31 Not Zed <NotZed@Ximian.com>
6393 * camel-operation.c (struct _status_stack): change stamp to
6394 unsigned to avoid overflow.
6395 (camel_operation_end):
6396 (camel_operation_progress_count):
6397 (camel_operation_progress): Double the delay before transient
6398 events start showing their own progress.
6400 2001-03-30 Not Zed <NotZed@Ximian.com>
6402 * providers/pop3/camel-pop3-folder.c (pop3_get_message): Change
6403 the pop download into a transient event.
6405 * camel-operation.c (stamp): Get a timestamp that changes 4x a
6406 second (or rather, arbitrarily more often than 1/second).
6407 (camel_operation_progress): Use stamp() for time updates.
6408 (camel_operation_progress_count): "
6409 (camel_operation_start): Store the status as a struct status_stack
6411 (camel_operation_start_transient): New function to start a
6412 transient event, which is only reported if it runs for too
6413 long/and is reset afterwards.
6414 (camel_operation_progress):
6415 (camel_operation_progress_count): Fix for status_stack changes,
6416 and account for transient updates.
6418 * camel-filter-driver.c (camel_filter_driver_filter_folder): When
6419 we remove things (set deleted), always set seen too, to mirror
6420 interface behaviour when you delete.
6421 (camel_filter_driver_filter_message): And same here too.
6423 2001-03-30 Dan Winship <danw@ximian.com>
6425 * providers/pop3/camel-pop3-store.c (connect_to_server,
6426 query_auth_types, pop3_connect): Move things around here to make
6427 this all work right again (so you don't get prompted for a
6428 password when checking the supported authtypes.)
6430 2001-03-29 Dan Winship <danw@ximian.com>
6432 * camel-url.c (camel_url_to_string): change "gboolean show_passwd"
6435 * tests/misc/url.c (main): Update calls to camel_url_to_string
6437 * providers/imap/camel-imap-store.c (construct): Call
6438 camel_url_to_string with flags to hide password, authtype, and
6439 params to create the base_url.
6440 (etc): Update for the fact that the base_url no longer has the "/"
6443 * camel-service.c (construct): Update calls to camel_url_to_string
6444 (pass CAMEL_URL_HIDE_PASSWORD)
6446 2001-03-28 Jeffrey Stedfast <fejj@ximian.com>
6448 * camel-pgp-context.[c,h]: New class for PGP encrypting,
6449 decrypting, signing and verifying. Next I'll be moving the
6450 contents of mail/mail-crypto into Camel. These files will
6451 basically replace mail/openpgp-utils.[c,h].
6453 2001-03-29 Not Zed <NotZed@Ximian.com>
6455 * camel-folder-search.c (search_body_contains): Optimise the match
6456 "" case, just match everything in the folder (if we have it).
6458 * camel-vtrash-folder.c (vtrash_move_messages_to): Access the
6459 folder directly from the message info.
6460 (vtrash_move_messages_to): I think we also need to call the real
6461 move_messages_to, and not try and bypass the lock, since we dont
6462 have the lock for that folder.
6464 * camel-vee-folder.h: Move CamelVeeMessageInfo to public, so
6465 subclasses can get to it.
6467 * camel-vee-folder.c (camel_vee_folder_add_folder): Dont let you
6468 add a vfolder to itself.
6470 (vee_folder_remove_folder):
6471 (vee_folder_build_folder): Copy changes before triggering changed
6472 events, so we can do them outside of locks.
6473 (camel_vee_folder_get_message_folder): Removed function.
6474 (camel_vee_folder_hash_folder): Made public (renamed from
6475 hash_folder), simply for subclasses (probably not needed).
6476 (vee_expunge): Oops, call the class sync, not superclass sync.
6477 (vee_sync): Remove some accidental debug.
6479 2001-03-27 Jeffrey Stedfast <fejj@ximian.com>
6481 * camel-service.c (get_path): Add the port (if user defined) to
6482 the path to fix bug #1996.
6484 Danw: I'm iffy on the "fix" so I'd like you to comment.
6486 2001-03-27 Jeffrey Stedfast <fejj@ximian.com>
6488 * providers/pop3/camel-pop3-folder.c (pop3_sync): If we aren't
6489 going to even check the resp/free buffer that gets returned from
6490 camel_pop3_command, don't even bother using it. Send in NULL
6492 (pop3_get_message): Check to make sure that the `result' string is
6493 non-NULL. It's possible that some POP servers may return with
6494 "+OK\r\n<message>..." rather than the expected
6495 "+OK ### octets\r\n<message>..."
6497 2001-03-27 Not Zed <NotZed@Ximian.com>
6499 * camel-folder-summary.c (camel_folder_summary_finalize): Unref
6500 the html filter when done.
6501 (summary_build_content_info): Disable using the html parser to
6502 help index html mails until it gets sorted out.
6504 * camel-vee-folder.c (folder_changed): Fix a cut n paste bug, we
6505 want uid_removed not uid_changed deref, fixes bug #1999.
6507 2001-03-27 Dan Winship <danw@ximian.com>
6509 * camel-sasl.c (camel_sasl_authtype_list): add an argument to say
6510 whether or not you want "PLAIN" in the list (so you don't end up
6511 with "Password" twice in the config dialog).
6513 * providers/imap/camel-imap-provider.c (camel_provider_module_init):
6514 * providers/imap/camel-imap-store.c (query_auth_types): We don't
6517 * providers/smtp/camel-smtp-provider.c (camel_provider_module_init):
6518 * providers/smtp/camel-smtp-transport.c (query_auth_types): But we
6521 2001-03-27 Dan Winship <danw@ximian.com>
6523 * camel-provider.h: Add an "extra_conf" field to CamelProvider
6524 with structures and defines and stuff, for providers to specify
6525 additional configuration options that they want. Also add a
6526 "supports ssl" flag to the provider flags.
6528 * camel-url.c (camel_url_new_with_base): Fix parsing of params.
6529 (output_param): And unparsing...
6531 * camel-remote-store.c: add a "default_ssl_port" field.
6532 (remote_construct): If the URL has the "use_ssl" parameter, set
6533 the store's use_ssl flag.
6534 (remote_connect): If using SSL and no port specified, use the
6535 default_ssl_port rather than the default_port.
6537 * providers/smtp/camel-smtp-provider.c (smtp_provider): add
6538 CAMEL_PROVIDER_SUPPORTS_SSL and CAMEL_URL_ALLOW_USER. (The config
6539 gui code knows that the ALLOW_USER and ALLOW_AUTH go together.)
6540 (ssmtp_provider): gone
6542 * providers/smtp/camel-smtp-transport.c (smtp_construct): Set a
6543 flag if "use_ssl" param is set.
6544 (smtp_connect): Check the CamelSmtpTransport use_ssl flag rather
6545 than checking if this is smtp or ssmtp.
6547 * providers/imap/camel-imap-provider.c (imap_conf_entries): Add a
6548 bunch of IMAP-specific configuration options, like "check for new
6549 mail in all folders" (default TRUE), "show only subscribed
6550 folders" (default TRUE), "ignore server-supplied namespace", and
6551 "apply filters to INBOX" (not yet implemented).
6552 (imap_provider): We support SSL and we no longer allow a path in
6553 the URL. (namespace is handled via extra_conf)
6554 (simap_provider): Gone
6556 * providers/imap/camel-imap-store.c (camel_imap_store_init): Set
6557 default_ssl_port, don't set CAMEL_STORE_SUBSCRIPTIONS here
6558 (construct): remove simap stuff, deal with "use_lsub",
6559 "namespace", "check_all", and "filter" parameters. Set base_url
6560 to not include params.
6561 (imap_store_setup_online): Don't ask for the namespace if it was
6562 set explicitly. Don't get subscribed folders if !use_lsub.
6563 (imap_concat): Fix a bug.
6564 (get_folder_info): Support for not checking all folders.
6566 * providers/imap/camel-imap-folder.c (imap_get_full_name): Rewrite
6567 to use imap_store->namespace, not service->url->path
6569 * providers/pop3/camel-pop3-provider.c (pop3_conf_entries): "keep
6570 on server" (currently still implemented by the mailer code, not
6571 here), "delete after N days" (not yet implemented).
6572 (pop3_provider): we support SSL
6573 (spop_provider): gone
6575 * providers/pop3/camel-pop3-store.c (camel_pop3_store_init): Set
6577 (pop3_connect): Remove spop code
6579 2001-03-26 Jeffrey Stedfast <fejj@ximian.com>
6581 * camel-vee-folder.c (vee_folder_construct): Move all of the
6582 camel_vee_folder_construct() internals here.
6583 (camel_vee_folder_construct): This function basically becomes a
6584 wrapper for vee_folder_construct and also checks to make sure that
6585 the UNMATCHED vfodler is constructed otherwise constructs it.
6586 (camel_vee_folder_new): Call vee_folder_construct() instead so
6587 that we don't get into a dead-lock.
6589 2001-03-26 Jeffrey Stedfast <fejj@ximian.com>
6591 * camel-store.c (init_trash): Use camel_vtrash_folder_new() to
6592 create the vtrash folder now.
6594 * camel-vtrash-folder.[c,h]: New subclass of CamelVeeFolder for
6597 * camel-folder.c (camel_folder_copy_messages_to): Don't watch for
6598 vtrash folders anymore.
6599 (camel_folder_move_messages_to): Same.
6601 * camel-vee-folder.c (camel_vee_folder_class_init): Update.
6602 (vee_move_messages_to): Rewrite to use the new move API.
6604 * camel-filter-driver.c (do_copy): Updated to reflect
6605 copy_message_to changes. Create a temporary uid array and use
6608 (camel_filter_driver_filter_message): And again, here...
6610 * providers/imap/camel-imap-folder.c (imap_copy_messages_to):
6611 Update to the new API.
6612 (imap_move_messages_to): Same.
6613 (get_uid_set): New function to create a `set' string based on an
6614 array of UIDs for use with imap_copy_messages_to.
6616 * camel-folder.c (camel_folder_copy_messages_to): Replaces
6617 camel_folder_copy_message_to
6618 (camel_folder_move_message_to): Replaces
6619 camel_folder_move_message_to.
6621 2001-03-27 Not Zed <NotZed@Ximian.com>
6623 * camel-vee-store.c (vee_get_folder): Added folder_created event
6626 * camel-vee-folder.c (unmatched_finalise): Removed, moved into
6628 (message_changed): Just create a new change entry and promote it
6629 to a folder_changed thing.
6630 (vee_sync): Always rebuild folder on sync, even when not expunge.
6631 (folder_changed): If not autoupdating, make sure we remove any
6633 (vee_folder_build_folder):
6634 (vee_folder_remove_folder): NOP if we're called on
6636 (vee_search_by_expression): Only search each folder once. Should
6637 we also order the result in summary order?
6639 2001-03-20 Not Zed <NotZed@Ximian.com>
6641 * camel-store.c (init_trash): Fix calling for vee_folder_new().
6643 * camel-folder-summary.c (camel_folder_summary_remove_index):
6644 Optimise slightly, use ptr_array_remove_index rather than have to
6645 search for the index by using summary_remove.
6647 * camel-vee-folder.h: Removed local member from VeeFolder, since
6650 * camel-vee-store.c (camel_vee_store_finalise): Setup finalise
6653 * camel-vee-folder.c (camel_vee_folder_set_expression): New
6654 function to set the query of an existing vfolder.
6655 (camel_vee_folder_construct): New function for
6656 convenience/subclasses.
6657 (camel_vee_folder_new): Removed exception parameter, no longer
6658 needed (since we dont search yet).
6659 (camel_vee_folder_new): Changed to use folder_construct, and no
6660 longer raise the folder created signal.
6661 (vee_folder_build_folder): Make it return error on exception, so
6662 we can work without exceptions.
6663 (vee_folder_remove_folder): Use remove index rather than
6664 remove_uid, this is ok since we have the summary locked for our
6666 (camel_vee_folder_add_folder): Only add the folder to the
6667 unmatched private if it is not a private folder.
6668 (camel_vee_folder_remove_folder): Only remove the folder from
6669 unmatched if it is not private.
6670 (vee_expunge): Just call sync with expunge set.
6671 (vee_sync): If expunging, also refresh the search.
6672 (vee_folder_build_folder): We do our own locking now, removed from
6673 callers, also trigger changed events here too (within locks),
6674 fixed callers appropriately.
6675 (vee_folder_remove_folder): Do our own locking, and trigger
6677 (vee_folder_add_info): Renamed of vee_folder_add, we now take a
6678 hash of the folder name, rather than use the folders address.
6679 (hash_folder): Convert a folder name into an 8 character hash.
6680 (vee_get_message, vee_search_by_expression, vee_set_message_flags,
6681 vee_set_message_user_flag, vee_move_message_to): Changed the uid
6682 to be an 8 byte hash + original uid, with no ':' anymore.
6684 2001-03-26 Jeffrey Stedfast <fejj@ximian.com>
6686 * camel-mime-utils.c (header_decode_text): When writing the last
6687 token (if not rfc2047 encoded), don't use g_string_append_len, use
6690 * camel-mime-message.c (write_to_stream): Don't spew a warning if
6691 the message-id wasn't set by the application, not a big deal since
6692 we create one right here.
6694 2001-03-26 Dan Winship <danw@ximian.com>
6696 * providers/imap/camel-imap-command.c (camel_imap_command): keep a
6697 reference on the store's current_folder.
6699 * providers/imap/camel-imap-store.c (camel_imap_store_finalize):
6700 (imap_disconnect): unref the current_folder before clearing it.
6702 * camel-url.c (camel_url_get_param): Add missing accessor.
6704 * camel-session.c (camel_session_get_provider): New. Return
6705 the provider for a URL.
6707 2001-03-25 Dan Winship <danw@ximian.com>
6709 * camel-url.c (camel_url_new_with_base): New URL parser with full
6710 RFC1808 relative URL support. Yum.
6711 (camel_url_new): Wrapper around camel_url_new_with_base now.
6713 * tests/Makefile.am: add misc subdir
6715 * tests/misc/url.c: relative URL test cases from RFC 1808
6717 2001-03-25 Jeffrey Stedfast <fejj@ximian.com>
6719 * camel-filter-driver.c (do_copy): Don't use copy_to if the source
6720 folder doesn't support summary info's.
6722 (camel_filter_driver_filter_message): And again here. I think
6723 this will fix the problem of "colour" tags not staying with the
6724 message when it's copied to a folder during the filter process.
6726 2001-03-24 Jeffrey Stedfast <fejj@ximian.com>
6728 * camel-sasl-digest-md5.c (digest_response): Do charset conversion
6729 on the username param here if needed.
6730 (parse_server_challenge): Protect against possibly empty-string
6733 2001-03-23 Jon Trowbridge <trow@ximian.com>
6735 * camel-filter-driver.c (camel_filter_driver_filter_message):
6736 Don't call camel_mime_message_set_identity. (The call is
6737 commented out, left over from some earlier experimentation that I
6738 want to be able to remember later...)
6740 * camel-mime-message.c (camel_mime_message_set_identity): Added.
6741 A function to set the X-Evolution-Identity header.
6743 2001-03-22 Dan Winship <danw@ximian.com>
6745 * providers/imap/camel-imap-command.c (imap_read_response): Don't
6746 look at untagged responses other than "* BYE"...
6747 (camel_imap_response_free): ...do it here instead...
6748 (camel_imap_response_free_without_processing): ...but not here.
6750 * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
6751 Remove the "EXISTS" line from the response so
6752 camel_imap_response_free won't try to process it.
6753 (camel_imap_folder_selected): If we get an EXISTS response mixed
6754 in with the FETCH responses, record the new EXISTS value.
6755 Use camel_imap_response_free_without_processing so that an EXISTS
6756 response won't cause a loop.
6757 (imap_rescan): Use camel_imap_response_free_without_processing.
6758 (imap_update_summary): Use
6759 camel_imap_response_free_without_processing. If an EXISTS response
6760 shows up, call imap_update_summary again to get the new messages.
6761 (imap_protocol_get_summary_specifier): Use BODY.PEEK[0], not
6762 RFC822.HEADER for prev IMAP4rev1, since the FETCH parser won't
6763 deal with RFC822.HEADER responses.
6765 * providers/imap/camel-imap-store.c (get_folder_info): Fix an
6766 uninitialized variable
6768 2001-03-21 Dan Winship <danw@ximian.com>
6770 * camel-provider.h: (CamelProvider) add a "GList *authtypes", so
6771 you can get the list of authtypes used by a provider without
6772 needing to have an actual CamelService object handy. (Will be
6773 needed by the new config druid.)
6774 (CAMEL_PROVIDER_ALLOWS, CAMEL_PROVIDER_NEEDS): New macros to test
6775 the URL part stuff, since the way it works is too complicated and
6776 everyone always does it wrong.
6778 * camel-service.c (camel_service_query_auth_types): Remove the
6779 @connected arg again: if you don't want to connect, you can just
6780 get the list of authtypes off the provider.
6781 (camel_service_free_auth_types): Remove this. All existing
6782 implementations do authtypes the same way, so just say the caller
6783 should "g_list_free" the list. (Oh, look, removing this function
6784 doesn't actually cause the mailer to not build. How 'bout that.)
6785 (construct, get_path): Use the new URL part macros.
6787 * camel-remote-store.c (remote_query_auth_types): Update
6788 (remote_free_auth_types): Nuke
6789 (camel_remote_store_authtype_list): New function for use by
6792 * providers/imap/camel-imap-provider.c:
6793 * providers/pop3/camel-pop3-provider.c:
6794 * providers/smtp/camel-smtp-provider.c: Update CamelProvider
6796 (camel_provider_module_init): Put all the SSL parts together so
6797 there's only 1 #ifdef. Set up the provider authtypes field using
6798 the SASL, CamelRemoteStore, and standard authtypes, as
6799 appropriate. Copy that from the normal provider to the SSL
6802 * providers/local/camel-local-provider.c:
6803 * providers/sendmail/camel-sendmail-provider.c:
6804 * camel-session.c: Update CamelProvider structures.
6806 * providers/imap/camel-imap-store.c (query_auth_types):
6807 * providers/pop3/camel-pop3-store.c (query_auth_types): Update
6809 * providers/smtp/camel-smtp-store.c (query_auth_types): Update.
6810 Remove the no_authtype, because that's what "ALLOW_AUTH" rather
6811 than "NEED_AUTH" means.
6812 (free_auth_types): Nuke.
6814 2001-03-21 Jeffrey Stedfast <fejj@ximian.com>
6816 * camel-filter-driver.c (camel_filter_driver_filter_message):
6818 (camel_filter_driver_filter_folder): Same.
6819 (camel_filter_driver_filter_mbox): Same.
6820 (camel_filter_driver_filter_folder): Return -1 if an exception was
6823 2001-03-19 Jeffrey Stedfast <fejj@ximian.com>
6825 * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_finalize):
6826 Free the expected host.
6827 (camel_tcp_stream_openssl_new): Now takes a Service and an
6828 expected_host. Set them.
6830 2001-03-20 Dan Winship <danw@ximian.com>
6832 * providers/imap/camel-imap-store.c
6833 (camel_imap_store_check_online): Function to check if the store is
6834 online and set an exception if not. Currently controlled by an
6835 environment variable, but eventually there will be both a global
6836 (session-level) setting and a per-store setting.
6837 (construct): Set up storage_path and base_url here rather than at
6839 (imap_auth_loop): Split out from imap_connect.
6840 (imap_setup_online): Split out from imap_connect. Do the
6841 post-authentication connection setup, and cache the results to
6843 (imap_setup_offline): Set up a CamelImapStore with information
6844 saved from a previous imap_setup_online.
6845 (imap_connect): If online, do connect_to_server(),
6846 imap_auth_loop(), and imap_setup_online(). Otherwise, do
6847 imap_setup_offline().
6848 (get_folder, get_folder_info): Add offline support.
6849 (create_folder, subscribe_folder, unsubscribe_folder): Disable
6850 these when offline (for now).
6852 * providers/imap/camel-imap-folder.c (camel_imap_folder_new):
6853 Remove the sync'ing-with-server stuff... it's done by
6854 camel_imap_folder_selected now, which only gets called if the
6856 (camel_imap_folder_selected): add the code removed from
6857 camel_imap_folder_new. Besides simplifying the folder_new and
6858 summary_new code, this also means now that we'll DTRT if a
6859 folder's UIDVALIDITY changes while we're connected. Also, when
6860 that happens, clear the message cache explicitly.
6861 (imap_refresh_info, imap_sync): These are no-ops when offline.
6862 (imap_expunge, imap_append_message, imap_copy_message_to,
6863 imap_search_by_expression): These don't yet work offline.
6864 (imap_get_message, camel_imap_folder_fetch_data): Return an error
6865 when trying to fetch a non-cached body part when we're offline.
6867 * providers/imap/camel-imap-summary.c (camel_imap_summary_new):
6868 Rewrite to not check the validity here. (We'll do it from
6869 camel_imap_folder_selected instead.)
6871 * providers/imap/camel-imap-command.c (camel_imap_command): Call
6872 camel_imap_folder_selected even when the selection is all we're
6873 doing, to match the changes in camel-imap-folder.c.
6875 * providers/imap/camel-imap-message-cache.c
6876 (camel_imap_message_cache_clear): New function to clear out a
6879 2001-03-19 Christopher James Lahey <clahey@ximian.com>
6881 * Makefile.am (INCLUDES): Added $(EXTRA_GNOME_CFLAGS)
6883 2001-03-19 Jeffrey Stedfast <fejj@ximian.com>
6885 * providers/pop3/camel-pop3-store.c (pop3_connect): Set the errbuf
6886 to NULL after freeing it? I don't think this should fix bug #1801
6887 but I guess it can't hurt.
6889 2001-03-18 Jeffrey Stedfast <fejj@ximian.com>
6891 * camel-remote-store.c (remote_recv_line): Protect against a
6892 possibly NULL exception.
6894 * camel-filter-driver.c (camel_filter_driver_filter_message):
6895 Document and modify to return a boolean value denoting whether or
6896 not errors occured during processing.
6897 (camel_filter_driver_filter_mbox): Same as above and also modified
6898 to check return codes of filter_message rather than relying only
6899 on whether or not the exception was set (as it's possible to pass
6900 in NULL for the exception).
6901 (camel_filter_driver_filter_folder): Same as above.
6903 * camel-mime-utils.c (header_param_list_format_append): Quote the
6904 param value if it contains whitespace as well.
6906 2001-03-17 Jeffrey Stedfast <fejj@ximian.com>
6908 * Makefile.am: Don't include system include dir.
6910 * camel.c: Use quotes around the nss.h include so it doesn't try
6911 to use the systen nss.h file.
6913 * camel-tcp-stream-ssl.c: Same here.
6915 2001-03-17 Not Zed <NotZed@Ximian.com>
6917 * providers/local/camel-maildir-summary.c (maildir_summary_sync):
6918 Modified patch from Dan Berger <dberger@ix.netcom.com> to re-check
6919 the maildir directory for new/updated messages at sync time.
6921 * camel-folder.c (camel_folder_ref_message_info): Implemented.
6922 (ref_message_info): And default implementation.
6924 * camel-folder.h: Added ref_message_info virtual method.
6926 2001-03-16 Not Zed <NotZed@Ximian.com>
6928 * camel-folder-thread.c
6929 (camel_folder_thread_messages_new_summary): New function to create
6930 a thread tree from a supplied summary array.
6931 (camel_folder_thread_messages_destroy): Handle thread trees
6932 generated by the above function properly.
6934 2001-03-16 Jeffrey Stedfast <fejj@ximian.com>
6936 * camel-private.h: Same.
6938 * camel-remote-store.h: Fixed #include to use <>'s instead of ""'s
6940 2001-03-16 Jeffrey Stedfast <fejj@ximian.com>
6942 * camel-tcp-stream-ssl.c (ssl_bad_cert): Print info about the
6943 issuer of the certificate.
6945 * providers/smtp/camel-smtp-transport.c (smtp_connect): Use
6946 camel_tcp_stream_get_socket().
6948 * camel-tcp-stream-openssl.c (stream_get_socket): Implemented.
6950 * camel-tcp-stream-ssl.c (stream_get_socket): Implemented.
6952 * camel-tcp-stream-raw.c (stream_get_socket): Implemented.
6954 * camel-tcp-stream.c (camel_tcp_stream_get_socket): New function.
6956 2001-03-16 Kjartan Maraas <kmaraas@gnome.org>
6958 * providers/pop3/camel-pop3-folder.c: Added #include <config.h>
6960 2001-03-16 Dan Winship <danw@ximian.com>
6962 * camel-mime-utils.c (header_msgid_generate): Don't use
6963 getdomainname: it's NIS crap, not DNS.
6965 2001-03-15 Jeffrey Stedfast <fejj@ximian.com>
6967 * camel.c (camel_init): Don't use the hardcoded cert db directory,
6968 use the one passed in.
6970 * camel-tcp-stream-ssl.c (ssl_get_client_auth): Wrote the default
6971 implementation. Not that we'll use this though, since this is the
6972 default implementation provided by NSS anyway. This more or less
6973 serves as a reference in case we want to change anything.
6974 (ssl_auth_cert): Same.
6975 (ssl_bad_cert): Changed the prompt string and free it when we're
6978 2001-03-15 Dan Winship <danw@ximian.com>
6980 First batch of disconnected IMAP-related stuff. This adds local
6981 caching of message parts, but NOT any actual disconnected support.
6982 (But it should speed up IMAP use.)
6984 * providers/imap/camel-imap-message-cache.c: New class for caching
6985 message data to disk, and removing it when it's no longer
6986 relevant. Will eventually also support merging message parts
6987 together to save on files. Or maybe using a db instead of files?
6989 * providers/imap/camel-imap-private.h: Add a cache_lock to
6990 CamelImapFolderPrivate. This lock must be recursive, so make both
6991 locks EMutexes rather than GMutex.
6993 * providers/imap/camel-imap-folder.c (parse_fetch_response): "The
6994 only FETCH response parser you need!" Replaces the various
6995 almost-correct bits of code formerly scattered throughout this
6996 file with a single fully-correct function that can handle any
6997 FETCH response at any time, so we don't get confused by seeing a
6998 flags update when we were only expecting a message body, etc.
6999 (camel_imap_folder_fetch_data): FETCH a message body part either
7000 from the cache or the server
7001 (camel_imap_folder_changed): Remove expunged messages from the
7003 (camel_imap_folder_new): Change to take a directory instead of a
7004 summary file name. Create a CamelImapMessageCache for the folder.
7005 (imap_finalize): Unref the message cache.
7006 (camel_imap_folder_selected, imap_rescan, get_content,
7007 get_message, imap_get_message, imap_update_summary): Redone a
7008 bunch to use parse_fetch_data, CamelImapMessageCache, etc.
7010 * providers/imap/camel-imap-store.c (get_folder): Pass directory
7011 name to camel_imap_folder_new, not summary filename. Use
7012 e_path_to_physical to generate a path with /subfolders/ inserted
7013 between directory components.
7015 * providers/imap/camel-imap-wrapper.c (camel_imap_wrapper_new):
7016 Call camel_imap_folder_fetch_data (with cache_only TRUE) and if
7017 the data is cached, return an online datawrapper rather than an
7019 (write_to_stream): Use camel_imap_folder_fetch_data (with
7020 cache_only FALSE) here too
7022 * providers/imap/camel-imap-utils.c (imap_skip_list): Renamed from
7023 skip_list and made non-static.
7025 2001-03-15 Jeffrey Stedfast <fejj@ximian.com>
7027 * camel-tcp-stream-ssl.h: Uninclude prnetdb.h since it's not
7030 * providers/smtp/camel-smtp-transport.c: #include prnetdb.h here
7031 instead of making camel-tcp-stream-ssl.h include it. Prevents some
7034 * providers/smtp/Makefile.am: Include the NSPR_CFLAGS and
7037 2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
7039 * providers/smtp/camel-smtp-transport.c (smtp_connect): Update for
7040 using CamelTcpStreams and also for using SSL.
7042 * providers/smtp/libcamelsmtp.urls: defined "ssmtp"
7044 * providers/smtp/camel-smtp-provider.c: Defined the Secure SMTP
7046 (camel_provider_module_init): Register the Secure SMTP provider.
7048 2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
7050 * providers/imap/camel-imap-store.c (imap_connect): Check for
7051 "simap" instead of "imaps".
7053 * providers/pop3/camel-pop3-store.c (pop3_connect): Change the
7054 port to be 995 for spop.
7056 * providers/pop3/libcamelpop3.urls: Change to "spop".
7058 * providers/imap/libcamelimap.urls: Change "imaps" to "simap" to
7059 correspond to /etc/services.
7061 2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
7063 * providers/pop3/camel-pop3-store.c (pop3_connect): Check to see
7064 if we are using "pops" and then set the appropriate SSL settings.
7066 * providers/pop3/libcamelpop3.urls: Add "pops"
7068 * providers/pop3/camel-pop3-provider.c: Defined the pops provider.
7069 (camel_provider_module_init): Register the pops provider.
7071 2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
7073 * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_new): Ya know what?
7074 Lets not ref the service because otherwise we'll start having the
7075 same problems we had back with vtrash. Besides, since the store
7076 owns the stream, it's not like the store is going anywhere without
7078 (camel_tcp_stream_ssl_finalize): No need to unref the service.
7080 2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
7082 * camel-remote-store.c (remote_connect): Pass the service into the
7083 SSL stream, not the session.
7085 * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_init): Set the
7087 (camel_tcp_stream_ssl_finalize): Unref the service.
7088 (camel_tcp_stream_ssl_new): Takes a CamelService arg now rather
7089 than a CamelSession arg.
7091 2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
7093 * camel.c (camel_init): So it turns out that NSS_Init *isn't*
7094 idempotent, so we have to protect against initializing it more
7095 than once(contrary to what their design specs suggest).
7097 * camel-session.c (camel_session_get_service): Use
7098 camel_exception_is_set() - Makes no difference but it's more
7099 consistant with how we normally do it.
7101 * camel-provider.h (CAMEL_URL_ALLOW_SSL): We don't need this.
7103 * providers/imap/camel-imap-provider.c: Define the imaps provider.
7104 (camel_provider_module_init): Register the imaps provider.
7106 * camel-provider.c (camel_provider_init): Only add the protocol to
7107 the hash table if it's non empty. Also, g_strdup() the filename
7108 into the hash table.
7110 * providers/imap/camel-imap-store.c (camel_imap_store_init): Eek!
7111 So the service's URL isn't set until after this is
7112 initialized. This means we can't check for SSL here.
7113 (imap_connect): Set the SSL options here instead.
7115 2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
7117 * camel-tcp-stream-ssl.c: Numerous fixes to get it to build
7118 correctly with NSS enabled.
7120 * camel-remote-store.c (remote_connect): Pass in the session and
7121 expected host args, oops.
7123 * camel-provider.h (CAMEL_URL_ALLOW_SSL): Defined.
7125 * providers/imap/camel-imap-store.c (camel_imap_store_init): Check
7126 to see if we are supposed to use SSL and set the options
7128 (imap_connect): Return FALSE here instead of NULL.
7130 * providers/imap/camel-imap-provider.c: Add CAMEL_URL_ALLOW_SSL.
7132 * providers/imap/libcamelimap.urls: Add "imaps" which is the
7133 protocol for Secure IMAP.
7135 2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
7137 * camel-tcp-stream-openssl.[c,h]: Added
7139 * Makefile.am: Added camel-tcp-stream-openssl.[c,h] to the build.
7141 * camel-types.h: Added CamelTcpStreamSSL and CamelTcpStreamOpenSSL
7143 2001-03-14 Not Zed <NotZed@Ximian.com>
7145 * camel-mime-filter-charset.c (filter, complete): re-constify
7146 inbuf, to remove a warning.
7148 * camel-mime-parser.c (folder_scan_step): When we're out of data,
7149 run the filter_complete. For some reason the logic that was there
7150 was never being run, always try it now, i think it was to work
7151 around a buggy filter, rather than fix it the right way.
7153 * camel-folder-summary.c (summary_build_content_info): If indexing
7154 html parts, use the html filter to convert it to some indexable
7156 (summary_build_content_info): Reset the filters before adding them
7157 back to the stream, if they get re-used in a given instance
7160 * Makefile.am (libcamelinclude_HEADERS): Added
7161 camel-mime-filter-html.[ch].
7162 (INCLUDES): Added xml clags
7164 2001-03-05 Not Zed <NotZed@Ximian.com>
7166 * camel-folder-search.c (camel_folder_search_class_init): Setup a
7167 new function, "uid" which matches uids.
7168 (search_uid): Implement the "match uid" command.
7170 2001-03-13 Jeffrey Stedfast <fejj@ximian.com>
7172 * camel-mime-utils.c: Check for a new type of mailing list header.
7174 2001-03-13 Jeffrey Stedfast <fejj@ximian.com>
7176 * camel-tcp-stream-raw.c (stream_read): Made cancellable.
7177 (stream_write): Same.
7178 (stream_connect): Removed checks for DIVINE_INTERVENTION as the
7181 * camel-tcp-stream-ssl.c (stream_write): get rid of 'w' as it
7182 wasn't really needed.
7183 (set_errno): New function to set errno based on the NSPR error
7185 (stream_read): If an error occured, call set_errno().
7186 (stream_write): Same.
7188 2001-03-13 Jeffrey Stedfast <fejj@ximian.com>
7190 * Makefile.am: Added camel-tcp-stream-ssl to the build.
7192 * camel-remote-store.h: Add a use_ssl member to the
7193 CamelRemoteStore object.
7195 2001-03-13 Jeffrey Stedfast <fejj@ximian.com>
7197 * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_get_type):
7198 Oops. Make this a subclass of CamelTcpStream, not CamelStream.
7200 * camel-types.h: Add the defs for CamelTcpStream and
7203 * Makefile.am: Add camel-tcp-stream and camel-tcp-stream-raw to
7206 * camel-remote-store.c (remote_connect): Update to use
7209 * camel-tcp-stream-raw.c (stream_connect): Made cancellable by
7210 copying the currently used code in camel-remote-store.c.
7211 (stream_setsockopt): Oops, flags = fcntl (..., GET_FL);
7212 (camel_tcp_stream_raw_get_type): Oops. Make this a subclass of
7213 CamelTcpStream, not CamelStream.
7215 2001-03-13 Jeffrey Stedfast <fejj@ximian.com>
7217 * camel.c (camel_init): Since all of the Mozilla libs (including
7218 NSPR and NSS) correctly handle reinitializations, we might as well
7219 init both NSPR and NSS in camel_init so we can be sure of that
7220 these libs have been initialized.
7221 (camel_shutdown): New function to call the NSS cleanup stuff.
7223 2001-03-13 Jeffrey Stedfast <fejj@ximian.com>
7225 * camel-folder.c (camel_folder_copy_message_to): Don't allow the
7226 user to copy a message to or from the vtrash folder. Set an
7227 exception if they try.
7228 (camel_folder_move_message_to): This one is a bit more
7229 complicated: 1) If the user tried to move a message from the
7230 vtrash into the original folder, just undelete the message. 2) If
7231 the user tries to move the message to the vtrash folder, then just
7232 mark the message as deleted. 3) If the user tries to move the
7233 message from the vTrash to a folder other than the original, use
7234 the original folder as the source. As another optimization, I've
7235 made it so that if the user tries to move a message to the same
7237 (move_message_to): Unset the deleted flag before moving (assuming
7239 (copy_message_to): Same.
7241 * camel-vee-folder.c (camel_vee_folder_get_message_folder): New
7242 convenience function to get the folder from which the message uid
7245 2001-03-13 Dan Winship <danw@ximian.com>
7247 * providers/imap/camel-imap-store.c (imap_connect): When trying
7248 again after a failed password attempt, check if the connection got
7249 dropped (which Courier will do) and deal accordingly.
7251 * providers/sendmail/camel-sendmail-transport.c (sendmail_send_to,
7252 sendmail_send): More fixing for exim: It can't deal with "-tif",
7253 you need to say "-t -i -f".
7255 2001-03-12 Jeffrey Stedfast <fejj@ximian.com>
7257 * camel-store.c (init_trash): Rename the folder to "Trash" and
7260 2001-03-09 Jeffrey Stedfast <fejj@ximian.com>
7262 * camel-tcp-stream-ssl.h: Comment out everything unless HAVE_NSS
7265 * camel-tcp-stream-ssl.c (stream_read): Don't use errno, use
7266 nspr's error code stuff.
7267 (stream_write): Same.
7269 2001-03-09 Jeffrey Stedfast <fejj@ximian.com>
7271 * camel-session.c (camel_session_query_authenticator): Created a
7272 new mode (CAMEL_AUTHENTICATOR_ACCEPT) which is a Yes/No prompt to
7273 the user. This will be needed by the SSL/TLS code to come. Also
7274 changed the return value to a gpointer rather than a char* to
7275 allow the returning of TRUE/FALSE values.
7277 * camel.c: Wrap stuff with HAVE_NSS
7279 2001-03-09 Dan Winship <danw@ximian.com>
7281 * providers/sendmail/camel-sendmail-transport.c (sendmail_send,
7282 sendmail_send_to): Remove the "-U" for now, because it breaks
7283 exim's "sendmail" wrapper. (And it doesn't actually do all that
7284 much to sendmail's behavior, and it was working fine before
7287 * camel-mime-utils.c (header_fold): Fix a bug that could make this
7288 walk off the end of a string. (The bug has been there since
7289 December... maybe this will fix some unreproduceable crashes?)
7291 2001-03-08 Jeffrey Stedfast <fejj@ximian.com>
7293 * camel-store.c (camel_store_get_folder): Changes so that the
7294 folder gets added to the vtrash reguardless of whether or not the
7295 store is holding it's own folder lookup hash.
7296 (init_trash): Oops, lets try locking the cache before we go and
7297 add all the cached folders to the vtrash.
7299 2001-03-08 Jeffrey Stedfast <fejj@ximian.com>
7300 These fixes make it so that the CamelStore does not actually hold
7301 a ref on it's vTrash folder. The vTrash folder is now created ONLY
7302 when it is requested. This solves the problem of not being able to
7303 unref a Store and have it disconnect/finalize like we expect it to.
7305 * camel-store.c (init_trash): When we create the vtrash, add all
7306 previously opened folders to it and hook on to the finalize event
7307 so that we can then set the store->vtrash to NULL.
7308 (get_trash): If a vtrash folder for the store doesn't exist,
7309 init_trash() and then try.
7310 (construct): No longer need this.
7311 (camel_store_class_init): Don't override the construct method.
7312 (camel_store_finalize): We no longer hold a ref on the vtrash so
7315 2001-03-07 Jeffrey Stedfast <fejj@ximian.com>
7317 * providers/pop3/camel-pop3-store.c (init_trash): Implement.
7318 (get_trash): Implement.
7319 (camel_pop3_store_class_init): Override the default init_trash and
7320 get_trash virtual functions. Hopefully this should fix the problem
7321 of pop3 sotre's not disconnecting after the send&recv code
7322 finishes downloading mail.
7324 Wonder if I should override the default implementation for the
7325 mbox, mh, and maildir too?
7327 2001-03-07 Dan Winship <danw@ximian.com>
7329 * camel-remote-store.c (camel_remote_store_connected): Return the
7330 return value of camel_service_connect rather than returning
7331 !camel_exception_is_set(), since that will be wrong if ex==NULL...
7332 Fixes a crash in the IMAP keepalive code, but this same problem
7333 probably exists in other places too...
7334 (remote_recv_line): Fix another problem...
7336 * providers/local/camel-mbox-provider.c:
7337 * providers/vee/.cvsignore:
7338 * providers/vee/libcamelvee.urls: Remove some unused stuff
7340 2001-03-06 Jeffrey Stedfast <fejj@ximian.com>
7342 * camel-sasl-digest-md5.c (compute_response): Redone so as to save
7343 on memory allocations and speed.
7345 2001-03-05 Jeffrey Stedfast <fejj@ximian.com>
7347 * camel-sasl-plain.c (plain_challenge): Don't return NULL if the
7348 token is non-NULL. This is why:
7350 sending : AUTH PLAIN
7351 received: 334 ok. go on. <-- this is why
7352 sending : ZGZPaQpAZ214Lm5ldBBnb29jYXI=
7353 received: 235 {mp005-rz3} go ahead
7355 * camel-sasl.c (camel_sasl_authtype): Add the PLAIN type here.
7356 (camel_sasl_authtype_list): And here too.
7358 * camel-sasl-plain.c: Initialize the camel_sasl_plain_authtype.
7360 * camel-sasl-plain.h: extern the camel_sasl_plain_authtype.
7362 2001-03-05 Jeffrey Stedfast <fejj@ximian.com>
7364 * providers/imap/camel-imap-store.c (imap_connect): i18n'd some
7367 * providers/smtp/camel-smtp-transport.c (smtp_connect): Keep
7368 trying to authenticate until either we succeed or until the user
7371 2001-03-04 Jeffrey Stedfast <fejj@ximian.com>
7373 * camel-mime-utils.c: Wrote a new version of header_fold() that
7374 takes a 'force' option and uses another new function called
7375 header_fold_next_space() in place of strchr(inptr, ' ') to get the
7376 next whitespace char. The idea of header_fold_next_space() is to
7377 not treat spaces between a set of quotes as a space - this way it
7378 will be possible to fold (for example) the Content-Type MIME
7379 header without worrying about breaking up a boundary string.
7380 Note: This code is #if 0'd out until Zucchi approves of the patch.
7381 Another Note: We will probably still want to use the "don't fold
7382 this header" hash lookup for headers like the Message-Id and
7383 possibly a few others.
7385 2001-03-04 Jeffrey Stedfast <fejj@ximian.com>
7387 * camel-internet-address.c
7388 (camel_internet_address_encode_address): Make sure there is a
7389 space between the name and the address tokens.
7391 * camel-mime-utils.c (rfc2047_decode_word): encoded string
7392 segments need to be at least 8 chars (7 doesn't leave room for an
7393 ecoding value. To be more realistic, even 8 chars isn't enough as
7394 this assumes there is no charset nor any encoded text. If the
7395 encoding value is not 'Q' or 'B', then return NULL. This fixes bug
7398 2001-03-03 Not Zed <NotZed@Ximian.com>
7400 * camel-vee-folder.c (vee_folder_remove_folder): New function to
7401 remove a folder from a vfolder.
7402 (camel_vee_folder_remove_folder): New public function to remove a
7403 folder from a vfolder.
7405 2001-03-02 Jeffrey Stedfast <fejj@ximian.com>
7407 * providers/smtp/camel-smtp-provider.c: Doh! Set the
7408 CAMEL_URL_ALLOW_AUTH flag.
7410 * providers/smtp/camel-smtp-transport.c (get_smtp_error_string):
7411 Updated with the extended AUTH return codes.
7413 2001-03-02 Jeffrey Stedfast <fejj@ximian.com>
7415 * providers/imap/camel-imap-store.c (try_auth): Don't forget to
7416 unref the SASL object.
7418 * providers/smtp/camel-smtp-transport.c (query_auth_types):
7420 (smtp_auth): Implemented.
7421 (smtp_helo): Don't bother parsing the authtypes if we already have
7423 (smtp_connect): call smtp_auth() here if we found any authtypes.
7424 (smtp_disconnect): Updated as I now use a hash table for the
7425 supported authtypes rather than a linked list.
7426 (esmtp_get_authtypes): modify to use a hash table instead of a
7427 linked list and also use isspace() rather than == ' '.
7429 2001-03-02 Dan Winship <danw@ximian.com>
7431 * providers/sendmail/camel-sendmail-transport.c (sendmail_send_to,
7432 sendmail_send): Use "-f" to set the envelope from address so
7433 bounces go to the right place. Also, pass "-U" since the man page
7434 says we're supposed to...
7436 2001-03-01 Jeffrey Stedfast <fejj@ximian.com>
7438 * camel-sasl.c: #include "camel-sasl-digest-md5.h"
7439 (camel_sasl_authtype_list): add DIGEST-MD5 stuff here.
7440 (camel_sasl_authtype): And here too.
7441 (camel_sasl_new): And here...
7443 * camel-sasl-digest-md5.[c,h]: new SASL class for DIGEST-MD5 (has
7444 been tested and proven to work).
7446 2001-03-01 Dan Winship <danw@ximian.com>
7448 * camel-sasl.c (camel_sasl_challenge): Take a GByteArray as input
7449 as well. Comment that you can pass %NULL for @token to get the
7450 initial auth data for mechanisms that are client-initiated.
7451 (camel_sasl_challenge_base64): Convenience function for protocols
7452 that use base64-encoded SASL.
7453 (camel_sasl_authenticated): Implement this... (it was prototyped
7455 (camel_sasl_new): Function to take a service name, a mechanism
7456 name, and a CamelService, and return a CamelSasl for it.
7457 (camel_sasl_authtype, camel_sasl_authtype_list): Functions to
7458 return CamelServiceAuthType information about SASL mechanisms, to
7459 allow providers to deal with them generically.
7461 * camel-sasl-anonymous.c, camel-sasl-plain.c: Update/simplify for
7462 CamelSasl changes. Both of these are single-round
7463 (client-initiated) mechanisms, so they don't need to keep state.
7464 (camel_sasl_plain_new): Removed; use camel_sasl_new instead.
7465 (Can't get rid of camel_sasl_anonymous_new though...)
7467 * camel-sasl-cram-md5.c: Update/simplify for CamelSasl changes.
7468 (camel_sasl_cram_md5_new): Removed; use camel_sasl_new instead.
7469 (cram_md5_challenge): Use md5_get_digest where possible, and
7470 various other minor simplifications. CRAM-MD5 only has a single
7471 round, so there's no need to keep track of state. This code is now
7472 tested (against Cyrus IMAPd) and known to work.
7474 * camel-sasl-kerberos4.h: Update/simplify for CamelSasl changes.
7475 Make only a single #ifdef HAVE_KRB4. Remove stuff from priv that
7476 isn't needed between rounds.
7477 (camel_sasl_kerberos4_new): Removed; use camel_sasl_new instead
7478 (krb4_challenge): Fix up the logic I broke in my previous "at
7479 least make it compile" fixes, update to match other changes, and
7480 remove IMAP-isms that shouldn't be in the generic code. This still
7481 isn't tested, because we're stuck behind a NAT right now...
7483 * providers/imap/camel-imap-store.c: Add an "authtypes" hash table
7484 to CamelImapStore recording the supported authtypes.
7485 (connect_to_server): Record supported authtypes in the authtypes
7486 hash rather than the capabilities bitmask, since now the IMAP code
7487 is no longer responsible for keeping track of which authtypes we
7489 (query_auth_types): Use camel_sasl_authtype_list to get the
7490 SASL-supported authtypes.
7491 (try_auth): New function to try a SASL auth mechanism. Sort of
7492 formerly imap_try_kerberos_v4_auth.
7493 (imap_connect): Get rid of the krb4-specific bits and genericize
7494 them for any SASL authtype.
7496 * providers/imap/Makefile.am: Remove camel-imap-auth.[ch] (moved
7497 into camel-imap-store.c since it's now constant size) and the
7498 KRB4_CFLAGS and KRB4_LDFLAGS references.
7500 2001-03-01 Jeffrey Stedfast <fejj@ximian.com>
7502 * camel-sasl-anonymous.c (anon_challenge): Don't base64 encode the
7503 data, leave that up to the provider to do if it needs to. Also
7504 save on some memory allocations and stuff.
7506 * camel-sasl-cram-md5.c (cram_md5_challenge): Same here. Also get
7507 rid of the need for the temp buf as we can just write it to the
7510 2001-03-02 Not Zed <NotZed@Ximian.com>
7512 * camel-mime-utils.c (rfc2047_encode_word, rfc2047_decode_word):
7513 Reconstify variables to match iconv.
7515 * camel-search-private.c (camel_ustrstrcase): Change some
7516 assertions back into valid returns.
7518 2001-03-01 Dan Winship <danw@ximian.com>
7520 * Makefile.am (libcamel_la_LIBADD, INCLUDES): camel depends on
7521 krb4 now (where available), for camel-sasl-kerberos4.c
7523 * camel-sasl-kerberos4.[ch]: Make this at least compile. Dunno if
7526 2001-03-01 Peter Williams <peterw@ximian.com>
7528 * camel-url.c (camel_url_new): Assert url_string != NULL.
7530 2001-02-28 Jeffrey Stedfast <fejj@ximian.com>
7532 * Makefile.am: Added camel-sasl-anonymous.[c,h] to the build.
7534 * camel-sasl-anonymous.[c,h]: new SASL class for ANONYMOUS
7536 * camel-sasl-plain.c (plain_challenge): Oops, have a state for
7537 setting sasl->authenticated = TRUE;
7539 * camel-sasl-cram-md5.c (cram_md5_challenge): Same here.
7541 2001-02-28 Jeffrey Stedfast <fejj@ximian.com>
7543 * camel-mime-utils.c (header_decode_date): A fix for broken
7544 mailers that send 2-digit years (ie "Wed, 28 Feb 01
7545 04:59:41"). Fixes bug #1633.
7547 * camel-filter-driver.c (camel_filter_driver_filter_folder): Check
7548 to make sure message isn't NULL.
7550 2001-02-28 Dan Winship <danw@ximian.com>
7552 * camel-remote-store.c (remote_recv_line): If we get back 0 bytes
7553 from camel_stream_buffer_gets, that means the socket got
7554 disconnected, so set an exception. (Noticed because of a message
7555 that crashes our IMAP server when you try to look at it. :)
7557 2001-02-28 Jeffrey Stedfast <fejj@ximian.com>
7559 * Makefile.am: Added camel-sasl*.[c,h] to the build.
7561 * camel-sasl.[c,h]: new "abstract" SASL class
7563 * camel-sasl-kerberos4.[c,h]: new SASL class for KERBEROS_V4
7565 * camel-sasl-cram-md5.[c,h]: new SASL class for CRAM-MD5
7567 * camel-sasl-plain.[c,h]: new SASL class for PLAIN
7569 * providers/imap/camel-imap-auth.c: Removed the base64 functions.
7571 * camel-mime-utils.c (base64_encode_simple): Moved here from
7573 (base64_decode_simple): Same.
7575 2001-02-26 Dan Winship <danw@ximian.com>
7577 * providers/imap/camel-imap-folder.c (imap_sync): Group messages
7578 into sets with the same flags and use the IMAP message set
7579 notation rather than doing a separate STORE FLAGS for each one.
7580 This cuts the network traffic down to just a handful of commands
7581 per sync rather than one per changed message. Removed the progress
7582 notification stuff since it's no longer meaningful and should
7583 hopefully be unnecessary.
7584 (imap_copy_message_to): move the former sync_message function
7585 into here, since it's no longer shared with imap_sync.
7587 2001-02-26 Jeffrey Stedfast <fejj@ximian.com>
7589 * camel-mime-utils.c: Made thread-safe and moved to above the test
7592 * camel-mime-message.c (camel_mime_message_init): Set the
7594 (camel_mime_message_finalize): Free the message_id.
7595 (camel_mime_message_set_message_id): New function to set the
7597 (camel_mime_message_get_message_id): New function to get the
7599 (process_header): Decode the message-id.
7601 2001-02-24 Jeffrey Stedfast <fejj@ximian.com>
7603 * camel-store.c (construct): init the vTrash folder here instead
7605 (camel_store_class_init): init service_class->construct.
7606 (camel_store_finalize): We only need to unref the vtrash folder.
7607 (init_trash): don't create a vstore since we don't need it.
7609 2001-02-23 Jeffrey Stedfast <fejj@ximian.com>
7611 * camel-store.c (camel_store_class_init): init get_trash and
7613 (camel_store_init): call the virtual init_trash function.
7614 (camel_store_finalize): unref the vtrash folder/store if present.
7615 (camel_store_get_folder): Add the new folder to the vtrash
7617 (init_trash): default implementation of init_trash.
7618 (get_trash): default implementation of get_trash.
7620 * camel-vee-store.c (vee_init_trash): No-op.
7621 (vee_get_trash): return NULL
7623 2001-02-23 Not Zed <NotZed@Ximian.com>
7625 * camel-folder-summary.c (camel_message_info_new_from_header):
7626 Doh, cut and paste problem, use mlist not cc.
7628 * camel-folder.c (move_message_to):
7629 (copy_message_to): If the source folder doesn't support a
7630 summary, dont try and get the message info from it.
7632 * camel-filter-search.c (check_header): Implement a pseudo-header
7633 "x-camel-mlist" which just looks up in the message info for a
7636 * camel-folder-search.c (check_header): Add pseudo-header
7637 "x-camel-mlist" which can be used to match on mailing list.
7639 * providers/imap/camel-imap-folder.c (imap_sync): Add some
7640 internal progress reporting.
7641 (imap_rescan): Do some progress reporting.
7643 * camel-mime-part.c (init_header_name_table): Add the message-id
7644 to the formatted table, so we dont try and wrap it, and break it.
7646 2001-02-22 Jeffrey Stedfast <fejj@ximian.com>
7648 * camel-folder.h: Remove the 'FIXME: remove because this isn't
7649 required...' comment for copy_message_to since we now need and
7650 cherish its existance in the filter-driver code ;-)
7652 * camel-filter-driver.c (camel_filter_driver_filter_message): Now
7653 takes a UID and CamelFolder arguments (which can be NULL) to allow
7654 for possible optimizations when copying messages between folders
7656 (camel_filter_driver_filter_mbox): Updated (passes NULL for both
7657 since this case can't be optimized anyway).
7658 (camel_filter_driver_filter_folder): Updated to pass in the uid
7659 and folder of the message.
7661 2001-02-22 Dan Winship <danw@ximian.com>
7663 * providers/imap/camel-imap-summary.h (CAMEL_IMAP_SERVER_FLAGS):
7664 #define this as the set of all IMAP system flags
7666 * providers/imap/camel-imap-folder.c (sync_message): after syncing
7667 flags, set server_flags to (flags & CAMEL_IMAP_SERVER_FLAGS)
7668 rather than just "flags", since any other flags won't have been
7669 synced. Prevents the CAMEL_MESSAGE_ATTACHMENTS flag from getting
7672 2001-02-22 Not Zed <NotZed@Ximian.com>
7674 * providers/vee/*: Removed all files.
7676 * camel-private.h: Move camel-vee-private.h stuff into here.
7678 * camel-session.c: Move the vee_provider here, and initialise it
7679 always as part of a session. The vfolder provider is always
7682 * providers/Makefile.am: Remove "vee" from the build list, now
7683 built as part of the main library.
7685 * Makefile.am (libcamelinclude_HEADERS):
7686 (libcamel_la_SOURCES): Added camel-vee-store.[ch],
7687 camel-vee-folder.[ch].
7689 * providers/vee/camel-vee-folder.c (vee_folder_build): Removed,
7691 (camel_vee_folder_new): Removed call to build_folder.
7692 (vee_get_message): Dont try and free the mi if we didn't get it.
7694 * camel-folder.c (camel_folder_change_info_new): Added a hash
7695 table of what we have in the lists, plus moved private things into
7697 (camel_folder_change_info_add_source): Fixed up private accesses.
7698 (camel_folder_change_info_add_uid): Changed to use a hashtable to
7699 see if we already have the uid, etc.
7700 (camel_folder_change_info_remove_uid): Similar.
7701 (change_info_remove): Likewise.
7702 (camel_folder_change_info_clear): Fixes for privatisations.
7703 (camel_folder_change_info_free): "
7705 2001-02-21 Dan Winship <danw@ximian.com>
7707 * providers/imap/camel-imap-folder.c (fetch_medium): Fixes for
7708 IMAP4-pre-rev1 from Torsten Schulz.
7710 2001-02-20 Not Zed <NotZed@Ximian.com>
7712 * camel-mime-utils.c (mail_list_magic): Take the ^Header: part out
7713 of the expression, since we look that up ourselves.
7714 (header_raw_check_mailing_list): When getting the match, get match
7715 1, not match 0, we dont want the full string match.
7717 * camel-folder-summary.c (CAMEL_FOLDER_SUMMARY_VERSION): Bumped
7719 (message_info_new): Extract the mlist info from the headers.
7720 (message_info_load): Load mlist from summary.
7721 (message_info_save): Save mlist to summary.
7722 (message_info_free): Save the mlist entry.
7723 (camel_message_info_new_from_header): Extract mailing list header.
7724 (camel_message_info_dup_to): Copy the mlist entry.
7725 (camel_message_info_free): Free mlist.
7726 (message_info_dump): Dump the mlist.
7728 * camel-folder-summary.h: Add an mlist (mailing list) string to
7731 2001-02-19 Not Zed <NotZed@Ximian.com>
7733 * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Added
7735 (message_changed): Add support for the auto-update flag, in which
7736 case we auto-match the content as it changes.
7737 (camel_vee_folder_init): Remoive "DYNAMIC" optionality
7738 (camel_vee_folder_finalise): "
7739 (vee_expunge): As we expunge folders, re-sync their content by
7740 rerunning the query.
7742 * providers/vee/camel-vee-store.c (vee_get_folder): Pass flags to
7745 2001-02-18 Not Zed <NotZed@Ximian.com>
7747 * providers/vee/Makefile.am (noinst_HEADERS): Added
7748 camel-vee-private.h.
7750 * providers/vee/camel-vee-private.h: New file to add locking stuff
7753 * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Add
7754 locking around unmatched setup.
7755 (camel_vee_folder_init): Setup lock.
7756 (camel_vee_folder_finalise): Free locks.
7757 (folder_changed): Add locking.
7758 (unmatched_finalise): "
7759 (message_changed): "
7760 (vee_folder_build): "
7762 2001-02-17 Not Zed <NotZed@Ximian.com>
7764 * providers/vee/camel-vee-folder.c (vee_folder_add): Check uid
7765 doesn't exist before adding it.
7767 2001-02-16 Not Zed <NotZed@Ximian.com>
7769 * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Create
7770 a new virtual virtual folder UNMATCHED, to store all messages that
7771 dont match other vfolders.
7772 (unmatched_folder_changed): When a vfolder issues a changed event,
7773 use its info to update the unmatched folder info.
7774 (unmatched_finalise): When a vfolder is finalised, remove any uids
7775 it has as if we had a removed event for it.
7777 2001-02-16 Jeffrey Stedfast <fejj@ximian.com>
7779 * camel-filter-driver.c (camel_filter_driver_finalise): Thaw the
7781 (camel_filter_driver_set_default_folder): Thaw the defaultfolder
7782 we're about to replace, and freeze the new defaultfolder.
7784 2001-02-15 Jeffrey Stedfast <fejj@ximian.com>
7786 * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Emit
7787 the folder_created signal here.
7789 * providers/local/camel-local-folder.c
7790 (camel_local_folder_construct): Emit the folder_created signal.
7792 * providers/local/camel-local-store.c (delete_folder): On error,
7793 free the 'name' string so we don't leak. Also emit the
7794 folder_deleted signal.
7796 * providers/imap/camel-imap-store.c (subscribe_folder): Emit the
7797 folder_created signal.
7798 (unsubscribe_folder): Emit the folder_deleted signal.
7800 * camel-store.c (camel_store_class_init): Added folder_created and
7801 folder_deleted signal defs.
7803 2001-02-15 Dan Winship <danw@ximian.com>
7805 * camel-folder-thread.c (container_parent_child): Deal with
7806 out-of-order References headers so they don't cause messages to
7807 disappear in threaded view.
7809 * providers/imap/camel-imap-folder.c (fetch_medium): IMAP4
7810 (pre-rev1) doesn't allow BODY.PEEK[], so use RFC822.PEEK instead
7813 2001-02-14 Christopher James Lahey <clahey@ximian.com>
7815 * camel-mime-filter-charset.c (complete, filter),
7816 camel-mime-utils.c (rfc2047_decode_word, rfc2047_encode_word):
7817 Changed this code to match the glibc iconv signature.
7819 2001-02-14 Dan Winship <danw@ximian.com>
7821 * camel-store.c (camel_store_create_folder): New method to create
7822 a folder when you don't know its full name.
7824 * providers/imap/camel-imap-store.c (create_folder): Implement.
7825 (create_folder): Oops, and fix bug involving namespaces
7827 2001-02-12 Not Zed <NotZed@Ximian.com>
7829 * camel-mime-part.c (init_header_name_table): Add address headers
7830 to list that we dont fold when writing. The are properly
7831 formatted as we build them.
7832 (write_to_stream): DOH, lookup the header name in the formatted
7833 hash table, not the value, that would never have worked.
7835 * camel-internet-address.c
7836 (camel_internet_address_encode_address): Changed to take a
7837 parameter saying how much we've printed so far. We now fold the
7838 header as we format it. We dont fold addresses, even if they are
7839 too long, we simply put them on another line by themselves: this
7840 should make the result more parsable by mailers that can't handle
7841 split up addresses (which are legal).
7842 (internet_encode): Fix for changes to above.
7844 2001-02-12 Jeffrey Stedfast <fejj@ximian.com>
7846 * providers/local/camel-local-provider.c: mbox, mh, and maildir
7847 camel-url's need absolute paths.
7849 * camel-provider.h (CAMEL_URL_PATH_IS_ABSOLUTE): New flaggy flag.
7851 2001-02-08 Dan Winship <danw@ximian.com>
7853 * camel-store.c: Rewrite a bunch. Replace the existing folder
7854 cache stuff with much simpler code that still handles all the
7855 existing cases. Now the folder hash table is always created by the
7856 base class, using hash and compare functions provided by the class
7857 implementation. (If they are set to NULL, CamelStore won't cache
7858 folders.) lookup_folder, cache_folder, and uncache_folder are no
7859 longer class methods, and get_name is gone completely.
7861 (camel_store_get_inbox): Renamed from
7862 camel_store_get_default_folder, since that wasn't being used, and
7863 this is what we actually need.
7864 (camel_store_get_root_folder): Removed, since it's not needed for
7865 anything given get_folder_info.
7867 * camel-remote-store.c:
7868 * providers/local/camel-local-store.c:
7869 * providers/local/camel-mbox-store.c:
7870 * providers/local/camel-mh-store.c:
7871 * providers/local/camel-maildir-store.c:
7872 * providers/nntp/camel-nntp-store.c:
7873 * providers/pop3/camel-pop3-store.c:
7874 * providers/vee/camel-vee-store.c: Minor updates for CamelStore
7877 * providers/imap/camel-imap-store.c (camel_imap_store_class_init):
7878 Update for CamelStore changes.
7879 (hash_folder_name, compare_folder_name): treat INBOX
7880 case-insensitively, otherwise use g_str_hash and g_str_equal.
7882 * camel-service.c (camel_service_construct): Remove
7883 camel_service_new and create camel_service_construct (as a class
7884 method) in its place.
7886 * camel-session.c (camel_session_get_service): Use
7887 camel_object_new and camel_service_construct to replace
7890 * providers/local/camel-local-store.c (construct): Append a '/' to
7891 the URL path if it doesn't end with one
7893 2001-01-31 Jeffrey Stedfast <fejj@helixcode.com>
7895 * camel-tcp-stream-ssl.c: Oops, include the camel-tcp-stream-ssl
7896 header instead of the raw one.
7898 2001-02-07 Not Zed <NotZed@Ximian.com>
7900 * camel-operation.c (camel_operation_start): Changed to push the
7901 operation into a status stack.
7902 (camel_operation_progress): Changed to only accept % complete.
7903 (camel_operation_reset): Free status stack as well.
7905 * providers/pop3/camel-pop3-folder.c (pop3_get_message): Get the
7906 octect count from the return line, and pass it to
7907 get_additional_data().
7908 (pop3_refresh_info): Added status stuff.
7910 * providers/pop3/camel-pop3-store.c
7911 (camel_pop3_command_get_additional_data): Added a total bytes
7912 expected argument for progress reporting & fixed callers.
7913 (camel_pop3_command_get_additional_data): Added progress
7916 * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
7917 (mbox_summary_sync_quick):
7918 (summary_rebuild): Added progress reporting stuff.
7920 2001-02-07 Jeffrey Stedfast <fejj@ximian.com>
7922 * camel-search-private.c (CAMEL_SEARCH_COMPARE): Macro for making
7924 (camel_ustrcasecmp): Use CAMEL_SEARCH_COMPARE and check for
7925 end-of-string before the utf-8 error check.
7926 (camel_ustrncasecmp): Same.
7927 (camel_search_header_match): Strip leading spaces before doing
7928 anything else. Also use vlen and mlen so as to not need to do 500
7930 (camel_ustrcasecmp): Don't get_utf8() for the 2 strings in the
7931 comparison part of the loop because of short-circuit expression
7932 evaluation. (blame JPR if this is the wrong term!)
7933 (camel_ustrncasecmp): Same.
7935 2001-02-06 Jeffrey Stedfast <fejj@ximian.com>
7937 * camel-search-private.c (utf8_get): Rewrote using unicode_get_utf8().
7938 (camel_ustrcasecmp): Use unicode_char_t
7939 (camel_ustrncasecmp): Same.
7941 2001-02-06 Christopher James Lahey <clahey@ximian.com>
7943 * camel-mime-filter-charset.c (complete, filter),
7944 camel-mime-utils.c (rfc2047_decode_word, rfc2047_encode_word):
7945 Made these pass char ** as the second parameter to iconv.
7947 2001-02-06 Not Zed <NotZed@Ximian.com>
7949 * camel-session.c: Removed all the camel_cancel stuff.
7951 * camel-stream-fs.c (stream_read): Change to use camel_operation.
7954 * camel-remote-store.c (socket_connect): Change to use
7955 camel_operation rather than camel_cancel stuff.
7956 Removed gal include, WTF is that doing there anyway?
7958 * Makefile.am (libcamel_la_SOURCES):
7959 (libcamelinclude_HEADERS): Added camel-operation.[ch], stuff to
7960 handle notification and cancellation.
7962 * camel-search-private.c: Removed unwanted header. It was never
7963 put in for a reason. Stop fixing irrelevant warnings.
7965 (camel_ustrstrcase): Our own strstrcase impl for utf8 strings.
7966 (camel_ustrcasecmp): Ditto for strcasecmp.
7967 (camel_ustrncasecmp): And strncasecmp.
7968 (utf8_get): Simpler interface to utf8 string processing.
7969 (camel_search_header_match): Use the new things.
7971 2001-02-05 Not Zed <NotZed@Ximian.com>
7973 * camel-folder.c (get_summary): Removed some old variables/a small
7975 (free_summary): Removed old variables.
7977 * camel-mime-utils.c (header_raw_check_mailing_list): New utility
7978 function to get the mailing list (if any) that a set of headers
7981 2001-02-05 Christopher James Lahey <clahey@helixcode.com>
7983 * camel-stream-fs.c: Added a missing #include.
7985 * camel-search-private.c: Added a missing #include.
7987 2001-02-05 Jeffrey Stedfast <fejj@ximian.com>
7989 * camel-remote-store.c (remote_query_auth_types): Oops. Change
7992 * providers/smtp/camel-smtp-transport.c (query_auth_types): Updated.
7994 * providers/nntp/camel-nntp-store.c (nntp_store_query_auth_types):
7997 * providers/pop3/camel-pop3-store.c (query_auth_types): Updated.
7999 * providers/imap/camel-imap-store.c (query_auth_types): Updated.
8001 * camel-service.c (camel_service_query_auth_types): Now takes a
8002 boolean value to specify whether or not to connect when
8003 constructing a supported authtype list.
8005 2001-02-05 Not Zed <NotZed@Ximian.com>
8007 * camel-stream-filter.c (do_write): Revert jeff's earlier change,
8008 the change below is the more-correct fix. All his was doing was
8009 ignoring the return code & looping actually :)
8011 * camel-stream-fs.c (stream_write): Since we are non-blocking on
8012 the outgoing fd, keep looping if writing out large blocks, so we
8013 can keep checking for cancel, etc.
8015 2001-02-02 Not Zed <NotZed@Ximian.com>
8017 * camel-folder-thread.c (camel_folder_thread_messages_new): When
8018 we drop a fake node, dont skip checking the next in the list.
8019 (camel_folder_thread_messages_new): Add an assertion check just to
8020 make sure we dont get any pseudo nodes, and spit a warning if we
8023 2001-02-04 Jeffrey Stedfast <fejj@ximian.com>
8025 * camel-stream-filter.c (do_write): Make do_write loop until the
8026 entire buffer is written.
8028 2001-02-02 Not Zed <NotZed@Ximian.com>
8030 * camel-stream-fs.c: Add missing header for cancel check stuff.
8032 * camel-session.c (camel_cancel_cancel): Fix a wrong cast.
8034 * camel-mime-part.c (init_header_name_table): Setup a new table
8035 header_formatted_table, that lists headers that we dont want to
8036 fold (they've already been folded).
8037 (write_to_stream): Check for already formatted headers, and dont
8038 try and fold them. This is a fix for bug #1097.
8040 2001-02-01 Not Zed <NotZed@Ximian.com>
8042 * camel-mime-utils.c (header_fold): If we are folding, drop the
8043 space at the end of the line.
8045 2001-01-30 Not Zed <NotZed@Ximian.com>
8047 * camel-remote-store.c (timeout_cb): Remvoe the stream locking
8048 here. I think this was leading to a deadlock when a keepalive is
8049 being sent, in imap.
8051 2001-01-29 Not Zed <NotZed@Ximian.com>
8053 * providers/imap/camel-imap-command.c
8054 (imap_command_strdup_vprintf): Include the terminating NUL in the
8055 calculated string length. This hit memcheck.
8057 2001-01-25 Not Zed <NotZed@Ximian.com>
8059 * tests/folder/test3.c: Changed the subject search to handle case
8060 sensitive when it is mixed case.
8062 * Makefile.am (libcamel_la_SOURCES): Added camel-ssearch-private.c
8063 (noinst_HEADERS): Added camel-search-private.h
8065 * camel-folder-search.c (check_header): New function to do the
8066 work of the various header checks.
8067 (search_header_matches):
8068 (search_header_starts_with):
8069 (search_header_ends_with):
8070 (search_header_contains): Use check_header to do the work.
8071 (build_match_regex): Removed.
8073 * camel-search-private.c (header_soundex): New
8074 function to match words to phrases using soundex algorithm.
8076 * camel-filter-search.c (soundexcmp): Removed.
8077 (check_match): Moved to search-private.h
8079 2001-01-24 Not Zed <NotZed@Ximian.com>
8081 * camel-search-private.c (camel_search_build_match_regex): Added
8082 extra flags, so the same function can be used for
8083 start/end/whole/partial matches.
8084 (camel_search_header_match): Convenience function to check a
8085 single header against all sorts of different matches.
8087 * providers/imap/camel-imap-search.c (imap_body_contains): Fix for
8090 * camel-folder-search.c: Fix for e_sexp api changes.
8091 (search_header_contains): Free args/quit on unknown header.
8092 (search_header_matches): "
8093 (search_header_starts_with): "
8094 (search_header_ends_with): "
8095 (match_message): Add an exception argument.
8096 (search_body_contains): Free args/quit on fatal error.
8097 (message_body_contains): Removed (moved to
8098 camel-search-private.c), fixed callers.
8100 * camel-filter-search.c: Fix for e_sexp api changes.
8101 (build_match_regex, message_body_contains): Moved into
8102 camel-filter-private.c Fixed callers.
8103 (check_header): moved guts to camel-search-private, and
8104 changed to use regex's for everything. Just calls that with the
8106 (check_header): GEts the header, decodes it, and checks for
8107 failure, and whatnot.
8108 (check_match): Removed.
8109 (header_soundex): Changed significantly. Now it soundexes each
8110 word in the header separately, and compares it to the first
8113 * tests/folder/test9.c (main): Fix for api changes.
8114 (main): Added tests to see that invalid match and action
8115 rules are properly detected.
8117 * camel-filter-driver.c (camel_filter_driver_filter_mbox): Remove
8118 the 'finished message' bit.
8119 (camel_filter_driver_filter_message): Remove an accidentally
8121 (camel_filter_driver_filter_message): Fix for e-sexp api changes.
8123 2001-01-23 Dan Winship <danw@ximian.com>
8125 * providers/imap/camel-imap-wrapper.c: Add a lock around the
8126 delayed loading, so two threads won't try to do it at the same
8129 2001-01-22 Dan Winship <danw@ximian.com>
8131 * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Set the
8132 CamelFolder::name to just the base part of the vfolder name (the
8135 2001-01-23 Not Zed <NotZed@Ximian.com>
8137 * camel-filter-search.c (camel_filter_search_match): Perform error
8138 checking on parsing/execution.
8140 * camel-folder-search.c (camel_folder_search_execute_expression):
8141 Perform error handling on search expression.
8142 (CamelFolderSearchPrivate): Add a camelexception for error
8144 (camel_folder_search_execute_expression): Setup exception pointer.
8145 (search_match_all): Quit on error.
8147 * providers/imap/camel-imap-summary.c (message_info_load): Removed
8148 some debug 'warnings', as they should now be displayed at the
8149 toplevel loader, and just made the code match similar code
8152 * providers/local/camel-mbox-summary.c (message_info_load): Error
8154 (message_info_save): more error handling.
8156 * camel-folder-summary.c (message_info_load): Add error handling
8157 and sanity checking.
8158 (camel_folder_summary_load): Add error checks.
8159 (perform_content_info_load): Error + sanity checks.
8160 (content_info_load): error + sanity checks.
8162 * camel-filter-driver.c (close_folder): avoid /0 by updating after
8163 we've done the sync.
8164 (close_folders): Setup the first progress report to start it off.
8165 (camel_filter_driver_filter_message): Fix a fixme, check errors in
8166 e_sexp parsing, etc.
8168 2001-01-22 Christopher James Lahey <clahey@helixcode.com>
8170 * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
8171 Initialize the value of the variable exists here.
8173 2001-01-22 Not Zed <NotZed@Ximian.com>
8175 * .cvsignore */*/.cvsignore: Added profiling temp
8178 * camel-folder-thread.c (camel_folder_thread_messages_new): When
8179 removing phantom nodes, check for the end node too.
8181 * camel-filter-driver.[ch]: Changed status vars to be
8182 CAMEL_FILTER_STATUS_ etc.
8184 2001-01-21 Jeffrey Stedfast <fejj@ximian.com>
8186 * camel-mime-utils.c (header_param_list_format_append): Make the
8187 output a little prettier. Okay, so I'm anal...
8189 2001-01-21 Not Zed <NotZed@Ximian.com>
8191 * camel-filter-driver.h: Added an exception to
8192 CamelFilterGetFolderFunc.
8194 * camel-filter-driver.c (camel_filter_driver_filter_message):
8195 Remove source parameter, as it is determined elsewhere now.
8196 (camel_filter_driver_filter_folder): Same here.
8197 (camel_filter_driver_filter_mbox): And here.
8198 (do_move): If we cannot open a folder, quit, rather than ignoring
8200 (do_copy): Here too.
8201 (open_folder): Pass an exception into get_folder callback.
8202 (camel_filter_driver_filter_folder): Report that we're syncing,
8204 (camel_filter_driver_filter_mbox): And here too.
8205 (close_folder): And here.
8207 2001-01-19 Jeffrey Stedfast <fejj@ximian.com>
8209 * camel-filter-driver.c (camel_filter_driver_filter_message): Set
8210 the deleted bit *before* copying to the default folder, this way
8211 if they are importing mail and have a rule to delete it, it
8212 doesn't get copied to the default folder un-deleted.
8214 2001-01-19 Dan Winship <danw@ximian.com>
8216 * providers/imap/camel-imap-store.c
8217 (get_subscribed_folders_by_hand): If LISTing a subscribed folder
8218 doesn't return a LIST response, just ignore that folder. Yay
8220 (subscribe_folder): add a missing UNLOCK
8222 2001-01-19 Kjartan Maraas <kmaraas@gnome.org>
8224 * providers/smtp/camel-smtp-provider.c: Mark strings for translation.
8226 2001-01-19 Not Zed <NotZed@Ximian.com>
8228 * camel-filter-driver.c (report_status): Add a percentage complete
8229 indicator to the status thing.
8230 (camel_filter_driver_filter_mbox): Add percentage complete to
8232 (camel_filter_driver_filter_folder): Same.
8234 2001-01-18 Dan Winship <danw@ximian.com>
8236 * camel-store.c (camel_folder_info_build): More tweaking... skip
8237 separator characters after the namespace character. (Gets rid of
8238 the shell folder registration warning some people have had with
8241 * providers/imap/camel-imap-store.c (imap_connect): I'm sure there
8242 was some clever reason I was storing the flags of the folder in
8243 the hash table rather than just "1", but I don't remember what it
8244 was now. Anyway, since we only ever test NULL/non-NULL, store 1,
8245 since flags is sometimes 0.
8247 * providers/imap/camel-imap-folder.c (imap_update_summary): Oops.
8248 Somewhere in one of the reorgs, the code to add new messages to
8249 the CamelFolderChangeInfo structure got removed. Fix that.
8251 2001-01-17 Jeffrey Stedfast <fejj@ximian.com>
8253 * providers/imap/camel-imap-summary.c (message_info_load): Add
8254 some g_warnings() to help debug later if I ever get the segfaults
8255 I was getting earlier. Can't seem to reproduce them after my
8258 * camel-folder-summary.c (camel_folder_summary_load): Undid my
8259 change here, NotZed said it was wrong and that if it gets a NULL
8260 mi then it should abort and not continue.
8262 2001-01-17 Jeffrey Stedfast <fejj@ximian.com>
8264 * camel-folder-summary.c (camel_folder_summary_load): Make sure
8265 that the message-info is non-null before we go accessing inner
8266 parts of it and/or adding it to the summary array. I may not have
8267 handled the error correctly, but it does seem to work
8268 correctly. If NotZed could double-check this it'd be great.
8270 * providers/smtp/camel-smtp-transport.c (get_smtp_error_string):
8271 New smtp error-code to string mapping function.
8272 (smtp_connect): Use the new error->string function for reporting
8274 (smtp_helo): Same. Also use a case-insensitive strstr for 8BITMIEM
8275 as it seems Exchange sends back lowercase for that one single SMTP
8276 extension. Everything else is uppercase. I'm seeing a lack of love
8277 for that extension by Microsoft dudes...
8278 (smtp_mail): Use get_smtp_error_string.
8284 2001-01-16 Jeffrey Stedfast <fejj@ximian.com>
8286 * camel-folder-summary.c (camel_folder_summary_array): Add an int
8287 i so this code will compile. Should I be worried about how well
8288 this code will work? ;-)
8290 2001-01-17 Not Zed <NotZed@Ximian.com>
8292 * camel-folder.c (free_summary): Call
8293 camel_folder_summary_array_free() to do the work.
8294 (get_summary): Use camel_folder_summary_array() to get the array
8295 atomically. These fixes allow folder/test8 to work again, and fix
8296 a sort of race where the summary size can change while we were
8297 making a copy of it.
8299 * camel-folder-summary.c (camel_folder_summary_array): Get the
8300 summary array atomically, so it can't contain empty records.
8301 (camel_folder_summary_array_free): And free it.
8303 * tests/lib/camel-test.c (die): If we are verbose & in threads,
8304 then goto sleep so we can debug.
8306 * tests/folder/test8.c (worker): Add a missing pull() for
8309 * camel-filter-search.c: Fix the symbol table, so match-all is an
8310 immediate function, as it should be.
8312 * tests/folder/test9.c (main): New test, tests some filtering
8315 * tests/message/test3.c (main): Dont use a boundary string with
8316 spaces in it. Folding can corrupt it. Maybe the folding isn't
8317 working entirely right, but anyway.
8319 * camel-session.c: Debug out the debug.
8321 * camel-filter-driver.c (camel_filter_driver_filter_folder): Plug
8324 2001-01-16 Dan Winship <danw@ximian.com>
8326 Delayed loading of IMAP message parts.
8328 * camel-types.h: typedef CamelMessageInfo and
8329 CamelMessageContentInfo here
8331 * camel-folder-summary.h: Add a "size" field to
8332 CamelMessageContentInfo.
8334 * camel-folder-summary.c (camel_folder_summary_content_info_new,
8335 camel_folder_summary_content_info_free): Renamed and made
8336 non-static for providers that construct their own content info.
8337 (content_info_load, content_info_save): load/save size
8339 * camel-data-wrapper.c (camel_data_wrapper_is_offline): New
8340 function to return if a data wrapper's contents are "offline". (So
8341 that, for example, we don't make thumbnails of images that haven't
8342 been loaded off the IMAP server yet.) Defaults to FALSE.
8344 * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
8345 Fix a bug in re-selecting a folder when messages have been
8346 expunged from it by another client in the meantime.
8347 (imap_get_message): Rewrite. If the message is larger than a
8348 certain size, just create a skeleton message containing
8349 CamelImapWrappers that will read parts as needed. This way, large
8350 attachments only need to be downloaded if the user looks at them,
8351 and multipart/alternative alternatives that aren't used will never
8352 be downloaded at all.
8353 (imap_update_summary): Rewrite this a bunch too to make the
8354 parsing more robust.
8356 * providers/imap/camel-imap-summary.c
8357 (CAMEL_IMAP_SUMMARY_VERSION): bump.
8358 (camel_imap_summary_new): Set build_content to TRUE.
8359 (content_info_load, content_info_save): Only save/load the content
8360 for messages that have it. (The content info gets created as a
8361 side effect of imap_get_message.)
8363 * providers/imap/camel-imap-utils.c (imap_parse_body): New routine
8364 (and helpers) to parse an IMAP 'body' FETCH response and fill in a
8365 CamelMessageContentInfo from it.
8367 * providers/imap/Makefile.am (libcamelimap_la_SOURCES,
8368 libcamelimap_la_HEADERS): add camel-imap-wrapper.
8370 2001-01-16 Dan Winship <danw@ximian.com>
8372 * camel-tcp-stream-raw.c (stream_getsockopt, stream_setsockopt):
8373 * camel-stream-fs.c (stream_read, stream_write):
8374 * camel-remote-store.c (socket_connect): fcntl(fd, F_GETFL)
8375 returns the flags as the return value, not via a passed in
8376 pointer. And F_SETFL looks for an int, not a long, and you have to
8377 pass it what it's expecting because it's a va_arg parameter. (Yes,
8378 the man page lies on Linux. But check the UNIX98 spec or the glibc
8379 source.) Also, fix another bug in socket_connect: if we manage to
8380 connect right away, unset O_NONBLOCK so it doesn't mess us up
8383 Fixes a bunch of problems with non-blocking I/O being done in the
8384 allegedly-blocking case and then returning EWOULDBLOCK.
8386 2001-01-16 Chris Toshok <toshok@ximian.com>
8388 * providers/Makefile.am (NNTP_DIR): set to nntp if ENABLE_NNTP
8389 (SUBDIRS): use $(NNTP_DIR)
8391 2001-01-16 Jeffrey Stedfast <fejj@ximian.com>
8393 * providers/smtp/camel-smtp-transport.c (smtp_rcpt): Don't check
8394 errno as it's not being set. Fixes bug #1150.
8396 2001-01-16 Jeffrey Stedfast <fejj@ximian.com>
8398 Ugh, this design is ugly like my butt.
8400 * camel-session.c (camel_session_query_cert_authenticator): New
8401 function which will be useful when we integrate SSL.
8403 * camel-tcp-stream-ssl.c (ssl_auth_cert): Callback to authenticate
8405 (ssl_bad_cert): Callback that gets the reason the certificate is
8406 bad and then calls camel's cert-authenticator callback to notify
8407 the user and to allow the user to override the check.
8408 (stream_connect): Set the URL we expect to connect with and setup
8409 the auth_cert and bad_cert callbacks.
8410 (camel_tcp_stream_ssl_new): Now takes a CamelSession and a
8411 expected_host argument that it will use for certificate
8413 (camel_tcp_stream_ssl_finalize): Unref the session and free the
8416 2001-01-16 Not Zed <NotZed@Ximian.com>
8418 * camel-filter-search.c (header_exists): Changed to support
8419 multiple args (or'd together).
8420 (header_contains): Cleaned up to match the search code. Why did
8421 fejj change it? I'll never know.
8423 (header_starts_with):
8424 (header_ends_with): Big cleanup of fejj's "i'm the cut & paste
8425 king" code. Also properly handle or'ing of additional args to
8426 match what the folder-search code should do.
8427 (check_match): New function which does the annoying matching
8428 stuff (for header matches).
8429 (check_header): Similarly, handles or'ing of the matches together.
8432 (header_starts_with):
8433 (header_ends_with): Call check_header to do the actual work.
8434 (header_soundex): And here too.
8435 (match_all): Yeah like match-all isn't passed expression results,
8436 its passed expression terms. Fix this so match-all works like it
8437 should, by executing the contained expression.
8438 (message_body_contains): Copied directly from
8439 camel-folder-search.c, a more robust/faster/simpler body search
8441 (mime_part_matches): Removed entirely.
8442 (handle_multipart): Removed entirely.
8443 (build_match_regex): Copied from camel-folder-search. Builds a
8444 set of simple strings into a regex pattern that matches any of
8445 them (for faster & simpler matching). Expanded to accept regex
8446 patterns itself, so it can merge them together.
8447 (body_contains): Use build match/match message to match using a
8449 (body_regex): Likewise, this time we tell it we're building a
8451 (header_full_regex): Use build_match_regex to take the drudgery
8452 out of it, and expand it to handle multiple regex's at once.
8453 (get_full_header): slightly cleaner (well i dunno, the sprintf
8454 stuff just got to me).
8455 (header_regex): Cleaned up to use build_match_Regex too, and to
8456 properly check types.
8457 (filter_message_search): Just allocate 'fms' on the stack.
8459 * camel-filter-driver.c (camel_filter_driver_finalise):
8460 (camel_filter_driver_init):
8461 (camel_filter_driver_class_init):
8462 (camel_filter_driver_get_type): Changed from gtk object to camel
8464 (camel_filter_driver_add_rule): New function to add a rule to be
8465 processed in sexp form.
8466 (camel_filter_driver_init): Init the rules list.
8467 (camel_filter_driver_finalise): Clear the rules/rules list.
8468 (camel_filter_driver_filter_message): Scan rules list directly
8469 rather than creating on the fly.
8471 * Makefile.am (libcamelinclude_HEADERS): Added camel-filter-driver.h
8472 (libcamel_la_SOURCES): Added camel-filter-driver.c, code taken
8473 from filter-driver, which can drive, uh, filters based on sexp's.
8474 (libcamelinclude_HEADERS):
8475 (libcamel_la_SOURCES): Added camel-filter-search.[ch]
8477 * camel-folder-summary.c (camel_folder_summary_decode_string):
8478 Chganged len back to be unsigned. And do a simple range check on
8479 the string value to try and detect corrupted summary files.
8481 * providers/imap/camel-imap-command.c (imap_read_untagged): Handle
8482 cancelled stream reads with an appropriate exception.
8484 * providers/imap/camel-imap-private.h: Fix the include-once
8485 macro. Doh, confliced with camel-private.h.
8487 * providers/imap/camel-imap-store.c (imap_store_refresh_folders):
8488 A copy of camel_remote_store_refresh_folders. We avoid locking
8489 each folder when we call it though. This should be removed when i
8490 can work out how to remove the folder lock from this function
8493 * camel-stream-fs.c (stream_write): Fix n' argument of select.
8494 (stream_read): Likewise.
8496 * camel-remote-store.c (socket_connect): Bump the connect timeout
8498 (socket_connect): Oops, fix the 'n' argument of select.
8500 * camel-session.c (camel_cancel_cancel): If we are given no
8501 cancellation node, then do it for all active ones.
8503 2001-01-15 Jeffrey Stedfast <fejj@ximian.com>
8505 * camel-stream-fs.c (stream_close): If the close() is successful,
8508 * camel-tcp-stream-raw.c: Removed the disconnect() method.
8509 (stream_close): If the close() is successful, set the sockfd to
8512 * camel-tcp-stream-ssl.c: Removed the disconnect() method.
8513 (stream_close): If the close() is successful, set the sockfd to
8516 * camel-tcp-stream.c (camel_tcp_stream_disconnect): Removed,
8517 easier to just use the close() method as it did the same thing
8520 2001-01-15 Jeffrey Stedfast <fejj@ximian.com>
8522 * camel-tcp-stream-raw.c (stream_getsockopt): Updated to be able
8523 to get the CAMEL_SOCKOPT_NONBLOCKING socket opt.
8524 (stream_setsockopt): Updated to be able to set the
8525 CAMEL_SOCKOPT_NONBLOCKING socket opt.
8527 2001-01-15 Peter Williams <peterw@ximian.com>
8529 * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Lock
8530 around the imap_rescan, which needs it.
8532 2001-01-15 Not Zed <NotZed@Ximian.com>
8534 * camel-remote-store.c (socket_connect): A cancellable connection
8536 (remote_send_string): Return cancelled exception if we were.
8537 (remote_send_stream): "
8538 (remote_recv_line): "
8540 * camel-stream-fs.c (stream_read): First cut at cancellation
8541 stuff. Its looking a bit ugly.
8543 2001-01-15 Jeffrey Stedfast <fejj@ximian.com>
8545 * camel-tcp-stream-ssl.c (stream_connect): Uses an SSL socket now
8546 although there's still a few things missing (like certificate
8549 * camel.c (camel_ssl_init): A replacement function for
8550 camel_init() that also initializes SSL.
8552 2001-01-14 Jeffrey Stedfast <fejj@ximian.com>
8554 * camel-tcp-stream-ssl.c (stream_getsockopt): Implemented.
8555 (stream_setsockopt): Implemented.
8557 * camel-tcp-stream-raw.c (stream_getsockopt): Implemented.
8558 (stream_setsockopt): Implemented.
8560 * camel-tcp-stream.c (camel_tcp_stream_getsockopt): New method.
8561 (camel_tcp_stream_setsockopt): Another new method. I think you get
8562 the idea of what these are for so I won't explain them.
8564 2001-01-14 Jeffrey Stedfast <fejj@helixcode.com>
8566 * camel-tcp-stream-ssl.[c,h]: New CamelTcpStream class that
8567 implements nspr sockets and eventually will use nss for
8568 SSL/TLS. Currently doesn't do any SSL/TLS but it should still
8569 work. It's functionally equivalent to CamelTcpStreamRaw at the
8570 moment only it uses nspr i/o.
8572 * camel-tcp-stream-raw.[c,h]: New CamelTcpStream class that
8573 implements native sockets. Should be usable but may have some bugs
8576 2001-01-13 Jeffrey Stedfast <fejj@ximian.com>
8578 * camel-tcp-stream.[c,h]: New abstract class for TCP streams. The
8579 next step is to write child classes (CamelTcpStreamBSD and
8580 CamelTcpStreamSSL). The BSD stream will use normal BSD sockets
8581 while SSL will use Mozilla's NSPR and NSS libraries to do Secure
8582 Socket Layers which wille ventually replace CamelStreamSSL which I
8583 just commit'd. Oh well.
8585 2001-01-13 Jeffrey Stedfast <fejj@ximian.com>
8587 * camel-stream-ssl.[c,h]: New stream for handling SSL/TLS
8590 2001-01-12 Not Zed <NotZed@Ximian.com>
8592 * camel-folder-thread.c (camel_folder_thread_messages_new):
8593 Perform a final pass, removing any pseudo nodes we added earlier.
8594 Quick patch to test the idea.
8595 (camel_folder_thread_messages_new): Added casts to rmeove some
8596 warnings for the analites out there.
8598 2001-01-11 Dan Winship <danw@ximian.com>
8600 * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
8601 Fix a bug in previous commit: don't check for deleted messages if
8602 there are no known messages in the folder (because it would end up
8603 sending "FETCH 0 ...").
8604 (imap_copy_message_to): Fix this up: sync flags to the server
8605 before copying so that they end up correct in the remote folder.
8606 And poke the destination folder after doing the copy so it notices
8607 the new message right away.
8608 (imap_move_message_to): Call imap_copy_message_to for most of the
8609 work rather than duplicating the code (since it's much more
8612 2001-01-11 Dan Winship <danw@ximian.com>
8614 * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
8615 New function to check for added/deleted messages when re-selecting
8617 (imap_refresh_info, imap_rescan, imap_update_summary): Various
8618 locking tweaks that turn out to be irrelevant since command_lock
8619 is recursive, but whatever.
8621 * providers/imap/camel-imap-command.c (camel_imap_command): When
8622 selecting a new folder, call camel_imap_folder_selected on it.
8624 * camel-folder.c (camel_folder_copy_message_to): Fix a locking
8625 problem. (One branch of an if statement was returning with the
8626 lock still locked.) Also remove the deprecation comments, to match
8629 2001-01-10 Jeffrey Stedfast <fejj@helixcode.com>
8631 * providers/local/camel-local-provider.c: Changed the descriptions
8632 for mh, mbox, and maildir to be more "user-friendly".
8634 2001-01-10 Dan Winship <danw@helixcode.com>
8636 * providers/imap/camel-imap-types.h: New header to prevent
8637 recursive #include problems
8639 * providers/imap/*.h: Replace some #includes with #include
8640 "camel-imap-types.h", remove typedefs that were moved to
8643 * providers/imap/*.c: Add #includes to make up for #includes
8644 removed from .h files
8646 * providers/imap/Makefile.am (libcamelimapinclude_HEADERS): Add
8649 2001-01-10 Dan Winship <danw@helixcode.com>
8651 * camel-store.c (camel_store_sync): New class function, parallel
8652 to camel_folder_sync. (The default implementation just calls
8653 camel_folder_sync on each cached folder.)
8655 * providers/imap/camel-imap-store.c (get_folder_info): Call
8656 camel_store_sync before doing anything else so that the IMAP
8657 server and Camel are working from the same data. Don't ask the
8658 server for the unread message count of the current folder, since
8659 UW will return often-incorrect cached data, and we can calculate
8660 it without talking to the server anyway.
8662 2001-01-09 Dan Winship <danw@helixcode.com>
8664 Mostly IMAP changes. Use the NAMESPACE extension (where
8665 available). Deal with servers that don't return LIST flags in
8666 response to LSUB (like UW) to get rid of the "not a selectable
8667 folder" error messages in the UI. Take advantage of the \Marked
8668 and \Unmarked flags to try to speed up the folder scan by not
8669 doing STATUS on unmarked folders. Some further tweaks on the shape
8670 of the resulting folder tree in various situations...
8672 * camel-store.h: Remove the (read) message_count, since nothing
8673 uses it, and we can speed up IMAP a bit this way.
8675 * camel-store.c (camel_folder_info_build): Redo this a bit to make
8676 it more useful for IMAP since that's the only thing that uses it.
8678 * camel-remote-store.c (camel_remote_store_connected): Public
8679 function to check if the store is connected, and try to connect it
8681 (remote_send_string, remote_send_stream, remote_recv_line): Use
8684 * providers/imap/camel-imap-store.c (camel_imap_store_finalize):
8686 (camel_imap_store_init): Initialize subscribed_folders to NULL
8687 rather than an empty hash table.
8688 (imap_connect): Get the list of subscribed folders here. If the
8689 server doesn't claim that any of them are either Marked or
8690 Unmarked, then assume that it doesn't do that for LSUB and
8691 remember that for later. If the server supports the NAMESPACE
8692 extension and the user didn't specify a namespace, use the
8693 server-provided one.
8694 (imap_disconnect): Free the list of subscribed folders, and the
8696 (get_folder): check camel_remote_store_connected
8697 (get_folder_info): check camel_remote_store_connected. Add a bunch
8698 of new cleverness. If we learned that the server doesn't do LSUB
8699 usefully, do a bunch of LISTs by hand. Then, if we're getting
8700 unread counts, only do it for folders that weren't listed as
8701 Unmarked. Also, deal with namespaces that end with the separator
8702 character, and update for changes to camel_folder_info_build.
8703 (folder_subscribed): Add a g_return_val_if_fail.
8704 (subscribe_folder, unsubscribe_folder): check
8705 camel_remote_store_connected.
8707 * providers/nntp/camel-nntp-store.c (build_folder_info,
8708 build_folder_info_from_grouplist, nntp_store_get_folder_info):
8709 Don't fill in message_count since it doesn't exist any more.
8711 2001-01-09 Dan Winship <danw@helixcode.com>
8713 Kill off a long-hated Camel kludge: "empty" URLs and
8714 query_auth_types_generic.
8716 * camel-url.c: Remove "empty" from CamelURL.
8717 (camel_url_new): No longer set it.
8718 (camel_url_to_string): Treat "" as equivalent to NULL for
8719 authmech. (Unrelated change, but it simplifies some stuff with the
8722 * camel-service.c (camel_service_new): Remove url->empty check: if
8723 the URL isn't valid, we don't create the service.
8724 (camel_service_query_auth_types): No longer need to switch between
8725 generic and connected variants.
8727 * providers/smtp/camel-smtp-transport.c (query_auth_types):
8728 * providers/pop3/camel-pop3-store.c (query_auth_types):
8729 * providers/nntp/camel-nntp-store.c (nntp_store_query_auth_types):
8730 * providers/imap/camel-imap-store.c (query_auth_types):
8731 * camel-remote-store.c (remote_query_auth_types): Remove generic
8732 version, rename connected version.
8734 2001-01-06 Not Zed <NotZed@HelixCode.com>
8736 * providers/vee/camel-vee-folder.c (vee_folder_build_folder): Dont
8737 try and unref a messageinfo that wasn't there, and use the right
8738 free function too. Modified patch from Iain.
8739 (vee_move_message_to): New method, call the real folders'
8740 move_message_to method.
8742 2001-01-04 JP Rosevear <jpr@helixcode.com>
8744 * tests/lib/Makefile.am: fix includes for compilation
8746 * tests/message/Makefile.am: Build test3 again
8748 * tests/message/test2.c: Kill warnings with header includes
8750 * tests/message/test3.c: ditto
8752 * tests/lib/streams.c: ditto
8754 * tests/lib/camel-test.c: ditto
8756 * tests/lib/messages.c: ditto
8758 * tests/lib/folders.c: ditto
8760 2001-01-04 Dan Winship <danw@helixcode.com>
8762 * providers/imap/camel-imap-folder.c (imap_rescan): Fix two
8763 problems in figuring out server-expunged messages.
8765 2001-01-04 Not Zed <NotZed@HelixCode.com>
8767 * camel-folder.c (thaw): If we have a lot of messages changed,
8768 promote it to a folder changed event.
8770 2000-01-03 Jeffrey Stedfast <fejj@helixcode.com>
8772 * camel-folder-search.c (search_header_matches): Implemented.
8773 (search_header_exists): Implemented.
8774 (search_header_starts_with): Implemented.
8775 (search_header_ends_with): Implemented.
8777 2001-01-03 Christopher James Lahey <clahey@helixcode.com>
8779 * providers/imap/camel-imap-folder.c (camel_imap_folder_new):
8780 Initialize the exists variable so that we don't do random things
8781 if the imap server misbehaves.
8783 2000-12-29 Not Zed <NotZed@HelixCode.com>
8785 * camel-folder.c (camel_folder_move_message_to): REmove warning,
8786 this isn't really deprecated, sigh.
8788 * camel-mime-utils.c (header_fold): Comment out some debug.
8790 2001-01-02 Christopher James Lahey <clahey@helixcode.com>
8792 * providers/maildir/, providers/mbox/, providers/mh/: Removed
8793 these directories since they're unused.
8795 2001-01-02 Dan Winship <danw@helixcode.com>
8799 * providers/imap/camel-imap-stream.[ch]: Remove. To be replaced.
8801 * providers/imap/Makefile.am (libcamelimapinclude_HEADERS): Remove
8804 * providers/imap/camel-imap-utils.c (imap_parse_flag_list): Take a
8805 char ** instead of char *, to return the position at the end of
8806 parsing like the string parsing functions.
8807 (imap_parse_string_generic): New function to parse a string,
8808 nstring, or astring.
8809 (imap_parse_nstring, imap_parse_astring): Now macros
8810 (imap_parse_string): Added
8812 * providers/imap/camel-imap-folder.h: Remove the "exists" field
8813 from CamelImapFolder.
8815 * providers/imap/camel-imap-folder.c: Remove unused include of
8816 camel-imap-stream.h.
8817 (camel_imap_folder_init): Remove no-longer-relevant summary
8819 (camel_imap_folder_new): Update for imap_parse_flag_list change,
8820 exists removal, and imap_rescan.
8821 (imap_rescan): New function that does most of the work of the old
8822 imap_refresh_info, but taking "exists" as an argument instead of
8823 getting it from the folder. Also calls camel_imap_folder_changed
8824 to do the summary updating and signalling, rather than duplicating
8826 (imap_refresh_info): Just call imap_rescan (using the size of the
8827 folder summary as "exists").
8828 (imap_update_summary): Update for imap_parse_flag_list change
8829 (camel_imap_folder_changed): Update for "exists" change.
8831 2001-01-02 Dan Winship <danw@helixcode.com>
8833 * camel-mime-utils.c (header_content_type_simple): New function to
8834 return just foo/bar with no parameters.
8836 * camel-data-wrapper.c (get_mime_type): Use
8837 header_content_type_simple rather than header_content_type_format.
8839 2000-12-28 Dan Winship <danw@helixcode.com>
8841 * gmime-content-field.[ch]: Remove this. It was only a thin
8842 wrapper around struct _header_content_type anyway, and didn't
8843 match the naming scheme of anything else.
8845 * Makefile.am: Remove gmime-content-field.[ch]
8847 * camel.h: Remove gmime-content-field.h
8849 * camel-types.h: Add CamelContentType as a typedef for struct
8850 _header_content_type (especially for use outside of camel).
8852 * camel-multipart.c:
8853 * camel-mime-part.c:
8854 * camel-mime-message.c:
8855 * camel-folder-summary.c:
8856 * camel-folder-search.c:
8857 * camel-data-wrapper.[ch]: Use CamelContentType and
8858 header_content_type_* functions rather than the GMime stuff.
8860 * camel-mime-part-utils.c:
8861 * camel-medium.c: Remove unused gmime-content-field.h include.
8863 2000-12-27 Dan Winship <danw@helixcode.com>
8865 * providers/pop3/camel-pop3-store.c (connect_to_server): Fix the
8866 APOP check to not crash on servers that don't return any
8867 information on the +OK greeting line.
8869 2000-12-24 Not Zed <NotZed@HelixCode.com>
8871 * providers/imap/camel-imap-search.c (imap_body_contains): Lock
8872 the command channel while searching.
8873 (imap_body_contains): If performing a whole uid search, then add
8874 references to our own summary items, dont look it up in the
8875 folder. This way they can't vanish unexpectedly.
8877 * providers/imap/camel-imap-folder.h (CamelImapFolder): Added a
8879 (CamelImapFolder): Removed summary again from here.
8881 * providers/imap/camel-imap-private.h: Added lock for imap
8884 * Merge from camel-mt-branch.
8886 * providers/imap/camel-imap-folder.c (imap_update_summary): Merge
8887 fix, use the folder->summary.
8888 (imap_get_message_flags, imap_set_message_flags,
8889 imap_get_message_user_flag, imap_set_message_user_flag): Removed
8891 (camel_imap_folder_init): Setup private data/lock.
8892 (imap_finalize): Free private data/search lock.
8893 (imap_search_free): Lock the search_lock.
8894 (imap_search_by_expression): Lock the search lock when using the
8895 search object. Also copy/ref hte summary, rather than getting it
8897 (imap_refresh_info): Free any info lookups. Use folder->summary
8898 not imap_folder->summary. And lock around commands.
8899 (camel_imap_folder_changed): Use folder->summary again.
8900 (camel_imap_folder_changed): Make sure we unref the summary lookup.
8902 2000-12-22 Dan Winship <danw@helixcode.com>
8904 * providers/imap/camel-imap-store.c (get_folder_info): When
8905 getting the top-level folder list, include INBOX even if it's not
8906 subscribed. Don't show subscribed folders outside of the given
8907 namespace. Do a better job of pruning the namespace from the
8908 returned folder tree.
8910 2000-12-21 Dan Winship <danw@helixcode.com>
8912 * providers/imap/camel-imap-search.c: New CamelFolderSearch
8913 subclass that just reimplements body_contains (using the IMAP
8914 SEARCH command). All other kinds of searching are done against the
8917 * providers/imap/camel-imap-folder.c (imap_search_by_expression):
8918 Use a CamelImapSearch to do searching.
8920 * providers/imap/camel-imap-utils.c (imap_translate_sexp, etc): No
8923 * camel-folder-search.h: Add missing CAMEL_FOLDER_SEARCH_TYPE
8926 2000-12-21 Dan Winship <danw@helixcode.com>
8928 * camel-stream-buffer.c (camel_stream_buffer_gets): Update the
8929 doc comment: since it always NUL-terminates the buffer, it reads
8930 at most @max-1 bytes, not @max.
8932 * camel-remote-store.c (remote_recv_line): Fix the "did
8933 camel_stream_buffer_gets fill the whole buffer" check. Fixes a bug
8934 when reading lines longer than 1024 characters (eg, IMAP SEARCH
8935 responses in very large folders).
8937 2000-12-19 Dan Winship <danw@helixcode.com>
8939 * providers/imap/camel-imap-folder.c (imap_refresh_info): Oops.
8940 Don't do "FETCH 1:0" when the folder is empty.
8941 (imap_protocol_get_summary_specifier): Request RFC822.SIZE too.
8942 (imap_update_summary): Parse RFC822.SIZE and add it to the
8945 2000-12-18 Dan Winship <danw@helixcode.com>
8947 * providers/imap/camel-imap-summary.c: Add "guint32 server_flags"
8948 to CamelImapMessageInfo to keep track of the last known message
8949 flag state on the server.
8950 (message_info_save, message_info_load): Save/load the
8953 * providers/imap/camel-imap-folder.c: Make this use
8954 CamelFolderChangeInfo and emit folder_changed notifications as it
8955 gets them rather than only on refresh_info.
8956 (imap_refresh_info): Notice flags that get cleared on the server
8957 as well as flags that get set.
8958 (imap_update_summary): Remove a comment that never actually
8959 applied to the committed code.
8961 2000-12-15 Dan Winship <danw@helixcode.com>
8963 * providers/imap/camel-imap-command.c (camel_imap_command): Change
8964 the semantics of fmt: Now %S (capital S) means an IMAP "string",
8965 (which can be sent as either a quoted string or a literal). If
8966 the server supports LITERAL+, these will be sent as extended
8967 literals (which don't require any special escaping). Otherwise
8968 they'll be sent as quoted strings (and it now properly deals with
8969 " or \ in the string).
8970 (imap_command_strdup_vprintf): Utility routine that does the real
8971 work for the functionality mentioned above.
8973 * providers/imap/camel-imap-utils.c (imap_quote_string): Turns a
8974 string into a proper IMAP "quoted string".
8976 * providers/imap/camel-imap-store.c:
8977 * providers/imap/camel-imap-folder.c: Use %S instead of "%s" where
8980 2000-12-22 Not Zed <NotZed@HelixCode.com>
8982 * camel-folder-summary.c (GLOBAL_INFO_UNLOCK): Doh, cut and paste
8983 victim again, call unlock instead of lock!
8984 (summary_assign_uid): Unlock around trying to get a new uid, if we
8987 2000-12-21 Not Zed <NotZed@HelixCode.com>
8989 * tests/folder/Makefile.am (TESTS): reenabled the tests here.
8991 * providers/nntp/camel-nntp-newsrc.c (CamelNNTPNewsrc): Add a
8992 lock. Made completely mt-safe. Sigh, this is all so i can
8993 support snooping of the set_flags stuff inside camel-nntp-folder,
8994 since i've removed the global folder lock from all of the other
8995 folder summary operations.
8996 (camel_nntp_newsrc_read_for_server): Setup lock.
8997 (camel_nntp_newsrc_get_highest_article_read): Lock internal access.
8998 (camel_nntp_newsrc_get_num_articles_read):
8999 (camel_nntp_newsrc_mark_article_read):
9000 (camel_nntp_newsrc_mark_range_read):
9001 (camel_nntp_newsrc_article_is_read):
9002 (camel_nntp_newsrc_group_is_subscribed):
9003 (camel_nntp_newsrc_unsubscribe_group):
9004 (camel_nntp_newsrc_subscribe_group):
9005 (camel_nntp_newsrc_get_subscribed_group_names):
9006 (camel_nntp_newsrc_get_all_group_names): "
9007 (camel_nntp_newsrc_write_to_file): Lock internal accesses.
9008 (camel_nntp_newsrc_write): Lock around diry stuff.
9010 * providers/local/camel-maildir-summary.c (maildir_summary_check):
9011 Lock around our internal poking of the summary hashtable/array.
9012 (maildir_summary_sync): And the same here too.
9014 * camel-folder-summary.c: Moved the summaryprivate data into
9015 camel-private.h. Only needed for the locks really.
9016 (camel_folder_summary_init): Setup locks.
9017 (camel_folder_summary_set_filename): Lock.
9018 (camel_folder_summary_index): lock
9019 (camel_folder_summary_uid): Lock
9020 (camel_folder_summary_next_uid): "
9021 (camel_folder_summary_set_uid): "
9022 (camel_folder_summary_load): Lock around whole load. Hrm,
9023 probably not required.
9024 (camel_folder_summary_save): Lock around whole save, this is
9025 reqwuired, unless we ref/copy the whole list first, and i couldn't
9027 (camel_folder_summary_add): lock
9028 (summary_assign_uid): Lock around internal accesses.
9029 (camel_folder_summary_info_new_from_parser): Lock around filtr stuff.
9030 (camel_folder_summary_info_ref): Add locking. Could probably use
9032 (camel_folder_summary_touch): Add locking, likewise.
9033 (camel_folder_summary_clear): Lock. If the preiovus two are
9034 changed, then so this will need mroe locking.
9035 (camel_folder_summary_info_free): Lock around refcounting.
9036 (camel_folder_summary_remove): Locking.
9037 (camel_folder_summary_remove_uid): Lock ref, unlock, unref. Also
9038 fixed a bug that would have made this never work, freeing the key,
9039 which isn't allocated.
9040 (camel_folder_summary_remove_index): lock, ref, unlock unref also.
9041 (camel_message_info_ref): Lock using a separate global lock, since
9042 we have no context here.
9043 (camel_message_info_free): Here too.
9044 (content_info_alloc): Use an alocation lock here. avoids races
9045 with setting up content_info_chunks, etc.
9046 (camel_folder_summary_info_new): And here too.
9047 (camel_folder_summary_load): Changed to use a differnet lock for
9049 (camel_folder_summary_init): Doh, i do need a reflock afterall,
9051 (camel_folder_summary_finalize): Free it.
9052 (camel_folder_summary_index): Add a reflock.
9053 (camel_folder_summary_uid): And here too.
9054 (camel_folder_summary_info_free): Use reflock instead of
9056 (camel_folder_summary_info_ref): Likewise.
9057 (camel_folder_summary_remove_uid): Add reflocking.
9058 (camel_folder_summary_remove_index): And here too.
9060 * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Setup a
9062 (vee_folder_build): Build each item into the real summary object.
9063 (vee_folder_add, vee_folder_add_uid, vee_folder_add_change): New
9064 functions to add a single record to the vfolder summary.
9065 (vee_folder_build_folder): Use a real summary.
9066 (vee_get_uids): Removed, use default impl.
9067 (vee_free_message_info): "
9068 (vee_get_message_info): "
9069 (vee_get_summary): "
9070 (vee_get_unread_message_count): "
9071 (vee_get_message_count): "
9072 (vee_sync): Make vee-folder-sync sync all subordinate folders.
9073 Well i dont think this is right, but enough peopl ehave aksed for
9075 (vee_expunge): Same for expunge.
9076 (vee_set_message_flags): Call parent class, then mirror flags to
9078 (vee_get_message_user_flag): Removed, we just use the default
9079 impl, and our flags should always match.
9080 (vee_set_message_user_flag): Snoop the set and set on subfolder.
9081 (vee_get_message_flags): Removed, jsut use parent impl, assume our
9082 copy matches the real ones.
9083 (get_real_message): Removed. We sort ofneed to keep the
9084 summaryitem refed while we use it, so this doesn't make as much
9085 sense as it did once.
9086 (camel_vee_folder_finalise): Unhook listening events as we unref
9088 (camel_vee_folder_new): Set the summary messageinfo data size
9090 (vfolder_remove_match): Fixed for summary change.
9091 (folder_changed): ditto. Also stopped changed items from being
9092 re-searched and possibly removed. Might have to resort to the old
9093 whole-search idea again.
9094 (message_changed): Similarly. Might be easier just not to bother
9095 with a whole search.
9097 * providers/vee/camel-vee-folder.h: Removes summary
9098 hashtable/array, and use a real summary object. Sigh, more work.
9100 * providers/nntp/camel-nntp-folder.c (nntp_folder_sync): Move
9101 summary to folder object.
9102 (nntp_folder_get_message_count): Removed, use default impl.
9103 (nntp_folder_set_message_flags): Call parent impl to do the work,
9104 but snoop for newsrc.
9105 (nntp_folder_get_uids): Removed, use default impl.
9106 (nntp_folder_get_summary): "
9107 (nntp_folder_get_message_info): "
9108 (nntp_folder_free_message_info): "
9109 (camel_nntp_folder_new): moved summary to folder class
9111 * providers/imap/camel-imap-folder.c (camel_imap_folder_init):
9112 Move summary to folder object.
9113 (camel_imap_folder_new): "
9114 (imap_finalize): No longer unref the summary (or infact, do
9115 anything else either).
9116 (imap_refresh_info): move summary to folder object.
9118 (imap_get_message_count): Removed, use default impl.
9119 (imap_get_unread_message_count): "
9121 (imap_get_summary): "
9122 (imap_free_summary): "
9123 (imap_get_message_info): "
9124 (imap_free_message_info): "
9125 (imap_get_message_flags): "
9126 (imap_set_message_flags): "
9127 (imap_get_message_user_flag): ", this changes functionality, but
9128 only by providing non-permanent flags.
9129 (imap_set_message_user_flag): "
9130 (imap_update_summary): move summary to folder object, and use
9131 camel_folder_summary_info_new_from_header, instead of calling the
9132 virtual function directly.
9134 * providers/local/camel-maildir-folder.c (maildir_append_message):
9135 move summary to folder object, again.
9136 (maildir_get_message): "
9138 * providers/local/camel-mh-folder.c (mh_append_message): move
9139 summary to folder object.
9142 * providers/local/camel-mbox-folder.c (mbox_append_message): Move
9143 summary to folder object
9144 (mbox_get_message): "
9145 (mbox_set_message_user_flag): We need our own copy of this, sigh,
9146 so we can track if the xev needs a rewrite (probably, its only a
9148 (mbox_set_message_user_tag): Same same with this one.
9149 (camel_mbox_folder_class_init): Link in these new virtual functions.
9151 * providers/local/camel-local-folder.h (CamelLocalFolder): removed
9154 * providers/local/camel-local-folder.c (local_get_message_count):
9155 (local_get_unread_message_count):
9157 (local_get_summary):
9158 (local_free_summary):
9159 (local_get_message_info):
9160 (local_free_message_info):
9161 (local_get_message_flags):
9162 (local_set_message_flags):
9163 (local_get_message_user_flag):
9164 (local_set_message_user_flag):
9165 (local_get_message_user_tag):
9166 (local_set_message_user_tag): Removed, all now use default
9168 (camel_local_folder_class_init): Removed overrides.
9169 (local_init): Clear folder->summary.
9170 (local_finalize): move summary to folder.
9171 (camel_local_folder_construct): "
9174 * camel-folder.c (free_summary): Provide a real impl.
9178 (free_message_info): "
9179 (get_message_info): "
9180 (set_message_user_tag): "
9181 (get_message_user_tag): "
9182 (set_message_user_flag): "
9183 (get_message_user_flag): " Sigh, the last so far.
9184 (get_message_flags): Sigh, 1 more afterall.
9185 (get_unread_message_count): And and this.
9186 (get_message_count): and this!
9187 (set_message_flags): Sigh, and this.
9188 (camel_folder_finalize): Unref the summary if we have it.
9189 (camel_folder_free_uids): Remove locking.
9190 (camel_folder_get_message_flags): Remove locks, since the summary
9192 (camel_folder_set_message_flags): "
9193 (camel_folder_get_message_user_flag): "
9194 (camel_folder_set_message_user_flag): "
9195 (camel_folder_get_message_user_tag): "
9196 (camel_folder_set_message_user_tag): "
9197 (camel_folder_get_message_info): "
9198 (camel_folder_free_message_info): "
9199 (camel_folder_get_uids): "
9200 (camel_folder_free_summary): "
9201 (camel_folder_get_unread_message_count): "
9202 (get_unread_message_count): Check we got info, no big deal, but
9203 the summary might change while we're counting, and upset the count
9205 (camel_folder_get_message_count): Remove locks.
9207 * camel-folder.h (struct _CamelFolder): Added CamelFolderSummary
9208 to the base folder object. Sigh, this is going to be a lot of
9211 * camel-service.c (camel_service_init, finalise): changed
9212 connect_lock to be recursive e_mutex.
9214 * camel-remote-store.c (camel_remote_store_init, finalise): Changed
9215 stream_lock to recursive e_mutex.
9217 * camel-private.h (RemoteStorePrivate, ServicePrivate): Use
9218 recursive mutexes for connect_lock & stream_lock. Ick. Because
9221 * providers/imap/camel-imap-private.h: Change the command_lock to
9224 * providers/imap/camel-imap-store.c (connect_to_server): Removed
9225 the command_lock stuff. If we are just connected again, it should
9226 be safe to assume we have exclusive access at this point without
9227 it (and yes, removes a deadlock).
9228 (imap_create): Remove a lock that wasn't even supposed to be
9230 (camel_imap_store_finalize, init): g_mutex->e_mutex(E_MUTEX_REC).
9231 Use a recursive mutex since the imap code is multiply recursivly
9232 calling some functions (sigh, it would be nice to fix this).
9234 2000-12-20 Not Zed <NotZed@HelixCode.com>
9236 * camel-folder.c (folder_changed): Change the locks to inside the
9237 if. Stops a deadloc,k and we dont need a lock to read a value.
9238 (message_changed): Likewise.
9240 * camel.c (camel_init): Blah, comment out g_thread_init, leave it
9241 to the caller, since it can only ever be done once.
9243 * camel-folder-thread.c (camel_folder_thread_messages_new): Ref
9244 and save the folder in the thread return. Also get the summary
9245 once, and access that for the messageinfo's. Added bonus that now
9246 threads should come out in a similar order. We need to do this so
9247 that the messageinfo's dont get unref'd under us, and using the
9248 summary directly simplifies memory management.
9249 (camel_folder_thread_messages_destroy): Free the summary/unref the
9252 * camel-folder-thread.h: Add a folder to CamelFolderThread struct.
9254 2000-12-19 Not Zed <NotZed@HelixCode.com>
9256 * providers/imap/camel-imap-utils.c (imap_translate_sexp): Unref
9257 using e_sexp_unref, since it is no longer an object.
9259 * tests/lib/camel-test.c: Added a global lock, and made it
9262 * camel-exception.c: Add a global lock. Not sure its really
9263 needed here, but it doesn't really hurt.
9264 (camel_exception_clear): Lock around access.
9265 (camel_exception_set): Same.
9266 (camel_exception_setv): "
9267 (camel_exception_xfer): "
9269 * providers/local/Makefile.am (noinst_HEADERS): Added, for
9270 camel-local-private.h
9272 * camel-folder.c (camel_folder_search_by_expression): Removed
9273 locking here, now upto the implementing class to lock.
9274 (camel_folder_search_free): Removed the folder lock here too, for
9275 consistency really, and the locking probably wasn't needed.
9277 * providers/local/camel-local-folder.c (local_get_summary):
9278 Changed to copy/ref the summary items.
9279 (local_free_summary): Unref the summary items/free the array.
9280 (local_get_unread_message_count): Free info lookups.
9281 (local_search_by_expression): Perform more fine-grained locking,
9282 and dont lock the whole folder while searching, just the search
9283 object. Dum de dum, it *would* be possible to not even have to
9284 lock the search, by using our own copy of the search object each
9285 time. Could be investigated.
9286 (local_init): Init priaate data/lock.
9287 (local_finalize): Free private data/lock.
9288 (local_search_free): Also lock around the search object, because
9289 it accesses global data inside.
9291 * README.mt: Some info about the mt code development.
9293 * camel-folder-search.c (match_message): Put in a warning, this
9294 plain deadlocks so far, but i'm going to bed now.
9295 (camel_folder_search_finalize): Use e_sexp_unref() since its no
9298 * camel-session.c (camel_session_init): Init private data/lock.
9299 (camel_session_finalise): Free private data/lock.
9300 (camel_session_register_provider): Lock hash insert.
9301 (service_cache_remove): Lock.
9302 (camel_session_list_providers): "
9303 (camel_session_get_service): Lock the whole function.
9305 * camel-session.h (struct _CamelSession): Added private data.
9307 * providers/imap/camel-imap-store.c (camel_imap_store_init): Setup
9309 (camel_imap_store_finalize): Free private data.
9310 (connect_to_server): Lock around command calls. I dont think its
9311 needed, but it shouldn't hurt either.
9312 (imap_connect): Lock around command calls. Again, I don think it
9313 is needed, but wont hurt.
9314 (imap_disconnect): ditto for this one.
9315 (imap_create): Lock around command.
9317 (get_folder_info): "
9318 (subscribe_folder): "
9319 (unsubscribe_folder): "
9322 * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Lock
9323 around calling a command.
9324 (imap_refresh_info): Likewise.
9326 (imap_append_message): "
9327 (imap_copy_message_to): "
9328 (imap_move_message_to): "
9329 (imap_get_message): "
9330 (imap_update_summary): "
9331 (imap_search_by_expression): ", also minor logic cleanup.
9332 (imap_get_summary): Copy/ref the summary items.
9333 (imap_free_summary): And free it now too.
9335 * providers/imap/camel-imap-auth.c (imap_try_kerberos_v4_auth):
9336 Lock the command stream for the command session.
9338 * providers/imap/camel-imap-private.h: Private (locking info)
9339 stuff for imap provider.
9340 (CAMEL_IMAP_STORE_UNLOCK): Fix to call unlock, rather than lock!
9342 * camel-service.c (camel_service_query_auth_types): Lock also for
9343 the connection here, incase the service needs to connect.
9345 * camel-remote-store.c (camel_remote_store_init): Init private
9347 (camel_remote_store_finalise): Readded, free private data/lock.
9348 (remote_send_stream): Changed to return the number of bytes
9349 written, like a good little stream function should.
9350 (camel_remote_store_send_string): Lock for stream access.
9351 (camel_remote_store_send_stream): Same here.
9352 (camel_remote_store_recv_line): And here.
9353 (camel_remote_store_refresh_folders): Lock the store for cache
9355 (timeout_cb): Lock for stream access.
9357 2000-12-18 Not Zed <NotZed@HelixCode.com>
9359 * camel-service.c (camel_service_init): Init private data.
9360 (camel_service_finalise): Free private data.
9361 (camel_service_connect): Lock around connection access.
9362 (camel_service_disconnect): "
9364 * camel-service.h (struct _CamelService): Added private field.
9366 * camel-store.c (camel_store_init): Init private data/lock.
9367 (camel_store_finalize): Free private data/lock.
9368 (camel_store_get_folder): Lock internal calls.
9369 (camel_store_delete_folder): "
9370 (camel_store_rename_folder): "
9371 (camel_store_get_root_folder): "
9372 (camel_store_get_default_folder): "
9373 (camel_store_get_folder_info): "
9374 (camel_store_folder_subscribed): "
9375 (camel_store_subscribe_folder): "
9376 (camel_store_unsubscribe_folder): "
9377 (lookup_folder): Lock accesses to the folder cache.
9379 (uncache_folder): And here too.
9381 * camel-store.h (struct _CamelStore): Added a private field.
9383 * Makefile.am (noinst_HEADERS): Add camel-private.h. There is a
9384 comment in that header as to why it ins't installed.
9386 * camel-private.h: New header for private data, that subclasses
9389 * tests/lib/camel-test.c (camel_test_init): If we do have threads
9390 enabled already, dont call g_thread_init().
9392 * tests/lib/folders.c (test_folder_counts): Add free of info.
9393 (test_folder_message): And here too.
9395 * providers/local/camel-maildir-summary.c (remove_summary): Free
9397 (maildir_summary_check): Free info lookups.
9399 * providers/local/camel-mh-summary.c (message_info_new): Removed,
9401 (remove_summary): free info after being used.
9402 (mh_summary_check): Free info lookups.
9403 (mh_summary_sync): and here too.
9405 * providers/local/camel-mbox-summary.c (summary_update): Free info
9407 (mbox_summary_sync_full): Likewise.
9408 (mbox_summary_sync_quick): And here.
9409 (mbox_summary_sync): ... and here.
9411 * providers/local/camel-maildir-folder.c (maildir_get_message):
9412 Free messageinfo lookups.
9414 * providers/local/camel-mh-folder.c (mh_get_message): Free
9415 messageinfo lookups.
9417 * providers/local/camel-mbox-folder.c (mbox_get_message): Free
9418 messageinfo lookups.
9420 * providers/local/camel-local-summary.c
9421 (message_info_new_from_message): Removed, since it wasn't doing
9423 (message_info_new_from_parser): Same. And some other dead code.
9425 * providers/local/camel-local-folder.c (local_get_message_info):
9427 (local_free_message_info):new func to free info.
9429 (local_get_message_flags):
9430 (local_set_message_flags):
9431 (local_get_message_user_flag):
9432 (local_set_message_user_flag):
9433 (local_get_message_user_tag):
9434 (local_set_message_user_tag): Free all info lookups.
9435 (local_expunge): Dont call camel_folder_* functions, to avoid a deadlock.
9437 * providers/nntp/camel-nntp-folder.c
9438 (nntp_folder_get_message_info): deconstify.
9439 (nntp_folder_free_message_info): Free summary item.
9440 (nntp_folder_get_message_flags): Free summary lookup.
9441 (nntp_folder_set_message_flags): and here.
9442 (nntp_folder_get_uids): And here.
9444 * providers/imap/camel-imap-auth.c: Make base64_*_simple optional
9445 with the HAVE_KRB4 flag.
9447 * providers/imap/camel-imap-folder.c (imap_free_message_info):
9448 Added a free of the message info.
9449 (imap_refresh_info):
9451 (imap_refresh_info):
9452 (imap_get_unread_message_count):
9454 (imap_get_message_flags):
9455 (imap_set_message_flags): Free any summary lookups.
9456 (imap_get_message_flags): Get the message info directly from the
9457 summary, not via the folder interface.
9458 (imap_move_message_to): Dont call folder functions directly
9459 (delete_message), as it will deadlock since we already have the
9462 * providers/vee/camel-vee-folder.c (vee_free_message_info): Free/unref
9464 (vee_get_message_info): First ref the internal copy, then return it.
9465 (folder_changed): Free all got message info's.
9466 (message_changed): And here.
9467 (get_real_message): And here.
9468 (vee_folder_build): and here.
9469 (vee_folder_build_folder): ... and here.
9471 * camel-folder-summary.c (camel_folder_summary_info_new):
9472 Initialise the messageinfo refcount to 1.
9473 (camel_folder_summary_info_free): Down the refcount till we need
9475 (camel_folder_summary_info_ref): New function to up the refcount.
9476 (camel_message_info_dup_to): Sewt the refcount of the dest to 1.
9477 (camel_message_info_new): Set refcount to 1.
9478 (camel_message_info_new_from_header): Dont allocate the mi
9480 (camel_message_info_free): Handle refcounting.
9481 (camel_message_info_ref): New function.
9482 (camel_folder_summary_index): Ref the messageinfo before returning
9484 (camel_folder_summary_uid): Likewise.
9485 (camel_folder_summary_save): Access the messageinfo array
9486 directly, rather than through accessors (saves ref/unref).
9487 (camel_folder_summary_clear): Likewise.
9488 (camel_folder_summary_remove_index): Likewise.
9489 (main): Free lookups.
9491 * camel-folder-summary.h (CamelMessageInfo): Added a refcount
9494 * camel-folder.c (camel_folder_free_message_info): New function to
9495 'free' a message info.
9496 (camel_folder_get_message_info): Deconstify return.
9497 (camel_folder_lock): New (internal) function to thread-lock the
9499 (camel_folder_unlock): Likewise for unlocking.
9501 (thaw): Lock around access to folder->frozen/changed_frozen.
9502 (folder_changed): Likewise.
9503 (message_changed): Likewise.
9504 (camel_folder_init): Init private data, locks and moved frozen
9506 (camel_folder_finalize): Free new private data, locks and moved
9508 (copy_message_to): Free the messageinfo after we've used it.
9509 (move_message_to): And here too.
9510 (camel_folder_sync): Lock around virtual method invocation. Just
9511 locking around any virtual method that is known to need it. This
9512 is the first cut at locking.
9513 (camel_folder_refresh_info): "
9514 (camel_folder_expunge): "
9515 (camel_folder_get_message_count): "
9516 (camel_folder_get_unread_message_count): "
9517 (camel_folder_append_message): "
9518 (camel_folder_set_message_flags): "
9519 (camel_folder_get_message_flags): "
9520 (camel_folder_get_message_user_flag): "
9521 (camel_folder_set_message_user_flag): "
9522 (camel_folder_get_message_user_tag): "
9523 (camel_folder_set_message_user_tag): "
9524 (camel_folder_get_message): "
9525 (camel_folder_get_uids): "
9526 (camel_folder_free_uids): "
9527 (camel_folder_get_summary): "
9528 (camel_folder_search_by_expression): "
9529 (camel_folder_free_summary): "
9530 (camel_folder_search_free): "
9531 (camel_folder_move_message_to): "
9532 (camel_folder_copy_message_to): "
9533 (copy_message_to): Dont call any of our own folder functions
9534 directly, otherwise we will deadlock.
9535 (move_message_to): Likewise.
9537 * camel-folder.h (CamelFolder): Added free_message_info() function
9538 & deconstify get_message_info()'s return.
9539 (CamelFolder): Add a private field (for locks).
9540 (struct _CamelFolder): Moved changed_changed/frozen into private
9541 data, since it really is private and now needs locked access.
9543 2000-12-15 Jeffrey Stedfast <fejj@helixcode.com>
9545 * camel-mime-utils.c (header_fold): When checking to see if we
9546 need to fold the header, when we come accross a \n, make sure to
9547 start at p + 1 the next time through the loop or else we get into
9550 2000-12-13 Dan Winship <danw@helixcode.com>
9552 * Namespace cleanup: change a bunch of IS_CAMEL_* macros to
9555 2000-12-13 Chris Toshok <toshok@helixcode.com>
9557 * providers/imap/camel-imap-auth.c: add #include <sys/types.h> for
9560 2000-12-12 Christopher James Lahey <clahey@helixcode.com>
9562 * camel-folder-summary.c, camel-folder-summary.h: Added #ifndef
9563 NO_WARNINGS around a #warning. Added (void) to the prototype and
9564 declaration of camel_message_info_new.
9566 * camel-mime-message.h: Added an include for
9567 camel-mime-filter-bestenc.h. Added a prototype for
9568 camel_mime_message_set_best_encoding. Reformatted prototypes to
9571 * camel-mime-parser.c: Added #if d(!)0 around the states string
9572 lookup table since it's only used in debugging output.
9574 * camel-seekable-substream.c (stream_flush): Added a cast.
9576 * providers/imap/camel-imap-auth.c: Added #include <netinet/in.h>.
9578 * providers/imap/camel-imap-folder.c (imap_refresh_info): Made uid
9579 and flags const to fix warnings here.
9581 * providers/imap/camel-imap-store.c (get_folder_info): Made p
9582 const to fix warnings here.
9584 2000-12-12 Dan Winship <danw@helixcode.com>
9586 * tests/lib/Makefile.am: Add missing .h file. (From campd.)
9588 2000-12-11 Not Zed <NotZed@HelixCode.com>
9590 * providers/smtp/camel-smtp-transport.c (smtp_data): Remove use of
9591 linewrap filter. Headers are now wrapped. encode_8bit already
9592 enforces a 998 octet line limit.
9593 (smtp_data): Also fixed a memleak, we always have to unref our own
9594 copy of the filters. We also dont need to remove them manually,
9595 so dont bother. The type's an int too ...
9597 * camel-internet-address.c (internet_unformat): When scanning past
9598 quotes, remove them also.
9599 (camel_internet_address_format_address): If the name contains "'s,
9600 or ','s then strip and quotes and wrap the whole lot in one set of
9603 * Makefile.am (noinst_HEADERS): We dont want to install
9604 camel-charset-map-private.h, ever. There are probably other
9607 * camel-mime-part.c (write_to_stream): Fold header lines
9608 appropriately as we're writing them out.
9610 * camel-mime-utils.c (header_fold): Add a new argument, headerlen,
9611 tells it how long the associated header token is.
9612 (header_fold): Also,k check to see if we need to fold first, using
9613 a better algorithm, and also accept already-folded lines, and
9614 re-process accordingly.
9615 (rfc2047_decode_word): Add a little buffer space to iconv output
9616 for shifting overheads?
9617 (rfc2047_decode_word): finish the iconv with a null call, to flush
9619 (rfc2047_encode_word): Attempt to break up long words into
9620 appropriately sized, independent, chunks. See rfc2047, section 2.
9621 (header_decode_mailbox): Dont add in extra spaces into the output
9622 if we are decoding adjacent encoded words. We can only guess this
9623 case, as some broken mailers put encoded words inside quoted
9625 (header_encode_phrase): Dont merge words if they are going to end
9626 up too long. Also change back ot only merge consecutive words of
9627 the same type. e.g. 'foo. blah fum.' -> "foo." blah "fum." or
9628 'iam an. idiot' -> iam "an." idiot
9630 * camel-medium.c (camel_medium_set_header): Hrm, we actually want
9631 to call set_header, not add_header here, probably explains some
9632 duplicate X-Evolution headers i was trying to track down. Also
9633 changed the api to handle a NULL value == remove the header.
9635 * providers/local/camel-maildir-summary.c
9636 (maildir_summary_decode_x_evolution): Always return error, we dont
9637 use x-evolution for maildir.
9638 (maildir_summary_encode_x_evolution): Always return a NULL string,
9640 (maildir_summary_add): Hook in here, since the _new function
9641 doesn't have access to any flags from the caller. If we have
9642 flags, then update the filename again. Not ideal, but should
9645 2000-12-08 JP Rosevear <jpr@helixcode.com>
9647 * tests/message/Makefile.am: Remove test3 from build until the files
9650 2000-12-09 Not Zed <NotZed@HelixCode.com>
9652 * camel-mime-message.c (camel_mime_message_set_date): Change the
9653 sign of the default date offset when none is supplied.
9654 (camel_mime_message_set_date): Also do dst if its dst (forward 1
9655 hour). Fixes #928 + some.
9657 2000-12-06 Not Zed <NotZed@HelixCode.com>
9659 * tests/lib/camel-test.h (check): Change line no format so that
9660 emacs can detect it.
9662 2000-12-06 Jeffrey Stedfast <fejj@helixcode.com>
9664 * providers/imap/camel-imap-folder.c (imap_refresh_info): We want
9665 to bitwise-or the server and cached flags here so that we keep the
9666 flags that we have set locally and set any additional flags that a
9667 parallel connection may have set.
9669 2000-12-05 Jeffrey Stedfast <fejj@helixcode.com>
9671 * providers/smtp/camel-smtp-transport.c (smtp_data): If the data
9672 wrapper fails to be written to the stream, unref it and the
9673 filters before returning.
9675 2000-12-05 Dan Winship <danw@helixcode.com>
9677 * providers/imap/camel-imap-folder.c (imap_get_message): use
9678 BODY.PEEK[] rather than RFC822, so the message doesn't get marked
9680 (imap_refresh_info): Fix a really really really dumb bug.
9682 2000-12-05 Dan Winship <danw@helixcode.com>
9684 * providers/imap/camel-imap-folder.c (imap_set_message_flags): Fix
9685 the check for "flags aren't actually changing".
9687 * providers/local/camel-local-folder.c (local_set_message_flags,
9688 local_set_message_user_flag, local_set_message_user_tag): Don't
9689 emit message_changed unless the flags actually changed.
9691 * providers/nntp/camel-nntp-folder.c
9692 (nntp_folder_set_message_flags): Don't emit message_changed unless
9693 the flags actually changed. Fix the check for marked as seen.
9695 2000-12-05 Not Zed <NotZed@HelixCode.com>
9697 * camel-seekable-substream.c (stream_flush): stream_flush does
9698 make sense for a substream afterall (if you have a stream_write).
9699 (stream_write): Implement this.
9700 (stream_seek): Change the STREAM_END behaviour to be more sane.
9701 if bounded go from the end of the bound, if unbounded, go from the
9702 end of the parent stream.
9704 * camel-stream-mem.c (stream_read): Dont return error if reading
9705 past the end of data, just return 0.
9707 * camel-stream-fs.c (camel_stream_fs_init): Initialise the stream
9709 (stream_seek): Fix the logic when seeking from the end of an
9711 (camel_stream_fs_new_with_fd): If the fd is invalid (-1), then
9712 return NULL immediately.
9713 (stream_seek): Range check a SEEK_END so it fits within
9716 2000-12-01 Not Zed <NotZed@HelixCode.com>
9718 * tests/lib/folders.c (test_folder_basic): New test to perform
9719 basic store operations on folders (taken from folders/test1).
9720 (test_folder_message_ops): Tkane the guts out of folders/test2.
9722 2000-12-04 Jeffrey Stedfast <fejj@helixcode.com>
9724 * providers/smtp/camel-smtp-transport.c (smtp_connect): i18n-ize
9726 (get_name): And here.
9727 (_send_to): Here too.
9728 (smtp_helo): And here and there...
9729 (smtp_mail): And around the square...
9730 (smtp_rcpt): Saying catch me if you can...
9731 (smtp_data): And here three.
9732 (smtp_rset): And here.
9733 (smtp_quit): And finally here.
9735 2000-12-01 Jeffrey Stedfast <fejj@helixcode.com>
9737 * camel-folder-search.h: Added system_flag to CamelFolderSearchClass
9739 * camel-folder-summary.c (camel_system_flag_get): Convenience
9740 function to return whether or not a flag is set using a string as
9742 (camel_system_flag): Return the integer value of the flag string.
9744 * camel-folder-search.c (search_system_flag): New ESExp callback
9745 for allowing vfoldering on CamelMessageInfo flags.
9747 2000-12-01 Dan Winship <danw@helixcode.com>
9749 * camel-service.c (camel_service_disconnect): Don't
9750 g_return_if_fail if the service is already disconnected. Just
9753 * providers/pop3/camel-pop3-store.c (pop3_try_authenticate):
9754 Return FALSE (don't try again) if we get CAMEL_POP3_FAIL.
9755 (pop3_connect): If we don't succeed, disconnect.
9757 2000-11-30 Jeffrey Stedfast <fejj@helixcode.com>
9759 * providers/imap/camel-imap-store.c
9760 (parse_list_response_as_folder_info): Fix a possible bug where
9761 'name' could be uninitialized.
9763 * camel-folder-summary.c (camel_message_info_new): New convenience
9764 function, doesn't do much but it sure makes code cleaner to read.
9765 (camel_message_info_new_from_header): This one makes my life heaven.
9767 2000-11-30 Jeffrey Stedfast <fejj@helixcode.com>
9769 * providers/imap/camel-imap-summary.c (camel_imap_summary_new):
9770 Handle the case where the summary failed to load - clear the
9771 summary and then set the dirty bit so that it is sure to save
9772 later. Is this the right fix?
9774 2000-11-30 Dan Winship <danw@helixcode.com>
9776 * camel-exception.c (camel_exception_setv): Remove unused
9779 2000-11-30 Not Zed <NotZed@HelixCode.com>
9781 * providers/local/camel-mbox-folder.c (mbox_get_message): Remove
9782 assertion that content is there, when it no longer can be.
9784 * camel-folder-summary.h: Removed pos/bodypos/endpos from
9785 camelmeessagecontentinfo.
9786 (CamelMessageFlags): Added an attachments flag.
9788 * providers/local/camel-local-summary.h: Added load virtual
9791 * tests/lib/folders.c (test_message_info): Accessors.
9792 (test_folder_message): "
9794 * camel-folder-thread.c (get_root_subject): Fix accessors.
9797 * camel-folder-search.c (camel_folder_search_execute_expression):
9798 Accessors for messageinfo.
9799 (search_match_all): "
9800 (search_header_contains): "
9801 (search_header_contains): "
9802 (search_body_contains): "
9803 (camel_folder_search_execute_expression): Use mepool_strdup.
9805 * providers/local/camel-mbox-summary.c (summary_update): Accessors
9807 (mbox_summary_sync_full): "
9809 * providers/local/camel-mh-summary.c (remove_summary): Accessors
9811 (mh_summary_check): "
9812 (mh_summary_sync_message): "
9813 (mh_summary_sync): "
9815 * providers/local/camel-mh-folder.c (mh_append_message): Use
9818 * providers/local/camel-local-summary.c
9819 (local_summary_decode_x_evolution): Use accessor to uid.
9820 (local_summary_encode_x_evolution): Likewise.
9821 (message_info_new): And here.
9822 (camel_local_summary_load): Call virtual load function.
9823 (local_summary_load): Default load function, load summary.
9824 (camel_local_summary_load): Check file exists before trying to
9826 (camel_local_summary_construct): Turn off building content info!
9827 (CAMEL_LOCAL_SUMMARY_VERSION): Bump, since we dont build content
9829 (camel_local_summary_load): After a successful load/check, do a
9830 save too so we dont have to go through it again randomly.
9832 * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): Use
9833 accessors for messageinfo.
9835 * providers/nntp/camel-nntp-folder.c (nntp_folder_get_uids): Use
9838 * providers/imap/camel-imap-folder.c (imap_refresh_info): Use
9840 (imap_sync): Likewise.
9841 (imap_get_uids): Likewise.
9842 (imap_update_summary): And here.
9844 * providers/vee/camel-vee-folder.c (vfolder_remove_match): Use
9846 (vfolder_add_match): Handle estrv stuff.
9847 (vfolder_change_match): Accessor for uid.
9848 (get_real_message): "
9850 (vee_folder_build): " + estrv.
9851 (vee_folder_build_folder): "
9853 * providers/local/camel-maildir-folder.c (maildir_append_message):
9854 Use acccessors for uid's.
9855 (maildir_get_message): Here too.
9857 * providers/local/camel-maildir-summary.c
9858 (camel_maildir_summary_init): Setup the string count for us.
9859 (message_info_new): Access the string array directly.
9860 (message_info_free): No need to free string if using array.
9861 (camel_maildir_summary_info_to_name): Use accessor to get to uid.
9862 (remove_summary): And here.
9863 (maildir_summary_check): Likewise.
9864 (maildir_summary_sync): And here.
9865 (maildir_summary_load): Load up a cache of uid->filename mappings
9866 before loading the actual summary file. This saves us having to
9867 waste the diskspace storing the filenames in the summary itself,
9868 and also helps us sync the summary better on load.
9869 (message_info_load): If we have the load_map setup, and the uid
9870 exists, then set the filename cache from it, and update the flags
9871 from the name, incase our summary mismatches it.
9873 * camel-folder-summary.c (camel_folder_summary_init): Setup string
9874 count for compressed info record. An optional compile mode which
9875 stores all strings for a given messageinfo into a packed array,
9876 which should save 36-50 bytes/record.
9877 (camel_folder_summary_info_new): Init the string array.
9878 (message_info_new): Set the string array items, as required.
9879 (message_info_load): And here too.
9880 (message_info_save): Use accessors to get to strings.
9881 (message_info_free): Free strings as one.
9882 (camel_message_info_dup_to): Handle packed array case.
9883 (camel_folder_summary_add): Use accessors. And pack the strv
9885 (summary_assign_uid): New function to assign a unique uid to a
9886 message, if it doesn't have one.
9887 (camel_folder_summary_add): Call assign_uid instead of doing it
9889 (camel_folder_summary_info_new_from_parser): "
9890 (camel_folder_summary_info_new_from_message): "
9891 (camel_folder_summary_encode_string): constify.
9892 (camel_folder_summary_encode_token): "
9893 (summary_build_content_info_message): Fix accessors to messageinfo.
9894 (CAMEL_FOLDER_SUMMARY_VERSION): Bumped, for removal of
9895 contentinfo->pos data.
9896 (camel_folder_summary_info_new_from_parser): Calculate the size
9897 based on the parser position, not the removed contentinfo stuff.
9898 (camel_folder_summary_info_new_from_message): Remove size stuff.
9899 (camel_folder_summary_offset_content): Removed, no longer means anything.
9901 (content_info_load):
9902 (content_info_save):
9903 (summary_build_content_info): Remove stuff for contentinfo->pos*.
9904 (summary_build_content_info): Take a msginfo argument, set
9905 attachments flag if we find any attachments.
9906 (summary_build_content_info_message): set attachments flag if we
9907 find any attachments.
9908 (camel_folder_summary_info_new_from_parser): Always scan the
9909 content info, even if we dont save it.
9910 (camel_folder_summary_info_new_from_message): And here too.
9911 (summary_build_content_info): Only create the contentinfo stuff if
9912 we have it turned on, otherwise just parse and discard.
9913 (summary_build_content_info_message): Likewise.
9915 2000-11-29 Jeffrey Stedfast <fejj@helixcode.com>
9917 * camel-store.c (camel_store_get_folder): Updated the gtk-doc
9920 2000-11-29 Dan Winship <danw@helixcode.com>
9922 * camel-mime-utils.c:
9923 * camel-mime-filter-charset.c: Use iconv instead of unicode_iconv.
9925 * providers/imap/camel-imap-command.c (imap_read_untagged): Fix
9926 some off-by-one-ness.
9928 * camel-stream-buffer.c (stream_read): Fix another bug found in
9929 previously-unused code here.
9931 2000-11-29 Ettore Perazzoli <ettore@helixcode.com>
9933 * tests/lib/Makefile.am (INCLUDES): `$(top_srcdir)' for builddir
9934 != srcdir compilation.
9936 2000-11-29 Not Zed <NotZed@HelixCode.com>
9938 * tests/message/test2.c (main): Add a missed unref.
9940 * camel-stream-mem.c (camel_stream_mem_set_buffer): We must set
9941 ourselves as the owner of the byte-array.
9942 Weird, someone has modified this file (its been reindented), but i
9943 can't see any changelogs ...
9945 * tests/lib/messages.c (content_finalise): Fix memleak in tester,
9946 free byte array when our content object is deleted.
9948 * camel-folder-search.c (camel_folder_search_finalize): Yeah
9949 great, so the sexp is a gtk object, not a camel object. Isn't
9950 that going to be fun to fix?
9952 * camel-session.c (camel_session_finalise): Free the storage path.
9954 * providers/local/camel-local-store.c (camel_local_store_init): If
9955 store->folders is setup, free it first, then overwrite. Hmm,
9956 this seems a bit crappy to me.
9958 * camel-store.c (camel_store_init): Dont setup store->folders if
9961 * camel-exception.c (camel_exception_setv): Removed a memleak. no
9962 need to strdup after a strdup_printf!!!
9964 * camel-address.c (camel_address_finalize): Free the address
9965 ptrarray, once finished.
9967 * providers/local/camel-local-folder.c (local_finalize): Make sure
9968 we dont leave the folder locked on close.
9969 (local_finalize): Free summary/search.
9971 * providers/local/camel-mh-summary.c (mh_summary_next_uid_string):
9972 Small memleak, always free name after using it.
9974 * camel-mime-part.c (set_content_object): Free txt after setting
9977 * providers/local/camel-maildir-summary.c (maildir_summary_check):
9978 Fix a memleak, close the dir after scanning new.
9979 (message_info_free): Added so we can free the filename cached in
9981 (camel_maildir_summary_finalise): Free the hostname.
9983 * tests/folder/test[12].c (main): Clear out camel-test before
9986 * providers/local/camel-mbox-summary.c (mbox_summary_sync_quick):
9987 Because encode_x_evolution folds the line (sigh, because
9988 encode_param does, unlike every other function in
9989 camel-mime-utils), unfold the encoded result before comparing.
9990 (mbox_summary_sync_quick): Another small memleak, free xevnew once
9993 * camel-mime-utils.c (header_decode_quoted_string): Removed a
9994 redundant check for c=0.
9995 (header_unfold): New function to un-fold headers.
9997 * providers/local/camel-local-summary.c
9998 (local_summary_encode_x_evolution): some problems with encoding
9999 tags, using the wrong output strings.
10000 (local_summary_encode_x_evolution): We dont need to append a ;
10001 either, param_list_format_append() will do it for us.
10003 2000-11-28 JP Rosevear <jpr@helixcode.com>
10005 * camel-lock.c: No longer hard code the enabled lock types
10007 2000-11-28 Dan Winship <danw@helixcode.com>
10009 * camel-remote-store.c (remote_recv_line): Don't set exception to
10010 g_strerror (errno) when nread == 0, because it won't have been
10013 * providers/pop3/camel-pop3-folder.c (pop3_finalize): Don't try to
10014 free things if they haven't been set yet.
10016 2000-11-28 Jeffrey Stedfast <fejj@helixcode.com>
10018 * providers/smtp/camel-smtp-transport.c (smtp_connect): Clear the
10019 exception if EHLO fails before trying HELO in the cases where the
10020 SMTP provider doesn't announce its ESMTPness.
10022 2000-11-28 Not Zed <NotZed@HelixCode.com>
10024 * providers/local/camel-maildir-summary.c
10025 (camel_maildir_summary_init): Set the info size's properly, oops!
10027 * tests/lib/folders.[ch]: Folder testing helpers.
10029 * tests/folder/test2.c: Test basic message ops on folders.
10031 * tests/folder/test1.c (main): Test basic folder ops on (local)
10034 * providers/local/camel-local-provider.c
10035 (camel_provider_module_init): Removed some debug.
10037 * providers/local/camel-maildir-folder.c
10038 (camel_maildir_folder_class_init): fix parent class.
10040 * providers/local/camel-mh-folder.c (camel_mh_folder_class_init):
10041 Fix parent class (damn cut & paste).
10043 * providers/local/camel-maildir-store.c (get_folder): Call parent
10045 (camel_maildir_store_class_init): Fix parent class setup.
10046 (delete_folder): Check the folder exists before trying to delete
10048 (delete_folder): Try and make the delete operation atomic/rollback
10049 failures. e.g. if one directory isn't empty, then create the
10050 other empty ones back. Also clear the tmp directory fully first.
10052 * providers/local/camel-mbox-store.c (get_folder): Call parent
10054 (camel_mbox_store_class_init): parent class is camel_local_store,
10055 not camel_folder, oops.
10056 (delete_folder): Return an error if it doesn't exist, rather than
10059 * providers/local/camel-mh-store.c (get_folder): Call parent impl.
10060 (camel_mh_store_class_init): fix parent class setup.
10061 (delete_folder): Error if it doesn't exist now.
10063 * camel-folder.c (camel_folder_move_message_to):
10064 (camel_folder_copy_message_to): Added warnings as these functions
10065 are going to be removed later.
10067 * camel-store.c (camel_store_get_root_folder): Fix for an early
10068 api change. We want CAMEL_STORE_FOLDER_CREATE, not TRUE, since
10070 (camel_store_get_default_folder): And here too.
10072 * providers/local/camel-local-store.c (xrename): Handle renaming
10073 folders differently to renaming files.
10074 (get_default_folder_name): local stores dont have a default
10075 folder, so make it so. Or at least, it doesn't seem to make sense
10077 (get_root_folder_name): Same for root.
10078 (get_folder): Added parent implementation, that makes sure the
10079 service path exists, if we are creating a new folder (but doesn't
10080 create the folder).
10082 2000-11-27 Not Zed <NotZed@HelixCode.com>
10084 * providers/local/camel-local-store.c (xrename): Fixed races. Use
10085 link/unlink, rather than rename, to properly detect overwriting
10086 another file. And allow some files to be missing.
10088 2000-11-28 Radek Doulik <rodo@helixcode.com>
10090 * providers/local/camel-local-summary.c
10091 (local_summary_decode_x_evolution): add scan = scan->next; to
10092 avoid infinite loop
10094 2000-11-27 Dan Winship <danw@helixcode.com>
10096 * providers/imap/camel-imap-command.c (imap_read_untagged): Make
10097 this gratuitously more complicated. No wait, I mean, fix bugs. Now
10098 fully handles NULs in the data stream (which "can't happen" but
10099 do) and also handles responses containing multiple literals. Also
10100 does less copying than the original code.
10102 * camel-stream-buffer.c (stream_read): Fix a bug that could make
10103 it lose sync and/or overrun buffers.
10105 2000-11-27 JP Rosevear <jpr@helixcode.com>
10107 * providers/local/.cvsignore: shush
10109 2000-11-27 Not Zed <NotZed@HelixCode.com>
10111 * providers/Makefile.am: Removed mh, mbox, added local, to the default.
10113 2000-11-24 Not Zed <NotZed@HelixCode.com>
10115 * tests/data/getaddr.pl: little util to scan mailboxes for any and
10116 every address they contain.
10118 * tests/message/test2.c (main): Added a bunch of stuff to test
10119 decoding/reencoding/etc of internationalised addresses.
10121 * tests/message/lib/address-data.h: Copy of some unicode/other
10122 testing data. **Beware** of editing this file in emacs, it'll
10123 probably try and convert all the characters to something
10126 * tests/lib/camel-test.c (camel_test_break): Add a debugger hook
10129 * camel-mime-utils.c (quoted_encode): Check for space and convert
10131 (header_decode_mailbox): Fixed the 'check comments for realname'
10132 code, problem was the domain getting code was skipping all
10133 whitespace/comments before we could get a look-in. This is
10134 approximate but fairly robust.
10135 (header_decode_text): Dont use the c-type isspace func here, we
10136 want a specific whitespace only.
10137 (header_decode_text): If we have decoded words next to each other,
10138 do not insert whitespaces between them, which is what rfc2047 requires.
10139 (header_decode_text): Make c unsigned too.
10141 * tests/README: Added at least some explanation of all this stuff.
10143 * tests/lib/camel-test.h (check_msg): Added a non-gcc version of
10144 the fail command, we dont get the expression that failed, but no
10145 matter. Should be (more) portable now.
10146 (check, check_msg): Put the file/lineno in the default message.
10148 * Makefile.am (SUBDIRS): Add tests.
10150 * camel-mime-filter-basic.c (filter): Well, I'll add the extra
10151 bytes here too, lathough not strictly needed, might save a
10152 re-malloc when we get to complete().
10154 * camel-mime-filter-charset.c (filter): Make sure we have room if
10155 we only convert very short data.
10156 (complete): and here too.
10158 * tests/Makefile.am: Initial test harness & tests. Requires gcc
10161 * camel-internet-address.c (d): Turn off debug.
10163 * camel-charset-map.c (camel_charset_step): Oops, & masks for set
10164 intersection, not | them. Dunno how this got even close to
10167 2000-11-23 Not Zed <NotZed@HelixCode.com>
10169 * camel-mime-filter-basic.c (filter): For base64 encoding, the
10170 output size for 0, 1, or 2 bytes of input can exceed input*2, so
10171 make sure we account for that as well.
10172 (complete): And here.
10173 (complete): Similarly for qp encoding, if we have a trailing
10174 space, we need some extra bytes (not needed for 'filter()', as any
10175 such bytes are stored in state/save).
10177 * camel-mime-utils.c (quoted_decode_step): Removed fixme not required.
10178 (quoted_encode_close): Dont append a trailing afterall. Otherwise
10179 a pass through the encode/decode will grow the message each time.
10181 2000-11-22 Radek Doulik <rodo@helixcode.com>
10183 * camel-mime-utils.c (header_msgid_generate): check for return
10186 2000-11-21 Dan Winship <danw@helixcode.com>
10189 * camel-movemail.c: add #ifdef HAVE_ALLOCA_H
10191 2000-11-21 Not Zed <NotZed@HelixCode.com>
10193 * providers/local/camel-mh-summary.c (mh_summary_sync_message):
10194 Shite, -1 on error, >=0 on success. So i've just been truncating
10195 all the messages I touched, good one zed.
10196 (mh_summary_sync_message): Sigh, and write to the right damn fd as
10198 (mh_summary_sync_message): Argh, and we need to compare the length
10199 of the old xev -1 to the new xev, to check if we can optimise it.
10201 * camel-folder.c (camel_folder_change_info_new): Init the pool.
10202 (camel_folder_change_info_add_source): Allocate string in the
10204 (camel_folder_change_info_add_source_list):
10205 (camel_folder_change_info_add_update): No longer free the key, as
10207 (change_info_add_uid): Add a new arg, copy, telling it whether to
10208 copy the uid argument or not, and copy using mempool_strdup.
10209 (change_info_cat): Tell add_uid to copy the string.
10210 (camel_folder_change_info_add_update): Call add_uid directly.
10211 (change_info_remove): Call add_uid directly, with no copy, and
10213 (change_info_free_update): No longer required since we dont malloc
10215 (camel_folder_change_info_add_uid): Fix for add_uid change.
10216 (camel_folder_change_info_remove_uid):
10217 (camel_folder_change_info_change_uid):
10218 (change_info_clear): No longer needed, just set the size to 0 on
10219 the array directly.
10220 (camel_folder_change_info_clear): Empty the arrays directly, and
10221 flush the mempool too, and also clear uid_source, incase anyone
10222 was silly enough to call us in the wrong order.
10223 (camel_folder_change_info_free): Dont bother clearing the array's
10224 contents, just free the pool and throw away all the indexes.
10226 * camel-folder.h: Added a mempool to CamelFolderChangeInfo to
10227 store the uid's we get.
10229 * camel-folder-search.c (search_match_all): If we are only
10230 matching a single info, just use that/do the search.
10231 (camel_folder_search_match_expression): New function. Matches a
10232 single message info against an expression.
10233 (camel_folder_search_init): Init a hash table used to map the
10234 returned gptrarrays' to mempools.
10235 (camel_folder_search_execute_expression): Store all of the string
10236 data in a mempool, slightly faster, less wasted space (usually),.
10237 (camel_folder_search_free_result): Check for the mempool that
10238 stores the data for the list, and free that if we have it,
10239 otherwise assume we need to use g_free() (which should only happen
10240 if the list is empty at the moment).
10241 : commented out the debugging prints. Got sick of 'executing
10242 header search' crap.
10244 * providers/vee/camel-vee-folder.c (camel_vee_folder_init): Init
10246 (camel_vee_folder_finalise): Free changes.
10247 (vfolder_add_match): Simple helper to add a new matching info
10249 (camel_vee_folder_add_folder): Only trigger a changed event if we
10251 (vfolder_change_match): New function, changes our local vfolder
10252 info to match the source.
10253 (vfolder_add_match): Add a new info to the vfolder list.
10254 (vfolder_remove_match): Remove a no-longer matching info from the
10256 (message_changed): check if the message still matches, and
10257 remove/etc as required.
10258 (camel_vee_folder_finalise, init): init/free search object.
10259 (vee_folder_build_folder): Build the changes to the folder into
10260 the changes data, as we go.
10261 (folder_changed): If the folder gave us an explicit list of
10262 changes, then process each one separately (unless there's a lot
10265 * providers/vee/camel-vee-folder.h: Added a changes field to the
10268 * Makefile.am (libcamel_la_SOURCES): Added
10269 camel-folder-thread.[ch].
10271 * camel-folder-thread.c: message-threading algorithm, taken from
10272 evolutions' mail component, as it is generally more useful than
10273 just for evolution itself. Changed to use e-memchunks as well to
10274 speed it up a little and use less mem.
10276 2000-11-20 Jeffrey Stedfast <fejj@helixcode.com>
10278 * camel-remote-store.c (remote_recv_line): Fixed to return the
10279 correct bytecount in all cases which is the real fix to
10280 imap_parse_nstring.
10282 * providers/imap/camel-imap-command.c (imap_read_untagged): Again,
10283 don't use strlen for the post-data, use 'n'.
10285 * providers/imap/camel-imap-utils.c (imap_parse_nstring): Undo my
10288 2000-11-20 Not Zed <NotZed@HelixCode.com>
10290 * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): Fixes for
10291 the summary messageid changes. Hash the messageid and store it.
10292 (get_XOVER_headers): Use camel_folder_summary_info_new() to create
10293 the summary item before adding it.
10295 * camel-folder-summary.h (CamelMessageInfo): Changed the
10296 messgae-id to be an 8 byte md5 hash, and the references list to be
10299 * providers/local/camel-mh-summary.c (mh_summary_sync_message):
10300 New function, sync out the message info stuff. Only updates the
10301 X-Ev header if it can get away with it, otherwise writes out a
10303 (mh_summary_sync): Added more functionality. All summary info is
10304 now written to the X-Ev header, etc, and new messages re-written
10305 if required during the sync process.
10307 * providers/local/camel-local-folder.c
10308 (local_set_message_user_flag): Set the XEVCHANGE flag.
10309 (local_set_message_user_tag): And here too.
10311 * providers/local/camel-local-summary.h: New flag
10312 CAMEL_MESSAGE_FOLDER_XEVCHANGE to indicate the XEV header has
10313 probably changed size and needs to be rewritten in whole.
10315 * camel-folder-summary.c (next_uid_string): Want this static, not
10317 (message_info_new): Store the references and message-id values as
10318 64 bit, binary hashes.
10319 (message_info_load): fix for message-id/references changes.
10320 (message_info_save): Likewise.
10321 (camel_message_info_dup_to): And here.
10322 (camel_message_info_free): And here too. No longer free
10323 message_id, and simple free for references array.
10324 (CAMEL_FOLDER_SUMMARY_VERSION): Bumped file revision.
10325 (camel_folder_summary_init): Init memchunk allocators to empty.
10326 (camel_folder_summary_finalize): Free memchunk allocators if
10328 (message_info_new): Use the chunk allocator to allocate message
10330 (camel_folder_summary_info_new): New helper to allocate the
10331 message info, and setup the memchunk if required.
10332 (content_info_alloc): Likewise for content info's.
10333 (message_info_load): Use summary_info_new_empty.
10334 (content_info_new): Use content_info_alloc.
10335 (content_info_load): "
10336 (content_info_free): Free the content info as a memchunk.
10337 (message_info_free): Free everything directly and the base as a
10338 memchunk, rather than calling camel_message_info_free(), which
10339 assumes a malloc'd array.
10341 * providers/local/camel-local-summary.c: Include ctype.h, kill a
10343 (local_summary_decode_x_evolution): If we get a NULL message info,
10344 then dont try and set anything, just check for validity.
10345 (camel_local_summary_write_headers): New function to write a set
10346 of headers to an fd.
10347 (camel_local_summary_check): Added some statistic generation
10348 stuff for memory profiling.
10350 * providers/local/camel-mbox-summary.c (header_write): Changed to
10351 use stdoi functions to write out the header to a buffered stream,
10352 instead of using writev, which is apparently slow (and writing
10353 each line separately is slow anyway).
10354 (mbox_summary_sync_full): New implementation. Does things
10355 differently, doesn't use or require the content info stuff.
10356 (summary_rebuild): Dont return an error if we start scanning at
10358 (mbox_summary_sync_full): If we are not writing out new headers,
10359 make sure we copy the From line as we go, and update frompos
10361 (mbox_summary_sync_full): Always copy the From line from the
10362 existing one, rather than trying to make one up ourselves.
10363 (mbox_summary_sync): If we can get by with a quick-sync, then try
10364 it, if that fails, then try a full sync anyway.
10365 (mbox_summary_sync_quick): Quick sync. Only update system flags,
10367 (mbox_summary_sync_full): Use the proper local summary encode_xev
10369 (header_evolution_decode): Removed, no longer needed.
10370 (header_evolution_encode): Same.
10371 (copy_block): No longer needed, removed.
10372 (header_write): Removed, replaced with
10373 camel_local_summary_write_headers.
10374 (mbox_summary_sync_full): Fixed for header_write change.
10376 * camel-mime-parser.c (folder_scan_step): Implement the new
10377 optional parser state HSCAN_PRE_FROM, that returns the (currently
10378 unfiltered) input data.
10379 (folder_scan_drop_step): Do the right thing for the PRE_FROM
10381 (camel_mime_parser_scan_from): Update the doco.
10382 (camel_mime_parser_scan_pre_from): Ok, make this behaviour
10383 optional, it simplifies a lot of loops that dont otherwise need to
10385 (folder_scan_step): Made the PRE_FROM state optional.
10386 (struct _header_scan_state): Made the bool vars 1 bit.
10387 (folder_pull_part): Free the from_line buffer if it is there.
10388 (folder_scan_skip_line): Added a new arg, can save the skpped data
10389 to a byte_array, as we go.
10390 (folder_scan_step): Fixed calls to skip_line approrpiately. Now
10391 we save the from line as we parse it.
10392 (camel_mime_parser_read): New function to read from the mime
10393 parser buffer directly. Useful if you use the parser to read the
10394 first/some headers, then need to scan the rest of the data,
10395 without needing to use a seek(), or allocate your own buffers.
10397 * camel-mime-parser.h (struct _header_state): Added a new parser state,
10398 pre-from which returns any data found before a from line during
10399 parsing (all other data can be retrieved by the caller except
10402 2000-11-17 Jeffrey Stedfast <fejj@helixcode.com>
10404 * providers/imap/camel-imap-utils.c (imap_parse_nstring): When
10405 extracting a literal string, capture up until the end of the last
10406 line - this we we don't lose any data if the byte count is off.
10408 * providers/imap/camel-imap-command.c (imap_read_untagged): Use
10409 the byte-read count to decrement the number of bytes left to read
10410 rather than using strlen. Not only does this protect against a DoS
10411 (embedded NUL chars in the literal string would make strlen
10412 inaccurate) but it also improves performace a little.
10414 * camel-remote-store.c (remote_recv_line): *Sigh* Return the
10415 number of bytes read on success rather than 0. Also don't use
10416 camel_stream_buffer_read_line since we can't get an accurate octet
10419 2000-11-17 Not Zed <NotZed@HelixCode.com>
10421 * providers/local/camel-local-summary.c (local_summary_add): Clear
10422 the NOXEV/FLAGGED bits, since we do have an xev header. um m,
10423 maybe this is right, this assumes a write is following. Maybe
10424 this should be done in folder::append() instead ...
10426 * camel-stream-buffer.c (camel_stream_buffer_gets): We should
10427 always terminate the string. No need to check outptr is in range,
10428 its already been checked.
10430 * providers/local/camel-mbox-summary.c (mbox_summary_sync): When
10431 we update the summary, do it from mbox_summary->folder_size, not
10432 the content info endpos (which isn't any good anymore anyway).
10434 * providers/local/camel-mbox-folder.c (mbox_append_message): Set
10435 the frompos from the current folder size, since summary_add wont
10436 have initialised it to anything useful.
10438 2000-11-16 Not Zed <NotZed@HelixCode.com>
10440 * providers/local/camel-local-summary.c
10441 (local_summary_encode_x_evolution): Check the uid string is all
10442 digits before trying to write a 'standard' x-ev header.
10444 * providers/local/camel-maildir-summary.c
10445 (camel_maildir_summary_info_to_name): Convert an info into a
10446 maildir name:info filename.
10447 (camel_maildir_summary_name_to_info): Convert a name:info filename
10448 into an info, and tell us if it didn't match it.
10449 (message_info_new): When creating a new filename, gets its info
10450 from the flags field. Likewise if creating from an existing file,
10452 (maildir_summary_sync): Remove a small memleak. Also, if our
10453 flags and that requires a filename change, perform that here.
10454 (message_info_new): Get the received date from the filename.
10455 Also, dont overwirte the uid if we have one.
10456 (maildir_summary_check): Sort the summary in received order before
10458 (maildir_summary_next_uid_string): Test the name for collusions
10459 before we give it out. Retry, and if that fails, well, I guess we
10462 * providers/local/camel-mbox-folder.c (mbox_lock): Implement mbox
10464 (mbox_unlock): And unlocking.
10465 (mbox_append_message): Lock the folder for write before doing
10467 (mbox_get_message): Lock the folder for read before doing
10470 * providers/local/camel-local-folder.c (camel_local_folder_lock):
10471 Implement something here. We handle the recursive ability but
10472 pass the locking to the folder itself.
10473 (camel_local_folder_unlock): Likewise for unlocking.
10474 (local_lock): Default - do nothing, return success.
10475 (local_unlock): Same.
10476 (local_sync): Changed slightly for locking api changes, and also,
10477 only lock around the sync process itself.
10479 * camel-lock.c: New file - utility functions for locking using
10480 different strategies and/or for locking folders safely.
10482 * Makefile.am (libcamel_la_SOURCES): Adde camel-lock.[ch]
10484 2000-11-15 Radek Doulik <rodo@helixcode.com>
10486 * camel-mime-utils.c: mime_guess_type_from_file_name moved back to
10487 composer as it introduced unwanted VFS dependency
10488 removed #include <libgnomevfs/gnome-vfs.h>
10490 2000-11-15 Not Zed <NotZed@HelixCode.com>
10492 * providers/Makefile.am: Removed local again, not quite ready.
10494 2000-11-14 Not Zed <NotZed@HelixCode.com>
10496 * camel-folder-summary.c (message_info_new_from_message): Use
10497 message_info_new to create the summary from headers, instead of
10498 getting directly from the message.
10499 (format_recipients): No longer required.
10501 * providers/Makefile.am (SUBDIRS): Added local.
10503 2000-11-11 Not Zed <NotZed@HelixCode.com>
10505 * camel-mime-parser.c (folder_push_part): Make sure 'atleast' is
10506 at least 1, always. This is possibly a temporary fix for a
10507 bad failure mode on bad multipart messages.
10508 (folder_scan_content): Go until inend, not inend+1. Changed the
10509 continuation and retry logic to be simpler and more robust. If we
10510 can't find a marker within
10511 the atleast we need, just set it to 1, and try again, rather than
10512 just going to the next smaller limit (boundary check checks the
10514 (header_append): streamline the empty line case. And strip
10515 trailing \r's if there are any (\n's already stripped).
10516 (folder_scan_header): Reordered and cleaned up a lot. Check for
10517 continuation only once, and compress lwsp then. Assume the header
10518 buffer already has end of line's stripped, and simplify some things:
10519 Only check for end of headers once and easier.
10520 Dont check to remove end of line character
10521 Dont bother testing inptr-start if we get a boundary match - it is
10523 (folder_scan_header): Removed the unused part variable, and a few
10524 pointless assignments.
10525 (folder_scan_header): Change the end limit to be 1 higher, to make
10526 sure we get all content.
10527 (folder_scan_content): And here too.
10528 (folder_scan_header): Killed a warning.
10529 (folder_push_part): Removed a bad comment. Actually
10530 boundarylenfinal can be zero for a new message not in a
10531 multipart. So we fix that here.
10533 2000-11-09 Not Zed <NotZed@HelixCode.com>
10535 * camel-mime-utils.c (header_decode_param_list): Renamed from
10536 header_param_list_decode.
10537 (header_param_list_decode): New external function to decode a
10539 (header_param_list_format_append): Made public.
10540 (header_param_list_format): Another new public helper function for
10541 formatting just a param list.
10543 * camel-folder-summary.c (next_uid_string): Default implementation
10544 is the same as before.
10545 (camel_folder_summary_class_init): And set it up.
10547 * camel-folder-summary.h: Make next_uid_string a virtual function.
10549 * camel-folder.c (camel_folder_change_info_changed): New function
10550 to return true if the changeset contains any changes.
10552 2000-11-14 Jeffrey Stedfast <fejj@helixcode.com>
10554 * camel-stream.c (camel_stream_printf): Don't cast an int to a
10557 2000-11-10 Dan Winship <danw@helixcode.com>
10559 * providers/mbox/camel-mbox-summary.c
10560 (camel_mbox_summary_build_from): put a space before a single-digit
10561 day of the month since it seems some mailers are fantastically
10562 picky about this. (bugs.gnome.org #27232)
10564 2000-11-10 Radek Doulik <rodo@helixcode.com>
10566 * camel-mime-utils.c (header_msgid_generate): fix ids ending with '.'
10568 2000-11-09 Dan Winship <danw@helixcode.com>
10570 * providers/imap/camel-imap-auth.c (imap_try_kerberos_v4_auth):
10571 Fix error handling. (Only send a "*" to bail out of authentication
10572 if the server hasn't already bailed on us.)
10574 2000-11-08 Radek Doulik <rodo@helixcode.com>
10576 * camel-mime-utils.c (mime_guess_type_from_file_name): new
10577 function, moved from composer
10579 2000-11-08 Not Zed <NotZed@HelixCode.com>
10581 * camel-mime-message.c (find_best_encoding): Keep track of the
10582 caller bestenc flags that make sense.
10584 * camel-mime-filter-bestenc.c (filter): Added code to detect when
10585 we have "^From " lines in the sequence of text.
10586 (camel_mime_filter_bestenc_get_best_encoding): Added a new flag
10587 CAMEL_BESTENC_NO_FROM: if set, it will not allow any lines
10588 matching "^From " to appear in the output - currently forcing
10589 base64 encoding to achieve this.
10591 * camel-mime-parser.c (folder_scan_step): Call
10592 camel_mime-filter_complete() once we're done, rather than
10594 (folder_scan_content): Some fixes for state changing; so that when
10595 we do find another boundary it is properly flagged. Since we
10596 strip the last \n off all data, we must take that into account
10597 too. Sigh. Fixes a rather nasty set of bugs where multipart
10598 messages could start including following messages as parts, etc.
10599 (struct _header_scan_stack): Added new parameter,
10600 boundarylenfinal, which holds the length of the final boundary, if
10601 it is different (e.g. for From lines, whihc aren't)
10602 (folder_scan_step): Setup teh boundarylenfinal value when creating
10604 (folder_scan_content): Hmm, if we hit the end-of-buffer sentinal,
10605 reset the scanner back to leave 'atleast' chars in the buffer
10606 still, dump that content, and retry again. Stops us losing a
10607 check for a boundary on some data we haven't really looked at yet!
10608 (folder_scan_content): Use boundarylenfinal to calculate
10610 (folder_scan_header): And here too.
10611 (folder_boundary_check): Use the atleast value directly, dont
10612 truncate it. Use the boundarylen/boundarylenfinal values directly
10614 (struct _header_scan_stack): Add an atleast parameter to cache the
10616 (folder_push_part): Determine/set 'atleast', every time we add a
10618 (folder_scan_header): Get the cached atleast info from the current
10620 (folder_scan_content): And here too.
10621 (folder_scan_header): Fix a problem where a part starting with
10622 " text" would be interpreted as a followon header wrongly.
10624 * camel-mime-filter-charset.c (complete): Add some assertions to
10627 2000-11-07 Ettore Perazzoli <ettore@helixcode.com>
10629 * camel-service.c (get_name): Strdup the "???" string you return,
10630 so that the expected semantics for `::get_name()' is respected.
10632 2000-11-07 Dan Winship <danw@helixcode.com>
10634 * camel-stream-filter.c (d): Kill debugging, as it causes lots of
10635 evolution-mail spewage.
10637 2000-11-07 Not Zed <NotZed@HelixCode.com>
10639 * camel-mime-filter-bestenc.c (complete): Implement a complete()
10640 function, now we need one.
10641 (filter): Upgraded to match rfrc2045 properly. Checks also for
10642 length of line and valid CRLF sequences.
10643 (camel_mime_filter_bestenc_get_best_encoding): Do the work of
10644 working out what is the best encoding given what we found about
10647 * camel-mime-part.c (camel_mime_part_encoding_to_string): Use a
10648 lookup table to get the encoding naem, and add the binary type.
10649 (camel_mime_part_encoding_from_string): Likewise for the reverse.
10651 * camel-mime-part.h: Added the binary encoding type, see rfc2045.
10653 * camel-mime-utils.c (header_param_list_format_append): Dont put a
10654 space before ;'s in parameter lists, makes them more
10655 readable/consistent.
10657 * camel-mime-message.c (multipart_has_8bit_parts): Cleaned up the
10658 old stuff, well removed it.
10659 (camel_mime_message_set_best_encoding): Added another argument
10660 that lets you select what you want to set the best of. i.e. for
10661 smtp transport we only need 7 bit, and dont need to optimise the
10662 charset (although of course, we should always).
10663 (find_best_encoding): Implement this feature, if we are not
10664 getting the best charset, use the one we have.
10665 (best_encoding): Set the charset on the part appropriately. Sigh,
10666 the interfaces for this are nonexistant.
10667 (find_best_encoding): Tell the bestenc filter that lf should be
10668 treated as crlf for the purposes of determining encodings.
10670 2000-11-06 Not Zed <NotZed@HelixCode.com>
10672 * camel-charset-map.c (camel_charset_init): Init function for an
10673 iterative charset determinator.
10674 (camel_charset_step): Iterate another buffer.
10675 (camel_charset_mask): Removed, since it couldn't have worked.
10676 (camel_charset_best): Use the iterative interface to do the work.
10677 (camel_charset_best_name): Get the best name for a charset so far.
10679 * camel-mime-filter-bestenc.c: New class, a stream
10680 filter that can be used to memory-efficiently determine the best
10681 encoding and/or charset to use for a given stream of bytes.
10683 * Makefile.am (libcamelinclude_HEADERS): Added stream-null*.
10684 (libcamel_la_SOURCES): Added bestenc*
10686 * camel-stream-null.c: New class, a null-stream, that always
10687 succeeds, and never has any contents.
10689 * camel-stream.c: Minor pointless changes. Was going to do
10690 something else but changed my mind. Added trivial default
10691 implementations for all callbacks.
10693 * camel-mime-message.h: Cleaned up some old cruft.
10695 * camel-folder-summary.c (camel_folder_summary_format_address):
10696 address_list_format() no longer encodes, so we dont need to decode
10699 * camel-address.c (camel_address_unformat): New function, attempts
10700 to reverse the formatting process on display addresses.
10701 (camel_address_length): New function to get the number of
10702 addresses, without having to peek the structure.
10704 * camel-mime-message.c (camel_mime_message_set_from): Fix a typo.
10705 (camel_mime_message_finalize): Only unref from/reply_to if we have
10707 (camel_mime_message_set_recipients): New function - set the
10708 recipients as a CamelInternetAddress. This function effectively
10709 deprecates the older recipient setting functions.
10710 (camel_mime_message_add_recipient): What the hell, i'll bite the
10711 bullet. Terminate this function. The old api was ambiguious and
10712 inefficient and didn't work right anyway.
10713 (camel_mime_message_remove_recipient_address): And this one.
10714 (camel_mime_message_remove_recipient_name): And this one too.
10715 (camel_mime_message_set_recipients): If we set an empty header,
10716 then remove it from the header list. Allow a null receipient
10717 object to clear a header.
10718 (camel_mime_message_set_from): Likewise, if setting an empty from
10720 (camel_mime_message_encode_8bit_parts): Eeek!!
10721 camel_stream_mem_new_with_byte_array owns the byte_array we give
10722 it, so make sure we dont free any of it!
10723 (camel_mime_message_encode_8bit_parts): Infact, i'll just rewrite
10724 the whole lot, its a bit of a mess. Should really rename it and
10725 make it a little more useful too, lets see ...
10726 (best_encoding): This has a string interface? Oh boy.
10727 (camel_mime_message_foreach_part): New experimental function to
10728 iterate over all message parts. Might not remain.
10729 (camel_mime_message_has_8bit_parts): New implementation using
10730 foreach_part. Fixed a couple of problems.
10731 (find_best_encoding): New function, that finds the best encoding
10732 for a given part (will probably be moved to camel-mime-part), and
10733 also the best charset to use if it is a text part. Since one
10734 affects the other it is a two pass process, but uses streams and
10735 not memory to achieve this.
10736 (camel_mime_message_set_best_encoding): Uses the function above to
10737 configure an entire message for the best encoding possible given
10738 transport constraints.
10739 (camel_mime_message_encode_8bit_parts): Reimplemented to use the
10740 function above to perform the work.
10742 * camel-internet-address.c
10743 (camel_internet_address_format_address): Dont put <> around a lone
10744 address with no real name.
10745 (camel_internet_address_encode_address): Similarly.
10746 (internet_decode): Actually return the count of decoded addresses.
10747 (internet_unformat): Implement the unformatting routine.
10749 2000-11-05 Not Zed <NotZed@HelixCode.com>
10751 * providers/smtp/camel-smtp-transport.c (_send_to): Changed to get
10752 the internetaddress directly, rather than having to parse it
10755 * camel-address.c (camel_address_format): Added a new function
10756 which will format address, suitable for display.
10757 (camel_address_cat): Concatentate 1 camel address onto another.
10758 It is upto the caller to ensure the addresses are of compatible
10760 (camel_address_new_clone): New function to create a new address by
10761 copying an existing one of the same type.
10762 (camel_address_copy): New helper function to copy an address.
10764 * camel-mime-message.h (struct _CamelMimeMessage): Removed cached
10765 copy of date string.
10766 (struct _CamelMimeMessage): Added date_received info.
10768 * camel-mime-message.c (camel_mime_message_get_date_string):
10769 Removed. Nothing uses it anyway, and it is redundant.
10770 (camel_mime_message_finalize): No more date_str.
10771 (camel_mime_message_init): No more date_str, initialise
10773 (write_to_stream): Change the check for a date header.
10774 (process_header): No longer track the date_str.
10775 (camel_mime_message_get_received_date): Removed. totally invalid
10777 (camel_mime_message_get_sent_date): Removed. Redundant. The only
10778 'date' is the sent date, the received date is just made up.
10779 (camel_mime_message_get_date): Args changed to be more consistent
10780 with utility functions.
10781 (camel_mime_message_get_date): Dont set the date when we're asked
10782 for it (if its not set by the time its written, it'll be set
10784 (camel_mime_message_get_date_received): Actually do 'the right
10785 thing' here, if we have a received header, use that to determine
10786 the received date. And return the data in the same format as
10788 (camel_mime_message_set_from): Changed the api to better match
10789 what we should be doing. Pass a camelinternetaddress, etc.
10790 (camel_mime_message_set_reply_to): Cahnged similarly to take an
10792 (camel_mime_message_get_reply_to): Likewise.
10793 (camel_mime_message_finalize): Unref the from/reply_to objects.
10794 (format_address): Removed, no longer needed.
10795 (process_header): Changed to store the from/reply_to as
10797 (write_to_stream): Set the from header directly to empty, if we
10798 dont have one. Maybe we should just abort, and/or create one
10799 based on the current user.
10801 * camel-mime-utils.c (header_address_list_format): Renamed to
10802 header_address_list_encode, which is what it is actually doing.
10803 (header_address_list_format_append): Similarly.
10804 (encoding_map[]): Removed, no longer used.
10805 (header_address_list_encode_append): Take another arg, do we
10806 encode the address (for internet), or not (for display - utf8
10808 (header_address_list_format): Re-added this function, but now it
10809 generates a display version only. Surprise surprise, that is all
10810 anythign needs to generate anyway. Sigh.
10812 * camel-internet-address.c (camel_internet_address_get): Return
10813 false if we get an invalid index only.
10814 (camel_internet_address_encode_address): Helper function to encode
10815 a single address for mailing.
10816 (internet_encode): Use the above function to format it.
10817 (camel_internet_address_format_address): Format a single address
10819 (internet_format): Implement the display version.
10820 (camel_internet_address_class_init): Init the internet_format
10822 (internet_cat): Implement virtual function to concatenate
10825 * camel-folder-summary.c
10826 (camel_folder_summary_info_new_from_header): new function, only
10827 build the summary info, dont add it.
10828 (camel_folder_summary_info_new_from_parser): Likewise, for new
10830 (camel_folder_summary_add_from_parser): Cahnged to call function
10831 above to build info.
10832 (camel_folder_summary_add_from_header): Changed to call function
10833 above, to build info.
10834 (camel_folder_summary_info_free): New function to free the summary
10836 (camel_folder_summary_clear): Changed to clal above to free info.
10837 (camel_folder_summary_remove): Likewise.
10838 (camel_folder_summary_add): Cleaned up the clashing uid
10839 re-assignment logic a little bit.
10840 (camel_folder_summary_decode_uint32): Fixed a typo, 01 != -1.
10841 (camel_folder_summary_decode_time_t): Return -1 on error.
10842 (camel_folder_summary_encode_off_t): New function to encode an
10844 (camel_folder_summary_decode_off_t): And likewise for the reverse.
10845 (CAMEL_FOLDER_SUMMARY_VERSION): Bumped the summary version, since
10846 we're now encoding time/off_t's right.
10847 (summary_header_save): Use time_t encoder to save the timestamp.
10848 (summary_header_load): Likewise for decoding the timestamp.
10849 (content_info_load): Decode off_t types directly, now we can.
10850 (content_info_save): And likewise for encoding.
10851 (camel_folder_summary_add_from_message): New function, create a
10852 summary item from an existing message and add it.
10853 (camel_folder_summary_info_new_from_message): New function, create
10854 a summary item from an existing message.
10855 (summary_build_content_info_message): New function to do the dirty
10856 work of building the conent info/indexing, from a message source.
10857 (format_recipients): Format an internetaddress suitable for the
10859 (message_info_new_from_message): Build a new summary item from a
10861 (content_info_new_from_message): Build a new conent info from a
10863 (camel_folder_summary_class_init): Init the new class functions.
10864 (message_info_new_from_message): Fixed for message api change.
10866 Added documentation to the functions.
10868 2000-11-03 Radek Doulik <rodo@helixcode.com>
10870 * camel-mime-utils.c (header_msgid_generate): new function,
10871 generates simple message/content id
10873 2000-11-04 Not Zed <NotZed@HelixCode.com>
10875 * camel-mime-part-utils.c
10876 (camel_mime_part_construct_content_from_parser): Set the
10877 preface/postface from the parser into the multipart object.
10879 * camel-multipart.c (camel_multipart_set_postface): Function to
10880 set the postface text on a multipart.
10881 (camel_multipart_set_preface): Similarly for preface text.
10883 * camel-mime-parser.c (folder_scan_content): If we scan until a
10884 boundary, then we do not include the \n that starts the boundary
10885 line in the content.
10886 (struct _header_scan_stack): Added a ByteArray to store the
10887 multipart pre/post-text as we're scanning.
10888 (folder_pull_part): Free pre/posttext if they are allocated.
10889 (folder_scan_step): Build into the pre/posttext arrays as we
10891 (camel_mime_parser_preface): REturn the multipart preface text, if
10892 there is any scanned.
10893 (camel_mime_parser_postface): Likewise for postface text.
10894 (byte_array_to_string): helper function for above.
10896 * providers/mbox/camel-mbox-folder.c (mbox_append_message): Change
10897 the from line to be "\nFrom ..." always, so no need to
10898 check/append a \n to messages.
10899 (mbox_append_message): Open the output stream with append mode
10900 [assuming this is more efficient than seeking to the end]
10901 And dont prepend \n on the From line if its the first in the
10903 (mbox_append_message): Pass the offset of the real start of the
10904 "From " line when we perform the update (which may != 'seek')
10906 * camel-mime-filter-charset.c (complete): Removed the terminating
10909 * camel-stream-filter.c (do_read): Added some debug.
10910 (do_flush): And here.
10911 (do_write): And here too.
10912 (do_write): ARGH!!! ARGH! Ok, so the filter stream was writing a
10913 different number of bytes than the requester was asking it to
10914 write (because of filtering, of course!). So instead of returning
10915 the true number of written bytes, we'll return what they asked us
10916 to write - unless there is an error in which case we return -1.
10918 * camel-mime-utils.c (base64_encode_close): Sigh, forgot to make
10919 it unsigned. I think this is actually a gcc bug as (48 >> 2)
10920 somehow ended up negative, when it obviously should not, even if
10921 the data load was signed.
10923 2000-11-03 Jeffrey Stedfast <fejj@helixcode.com>
10925 * camel-url.c: Undo my incorrect fix - I misunderstood danw -
10928 2000-11-03 Dan Winship <danw@helixcode.com>
10930 * providers/pop3/camel-pop3-store.c (camel_pop3_store_expunge):
10933 2000-11-03 Jeffrey Stedfast <fejj@helixcode.com>
10935 * camel-url.c (camel_url_to_string): If show_pass, then base64 the
10936 password before writing it to the output string.
10937 (camel_url_new): Assume password has been base64 encoded and
10938 decode accordingly.
10940 2000-11-03 Dan Winship <danw@helixcode.com>
10942 * camel-provider.h: Add an "url_flags" field to CamelProvider.
10943 Move the CAMEL_SERVICE_URL_* defines here and remove the SERVICE_
10946 * camel-service.h: Remove CAMEL_SERVICE_URL_* flags and
10947 service->url_flags field.
10949 * camel-service.c (check_url, get_path): Get URL flags from
10950 service->provider, update for changed flag names.
10952 * providers/*/camel-*-provider.c: Add URL flags to provider
10955 * providers/*/camel-*-{store,transport}.c, camel-remote-store.c:
10956 Remove service->url_flags initialization.
10958 2000-11-02 Jeffrey Stedfast <fejj@helixcode.com>
10960 * providers/imap/camel-imap-store.c (get_folder_info): Quote
10961 foldernames when sending to the IMAP server because the folder
10962 name might contain spaces.
10964 2000-11-02 Not Zed <NotZed@HelixCode.com>
10966 * Merged in camel-incremental-branch.
10968 2000-11-01 Dan Winship <danw@helixcode.com>
10970 * providers/imap/camel-imap-store.c (get_folder_info): Remove old
10971 subbed folders from hash table after freeing them.
10973 * providers/imap/camel-imap-folder.c (imap_get_full_name): Deal
10974 correctly with namespace == ""
10976 2000-11-01 Gediminas Paulauskas <menesis@delfi.lt>
10978 * camel-charset-map.c, camel-charset-map-private.h: synced all charsets
10979 with ones found in libunicode. Just include more "iso/*.h" and rebuild
10980 ...private.h with this.
10982 2000-10-31 Dan Winship <danw@helixcode.com>
10984 * camel-service.c (service_disconnect): Add a new argument, clean,
10985 that says whether or not to try to disconnect cleanly.
10987 * camel-remote-store.c (remote_send_string, remote_send_stream,
10988 remote_recv_line): disconnect uncleanly on failure to prevent
10989 infinite loops when providers would normally send commands from
10990 disconnect(). Remove some unneeded CamelException goo.
10992 * providers/smtp/camel-smtp-transport.c (smtp_disconnect):
10993 * providers/pop3/camel-pop3-store.c (pop3_disconnect):
10994 * providers/nntp/camel-nntp-store.c (nntp_store_disconnect):
10995 * providers/imap/camel-imap-store.c (imap_disconnect): Don't send
10996 QUIT/LOGOUT if !clean.
10998 2000-10-30 Dan Winship <danw@helixcode.com>
11000 * providers/imap/camel-imap-auth.c: New file with code for IMAP
11001 authentication mechanisms. (Currently just krb4, and without
11002 integrity/privacy protection).
11004 * providers/imap/Makefile.am: Add camel-imap-auth.[ch] and krb4
11007 * providers/imap/camel-imap-store.c (connect_to_server): Split out
11008 from imap_connect. Just does the basic connect and CAPABILITY
11009 check. Redo the CAPABILITY code more robustly.
11010 (query_auth_types_connected): Do this right rather than punting to
11011 query_auth_types_generic. Check for KERBEROS_V4 if compiled with
11013 (query_auth_types_generic): Mention KERBEROS_V4 if compiled with
11015 (imap_connect): Use connect_to_server().
11017 * camel-mime-utils.c (base64_encode_step, base64_encode_close):
11018 Take an additional argument, "break_lines", saying whether or not
11019 to add '\n's to the output.
11021 * camel-multipart.c (set_boundary):
11022 * camel-mime-filter-basic.c (filter, complete): Update for base64
11025 2000-10-30 Peter Williams <peterw@helixcode.com>
11027 * providers/imap/camel-imap-store.c (unsubscribe_folder): Correct
11028 parameters to g_hash_table_lookup_extended.
11030 2000-10-29 Dan Winship <danw@helixcode.com>
11032 Improved IMAP namespace handling: leave the namespace in the
11033 folder names rather than constantly prepending it and stripping it
11034 off. Also some subscription fixes.
11036 * camel-store.c (camel_folder_info_build): Fix for the case where
11037 @top isn't in @folders.
11039 * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Add
11040 a "short_name" argument rather than figuring it out ourselves.
11041 (imap_get_full_name): Implementation of CamelFolder::get_full_name
11042 that strips off namespace so the user doesn't have to see it.
11043 (imap_append_message, imap_copy_message_to, imap_move_message_to):
11044 Use folder->full_name rather than calling
11045 camel_imap_store_get_folder_path.
11047 * providers/imap/camel-imap-utils.c (imap_parse_list_response):
11048 Update this: make @flags a bitmask and @sep a char rather than a
11049 string. Make all of the out arguments optional. Handle literals in
11050 the server response.
11052 * providers/imap/camel-imap-store.c (imap_connect): Do a better
11053 job of getting the correct dir_sep for the namespace we're using.
11054 Construct a base_url here that will be used by get_folder_info.
11055 (camel_imap_store_folder_path): Removed
11056 (imap_folder_exists): Add an argument to return the short name of
11057 the folder (parsed out of the LIST response). Update for
11058 imap_parse_list_response change.
11059 (get_folder): Update for the various other changes.
11060 (get_folder_info): Update for the various other changes. Be more
11061 consistent about the returned layout: put everything underneath
11062 the "namespace" directory, including INBOX, even if it doesn't
11063 belong there. Don't destroy the list of subscribed folders until
11064 we've actually gotten the new list.
11065 (folder_subscribed, subscribe_folder, unsubscribe_folder): Use
11066 folder_name directly rather than camel_imap_store_folder_Path.
11068 * providers/imap/camel-imap-command.c (camel_imap_command): Update
11069 for folder name changes.
11071 2000-10-29 Dan Winship <danw@helixcode.com>
11073 * camel.h: Remove md5-utils.h include since it's not part of Camel
11076 * camel-charset-map.c: Kill some warnings.
11078 * providers/nntp/camel-nntp-grouplist.c
11079 (camel_nntp_get_grouplist_from_file, camel_nntp_grouplist_save):
11080 Clean up warnings about time_t casts.
11082 * providers/smtp/camel-smtp-transport.c: Remove unused md5-utils.h
11085 * providers/pop3/camel-pop3-store.c: Undefine the "_" macro
11086 defined by krb4's des.h when compiling with krb support.
11087 Fix md5-utils.h include.
11089 2000-10-27 Dan Winship <danw@helixcode.com>
11091 * camel-mime-utils.c (header_param_list_format_append): Only quote
11092 Content-type parameters when the quoting is mandatory, and deal
11093 with embedded quotes/backslashes when quoting.
11095 2000-10-27 <jpr@helixcode.com>
11097 * providers/pop3/Makefile.am: Tidy up build
11099 * providers/smtp/Makefile.am: ditto
11101 * Makefile.am: Move md5-utils.[hc] to e-util because the
11102 addressbook is going to use md5 hashes for pilot syncing.
11103 Maybe the calendar conduits as well because this is a good idea
11106 2000-10-26 Kjartan Maraas <kmaraas@gnome.org>
11108 * camel-exceptions-list.def: Add newline to kill warnings.
11110 2000-10-25 Dan Winship <danw@helixcode.com>
11112 * providers/imap/camel-imap-store.c (get_folder_info): Fix folder
11113 listing code infinite loop.
11115 * camel-store.h: Add a "parent" field to CamelFolderInfo.
11117 * camel-store.c (camel_folder_info_build): Deal with "parent"
11118 (camel_store_folder_subscribed, camel_store_subscribe_folder,
11119 camel_store_unsubscribe_folder): Add g_return_if_fails checking
11120 that the folder supports subscriptions.
11122 * providers/imap/camel-imap-store.c (folder_subscribed,
11123 subscribe_folder, unsubscribe_folder): Remove "+ 1"s since the
11124 mail subscribe UI won't prepend / to the folder names now.
11125 (get_folder_info): Clear the "parent" field of the folderinfos
11126 when removing an empty top level.
11128 * providers/nntp/camel-nntp-store.c (nntp_store_folder_subscribed,
11129 nntp_store_subscribe_folder, nntp_store_unsubscribe_folder):
11130 Remove "+ 1"s since the mail subscribe UI won't prepend / to the
11133 2000-10-24 Chris Toshok <toshok@helixcode.com>
11135 * providers/imap/camel-imap-store.h: add subscribed_folders.
11137 * providers/imap/camel-imap-store.c (camel_imap_store_class_init):
11138 fill in vtable entries for subscription functions.
11139 (camel_imap_store_finalize): new function, so we can free up our
11140 subscribed_folders hashtable.
11141 (camel_imap_store_init): set CAMEL_STORE_SUBSCRIPTIONS in the
11142 CamelStore flags, and create our subscribed_folders hashtable.
11143 (camel_imap_store_get_type): camel_imap_store_finalize is our
11145 (get_folder_info): if we're looking at subscribed_only, clear out
11146 the subscribed_folders hashtable, use LSUB instead of LIST, and
11147 insert folder paths (prepended by their namespace if there is one)
11148 into subscribed_folders. INBOX subscription support needs work,
11149 since we always show it, regardless of it's subscribed state.
11150 (folder_subscribed): new function. just look up the folder_path
11152 (subscribe_folder): new function. use the imap SUBSCRIBE command,
11153 and if successful add it to the hashtable.
11154 (unsubscribe_folder): new function. use the imap UNSUBSCRIBE
11155 command, and if successful remove it from the hashtable.
11157 2000-10-24 Dan Winship <danw@helixcode.com>
11159 * providers/imap/camel-imap-store.c (get_folder_info): Fill in the
11160 message_count and unread_message_count flags (if !fast).
11162 2000-10-23 Dan Winship <danw@helixcode.com>
11164 * camel-object.h: #include gnome-i18n.h (and gnome-defs.h since
11165 the former depends on it.)
11167 * *: Add lots of _() and N_().
11169 2000-10-23 Chris Toshok <toshok@helixcode.com>
11171 * providers/nntp/Makefile.am (libcamelnntpinclude_HEADERS): add
11172 camel-nntp-types.h.
11174 2000-10-23 Dan Winship <danw@helixcode.com>
11176 * providers/imap/camel-imap-command.c (imap_read_untagged): Fix a
11177 "how could this have been working before" memory overrun bug
11180 * camel-op-queue.[ch], camel-thread-proxy.[ch]: These should have
11181 gone away a long time ago.
11183 2000-10-20 Chris Toshok <toshok@helixcode.com>
11185 * providers/Makefile.am (SUBDIRS): re-enable the nntp provider.
11187 2000-10-20 Chris Toshok <toshok@helixcode.com>
11189 * providers/nntp/camel-nntp-store.c (build_folder_info): add
11190 function to build a tree from the nntp group names (using '.' as a
11191 heirarchy separator.) #ifdefed INFO_AS_TREE only.
11192 (build_folder_info_from_grouplist): if INFO_AS_TREE is selected,
11193 call build_folder_info instead of appending a new CamelFolderInfo
11195 (ensure_news_dir_exists): use e_mkdir_hier instead of failing if a
11196 parent directory (~/evolution/news generally) isn't there.
11198 2000-10-19 Chris Toshok <toshok@helixcode.com>
11200 * camel-folder-search.c: #include <sys/types.h> before <regex.h>
11202 2000-10-19 Dan Winship <danw@helixcode.com>
11204 * providers/imap/camel-imap-utils.c (imap_parse_list_response):
11205 Fix a bug with "INBOX" (or anything else with NIL hierarchy
11206 separator) as the namespace.
11208 * providers/imap/camel-imap-folder.c (imap_refresh_info): Emit
11209 message_changed and folder_changed as appropriate.
11211 2000-10-19 Dan Winship <danw@helixcode.com>
11213 * camel-folder.c (camel_folder_refresh_info): Update comment here
11214 so refresh_info isn't just for reconnects any more. Make the
11215 default implementation a no-op rather than an error.
11217 * providers/nntp/camel-nntp-folder.c: Move refresh_info impl into
11218 camel_nntp_folder_new, since it would have leaked memory and not
11219 done anything useful if it was called later.
11221 * providers/mbox/camel-mbox-folder.c: Remove no-longer-necessary
11224 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
11225 Update imap_folder->exists, but don't actually load the new
11226 messages. This is a temporary workaround to deal with the IMAP
11227 provider stealing the message list focus at annoying times.
11228 (imap_copy_message_to, imap_move_message_to): Emit a
11229 folder_changed by hand, for now.
11231 2000-10-19 Ettore Perazzoli <ettore@helixcode.com>
11233 * providers/imap/Makefile.am (libcamelimapinclude_HEADERS): Add
11234 `camel-imap-stream.h'.
11236 * Makefile.am (libcamelinclude_HEADERS): Add `camel-charset-map.h'
11237 and `camel-charset-map-private.h'.
11239 2000-10-18 Jeffrey Stedfast <fejj@helixcode.com>
11241 * camel-mime-part.c (camel_mime_part_set_description): The correct
11242 fix this time - the description should be encoded here and not in
11243 the camel-medium layer.
11245 2000-10-30 Not Zed <NotZed@HelixCode.com>
11247 * camel-folder.c (camel_folder_change_info_add_update): Fixed the
11248 changeset logic, which was completely wrong.
11250 2000-10-27 Not Zed <NotZed@HelixCode.com>
11252 * camel-mime-utils.c (quoted_encode_step): Removed is_blank() stuff.
11253 (header_decode_init): When we set the 'space' bit, dont clear all
11255 (quoted_encode): Put back the safemask. Yes we totally need it,
11256 see rfc 2047 section 5, parts (1) and (3).
11257 (CHARS_PSPECIAL): Remove '=' and '_' from the list of allowed
11258 characters (this is an allowed list, not a not-allowed list, like
11260 (camel_mime_special_table): Updated for fixes to definitions.
11261 (CHARS_ESPECIAL): Added '_' to list of characters that should be
11264 2000-10-26 Not Zed <NotZed@HelixCode.com>
11266 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_update):
11267 Use the new camel_folder_change_info_* stuff to build the update
11268 diff, rather than doing it ourselves.
11270 * camel-folder.c (camel_folder_change_info_add_source): Add a
11271 'source' list, used to create change lists.
11272 (camel_folder_change_info_add_source_list): Add a list of uid's,
11273 convenience function.
11274 (camel_folder_change_info_add_update): Add a uid to the list of
11275 uid's in the new updated list.
11276 (camel_folder_change_info_add_update_list): Add a bunch of uid's
11277 at once for the same purpose.
11278 (camel_folder_change_info_build_diff): Take the source list, the
11279 update list, and find the differences, building on the added or
11280 removed list as appropriate.
11282 2000-10-20 Not Zed <NotZed@HelixCode.com>
11284 * providers/mbox/camel-mbox-summary.c (removed_uids): REnamed from
11286 (camel_mbox_summary_update): Oops, fix the reversed logic for
11287 determining the uid changesets.
11289 * camel-folder.c (message_changed): Oops, we want to change the
11292 2000-10-19 Not Zed <NotZed@HelixCode.com>
11294 * providers/mh/camel-mh-summary.c (camel_mh_summary_sync): Added a
11295 change list argument, and add expunged uid's to it.
11297 * providers/mh/camel-mh-folder.c (mh_init): Setup the change list.
11298 (mh_finalize): And free it.
11299 (mh_sync): Track changes, and send a folder_changed signal as
11301 (mh_expunge): Likewise.
11302 (mh_append_message): Add the new uid to the change list and
11303 trigger a folder_changed event.
11305 * providers/mbox/camel-mbox-folder.c (camel_mbox_folder_new):
11306 Setup a mbox list of changes structure.
11307 (mbox_finalize): And free it.
11308 (mbox_expunge): Include the change list with the folder_changed
11309 event, and clear it off.
11310 (mbox_sync): And the same for when we are just syncing the folder.
11311 (mbox_append_message): And do the same here, after we've updated
11314 * providers/mbox/camel-mbox-summary.c
11315 (camel_mbox_summary_build_from): Use gmtime_r to get the time
11317 (camel_mbox_summary_sync): Added a changeinfo argument. Add any
11318 removed or changed messages to the changelists as appropriate.
11319 (camel_mbox_summary_update): Added a changeinfo argument.
11320 Genereate a list of added/removed uid's based on the difference
11321 before and after rebuilding the summary.
11323 * camel-folder.c (camel_folder_change_info_new):
11324 (camel_folder_change_info_add_uid):
11325 (change_info_add_uid):
11326 (camel_folder_change_info_remove_uid):
11327 (camel_folder_change_info_change_uid):
11328 (change_info_clear):
11329 (camel_folder_change_info_clear):
11330 (camel_folder_change_info_free):
11332 (camel_folder_change_info_cat): Bunch of utility functions for
11333 working with change info lists.
11334 (camel_folder_init): Init the change info list.
11335 (camel_folder_finalize): And free it.
11336 (thaw): Changed to pass through a list of changes, or to get the
11337 changed message uids from the camelfolderchangeinfo struct, and
11339 (folder_changed): Add the changed lists to the frozen change list
11341 (message_changed): Add the message to the changed list if we are
11342 in the frozen state.
11344 * camel-folder.h (CamelFolderChangeInfo): New structure to hold
11345 information for the folder_changed event.
11347 2000-10-18 Ettore Perazzoli <ettore@helixcode.com>
11349 * camel-mime-filter-charset.c (complete): Put a zero at the start
11352 2000-10-18 Not Zed <NotZed@HelixCode.com>
11354 * camel-mime-part.c (add_header): No, we must not encode the
11355 headers here. These interfaces ARE raw interfaces as they are
11356 defined in camel_medium. Also removed a bogus/meaningless FIXME.
11357 (set_header): Likewise here, we must not.
11358 (process_header): Removed another bogus comment.
11360 * camel-object.c (shared_is_of_type): Comment out the spitting of
11361 a big warning when we're trying to determine types from code.
11363 * providers/mbox/camel-mbox-summary.c
11364 (message_info_new_from_parser): Only call ibex funcitons if we
11367 * providers/mh/camel-mh-summary.c (camel_mh_summary_add): Only
11368 call ibex functions if we have an index.
11369 (remove_summary): Likewise.
11370 (camel_mh_summary_check): Likewise.
11372 * providers/nntp/camel-nntp-store.c (nntp_store_get_folder):
11373 get_folder -> flags argument.
11375 * providers/vee/camel-vee-store.c (vee_get_folder): create->flags.
11377 * providers/pop3/camel-pop3-store.c (get_folder): Changed create
11380 * providers/imap/camel-imap-store.c (get_folder): Added flags
11383 * providers/mh/camel-mh-folder.c (camel_mh_folder_new): Added
11384 flags argument, and fixed code appropriately.
11386 * providers/mh/camel-mh-store.c (get_folder): Added flags argument.
11388 * camel-folder-search.c (message_body_contains): Perform a regex
11389 match on the contents of messages. This wont quite work yet as
11390 message contents are encoded when written to a stream.
11391 (build_match_regex): Converts a number of strings into a regex
11392 matching pattern, escaping special chars.
11393 (match_message): match a single message from a folder, by uid.
11395 (search_body_contains): Changed to support matching where no index
11396 is supplied. Matches are performed by retrieving message
11398 () WTF? camel should not be including any widget headers.
11400 * providers/mbox/camel-mbox-folder.c (camel_mbox_folder_new):
11401 Added flags argument.
11402 (mbox_refresh_info): Changed into a NOP, the refresh info code
11403 moved into the new function.
11404 (camel_mbox_folder_new): If we have an index requested, build one,
11405 otherwise, remove an old one, or just dont do anything.
11407 * providers/mbox/camel-mbox-store.c (get_folder): Changed create
11408 to flags, changed code to suit.
11410 * camel-store.c (camel_store_get_folder): Changed create to flags.
11411 (get_folder_internal): And here.
11412 (get_folder): And here too.
11414 * camel-store.h (camel_store_get_folder): Change the create
11415 argument to be a flags argument.
11417 2000-10-17 Dan Winship <danw@helixcode.com>
11419 * providers/imap/camel-imap-folder.c (imap_refresh_info): Remove
11420 cached info at the end of the summary when the folder shrinks
11421 between sessions. Also remove an untrue comment.
11422 (camel_imap_folder_new): Move the summary creation to after the
11423 folder selection again, since it depends on the uidvalidity
11426 * providers/imap/camel-imap-store.c (get_folder): Fix up
11427 summary_file to not include the namespace twice.
11429 2000-10-17 Jeffrey Stedfast <fejj@helixcode.com>
11431 * camel-mime-part.c (set_header): Encode the header value.
11432 (add_header): Same.
11434 2000-10-17 Not Zed <NotZed@HelixCode.com>
11436 * camel-mime-filter.c: Added some malloc check debugging stuff.
11438 * camel-mime-parser.c
11439 (struct _header_scan_state): Removed top_part, top_start, and
11440 pending. I can't even remember why they were there, and they're
11443 * camel-mime-filter-basic.c (filter): Forgot to up the space here
11446 2000-10-14 Not Zed <NotZed@HelixCode.com>
11448 * camel-mime-filter-basic.c (complete): Ok, so we hit a fixme, 3x
11449 just wasn't enough for some sequences.
11451 2000-10-16 Jeffrey Stedfast <fejj@helixcode.com>
11453 * providers/imap/camel-imap-command.c
11454 (imap_read_response): Don't imap_next_word(respbuf + 2), instead
11455 use imap_next_word(respbuf) or else we'll skip over the second
11458 2000-10-16 Jeffrey Stedfast <fejj@helixcode.com>
11460 * providers/imap/camel-imap-command.c
11461 (camel_imap_response_extract): Don't free 'resp' as it doesn't
11462 point to the beginning of the allocated data, instead free
11463 response->untagged->pdata[i]. Also, if '*resp' is equal to a space
11464 character, then set resp = imap_next_word (resp) rather than
11465 expecting resp++ to work (there's a list broken IMAP daemons that
11466 like to put extra spaces between tokens).
11467 (imap_read_response): Don't expect 'respbuf+2' to be where the
11468 untagged number response to start (see above fix for an
11471 2000-10-16 Chris Toshok <toshok@helixcode.com>
11473 * camel-service.c (get_path): when using the construct (flags &
11474 CAMEL_SERVICE_URL_NEED_*) make sure to do ((flags &
11475 CAMEL_SERVICE_URL_NEED_*) == CAMEL_SERVICE_URL_NEED_*)
11478 2000-10-16 Jeffrey Stedfast <fejj@helixcode.com>
11480 * providers/imap/camel-imap-store.c (imap_disconnect): Only send
11481 the LOGOUT command if the store is connected.
11482 (imap_connect): Set the 'connected' state to TRUE when we
11483 successfully connect.
11484 (get_folder_info): if (!topfi), 'topfi' was allocated but then
11485 'fi' was set. I think Dan meant to set topfi since fi is an
11486 uninitialized value at this point.
11488 * providers/imap/camel-imap-command.c (imap_read_response): Check
11489 for the untagged BYE response and set the 'connected' state to
11490 FALSE if we receive the BYE response. Return NULL if we get a BYE
11493 2000-10-16 Dan Winship <danw@helixcode.com>
11495 * providers/imap/camel-imap-store.c (get_folder_info): Deal with
11496 the possibility of not getting a LIST response back for the top
11499 2000-10-12 Dan Winship <danw@helixcode.com>
11501 * providers/imap/camel-imap-summary.c: Simple subclass of
11502 CamelFolderSummary that also keeps a UIDVALIDITY value (and
11503 doesn't, for the moment, build content info).
11505 * providers/imap/camel-imap-folder.c:
11506 (various): Use a CamelImapSummary to store/fetch summary info.
11507 (camel_imap_folder_new): Take a path to a file to use for the
11508 summary. Set the folder's permanent_flags correctly according to
11509 the server response. Read in the summary (checking the
11510 UIDVALIDITY) and update it if it's out of date.
11511 (imap_refresh_info): Just fetch UIDs and flags. If the UIDs all
11512 match, update the flags as needed and be done with it. Otherwise,
11513 delete messages that have been expunged from the server and fetch
11514 full summary info for any new messages.
11515 (imap_sync): Save the summary to disk.
11516 (imap_update_summary): Renamed from imap_get_summary_internal. Can
11517 now be told to get summary for only a subset of messages. Use
11518 camel-mime-utils functions rather than rolling our own header
11520 (imap_get_message_info_internal): Merged into imap_update_summary.
11521 (imap_set_message_flags): Don't marked the message FOLDER_FLAGGED
11522 if we're not actually changing the value of any of the flags.
11523 (camel_imap_folder_changed): Deal with EXISTS rather than RECENT.
11525 * providers/imap/camel-imap-store.c (imap_connect): Call
11526 camel_session_get_storage_path and save the value.
11527 (get_folder): Create a local directory to store summary
11528 information and pass a summary file name to camel_imap_folder_new.
11529 Don't call camel_folder_refresh_info from here any more since
11530 camel_imap_folder_new does it again.
11532 * providers/imap/camel-imap-command.c (camel_imap_command): Add a
11533 special case to this to make it possible to get the repsonses from
11534 a SELECT and still have store->current_folder be updated
11536 (imap_read_response): parse EXISTS rather than RECENT
11538 * camel-session.c (camel_session_get_storage_path): Use
11541 * camel-folder-summary.c (camel_folder_summary_remove_index): New
11544 * camel-mime-utils.c (header_raw_append_parse): fix this.
11545 (camel-mime-parser.c doesn't use this code because of the MEMPOOL
11546 optimization, so nothing was ever actually calling it before.)
11548 2000-10-11 Not Zed <NotZed@HelixCode.com>
11550 * camel-mime-part.h (struct _CamelMimePart): Removed
11551 temp_message_buffer, and content_input_stream fields which seem to
11552 have come from nowhere, and are unused.
11554 * camel-mime-utils.c: Added a note about touching this file.
11555 Nobody is to touch it without asking me first. That goes for you
11557 (header_decode_text): In what way is this broken?
11559 2000-10-10 Not Zed <NotZed@HelixCode.com>
11561 * providers/imap/camel-imap-folder.c (imap_get_summary_internal):
11562 Fix camel_summary_* function rename
11563 (imap_get_message_info_internal): Likewise.
11565 * camel-mime-parser.c (camel_mime_parser_finalise): Fixed a spelling mistake.
11567 * camel-folder-summary.c (camel_summary_format_address): Uh, why
11568 do we encode and then decode here ... sigh. This is not the way
11570 (camel_folder_summary_format_address): Renamed to a proper name,
11571 this was only supposed to be a private function.
11572 (camel_folder_summary_format_string): Likewise. Oh i see why it
11573 was made public, code reuse by cut & paste. Joy.
11575 2000-10-11 Chris Toshok <toshok@helixcode.com>
11577 * providers/nntp/camel-nntp-store.c (nntp_store_unsubscribe_folder): remove the leading '/'.
11578 (nntp_store_subscribe_folder): same.
11579 (nntp_store_folder_subscribed): same.
11581 2000-10-11 Jeffrey Stedfast <fejj@helixcode.com>
11583 * providers/imap/camel-imap-folder.c (imap_move_message_to): Quote
11584 the mailbox name as it may contain spaces.
11585 (imap_copy_message_to): Same.
11587 2000-10-10 Chris Toshok <toshok@helixcode.com>
11589 * providers/nntp/camel-nntp-store.c
11590 (build_folder_info_from_grouplist): fill in message_count and
11591 unread_message_count properly.
11593 * providers/nntp/camel-nntp-newsrc.h: reformat.
11595 * providers/nntp/camel-nntp-grouplist.c
11596 (camel_nntp_get_grouplist_from_file): remove spew.
11598 * providers/nntp/camel-nntp-newsrc.c
11599 (camel_nntp_newsrc_group_get_num_articles_read): new function.
11600 (camel_nntp_newsrc_group_get_highest_article_read): robustification.
11602 2000-10-10 Joe Shaw <joe@helixcode.com>
11604 * providers/imap/camel-imap-store.c
11605 (parse_list_response_as_folder_info): Check before dereferencing the
11608 2000-10-10 Jacob "Ulysses" Berkman <jacob@helixcode.com>
11610 * camel-*.c: teach camel about "its" vs. "it's"
11612 2000-10-09 Chris Toshok <toshok@helixcode.com>
11614 * providers/nntp/camel-nntp-store.c (finalize): write out the
11616 (nntp_store_get_name): if @brief, just return host.
11618 * providers/nntp/camel-nntp-newsrc.c: robustification and bug
11621 2000-10-06 Jeffrey Stedfast <fejj@helixcode.com>
11623 * camel-folder-summary.c (camel_summary_format_address): Decode
11624 the resulting string.
11626 2000-10-06 Chris Toshok <toshok@helixcode.com>
11628 * providers/nntp/camel-nntp-grouplist.c: new file.
11630 * providers/nntp/camel-nntp-grouplist.h: new file.
11632 * providers/nntp/camel-nntp-types.h: new file.
11634 2000-10-06 Jeffrey Stedfast <fejj@helixcode.com>
11636 * camel-mime-utils.c (quoted_encode): Fix so that we don't encode
11637 every single char in the word. Also, do we need a safemask? I
11638 don't see why we would.
11639 (header_encode_string): Don't strip off the last char!!
11641 2000-10-06 Chris Toshok <toshok@helixcode.com>
11643 * providers/nntp/Makefile.am (libcamelnntpinclude_HEADERS): add
11644 camel-nntp-grouplist.h
11645 (libcamelnntp_la_SOURCES): add camel-nntp-grouplist.c
11647 * providers/nntp/camel-nntp-provider.c: add our own hash functions
11650 * providers/nntp/camel-nntp-newsrc.c
11651 (camel_nntp_newsrc_group_is_subscribed): new function.
11652 (camel_nntp_newsrc_subscribe_group): new function.
11653 (camel_nntp_newsrc_unsubscribe_group): new function.
11655 * providers/nntp/camel-nntp-newsrc.h: add prototypes for
11656 _group_is_subscribed, _subscribe_group, and _unsubscribe_group.
11658 * providers/nntp/camel-nntp-store.c
11659 (build_folder_info_from_grouplist): new function.
11660 (nntp_store_get_folder_info): add subscribed_only_parameter. if
11661 it's FALSE, load the grouplist and call
11662 build_folder_info_from_grouplist.
11663 (nntp_store_folder_subscribed): implement.
11664 (nntp_store_subscribe_folder): implement.
11665 (nntp_store_unsubscribe_folder): implement.
11666 (camel_nntp_store_init): add CAMEL_STORE_SUBSCRIPTIONS to the
11669 * providers/mh/camel-mh-store.c (get_folder_info): add
11670 subscribed_only parameter.
11672 * providers/mbox/camel-mbox-store.c (get_folder_info): add
11673 subscribed_only parameter.
11675 * providers/imap/camel-imap-store.c (get_folder_info): add
11676 subscribed_only parameter.
11678 * camel-store.c (camel_store_supports_subscriptions): new function.
11679 (camel_store_folder_subscribed): new function.
11680 (camel_store_subscribe_folder): new function.
11681 (camel_store_unsubscribe_folder): new function.
11683 * camel-store.h: add prototypes and virtual functions for the
11684 subscribe implementation. also, add a subscribed_only argument to
11685 camel_store_get_folder_info.
11687 2000-10-05 Jeffrey Stedfast <fejj@helixcode.com>
11689 * camel-mime-utils.c (header_address_list_format_append): Encode
11690 the name part of the address and don't quote the name.
11691 (header_decode_text): Rewrote from scratch, the old code was badly
11694 2000-10-05 Jeffrey Stedfast <fejj@helixcode.com>
11696 * camel-mime-message.c (camel_mime_message_set_reply_to): Use the
11697 camel_address_encode function again.
11698 (camel_mime_message_set_from): Same.
11700 2000-10-05 Jeffrey Stedfast <fejj@helixcode.com>
11702 * camel-mime-utils.c (quoted_encode_step): Modified to not encode
11703 space chars in the middle of a line.
11704 (isblank): New macro if we're not on a system with the GNU isblank
11707 * camel-mime-message.c (camel_mime_message_set_from): Reversed my
11708 changes, don't header_encode_phrase - it generates broken headers.
11709 (camel_mime_message_set_reply_to): Same.
11711 2000-10-04 Chris Toshok <toshok@helixcode.com>
11713 * providers/nntp/camel-nntp-utils.c (camel_nntp_get_headers):
11714 revert to old method (only use XOVER if OVER is supported.)
11716 * providers/nntp/camel-nntp-store.c
11717 (camel_nntp_store_get_overview_fmt): handle the case where the
11718 OVER extension isn't listed but LIST OVERVIEW.FMT works (again,
11719 INN 2.2). enable the OVER extension in this case.
11721 2000-10-04 Chris Toshok <toshok@helixcode.com>
11723 * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): return a
11724 gboolean so we can tell if this command worked. we can't key off
11725 the OVER extension being present because at least one server (INN
11726 2.2) doesn't report the OVER extension but implements the XOVER
11727 command. This could of course just be because I'm a loser for
11728 thinking they were related in the first place.
11729 (camel_nntp_get_headers): always try XOVER first, and if it fails
11730 revert to the slow method.
11732 2000-10-04 Dan Winship <danw@helixcode.com>
11734 * providers/mbox/camel-mbox-store.c (get_folder): Fix a case where
11735 a variable was free'd and then possibly used in an error message.
11737 2000-10-04 Chris Toshok <toshok@helixcode.com>
11739 * providers/nntp/camel-nntp-provider.c
11740 (camel_provider_module_init): news: -> nntp:.
11742 2000-10-04 Chris Toshok <toshok@helixcode.com>
11744 * providers/nntp/camel-nntp-store.c (nntp_store_get_folder_info):
11745 use "nntp:" instead of "news:" since "news:" urls aren't supposed
11746 to have host/user/port info in them. also, if there's a user
11747 defined in the url, put it in the urls for our folders.
11749 2000-10-04 Chris Toshok <toshok@helixcode.com>
11751 * providers/nntp/camel-nntp-auth.c (camel_nntp_auth_authenticate):
11752 borrow some code from the imap provider to query the user for
11753 their password, and pass the user/passwd to nntp. be extra
11754 paranoid and zero out the password before freeing it.
11756 * providers/nntp/camel-nntp-store.c (camel_nntp_store_init): add
11757 ALLOW_USER/ALLOW_PASSWORD/ALLOW_AUTH to the url flags.
11758 (nntp_store_query_auth_types_generic): return our list of
11760 (nntp_store_query_auth_types_connected): broken, return same as in
11761 query_auth_types_generic.
11763 2000-10-04 Dan Winship <danw@helixcode.com>
11765 * providers/imap/camel-imap-store.c (imap_connect): IMAP4
11766 (pre-rev1) doesn't support the 'LIST "" ""' idiom, so don't use
11767 it. Just assume the dir_sep is '/'. Shrug.
11769 2000-10-04 Jeffrey Stedfast <fejj@helixcode.com>
11771 * camel-mime-message.c (camel_mime_message_set_reply_to): Use
11772 header_encode_phrase instead.
11773 (camel_mime_message_set_from): Same.
11775 2000-10-04 Not Zed <NotZed@HelixCode.com>
11777 * camel-mime-utils.c (header_content_type_is): Handle the case
11778 where ct != NULL, but type and subtype are, and also match that
11779 against text/plain.
11781 * camel-folder-summary.c: Bump summary file version.
11782 (message_info_save): Save the size from the messageinfo.
11783 (message_info_load): Load the size from the summary file.
11784 (message_info_load): Fixed up the time_t saving/loading. There
11785 was a reason the warning was left there ... obviously nobody could
11786 read the comment "/* warnings, leave them here */", why do i even
11788 (camel_folder_summary_decode_time_t): Decode a time_t value from
11790 (camel_folder_summary_encode_time_t): Encode a time_t value to the
11793 2000-10-03 Jeffrey Stedfast <fejj@helixcode.com>
11795 * providers/imap/camel-imap-command.c (camel_imap_command): Quote
11796 the mailbox name when sending a SELECT request otherwise mailboxes
11797 with spaces in their names will cause problems.
11799 * camel-mime-message.c (camel_mime_message_set_reply_to): encode
11801 (camel_mime_message_set_from): Same.
11803 2000-10-03 Dan Winship <danw@helixcode.com>
11805 * providers/imap/camel-imap-command.c: New file containing
11806 camel_imap_command and friends. Major camel_imap_command rewrite
11807 to remove duplicated code, make the parsing of literals be
11808 more safe/correct, deal with RECENT/EXPUNGE responses more
11809 consistently, and make it possible to implement the AUTHENTICATE
11812 * providers/imap/camel-imap-utils.c (imap_parse_nstring): New
11813 function, to parse an IMAP "nstring".
11815 * providers/imap/camel-imap-store.c: Move command stuff to
11816 camel-imap-command.c. Update for camel_imap_command changes.
11818 * providers/imap/camel-imap-folder.c: Update for
11819 camel_imap_command changes.
11820 (imap_append_message): CRLF filter the message before sending it.
11822 * providers/imap/Makefile.am: Add camel-imap-command.[ch], remove
11823 camel-imap-stream.[ch] for now.
11825 2000-10-02 Jeffrey Stedfast <fejj@helixcode.com>
11827 * camel-mime-message.c (camel_mime_message_has_8bit_parts): New
11828 convenience function to determine if there are any 8bit mime parts
11830 (camel_mime_message_encode_8bit_parts): New convenience function
11831 to recursively reencode all 8bit mime parts to either
11832 quoted-printable or base64 depending on which would be the best
11833 encoding for that part.
11835 * providers/smtp/camel-smtp-transport.c (smtp_data): If the mime
11836 message contains 8bit parts and the server doesn't support 8bit
11837 transfers, reencode those parts before proceding with the send.
11838 (smtp_mail): If the mime message contains 8bit parts and the
11839 server supports the 8BITMIME extension to SMTP, notify the server
11840 that we'll be sending it 8bit mime parts.
11841 (_send_to): Find out if the message contains 8bit parts.
11843 2000-10-02 Jeffrey Stedfast <fejj@helixcode.com>
11845 * providers/smtp/camel-smtp-transport.c (_send_to): Use the
11846 CamelInternetAddress parser.
11847 (smtp_get_email_addr_from_text): deprecated.
11849 2000-10-02 Dan Winship <danw@helixcode.com>
11851 * camel-provider.h: Remove default_ports.
11853 * camel-remote-store.c (remote_connect): Get default_port from
11854 CamelRemoteStore rather than CamelProvider.
11856 * providers/{imap,nntp,pop3}/camel-*-store.c: Initialize
11857 CamelRemoteStore::default_port
11859 * providers/*/camel-*-provider.c: Remove default_ports.
11861 2000-10-02 Dan Winship <danw@helixcode.com>
11863 * camel-folder.[ch]: Remove
11864 camel_folder_{get,free}_subfolder_info, as we want to be able to
11865 scan the whole subfolder tree without having to open any folders,
11866 so this needs to be in CamelStore. Remove can_hold_folders and
11867 can_hold_messages flags; things that don't hold messages are no
11868 longer considered CamelFolders.
11870 * camel-folder-summary.[ch]: Remove CamelFolderInfo stuff.
11872 * camel-store.[ch]: Add camel_store_{get,free}_folder_info, as
11873 well as camel_store_free_folder_info_full and ..._nop for default
11874 implementations, and camel_folder_info_free and
11875 camel_folder_info_build as convenience functions. Turn
11876 CamelFolderInfo into a tree structure and also add an "url"
11879 * providers/*/camel-*-folder.c: Remove subfolder_info and can_hold
11881 * providers/*/camel-*-store.c: Add folder_info stuff.
11883 * providers/imap/camel-imap-folder.c (imap_summary_free): Free the
11884 summary elements with camel_message_info_free, not
11885 camel_folder_info_free. Oops.
11887 * providers/imap/camel-imap-utils.c: const poison
11889 2000-09-28 Jeffrey Stedfast <fejj@helixcode.com>
11891 * providers/smtp/camel-smtp-transport.c: Fixed some memory leaks.
11892 (camel_smtp_transport_init): Initialize supports_8bit to FALSE.
11893 (smtp_helo): If server supports 8bit, set supports_8bit to TRUE.
11895 * camel-transport.h (struct _CamelTransport): Added variable
11896 gboolean supports_8bit (we'll need this eventually? - see bugzilla
11899 * providers/smtp/camel-smtp-transport.c
11900 (smtp_get_email_addr_from_text): Ugh, no wonder people were
11901 getting illegal seek warnings *sigh*. I guess I can only blame
11902 myself for this one though :-(
11904 2000-09-28 Jeffrey Stedfast <fejj@helixcode.com>
11906 * providers/smtp/camel-smtp-transport.c (_send_to): Don't send the
11907 recipient data through smtp_get_email_addr_from_text - this is a
11908 complete waste. In fact, we don't want to have to use that
11911 * camel-internet-address.c, camel-address.c: Added some gtk-doc
11914 2000-09-28 Jeffrey Stedfast <fejj@helixcode.com>
11916 * camel-mime-utils.c (header_encode_string): Make sure to add the
11917 space char after an encoded word when the encoding is iso-8859-1.
11919 2000-09-28 Jeffrey Stedfast <fejj@helixcode.com>
11921 * providers/imap/camel-imap-folder.c (imap_get_message): When
11922 getting a literal string response, don't include the \r\n after
11923 the closing } (as in: "... {798}\r\n...")
11925 * providers/imap/camel-imap-stream.c (stream_read): Same.
11927 2000-09-28 Not Zed <NotZed@HelixCode.com>
11929 * camel-mime-utils.c (header_fold): New function to fold headers.
11931 2000-09-27 Not Zed <NotZed@HelixCode.com>
11933 * camel-mime-parser.c (folder_scan_header): If we had an empty
11934 header, then it must be end of the headers too.
11935 (folder_scan_init): No we dont need to init the outbuf with a nul
11938 * camel-folder-summary.c (camel_folder_summary_set_uid): New
11939 function to reset the uid to a higher value.
11941 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
11942 "something failed (yo!)" what sort of crap is this? Fixed all the
11943 indenting again, what wanker keeps running stuff through indent?
11944 (message_info_new): Check the uid we loaded off the disk, if it
11945 existed already, assign a new one. If it didn't then make sure
11946 the nextuid is higher.
11948 * camel-charset-map.c: New file, used to build a large unicode
11949 decoding mapping table, and use it to determine what is the
11950 lowest charset a given word can be encoded with. Uses tables from
11951 libunicode's source.
11953 * camel-internet-address.c (internet_encode): Use
11954 header_phrase_encode to properly encode the fullname, as required.
11955 refixed indenting. Who keeps doing that?
11956 (camel_internet_address_find_address): Changed fatal return/warnings
11959 * camel-mime-utils.c (header_raw_append_parse): Check : explicitly
11960 (removed from is_fieldname() macro).
11961 (camel_mime_special_table): Changed to short, so we can represent
11963 (quoted_encode): Take a mask of the safe chars for this encoding.
11964 (header_address_decode): Removed a #warning that makes no sense
11966 (header_decode_date): Fixed the 'broken date' parser code, if it
11967 ever decoded it it just threw away the result.
11968 (header_encode_string): Use better charset matching for encoding
11971 2000-08-31 Not Zed <NotZed@HelixCode.com>
11973 * providers/mh/camel-mh-summary.c (camel_mh_summary_sync): Save
11974 the index if we do a sync.
11975 (camel_mh_summary_check): Save the index here too. Probably.
11977 2000-09-27 Dan Winship <danw@helixcode.com>
11979 * providers/imap/camel-imap-store.c (camel_imap_command_extended):
11980 Return untagged data in a GPtrArray rather than a string, since it
11981 saves processing time and is much easier to deal with for several
11982 commands. Update for camel_imap_folder_changed change.
11983 (camel_imap_fetch_command): Update for camel_imap_folder_changed
11985 (imap_connect, imap_folder_exists): Update for
11986 camel_imap_command_extended change.
11988 * providers/imap/camel-imap-folder.c
11989 (imap_get_message_count_internal,
11990 imap_get_subfolder_info_internal, imap_search_by_expression):
11991 Update for camel_imap_command_extended change.
11993 (imap_get_summary_internal, imap_get_message_info_internal): Use
11994 camel_imap_fetch_command here now to get around the
11995 camel_imap_command_extended change.
11997 (camel_imap_folder_changed): turn expunged into a GArray of ints
11998 rather than a GPtrArray of strings representing ints.
12000 2000-09-26 Jeffrey Stedfast <fejj@helixcode.com>
12002 * providers/imap/camel-imap-folder.c
12003 (imap_get_message_count_internal): Quote the folder name as it may
12005 (imap_get_subfolder_info_internal): Same.
12007 * providers/imap/camel-imap-utils.c (imap_parse_list_response): Do
12008 proper unquoting for folder names.
12009 (func_get_current_date): Implemented.
12011 * providers/imap/camel-imap-store.c
12012 (imap_folder_exists): Quote the folder name as it may have spaces.
12013 (imap_create): Same.
12014 (check_current_folder): Same.
12016 2000-09-22 Dan Winship <danw@helixcode.com>
12018 * providers/imap/camel-imap-folder.c
12019 (imap_get_subfolder_info_internal): The root folder's name is "",
12021 (camel_imap_folder_new): constify folder_name.
12023 * providers/imap/camel-imap-store.c (get_folder): Create the
12024 folder with folder_name, not folder_path.
12025 (camel_imap_command_preliminary): Don't free cmdid here.
12027 2000-09-21 Dan Winship <danw@helixcode.com>
12029 * providers/imap/camel-imap-utils.c (imap_create_flag_list): New
12030 function to convert Camel flags to an IMAP flag_list.
12031 (imap_parse_flag_list): Contrariwise.
12033 * providers/imap/camel-imap-store.c (camel_imap_command_*): Make
12034 the @ret arg actually optional, as (mostly) documented.
12035 (various): Don't pass "&result" to camel_imap_command_* if we're
12036 just going to immediately free it. Don't record status if we're
12037 not going to look at it.
12039 * providers/imap/camel-imap-folder.c: Likewise.
12040 (imap_summary_free): Use camel_folder_info_free.
12041 (imap_sync): Use imap_create_flag_list. Clear
12042 CAMEL_MESSAGE_FOLDER_FLAGGED after syncing so we don't keep
12044 (imap_append_message): Use imap_create_flag_list. Don't leak the
12045 memstream if the append fails.
12046 (imap_move_message_to): Use camel_folder_delete_message rather
12047 than doing it by hand.
12048 (imap_get_summary_internal, imap_get_message_info_internal): Use
12049 imap_parse_flag_list and header_raw_clear.
12050 (camel_imap_folder_changed): Use camel_message_info_free.
12052 2000-09-21 Dan Winship <danw@helixcode.com>
12054 * providers/imap/camel-imap-store.c (get_folder_name): INBOX is
12056 (get_root_folder_name): Make the root folder "" rather than "/".
12057 (get_folder): Update for root folder name change.
12058 (camel_imap_store_get_toplevel_dir): Removed. (Unused, unneeded.)
12059 (camel_imap_store_folder_path): New function to turn a Camel
12060 folder name into the corresponding namespaced IMAP path.
12061 (imap_folder_exists): Make this take a store and a path rather
12063 (imap_create): Likewise
12064 (get_folder): Update for camel_imap_store_folder_path and other
12066 (check_current_folder): Likewise.
12068 * providers/imap/camel-imap-folder.c: Change a bunch of CamelStore
12069 variables to CamelImapStore (and add a few more) to prevent excess
12070 gratuitous casting. Use camel_imap_store_folder_path where
12072 (camel_imap_folder_new): Update for root folder name change.
12074 2000-09-19 Jeffrey Stedfast <fejj@helixcode.com>
12076 * providers/smtp/camel-smtp-transport.c (smtp_data): Use the
12077 linewrap filter to achieve full RFC0821 compliance.
12079 * camel-mime-filter-linewrap.[c,h]: New mime-filter to word-wrap.
12081 2000-09-19 Jeffrey Stedfast <fejj@helixcode.com>
12083 * camel-internet-address.c (internet_encode): When encoding the
12084 internet address, quote the name as the name may have commas or
12085 any other token which may later confuse our address parser.
12087 2000-09-19 Dan Winship <danw@helixcode.com>
12089 * providers/imap/camel-imap-folder.c
12090 (imap_get_subfolder_info_internal): Fix the case where INBOX
12091 isn't returned in the folder listing.
12093 2000-09-19 Dan Winship <danw@helixcode.com>
12095 * camel-folder.c: (init): Removed
12096 (camel_folder_init, camel_folder_construct): New object init
12097 function and public object constructor to replace the old init
12098 method in a more Gtk-like fashion.
12100 (get_parent_folder, camel_folder_get_parent_folder): Removed. No
12101 CamelFolder subclass was ever setting the parent_folder member, no
12102 code has ever needed to look at it, and fixing it would actually
12105 (get_subfolder_info, camel_folder_get_subfolder_info): Renamed
12106 from ..._names. Deals in CamelFolderInfo now.
12107 (free_subfolder_info, camel_folder_free_subfolder_info): Likewise.
12109 (get_subfolder, camel_folder_get_subfolder): Removed.
12110 CamelFolderInfo contains the subfolder's full name, so this is
12111 unnecessary now, and removing it lets us get rid of the
12112 CamelFolder separator member, which is needed for the default
12113 implementation of this function, but not otherwise needed for most
12116 Also, lots of code style fixes.
12118 * providers/*: Update CamelFolder subclasses for changes, although
12119 none of them fill in the message counts in the CamelFolderInfo
12122 2000-09-18 Christopher James Lahey <clahey@helixcode.com>
12124 * camel-folder-search.c, camel-folder-search.h,
12125 camel-remote-store.c, providers/imap/camel-imap-folder.c,
12126 providers/imap/camel-imap-store.c: Fixed the #include lines to
12127 deal properly with gal.
12129 2000-09-17 Dan Winship <danw@helixcode.com>
12131 * camel-folder-summary.h: update CamelFolderInfo
12132 * camel-folder-summary.c (camel_folder_info_free): New function to
12133 free the contents of a CamelFolderInfo
12135 2000-09-15 Dan Winship <danw@helixcode.com>
12137 * camel.c (camel_init): Set camel_verbose_debug to TRUE if
12138 CAMEL_VERBOSE_DEBUG is set in the environment.
12140 * camel-remote-store.c (remote_send_line, remote_recv_line): only
12141 log if camel_verbose_debug is TRUE.
12143 2000-09-14 Jeffrey Stedfast <fejj@helixcode.com>
12145 * providers/imap/camel-imap-store.c (get_folder): Don't use
12146 dir_sep as top-level directory, use "/".
12148 * providers/imap/camel-imap-folder.c (imap_expunge): Get rid of
12151 2000-09-13 Dan Winship <danw@helixcode.com>
12153 * providers/imap/camel-imap-folder.c (imap_expunge): Don't look at
12154 the response of the command. camel_imap_command_extended()
12155 processes EXPUNGE responses itself, so if we do it here too we
12156 remove twice as many summary items as we should.
12158 2000-09-13 Jeffrey Stedfast <fejj@helixcode.com>
12160 * providers/imap/camel-imap-store.c (imap_folder_exists): Rewrote
12161 to take a third argument (gboolean *selectable) so that we can
12162 find out if the folder is selectable or not as we look to see if
12163 it exists. Also, don't use EXAMINE because that will not work on
12164 non-selectable folders, so use LIST instead.
12165 (get_folder): Check to see if the folder exists even vefore
12166 calling imap_create as this will save time. If the folder does
12167 exist, find out if it's selectable. Moved the call to refresh_info
12170 * providers/imap/camel-imap-folder.c (imap_get_uids): Check for a
12172 (camel_imap_folder_new): Don't call refresh_info here - call it in
12173 get_folder() because we don't know if this folder even exists on
12174 the server yet! And even if it does, we don't know if it can hold
12175 messages or not yet.
12177 2000-09-12 Jeffrey Stedfast <fejj@helixcode.com>
12179 * camel-mime-parser.c (folder_scan_step): Make sure *datalength is
12180 > 0 before calling camel_mime_filter_filter otherwise we will get
12181 a segfault if the filter calls iconv().
12183 2000-09-08 Christopher James Lahey <clahey@helixcode.com>
12185 * providers/nntp/camel-nntp-auth.c,
12186 providers/nntp/camel-nntp-auth.h: Fixed a warning.
12188 2000-09-07 Dan Winship <danw@helixcode.com>
12190 * camel-session.c (camel_session_get_storage_path): Make this not
12193 2000-09-07 Dan Winship <danw@helixcode.com>
12195 * camel-session.c (camel_session_new): Make this take a path to a
12196 directory that Camel can use for its own nefarious purposes.
12197 (camel_session_get_storage_path): New function to return a path
12198 that a service can use for its own nefarious sub-purposes.
12200 * camel-service.c (camel_service_get_path): New method (and
12201 useful default implementation) to get a (relative) pathname
12202 corresponding to the service.
12204 2000-09-06 Dan Winship <danw@helixcode.com>
12206 * providers/pop3/camel-pop3-store.c (connect_to_server): Make KPOP
12209 2000-09-06 Jeffrey Stedfast <fejj@helixcode.com>
12211 * camel-mime-message.c (camel_mime_message_get_received_date):
12212 Implemented (someone added these to camel-mime-message.h but never
12213 implemented them!!) - though it may not be right.
12214 (camel_mime_message_get_sent_date): Same.
12216 2000-09-05 Dan Winship <danw@helixcode.com>
12218 * camel-mime-part.c (camel_mime_part_get_filename): If a MIME part
12219 has no Content-Disposition, but does have a "name" on the
12220 Content-Type, return that as the filename.
12221 (process_header): strstrip the Content-Description
12223 2000-09-05 Chris Toshok <toshok@helixcode.com>
12225 * providers/nntp/camel-nntp-utils.c (get_OVER_headers): care about
12227 (get_HEAD_headers): same.
12228 (camel_nntp_get_headers): same.
12230 * providers/nntp/camel-nntp-store.h: get rid of
12231 CAMEL_NNTP_OK/ERR/FAIL.
12233 * providers/nntp/camel-nntp-store.c
12234 (camel_nntp_store_get_extensions): take CamelException arg and
12235 pass along to camel_nntp_command.
12236 (camel_nntp_store_get_overview_fmt): same.
12237 (nntp_store_connect): convert to using constants in
12238 camel-nntp-resp-codes.h
12239 (nntp_store_get_folder): make use of camel_nntp_folder_new.
12240 (camel_nntp_command_send_recv): new function to deal with auth
12242 (camel_nntp_command): split out most of this function into
12243 camel_nntp_command_send_recv. also, return the actual response
12244 code instead of CAMEL_NNTP_OK/ERR/FAIL.
12246 * providers/nntp/camel-nntp-resp-codes.h: new file.
12248 * providers/nntp/camel-nntp-folder.h: prototype for
12249 camel_nntp_folder_new.
12251 * providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new): new
12252 convenience function.
12253 (nntp_folder_get_message): care more about the actual response
12256 * providers/nntp/Makefile.am (libcamelnntp_la_SOURCES): add
12258 (libcamelnntpinclude_HEADERS): add camel-nntp-auth.h.
12260 * providers/nntp/camel-nntp-auth.h: new file.
12262 * providers/nntp/camel-nntp-auth.c: new file.
12264 2000-09-05 Peter Williams <peterw@helixcode.com>
12266 * providers/imap/camel-imap-store.c (imap_folder_exists): Don't free the
12267 result on error; the exception will have the relevant info.
12269 * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Check for
12272 * providers/imap/camel-imap-store.c (imap_connect): Check the exception
12273 on the refresh_folders call.
12275 * providers/imap/camel-imap-store.h: Clean up some now-unused fields.
12277 * camel.c (camel_init): Call unicode_init again, now that libunicode
12278 will not initialize itself twice.
12280 2000-09-02 Lauris Kaplinski <lauris@helixcode.com>
12282 * camel-folder-search (search_header_contains): Use e_utf8_strstrcase
12284 2000-09-01 Christopher James Lahey <clahey@helixcode.com>
12286 * providers/imap/camel-imap-utils.c: Removed some unused
12289 2000-09-01 Peter Williams <peterw@helixcode.com>
12291 * providers/nntp/camel-nntp-store.c (camel_nntp_command): Initialize
12292 the statically-allocated CamelException so that it doesn't contain
12293 junk data that camel_exception_set() may try to free.
12294 (camel_nntp_store_get_extensions): Same.
12295 (camel_nntp_store_get_overview_fmt): Same.
12297 * providers/pop3/camel-pop3-store.c (camel_pop3_command): Typo
12298 fix (if (*ret) -> if (ret)).
12300 * providers/pop3/camel-pop3-store.c (pop3_connect): Set the
12301 port # back to what was specified ASAP, so that the hash of
12302 the URL doesn't change (which causes a failure in
12303 service_cache_remove that leads to a segfault).
12305 * providers/imap/camel-imap-store.c (imap_connect): Clear the
12306 exception after a failed LOGIN so that it doesn't pass through
12307 to the upper level and make mail think that the login failed.
12309 * providers/pop3/camel-pop3-store.c (pop3_connect): As above.
12311 2000-08-31 Peter Williams <peterw@helixcode.com>
12313 * providers/pop3/camel-pop3-store.c (camel_pop3_store_get_type):
12314 Implement POP3 with the CamelRemoteStore now.
12315 (connect_to_server): Hack this a bit to get KPOP to work. Obey
12316 the new connection semantics of the remote store (implicitly).
12317 (query_auth_types_connected): Clear exceptions after attempts
12318 to connect; the code at the bottom will catch hard errors.
12319 Use camel_service_connect.
12320 (camel_pop3_command): Take a CamelException; now, when an error
12321 occurs, ret is set to NULL and the exception passes back the
12322 appropriate information.
12323 (pop3_get_response): Same as above.
12324 (pop3_try_authenticate): Give camel_pop3_command its exception
12325 and handle it properly.
12326 (pop3_connect): Call the parent classfuncs. Don't disconnect
12327 on error (done for us).
12329 * providers/pop3/camel-pop3-folder.c: Obey the camel_pop3_command
12332 * camel-remote-store.c (remote_query_auth_types_connected): Don't
12333 warn; just return NULL.
12334 (remote_query_auth_types_generic): Same.
12335 (remote_send_string): Filter out passwords in debugging output.
12337 * providers/pop3/camel-pop3-store.c (camel_pop3_store_init): Also
12338 set the ALLOW_AUTH flag.
12340 * providers/imap/camel-imap-store.c (camel_imap_store_init): Same.
12342 2000-08-31 Chris Toshok <toshok@helixcode.com>
12344 * providers/nntp/camel-nntp-store.c (camel_nntp_store_class_init):
12345 remove get_folder_name.
12346 (nntp_store_get_folder_name): remove.
12348 2000-08-31 Lauris Kaplinski <lauris@helixcode.com>
12350 * camel-mime-part.c (write_to-stream): Use filter only if we have one
12352 2000-08-31 Chris Toshok <toshok@helixcode.com>
12354 * providers/nntp/camel-nntp-utils.c (get_OVER_headers): use
12355 camel_remote_store_recv_line.
12357 * providers/nntp/camel-nntp-folder.c (nntp_folder_get_message):
12358 use camel_remote_store_recv_line to build message. also, free our
12359 buffer so we don't leak like mad.
12361 * providers/nntp/camel-nntp-store.c:
12362 (camel_nntp_store_get_additional_data) remove.
12363 (camel_nntp_store_get_extensions): use
12364 camel_remote_store_recv_line.
12365 (camel_nntp_store_get_overview_fmt): same. also, don't rely on
12366 _get_additional_data anymore since it's easier to parse without.
12367 (camel_nntp_command): use camel_remote_store_send_string and
12368 camel_remote_store_recv_line.
12370 * providers/nntp/camel-nntp-store.h: CamelRemoteStore is the
12371 parent class now. remove istream/ostream since CamelRemoteStore
12372 takes care of that for us. also remove the prototype for
12373 camel_nntp_store_get_additional_data.
12375 * providers/nntp/camel-nntp-newsrc.c (camel_nntp_newsrc_write):
12376 make sure to clear dirty bit.
12377 (camel_nntp_newsrc_read_for_server): don't worry about continually
12378 trying to open the file - if it fails we just return an
12379 unpopulated .newsrc file.
12381 2000-08-31 Chris Toshok <toshok@helixcode.com>
12383 * providers/nntp/camel-nntp-newsrc.c
12384 (camel_nntp_newsrc_read_for_server): make this a bit more robust.
12385 try to create an empty .newsrc file for the server if we can't
12386 open it for reading. also, don't allocate everything until we've
12389 * providers/nntp/camel-nntp-utils.c (get_OVER_headers): make use
12390 of our overview field indices.
12391 (camel_nntp_get_headers): only call get_OVER_headers if the
12392 extension is present. warn if it's not - since get_HEAD_headers
12393 needs work before it works.
12395 * providers/nntp/camel-nntp-store.c
12396 (camel_nntp_store_get_extensions): new function - query the server
12397 for it's extensions.
12398 (camel_nntp_store_get_overview_fmt): new function - query the
12399 server for the overview format and build our table of the indices
12400 we care about. support the "full" suffix on fields.
12401 (nntp_store_connect): call camel_nntp_store_get_extensions and
12402 camel_nntp_store_get_overview_fmt.
12404 * providers/nntp/camel-nntp-store.h: add codes for extensions
12405 found on news.mozilla.org. only one that we care about is OVER.
12406 also, add CamelNNTPOverField and an enum of the overview fields
12407 that we care about.
12409 2000-08-31 Jeffrey Stedfast <fejj@helixcode.com>
12411 * providers/imap/camel-imap-utils.c (imap_translate_sexp):
12412 Reimplemented. It should now work correctly for most possible
12415 2000-08-31 Jeffrey Stedfast <fejj@helixcode.com>
12417 * providers/imap/camel-imap-store.c (camel_imap_command_extended):
12418 Don't save any exceptions caused by camel_imap_folder_changed
12419 (camel_imap_fetch_command): Same.
12421 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
12422 Using a new way of calculating the first recent message that seems
12423 more accurate. Also added code to make sure we don't accidently
12424 add a duplicate summary.
12426 2000-08-31 Not Zed <NotZed@HelixCode.com>
12428 * camel-mime-part.c (write_to_stream): Use the proper type
12429 checking function to check for text types.
12430 (write_to_stream): If we have a charset on a text type that
12431 isn't us-ascii or utf-8, then we need to reencode it, so add a
12432 filter to do that too.
12433 (write_to_stream): Fix some warnings/use the right constructor,
12435 (write_to_stream): Rearrange the logic so it always does charset
12436 conversion, and not just if we have a qp/base64 block.
12438 * camel-mime-utils.c (append_latin1): New function - even though
12439 its broken, we'll assume mailers send latin1 headers instead of
12440 us-ascii. We just have to encode high chars into utf-8.
12441 (header_decode_text): Call append_latin1 for appending unencoded
12443 (append_latin1): Do an additional mask for account for c's
12444 undefined behaviour for sign extension whilst shifting right.
12446 2000-08-30 Jeffrey Stedfast <fejj@helixcode.com>
12448 * providers/imap/camel-imap-store.c (camel_imap_fetch_command):
12449 Rewrote to ignore strings that look like server responses until it
12450 is sure that it has finished reading the literal string response.
12452 2000-08-30 Jeffrey Stedfast <fejj@helixcode.com>
12454 * camel-remote-store.c (remote_send_string): Don't wrap printed
12455 strings in quotes, makes things messy
12457 * providers/imap/camel-imap-folder.c (imap_get_message): Updated
12458 to use the camel_imap_fetch_command
12460 * providers/imap/camel-imap-stream.c (stream_read): Updated to use
12461 camel_imap_fetch_command
12463 * providers/imap/camel-imap-store.c (camel_imap_command_extended):
12464 No longer handles FETCH requests so no longer needs to be
12465 concerned with checking to make sure that server responses are
12466 valid (they have to be).
12467 (camel_imap_fetch_command): New convenience function that handles
12470 2000-08-30 Peter Williams <peterw@helixcode.com>
12472 * camel-remote-store.c (remote_connect): Unify with remote_post_connect.
12473 (remote_disconnect): Unify with remote_pre_disconnect.
12474 (camel_remote_store_class_init): Don't use the post_connect and
12475 pre_disconnect classfuncs anymore ; they weren't especially useful.
12477 * providers/imap/camel-imap-store.c (imap_connect): Use this again
12478 instead of implementing post_connect.
12479 (imap_disconnect): Analogous to above.
12481 * camel-session.c (camel_session_get_service_connected): New function.
12482 Like camel_session_get_service() but also connects to the service
12483 if needed. camel_session_get_{store,transport} (defined in the header)
12484 used this now, preventing annoying when-to-connect problems.
12486 * camel-service.c (camel_service_new): Revert to the old behavior
12487 of not connecting until told to do so. Otherwise doing auth
12488 testing correctly is really hard.
12489 (camel_service_connect): Fix behavior here (set the connected
12491 (camel_service_disconnect): Unset the connected flag.
12493 2000-08-30 Jeffrey Stedfast <fejj@helixcode.com>
12495 * providers/imap/camel-imap-store.c: General cleanup / moving
12496 stuff around to make things easier to follow.
12498 2000-08-30 Jeffrey Stedfast <fejj@helixcode.com>
12500 * camel-remote-store.c: Prevent exceptions from being overwritten
12502 * providers/imap/camel-imap-folder.c (imap_expunge): Beautified
12503 (imap_get_subfolder_names_internal): Removed old code as the
12504 replacement code has now been tested and proven to work
12506 2000-08-29 Jeffrey Stedfast <fejj@helixcode.com>
12508 * providers/imap/camel-imap-utils.c: Removed old code that will
12509 never be needed again
12511 * providers/imap/camel-imap-store.c: Removed old code for
12512 try_connect - will never need this code
12513 (slurp_response): Update to make sure we aren't falsely detecting
12516 2000-08-29 Peter Williams <peterw@helixcode.com>
12518 * camel-service.c (camel_service_connect): Uncomment this.
12519 (camel_service_disconnect): Same.
12521 * camel-remote-store.[ch]: New files. Abstract remote storages
12522 (IMAP, POP3, NNTP) and hides the lower-level networky stuff.
12524 * camel-service.c (camel_service_new): Take an extra argument, the
12525 provider that created us, cause it's useful.
12526 (camel_service_finalize): Unref our new provider member.
12528 * camel-session.c (camel_session_get_service): Pass the proper number of
12529 arguments to camel_service_new().
12531 * camel-imap-store.c: Massive update: 1) use the CamelRemoteService to
12532 make our life Very Easy (TM). 2) Change the semantics of all
12533 camel_imap_command* functions to take exceptions, centralize tons of
12534 duplicate code, and use the handy RemoteStore utility functions
12536 * camel-imap-folder.c: Use the new semantics of camel_imap_command*
12538 * camel-imap-stream.c: Same.
12540 2000-08-29 Jeffrey Stedfast <fejj@helixcode.com>
12542 * providers/imap/camel-imap-store.c (camel_imap_command_extended):
12543 Updated to check for EXPUNGE notifications
12545 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
12546 Updated to account for messages which have been expunged (now
12547 takes a new arg, a GPtrArray of message id's that have been
12549 (imap_expunge): Updated (we may want to just use the code in
12550 folder_changed now instead of doing our own summary
12551 expunging...but that can be fixed later)
12552 (imap_append_message): Updated.
12553 (imap_copy_message_to): Updated.
12554 (imap_move_message_to): Updated.
12556 2000-08-28 Peter Williams <peterw@helixcode.com>
12558 * camel-folder.c (camel_folder_refresh_info): New member function,
12559 refresh_info, used for rereading folder state after its state has
12560 somehow become unknown. Tries to preserve last-known status of
12563 * providers/mbox/camel-mbox-folder.c (mbox_refresh_info): Implement
12564 ::refresh_info (split up ::init)
12566 * providers/mbox/camel-mbox-store.c (get_folder): Call ::refresh_info.
12568 * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Call
12569 ::refresh_info once initialized.
12570 (imap_refresh_info): New member function; reads the summary from
12571 the server (used to be in camel_imap_folder_new; split out).
12573 * providers/imap/camel-imap-store.c (imap_connect): Set
12574 CamelService::connected a little early so that
12575 camel_imap_command won't try to connect while already
12577 (camel_imap_command*): Try to connect if not connected already.
12579 * providers/pop3/camel-pop3-folder.c (pop3_refresh_info): Same as above.
12581 * providers/pop3/camel-pop3-folder.c (camel_pop3_folder_new): Same
12584 * providers/pop3/camel-pop3-store.c (pop3_connect): Set
12585 CamelService::connected a little early so that
12586 camel_pop3_command won't try to connect while already
12588 (connect_to_server): Same.
12590 * providers/nntp/camel-nntp-folder.c (nntp_folder_refresh_info): Same
12593 2000-08-28 Jeffrey Stedfast <fejj@helixcode.com>
12595 * providers/imap/camel-imap-folder.c (imap_get_message): Fixed the
12596 hack around quoted string responses - should now handle them
12597 according to the specifications in the RFC
12599 * providers/imap/camel-imap-stream.c (stream_read): Updated to
12600 match the code currently used in camel-imap-folder.c
12602 2000-08-28 Ettore Perazzoli <ettore@helixcode.com>
12604 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
12605 Never ever free `tmpname' as it comes from `alloca()'!
12607 2000-08-26 Ettore Perazzoli <ettore@helixcode.com>
12609 * camel-mime-utils.c (header_decode_text): Use `g_free()', not
12610 `free()', to free `decword'.
12612 2000-08-25 Peter Williams <peterw@helixcode.com>
12614 * camel.c (camel_init): Don't call unicode_init; code in e-util
12615 will do it, and if unicode_init is called twice, you get an
12616 infinite loop when looking up nonexistant encodings (patch
12617 has been submitted to libunicode's maintainer).
12619 * camel-provider.h: Add a new field, default_ports, which
12620 helps the configuration code guess about how to make CamelURL's
12623 * providers/*/camel-*-provider.c: Specify default ports.
12625 2000-08-25 Jeffrey Stedfast <fejj@helixcode.com>
12627 * providers/imap/camel-imap-folder.c
12628 (imap_get_subfolder_names_internal): If the url path is "/" and
12629 the folder path is "/", just LIST "" "*" (this should fix some
12630 cyrus imapd problems). Also, INBOX is case insensitive so use
12633 2000-08-24 Lauris Kaplinski <lauris@helixcode.com>
12635 * camel-folder-summary.c (summary_build_content_info):
12636 Use UTF-8 as default
12637 * camel-mime-part-utils.c (simple_data_wrapper_construct_from_parser):
12638 Use UTF-8 as default
12639 * camel-mime-utils.c (rfc2047_decode_word): Use UTF-8
12641 2000-08-17 Not Zed <NotZed@HelixCode.com>
12643 * providers/mh/camel-mh-folder.c (mh_finalize): And here too.
12645 * providers/mbox/camel-mbox-folder.c (mbox_finalize): Close index
12648 2000-08-23 Dan Winship <danw@helixcode.com>
12650 * camel-mime-utils.c (header_address_list_format_append): put
12651 commas between addresses.
12653 2000-08-22 Dan Winship <danw@helixcode.com>
12655 * providers/imap/camel-imap-folder.c
12656 (imap_protocol_get_summary_specifier): use BODY.PEEK, not BODY, so
12657 we don't set the message \Seen.
12659 2000-08-22 Christopher James Lahey <clahey@helixcode.com>
12661 * providers/pop3/camel-pop3-store.c: Fixed a small warning.
12663 2000-08-22 Peter Williams <peterw@helixcode.com>
12665 * camel-service.c (camel_service_new): Connect automatically if the
12667 (finalize): Disconnect automatically if connected.
12668 (camel_service_query_auth_types): Split into two functions; one to
12669 be called if we're connected to an actual server (_connected), one
12670 to be called if we're just gauging the general authtypes supported
12672 (is_connected): Remove.
12674 * camel-store.c (camel_store_get_folder): Don't connect explicitly to
12677 * providers/nntp/camel-nntp-store.c (query_auth_types_generic): Split
12678 the query_auth_types function. Hook it up in _new.
12679 (finalize): Don't try to disconnect here.
12681 * providers/pop3/camel-pop3-store.c (query_auth_types_generic): Same.
12682 (finalize): Don't try to disconnect here.
12684 * providers/imap/camel-imap-store.c (query_auth_types_generic): Same.
12685 (finalize): Don't try to disconnect here.
12687 * providers/smtp/camel-smtp-transport.c (query_auth_types_generic): Split
12688 the query_auth_types (dummy, in this case) function. Hook it up in _new.
12689 (finalize): Don't try to disconnect here.
12691 2000-08-21 JP Rosevear <jpr@helixcode.com>
12693 * providers/nntp/camel-nntp-folder.c (nntp_folder_get_subfolder_names):
12694 Make sure newsrc is not null
12695 (nntp_folder_get_subfolder_names): ditto
12697 * providers/nntp/camel-nntp-newsrc.c
12698 (camel_nntp_newsrc_get_subscribed_group_names): Programming check
12700 (camel_nntp_newsrc_get_all_group_names): ditto
12701 (camel_nntp_newsrc_write_to_file): ditto
12702 (camel_nntp_newsrc_write): ditto
12704 2000-08-21 JP Rosevear <jpr@helixcode.com>
12706 * providers/nntp/camel-nntp-store.c (camel_nntp_command):
12707 Make sure respbuffer is not null before manipulating it.
12708 If it is null, return CAMEL_NNTP_FAIL and a decent error
12711 2000-08-18 Peter Williams <peterw@helixcode.com>
12713 * camel-internet-address.c (internet_encode): If the name is "" we
12714 weren't outputting anything; output the address at least.
12716 2000-08-16 Peter Williams <peterw@helixcode.com>
12718 * camel-internet-address.c (internet_encode): Fix a leak when
12719 name = "". It's a single-byte leak, but it's the little things
12722 * camel-object.c (camel_type_lock_up): Don't leave the type
12723 system locked when a bad unlock happens.
12725 * providers/mbox/camel-mbox-store.c (get_folder): Fix a leak.
12727 2000-08-15 Peter Williams <peterw@helixcode.com>
12729 * providers/imap/camel-imap-folder.c (imap_copy_message_to): Typo fix.
12731 2000-08-14 Peter Williams <peterw@helixcode.com>
12733 * camel-folder-search.c (search_get_sent_date): New search function;
12734 returns the time_t when the message was sent.
12735 (search_get_receive_date): Same for when it was received.
12736 (search_get_current_date): Gets the current time for use with the
12737 above two. Is this in the right place?
12739 * camel-folder-search.h: Add the new functions above to the class.
12741 2000-08-13 Dan Winship <danw@helixcode.com>
12743 * providers/nntp/Makefile.am (libcamelnntpinclude_HEADERS): Add
12746 * providers/imap/camel-imap-folder.c
12747 (imap_get_subfolder_names_internal): do a strcasecmp rather than
12748 just a strcmp when checking if a folder is "INBOX", since it is
12749 a case-insensitive name.
12751 2000-08-12 Dan Winship <danw@helixcode.com>
12753 * providers/imap/camel-imap-folder.c (imap_get_summary_internal):
12754 Don't assume the FETCH results will come back in the order they
12756 (imap_get_subfolder_names_internal): Add "INBOX" to the list as
12757 g_malloc'ed memory, not a static string.
12759 2000-08-12 Jeffrey Stedfast <fejj@helixcode.com>
12761 * providers/imap/camel-imap-store.c
12762 (camel_imap_command_continuation): Now takes a char * parameter
12763 rather than a stream
12764 (camel_imap_command_continuation_with_stream): Same function as
12765 above but takes a stream parameter instead
12767 * providers/imap/camel-imap-folder.c (imap_append_message): Use
12768 camel_imap_command_continuation_with_stream
12770 2000-08-12 Dan Winship <danw@helixcode.com>
12772 * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): New
12773 function to do one round of attempted authentication.
12774 (pop3_connect): Move a bunch of code out into
12775 pop3_try_authenticate and fix some bugs in the edge cases.
12777 2000-08-12 Jeffrey Stedfast <fejj@helixcode.com>
12779 * providers/imap/camel-imap-store.c (query_auth_types): No longer
12780 calls try_connect() to get authtypes
12782 2000-08-11 Jeffrey Stedfast <fejj@helixcode.com>
12784 * providers/imap/camel-imap-store.c
12785 (camel_imap_command_continuation): Changed param order a bit and
12788 * providers/imap/camel-imap-folder.c (imap_append_message): Use
12789 the new multi-transactional convenience functions
12791 2000-08-11 Jeffrey Stedfast <fejj@helixcode.com>
12793 * providers/imap/camel-imap-store.c
12794 (camel_imap_command_preliminary): New convenience function for
12795 multi-transactional commands (opening request)
12796 (camel_imap_command_continuation): New convenience function for
12797 multi-transactional commands (followup data)
12799 2000-08-11 Christopher James Lahey <clahey@helixcode.com>
12801 * providers/mh/camel-mh-folder.c: Fixed a warning.
12803 2000-08-11 Chris Toshok <toshok@helixcode.com>
12805 * providers/nntp/camel-nntp-folder.c
12806 (camel_nntp_folder_class_init): remove get_name and get_full_name
12807 assignments, since the camel-folder.c implementation does what we
12810 2000-08-11 Chris Toshok <toshok@helixcode.com>
12812 * providers/nntp/camel-nntp-store.c
12813 (camel_nntp_store_get_toplevel_dir): use g_get_home_dir, since
12814 evolution_dir isn't available in the providers.
12816 2000-08-11 Peter Williams <peterw@helixcode.com>
12818 * camel-folder.c (thaw): Fix a bug where the message_changed
12819 signal wasn't being emitted.
12821 2000-08-11 Not Zed <NotZed@HelixCode.com>
12823 * providers/mh/camel-mh-folder.c (mh_set_message_user_tag):
12825 (mh_get_message_user_tag): Implement.
12827 * providers/mbox/camel-mbox-folder.c (mbox_get_message_user_tag):
12828 (mbox_set_message_user_tag): Implement.
12830 * camel-folder.c (move_message_to): Yay so lets fix an already
12832 (copy_message_to): and here too ... update for api change to append().
12833 And removed another warning.
12834 (camel_folder_set_message_user_tag): Routine to set message tags.
12835 (camel_folder_get_message_user_tag): And accessor.
12837 2000-08-10 Christopher James Lahey <clahey@helixcode.com>
12839 * camel-folder-search.c, camel-folder-summary.c, camel-medium.c,
12840 camel-mime-filter-charset.c, camel-mime-filter.c,
12841 camel-mime-filter.h, camel-mime-message.c, camel-mime-parser.c,
12842 camel-mime-part-utils.c, camel-mime-part.c, camel-mime-utils.c,
12843 camel-movemail.c, camel-multipart.c, camel-object.c,
12844 camel-stream-mem.c, providers/mbox/camel-mbox-folder.c,
12845 providers/mbox/camel-mbox-summary.c,
12846 providers/mh/camel-mh-folder.c,
12847 providers/smtp/camel-smtp-transport.c: Fixed some warnings.
12849 2000-08-11 Not Zed <NotZed@HelixCode.com>
12851 * providers/vee/camel-vee-folder.c (vee_folder_build_folder): Free
12852 the search properly.
12853 (vee_folder_build): And here too.
12855 2000-08-10 Jeffrey Stedfast <fejj@helixcode.com>
12857 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
12858 If we go over the max number of messages, don't keep requesting
12859 new message summaries, just break.
12861 2000-08-11 Not Zed <NotZed@HelixCode.com>
12863 * camel-mime-parser.c (folder_scan_header): A better way to
12864 compress leading whitespace. The code is probably invalid anyway,
12865 I dont think it will work across buffer boundaries.
12867 * providers/mbox/camel-mbox-folder.c (mbox_append_message): And
12868 write out proper format From lines here too.
12870 * providers/mbox/camel-mbox-summary.c
12871 (camel_mbox_summary_build_from): New function to build a more
12872 compatible mbox "From " line.
12873 (camel_mbox_summary_sync): Write From lines in the proper format.
12875 2000-08-10 Not Zed <NotZed@HelixCode.com>
12877 * providers/mh/camel-mh-store.c (get_folder): Remove warnin g.
12879 * providers/mbox/camel-mbox-store.c (xrename): Kill some warnings
12880 with constification.
12882 * providers/imap/camel-imap-folder.c (imap_append_message): Fixed
12883 for append api change. Eek this routine seriously wastes memory.
12885 * providers/mh/camel-mh-folder.c (mh_search_free): Impelemnt.
12886 (mh_append_message): Fix for api change, and include user flags
12887 and tags in new message.
12889 * providers/vee/camel-vee-folder.c (vee_search_by_expression): Fix
12890 for search api change.
12892 * camel-folder.c (camel_folder_search_free): New function for
12893 freeing search results.
12894 (search_free): Changed my mind, implement a default that actually
12895 does something. Free as to the old interface.
12896 (camel_folder_append_message): Changed to accept a
12897 camelmessageinfo rather than flags, which just doesn't have enough
12899 (copy_message_to): Change for append_message api change.
12900 (move_message_to): Likewise.
12902 * providers/mbox/camel-mbox-folder.c (mbox_search_free):
12904 (mbox_append_message): Fix for api change, and also copy user
12905 flags/tags across to new summary.
12907 * camel-folder-search.c (search_user_tag): A search expression
12908 that returns the current use flag by name.
12909 (camel_folder_search_free_result): New function to free the result
12912 * camel-folder-summary.c: Bump summary version.
12913 (message_info_new):
12914 (message_info_load):
12915 (message_info_save):
12916 (camel_message_info_dup_to):
12917 (camel_message_info_free): Added support for arbitrary tag/value
12918 pairs (CamelTag's).
12921 (camel_tag_list_size):
12922 (camel_tag_list_free): Operations for working with CamelTags.
12924 2000-08-09 Peter Williams <peterw@helixcode.com>
12926 * camel-store.c (camel_store_get_folder): Connect beforehand, if
12929 * providers/imap/camel-imap-store.c (camel_imap_store_init): Default
12930 the dir_sep to "/" so that certain functions can safely assume that
12931 dir_sep is valid (at least, nonnull).
12933 2000-08-09 Ettore Perazzoli <ettore@helixcode.com>
12935 * providers/nntp/camel-nntp-folder.c
12936 (nntp_folder_set_message_flags): Get rid of an unused variable.
12938 * providers/nntp/Makefile.am (INCLUDES): Fix includes so that we
12939 don't use installed headers anymore. [I copied this over from the
12940 IMAP provider, that does not seem to have this problem.]
12942 2000-08-09 Not Zed <NotZed@HelixCode.com>
12944 * camel-folder-search.c (camel_folder_search_execute_expression):
12945 Reorder search result in summary order if we searched with a
12948 2000-08-08 Dan Winship <danw@helixcode.com>
12950 * camel-uid-cache.c: New code to keep an on-disk cache of what
12951 UIDs have been seen in a folder.
12953 * camel-provider.h: Add new flags CAMEL_PROVIDER_IS_SOURCE (mail
12954 can arrive in it by non-Camel means) and CAMEL_PROVIDER_IS_STORAGE
12955 (you can work with mail directly without needing to copy it local).
12957 * providers/*/camel-*-provider.c: Add flags as needed: imap and
12958 mbox are SOURCE and STORAGE. mh and nntp are just STORAGE, pop3 is
12961 * camel-mime-message.c (process_header): Add another subject
12962 g_strstrip that fejj's earlier commit missed.
12964 2000-08-08 Peter Williams <peterw@helixcode.com>
12966 * camel-provider.h: Remove some GTK stuff that I missed.
12968 * providers/imap/camel-imap-store.c (imap_noop): Turn this
12969 back on with the new timeout interface in CamelSession.
12971 * camel-session.[ch] (camel_session_register_timeout): New
12972 interface for Camel to register timeouts. Basically the
12973 GTK timeout interface is copied. We do this because Camel isn't
12974 allowed to use GTK anymore.
12976 2000-08-07 Not Zed <NotZed@HelixCode.com>
12978 * providers/mh/camel-mh-folder.c (mh_append_message): Only retry
12979 another uid if we had a name clash, otherwise fail.
12981 2000-08-07 Jeffrey Stedfast <fejj@helixcode.com>
12983 * providers/imap/camel-imap-folder.c
12984 (imap_get_subfolder_names_internal): If we are trying to get a
12985 subfolder listing of the root folder, always make sure INBOX is
12988 * providers/imap/camel-imap-utils.c (imap_parse_list_response):
12989 Check for NIL as a directory separator.
12991 2000-08-07 Peter Williams <peterw@helixcode.com>
12993 * providers/nntp/Makefile.am: Reorder the INCLUDES to pull
12994 in the camel headers from the local source tree before
12995 the ones in $(includedir). This was causing compile problems
12996 because the installed, Gtk-based camel-object.h was included
12997 before the uninstall Camel-based one.
12999 2000-08-07 Jeffrey Stedfast <fejj@helixcode.com>
13001 * providers/imap/camel-imap-utils.c (imap_translate_sexp): Strip
13002 all \n's from the expression
13004 * string-utils.c (strip): New convenience function to strip
13005 occurences of a single char from a string
13007 * camel-mime-message.c (camel_mime_message_set_subject): Do a
13008 g_strstrip on the subject so we can stop getting those annoying
13011 2000-08-07 Dan Winship <danw@helixcode.com>
13013 * camel-folder.c (camel_folder_free_deep): Fix this to not require
13014 NULL-termination of the array.
13016 2000-08-04 Jeffrey Stedfast <fejj@helixcode.com>
13018 * providers/imap/camel-imap-store.c (imap_connect): If we fail to
13019 get a dir_sep, then supply the default of "/".
13020 (get_folder): Undo changes by Peter
13022 2000-08-04 Peter Williams <peterw@helixcode.com>
13024 * providers/imap/camel-imap-store.c (get_folder): Prevent a coredump
13025 when get_folder()ing from a store with dir_sep = NULL.
13027 2000-08-04 Peter Williams <peterw@helixcode.com>
13029 * camel-store.h: Include camel-object.h. Ettore said this wasn't
13032 2000-08-04 Not Zed <NotZed@HelixCode.com>
13034 * camel-url.c (camel_url_set_protocol):
13035 (camel_url_set_host):
13036 (camel_url_set_path):
13037 (camel_url_set_port): Url editing functions.
13039 2000-08-04 Dan Winship <danw@helixcode.com>
13041 * providers/pop3/camel-pop3-folder.c (pop3_set_message_flags):
13042 (pop3_sync): Indexes into the flags array are message_number minus
13043 1, not just message_number.
13045 * providers/pop3/camel-pop3-store.c: add a debugging macro for
13046 doing protocol tracing.
13048 2000-08-03 Jeffrey Stedfast <fejj@helixcode.com>
13050 * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Only
13051 call imap_get_summary_internal if the folder can hold messages
13053 * providers/nntp/camel-nntp-provider.c (camel_provider_module_init):
13054 Initialize the service_cache for the news/nntp providers
13056 2000-08-03 Peter Williams <peterw@helixcode.com>
13058 * providers/nntp/Makefile.am (INCLUDES): Add -I$(top_srcdir) to
13059 pull in libibex/ibex.h
13061 2000-08-02 Not Zed <NotZed@HelixCode.com>
13063 * providers/mh/camel-mh-summary.c (camel_mh_summary_sync): Expunge
13064 from the end, so the index isn't messed up when you remove a
13067 * providers/mh/camel-mh-folder.c (mh_append_message): Fix a bug
13068 where it would never open an output file/uid.
13070 * providers/mbox/camel-mbox-store.c (rename_folder):
13071 Implementation for mbox as well.
13073 * camel-store.c (camel_store_rename_folder): New method to rename folders.
13074 (rename_folder): Default implementation.
13076 * providers/mh/camel-mh-store.c (delete_folder): Implement this.
13077 (rename_folder): Implement a rename operation.
13079 2000-08-02 Dan Winship <danw@helixcode.com>
13081 * providers/MH: Kill this. It doesn't have any code to do anything
13082 the new mh provider doesn't do better.
13084 * providers/Makefile.am: Remove reference to MH subdir, and
13085 promote nntp to fully-supported status, since it does compile and
13088 * camel-mime-message.c (camel_mime_message_set_subject): Trim
13089 trailing space from the subject. I've now seen replies from two
13090 different people that tricked the threading code by (a) not having
13091 References/In-Reply-To, and (b) adding an extra space to the end
13092 of the subject line so the subject-based threading fails too. Who
13093 writes these broken mailers anyway?
13095 2000-08-01 Jeffrey Stedfast <fejj@helixcode.com>
13097 * providers/smtp/camel-smtp-transport.c (smtp_helo): When forced
13098 to use the IP, place it in square brackets.
13100 * providers/imap/camel-imap-utils.c (imap_translate_sexp): New and
13101 improved sexp parser. An honest try at using e-sexp is wrapped in
13102 a #ifdef at the bottom of the file but is currently not used
13104 * providers/imap/camel-imap-folder.c (imap_search_by_expression):
13105 We want to do a UID SEARCH so we get UIDs back instead of sequence
13108 2000-08-01 Not Zed <NotZed@HelixCode.com>
13110 * providers/mh: New mh provider implementation.
13112 * providers/Makefile.am (SUBDIRS): Added mh provider.
13114 2000-07-31 Jeffrey Stedfast <fejj@helixcode.com>
13116 * providers/imap/camel-imap-folder.c (imap_get_message_info_internal):
13117 Some IMAP servers don't wrap the UID in ()'s so don't depend on that
13118 (imap_get_summary_internal): Same
13120 * providers/imap/camel-imap-utils.c (free_sexp_node): Oops, forgot to
13121 free node->function - not good.
13123 2000-07-31 Peter Williams <peterw@helixcode.com>
13125 * providers/vee/camel-vee-folder.c (vee_search_by_expression): Add
13126 a NULL to the matches pointer array so that g_strfreev knows where
13129 2000-07-31 Jeffrey Stedfast <fejj@helixcode.com>
13131 * providers/imap/camel-imap-utils.c (imap_translate_sexp): New
13132 convenience function to translate a Camel sexp into the equivalent
13135 * providers/imap/camel-imap-store.c: More places now use
13138 * providers/imap/camel-imap-folder.c (imap_search_by_expression):
13139 Implemented initial version (this may or may not work quite right)
13141 2000-07-28 Jeffrey Stedfast <fejj@helixcode.com>
13143 * providers/imap/camel-imap-folder.c (imap_expunge): Make sure
13144 the third word/token (whatever) is "EXPUNGE" and not something
13145 else like "EXISTS" or "RECENT". When removing the message from
13146 the summary also make sure to free that data to avoid leakage.
13147 Also make sure to subtract 1 from the 'id' since IMAP starts
13148 at 1 and our summary starts at 0 :-)
13150 2000-07-28 Jeffrey Stedfast <fejj@helixcode.com>
13152 * providers/imap/camel-imap-store.c (camel_imap_status): Cleaned
13153 up a bit, now uses imap_next_word()
13154 (camel_imap_command_extended): Now uses imap_next_word(). When
13155 checking for RECENT, allow the first digit of the recent-count
13156 be between 0 and 9 inclusive instead of exclusive.
13158 * providers/imap/camel-imap-folder.c (imap_expunge): Optimized.
13159 No longer will it need to reload the summary as it now instead
13160 removes the appropriate message summaries from the cache.
13161 (camel_imap_folder_changed): If recent == 0 then return. If
13162 recent < 0 then just emit the folder_changed signal, don't reload
13165 2000-07-28 Jeffrey Stedfast <fejj@helixcode.com>
13167 * providers/imap/camel-imap-folder.c
13168 (imap_get_message_count_internal): Get message count when STATUS
13170 (imap_init): folder->has_search_capability is required for IMAP so
13171 should always be set to TRUE (is currently being set to FALSE as
13172 I've not yet implemented SEARCH support).
13173 (camel_imap_folder_changed): Seem to have fixed my optimization
13176 2000-07-28 Jon K Hellan <hellan@acm.org>
13178 * providers/imap/camel-imap-store.h (CamelImapServerLevel): New
13180 (CamelImapStore): Added server_level and has_status_capability
13183 * providers/imap/camel-imap-store.c (imap_connect): Detect
13184 IMAP4REV1, IMAP4 and STATUS in capability response.
13186 * providers/imap/camel-imap-folder.c
13187 (imap_get_message_count_internal): Use STATUS only if server
13188 supports it. TODO: Get message count when STATUS not supported.
13189 (imap_get_message, imap_get_summary_internal,
13190 imap_get_message_info_internal): Handle IMAP4 as well.
13191 (imap_protocol_get_summary_specifier): New function: Make a data
13192 item specifier for the header lines we need, appropriate to the
13195 2000-07-27 Peter Williams <peterw@helixcode.com>
13197 * camel-mime-utils.c (header_decode_lwsp): More
13198 checks for end of string.
13200 * providers/imap/camel-imap-store.c:
13201 (imap_command_extended): Free the elements of our
13202 array (huge mem leak)
13204 * providers/imap/camel-imap-folder.c:
13205 (summary_get_internal): Same as above.
13208 2000-07-27 Jeffrey Stedfast <fejj@helixcode.com>
13210 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
13211 Fixed my routine to only fetch new headers, my IDs were off by 1
13212 on the high end, so when it would fetch the last newly arrived
13213 message it would fail and end up fetching all of the summaries
13214 because of the corruption.
13216 2000-07-27 Jeffrey Stedfast <fejj@helixcode.com>
13218 * camel-url.c (camel_url_to_string): If the path doesn't begin
13219 with a / and there is a host, prepend a / to the path.
13221 2000-07-27 Jeffrey Stedfast <fejj@helixcode.com>
13223 * providers/imap/Makefile.am: Added camel-imap-utils.[c,h]
13225 * providers/imap/camel-imap-utils.[c,h]: Utilities for parsing
13226 server responses for use in both camel-imap-store.c and
13227 camel-imap-folder.c
13229 * providers/imap/camel-imap-folder.c (imap_get_summary_internal):
13230 Free all the pointers in the headers array.
13231 (imap_get_subfolder_names_internal): Updated to use
13232 imap_parse_list_response
13233 (imap_parse_subfolder_list): Removed in favor of
13234 imap_parse_list_response
13236 * providers/imap/camel-imap-store.c (camel_imap_command_extended):
13237 Free all the pointers in the data array.
13238 (imap_connect): Updated to use imap_parse_list_response and fixed
13240 (folder_is_selectable): Updated.
13242 2000-07-27 Jeffrey Stedfast <fejj@helixcode.com>
13244 * providers/imap/camel-imap-folder.c (imap_get_message_info): Now
13245 uses a hash table for looking up message info rather than a linear
13248 2000-07-27 Peter Williams <peterw@helixcode.com>
13250 * providers/*/Makefile.am: Don't specify SUBDIRS =
13251 [nothing]. Messes up distcheck.
13253 2000-07-26 Peter Williams <peterw@helixcode.com>
13255 * camel-mime-parser.c (folder_scan_init): Initialize
13256 outbuf to be "" -- it's not guaranteed to be zeroed.
13258 * camel-mime-utils.c (header_references_decode): Return
13259 if the header is NULL -> or "" <-. Don't do our stupid
13260 mailer trick if we point to \0.
13261 (header_decode_quoted_string): Don't rip past end of
13264 2000-07-26 Dan Winship <danw@helixcode.com>
13266 * camel-movemail.c (movemail_external): routine to call an
13267 external movemail program.
13268 (camel_movemail): Nuke return value, use movemail_external when
13269 available and useful, and don't delete "dest" on errors, since
13270 it might have started non-empty.
13272 2000-07-26 Jeffrey Stedfast <fejj@helixcode.com>
13274 * camel-url.c (camel_url_to_string): Should now always prepend a '/'
13275 before the path if it doesn't already exist.
13277 * providers/imap/camel-imap-folder.c: Fixed a few compiler warnings
13279 2000-07-25 Jeffrey Stedfast <fejj@helixcode.com>
13281 * providers/imap/camel-imap-folder.c (imap_summary_free): Fixed the
13282 real problem that Peter was running into.
13284 2000-07-25 Dan Winship <danw@helixcode.com>
13286 * camel-mime-message.c (write_to_stream): Don't add a Mime-Version
13287 header to a message that already has one.
13289 * camel-internet-address.c (internet_encode): Don't put <>s around
13290 addresses with no name part.
13292 2000-07-25 Peter Williams <peterw@helixcode.com>
13294 * providers/imap/camel-imap-folder.c (imap_expunge): Set
13295 imap_folder->summary to NULL after calling imap_summary_free,
13296 so we don't get stuck with a junk summary pointer. Should
13299 2000-07-25 Jeffrey Stedfast <fejj@helixcode.com>
13301 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
13302 Optimized to try and get the new message headers without reloading
13303 the entire summary from scratch.
13304 (imap_get_summary_internal): Will now sync() before attempting to
13305 reload the summary so that flags are set in the reloaded summary
13308 2000-07-24 Jeffrey Stedfast <fejj@helixcode.com>
13310 * providers/imap/camel-imap-store.c (get_folder): Updated to give
13311 special attention to the root folder.
13313 * providers/imap/camel-imap-folder.c
13314 (imap_get_subfolder_names_internal): Updated to handle the root
13316 (imap_get_message_count_internal): return 0 if folder can't hold
13318 (camel_imap_folder_new): Change so that root folder gets special
13319 attention and always gets can_hold_messages set to FALSE
13321 2000-07-24 Dan Winship <danw@helixcode.com>
13323 * camel-folder.c: Remove exceptions from a number of methods that
13324 work on what ought to be static data: get_parent_folder,
13325 get_parent_store, get_message_count, get_unread_message_count,
13326 get_permanent_flags, get_message_flags, set_message_flags,
13327 get_message_user_flag, set_message_user_flag, get_uids,
13328 get_summary, get_subfolder_names. Turn camel_folder_delete_message
13329 into a macro. (Mostly a pull-up from the camel-async branch.)
13331 * providers/{imap,mbox,nntp,pop3,vee}: Update for CamelFolder
13334 2000-07-24 Jeffrey Stedfast <fejj@helixcode.com>
13336 * providers/imap/camel-imap-folder.c (imap_get_message_info): Updated
13337 to port easily to the new Camel API
13338 (imap_init): Don't SELECT INBOX, we don't need to do that
13340 2000-07-24 Jeffrey Stedfast <fejj@helixcode.com>
13342 * providers/imap/camel-imap-folder.c (camel_imap_folder_new):
13343 Initialize the summary and subfolder listing.
13344 (imap_summary_free): Now takes a GPtrArray arg rather than a
13345 CamelImapFolder as it increases it's usefullness for free()'ing
13346 temporary summaries.
13347 (imap_get_message_count_internal): A new convenience function for
13348 getting the actual message count on a server to be used by
13349 imap_get_summary_internal)
13350 (imap_get_message_count): Since the Camel API is on the move again,
13351 the future version of this function will not be able to make a
13352 call to the store, it must only access previously fetched data (thus
13353 the creation of the _internal function)
13354 (imap_get_subfolder_names_internal): Again, because the future version
13355 of imap_get_subfolder_names will not take an exception, we must rename
13356 this function which will be called by camel_imap_folder_new()
13357 (imap_get_subfolder_names): We now return the previously collected
13358 subfolder listing that the _internal function fetched previously
13359 (imap_get_summary_internal): Again, same idea as the previous _internal
13361 (imap_get_summary): Again... now returns a previously aquired summary
13363 * providers/imap/camel-imap-store.c (imap_noop): This will hopefully
13364 prevent the imap store from disconnecting.
13365 (imap_connect): Modified to add a gtk timeout event that will call
13366 imap_noop() every 10 minutes (we may want to change this time value)
13367 (imap_disconnect): Modified to remove the NOOP timeout event from the
13369 (camel_imap_command_extended): Commented out the code that would try
13370 and detect if the store was disconnected and then reconnect if it was
13373 2000-07-24 Dan Winship <danw@helixcode.com>
13375 * camel-folder.[ch]: Remove camel_folder_get_message_uid, which
13376 was not used, and not implemented by any provider.
13378 * providers/nntp/camel-nntp-folder.c: Remove get_message_uid
13379 non-implementation.
13381 * camel-folder-pt-proxy.[ch], camel-arg-collector.c,
13382 camel-marshal-utils.[ch]: Bye bye bye.
13384 * Makefile.am: remove reference to camel-arg-collector.c
13386 2000-07-23 Jeffrey Stedfast <fejj@helixcode.com>
13388 * providers/imap/camel-imap-store.c (imap_disconnect): Made it a
13389 little more forgiving. Also set current_folder to NULL as there is
13390 no selected folder after a disconnect.
13391 (stream_is_alive): Detects whether or not a socket is "alive"
13392 (camel_imap_command_extended): Use stream_is_alive() to aid in the
13393 detection of a disconnected state.
13395 2000-07-22 Jeffrey Stedfast <fejj@helixcode.com>
13397 * providers/imap/camel-imap-store.c (get_folder): Clear
13398 CamelExceptions when appropriate (eg when folder is marked as
13399 \NoSelect). Still needs some cleanup and perhaps Dan will have a
13400 better way of doing this as this seems like a messy way of
13403 * providers/imap/camel-imap-folder.c (imap_get_uids): Took out
13404 some debug statements as they are no longer needed.
13406 2000-07-21 Jeffrey Stedfast <fejj@helixcode.com>
13408 * providers/imap/camel-imap-folder.c (imap_get_subfolder_names):
13409 Updated to not strip out subfolders that are marked as \NoSelect
13410 because this will be correctly handled in store->get_folder from
13413 * providers/imap/camel-imap-store.c (folder_is_selectable): New
13414 convenience function for use in get_folder().
13415 (parse_list_response): Now takes a char **flags argument which is
13416 needed by folder_is_selectable().
13417 (imap_connect): Updated to reflect changes to
13418 parse_list_response().
13420 2000-07-21 Jeffrey Stedfast <fejj@helixcode.com>
13422 * providers/imap/camel-imap-stream.c (stream_read): Updated with
13423 some of the same fixes I've made to camel-imap-folder.c like
13424 recalculating message part lengths.
13426 * providers/imap/camel-imap-store.c (camel_imap_command_extended):
13427 Rewrote the code to check for "* %d RECENT". Still needs to be
13428 modified, but should no longer cause an infinite loop by detecting
13429 mis-detecting RECENT messages.
13431 2000-07-20 Jeffrey Stedfast <fejj@helixcode.com>
13433 * providers/imap/camel-imap-folder.c (imap_get_summary):
13434 (imap_get_message_info): Oops. Fix UID parser to allow 0 and 9 to
13435 be in the range of valid UID chars.
13437 2000-07-20 Peter Williams <peterw@helixcode.com>
13439 * camel-object.c (camel_object_unref): Add a new global mutex
13440 'refcount' held when refcounting operations occur.
13442 2000-07-19 Peter Williams <peterw@helixcode.com>
13444 * camel-object.c (camel_type_lock_up): Correct the recursiveness;
13445 the locklevel is stored as a private, so each thread has its own
13446 idea of the locklevel. Thus one thread can relock, but a different
13447 one will think that it's a level 0 and try to lock the type_system
13450 2000-07-19 Jeffrey Stedfast <fejj@helixcode.com>
13452 * providers/imap/camel-imap-folder.c: General cleanup working
13453 towards getting Actions->Expunge working correctly.
13455 * providers/imap/camel-imap-store.c
13456 (cammel_imap_command_extended): Added code to look for "* %d
13457 RECENT" and to emit the folder_changed signal if there are any
13458 recent messages. Note: this is a hack and needs to be rewritten
13461 2000-07-19 Jeffrey Stedfast <fejj@helixcode.com>
13463 * providers/imap/camel-imap-folder.c (imap_get_summary): If the
13464 folder's message count is not the same as the number of summaries,
13465 free the old summary and create a new summary.
13467 2000-07-18 Jeffrey Stedfast <fejj@helixcode.com>
13469 * providers/imap/camel-imap-folder.c
13470 (camel_imap_folder_class_init): Added in
13471 imap_[g,s]et_message_user_flag() methods
13472 (imap_get_message_info): Rewrote to use the more efficient way of
13473 downloading summary information and also added a UID comparison so
13474 that if the UID requested doesn't match the UID received, it
13475 returns NULL. FIXME: When the mailer gets NULL when it requested
13476 message info, it seems that it displays a row for that message and
13477 when you try and select the blank row, it segfaults.
13479 * providers/imap/camel-imap-store.c (get_folder): Oops, this
13480 should not be checking against "/", it should be checking against
13483 * providers/imap/camel-imap-folder.c (imap_parse_subfolder_line):
13484 Updated to trim out the leading namespace.
13485 (imap_get_subfolder_names): Let the subfolder parser trim the
13486 namespace off the folder name.
13488 2000-07-17 Peter Williams <peterw@helixcode.com>
13490 * camel-object.c (camel_type_lock_up): New function; the
13491 Camel type_system lock is now fakey-recursive, being controlled
13492 by a semaphore that goes up and down and is protected by another
13493 lock. Theoretically all we need is the lock on the semaphore,
13494 but this we catch exceptions "better" (by deadlocking).
13495 (camel_type_lock_down): Corresponding to above.
13496 (all functions): s,G_LOCK,camel_type_lock_up, etc.
13498 2000-07-17 Jeffrey Stedfast <fejj@helixcode.com>
13500 * providers/imap/camel-imap-store.c (imap_disconnect): Send a
13503 * providers/imap/camel-imap-folder.c (imap_get_message): Hacks to
13504 get IMAP code to work with CommunigatePro and MS Exchange (and any
13505 other servers that send back a UID at the end of each FETCH inside
13506 of the main body of the message part).
13507 (imap_sync): Un-#if 0 the code that sets the flags on the IMAP
13508 server for messages that have changed. Oops, don't mask with
13509 DELETED to find out if the message has been answered ;-)
13510 (imap_expunge): sync before expunging.
13512 2000-07-16 Jeffrey Stedfast <fejj@helixcode.com>
13514 * providers/imap/camel-imap-store.c: All SELECT calls now pass
13515 a NULL folder argument to camel_imap_command_extended() since it's
13517 (imap_connect): Moved service_class->connect() to the point right
13518 after a connection is established with the server rather than
13519 waiting until the end of the function.
13520 (camel_imap_command): Updated the documentation comment
13521 (camel_imap_command_extended): Before sending a command, first
13522 check to make sure we are connected; if we aren't, then reconnect.
13523 Don't strncmp() command with "SELECT" as it's redundant.
13525 * providers/imap/camel-imap-folder.c: All SELECT calls now pass
13526 a NULL folder argument to camel_imap_command_extended() since it's
13527 not needed. Also s/camel_imap_command/camel_imap_command_extended as
13528 I will probably be doing away with camel_imap_command() or at least
13529 only using it for LOGIN and similar commands where the server won't
13530 notify us of any recent messages.
13532 2000-07-15 Jeffrey Stedfast <fejj@helixcode.com>
13534 * providers/imap/camel-imap-folder.c (camel_imap_folder_new):
13535 One last fix to get rid of hard-coded "/" directory separators
13537 2000-07-14 Peter Williams <peterw@helixcode.com>
13539 * camel-object.c : Implement 'events', which are suspiciously
13540 like signals except without all the marshalling baggage, and
13541 with quasi-thread-safety.
13542 (camel_object_class_declare_event): New func.
13543 (camel_object_hook_event): Ditto.
13544 (camel_object_trigger_event): Ditto.
13545 (obj_class_init): Declare the "finalize" event.
13546 (obj_class_finalize): Free the hashtable of events->preps
13547 (obj_finalize): Free the hashtable of events->hooklists
13548 (camel_object_unref): Trigger the finalize event (ourselves,
13549 to prevent massively unpleasant looping things.)
13551 2000-07-14 Peter Williams <peterw@helixcode.com>
13553 * camel-object.c (make_global_classfuncs): Change to return
13554 a CamelObjectClass. Change parents to a GSList and free it
13556 (camel_object_new): Don't allocate a classfuncs for every object;
13557 merely give it a reference to the global_classfuncs. Convert
13558 parents to a GSList and free it when done.
13559 (camel_object_unref): Don't free the classfuncs. Free the parents
13560 list, which is changed to a GSList.
13562 2000-07-14 Jeffrey Stedfast <fejj@helixcode.com>
13564 * string-utils.c (string_unquote): New convenience function
13565 to unquote a string if it's encapsulated by "'s
13567 * providers/imap/camel-imap-folder.c:
13568 * providers/imap/camel-imap-store.c: Made the necessary changes
13569 to stop using hard coded directory separators.
13571 2000-07-13 Dan Winship <danw@helixcode.com>
13573 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_load):
13574 If the summary is for a smaller mbox, and rebuilding from the
13575 last-known end position fails, try rebuilding from the beginning.
13576 Deals with the case where the user edits the mbox and makes it
13577 bigger, without adding new messages.
13579 2000-07-13 Peter Williams <peterw@helixcode.com>
13581 * camel-object.c: Rewritten to not be based on GtkObject,
13582 but a tiny threadsafe ripoff thereof. Objects still cannot
13583 be shared across threads, but ref/unref/destroy/new/etc
13584 will work. Signals are not implemented because doing it
13585 robustly would be a major pain in the butt, but class
13586 functions are. There's a small demonstration that it doesn't
13587 crash in ./temp-test.c: build it with ./make-test.sh.
13588 * camel-stream.c, camel-seekable-stream.c, camel-stream-mem.c:
13589 moved over to CamelObject. Proof of concept: two levels of
13590 subclass and class functions, all working without coredumps.
13591 To port to CamelObject:
13592 - s,GTK_,CAMEL_,g in the cast checks
13593 - s,gtk_type_new,camel_object_new,g
13594 - s,GtkType,CamelType,g
13595 - Change get_type function over to camel_type_declare
13596 - instead of hooking to finalize function, it goes into the
13599 - instead of GTK_OBJECT(so)->klass, CAMEL_OBJECT_GET_CLASS(so)
13600 - s,gtk_type_class,camel_type_get_global_classfuncs,g
13601 - don't chain finalize handlers; it will be done for you
13603 2000-07-13 Jeffrey Stedfast <fejj@helixcode.com>
13605 * providers/imap/camel-imap-folder.c:
13606 * providers/imap/camel-imap-store.c: If a SELECT fails, set
13607 imap_store->current_folder to NULL so a SELECT is forced before
13608 any message/folder operations are requested. Also, because some
13609 users don't use a namespace, make sure that if the url->path is
13610 "/" we don't use it when creating the folder_path.
13611 (camel_imap_command[_extended]): Since we allow the passing of
13612 a NULL folder which we can use to bypass a forced SELECT, no need
13613 to check for the individual commands that don't require a folder
13616 2000-07-13 Jeffrey Stedfast <fejj@helixcode.com>
13618 * providers/imap/camel-imap-folder.c:
13619 * providers/imap/camel-imap-store.c: Updated to use CAMEL_IMAP_OK,
13620 CAMEL_IMAP_NO, CAMEL_IMAP_BAD, and CAMEL_IMAP_FAIL rather than the
13621 ones copied from the POP3 provider.
13623 2000-07-13 Jeffrey Stedfast <fejj@helixcode.com>
13625 * providers/imap/camel-imap-folder.c (imap_get_summary): Oops.
13626 If the number of messages in the folder is 0, don't fetch
13627 summaries 1 thru 0, just return an empty summary.
13628 (imap_copy_message_to): Fixed to use message UID and also send
13629 the source folder as an arg to camel_imap_command rather than NULL.
13630 (imap_move_message_to): Same.
13631 (imap_init): If SELECT is successful, we need to set the current
13632 folder to the one selected, this was causing problems with move/copy
13634 2000-07-13 Dan Winship <danw@helixcode.com>
13636 * camel-service.h: define a set of CAMEL_SERVICE_URL_ALLOW_* flags
13637 parallel to the _NEED_* flags, and make the _NEED_* flags imply
13640 * providers/imap/camel-imap-store.c (camel_imap_store_init): imap
13643 2000-07-13 Jeffrey Stedfast <fejj@helixcode.com>
13645 * providers/imap/camel-imap-folder.c (imap_get_summary): New
13646 and improved approach to fetching an entire folder summary
13647 that should be much much faster than the old way as it gets
13648 the entire folder summary in 1 shot rather than requesting
13649 message by message. As with the last update, this version
13650 also only fetches the minimum number of header fields.
13651 (imap_get_summary): Oops, forgot to free the temp
13654 2000-07-13 Jeffrey Stedfast <fejj@helixcode.com>
13656 * providers/imap/camel-imap-folder.c (imap_get_summary): Don't
13657 fetch the entire RFC822 header, just fetch the fields we want.
13658 (imap_get_message_info): Same.
13660 2000-07-13 Not Zed <NotZed@HelixCode.com>
13662 * camel-mime-filter-basic.c (camel_mime_filter_basic_new_type):
13663 Reset filter on setup.
13664 (reset): When resetting qp encoding, set the state to -1, instead
13667 * camel-mime-utils.c (quoted_encode_step): Actually count the
13668 characters output sofar (it never counted any). Bunch of other
13670 (quoted_encode_close): Also flush out final character, if there's
13673 2000-07-12 Jeffrey Stedfast <fejj@helixcode.com>
13675 Chris forgot to add #include <e-util/e-util.h> to the source files
13677 * providers/imap/camel-imap-store.c (imap_connect): Fixed Peter's
13678 fix, we don't want to send a string to a %d.
13680 2000-07-12 Christopher James Lahey <clahey@helixcode.com>
13682 * camel-folder-search.c, providers/imap/camel-imap-store.c:
13683 Changed from strstrcase to e_strstrcase.
13685 * string-utils.c, string-utils.h: Removed strstrcase (in favor of
13686 e_strstrcase in e-util/e-util.c.)
13688 2000-07-12 Chris Toshok <toshok@helixcode.com>
13690 * providers/nntp/camel-nntp-folder.c
13691 (nntp_folder_set_message_flags): get the article num out of our
13692 uid and mark it read in the newsrc.
13693 (nntp_folder_get_message): get the message id out of the uid to
13696 * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): the uid
13697 is now <article-num>,<messageid>
13698 (get_HEAD_headers): same.
13700 * camel-mime-parser.c (folder_scan_step): go to HSCAN_MESSAGE
13701 state when ct->subtype is "news" as well as "rfc822". this makes
13702 attachments of type "message/news" display properly.
13704 2000-07-12 Dan Winship <danw@helixcode.com>
13706 * camel-folder.c (camel_folder_free_deep,
13707 camel_folder_free_shallow, camel_folder_free_nop): Useful default
13708 implementations for free_{uids,subfolder_names,summary}.
13709 (free_subfolder_names, free_uids): Make these g_warning-ing
13710 default implementations.
13712 * providers/*/camel-*-folder.c: Use the new functions where
13713 appropriate, remove duplicated code.
13715 2000-07-12 Peter Williams <peterw@helixcode.com>
13717 * providers/imap/camel-imap-store.c (query_auth_types): Check for
13718 NULL parameters when setting the exception so as to not crash on
13719 Solaris (can't handle a %s passed NULL).
13720 (imap_connect): Same.
13722 2000-07-12 Jeffrey Stedfast <fejj@helixcode.com>
13724 * providers/mbox/camel-mbox-folder.c (mbox_delete_message): Use
13725 mbox_set_message_flags () instead of setting the flags by hand. This
13726 fixes the problem of the "message_changed" signal not being emitted
13727 at the correct time.
13729 * providers/imap/camel-imap-folder.c: "folder_changed" signals should
13730 pass a third argument (which is ignored).
13732 * camel-folder.c: Undo gtk signal emits done in set_flags and
13735 (copy_message_to): Create info as a const CamelMessageInfo
13737 2000-07-12 Chris Toshok <toshok@helixcode.com>
13739 * providers/nntp/Makefile.am: don't add test-newsrc to the build
13740 since it needs libcamel (which isn't built at the time test-newsrc
13743 * providers/nntp/camel-nntp-utils.c (get_HEAD_headers): fill in
13744 MessageInfo->message_id.
13745 (get_XOVER_headers): same.
13747 * providers/nntp/camel-nntp-folder.c (nntp_folder_init): move
13748 summary loading here.
13749 (nntp_folder_sync): summary/newsrc changes should be stored here.
13750 put a comment to that effect.
13751 (nntp_folder_set_message_flags): don't save the newsrc here.
13752 (nntp_folder_get_uids): use g_ptr_array_index instead of the
13754 (nntp_folder_get_summary): no need to check if we should generate
13755 the summary here. already done.
13756 (nntp_folder_get_message_info): implement.
13758 * providers/nntp/camel-nntp-store.c
13759 (camel_nntp_store_get_toplevel_dir): use evolution_dir instead of
13760 computing it ourselves.
13761 (nntp_store_disconnect): call camel_nntp_newsrc_write.
13762 (ensure_news_dir_exists): new function to create the news/<news
13764 (camel_nntp_store_class_init): hook up connect/disconnect and
13766 (nntp_store_connect): if ensure_news_dir_exists fails throw an
13769 2000-07-12 Peter Williams <peterw@helixcode.com>
13771 * camel-folder.c (camel_folder_set_message_flags): Emit a message_changed
13772 signal once the flags are set on the message.
13773 (camel_folder_set_user_flag): Ditto.
13774 (camel_folder_expunge): Emit a folder_changed if no exception.
13776 2000-07-12 Jeffrey Stedfast <fejj@helixcode.com>
13778 * camel-stream.c: Use size_t and ssize_t for read/write methods
13780 * providers/imap/camel-imap-folder.c (imap_set_message_flags):
13781 Updated to emit the message_changed signal.
13782 (imap_delete_message): Updated to use imap_set_message_flags ().
13783 (imap_move_message_to): Updated to use imap_set_message_flags ()
13784 and to emit the folder_changed signal on the destination folder.
13785 (imap_copy_message_to): Updated to emit the folder_changed signal
13786 on the destination folder.
13787 (imap_append_message): Updated to emit the folder_changed signal
13788 on the destination folder.
13790 2000-07-11 Jeffrey Stedfast <fejj@helixcode.com>
13792 * camel-folder.c (camel_folder_append_message): Now takes a
13793 flags argument to specify the flags to be set on the message
13794 since we might not necessarily want the flags to be wiped clean.
13796 (copy_message_to): Updated to send a flags argument to
13797 append_message (); currently sends the original message's flags.
13799 * providers/mbox/camel-mbox-folder.c (mbox_append_message):
13800 * providers/imap/camel-imap-folder.c (imap_append_message):
13803 2000-07-11 Dan Winship <danw@helixcode.com>
13805 * camel-folder.c: Remove exceptions from a number of methods
13806 that work on what ought to be static data: get_parent_folder,
13807 get_parent_store, get_message_count, get_unread_message_count,
13808 get_permanent_flags, get_message_flags, set_message_flags,
13809 get_message_user_flag, set_message_user_flag, get_message_uid,
13810 get_uids, get_summary, get_subfolder_names. Turn
13811 camel_folder_delete_message into a macro.
13813 * providers/{mbox,pop3,vee}: Update for CamelFolder changes
13815 * providers/Makefile.am: Disable imap and nntp for now
13817 2000-07-11 Jeffrey Stedfast <fejj@helixcode.com>
13819 * providers/imap/camel-imap-folder.c (imap_search_by_expression):
13820 This shouldn't return NULL, it should return g_ptr_array_new ()
13821 so the mailer gets what it expects.
13823 2000-07-10 Jeffrey Stedfast <fejj@helixcode.com>
13825 * camel-folder-summary.c (camel_folder_summary_decode_string):
13826 Oops, an unsigned integer can never be < 0
13828 2000-07-10 Dan Winship <danw@helixcode.com>
13830 * providers/vee/camel-vee-folder.c (vee_search_by_expression):
13831 Initialize a variable to make this not crash again. And fix a bug
13832 so it actually does something.
13834 2000-07-10 Jeffrey Stedfast <fejj@helixcode.com>
13836 * camel-folder-summary.c: Cleaned up a bunch of compile warnings
13838 2000-07-10 Dan Winship <danw@helixcode.com>
13840 * providers/vee: kill more debugging messages
13842 2000-07-10 Jeffrey Stedfast <fejj@helixcode.com>
13844 * providers/mbox/camel-mbox-folder.c (mbox_get_unread_message_count):
13845 * providers/vee/camel-vee-folder.c (vee_get_unread_message_count):
13846 * providers/imap/camel-imap-folder.c (imap_get_unread_message_count):
13849 * camel-folder.c (camel_folder_get_unread_message_count): New
13850 convenience function to allow the mailer to query the number
13851 of unread messages in a folder (for displaying message stats
13852 in a folder tree?).
13854 2000-07-09 Dan Winship <danw@helixcode.com>
13856 * camel-mime-utils.c (header_references_dup): New function to copy
13857 a header_references structure.
13859 * camel-folder-summary.c (camel_message_info_dup_to): New function
13860 to (deep) copy the data from one CamelMessageInfo into another.
13861 (camel_message_info_free): And free the data.
13863 * providers/vee/camel-vee-folder.c (vee_sync): Implement. (empty).
13864 (vee_search_by_expression): belatedly update for
13865 camel_folder_search change.
13866 (vee_folder_build): belatedly update for camel_folder_search
13867 change. Use camel_message_info_dup_to and camel_message_info_free
13868 (in particular, so that we get message_id and references info so
13869 vfolders can be threaded).
13870 (vee_folder_build_folder): Ditto.
13872 2000-07-08 Jeffrey Stedfast <fejj@helixcode.com>
13874 * providers/nntp/camel-nntp-folder.c:
13875 * providers/nntp/camel-nntp-utils.c:
13876 * providers/nntp/camel-nntp-store.c: Update to reflect past changes
13877 in the Camel API. Use gtk macro casts wherever possible and use glib's
13878 memory functions instead of standard c's (since they are not
13881 * providers/smtp/camel-smtp-transport.c:
13882 * providers/imap/camel-imap-store.c: Wrap debug print statements
13885 * providers/imap/camel-imap-stream.c (stream_read): Make sure
13886 that we get up to and including the last \n of the mime part.
13888 * providers/imap/camel-imap-folder.c (imap_get_message): Make sure
13889 that we get up to and including the last \n of the mime part.
13890 Wrap debug print statements in a macro.
13892 * providers/imap/camel-imap-stream.c (stream_read): Only cache
13893 the important data (aka the mime part requested and no extra
13894 server response stuff)
13896 2000-07-07 Dan Winship <danw@helixcode.com>
13898 * camel-mime-utils.c (header_references_decode): Work around
13899 In-Reply-To's with unquoted punctuation. So many broken mailers.
13901 * camel-folder.c (camel_folder_search_by_expression): Make this
13902 return a GPtrArray rather than a GList.
13904 * camel-folder-search.c (camel_folder_search_execute_expression):
13905 * providers/imap/camel-imap-folder.c (imap_search_by_expression):
13906 * providers/mbox/camel-mbox-folder.c (mbox_search_by_expression):
13907 * providers/nntp/camel-nntp-folder.c (nntp_search_by_expression):
13908 Update to return a GPtrArray rather than a GList.
13910 2000-07-07 Jeffrey Stedfast <fejj@helixcode.com>
13912 * providers/smtp/camel-smtp-transport.c (esmtp_get_authtypes):
13913 Fixed the parser to actually work
13915 2000-07-06 Dan Winship <danw@helixcode.com>
13917 * camel-mime-utils.c (header_references_decode): Make this deal
13918 with the full RFC822 References/In-Reply-To format rather than
13919 just the more-nicely-behaved RFC1036 version. (Needed to parse
13920 In-Reply-To headers with extra junk in them.)
13922 2000-07-06 Jeffrey Stedfast <fejj@helixcode.com>
13924 * providers/imap/camel-imap-folder.c (imap_get_summary): Parse for
13925 more header information to allow message threading in IMAP.
13926 (imap_get_message_info): Same.
13928 * camel-folder-summary.c: Renamed summary_format_* to
13929 camel_summary_format_* and moved them into public scope.
13931 * providers/smtp/camel-smtp-transport.c (smtp_connect): Oops. Don't
13932 pass port # as a string in the error code (if it fails to connect).
13934 * providers/imap/camel-imap-folder.c (imap_append_message): Changed
13935 over to camel_imap_command_extended as that was the source of the
13936 problems - apparently appending replies with more than just 1 line.
13938 2000-07-05 Dan Winship <danw@helixcode.com>
13940 * camel-folder-search.c (search_header_contains): make header
13941 matching case-insensitive
13943 * camel-folder-summary.c:
13945 * providers/mbox/camel-mbox-folder.c:
13946 * providers/mbox/camel-mbox-summary.c: Remove some non-error case
13947 debugging-type messages.
13949 2000-07-05 Ettore Perazzoli <ettore@helixcode.com>
13951 * providers/mbox/camel-mbox-summary.c (d): Define to empty so that
13952 we get rid of a ton of debugging messages.
13954 2000-07-05 Jeffrey Stedfast <fejj@helixcode.com>
13956 * camel-mime-utils.h: Added prototype for uudecode_step
13958 * camel-mime-utils.c (uudecode_step): Cleaned up some junk that
13959 should have been cleaned up when debugging printf's were taken out.
13961 2000-07-05 Ettore Perazzoli <ettore@helixcode.com>
13963 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
13964 Update the X-Evolution: header even if the in-memory UID and the
13965 saved UID are not the same. Otherwise mboxes with clashing UIDs
13966 can never be fixed.
13968 * camel-folder-summary.c
13969 (camel_folder_summary_add_from_parser): Add the message to the
13970 summary before doing any ibex stuff. In fact, this might also
13971 have the side effect of reassigning the UID so it needs to be done
13972 before we start using the UID.
13974 * providers/mbox/camel-mbox-folder.c (mbox_append_message): Add
13975 debugging message to keep track of the UIDs we add.
13977 2000-07-05 Dan Winship <danw@helixcode.com>
13979 * camel-folder-summary.c: Add "Cc" to summary and bump summary
13982 * camel-folder-search.c (search_header_contains): make "Cc" a
13985 2000-07-03 Ettore Perazzoli <ettore@helixcode.com>
13987 * camel-folder-summary.c (camel_folder_summary_next_uid_string):
13989 (camel_folder_summary_add): Use
13990 `camel_folder_summary_next_uid_string()' instead of recomputing
13991 the UID manually here.
13992 (camel_folder_summary_add_from_parser): Likewise.
13994 2000-07-03 Ettore Perazzoli <ettore@helixcode.com>
13996 * camel-folder-summary.c (camel_folder_summary_set_uid): Removed.
13998 2000-07-03 Dan Winship <danw@helixcode.com>
14000 * camel-folder-summary.c (message_info_new): Parse In-Reply-To
14001 with header_references_decode, not header_msgid_decode.
14003 * camel-mime-message.c (camel_mime_message_class_init): message
14004 headers are case-insensitive.
14006 * providers/pop3/camel-pop3-store.c (camel_pop3_command): Fix a
14007 bug in error-setting code.
14008 (pop3_connect): Don't re-prompt for password in the KPOP case.
14009 (pop3_get_response): New function, split out from
14010 camel_pop3_command.
14011 (connect_to_server): Use pop3_get_response to parse the greeting
14012 message, and error out appropriately if it's -ERR.
14014 2000-07-02 Dan Winship <danw@helixcode.com>
14016 * camel-folder.c (camel_folder_freeze, camel_folder_thaw): New
14017 functions to freeze and thaw a folder (to prevent message/folder
14018 changed signals in the middle of a long series of operations).
14019 (camel_folder_class_init): Change signals to GTK_RUN_FIRST.
14020 (message_changed, folder_changed): Add default implementations
14021 that stop the emission and record info for later if the folder is
14024 * providers/mbox/camel-mbox-folder.c (mbox_sync): leftover fixes
14025 from the close->sync change: don't destroy the ibex, summary, and
14026 search when syncing.
14027 (append_message): emit "folder_changed" on a successful append.
14029 2000-07-02 Jeffrey Stedfast <fejj@helixcode.com>
14031 * camel-mime-utils.c (uudecode_step): A rather complex uudecoder
14032 written in the spirit of Zucchi-ness, is it up to par? Only the
14033 Z-man can tell us :-)
14035 2000-07-01 Dan Winship <danw@helixcode.com>
14037 * camel-service.c (camel_service_get_name): New method, to return
14038 an end-user-friendly name corresponding to a service. (eg, "POP
14039 service for danw on trna.helixcode.com").
14041 * providers/imap/camel-imap-store.c,
14042 providers/mbox/camel-mbox-store.c,
14043 providers/nntp/camel-nntp-store.c,
14044 providers/pop3/camel-pop3-store.c,
14045 providers/sendmail/camel-sendmail-transport.c,
14046 providers/smtp/camel-smtp-transport.c: Implement.
14048 * providers/imap/Makefile.am: remove unneeded
14049 libcamelimap_la_LDADD.
14051 * providers/pop3/camel-pop3-store.c (connect_to_server): fix the
14052 CAPA-parsing code to not get into an infinite loop.
14054 2000-07-01 Jeffrey Stedfast <fejj@helixcode.com>
14056 * providers/imap/camel-imap-folder.c (imap_get_message): Fixed
14057 the bug that would sometimes leave part of the server response
14058 tacked on to the end of the message.
14060 * camel-folder.c: Renamed _by_uid methods. Since we no longer
14061 have get-by-number methods, no need to have the _by_uid
14063 (get_message_by_uid): Renamed to get_message
14064 (delete_message_by_uid): Renamed to delete_message
14065 (summary_get_by_uid): Renamed to get_message_info
14067 * providers/mbox/camel-mbox-folder.c:
14068 * providers/pop3/camel-pop3-folder.c:
14069 * providers/imap/camel-imap-folder.c:
14070 * providers/vee/camel-vee-folder.c: Updated to reflect
14071 camel-folder changes.
14073 2000-06-30 Jeffrey Stedfast <fejj@helixcode.com>
14075 * camel-folder.c (camel_folder_copy_message_to): New function, to
14076 copy a message from one folder to another. The default
14077 implementation just uses append_message, but providers can
14078 implement more efficient versions for use when both folders are on
14081 * broken-date-parser.[c,h]: Utilities for parsing broken
14084 * providers/imap/camel-imap-folder.c (imap_move_message_to):
14085 (imap_copy_message_to): Implemented.
14087 * camel-mime-utils.c (header_decode_date): Wrote some code to try
14088 and un-mangle broken date formats and then parse that new string
14091 2000-06-30 Dan Winship <danw@helixcode.com>
14093 * camel-folder.c (camel_folder_move_message_to): New function, to
14094 move a message from one folder to another. The default
14095 implementation just uses append_message and delete_message, but
14096 providers can implement more efficient versions for use when both
14097 folders are on the same store.
14099 2000-06-29 Jeffrey Stedfast <fejj@helixcode.com>
14101 * providers/imap/camel-imap-folder.c (imap_expunge): Should now
14102 print a meaningful error message when it doesn't succeed
14104 2000-06-28 Jeffrey Stedfast <fejj@helixcode.com>
14106 * providers/imap/camel-imap-store.c (imap_connect): Changed to
14107 keep prompting user for a valid password until it either
14108 authenticates or until Canceled by the user.
14109 (camel_imap_command_extended): Improved speed (replaced the
14110 g_strjoinv call with a faster implementation)
14112 * providers/pop3/camel-pop3-store.c
14113 (camel_pop3_command_get_additional_data): Fixed.
14114 (pop3_connect): Changed to keep prompting the user for a
14115 password until it either works or until Canceled by the user.
14117 * providers/mbox/camel-mbox-summary.c: General cleanup
14118 (camel_mbox_summary_sync): Fixed a memory leak and added
14119 CamelException handling.
14121 * providers/mbox/camel-mbox-store.c (delete_folder): Fixed a
14124 * providers/mbox/camel-mbox-folder.c (mbox_append_message):
14125 Default 'off_t seek' to -1 so as to make sure it's initialized
14126 before it's used in the case of a bad stat() call.
14127 (mbox_sync): Updated
14128 (mbox_expunge): Updated
14130 2000-06-27 Jeffrey Stedfast <fejj@helixcode.com>
14132 * providers/imap/camel-imap-store.c (imap_connect): Move the
14133 CAPABILITY command here so we don't have to keep checking
14134 each time we open a folder.
14135 (camel_imap_command_extended): If we are doing an EXAMINE,
14136 don't bother doing a SELECT first.
14138 * providers/imap/camel-imap-folder.c (imap_init): Update so
14139 folder->has_search_capability depends on the parent IMAP store
14140 (since this is really dependant on the IMAP implementation and
14143 2000-06-27 Christopher James Lahey <clahey@helixcode.com>
14145 * providers/smtp/camel-smtp-transport.c: Don't close the filter
14146 stream when done with it (this causes the source stream to close);
14147 Instead, just flush it when done.
14149 2000-06-27 Michael Zucchi <zucchi@zedzone.mmc.com.au>
14151 * camel-folder-search.c (search_header_contains): Make header
14152 search 'to' match 'to', and not 'from', small typo, fixes #317.
14154 2000-06-26 Christopher James Lahey <clahey@helixcode.com>
14156 * providers/mbox/camel-mbox-summary.c: Added debugging
14159 2000-06-23 Jeffrey Stedfast <fejj@helixcode.com>
14161 * providers/imap/camel-imap-store.c:
14162 * providers/imap/camel-imap-folder.c: Improved folder parsing.
14163 Not specifying a namespace should no longer list the entire
14166 2000-06-22 Chris Toshok <toshok@helixcode.com>
14168 * providers/nntp/.cvsignore: ignore test-newsrc
14170 * providers/nntp/camel-nntp-store.c,
14171 providers/nntp/camel-nntp-store.h,
14172 providers/nntp/camel-nntp-folder.c,
14173 providers/nntp/camel-nntp-folder.h,
14174 providers/nntp/camel-nntp-utils.c: Bring the nntp provider up to a
14175 state where it builds and is usable with the current camel. there
14176 are still warts (semi-broken .newsrc file handling, and a lack of
14177 a subscribe ui -- in fact no way to add a new server, really), but
14178 it'll display news messages.
14180 * providers/nntp/Makefile.am (libcamelnntp_la_SOURCES): add
14181 camel-nntp-newsrc.c
14182 (libcamelnntpinclude_HEADERS): add camel-nntp-newsrc.h
14183 also, add test-newsrc stuff.
14185 * providers/nntp/test-newsrc.c: new file that tests the newsrc
14186 stuff by parsing and regurgitating a .newsrc file for a particular
14189 * providers/nntp/camel-nntp-newsrc.c,
14190 providers/nntp/camel-nntp-newsrc.h: new files, initial support for .newsrc files.
14192 2000-06-22 Jeffrey Stedfast <fejj@helixcode.com>
14194 * providers/imap/camel-imap-folder.c (imap_get_message_count):
14195 Oops. Now appends the namespace to the folder before querying
14196 for the number of messages.
14198 * providers/imap/camel-imap-store.c (imap_folder_exists): New
14199 convenience function for use by imap_create().
14200 (get_folder): If folder is specified as "/", we really want
14203 * providers/sendmail/camel-sendmail-provider.c:
14204 * providers/vee/camel-vee-provider.c:
14205 * providers/smtp/camel-smtp-provider.c:
14206 * providers/mbox/camel-mbox-provider.c:
14207 * providers/pop3/camel-pop3-provider.c:
14208 * providers/imap/camel-imap-provider.c: Updated
14210 * camel-session.c: Moved service_cache hash table into the
14212 (service_cache_remove): Updated.
14213 (camel_session_get_service): Updated.
14215 * camel-url.c (camel_url_hash): Took out the hashing of
14216 url->passwd. We don't want this anymore.
14218 * providers/imap/camel-imap-folder.c (imap_init): Took out
14219 references to 'namespace'
14220 (camel_imap_folder_init): Same
14222 * providers/imap/camel-imap-folder.h: No more namespace. We are
14223 instead going to use url->path as the namespace.
14225 2000-06-21 Jeffrey Stedfast <fejj@helixcode.com>
14227 * providers/imap/camel-imap-store.c (imap_create): Modified to
14228 use the "namespace" (url->path) if it exists.
14230 * providers/imap/camel-imap-folder.c (imap_delete_message_by_uid):
14231 Now just sets the deleted flag on the summary rather than speaking
14232 directly to the IMAP server. This is both faster and cleaner.
14234 2000-06-21 Dan Winship <danw@helixcode.com>
14236 * providers/pop3/camel-pop3-store.c (query_auth_types): Fix dumb
14239 2000-06-21 Jeffrey Stedfast <fejj@helixcode.com>
14241 * providers/imap/camel-imap-folder.c (imap_get_message_by_uid):
14242 We are getting mail in IMAP now!! whoo-hoo!. Stripped out the
14243 filtering so messages may have some dot-stuffing, but the
14244 filtering can always be added back in later when we know it
14245 works and isn't the problem.
14247 2000-06-21 Peter Williams <peterw@curious-george.helixcode.com>
14249 * providers/mbox/camel-mbox-folder.c (mbox_init): Use the basename
14250 of the mailbox so we don't get pathnames like ~/evolution/inbox///movemail.ibex
14252 2000-06-21 Dan Winship <danw@helixcode.com>
14254 * camel-folder-summary.c (message_info_new): Set date_received
14255 based on the first (most recent) "Received" header.
14257 2000-06-20 Dan Winship <danw@helixcode.com>
14259 * camel-mime-part.c (write_to_stream): flush the filter stream
14260 before unreffing it, so it will camel_mime_filter_complete.
14262 * camel-stream-filter.c (camel_stream_filter_class_init): Fix a
14263 braino so camel_stream_flush works here.
14265 * camel-stream-mem.c (stream_seek): Fix a bug that resulted in
14266 large attachments being silently dropped.
14268 * providers/pop3/camel-pop3-store.c
14269 (camel_pop3_command_get_additional_data): Don't use g_strjoinv
14270 here, since it is O(n^2) on the length of the output string, and
14273 * camel-mime-part-utils.c
14274 (simple_data_wrapper_construct_from_parser): add a CRLF decoder
14275 after the QP/B64 decoder if it's text.
14277 2000-06-20 Jeffrey Stedfast <fejj@helixcode.com>
14279 * providers/imap/camel-imap-folder.c (imap_get_summary): Only
14280 fetch the summary if the folder summary doesn't already exist.
14281 When the summary *does* exist, start fetching from 1, not 0.
14282 (imap_free_summary): Don't do anything here.
14283 (imap_finalize): Free the summary here instead of in
14284 imap_free_summary().
14285 (imap_set_message_flags): Implemented
14286 (imap_sync): Added code to set flags on messages that have had
14287 their flags changed (however I #if'd it out until we are more
14288 confidant in the IMAP code :)
14289 (imap_summary_get_by_uid): Now parese flags correctly.
14290 (imap_get_summary): Now parese flags correctly. Also correctly
14291 parses the UID correctly.
14293 * camel-url.c (check_equal): No need to check s1 if s2 is NULL
14294 (camel_url_equal): Don't check the passwd component of the url.
14296 2000-06-20 Dan Winship <danw@helixcode.com>
14298 * camel-folder-summary.c (camel_folder_summary_add): mark the
14299 message info with CAMEL_MESSAGE_FOLDER_FLAGGED if we change the
14300 uid, so the folder will know that it's dirty.
14302 2000-06-20 Jeffrey Stedfast <fejj@helixcode.com>
14304 * providers/imap/camel-imap-store.c (camel_imap_command_extended):
14305 Now returns the last line of data that the server sends back as
14306 well. This is needed for commands like SELECT (like Peter pointed
14308 (camel_imap_command): No longer checks for SELECT (no need)
14310 * providers/imap/camel-imap-folder.c: Added namespace stuff
14311 which we will need later on...
14312 (imap_parse_subfolder_line): Convenience function for use in
14313 get_subfolder_names()
14314 (imap_get_subfolder_names): Updated. Also changed it to use LIST
14315 instead of LSUB (temporary change).
14317 2000-06-19 Jeffrey Stedfast <fejj@helixcode.com>
14319 * providers/imap/camel-imap-folder.c (camel_imap_folder_init): Set
14320 summary equal to NULL.
14321 (imap_get_summary): Store the summary in the ImapFolder
14322 (imap_summary_get_by_uid): If we have a summary cache in the
14323 ImapFolder, first check to see if that message info is in the
14324 cached summary first, if not fetch it directly from the IMAP
14325 server and append it to the summary cache.
14326 (imap_get_message_flags): Don't free the message info that we get
14327 back from summary_get_by_uid as we don't want to be corrupting our
14330 2000-06-19 Peter Williams <peterw@curious-george.helixcode.com>
14332 * providers/imap/camel-imap-store.c (camel_imap_command{,_extended}): When
14333 SELECT'ing a folder for an IMAP command, use _extended to grab the entire
14334 response (before we just used camel_imap_command and missed the OK codes)
14336 2000-06-18 Jeffrey Stedfast <fejj@helixcode.com>
14338 * providers/imap/camel-imap-folder.c (imap_summary_get_by_uid):
14339 Now gets the message flags as it should.
14340 (imap_get_summary): Same as imap_summary_get_by_uid
14341 (imap_get_permanent_flags): Return the permanent flags stored
14343 (imap_get_message_flags): Return message flags associated with
14344 given uid. Note: we may want to somehow cache summary info so
14345 that we don't have to keep querying the IMAP provider in
14346 imap_summary_get_by_uid().
14348 2000-06-17 Jeffrey Stedfast <fejj@helixcode.com>
14350 * providers/imap/camel-imap-folder.c (imap_free_summary): We were
14351 leaking memory - but not anymore!
14352 (imap_get_summary): We now get the UIDs and the beginnings of the
14353 code to get the message flags as well.
14355 2000-06-17 Dan Winship <danw@helixcode.com>
14357 * camel-mime-parser.c (folder_scan_header): Don't copy newlines
14358 into the parsed header text, and turn any number of tabs and
14359 spaces after a newline into a single space.
14361 2000-06-17 Jeffrey Stedfast <fejj@helixcode.com>
14363 * providers/imap/camel-imap-folder.c (imap_init): Should now
14364 correctly do CAPABILITY.
14366 2000-06-17 Dan Winship <danw@helixcode.com>
14368 * providers/mbox/camel-mbox-summary.c: Add some debugging printfs
14369 when rebulding summary to help figure out why people's summaries
14370 are always being rebuilt.
14372 2000-06-17 Jeffrey Stedfast <fejj@helixcode.com>
14374 * providers/imap/camel-imap-folder.c (imap_search_by_expression):
14375 Began to implement, need to get information on how to
14376 deconstruct @expression into an IMAP search expression and
14378 (imap_init): Now queries the IMAP provider for CAPABILITY to
14379 determine if SEARCH is implemented or not.
14381 * providers/imap/imap.c: Removed - no longer a need to have
14382 this as an example for anyone interesting to help mecode IMAP
14385 2000-06-16 Jeffrey Stedfast <fejj@helixcode.com>
14387 * providers/imap/camel-imap-folder.c (imap_sync): Added code
14388 to expunge if called for (still need to finish coding this).
14389 (imap_get_uids): Implemented.
14390 (imap_get_summary): Found a way to get the date
14391 (imap_summary_get_by_uid): Same.
14392 (imap_free_summary): Implemented.
14394 * string-utils.c (strstrcase): Fixed a compile warning
14396 * providers/imap/camel-imap-summary.c: Removed - we don't
14397 need a CamelImapSummary structure.
14399 2000-06-16 Dan Winship <danw@helixcode.com>
14401 Move flag handling from CamelMimeMessage to CamelFolder. This
14402 simplifies several flag-handling pieces of code in the mailer, and
14403 lets you change a message's flags without having to fetch the
14404 message body. It also means that fully-constructed
14405 CamelMimeMessages are now essentially constant, which will help
14406 simplify locking issues later since it means two threads
14407 interested in the same message can just work with separate copies
14410 * camel-mime-message.h (struct _CamelMimeMessage): Removed flags
14411 and user_flags (moved to summary). Removed expunged and
14412 message_number which were unused. Removed message_uid and folder
14413 which are no longer needed in the new scheme.
14414 (struct CamelMimeMessageClass): Removed message_changed signal and
14415 get/set_message_number methods.
14417 * camel-mime-message.c: Updates for CamelMimeMessage changes.
14418 (camel_mime_message_get/set_flags,
14419 camel_mime_message_get/set_user_flag): Replaced with methods in
14421 (camel_flag_get, camel_flag_set, camel_flag_list_size,
14422 camel_flag_list_free): Moved verbatim to camel-folder-summary.c
14424 * camel-folder.c (camel_folder_get/set_message_flags,
14425 camel_folder_get/set_message_user_flag): New methods (and
14426 corresponding useless default implementations)
14427 (camel_folder_class_init): add a message_changed signal
14429 * camel-folder-summary.c (camel_flag_get, camel_flag_set,
14430 camel_flag_list_size, camel_flag_list_free): Moved here from
14431 camel-mime-message.c
14433 * providers/mbox/camel-mbox-folder.c (message_changed): Removed.
14434 (mbox_get_message_flags, mbox_set_message_flags,
14435 mbox_get_message_user_flag, mbox_set_message_user_flag): Tweak
14436 summary bits as appropriate. (Functionality moved here from
14438 (mbox_get_message_by_uid): Update for CamelMimeMessage changes
14439 (less stuff to initialize).
14441 * providers/imap/camel-imap-folder.c (message_changed): Remove
14442 this. It was just copied from the mbox provider and doesn't deal
14443 with the real IMAP flag stuff anyway. (So there's currently no
14444 flag support in the IMAP provider.)
14445 (imap_get_message_by_uid): Update for CamelMimeMessage changes.
14447 * providers/vee/camel-vee-folder.c: (message_changed): Remove old
14448 one. Add a new one to listen for message_changed on each folder
14449 and re-emit message_changed signals that correspond to messages in
14451 (vee_get/set_message_flags, vee_get/set_message_user_flag): Proxy
14452 flag setting to the underlying real messages.
14453 (vee_append_message): Removed for now; there's no way to translate
14454 this into the new CamelMimeMessage/CamelFolder scheme, but (a)
14455 there's also no code which would ever call it and (b) we're
14456 probably going want a better interface than append_message for
14457 message drag and drop to work anyway. To be revisited.
14459 2000-06-16 Dan Winship <danw@helixcode.com>
14461 * camel-mime-utils.c (rfc2047_decode_word):
14462 * camel-mime-part-utils.c (simple_data_wrapper_construct_from_parser):
14463 * camel-folder-summary.c (summary_build_content_info):
14464 KLUDGE! Since neither ETable nor GtkHTML supports UTF-8 yet,
14465 output ISO-8859-1 instead, so Ettore can read his Italian mail. :)
14466 This will be reverted later.
14468 2000-06-15 Jeffrey Stedfast <fejj@helixcode.com>
14470 * providers/imap/camel-imap-folder.c (imap_get_summary): Started to
14471 implement - may want to use ENVELOPE instead of BODY.PEEK[HEADER]
14472 (imap_summary_get_by_uid): Started to code, I've got to find a way to
14473 get the date in time_t format and also get the flags
14475 * string-utils.c (strstrcase): Added this convenience function - I
14476 know about strcasestr() but it's not portable.
14478 2000-06-15 Dan Winship <danw@helixcode.com>
14480 * camel-service.c: Remove camel_service_connect_with_url. (URLs
14481 must be specified when the service is requested from the session,
14482 so that there can only ever be one service for any URL.)
14484 * camel-folder.c: (camel_folder_open, camel_folder_is_open,
14485 camel_folder_get_mode): Kill. Folders are now always open, and
14486 handle "closing" sorts of operations at sync or finalize time.
14487 (camel_folder_sync): renamed from camel_folder_close. Syncs state
14488 to the store but doesn't necessarily close/disconnect.
14490 * providers/*/camel-*-folder.c: Merge "open" methods into "init"
14491 methods. Rename close to sync and update appropriately.
14493 * providers/imap/camel-imap-store.c: Remove camel_imap_store_open
14494 and camel_imap_store_close, which should not have been copied from
14495 the POP provider (where the exist to work around limitations of
14498 * providers/mbox/camel-mbox-summary.c: fix a bug. (don't expunge
14499 deleted messages if called with expunge == FALSE)
14501 * providers/pop3/camel-pop3-store.c (connect_to_server): Check
14502 server for various interesting extensions.
14504 * providers/pop3/camel-pop3-folder.c (get_uids): If the server
14505 supports UIDL, use real UIDs rather than fake ones.
14506 (etc): Map uids back to numbers appropriately
14508 * providers/mbox/camel-mbox-folder.c (mbox_append_message): Fix to
14509 previous change: make sure the "seek" variable ends up with the
14512 * providers/mbox/camel-mbox-summary.c (summary_rebuild): Update
14513 summary mtime as well as size.
14515 2000-06-14 Dan Winship <danw@helixcode.com>
14517 * providers/mbox/camel-mbox-folder.c (mbox_append_message): if the
14518 mbox doesn't end with a '\n', write one before appending the new
14521 2000-06-14 Jeffrey Stedfast <fejj@helixcode.com>
14523 * camel-mime-filter-crlf.c (filter): Updated the encoder to allocate
14524 more memory (since we are also now adding dots). Also updated the
14525 decoder as we have found that it sometimes passes the end of the
14528 * providers/pop3/camel-pop3-folder.c (get_message_by_uid): Took out the
14529 filter code (we already filter in
14530 camel_pop3_command_get_additional_data)
14532 * camel-folder.c (init): Updated: a separator is now a char* rather
14533 than a single char because IMAP can have a string for a directory
14534 separator. Also, since IMAP does not begin with a directory separator,
14535 there is a new argument (path_begins_with_sep) which decides if a
14536 directory should begin with a directory separator.
14538 * providers/imap/camel-imap-store.c (imap_create): Since, on connect,
14539 Camel tries to create INBOX (which already exists on every IMAP
14540 provider) we can return TRUE when the folder name is "INBOX".
14542 * providers/vee/camel-vee-folder.c (vee_init): Updated.
14544 * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Updated.
14546 * providers/mbox/camel-mbox-store.c (get_folder): Updated.
14548 * providers/mbox/camel-mbox-folder.c (mbox_init): Updated.
14550 * providers/pop3/camel-pop3-folder.c (camel_pop3_folder_new): Updated.
14552 2000-06-14 Dan Winship <danw@helixcode.com>
14554 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
14555 Renamed from camel_mbox_summary_expunge. Takes a gboolean saying
14556 whether to expunge or just sync the mbox file. Change some
14557 g_errors to g_warning so we don't abort. Make the quick
14558 X-Evolution updating code lseek around correctly. Update the
14559 mbox mtime in the summary file even in the quick case.
14561 * providers/mbox/camel-mbox-summary.h: make
14562 CAMEL_MESSAGE_FOLDER_NOXEV not conflict with
14563 CAMEL_MESSAGE_FOLDER_FLAGGED defined in camel-mime-message.h
14565 * providers/mbox/camel-mbox-folder.c (mbox_close): call
14566 camel_mbox_summary_sync to save flag state if not expunging.
14567 (mbox_expunge): Update for camel_mbox_summary_expunge rename.
14569 2000-06-13 Jeffrey Stedfast <fejj@helixcode.com>
14571 * providers/imap/camel-imap-store.c (camel_imap_store_open):
14572 (camel_imap_store_close): Added.
14573 (camel_imap_command_extended): Fixed a segfault and updated
14574 to use camel_imap_status()
14575 (camel_imap_command): Updated to use camel_imap_status()
14576 (camel_imap_status): New convenience function for parsing
14577 the return status of an IMAP command
14579 2000-06-12 Jeffrey Stedfast <fejj@helixcode.com>
14581 * providers/imap/camel-imap-folder.c (imap_get_message_by_uid):
14582 Works like the POP fetch code, should work temporarily until
14583 we get around to coding it the way it "Should Be".
14585 * providers/pop3/camel-pop3-folder.c (get_message_by_uid): Now uses
14586 the camel-mime-filter-crlf decoder when retrieving messages.
14588 * camel-mime-filter-smtp.c: Deprecated.
14590 * providers/smtp/camel-smtp-transport.c (smtp_data): Updated to use
14591 camel-mime-filter-crlf with my 'dot' extension in place of
14592 camel-mime-filter-smtp
14594 * camel-mime-part.c (write_to_stream): Updated to reflect changes
14595 made to camel-mime-filter-crlf.c
14597 * camel-mime-filter-crlf.c (filter): Modified to be able to
14598 encode/decode dots ("\n.\n"<->"\n..\n"). Also fixed the decoder
14599 so that it should no longer get caught in an infinite loop.
14601 2000-06-12 Dan Winship <danw@helixcode.com>
14603 * providers/*/Makefile.am: don't pass a second (incorrect) -rpath
14604 in addition to the (correct) one automatically provided by
14607 * camel-mime-filter-crlf.c: New filter to do CRLF<->LF conversion.
14608 (Currently only tested in the LF->CRLF direction.)
14610 * camel-mime-part.c (write_to_stream): if content-type is text,
14611 and it's QP or B64 encoded, pass through the CRLF filter before
14612 the other filter to satisfy the "canonical encoding" rules in the
14615 2000-06-09 Dan Winship <danw@helixcode.com>
14617 * camel-session.c (camel_session_query_authenticator): Add another
14618 argument, "mode", which can be CAMEL_AUTHENTICATOR_ASK or
14619 CAMEL_AUTHENTICATOR_TELL, so callers can get the app to un-cache
14622 * providers/pop3/camel-pop3-store.c (pop3_connect): uncache the
14623 password if it doesn't work.
14625 2000-06-09 Jeffrey Stedfast <fejj@helixcode.com>
14627 * providers/imap/camel-imap-stream.c (stream_read): Updated to reflect
14628 changes made in camel-imap-store.c
14630 * providers/imap/camel-imap-store.c (imap_create): No longer checks to
14631 make sure a folder doesn't already exists (as this is no longer needed)
14632 (camel_imap_command): Now takes a CamelFolder argument so it can detect
14633 whether or not it needs to SELECT a folder or not
14634 (camel_imap_command_extended): Same.
14636 * providers/smtp/camel-smtp-transport.c (smtp_connect): Will now always
14637 send EHLO first, if that fails it will fall back on HELO.
14638 (esmtp_get_authtypes): Should now correctly parse authtypes.
14640 2000-06-07 Jeffrey Stedfast <fejj@helixcode.com>
14642 * providers/imap/camel-imap-summary.c: Now builds (not that it's worth
14645 * providers/imap/camel-imap-folder.c (imap_get_uids): Now uses the
14646 correct cast to a CamelImapMessageInfo structure (should get rid of
14649 * providers/imap/Makefile.am: Added rules to build
14652 * providers/imap/camel-imap-store.c (get_folder): Update.
14653 Moved imap_create here.
14655 * providers/imap/camel-imap-folder.c (delete_messages): Remove.
14656 (imap_create): Removed.
14657 (imap_delete): Removed.
14658 (imap_exists): Removed.
14660 * providers/imap/camel-imap-stream.h: Added typedef's for the stream
14662 * providers/imap/camel-imap-stream.c: Modified to build cleanly
14664 2000-06-07 Not Zed <NotZed@HelixCode.com>
14666 * camel-mime-utils.c (header_msgid_decode_internal): Properly
14667 dereference warning/debug messages.
14668 (header_references_decode): Check we actually have msgid stuff
14669 before trying to decode it ...
14671 2000-06-06 Jeffrey Stedfast <fejj@helixcode.com>
14673 * camel-imap-stream.[c,h]: Removed
14675 * providers/imap/camel-imap-stream.[c,h]: Relocated to this
14678 * providers/imap/camel-imap-summary.c: Added
14680 2000-06-06 Dan Winship <danw@helixcode.com>
14682 * camel-folder.c: Remove exists, create, delete. A CamelFolder
14683 now always references an existing folder. Remove delete_messages
14684 too since it wasn't being used. Add a "create" flag to
14685 get_subfolder saying whether or not to create the subfolder if it
14688 * camel-store.c (camel_store_get_folder): Add a "create" flag to
14689 say whether or not to create the folder if it doesn't yet exist.
14690 (camel_store_delete_folder): New method, moved from CamelFolder.
14691 (cache_folder, uncache_folder): Fix up a bit.
14692 (get_folder_name): Explain what this is for.
14694 * providers/mbox/camel-mbox-folder.c:
14695 * providers/mbox/camel-mbox-store.c: Update. Remove support for
14696 hierarchical folders to simplify this for now, since we're not
14697 using it, and it's not completely clear how they should work in an
14698 ELocalStorage world. Needs to be revisited.
14700 * providers/pop3/camel-pop3-folder.c (delete_messages): Remove.
14701 * providers/pop3/camel-pop3-store.c (get_folder): Update.
14703 * providers/vee/camel-vee-folder.c (exists): Remove.
14704 * providers/vee/camel-vee-store.c (vee_get_folder): Update.
14706 2000-06-06 Jeffrey Stedfast <fejj@helixcode.com>
14708 * providers/imap/camel-imap-*.[c,h]: Started on getting
14709 imap to build cleanly (tho some work has not been completed
14710 so it still won't build until camel-imap-summary is finished
14711 along with a few methods in camel-imap-folder)
14713 * camel-stream.[c,h]: Changed the read and write method prototypes
14714 to return an ssize_t type rather than an int and also changed
14715 the 'number of bytes' to read or write to a size_t type
14717 * camel-stream-fs.c: same as above
14719 * camel-stream-mem.c: again, same as above
14721 * camel-stream-buffer.c: same
14723 * camel-imap-stream.[c,h]: Added this new stream, cache's previously
14724 read data so each successive call will instead read from the cache
14726 2000-06-05 Dan Winship <danw@helixcode.com>
14728 * camel-mime-part.c (camel_mime_part_set_disposition): fix
14729 typo/braino (set "Content-Disposition", not "Content-Description")
14730 (camel_mime_part_set_filename): const poison
14732 2000-06-02 Not Zed <NotZed@HelixCode.com>
14734 * camel-mime-utils.c (base64_encode_step): Ick, damn signs! Fix a
14735 bug with sign extended bytes.
14737 * camel-mime-filter-smtp.c (filter): Changed layout/logic slightly
14738 (to match From filter)
14740 2000-06-02 Jeffrey Stedfast <fejj@helixcode.com>
14742 * camel-mime-filter-smtp.c (filter): Fixed the filter so that it
14743 wouldn't insert garbage under certain conditions.
14745 2000-06-02 Christopher James Lahey <clahey@helixcode.com>
14747 * camel-session.c: Don't ref the services in the cache.
14749 2000-06-02 Jeffrey Stedfast <fejj@helixcode.com>
14751 * providers/smtp/camel-smtp-transport.c: Rearanged where debug
14752 fprintf statements we placed so that any data the server sends
14753 back is printed out before an exception is set and the function
14756 2000-06-02 Not Zed <NotZed@HelixCode.com>
14758 * camel-mime-utils.c (header_decode_date): If we get a funny
14759 result, just throw it out. Basically a fix for the one true
14760 broken TradeClient.
14762 2000-06-01 Not Zed <NotZed@HelixCode.com>
14764 * camel-folder-summary.c (message_info_free): Free
14765 references/messsage id.
14766 (message_info_save): Save them.
14767 (message_info_load): Load them.
14768 (message_info_new): And get them from the new message.
14769 (CAMEL_FOLDER_SUMMARY_VERSION): Bumped for new changes.
14771 * camel-folder-summary.h: Added references and messageid to
14774 2000-06-02 Christopher James Lahey <clahey@helixcode.com>
14776 * camel-session.c: Ref and unref objects in the service cache
14779 * camel-store.c: Ref the folder when returning it using
14780 lookup_folder. Used the folder's full name for the key for the
14781 folder cache since that's used to uncache it.
14783 2000-06-02 Dan Winship <danw@helixcode.com>
14787 * providers/pop3/camel-pop3-store.c (pop3_connect): free msg on
14788 success as well as failure.
14789 (camel_pop3_command_get_additional_data): free buf after reading
14790 the last line (".").
14792 * providers/pop3/camel-pop3-folder.c (get_message_by_uid): free
14793 body data after creating the memstream from it (which will copy
14796 * providers/mbox/camel-mbox-folder.c (mbox_finalize): free summary
14799 * camel-data-wrapper.c (finalize): unref the stream, if it exists.
14801 2000-06-01 Not Zed <NotZed@HelixCode.com>
14803 * camel-mime-part.c (construct_from_parser): For a message part,
14804 set the default content-type to message/rfc822. Maybe needs to be
14805 done for multiparts too?
14807 2000-05-31 Not Zed <NotZed@HelixCode.com>
14809 * camel-mime-message.c (construct_from_parser): Typo in assersion.
14811 * camel-mime-parser.c (folder_scan_step): Use a default type of
14812 message/rfc822 for multipart/digest. Bug Z192.
14813 (folder_scan_drop_step): Remove warning.
14815 2000-05-30 Not Zed <NotZed@HelixCode.com>
14817 * providers/mbox/camel-mbox-folder.c (mbox_append_message): Init
14818 filter_from to NULL, for exception case.
14819 (mbox_get_message_by_uid): Cast off_t to long int for diagnostics.
14821 * camel-url.c (camel_url_hash): Hash funciton for using camel
14822 url's as hash keys.
14823 (camel_url_equal): equal function for same.
14825 * camel-session.c (camel_session_finalise): Free cached services.
14826 (camel_session_init): Init service cache.
14827 (service_cache_remove): destroy callback to remove a service from
14830 * camel-store.c (get_folder_internal): Remove the extra ref of the
14831 folder. That seems the right behaviour ...?
14832 (camel_store_get_type): Doh, actually call store init, so the
14834 (cache_folder): strdup the folder name! no wonder it never found
14837 2000-05-30 Jeffrey Stedfast <fejj@helixcode.com>
14839 * providers/imap/camel-imap-folder.c: Implemented a few more
14840 methods like imap_append and 1 or 2 others
14842 2000-05-29 Not Zed <NotZed@HelixCode.com>
14844 * camel-store.c (camel_store_init): Move it to here. If this
14845 level is going to maintain it, it should set it up. Lets see what
14846 caching folders breaks :(
14848 * providers/pop3/camel-pop3-store.c (camel_pop3_store_init): Dont
14849 init folder cache here.
14851 * providers/mbox/camel-mbox-summary.c
14852 (camel_mbox_summary_expunge): Make sure we copy messages which are
14853 still intact to the new folder.
14854 (camel_mbox_summary_expunge): Update the frompos as well when
14855 moving the content.
14856 (camel_mbox_summary_expunge): Remove some debug, and dont offset
14859 * providers/vee/camel-vee-folder.c (vee_folder_build): Check the
14860 searched folder is open before trying to search it.
14861 (message_changed): Track changes to the source message in the
14863 (folder_changed): Track folder changes, re-query the folder that
14864 changed, and cascade the changed event as well.
14865 (camel_vee_folder_finalise): Free subfolder and subfolder summary.
14867 2000-05-29 Dan Winship <danw@helixcode.com>
14869 * camel-service.c (camel_service_new): Fix up some glib
14870 precondition stuff. Try to set the URL in camel_service_new before
14871 checking whether or not it's "empty" so that you can successfully
14872 set "sendmail:" as a URL.
14874 2000-05-28 Dan Winship <danw@helixcode.com>
14876 * camel-provider.h: Add a domain field to CamelProvider, to say
14877 what kind of data it provides.
14879 * providers/imap/camel-imap-provider.c:
14880 * providers/mbox/camel-mbox-provider.c:
14881 * providers/pop3/camel-pop3-provider.c:
14882 * providers/sendmail/camel-sendmail-provider.c:
14883 * providers/smtp/camel-smtp-provider.c: Set domain to "mail".
14885 * providers/nntp/camel-nntp-provider.c: Set domain to "news".
14887 * providers/vee/camel-vee-provider.c: Set domain to "vfolder". (So
14888 it doesn't end up being listed as a potential mail source in the
14889 mail config wizard.)
14891 * providers/pop3/camel-pop3-store.c: Split apart password and APOP
14892 auth, since some servers seem to do both, but don't really.
14893 (connect_to_server): Renamed from try_connect. Now actually does
14894 the connection up to the point of checking the greeting for APOP
14896 (query_auth_types): Return APOP, if appropriate. Call
14897 pop3_disconnect after connect_to_server since we don't really want
14899 (pop3_connect): Use connect_to_server rather than duplicating
14900 code. Fix a one-byte buffer overrun in the APOP code.
14901 (pop3_disconnect): Make this able to clean up after a partial
14903 (connect_to_server): Remove port number from error message since
14904 it's not terribly useful and we were getting it from the wrong
14907 * camel-mime-utils.c (header_address_list_format_append): Use
14908 `foo@bar' rather than `"" <foo@bar>' for email addresses with no
14911 2000-05-27 Jeffrey Stedfast <fejj@helixcode.com>
14913 * providers/imap/camel-imap-store.c: Removed
14914 camel_imap_command_get_additional_data() as it was
14915 completely useless, replaced with
14916 camel_imap_command_extended() which may eventually replace
14917 camel_imap_command() as well.
14919 * providers/imap/camel-imap-store.h: Modified to reflect
14920 changes made to camel-imap-store.c
14922 * providers/imap/camel-imap-folder.c: Wrote the first of many
14923 methods: camel_imap_init(), imap_open(), imap_expunge(),
14924 imap_get_message_count(), and imap_get_subfolder_names()
14926 2000-05-26 Dan Winship <danw@helixcode.com>
14928 * camel-multipart.c (camel_multipart_init): Don't set a default
14929 boundary. Require the caller to do that.
14930 (set_boundary): if boundary is NULL, generate a "random" boundary.
14932 * camel-mime-part-utils.c
14933 (camel_mime_part_construct_content_from_parser): Add a call to
14934 camel_multipart_set_boundary after creating a new multipart.
14936 2000-05-25 Jeffrey Stedfast <fejj@helixcode.com>
14938 * providers/imap/camel-imap-store.c (try_connect): Removed
14939 Exception code - Pop doesn't seem to set exceptions
14941 * providers/imap/camel-imap-folder.c: Initial code, mostly
14942 just a template for future code
14944 * providers/imap/imap.[c,h]: Source code from my personal
14945 mailer - for reference only!
14947 2000-05-25 NotZed <NotZed@HelixCode.com>
14949 * camel-mime-part-utils.c
14950 (camel_mime_part_construct_content_from_parser): Replace simple
14951 data wrapper here too, oops.
14953 * Makefile.am (libcamel_la_SOURCES): Removed
14954 camel-simple-data-wrapper again. Less code to maintain == better
14957 * camel-data-wrapper.c (construct_from_stream): Fixes for bug
14958 where text attachments dont work. Made data-wrapper concrete for
14961 2000-05-23 NotZed <NotZed@HelixCode.com>
14963 * providers/vee/camel-vee-folder.c (vee_folder_build_folder):
14964 Update the vfolder details for a single folder.
14966 2000-05-25 Jeffrey Stedfast <fejj@helixcode.com>
14968 * providers/smtp/camel-smtp-transport.c (_send_to): Took out code
14969 that had been there to reconnect to the server if it was not
14970 already connected - Mailer code was fixed so that this should not
14973 * providers/imap/camel-imap-store.[c,h]: Initial code.
14975 2000-05-24 Dan Winship <danw@helixcode.com>
14977 * camel.h: Re-add camel-simple-data-wrapper.h, which was removed
14980 2000-05-24 Jeffrey Stedfast <fejj@helixcode.com>
14982 * providers/smtp/camel-smtp-transport.[c,h]: Moved global
14983 variables into struct CamelSmtpTransport to make SMTP
14986 * providers/imap/camel-imap-*.h: Stolen from Mbox. Rough structure
14989 2000-05-23 Jeffrey Stedfast <fejj@helixcode.com>
14991 * providers/imap: Added some initial code to the camel tree
14994 * providers/imap/.cvsignore: Added to repository
14996 * providers/smtp/camel-smtp-transport.c: Added debug fprintf's
14997 so that testers can provide more information. Tested with simple
14998 messages and a reply to the hello@helixcode.com default message
14999 but should really be tested more.
15000 (smtp_data): Fixed to use data_wrapper_write_to_stream.
15002 * camel-mime-filter-smtp.c (filter): Modified to escape all lines
15003 beginning with a '.' and to place a \r before each \n if one did
15004 not previously exist. Removed code to escape "From " as it was
15005 found to not be needed for SMTP.
15007 2000-05-22 Jeffrey Stedfast <fejj@helixcode.com>
15009 * providers/smtp/camel-smtp-transport.c (smtp_data): Fixed the
15010 filtered stream. Fixes for stream changes, updated to use
15011 camel-mime-filter-smtp.
15013 * Makefile.am: Added camel-mime-filter-smtp.c
15015 * camel-mime-filter-smtp.[c,h]: Added to camel tree
15016 Smtp filter used to change \n into \r\n, escape lone dots,
15017 and escape "From "'s.
15019 2000-05-19 NotZed <NotZed@HelixCode.com>
15021 * camel-simple-data-wrapper.c (construct_from_stream): If we
15022 already have been constructed, unref our content.
15023 (write_to_stream): Check we've been constructued, and change for
15024 stream api changes.
15026 * camel-mime-parser.c: Removed exception stuff.
15028 * md5-utils.c (md5_get_digest_from_stream): repaired.
15030 * camel-mime-message.c: Remove exception from write_to_stream, and
15031 fix, and fix formatting.
15033 * providers/sendmail/camel-sendmail-transport.c (_send_internal):
15034 Fix for stream changes.
15036 * providers/pop3/camel-pop3-store.c (camel_pop3_command): Fixes
15037 for stream changes.
15039 * providers/mbox/camel-mbox-folder.c, and elsewhere, fix all
15040 stream api changes.
15041 (mbox_append_message): Use stream_close() now its back.
15042 (mbox_append_message): unref the from filter.
15044 * camel-stream-mem.c: And here.
15046 * camel-stream-fs.[ch]: Here too.
15048 * camel-stream-filter.c: Likewise. This is getting tedious.
15050 * camel-stream-buffer.c (stream_write): Fix a few little problems.
15051 (stream_close): Reimplement.
15052 (camel_stream_buffer_read_line): Slightly more efficient version,
15053 that also only allocates the right amount of memory for strings.
15055 * camel-seekable-substream.c: Likewise.
15057 * camel-seekable-stream.[ch]: Remove exceptions, fix formatting,
15058 changes for stream (re)fixes. set_bounds returns an error.
15060 * camel-stream.[ch]: Remove exceptions. Make flush and reset return
15061 an error code, repair all the screwed up formatting, and put back
15064 * camel-mime-part-utils.c
15065 (camel_mime_part_construct_content_from_parser): And here.
15067 * camel-mime-part.c (camel_mime_part_set_content): And this too.
15068 (write_to_stream): Fixed for stream changes.
15072 * providers/vee/camel-vee-folder.c (vee_search_by_expression):
15073 Implement. Performs an intersection of the two searches.
15074 (camel_vee_folder_finalise): Unref search folders.
15075 (vee_append_message): Implement append.
15077 2000-05-18 Dan Winship <danw@helixcode.com>
15079 * camel-folder.c: remove message_number_capability and require uid
15081 (camel_folder_list_subfolders, camel_folder_get_uid_list,
15082 camel_folder_get_subfolder_info, camel_folder_get_message_info):
15084 (camel_folder_get_subfolder_names,
15085 camel_folder_free_subfolder_names): new subfolder interfaces.
15086 (camel_folder_get_uids, camel_folder_free_uids): new uid
15088 (camel_folder_get_summary, camel_folder_free_summary): new summary
15091 * providers/mbox/camel-mbox-folder.c,
15092 * providers/nntp/camel-nntp-folder.c:
15093 * providers/vee/camel-vee-folder.c: Update for changes
15095 * providers/pop3/camel-pop3-folder.c: Implement get_uids, update
15098 2000-05-18 NotZed <NotZed@HelixCode.com>
15100 * providers/vee/camel-vee-folder.c: Guess!
15102 * camel-folder-search.c (search_user_flag): Implement user_flag
15105 * camel-folder-search.h: Added user_flag search capability
15108 * providers/mbox/camel-mbox-folder.c (mbox_init): Set USER flag in
15109 permanent flags for the folder.
15111 2000-05-17 Dan Winship <danw@helixcode.com>
15113 * camel-folder.c: Remove unused async open/close and
15114 copy_message_to functions.
15115 Rename functions without initial _. Fix glib preconditions and
15118 2000-05-17 Dan Winship <danw@helixcode.com>
15120 * camel-data-wrapper.c: remove get/set_output_stream operations.
15121 They're redundant with write_to_stream, and CamelMimePart and
15122 CamelMimeMessage only implement the latter, meaning that trying to
15123 get_output_stream on a CamelMimeMessage that was built from pieces
15124 rather than being parsed from a stream doesn't work. Anything that
15125 uses get_output_stream can be rewritten to use write_to_stream, so
15126 we'll standardize on that.
15127 (camel_data_wrapper_new): remove this: CamelDataWrapper is
15128 supposed to be an abstract class.
15129 (write_to_stream): remove default implementation. (Moved to
15130 CamelSimpleDataWrapper)
15132 * camel-simple-data-wrapper.c: resurrect, although it's not really
15133 the same thing it was before. A simple data wrapper, which is
15134 backed by a CamelStream.
15136 * camel-mime-part-utils.c
15137 (simple_data_wrapper_construct_from_parser): Use
15138 construct_from_stream rather than set_output_stream.
15139 (camel_mime_part_construct_content_from_parser): Change
15140 camel_data_wrapper_new to camel_simple_data_wrapper_new.
15142 * camel-mime-part.c (camel_mime_part_set_content): Change
15143 camel_data_wrapper_new to camel_simple_data_wrapper_new.
15146 2000-05-17 Darin Adler <darin@eazel.com>
15148 * camel-folder-summary.c: (message_info_load):
15149 Quick fix to get it to compile. I hope I don't get into trouble.
15151 2000-05-17 Dan Winship <danw@helixcode.com>
15153 * camel.h: Don't include the no-longer-distributed
15154 possibly-to-be-removed headers.
15156 * providers/smtp/camel-smtp-transport.c
15157 (smtp_get_email_addr_from_text): fix an off-by-one error in
15159 (smtp_data): use camel_data_wrapper_get_output_stream rather than
15160 data_wrapper->output_stream
15162 2000-05-17 NotZed <NotZed@HelixCode.com>
15164 * providers/mbox/camel-mbox-folder.c (message_changed): Snoop
15165 changes to user flags on the message into the summary as well.
15167 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_init):
15168 Changed version init to include the parent class version info
15169 (i.e. add it not overwrite it).
15171 * camel-folder-summary.c (message_info_new): Initialise user_flags
15173 (message_info_load): And load user flags.
15174 (message_info_save): And save user flags.
15175 (message_info_free): And free them.
15176 (CAMEL_FOLDER_SUMMARY_VERSION): Bumped file revision.
15178 * camel-folder-summary.h: Added user-flags to summary.
15180 * camel-mime-message.c (camel_mime_message_set_user_flag): Dont
15181 use a hashtable for user flags.
15182 (camel_mime_message_get_user_flag): And changed here too.
15183 (camel_flag_get): New interface to get a flag from a flag
15184 list. Flag lists are easier to work with than hash tables, and
15186 (camel_flag_set): And set.
15187 (camel_flag_list_free): And free.
15188 (free_key_only): Discard.
15189 (finalize): Remove the flag list.
15191 2000-05-17 Jeffrey Stedfast <fejj@stampede.org>
15193 * providers/smtp/camel-smtp-transport.c: (smtp_helo): Error
15194 checking on gethostbyaddr() eliminating a possible segfault.
15196 2000-05-16 NotZed <NotZed@HelixCode.com>
15198 * providers/mbox/camel-mbox-folder.c (mbox_delete_message_by_uid):
15201 2000-05-12 NotZed <NotZed@HelixCode.com>
15203 * camel-movemail.c (camel_movemail): Open the destination with
15204 O_APPEND, so we dont blow away a partially transferred mbox.
15205 (camel_movemail): Loop if we get errno=INTR, and not fail.
15207 2000-05-11 NotZed <NotZed@HelixCode.com>
15209 * providers/mbox/camel-mbox-summary.c (summary_rebuild): Update
15210 the summarised file size, if everything went ok.
15211 (camel_mbox_summary_expunge): Clear header flags after updating.
15213 2000-05-16 Chris Toshok <toshok@helixcode.com>
15215 * providers/nntp/camel-nntp-folder.c:
15216 * providers/nntp/camel-nntp-folder.h:
15217 * providers/nntp/camel-nntp-provider.c:
15218 * providers/nntp/camel-nntp-store.c:
15219 * providers/nntp/camel-nntp-utils.c:
15220 * providers/nntp/camel-nntp-utils.h:
15221 get things working with new camel summary stuff.
15223 * providers/nntp/camel-nntp-summary.c:
15224 * providers/nntp/camel-nntp-summary.h:
15225 removed files since camel-folder-summary does all we need.
15227 2000-05-15 Jeffrey Stedfast <fejj@stampede.org>
15229 * providers/smtp/camel-smtp-transport.c: Added some preliminary
15232 2000-05-15 Dan Winship <danw@helixcode.com>
15234 * camel-folder.h: Remove camel_folder_get_summary, which no longer
15237 2000-05-11 Dan Winship <danw@helixcode.com>
15239 * Makefile.am: remove some cruft that we're not currently using.
15241 * camel-stream-mem.c (camel_stream_mem_new_with_buffer): Change
15242 to match prototype (size_t vs unsigned int) so it works on 64-bit
15243 machines. Noted by msw.
15245 2000-05-11 NotZed <NotZed@HelixCode.com>
15247 * providers/mbox/camel-mbox-folder.c (message_changed): Indicate
15248 the summary changed also.
15250 2000-05-11 Jeffrey Stedfast <fejj@stampede.org>
15252 * providers/smtp/camel-smtp-transport.c: (smtp_helo):
15253 Updated to more closely comply with RFC 821 standards
15255 2000-05-11 NotZed <NotZed@HelixCode.com>
15257 * camel-mime-part.c (write_to_stream): Unref the filter after
15258 adding it to the filtering stream.
15260 * providers/mbox/camel-mbox-summary.c
15261 (camel_mbox_summary_finalise): Free the folder path.
15262 (camel_mbox_summary_update): Also save summary when done.
15263 (camel_mbox_summary_expunge): Unindex items when deleting them.
15264 (camel_mbox_summary_expunge): Save the index as well as the
15267 * camel-folder-summary.c (camel_folder_summary_finalise): Free the
15269 (camel_folder_summary_touch): New function, indicate the summary
15271 (camel_folder_summary_remove): Dirty here.
15273 * camel-internet-address.c (internet_decode): Free multiple entry
15274 addresses properly.
15276 * camel-mime-utils.c (header_decode_mailbox): Plugged another
15277 memleak, free text after converting it.
15278 (header_decode_addrspec): More leaks plugged.
15280 * camel-mime-message.c (finalize): Free message_uid.
15281 (finalize): Free the recipients hashtable.
15283 2000-05-11 <notzed@helixcode.com>
15285 * camel-folder-summary.c (camel_folder_summary_finalise): Free
15286 summary items and charset filters.
15288 2000-05-10 <notzed@helixcode.com>
15290 * camel-folder-summary.c (camel_folder_summary_finalise): Don't
15291 free stuff in p, after we've free'd p.
15293 * providers/mbox/camel-mbox-folder.c (mbox_append_message): Unref
15294 the stream we created for appending.
15296 2000-05-10 Jeffrey Stedfast <fejj@stampede.org>
15298 * providers/smtp/camel-smtp-transport.c: (camel_smtp_transport_class_init):
15299 Added initialization for service_class
15301 2000-05-10 Dan Winship <danw@helixcode.com>
15303 * camel-multipart.c (write_to_stream): fix a stupid typo. Thank
15306 * camel-mime-part.c (write_to_stream): don't ref the stream before
15307 wrapper a filter around it, since nothing will ever unref it.
15309 2000-05-10 Christopher James Lahey <clahey@helixcode.com>
15311 * Makefile.am: Added camel-types.h, camel-folder-pt-proxy.h, and
15312 camel-thread-proxy.h.
15314 2000-05-09 Dan Winship <danw@helixcode.com>
15316 * providers/sendmail/camel-sendmail-transport.c (_send_internal):
15317 Bleah. Can't fsync a pipe. As a quick kludge, just don't
15318 stream_flush it. The right fix will require bringing back
15319 stream_close though.
15321 2000-05-09 Jeffrey Stedfast <fejj@stampede.org>
15322 * camel-internet-address.[c,h]: Undid my changes (moved
15323 struct _address back into came-internet-address.c)
15324 * providers/smtp/camel-smtp-transport.c: (_send): changed
15325 from using it's own address manipulation (using struct _address)
15326 to using camel_internet_address_get(). Also some format changes
15327 to keep consistant with the rest of Camel
15329 2000-05-09 Jeffrey Stedfast <fejj@stampede.org>
15331 * camel-internet-address.[c,h]: Moved struct _address from
15332 camel-internet-address.c to camel-internet-address.h
15333 (hopefully this doesn't break anything...)
15334 * providers/smtp/camel-smtp-transport.c: (_send): now
15335 populates the recipient list with To, Cc, and Bcc addresses.
15336 Should now be able to use this module.
15338 2000-05-09 Dan Winship <danw@helixcode.com>
15340 * providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid):
15341 one more refcounting fix I missed before.
15343 2000-05-08 Jeffrey Stedfast <fejj@stampede.org>
15345 * providers/smtp/camel-smtp-transport.c: no longer frees memory it
15346 shouldn't, updated to reflect camel-stream changes involving
15347 CamelException (perhaps it should use a different CamelException
15348 variable than is passed to the camel smtp module?)
15350 2000-05-08 Dan Winship <danw@helixcode.com>
15352 * camel-stream.c (camel_stream_read, camel_stream_write,
15353 camel_stream_flush, camel_stream_reset, camel_stream_printf,
15354 camel_stream_write_to_stream): Use CamelException to signal
15356 (camel_stream_write_strings): Remove. camel_stream_printf is more
15357 useful in most of the places that used this.
15358 (camel_stream_write_string): Change from macro to function to
15359 prevent problems with double-evaluation.
15361 * camel-seekable-stream.c (camel_seekable_stream_seek,
15362 camel_seekable_stream_set_bounds): Use CamelException.
15365 * camel-seekable-substream.c, camel-stream-buffer.c,
15366 camel-stream-filter.c, camel-stream-fs.c, camel-stream-mem.c:
15369 * camel-stream-fs.c: Remove the virtual init functions and move
15370 the code into the creator functions. Add CamelExceptions to
15371 creation functions that could fail.
15373 * camel-data-wrapper.c (camel_data_wrapper_write_to_stream): Use
15375 * camel-mime-message.c, camel-mime-part.c, camel-multipart.c
15376 (write_to_stream): Update.
15378 * camel-mime-parser.c: add an exception to the mime parser private
15379 data and pass that to stream functions as needed.
15381 * gmime-content-field.c, md5-utils.c: Update (badly) for stream
15384 * camel-exception.h (camel_exception_is_set): convenience macro.
15386 * providers/Makefile.am: disable SMTP for now
15388 * providers/mbox/camel-mbox-folder.c (mbox_append_message): Pass
15389 CamelException to the functions that now need it. Check the
15390 exception after calling camel_stream_flush, and fail if it fails.
15391 (mbox_get_message_by_uid): More updates.
15393 * providers/pop/camel-pop3-folder.c,
15394 providers/pop/camel-pop3-store.c,
15395 providers/sendmail/camel-sendmail/transport.c: Update.
15398 2000-05-08 NotZed <NotZed@HelixCode.com>
15400 * camel-mime-message.c (process_header): Format From and Reply-To
15401 to at least a decoded string. Should probably store them as an
15402 camelinternetaddress.
15404 * Merged NEW_SUMMARY branch back to trunk, and resolved conflicts.
15406 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_update):
15408 (camel_mbox_summary_expunge): Force an update of the summary
15409 before we do anything.
15410 (camel_mbox_summary_expunge): Build new xev line in xevnew, and
15411 free that, and consify xev.
15412 (camel_mbox_summary_load): If we are rebuilding from scratch, make
15413 sure we clear the summary content.
15415 * camel-stream-filter.c (do_close): We NEED a stream close.
15417 2000-05-07 Dan Winship <danw@helixcode.com>
15419 Make camel not leak like a sieve.
15421 * camel-object.c: New subclass of GtkObject which is now the base
15422 of the Camel object hierarchy. Currently the only difference
15423 between CamelObject and GtkObject is that CamelObjects don't start
15426 * *.h: Move a bunch of typedefs to camel-types.h. Standardize on
15427 using <camel/foo.h> in header files rather than <foo.h>, "foo.h",
15428 or "camel/foo.h". Remove some unneeded includes.
15430 * camel-address.c, camel-data-wrapper.c, camel-folder-search.c,
15431 camel-folder-summary.c, camel-folder.c, camel-mime-filter.c,
15432 camel-mime-parser.c, camel-service.c, camel-session.c,
15433 camel-stream.c: These are now subclasses of CamelObject.
15435 * camel-data-wrapper.c (set_output_stream):
15436 * camel-medium.c (set_content_object):
15437 * camel-seekable-substream.c
15438 (init_with_seekable_stream_and_bounds):
15439 * providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid):
15440 remove gtk_object_sink calls.
15442 * camel-stream-buffer.c (init_vbuf):
15443 * camel-stream-filter.c (camel_stream_filter_new_with_stream):
15444 ref the original stream.
15446 * camel-folder-summary.c (camel_folder_summary_finalise): unref
15447 the filters when finalizing.
15449 * camel-mime-part-utils.c
15450 (simple_data_wrapper_construct_from_parser,
15451 camel_mime_part_construct_content_from_parser):
15452 * camel-mime-part.c (camel_mime_part_set_content): Unref objects
15453 that are created only to be handed off to other objects. If
15454 they're going to be needed later, they will have been additionally
15455 ref'ed by the object that needs them.
15457 * providers/pop3/camel-pop3-folder.c (get_message_by_number):
15458 unref the message stream after creating the data from it.
15460 * camel-stream.c, camel-stream-buffer.c, camel-stream-filter.c,
15461 camel-stream-fs.c, camel-stream-mem.c: Remove camel_stream_close,
15462 since its semantics are dubious (what happens when you close a
15463 stream other people still have references on?).
15465 * providers/nntp/camel-nntp-store.c:
15466 * providers/smtp/camel-smtp-transport.c:
15467 * providers/pop3/camel-pop3-store.c:
15468 replace camel_stream_close calls with gtk_object_unref.
15470 * providers/mbox/camel-mbox-folder.c:
15471 * providers/nntp/camel-nntp-folder.c:
15472 * providers/sendmail/camel-sendmail-transport.c:
15473 replace camel_stream_close with camel_stream_flush +
15476 2000-05-06 Dan Winship <danw@helixcode.com>
15478 * providers/pop3/camel-pop3-store.c (query_auth_types): A machine
15479 which serves neither POP nor KPOP is not a POP server.
15481 * providers/smtp/camel-smtp-provider.c: Note in the description
15482 that this provider is not yet tested.
15484 2000-05-08 <notzed@helixcode.com>
15486 * camel-mime-part.c (write_to_stream): Free the filter stream when
15489 * camel-mime-parser.c (folder_seek): Make sure we add the \n
15490 terminal when we seek as well (frob!).
15492 * camel-mime-utils.c (header_decode_addrspec): Plug minor memleak.
15494 * camel-mime-part.c (finalize): Free header tables once finished.
15496 * camel-folder-summary.c (camel_folder_summary_remove): Dont try
15497 to access info after its free'd.
15499 2000-05-07 NotZed <NotZed@HelixCode.com>
15501 * camel-mime-part.c (write_to_stream): Apply encoding to content
15502 part, when writing to a stream *sigh*.
15504 * camel-stream-filter.c (do_write): implement write for the
15505 filtering stream. Writes shouldn't be mixed with reads.
15506 (do_flush): Implemented flush. Again write/flush shouldn't be
15507 mixed with reads. Only flushes if the last op was write.
15508 (do_close): Force flush on close.
15510 * camel-mime-filter.c (filter_run): Oops, make sure we include the
15511 backlen in the total length before passing onto the filter.
15513 * camel-mime-filter-from.c: New filter, munges 'From ' lines into
15514 '>From ', for mbox.
15516 * camel-mime-parser.c (camel_mime_parser_header_remove): New
15517 function to remove the parser's raw header, rather than
15518 manipulating the header directly (wich doesn't work with
15521 * camel-mime-utils.c (header_address_list_clear): Fixed some
15522 broken(tm) logic, which would leak entries on multivalued lists.
15524 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_load):
15525 Use ibex_save() to save the ibex. Makes a big difference to
15526 startup times for very large mailboxes.
15527 (camel_mbox_summary_expunge): Dum de dum, reimplemented. Designed
15528 to be much more robust, and to stop immediately if anything awry
15530 (copy_block): Utility function to copy n bytes from one fd to
15532 (header_write): Utility function to write out raw headers to an
15534 (camel_mbox_summary_update): Incremental summary updater.
15536 * providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid):
15537 Dont unref the stream, because of the broken(tm) ref model of gtk
15538 widget that for some odd reason is being perpetuated in camel.
15539 (mbox_expunge): Reenable expunge again.
15540 (mbox_append_message): Removed the optimised mbox append. If its
15541 an issue, it can go back later. Cleaned up a lot, checks error
15542 returns, and automagically translates 'From ' into '>From' as
15545 2000-05-07 <notzed@helixcode.com>
15547 * camel-mime-filter.c (filter_run): Oops, forgot to add the
15548 backlen to the pre-buffer (*poof*).
15550 2000-05-07 NotZed <NotZed@HelixCode.com>
15552 * camel-mime-message.c (construct_from_parser): Allow
15553 HSCAN_FROM_END to terminate the processing of a message.
15555 * camel-folder-summary.c (perform_content_info_load): Ick, dont
15556 try and append a node onto its own list.
15557 (camel_folder_summary_clear): Actually clear the indexes after
15558 we've removed the messages.
15559 (camel_folder_summary_clear): Set dirty if it changes.
15560 (camel_folder_summary_load): Clear dirty.
15561 (camel_folder_summary_save): Only save if dirty.
15563 * providers/mbox/camel-mbox-summary.c (summary_header_load): Oops,
15564 remember to call that parent class first ...
15565 (summary_header_save): Here too.
15566 (camel_mbox_summary_load): Do more checking to verify the index
15567 contents as well as teh summary contents, against the mbox
15569 (camel_mbox_summary_load): Removed some fo that checking, it needs
15570 more code to work reliably.
15572 2000-05-07 <notzed@helixcode.com>
15574 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_load):
15575 Set the size and mtime of the mbox we indexed once done.
15577 * camel-folder-summary.c (camel_folder_summary_set_index): Dont
15578 write the index if it changes - let the claler fix it (uh, kind of
15579 impacts performance).
15580 (camel_folder_summary_load): close in.
15582 * camel-folder-summary.c (summary_format_string): Check header
15583 exists before trying to strip its leading spaces.
15585 2000-05-06 NotZed <NotZed@HelixCode.com>
15587 * camel-folder.h: Removed summary info from here, and include
15588 camel-folder-summary.h as well.
15590 * camel-mime-parser.c (camel_mime_parser_step): Allow it to accept
15593 * providers/mbox/camel-mbox-summary.c: Totally new file, now
15594 subclasses camel-folder-summary.
15596 * camel-folder-summary.c (message_info_load): Load the uid as a
15598 (message_info_save): And save too.
15599 (camel_folder_summary_clear): New function, clears the contents of
15602 * providers/mbox/camel-mbox-folder.c: Fixes for summary changes.
15603 (mbox_get_message_by_uid): Completely redone. Now cross-checks
15604 the summary information to make sure we get a real message.
15605 (mbox_append_message): Disabled the copy version of append for
15607 (mbox_expunge): Temporarily disabled the expunge function, until
15608 it is put back in camel-mbox-summary.c
15610 2000-05-05 NotZed <NotZed@HelixCode.com>
15612 * camel-folder-summary.c: And same here ...
15613 (camel_folder_summary_encode_fixed_int32): Ugh, fwrite doesn't
15614 return -1 on error ..
15615 (camel_folder_summary_decode_fixed_int32): Neither deos fread.
15616 (camel_folder_summary_encode_token): Fix here too.
15617 (summary_build_content_info): Use start-headers to get the pos of
15618 the message, not parser_tell(), which might not be what we
15619 expected because of parser_unstep().
15620 (camel_folder_summary_encode_token): Use bserch() to tokenise the
15621 values, rather than a linear search.
15623 * camel-mime-utils.c: Defined out some memory profiling stuff I
15624 left there by mistake.
15625 (header_decode_mailbox): Dont try to append the word part of a
15626 local address if we ran out of words.
15628 * camel-mime-parser.c (folder_scan_content): Apply the fix from
15629 the header scanner to here too.
15630 (folder_scan_header): Only check for end of header if we have
15631 space for it (didn't end the read with a newline)
15632 (folder_scan_header): inptr is the only real thing we need
15633 registerised for performance. Try to help the compiler be smart
15635 (folder_scan_header): Simplified the save header case a tad.
15637 Commented out some memory profiling stuff.
15639 2000-05-05 <notzed@helixcode.com>
15641 * camel-mime-utils.c (header_decode_mailbox): Plug a memory leak.
15642 (header_decode_text): Fixed memory leaks with g_string_append().
15643 (header_encode_string): And here too, and a few other places. The
15644 glib api is so awful ...
15645 (header_content_type_decode): More memory leaks.
15647 2000-05-05 <notzed@helixcode.com>
15649 * camel-mime-parser.c (folder_scan_init_with_fd): Make sure we
15650 init the end of buffer sentinal!
15651 (folder_scan_init_with_stream): And here too ...
15653 2000-05-04 NotZed <NotZed@HelixCode.com>
15655 * providers/mbox/camel-mbox-folder.c (summary_get_message_info):
15656 Maxcount is minimum of the max and the requested count, not the
15659 * camel-mime-parser.c (folder_scan_content): Properly set midline,
15660 so we dont falsely catch offset boundary markers (i.e. From inside
15662 (folder_read): Set a sentinal on the end of the read data (\n) so
15663 we dont have to check the buffer boundary in the inner loop.
15664 (mempool_*): New experimental memory management routines, speed
15665 up simple structure parsing by about 25% ... not compiled in by
15666 default. Something similar may be needed for camel-mime-utils to
15667 address performance issues with g_malloc and friends.
15669 * camel-mime-utils.c: Added a macro w(x) used to wrap all warnings
15670 about mime/rfc violations, so they can be turned off.
15672 * camel-folder-summary.c (summary_build_content_info): Step after
15673 the end of a message ...
15674 Turn into a stand-alone program for testing and profiling.
15676 2000-05-04 Dan Winship <danw@helixcode.com>
15678 * providers/pop3/camel-pop3-store.c (pop3_connect): Don't fall
15679 back to plaintext passwords if APOP fails, since it should also
15682 2000-05-04 Dan Winship <danw@helixcode.com>
15684 * camel-session.c (camel_session_list_providers): New function to
15685 replace camel_provider_scan. Returns a list of either (a) all
15686 currently-loaded providers, or (b) all available providers.
15688 * camel-url.[ch]: Add an "empty" flag to CamelURL (indicating that
15689 it contains only a protocol).
15691 * camel-service.c (camel_service_query_auth_types): Make this take
15692 a CamelException (since it may have to try to connect to the
15693 server, and it might not able to.)
15695 * providers/pop3/camel-pop3-store.c: add KPOP (Kerberized POP)
15696 support. This is mostly so I have two kinds of authmech to play
15697 with instead of just one. (But it does actually work.)
15699 * providers/smtp/camel-smtp-transport.c (query_auth_types): update
15700 for prototype change, but disable the functionality, since it
15701 doesn't really support any auth types yet.
15702 (camel_smtp_transport_get_type): add an object init function to
15703 set the service url_flags.
15705 2000-05-04 NotZed <NotZed@HelixCode.com>
15707 * providers/mbox/camel-mbox-summary.c: Yes, and anotherone.
15709 * camel-mime-utils.c: And another one.
15711 * camel-mime-part.c: And another one.
15713 * camel-mime-part-utils.c: And another one.
15715 * camel-folder-search.c: And another one.
15717 * camel-mime-parser.c: Reverted a change wihtout a ChangeLog entry.
15719 2000-05-04 NotZed <NotZed@HelixCode.com>
15721 * camel-folder-summary.[hc]: Yes, CamelFolderSummary is back ...
15722 ... re-usable class to summarise and index any stream or message
15723 and to manage/load/save the created summaries.
15725 * camel-folder.c: Include string.h to kill a warning.
15727 2000-05-03 Jason Leach <leach@wam.umd.edu>
15729 * Makefile.am (INCLUDES): add $(UNICODE_CFLAGS) to the INCLUDES,
15730 people who installed libunicde in non-standard include paths need
15733 2000-05-03 NotZed <NotZed@HelixCode.com>
15735 * camel-folder.h: Added pos/bodypos/endpos to the basic message
15736 content info object. Size to be removed? Moved the
15737 messageconentinfo and messageinfo back to camel-folder-summary.h.
15739 * camel-mime-filter-index.c (camel_mime_filter_index_set_ibex):
15740 New function to (re)set the index to use on a filter.
15742 * camel-mime-parser.c (camel_mime_parser_scan_from): Whole bunch
15744 (camel_mime_parser_drop_step): New function to drop a state from
15745 the parser. Needs more testing.
15747 * camel-mime-utils.c (rfc2047_decode_word): If the iconv handle is
15748 -1, then dont try and convert (crashes unicode_iconv?).
15749 (rfc2047_decode_word): Use alloca for variables instead of
15750 g_malloc - by the rfc they should always be short.
15751 (rfc2047_decode_word): If we can't do the charset conversion, undo
15752 the quoted-printable/base64 at least? Should probably convert
15753 unknown characters to the utf-8 unknown character.
15755 2000-05-02 Larry Ewing <lewing@helixcode.com>
15757 * camel-mime-utils.c (header_decode_date): fix typo when
15758 dereferencing saveoffset.
15760 2000-05-02 NotZed <NotZed@HelixCode.com>
15762 * camel-folder-search.c: Added some header doco.
15764 * camel.h: REmove gmime-utils.h from here.
15766 * providers/mbox/camel-mbox-search.[ch]: Removed. Functionally
15769 * providers/mbox/camel-mbox-folder.c (mbox_search_by_expression):
15770 Use the new CamelFolderSearch class to do the actual searching,
15771 just setup the search here.
15773 * camel-folder-search.[ch]: A helper class that providers may
15774 subclass to provide their own search functionality, or they can
15775 simply use as is, it supports body searches if an ibex is
15776 supplied, and header searches if a summary is supplied.
15778 2000-05-02 Matt Loper <matt@helixcode.com>
15780 * Makefile.am: set G_LOG_DOMAIN.
15781 * providers/MH/Makefile.am: same.
15782 * providers/maildir/Makefile.am: same.
15783 * providers/mbox/Makefile.am: same.
15784 * providers/nntp/Makefile.am: same.
15785 * providers/pop3/Makefile.am: same.
15786 * providers/sendmail/Makefile.am: same.
15787 * providers/smtp/Makefile.am: same.
15789 2000-05-02 NotZed <NotZed@HelixCode.com>
15791 * providers/mbox/camel-mbox-search.c
15792 (camel_mbox_folder_search_by_expression): Dont store/remove
15793 current search from the search list.
15795 * providers/mbox/camel-mbox-folder.h: Removed searches list,
15796 searches are all sync now.
15798 * gmime-utils.[ch]: What the hell, remove it. This will break the
15799 nntp provider. The mime parser can be used instead though.
15800 Removed from all code including it (but none were using it).
15802 * gmime-utils.c (_store_header_pair_from_string): Removed bizarre
15803 string_dichotomy version of this. This code is somewhat redundant
15804 now, and is headed for death anyway.
15806 * gstring-util.c (g_string_dichotomy): Same with this one.
15807 (g_string_clone): Removed a memory leak, g_string_new() allocates
15809 (g_string_append_g_string): Allow to append an empty gstring onto
15810 another gstring, dont abort()!
15812 * string-utils.c (string_dichotomy): Removed this incredibly weird
15815 * camel-folder.c (_create): Replaced the rather obtuse use of
15816 "string_dichotomy" function with a simple strrchr(). Still not
15819 * camel-folder-summary.c: cvs removed a long-removed file.
15821 * camel-mime-parser.c (folder_scan_header): Fix the previous
15822 overflow problem properly (can happen in 2 places).
15823 (header_append): A new macro to include the code changed above, so
15824 it only appears in one place.
15825 (folder_scan_step): Change the content type to text/plain if the
15826 multipart is broken. Doesn't actually change the header though.
15827 (header_append): Also move the header-start tracking stuff here.
15828 Could be a static function to save code.
15830 2000-05-02 <notzed@helixcode.com>
15832 * camel-mime-part-utils.c
15833 (simple_data_wrapper_construct_from_parser): Dont use autofill on
15834 these fucking long function anmes!!!!!!
15836 2000-05-02 NotZed <NotZed@HelixCode.com>
15838 * providers/mbox/camel-mbox-summary.c
15839 (camel_mbox_summary_expunge): Fix the offset for the summary when
15840 an item is expunged to take account of the From line.
15842 2000-05-01 NotZed <NotZed@HelixCode.com>
15844 * providers/mbox/camel-mbox-folder.h (CamelMboxFolder): Removed
15847 * providers/mbox/camel-mbox-search.c
15848 (camel_mbox_folder_search_cancel): Remove.d
15849 (camel_mbox_folder_search_complete): Removed.
15850 (camel_mbox_folder_search_by_expression): Changed back to sync
15852 (struct _searchcontext): Removed cancelled flag.
15853 (find_context): Removed.
15854 (func_header_contains): Debug out some search stuff.
15856 * providers/mbox/camel-mbox-search.h
15857 (camel_mbox_folder_search_by_expression): Moved back to sync api.
15859 * providers/mbox/camel-mbox-summary.c
15860 (camel_mbox_summary_set_flags_by_uid): New function to update the
15861 flags in the summary.
15862 (camel_mbox_summary_expunge): Expunge messages from a folder.
15863 (offset_content): Re-align offsets of summary when messages
15864 added/removed to an existing summary.
15865 (camel_mbox_summary_remove_uid): Remove a message summary entry by
15867 (index_folder): Restore flags from X-Evolution header, if they are set.
15868 (index_folder): Make sure we index using a decimal uid, since
15869 thats what everything else indexes off (oops).
15870 Upped SUMMARY_VERSION as a result.
15871 (camel_mbox_summary_expunge): Oops, my wrong, use the string uid
15874 * providers/mbox/camel-mbox-folder.c (_get_message_by_uid):
15875 Connect to the message_changed signal.
15876 (_init): Set permanent flags to something reasonable. No user
15878 (message_changed): If the flags of the message change, update the
15879 flags in the summary.
15880 (mbox_expunge): Implement the expunge.
15881 (camel_mbox_folder_class_init): Renamed all leading _'s to mbox_'s
15882 (mbox_expunge): Emit a folder_changed signal on expunge (uh, even
15885 * camel-folder.c (_finalize): Uh, dont free permanent_flags
15886 anymore (this wouldn't failed anyway, it was a GList !!!)
15887 (camel_folder_search_complete): Removed.
15888 (camel_folder_search_cancel): Removed.
15889 (camel_folder_expunge): Changed to only allow expunge on an open
15890 folder. It doesn't make sense for mbox, otherwise (?)
15891 (camel_folder_class_init): Added a folder_changed signal.
15893 * camel-folder.h (struct _CamelFolder): Change permanent_flags to
15895 (list_permanent_flags): Renamed to get_permanent_flags, and
15896 returns a bitfield.
15897 (camel_folder_expunge): Changed expunge to a void type. The
15898 messages would no longer be useful after they have been removed
15900 (CamelFolderClass): New function summary_get_by_uid() to get a single
15902 (*search*): Moved back to synchronous search api ... *sigh*
15904 * camel-folder.h: Removed CamelSearchFunc.
15906 * camel-mime-message.c (set_flag): Removed.
15907 (camel_mime_message_set_flag): Removed.
15908 (get_flag): Removed.
15909 (camel_mime_message_get_flag): Removed.
15910 (add_flag_to_list): Removed.
15911 (get_flag_list): Removed.
15912 (camel_mime_message_get_flag_list): Removed.
15913 (camel_mime_message_get_flags): New interface to get system flags.
15914 (camel_mime_message_set_flags): " to set ".
15915 (camel_mime_message_get_user_flag): To get a user flag.
15916 (camel_mime_message_set_user_flag): To set a user flag.
15917 (finalize): Hmm, the old one free'd the key and data, not good
15918 when the data is a boolean ...
15920 2000-04-30 Dan Winship <danw@helixcode.com>
15922 * camel-provider.h: Tweak the definition of CamelProvider. Among
15923 other things, a provider may now be both a store and a transport.
15925 * camel-provider.c: Remove a lot of code we had no intention of
15926 using. This now only contains two functions: camel_provider_init
15927 to read the installed .urls files, and camel_provider_load to
15928 load and register a new provider.
15930 * camel-session.c: Remove more unused code and simplify some of
15931 the remaining code. The list of available provider modules is now
15932 stored in the session, and it handles calling camel_provider_load
15933 to load them as needed. Provider registration is now done by
15934 calling back from the module init routine, which allows a single
15935 module to register providers for multiple URL types.
15937 * providers/*: Update provider structures and init routines for
15938 the new stuff. Add a .urls file to each provider specifying what
15939 urls it handles, and install that with the library.
15941 * providers/nntp/camel-nntp-provider.c: Add hints towards
15942 supporting both news: and nntp: URLs, and using nntp as both a
15943 store and a transport.
15945 2000-04-29 Dan Winship <danw@helixcode.com>
15947 * camel-internet-address.c (camel_internet_address_get): const
15950 * camel-mime-part-utils.c
15951 (simple_data_wrapper_construct_from_parser):
15952 camel_mime_parser_tell() returns an offset from where it started
15953 parsing, not necessarily from the start of data. Since we're
15954 parsing a bounded seekable_stream, we need to add the stream's
15955 starting bound to camel_mime_parser_tell's return value to
15956 create the substream in the right place.
15958 * camel-seekable-substream.c
15959 (camel_seekable_substream_new_with_seekable_stream_and_bounds):
15960 say CAMEL_STREAM_UNBOUND rather than -1 in doc.
15962 * camel-seekable-stream.c (camel_seekable_stream_seek): Add more
15965 2000-04-28 Dan Winship <danw@helixcode.com>
15967 * camel-mime-parser.c (folder_scan_header): fix a bug that would
15968 cause corruption with very long headers.
15970 2000-04-27 Ettore Perazzoli <ettore@helixcode.com>
15972 * providers/pop3/Makefile.am (INCLUDES): Add `-I$(srcdir)/../../..'
15973 to pick the Camel includes.
15974 * providers/sendmail/Makefile.am (INCLUDES): Likewise.
15976 * camel.h: Don't #include <camel/data-wrapper-repository.h> anymore.
15978 2000-04-27 NotZed <NotZed@HelixCode.com>
15980 * camel-mime-utils.c (check_header): Dont try and check a NULL
15983 * camel-recipient.[ch]: Dead. Its not pining.
15985 * camel-mime-message.h: Dont include recipients.h anymore.
15987 * camel-mime-message.c (camel_mime_message_add_recipient): Accept
15988 name/address separately, and store in an CamelInternetAddress.
15989 (add_recipient): Removed.
15990 (remove_recipient): Removed.
15991 (remove_recipient_address): Renamed from remove_receipient, works
15993 (camel_mime_message_remove_recipient_name): New function to remove
15995 (get_recipients): Removed.
15996 (camel_mime_message_get_recipients): Return a camel-internet-address.
15997 (write_to_stream): No longer write receipients directly.
15998 (write_recipients_to_stream): Removed.
15999 (write_one_recipient_to_stream): Removed.
16000 (camel_mime_message_init): Setup recipients hashtable, rather than
16001 usign the recipients stuff.
16002 (set_recipient_list_from_string): Killed, a violent and lengthy
16004 (process_header): Simplified recipient handling code a lot.
16005 (received_date_str, sent_date_str, reply_to_str, subject_str,
16006 from_str): Removed some oddly-defined global statics.
16007 (camel_mime_message_class_init): Dont initialise above variables
16009 (init_header_name_table): Removed, use a table to init this, and
16010 do it in class init (2 lines of code ...).
16012 * camel-news-address.c: Class to represent news addresses -
16013 currently empty, and not built.
16015 * camel-internet-address.h: Class to represent internet (email)
16018 * camel-address.h: Abstract class to represent (lists of)
16021 2000-04-27 Dan Winship <danw@helixcode.com>
16023 * camel-mime-part.c (write_to_stream): Revert previous change. I
16026 * camel-url.[ch] (camel_url_encode, camel_url_decode): expose
16029 2000-04-26 Dan Winship <danw@helixcode.com>
16031 * camel-mime-part.c (write_to_stream): Only write a newline
16032 between the headers and the content object if the content object
16033 is not a CamelMedium. (If the content is a medium, it may have its
16034 own headers, which then need to go before the blank line.)
16036 * camel-mime-body-part.[ch]: Remove. We weren't using the fields
16037 that made this different from camel-mime-part, so it basically
16038 just forced us to do lots of gratuitous typecasting.
16040 * camel-multipart.[ch]: Use CamelMimePart. Remove the multipart
16041 parent stuff, since we weren't using that either.
16043 * etc: update for CamelMimeBodyPart -> CamelMimePart
16045 2000-04-26 Dan Winship <danw@helixcode.com>
16047 * camel-medium.c (set_content_object): sink the content object
16048 after referencing it.
16050 * camel-mime-part.c: fix various little things in the handling
16051 of CamelMedium methods. Change camel_mime_part_set_text to the
16052 more generic camel_mime_part_set_content.
16054 * camel.h: sync to current reality
16056 * camel-folder-utils.[ch]: removed
16058 * camel-mime-utils.c (header_format_date): fix format specifier
16059 for time zone. Fix typo in month names array.
16061 2000-04-26 NotZed <NotZed@HelixCode.com>
16063 * camel-seekable-substream.c (stream_seek): Changed to have
16064 absolute seek semantics, not relative to the bounds.
16066 * camel-seekable-stream.c (reset): When we reset, seek to the
16067 start of the bound, if there is one.
16068 (stream_tell): Make tell virtual.
16070 * camel-stream-filter.c (do_available): Removed.
16072 * camel-stream-buffer.c: Remove leading _'s from static functions.
16073 (stream_read): Renamed from read(). Fancy that conflicting! (my
16076 * providers/pop3/camel-pop3-folder.c (get_message_by_number):
16077 Changed to stream_mem interface.
16079 * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): Fixed
16080 for streamfs interface changes, and implement a failure case.
16081 (_append_message): Changed for fs stream interface change.
16083 * camel-multipart.c (print_part): Iterate rahter than callback. I
16084 hate glists's interface (hence, move this to write_to_stream).
16085 (write_to_stream): Return an error (yuck, this is a royal PITA to
16086 do with the stream write interface).
16088 * camel-mime-message.c: Removed leading _ from static names.
16090 * camel-mime-part.h: construct_from_parser() now returns an error
16093 * camel-mime-part-utils.c
16094 (camel_mime_part_construct_content_from_parser): Changed to use a
16095 camel-data-wrapper instead of a camel-simple-data-wrapper (no
16096 change needed elsewhere?).
16097 (simple_data_wrapper_construct_from_parser): Fixes for stream-mem
16100 * camel-simple-data-wrapper.[ch],
16101 camel-simple-data-wrapper-stream.[ch],
16102 camel-stream-data-wrapper.[ch], removed. Fixed including of these
16105 * camel-mime-part.c (camel_mime_part_set_text): Remove the use of
16106 the camel-simple-data-wrapper-stream, just use a mem stream.
16107 (write_to_stream): Renamed from my_*
16108 (construct_from_stream): Return an error on error.
16110 * camel-stream-mem.c (camel_stream_mem_new*): Remove mode
16113 * camel-stream-mem.h (enum CamelStreamMemMode): Removed. It
16114 wasn't used at all.
16116 * camel-data-wrapper.h: Add camel_data_wrapper_new() to create
16118 (write_to_stream, construct_from_stream): Return an error
16119 indicator for success. Fixed all methods to match (ICK).
16121 * Makefile.am (libcamel_la_SOURCES): Remove
16122 camel-simple-data-wrapper.c, camel-simple-data-wrapper-stream.c,
16123 camel-stream-data-wrapper.c. Obsoleted by code re-use!
16125 * camel-data-wrapper.c (construct_from_stream): Change the default
16126 implementation to just set the output stream == construction
16127 stream. Well, this lets me get rid of both simple-data-wrapper
16128 and stream-data-wrapper (unused anyway), and
16129 simple-data-wrapper-stream in one hit. CamelDataWrapper is now
16130 also a concrete class.
16131 (write_to_stream): Use camel_stream_write_to_stream() to
16132 calculate/return values (and save code).
16133 Include <errno.h> for obvious reasons.
16135 * camel-stream.c (eos): Provide a default implementation of .eos().
16136 (camel_stream_write_to_stream): Make it return an error code on
16138 (camel_stream_printf): Changed to return the number of bytes
16140 (camel_stream_available): Removed.
16142 * camel-stream-fs.h (enum CamelStreamFsMode): Removed. Changed to
16143 use unix modes and so forth (wasn't used for anything but new file
16144 creation and didn't work well either).
16146 * camel-stream-fs.c: Removed leading _'s for names. And removed
16147 some virtual method 'documentation'.
16148 (destroy): Dont try and close a closed/error fd. Only report
16149 error if close returns -1. Moved all the code to finalise(), and
16150 killed this function.
16151 (init_with_fd): Properly setup the seek offset, if it is a
16152 valid and seekable file descriptor.
16153 (init_with_fd_and_bounds): Use off_t for bounds, set bounds on the
16155 (init_with_name): Return error codes.
16156 (init_with_name_and_bounds): Ditto.
16157 (camel_stream_fs_new_with_name): REturn NULL object if it failed.
16158 (camel_stream_fs_new_with_name_and_bounds): Return NULL object on
16159 failure. Changed with_name* api's to take unix open style args
16161 (read): The bounded stream bounds checking seemed off, simplified
16163 (write): Implement bounds checking for writing, the comment was
16164 wrong, it could make sense to bound writing. Cleaned up a little.
16166 (eos): Removed. Use CamelStream's implementation now.
16167 (close): Reset the fd to -1, provide a warning for bad usage.
16168 (seek): Cleaned up. Changed the behaviour a little, the returned
16169 offset is the absolute position in the file, even in bounded
16171 (seek): Seek from end mirrors lseek() behaviour (reverse seeking).
16173 2000-04-25 NotZed <NotZed@HelixCode.com>
16175 * camel-stream-fs.h (struct _CamelStreamFs): Moved bounds and eof
16176 indicator to other parent classes.
16178 * camel-stream.c (camel_stream_printf): New utility
16179 function. Obvious use.
16181 * camel-stream-mem.c: Removed leading _'s from static func's.
16182 (camel_stream_mem_new_with_byte_array): Fixed for api changes, set
16183 the owner for the byte array to us.
16184 : Removed A bunch of gtk doc stuff for static (implementation) functions.
16185 (available): Removed.
16186 (write): Fixed the write implementation so that seek() works on a
16187 seekable memory stream, as expected. Seeking past the end of the
16188 buffer has unix semantics (filling with 0).
16189 (available): Removed.
16190 (write): Implement seekable stream bounded stream.
16191 (read): Implement seekable stream bounded stream.
16192 (close): Dont free the stream_mem if we're not the owner.
16193 (seek): Allow to seek beyond the end of memory area,
16194 implement bounds checking.
16195 (seek): Set errno on bad policy.
16197 * camel-stream-mem.h (struct _CamelStreamMem): Changed position to off_t.
16198 (new_with_buffer): Changed len to be a size_t.
16199 (set_buffer, set_byte_array): New interface functions.
16200 (struct _CamelStreamMem): Removed position, it is stored in the
16203 * camel-stream.h: Removed some of the seemingly random
16204 whitespace. Removed the available method (its not
16205 impelemented/useful enough).
16207 * camel-seekable-substream.c
16208 (init_with_seekable_stream_and_bounds): Remove the data_available
16209 stuff, it hasn't been properly implemented/finished, and may never
16210 work (unfortunately *sigh).
16211 (reemit_parent_signal): Removed part of the above change.
16212 (set_bounds): Removed (moved to seekable-stream).
16213 : Fixed up some of the generally unreadable indenting (sorry,
16214 wrapping at 80 characters with
16215 camels_really_long_function_names()
16216 just_doesnt_work_very_well_does_it().
16217 (available): Removed.
16218 (stream_seek): Fixup for object changes. Make sure we return -1
16219 if the parent stream can't seek.
16221 * camel-seekable-stream.c (ccamel_seekable_stream_set_bounds): New
16222 function to bound any seekable stream.
16224 (camel_seekable_stream_class_init): Implement an init function, to
16225 setup the stream bounds to unbound.
16227 * camel-seekable-stream.h (CamelSeekableStreamClass): New virtual
16228 method set_bounds for seekable streams.
16229 (CAMEL_STREAM_UNBOUND): New define for no bound.
16231 * camel-seekable-substream.h (struct _CamelSeekableSubstream):
16232 Removed sup_bound and inf_bound, moved to CamelSeekableStream (and
16233 renamed, and changed to off_t's).
16234 (new_with_seekable_stream_and_bounds): Use off_t as the bounds.
16235 (CamelSeekableSubstreamClass): Uh, why was the intialiser virtual?
16238 * camel-seekable-stream.[ch] (CamelSeekableStreamClass): Changed seek
16239 to accept an off_t as the offset.
16240 (struct _CamelSeekableStream): Renamed cur_pos to position and
16241 changed it to an off_t type.
16242 (enum CamelStreamSeekPolicy): Set to match the SEEK_* constants
16244 (get_current_position): Renamed to tell().
16246 * camel-stream-buffer.h: Commented out set_vbuf - never implemented.
16248 2000-04-25 Dan Winship <danw@helixcode.com>
16250 * camel-stream-buffer.c (_eos): only return TRUE if the parent is
16251 at eos AND the buffer has been exhausted
16253 * camel-mime-message.c: fix some incorrect macro usage that
16254 resulted in bogus casts
16256 2000-04-24 Dan Winship <danw@helixcode.com>
16258 * camel-mime-part-utils.c
16259 (simple_data_wrapper_construct_from_parser): fix a cut-and-pasto.
16261 * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): ref
16262 (and sink) the message stream if we're going to unref it later.
16263 Otherwise it could get destroyed while there are still substreams
16264 attached to it. This needs a cleaner solution.
16266 * camel.h: remove data-wrapper-repository.h include(s)
16268 2000-04-24 NotZed <NotZed@HelixCode.com>
16270 * camel-mime-message.c (construct_from_parser): Allow MESSAGE_END
16271 _or_ EOF as valid termination conditions.
16273 * providers/mbox/camel-mbox-summary.c (message_struct_new): Decode
16274 and then re-encode the addresses, so they are consistently
16277 * camel-mime-utils.c (header_decode_mailbox): Store the address in
16278 a _header_address. And try to get a comment-stored name if there
16280 (header_decode_address): Actually return an address.
16281 (header_to_decode): Renamed to header_address_decode()
16282 (header_mailbox_decode): New function to get a single mailbox.
16283 (header_mime_decode): Return the major/minor value, as
16285 (header_address_new, and friends): Whole bunch of utility
16286 functions for working with the address thingies.
16287 (header_decode_domain): Free the string header, and dont expand
16290 * camel.c (camel_init): No longer call
16291 data_wrapper_repository_init.
16293 * camel-medium.c (write_to_stream): Moved (back) to
16298 (get_header): Make all these abstract, and spit warnings if
16299 called. I guess it could manage the list, but well, it doesn't.
16301 * camel-medium.h (struct _CamelMedium): Dont store headers here,
16302 the implementor is the only one who knows their format.
16303 (CamelMediumClass): Changed header values to be void *'s. They
16304 need not be strings?
16306 * camel-simple-data-wrapper.c (construct_from_stream): And we're
16307 back. Set the output stream.
16308 (construct_from_parser): Moved to camel-mime-part-utils.
16310 * camel-mime-part-utils.c
16311 (camel_mime_part_construct_content_from_parser): Create the
16312 contents of multipart and simple messages.
16313 (camel_mime_part_construct_content_from_parser): Oops, this was
16314 totally screwed up, try creating the right cotnent on the right
16317 * camel-multipart.c (construct_from_parser): Moved to
16318 camel-mime-part-utils.
16319 (separate_part): Removed.
16321 * camel-mime-part.c (construct_from_stream): Back again! This now
16322 switches over to using a mime parser for any mime parts, only.
16323 (my_write_to_stream): Write our headers and so forth here.
16324 (add_header): Add header directly, parent class is abstract.
16325 (remove_header): Ditto.
16326 (set_header): Ditto.
16328 * camel-data-wrapper.c (camel_data_wrapper_construct_from_stream):
16330 (camel_data_wrapper_construct_from_parser): Moved to
16333 * camel-data-wrapper.h: Put back construct_from_stream.
16335 * camel-mime-part.h: Put construct_from_parser in here, the
16336 data-wrapper shouldn't know about mime. Ok, so now to undo half
16337 of the last hours changes ... duh.
16339 2000-04-23 Dan Winship <danw@helixcode.com>
16341 * camel-mime-utils.c (header_to_decode, header_mime_decode): fix
16342 some obvious minor bugs noted by -Wall.
16344 2000-04-23 NotZed <NotZed@HelixCode.com>
16346 * providers/pop3/camel-pop3-folder.c (get_message_by_number): Use
16347 construct_from_stream instead of set_input_stream().
16349 * camel-simple-data-wrapper-stream.c
16350 (camel_simple_data_wrapper_stream_construct): REmoved the destroy
16352 (wrapper_destroy_cb): Removed.
16354 * camel-simple-data-wrapper.h: Add prototype for _construct()
16357 * camel.c: Include unicode.h to kill a warning.
16359 * camel-data-wrapper.h (CameldataWrapperClass): Removed
16360 construct_from_stream virtual method.
16361 Removed get/set input stream.
16363 * data-wrapper-repository.[ch]: Removed&from build. Obsoleted?
16364 The justification as is follows: It is mixing storage
16365 protocol/format with message architecture. It really just doesn't
16366 serve any purpose, as each medium implementor will have to have its
16367 own type->handler mapping, and the only current implementor,
16368 mimepart has a very simple structure and no need for this.
16370 * camel-medium.c (write_to_stream): Moved here from most of the
16371 stuff in camel-mime-part. Well, the MEDIUM is the one that knows
16372 what the headers are, and the content is, let it write it out.
16374 * camel-mime-part-utils.c (camel_mime_part_construct_content):
16375 Copied from camel-mime-part.c, removed handling of message
16376 followon state (moved to camel-mime-message).
16377 (camel_mime_part_construct_content_from_parser): Renamed from
16379 (camel_mime_part_construct_headers_from_stream):
16380 (camel_mime_part_construct_content_from_stream):
16381 (camel_mime_part_store_stream_in_buffer): Removed. Replaced by
16382 the new construct from parser stuff.
16384 * camel-mime-message.c (construct_from_parser): Do
16385 construct_from_parser for mime-message.
16386 (_write_to_stream): Set the mime-version header for medium to
16387 write out, rather than writing it out ourselves.
16389 * camel-data-wrapper.c (set_mime_type_field): Ref the
16390 content_field when we get it?
16391 (construct_from_stream): Removed.
16392 (camel_data_wrapper_construct_from_stream): Changed to a helper
16393 function, creates a mime_parser, and constructs from that.
16394 (set_input_stream): Removed.
16395 (camel_data_wrapper_set_input_stream): Removed.
16396 (get_input_stream): Removed.
16397 (camel_data_wrapper_get_input_stream): Removed.
16399 * camel-mime-parser.c (camel_mime_parser_unstep): New function.
16400 Cause a subsequent call to mime_parser_step() to return the same
16403 * providers/mbox/camel-mbox-folder.c (_get_message_by_uid):
16404 Initial test code using the mime parser to construct the message.
16405 (_get_message_by_uid): Use construct_from_stream() instead of
16406 creating our own parser.
16408 * camel-mime-part.c (construct_from_parser): part constructor.
16409 (camel_mime_part_construct_content): Basically a simpler
16410 replacement for the datawrapper repository.
16411 (camel_mime_part_init): Set the default type to text/plain.
16412 (camel_mime_part_construct_content): Removed to
16413 camel-mime-part-utils.c
16414 (my_get_output_stream): Removed. The streeam is in the
16416 (my_get_content_object): Removed. The content object is stored in
16417 the medium. If none is there, the object wasn't created properly.
16418 (my_write_content_to_stream): Removed. The content object is the
16419 one that knows how to write itself out!!!!!!!!
16420 (my_write_to_stream): Remove the base header writing stuff - has
16421 been moved to camel-medium, where it belongs. This can just be
16422 used to check for mandatory headers.
16423 (my_construct_from_stream): Removed.
16424 (my_set_input_stream): What the hell, i'll remove this too.
16425 Nobody seems to understand how it differs from create from stream,
16426 and they both seem to serve the same purpose ...
16428 * camel-simple-data-wrapper.c (construct_from_parser): Initial
16429 implementation of a content constructor.
16430 (construct_from_stream): Removed! Job taken over by
16431 construct_from_parser.
16433 * camel-multipart.c (construct_from_parser): Multipart
16434 construction routine.
16435 (camel_multipart_init): Set the default multipart type to
16436 multipart/mixed. Duh, no subtype is not allowed anyway.
16437 (set_input_stream): REmoved. Replaced by construct_from_parser.
16439 2000-04-22 Dan Winship <danw@helixcode.com>
16441 * camel-multipart.[ch]: clean, document, etc.
16442 (camel_multipart_init): pick a prettier default boundary. Still
16443 need to deal with the larger problem
16445 2000-04-22 NotZed <NotZed@HelixCode.com>
16447 * camel-mime-message.h (struct _CamelMimeMessage): Removed
16448 send_date, and received_date, and replaced it with a time_t
16449 'date' (this is what the header is called), and date_offset to
16450 store the GMT offset of the date.
16452 * camel-mime-message.c (camel_mime_message_set_from): Update raw
16454 (_set_from): Removed.
16455 (_get_from): Removed.
16456 (camel_mime_message_get_from): Moved implementation here.
16457 (camel_mime_message_get_subject): Move implementation here.
16458 (_get_subject): Nuked.
16459 (camel_mime_message_set_subject): Handle utf-8 input, and also
16460 update raw header when changed.
16461 (_set_subject): Removed.
16462 (_set_received_date): Removed.
16463 (camel_mime_message_set_received_date): Removed.
16464 (_get_received_date): Removed.
16465 (camel_mime_message_get_received_date): Removed.
16466 (_get_sent_date): Removed.
16467 (camel_mime_message_get_sent_date): Removed.
16468 (camel_mime_message_get_date): New function to get the date as a
16470 (camel_mime_message_set_date): Set the date as a time_t/offset.
16471 (camel_mime_message_get_date_string): Get the date as a string.
16472 (camel_mime_message_init): Initialise the current date as
16473 'CMAEL_MESSAGE_DATE_CURRENT'.
16474 (_set_reply_to): Removed.
16475 (camel_mime_message_set_reply_to): Moved implementation here.
16476 This is still broken, reply-to can have multiple addresses.
16477 (_get_reply_to): Removed.
16478 (_set_field): Removed, no longer used anywhere.
16479 (_get_field): Also removed.
16480 (_init_header_name_table): Add the Date header.
16481 (process_header): Also handle snooping of Date header here.
16483 * camel-stream-filter.c (finalise): Unref the source stream on
16484 finalise, and also call the parent class (oops).
16486 * camel-mime-parser.c (camel_mime_parser_state): New function to
16487 get the current parser state.
16488 (camel_mime_parser_stream): Allow you to get the stream back from
16490 (camel_mime_parser_fd): Alternative to allow you to get the fd
16491 back from the mime_parser.
16492 (folder_scan_init_with_stream): Properly ref/unref the stream.
16493 (folder_scan_close): Properly unref the stream/close the fd on
16495 (folder_scan_init_with_fd): Close the old fd if there is one.
16497 * camel-data-wrapper.c (camel_data_wrapper_construct_from_parser):
16498 New method, construct a data wrapper from an initialised parser.
16499 (construct_from_parser): Empty implementation.
16501 * providers/mbox/camel-mbox-summary.c (message_struct_new):
16502 Convert subject line to unicode, before storing in the summary.
16503 (strdup_trim): Removed, no longer needed.
16505 * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): Ref
16506 the folder after setting it in the new message.
16508 * camel-mime-part.c (my_set_content_object): Have the headers
16509 follow the content-type change here too.
16510 (my_write_to_stream): Dont write content-type here, automatically
16511 stored in the headers ...
16512 (my_write_to_stream): Use header_disposition_format() to format
16513 the content-disposition header.
16514 (my_write_to_stream): Removed old code, all headers are now stored
16515 in the camel-medium level, always. Need to do the same with
16516 camel-mime-message i suppose ...
16517 (my_write_to_stream): Write the content using the parent class,
16518 not some weird function.
16519 (camel_mime_part_class_init): Dont override get_output_stream.
16520 (camel_mime_part_encoding_from_string): Bleh, make it
16523 * camel-mime-utils.c (header_content_type_is): Handle empty types.
16524 (header_encode_string): Start of an implementation of the rfc2047
16525 encoder. It does iso-8859-1, and us-ascii, and utf-8 (others get
16527 (rfc2047_encode_word): Convert a single word/string into rfc2047
16529 (quoted_encode): Different quoted-printable encoding for rfc2047
16530 encoding of headers.
16532 * gmime-content-field.c (gmime_content_field_write_to_stream): Use
16533 header_content_type_format() to format it.
16535 2000-04-21 NotZed <NotZed@HelixCode.com>
16537 * camel-mime-utils.h: Add prototype for header_param_list_free.
16539 * camel-recipient.c: New function to remove all the types of a
16540 recipient list. I think this whole object needs a major review.
16542 * camel-mime-message.c (camel_mime_message_class_init): Removed
16543 parse_header_pair override, override add_header instead.
16544 (_parse_header_pair): Renamed to add_header.
16545 (remove_header): Add this method, to make sure we keep upto date
16546 with removed headers too.
16547 (_set_field): If given a NULL value, clear it out.
16548 (_set_recipient_list_from_string): Constify.
16549 (set_header): Override set_header from camel_medium.
16550 (process_header): Local function to handle set/add/remove of each
16551 header we know about.
16553 * camel-mime-part.c (camel_mime_part_class_init): Removed
16554 parse_header_pair setup.
16555 (my_parse_header_pair): Moved into add_header(), removed.
16556 (my_set_disposition): Allow a NULL disposition to clear it.
16557 (my_set_content_id): Allow NULL content id to clear it.
16558 (remove_header): Track removed headers.
16559 (my_set_description): Allow NULL description to clear it.
16560 (my_set_content_MD5): Make sure we copy the md5 value, and allow a
16561 NULL value to reset it.
16562 (my_set_filename): Copy the filename.
16563 (my_set_header_lines): Removed. Nothing uses it, it doesn't
16564 actually serve any purpose.
16565 (camel_mime_part_set_header_lines): Ditto.
16566 (my_get_header_lines): Ditto.
16567 (camel_mime_part_get_header_lines): Ditto.
16568 (camel_mime_part_class_init): Remove *_header_lines setup.
16569 (camel_mime_part_init): Remove header_lines init.
16570 (my_finalize): Remove header_lines finalise.
16571 (my_write_to_stream): Write the headers here. This is just WRONG,
16572 camel_medium should be doing this.
16573 (my_get_output_stream): Kill a warning.
16574 (camel_mime_part_encoding_to_string): Ditto.
16575 (camel_mime_part_set_description): Unvirtualiase, use add_header()
16576 to do the processing.
16577 (my_set_description): Removed.
16578 (set_disposition): Renamed from my_set_disposition.
16579 (camel_mime_part_get_description): Get the descriptionf rom the
16581 (my_get_description): Removed.
16582 (my_set_filename): Removed.
16583 (camel_mime_part_get_filename): Get the parameter from the
16585 (camel_mime_part_encoding_from_string): Handle NULL string.
16586 (camel_mime_part_init): Remove reference to filename.
16587 (my_finalize): Dont free filename.
16589 * camel-mime-part.h (CamelMimePartClass): Removed
16590 parse_header_pair() method, it doesn't add anything that
16591 add_header() can't be used for.
16592 (CamelMimePartClass): Remove *_header_lines methods.
16593 (struct _CamelMimePart): Remove header_lines list.
16594 (struct _CamelMimePart): Removed filename attribute.
16596 * camel-medium.c (camel_medium_init): Init headers to null, not a
16598 (add_header): Append the headers as a list.
16599 (remove_header): Remove headers as a list.
16600 (get_header): Likewise for lookup.
16601 (free_header): Removed, no longer needed.
16602 (finalize): Free headers using header_raw_clear().
16603 (camel_medium_set_header): New function, to reset and override all
16604 values of a header with a new value.
16606 * camel-medium.h (struct _CamelMedium): Changed to use a
16607 header_raw struct rather than a hash table, to store headers
16608 (many headers can occur multiple times).
16610 * camel-mime-utils.c (header_raw_find_next): New function, allows
16611 you to find multi-valued header fields.
16612 (header_disposition_format): New function to format/create
16613 content-disposition header string.
16614 (header_param_list_format_append): Function to format parameter
16615 lists into a GString.
16616 (header_content_type_format): Function to format content-type into
16618 (header_set_param): allow NULL value to remove the parameter.
16619 (decode_token): Renamed from header_decode_token.
16620 (header_decode_token): New interface for external use.
16621 (quoted_decode): Made static to kill annoying warnings.
16622 (g_strdup_len): Killed, replaced with calls to g_strndup().
16623 (rfc2047_decode_word): Made static to kill warnings.
16624 (decode_coded_string): Terminated.
16625 (g_string_append_len): Made static to kill warnings.
16626 (header_decode_text): Made static to kill warnings.
16627 (header_decode_text): Constify.
16628 (rfc2047_decode_word): Constify.
16629 (header_param): Constify.
16630 (header_content_type_new): Copy the type/subtype strings.
16631 (header_param_list_decode): Made static.
16632 (header_param_list_format_append): Made static.
16633 (quoted_decode): Constify.
16634 (g_string_append_len): Constify.
16635 (header_token_decode): New function to decode a single token.
16637 * providers/mbox/camel-mbox-summary.c (header_write): Append a
16638 trailing \n when writing headers.
16639 (strdup_trim): Killed a warning.
16640 (camel_mbox_summary_set_uid): Make sure the next uid is at least 1
16641 higher than any existing one.
16642 (header_evolution_decode): Use header_token_decode to get the
16645 * camel-mime-parser.c (folder_scan_header): Strip the trailing \n
16646 of the end of all header lines.
16648 2000-04-20 NotZed <NotZed@HelixCode.com>
16650 * providers/mbox/camel-mbox-utils.[ch]: Removed.
16652 * providers/mbox/camel-mbox-parser.[ch]: Removed. Removed
16655 2000-04-20 Dan Winship <danw@helixcode.com>
16657 * camel-mime-utils.c (rfc2047_decode_word): use libunicode iconv
16658 functions rather than libc ones (since libc might not have them).
16659 (header_decode_date): add autoconfiscation on timezone code
16661 * camel.c (camel_init): call unicode_init ()
16663 2000-04-20 NotZed <NotZed@HelixCode.com>
16665 * providers/mbox/camel-mbox-summary.c (message_struct_new): Trim
16666 leading/trailing spaces off the raw headers.
16668 * MERGE NEW_PARSER branch into HEAD, fixed conflicts.
16670 * gmime-content-field.c (_print_parameter): Duh, removed again
16673 * camel-mime-utils.c (header_content_type_is): Constify.
16674 (header_content_type_unref): Killed a couple warnings.
16676 * camel-folder.c (_init): Removed more log crap.
16678 * providers/Makefile.am (SUBDIRS): Removed nntp, pending fixes for
16681 * providers/mbox/camel-mbox-folder.c (_get_message_by_number):
16682 Fixed for new summary interface. Added a warning for using this
16684 (_get_message_by_uid): Fixed for message new with session
16687 2000-04-19 Dan Winship <danw@helixcode.com>
16689 * camel-simple-data-wrapper-stream.c
16690 (camel_simple_data_wrapper_stream_get_type): This is a subtype of
16691 CamelSeekableStream, not CamelStream.
16693 * camel-seekable-substream.c: clean up a lot.
16694 (eos): When testing for end-of-stream, reset the parent position
16695 before testing if it is at end-of-stream, since either (a) it may
16696 have been seek'ed to eos by someone else, or (b) we may have been
16697 seek'ed away from eos and it hasn't been synced yet.
16699 * camel-medium.[ch] (camel_medium_add_header): const poison.
16700 (Belatedly goes with my change of 2000-02-23.)
16701 (camel_medium_init): Use g_strcase_{hash,equal} on the header
16704 2000-04-18 Dan Winship <danw@helixcode.com>
16706 * camel-mime-part.c (my_set_input_stream):
16707 * camel-data-wrapper.c (set_input_stream, set_output_stream): do
16708 better reference counting of streams so they actually go away
16711 * camel-log.[ch], *: Nuke camel log stuff. Replace calls to
16712 CAMEL_LOG_WARNING with calls to g_warning.
16714 * camel-data-wrapper.[ch]:
16715 * camel-simple-data-wrapper.[ch]:
16716 * camel-medium.[ch]: Clean, polish, document. Most of the gtk-doc
16717 comments added to camel-data-wrapper.c note serious problems that
16720 2000-04-17 Dan Winship <danw@helixcode.com>
16722 * camel-mime-message.[ch]: Remove the "session" field from
16723 CamelMimeMessage. Nothing uses it, about half of the existing
16724 calls to camel_mime_message_new_with_session pass NULL, and
16725 there's no obvious reason for it to be there.
16727 * providers/MH/camel-mh-folder.c:
16728 * providers/maildir/camel-maildir-folder.c:
16729 * providers/mbox/camel-mbox-folder.c:
16730 * providers/mbox/camel-mbox-utils.c:
16731 * providers/nntp/camel-nntp-folder.c:
16732 * providers/pop3/camel-pop3-folder.c: Use camel_mime_message_new
16733 instead of camel_mime_message_new_with_session.
16735 * camel-session.c (get_store_for_protocol_with_url): Set the
16736 exception if no provider is found.
16738 * camel-url.c: Add code to encode and decode %-escapes in URLs,
16739 and do some additional correctness-checking on URL syntax. From
16740 Tiago Antà o with modifications by me.
16742 2000-04-14 Chris Toshok <toshok@helixcode.com>
16744 * providers/Makefile.am (SUBDIRS): add nntp
16746 2000-04-14 Christopher James Lahey <clahey@helixcode.com>
16748 * providers/mbox/camel-mbox-folder.c: Fix switch statement.
16750 2000-04-14 Chris Toshok <toshok@helixcode.com>
16752 * providers/nntp/camel-nntp-folder.c (_exists): always return TRUE
16753 for now. we need to check the server response to make sure the
16755 (_get_message_by_uid): make sure to account for the \n we add to
16756 the string after every line.
16758 * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): function
16759 to get the headers using the XOVER command.
16760 (get_HEAD_headers): function to get the headers using the HEAD
16761 command on each message. slooooooow.
16762 (camel_nntp_get_headers): make this function use either XOVER or HEAD
16763 versions depending on whether or not the server extension is present.
16765 2000-04-14 Dan Winship <danw@helixcode.com>
16767 * camel-formatter.[ch]: This didn't belong in Camel. Move to mail/
16769 * Makefile.am, camel-types.h: remove references to
16772 2000-04-12 Matt Loper <matt@helixcode.com>
16774 * camel-folder-pt-proxy.c (_folder_open_cb): Print warning message
16775 for broken function.
16776 (_folder_close_cb): Same.
16778 2000-04-12 Miguel de Icaza <miguel@gnu.org>
16780 * Makefile.am (pthread_SRC): Use correct names for the pthread
16783 2000-04-10 Dan Winship <danw@helixcode.com>
16785 * providers/pop3/camel-pop3-store.c (pop3_connect): fix various
16786 bugs in APOP code (still untested) and some of the error cases.
16788 * camel-provider.h: Clarify what provider.protocol, provider.name,
16789 and provider.description should be.
16791 * providers/mbox/camel-mbox-provider.c:
16792 * providers/pop3/camel-pop3-provider.c:
16793 * providers/sendmail/camel-sendmail-provider.c:
16794 * providers/smtp/camel-smtp-provider.c: update protocols, names,
16797 * providers/mbox/camel-mbox-folder.c (_get_message_by_number):
16798 implement get_message_by_number for the mail fetch code.
16800 2000-04-09 Jeffrey Stedfast <fejj@stampede.org>
16802 * providers/smtp/camel-smtp-transport.c: reformatted to fit
16803 the standard indent format used by helix code
16805 2000-04-09 Dan Winship <danw@helixcode.com>
16807 * camel-movemail.c: New file with new function to dot-lock an mbox
16808 file and copy it to a safe private directory.
16810 2000-04-08 Christopher James Lahey <clahey@helixcode.com>
16812 * providers/smtp/.cvsignore: Added a .cvsignore file.
16814 2000-04-08 Dan Winship <danw@helixcode.com>
16816 * providers/sendmail/camel-sendmail-transport.c (_send_internal):
16817 actually record the pid returned by fork(). Noticed by clahey.
16819 * providers/smtp/camel-smtp-transport.c: #include <sys/param.h>
16820 for MAXHOSTNAMELEN. (This is a stopgap: some of the uses of
16821 MAXHOSTNAMELEN are wrong anyway...)
16823 2000-04-07 Jeffrey Stedfast <fejj@stampede.org>
16825 * providers/smtp/camel-smtp-transport.c: fixes to numerous bugs;
16826 should now build fine.
16827 * providers/Makefile.am: Readded smtp now that smtp builds without
16830 2000-04-20 NotZed <NotZed@HelixCode.com>
16832 * providers/mbox/camel-mbox-summary.c
16833 (camel_mbox_summary_next_uid): Public function to get the next
16834 uid, makes sure its saved to disk too.
16836 * camel-mime-part.c (my_finalize): Fix disposition crap with a
16838 (my_set_disposition): Likewise.
16839 (my_get_disposition): And here.
16840 (my_write_to_stream): And here, needs more cleanup.
16842 * providers/mbox/camel-mbox-folder.c (_append_message): Assign a
16843 new uid at this point.
16845 * gmime-content-field.c (gmime_content_field_write_to_stream):
16846 Make something up if we have an invalid/missing content type
16849 2000-04-19 NotZed <NotZed@HelixCode.com>
16851 * providers/mbox/camel-mbox-folder.c (_delete): Fixed completely
16852 broken switch() syntax, only compiled because errno is a macro on
16854 (_list_subfolders): Likewise.
16856 2000-04-18 NotZed <NotZed@HelixCode.com>
16858 * camel-mime-parser.c (folder_scan_init): init stream to null.
16860 * providers/mbox/camel-mbox-summary.c
16861 (CAMEL_MBOX_SUMMARY_VERSION): Moved to .c file, incremented.
16862 (index_folder): Changed to have index passed via the summary.
16863 (decode_string): Do a sanity check on the string size, so we dont
16864 visit g_malloc()'s friendly abort().
16866 * camel-folder-pt-proxy.c (camel_folder_pt_proxy_class_init):
16867 Removed reference to set_name.
16868 (_set_name): Removed.
16870 * providers/mbox/camel-mbox-utils.c
16871 (parsed_information_to_mbox_summary): Removed. Most of this file
16872 is about to be binned.
16874 * providers/mbox/camel-mbox-search.c (func_header_contains): Fixes
16875 for changes to summary interface.
16876 (struct _searchcontext): Remove pointer to message info, get it
16877 straight from the mboxsummary.
16878 (camel_mbox_folder_search_by_expression): New summary interface.
16879 (camel_mbox_folder_search_by_expression): Uh, the summary is not
16880 an object anymore (well not yet).
16882 * providers/mbox/camel-mbox-folder.c
16883 (camel_mbox_folder_class_init): Removed set_name init.
16884 (_set_name): Removed.
16885 (_open): Call new summary interface.
16886 (_close): Use new summary interface.
16887 (_create): Removed a summary object leak.
16888 (_get_message_count): New summary interface.
16889 (_get_uid_list): Use new summary interface. FIXME: this is leaky.
16890 (_get_message_by_uid): Use the new summary interface, some
16892 (_append_message): Totally changed, basically just appends the
16893 message directly, ignores the summary (for now), the summary will
16894 fix itself up if it needs to.
16895 (_check_get_or_maybe_generate_summary_file): Bye bye old code.
16896 (summary_get_message_info): Implement get_message_info again, for
16899 * camel-folder.c (camel_folder_class_init): Removed set_name
16901 (_set_name): Moved contents into _init.
16902 (_init): Perform the old functions of set_name here.
16904 * camel-folder.h: Removed the set_name internal interface.
16906 2000-04-14 NotZed <NotZed@HelixCode.com>
16908 * providers/mbox/camel-mbox-summary.[ch]: Completely replaced with
16911 * Makefile.am (libcamel_la_SOURCES): Removed
16912 camel-folder-summary.[ch].
16914 * camel-folder.h (struct _CamelFolder): Removed summary.
16915 (struct _CamelFolder): Changed flags to be 1 bit bitfields.
16917 * camel-folder-summary.[ch]: Class removed entirely.
16919 * camel-folder.c (camel_folder_get_summary): Removed.
16920 (camel_folder_summary_get_message_info): Moved from
16921 camel-folder-summary.c
16922 (camel_folder_summary_get_subfolder_info): Moved from
16923 camel-folder-summary.c
16925 * camel-mime-parser.c (folder_scan_step): Store the start of
16926 headers and start of from in the scan state.
16927 (camel_mime_parser_tell_start_headers): Query the start of the
16929 (camel_mime_parser_tell_start_from): Query the cached start of
16932 2000-04-13 NotZed <NotZed@HelixCode.com>
16934 * gmime-content-field.c (gmime_content_field_free): Removed this
16935 function. If its too dangerous to use, it shouldn't be here.
16936 (gmime_content_field_ref): Also ref the embedded content-type.
16937 (gmime_content_field_unref): Ditto to unref it.
16939 * camel-mime-utils.h: Add a refcount for content-type header.
16941 * camel-mime-utils.c (header_content_type_unref): Implement unref
16943 (header_content_type_ref): Implement ref for header content type.
16945 2000-04-12 NotZed <NotZed@HelixCode.com>
16947 * gmime-content-field.h: Changed to use a _header_content_type.
16948 Added type/subtype back for compatability with clients.
16950 * gmime-content-field.c: Basically a total rewrite, and now just a
16951 thin wrapper ontop of header_content_type.
16952 (_free_parameter): Got rid of it.
16953 (gmime_content_field_new): Use header_content_type_* functions.
16954 (gmime_content_field_set_parameter): Likewise.
16955 (_print_parameter): Blow away.
16956 (gmime_content_field_write_to_stream): Get details from the
16957 content_type field. Should check if it needs to escape chars in
16958 the paramter value.
16959 (gmime_content_field_get_mime_type): Likewise.
16960 (___debug_print_parameter): Get rid of this rather annoyingly
16962 (gmime_content_field_get_parameter): Simplified function.
16963 (gmime_content_field_construct_from_string): Fixed this to use a
16965 (gmime_content_field_is_type): New function to test if a type matches.
16966 (gmime_content_field_construct_from_string): Track type/subtype
16967 from subordinate content_type header struct.
16969 * gmime-rfc2047.[ch]: Removed. Unused.
16971 * camel-stream-b64.[ch]: Blown away more duplicated code.
16973 * Makefile.am: Removed camel-stream-b64.[ch], and
16976 * camel-mime-part.c (my_get_content_object): Replaced
16977 camel-stream-b64 with camel-stream-filter/camel-mime-filter-basic.
16978 (my_write_content_to_stream): Replaced camel-stream-b64 with the
16979 camel-stream-filter with an encoder.
16980 (my_get_content_object): Also implement quoted-printable decoding.
16981 (my_write_content_to_stream): Also implement quoted-printable
16983 (my_get_output_stream): Took out stream-b64 code (nothing's being
16984 executed yet anyway).
16986 * gmime-base64.[ch]: Blown away. Not used, dont need it.
16988 * camel-mime-utils.h: Added offset for this header. Records where
16989 it is in the source.
16991 * camel-mime-utils.c (header_raw_append_parse): Add offset
16992 parameter, to store where the header is stored in the stream.
16993 (header_raw_append): Added offset param.
16994 (header_raw_find): Return offset, if a pointer supplied for it.
16995 (header_raw_replace): Add offset param.
16996 (header_content_type_new): New function, to create an empty
16998 (header_content_type_set_param): Set a parameter in the
17000 (header_set_param): Generic header parameter setting function.
17001 (header_decode_string): Handle NULL input.
17003 * camel-mime-parser.c (camel_mime_parser_headers_raw): New
17004 function to get access to all the raw headers.
17005 (folder_scan_header): Keep track of the header start position, and
17006 store it when saving the header.
17008 2000-04-11 NotZed <NotZed@HelixCode.com>
17010 * camel-mime-utils.c: Moved a bunch of printf's to debug.
17012 * camel-mime-parser.c: Moved a bunch of printf's to debug.
17013 (folder_scan_header): Detect end of each header line using the
17014 last scanned char, and not the last scanned position.
17016 * camel-mime-filter-index.[ch]: Indexing filter. Indexes unicode
17017 sequences into ibex files.
17019 2000-04-09 NotZed <NotZed@HelixCode.com>
17021 * camel-mime-part.c: Dont include gmime-base64.h
17023 * camel-mime-filter-charset.c (complete): Implement the completion
17026 * camel-mime-parser.c (folder_scan_step): If we get to the end of
17027 the body data, check any filters for outstanding completion data.
17028 (camel_mime_parser_scan_from): Set whether we scan for "From "
17031 * camel-stream-filter.c (do_read): If we get to end of stream on
17032 the source, then call the filtering completion function to see if
17033 we have any more data to return.
17035 * camel-mime-filter-basic.c (filter): Implement quoted printable
17036 encoding and decoding filters.
17037 (complete): And the complete function as well.
17039 * camel-mime-utils.c (base64_encode_close): Also take an input
17040 buffer, allow closing of filters.
17041 (quoted_encode_step): First cut, simple quoted-printable encoder.
17042 Doesn't handle trailing spaces/tabs on end of line properly yet.
17043 (quoted_encode_close): Complete a quoted-encoding.
17044 (is_qpsafe): New type check, for quoted-printable safe characters
17045 (that do not need encoding). Thats all bits used in the type
17046 table! Rebuilt the types table.
17047 (header_content_type_is): Checks a content type against at
17048 type/subtype match.
17049 (header_content_type_param): Handle NULL content type pointer.
17051 2000-04-08 NotZed <NotZed@HelixCode.com>
17053 * camel-mime-filter-basic.c (filter): Implement the base64
17054 encoder. Problem is, there is no way to know when to close it.
17055 Close/Reset will have to provide the same args as filter, so it can
17056 flush remaining data *sigh*
17058 * camel-mime-utils.c (base64_encode_step): A rather complex base64
17060 (base64_step_close): Companion function to finish off the base64
17063 * camel-mime-part.c (my_write_content_to_stream): Changed to use
17064 camel_stream_write_to_stream().
17066 * camel-stream.[ch] (camel_stream_write_to_stream): From
17067 camel_stream_b64_write_to_stream(). Fixed some infinite loop
17068 bugs with error conditions.
17070 * camel-stream-b64.[ch] (camel_stream_b64_write_to_stream): Removed.
17071 This has nothing to do with stream-b64, so i've moved it to
17074 * camel-mime-utils.h: Add a comment about refcounting
17075 header_content_type struct.
17077 * Makefile.am: Added camel-stream-filter*.[ch].
17079 * camel-stream-filter.[ch]: Class to implement a generic
17080 (multipass) filter ontop of a stream. Only implements a read-only
17083 * camel-mime-parser.c (camel_mime_parser_filter_add): Ref the
17084 filter we just added.
17086 * Makefile.am: Added camel-mime-filter*.[ch].
17088 * camel-mime-filter-charset.[ch]: A filter to preform character set
17089 conversion (uses unicode_iconv).
17091 * camel-mime-filter-save.[ch]: A simple filter which will save all
17092 data directly to a file or file descriptor.
17094 * camel-mime-filter-basic.[ch]: Implements the basic mime filters,
17095 base64 and quoted-printable decoding (encoding not implemented yet).
17097 * camel-mime-filter.[ch]: A filtering class, which can filter streams
17098 of data without having to copy them. Simpler than stream classes,
17099 and can be plugged into a single stream class (when i write it).
17101 2000-04-07 Dan Winship <danw@helixcode.com>
17103 * providers/pop3/camel-pop3-store.c (pop3_connect): Clarify error
17105 (finalize): fix a bug in camel_exception usage
17106 (pop3_connect): Remember the password after asking for it the
17109 2000-04-07 NotZed <NotZed@HelixCode.com>
17111 * Makefile.am: Added camel-mime-parser/camel-mime-utils.
17113 * camel-mime-parser.c: Fast mime parser.
17115 * camel-mime-utils.c: Mime utility functions, and email header
17118 2000-04-07 NotZed <NotZed@HelixCode.com>
17120 * providers/Makefile.am: Removed smtp for now, its a long way from
17122 * providers/smtp/Makefile.in: Removed file that shouldn't have been
17125 2000-04-06 Matt Loper <matt@helixcode.com>
17127 * camel-folder-pt-proxy.c (_get_full_name): Remove exception param
17128 from get_full_name() called, since get_full_name() was changed to
17129 not have an exception in the last param (see dan's notes below).
17132 2000-04-06 Dan Winship <danw@helixcode.com>
17134 * camel-store.[ch]: Reorganize the folder-fetching methods and
17135 implement a folder cache so that multiple requests for the same
17136 folder will yield the same CamelFolder object (as long as it
17137 remains active). Includes some code to remove no-longer-active
17138 folders from the cache, but it doesn't get used since nothing is
17139 ever unref'ed in Camel right now...
17141 * providers/mbox/camel-mbox-store.c:
17142 * providers/pop3/camel-pop3-store.c: update for CamelStore
17145 * camel-folder.[ch]: Remove the (unused) CamelException argument
17146 from camel_folder_get_name and camel_folder_get_full_name.
17147 (camel_folder_set_name): make this go away since changing a
17148 folder's name after it has been created could result in it
17149 conflicting with a separately-issued folder.
17151 2000-04-05 Dan Winship <danw@helixcode.com>
17153 * g_url_new really wanted to take a CamelException. So, rename
17154 Gurl to CamelURL, g_url_* to camel_url_* (with camel_url_new
17155 taking an exception), and url-util.[ch] to camel-url.[ch]. Also
17156 force url->port to be numeric and remove camel_service_getport. (I
17157 was confused before: the URL RFC says the port must be numeric, so
17158 we don't want to do getportbyname.)
17160 2000-04-01 Dan Winship <danw@helixcode.com>
17162 * providers/mbox/camel-mbox-folder.c
17163 (_check_get_or_maybe_generate_summary_file): Compare
17164 mbox_file_size and mbox_modtime to the results of stat()ing the
17165 mbox file, not the summary file. Duh.
17166 (_close): Update the summary's mbox_file_size and mbox_modtime
17167 before writing it to disk.
17169 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_save,
17170 camel_mbox_summary_load): Wow. I must have been tired when I wrote
17171 this code. First, the comparison bug above. Second, it was using
17172 ntohs and htons instead of ntohl and htonl. Third, I was reading
17173 the status flag byte in two different places and thus getting out
17174 of sync. Fourth, it was writing out field_length bytes of each
17175 header field after having converted field_length to network byte
17176 order, resulting in lots of random crap being appended, and the
17177 summary files being huge. (Fortunately, since the size/modtime
17178 comparison was biffed, the garbage summary read from disk was
17179 always immediately discarded.)
17181 * providers/mbox/camel-mbox-parser.c (camel_mbox_parse_file): fix
17182 an off-by-one error that caused the last-used UID to be reused if
17183 the summary file was regenerated. (That one wasn't my fault. :-)
17185 2000-03-31 Dan Winship <danw@helixcode.com>
17187 * camel-stream-mem.c: implement unimplemented methods
17189 * gmime-content-field.c
17190 (gmime_content_field_construct_from_string):
17191 * data-wrapper-repository.c
17192 (data_wrapper_repository_get_data_wrapper_type):
17193 * camel-simple-data-wrapper.c (my_write_to_stream):
17194 * camel-mime-part.c (my_set_input_stream):
17195 remove debugging printf()s that no longer seem useful.
17197 2000-03-31 Matt Loper <matt@helixcode.com>
17199 * camel-formatter.c (text_to_html): Added "convert_newlines_to_br"
17200 boolean param, to give the option of not converting '\n's to <br>
17201 tags. This way, when we stick stuff in a <pre> tag, newlines stay
17204 2000-03-30 Matt Loper <matt@helixcode.com>
17206 * camel-formatter.c (handle_text_plain): Use <pre> tag to force
17207 the use of monospaced fonts.
17209 2000-03-30 Dan Winship <danw@helixcode.com>
17211 * camel-service.c (camel_service_getport): Add a htons in the
17212 default_number case, and document the fact that the function
17213 returns the port in network byte order.
17215 * providers/pop3/camel-pop3-store.c (pop3_connect): Revert
17216 Miguel's change. The port number bug was actually somewhere
17217 else, and the IP address copying code was fine already.
17219 2000-03-29 Miguel de Icaza <miguel@gnu.org>
17221 * providers/pop3/camel-pop3-store.c (pop3_connect): Add htons
17222 (port), and only copy 4 bytes for the IP address to prevent a DNS
17225 2000-03-28 Dan Winship <danw@helixcode.com>
17227 * camel-seekable-substream.c
17228 (camel_seekable_substream_new_with_seekable_stream_and_bounds):
17229 make this return a CamelStream rather than a
17230 CamelSeekableSubstream, because that's the way Gtk objects tend to
17233 * camel-service.c (camel_service_gethost,
17234 camel_service_getport): convenience functions to canonicalize
17235 the host and port values of a service's URL.
17236 * providers/pop3/camel-pop3-store.c: use them
17238 * providers/mbox/camel-mbox-folder.c
17239 (_check_get_or_maybe_generate_summary_file): Make this work when
17240 the inbox file doesn't yet exist.
17242 2000-03-27 Dan Winship <danw@helixcode.com>
17244 * providers/mbox/camel-mbox-folder.c (_append_message): uncomment
17245 the call to unlink the temp file: there's no way to tell
17246 camel_stream_fs to truncate a file, so reusing the same file was
17247 resulting in junk at the ends of messages.
17249 * camel-folder.[ch]: add delete_message_by_{number,uid}.
17251 * providers/pop3/camel-pop3-folder.[ch]: implement
17252 delete_message_by_uid. Add a close method to do expunging
17253 of deleted messages if requested.
17255 * providers/pop3/camel-pop3-store.[ch]: support for
17256 CamelPop3Folder::close. (You have to close the connection
17257 in order to expunge the folder, thus the store may be
17258 connected in the CamelService::is_connected sense when it
17259 is not actually connected to the server.) Also some bugfixes.
17261 2000-03-27 NotZed <NotZed@HelixCode.com>
17263 * providers/mbox/camel-mbox-folder.c (_append_message): Unref the
17264 output_stream when done, close doesn't do it.
17265 (_append_message): Clear all uid's from the appending messages, so
17266 they are reassigned proper unique id's.
17268 * gmime-utils.c (get_header_array_from_stream): Actually free the
17269 header, it is copied elsewhere.
17271 2000-03-26 NotZed <NotZed@HelixCode.com>
17273 * providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev): Added
17274 folder parameter to function. Fixed callers.
17275 (index_message): Index a message as it is assigned a unique id.
17277 * camel-mime-part.c (my_set_content_id): Make sure we malloc and
17278 copy the content_id, otherwise *poof*
17280 2000-03-25 NotZed <NotZed@HelixCode.com>
17282 * camel-medium.c (_finalize): Another leak, unref the content if
17285 * camel-recipient.c (camel_recipient_table_free): Plug another
17286 memory leak - actually free the recipient table.
17288 * camel-mime-message.c (_finalize): Plugged a memory leak with the
17291 * gmime-utils.c (_store_header_pair_from_string): A simpler, more
17292 debuggable and functionally identical header extraction function.
17294 2000-03-24 NotZed <NotZed@HelixCode.com>
17296 * gmime-content-field.c (gmime_content_field_set_parameter):
17297 Remove the hash table entry before freeing its key and data.
17299 2000-03-27 Dan Winship <danw@helixcode.com>
17301 * providers/Makefile.am (SUBDIRS): Add pop3.
17303 * providers/pop3/camel-pop3-store.c: keep separate input and
17304 output streams so the output doesn't end up being buffered.
17306 * providers/pop3/camel-pop3-folder.c (get_message_by_number):
17307 finish implementing this.
17309 2000-03-27 Michael Meeks <michael@helixcode.com>
17311 * camel-mime-part.c (my_set_disposition): fix so less broken.
17312 (my_finalize): remove dodgy disposition free.
17314 * camel-data-wrapper.c (my_set_mime_type_field): unref instead of
17317 2000-03-27 Dan Winship <danw@helixcode.com>
17319 * camel-service.c (camel_service_free_auth_types): new routine to
17320 free the data allocated by camel_service_query_auth_types.
17322 * providers/pop3/camel-pop3-store.c (free_auth_types): implement
17324 * camel-stream-mem.c (camel_stream_mem_new_with_buffer): rename
17325 camel_stream_mem_new_with_buffer to ..._with_byte_array and add a
17326 new ..._with_buffer that takes a char * rather than a GByteArray.
17328 * Remove CamelStreamBufferedFs, since CamelStreamBuffer makes it
17331 2000-03-25 Dan Winship <danw@helixcode.com>
17333 * camel-folder-summary.[ch]: change the CamelFolderSummary
17334 interfaces to allow partial summary queries (for dealing
17335 with very large folders). Remove the "extended_fields" from
17336 CamelFolderInfo and CamelMessageInfo: this is better dealt
17339 * providers/mbox/camel-mbox-summary.[ch]: Make CamelMboxSummary a
17340 subclass of CamelFolderSummary. Update interfaces for that. Remove
17341 the internal/external summary distinction. Remove the (unused) md5
17342 checksum in the folder summary. Change the summary file format
17343 (primarily to make it no longer byte-order dependent) and add a
17344 version number to it so it will be easier to change in the future.
17346 * providers/mbox/camel-mbox-folder.[ch]
17347 * providers/mbox/camel-mbox-search.c
17348 * providers/mbox/camel-mbox-utils.c: update for summary changes
17350 * camel-exception-list.def: add
17351 CAMEL_EXCEPTION_FOLDER_SUMMARY_INVALID
17353 2000-03-23 NotZed <NotZed@HelixCode.com>
17355 * providers/mbox/camel-mbox-provider.c: Added flag to provider
17356 initialisation, to match changed structure.
17358 2000-03-22 NotZed <NotZed@HelixCode.com>
17360 * camel-folder.[ch]: Added async search api.
17362 * providers/mbox/camel-mbox-search.c
17363 (camel_mbox_folder_search_by_expression): Changed to use an
17364 asynchronous interface.
17365 (camel_mbox_folder_search_cancel): Cancel function for async
17368 2000-03-23 Dan Winship <danw@helixcode.com>
17370 * camel-stream-buffer.c (camel_stream_buffer_read_line): Function
17371 to read one line of any size from a stream and return it in
17374 2000-03-22 Dan Winship <danw@helixcode.com>
17376 * camel-service.c (camel_service_query_auth_types): New function
17377 to query a service for the authentication protocols it supports.
17378 * providers/pop3/camel-pop3-store.c (query_auth_types): implement
17380 * camel-provider.c (camel_provider_scan): New function to
17381 scan the provider dir and return a list of all providers.
17383 * providers/pop3/camel-pop3-folder.c: fill this in partially
17384 * providers/pop3/camel-pop3-store.c: make camel_pop3_command
17385 return the text after "+OK"/"-ERR" and add a separate
17386 camel_pop3_get_additional_data to get the message body or
17387 whatever. Also make them take a CamelPop3Store rather than
17388 a CamelStreamBuffer.
17390 2000-03-22 Matt Loper <matt@helixcode.com>
17392 * camel-formatter.c (debug): Disabled some useless debug
17395 2000-03-21 Dan Winship <danw@helixcode.com>
17397 * providers/pop3: some initial bits of the POP3 provider, to
17398 make Matt happy. Incomplete, untested, etc.
17400 2000-03-21 bertrand <bertrand@helixcode.com>
17402 * providers/mbox/camel-mbox-summary.c
17403 (camel_mbox_summary_append_internal_to_external): copy the size field
17405 * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): initialize
17406 message_info to NULL
17408 * camel-folder-summary.h: added the size field.
17410 * providers/mbox/camel-mbox-summary.h:
17411 added the received_date field.
17413 * providers/mbox/camel-mbox-summary.c:
17414 documented all functions.
17416 * camel-folder-summary.h: name change and
17419 * providers/mbox/camel-mbox-search.c: update to
17420 conform to name change in the summary fields.
17422 2000-03-10 bertrand <bertrand@helixcode.com>
17424 * camel-service.h: cosmetic changes.
17426 2000-03-09 Dan Winship <danw@helixcode.com>
17428 * s/HelixCode/Helix Code, Inc./ in the copyrights
17430 2000-03-07 bertrand <bertrand@helixcode.com>
17432 * camel-formatter.c (handle_mime_part):
17433 plug mem leaks due to bad documentation
17434 of camel_content_field_get_mime_type
17435 (print_camel_body_part): idem
17436 (handle_multipart_alternative): idem
17438 * gmime-content-field.c (gmime_content_field_get_mime_type):
17442 * camel-mime-part.c (my_finalize): unref the
17443 content_input_stream if any.
17445 2000-03-06 bertrand <bertrand@helixcode.com>
17447 * camel-stream-fs.c (_seek): fix a bogus calculation
17448 in the return position.
17450 2000-03-05 bertrand <bertrand@helixcode.com>
17452 * camel-session.h: cosmetic fixes.
17454 * camel-stream-fs.c (_read):
17455 (_seek): fixed the current position so that it refers
17456 to the current position in the stream, not in its parent.
17458 2000-03-04 NotZed <NotZed@HelixCode.com>
17460 * providers/mbox/camel-mbox-search.c
17461 (camel_mbox_folder_search_by_expression): Ref the summary
17462 after we have got it.
17464 2000-03-04 bertrand <bertrand@helixcode.com>
17466 * camel-mime-part.c (my_write_content_to_stream):
17467 stream the raw content instead of nothing if the encoding
17470 * camel-stream-fs.c (_seek): handle eos more
17473 * camel-formatter.c (get_bonobo_tag_for_object):
17474 bonobo-goad-id is the good key to look for.
17475 (get_bonobo_tag_for_object): close the <object> tag.
17476 (get_bonobo_tag_for_object): the correct syntax for the
17477 to set a parameter inside an <object> tag is :
17478 <object classid="..."> <param name="uid" value="..."> <param ...>
17481 2000-03-03 bertrand <bertrand@helixcode.com>
17483 * providers/mbox/camel-mbox-folder.c (_get_message_by_uid):
17484 use set_input_stream instead of construct_from_stream
17485 to feed the message object.
17487 * camel-data-wrapper.c (my_write_to_stream): reset output stream.
17488 (my_set_input_stream): unref the previous input stream.
17489 use the set_output_stream for default behaviour.
17490 (my_set_output_stream): unref previous output stream.
17492 * camel-mime-part.c (my_write_content_to_stream): reset content
17493 object output stream.
17495 2000-03-03 NotZed <NotZed@HelixCode.com>
17497 * providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev): Make
17498 sure we open with create with a creation mask.
17500 2000-03-01 NotZed <NotZed@HelixCode.com>
17502 * camel-mime-part-utils.c
17503 (camel_mime_part_construct_content_from_stream): DO NOT assert on
17504 content type, we have fallback code 4 lines below it ... *sigh*
17506 2000-02-29 NotZed <NotZed@HelixCode.com>
17508 * Makefile.am (libcamelinclude_HEADERS): Added camel-stream-buffer
17511 * camel-stream-buffer.[ch]: Generic buffer which can be applied to
17514 2000-03-03 bertrand <bertrand@helixcode.com>
17516 * camel-formatter.c (handle_image): in the case
17517 of images, put the content object output stream
17518 in the url. This allows the message browser
17519 to show inline images.
17521 * camel-stream-b64.c (my_read_encode): fixed state
17524 2000-03-02 bertrand <bertrand@helixcode.com>
17526 * camel-stream-b64.c (my_read_encode): don't forget to
17527 set the state to 0 after 3.
17528 (my_read_encode): don't forget to encode, even in state 3.
17530 * camel-simple-data-wrapper.c: static functions are prefixed
17531 with my_ instead of _
17532 * camel-multipart.c: static functions are prefixed
17533 with my_ instead of _
17534 (my_write_to_stream): commented.
17535 (my_write_to_stream): warning in case the boudary is set
17536 but is a zero length string.
17538 * camel-mime-part.c (camel_mime_part_encoding_from_string):
17539 remove debug trace.
17541 * camel-mime-part.c: Replaced all static functions
17542 with name begining with _ by the same name begining
17543 with "my_" to prevent the possible conflicts
17544 with system symbols Dan warned us about.
17546 * camel-stream-b64.c (camel_stream_b64_write_to_stream):
17547 use CamelStreamB64 type for the input stream.
17549 * camel-mime-part.c (_get_content_object): remove
17551 (_write_content_to_stream): implement the b64
17552 encoding the new way (that is using camel_stream_b64)
17554 * camel-data-wrapper.c (my_write_to_stream):
17555 fix implementation so that it writes properly
17556 to the output stream even.
17558 * camel-stream-b64.c (camel_stream_b64_write_to_stream):
17559 fix implementation.
17561 2000-02-29 bertrand <bertrand@helixcode.com>
17563 * camel-stream-b64.c (camel_stream_b64_write_to_stream): new
17566 * camel-data-wrapper.c (_write_to_stream): default
17569 * gmime-utils.c (_store_header_pair_from_string):
17570 revert strange changes.
17572 * camel-stream-b64.c (my_read_decode): set eos to true when we
17573 have read the whole input stream.
17574 (my_reset): set eos to FALSE.
17576 2000-02-28 NotZed <NotZed@HelixCode.com>
17578 * camel-mime-part.c (_parse_header_pair): Dont free this either.
17580 * camel-medium.c (_remove_header): Ugh, dont free the header
17581 before we actually remove it.
17582 (_add_header): Ugh, dont free hashtable entries which may be
17583 duplicated (hash_insert _will_ reference that memory).
17585 * string-utils.c (string_trim): Trimming a 0-length string is not
17588 * camel-mime-message.c (_parse_header_pair): Fixed very broken
17589 memory handling of header_name/value.
17591 * providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev):
17592 Initialise end_of_last_message always.
17593 (camel_mbox_copy_file_chunk): Stop trying to read if we run out of
17594 data, rather than looping forever.
17595 (camel_mbox_write_xev): Use an open flag when opening with create.
17597 * camel-folder.c (camel_folder_search_by_expression): No, its not
17598 a fatal error to search on a non-searchable folder, you just dont
17600 (_open): Dont open an opened folder (i dont see why this is really
17601 a bug, but what the hell ...)
17603 * providers/mbox/camel-mbox-folder.c (_init): Set search cap on.
17604 (_open): Call parent class to perform open. Remove folder-open
17605 check to parent instead.
17606 (_create): open takes a creation mask, dont use umask to try and
17608 (_delete): Dont bother checking folder==NULL, its already been
17609 checked on the external interface (changed to an assertion, this
17610 would have to be a camel bug).
17611 (_delete_messages): Likewise.
17613 (_init): Dont go and clear all the paths and shit that the parent
17614 open just setup for us.
17615 (_delete_messages): Get rid of more umask stuff.
17616 (_append_message): Make sure we pass file mode to open with create.
17617 (_append_message): Cleaned up some indenting to make it readable.
17619 * camel-stream-b64.c (my_read_encode): Fixed a typo.
17621 * providers/mbox/camel-mbox-search.c: Changed to use e-sexp,
17622 rather than filter-sexp.
17624 2000-02-28 bertrand <bertrand@helixcode.com>
17626 * camel-stream-b64.c (my_read_encode): encoding
17629 2000-02-23 bertrand <Bertrand.Guiheneuf@aful.org>
17631 * camel-stream-b64.c: changed the __static
17632 suffix into a my_ prefix.
17633 (camel_stream_b64_set_mode): reset the persistent
17635 (my_read_decode): remove superfluous %
17637 * providers/mbox/camel-mbox-utils.c (camel_mbox_copy_file_chunk):
17638 fix exception description message.
17640 2000-02-24 Dan Winship <danw@helixcode.com>
17642 * camel-session.c: Add camel_session_get_transport_for_protocol.
17644 * camel-transport.h:
17645 * camel-transport.c: Add an abstract CamelTransport class.
17647 * providers/sendmail/*: A CamelTransport that uses sendmail
17650 2000-02-24 Dan Winship <danw@helixcode.com>
17652 * camel-folder.c: use CamelExceptions for run-time errors, not
17653 incorrect code. Don't bother validating that an object exists from
17654 inside one of its methods, since you couldn't have gotten there if
17655 it didn't. Fix some code style bugs.
17657 (_init): Rename init_with_store to init and add parent_folder,
17658 separator, and name arguments.
17659 (_set_name): Get separator from self, not parent_store now.
17662 * camel-store.c: Remove get/set_separator.
17664 * providers/mbox/: Update for above.
17666 2000-02-23 Dan Winship <danw@helixcode.com>
17668 * camel-medium.c (_finalize): Free the data in the headers hash
17670 (_add_header): g_strdup the header name and value when adding it.
17672 * camel-mime-part-utils.c
17673 (camel_mime_part_construct_headers_from_stream): Free the header
17674 data after calling camel_medium_add_header, since it will have
17675 g_strdup()ed it itself.
17677 2000-02-22 NotZed <NotZed@HelixCode.com>
17679 * providers/mbox/camel-mbox-search.c: Dont compile by default.
17681 * providers/mbox/Makefile.am: Fuck off the filter code.
17683 2000-02-22 bertrand <Bertrand.Guiheneuf@aful.org>
17685 * camel-stream-b64.c (read_decode__static):
17686 don't read the char if we reached the length
17687 of the output buffer. Hours lost on this
17690 * camel-folder.c (camel_folder_get_subfolder):
17691 (camel_folder_create):
17692 (camel_folder_delete):
17693 (camel_folder_delete_messages):
17694 (camel_folder_list_subfolders):
17695 (camel_folder_expunge):
17696 (camel_folder_get_message_by_number):
17697 (camel_folder_get_message_count):
17698 (camel_folder_append_message):
17699 (camel_folder_copy_message_to):
17700 (camel_folder_get_summary):
17701 (camel_folder_get_message_uid):
17702 (camel_folder_get_message_by_uid):
17703 (camel_folder_get_uid_list):
17704 Check folder state (open/close) and raise an
17705 exception if it is not ok.
17707 * providers/mbox/camel-mbox-folder.c (_create):
17708 create the file and the path with two different
17711 * camel-folder.c (_create): handle the case
17712 when the folder name starts with '/'
17714 * camel-exception.c (camel_exception_new): use
17715 (void) instead of () in decl.
17717 * camel-exception.h: cosmetic fixes.
17719 * camel-exception.c (camel_exception_init): new routine.
17720 Fix a bug in mail/message-list.c
17723 * camel-folder.h: cosmetic changes.
17725 * camel-stream-b64.c (reset__static): added a
17726 reset method. Thanks message-browser to find
17729 * providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): readd
17732 2000-02-21 bertrand <Bertrand.Guiheneuf@aful.org>
17734 * camel-formatter.c (lookup_unique_id):
17735 awful hack to test get_output_stream.
17736 * camel-stream-b64.[ch] :
17737 b64 encoding/decoding is now implemented as
17741 2000-02-21 bertrand <Bertrand.Guiheneuf@aful.org>
17743 * camel-seekable-substream.c (_reemit_parent_signal):
17744 emit "data_available" when parent stream emits it.
17747 2000-02-21 NotZed <NotZed@HelixCode.com>
17749 * providers/mbox/Makefile.am: Uh, fixed LIBADD again. What was
17750 there was never ever going to work, wasn't it tested?
17753 2000-02-21 Dan Winship <danw@helixcode.com>
17755 * camel-session.h: (struct _CamelSession): Add authenticator.
17757 * camel-session.c (camel_session_new): Add authenticator.
17758 (camel_session_query_authenticator): New function to query the
17759 session authenticator for password, etc, information.
17761 2000-02-21 Dan Winship <danw@helixcode.com>
17763 * camel-session.c: add CamelExceptions to several functions. Use
17764 camel_session_new to initialize the session and URL fields of
17765 created CamelStores as appropriate.
17770 * camel-service.c: Move the session and url (and associated
17771 functions) from CamelStore to CamelService. Add url_flags to
17772 CamelService so subclasses can specify which URL components
17773 are mandatory for them. Add camel_session_new for
17774 camel_session_get_store* to use.
17776 * providers/mbox/camel-mbox-folder.c:
17777 * providers/mbox/camel-mbox-store.c:
17778 * providers/mbox/camel-mbox-store.h: Update for above changes.
17780 * camel-exception-list.def: Once camel is being used for real,
17781 exceptions won't be renumberable. So renumber them now to make
17782 more room to add exceptions to the various categories later, and
17783 add a big warning message.
17785 2000-02-20 Dan Winship <danw@helixcode.com>
17787 * providers/mbox/Makefile.am: add libibex back to
17788 libcamelmbox_la_LIBADD
17790 2000-02-18 NotZed <NotZed@HelixCode.com>
17792 * providers/mbox/camel-mbox-search.h
17793 (camel_mbox_folder_search_by_expression): Added exception to call,
17796 * providers/mbox/camel-mbox-search.c
17797 (camel_mbox_folder_search_by_expression): Major changes, to use
17798 the sexp evaluator from filter/filter-sexp.c to implement the
17800 (func_body_contains): Changed to support multiple strings in 1
17801 command (results or'd together)
17803 * url-util.c (g_url_new): Fixed a typo (colon == 0 isn't right),
17804 and made it so full url's are absolute pathed (Dan, this is how it
17805 has to work!). Also, always include a path part, even if it is an
17808 2000-02-18 Dan Winship <danw@helixcode.com>
17810 * camel/camel-types.h: New header with the typedefs for all camel
17811 classes. Now the class headers can just include this and the
17812 header for the parent type. This makes it possible for
17813 CamelService to include a CamelSession without creating an
17817 * composer/e-msg-composer-attachment-bar.h:
17818 * mail/folder-browser.c:
17819 * mail/message-list.c: frob #includes to match the new reality
17821 2000-02-17 Dan Winship <danw@helixcode.com>
17823 * camel/camel-service.h:
17824 * camel/camel-service.c: Make camel-service us a Gurl internally.
17825 Remove the login/password interfaces and instead provide
17826 camel_service_connect_with_url. Add CamelExceptions
17828 2000-02-17 bertrand <Bertrand.Guiheneuf@aful.org>
17830 * camel/camel-formatter.c (handle_text_plain):
17831 (handle_text_html): use camel_stream_reset instead
17832 of seek. The formatter should be able to work
17833 with all streams, not only seekable streams.
17834 In the case where some provider implementation
17835 would not be able to provide a reset method
17836 to their stream, implementors would have
17837 to find a workaround.
17839 * camel/camel-session.c (camel_session_new): use
17840 (void) instean of () in function decl.
17842 * camel/camel-folder.c: ifdef async operation
17845 * camel/camel-seekable-stream.c (_seek): added a warning.
17846 (_reset): default implementation of reset for seekable
17849 * camel/camel-mime-message.h: set_received_date declaration fix.
17852 * camel/providers/mbox/camel-mbox-provider.c (camel_provider_module_init):
17853 use (void) instead of ().
17855 * camel/camel-stream.c (camel_stream_reset):
17856 new method for CamelStream.
17858 2000-02-17 Dan Winship <danw@helixcode.com>
17860 * camel/url-util.c (g_url_to_string): New function to convert
17861 a Gurl back into a char *.
17863 2000-02-17 bertrand <Bertrand.Guiheneuf@aful.org>
17865 * camel/camel-formatter.c (handle_text_plain):
17866 revamped so that it uses the output stream
17867 of the data wrapper
17868 (handle_text_html): ditto.
17871 * camel/camel-simple-data-wrapper.h:
17872 * camel/camel-simple-data-wrapper.c (camel_simple_data_wrapper_new):
17873 use (void) instead of ().
17874 (_get_output_stream): simple implementation.
17876 2000-02-16 bertrand <Bertrand.Guiheneuf@aful.org>
17878 * camel/camel-data-wrapper.c (_set_input_stream): ref input stream
17879 (_set_output_stream): ref output stream
17880 (_finalize): unref input and output streams
17882 * camel/camel-seekable-substream.c (_set_bounds): don't
17883 seek the begining of the substream.
17884 (_eos): fix eos condition testing.
17885 (_finalize): unref parent stream
17886 (_init_with_seekable_stream_and_bounds): ref parent stream
17888 * camel/gstring-util.c (g_string_equal_for_hash):
17889 (g_string_equal_for_glist): return type is int.
17892 * camel/camel.c (camel_init): use (void)
17895 2000-02-16 NotZed <NotZed@HelixCode.com>
17897 * providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): Added
17898 libfilter to link line (temporarily?). Required for
17901 2000-02-15 bertrand <bertrand@helixcode.com>
17903 * camel/camel-multipart.c (_localize_part):
17904 this routine replaces the _read_part routine
17905 and does not store the part in a buffer.
17906 (_set_input_stream): use the set_input_stream
17907 instead of the construct_from_stream.
17908 each bodypart is given an input stream.
17910 * camel/camel-mime-part-utils.c:
17911 include the data-wrapper-repository header.
17912 (camel_mime_part_construct_content_from_stream):
17913 use the set_input_stream instead of the
17914 construct_from_stream method.
17916 * camel/camel-seekable-substream.c (_set_bounds):
17917 cur position is set to 0 not to inf_bound.
17919 2000-02-15 bertrand <Bertrand.Guiheneuf@aful.org>
17921 * camel/camel-mime-part.c: include gmime-base64.h
17922 various compilation and runtime fixes.
17923 (_set_input_stream): store the input substream
17924 for the content object.
17926 * camel/camel-data-wrapper.h: declare the
17927 set/get function on input/output stream.
17929 * camel/camel-mime-part.c (_get_content_object):
17930 don't use a temporary mem stream.
17932 * camel/camel-seekable-substream.c (_seek):
17934 (_read): the substream can be unlimited in length
17936 * camel/camel-data-wrapper.c (camel_data_wrapper_class_init):
17937 set the get/set_input/output_stream methods.
17939 * camel/camel-multipart.c (_construct_from_stream):
17940 camel_stream_seek -> camel_seekable_stream_seek
17942 2000-02-14 Miguel de Icaza <miguel@gnu.org>
17944 * camel/providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): Add
17945 the unicode libraries as well.
17947 * camel/camel-provider.c (camel_provider_register_as_module): Add
17948 error reporting here. Desire to use Solaris increases. Hair loss
17949 in the last two hours: 5,400.
17951 * camel/providers/mbox/camel-mbox-provider.c
17952 (camel_mbox_get_provider): Renamed function.
17954 * camel/camel.h: All include files use camel/ now here.
17956 * camel/providers/mbox/Makefile.am: Drop all the dynamism from
17957 Camel, and make this a standard library.
17959 2000-02-14 bertrand <Bertrand.Guiheneuf@aful.org>
17961 * camel/gmime-utils.c (get_header_array_from_stream): use the
17963 (gmime_read_line_from_stream): ditto.
17965 * camel/camel-stream-fs.h (struct ): add the eof field
17968 * camel/camel-stream-fs.c (camel_stream_fs_init): set eof.
17969 (_read): set eof on end of file.
17970 (_eos): implemented.
17972 * camel/gmime-utils.c (get_header_array_from_stream):
17973 make a blocking version of the header parser.
17974 When the fs stream uses gnome-vfs, this should
17976 (gmime_read_line_from_stream): ditto.
17978 2000-02-11 bertrand <Bertrand.Guiheneuf@aful.org>
17980 * camel/camel-stream-fs.c:
17981 everywhere, when using the cur_pos field, do it
17982 on the CamelSeekableStream object.
17983 (_seek): small fix.
17985 * camel/camel-seekable-stream.c (camel_seekable_stream_seek):
17986 s/camel_stream_seek/camel_seekable_stream_seek/g
17988 * camel/camel-seekable-stream.h:
17989 (struct ): added a field to store the
17992 * camel/camel-seekable-stream.c (camel_seekable_stream_get_current_position):
17993 New function. Allows to get the current position
17994 of a seekable stream.
17997 2000-02-13 NotZed <notzed@zedzone.helixcode.com>
17999 * providers/mbox/camel-mbox-search.c: New file, implements the
18000 search api for mbox folders.
18002 * providers/mbox/Makefile.am: Link with ibex.
18004 * camel-folder.c (camel_folder_has_search_capability): Api
18006 (camel_folder_search_by_expression): Ditto.
18008 2000-02-12 NotZed <notzed@zedzone.helixcode.com>
18010 * providers/mbox/camel-mbox-folder.c (_set_name): Setup index
18012 (_init_with_store): Init index filename. Hmm, none of these
18013 names ever seem to get free'd (FIXME?)
18015 * providers/mbox/camel-mbox-folder.h: Add index file name.
18017 2000-02-12 NotZed <notzed@helixcode.com>
18019 * camel-folder.h: Add folder search functions.
18021 ** Created ChangeLog just for camel **
18022 - refer to ../ChangeLog for changes prior to this date.