Don't bother with counting down the timeout.
[platform/upstream/evolution-data-server.git] / camel / ChangeLog
1 2002-05-06  Jeffrey Stedfast  <fejj@ximian.com>
2
3         * camel-tcp-stream-raw.c (socket_connect): Don't bother with
4         counting down the timeout.
5
6 2002-05-02  Jeffrey Stedfast  <fejj@ximian.com>
7
8         * camel-stream-fs.c (stream_read): Same fix as the tcp stream.
9         (stream_write): Again here. Just like tcp stream's stream_write(),
10         also make sure to save errno before calling fcntl to restore the
11         fd flags.
12
13         * camel-tcp-stream-raw.c (stream_read): Handle EINTR errors for
14         select().
15         (stream_write): Same and also preserve errno when setting the fd
16         flags back. If w == -1, return -1.
17
18 2002-05-02  Jeffrey Stedfast  <fejj@ximian.com>
19
20         * camel-mime-utils.c (header_decode_mailbox): Fixed the fix for
21         stupidly-broken-mailer bug #5 to work when multiple unescaped
22         characters were in a row. Fixes bug #24140.
23
24         * camel-tcp-stream-raw.c (socket_connect): Check select() for
25         EINTR errors.
26
27         * camel-pgp-context.c (crypto_exec_with_passwd): Change the order
28         of some code so that we check if the select() failed before we
29         check for user-cancellation.
30
31         * camel-service.c (camel_gethostbyname): Check for EINTR when
32         select()ing.
33         (camel_gethostbyaddr): Same.
34
35 2002-04-29  Jeffrey Stedfast  <fejj@ximian.com>
36
37         * camel-provider.c (camel_provider_auto_detect): Now takes a
38         CamelURL argument rather than a GHashTable *settings argument.
39
40 2002-04-29  Not Zed  <NotZed@Ximian.com>
41
42         * providers/local/camel-spool-store.c (get_folder_info): We want
43         to set unread_count to get_unread_message_count, not
44         get_message_count().  Might fix #17174.  Also removed FIXME: as it
45         was fixed.
46
47 2002-04-26  Jeffrey Stedfast  <fejj@ximian.com>
48
49         * providers/local/Makefile.am: Don't link to libibex.a anymore.
50
51         * providers/nntp/Makefile.am: Same.
52
53         * providers/imap/Makefile.am: And again here.
54
55         * camel-store-summary.h: No longer want to #include
56         <libibex/ibex.h>
57
58         * camel-provider.c (camel_provider_auto_detect): New function to
59         auto-detect configuration settings.
60
61 2002-04-26  Not Zed  <NotZed@Ximian.com>
62
63         * camel-block-file.c (block_file_validate_root): Remove the
64         excessive \n's, after printfs.
65
66         * camel-text-index.c (text_index_compress_nosync): @!#$@#$!@$#!.
67         Since the rename op was fixed, this broke compression's rename,
68         resulting in the index 'vanishing' after every compress
69         (i.e. after every reindex).  Fix this code to account for the
70         fixed rename operation.
71
72 2002-04-25  Jeffrey Stedfast  <fejj@ximian.com>
73
74         * providers/smtp/camel-smtp-transport.c (smtp_rcpt): Don't put a
75         space between the "RCPT TO:" and the "<recipient>" strings -
76         rfc0821 was not clear on this but it seems rfc2821 defines a
77         grammar excluding that SP.
78         (smtp_mail): Same.
79
80 2002-04-24  Jeffrey Stedfast  <fejj@ximian.com>
81
82         * providers/local/camel-local-provider.c
83         (camel_provider_module_init): Configure the default paths for mh,
84         mbox, maildir, spools, etc.
85
86         * camel-provider.h: Add a CAMEL_PROVIDER_CONF_LABEL enum and
87         define some default CamelProviderConfEntry macros.
88
89 2002-04-19  Jeffrey Stedfast  <fejj@ximian.com>
90
91         * providers/pop3/camel-pop3-folder.c (pop3_refresh_info): Free the
92         LIST pop3 command.
93
94         * camel-data-cache.c (data_cache_finalise): Free the cdc->path.
95
96         * camel-multipart.c (write_to_stream): Don't g_return_val_if_fail
97         here if the boundary is an empty string. See bug #23676 for
98         details. The way I see it, we have 2 options: 1) leave this fix
99         the way it is, thus allowing multipart boundaries to be
100         empty-strings; or 2) make camel_multipart_get_boundary() change
101         the boundary to something legal if the boundary is an
102         empty-string. Since the parser should be able to handle an
103         empty-string boundary *and* more importantly because we want to
104         keep the same boundaries as the original raw message so as to be
105         able to verify multipart/signed parts, I vote for solution #1.
106
107 2002-04-19  Not Zed  <NotZed@Ximian.com>
108
109         * devel-docs/camel-index.txt: Start of a white-paperish document
110         describing camel-index and older libibex.
111
112 2002-04-18  Not Zed  <NotZed@Ximian.com>
113
114         * providers/local/camel-local-store.c (rename_folder): If we get a
115         failure, make sure we set an exception.
116
117         * camel-text-index.c (camel_text_index_rename): If the file
118         doesn't exist, just assume it never did, dont return failure.
119         (text_index_rename): Add '.index' to the path name we're using,
120         since we dont get it passed in.
121
122         * camel-folder-search.c (check_header): When doing a contains
123         match, split the words and perform an and on it.
124         (match_words_messages): If we have an index, but were forced to do
125         a full search, first lookup a subset of messages using
126         the index and a simplified word set.  Only do a manual search of
127         this subset.
128
129 2002-04-17  Not Zed  <NotZed@Ximian.com>
130
131         * camel-folder-search.c (match_message_index): Changed to take a
132         utf8 string not a regex pattern.
133         (match_words_index): Matches against a camel_search_words list.
134         (match_words_1message): Matches a single message against a
135         camel_search_words list.
136         (match_words_message): Same, but gets the message from the folder
137         for you.
138         (match_words_messages): Matches a list of messages against a words
139         list.
140         (search_body_contains): Rewritten to handle multiple word
141         searches.  For #23371.
142
143         * providers/imap/camel-imap-search.c (sync_match): Split words
144         when searching, to support multiple search words.  Also, try
145         searching specifying charset of utf8 if we can, if that fails,
146         fall back to not specifying charset.  TODO: It should translate
147         the strings into the locale default charset?
148
149         * providers/imap/camel-imap-store.c (connect_to_server): Added new
150         cap - utf8_search, if set, we tell the server we're searching
151         using utf8, otherwise we dont (incorrectly, since we always use
152         utf8 to search).
153
154         * camel-search-private.c (camel_ustrstrcase): Make this class public.
155         (camel_search_words_split): Split a word into multiple words based
156         on whitespace, and keep track of whether the word is simple
157         (indexable directly), or not.
158         (camel_search_words_free): Free 'em.
159
160 2002-04-17  Jeffrey Stedfast  <fejj@ximian.com>
161
162         * camel-vee-folder.c (vee_search_by_expression): If the vee-folder
163         is the unmatched, we don't have our own expression so we cannot
164         merge them. Instead, just use the expression passed in. This fixes
165         a Null-Pointer-Read crash on Solaris systems at least.
166
167 2002-04-16  Jeffrey Stedfast  <fejj@ximian.com>
168
169         * camel-filter-driver.c (camel_filter_driver_filter_folder): Get
170         rid of an unused variable.
171
172         * providers/smtp/camel-smtp-transport.c (smtp_helo): Use
173         camel_gethostbyaddr since gethostbyaddr is not reentrant.
174
175         * camel-http-stream.c (http_connect): Updated after the rename of
176         camel_get_host_byname.
177
178         * camel-service.c (camel_gethostbyname): Renamed.
179         (camel_gethostbyaddr): New cancellable/reentrant version of
180         gethostbyaddr.
181
182 2002-04-14  Jeffrey Stedfast  <fejj@ximian.com>
183
184         * providers/local/camel-spoold-store.c: Added #include
185         <sys/types.h> for dirent.h which needs it on MacOS X.
186
187         * providers/local/camel-maildir-store.c: Same.
188
189         * providers/nntp/camel-nntp-store.c: Same.
190
191         * providers/imap/camel-imap-message-cache.c: Same.
192
193         * camel-provider.c: Same.
194
195         * camel-data-cache.c: Same.
196
197 2002-04-12  Jeffrey Stedfast  <fejj@ximian.com>
198
199         * broken-date-parser.c (datetok): Treat commas as token
200         delimeters.
201         (WEEKDAY_CHARS): Use full weekday names in case the broken mailer
202         used the full names.
203         (MONTH_CHARS): Same as above but for months.
204
205 2002-04-11  Not Zed  <NotZed@Ximian.com>
206
207         * providers/local/camel-spool-summary.c (spool_summary_sync_full):
208         If the last message(s) were deleted, and we had any messages
209         output, account for the lost \n of the following From line by
210         adding an extra \n. fix for #8214.
211
212 2002-04-10  Not Zed  <NotZed@Ximian.com>
213
214         * camel-mime-part-utils.c (convert_buffer): If we get a 0 length
215         input, return a 0 lenght output as valid - fixes bugs with some
216         iconv impl and its simpler anyway.
217
218 2002-04-11  Jeffrey Stedfast  <fejj@ximian.com>
219
220         * providers/imap/camel-imap-folder.c: Set the UID_SET_LIMIT value
221         to 4096. I ran into an issue tonight where apparently the IMAP
222         server changed the UIDVALIDITY and so Evo needed to re-fetch all
223         headers and it was trying to send a uid set of some 25k (yes, I
224         have a very large INBOX). Anyways, it was set to unlimited
225         before. Courier IMAPd can safely handle up to ~16k per token, but
226         UW IMAPd can only handle 8k per command-line, so I set it to 4k
227         just to be safe.
228
229 2002-04-10  Jeffrey Stedfast  <fejj@ximian.com>
230
231         * camel-mime-part-utils.c (convert_buffer): Fixed a bug that would
232         miscalculate how much data to copy into the GByteArray (negative
233         value) thus causing a segfault. Also optimized it while I was at
234         it.
235
236 2002-04-09  Jeffrey Stedfast  <fejj@ximian.com>
237
238         * camel-store.c (camel_store_init): Make the folder_lock
239         recursive. See bug #22363 for details. Basically,
240         get_folder_info() is requesting a diary folder which in turn
241         connects which requests then calls get_folder() but deadlocks
242         because get_folder_info already holds the lock.
243
244         * camel-mime-message.c (camel_mime_message_set_date): Don't adjust
245         the timezone offset if we used tm.tm_gmtoff because it is already
246         adjusted.
247
248 2002-04-09  Not Zed  <NotZed@Ximian.com>
249
250         * camel-mime-part.c (construct_from_parser): If we get multiple
251         Content-Type header values, change subsequent headers to
252         X-Invalid-Content-Type so it doesn't wreck processing.  This fixes
253         the reported case in #18929, but i dont know if it fixes the
254         original posters problems.
255
256 2002-04-08  Not Zed  <NotZed@Ximian.com>
257
258         * camel-vtrash-folder.c (vtrash_move_messages_to): If we find
259         we're moving from the vtrash to another folder, we need to convert
260         the uid from a vfolder uid to the source uid (+8).  Fix for
261         #20886.  Also changed to batch multiple moves to different folders
262         so they are done as efficiently as possible rather than one at a
263         time.
264
265         * camel-mime-utils.c (base64_decode_step): If we only get passed
266         '=', we back track only if we actually output any data.  Fix for
267         #21716.
268         (quoted_decode): Pass out size_t instead of int, and use 0 instead
269         of -1 for error since its not signed.  This will fix similar bug
270         to above in different circumstances since the result is taken as
271         unsigned.  This is only an internal func.
272         (quoted_encode): Return size_t just for consistency.
273
274         * camel-block-file.c (block_file_validate_root): Comment out the
275         debug and move it into a warning when the validation fails.
276
277 2002-04-08  Jeffrey Stedfast  <fejj@ximian.com>
278
279         * camel-mime-utils.c (uuencode_close): Don't count our filler when
280         encoding our line-length octet.
281
282 2002-04-05  Jeffrey Stedfast  <fejj@ximian.com>
283
284         * camel-http-stream.c (http_get_headers): Don't get the statuscode
285         here anymore.
286         (http_method_invoke): Use a User-Agent header and do basic proxy
287         authentication.
288         (stream_read): Handle redirects.
289         (camel_http_stream_set_user_agent): New function to allow client
290         to set the User-Agent string.
291         (camel_http_stream_set_proxy): New function for setting the proxy
292         server.
293         (camel_http_stream_set_proxy_authrealm): New function for setting
294         the proxy auth realm.
295         (camel_http_stream_set_proxy_authpass): New function for setting
296         the proxy auth password.
297
298 2002-04-04  Jeffrey Stedfast  <fejj@ximian.com>
299
300         * camel-folder-summary.c (message_info_new): Simplified since we
301         can now decode in-reply-to without getting extra cruft. Get rid of
302         the FIXME about having to check scan->id because of the
303         possibility of it being NULL, this can no longer happen.
304
305         * camel-mime-utils.c (header_references_inreplyto_decode): New
306         function to decode in-reply-to headers. Only grabs the first thing
307         that looks like a message-id and then returns.
308         (header_references_decode): Loop calling
309         header_references_decode_single (a new internal function).
310
311 2002-04-04  Not Zed  <NotZed@Ximian.com>
312
313         * providers/imap/camel-imap-search.c (imap_body_contains): If
314         (body-contains) is not passed any arguments, return empty/false.
315         Fixes a crash exposed by #15001.
316
317         * camel-remote-store.c (remote_connect): Reset the keepalive
318         timeout to 10 minutes rather than the 30 seconds I was using for
319         testing.
320
321 2002-04-03  Dan Winship  <danw@ximian.com>
322
323         * camel-provider.h (CamelProvider): make service_cache be an array
324         of CAMEL_NUM_PROVIDER_TYPES elements so you can have a single
325         provider offer both stores and transports. (Eg, Exchange, NNTP)
326
327         * providers/imap/camel-imap-provider.c: Don't initialize
328         service_cache here. (The session code can do it itself since the
329         url_hash and url_equal functions are stored as part of the
330         provider.)
331
332         * providers/nntp/camel-nntp-provider.c: Likewise.
333
334         * providers/local/camel-local-provider.c: Likewise.
335
336         * providers/pop3/camel-pop3-provider.c: Likewise.
337
338         * providers/sendmail/camel-sendmail-provider.c: Likewise.
339
340         * providers/smtp/camel-smtp-provider.c: Likewise.
341
342         * camel-session.c (register_provider): Initialize the provider's
343         service cache(s) here.
344         (camel_session_class_init): Don't initialize.
345         vee_provider.service_cache here.
346         (camel_session_destroy_provider): Update to destroy multiple
347         service_caches.
348         (service_cache_remove, get_service): Tweak these a bit to deal
349         with multiple service_caches.
350
351 2002-04-02  Jeffrey Stedfast  <fejj@ximian.com>
352
353         * camel-tcp-stream-ssl.c (set_errno): Handle a ton more nspr i/o
354         errno's.
355         (stream_connect): Act as if we are doing a non-blocking
356         connect. This is to try and work around bug #15120 where users get
357         an EINPROGRESS error. Maybe importing a PRFileDesc into SSL mode
358         automagically makes it non-blocking? I dunno.
359
360 2002-04-01  Jeffrey Stedfast  <fejj@ximian.com>
361
362         * camel-folder-summary.c (message_info_new): Updated the
363         construction of the references to match JWZ's updated algorithm
364         initialization (ie, append any In-Reply-To reference onto any
365         References header and never take more than a single message-id
366         from the In-Reply-To header since anything after the first will
367         probably just be email addresses). Fixes bug #1336.
368
369 2002-04-03  Not Zed  <NotZed@Ximian.com>
370
371         * providers/local/camel-local-folder.c
372         (camel_local_folder_construct): Turn indexing back on, fingers
373         crossed ...
374
375         * camel-block-file.c (sync_nolock): #!@$@$#@~#$
376         DF@#$!Q@$#!@$#!#%.  Well it helps if we're iterating a list to
377         iterate the node pointer ...
378
379         * camel-text-index.c (text_index_sync): Sync the key tables
380         explcitly.
381         (text_index_sync): Debug out frag info.
382         (camel_text_index_dump): Added a (rather large, but optional) raw
383         dumping mode for debugging purposes.
384
385         * camel-partition-table.c (camel_key_table_finalise): Sync root
386         block when done.
387         (camel_key_table_sync): New function, sync key table (root) explicitly.
388         (camel_partition_table_sync): Method to explicitly sync the
389         partition table.
390
391 2002-04-02  Not Zed  <NotZed@Ximian.com>
392
393         * camel-block-file.c (camel_block_file_free_block): Mark root
394         block dirty when we change it (this function isn't used yet
395         anyway).
396
397         * camel-text-index.c (text_index_add_name_to_word): Touch the root
398         block when we modify the counts.  Also, abort processing on any
399         errors.
400         (text_index_sync): Fix typo in comments.  Sync the block file
401         inside the lock.
402         (text_index_compress_nosync): Lock the old index while we're
403         compressing.
404         (text_index_compress_nosync): Remove the bogus while() at the end
405         of the while() loops!  Also plug a memleak - records weren't
406         freed.
407         (text_index_rename): Lock around rename op.
408         (text_index_add_name): More typos.
409         (text_index_sync): Touch root when changing it.
410         (text_index_add_name): "
411         (text_index_delete_name): "
412         (camel_text_index_new): Touch root if we change it.
413         (text_index_cursor_reset): Make sure we NULL pointers after we
414         free them (nothing uses this yet).
415
416         * camel-partition-table.c (hash_key): Remove some debug
417         accidentally left in.
418         (camel_partition_table_add): When linking in the next block list,
419         set the right previous pointer.
420         (camel_key_table_add): Simplify the 'left' calculation (it was
421         already ok though).
422         (camel_key_table_next): Initialise returns before processing.
423         Broaden the lock slightly, and simplify validity calculations.
424
425         * providers/imap/camel-imap-store.c (imap_keepalive): Put back in
426         the exception setup stuff i disabled for debugging.
427
428         * providers/local/camel-local-folder.c
429         (camel_local_folder_construct): Temporarily disable indexing.
430
431 2002-03-28  Not Zed  <NotZed@Ximian.com>
432
433         * camel-partition-table.c (camel_key_table_lookup): Change range
434         checking assert to a warning.
435
436         * providers/pop3/camel-pop3-folder.c (pop3_finalize): Make sure we
437         flush out all outstanding commands before finalising, stops being
438         finalised while outsanding requests are processed by the store
439         finalise.
440         (pop3_get_message): Instead of pre-fetching all messages, just
441         pre-fetch a maxiumum number at any one time, stops us running out
442         of cache fd's.
443         
444         * providers/nntp/camel-nntp-folder.c (nntp_folder_init/finalise):
445         Setup priv data + locks, & free.
446
447         * providers/imap/camel-imap-folder.c (imap_rescan): Batch all
448         message_chagned events into a single folder_changed event
449         (otherwise updates can be >>> expensive, like >5 hours for 80K
450         messages changing!).  Alternately it could use folder
451         freeze/unfreeze perhaps.
452
453 2002-03-27  Not Zed  <NotZed@Ximian.com>
454
455         * providers/imap/camel-imap-store.c (imap_keepalive): Pass an
456         exception to called code so it behaves properly since it uses the
457         passed exception to check returns.
458
459 2002-04-01  Dan Winship  <danw@ximian.com>
460
461         * providers/imap/Makefile.am (libcamelimap_la_LDFLAGS): Use
462         -avoid-version instead of -version-info 0:0:0, and specify
463         -module. (From Max Horn <max@quendi.de>).
464
465         * providers/local/Makefile.am (libcamellocal_la_LDFLAGS): Likewise.
466
467         * providers/nntp/Makefile.am (libcamelnntp_la_LDFLAGS): Likewise.
468
469         * providers/sendmail/Makefile.am (libcamelsendmail_la_LDFLAGS):
470         Likewise.
471
472         * providers/smtp/Makefile.am (libcamelsmtp_la_LDFLAGS): Likewise.
473
474         * providers/pop3/Makefile.am (libcamelpop3_la_LDFLAGS): Likewise.
475         Also remove $(KRB4_LDFLAGS) since KPOP is gone.
476         (INCLUDES): and $(KRB4_CFLAGS)
477
478 2002-03-28  Jeffrey Stedfast  <fejj@ximian.com>
479
480         * camel-filter-driver.c (do_copy): We now have to check to make
481         sure that p->message is non-NULL because we only load the message
482         when we have to.
483         (do_move): Same here.
484
485 2002-03-28  Dan Winship  <danw@ximian.com>
486
487         * camel-transport.c (camel_transport_send_to): Change the message
488         arg to a CamelMimeMessage instead of a CamelMedium. Even the NNTP
489         provider returns CamelMimeMessages, and we're never going to
490         support anything more exotic than that. Also do a few more
491         g_return_if_fails here instead of in the providers.
492         (camel_transport_can_send): No longer needed.
493         (camel_transport_send): Remove this too. It wasn't being used any
494         more, and it doesn't behave exactly the same in sendmail and smtp.
495
496         * providers/smtp/camel-smtp-transport.c (smtp_send,
497         smtp_can_send): Gone.
498         (smtp_send_to): Update for arg change.
499         (smtp_data): Make this take a CamelMimeMessage too.
500
501         * providers/sendmail/camel-sendmail-transport.c (sendmail_send,
502         sendmail_can_send): Gone.
503         (sendmail_send_to): Update for arg change, and merge in the part
504         that used to be shared with sendmail_send.
505
506 2002-03-27  Jeffrey Stedfast  <fejj@ximian.com>
507
508         * camel-filter-driver.c (camel_filter_driver_filter_folder):
509         Construct the source_url the right way. The previous way was
510         generating urls like pop://fejj@ximian.com;keep_on_server/inbox
511         which is wrong.
512
513 2002-03-26  Not Zed  <NotZed@Ximian.com>
514
515         * camel-text-index.c (text_index_normalise): Changed to use just
516         g_utf8_strdown instead of utf8_normalise, to match the indexing
517         code.  utf8_normalise is just far too expensive (saves approx 25%
518         total processing).
519
520 2002-03-25  Not Zed  <NotZed@Ximian.com>
521
522         * camel-text-index.c (text_index_add_name): When we add a new
523         name, up all of the cache limits, because we're probably going to
524         be adding more.
525         (text_index_sync): Drop the cache limits back down again, we dont
526         need them when looking words up.
527
528         ** MERGE camel_index branch.
529
530         * camel-text-index.[ch]: Added files i forgot to add (eep nearly
531         lost all this work!)
532
533         * camel-block-file.c (sync_nolock): Fix an infinite loop in syncing.
534
535 2002-03-21  Jeffrey Stedfast  <fejj@ximian.com>
536
537         * camel-folder-summary.c (camel_message_info_new_from_header): Use
538         the date in the received header for the received_date.
539
540 2002-03-22  Not Zed  <NotZed@Ximian.com>
541
542         * providers/local/camel-local-folder.c
543         (camel_local_folder_construct): Use the right option to remove the
544         index file and reset the index file on creation.
545         (camel_local_folder_construct): Remove any existing '.ibex' files
546         - these are the old format index files.
547
548         * camel-block-file.c (camel_block_file_rename): Lock io lock while
549         renaming.
550         (camel_key_file_rename): Lock around rename.
551         (block_file_validate_root): Implement sync flag checking.
552         (camel_block_file_touch_block): Turn off the sync flag if we're
553         touching any non-root block and write it to disk.  Shoudl this
554         fsync()?
555         (sync_nolock): sync the root block only if we need to.
556
557         * providers/local/camel-local-store.c (rename_folder): Re-enable
558         index rename code.  Not sure how race-free it is though.
559         (delete_folder): Delete the index file properly.
560
561         * camel-partition-table.c (camel_key_table_lookup): Initialise
562         output values to 0 before doing anything.
563         (camel_key_table_add): Do some range-checking on values.
564
565         * camel-text-index.c (text_index_compress): Changed to call sync here.
566         (text_index_compress_nolock): and not here - stops a recursive
567         sync call when sync performs a compress also.
568         (text_index_compress_nolock): Change to _nosync, since the locking
569         is irrelevent (recursive lock).  Fixed callers.
570         (text_index_add_name_to_word): If we get a failure with key table
571         ops, fail immediately.
572         (text_index_compress_nosync): Likewise.
573         (text_index_write_name): If the nameid is 0, do nothing.
574         (text_index_add_name): If we can't get a keyid, dont add it to the
575         partition table.
576         (camel_text_index_remove): Function to delete an index file.
577         (text_index_compress_nosync): Clean up temp files when done.
578
579         * camel-folder-search.c (match_messages_index): New function,
580         split from body_contains, matches a regex against all words in an
581         index.
582         (match_message_index): Similar to above but matches against an
583         individual message.
584         (search_body_contains): Changed to use above functions for
585         matching - substring matches should now work on indexed data.
586
587 2002-03-21  Not Zed  <NotZed@Ximian.com>
588
589         * camel-index.c (camel_index_words/names): New virtual
590         methods/stubs to get a cursor of all words and names.
591
592         * camel-text-index.c (text_index_compress_nolock): Split from
593         text_index_compress, so we can call the compressor while locked
594         also, removed lock calls.
595         (text_index_compress): Changed to stub which calls
596         text_index_compress_nolock.
597         (camel_text_index_key_cursor_new): New object to iterate through
598         a key table.
599         (text_index_words, text_index_names): Implement virtual functions
600         for iterating through all words or names.
601
602         * camel-block-file.c: Turn off some debug.
603
604 2002-03-20  Not Zed  <NotZed@Ximian.com>
605
606         ** New body index implementation.
607
608         * camel-index*: Code for camel index, a new class to replace ibex.
609
610         * camel-block-file.[ch]: block-based and link based
611         filesystem-in-a-file classes.
612
613         * camel-partition-table.[ch]: An implementation of a partition
614         table (automatically extending on-disk hash-table using ideal
615         hash), and a key-table, a key<>name mapping table.  Used by
616         camelindex.
617
618         * providers/local/*, camel-folder-summary.[ch]: Changed to use
619         camel-index interface rather than ibex.
620
621 2002-03-05  Not Zed  <NotZed@Ximian.com>
622
623         * providers/local/camel-maildir-summary.c (maildir_summary_check):
624         Do progress reporting of operations.
625         (maildir_summary_sync): Same here.
626
627 2002-03-04  Not Zed  <NotZed@Ximian.com>
628
629         * providers/local/camel-spoold-store.c (scan_dir): Kill a warning
630         with a cast.
631
632         * providers/local/camel-*.c: Changed for ibex->camelindex.
633
634         * camel-folder-search.c (camel_folder_search_set_summary): Init
635         summary_hash to point to 'static' uid strings.
636         (search_body_contains): Use the static uid memory to return
637         results rather than the values from the index library.
638
639         * camel-folder-search.[ch]: Changed to use camelindex object.
640
641         * camel-folder-summary.c (summary_build_content_info_message):
642         Use a stream to index content, also filter html mail first.
643         (camel_folder_summary_info_new_from_message): Use a stream
644         filtered to index content.
645         (main): Removed the test main code.  Added headers for open call
646         (ibex must've had them before).
647
648         * camel-folder-summary.[ch]: Changed from ibex to CamelIndex.
649
650         * camel-mime-filter-index.c (camel_mime_filter_index_finalize):
651         Unref index.
652
653         * camel-mime-filter-index.[ch]: Changed from ibex to CamelIndex.
654
655 2002-03-19  Jeffrey Stedfast  <fejj@ximian.com>
656
657         * camel-mime-utils.c (header_encode_param): Fix this to work
658         right. We need to convert the input buffer to the charset we claim
659         in the encoded param (duh).
660
661 2002-03-18  Jeffrey Stedfast  <fejj@ximian.com>
662
663         * providers/smtp/camel-smtp-transport.c
664         (connect_to_server_wrapper): Updated to use the same logic as the
665         POP code.
666
667         * providers/pop3/camel-pop3-store.c (connect_to_server): No longer
668         takes a stls_supported argument since we no longer need it with
669         the new logic.
670         (connect_to_server_wrapper): New logic: First try connecting to
671         the SSL port (995 by default), if that fails with
672         SERVICE_UNAVAILABLE, then we attempt to connect (to port 110 by
673         default) and try to use STARTTLS.
674
675 2002-03-15  Jeffrey Stedfast  <fejj@ximian.com>
676
677         * camel-folder.h: 
678
679         * camel-private.h: Don't allow any empty structs. If
680         !ENABLE_THREADS, provide a gpointer dummy member. Fixes bug #6382.
681
682 2002-03-13  Jeffrey Stedfast  <fejj@ximian.com>
683
684         * providers/smtp/camel-smtp-transport.c (smtp_auth): Added a
685         work-around for SMTP servers that can't read the RFCs and thus
686         implement SASL incorrectly. Oh well, that's life in the world of
687         mail clients I guess.
688
689 2002-03-12  Jeffrey Stedfast  <fejj@ximian.com>
690
691         * camel-digest-store.c (camel_digest_store_new): Now takes a url
692         argument.
693
694         * camel-digest-folder.c (digest_add_multipart): Fixed some memory
695         corruption and also modified to use CAMEL_IS_MIME_MESSAGE() rather
696         than comparing content-type strings.
697         (digest_get_message): Fixed a logic blooper.
698
699         * camel-folder-summary.c (camel_message_info_new_from_header): Set
700         the date fields of the CamelMessageInfo as well. This may even fix
701         some filter-related bugs where the user was trying to compare
702         dates.
703
704 2002-03-11  Jeffrey Stedfast  <fejj@ximian.com>
705
706         * camel-digest-store.c: A pretty empty store implementation to be
707         the parent store of a CamelDigestFolder.
708
709         * camel-digest-folder.c: Updated to reference it's parent store.
710
711 2002-03-11  Jeffrey Stedfast  <fejj@ximian.com>
712
713         * camel-digest-folder.c (camel_digest_folder_new): Allow any leaf
714         part to be a message/rfc822 part.
715         (digest_get_uids): Recurse the mime structure and add all
716         message/rfc822 parts and use a uid scheme similar to IMAP's mime
717         part naming convention.
718         (digest_get_message): Decode the uid to get the correct mime part.
719
720 2002-03-11  Ettore Perazzoli  <ettore@ximian.com>
721
722         * camel-mime-utils.c: Change the order of the mailing list magic
723         patterns so that the more mailing-list specific ones are on the
724         top.
725
726 2002-03-11  Jeffrey Stedfast  <fejj@ximian.com>
727
728         These fixes should fix bug #21737.
729
730         * providers/smtp/camel-smtp-transport.c
731         (connect_to_server_wrapper): Same as with the POP code.
732
733         * providers/pop3/camel-pop3-store.c (connect_to_server_wrapper):
734         Slight restructuring of the if-statements for the USE_SSL_ALWAYS
735         case so that we can't possibly return TRUE unless we really did
736         connect successfully.
737
738 2002-03-10  Dan Winship  <danw@ximian.com>
739
740         Rename the OpenSSL implementation of things to match the NSS
741         implementation so that callers don't need to care which one is
742         being used.
743
744         * camel-tcp-stream-openssl.c: Implement CamelTcpStreamSSL, not
745         CamelTcpStreamOpenSSL. Rename methods as well. Replace the
746         camel-tcp-stream-openssl.h include with camel-tcp-stream-ssl.h.
747
748         * camel-tcp-stream-openssl.h: Gone.
749
750         * camel-tcp-stream-ssl.c: Add a note explaining that this
751         implementation is only used for NSS, and that OpenSSL's
752         implementation is in another file. (Should probably do some CVS
753         renaming magic at some point.)
754
755         * camel-http-stream.c (http_connect): Remove OpenSSL refs; the
756         previously-NSS-specific code works for both now.
757
758         * camel-remote-store.c: Likewise.
759
760         * providers/smtp/camel-smtp-transport.c: Likewise.
761
762         * providers/pop3/camel-pop3-store.c: Likewise.
763
764         * Makefile.am (libcamelinclude_HEADERS): Remove
765         camel-tcp-stream-openssl.h
766
767 2002-03-10  Dan Winship  <danw@ximian.com>
768
769         * camel-tcp-stream.c (camel_tcp_stream_get_socket): Remove this:
770         it couldn't be generically used, because different subclasses
771         returned entirely different types of data.
772         (camel_tcp_stream_get_local_address,
773         camel_tcp_stream_get_remote_address): Add these to replace what
774         get_socket was being used for.
775         (camel_tcp_address_new, camel_tcp_address_free): Utility functions
776         for get_{local,remote}_address.
777
778         * providers/smtp/camel-smtp-transport.c: Change localaddr to a
779         CamelTcpAddress *.
780         (connect_to_server): Call camel_tcp_stream_get_local_address to
781         get the local IP address.
782         (smtp_disconnect): free localaddr.
783         (smtp_helo): Update for localaddr change.
784
785         * camel-tcp-stream-raw.c (stream_get_socket): Remove
786         (stream_get_local_address, stream_get_remote_address): Implement.
787
788         * camel-tcp-stream-ssl.c (stream_get_socket): Remove
789         (stream_get_local_address, stream_get_remote_address): Implement.
790
791         * camel-tcp-stream-openssl.c (stream_get_socket): Remove
792         (stream_get_local_address, stream_get_remote_address): Implement.
793
794 2002-03-08  Jeffrey Stedfast  <fejj@ximian.com>
795
796         * providers/pop3/camel-pop3-provider.c
797         (camel_provider_module_init): Don't call
798         camel_remote_store_get_authtypes since we no longer subclass
799         camel-remote-store.
800
801         * providers/pop3/camel-pop3-engine.c: Added STARTTLS to the
802         capabilities to look for.
803         (camel_pop3_engine_reget_capabilities): New function to re-get
804         capabilities.
805
806         * providers/pop3/camel-pop3-store.c: Updated to not subclass
807         CamelRemoteStore.
808         (connect_to_server): Rewritten to not depend on CamelRemoteStore's
809         connect implementation. Also added support for STLS (aka
810         STARTTLS).
811
812 2002-03-07  Jeffrey Stedfast  <fejj@ximian.com>
813
814         * camel-pgp-mime.c (camel_pgp_mime_part_sign): Add support for
815         hash type RIPEMD160.
816
817         * camel-cipher-context.h: Add RIPEMD160 hash type.
818
819         * camel-pgp-context.c (pgp_sign): Updated to consider hash
820         function for pgp5 and pgp6.
821         (pgp_clearsign): Same.
822
823         * camel-tcp-stream-openssl.c (stream_read): Add a timeout on the
824         select.
825         (stream_write): Same.
826
827 2002-03-06  Jeffrey Stedfast  <fejj@ximian.com>
828
829         * providers/smtp/camel-smtp-transport.c (connect_to_server): Fix
830         to work with OpenSSL.
831
832         * camel-tcp-stream-openssl.c: compile fixes.
833         (camel_tcp_stream_openssl_enable_ssl): Check to make sure that the
834         sockfd != -1, it's not enough to check that it is non-zero. Also
835         set the sockfd to -1 on fail (open_ssl_connection will close the
836         sockfd on fail).
837
838 2002-03-06  Dan Winship  <danw@ximian.com>
839
840         * providers/smtp/camel-smtp-transport.c (smtp_construct): Make
841         this compile.
842
843 2002-03-05  Jeffrey Stedfast  <fejj@ximian.com>
844
845         * camel-tcp-stream-ssl.c (save_ssl_cert): Removed. Glory glory
846         hallelujah!
847         (ssl_bad_cert): No longer calls ssl_save_cert or
848         ssl_cert_is_saved.
849
850 2002-03-05  Jeffrey Stedfast  <fejj@ximian.com>
851
852         * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_new_raw):
853         Start the ssl stream off in non-ssl mode (useful for STARTTLS).
854         (camel_tcp_stream_openssl_enable_ssl): New function to toggle an
855         ssl stream into ssl mode.
856         (open_ssl_connection): Close the sockfd on fail so our caller
857         doesn't have to - this also allows us to save the original errno.
858         (stream_connect): If we want ssl mode, do our ssl stuff.
859         (camel_tcp_stream_openssl_class_init): Init some SSL stuff here
860         instead of in open_ssl_connection since these only ever need to be
861         called once.
862         (stream_read): Only use SSL_read if we are in ssl mode.
863         (stream_write): Only use SSL_write if we are in ssl mode.
864
865         * providers/smtp/camel-smtp-transport.c (smtp_helo): Check for the
866         STARTTLS extension.
867         (connect_to_server): Try to use STARTTLS whenever possible rather
868         than the old way of doing things.
869         (connect_to_server_wrapper): Wrapper around connect_to_server() to
870         first try STARTTLS and then attempt normal SSL mode if we can't
871         connect via STARTTLS.
872
873         * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_enable_ssl): New
874         function to toggle an ssl stream into ssl mode.
875         (camel_tcp_stream_ssl_new_raw): Start the ssl stream off in
876         non-ssl mode (useful for STARTTLS).
877         (stream_connect): Only connect in SSL mode if required.
878
879 2002-03-01  Jeffrey Stedfast  <fejj@ximian.com>
880
881         * camel-vtrash-folder.h: 
882         * camel-vee-store.h: 
883         * camel-vee-folder.h: 
884         * camel-stream-null.h: 
885         * camel-stream-filter.h: 
886         * camel-store-summary.h: 
887         * camel-news-address.h: 
888         * camel-mime-utils.h: 
889         * camel-mime-parser.h: 
890         * camel-mime-filter-save.h: 
891         * camel-mime-filter-linewrap.h: 
892         * camel-mime-filter-index.h: 
893         * camel-mime-filter-html.h: 
894         * camel-mime-filter.h: 
895         * camel-mime-filter-from.h: 
896         * camel-mime-filter-crlf.h: 
897         * camel-mime-filter-chomp.h: 
898         * camel-mime-filter-charset.h: 
899         * camel-mime-filter-bestenc.h: 
900         * camel-mime-filter-basic.h: 
901         * camel-internet-address.h: 
902         * camel-folder-thread.h: 
903         * camel-folder-summary.h: 
904         * camel-folder-search.h: 
905         * camel-filter-driver.h: 
906         * camel-charset-map.h: 
907         * camel-address.h: Add c++ armoring.
908
909         * camel-object.h: s/class/klass
910
911 2002-03-01  Jeffrey Stedfast  <fejj@ximian.com>
912
913         * camel-mime-part-utils.c
914         (camel_mime_part_construct_content_from_parser): Reverted my
915         pgp/mime fixes here too.
916
917         * camel-mime-part.c (write_to_stream): Removed my pgp/mime raw
918         stream hack, this is causing problems such as some messages to not
919         displaying, view->source not working at all, etc.
920
921 2002-02-28  Jeffrey Stedfast  <fejj@ximian.com>
922
923         * camel-mime-parser.c: Changed offset variables from int's to
924         off_t's since the system may support large files.
925
926         * camel-mime-part-utils.c
927         (camel_mime_part_construct_content_from_parser): Rearrange the
928         save filter stuff so that we save raw streams for all mime
929         parts. If the mime part turns out to be a multupart, then don't
930         bother saving the raw stream, we only need to save the raw stream
931         for leaf parts.
932
933 2002-02-27  Jeffrey Stedfast  <fejj@ximian.com>
934
935         * camel-folder-summary.h: Don't #include camel-mime-filter-save.h,
936         we don't use it.
937
938         * camel-file-utils.c: Fixed a few 'might be used uninitialized'
939         warnings which were real problems.
940
941         * camel-mime-part-utils.c
942         (camel_mime_part_construct_content_from_parser): Save the raw mime
943         stream for any/all signed parts.
944
945         * camel-mime-part.c (camel_mime_part_init): Initialize our raw
946         stream to NULL.
947         (camel_mime_part_finalize): Unref our raw stream, if we have one.
948         (write_to_stream): If we have a raw stream, write that out instead
949         of re-encoding.
950
951         * camel-mime-filter-save.[c,h]: Rewritten to save to a stream
952         rather than a file.
953
954 2002-02-28  Not Zed  <NotZed@Ximian.com>
955
956         * camel-mime-utils.c (header_fold): Use the FOLD_SIZE as a
957         recommended folding size, but add a new FOLD_MAX_SIZE (=998, the
958         smtp max line size) as the hard limit for any output.
959
960 2002-02-27  Jeffrey Stedfast  <fejj@ximian.com>
961
962         * camel-mime-filter-chomp.c (camel_mime_filter_chomp_new): New
963         stream filter that chomps excess trailing whitespace from the end
964         of the stream. This is needed to update the PGP/MIME code to
965         comply with rfc3156.
966
967         * camel-pgp-mime.c (camel_pgp_mime_part_verify): Don't attach a
968         from filter, if it ain't from-filtered already, then we'll just be
969         breaking stuff. To become rfc3156 compliant, add a chomp filter
970         here.
971         (camel_pgp_mime_part_sign): Add a chomp filter here too.
972
973 2002-02-27  Not Zed  <NotZed@Ximian.com>
974
975         * camel-mime-part.c (init_header_name_table): Changed header
976         formatted table to contain a pointer to an output function, and
977         added in-reply-to and references headers.
978         (write_references): New function to write out references header,
979         folded properly.  It only approximates based on the last >, but it
980         should be adequate and will also handle invalid headers.
981         (write_fold): Function to write out headers folded.  Since this is
982         the default it isn't required.
983         (write_raw): Write out an already formatted header, e.g. most of
984         the rest.
985         (write_to_stream): Lookup header output function, if we have one,
986         use that, otherwise fold header using basic (dumb) function.
987
988         This is all for #14779.  A better fix is probably do have the
989         headers always stored formatted, but that can wait.
990
991 2002-02-25  Jeffrey Stedfast  <fejj@ximian.com>
992
993         * camel-digest-folder.c (camel_digest_folder_new): Allow all
994         multiparts that contain message/rfc822 attachments.
995         (digest_get_uids): Only assign uids to message parts.
996
997 2002-02-22  Jeffrey Stedfast  <fejj@ximian.com>
998
999         * camel-mime-part.c (camel_mime_part_set_filename): Set the 'name'
1000         parameter on the Content-Type too. Fixes bug #20779.
1001
1002 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
1003
1004         * camel-pgp-context.c (pgp_sign): Pass --always-trust to gpg
1005         (requested by users).
1006         (pgp_clearsign): Same.
1007         (pgp_encrypt): Here too.
1008
1009 2002-02-12  Jeffrey Stedfast  <fejj@ximian.com>
1010
1011         * providers/smtp/camel-smtp-transport.c (smtp_helo): Since the
1012         AUTH token sometimes uses '=' instead of whitespace, don't use
1013         smtp_token_next here.
1014
1015 2002-02-09  Not Zed  <NotZed@Ximian.com>
1016
1017         * providers/pop3/camel-pop3-engine.c (get_capabilities): Duh, when
1018         we grab the apop stamp it needs to include the <> as well, I even
1019         read the rfc, silly me.
1020
1021         * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): Doh,
1022         when iterating the authtype list, it helps to goto the next node.
1023         Found with help from miles.
1024
1025 2002-02-08  Not Zed  <NotZed@Ximian.com>
1026
1027         * providers/local/camel-spool-summary.c
1028         (camel_spool_summary_build_from): The day number has to be 2 chars
1029         wide, space filled to work properly with pine, etc.
1030
1031         * providers/local/camel-spoold-store.[ch]: new type of provider
1032         'spool directory', which lets you view external mbox dirs without
1033         adding any extra cruft.  Perhaps it should use . files to store
1034         summaries?  Still a bit experimental, there's a warning when you
1035         select it in the account editor.  Finished off most of #1185.
1036         Can't rename or move folders.
1037
1038         * camel-mime-utils.c (header_decode_date): If the date is
1039         100->1900 then we actually want to use it as the year in the tm
1040         struct, not year+100.  e.g. year 102 -> 2002, not 2102.
1041
1042 2002-02-07  Not Zed  <NotZed@Ximian.com>
1043
1044         * providers/local/camel-spool-store.c (get_folder): Pass path into
1045         spool_folder_new.
1046
1047         * providers/local/camel-spool-folder.c (camel_spool_folder_new): 
1048         (camel_spool_folder_construct): Take the full path to the folder
1049         and use that as the file path, independent of the full_name we
1050         use.
1051
1052 2002-02-07  Not Zed  <NotZed@Ximian.com>
1053
1054         * providers/local/camel-local-provider.c: Added new type, spoold
1055         provider, spoold: for local directories.
1056
1057         * providers/imap/camel-imap-store.c (get_one_folder_offline):
1058         Create offline uri's in a compatible manner to online ones.
1059
1060 2002-02-07  Dan Winship  <danw@ximian.com>
1061
1062         * camel-sasl-ntlm.c: Implementation of NTLM (aka "Secure Password
1063         Authentication") auth, taken from soup.
1064
1065         * Makefile.am (libcamel_la_SOURCES, libcamel_la_HEADERS): Add
1066         camel-sasl-ntlm.
1067
1068         * camel-sasl.c: Add refs to camel-sasl-ntlm.
1069
1070         * providers/imap/camel-imap-store.c (try_auth): Use
1071         imap_next_word() to skip over the "+ " of the continuation rather
1072         than just "resp + 2" since Exchange (incorrectly) returns "+"
1073         instead of "+ " for an empty continuation response.
1074
1075 2002-02-06  Jeffrey Stedfast  <fejj@ximian.com>
1076
1077         * camel-folder-summary.h: Remove the CAMEL_MESSAGE_NEEDS_REPLY
1078         flag, we no longer will be using this.
1079
1080 2002-02-04  Jeffrey Stedfast  <fejj@ximian.com>
1081
1082         * camel-http-stream.c (stream_read): Use camel_mime_parser_read to
1083         read internal parser data.
1084         (camel_http_stream_get_content_type): Implemented.
1085         (http_method_invoke): Use HTTP/1.0 instead of 1.1
1086
1087         * camel-mime-utils.c (header_decode_int): Made public.
1088
1089         * camel-http-stream.[c,h]: Added. New stream for HTTP requests
1090         (currently supported are GET and HEAD).
1091
1092         * camel-tcp-stream-ssl.c (stream_connect): Call set_errno
1093         appropriately.
1094
1095 2002-01-31  Not Zed  <NotZed@Ximian.com>
1096
1097         * camel-mime-utils.c (header_decode_domain): Oops, this was
1098         converting foo@[blah] to foo@[ blah ], fixed.
1099
1100 2002-01-30  Jeffrey Stedfast  <fejj@ximian.com>
1101
1102         * providers/pop3/camel-pop3-provider.c: Use "pop" instead of
1103         "pop3" so current configurations continue to work.
1104
1105 2002-01-30  Not Zed  <NotZed@Ximian.com>
1106
1107         * camel-sasl-login.c: Changed name from "NT Login" to simply
1108         "Login".
1109
1110         * providers/pop3/*: Entirely new pop implmentation, supporting
1111         pipelining.
1112
1113 2002-01-29  Not Zed  <NotZed@Ximian.com>
1114
1115         * camel-data-cache.c (free_busy): We dont want to unref the
1116         stream, instead, stop listening to the finalised events, and free
1117         the path only.
1118
1119 2002-01-25  Not Zed  <NotZed@Ximian.com>
1120
1121         * camel-data-cache.c (stream_finalised): Remove the object from
1122         the busy_stream hashtable, not the busy_path hashtable.
1123
1124 2002-01-29  Jeffrey Stedfast  <fejj@ximian.com>
1125
1126         * providers/imap/camel-imap-folder.c (imap_update_summary): Added
1127         more kludge to an existing Exchange IMAP 5.5 kludge to work around
1128         it returning multiple messages with the same UIDs.
1129
1130 2002-01-28  Jeffrey Stedfast  <fejj@ximian.com>
1131
1132         * camel-mime-message.c (process_header): Handle Resent headers
1133         too.
1134
1135         * camel-mime-message.h: Added Resent-* #defines.
1136
1137         * camel-filter-driver.c (camel_filter_driver_remove_rule_by_name):
1138         Use while (node->next) instead of while (node)
1139
1140         * providers/smtp/camel-smtp-transport.c (smtp_decode_status_code):
1141         New function to decode an enhanced status code.
1142         (smtp_set_exception): Sets an exception based on the
1143         Enhanced-Status-Code.
1144         (esmtp_get_authtypes): Don't diplicate the key in the hash since
1145         the key and value are the same.
1146         (smtp_rcpt): Include the failed recipient in the error message to
1147         be more helpful to the user.
1148
1149         * camel-mime-utils.c (hex_decode): Make sure to allocate enough
1150         for the NUL byte.
1151
1152 2002-01-28  Jeffrey Stedfast  <fejj@ximian.com>
1153
1154         * providers/smtp/camel-smtp-transport.c (smtp_construct):
1155         (connect_to_server): Use flags rather than a bunch of gboolean
1156         variables.
1157         (smtp_connect): Same.
1158         (smtp_mail): Here too. Use the enhanced status codes if available.
1159         (smtp_data): And again here.
1160         (smtp_helo): Finally here. Also detect the ENHANCEDSTATUSCODES
1161         extension.
1162         (smtp_rcpt): Use the enhanced status codes if available.
1163         (smtp_rset): Here too.
1164         (smtp_quit): And finally here.
1165
1166         * camel-transport.h: Removed gboolean supports_8bit since this is
1167         pretty local to only SMTP for now.
1168
1169 2002-01-24  Ettore Perazzoli  <ettore@ximian.com>
1170
1171         * Makefile.am: Remove some old cruft.
1172
1173 2002-01-24  Ettore Perazzoli  <ettore@ximian.com>
1174
1175         * tests/folder/Makefile.am: s/MAILER_LIBS/EVOLUTION_MAIL_LIBS/.
1176         * tests/message/Makefile.am: Likewise.
1177         * tests/mime-filter/Makefile.am: Likewise.
1178         * tests/misc/Makefile.am: Likewise.
1179         * tests/smime/Makefile.am: Likewise.
1180         * tests/stream/Makefile.am: Likewise.
1181
1182 2002-01-24  Jeffrey Stedfast  <fejj@ximian.com>
1183
1184         * camel-filter-driver.c (do_beep): Call the beep callback
1185         function.
1186         (camel_filter_driver_set_system_beep_func): New function to set
1187         the beep callback.
1188
1189 2002-01-22  Jeffrey Stedfast  <fejj@ximian.com>
1190
1191         * camel-filter-driver.c (camel_filter_driver_remove_rule_by_name):
1192         New function to remove a filter rule by name.
1193
1194 2002-01-21  Jeffrey Stedfast  <fejj@ximian.com>
1195
1196         * camel-filter-driver.c (do_beep): As a temporary solution, just
1197         printf ("\a"); to make a beep :-)
1198
1199         * providers/imap/camel-imap-command.c
1200         (imap_command_strdup_vprintf): Encode the mailbox to UTF-7 here.
1201
1202         * providers/imap/camel-imap-utils.c (imap_parse_list_response):
1203         Decode the mailbox name as we parse the list response.
1204         (imap_mailbox_decode): It's only an illegal mailbox name if it
1205         didn't switch back to US-ASCII mode.
1206
1207 2002-01-18  Jeffrey Stedfast  <fejj@ximian.com>
1208
1209         * providers/imap/camel-imap-utils.c (imap_mailbox_decode): New
1210         function to decode an IMAP mailbox name from modified UTF-7
1211         encoding to UTF-8.
1212         (imap_mailbox_encode): New function to convert a mailbox name from
1213         UTF-8 to IMAP's modified UTF-7 encoding.
1214
1215 2002-01-17  Jeffrey Stedfast  <fejj@ximian.com>
1216
1217         * camel-mime-filter-basic.c (filter): Stop uudecoding once the
1218         CAMEL_UUDECODE_STATE_END state bit gets set. Set the
1219         CAMEL_UUDECODE_STATE_BEGIN state bit once we find the begin line.
1220         (reset): No longer have uu_begin or uulen state variables, these
1221         are now stuffed into a single state variable.
1222
1223         * camel-mime-utils.c (uudecode_step): No longer needs a uulen
1224         argument and also keeps track of whether or not the end of the
1225         encoded data has been found in 'state'.
1226         (uuencode_step): Now stuffs uulen into state so that the uulen
1227         argument is no longer needed.
1228         (uuencode_close): Same.
1229
1230 2002-01-16  Jeffrey Stedfast  <fejj@ximian.com>
1231
1232         * camel-mime-filter-basic.c (filter): If we don't want to corrupt
1233         the uuencoded data by overwriting it with base64 decoded data
1234         afterward, we need to add a break statement!
1235
1236         * camel-folder-summary.c (summary_build_content_info): Add code to
1237         add a uu filter.
1238         (camel_folder_summary_finalize): Unref the uuencode filter.
1239
1240 2002-01-16  Jeffrey Stedfast  <fejj@ximian.com>
1241
1242         * camel-mime-filter-basic.c (filter): Fixed slight logic error to
1243         find the uuencode begin line. Fixes bug #18754.
1244
1245 2002-01-15  Jeffrey Stedfast  <fejj@ximian.com>
1246
1247         * providers/smtp/camel-smtp-transport.c (smtp_send_to): Updated to
1248         match the new send_to API.
1249         (smtp_send): Get the from address and pass that along to
1250         smtp_send_to().
1251
1252         * providers/sendmail/camel-sendmail-transport.c
1253         (sendmail_send_to): Updated to match the new send_to API.
1254
1255         * camel-transport.c (camel_transport_send_to): Now takes a from
1256         argument too.
1257
1258         * providers/imap/camel-imap-folder.c (imap_update_summary): Sort
1259         the needheaders UID array and fixed to respect the
1260         UID_SET_LIMIT. This should now finish the fixification of bug
1261         #2529. There's still the possible issue that a command-line (The
1262         only command-line I can think of that can still be too long is a
1263         SEARCH command, but this can't possibly be fixed until we rewrite
1264         the imap code to use Zucchi's ImapEngine idea).
1265
1266 2002-01-14  Jeffrey Stedfast  <fejj@ximian.com>
1267
1268         * providers/imap/camel-imap-folder.c (imap_expunge_uids_online):
1269         Move the command-lock outside the loop.
1270
1271 2002-01-14  Jeffrey Stedfast  <fejj@ximian.com>
1272
1273         * providers/imap/camel-imap-folder.c (imap_expunge_uids_online):
1274         Updated to use the new imap_uid_array_to_set() interface.
1275         (imap_expunge_uids_resyncing): Same.
1276         (do_copy): Here too.
1277         (imap_update_summary): Added a FIXME comment to rewrite allowing
1278         for a uid-set limitation.
1279         (get_matching): Copy some of the logic over from
1280         imap_uid_adday_to_set() to limit the length of the uid-set string.
1281         (imap_sync_online): Added a comment to explain what is going on
1282         with get_matching() since the behavior has changed slightly.
1283
1284         * providers/imap/camel-imap-utils.c (imap_uid_array_to_set):
1285         Modify the interface so that we can limit the size of the uid set
1286         string returned.
1287
1288 2002-01-14  Not Zed  <NotZed@Ximian.com>
1289
1290         * providers/imap/camel-imap-search.c (imap_body_contains):
1291         Rewritten to use a cache for body searches when online.  Will need
1292         some heavy testing but so far seems to be beneficial.
1293
1294         * providers/imap/camel-imap-folder.c (imap_search_by_expression,
1295         search_by_uids): dont initialise search object here.
1296         (camel_imap_folder_new): Setup search object here with pointer to
1297         cache dir.
1298
1299 2001-12-01  Not Zed  <NotZed@Ximian.com>
1300
1301         * camel-store-summary.[ch]: New class to store a store's folder
1302         list in.  Not yet completed.
1303
1304 2002-01-11  Jeffrey Stedfast  <fejj@ximian.com>
1305
1306         * providers/imap/camel-imap-folder.c (imap_update_summary): Kludge
1307         around a bug in Exchange 5.5 that reports 2 messages with the same
1308         UID. Fixes bug #17694. Replaces the fix from yesterday.
1309
1310 2002-01-10  Jeffrey Stedfast  <fejj@ximian.com>
1311
1312         * providers/local/camel-local-folder.c: If PATH_MAX doesn't exist,
1313         use _POSIX_PATH_MAX.
1314
1315         * providers/imap/camel-imap-folder.c (imap_update_summary): If mi
1316         is NULL, don't bother updating it. Should fix bug #17694.
1317
1318 2002-01-10  Jeffrey Stedfast  <fejj@ximian.com>
1319
1320         * camel.h: #include camel-mime-filter-tohtml.h
1321
1322         * providers/imap/camel-imap-folder.c (imap_update_summary): Kludge
1323         around Microsoft Exchange 5.5 (bug #5348) by forgetting our
1324         currently selected folder and re-SELECTing it so that the Exchange
1325         server has a chance to realise it has new messages.
1326
1327 2002-01-09  Jeffrey Stedfast  <fejj@ximian.com>
1328
1329         * providers/local/camel-local-folder.c
1330         (camel_local_folder_construct): If the mbox file is a symlink,
1331         follow the symlink and get the One True Path so that we can
1332         rewrite the mbox later without worrying about clobbering the
1333         symlink.
1334
1335 2002-01-08  Jeffrey Stedfast  <fejj@ximian.com>
1336
1337         * camel-filter-search.c (TODO): There are a few sexp callbacks
1338         that could be modified to use fms->info rather than using a
1339         message object (like date and possibly mlist stuff) but *only* if
1340         the date exists on the CamelMessageInfo object (since it may be
1341         blank except for message flags).
1342         (camel_filter_search_get_message): New internal convenience
1343         function to make sure that the FilterMessageSearch has loaded the
1344         message (and to load the message if this isn't the case).
1345         (check_header): Call camel_filter_search_get_message().
1346         (header_exists): Same.
1347         (header_regex): Here too.
1348         (header_full_regex): And here.
1349         (body_contains): Again here.
1350         (body_regex): Here too.
1351         (get_sent_date): Here also.
1352         (get_received_date): Same.
1353         (get_source): Here if we need to.
1354         (camel_filter_search_match): Now takes a callback function/data
1355         pair for on-demand message loading so that we don't necessarily
1356         have to load the message if the defined filter rules don't require
1357         it.
1358
1359         * camel-filter-driver.c (camel_filter_driver_filter_folder): Don't
1360         bother fetching the message here, let
1361         camel_filter_driver_filter_message() worry about this.
1362         (get_message_cb): New utility callback to fetch a message.
1363         (camel_filter_driver_filter_message): Only fetch the message if we
1364         absolutely need it to get a CamelMessageInfo. Instead of passing a
1365         message object to camel_filter_search_match(), pass get_message_cb
1366         and some user_data so that the matching code can fetch the message
1367         on demand.
1368
1369 2002-01-07  Jeffrey Stedfast  <fejj@ximian.com>
1370
1371         * camel-folder.c (filter_filter): Flush the only-once actions.
1372
1373         * camel-filter-driver.c (camel_filter_driver_filter_message):
1374         Don't increment a filtered_count here any longer.
1375         (camel_filter_driver_reset_filtered_count): Removed.
1376         (camel_filter_driver_get_filtered_count): Removed.
1377         (do_beep): New action.
1378         (play_sound): New action to play a sound
1379         (do_only_once): Another new action.
1380         (camel_filter_driver_finalise): Free the only_once hash if the
1381         driver has not been "flushed".
1382         (camel_filter_driver_flush): Flush all of the only-once actions.
1383
1384         * camel-charset-map.c: Moved windows-1251 to the end of the list
1385         since it contains the euro and we'd prefer to use iso-8859-15 when
1386         the euro is requested than a windows charset if possible.
1387
1388         * camel-charset-map-private.h: Regenerated.
1389
1390 2001-12-12  Jeffrey Stedfast  <fejj@ximian.com>
1391
1392         * camel-folder-summary.c (content_info_load): Don't try setting a
1393         content-type parameter if either the name or value is NULL.
1394
1395         * camel-mime-utils.c (header_set_param): NULL-protection.
1396
1397 2002-01-02  Jeffrey Stedfast  <fejj@ximian.com>
1398
1399         * camel-tcp-stream-ssl.c (ssl_bad_cert): Do more like what mutt
1400         does so hopefully this'll fix bug #16363 and #16300.
1401
1402 2001-12-21  Jeffrey Stedfast  <fejj@ximian.com>
1403
1404         * broken-date-parser.c (parse_broken_date): Completely
1405         rewritten. It is now a load faster and a heck of a lot more
1406         accurate, also now returns a time_t and sets the saveoffset
1407         variable rather than returning a new char* buffer for the normal
1408         camel date parser to re-parse. This saves a fair number of cpu
1409         cycles :-)
1410
1411         * camel-mime-utils.c (header_decode_date): Cleanup the broken date
1412         parsing code.
1413
1414 2001-12-20  Jeffrey Stedfast  <fejj@ximian.com>
1415
1416         * camel-address.h: Change the prototype for camel_address_get_type
1417         to return a CamelType (since internally this is what it returns
1418         and also in case we decide to write a replacement for the current
1419         CamelObject it'd be easier to drop in).
1420
1421         * camel-internet-address.h: Same but for
1422         camel_internet_address_get_type()
1423
1424         * providers/smtp/camel-smtp-transport.c (smtp_send_to): Updated to
1425         use a CamelAddress of recipients.
1426         (smtp_send): Since smtp_send_to now takes a CamelAddress
1427         recipients argument, our lives have been simplified and we can now
1428         just concat To/Cc/Bcc into a recipients addr and send away.
1429
1430         * providers/sendmail/camel-sendmail-transport.c
1431         (sendmail_send_to): Updated to use a CamelAddress of recipients.
1432
1433         * camel-transport.c (camel_transport_send_to): Now takes a
1434         CamelAddress argument for the recipient list rather than a GList.
1435
1436 2001-12-19  Jeffrey Stedfast  <fejj@ximian.com>
1437
1438         * providers/smtp/Makefile.am: Remove the providerdir variable.
1439
1440         * providers/sendmail/Makefile.am: Same.
1441
1442 2001-12-17  Jeffrey Stedfast  <fejj@ximian.com>
1443
1444         * camel-charset-map.c (camel_charset_iso_to_windows): New function
1445         to map ISO charsets to the Windows charsets.
1446
1447         * camel-mime-part-utils.c (broken_windows_charset): Detect Windows
1448         charsets.
1449         (simple_data_wrapper_construct_from_parser): Simplify a tad and
1450         also check for iso-8859-* charsets that are really Windows
1451         charsets. Fixes bug #12631.
1452
1453 2001-12-17  Dan Winship  <danw@ximian.com>
1454
1455         * Makefile.am (INCLUDES): define CAMEL_PROVIDERDIR to be the
1456         configure.in-defined camel_providerdir.
1457
1458         * providers/Makefile.am: Remove some outdated comments
1459
1460         * providers/imap/Makefile.am (camel_provider_LTLIBRARIES,
1461         camel_provider_DATA): renamed from provider_LTLIBRARIES,
1462         provider_DATA.  
1463
1464         * providers/local/Makefile.am: Likewise 
1465
1466         * providers/nntp/Makefile.am: Likewise 
1467
1468         * providers/pop3/Makefile.am: Likewise 
1469
1470         * providers/sendmail/Makefile.am: Likewise 
1471
1472         * providers/smtp/Makefile.am: Likewise
1473
1474 2001-12-16  Jeffrey Stedfast  <fejj@ximian.com>
1475
1476         * providers/imap/camel-imap-folder.c (get_content): Reverted my
1477         previous changes here since it doesn't actually work afterall.
1478
1479         * providers/imap/camel-imap-wrapper.c (imap_wrapper_hydrate):
1480         Update to do uudecoding when appropriate.
1481
1482 2001-12-16  Jeffrey Stedfast  <fejj@ximian.com>
1483
1484         * providers/imap/camel-imap-folder.c (get_content): Try to use the
1485         original boundary so luis will stop bugging me about "data
1486         corruption". Also preserve other params in the multipart
1487         content-type by dumping it to a string and setting it on the mime
1488         part.
1489
1490 2001-12-14  Jeffrey Stedfast  <fejj@ximian.com>
1491
1492         * camel-filter-driver.c
1493         (camel_filter_driver_reset_filtered_count): Reset the
1494         filtered_count to zero.
1495         (camel_filter_driver_get_filtered_count): Return the private
1496         filtered_count value.
1497         (camel_filter_driver_filter_message): Increment the
1498         filtered_count.
1499         (camel_filter_driver_set_shell_exec_func): New function to set the
1500         shell-exec func.
1501         (shell_exec): New ESExp filter action callback.
1502
1503 2001-12-14  Jeffrey Stedfast  <fejj@ximian.com>
1504
1505         * camel-pgp-mime.c (camel_pgp_mime_part_verify): Removed
1506         x-inline-pgp-hack kludge because it doesn't work.
1507         (camel_pgp_mime_part_decrypt): Same.
1508
1509 2001-12-13  Chris Toshok  <toshok@ximian.com>
1510
1511         * camel-data-cache.c: include stdlib.h (for alloca on freebsd) and
1512         only include alloca.h if HAVE_ALLOCA_H is defined.
1513
1514 2001-12-11  Zbigniew Chyla  <cyba@gnome.pl>
1515
1516         Fixes #17085
1517
1518         * camel-charset-map.c: Added #include <errno.h>.
1519
1520         * camel-charset-map-private.h:
1521         Recreated (following instructions from camel-charset-map.c)
1522
1523 2001-12-11  Jeffrey Stedfast  <fejj@ximian.com>
1524
1525         * camel-object.c (camel_type_register): Keep a name-to-type hash
1526         so that we can make sure that the type has not yet been registered
1527         (prevents a race condition such as the one in bug #16559).
1528
1529         * camel-service.c (camel_service_connect): Make sure that the
1530         connect_op is non-NULL before unregistering/unreffing it.
1531
1532 2001-12-04  Jeffrey Stedfast  <fejj@ximian.com>
1533
1534         * camel-mime-utils.c (header_content_type_simple): Protect against
1535         either of the types being NULL.
1536
1537 2001-12-05  Jeffrey Stedfast  <fejj@ximian.com>
1538
1539         * camel-mime-filter-basic.c (filter): If complete() allocates
1540         len+2 bytes for the out buffer, so should this. See bug #16371 for
1541         an example case.
1542
1543 2001-12-05  Jeffrey Stedfast  <fejj@ximian.com>
1544
1545         * camel-sasl-digest-md5.c: iconv() returns a size_t, not an int.
1546
1547         * camel-pgp-context.c: The return value of iconv() is a size_t,
1548         not an int.
1549
1550         * camel-mime-part-utils.c (convert_buffer): Always use size_t args
1551         for iconv().
1552
1553         * camel-mime-filter-charset.c (complete): Always use size_t args
1554         for iconv().
1555         (filter): Same.
1556
1557         * camel-mime-utils.c (header_address_fold): Make headerlen a
1558         size_t instead of an int.
1559         (header_fold): Same.
1560         (base64_encode_close): We should be returning a size_t and inlen
1561         should also be a size_t.
1562         (base64_encode_step): Same here.
1563         (base64_decode_step): Here too.
1564         (base64_encode_simple): And here...
1565         (base64_decode_simple): Same.
1566         (uuencode_close): We should also use size_t's here...
1567         (uuencode_step): And here too.
1568         (uudecode_step): And also here.
1569         (quoted_encode_close): Same idea here.
1570         (quoted_encode_step): Again here.
1571         (quoted_decode_step): Here too.
1572         (quoted_encode): Input length should be a size_t.
1573         (rfc2047_decode_word): Same.
1574         (g_string_append_len): Here too.
1575         (append_8bit): "
1576         (rfc2047_encode_word): "
1577         (quote_word): "
1578         (hex_decode): "
1579         (rfc2184_decode): Use size_t's with iconv().
1580         (header_decode_param): Same.
1581
1582 2001-12-09  Jon Trowbridge  <trow@ximian.com>
1583
1584         * camel-folder-summary.c: Add "NeedsReply" to the flag_names array
1585         for CAMEL_MESSAGE_NEEDS_REPLY.
1586
1587         * camel-folder-summary.h: Added CAMEL_MESSAGE_NEEDS_REPLY flag.
1588
1589 2001-12-07  Dan Winship  <danw@ximian.com>
1590
1591         * camel-mime-message.c (camel_mime_message_set_date): Fix the
1592         tm_gmtoff case (its sign is the opposite of "timezone"). Fixes
1593         #14678
1594
1595 2001-11-29  Jeffrey Stedfast  <fejj@ximian.com>
1596
1597         * camel-folder-search.c (search_body_contains): Don't use regex
1598         matching. Fixes bug #16227.
1599
1600         * camel-mime-message.c (best_encoding): Check the content-object's
1601         mime type, not the mime part types. Should fix bug #15843.
1602
1603 2001-11-27  Jeffrey Stedfast  <fejj@ximian.com>
1604
1605         * providers/imap/camel-imap-folder.c (get_content): Return NULL if
1606         construct_from_stream fails.
1607         (get_message): Same.
1608         (get_message_simple): Here too.
1609         (add_message_from_data): And here.
1610
1611 2001-11-14    <NotZed@Ximian.com>
1612
1613         * camel-vee-folder.c (folder_changed_remove_uid): Use the uid
1614         rather than vuid for unmatched.  Also add the uid to unmatched if
1615         it wasn't in the unmatched_uids table at all.
1616         (folder_changed_change): If checking for added, if the new ones
1617         dont match, then try to add them to unmatched.  Fixes #6893.
1618
1619         * camel-folder-summary.c (camel_folder_summary_index): Change lock
1620         order, always summary_lock before ref_lock.
1621         (camel_folder_summary_array): "
1622         (camel_folder_summary_uid): "
1623         (camel_folder_summary_remove_uid): " Fixes a deadlock.
1624
1625 2001-11-30  Not Zed  <NotZed@Ximian.com>
1626   
1627         * providers/nntp/camel-nntp-*.c: Completely new implementation of
1628         NNTP.
1629         
1630         Doesn't support subscriptions yet (lists all folders), but should
1631         be more reliable (faster?), and has an integrated cache.
1632
1633         * camel-exception.c (camel_exception_new): Use e_memchunks for
1634         exception blocks.
1635         (camel_exception_free): Same.
1636
1637         * camel-data-cache.[ch]: New object for managing on-disk caches of
1638         anything that can be stored in a camel-stream.
1639
1640         * camel-file-utils.c (camel_file_util_mkdir): New function, just a
1641         nicer place to put this (than camel-store), should be removed from
1642         camel-store.
1643         (camel_file_util_safe_filename): New function to url-encode a
1644         filename.
1645
1646         * camel-mime-parser.c (drop_states): New func to drop the parser
1647         state to initial state.
1648         (folder_scan_init_with_fd): 
1649         (folder_scan_init_with_stream): Call above func to reset state if
1650         the stream is changed on us so we can change streams to reuse a
1651         parser object.
1652
1653 2001-11-25  Not Zed  <NotZed@Ximian.com>
1654
1655         * providers/nntp/camel-nntp-folder.c (nntp_folder_get_message): If
1656         the uid doesn't have a ',' in it, fail to crash.
1657
1658         * providers/nntp/camel-nntp-newsrc.c
1659         (camel_nntp_newsrc_article_is_read): check group != NULL before
1660         scanning.
1661         (camel_nntp_newsrc_get_highest_article_read): "
1662         (camel_nntp_newsrc_get_num_articles_read): "
1663         (camel_nntp_newsrc_mark_range_read): "
1664
1665         * providers/nntp/camel-nntp-store.c
1666         (camel_nntp_store_get_overview_fmt): IF we dont have
1667         nntp_list_follows, dont try and get a list response.
1668         (nntp_store_get_folder_info): Set path part of folderinfo.
1669
1670 2001-11-20  Jeffrey Stedfast  <fejj@ximian.com>
1671
1672         * providers/smtp/camel-smtp-transport.c (get_smtp_error_string):
1673         Check to see that errno is non-zero before returning
1674         g_strerror. If it's 0, then we have an unknown error.
1675
1676 2001-11-26  Jeffrey Stedfast  <fejj@ximian.com>
1677
1678         * camel-mime-filter-basic.c: For the uudecoding mode, garble up
1679         the "begin <mode> <filename>" line before decoding.
1680
1681         * camel-mime-part-utils.c
1682         (simple_data_wrapper_construct_from_parser): Add a uudecoder if
1683         the transfer encoding is x-uuencode.
1684
1685         * camel-mime-part.c (write_to_stream): Handle x-uuencoded content
1686         too.
1687
1688 2001-11-19  Jeffrey Stedfast  <fejj@ximian.com>
1689
1690         * camel-tcp-stream-ssl.c (stream_read): Added a check to see if
1691         the operation has been cancelled.
1692         (stream_write): Same.
1693
1694 2001-11-19  Jeffrey Stedfast  <fejj@ximian.com>
1695
1696         Updates for compliance with rfc2231
1697
1698         * camel-mime-utils.c (header_encode_param):
1699         camel_mime_special_table[c] & IS_ESAFE should have been
1700         !(camel_mime_special_table[c] & IS_ESAFE). Also added a few
1701         comments for how to improve the code at some future date.
1702         (header_decode_param): Now takes an argument rfc2184_part so our
1703         caller can get this information as well.
1704         (header_decode_param_list): Pass an rfc2184_part argument to
1705         header_decode_param and also added a few comments on where to
1706         improve on rfc2184/rfc2231 compliance.
1707         (rfc2047_decode_word): Updated to respect the updated ABNF syntax
1708         of rfc2047 encoded words, yay.
1709
1710 2001-11-16  Jeffrey Stedfast  <fejj@ximian.com>
1711
1712         * providers/imap/camel-imap-utils.c (imap_parse_body): Abort if
1713         body == NULL.
1714
1715         * camel-mime-filter-tohtml.c (camel_mime_filter_tohtml_new): New
1716         mime filter to convert plain text to html.
1717
1718 2001-11-16  Jeffrey Stedfast  <fejj@ximian.com>
1719
1720         Since some mail clients like Outlook are broken, we need to set a
1721         name parameter on pgp signed and encrypted parts.
1722
1723         * camel-pgp-mime.c (camel_pgp_mime_part_encrypt): Set a name
1724         parameter.
1725         (camel_pgp_mime_part_sign): Same.
1726
1727 2001-11-14  Jeffrey Stedfast  <fejj@ximian.com>
1728
1729         * providers/imap/camel-imap-command.c
1730         (camel_imap_command_response): If we get a BYE response, call
1731         camel_service_disconnect() and set an exception. Also do the check
1732         for "* BYE" first instead of passing it off imap_read_untagged()
1733         since we'll just waste time in there mallocing left and right only
1734         to arrive at the single response line "* BYE" again :-)
1735
1736 2001-11-13    <NotZed@Ximian.com>
1737
1738         * camel-filter-search.c (get_source): If we have no source string,
1739         then use undefined, which should always evaluate to FALSE.  Fix
1740         for #15267.
1741
1742 2001-11-12  Jeffrey Stedfast  <fejj@ximian.com>
1743
1744         * camel-store.c (camel_store_get_folder): Added a
1745         g_return_val_if_fail for folder_name != NULL.
1746
1747 2001-11-08  Jeffrey Stedfast  <fejj@ximian.com>
1748
1749         * camel-pgp-context.c (crypto_exec_with_passwd): If any of the
1750         pipe()'s fail, clean up any pipes that may have succeeded. Also
1751         close the password fds.
1752
1753 2001-11-09    <NotZed@Ximian.com>
1754
1755         * providers/imap/camel-imap-store.c (imap_auth_loop): If we get a
1756         user cancel and that causes us to fail to authenticate, abort
1757         rather than loop forever.  Fix for #14951.
1758
1759 2001-11-06  Jeffrey Stedfast  <fejj@ximian.com>
1760
1761         * providers/imap/camel-imap-command.c
1762         (camel_imap_command_continuation): Now takes a command-length
1763         argument so we can 1) avoid duping the command string yet again,
1764         yay. 2) we now don't have to worry about embedded nul-chars
1765         screwing us over (we still need to avoid allowing them into the
1766         string but at least now it won't mess us up).
1767
1768         * providers/imap/camel-imap-folder.c (do_append): Instead of
1769         appending a nul char to the end of the byte array and then passing
1770         that off as if it were a string to
1771         camel_imap_command_continuation, instead pass the byte-array
1772         length since that function now takes a length argument. Yay.  Also
1773         encode any 8bit parts to avoid the possibility of sending embedded
1774         nul chars to the imap server.
1775
1776         * providers/imap/camel-imap-store.c (try_auth): Updated to pass a
1777         command-length argument to camel_imap_command_continuation().
1778
1779 2001-11-07  Jeffrey Stedfast  <fejj@ximian.com>
1780
1781         * camel-tcp-stream-ssl.c (save_ssl_cert): Oops, pass a mode
1782         argument to the open() call.
1783
1784         * camel-tcp-stream-openssl.c (save_ssl_cert): Oops, pass a mode
1785         argument to the open() call.
1786
1787 2001-11-07  Jeffrey Stedfast  <fejj@ximian.com>
1788
1789         * camel-pgp-mime.c (camel_pgp_mime_part_decrypt): Add code to
1790         kludge around any x-inline-pgp-hacks by prepending some content
1791         headers to the decrypted data.
1792
1793 2001-11-02  Jeffrey Stedfast  <fejj@ximian.com>
1794
1795         * camel-data-wrapper.c (camel_data_wrapper_init): Initialize our
1796         private mutex.
1797         (camel_data_wrapper_finalize): Destroy our private mutex.
1798         (write_to_stream): Lock around camel_stream_write_to_stream() so
1799         that we don't get 2 threads trying to read from our stream at the
1800         same time.
1801
1802 2001-11-01    <NotZed@Ximian.com>
1803
1804         * camel-vee-folder.c (folder_changed_change): Move all searching
1805         operations outside of any locks except subfolder lock, same as
1806         build_folder.  Fix for #14294.
1807
1808 2001-10-31    <NotZed@Ximian.com>
1809
1810         * providers/local/camel-spool-folder.c (spool_get_message): Same
1811         as below.
1812
1813         * providers/local/camel-maildir-folder.c (maildir_get_message):
1814         Same as below.
1815
1816         * providers/local/camel-mbox-folder.c (mbox_get_message): Set
1817         USER_CANCEL if failed due to EINTR.
1818
1819         * camel-filter-driver.c (camel_filter_driver_filter_mbox): If
1820         construct from parser fails due to user cancel, set USER_CANCEL on
1821         exception.
1822
1823         * camel-mime-part.c (construct_from_parser): Return error if the
1824         parser had an io error.
1825
1826         * camel-mime-message.c (construct_from_parser): Check error on
1827         parser/return error.
1828
1829         * camel-mime-parser.c (folder_scan_init): Init error number.
1830         (camel_mime_parser_errno): New function, return errno of any io
1831         failures.
1832         (folder_read): Set errno if a failure occured.
1833         (folder_seek): Same.
1834         (folder_scan_init_with_fd): Setup errno depeding on ok/failure.
1835         (folder_scan_init_with_stream): Same.
1836
1837 2001-10-30    <NotZed@Ximian.com>
1838
1839         * camel-operation.c (camel_operation_new): Dont setup cancel_fd.
1840         (camel_operation_cancel_fd): If cancel_fd not created, set it up.
1841         (camel_operation_cancel): Set cancel flag before sending message.
1842         (cancel_thread): Same.
1843
1844         * camel-filter-driver.c (camel_filter_driver_filter_mbox): Make
1845         sure we unref the mimeparse when we're done (successfully).  This
1846         was leaking an fd every get-mail! :(
1847
1848         * camel-lock-client.c (camel_lock_helper_init): Close all fd's
1849         above 2.
1850
1851         * providers/local/camel-mbox-folder.c (mbox_get_message): Remove
1852         the X-Evolution header before anyone else gets to see this private
1853         thing.  Shoudl fix 11676 since we were inheriting flags from
1854         X-Evolution headers we didn't want to.
1855
1856         * camel-folder-search.c (match_message): If we can't retrieve the
1857         message, ignore it, it can't match.
1858
1859         * providers/imap/camel-imap-search.c
1860         (camel_imap_search_class_init): Setup parent class pointer.
1861         (imap_body_contains): If offline, just use the parent
1862         body_contains method which will get the messages and search them
1863         manually.
1864
1865         * providers/imap/camel-imap-folder.c (imap_search_by_expression,
1866         imap_search_by_uids): Remove offline check.
1867
1868 2001-10-30  Dan Winship  <danw@ximian.com>
1869
1870         * camel-mime-part.c (free_headers): Fix this to match get_headers.
1871
1872 2001-10-30    <NotZed@Ximian.com>
1873
1874         * providers/local/camel-local-store.c (rename_folder): Dont try to
1875         move ibex if we have none.
1876
1877         * camel-tcp-stream-openssl.c (stream_write): Fixed compilation
1878         errors.
1879
1880 2001-10-29  Jeffrey Stedfast  <fejj@ximian.com>
1881
1882         * camel-mime-utils.c (camel_mime_utils_init): Removed unused
1883         variable.
1884
1885 2001-10-30    <NotZed@Ximian.com>
1886
1887         * camel-mime-utils.c (header_decode_mailbox): w(x) out some warnings.
1888
1889         * providers/local/camel-local-summary.c
1890         (camel_local_summary_load): Remove the warning about not loading
1891         summary file - its a valid case for new folders.
1892
1893 2001-10-29  Jeffrey Stedfast  <fejj@ximian.com>
1894
1895         * camel-tcp-stream-openssl.c (my_SSL_write): Removed.
1896         (stream_write): Keep looping (non-blocking case) if errno is
1897         EAGAIN, EINTR or EWOULDBLOCK. For NONBLOCKing I/O, sync up with
1898         CamelTcpStreamRaw. As with CamelTcpStreamRaw/SSL - make sure to
1899         write out everything before returning.
1900         (my_SSL_read): Removed.
1901         (stream_read): Just call ssl_error_to_errno() and check the errno
1902         values that we care about so we can keep the general look of all
1903         this stream code the same. Also when checking the return value of
1904         SSL_read, check for <0 instead of ==-1 since the man page for
1905         SSL_read doesn't say it will return -1 on fail, it just says <0.
1906         (stream_flush): Don't fsync() since syncing on a socket is a Bad
1907         Thing (tm).
1908
1909         * camel-tcp-stream-ssl.c (stream_write): Make sure we write out
1910         everything just like in camel-tcp-stream-raw.c.
1911
1912         * camel-stream-buffer.c (camel_stream_buffer_gets): If
1913         camel_stream_read() returns -1, don't necessarily return -1 to our
1914         caller since it's possible that we did actually "read" some data
1915         (ie, we copied some pre-buffered data into the out buffer).
1916
1917         * camel-stream-buffer.h: Removed CAMEL_STREAM_BUFFER_NEWLINE since
1918         it never got used anywhere and it isn't supported anyway.
1919
1920 2001-10-30    <NotZed@Ximian.com>
1921
1922         * providers/imap/camel-imap-store.c
1923         (parse_list_response_as_folder_info): If we get an empty name,
1924         then mark that as NoSelect.  Workaround fix for #13239.
1925
1926 2001-10-29  Dan Winship  <danw@ximian.com>
1927
1928         * providers/imap/camel-imap-folder.c (get_message_simple, 
1929         imap_get_message): Set an X-Evolution-Source header on the
1930         returned message so replies come from the right identity.
1931
1932 2001-10-29    <NotZed@Ximian.com>
1933
1934         * camel-vee-folder.c (folder_changed_change): If we're not going
1935         to search on a changed uid, make sure we change out copy still.
1936         Fixes #13916.
1937
1938 2001-10-29  Jeffrey Stedfast  <fejj@ximian.com>
1939
1940         * providers/imap/camel-imap-store.c (subscribe_folder): Don't emit
1941         a folder_subscribed signal if we are in the process of renaming
1942         folders.
1943         (unsubscribe_folder): Same here but for the unsubscribe signal.
1944         (rename_folder): Unsubscribe from the folder being renamed and any
1945         subfolders it may have before actually renaming. Once the folder
1946         has been renamed, re-subscribe to it and it's subfolders with the
1947         new name.
1948
1949         * camel-store.c (camel_folder_info_build): Sort the folder info's
1950         before constructing the tree.
1951
1952         * camel-mime-utils.c (header_decode_param): Minor fix - should
1953         have been using a strNcmp when checking if it was an rfc2047
1954         encoded word.
1955
1956         * camel-pgp-context.c (pgp_sign): Notify the user that PGP 2.6.x
1957         is no longer supported and use camel_exception_set() instead of
1958         setv() where appropriate.
1959         (pgp_clearsign): Same.
1960         (pgp_verify): And again here.
1961         (pgp_encrypt): Here too.
1962         (pgp_decrypt): And finally here.
1963
1964 2001-10-29  Dan Winship  <danw@ximian.com>
1965
1966         * providers/imap/camel-imap-store.c (unsubscribe_folder): Don't
1967         free the hash table key if the folder wasn't found in the hash
1968         table. I'm not sure where the bug is/was that made it possible to
1969         add a folder to the tree after creating it failed, but now if that
1970         happens, it won't crash if you try to delete it again. (#11492)
1971
1972         * camel-disco-store.c (camel_disco_store_status): if the service
1973         is being connected and thinks it's online, but the session is
1974         offline, then mark the service offline as well. Fixes 13683.
1975
1976 2001-10-29    <NotZed@Ximian.com>
1977
1978         * camel-mime-utils.c: Turn off w() -> warnings.
1979
1980         * providers/imap/camel-imap-store.c (rename_folder): Also rename
1981         the message cache.
1982         (rename_folder): Fix subscribed folders table with rename(s).
1983
1984         * providers/imap/camel-imap-folder.c (imap_rename): Implement,
1985         rename the cache dir pointer.
1986
1987         * providers/imap/camel-imap-message-cache.c
1988         (camel_imap_message_cache_set_path): New method to set the path
1989         used by a message cache.
1990
1991         * camel-vee-store.c (build_info): Fix the 'is this a matching
1992         subfolder or subfolder' logic to match camel-store
1993         get_subfolders'.
1994
1995         * camel-store.c (get_subfolders): Fix the 'is this a matching
1996         folder or subfolder' logic.
1997
1998 2001-10-28    <NotZed@Ximian.com>
1999
2000         * providers/local/camel-local-store.c (rename_folder): Changed to
2001         call ibex_move to rename it internally.
2002
2003         * camel-store.c (camel_store_rename_folder): Use the right
2004         variable, not info.
2005
2006 2001-10-28  Jeffrey Stedfast  <fejj@ximian.com>
2007
2008         * camel-stream-buffer.c (camel_stream_buffer_read_line): Make sure
2009         we've actually read data before checking if p[-] is '\r' or not.
2010
2011         * camel-tcp-stream-raw.c (stream_write): Same.
2012
2013         * camel-stream-fs.c (stream_write): If errno isn't EAGAIN, just
2014         exit with -1 and instead of using continue (which doesn't go to
2015         the top of the do-while thus making our logic suck), just set w to
2016         0. Still seems to be a bug in select() if it's telling us the
2017         socket is ready for data when it really isn't but oh well.
2018
2019 2001-10-28    <NotZed@Ximian.com>
2020
2021         * providers/local/camel-local-folder.c
2022         (camel_local_folder_construct): Use path not protocol as the path
2023         part of the uri of the folder_created event.
2024
2025         * providers/local/camel-maildir-store.c (scan_dir): If FAST is
2026         set, dont try and scan for unread counts.
2027
2028         * providers/local/camel-local-store.c (create_folder): Implement,
2029         just return the folderinfo of the folder matched, not all of it.
2030
2031         * camel-store.c (camel_store_rename_folder): Rename the
2032         camelfolders before emitting the folderchanged event (otherwise
2033         vstore fails to pick up change.
2034
2035 2001-10-27    <NotZed@Ximian.com>
2036
2037         * camel-store.c (camel_store_init): Always use a default dir_sep
2038         of '/'.
2039
2040         * camel-store.h (struct _CamelStore): Added a dir_sep to the base
2041         store so rename and whatnot can work, temporary fix for mixed dir
2042         separator in folder name api's.
2043
2044         * providers/imap/camel-imap-store.c (rename_folder): Finished
2045         implementation.
2046         (imap_connect_online): Also set the store's dir_sep here.
2047         (imap_connect_offline): "
2048
2049         * providers/local/camel-local-folder.c (local_rename): Implement
2050         local rename of folder objects.
2051
2052 2001-10-26    <NotZed@Ximian.com>
2053
2054         * camel-vee-folder.c (camel_vee_folder_class_init): Hook into
2055         rename function.
2056         (vee_rename): Implement the veefolder rename function.
2057         (camel_vee_folder_class_init): 
2058         (folder_changed_change): Kill a warning with a cast.
2059
2060         * camel-vee-store.c (vee_rename_folder): Emit a folder_renamed
2061         event properly, also call parent to do some rename stuff.
2062
2063         * camel-store.h: Added a CamelRenameInfo for the rename event.
2064
2065         * camel-folder.c (camel_folder_rename): New function to rename a
2066         folder object.
2067         (camel_folder_class_init): Added a renamed event.
2068         (folder_rename): Default impl, set full_name, and set name
2069         assuming the dir separator is '/'.
2070
2071         * camel-store.c (camel_store_class_init): Added folder_renamed
2072         event.
2073         (camel_store_rename_folder): Rename an active folder object if we
2074         have one, and update the folder table.
2075         (rename_folder): Make a default implementation that handles
2076         updating the folder tree.
2077
2078 2001-10-26  Jeffrey Stedfast  <fejj@ximian.com>
2079
2080         * providers/imap/camel-imap-store.c (delete_folder): Don't bother
2081         checking ex since we can rely on the response being NULL on error.
2082         (rename_folder): Implemented.
2083
2084 2001-10-26  Jeffrey Stedfast  <fejj@ximian.com>
2085
2086         * providers/imap/camel-imap-folder.c (imap_get_message): Check to
2087         make sure that the dataset is non-NULL before using and/or
2088         freeing.
2089
2090         * camel-tcp-stream-raw.c (stream_write): Check for EWOULDBLOCK
2091         too?
2092         (stream_read): Same.
2093         (stream_flush): Return 0 always, fsync() and tcp sockets don't
2094         play nice :-)
2095
2096         * providers/imap/camel-imap-message-cache.c
2097         (camel_imap_message_cache_get): Lets try putting a
2098         camel_stream_reset() here. Logic being that the stream may have
2099         been read from since it was cached and thus our caller may try
2100         reading from it and get no data from it since it is already at the
2101         EOS. This may fix bug #12943.
2102
2103 2001-10-25    <NotZed@Ximian.com>
2104
2105         * camel-search-private.c (utf8_get): Remove the stupid warning
2106         that should never have been there in the first place.
2107
2108         * camel-sasl-digest-md5.c (digest_response): s/iconv/e_iconv/
2109
2110         * camel-pgp-context.c (pgp_verify): "
2111
2112         * camel-mime-utils.c (rfc2047_decode_word, rfc2047_decode_word,
2113         append_8bit, rfc2047_encode_word, rfc2184_decode,
2114         header_decode_param): "
2115
2116         * camel-mime-part-utils.c (convert_buffer, convert_buffer): "
2117
2118         * camel-mime-filter-charset.c (reset, complete, filter): "
2119
2120 2001-10-24    <NotZed@Ximian.com>
2121
2122         * camel-mime-filter-basic.c (complete): For qp decoding, if the
2123         data isn't really qp encoded, we could possible grow the buffer by
2124         upto 2 bytes above the input size, fix allocations/assertions
2125         appropraitely.
2126
2127         * camel-vee-folder.c (folder_changed_change): If we're not
2128         autoupdate, only search for new matches against changed uid's that
2129         we dont already have.
2130
2131 2001-10-24  Dan Winship  <danw@ximian.com>
2132
2133         * providers/imap/camel-imap-store.c (unsubscribe_folder): Don't
2134         let fi->name be NULL.
2135
2136 2001-10-24  Jeffrey Stedfast  <fejj@ximian.com>
2137
2138         * camel-stream-fs.c (stream_read): Same as in the TcpStreamRaw code.
2139         (stream_write): And again here...
2140
2141         * camel-tcp-stream-raw.c (stream_read): Handle the EAGAIN error
2142         case as well.
2143         (stream_write): Same here, this might fix the SMTP truncation
2144         thing? I hope?
2145
2146 2001-10-23  Dan Winship  <danw@ximian.com>
2147
2148         * camel-mime-utils.c (mail_list_magic): Remove an extra * in one
2149         of the regexps that glibc apparently doesn't mind but bsd does.
2150
2151 2001-10-23    <NotZed@Ximian.com>
2152
2153         * providers/local/camel-mbox-summary.c: made d(x) x recompile again.
2154
2155 2001-10-22    <NotZed@Ximian.com>
2156
2157         * providers/local/camel-spool-summary.c (summary_rebuild): No, use
2158         Storing, as the other code does :p
2159         (spool_summary_check): Check for consistency.
2160
2161 2001-10-22  Jon Trowbridge  <trow@ximian.com>
2162
2163         * providers/local/camel-spool-summary.c (summary_rebuild):
2164         s/summarising/summarizing/.
2165         (spool_summary_check): s/summarise/summarize/.
2166
2167 2001-10-22  Jeffrey Stedfast  <fejj@ximian.com>
2168
2169         * camel-pgp-mime.c (camel_pgp_mime_part_verify): If we are
2170         kludging around a inline-pgp signed part, do some charset
2171         conversion to protect any 8bit text.
2172
2173 2001-10-22    <NotZed@Ximian.com>
2174
2175         * camel-filter-search.c, camel-folder-search.c (check_header): Use
2176         search_type_mlist for mailing list searches.
2177
2178         * camel.c (camel_init): call camel-mime-utils-init func.
2179
2180         * camel-mime-utils.c: Changed mail mail_list_magic to include a
2181         domain part, also pre-compile all the patterns.  They are all
2182         backward compatible except List-Id: which now uses the
2183         mail-address-like <list-name.host.name> part rather than the
2184         plain-text part (which might've been blank anyway).
2185         (camel_mime_utils_init): Initialisation function to setup any
2186         static data required by camel-mime-utils at run-time.  We now
2187         setup the base64/charset class tables here, so it doesn't need to
2188         be done statically.
2189         (camel_mime_special_table, camel_mime_base64_rank): No longer
2190         statically initialise these.
2191         (main): Removed + the tests at the end of the file.
2192         (header_raw_check_mailing_list): Dont compile regex's here,
2193         already compiled in utils_init.  Use the regex patterns to remove
2194         leading <'s from addresses.  Also, if there is a domain part
2195         matched, add that after a '@' is added.
2196
2197         * camel-search-private.c (camel_search_header_match): Match check
2198         against all addresses in a multiple address match.  Should fix
2199         #13051.
2200         (camel_search_header_match): Oops, missing i=0.
2201         (camel_search_header_match): Added SEARCH_TYPE_MLIST for mlist
2202         search types.  It ignores the domain part if either (but not both)
2203         of the values dont have it.
2204
2205 2001-10-22  Dan Winship  <danw@ximian.com>
2206
2207         * camel-pgp-mime.c (camel_pgp_mime_part_verify): Add a hack: if
2208         the multipart/signed part has a "x-inline-pgp-hack" parameter in
2209         its Content-Type, don't pass the MIME headers as part of the data
2210         to be verified.
2211
2212 2001-10-22  Rodrigo Moya <rodrigo@ximian.com>
2213
2214         * Makefile.am: added $GNOME_INCLUDEDIR to INCLUDES, needed for latest
2215         libgnome, which install headers in $(prefix)/gnome-1.0
2216
2217 2001-10-21  Jeffrey Stedfast  <fejj@ximian.com>
2218
2219         * camel-mime-part-utils.c
2220         (simple_data_wrapper_construct_from_parser): Only do the rawtext
2221         checks if the part is a text part, otherwise don't bother wasting
2222         cpu cycles.
2223
2224         * camel-store.c (camel_folder_info_build): Updated comments to
2225         make the code a bit more clear.
2226
2227 2001-10-21    <NotZed@Ximian.com>
2228
2229         * camel-store.c (CS_CLASS): Dont do the macro stuff - basically so
2230         you can actually debug calls.
2231         (camel_store_uri_cmp): New function to compare store objects.
2232
2233         * camel-vee-folder.c (vee_folder_add_info): oops, dont free the
2234         vuid, since its alloca'd now.
2235         (folder_changed_change): Kill a compile warning.
2236
2237 2001-10-20    <NotZed@Ximian.com>
2238
2239         * camel-folder.c (move_messages_to): If no exception supplied, use
2240         a local one.
2241         (move_message_to): Set the seen flag also when we delete it.
2242
2243 2001-10-19  Jeffrey Stedfast  <fejj@ximian.com>
2244
2245         * camel-vtrash-folder.c (vtrash_move_messages_to): If the
2246         destination folder is the vfolder source folder, then
2247         set_message_flags on it.
2248
2249 2001-10-19    <NotZed@Ximian.com>
2250
2251         * camel-session.c (register_provider): When registering provider,
2252         translate all strings.
2253
2254         * camel-vee-folder.c (camel_vee_folder_remove_folder): Lock the
2255         right lock for unmatched subfolder list stuff.  If the sub folder
2256         is deleted & part of unmatched, or the last ref to the sub folder
2257         is gone from unmatched, blow it away completely from unmatched,
2258         but only do it once.
2259         (vee_folder_remove_folder): Added arg to kill unmatched
2260         unconditionally.  Also handle deleted folders, always remove
2261         stuff.
2262         (folder_changed_change): Lock subfolder lock for entirety of
2263         operation, and also check to see if the subfolder is still there
2264         before doing any fancy work (incase it got removed while we were
2265         waiting to execute).
2266         (folder_changed_change_uid): Use alloca for vuid, and not
2267         sprintf(".lengths")
2268         (vee_search_by_expression): Dont use sprintf for vuid.
2269         (vee_search_by_uids): "
2270         (vee_folder_add_info): "
2271         (folder_changed_remove_uid): "
2272         (folder_changed_change): "
2273         (folder_changed_change_uid): Also check folder_unmatched for
2274         changed uid's so we properly update/propagate unmatched changes.
2275         (folder_changed_change): Ok, so dont hold the subfolder lock for
2276         the whole duration of the changed event, although we probably
2277         should, requires a recursive mutex.
2278         (folder_changed_change): Change logic, we always add changed stuff
2279         if it now matches, but dont remove it unless its auto-remove, only
2280         propagate changes for it.
2281         (vee_set_message_flags): Call parent method after doing our work.
2282         (vee_set_message_user_flag): Same here.
2283
2284 2001-10-18  Jeffrey Stedfast  <fejj@ximian.com>
2285
2286         * camel-mime-part-utils.c
2287         (simple_data_wrapper_construct_from_parser): If a charset isn't
2288         specified or claims to be utf-8, check the validity of the text
2289         and if it's invalid, set the rawtext bit to TRUE. If the charset
2290         is x-unknown or some other x- charset, always set the rawtext bit
2291         to TRUE.
2292
2293 2001-10-18    <NotZed@Ximian.com>
2294
2295         * camel-store.c (camel_store_unsubscribe_folder): If we are
2296         unsubscribing from a folder we have loaded, set the folder
2297         deleted, as with the delete_folder case.
2298
2299         * providers/(imap|local|pop3|sendmail|smtp)/Makefile.am: Added
2300         CAMEL_CFLAGS so we get the right iconv stuff, patch from Yanko
2301         Kaneti <yaneti@declera.com>
2302
2303 2001-10-18  Jeffrey Stedfast  <fejj@ximian.com>
2304
2305         * camel-pgp-context.c (crypto_exec_with_passwd): Make sure the
2306         cancel_fd isn't -1.
2307
2308 2001-10-18  Jeffrey Stedfast  <fejj@ximian.com>
2309
2310         * providers/imap/camel-imap-message-cache.c (insert_finish): Flush
2311         the stream here, not sure it really matters but it might
2312         (hopefully) fix bug #12943.
2313
2314         * camel-pgp-context.c (crypto_exec_with_passwd): Make
2315         user-cancellable.
2316
2317         * providers/local/camel-local-provider.c: String cleanup for bug
2318         #6640.
2319
2320         * providers/imap/camel-imap-folder.c (imap_sync_online): Fix my
2321         Cyrus imapd workaround...instead of checking to see if info->flags
2322         == FLAGGED, just check to see if it contains any IMAP flags.
2323
2324 2001-10-17    <NotZed@Ximian.com>
2325
2326         * providers/local/camel-maildir-folder.c
2327         (camel_maildir_folder_new): Use '.' as the inbox name for filter
2328         new messages test.
2329
2330         * camel-store.c (camel_folder_info_clone): New function to clone a
2331         folderinfo tree.
2332
2333 2001-10-17  Jeffrey Stedfast  <fejj@ximian.com>
2334
2335         * providers/local/camel-mh-folder.c (mh_append_message): Same as
2336         maildir and mbox append-message.
2337
2338         * providers/local/camel-maildir-folder.c (maildir_append_message):
2339         Same as mbox append.
2340
2341         * camel-exception.c (camel_exception_set): Make sure the new
2342         description isn't the same as the old description pointer before
2343         freeing the old one.
2344         (camel_exception_setv): Don't free the old description until we
2345         set the new one this way we can reuse the old description in the
2346         new description.
2347
2348         * providers/local/camel-mbox-folder.c (mbox_append_message): If
2349         errno == EINTR, then we got a user-cancel so set the exception
2350         appropriately so that we don't make the user shit his pants.
2351
2352         * camel-filter-driver.c (do_copy): Add an optimization for when
2353         destination folder is the same as the source folder.
2354
2355 2001-10-17    <NotZed@Ximian.com>
2356
2357         * providers/imap/camel-imap-store.c (get_folder_info_online):
2358         (parse_list_response_as_folder_info): Patch from Danw, Use unread
2359         count of -1 to mark unflagged messages.  Make sure any folder we
2360         dont lookup explicitly is marked as -1.  Should fix #9947 and
2361         friends.
2362
2363         * providers/local/camel-mbox-summary.c (mbox_summary_sync): Only
2364         touch the summary if the timestamp or size changed.
2365
2366 2001-10-17  Jeffrey Stedfast  <fejj@ximian.com>
2367
2368         * camel-filter-driver.c (camel_filter_driver_filter_message): Set
2369         the DELETED flag on directly on the info if the source folder
2370         doesn't have summary capability.
2371
2372 2001-10-17  Not Zed  <NotZed@Ximian.com>
2373
2374         * camel-tcp-stream-raw.c (stream_write): As below.
2375
2376         * camel-stream-fs.c (stream_write): If not checking cancellation,
2377         make sure we write out everything asked of us.
2378
2379 2001-10-16  Jeffrey Stedfast  <fejj@ximian.com>
2380
2381         * camel-pgp-context.c (pgp_verify): Rearange the order of the gpg
2382         options slightly otherwise it might try to use "--no-tty" as the
2383         filename to verify :-)
2384
2385         * camel-object.[c,h]: If CAMEL_DEBUG is defined, print some useful
2386         ref/unref info.
2387
2388         * providers/imap/camel-imap-store.c (delete_folder): Fixed an
2389         assignment warning.
2390
2391         * camel-uid-cache.c (camel_uid_cache_new): Make sure that the
2392         parent directory exists before trying to open the filename, if it
2393         doesn't, create it.
2394
2395 2001-10-16    <NotZed@Ximian.com>
2396
2397         * camel-mime-utils.c (header_address_decode): If no content, dont
2398         try and decode further and spit meaningless warnings.
2399
2400 2001-10-16  Jeffrey Stedfast  <fejj@ximian.com>
2401
2402         * camel-filter-driver.c (do_flag): Only perform the operation on
2403         the folder if the folder has summary capability, else just poke
2404         the info directly. Fixes the "Filters don't work" bug.
2405         (do_score): Same.
2406         (do_colour): And here too.
2407
2408 2001-10-15  Jeffrey Stedfast  <fejj@ximian.com>
2409
2410         * camel-stream-fs.c (stream_read): Save the errno before calling
2411         fcntl so fcntl doesn't overwrite errno in case of a previous
2412         error.
2413         (stream_write): Same.
2414
2415 2001-10-13  Jeffrey Stedfast  <fejj@ximian.com>
2416
2417         * providers/smtp/camel-smtp-transport.c (smtp_data): Replace the
2418         Bcc headers in a single location and don't flush the data unless
2419         the write was successful.
2420
2421 2001-10-12  Jeffrey Stedfast  <fejj@ximian.com>
2422
2423         * Makefile.am: Remove the stripheader filter from the build.
2424
2425         * camel-mime-filter-stripheader.[c,h]: Removed.
2426
2427         * providers/smtp/camel-smtp-transport.c (smtp_data): Check the
2428         return value of camel_stream_flush to make sure it flushed the
2429         data successfully before continuing. Don't use the stripheader
2430         filter, it was completely broken - instead remove the header and
2431         set it again after we send.
2432
2433 2001-10-12    <NotZed@Ximian.com>
2434
2435         * camel-vee-folder.c (camel_vee_folder_remove_folder): Unhook from
2436         all events before removing folder.
2437         (camel_vee_folder_add_folder): Hook onto delete event.
2438         (camel_vee_folder_finalise): Unhook from deleted event for suibfolder.
2439         (subfolder_deleted): When the folder is deleted, remove it from
2440         the vfolder automagically.
2441
2442 2001-10-11    <NotZed@Ximian.com>
2443
2444         * camel-vee-folder.c (vee_search_by_uids): convert the uids list
2445         to a subset appropriate for each subfolder before trying to search
2446         on it.
2447
2448         * camel-charset-map.[ch]: Removed charset/locale charset lookup
2449         and iconv_open/close functions, moved to gal.  Fixed all callers.
2450
2451 2001-10-11  Jeffrey Stedfast  <fejj@ximian.com>
2452
2453         * camel-tcp-stream-ssl.c (ssl_cert_is_saved): Same.
2454
2455         * camel-tcp-stream-openssl.c (ssl_cert_is_saved): Instead of
2456         opening the file, stat it and make sure that it belongs to us.
2457
2458 2001-10-10  Jeffrey Stedfast  <fejj@ximian.com>
2459
2460         * camel-tcp-stream-openssl.c (ssl_verify): Same hack as below.
2461
2462         * camel-tcp-stream-ssl.c (ssl_bad_cert): Hack around the fact that
2463         adding a cert to nss's certdb seems to not work.
2464
2465 2001-10-10    <NotZed@Ximian.com>
2466
2467         * camel-vee-folder.c (vee_sync): Only re-build the folder if we're
2468         expunging.  Also only clear out the changed folders list if we're
2469         expungung and everything worked.
2470
2471 2001-10-10  Jeffrey Stedfast  <fejj@ximian.com>
2472
2473         * camel-charset-map.c (camel_charset_map_init): Added a hack for
2474         Solaris systems.
2475
2476 2001-10-10    <NotZed@Ximian.com>
2477
2478         * providers/local/camel-maildir-store.c (scan_dir): oops, we want
2479         get_unread_message_count, not get_message_count!
2480
2481 2001-10-09    <NotZed@Ximian.com>
2482
2483         * camel-service.c (camel_service_disconnect): Duplicate connect
2484         code that unregisters a cancel op if we created one.
2485
2486         * camel-operation.c (camel_operation_progress): Another go at
2487         getting the logic right again.  Make transients only update after
2488         5 seconds (CAMEL_OPERATION_TRANSIENT_DELAY)
2489         (camel_operation_end): Likewise.
2490
2491         * providers/local/camel-spool-folder.c (spool_search_by_uids):
2492         Implement.
2493
2494         * providers/imap/camel-imap-search.c (imap_body_contains): If
2495         searching a sub-set of the total message count, then use a UID
2496         range to search only specific messages.
2497
2498         * camel-vee-folder.c (vee_folder_change_match): Removed.
2499         (folder_changed_add_uid): Helper func for changed code.
2500         (folder_changed_remove_uid): "
2501         (folder_changed_change_uid): "
2502         (folder_changed): Rewritten.  Supports proper auto-updating of
2503         changes, but not removals till a sync occurs.
2504         (vee_search_by_uids): Implement.
2505         (folder_changed): Changed to call an async threaded function to do
2506         the actual folder updating.
2507
2508         * camel-folder-summary.c (camel_flag_list_copy): New func to copy
2509         a whole list of flags.
2510         (camel_tag_list_copy): New func to copy a whole list of flags.
2511
2512         * providers/imap/camel-imap-folder.c (imap_search_by_uids):
2513         Implement.
2514
2515         * providers/local/camel-local-folder.c (local_search_by_uids):
2516         Implement.
2517
2518         * camel-folder.c (camel_folder_search_by_uids): New function,
2519         search a subset of uid's.
2520         (search_by_uids): Default impl, return error.
2521
2522 2001-10-08  Dan Winship  <danw@ximian.com>
2523
2524         * camel-folder.h (struct _CamelFolder): replace the ever-growing
2525         list of gbooleans with a single guint32 for flags.
2526
2527         * camel-folder.c: Update folder flag setting/checking.
2528
2529         * providers/pop3/camel-pop3-folder.c (camel_pop3_folder_init):
2530         * providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new): 
2531         * providers/local/camel-spool-folder.c (spool_init,
2532         camel_spool_folder_new): 
2533         * providers/local/camel-maildir-folder.c (camel_maildir_folder_new): 
2534         * providers/local/camel-local-folder.c (local_init): 
2535         * providers/imap/camel-imap-folder.c (camel_imap_folder_init,
2536         camel_imap_folder_new): 
2537         * camel-vtrash-folder.c (camel_vtrash_folder_init): 
2538         * camel-vee-folder.c (camel_vee_folder_init): 
2539         * camel-digest-folder.c (camel_digest_folder_init): update folder
2540         flag setting.
2541
2542 2001-10-07  Dan Winship  <danw@ximian.com>
2543
2544         * providers/imap/camel-imap-store.c (get_folder_online): Unlock
2545         the store before returning error. (noted by NotZed)
2546
2547 2001-10-06  Jeffrey Stedfast  <fejj@ximian.com>
2548
2549         * camel-mime-utils.c (header_decode_text): Fix a slight error in
2550         logic. Just because the last word was an encoded word doesn't mean
2551         we ignore the lwsp padding, we only ignore it if the last word and
2552         *this* word are encoded.
2553
2554 2001-10-06  Jeffrey Stedfast  <fejj@ximian.com>
2555
2556         * camel-mime-filter-basic.c (filter): Implemented uuencoding and
2557         decoding.
2558         (complete): Implemented uuencoding and decoding.
2559
2560         * camel-mime-utils.c (uuencode_close): New function to flush the
2561         uu encoder.
2562         (uuencode_step): New function to uuencode a block of data.
2563
2564 2001-10-05    <NotZed@Ximian.com>
2565
2566         * providers/imap/camel-imap-store.c (subscribe_folder): Use a
2567         folder_subscribed event rather than a folder_created one.
2568         (unsubscribe_folder): Similarly for unsubscribed/deleted.
2569         (create_folder): Emit a folder_created event on the folders we
2570         added.  Not sure hsould probably check which ones are new and
2571         which ones are just existing ones?
2572         (delete_folder): Emit a folder_deletd event when we've deleted the
2573         folder.  Part of fix for #11831.
2574
2575         * camel-store.c (camel_store_class_init): Added
2576         folder_subscribed/unsubscribed events.
2577
2578 2001-10-05  Jeffrey Stedfast  <fejj@ximian.com>
2579
2580         * camel-service.c (camel_service_finalize): Turn off warnings.
2581         (get_name): Same.
2582
2583         * camel-sasl.c (sasl_challenge): Turn off warnings.
2584
2585         * camel-tcp-stream.c (tcp_connect): Turn off warnings.
2586         (tcp_getsockopt): Same.
2587         (tcp_setsockopt): Here too.
2588         (tcp_get_socket): And here.
2589
2590         * camel-folder.c (folder_sync): Turn off warnings.
2591         (expunge): Same.
2592         (append_message): Here too.
2593         (get_message): And here.
2594         (search_by_expression): And again here.
2595         (folder_changed): Here too.
2596
2597         * camel-store.c (get_folder): Set an exception and turn off
2598         debugging g_warnings.
2599         (create_folder): Same.
2600         (delete_folder): Here too.
2601         (rename_folder): And here.
2602         (get_trash): And here.
2603         (get_folder_info): Same.
2604         (free_folder_info): And again here.
2605         (camel_folder_info_build): Here too.
2606         (folder_subscribed): Same.
2607         (subscribe_folder): Here too.
2608         (unsubscribe_folder): And here.
2609
2610 2001-10-05    <NotZed@Ximian.com>
2611
2612         * camel-mime-utils.c (header_decode_mailbox): Try harder to get
2613         broken names out of addresses.  Unencoded ,'s in names will still
2614         break it, but well what can you do eh?
2615         (header_decode_mailbox): Always add .'s into address we've scanned
2616         past a '.', even if we can't decode the next part.  Fix for some
2617         annoying bug #.
2618
2619 2001-10-04    <NotZed@Ximian.com>
2620
2621         * camel-store.c (camel_store_delete_folder): Change the order of
2622         execution slightly.  We delete the folder first, then call the
2623         classes delete folder, then cleanup the hashtable afterwards.
2624         This is so deletes of vfolders work, since vee-store uses the
2625         folder hashtable to store all of is vfolders :-/
2626
2627 2001-10-04  Jeffrey Stedfast  <fejj@ximian.com>
2628
2629         * camel-service.c (camel_service_connect): Unregister the
2630         operation before unreffing it.
2631
2632 2001-10-03    <NotZed@Ximian.com>
2633
2634         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
2635         Remove now unused 'recents' array/freeing func.
2636
2637         * camel-object.c (camel_object_trigger_event): Oops, always run
2638         the prep function, even if we have no hooks listening.  Causes
2639         incoming imap recents to get ignored bythe camel-folder filter
2640         inbox code.
2641
2642         * providers/local/camel-local-folder.c (local_sync): Dont
2643         explicitly save metadata, its saved in summary_sync.
2644
2645         * providers/local/camel-mh-summary.c: Call superclass.
2646         (mh_summary_check): Dont save ibex.
2647
2648         * providers/local/camel-maildir-summary.c: Call superclass method.
2649         (maildir_summary_check): Dont save ibex explictly.
2650
2651         * providers/local/camel-mbox-summary.c: Call super-class sync when
2652         done, saves summary/ibex, etc.
2653         (mbox_summary_check): Dont save ibex.
2654         (mbox_summary_sync): Call summary_check rather than trying to
2655         update from our known position.
2656
2657         * providers/local/camel-local-summary.c
2658         (camel_local_summary_check): Dont save the summary or index here.
2659         (local_summary_sync): Save the summary/index here.
2660
2661         * camel-search-private.c (camel_search_build_match_regex): Added
2662         MATCH_NEWLINE flag, -> REG_NEWLINE.
2663
2664         * camel-lock-helper.c: Include <string.h> to kill some warnings.
2665
2666         * camel-filter-search.c (get_full_header): Put \n's between each
2667         line we generate.
2668         (header_full_regex): Dont drop the first argument to the command
2669         -> empty matches!
2670         (header_full_regex): Set match_newline for building regex.
2671         (body_regex): And here too.  These all fix #9877.
2672
2673 2001-10-03  Jeffrey Stedfast  <fejj@ximian.com>
2674
2675         * camel-store.c (camel_store_delete_folder): Call
2676         camel_folder_delete() on the folder if it's "alive".
2677
2678         * camel-folder.c (camel_folder_delete): Mark the folder as
2679         deleted, perform any folder specific cleanup and emit the deleted
2680         event.
2681         (camel_folder_sync): Only sync the folder if it hasn't been
2682         deleted.
2683         (camel_folder_expunge): Same.
2684
2685 2001-10-03  Dan Winship  <danw@ximian.com>
2686
2687         * providers/local/camel-local-provider.c (local_url_equal):
2688         Strange are the ways of alloca. Fixes 11543.
2689
2690 2001-10-02  Jeffrey Stedfast  <fejj@ximian.com>
2691
2692         * camel-tcp-stream-ssl.c (ssl_bad_cert): Import the certificate if
2693         the user accepts it.
2694
2695 2001-10-02    <NotZed@Ximian.com>
2696
2697         * providers/local/camel-local-provider.c (local_url_hash,
2698         local_url_equal): for hashing/comparing local url's, we ignore
2699         trailing /'s in paths (maybe shuld handle multiple /'s too).
2700         (camel_provider_module_init): Use local_url_hash/equal for all
2701         functions.
2702
2703         * camel-sasl-digest-md5.c (digest_response): Change to
2704         camel_charset_iconv_open/close.
2705
2706         * camel-pgp-context.c (pgp_verify): Change to
2707         camel_charset_iconv_open/close.
2708
2709         * camel-mime-part-utils.c (convert_buffer): Change to
2710         camel_charset_iconv_open().
2711
2712         * camel-mime-filter-charset.c
2713         (camel_mime_filter_charset_new_convert, finalise): Change to
2714         camel_charset_iconv_open, etc.
2715
2716         * camel-mime-utils.c: Use the camel_charset_iconv_open/close()
2717         functions to open/close it.
2718
2719         * camel-charset-map.c (camel_charset_iconv_open): New function,
2720         wrap iconv_open, so we can cache ic's.
2721         (camel_charset_iconv_close): Likewise for close.
2722         (camel_charset_map_init,shutdown): Init/free iconv cache.
2723
2724 2001-10-02  Jeffrey Stedfast  <fejj@ximian.com>
2725
2726         * camel-charset-map.c (camel_charset_to_iconv): Revert my
2727         x-unknown special-case hack - this may mask other problems.
2728
2729         * camel-mime-utils.c (rfc2047_decode_word): If the iconv
2730         conversion fails, for whatever reason, retry using the user's
2731         locale charset.
2732
2733 2001-10-02    <NotZed@Ximian.com>
2734
2735         * providers/local/camel-maildir-store.c (get_folder_info): Go back
2736         to using the store url's path, not the toplevel_dir thing.
2737
2738         * camel-operation.c (camel_operation_progress): Fix the progress
2739         logic, so we dont update too often.
2740
2741         * camel-object.c (camel_object_get_hooks): Change the lock to a
2742         recursive e-mutex.
2743         (camel_object_hook_event): Maintain list length of hook list.
2744         (camel_object_unhook_event): "
2745         (camel_object_unhook_event): If we are in an event, just mark the
2746         pair as removed, without removing it.
2747         (camel_object_trigger_event): Before running events, copy the
2748         list, and also ignore 'removed' events.  After running events, if
2749         we're all out of events, then free up any pending-removed events.
2750         (camel_object_free_hooks): Add some new assertions on the state of
2751         the hook structure.
2752         Removed the #error if threads not defined.  It _should_ actually
2753         work without threads.
2754         (camel_object_free_hooks): Free mutex when done.
2755
2756 2001-10-01  Jeffrey Stedfast  <fejj@ximian.com>
2757
2758         * providers/imap/camel-imap-store.c (delete_folder): Remove any
2759         cached messages that belonged to the deleted folder.
2760         (subscribe_folder): Don't ever let the info->name be NULL and
2761         don't use the stupid concat kludge to generate the URL, just use a
2762         CamelURL to do it. This way we don't risk breaking stuff by having
2763         a url like imap://fejj@imap//folder
2764
2765         * camel-charset-map.c (camel_charset_to_iconv): If the charset is
2766         x-unknown, return the locale_charset.
2767
2768 2001-10-01  Dan Winship  <danw@ximian.com>
2769
2770         * camel-provider.h: Fix up the provider flags to specify things
2771         more completely so we don't have to hardcode provider names in the
2772         mailer.
2773
2774         * providers/local/camel-local-provider.c: MH, mbox, and Maildir
2775         are LOCAL. MH and mbox are no longer STORAGE by the new
2776         definition.
2777
2778         * camel-session.c (vee_provider): The vfolder store is a STORAGE.
2779
2780 2001-10-01  Dan Winship  <danw@ximian.com>
2781
2782         * providers/local/camel-local-store.c (construct): Don't munge the
2783         URL; CamelSession's caching relies on it not changing. Instead,
2784         add a toplevel_dir field to CamelLocalStore, and set that to the
2785         path, but always ending with /.
2786         (camel_local_store_finalize): Free toplevel_dir
2787         (camel_local_store_get_toplevel_dir): Return toplevel_dir rather
2788         than url->path.
2789
2790         * providers/local/*: Lots of s/url->path/toplevel_dir/
2791
2792         * providers/local/camel-spool-store.c (construct): Likewise, don't
2793         try to strip a trailing / from url->path here, but I didn't make
2794         the corresponding toplevel_dir change, because there's no good
2795         reason someone should expect "/var/spool/mail/danw/" to work since
2796         that's not a directory.
2797
2798         * providers/pop3/camel-pop3-folder.c (pop3_refresh_info): if STAT
2799         returns 0, don't bother sending UIDL. Speeds things up slightly
2800         and also works around a bug in a particular random POP server.
2801         (ximian bug 11369).
2802
2803 2001-09-29  Jeffrey Stedfast  <fejj@ximian.com>
2804
2805         * camel-pgp-context.c (pgp_sign): Add --no-secmem-warning and
2806         --no-greeting to the gpg command-line options.
2807         (pgp_clearsign): Same.
2808         (pgp_verify): Here too.
2809         (pgp_encrypt): And here.
2810         (pgp_decrypt): And finally here.
2811
2812 2001-09-28  Jeffrey Stedfast  <fejj@ximian.com>
2813
2814         * camel-filter-search.c (get_source): Same here.
2815
2816         * camel-mime-message.c (camel_mime_message_set_source): Don't use
2817         the e_url_shroud hack, use CamelURL functions instead.
2818
2819 2001-09-28  Jeffrey Stedfast  <fejj@ximian.com>
2820
2821         * providers/nntp/camel-nntp-provider.c
2822         (camel_provider_module_init): Init the nntp url hash and url_equal
2823         functions.
2824
2825         * providers/sendmail/camel-sendmail-provider.c
2826         (camel_provider_module_init): Init the sendmail url hash and
2827         url_equal functions.
2828
2829         * providers/smtp/camel-smtp-provider.c
2830         (camel_provider_module_init): Init the smtp url hash and url_equal
2831         functions.
2832
2833         * providers/pop3/camel-pop3-provider.c
2834         (camel_provider_module_init): Init the pop3 url hash and url_equal
2835         functions.
2836
2837         * providers/imap/camel-imap-provider.c
2838         (camel_provider_module_init): Init the imap url hash and url_equal
2839         functions.
2840
2841         * providers/local/camel-local-provider.c
2842         (camel_provider_module_init): Init the local url hash and
2843         url_equal functions.
2844
2845         * camel-session.c (camel_session_class_init): Init the vfolder url
2846         hash and url_equal functions.
2847
2848         * camel-provider.h: Added url_hash and url_equal function pointers
2849         to the structure.
2850
2851         * camel-vtrash-folder.c (vtrash_move_messages_to): Oops, a
2852         CamelFolder is not a CamelFolderClass.
2853
2854 2001-09-28  Dan Winship  <danw@ximian.com>
2855
2856         * camel-tcp-stream-openssl.c (ssl_error_to_errno): Make this take
2857         an SSL * instead of a CamelTcpStreamSSL *, since it can get called
2858         from open_ssl_connection, when the CamelTcpStreamSSL isn't set up
2859         right yet. Fixes a crash on connection failure.
2860
2861 2001-09-27  Dan Winship  <danw@ximian.com>
2862
2863         * providers/imap/camel-imap-folder.c
2864         (camel_imap_folder_fetch_data): Grab the store's command_lock
2865         before grabbing the folder's cache_lock to prevent deadlock if
2866         another thread is processing an EXPUNGE response.
2867
2868         * providers/imap/camel-imap-folder.c
2869         (imap_expunge_uids_resyncing): Fix a compiler warning that might
2870         point out a real bug...
2871
2872         * providers/imap/camel-imap-folder.c (get_content): and one that
2873         doesn't
2874
2875 2001-09-27    <NotZed@Ximian.com>
2876
2877         * camel-service.c (camel_service_connect): Dont re-register the
2878         connect_op if we got it by calling 'operation_registered', which
2879         returns an already-registered one.
2880         (camel_service_disconnect): Likewise here.  This removes all the
2881         re-registered warnings.
2882
2883         * camel-object.c (camel_object_unref): Fill the finalised data
2884         with nonsense, rather than 0's - more easily detect bad data.
2885         (camel_object_new): Clear instance data when we retrieve it off
2886         the list.
2887
2888         * camel-object.h (_CamelObject): Added an event lock pointer for
2889         uh, locking event stuff.  Also change the hooklist hashtable into
2890         a list.  Changed all the code to handle it.  Result: thread-safe
2891         events, event-hooks, and save memory too, and SHOULD FINALLY FIX
2892         THAT UNREAD COUNT PROBLEM.
2893
2894 2001-09-27  Jeffrey Stedfast  <fejj@ximian.com>
2895
2896         * camel-pgp-mime.c (camel_pgp_mime_part_decrypt): CRLF decode the
2897         stream before parsing it into a MIME part. This fixes bug #10521.
2898
2899         * camel-store.c: Remove the old folder from the vTrash folder.
2900
2901 2001-09-27  Dan Winship  <danw@ximian.com>
2902
2903         * camel-service.c: Change "gboolean connected" to
2904         "CamelServiceConnectionStatus status", which can be disconnected,
2905         connecting, connected, or disconnecting.
2906         (camel_service_init, camel_service_finalize): create/destroy the
2907         connect_op_lock. Refer to service->status rather than
2908         service->connected.
2909         (camel_service_connect): When connecting, note the current
2910         operation (and create a new one if there's none registered) and
2911         mark the connection "connecting" until we succeed or fail.
2912         (camel_service_disconnect): Likewise in reverse.
2913         (camel_service_cancel_connect): New function to cancel a
2914         connection attempt.
2915         (cancel_connect): Default implementation: Call
2916         camel_operation_cancel on the connect_op.
2917
2918         * camel-disco-store.c (disco_connect): Only call
2919         CamelRemoteStore's connect func if we're online.
2920         (disco_cancel_connect): Fall back to offline if a connection gets
2921         cancelled.
2922         (disco_get_folder_info): Kludge: call connect explicitly before
2923         deciding whether to do the online or offline version, so if the
2924         connect fails, we fall back correctly.
2925
2926         * camel-session.c (camel_session_get_service_connected):
2927         s/svc->connected/svc->status/
2928
2929         * camel-remote-store.c (camel_remote_store_finalise):
2930         Change service->connected check to service->status check.
2931         (remote_connect): Don't set service->connected here:
2932         camel_service_connect() itself does that.
2933
2934         * camel-operation.c (camel_operation_registered): Deal with the
2935         possibility that there's no registered op.
2936
2937 2001-09-26    <NotZed@Ximian.com>
2938
2939         * camel-filter-driver.c (camel_filter_driver_filter_message): If
2940         we get a search error, just abort, dont try and fall back and copy
2941         to inbox.
2942         (camel_filter_driver_filter_message): Make sure we ALWAYS use
2943         exceptions for important things - like moving messages to inbox!
2944         (camel_filter_driver_filter_message): If we have the source
2945         folder, use camel_folder_set_message_flags rather then poking the
2946         info directly, which skips changed events.  This means filtering
2947         immediate doesn't lose changed events.
2948         (do_flag): Same here.
2949         (do_colour): Same thing but using set_tag.
2950         (do_score): Same again.
2951         (camel_filter_driver_filter_folder): Use ~0 as the 'set' arg to
2952         set_flags, just saves typing.
2953         (open_folder): We cache folders that we couldn't open as well as
2954         those ones we could.  Use magic token FOLDER_INVALID =
2955         (void *)~0 as the marker.
2956         (close_folder): Handle FOLDER_INVALID case properly.
2957
2958 2001-09-26  Jeffrey Stedfast  <fejj@ximian.com>
2959
2960         * camel-mime-message.c
2961         (camel_mime_message_get_part_by_content_id): New function to
2962         convenience Larry ;-)
2963         (check_content_id): Oops, return !found instead of found. This
2964         callback has to return whether or not to keep searching, not
2965         whether or not it found what it's looking for. Do'h!
2966
2967         * camel-pgp-mime.c (camel_pgp_mime_is_rfc2015_signed): block out
2968         some code if ENABLE_PEDANTIC_PGPMIME is not defined.
2969
2970 2001-09-26    <NotZed@Ximian.com>
2971
2972         * camel-vee-store.c: Emptied VeeStorePrivate, member wasn't used.
2973
2974         * camel-vee-folder.c (camel_vee_folder_set_expression): Lock
2975         changed list separately.
2976         (camel_vee_folder_remove_folder): "
2977         (camel_vee_folder_set_folders): Use changed_lock for changed list.
2978         (vee_refresh_info): Use changed_lock, also just grab the list,
2979         reset it in the lock, and do the work unlocked.
2980         (vee_sync): Use changed lock for changed list.
2981         (folder_changed): ".  All this kills a deadlock with sync/expunge.
2982         
2983         * camel-private.h (CamelVeeFolderPrivate): Added a new lock for
2984         the folders-changed list.
2985         (CamelVeeStorePrivate): Removed, defined in camel-vee-store.c,
2986         thanks to a pedantic.
2987
2988 2001-09-26  Jeffrey Stedfast  <fejj@ximian.com>
2989
2990         * Makefile.am: Fix Ettore's fix.
2991
2992 2001-09-25  Jeffrey Stedfast  <fejj@ximian.com>
2993
2994         * camel-pgp-context.c (camel_pgp_context_new): No longer takes a
2995         remember argument.
2996         (pgp_sign): Only uncache the passphrase on failure.
2997         (pgp_clearsign): Same.
2998         (pgp_encrypt): Here too.
2999         (pgp_decrypt): And here.
3000         (pass_free): New function to zero the passphrase before freeing
3001         it.
3002
3003 2001-09-25  Ettore Perazzoli  <ettore@ximian.com>
3004
3005         [Patch for Automake 1.5 compatibility pointed out by Richard
3006         Boulton <richard@tartarus.org>, as per #9258.]
3007
3008         * providers/nntp/Makefile.am: Remove some commented parts that
3009         make Automake 1.5 choke.
3010
3011         * Makefile.am (camel-lock-helper): Add $(EXEEXT) for Automake 1.5
3012         compatibility.
3013
3014 2001-09-25    <NotZed@Ximian.com>
3015
3016         * camel-folder.c (get_unread_message_count): Only unref info if we
3017         got it.
3018
3019         * camel-operation.c (camel_operation_unref): Fix for !threads
3020         enabled not ccompiling.
3021         (camel_operation_ref): Assert refcount > 0.
3022         (struct _CamelOperation): Removed the lock.  On further
3023         investigation, I dont think this will always work, the
3024         registration operations assume that a lookup in the
3025         operation_active table will return a ref, that will remain valid
3026         until we ref it, which needn't be the case.  So now i'm using a
3027         single global lock, since we'd need to do that for unref anyway,
3028         and every operation is fast & memory-bound.  Changed all the code
3029         to handle this.
3030         (camel_operation_progress_count): Since the code is identical,
3031         just call progress() for now.
3032         (camel_operation_register): No longer refcount, use unref to
3033         check/clear the active table.
3034         (camel_operation_unregister): Same here.
3035         (camel_operation_unref): Check if operation is in active table, if
3036         so, warn, remove.
3037
3038 2001-09-25  Dan Winship  <danw@ximian.com>
3039
3040         * camel-tcp-stream-openssl.c (my_SSL_read, my_SSL_write): call
3041         SSL_read/write, looping on SSL_ERROR_WANT_READ/WRITE. I'm sure
3042         there's a perfectly good reason that the API works this way. No,
3043         really.
3044         (stream_read, stream_write): use my_SSL_read and my_SSL_write.
3045         Fixes at least ximian 8593, and probably 6024 and maybe 10366,
3046         at least for OpenSSL. There may be a parallel NSS bug?
3047
3048 2001-09-25    <NotZed@Ximian.com>
3049
3050         * camel-stream-buffer.c (stream_write_all): A "safe write"
3051         function that always writes out all data asked of it, till
3052         finished.
3053         (stream_write): Rewritten.  What was i on when i wrote that
3054         originally, how did it ever work with tcp streams ...
3055
3056 2001-09-24    <NotZed@Ximian.com>
3057
3058         * camel-folder.c (append_message): Set the exception to
3059         FOLDER_INVALID rather than making out it worked.  A fix for #7025.
3060         (search_by_expression): Here too.
3061
3062         * providers/imap/camel-imap-folder.c (imap_update_summary): In the
3063         'lose' case, free messages, not fetch_data twice!
3064
3065         * camel-filter-search.c (check_header): If the type is encoded,
3066         get the fallback charset from the message content-type.
3067
3068         * camel-mime-part-utils.c (check_html_charset): Dont check for
3069         charset==null before calling charset_to_iconv.
3070         (simple_data_wrapper_construct_from_parser): "
3071
3072         * camel-mime-message.c (process_header): Try use content-type
3073         charset param as the fallback charset.
3074
3075         * camel-charset-map.c (camel_charset_to_iconv): Handle name ==
3076         NULL, return NULL.
3077
3078         * camel-folder-summary.c (camel_folder_summary_format_address):
3079         (camel_folder_summary_format_string): Made private again, removed
3080         #warning about it.  Renamed to s/camel_folder//.
3081         (summary_format_string): Take default charset param.
3082         (camel_message_info_new_from_header, message_info_new): Decode
3083         content-type field to get the charset parameter to use as the
3084         default charset for decoding strings.
3085
3086         * camel-search-private.c (camel_search_header_match): Pass NULL as
3087         the charset, the locale charset is always tried.
3088         (camel_search_header_match): Supply a default_charset parameter to
3089         be used with TYPE_ENCODED params.
3090
3091         * camel-mime-utils.c
3092         (header_param): get rid of the g_strcasecmp crap.
3093         (header_set_param): Same here.
3094         (header_decode_param_list): And here.
3095         (header_decode_text): Totally rewritten.  30% of its size.  If the
3096         word is not rfc2047 encoded, always try default_charset if
3097         supplied, if that fails, try locale charset if it exists, if that
3098         fails then assume latin1/7 bit ascii.
3099         (append_8bit): Changed to return FALSE if we can't convert for
3100         whatever reason, and dont append anything.
3101
3102         * camel-mime-part.h (struct _CamelMimePart): Move content_type and
3103         headers out of the 'private' section.
3104
3105         * camel-mime-part.c (get_headers): Dont do any conversion on the
3106         header.
3107         (process_header): Get the content-type charset as the fallback
3108         charset for decode_string.
3109         (construct_from_parser): IF we have a content-type header, process
3110         it before doing anything else, so we have access to a fallback
3111         charset for invalid headers.
3112
3113 2001-09-23  Jeffrey Stedfast  <fejj@ximian.com>
3114
3115         * camel-tcp-stream-openssl.c (ssl_verify): Don't even try to alert
3116         the user if the session isn't interactive.
3117         (errlib_error_to_errno): Make the default errno EINTR so that we
3118         act just like CamelTcpStreamSSL.
3119
3120         * camel-pgp-context.c (pgp_sign): When the password is not
3121         provided, set the exception to USER_CANCEL.
3122         (pgp_clearsign): Same.
3123         (pgp_encrypt): And here.
3124         (pgp_decrypt): Here too.
3125
3126 2001-09-21    <NotZed@Ximian.com>
3127
3128         * camel-store.c (create_folder): Set the exception if
3129         create_folder isn't implemented.
3130
3131 2001-09-21  Jeffrey Stedfast  <fejj@ximian.com>
3132
3133         * providers/imap/camel-imap-store.c (create_folder): Go back to
3134         not using camel_folder_info_build() here because this seems to
3135         break folder creation (returning nodes from the root path when it
3136         shouldn't be?).
3137
3138 2001-09-21    <NotZed@Ximian.com>
3139
3140         * camel-vee-store.c (vee_get_folder_info): Force a refresh of
3141         vfolders before storing their count.  This essentially makes
3142         'get_folderinfo' refresh all vfolders, so that get-mail works as
3143         expected.
3144
3145         * camel-vee-folder.c (camel_vee_folder_finalise): Clear lists.
3146         (folder_changed): If we're not autoupdating the folder, then
3147         add this folder to the list of 'changed' folders for this vfolder.
3148         (camel_vee_folder_set_expression): Reset the folders_changed list.
3149         (camel_vee_folder_remove_folder): Remove the folder from the
3150         folders_changed list.
3151         (camel_vee_folder_set_folders): If we have a folder already, but
3152         its changed, use this opportunity to update it.
3153         (vee_sync): Remove any synced folders from the folders_changed
3154         list.
3155         (vee_refresh_info): Refresh folder, re-run queries on any changed
3156         folders.
3157
3158 2001-09-20    <NotZed@Ximian.com>
3159
3160         * camel-folder-summary.c (camel_folder_summary_header_load): New
3161         function to just load the summary.  Not much use yet, until unread
3162         counts are stored in the summary (which now looks like too much
3163         work!).
3164
3165         * camel-mime-utils.c (header_decode_mailbox): Crappy fix for
3166         stupid mailers.  If we get 'name b. name <foo>' then treat it as
3167         '"name b. name" <foo>'.  See 8147.
3168         (header_decode_mailbox): Another fix for really broken mailers
3169         that have things that look like addresses followed by <address>
3170         bits.
3171         (rfc2047_encode_word): Escape ??= to avoid some bizarre warning
3172         about trigraphs.
3173
3174         * providers/local/camel-local-folder.c
3175         (camel_local_folder_construct): Setup unread count properly, and
3176         also setup the url properly.
3177
3178         * providers/local/camel-maildir-store.c (camel_folder_info_new):
3179         Build the path on the folderinfo.
3180         (scan_dir): Dont include empty host part in url for folder.
3181         (scan_dir): Lookup folder counts for any folders we currenty have
3182         open.
3183         (scan_dir): If we dont have the folder open, then scan the 'new'
3184         and 'cur' folders for new and unread messages to count instead.
3185
3186         * providers/local/camel-spool-store.c (get_folder_info): If we
3187         have this folder open, then set unread from the folder itself.
3188         (get_folder_info): Change the INBOX path to not include the
3189         leading /.
3190
3191         * providers/local/camel-spool-folder.c
3192         (camel_spool_folder_construct): Fix path.
3193         (camel_spool_folder_construct): Properly setup the url field when
3194         we say we've got a new folder created.
3195
3196         * providers/imap/camel-imap-store.c (unsubscribe_folder): Build
3197         path on folderinfo.
3198
3199         * camel-store.c (camel_folder_info_build_path): Prepend / to path.
3200
3201         * camel-vee-folder.c (camel_vee_folder_construct): Use macro for
3202         unmatched folder name.
3203         (camel_vee_folder_new): "
3204
3205         * camel-vee-store.c (vee_get_folder_info): Use macro for unmatched
3206         folder name.
3207         (vee_delete_folder): "
3208         (vee_rename_folder): "
3209         (vee_get_folder): Prepend / onto path.
3210         (vee_delete_folder): Setup path in folderinfo.
3211         (vee_get_folder_info): Fix path in folderinfo.
3212
3213         * camel-vee-folder.h (CAMEL_UNMATCHED_NAME): New define for
3214         unmatched (internal) name.
3215
3216 2001-09-20  Jeffrey Stedfast  <fejj@ximian.com>
3217
3218         * providers/local/camel-spool-folder.c
3219         (camel_spool_folder_construct): And finally here.
3220
3221         * providers/local/camel-local-folder.c
3222         (camel_local_folder_construct): And here.
3223
3224         * camel-vee-store.c (vee_get_folder): ANd here too.
3225         (vee_get_folder_info): And here.
3226
3227         * providers/imap/camel-imap-store.c (create_folder): Use
3228         camel_folder_info_build() and do better error checking.
3229         (subscribe_folder): Set the path on the folder info.
3230
3231         * camel-store.c (camel_folder_info_build): Set the folder-info
3232         path if it hasn't already been set by the caller.
3233         (camel_folder_info_free): Free the path.
3234
3235         * camel-store.h: Added a path member to the FolderInfo type.
3236
3237 2001-09-20  Dan Winship  <danw@ximian.com>
3238
3239         * camel-charset-map.c (camel_charset_to_iconv): Nuke debug warning.
3240
3241 2001-09-19  Jeffrey Stedfast  <fejj@ximian.com>
3242
3243         * camel-pgp-context.c: Updated exception strings to be more clear.
3244
3245         * camel-pgp-mime.c (pgp_mime_part_sign_restore_part): Stupid
3246         mistake, fixes bug #9975.
3247
3248         * camel-tcp-stream-ssl.c (ssl_bad_cert): Oops, don't fail if
3249         `data' isn't a CamelService...cuz it's not supposed to be! It's a
3250         CamelTcpStreamSSL object...doh!
3251
3252 2001-09-19    <NotZed@Ximian.com>
3253
3254         * General cleanup of camel debug printfs.
3255         
3256         * camel-lock.c (camel_lock_fcntl): Changed to return 'success' if
3257         the error indicates file locking isn't supported on this
3258         filesystem.  Still return a warning just incase (if its the first
3259         time).  Might fix a lot of reported bugs.
3260
3261         * providers/local/camel-spool-store.c (get_folder_info): Dont
3262         include the empty // host part in the uri.  This 'breaks' the
3263         service lookup.
3264
3265 2001-09-18  Jeffrey Stedfast  <fejj@ximian.com>
3266
3267         * camel-mime-utils.c: Match mailing-list header List-Owner.
3268
3269 2001-09-18    <NotZed@Ximian.com>
3270
3271         * camel-vee-store.c (vee_get_folder): Fix the uri genereated for
3272         the folderinfo for the folder_created event.
3273
3274         * camel-store.h: Added 'total' to CamelFolderInfo.
3275
3276 2000-09-18    <NotZed@Ximian.com>
3277
3278         * providers/local/camel-maildir-folder.c
3279         (camel_maildir_folder_new): If filter inbox is set on the store,
3280         and we're opening inbox '', then enable filtering on new messages.
3281
3282         * providers/local/camel-local-folder.c
3283         (camel_local_folder_construct): After loading the summary, check
3284         it, and only abort if that fails.  Also maintain the changes
3285         count.
3286
3287         * providers/local/camel-local-summary.c
3288         (camel_local_summary_load): Remove summary_check code from here.
3289         (camel_local_summary_check): Sync index/summary here, if we were
3290         successful.
3291
3292         * providers/local/camel-spool-folder.c
3293         (camel_spool_folder_new): If we have filter-new-messages-on-inbox
3294         set and we just opened inbox, turn on filtering on this folder.
3295         (camel_spool_folder_construct): Keep track of changes for the
3296         folder, so that filter-new-messages works right (?)
3297
3298         * providers/local/camel-spool-store.c (get_folder): Pass 'INBOX'
3299         as the folder name, not the path.
3300
3301         * camel-folder-search.c (search_not): Modified patch from
3302         <peterw@ximian.com> since the summary is messageinfo's, not
3303         strings.
3304
3305         ** Ok so the problem with the stuff below is that maildir/spool
3306         'summary_load' throws away all events, including recents, joy eh?
3307         
3308         * providers/local/camel-maildir-summary.c (maildir_summary_check):
3309         Add new messages to the recent changeinfo.
3310
3311         * providers/local/camel-spool-summary.c: Mark 'new' message as
3312         recent, for later processing if required (i.e. 'filter new
3313         messages').
3314
3315         * camel-store.c (construct): new function, cascade up construct
3316         method and check for 'filter' param, and set accordingly for any
3317         one that might want it.
3318
3319         * providers/imap/camel-imap-store.c (construct): map the
3320         param_filter_inbox flag to the store->flags as
3321         CAMEL_STORE_FILTER_INBOX.
3322
3323         * camel-store.h (CAMEL_STORE_FILTER_INBOX): new flag to tell it to
3324         filter inbox.
3325
3326         * providers/imap/camel-imap-folder.h: Removed do_filtering flag
3327         from CamelImapFolder.
3328
3329         * providers/imap/camel-imap-folder.c (imap_update_summary): Remove
3330         the 'recents' parameter, use the 'changes' parameter instead to
3331         convey this info.
3332         (camel_imap_folder_changed): Changed for update_summary api
3333         change.  Now always just emit the changed event if we have any
3334         changes to report, filtering code removed, handled upstream.
3335         (filter_proc): 
3336         (filter_free): Removed old filtering code.
3337         (camel_imap_folder_new): Set the filter_recent flag on the folder
3338         if we're the inbox and filtering of inbox is enabled.
3339
3340         * camel-folder.c (folder_changed): If we have 'recent' messages,
3341         and are set to filter recents, then freeze the folder and launch a
3342         thread to do the processing (or similar if threading not enabled).
3343         (thaw): Make sure we emit the changed signal outside of owning the
3344         lock and if things have changed.  Also, no longer bother
3345         downgrading folder_changed events to message_changed events.
3346
3347         * camel-folder.h (struct _CamelFolder): Added filter_recent flag
3348         -> signifies all recent messages in folder should be filtered.
3349
3350         * camel-session.c: (camel_session_thread_msg_new,
3351         camel_session_thread_msg_free, camel_session_thread_queue,
3352         camel_session_thread_wait): code to handle async operations as
3353         part of camel processing.
3354         (camel_session_finalise): free thread_lock, destroy thread, active
3355         hash, etc.
3356         (camel_session_init): init thread, active hash, etc.
3357         (camel_session_class_init): Init virtual functions.
3358         (session_thread_msg_new, session_thread_msg_free,
3359         session_thread_destroy, session_thread_received,
3360         session_thread_queue, session_thread_wait): default implementation
3361         of session threads stuff.
3362
3363 2001-09-17    <NotZed@Ximian.com>
3364
3365         * camel-folder.c (camel_folder_change_info_recent_uid): New
3366         function to add a 'recent' uid to the change info.
3367         (camel_folder_change_info_clear): Clear recent list.
3368         (camel_folder_change_info_free): Free recent list.
3369         (camel_folder_change_info_new): Setup recent list.
3370
3371         * camel-folder.h: Added a uid_recent item to the folder_changed
3372         event data.
3373
3374         * providers/local/camel-maildir-store.c (scan_dir): Free new in
3375         the right block.
3376
3377         * providers/local/camel-local-provider.c: Add local config entries
3378         to filter on new messages in spool and maildir provider.
3379
3380         * camel-vee-folder.c (vee_folder_construct): Remove the assertion
3381         which stops ? in names from being allowed.
3382
3383 2001-09-18  Dan Winship  <danw@ximian.com>
3384
3385         * camel-data-wrapper.c (camel_data_wrapper_is_offline): Virtualize
3386         this.
3387
3388         * camel-medium.c (is_offline): A medium is offline if its content
3389         object is offline.
3390
3391         * camel-multipart.c (is_offline): A multipart is offline if any of
3392         its subparts are offline.
3393
3394 2001-09-18  Jeffrey Stedfast  <fejj@ximian.com>
3395
3396         * camel-charset-map.c: Added korean charset conversion.
3397
3398 2001-09-17  Jeffrey Stedfast  <fejj@ximian.com>
3399
3400         * providers/imap/camel-imap-store.c (delete_folder): Don't process
3401         the ImapResponse data, we don't want to block forever on data we
3402         don't care about...
3403         (create_folder): Use get_folders_online() instead of
3404         get_folder_info_online().
3405
3406         * camel-folder.c: Reverted previous changes.
3407
3408 2001-09-17  JP Rosevear  <jpr@ximian.com>
3409
3410         * Makefile.am: Helpful install-exec-hook debugging output
3411
3412 2001-09-16  Jeffrey Stedfast  <fejj@ximian.com>
3413
3414         * camel-folder.c (camel_folder_get_uri): New function to get the
3415         URI of a folder.
3416         (get_uri): Default implementation.
3417
3418 2001-09-14    <NotZed@Ximian.com>
3419
3420         * camel-vee-folder.c (camel_vee_folder_set_folders): New function,
3421         set the complete list of folders on a vfolder, all at once.
3422         (camel_vee_folder_set_expression): If we set the query to be the
3423         same thing, dont do anything.
3424
3425         * camel-vee-store.c (camel_vee_store_init): Turn off vtrash for
3426         this store.
3427
3428         * camel-store.c (camel_store_init): Enable vtrash by default via
3429         flags.
3430         (camel_store_get_trash): REturn NULL if the store doesn't support
3431         vtrash.
3432         (init_trash): Dont init if store doesn't support vtrash.
3433
3434         * camel-store.h: Add a new flags CAMEL_STORE_VTRASH -> store
3435         supports vtrash.
3436
3437 2001-09-13    <NotZed@Ximian.com>
3438
3439         * camel-vee-store.c (vee_get_folder_info): Implement.
3440         (build_info): Used to build a folder record from the folders
3441         hashtable.
3442         (vee_delete_folder): Implemented, remove folder from hashtable.
3443         (vee_rename_folder): Implemented, remove old folder from
3444         hashtable, add new one and rename its guts too.
3445
3446         * camel-store.c (camel_store_rename_folder): Do nothing if we're
3447         not asked to actually change names.  Also dont do the renamed
3448         cache check till after we've called the subclass.
3449         (camel_store_delete_folder): Call the subclass delete firs,t then
3450         make sure the cache is right.
3451
3452         * camel-vee-folder.c (vee_folder_construct): Remove support for
3453         name?query syntax to setup vfolder.  Abort if such syntax is used.
3454         (camel_vee_folder_new): Removed code that handles ? syntax, etc.
3455         (vee_folder_build_folder): Handle unset expression, treat it as an
3456         empty search.
3457         (camel_vee_folder_set_expression): Oops, actually set the
3458         expression.
3459
3460         * camel-vtrash-folder.c (camel_vtrash_folder_new): Dont use
3461         name?query syntax to setup vfolder, but set the expression
3462         directly.  Also fixes a small memleak.
3463
3464 2001-09-12    <NotZed@Ximian.com>
3465
3466         * camel-store.c (camel_store_delete_folder): Fixed warnings with a
3467         cast.
3468         (camel_store_rename_folder): "
3469
3470 2001-09-14  Jeffrey Stedfast  <fejj@ximian.com>
3471
3472         * camel-url.c (camel_url_set_param): Use g_datalist_set_data_full
3473         so that the data will be free'd when we clear the list.
3474
3475 2001-09-14  Dan Winship  <danw@ximian.com>
3476
3477         * camel-file-utils.c (camel_file_util_encode_string,
3478         camel_file_util_decode_string): Don't claim failure when
3479         reading/writing the empty string.
3480
3481 2001-09-14  JP Rosevear  <jpr@ximian.com>
3482
3483         * Makefile.am: use install hook instead of install rule to
3484         guarantee we run after installation
3485
3486 2001-09-13  Jeffrey Stedfast  <fejj@ximian.com>
3487
3488         * camel-filter-driver.c (camel_filter_driver_filter_folder): Don't
3489         reuse the exception if it has already been set.
3490         (camel_filter_driver_filter_message): Same here. Also use the new
3491         return value from camel_filter_search_match().
3492
3493         * camel-filter-search.c (camel_filter_search_match): Return an
3494         integer (matched, no-match, or error).
3495
3496         * providers/local/camel-mbox-folder.c (mbox_append_message): Do
3497         error-checking based on function return values rather than
3498         exceptions as it's possible for them to be NULL.
3499         (mbox_get_message): Same.
3500
3501         * providers/imap/camel-imap-folder.c (imap_append_offline): Pass
3502         an exception to the cache.
3503         (imap_append_online): Same.
3504         (imap_append_resyncing): Here too.
3505         (imap_copy_offline): And here.
3506         (handle_copyuid): Pass NULL as the exception here...
3507         (parse_fetch_response): And finally here.
3508
3509         * providers/imap/camel-imap-message-cache.c
3510         (camel_imap_message_cache_insert):
3511         (insert_setup):
3512         (camel_imap_message_cache_insert_stream):
3513         (camel_imap_message_cache_insert_wrapper):
3514         (camel_imap_message_cache_copy): Take an exception argument and
3515         set it on error.
3516
3517         * camel-mime-part-utils.c
3518         (simple_data_wrapper_construct_from_parser): Convert the charset
3519         to the iconv-friendly name.
3520
3521         * camel-charset-map.c (camel_charset_to_iconv): Add code to
3522         convert windows-[cp]#### charsets to their iconv-friendly format
3523         of cp####.
3524
3525         * camel-pgp-context.c (crypto_exec_with_passwd): Return -1 on
3526         failure.
3527
3528 2001-09-12  Larry Ewing  <lewing@ximian.com>
3529
3530         * camel-filter-driver.c (camel_filter_driver_filter_mbox): free
3531         the source url in the nonfailure case.
3532
3533 2001-09-12    <NotZed@Ximian.com>
3534
3535         * camel-folder-search.h: Change the 'not' virtual method from an
3536         immediate e-sexp function to a non-immediate one, which is what it
3537         should be.
3538
3539         * camel-folder-search.c (search_not): Implement a 'not' function
3540         ourselves.  If 'not' on a vector value, then not over all items
3541         in the summary.
3542         (builtings[]): Change the 'not' builtin to be a non-immediate
3543         function.
3544
3545 2001-09-12  Jeffrey Stedfast  <fejj@ximian.com>
3546
3547         * camel-filter-driver.c (camel_filter_driver_filter_mbox): Unref
3548         the message info.
3549
3550 2001-09-10    <NotZed@Ximian.com>
3551
3552         * providers/local/camel-maildir-store.c (get_folder_info): Pass in
3553         a hashtalbe used for finding visited nodes.
3554         (inode_hash): 
3555         (inode_equal): 
3556         (inode_free): Helper functions for visited node checks, hashes on
3557         inode + device number.
3558         (scan_dir): Dont re-visited directories we've already visited, use
3559         inodes + device number.
3560         Also, if the folder doesn't contain cur/tmp/new, mark it as
3561         noselect, but continue to recurse folders, if asked.
3562
3563         * camel-folder.c (move_messages_to): Progress reporting while
3564         moving messages.
3565
3566         * camel-store.c (camel_store_delete_folder): Make sure we remove
3567         the folder from our vtrash, if we have it in our opened set, and
3568         also remove it from our hashtable.
3569         (camel_store_rename_folder): Remove the old folder name from the
3570         folder cahce, if it is there.
3571
3572 2001-09-10  Jeffrey Stedfast  <fejj@ximian.com>
3573
3574         * camel-charset-map.c (camel_charset_to_iconv): Get rid of the
3575         g_warning, we no longer really need that.
3576
3577 2001-09-10    <NotZed@Ximian.com>
3578
3579         * providers/imap/camel-imap-store.c (camel_imap_msg_new): Forgot
3580         to return the newly allocated msg.
3581
3582 2001-09-08  Not Zed  <NotZed@Ximian.com>
3583
3584         * providers/local/camel-spool-summary.c (spool_summary_sync_full):
3585         Likewise.
3586
3587         * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
3588         Fix the wording.
3589
3590         * camel-tcp-stream-raw.c (stream_read): Save errno around fcntl
3591         call in cancellable read case.  Also, loop while we get EINTR.
3592         This might fix some weird reconnect behaviour with pop.
3593         (stream_write): "
3594
3595 2001-09-07  Jeffrey Stedfast  <fejj@ximian.com>
3596
3597         * camel-tcp-stream-ssl.c (ssl_bad_cert): #if 0 out the code that
3598         was hopefully going to fix bug #5325 because the functions I used
3599         seem to have been deprecated. *sigh*.
3600
3601         * camel-remote-store.c (camel_remote_store_finalise): Disconnect
3602         from the service here otherwise the locks will be destroyed and by
3603         the time CamelService finalizes we'll crash or hang.
3604
3605         * providers/smtp/camel-smtp-transport.c (smtp_data): Make sure to
3606         unref the mime filters when we finish with them.
3607
3608 2001-09-07  Ettore Perazzoli  <ettore@ximian.com>
3609
3610         * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
3611         s/Synchronising/Synchronizing/.
3612         (mbox_summary_sync_quick): Likewise.
3613         (summary_rebuild): s/Summarising/Summarizing/.
3614
3615 2001-09-07  Jeffrey Stedfast  <fejj@ximian.com>
3616
3617         * camel-multipart.c (camel_multipart_set_boundary): Take a const
3618         char * instead of a char *.
3619
3620         * camel-mime-part-utils.c
3621         (camel_mime_part_construct_content_from_parser): Reuse the
3622         original boundary instead of generating our own.
3623
3624 2001-09-06    <NotZed@Ximian.com>
3625
3626         * providers/imap/camel-imap-folder.c (filter_proc): Thread
3627         function to perform filtering.
3628         (filter_free): Free the filter object.
3629         (camel_imap_folder_changed): If we have threads enabled, then
3630         queue up a request to perform filtering.  For bug #4422.
3631
3632         * providers/imap/camel-imap-store.c (camel_imap_msg_new): Create a
3633         new 'imap msg'.
3634         (camel_imap_msg_queue): Queue an 'imap msg'.
3635         (async_received): Handle receiving of imap msg in async thread.
3636         (async_destroy): Handle destroying of imap msg.
3637         (camel_imap_store_finalize): Destroy thread when done.
3638         (camel_imap_store_init): Setup thread.
3639
3640         * providers/imap/camel-imap-store.h: Added an ethread to the
3641         store, for async processing.
3642
3643 2001-09-06  Jeffrey Stedfast  <fejj@ximian.com>
3644
3645         * camel-remote-store.c (remote_recv_line): Use
3646         camel_stream_buffer_read_line() instead of duplicationing the
3647         functionality. Also, the previous way was broken anyway. What if a
3648         line was the same length as our buffer? Then we'd go and read a
3649         second line and a third and so on until they weren't the same
3650         length, leaving \r's in the middle of the buffer.
3651
3652 2001-09-06  Dan Winship  <danw@ximian.com>
3653
3654         * providers/pop3/camel-pop3-store.c (pop3_get_response): Fix this
3655         to always set an exception if it returns POP3_FAIL, as documented.
3656
3657         * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
3658         Revert.
3659
3660 2001-09-06  Jeffrey Stedfast  <fejj@ximian.com>
3661
3662         * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
3663         Set an exception on POP3_FAIL as well.
3664
3665 2001-09-06  Dan Winship  <danw@ximian.com>
3666
3667         * providers/pop3/camel-pop3-provider.c: #ifdef out the "delete
3668         after N days" option in pop3_conf_entries, since it won't be done
3669         for 1.0.
3670
3671 2001-09-04  Jeffrey Stedfast  <fejj@ximian.com>
3672
3673         * camel-remote-store.c (remote_disconnect): Too late to sync the
3674         folders here... if this is gonna happen at all it should be done
3675         in the provider.
3676
3677         * camel-service.c (camel_service_finalize): Do a clean disconnect.
3678
3679 2001-08-30  Jeffrey Stedfast  <fejj@ximian.com>
3680
3681         * providers/local/camel-spool-store.c (get_inbox): Return the
3682         default folder (ie. INBOX) rather than saying we don't support an
3683         inbox.
3684
3685         * camel-tcp-stream-ssl.c: #include pk11func.h.
3686         (ssl_bad_cert): Use CERT_GetDefaultCertDB.
3687
3688 2001-08-29  Jeffrey Stedfast  <fejj@ximian.com>
3689
3690         * camel-smime-context.c (smime_sign_prepare): Do the same here as
3691         what we did in the pgp code a moment ago.
3692         (smime_sign_restore): And again here.
3693         (smime_sign): And update thise code to pass in the address of the
3694         encodings list when restoring parts.
3695
3696         * camel-pgp-mime.c (pgp_mime_part_sign_prepare_part): Special-case
3697         message/rfc822 mime parts - don't set an encoding on these,
3698         instead traverse into their subparts and set the encodings for
3699         those.
3700         (pgp_mime_part_sign_restore_part): Reverse any operations done to
3701         message/rfc822 parts in the above prepare_part() function and also
3702         take a pointer to a GSList of encodings instead of just a GSList
3703         so we can properly keep track of which encoding we are on.
3704         (camel_pgp_mime_part_sign): Pass in the address to the encodings
3705         list when restoring parts.
3706
3707 2001-08-29  Not Zed  <NotZed@Ximian.com>
3708
3709         * providers/pop3/camel-pop3-folder.c (pop3_sync): Add progress
3710         reporting to deleting messages.  Dont change the calculation to a
3711         bloody float.  Bug #6189.
3712
3713 2001-08-28  Jeffrey Stedfast  <fejj@ximian.com>
3714
3715         * camel-pgp-context.c (crypto_exec_with_passwd): Initialize buf
3716         and diag_buf to NULL, hopefully this fixes the crash if the
3717         select() times out.
3718         (pgp_encrypt): Argh. What was I thinking? Don't use "-r recipient"
3719         as an argument, instead use "-r" and "recipient" as 2 separate
3720         arguments to pgp. This might fix the "gpg only encrypts to my
3721         private key" bug?
3722
3723 2001-08-28  Peter Williams  <peterw@ximian.com>
3724
3725         * providers/imap/camel-imap-store.c (create_folder): Whoops.
3726         Double-free and FMR = bad.
3727
3728         * camel-remote-store.c (remote_send_string): Don't reveal the
3729         user's IMAP password if their server supports LITERALPLUS. Also
3730         add some more dashes to make it line up nicely :-)
3731
3732 2001-08-28  Jeffrey Stedfast  <fejj@ximian.com>
3733
3734         * camel-tcp-stream-ssl.c (ssl_bad_cert): If the user accepts the
3735         certificate, add it to the database as a trusted CA.
3736
3737 2001-08-28  Peter Williams  <peterw@ximian.com>
3738
3739         * camel-object.c (camel_object_unref): Make the locking more
3740         fine-grained on destruction; specifically, don't hold the
3741         type lock while calling the finalize functions.
3742
3743 2001-08-27  Jeffrey Stedfast  <fejj@ximian.com>
3744
3745         * providers/local/camel-local-provider.c: Changed the
3746         description/names of some of the local providers to try and
3747         clarify the meanings.
3748
3749         * providers/pop3/camel-pop3-provider.c: Simplify the POP
3750         description - we want short but sweet.
3751
3752         * providers/imap/camel-imap-provider.c: s/IMAPv4/IMAP
3753
3754 2001-08-27  Not Zed  <NotZed@Ximian.com>
3755
3756         * camel-mime-part-utils.c (convert_buffer): re-read the iconv man
3757         page, and treat the return value properly.  It returns the number
3758         of non-reversible conversions performed, not the number of output
3759         characters, sigh.
3760         (check_html_charset): Changed to just take a buffer of data, and
3761         not the mime parser.
3762         (simple_data_wrapper_construct_from_parser): Since we dont need
3763         the charset till we have all the data, search for the charset
3764         after we've read the data, if we have html data with no charset in
3765         the header.
3766         (simple_data_wrapper_construct_from_parser): Remove the
3767         seekable_source stuff.
3768
3769         * Re-apply patches from before.
3770
3771 2001-08-25  Not Zed  <NotZed@Ximian.com>
3772
3773         ["Summarising" and "Synchronising" are spelt with a "s" in
3774         ENGLISH]
3775
3776         * providers/local/camel-mbox-summary.c (mbox_summary_sync_quick):
3777         s/Synchronizing/Synchronising/.
3778
3779         * providers/local/camel-mbox-summary.c (summary_rebuild):
3780         s/Summarizing/Summarising/
3781
3782 2001-08-24  Jeffrey Stedfast  <fejj@ximian.com>
3783
3784         * camel-disco-diary.c (camel_disco_diary_replay): Use fseek
3785         instead of fseeko since we want to be portable and use ftell
3786         rather than ftello for the same reason.
3787         (camel_disco_diary_empty): Same here.
3788
3789 2001-08-24  Peter Williams  <peterw@ximian.com>
3790
3791         * Revert Not Zed's previous commits as they apparently can cause
3792         serious data loss for POP3 users.
3793         
3794 2001-08-24  Ettore Perazzoli  <ettore@ximian.com>
3795
3796         ["Summarizing" and "Synchronizing" are spelt with a "z" in the
3797         default locale, that happens to be "en_US".]
3798
3799         * providers/local/camel-mbox-summary.c (mbox_summary_sync_quick):
3800         s/Synchronising/Synchronizing/.
3801
3802         * providers/local/camel-mbox-summary.c (summary_rebuild):
3803         s/Summarising/Summarizing/
3804
3805 2001-08-24  Not Zed  <NotZed@Ximian.com>
3806
3807         * camel-mime-part-utils.c (convert_buffer): Limit the maximum
3808         output buffer size.  iconv bugs?  returns E2BIG forever on some
3809         (valid) data?
3810
3811         * providers/local/camel-spool-summary.c (summary_rebuild):
3812         Likewise.
3813
3814         * providers/local/camel-mbox-summary.c (summary_rebuild):
3815         Summarising is spelt with an s.
3816
3817 2001-08-23  Not Zed  <NotZed@Ximian.com>
3818
3819         * camel-mime-part.c (write_to_stream): If we have rawtext, then
3820         dont do any charset conversion, only encoding/crlf conversion.
3821
3822         * camel-data-wrapper.h (struct _CamelDataWrapper): Added 'rawtext'
3823         member, says the character encoding is raw, not utf8.
3824
3825         * providers/local/camel-spool-summary.c
3826         (spool_summary_sync_quick): Synchronising is spelt with an s, not
3827         a z.
3828         (spool_summary_sync_full): "
3829
3830         * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
3831         No, synchronising is spelt with an s.
3832         (mbox_summary_sync_quick): "
3833
3834         * camel-mime-part-utils.c
3835         (camel_mime_part_construct_content_from_parser): Remove the
3836         warnings which aren't going anywhere fast.
3837         (convert_buffer): Function to convert a bytearray of textual
3838         content from one charset to another.  If the charset doesn't exist
3839         or fails, then do no conversion.
3840         (simple_data_wrapper_construct_from_parser): First, read in data,
3841         then try and convert it using the specified charset if supplied.
3842         If that fails, then dont do any conversion, and leave as raw.
3843         Also, if we have any x-* charsets, then dont do any processing.
3844
3845 2001-08-23  Peter Williams  <peterw@ximian.com>
3846
3847         * providers/local/camel-mbox-summary.c (summary_rebuild): Add a
3848         missing \n to the end of a printf.
3849
3850         * providers/local/camel-spool-summary.c (summary_rebuild): Same.
3851
3852 2001-08-22  Jeffrey Stedfast  <fejj@ximian.com>
3853
3854         * providers/pop3/camel-pop3-folder.c (pop3_generate_uids):
3855         Oops. Fixed a mis-use of GPtrArray. If we set_size, then using
3856         g_ptr_array_add will assume `size' elements have already been
3857         initialized and will start appending on to the end.
3858
3859 2001-08-21  Jeffrey Stedfast  <fejj@ximian.com>
3860
3861         * camel-pgp-context.c (pgp_verify): Turn on --batch and reenable
3862         gpg keyserver lookups.
3863         (pgp_decrypt): Disable keyserver lookups if we are disconnected.
3864
3865 2001-08-21  Dan Winship  <danw@ximian.com>
3866
3867         * camel-folder-thread.c
3868         (camel_folder_thread_messages_new_summary): Fix the duplicate
3869         message check so it doesn't mess up threading when a reply appears
3870         in the folder before the message it's a reply to. Fixes bug #3357.
3871         (camel_folder_thread_messages_new): Likewise, although I don't
3872         think this function is used any more.
3873
3874 2001-08-20  JP Rosevear  <jpr@ximian.com>
3875
3876         * Makefile.am: build a static camel for the addressbook conduit
3877
3878 2001-08-20  Ettore Perazzoli  <ettore@ximian.com>
3879
3880         * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
3881         s/Synchronising/Synchronizing/.
3882         (mbox_summary_sync_quick): Likewise.  *
3883         providers/local/camel-spool-summary.c (spool_summary_sync_full):
3884         Likewise.
3885         (spool_summary_sync_quick): Likewise.
3886
3887 2001-08-20  Jeffrey Stedfast  <fejj@ximian.com>
3888
3889         * providers/imap/camel-imap-store.c (create_folder): Get the
3890         entire directory structure for the folder we just created, meaning
3891         if we created a folder named "test.mailbox" where test didn't
3892         previously exist, get the listing for "test" and "test.mailbox".
3893
3894         * providers/imap/camel-imap-utils.c (imap_parse_folder_name): New
3895         function.
3896
3897 2001-08-19  Chris Toshok  <toshok@ximian.com>
3898
3899         * camel-store.h: #include <sys/types.h> for mode_t on freebsd.
3900
3901 2001-08-19  Jeffrey Stedfast  <fejj@ximian.com>
3902
3903         * providers/pop3/camel-pop3-folder.c (pop3_generate_uids): Make
3904         sure the generated UID is non-NULL before appending it to the
3905         array of UIDs. How would this even happen? I have no clue...
3906
3907 2001-08-17  Jeffrey Stedfast  <fejj@ximian.com>
3908
3909         * providers/imap/camel-imap-folder.c (imap_update_summary): Start
3910         scanning new messages at maxuid + 1 rather than uidval + 1? Maybe
3911         I'm missing the logic, but anyways...this might fix bug #5348.
3912
3913 2001-08-16  Jeffrey Stedfast  <fejj@ximian.com>
3914
3915         * providers/imap/camel-imap-store.c (imap_keepalive): If we are
3916         online and message flags have changed in the current folder, sync
3917         the flags else do a NOOP. This fixes bug #4666. Also lock around
3918         the NOOP command.
3919
3920         * providers/imap/camel-imap-folder.c (imap_sync_online): Don't
3921         ever send "STORE FLAGS.SILENT ()" since Cyrus imapd doesn't like
3922         this (and maybe others too?) so what we'll do instead is to send
3923         "STORE -FLAGS.SILENT (\Seen \Answered \Deleted \Marked)" to clear
3924         all the flags (since this is in essence what we want to do
3925         anyway).
3926
3927 2001-08-16  Peter Williams  <peterw@ximian.com>
3928
3929         * providers/imap/camel-imap-store.c (imap_connect_online): Fix
3930         this again. Sigh. Problem of namespace = "" may not yet be
3931         completely solved.
3932
3933 2001-08-15  Peter Williams  <peterw@ximian.com>
3934
3935         * camel-tcp-stream-openssl.c (ssl_error_to_errno): New
3936         function. Try to approximate the SSL error into errno.
3937         (errlib_error_to_errno): New function, try to approximate
3938         OpenSSl's error library's error (ERR_*) into errno.
3939         (stream_read): Try to set errno using ssl_error_to_errno.
3940         (stream_write): Same.
3941         (open_ssl_connection): Same.
3942
3943         * providers/imap/camel-imap-store.c (imap_connect_online): Oh
3944         crap, huge killer typo.
3945
3946 2001-08-14  Peter Williams  <peterw@ximian.com>
3947
3948         * providers/imap/camel-imap-store.c (imap_connect_online):
3949         Canonicalize store->namespace to end in store->dir_sep, once both
3950         values are known. The %F-related code makes this
3951         assumption. Probably fixes a bug reported on the mailing list.
3952
3953 2001-08-13  Jeffrey Stedfast  <fejj@ximian.com>
3954
3955         * camel-store.c (camel_store_get_folder): After talking to NotZed,
3956         it turns out I was wrong after all.
3957         (store_sync): Create a copy of the folder-cache that owns a ref on
3958         each of the folders so that if one of the folders get's finalized
3959         inside store_sync(), we don't run into any locking issues. This is
3960         mostly meant to solve a problem in IMAP (#6089).
3961
3962 2001-08-13  Peter Williams  <peterw@ximian.com>
3963
3964         * providers/imap/camel-imap-store.c (delete_folder): Fix a leak.
3965
3966         * providers/imap/camel-imap-utils.c (imap_namespace_concat): Bleah,
3967         handle when namespace = NULL (can happen upon initial open of mailbox.)
3968
3969         * providers/imap/camel-imap-command.c (imap_command_strdup_vprintf): 
3970         Don't crash when %F'ing with an empty folder name and NULL namespace.
3971
3972 2001-08-13  Jeffrey Stedfast  <fejj@ximian.com>
3973
3974         * camel-store.c (camel_store_get_folder): We need to be ref'ing
3975         the folder if/when we add it to the hash. This may fix bug #6089?
3976         (camel_store_get_folder): Nevermind, reverted the fix.
3977         (camel_store_get_folder): No, I wasn't on crack before after
3978         all...if we don't ref here, then we're open to a race condition
3979         later.
3980
3981 2001-08-11  Ettore Perazzoli  <ettore@ximian.com>
3982
3983         * providers/local/camel-spool-summary.c (summary_rebuild):
3984         s/summarising/summarizing/.
3985         (summary_rebuild): Likewise.
3986
3987         * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
3988         s/summarise/summarize/.
3989         (mbox_summary_sync_quick): Likewise.
3990         (summary_rebuild): Likewise.
3991         (mbox_summary_check): Likewise.
3992
3993 2001-08-10  Jeffrey Stedfast  <fejj@ximian.com>
3994
3995         * providers/imap/camel-imap-utils.c (imap_quote_string): Added an
3996         assert - at this point a backtrace would be more useful than a
3997         transaction log for debugging.
3998
3999         * providers/imap/camel-imap-command.c (imap_command_start): Return
4000         FALSE here, not NULL.
4001         
4002         * providers/imap/camel-imap-folder.c (imap_rescan): Don't
4003         g_strdup() the uid into the trigger_event call.
4004
4005         * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
4006         Set the total bytes expected to 0 if the response is empty too.
4007         (pop3_refresh_info): Return of there was an error generating pop3
4008         uids.
4009
4010         * camel-mime-utils.c (header_raw_check_mailing_list): regfree the
4011         pattern before continue'ing. This was showing up quite a bit under
4012         purify.
4013
4014 2001-08-09  Jeffrey Stedfast  <fejj@ximian.com>
4015
4016         * providers/imap/camel-imap-utils.c (imap_parse_string_generic): A
4017         quoted string cannot contain \n's so check for those as well.
4018         (imap_atom_specials): Update this to fix bug #6553.
4019
4020 2001-08-08  Jon Trowbridge  <trow@ximian.com>
4021
4022         * camel-filter-search.c (get_source): Remove trailing stuff from
4023         URLs before returning.  (Done in an evil way, not in the good way
4024         suggested by fejj. :)) (Bug #4876)
4025
4026 2001-08-08  jacob berkman  <jacob@ximian.com>
4027
4028         * camel-search-private.c (camel_search_header_match): check for
4029         NULL name and addr (fixes a bug i was about to report)
4030
4031 2001-08-08  Not Zed  <NotZed@Ximian.com>
4032
4033         * camel-filter-search.c (check_header): Properly determine match
4034         type to pass to header_match.
4035         (address_matches_exactly): Removed, effectively added to
4036         camel_search_header_match.
4037
4038         * camel-folder-search.c (check_header): Properly determine the
4039         match type to pass to header_match.
4040
4041         * camel-search-private.c (camel_search_header_match): Add a new
4042         parameter 'type' which is the type of header we're matching
4043         against.  ASIS means utf8 format, ADDRESS means an internet
4044         address ('formatted'), ADDRESS_ENCODED means a raw address header,
4045         ENCODED means rfc 2047 encoded text.
4046         (header_match): Move original logic here, have search_header_match
4047         call it as appropriate for the 'type' of match.
4048
4049 2001-08-07  Not Zed  <NotZed@Ximian.com>
4050
4051         * camel-session.c (camel_session_class_init): Only init the vee
4052         provider struct once (if we're subclassed this will get called
4053         multiple times).
4054
4055         * camel-object.c (obj_finalize): Removed a bit of a debug that
4056         crept in with jacob's poolv patch (?).
4057
4058 2001-08-07  Jeffrey Stedfast  <fejj@ximian.com>
4059
4060         * camel-filter-search.c (address_matches_exactly): New function to
4061         do danw's address "is" comparison (as specified in bug #5886.
4062         (check_header): Special-case address-type headers when we are
4063         doing an exact match to use the address_matches_exactly function.
4064
4065 2001-08-06  Jeffrey Stedfast  <fejj@ximian.com>
4066
4067         * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
4068         Modify to take a headers_only argument which will then only fetch
4069         message headers.
4070         (pop3_generate_uids): Pass in TRUE for headers_only.
4071         (pop3_get_message): Pass in FALSE for headers_only and move the
4072         camel_operation() stuff out of get_message_stream and in to here
4073         instead.
4074         (pop3_generate_uids): We also need to be using i+ 1 as the id
4075         since we are starting at 0.
4076
4077 2001-08-06  Jeffrey Stedfast  <fejj@ximian.com>
4078
4079         * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
4080         New internal function to get a message stream by message sequence
4081         id (so that we can share code between pop3_get_message and
4082         pop3_generate_uids).
4083         (pop3_get_message): Use pop3_get_message_stream.
4084         (pop3_generate_uids): New function to generate UIDs based on the
4085         message - this fixes bug #1256.
4086         (pop3_refresh_info): If the server doesn't support UIDL, call
4087         pop3_generate_uids to get our list of UIDs.
4088
4089         * providers/imap/camel-imap-store.c (get_folder_info_online):
4090         Don't strstr for noselect=yes, that's just plain broken.
4091
4092 2001-08-06  Dan Winship  <danw@ximian.com>
4093
4094         * providers/imap/camel-imap-folder.c (imap_rescan): Fix off-by-one
4095         error in cleaning up deleted messages at the end of the folder.
4096         Fixes bug #5585 and maybe others.
4097
4098         * providers/imap/camel-imap-store.c (get_folder_info_online): Do a
4099         refresh_info on the selected folder before looking at its unread
4100         count. Should fix bug #4944.
4101
4102 2001-08-06  Peter Williams  <peterw@ximian.com>
4103
4104         Completely hide the namespace from everything external to the IMAP
4105         code, which Dan W says is the way it should be.
4106         
4107         * providers/imap/camel-imap-command.c
4108         (imap_command_strdup_vprintf): Add a new %F argument, which is like
4109         %S but will add the namespace (for folder names).
4110         (camel_imap_command): Use %F here.
4111
4112         * providers/imap/camel-imap-utils.c (imap_parse_list_response):
4113         Changed to strip out the namespec when returning *folder. In order
4114         to do this we need to be passed the CamelImapStore.
4115         (imap_concat): Move to here from camel-imap-store.c, un-static
4116         (imap_namespace_concat): New function, adds the namespace to the 
4117         folder name, unless it's INBOX.
4118         
4119         * providers/imap/camel-imap-utils.h: Prototypes.
4120
4121         * providers/imap/camel-imap-store.c (imap_connect_online): Extra
4122         arg to imap_parse_list_response.
4123         (imap_connect_offline): Here too.
4124         (get_folder_status): Use %F.
4125         (get_folder_online): Here too.
4126         (delete_folder): Here too.
4127         (create_folder): Here too, and arg to imap_parse_list_response.
4128         (parse_list_response_as_folder_info): Arg to i_p_l_r.
4129         (get_subscribed_folders_by_hand): Use %F.
4130         (get_folders_online): Here too.
4131         (get_folder_info_online): Instead of checking for NULL @name, check
4132         for name = NULL or "", and set to "" instead of namespace. Pass ""
4133         instead of namespace to camel_folder_info_build.
4134         (subscribe_folder): Use %F.
4135         (unsubscribe_folder): Here too.
4136
4137         * providers/imap/camel-imap-folder.c (imap_get_full_name): This
4138         now just returns folder->full_name.
4139         (do_append): Use %F
4140         (do_copy): Here too.
4141
4142 2001-08-06  Jeffrey Stedfast  <fejj@ximian.com>
4143
4144         * camel-pgp-context.c (pgp_verify): Always do --no-auto-key-retrieve.
4145
4146 2001-08-03  Jeffrey Stedfast  <fejj@ximian.com>
4147
4148         * camel-pgp-context.c (pgp_verify): Minor changes to the iconv
4149         code so that it does the check in the return value of iconv() just
4150         like the code in camel-mime-utils.c in case this fixes Bo Rosen's
4151         gpg bugs (but I doubt this will change anything?).
4152
4153 2001-08-03  Jeffrey Stedfast  <fejj@ximian.com>
4154
4155         * providers/smtp/camel-smtp-transport.c (smtp_connect): First
4156         check to make sure that service->url->authmech is non-NULL before
4157         passing it into strcmp to avoid a segfault.
4158
4159         * camel-pgp-context.c (pgp_decrypt): Sigh, if gpg returns '1' it
4160         means that the key is bad but it did succeede in decrypting the
4161         block so to make users happy (even though I find this a
4162         questionable action) we are going to ignore the error and show it
4163         to the user anyway. This fixes bug #6136.
4164
4165 2001-08-03  Not Zed  <NotZed@Ximian.com>
4166
4167         * providers/smtp/camel-smtp-transport.c (smtp_connect): special
4168         case popb4smtp auth before we try and connect, and do the magic
4169         here first.
4170
4171 2001-08-02  Not Zed  <NotZed@Ximian.com>
4172
4173         * providers/smtp/camel-smtp-transport.c (smtp_connect): Check for
4174         POPB4SMTP separate to the esmtp auth list.
4175         (smtp_auth): If creating the sasl object means it is
4176         already authenticated, then exit early.  Sort of 'clean hack' to
4177         help popb4smtp work.
4178         (smtp_auth): Unref the sasl object, clean up a memleak i think.
4179
4180         * providers/smtp/camel-smtp-provider.c
4181         (camel_provider_module_init): Added POPB4SMTP auth type.
4182
4183         * camel-sasl.c (camel_sasl_authtype): Added POPB4SMTP type.
4184
4185         * camel-sasl-popb4smtp.c: New file for pop before smtp
4186         'authentication'.
4187
4188         * Makefile.am (libcamel_la_SOURCES, HEADERS): Add
4189         camel-sasl-popb4smtp.[ch].
4190
4191 2001-08-01  Not Zed  <NotZed@Ximian.com>
4192
4193         * providers/local/camel-mbox-folder.c (mbox_lock): If we fail to
4194         get the lock, make sure we close our locking fd, and reset it.
4195         Fixes the crash part of 5095.
4196
4197         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
4198         Slightly re-arranged filter/change notification logic.  If we;re
4199         filtering, freeze the folder till we're finished to smooth the ui
4200         for new mail.
4201
4202 2001-07-31  Not Zed  <NotZed@Ximian.com>
4203
4204         * camel-folder.c (camel_folder_init): Chagned mutexes to
4205         e_mutexes, folder lock recursive.  This fixes the imap filtering
4206         bug, or at least some cases of it.
4207         (camel_folder_finalize): Free mutexes.
4208
4209         * camel-private.h (CamelFolderPrivate): Changed mutexes to
4210         e_mutexes.
4211
4212 2001-07-25  Not Zed  <NotZed@Ximian.com>
4213
4214         * camel-folder.c (camel_folder_change_info_*): Change the
4215         return if fail's into asserts.
4216         (camel_folder_change_info_free): Don't let it accept a NULL
4217         argument.  This isn't g_lib so we dont have to.
4218
4219 2001-07-27  Jeffrey Stedfast  <fejj@ximian.com>
4220
4221         * camel-mime-utils.c (header_decode_param): Fix the fix that fixes
4222         broken mailer behavior. We want to make sure that the user's
4223         locale charset is non-NULL before we pass it off to
4224         iconv_open(). If it *is* NULL, we want to use iso-8859-1.
4225
4226 2001-07-26  Jeffrey Stedfast  <fejj@ximian.com>
4227
4228         * camel-url.c (camel_url_free): Allow the url to be NULL just like
4229         the libc free convention.
4230
4231 2001-07-26  Dan Winship  <danw@ximian.com>
4232
4233         * providers/imap/camel-imap-command.c (camel_imap_command_start):
4234         Send an IMAP command, but don't wait for responses.
4235         (camel_imap_command_response): Read a single line of response from
4236         the server.
4237         (camel_imap_command, etc): Reimplement in terms of the new code.
4238
4239         * providers/imap/camel-imap-folder.c (imap_rescan): Use
4240         camel_imap_command_start and camel_imap_command_response, and
4241         call camel_operation_progress after each line read from the
4242         server.
4243         (imap_update_summary): Likewise, although with more fudging on the
4244         precentages... Also, fix this so that if none of the new messages
4245         are cached, it only does a single FETCH, and if some of them are
4246         cached, it does two FETCHes (one to get the UIDs, FLAGS, and
4247         SIZEs, and another to get the bodies of all of the messages that
4248         aren't cached now that it knows the relevant UIDs). This should
4249         speed up startup a bunch (especially if you have high bandwidth
4250         but also high latency to the IMAP server).
4251
4252 2001-07-25  Dan Winship  <danw@ximian.com>
4253
4254         * camel-mime-utils.c (mail_mlist_magic): Add another Sender
4255         pattern.
4256
4257 2001-07-24  Not Zed  <NotZed@Ximian.com>
4258
4259         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
4260         Change the break into a continue, we should process as many as we
4261         can find.
4262
4263         * camel-folder.c (camel_folder_move_messages_to): If we have no
4264         uid's to copy, exit here before going any further.  Some code
4265         internally [imap] assumes there are uids to copy otherwise it can
4266         segfault.
4267         (camel_folder_copy_messages_to): Same.
4268
4269 2001-07-24  Jeffrey Stedfast  <fejj@ximian.com>
4270
4271         * camel-mime-utils.c (header_decode_param): Handle broken mailers
4272         that send unencoded 8bit header params. And there was much
4273         rejoicing. Rah.
4274
4275         * camel-url.h (CAMEL_URL_HIDE_ALL): New #define, and there was
4276         much rejoicing. Rah.
4277
4278 2001-07-24  Not Zed  <NotZed@Ximian.com>
4279
4280         * camel-operation.c (camel_operation_register, unregister): Added
4281         some warnings for bad cases.
4282
4283 2001-07-23  Not Zed  <NotZed@Ximian.com>
4284
4285         * camel-operation.c (camel_operation_register): Only insert a hash
4286         entry if we haven't already.
4287         (camel_operation_unregister): Only remove the has entry if the id
4288         is a real thread.
4289
4290 2001-07-23  Jeffrey Stedfast  <fejj@ximian.com>
4291
4292         * camel-filter-driver.c (do_move): Slight fix for when source ==
4293         destination (we don't want to do this action because on-demand
4294         filtering would then delete the messages it supposedly "moved").
4295
4296 2001-07-23  Not Zed  <NotZed@Ximian.com>
4297
4298         * providers/smtp/camel-smtp-transport.c (smtp_auth, smtp_helo,
4299         send_to): Added some operation progress reporting.  Actual data
4300         transfer is 'tricky' because of the layers used.
4301         (smtp_auth): Instead of checking exception_is_set, use
4302         challenge==NULL to test if sasl_challenge_base64 failed.
4303
4304         * providers/local/camel-mbox-summary.c (mbox_summary_sync): Remove
4305         peters changes below and put in a better fix.  These functions
4306         already return -1 on error, just use that, and not worry about
4307         building our own exception redundantly.
4308
4309         * camel-service.c (camel_get_host_byname): Turn the progress into
4310         a transient event.
4311
4312 2001-07-20  Peter Williams  <peterw@ximian.com>
4313
4314         * providers/local/camel-mbox-summary.c (mbox_summary_sync): More
4315         usage fixes for CamelException. Check our own exception for
4316         summary_update and xfer it out if an error occurred.
4317
4318 2001-07-20  JP Rosevear  <jpr@ximian.com>
4319
4320         * Pull up test fixes to get them building again
4321
4322 2001-07-20  Not Zed  <NotZed@Ximian.com>
4323
4324         * camel-charset-map.c (camel_charset_get_iconv_friendly_name):
4325         renamed to camel_charset_to_iconv() to make it just a little more
4326         consistent and not so long & fixed callers.
4327
4328 2001-07-19  Jeffrey Stedfast  <fejj@ximian.com>
4329
4330         * camel-mime-filter-charset.c
4331         (camel_mime_filter_charset_new_convert): Convert to the
4332         iconv-friendly charset names.
4333
4334         * providers/imap/camel-imap-store.c (create_folder): Fixed a
4335         compiler warning about returning without a value in a non-void
4336         function. Blah.
4337
4338         * camel-mime-part.c (process_header): Pass the locale charset as
4339         the default_charset to header_decode_string().
4340
4341         * camel-folder-summary.c (camel_folder_summary_format_string):
4342         Pass the locale charset as the default_charset to
4343         header_decode_string().
4344         (content_info_new): Same.
4345
4346         * camel-mime-message.c (process_header): Pass the locale charset
4347         as the default_charset to header_decode_string().
4348
4349         * camel-mime-utils.c (append_8bit): New helper function who's
4350         purpose is similar to append_latin1() but for 8bit text that we
4351         are assuming is not latin1.
4352         (header_decode_text): Now takes a default_charset parameter and
4353         calls append_8bit when appropriate.
4354         (header_decode_string): Also takes a default_charset parameter
4355         now.
4356         (header_decode_mailbox): Pass NULL as the default_charset to
4357         header_decode_string().
4358
4359 2001-07-19  Jeffrey Stedfast  <fejj@ximian.com>
4360
4361         * camel-pgp-context.c (pgp_verify): Modified to treat the return
4362         value from camel_charset_locale_name() as a const char*.
4363
4364         * camel-sasl-digest-md5.c (digest_response): Modified to treat the
4365         return value from camel_charset_locale_name() as a const char*.
4366
4367         * camel-charset-map.c (camel_charset_locale_name): Modify to
4368         return const char* by returning the static locale_charset which is
4369         created inside of camel_charset_map_init().
4370         (camel_charset_map_init): Find the locale charset here and set the
4371         static variable.
4372
4373 2001-07-19  Peter Williams  <peterw@ximian.com>
4374
4375         Policy change: NULL url's are no longer allowed in
4376         CamelFolderInfos. They used to signify that the folder was, in
4377         IMAP jargon, NoSelect; now the same effect is achieved by adding a
4378         "noselect=yes" parameter to the end of the URL. As far as I know,
4379         IMAP is the only affected provider.
4380         
4381         * providers/imap/camel-imap-store.c (delete_folder): New
4382         function. Implement folder deletion.
4383         (camel_imap_store_class_init): Set the delete_folder class
4384         function here.
4385         (get_folder_status): New function. Utility wrapper around the
4386         STATUS command.
4387         (create_folder): If the parent folder is NoSelect but is empty,
4388         delete it and recreate it as a a subfolder-containing folder. If
4389         it is NoSelect but contains messages, set an exception.
4390         (parse_list_response_as_folder_info): Always set the FolderInfo's
4391         URL, but add a NoSelect parameter if it isn't selectable.
4392         (get_folder_info_online): Change logic of removing the namespace
4393         to reflect URL change. Same for logic of checking unread counts.
4394         (get_folder_info_online): Use get_folder_status to simplify this.
4395
4396         * camel-store.c (camel_folder_info_build): When creating dummy
4397         parents, copy the child's URL and set the NoSelect parameter.
4398
4399 2001-07-19  Jeffrey Stedfast  <fejj@ximian.com>
4400
4401         * camel-mime-part-utils.c
4402         (simple_data_wrapper_construct_from_parser): No need for
4403         `acharset' anymore.
4404         (check_html_charset): Return a const char* and also use
4405         camel_charset_get_iconv_friendly_name() internally.
4406
4407         * camel-mime-utils.c (rfc2047_decode_word): Remove my iso8859-1 ->
4408         iso-8859-1 hack and use camel_charset_get_iconv_friendly_name()
4409         instead.
4410         (rfc2184_decode): Use camel_charset_get_iconv_friendly_name()
4411
4412         * camel.c (camel_init): Call camel_charset_map_init().
4413
4414         * camel-charset-map.c (camel_charset_map_init): New function to
4415         initialize the charset-equivalent lookup table. To be called by
4416         camel_init().
4417         (camel_charset_get_iconv_friendly_name): New function to try and
4418         convert a charset into something that iconv is more likely to
4419         accept.
4420
4421 2001-07-19  Peter Williams  <peterw@ximian.com>
4422
4423         * Revert 7/11/2001 patch for IMAP INBOX filtering at NotZed's 
4424         request.
4425
4426 2001-07-17  Peter Williams  <peterw@ximian.com>
4427
4428         Clean up some exception misusage.
4429
4430         * providers/imap/camel-imap-command.c (camel_imap_command): Use
4431         our own internal exception for sending the string and transfer it
4432         to @ex if anything goes wrong.
4433         (imap_read_response): Use our own internal exception for reading
4434         the untagged responses and blah blah blah.
4435
4436         * camel-session.c (get_service): Use our own internal exception
4437         when constructing the service and transfer it to @ex if anything
4438         goes wrong.
4439
4440         * camel-remote-store.c (remote_recv_line): Instead of having
4441         gboolean exception, use our own internal exception and copy
4442         it to @ex if anything goes wrong.
4443
4444         * camel-store.c (store_sync): Create an internal exception
4445         because sync_folder() checks it for validity. Transfer it to
4446         @ex when done.
4447
4448         * camel-exception.c (camel_exception_get_description): If @ex is
4449         NULL, complain - passing NULL exceptions to Camel is okay, but
4450         there should be no circumstances under which they're then
4451         examined.
4452         (camel_exception_get_id): Same here,
4453         (camel_exception_xfer): NULL-protect and warn if transferring from
4454         a NULL exception.
4455         
4456 2001-07-17  Jeffrey Stedfast  <fejj@ximian.com>
4457
4458         * camel-store.c (init_trash): Use CAMEL_VTRASH_NAME.
4459
4460         * camel-vtrash-folder.h: #define CAMEL_VTRASH_NAME
4461
4462 2001-07-16  Dan Winship  <danw@ximian.com>
4463
4464         * providers/imap/camel-imap-command.c (camel_imap_response_free):
4465         Given:
4466                 * 4 EXISTS
4467                 * 1 EXPUNGE
4468         We have to pass 3, not 4 to camel_imap_folder_changed for the
4469         exists count. Fixes ximian bug #2112 (finally!).
4470
4471 2001-07-14  Jeffrey Stedfast  <fejj@ximian.com>
4472
4473         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
4474         If the message info for an expunged message is NULL, then just
4475         break out - maybe a message was expunged that we were never
4476         notified even existed?
4477
4478 2001-07-13  Jeffrey Stedfast  <fejj@ximian.com>
4479
4480         * camel-mime-utils.c (rfc2047_decode_word): Added a hack to
4481         convert charsets in the format iso8859-1 to iso-8859-1 because it
4482         seems to be more iconv friendly. It has been reported that on some
4483         systems, iconv doesn't know about iso8859-1 while it *does* know
4484         about iso-8859-1. See bug #4530.
4485
4486 2001-07-13  Peter Williams  <peterw@ximian.com>
4487
4488         * Makefile.am (install-exec-local): Let people install as
4489         non-root, but give them a bigass warning so they're not allowed to
4490         complain when it doesn't work right.
4491
4492         * camel-remote-store.c (sync_remote_folder): New function: hash
4493         table callback.
4494         (remote_disconnect): If cleanly disconnecting, sync our
4495         folders. Fixes deadlocks on exit (folders syncing after store
4496         disconnects) and also makes sense.
4497
4498 2001-07-13  Jeffrey Stedfast  <fejj@ximian.com>
4499
4500         * camel-uid-cache.c (camel_uid_cache_new): We now use a structure
4501         as the bucket data rather than just a cache level so set the save
4502         state to TRUE.
4503         (maybe_write_uid): We only save the uid if the cache levels are
4504         the same *and* if the save state is TRUE.
4505         (free_uid): Free the state value.
4506         (camel_uid_cache_get_new_uids): New uids that get added to the
4507         cache start with a save state of FALSE.
4508         (camel_uid_cache_save_uid): Set the save state of the uid to
4509         TRUE. What should we do if the uid isn't already in the cache?
4510         Currently I make it add the uid, but maybe it shouldn't?
4511
4512         * providers/imap/camel-imap-folder.c (imap_filter_timeout): Update
4513         to reflect CamelFilterDriver API changes.
4514
4515         * camel-filter-driver.c (camel_filter_driver_filter_folder): Take
4516         a cache argument so we can tell the cache whether or not the uid
4517         should be saved (meaning we have successfully filtered it).
4518
4519 2001-07-12  Jeffrey Stedfast  <fejj@ximian.com>
4520
4521         * camel-filter-driver.c (camel_filter_driver_filter_message):
4522         Okay, I've decided that that user is just on crack. We don't want
4523         to allow filtering of deleted messages or we could get some
4524         unexpected behavior.
4525         (do_move): Oops. My last fix needs to be after the if-statement,
4526         not inside it.
4527         (do_copy): And here too.
4528
4529 2001-07-12  Jeffrey Stedfast  <fejj@ximian.com>
4530
4531         * camel-filter-driver.c (do_move): Only set p->copied and
4532         p->deleted if the messages are copied without an exception.
4533         (do_copy): Same - but obviously we don't set the p->deleted here
4534         at all.
4535         (camel_filter_driver_filter_message): Since users complained that
4536         they couldn't filter deleted messages for "safe keeping" (WTF?
4537         safe keeping? why were they deleted in the first place then??), I
4538         have taken out the code that optimized filtering by not allowing
4539         deleted messages to be filtered. This fixes bug #4473.
4540
4541         Note: Users have a warped sense of logic.
4542
4543 2001-07-12  Not Zed  <NotZed@Ximian.com>
4544
4545         * camel-mime-part-utils.c (extract_metatag_charset): Removed.
4546         (check_html_charset): Replaced with this.
4547         (simple_data_wrapper_construct_from_parser): Call
4548         check_html_charset if we dont have a charset on the content-type,
4549         and we have text/html data.
4550         (check_html_charset): We also need to do qp/base64 decoding
4551         ourselves, sigh.
4552
4553         * camel-mime-utils.c (html_meta_param_list_decode): Removed.  This
4554         was very wrong, the rules for mail headers vastly different from
4555         rules for decoding html elements.
4556         (rfc2184_decode): Move the malloc inside the iconv_open worked,
4557         otherwise we have a memleak.
4558
4559         * camel-mime-filter-html.c (camel_mime_filter_html_finalize, init,
4560         run, reset): Changed to use camelhtmlparser, and fixed a tiny
4561         memleak.
4562
4563         * camel-html-parser.c: Made the html indexer tokeniser re-usable.
4564         ONLY TO BE USED INTERNAL TO CAMEL HOWEVER.
4565         (tokenise_step): Slight fix to non-quoted values.
4566
4567         * camel-folder-summary.c
4568         (camel_folder_summary_info_new_from_message): Removed some code i
4569         wasn't supposed to commit.
4570
4571         * providers/local/camel-local-summary.c (local_summary_add): Only
4572         set info->size if it is not zero.
4573         (local_summary_add): If we dont get a size from the info passed
4574         in, calculate it using a null stream write.  Should do #4392.
4575
4576 2001-07-11  Jeffrey Stedfast  <fejj@ximian.com>
4577
4578         * camel-mime-part-utils.c (extract_metatag_charset): New function
4579         to extract a meta-tag charset value if it exists.
4580         (simple_data_wrapper_construct_from_parser): Along the same lines
4581         as the code I previously ripped out, but this time use the
4582         mime-parser's seek ability to help us along. Currently I read up
4583         to a 2k buffer size - this is probably overkill, 1k is probably
4584         plenty.
4585
4586         * camel-mime-utils.c (html_meta_param_list_decode): When we get to
4587         an `=', we must skip past it before trying to grab the param
4588         value. duh.
4589
4590 2001-07-11  Jeffrey Stedfast  <fejj@ximian.com>
4591
4592         * camel-mime-part-utils.c
4593         (simple_data_wrapper_construct_from_parser): Ripped out my code
4594         since it was never being used since the mime parser is not using a
4595         seekable stream (ever?) which pretty much means my code needs to
4596         be done someplace else.
4597
4598 2001-07-11  Peter Williams  <peterw@ximian.com>
4599
4600         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed): 
4601         Run the filter in its own thread to prevent locking issues.
4602         (imap_filter_timeout): New function that does the filtering called
4603         as a CamelSession timeout.
4604
4605 2001-07-11  Not Zed  <NotZed@Ximian.com>
4606
4607         * camel-filter-driver.c (camel_filter_driver_filter_mbox): Create
4608         the messageinfo itself, so we can properly set the size.
4609
4610         * camel-movemail.c (camel_movemail_solaris): Write out the from
4611         line between each message.
4612
4613 2001-07-10  Not Zed  <NotZed@Ximian.com>
4614
4615         * providers/local/camel-local-summary.c (local_summary_add): Copy
4616         the size across from the source message info if supplied.
4617
4618         * camel-stream-null.c: Added a 'written' member which keeps track
4619         of how much has been written to the stream.
4620
4621         * camel-movemail.c (camel_movemail): If we have BROKEN_SPOOL
4622         defined, then use the solaris movemail to quote from lines that
4623         sendmail didn't.
4624         (camel_movemail_solaris): Compile this in if BROKEN_SPOOL defined.
4625
4626 2001-07-10  Jeffrey Stedfast  <fejj@ximian.com>
4627
4628         * camel-mime-utils.c (html_meta_param_list_decode): New function
4629         to parse an HTML meta-tag.
4630
4631         * camel-mime-part-utils.c
4632         (simple_data_wrapper_construct_from_parser): If the Content-Type
4633         did not contain a charset parameter and it's also a text/html
4634         part, we have 1 last place to look - in the META html tags. *sigh*
4635
4636         * camel-mime-message.c (camel_mime_message_get_source):
4637         s/gint/unsigned since that's what it should be.
4638
4639 2001-07-09  Jeffrey Stedfast  <fejj@ximian.com>
4640
4641         * camel-pgp-context.c (pgp_sign): Forget the passphrase if the
4642         user has set that option.
4643         (pgp_clearsign): Same.
4644         (pgp_encrypt): And here...
4645         (pgp_decrypt): And finally here.
4646         (camel_pgp_context_new): Take a `remember' argument.
4647
4648 2001-07-09  Not Zed  <NotZed@Ximian.com>
4649
4650         * providers/local/camel-maildir-summary.c (maildir_summary_sync):
4651         Oops, e_poolv_set free's it for us, so dont double-free here.
4652
4653 2001-07-06  Not Zed  <NotZed@Ximian.com>
4654
4655         * camel-vee-folder.c (camel_vee_folder_finalise): Changed so we
4656         dont have the list changing under us, just going to the next node
4657         before we call a function that might change the list is
4658         potentially dangerous (slight mod of peters fix).  Hmm, i think it
4659         would've double-unref'd it too(?)
4660
4661 2001-07-08  Chris Toshok  <toshok@ximian.com>
4662
4663         * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_finalize):
4664         openssl_table is gone.  we now store/get the stream from the
4665         SSL_CTX's app_data.
4666         (stream_read): rework the non-blocking case to account for SSL
4667         possibly buffering data (in which case select will block even
4668         though data is ready to be read), and to account for FreeBSD's
4669         strange behavior of returning -1/EAGAIN even though select said
4670         the fd was ready to be read.
4671         (ssl_verify): openssl_table is gone.
4672         (open_ssl_connection): set the SSL_CTX's app_data to be the
4673         stream, remove the openssl_table code.
4674
4675 2001-07-06  Jeffrey Stedfast  <fejj@ximian.com>
4676
4677         * camel-mime-utils.c (header_encode_param): Don't allow in to be
4678         NULL, so instead of doing if (in == NULL) return;, make it a
4679         g_return_val_if_fail and later we can make it an assert or
4680         something.
4681
4682         * providers/local/camel-maildir-store.c (get_inbox): Fixes bug
4683         #1138.
4684
4685         * providers/local/camel-mbox-summary.c
4686         (camel_mbox_summary_build_from): Make the `day-of-month' digit
4687         take up 2 chars by using "%2d". Fixes bug #3989 for lame mailers
4688         like Pine.
4689
4690         * camel-pgp-context.c (crypto_exec_with_passwd): Set the pipe fd's
4691         to nonblocking.
4692
4693 2001-07-06  Peter Williams  <peterw@ximian.com>
4694
4695         * camel-object.c (camel_object_unref): Make sure that after the
4696         finalization event has happened and the finalization functions
4697         have been called that the object still has a zero refcount.
4698
4699 2001-07-06  Joe Shaw  <joe@ximian.com>
4700
4701         * providers/nntp/camel-nntp-grouplist.c: Add locking to
4702         camel_nntp_get_grouplist_from_server().
4703
4704         * providers/nntp/camel-nntp-resp-codes.h: Added
4705         NNTP_EXTENSIONS_SUPPORTED (202).
4706
4707         * providers/nntp/camel-nntp-store.c (camel_nntp_store_get_extensions):
4708         Check for both NNTP_LIST_FOLLOWS and NNTP_EXTENSIONS_SUPPORTED from
4709         a LIST EXTENSIONS request. (Dunno if NNTP_LIST_FOLLOWS ever comes
4710         out of this, but that's what was already there...) Also, put some
4711         locking around it.
4712         (finalize): e_mutex_destroy() the command lock
4713         (camel_nntp_store_init): e_mutex_new() the command lock.
4714
4715         * providers/nntp/camel-nntp-store.h: Add locking macros.
4716
4717 2001-07-05  Jeffrey Stedfast  <fejj@ximian.com>
4718
4719         * camel-folder-summary.c (camel_message_info_string): Added an
4720         assert to make sure that `mi' isn't NULL.
4721         (camel_message_info_set_string): Same.
4722
4723         * providers/imap/camel-imap-command.c (camel_imap_response_free):
4724         Create and use a temporary CamelException for use with
4725         camel_imap_folder_changed.
4726
4727 2001-07-05  Jeffrey Stedfast  <fejj@ximian.com>
4728
4729         * camel-pgp-context.c (pgp_verify): Send the
4730         --no-auto-key-retrieve argument to gpg if we are in offline mode
4731         so that we don't have to worry about gpg hanging if it can't
4732         connect to the key servers, because now it shouldn't even attempt
4733         to.
4734
4735 2001-07-05  Chris Toshok  <toshok@ximian.com>
4736
4737         * camel-tcp-stream-openssl.c (ssl_verify): use
4738         X509_STORE_CTX_get_ex_data to get at the SSL* - don't use the
4739         X509_STORE_CTX to look up our stream, since it's not what we used
4740         to insert our stream into the hashtable.
4741         (open_ssl_connection): insert the stream into the hashtable before
4742         calling SSL_connect, as this can cause ssl_verify to be called,
4743         and we need to look up the stream there.  remove the stream from
4744         the hashtable if there's an error connecting.
4745         (stream_connect): pass the CamelTcpStreamOpenSSL* to
4746         open_ssl_connection since it handles the hashtable stuff.  remove
4747         hashtable stuff from here.
4748
4749 2001-07-05  Jeffrey Stedfast  <fejj@ximian.com>
4750
4751         * camel-folder.c (camel_folder_copy_messages_to): if source ==
4752         dest, just no-op.
4753
4754 2001-07-05  Peter Williams  <peterw@ximian.com>
4755
4756         * camel-vee-folder.c (camel_vee_folder_finalise): Move this before the
4757         camel_vee_folder_remove_folder because that function modifies p->folders
4758         messing up our iteration.
4759         (camel_vee_folder_finalise): Don't unref our summary; camel-folder now
4760         does this.
4761
4762         * camel-object.h (CamelObject): Add a 'destroying' flag to CamelObject.
4763
4764         * camel-object.c (obj_init): Clear 'destroying'.
4765         (camel_object_unref): If 'destroying' then do not send the finalize
4766         event and do not call finalize functions. Otherwise, set destroying
4767         so just in case we get refed (eg event code) we don't get doubly
4768         finalized.
4769
4770 2001-07-05  Not Zed  <NotZed@Ximian.com>
4771
4772         * camel-mime-filter-basic.c (filter): Fix the assertion slightly,
4773         if we have a little bit of input the output size could be larger,
4774         since we store upto 3 chars in the state.
4775
4776         * camel-folder-summary.c
4777         (camel_folder_summary_info_new_from_message): When indexing a new
4778         record, create a pseudo word 'ibexindexed' so we can always tell
4779         that a message has already been idnexed, even if it contains no
4780         words of its own.  Things like maildir use this check to see if
4781         its already been processed, and it matters if it is incorrect in
4782         this case (not just wasted cycles).
4783         (camel_message_info_dup_to): Assign the to->strings from the
4784         e_poolv_cpy() call, since it may allocaote a new poolv if the
4785         lengths do not match.
4786
4787         (camel_folder_summary_info_new_from_parser): And same here.
4788
4789         * providers/local/camel-maildir-summary.c (maildir_summary_sync):
4790         Changed the logicfor epoolv code to be different, we dont need to
4791         update hash references or any tricky stuff.
4792         (maildir_summary_check): Samehere.
4793
4794         * camel-folder-summary.h: Removed include of e-memory.h.
4795
4796 2001-07-03  Joe Shaw  <joe@ximian.com>
4797
4798         * providers/nntp/camel-nntp-resp-codes.h: Added NNTP_NO_PERMISSION
4799         (502) to the list of response codes.
4800
4801         * providers/nntp/camel-nntp-store.c (nntp_store_connect): If we
4802         receive a NNTP_NO_PERMISSION, don't get into an infinite loop trying
4803         to reconnect, get extensions, etc. Just give up and return FALSE.
4804
4805 2001-07-03  Dan Winship  <danw@ximian.com>
4806
4807         * providers/imap/camel-imap-message-cache.c
4808         (camel_imap_message_cache_clear): Doh. Don't remove things from
4809         the hash table while foreach'ing it. (And can't use foreach_remove
4810         either because we have to remove them in a weird order). Fixes
4811         #3618.
4812
4813         * providers/imap/camel-imap-folder.c (imap_get_message): If the
4814         server returns OK from the FETCH BODY, but there's no parseable
4815         BODY response, it's probably because there's an UN-parseable BODY
4816         response, implying the message is badly formatted, MIMEwise. In
4817         that case, fall back to fetching the message as a single part.
4818
4819 2001-07-02  Sam Creasey <sammy@oh.verio.com>
4820
4821         * providers/nntp/camel-nntp-folder.c: Implemented
4822         nntp_folder_search_by_expression and
4823         nntp_folder_search_free.  Basic search functionality e.g. unread
4824         marking now works for NNTP folders.
4825
4826         * camel_filter_search.c (get_size): Added get-size sexp directive
4827         to get the size of a message for filters.
4828
4829         * providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new):
4830         Always check with the NNTP server after summary load -- this
4831         function now always expires old summary entries and syncs with
4832         the news server.
4833
4834         * providers/nntp/camel-nntp-utils.c (camel_nntp_get_headers):
4835         Only fetch headers for articles not already logged in 
4836         the summary file.
4837         
4838         * providers/nntp/camel-nntp-grouplist.c 
4839         (camel_nntp_get_grouplist_from_*): change from g_list_append()
4840         to g_list_prepend() + g_list_reverse.  Traversing 40,000 
4841         element linked lists sucks.
4842
4843         * providers/nntp/camel-nntp-store.c (camel_nntp_command):
4844         Should the NNTP connection die with 
4845         CAMEL_EXCEPTION_SERVICE_NOT_CONNECTED, make a single retry 
4846         attempt.  Timing out the NNTP link is less painful this way.
4847
4848 2001-07-02  Peter Williams  <peterw@ximian.com>
4849
4850         * README (Introduction): Add comment noting that Camel actually
4851         exists now :-)
4852
4853 2001-07-02  Dan Winship  <danw@ximian.com>
4854
4855         * camel-session.c (camel_session_get_filter_driver): new method to
4856         get an application-initialized filter driver.
4857
4858         * camel-filter-driver.c (camel_filter_driver_new): Remove the
4859         get_folder function and data args from here...
4860         (camel_filter_driver_set_folder_func): ...and add this function to
4861         set/change them.
4862
4863         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): If
4864         this folder is INBOX and we're filtering INBOX, set a flag on the
4865         folder for later.
4866         (imap_update_summary): Add another argument (GPtrArray *recents),
4867         and if it's non-NULL, add the uids of any \Recent new messages to
4868         it.
4869         (camel_imap_folder_changed): If doing filtering in this folder,
4870         create a recents array and pass it to imap_update_summary. Then
4871         get a filter driver and use it to filter the recent messages.
4872
4873         * providers/imap/camel-imap-summary.h: 
4874         * providers/imap/camel-imap-utils.c (imap_parse_flag_list): Add
4875         support for the \Recent flag.
4876
4877         * providers/imap/camel-imap-provider.c (imap_conf_entries): enable
4878         the "filter" option.
4879
4880         * camel-types.h: add CamelFilterDriver typedef here
4881
4882 2001-07-02  Not Zed  <NotZed@Ximian.com>
4883
4884         * camel-lock-client.c (camel_lock_helper_init): properly return
4885         error if we can't create pipes.
4886
4887         * camel-folder-summary.c (summary_build_content_info): re-enable
4888         html indexing.
4889
4890         * camel-mime-filter-html.c: Completely re-implemented using a
4891         custom parser.
4892
4893 2001-07-02  Dan Winship  <danw@ximian.com>
4894
4895         * tests/misc/url.c (main): Change a camel_exception_clear to
4896         camel_exception_init to fix a sometimes-crash
4897
4898 2001-06-29  Jeffrey Stedfast  <fejj@ximian.com>
4899
4900         * camel-mime-utils.c: Added Originator: header as a header to look
4901         for when looking for the mailing list.
4902
4903         * tests/mime-filter/Makefile.am: Build the test-crlf test program.
4904
4905         * tests/mime-filter/test-crlf.c: New test suite for the crlf
4906         filter.
4907
4908         * camel-mime-filter-crlf.c (filter): Fixed to correctly encode and
4909         decode dots.
4910
4911 2001-06-28  Peter Williams  <peterw@ximian.com>
4912
4913         * camel-mime-filter-stripheader.c: New file. Filter that strips a
4914         header from mime output.
4915
4916         * camel-mime-filter-stripheader.h: New file. Header for the above.
4917
4918         * providers/smtp/camel-smtp-transport.c (smtp_data): Use the
4919         stripheader filter to remove the "Bcc" header.
4920
4921         * Makefile.am: Add the stripheader files.
4922
4923         * tests/lib/Makefile.am (INCLUDES): Get this to compile again.
4924
4925         * tests/mime-filter/test-stripheader.c: New file. Test suite for
4926         the CamelMimeFilterStripHeader.
4927
4928         * tests/mime-filter/Makefile.am: New test section: mime filters.
4929
4930 2001-06-28  Jeffrey Stedfast  <fejj@ximian.com>
4931
4932         * camel-mime-utils.c (header_decode_param_list): Fix a memory
4933         leak. Also if the decoded value is NULL, that means it wasn't
4934         encoded so we don't want to toss the old value.
4935         (header_param_list_format_append): Correctly wrap long parameter
4936         values according to rfc2184.
4937
4938 2001-06-28  Dan Winship  <danw@ximian.com>
4939
4940         * providers/imap/camel-imap-folder.c (imap_refresh_info): If the
4941         folder is frozen, don't refresh, just record that we need to do it
4942         later.
4943         (imap_append_online): If the APPEND doesn't trigger an immediate
4944         EXISTS response (because the folder isn't the selected folder, or
4945         because the server doesn't do that until the next command), call
4946         imap_refresh_info on the folder.
4947         (imap_copy_online): Likewise. (Replacing the unconditional NOOP
4948         that was there before, which absolutely killed filter performance
4949         by forcing the IMAP provider to switch back and forth between
4950         folders after every copy or move.)
4951         (imap_thaw): If the folder needs a refresh, do it.
4952
4953         * camel-folder.c (camel_folder_is_frozen): New method
4954
4955 2001-06-27  Jeffrey Stedfast  <fejj@ximian.com>
4956
4957         * camel-transport.c (camel_transport_init): Initialize the private
4958         send_lock.
4959         (camel_transport_finalize): Free the private send_lock.
4960         (camel_transport_get_type): Set the init and finalize functions.
4961         (camel_transport_send): Lock the transport.
4962         (camel_transport_send_to): Same.
4963
4964         * camel-private.h: Add CAMEL_TRANSPORT_(UN)LOCK macros.
4965
4966 2001-06-27  Jeffrey Stedfast  <fejj@ximian.com>
4967
4968         * tests/folder/test9.c (main): Updated to match the current API.
4969
4970         * tests/folder/test3.c: #include <gtk/gtk.h> since we use
4971         gtk_init().
4972
4973         * camel-internet-address.c
4974         (camel_internet_address_encode_address): Use the new
4975         header_address_fold.
4976
4977         * camel-mime-utils.c: Removed some old #if 0'd code of mine.
4978         (rfc2047_encode_word): If enclen is 0, don't write an encoded word
4979         token (=?iso-8859-7?Q??= would be an invalid token).
4980         (header_address_fold): New function to wrap address headers -
4981         header_fold() was force-wrapping rfc2047 encoded words which was
4982         making the test suite fail. The *real* solution, however, is to
4983         not create rfc2047 encoded words longer than 72 chars.
4984
4985 2001-06-26  Jeffrey Stedfast  <fejj@ximian.com>
4986
4987         * camel-filter-driver.c (open_folder): Since we want an error
4988         opening a folder to result in the message being copied to Inbox
4989         (assuming no other filters get a chance to `move` it), don't
4990         record any exceptions that may occur in this function.
4991
4992 2001-06-26  Dan Winship  <danw@ximian.com>
4993
4994         * providers/imap/camel-imap-folder.c (camel_imap_folder_selected,
4995         imap_append_offline, imap_append_online,
4996         camel_imap_folder_changed): lock the cache around accesses
4997
4998         * providers/imap/camel-imap-store.c (get_folder_online): ref the
4999         newly-created folder (as current_folder) before calling
5000         camel_imap_folder_selected, in case that needs to do something
5001         that causes another folder to become current...
5002
5003         * camel-service.c (camel_service_get_url): D'oh.
5004         s/FALSE/CAMEL_URL_HIDE_PASSWORD/
5005
5006 2001-06-25  Jeffrey Stedfast  <fejj@ximian.com>
5007
5008         * camel-filter-search.c (get_source): g_strdup() the message
5009         source here or we will have problems later when we go to free the
5010         result ;-)
5011
5012 2001-06-25  Dan Winship  <danw@ximian.com>
5013
5014         * providers/imap/camel-imap-store.c (try_auth): Fix this: IMAP
5015         doesn't allow an extra argument to AUTHENTICATE to avoid a useless
5016         round trip like some other SASL bindings do.
5017
5018         * providers/imap/camel-imap-command.c (imap_read_response): Deal
5019         with IMAP servers that (incorrectly) return "+\r\n" rather than
5020         "+ \r\n" for an empty continuation response.
5021         (camel_imap_response_extract_continuation): Likewise.
5022
5023 2001-06-21  Jeffrey Stedfast  <fejj@ximian.com>
5024
5025         * camel-mime-utils.c (word_types_compatable): New function that
5026         decides if 2 word types are mergeable. An atom and a qstring are
5027         mergeable; 2 qstrings are mergeable; and 2 encoded words are
5028         mergeable.
5029         (header_encode_phrase_merge_words): If 2 words are merged, the new
5030         word type is the MAX of the combined types. This means that if we
5031         merge a qstring and an atom, the resulting word type is a
5032         qstring.
5033
5034         * camel-internet-address.c (internet_format):
5035         s/g_string_sprintfa/g_string_append since this makes more sense in
5036         this particular case.
5037         (internet_encode): Same here.
5038
5039 2001-06-21  Jeffrey Stedfast  <fejj@ximian.com>
5040
5041         * providers/smtp/camel-smtp-transport.c (smtp_send): Use
5042         camel_address_length() rather than casting and accessing data
5043         members.
5044
5045 2001-06-20  Jeffrey Stedfast  <fejj@ximian.com>
5046
5047         * camel-mime-utils.c (header_raw_check_mailing_list): If the first
5048         char of the mailing-list name is '<', chop it off to make Ettore
5049         happy. Fixes bug #2153.
5050
5051 2001-06-19  Not Zed  <NotZed@Ximian.com>
5052
5053         * camel-lock-helper.c (unlock_id): Fixed a bug when not running
5054         setuid it wouldn't unlock.
5055
5056         * camel-movemail.c (camel_movemail): use new
5057         locking daemon, also return an error code.
5058
5059 2001-06-18  Jeffrey Stedfast  <fejj@ximian.com>
5060
5061         Note: Except for the info_free(), the NULL checks are
5062         g_return's. I felt that since g_free() handles NULL that our
5063         _free() functions should also.
5064         
5065         * camel-folder.c (camel_folder_change_info_free): Check to make
5066         sure that the info pointer isn't NULL.
5067         (camel_folder_change_info_change_uid): Same.
5068         (camel_folder_change_info_changed): Same.
5069         (camel_folder_change_info_remove_uid): Same.
5070         (camel_folder_change_info_add_uid): Same.
5071         (camel_folder_change_info_build_diff): Same.
5072         (camel_folder_change_info_cat): Same.
5073         (camel_folder_change_info_add_source): Same.
5074         (camel_folder_change_info_add_source_list): Same.
5075         (camel_folder_change_info_add_update): Same.
5076         (camel_folder_change_info_add_update_list): Same.
5077
5078 2001-06-18  Dan Winship  <danw@ximian.com>
5079
5080         * tests/stream/Makefile.am (LDADD): 
5081         * tests/smime/Makefile.am (LDADD): 
5082         * tests/misc/Makefile.am (LDADD): 
5083         * tests/message/Makefile.am (LDADD): 
5084         * tests/folder/Makefile.am (LDADD): Remove DB3_LDADD
5085
5086         * Makefile.am (install-exec-local): Set camel-lock-help setgid or
5087         setuid as needed
5088
5089 2001-06-18  Not Zed  <NotZed@Ximian.com>
5090
5091         * camel-folder-summary.c
5092         (camel_folder_summary_info_new_from_parser): Only create a missing
5093         uid if we have indexing turned on.
5094
5095         * camel-lock-helper.c (setup_process): Function to setup
5096         process/sanity/security checks.  Change to the real uid as soon as
5097         we can.
5098         (lock_path): First try to lock as the real uid, if that fails, try
5099         the root uid.
5100         (unlock_id): Unlock as the uid we created the lock as.
5101
5102         * Makefile.am (INCLUDES): Added -DCAMEL_SBINDIR for lock helper
5103         location.
5104
5105         * providers/local/camel-spool-folder.c (spool_lock): Implemented,
5106         using lock helper locking.  Need to work out if the locking
5107         requires a root created lock?
5108         (spool_unlock): Likewise.
5109
5110 2001-06-15  Not Zed  <NotZed@Ximian.com>
5111
5112         * camel-lock-helper.c: Setuid Lock helper process.  Creates and manages
5113         .locks, keeping them active, removing them, etc.  What real perms it
5114         needs is a little system dependent.
5115
5116 2001-06-14  Not Zed  <NotZed@Ximian.com>
5117
5118         * providers/local/camel-maildir-store.c (get_folder_info): Implement.
5119         (scan_dir): Does the work of scanning for maildir directories.
5120
5121 2001-06-13  Not Zed  <NotZed@Ximian.com>
5122
5123         * providers/local/camel-spool-store.c (get_folder_info):
5124         Implemented, just returns a hardcoded INBOX folder.
5125         (free_folder_info): implemented, free's the 1 possible level of
5126         folder info.
5127
5128         * providers/local/camel-spool-folder.c
5129         (camel_spool_folder_construct): Set the real unread message
5130         count on the folder_created thing.
5131
5132 2001-06-15  Dan Winship  <danw@ximian.com>
5133
5134         * providers/imap/camel-imap-message-cache.c
5135         (camel_imap_message_cache_max_uid): Return the largest real UID in
5136         the cache (as an integer). Eventually to be used for an
5137         optimization in the new-message fetch code.
5138         (cache_put): Keep track of max_uid.
5139
5140 2001-06-14  Jeffrey Stedfast  <fejj@ximian.com>
5141
5142         * camel-mime-utils.c: Added Mailing-List header regex so that we
5143         can do mlist magic on that header.
5144
5145 2001-05-28  Jeffrey Stedfast  <fejj@ximian.com>
5146
5147         * camel-mime-utils.c (header_decode_param): Properly handle
5148         correct and incorrect (for the common case, ie Outlook and
5149         Netscape/Mozilla) rfc2184 values.
5150         (header_decode_rfc2184_param): Get the param name and see if we
5151         should expect a rfc2184 parameter value.
5152         (rfc2184_decode): Decode a rfc2184 value.
5153         (hex_decode): hex decode a string.
5154         (header_decode_param_list): Handle rfc2184 encoded parameters (ie
5155         parameters that have been split and perhaps encoded).
5156         (header_param_list_format_append): Encode the value before seeing
5157         if it will fit on the line. If the value does get encoded, be sure
5158         to put a '*' before the equal-sign.
5159         (header_encode_param): New function to rfc2184 encode a parameter
5160         value (maybe it should be renamed?)
5161
5162 2001-06-14  Jeffrey Stedfast  <fejj@ximian.com>
5163
5164         * camel-mime-part.c (init_header_name_table): Don't try to format
5165         the Reply-To header - we don't want to wrap the reply-to address.
5166
5167 2001-06-12  Not Zed  <NotZed@Ximian.com>
5168
5169         * providers/local/camel-spool-*.[ch]: A new provider, for spool
5170         mailboxes.  Mostly a cut and paste of the mbox code, but not a
5171         subclass CamelLocal*.  Not tested a lot, doesn't lock yet, use
5172         with extreme caution.
5173
5174         * tests/lib/folders.c (test_folder_message_ops): Added spool arg,
5175         spool folders can't be deleted, renamed, etc.
5176         (test_folder_basic): Same.
5177
5178         * tests/folder/test2.c (main): Added checks for spool type.
5179
5180         * tests/[message|stream|folder|misc|smime]/Makefile.am (LDADD):
5181         Added db3 flags, so make check compiles, doesn't run though.
5182
5183 2001-05-24  Not Zed  <NotZed@Ximian.com>
5184
5185         * providers/local/camel-local-provider.c
5186         (camel_provider_module_init): Added spool provider.
5187
5188 2001-06-07  Jon Trowbridge  <trow@ximian.com>
5189
5190         * camel-filter-driver.c (camel_filter_driver_filter_folder): Add a
5191         separator between the service url and the folder name, if needed.
5192
5193         * camel-filter-driver.c (camel_filter_driver_filter_mbox): Added
5194         an argument, so that the original source URI of the mbox can be
5195         passed in.  This is needed because this function is called
5196         post-movemail, so we are never reading from the original mbox
5197         anymore.  Without the original mbox URI, the X-Evolution-Source
5198         tag gets set incorrectly and filter-on-source will fail to work.
5199         (camel_filter_driver_filter_message): Also take an extra arg
5200         for the original source URI.  It is the original URI, not the
5201         source URI, that is used for filtering and for setting the
5202         X-Evolution-Source tag.
5203
5204 2001-06-05  Dan Winship  <danw@ximian.com>
5205
5206         * providers/imap/camel-imap-folder.c (imap_rescan): Don't fetch
5207         the UID and FLAGS of messages we don't know about yet, since
5208         they'll just get discarded.
5209
5210 2001-06-01  Jeffrey Stedfast  <fejj@ximian.com>
5211
5212         * tests/smime/pgp.c: Fix to not get into a recursive loop in
5213         get_type().
5214
5215         * tests/smime/pgp-mime.c: Same.
5216
5217 2001-05-31  Jeffrey Stedfast  <fejj@ximian.com>
5218
5219         * camel-smime-context.c: Numerous fixes to get it to compile.
5220
5221         * camel.h: Added camel-cipher-context.h, camel-cms-context.h,
5222         camel-smime-context.h, and camel-smime-utils.h
5223
5224         * camel-cms-context.[c,h]: New virtual class for manipulating
5225         cryptographic message syntax messages (like S/MIME).
5226
5227         * camel-smime-context.[c,h]: Modified to inherit from the
5228         CamelCMSContext class rather than the CamelCipherContext class.
5229
5230         * camel-smime.[c,h]: Removed - just use camel-smime-context
5231         directly.
5232
5233         * camel-smime-utils.[c,h]: New source files. Moved the 2 useful
5234         functions from camel-smime.[c,h] into here.
5235
5236 2001-05-30  Dan Winship  <danw@ximian.com>
5237
5238         * camel-charset-map.c: Redo the BUILD_MAP code to not depend on
5239         libunicode. Now it only generates a map of "popular" 8bit
5240         encodings. (It's not worthwhile to support obscure encodings,
5241         because any mailer that supports them will support UTF8 too. And
5242         Chinese and Japanese use mostly the same UTF8 characters so you
5243         need to decide between those encodings based on the locale or
5244         the charset of the message you're replying to or the input
5245         method you used. So this is sufficient for camel_charset_best's
5246         use.)
5247
5248         * camel-charset-map-private.h: Regenerated.
5249
5250         * camel.c (camel_shutdown): Move #ifdefs around to prevent a
5251         warning.
5252
5253 2001-05-29  Dan Winship  <danw@ximian.com>
5254
5255         * camel-disco-diary.c: Code for logging and replaying offline
5256         operations.
5257
5258         * camel-disco-store.c (disco_construct): Set disco->status here
5259         (where we can base it on the session's offline status) rather than
5260         at init time.
5261         (disco_connect): If we connect online and have a non-empty diary,
5262         switch to RESYNCING mode and replay the diary to the server.
5263         (disco_get_folder, disco_get_folder_info): Add _resyncing
5264         variants.
5265
5266         * camel-disco-folder.c (disco_sync, disco_expunge_uids,
5267         disco_append_message, disco_copy_messages_to,
5268         disco_move_messages_to): Add _resyncing variants to switches.
5269         (disco_expunge_uids, disco_append_message, disco_copy_messages_to,
5270         disco_move_messages_to): Remove #ifdef'ed out diary code: let the
5271         provider do it.
5272         (disco_append_message): Redo the append methods to no longer
5273         return the UID, since we're no longer doing the logging from here.
5274
5275         * providers/imap/camel-imap-store.c (imap_connect_online,
5276         imap_connect_offline): Create a CamelDiscoDiary.
5277         (imap_disconnect_offline): And free it.
5278
5279         * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
5280         If RESYNCING, don't do any sort of checking that the remote folder
5281         matches the summary, beyond making sure that the UIDVALIDITY is
5282         correct.
5283         (imap_rescan): Add a missing camel_folder_summary_info_free when
5284         removing a UID from the summary.
5285         (imap_expunge_uids_offline): Implement. Fairly simple.
5286         (imap_expunge_uids_resyncing): Implement. If the store supports
5287         UIDPLUS, we can just use imap_expunge_uids_online. If not, we need
5288         to temporarily undelete any messages marked deleted on the server
5289         that aren't supposed to get expunged.
5290         (imap_append_offline): Implement, using cache and summary
5291         operations, and triggering the folder_changed event by hand.
5292         (imap_append_resyncing): Implement. Redo imap_append_online a bit
5293         in the process to make them able to share more code.
5294         (imap_copy_offline): Implement.
5295         (imap_copy_online): Move parts of this out into a helper.
5296         (imap_copy_resyncing): Implement. In most cases this is just like
5297         imap_copy_online, but if you are copying a message that was itself
5298         copied or appended into the folder, and the server doesn't do
5299         UIDPLUS, it will be necessary to replace at least part of the copy
5300         operation with one or more appends.
5301
5302         * providers/imap/camel-imap-command.c (imap_read_response): Don't
5303         record the current folder in the response when in RESYNCING mode.
5304         (This means that EXISTS and EXPUNGE responses won't be processed,
5305         which is needed because the summary may not match the folder at
5306         this point.)
5307         (imap_read_response): On error, call
5308         camel_imap_response_free_without_processing, not
5309         camel_imap_response_free.
5310
5311         * providers/imap/camel-imap-utils.c (imap_uid_array_to_set): Make
5312         this work better when operating on UIDs that aren't in the summary.
5313
5314         * providers/imap/camel-imap-summary.c
5315         (camel_imap_summary_add_offline): New routine used by
5316         imap_append_offline and imap_copy_offline to create new summary
5317         entries.
5318
5319 2001-05-28  Jeffrey Stedfast  <fejj@ximian.com>
5320
5321         * camel-mime-utils.c (header_set_param): Use g_strcasecmp()
5322         because some systems don't have strcasecmp(). Also, when removing
5323         a param, make sure to free the param->name too.
5324
5325 2001-05-27  Dan Winship  <danw@ximian.com>
5326
5327         * tests/lib/messages.c (test_message_read_file): Fix an fd leak
5328
5329         * tests/lib/session.c, tests/lib/session.h: a CamelSession
5330         subclass for the test programs.
5331
5332         * tests/lib/Makefile.am: include session.[ch]
5333
5334         * tests/folder/test*.c: Use a CamelTestSession from libcameltest
5335         instead of cut+pasting everywhere.
5336
5337         * tests/misc/url.c (main): Update for a camel_url_new change at
5338         some point.
5339
5340         * tests/*/.cvsignore: Add stuff.
5341
5342         * camel-mime-utils.c (rfc2047_encode_word): Fix a silly ==/!=
5343         mixup.
5344
5345 2001-05-26  Dan Winship  <danw@ximian.com>
5346
5347         * providers/imap/camel-imap-folder.c: Add a "need_rescan" flag
5348         saying if we want to rescan the entire folder for flag changes
5349         next time it's selected.
5350         (camel_imap_folder_init): Set need_rescan TRUE.
5351         (camel_imap_folder_selected): If need_rescan is TRUE, call
5352         imap_rescan.
5353         (imap_refresh_info): Only do a full rescan if need_rescan is TRUE.
5354         Otherwise just do a NOOP, making this a MUCH more lightweight
5355         operation. Also, don't call imap_rescan directly if the folder
5356         isn't selected, since that could end up causing the folder to be
5357         scanned *twice* (imap_rescan -> camel_imap_command ->
5358         camel_imap_folder_selected -> imap_rescan).
5359         (imap_rescan): Set need_rescan FALSE.
5360         (imap_sync_online): Don't NOOP if no changes were pushed: the
5361         caller will call refresh_info if it wants to poll for changes.
5362         Fixes evolution-mail doing lots of unnecessary extra work at
5363         quit time.
5364
5365         * providers/imap/camel-imap-store.c (refresh_folder_info): Set
5366         need_rescan on each folder before calling refresh_info.
5367
5368 2001-05-25  Jeffrey Stedfast  <fejj@ximian.com>
5369
5370         * providers/smtp/camel-smtp-transport.c (smtp_auth): Oops. Use a
5371         strNcmp to make sure the response begins with a 334 code, not a
5372         strcmp. Duh.
5373
5374         * providers/local/camel-maildir-folder.c (maildir_append_message):
5375         remove the summary info so we are not out-of-sync with the maildir
5376         folder.
5377
5378         * providers/local/camel-mh-folder.c (mh_append_message): remove
5379         the summary info so we are not out-of-sync with the mh folder.
5380
5381         * providers/local/camel-mbox-folder.c (mbox_append_message):
5382         remove the summary info so we are not out-of-sync with the mbox.
5383
5384 2001-05-24  Jeffrey Stedfast  <fejj@ximian.com>
5385
5386         * camel-smime-context.c (camel_smime_context_new): Oops, I spelled
5387         the get-default-db function name wrong.
5388
5389 2001-05-23  Jeffrey Stedfast  <fejj@ximian.com>
5390
5391         * providers/local/camel-local-folder.c
5392         (camel_local_folder_construct): s/folder_deleted/folder_created -
5393         result of a bad copy/paste.
5394
5395         * providers/imap/camel-imap-search.c (imap_body_contains):
5396         Optimize the match "" case.
5397
5398 2001-05-21  Jeffrey Stedfast  <fejj@ximian.com>
5399
5400         * providers/imap/camel-imap-store.c (get_folder_info_online):
5401         Store the CamelFolderInfo tree that was returned from
5402         camel_folder_info_build() in a new variable, 'tree', rather than
5403         'fi' since we later use 'fi' when syncing folders. Not only does
5404         this fix a memory leak, but it also fixes the bug where the user
5405         would only see the last folder in the folder list and/or it's
5406         subfolders.
5407
5408 2001-05-16  Jeffrey Stedfast  <fejj@ximian.com>
5409
5410         * camel-session.c (camel_session_forget_password): The service can
5411         be NULL here too, thanks to Wayne Davis for pointing this out.
5412
5413         * camel-smime-context.c (camel_smime_context_new): We don't need
5414         to be passed the certdb path anymore.
5415
5416 2001-05-16  Dan Winship  <danw@ximian.com>
5417
5418         * camel-medium.c (camel_medium_get_headers): New function to
5419         return an array of all headers.
5420         (camel_medium_free_headers): And free them.
5421
5422         * camel-mime-part.c (get_headers, free_headers): Implement this
5423         for CamelMimePart. (Works for CamelMimeMessage too.)
5424
5425 2001-05-15  Jeffrey Stedfast  <fejj@ximian.com>
5426
5427         * camel-smime-context.c (camel_smime_context_finalise): Don't
5428         close or free (it wasn't allocated) the certdb.
5429         (camel_smime_context_new): If we get a NULL certdb handle, then
5430         don't bother trying to create a new certdb handle since NSS_Init*
5431         should have done that.
5432
5433 2001-05-15  Jeffrey Stedfast  <fejj@ximian.com>
5434
5435         * Makefile.am: Don't use EXTRA_GNOME_*, use the new CAMEL_*
5436         variables so we don't link in tons of extra cruft that we don't
5437         need.
5438
5439         * tests/smime/pkcs7.c: Added to the test suite - tests the S/MIME
5440         pkcs7 functions.
5441
5442 2001-05-14  Jeffrey Stedfast  <fejj@ximian.com>
5443
5444         * camel-smime-context.c: Lots of fixes to get this to compile.
5445
5446         * camel-smime.c (camel_smime_part_verify): Updated to pass in a
5447         hash argument to camel_smime_verify().
5448
5449         * camel-pgp-mime.c (camel_pgp_mime_part_verify): Update according
5450         to the changes in the context API.
5451
5452         * camel-pgp-context.c (pgp_verify): Updated to take a
5453         CamelCipherHash argument.
5454
5455         * camel-cipher-context.c (camel_cipher_verify): Now takes a hash
5456         argument since the S/MIME code needs this.
5457
5458         * Makefile.am: Add camel-smime-context.[c,h] and camel-smime.[c,h]
5459         to the build.
5460         
5461         * camel-smime.[c,h]: New source files for manipulating S/MIME
5462         message parts.
5463
5464 2001-05-14  Jon Trowbridge  <trow@ximian.com>
5465
5466         * camel-search-private.c (utf8_get): Replicate the semantics of
5467         the libunicode utf8 functions by returning NULL in the arg
5468         on invalid utf8.
5469
5470         * camel-pgp-context.c (pgp_verify): Check for valid utf8,
5471         terminate loop if something looks wrong.
5472
5473         * camel-mime-utils.c (header_encode_phrase_get_words): Properly
5474         check for invalid utf8.
5475         (header_encode_string): Properly check for invalid utf8.
5476
5477         * camel-charset-map.c (camel_charset_step): Properly check for
5478         invalid utf8.
5479
5480 2001-05-14  Jeffrey Stedfast  <fejj@ximian.com>
5481
5482         * tests/folder/test9.c: 
5483         * tests/folder/test8.c:
5484         * tests/folder/test7.c: 
5485         * tests/folder/test6.c: 
5486         * tests/folder/test5.c: 
5487         * tests/folder/test4.c:
5488         * tests/folder/test3.c: 
5489         * tests/folder/test2.c: 
5490         * tests/folder/test1.c: 
5491         * tests/smime/pgp-mime.c: 
5492         * tests/smime/pgp.c: Subclass CamelSession since we can no longer
5493         specify the passwd callback any other way and update code
5494         accordingly.
5495
5496 2001-05-11  Dan Winship  <danw@ximian.com>
5497
5498         * camel-mime-utils.c (header_location_decode): Decode
5499         Content-Location, either correctly or Netscape-generated-brokenly.
5500
5501         * camel-mime-part.c (camel_mime_part_set_content_location,
5502         camel_mime_part_get_content_location, etc): Deal with
5503         Content-Location header.
5504
5505 2001-05-11  Jeffrey Stedfast  <fejj@ximian.com>
5506
5507         * providers/smtp/camel-smtp-transport.c (smtp_auth): Don't check
5508         the initial auth response until we get into the while-loop
5509         otherwise we have problems if the SASL mechanism supported a
5510         client initiated challenge (like PLAIN and LOGIN do).
5511
5512 2001-05-11  Dan Winship  <danw@ximian.com>
5513
5514         * camel-stream-null.c (camel_stream_null_new): Make this return
5515         CamelStream * (like the other stream new functions) instead of
5516         CamelStreamNull *
5517
5518 2001-05-10  Chris Toshok  <toshok@ximian.com>
5519
5520         * camel-tcp-stream-ssl.c (stream_connect): call SSL_Enable after
5521         the SSL_ImportFD and before PR_Connect.  Otherwise, NSS aborts
5522         during the connect.
5523
5524 2001-05-10  Jeffrey Stedfast  <fejj@ximian.com>
5525
5526         * camel-session.c (camel_session_get_password): Don't abort if the
5527         Service is NULL, this is perfectly valid for cipher contexts.
5528
5529 2001-05-09  Peter Williams  <peterw@ximian.com>
5530
5531         * providers/imap/camel-imap-folder.c (imap_move_messages_to): Pass
5532         appropriate parameters to CF_CLASS and add comment explaining why
5533         my initial attempt at a solution didn't work.
5534
5535 2001-05-09  Dan Winship  <danw@ximian.com>
5536
5537         * camel-disco-store.c (camel_disco_set_status): Set the
5538         disconnected status.
5539         (camel_disco_store_can_work_offline): Return whether or not a
5540         given CamelDiscoStore can work offline or not.
5541
5542         * camel-disco-folder.c (camel_disco_folder_cache_message):
5543         Explicitly tell a folder to cache a message. (Better than using
5544         get_message, because for IMAP that doesn't guarantee you'll get
5545         all the message parts.)
5546         (camel_disco_folder_prepare_for_offline): Prepare a folder for
5547         offline use by caching all messages meeting given search criteria
5548         (and doing anything else the particular folder implementation
5549         needs).
5550
5551         * camel-session.c (camel_session_set_online,
5552         camel_session_is_online): A session-wide online/offline toggle.
5553         (camel_session_init): Set online to TRUE.
5554
5555         * providers/imap/camel-imap-store.c (can_work_offline):
5556         Implementation of CamelDiscoStore::can_work_offline. (Checks that
5557         the store has been used online at least once.)
5558         (imap_get_folder_online, imap_get_folder_offline): Deal with
5559         request for "inbox" properly. ("Don't you mean... 'INBOX'?").
5560
5561         * providers/imap/camel-imap-folder.c (imap_cache_message):
5562         Implementation of CamelDiscoFolder::cache_message.
5563
5564         * camel.h: Add camel-disco-store.h and camel-disco-folder.h
5565
5566 2001-05-09  Jeffrey Stedfast  <fejj@ximian.com>
5567
5568         * camel-mime-part.c (camel_mime_part_set_content_id): Wrap the
5569         content-id with <>'s.
5570
5571 2001-05-04  Jeffrey Stedfast  <fejj@ximian.com>
5572
5573         * providers/smtp/camel-smtp-transport.c (connect_to_server): Add
5574         support for using OpenSSL.
5575
5576         * camel-remote-store.c (remote_connect): Add support for using the
5577         OpenSSL implementation.
5578
5579         * camel-tcp-stream-ssl.c (ssl_bad_cert): Hmmmm, don't pass in a
5580         NULL as the last argument to alert_user - prototype doesn't take
5581         that argument anymore?
5582
5583         * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_finalize):
5584         (ssl_verify): Use a global hash table to try and lookup the
5585         CamelTcpStreamOpenSSL object given the ssl context since OpenSSL
5586         doesn't think one needs to pass data around, we should all be
5587         living in a world of global variables, duh!
5588
5589 2001-05-06  Dan Winship  <danw@ximian.com>
5590
5591         * Makefile.am (libcamelinclude_HEADERS): Fix another build
5592         problem. (Um, anyone else could have done this...)
5593
5594 2001-05-04  Dan Winship  <danw@ximian.com>
5595
5596         * providers/imap/camel-imap-store.c (get_folder_online): Fix up
5597         refcounting on current_folder.
5598
5599         * camel-disco-folder.c, camel-disco-store.h: Remove
5600         CamelDiscoDiary refs that weren't supposed to escape yet.
5601
5602 2001-05-03  Dan Winship  <danw@ximian.com>
5603
5604         * camel-disco-store.c: new abstract class for disconnectable
5605         remote stores
5606
5607         * camel-disco-folder.c: new abstract class for folders on
5608         disconnectable stores.
5609
5610         * Makefile.am: Add camel-disco-folder.[ch] and
5611         camel-disco-store.[ch].
5612
5613         * providers/imap/camel-imap-store.c: Make this a subclass of
5614         CamelDiscoStore, and fix up the offline interfaces for the changes
5615         since they were first written (particularly the fact that some
5616         IMAP stores don't just use subscribed folders).
5617
5618         * providers/imap/camel-imap-folder.c: Make this a subclass of
5619         CamelDiscoFolder, although most ops still fail in disconnected
5620         mode.
5621
5622         * camel-store.c (camel_store_get_folder_info): Change gboolean,
5623         gboolean, gboolean to guint32 in the prototype for this function.
5624
5625         * providers/local/camel-local-store.c (get_folder_info): Update
5626         for prototype change.
5627
5628 2001-05-02  Dan Winship  <danw@ximian.com>
5629
5630         * providers/imap/camel-imap-store.h: Clean this up a bit. Add a
5631         "tag_prefix" member. Move "useful_lsub" into capabilities.
5632
5633         * providers/imap/camel-imap-store.c (camel_imap_store_init):
5634         Initialize the tag_prefix, based on a static variable.
5635
5636         * providers/imap/camel-imap-command.c (camel_imap_command): Use
5637         the store's tag_prefix character rather than "A" at the start of
5638         the tag. Makes the verbose debug output easier to parse when
5639         connected to multiple IMAP servers. (Well, unless you're connected
5640         to more than 26 servers...)
5641
5642         * providers/imap/camel-imap-utils.c (imap_uid_array_to_set): Fix
5643         this up... it was losing count in some cases and giving a more
5644         verbose answer than it needed to.
5645
5646         * providers/pop3/camel-pop3-store.c: Rescue the KPOP code from bit
5647         rot.
5648
5649 2001-05-01  Dan Winship  <danw@ximian.com>
5650
5651         * providers/imap/camel-imap-command.c (camel_imap_command): Redo
5652         command locking. Since command_lock is recursive, we can just get
5653         a lock here, and release it either on error, or when the caller
5654         frees the response data. (This simplifies a lot of stuff, and
5655         fixes some problems with camel_imap_folder_changed being called
5656         without the command_lock locked because of the 2001-03-22 change.)
5657
5658         (camel_imap_response_free): 
5659         (camel_imap_response_free_without_processing): 
5660         (camel_imap_response_extract): 
5661         (camel_imap_response_extract_continuation): These all take a
5662         CamelImapStore now as well, to deal with locking.
5663
5664         * providers/imap/camel-imap-private.h: Add
5665         CAMEL_IMAP_STORE_ASSERT_LOCKED, which defaults to a noop, but can
5666         be made to call e_mutex_assert_locked.
5667
5668         * providers/imap/camel-imap-folder.c, camel-imap-search.c,
5669         camel-imap-store.c: Simplify using new locking stuff. Add a few
5670         CAMEL_IMAP_STORE_ASSERT_LOCKED checks.
5671
5672 2001-05-01  Dan Winship  <danw@ximian.com>
5673
5674         Support the IMAP UIDPLUS extension (RFC 2359), which lets you
5675         resync after disconnected operation more efficiently, but also
5676         makes it possible to do appends and moves/copies more efficiently
5677         now.
5678
5679         * providers/imap/camel-imap-folder.c (imap_append_message): If the
5680         server supports UIDPLUS, grab the APPENDUID response and cache the
5681         message into the folder's message cache.
5682         (imap_copy_messages_to): Likewise, for COPYUID, copy any message
5683         parts we have cached between the source and destination folder
5684         caches.
5685         (imap_get_message): If the entire message is already in the cache,
5686         just return that rather than building it from parts.
5687         (imap_update_summary): Fetch just the "UID FLAGS RFC822.SIZE" of
5688         the new messages first, then only fetch the headers for messages
5689         where we don't already have the headers cached.
5690
5691         * providers/imap/camel-imap-message-cache.c: Add gtk-doc comments.
5692         (cache_put): Fix refcounting stuff here.
5693         (camel_imap_message_cache_insert_stream,
5694         camel_imap_message_cache_insert_wrapper): New.
5695         (camel_imap_message_cache_get): Fix a bug here so the memory
5696         caching actually works.
5697         (camel_imap_message_cache_copy): New routine, used by
5698         imap_copy_messages_to.
5699
5700         * providers/imap/camel-imap-utils.c (imap_uid_set_to_array):
5701         Inverse operation of imap_uid_array_to_set. Used to parse COPYUID
5702         response.
5703
5704 2001-04-30  Dan Winship  <danw@ximian.com>
5705
5706         * providers/imap/camel-imap-utils.c (imap_uid_array_to_set):
5707         New-and-improved version of get_uid_set() from
5708         camel-imap-folder.c. Looks at the summary as it goes so that if
5709         you ask for messages 5, 6, 8, and 9, and there is no message 7,
5710         then you get "5:9" instead of "5:6,8:9"
5711
5712         * providers/imap/camel-imap-folder.c (imap_copy_messages_to): Use
5713         imap_uid_array_to_set() rather than get_uid_set().
5714         (get_uid_set): Gone
5715
5716 2001-04-27  Dan Winship  <danw@ximian.com>
5717
5718         * camel-session.c: Redo this a lot so that instead of having a
5719         class full of callbacks, we have a subclassable class. Also,
5720         replace the increasingly horrifying
5721         camel_session_query_authenticator with three new routines,
5722         camel_session_get_password, camel_session_forget_password, and
5723         camel_session_alert_user.
5724
5725         * camel-pgp-context.c:
5726         * camel-pkcs7-context.c:
5727         * camel-smime-context.c: 
5728         * providers/imap/camel-imap-store.c: 
5729         * providers/pop3/camel-pop3-store.c: 
5730         * providers/smtp/camel-smtp-transport.c: 
5731         Use camel_session_get_password / camel_session_forget_password.
5732
5733         * camel-tcp-stream-ssl.c (ssl_bad_cert): Use
5734         camel_session_alert_user.
5735
5736 2001-04-26  Jeffrey Stedfast  <fejj@ximian.com>
5737
5738         * camel.c (camel_init): Automagically call camel_shutdown()
5739         atexit() ;-)
5740         (camel_init): Also initialize NSS databases as read/write for
5741         S/MIME and if NSS fails to init, try initializing with volatile
5742         databases.
5743
5744         * camel-file-utils.h: #include <sys/types.h> for off_t.
5745
5746 2001-04-26  Dan Winship  <danw@ximian.com>
5747
5748         * camel-file-utils.c: New file, with the int, string, time_t, and
5749         off_t encode/decode routines from camel-folder-summary.c moved
5750         here and renamed, for the enjoyment of non-CamelFolderSummary
5751         subclasses.
5752
5753         * Makefile.am (libcamel_la_SOURCES): Add camel-file-utils.c
5754         (libcamelinclude_HEADERS): and camel-file-utils.h
5755
5756         * camel-folder-summary.c: Remove functions that were moved to
5757         camel-file-utils.c, update uses of them for the new names.
5758         (camel_folder_summary_{en,de}code_token are still here.)
5759
5760         * providers/local/camel-mbox-summary.c: Use camel_file_util_*
5761         names
5762
5763         * providers/imap/camel-imap-summary.c: Use camel_file_util_* names
5764
5765         * providers/imap/camel-imap-store.c (imap_store_setup_online,
5766         imap_store_setup_offline): Use camel_file_util_* names, which
5767         makes much more sense since this isn't folder summary stuff.
5768
5769 2001-04-26  Dan Winship  <danw@ximian.com>
5770
5771         * Makefile.am (INCLUDES): Remove UNICODE_CFLAGS (and some other
5772         stuff that's redundant with EXTRA_GNOME_CFLAGS)
5773         (libcamel_la_LIBADD): Replace UNICODE_LIBS with GAL_LIBS.
5774
5775         * camel-search-private.c: 
5776         * camel-pgp-context.c: 
5777         * camel-mime-utils.c: Use gunicode interfaces rather than
5778         libunicode.
5779
5780         * camel-charset-map.c: Use gunicode rather than libunicode. (The
5781         charmap-regen code still depends on libunicode though.)
5782
5783         * camel-mime-filter-charset.h: 
5784         * tests/message/test2.c (convert): Use iconv rather than
5785         unicode_iconv.
5786
5787         * providers/smtp/Makefile.am (libcamelsmtp_la_LIBADD): 
5788         * providers/pop3/Makefile.am (libcamelpop3_la_LIBADD): 
5789         * providers/local/Makefile.am (libcamellocal_la_LIBADD): Remove
5790         UNICODE_LIBS.
5791
5792         * camel.c (camel_init): Remove call to unicode_init.
5793
5794         * camel-mime-parser.c: Remove unused unicode.h include.
5795
5796 2001-04-26  Dan Winship  <danw@ximian.com>
5797
5798         * camel-service.c (get_host): Use e_gethostbyname_r.
5799         (camel_service_gethost): Remove unused var.
5800
5801 2001-04-26  Not Zed  <NotZed@Ximian.com>
5802
5803         * Applied jacob's patches for e-poolv stuff.
5804
5805 2001-04-23  Jeffrey Stedfast  <fejj@ximian.com>
5806
5807         * camel.h: Add camel-vee-folder.h and camel-digest-folder.h
5808
5809         * camel-digest-folder.[c,h]: New class that can be used to browse
5810         a multipart/digest message as if it were a CamelFolder.
5811
5812 2001-04-22  Jeffrey Stedfast  <fejj@ximian.com>
5813
5814         * camel-pgp-context.c (pgp_verify): Oops, don't use the return
5815         value of iconv() as a string length, it only tells us the number
5816         of non-reversable character conversions. This fixes it so we
5817         actually see the gpg output in the message viewer.
5818
5819 2001-04-23  Mikael Hallendal  <micke@codefactory.se>
5820
5821         * providers/nntp/Makefile.am (INCLUDES): 
5822         Changed GTK_INCLUDEDIR to EXTRA_GNOME_CFLAGS.
5823
5824 2001-04-20  Jeffrey Stedfast  <fejj@ximian.com>
5825
5826         * camel-smime-context.c (smime_sign): Implemented using the
5827         secmime.h convenience functions.
5828         (smime_clearsign): We just error our here, there is no clearsign
5829         for smime.
5830         (smime_verify): Copied code over from the pkcs7 verify - same
5831         state, ugly and unknown :-)
5832         (smime_encrypt): Implemented using the secmime.h convenience
5833         functions.
5834         (smime_decrypt): Same as the code in pkcs7-context.
5835
5836 2001-04-19  Jeffrey Stedfast  <fejj@ximian.com>
5837
5838         * camel-pkcs7-context.c (pkcs7_sign): Implemented.
5839         (pkcs7_clearsign): Implemented.
5840         (get_zero_len_passwd): Convenience function to try a 0-length key
5841         on the certificate db - if this works then there is no need to
5842         prompt the user.
5843         (get_password): Callback to get the password.
5844         (camel_cipher_hash_to_nss): Convenience function to convert a
5845         CamelCipherHash to an NSS HASH_HashType.
5846         (nss_hash_to_sec_oid): Converts a HASH_HashType to a SecOidTag.
5847         (pkcs7_digest): Digest function for use with pkcs7_sign().
5848         (sign_encode_cb): Callback to write the signed data to the output
5849         stream.
5850         (pkcs7_verify): Hacked on a bit more but am still a bit on the
5851         confused side. This might work but I wouldn't hold my breath. The
5852         sign/clearsign should be close if not correct, but this one...god
5853         only knows.
5854         (pkcs7_decrypt): Implemented.
5855         (pkcs7_encrypt): Implemented (mostly, still need to handle when
5856         'sign' is TRUE).
5857
5858 2001-04-18  Dan Winship  <danw@ximian.com>
5859
5860         * providers/imap/camel-imap-store.c (camel_imap_store_finalize):
5861         Free base_url and storage_path.
5862
5863         * providers/pop3/camel-pop3-store.c (finalize): Free the
5864         implementation string.
5865         (camel_pop3_command): Clarify documentation to mention that
5866         @ex isn't set (and *@ret is) on CAMEL_POP3_ERR.
5867         (connect_to_server): Set @ex properly on CAMEL_POP3_ERR.
5868
5869         * providers/pop3/camel-pop3-folder.c (pop3_refresh_info,
5870         pop3_get_message): Set @ex properly on CAMEL_POP3_ERR.
5871
5872 2001-04-17  Jeffrey Stedfast  <fejj@ximian.com>
5873
5874         * camel-pkcs7-context.[c,h]: New source files to handle Pkcs7
5875         encryption, decryption, signing, and verifying. Not yet
5876         complete. I'm sensing this is going to take a while seeing as how
5877         NSS is just so well documented.
5878
5879 2001-04-17  Dan Winship  <danw@ximian.com>
5880
5881         * camel-filter-driver.c (camel_filter_driver_filter_message): Fix
5882         a memory leak in the error case.
5883
5884 2001-04-16  Jeffrey Stedfast  <fejj@ximian.com>
5885
5886         * providers/local/camel-mbox-summary.c (summary_rebuild): Don't we
5887         want to tell where we are by using the start of the message? I
5888         think this should be using camel_mime_parser_tell_start_from()
5889         instead. Also divide by the size *before* multiplying by 100 so
5890         that we don't overflow the int which was giving us negative values
5891         for our progress status (oops).
5892
5893 2001-04-16  Jeffrey Stedfast  <fejj@ximian.com>
5894
5895         * camel-operation.c: Added a prototype for stamp().
5896
5897         * camel-charset-map.c (camel_charset_locale_name): #include
5898         string.h so we don't get a warning about strchr being undefined
5899         and also init charset to NULL.
5900
5901         * camel-pgp-context.c (pgp_verify): Go back to doing the utf8
5902         conversion by hand so that we don't depend on gal.
5903
5904         * Makefile.am: Remove the EXTRA_GNOME_CFLAGS include.
5905
5906         * camel-store.c (camel_mkdir_hier): Convenience function that it
5907         seems a number of camel-store implementations used gal for.
5908
5909         * providers/nntp/camel-nntp-store.c (ensure_news_dir_exists): Lets
5910         not depend on gal for just e_mkdir_hier() - use camel_mkdir_hier()
5911         instead.
5912
5913         * providers/nntp/camel-imap-store.c: Lets not depend on gal for
5914         just e_mkdir_hier() - use camel_mkdir_hier() instead.
5915
5916         * camel-session.c (camel_session_get_storage_path): Don't depend
5917         on e_mkdir_heir() anymore, use the CamelStore version.
5918
5919         * camel-folder-search.h: Removed gal dependency, why was this even
5920         there in the first place?
5921
5922         * providers/imap/camel-imap-folder.c: Don't need gal/util/e-util.h
5923         here, so remove it.
5924
5925         * string-utils.c (strstrcase): New function, well more like old
5926         function brought back to life so we don't have to depend on gal.
5927
5928         * providers/imap/camel-imap-store.c (imap_store_setup_online): Use
5929         strstrcase rather than e_strstrcase so we don't depend on gal.
5930         (get_unread_online): Same here.
5931
5932         * providers/smtp/camel-smtp-transport.c (smtp_helo): Use
5933         strstrcase.
5934
5935 2001-04-15  Jeffrey Stedfast  <fejj@ximian.com>
5936
5937         * camel-mime-utils.c (header_raw_check_mailing_list): regex
5938         doesn't set errno and regcomp returns 0 on success and any other
5939         value for an error (so don't *just* check for -1).
5940
5941 2001-04-14  Jeffrey Stedfast  <fejj@ximian.com>
5942
5943         * camel-cipher-context.c: Check to make sure the context is a
5944         valid context in all the user functions.
5945
5946 2001-04-13  Jon Trowbridge  <trow@ximian.com>
5947
5948         * providers/imap/camel-imap-store.c (imap_disconnect):
5949         s/imap_store/store/, fixing a typo that was causing the build to
5950         fail.
5951
5952         * camel-filter-search.c (get_source): Make the (previously unused)
5953         get-source command actually do the right thing, properly shrouding
5954         any passed-in source and falling back to use the source attached
5955         to the mime message.
5956
5957 2001-04-13  Dan Winship  <danw@ximian.com>
5958
5959         * camel-object.c (camel_object_hook_event):
5960         * camel-uid-cache.c (camel_uid_cache_get_new_uids):
5961         * camel-url.c (camel_url_new_with_base): Plug leaks.
5962
5963         * camel-remote-store.c (camel_remote_store_init): Don't
5964         re-initialize the folders hash table.
5965
5966         * providers/imap/camel-imap-store.c (imap_disconnect): Free
5967         authtypes since they'll be re-read on re-connect.
5968         (get_folder_info): Free folderinfos that we're discarding from the
5969         list.
5970
5971 2001-04-12  Jeffrey Stedfast  <fejj@ximian.com>
5972
5973         * camel-pgp-context.c (camel_pgp_context_get_type): Oops, lets not
5974         get into a recursive call here ;-)
5975
5976         * tests/smime/pgp.c: Updated to reflect changes to the PGP code.
5977
5978         * tests/smime/pgp-mime.c: Same.
5979
5980 2001-04-12  Jeffrey Stedfast  <fejj@ximian.com>
5981
5982         * camel-pgp-mime.c: Updated to reflect the few changes made to the
5983         CamelPgpContext class.
5984
5985         * camel-pgp-context.c: Updated to subclass of CamelCipherContext.
5986
5987         * camel-cipher-context.[c,h]: New base class for
5988         CamelPgpContext. Also contains the replacement for
5989         CamelPgpValidity, CamelCipherValidity.
5990
5991 2001-04-12  Dan Winship  <danw@ximian.com>
5992
5993         * camel-mime-filter-crlf.c (filter): Fix a pair of array bounds
5994         reads noted by purify
5995
5996 2001-04-12  Jeffrey Stedfast  <fejj@ximian.com>
5997
5998         * camel.h: #include the pgp stuff.
5999
6000 2001-04-12  Dan Winship  <danw@ximian.com>
6001
6002         * providers/imap/camel-imap-message-cache.c
6003         (camel_imap_message_cache_remove): 
6004         * camel-url.c (camel_url_to_string): Plug memory leaks.
6005
6006 2001-04-11  Dan Winship  <danw@ximian.com>
6007
6008         * providers/imap/camel-imap-utils.c (imap_parse_string_generic):
6009         Simplify peterw's imap_is_atom_char fix.
6010
6011 2001-04-11  Jeffrey Stedfast  <fejj@ximian.com>
6012
6013         * tests/smime/Makefile.am: Added pgp-mime.c to the tests.
6014
6015         * tests/smime/pgp-mime.c: Test suite for camel-pgp-mime.c functions.
6016
6017         * Makefile.am: Add camel-pgp-mime.[c,h] to the build.
6018
6019         * camel-pgp-mime.c: Made a number of fixes to get it to compile
6020         and also fixed a few logic errors (mostly forgetting to reset
6021         streams) so that it worked (thanks to the pgp-mime test program).
6022
6023 2001-04-11  JP Rosevear  <jpr@ximian.com>
6024
6025         * providers/imap/Makefile.am: user GNOME_INCLUDEDIR since gnome
6026         files are included in the top level camel headers and the gtk
6027         include dir is now versioned and such
6028
6029         * providers/local/Makefile.am: ditto
6030
6031         * providers/pop3/Makefile.am: ditto
6032
6033         * providers/smtp/Makefile.am: ditto
6034
6035         * providers/sendmail/Makefile.am: ditto
6036
6037         * camel-service.c: use five arg version of gethostbyname_r if
6038         appropriate
6039         (camel_get_host_byname): check if msg->herr is non-zero instead of
6040         checking if msg->hp is null since we may not always have msg->hp
6041
6042 2001-04-11  Jeffrey Stedfast  <fejj@ximian.com>
6043
6044         * camel-sasl-digest-md5.c (digest_response): Use
6045         camel_charset_locale_name() to get the locale charset rather than
6046         checking the CHARSET environment variable. This is a much less
6047         ugly hack. Also: If we fail to be able to convert to UTF8, then
6048         disavow all knowledge of the charset parameter.
6049
6050         * camel-charset-map.c (camel_charset_locale_name): New function to
6051         return the locale charset (or NULL if US-ASCII).
6052
6053 2001-04-11  Jeffrey Stedfast  <fejj@ximian.com>
6054
6055         * camel-pgp-context.c (camel_pgp_verify): Use
6056         e_utf8_from_locale_string() rather than trying to do it manually
6057         since Lauris's version works much better.
6058
6059 2001-04-06  Jeffrey Stedfast  <fejj@ximian.com>
6060
6061         * Makefile.am: Added camel-pgp-context.[c,h] to the build. Also
6062         added tests/smime/pgp.c and Makefile.am
6063
6064         * tests/smime/pgp.c: New test suite for PGP functions.
6065
6066         * camel-pgp-context.c: Various fixes to get it to build.
6067
6068 2001-04-07  Peter Williams  <peterw@ximian.com>
6069
6070         * providers/imap/camel-imap-utils.c (imap_parse_string_generic): It
6071         would be a good idea to recognize '\0'. Before, this code was running
6072         off the ends of strings and intermittently coredumping (if it didn't
6073         hit an imap_atom_char first) -- whoops!
6074
6075 2001-04-05  Not Zed  <NotZed@Ximian.com>
6076
6077         * merge from evolution-0-10-branch to evolution-0-10-merge-0
6078
6079 2001-04-03  Jeffrey Stedfast  <fejj@ximian.com>
6080
6081         * Makefile.am: Added tests/ back in
6082
6083         * camel-mime-utils.c (header_decode_text): Ignore whitespace
6084         between encoded words (there were a few cases where it didn't
6085         before).
6086         (header_encode_string): Preserve whitespace between words that are
6087         to be encoded by encoding them too.
6088         (header_encode_phrase): Same here but with phrases.
6089
6090 2001-04-03  Dan Winship  <danw@ximian.com>
6091
6092         * providers/imap/camel-imap-folder.c (imap_sync): If we don't
6093         change any flags or expunge, send a NOOP to give the server a
6094         chance to send EXISTS, etc, messages.
6095         (imap_get_message): If the server_level < IMAP4rev1, always fetch
6096         messages all-at-once, since they don't support the [#.MIME]
6097         syntax.
6098         (imap_update_summary): When reading message flags, set the
6099         server_flags field as well, and don't overwrite any flags set by
6100         camel_folder_summary_info_new_from_message. Might help with some
6101         of the flag problems...
6102
6103 2001-04-02  Dan Winship  <danw@ximian.com>
6104
6105         * camel-service.h: Remove the "quick_login" member, which is
6106         unnecessary.
6107
6108         * providers/smtp/camel-smtp-transport.c (smtp_auth): Remove the
6109         references to quick_login and fix this to use the CamelSasl
6110         interfaces correctly to do the same thing.
6111         (connect_to_server): Split this out of smtp_connect
6112         (smtp_connect): Use connect_to_server. When re-EHLO'ing after
6113         auth, ignore errors.
6114         (query_auth_types): Use connect_to_server rather than
6115         smtp_connect, so it doesn't try to authenticate. Add LOGIN
6116         authtype to the list of authtypes to check for.
6117
6118         * providers/smtp/camel-smtp-provider.c
6119         (camel_provider_module_init): Add LOGIN authtype to the authtypes
6120         list explicitly.
6121
6122         * camel-sasl.c (camel_sasl_authtype_list): Don't list LOGIN here:
6123         it's not a real SASL authtype and is only used for SMTP.
6124         
6125         * camel-sasl-plain.c: 
6126         * camel-sasl-login.c: 
6127         * camel-sasl-kerberos4.c: 
6128         * camel-sasl-cram-md5.c: 
6129         * camel-sasl-anonymous.c: 
6130         * providers/pop3/camel-pop3-provider.c: Remove "quick_login"
6131         argument from authtypes.
6132
6133 2001-04-02  Gediminas Paulauskas <menesis@delfi.lt>
6134
6135         * camel-filter-driver.c: marked missing report status' for translation.
6136
6137 2001-04-02  Jeffrey Stedfast  <fejj@ximian.com>
6138
6139         * camel-pgp-context.c (camel_pgp_sign): mutex lock & unlock the
6140         context.
6141         (camel_pgp_clearsign): Same.
6142         (camel_pgp_verify): Same.
6143         (camel_pgp_encrypt): Same.
6144         (camel_pgp_decrypt): And finally here...
6145
6146         * camel-pgp-context.h: Update the function prototypes to match
6147         those found in camel-pgp-context.c.
6148
6149         * camel-pgp-context.c: Updated.
6150
6151         * camel-pgp-mime.c (camel_pgp_mime_part_sign): Implemented.
6152         (camel_pgp_mime_part_verify): Implemented.
6153         (camel_pgp_mime_part_encrypt): Implemented.
6154         (camel_pgp_mime_part_decrypt): Implemented.
6155
6156 2001-04-01  Jeffrey Stedfast  <fejj@ximian.com>
6157
6158         * camel-sasl-login.[c,h]: New files to handle the LOGIN SASL
6159         mechanism.
6160         
6161         * camel-sasl-plain.c: Removed the definition of
6162         camel_sasl_login_authtype.
6163
6164         * camel-sasl.c (camel_sasl_new): Oops. I thought LOGIN was an
6165         alias to PLAIN. I was wrong. These two SASL objects have to be
6166         separate.
6167
6168         * providers/smtp/camel-smtp-transport.c (smtp_auth): Updated to
6169         check for and use authmech->quick_login when available.
6170
6171 2001-04-01  Jeffrey Stedfast  <fejj@ximian.com>
6172
6173         * providers/pop3/camel-pop3-provider.c: Updated the authtypes here
6174         too.
6175
6176         * camel-sasl-plain.c: 
6177         * camel-sasl-anonymous.c: 
6178         * camel-sasl-digest-md5.c: 
6179         * camel-sasl-cram-md5.c: 
6180         * camel-sasl-kerberos4.c: Updated the authtype values.
6181
6182         * camel-service.h: Added another field to CamelServiceAuthType
6183         that specifies whether or not the mechanism supports "quick auth"
6184         which means that the client can send the initial challenge in the
6185         AUTH request.
6186
6187         * camel-sasl.c (camel_sasl_new): Add support for LOGIN.
6188         (camel_sasl_authtype_list): Here too.
6189         (camel_sasl_authtype): And finally here.
6190
6191         * camel-sasl-plain.c: Define camel_sasl_login_authtype.
6192
6193         * providers/smtp/camel-smtp-transport.c (smtp_auth): Only unref
6194         the SASL object if it exists.
6195
6196 2001-03-30  Dan Winship  <danw@ximian.com>
6197
6198         * providers/pop3/camel-pop3-store.c (connect_to_server,
6199         query_auth_types, pop3_connect): Move things around here to make
6200         this all work right again (so you don't get prompted for a
6201         password when checking the supported authtypes.)
6202
6203 2001-03-30  Jon Trowbridge  <trow@ximian.com>
6204
6205         * camel-mime-message.c (camel_mime_message_set_source): Shrould
6206         our source URL before putting it into X-Evolution-Source.
6207
6208 2001-03-29  Jeffrey Stedfast  <fejj@ximian.com>
6209
6210         * providers/imap/camel-imap-store.c (get_folder_info): Don't
6211         blindly append "/INBOX", construct a CamelURL and set the path
6212         that way.
6213         (parse_list_response_as_folder_info): Don't blindly append
6214         "/<foldername>", construct a CamelURL and set the path that way
6215         instead.
6216         (get_folders_offline): And again here.
6217
6218 2001-03-30  Not Zed  <NotZed@Ximian.com>
6219
6220         * camel-service.c (camel_get_host_byname): Dont overwrite an
6221         exception if we got one already.  Added camel_operation status to
6222         it, and comment out some debug.
6223
6224 2001-03-29  Not Zed  <NotZed@Ximian.com>
6225
6226         * providers/smtp/camel-smtp-transport.c (smtp_connect): Free host
6227         name info when done ... blah blah.
6228
6229         * camel-sasl-kerberos4.c (krb4_challenge): Free host name info
6230         after we're done with it.
6231
6232         * camel-sasl-digest-md5.c (digest_md5_challenge): Free host name
6233         info after we're done with it.
6234
6235         * camel-remote-store.c (remote_connect): Free the host name info
6236         from get_host after we're finished with it.
6237
6238         * camel-service.c (camel_get_host_byname): New function to
6239         lookup a name, and still be cancellable.
6240         (camel_free_host): And a function to free the structure
6241         returned.
6242         (camel_service_gethost): Call get_host_byname for this.
6243
6244 2001-03-29  Jon Trowbridge  <trow@ximian.com>
6245
6246         * camel-filter-driver.c (camel_filter_driver_filter_message): Save
6247         the source URL using camel_mime_message_set_source.
6248
6249         * camel-mime-message.c (camel_mime_message_set_source): Renamed
6250         camel_mime_message_set_identity to this.  Sets the X-Evolution-Source
6251         header.
6252         (camel_mime_message_get_source): Returns the X-Evolution-Source
6253         header.
6254
6255 2001-03-29  Kjartan Maraas  <kmaraas@gnome.org>
6256
6257         * broken-date-parser.c: #include <stdio.h>, <stdlib.h> and <string.h>
6258         * broken-date-parser.h: Remove all includes but <glib.h>
6259         * camel-address.h: Added #include <glib.h>
6260         * camel-data-wrapper.c: Move system includes to the top.
6261         * camel-data-wrapper.h: #include <glib.h>
6262         * camel-exception.c: #ifdef HAVE_CONFIG_H
6263         * camel-exception.h: Remove #include <glib.h>
6264         * camel-filter-driver.c: #ifdef HAVE_CONFIG_H and move system
6265         headers to top. Mark strings in camel_exception_set*() for i18n.
6266         * camel-filter-driver.h: #include <glib.h>
6267         * camel-filter-search.c: #ifdef HAVE_CONFIG_H
6268         * camel-folder-search.c: #include <config.h>
6269         * camel-folder-search.h: Header shuffling
6270         * camel-folder-summary.h: Same here
6271         * camel-folder-thread.c: #ifdef HAVE_CONFIG_H
6272         * camel-folder.c: Here too.
6273         * camel-folder.h: #include <glib.h>
6274         * camel-internet-address.c: Move system headers up
6275         * camel-lock.c: #ifdef HAVE_CONFIG_H
6276         * camel-medium.c: Same here
6277         * camel-mime-filter-bestenc.c: Move system headers up
6278         * camel-mime-filter-from.c: Same here
6279         * camel-mime-filter-linewrap.c: And here
6280         * camel-mime-filter.c: #include <string.h> to fix warnings from new gcc
6281         * camel-mime-filter.h: System headers moved up
6282         * camel-mime-message.c: Here too. #ifdef HAVE_CONFIG_H added
6283         * camel-mime-part-utils.c: #ifdef HAVE_CONFIG_H added
6284         * camel-mime-part.c: Here too, and shuffle headers
6285         * camel-mime-utils.c: #ifdef HAVE_CONFIG_H. Remove const from two
6286         variables to remove warning.
6287         * camel-mime-utils.h: Shuffle headers
6288         * camel-movemail.c: #ifdef HAVE_CONFIG_H. Mark string in camel_exception_set
6289         * camel-multipart.c: #ifdef HAVE_CONFIG_H. Added includes to remove
6290         warnings from new gcc
6291         * camel-object.c: #ifdef HAVE_CONFIG_H
6292         * camel-object.h: Shuffle headers
6293         * camel-operation.c: #ifdef HAVE_CONFIG_H
6294         * camel-provider.c: #ifdef HAVE_CONFIG_H. Shuffle headers. Mark a string
6295         * camel-remote-store.c: #ifdef HAVE_CONFIG_H
6296         * camel-sasl-anonymous.c: #ifdef HAVE_CONFIG_H. #include <string.h>
6297         * camel-sasl-cram-md5.c: #ifdef HAVE_CONFIG_H. #include <string.h> and
6298         <stdio.h> to remove warnings.
6299         * camel-sasl-digest-md5.c: #ifdef HAVE_CONFIG_H. shuffle headers
6300         * camel-sasl-digest-md5.h: Shuffle headers.
6301         * camel-sasl-kerberos4.c: #ifdef HAVE_CONFIG_H. Shuffle headers.
6302         * camel-sasl-kerberos4.h: Shuffle headers.
6303         * camel-sasl-plain.c: #ifdef HAVE_CONFIG_H. Shuffle
6304         * camel-sasl.c: #ifdef HAVE_CONFIG_H. #include <string.h>
6305         * camel-search-private.c: #include <config.h>
6306         * camel-seekable-stream.c: #ifdef HAVE_CONFIG_H
6307         * camel-seekable-stream.h: Shuffle
6308         * camel-seekable-substream.c: #ifdef HAVE_CONFIG_H
6309         * camel-service.c: Same
6310         * camel-service.h: Shuffle
6311         * camel-session.c: #ifdef HAVE_CONFIG_H
6312         * camel-store.c: Same
6313         * camel-stream-buffer.c: Here too
6314         * camel-stream-buffer.h: Shuffle
6315         * camel-stream-filter.c: #include <string.h>
6316         * camel-stream-fs.c: #ifdef HAVE_CONFIG_H
6317         * camel-stream-fs.h: Shuffle headers
6318         * camel-stream-mem.c: Same as above
6319         * camel-stream-mem.h: Here too
6320         * camel-stream-null.c: #ifdef HAVE_CONFIG_H
6321         * camel-stream.c: Here too
6322         * camel-stream.h: Shuffle
6323         * camel-tcp-stream-openssl.c: #ifdef HAVE_CONFIG_H
6324         * camel-tcp-stream-raw.c: Same here. and move local includes down
6325         * camel-tcp-stream-ssl.c: Same as above
6326         * camel-tcp-stream.c: #ifdef HAVE_CONFIG_H
6327         * camel-tcp-stream.h: move local include down
6328         * camel-transport.c: #ifdef HAVE_CONFIG_H
6329         * camel-transport.h: #include <glib.h>
6330         * camel-uid-cache.c: #ifdef HAVE_CONFIG_H. Shuffle headers
6331         * camel-uid-cache.h: Shuffle
6332         * camel-url.c: #ifdef HAVE_CONFIG_H
6333         * camel-vee-folder.c: #ifdef HAVE_CONFIG_H. Shuffle headers
6334         * camel-vee-folder.h: #include <glib.h>
6335         * camel-vee-store.h: Same here
6336         * camel.c: #ifdef HAVE_CONFIG_H
6337         * gstring-util.c: Here too
6338         * hash-table-utils.c: Remove #include <glib.h>
6339         * hash-table-utils.h: #include it here instead.
6340         * string-utils.c: #ifdef HAVE_CONFIG_H
6341         * providers/cache/camel-cache-map.c: #ifdef HAVE_CONFIG_H, shuffle
6342         headers and mark strings in camel_exception_set*()
6343         * providers/cache/camel-cache-provider.c: #ifdef HAVE_CONFIG_H
6344         * providers/cache/camel-cache-store.c: Same here, and mark a string.
6345         * providers/imap/camel-imap-command.c: #ifdef HAVE_CONFIG_H
6346         * providers/imap/camel-imap-command.h: Shuffle header
6347         * providers/imap/camel-imap-folder.c: #ifdef HAVE_CONFIG_H
6348         * providers/imap/camel-imap-message-cache.c: #ifdef HAVE_CONFIG_H
6349         * providers/imap/camel-imap-provider.c: #ifdef HAVE_CONFIG_H and
6350         #include <string.h>
6351         * providers/imap/camel-imap-search.c: #ifdef HAVE_CONFIG_H
6352         * providers/imap/camel-imap-store.c: #ifdef HAVE_CONFIG_H and mark
6353         a string.
6354         * providers/imap/camel-imap-summary.c: Shuffle headers
6355         * providers/imap/camel-imap-wrapper.c: #ifdef HAVE_CONFIG_H. Shuffle
6356         * providers/local/camel-local-folder.c: #ifdef HAVE_CONFIG_H
6357         * providers/local/camel-local-provider.c: #ifdef HAVE_CONFIG_H
6358         * providers/local/camel-local-store.c: Same here
6359         * providers/local/camel-local-summary.c: Here too, shuffle, mark a string
6360         * providers/local/camel-maildir-folder.c: #ifdef HAVE_CONFIG_H
6361         * providers/local/camel-maildir-store.c: Same
6362         * providers/local/camel-maildir-summary.c: Here too
6363         * providers/local/camel-mbox-summary.c: And here
6364         * providers/local/camel-mbox-store.c: And here
6365         * providers/local/camel-mbox-summary.c: #include <config.h>
6366         * providers/local/camel-mh-folder.c: #ifdef HAVE_CONFIG_H
6367         * providers/local/camel-mh-store.c: same
6368         * providers/local/camel-mh-summary.c: #ifdef HAVE_CONFIG_H, shuffle headers
6369         and mark a string for translation.
6370         * providers/nntp/camel-nntp-auth.c: #include <config.h>
6371         * providers/nntp/camel-nntp-store.c: Remove superfluous arg to 
6372         CAMEL_SERVICE_CLASS to make it compile
6373         * providers/pop3/camel-pop3-provider.c: #ifdef HAVE_CONFIG_H
6374         * providers/pop3/camel-pop3-store.c: Same here
6375         * providers/sendmail/camel-sendmail-provider.c: Here too
6376         * providers/sendmail/camel-sendmail-transport.c: Here too
6377         * providers/smtp/camel-smtp-provider.c: Same
6378         * providers/smtp/camel-smtp-transport.c: #ifdef HAVE_CONFIG_H, mark
6379         strings for translations.
6380         
6381 2001-03-29  Dan Winship  <danw@ximian.com>
6382
6383         * camel-url.c (camel_url_to_string): change "gboolean show_passwd"
6384         to "guint32 flags".
6385
6386         * tests/misc/url.c (main): Update calls to camel_url_to_string
6387
6388         * providers/imap/camel-imap-store.c (construct): Call
6389         camel_url_to_string with flags to hide password, authtype, and
6390         params to create the base_url.
6391         (etc): Update for the fact that the base_url no longer has the "/"
6392         at the end.
6393
6394         * camel-service.c (construct): Update calls to camel_url_to_string
6395         (pass CAMEL_URL_HIDE_PASSWORD)
6396
6397 2001-04-03  Jeffrey Stedfast  <fejj@ximian.com>
6398
6399         * camel-mime-utils.c (header_decode_text): Ignore whitespace
6400         between encoded words (there were a few cases where it didn't
6401         before).
6402         (header_encode_string): Preserve whitespace between words that are
6403         to be encoded by encoding them too.
6404         (header_encode_phrase): Same here but with phrases.
6405
6406 2001-04-04  Kjartan Maraas  <kmaraas@gnome.org>
6407
6408         * camel-filter-driver.c: Added #include <config.h>. Marked
6409         a bunch of strings for translation.
6410         * camel-folder-search.c: Added #include <config.h>.
6411         * camel-folder-summary.c: Same here.
6412         * camel-movemail.c: Marked strings for translation.
6413         * camel-provider.c: Same here.
6414         * camel-search-private.c: #include <config.h>
6415         * camel-vee-folder.c: Mark string for translation.
6416         * providers/local/camel-mbox-summary.c: #include <config.h>
6417         
6418 2001-04-03  Dan Winship  <danw@ximian.com>
6419
6420         * providers/imap/camel-imap-folder.c (imap_sync): If we don't
6421         change any flags or expunge, send a NOOP to give the server a
6422         chance to send EXISTS, etc, messages.
6423         (imap_get_message): If the server_level < IMAP4rev1, always fetch
6424         messages all-at-once, since they don't support the [#.MIME]
6425         syntax.
6426
6427 2001-04-01  Jeffrey Stedfast  <fejj@ximian.com>
6428
6429         * providers/imap/camel-imap-store.c (get_folder_info): Don't
6430         blindly append "/INBOX", construct a CamelURL and set the path
6431         that way.
6432         (parse_list_response_as_folder_info): Don't blindly append
6433         "/<foldername>", construct a CamelURL and set the path that way
6434         instead.
6435         (get_folders_offline): And again here.
6436
6437 2001-03-31  Not Zed  <NotZed@Ximian.com>
6438
6439         * camel-operation.c (struct _status_stack): change stamp to
6440         unsigned to avoid overflow.
6441         (camel_operation_end):
6442         (camel_operation_progress_count):
6443         (camel_operation_progress): Double the delay before transient
6444         events start showing their own progress.
6445
6446 2001-03-30  Not Zed  <NotZed@Ximian.com>
6447
6448         * providers/pop3/camel-pop3-folder.c (pop3_get_message): Change
6449         the pop download into a transient event.
6450
6451         * camel-operation.c (stamp): Get a timestamp that changes 4x a
6452         second (or rather, arbitrarily more often than 1/second).
6453         (camel_operation_progress): Use stamp() for time updates.
6454         (camel_operation_progress_count): "
6455         (camel_operation_start): Store the status as a struct status_stack
6456         item.
6457         (camel_operation_start_transient): New function to start a
6458         transient event, which is only reported if it runs for too
6459         long/and is reset afterwards.
6460         (camel_operation_progress):
6461         (camel_operation_progress_count): Fix for status_stack changes,
6462         and account for transient updates. 
6463
6464         * camel-filter-driver.c (camel_filter_driver_filter_folder): When
6465         we remove things (set deleted), always set seen too, to mirror
6466         interface behaviour when you delete.
6467         (camel_filter_driver_filter_message): And same here too.
6468
6469 2001-03-30  Dan Winship  <danw@ximian.com>
6470
6471         * providers/pop3/camel-pop3-store.c (connect_to_server,
6472         query_auth_types, pop3_connect): Move things around here to make
6473         this all work right again (so you don't get prompted for a
6474         password when checking the supported authtypes.)
6475
6476 2001-03-29  Dan Winship  <danw@ximian.com>
6477
6478         * camel-url.c (camel_url_to_string): change "gboolean show_passwd"
6479         to "guint32 flags".
6480
6481         * tests/misc/url.c (main): Update calls to camel_url_to_string
6482
6483         * providers/imap/camel-imap-store.c (construct): Call
6484         camel_url_to_string with flags to hide password, authtype, and
6485         params to create the base_url.
6486         (etc): Update for the fact that the base_url no longer has the "/"
6487         at the end.
6488
6489         * camel-service.c (construct): Update calls to camel_url_to_string
6490         (pass CAMEL_URL_HIDE_PASSWORD)
6491
6492 2001-03-28  Jeffrey Stedfast  <fejj@ximian.com>
6493
6494         * camel-pgp-context.[c,h]: New class for PGP encrypting,
6495         decrypting, signing and verifying. Next I'll be moving the
6496         contents of mail/mail-crypto into Camel. These files will
6497         basically replace mail/openpgp-utils.[c,h].
6498
6499 2001-03-29  Not Zed  <NotZed@Ximian.com>
6500
6501         * camel-folder-search.c (search_body_contains): Optimise the match
6502         "" case, just match everything in the folder (if we have it).
6503
6504         * camel-vtrash-folder.c (vtrash_move_messages_to): Access the
6505         folder directly from the message info.
6506         (vtrash_move_messages_to): I think we also need to call the real
6507         move_messages_to, and not try and bypass the lock, since we dont
6508         have the lock for that folder.
6509
6510         * camel-vee-folder.h: Move CamelVeeMessageInfo to public, so
6511         subclasses can get to it.
6512
6513         * camel-vee-folder.c (camel_vee_folder_add_folder): Dont let you
6514         add a vfolder to itself.
6515         (folder_changed): 
6516         (vee_folder_remove_folder): 
6517         (vee_folder_build_folder): Copy changes before triggering changed
6518         events, so we can do them outside of locks.
6519         (camel_vee_folder_get_message_folder): Removed function.
6520         (camel_vee_folder_hash_folder): Made public (renamed from
6521         hash_folder), simply for subclasses (probably not needed).
6522         (vee_expunge): Oops, call the class sync, not superclass sync.
6523         (vee_sync): Remove some accidental debug.
6524
6525 2001-03-27  Jeffrey Stedfast  <fejj@ximian.com>
6526
6527         * camel-service.c (get_path): Add the port (if user defined) to
6528         the path to fix bug #1996.
6529
6530         Danw: I'm iffy on the "fix" so I'd like you to comment.
6531
6532 2001-03-27  Jeffrey Stedfast  <fejj@ximian.com>
6533
6534         * providers/pop3/camel-pop3-folder.c (pop3_sync): If we aren't
6535         going to even check the resp/free buffer that gets returned from
6536         camel_pop3_command, don't even bother using it. Send in NULL
6537         instead.
6538         (pop3_get_message): Check to make sure that the `result' string is
6539         non-NULL. It's possible that some POP servers may return with
6540         "+OK\r\n<message>..." rather than the expected 
6541         "+OK ### octets\r\n<message>..."
6542
6543 2001-03-27  Not Zed  <NotZed@Ximian.com>
6544
6545         * camel-folder-summary.c (camel_folder_summary_finalize): Unref
6546         the html filter when done.
6547         (summary_build_content_info): Disable using the html parser to
6548         help index html mails until it gets sorted out.
6549
6550         * camel-vee-folder.c (folder_changed): Fix a cut n paste bug, we
6551         want uid_removed not uid_changed deref, fixes bug #1999.
6552
6553 2001-03-27  Dan Winship  <danw@ximian.com>
6554
6555         * camel-sasl.c (camel_sasl_authtype_list): add an argument to say
6556         whether or not you want "PLAIN" in the list (so you don't end up
6557         with "Password" twice in the config dialog).
6558
6559         * providers/imap/camel-imap-provider.c (camel_provider_module_init): 
6560         * providers/imap/camel-imap-store.c (query_auth_types): We don't
6561         want PLAIN.
6562
6563         * providers/smtp/camel-smtp-provider.c (camel_provider_module_init): 
6564         * providers/smtp/camel-smtp-transport.c (query_auth_types): But we
6565         do.
6566
6567 2001-03-27  Dan Winship  <danw@ximian.com>
6568
6569         * camel-provider.h: Add an "extra_conf" field to CamelProvider
6570         with structures and defines and stuff, for providers to specify
6571         additional configuration options that they want. Also add a
6572         "supports ssl" flag to the provider flags.
6573
6574         * camel-url.c (camel_url_new_with_base): Fix parsing of params.
6575         (output_param): And unparsing...
6576
6577         * camel-remote-store.c: add a "default_ssl_port" field.
6578         (remote_construct): If the URL has the "use_ssl" parameter, set
6579         the store's use_ssl flag.
6580         (remote_connect): If using SSL and no port specified, use the
6581         default_ssl_port rather than the default_port.
6582
6583         * providers/smtp/camel-smtp-provider.c (smtp_provider): add
6584         CAMEL_PROVIDER_SUPPORTS_SSL and CAMEL_URL_ALLOW_USER. (The config
6585         gui code knows that the ALLOW_USER and ALLOW_AUTH go together.)
6586         (ssmtp_provider): gone
6587
6588         * providers/smtp/camel-smtp-transport.c (smtp_construct): Set a
6589         flag if "use_ssl" param is set.
6590         (smtp_connect): Check the CamelSmtpTransport use_ssl flag rather
6591         than checking if this is smtp or ssmtp.
6592
6593         * providers/imap/camel-imap-provider.c (imap_conf_entries): Add a
6594         bunch of IMAP-specific configuration options, like "check for new
6595         mail in all folders" (default TRUE), "show only subscribed
6596         folders" (default TRUE), "ignore server-supplied namespace", and
6597         "apply filters to INBOX" (not yet implemented).
6598         (imap_provider): We support SSL and we no longer allow a path in
6599         the URL. (namespace is handled via extra_conf)
6600         (simap_provider): Gone
6601
6602         * providers/imap/camel-imap-store.c (camel_imap_store_init): Set
6603         default_ssl_port, don't set CAMEL_STORE_SUBSCRIPTIONS here
6604         (construct): remove simap stuff, deal with "use_lsub",
6605         "namespace", "check_all", and "filter" parameters. Set base_url
6606         to not include params.
6607         (imap_store_setup_online): Don't ask for the namespace if it was
6608         set explicitly. Don't get subscribed folders if !use_lsub.
6609         (imap_concat): Fix a bug.
6610         (get_folder_info): Support for not checking all folders.
6611
6612         * providers/imap/camel-imap-folder.c (imap_get_full_name): Rewrite
6613         to use imap_store->namespace, not service->url->path
6614
6615         * providers/pop3/camel-pop3-provider.c (pop3_conf_entries): "keep
6616         on server" (currently still implemented by the mailer code, not
6617         here), "delete after N days" (not yet implemented).
6618         (pop3_provider): we support SSL
6619         (spop_provider): gone
6620
6621         * providers/pop3/camel-pop3-store.c (camel_pop3_store_init): Set
6622         default_ssl_port
6623         (pop3_connect): Remove spop code
6624
6625 2001-03-26  Jeffrey Stedfast  <fejj@ximian.com>
6626
6627         * camel-vee-folder.c (vee_folder_construct): Move all of the
6628         camel_vee_folder_construct() internals here.
6629         (camel_vee_folder_construct): This function basically becomes a
6630         wrapper for vee_folder_construct and also checks to make sure that
6631         the UNMATCHED vfodler is constructed otherwise constructs it.
6632         (camel_vee_folder_new): Call vee_folder_construct() instead so
6633         that we don't get into a dead-lock.
6634
6635 2001-03-26  Jeffrey Stedfast  <fejj@ximian.com>
6636
6637         * camel-store.c (init_trash): Use camel_vtrash_folder_new() to
6638         create the vtrash folder now.
6639
6640         * camel-vtrash-folder.[c,h]: New subclass of CamelVeeFolder for
6641         our vTrash folders.
6642
6643         * camel-folder.c (camel_folder_copy_messages_to): Don't watch for
6644         vtrash folders anymore.
6645         (camel_folder_move_messages_to): Same.
6646
6647         * camel-vee-folder.c (camel_vee_folder_class_init): Update.
6648         (vee_move_messages_to): Rewrite to use the new move API.
6649
6650         * camel-filter-driver.c (do_copy): Updated to reflect
6651         copy_message_to changes. Create a temporary uid array and use
6652         that.
6653         (do_move): Same.
6654         (camel_filter_driver_filter_message): And again, here...
6655
6656         * providers/imap/camel-imap-folder.c (imap_copy_messages_to):
6657         Update to the new API.
6658         (imap_move_messages_to): Same.
6659         (get_uid_set): New function to create a `set' string based on an
6660         array of UIDs for use with imap_copy_messages_to.
6661
6662         * camel-folder.c (camel_folder_copy_messages_to): Replaces
6663         camel_folder_copy_message_to
6664         (camel_folder_move_message_to): Replaces
6665         camel_folder_move_message_to.
6666
6667 2001-03-27  Not Zed  <NotZed@Ximian.com>
6668
6669         * camel-vee-store.c (vee_get_folder): Added folder_created event
6670         here.
6671         
6672         * camel-vee-folder.c (unmatched_finalise): Removed, moved into
6673         main finalise code.
6674         (message_changed): Just create a new change entry and promote it
6675         to a folder_changed thing.
6676         (vee_sync): Always rebuild folder on sync, even when not expunge.
6677         (folder_changed): If not autoupdating, make sure we remove any
6678         removed entries.
6679         (vee_folder_build_folder):
6680         (vee_folder_remove_folder): NOP if we're called on
6681         folder_unmatched.
6682         (vee_search_by_expression): Only search each folder once.  Should
6683         we also order the result in summary order?
6684
6685 2001-03-20  Not Zed  <NotZed@Ximian.com>
6686
6687         * camel-store.c (init_trash): Fix calling for vee_folder_new().
6688
6689         * camel-folder-summary.c (camel_folder_summary_remove_index):
6690         Optimise slightly, use ptr_array_remove_index rather than have to
6691         search for the index by using summary_remove.
6692
6693         * camel-vee-folder.h: Removed local member from VeeFolder, since
6694         it was never used.
6695
6696         * camel-vee-store.c (camel_vee_store_finalise): Setup finalise
6697         function.
6698
6699         * camel-vee-folder.c (camel_vee_folder_set_expression): New
6700         function to set the query of an existing vfolder.
6701         (camel_vee_folder_construct): New function for
6702         convenience/subclasses.
6703         (camel_vee_folder_new): Removed exception parameter, no longer
6704         needed (since we dont search yet).
6705         (camel_vee_folder_new): Changed to use folder_construct, and no
6706         longer raise the folder created signal.
6707         (vee_folder_build_folder): Make it return error on exception, so
6708         we can work without exceptions.
6709         (vee_folder_remove_folder): Use remove index rather than
6710         remove_uid, this is ok since we have the summary locked for our
6711         own access.
6712         (camel_vee_folder_add_folder): Only add the folder to the
6713         unmatched private if it is not a private folder.
6714         (camel_vee_folder_remove_folder): Only remove the folder from
6715         unmatched if it is not private.
6716         (vee_expunge): Just call sync with expunge set.
6717         (vee_sync): If expunging, also refresh the search.
6718         (vee_folder_build_folder): We do our own locking now, removed from
6719         callers, also trigger changed events here too (within locks),
6720         fixed callers appropriately.
6721         (vee_folder_remove_folder): Do our own locking, and trigger
6722         changed events.
6723         (vee_folder_add_info): Renamed of vee_folder_add, we now take a
6724         hash of the folder name, rather than use the folders address.
6725         (hash_folder): Convert a folder name into an 8 character hash.
6726         (vee_get_message, vee_search_by_expression, vee_set_message_flags,
6727         vee_set_message_user_flag, vee_move_message_to): Changed the uid
6728         to be an 8 byte hash + original uid, with no ':' anymore.
6729
6730 2001-03-26  Jeffrey Stedfast  <fejj@ximian.com>
6731
6732         * camel-mime-utils.c (header_decode_text): When writing the last
6733         token (if not rfc2047 encoded), don't use g_string_append_len, use
6734         append_latin1.
6735
6736         * camel-mime-message.c (write_to_stream): Don't spew a warning if
6737         the message-id wasn't set by the application, not a big deal since
6738         we create one right here.
6739
6740 2001-03-26  Dan Winship  <danw@ximian.com>
6741
6742         * providers/imap/camel-imap-command.c (camel_imap_command): keep a
6743         reference on the store's current_folder.
6744
6745         * providers/imap/camel-imap-store.c (camel_imap_store_finalize): 
6746         (imap_disconnect): unref the current_folder before clearing it.
6747
6748         * camel-url.c (camel_url_get_param): Add missing accessor.
6749
6750         * camel-session.c (camel_session_get_provider): New. Return
6751         the provider for a URL.
6752
6753 2001-03-25  Dan Winship  <danw@ximian.com>
6754
6755         * camel-url.c (camel_url_new_with_base): New URL parser with full
6756         RFC1808 relative URL support. Yum.
6757         (camel_url_new): Wrapper around camel_url_new_with_base now.
6758
6759         * tests/Makefile.am: add misc subdir
6760
6761         * tests/misc/url.c: relative URL test cases from RFC 1808
6762
6763 2001-03-25  Jeffrey Stedfast  <fejj@ximian.com>
6764
6765         * camel-filter-driver.c (do_copy): Don't use copy_to if the source
6766         folder doesn't support summary info's.
6767         (do_move): Same.
6768         (camel_filter_driver_filter_message): And again here.  I think
6769         this will fix the problem of "colour" tags not staying with the
6770         message when it's copied to a folder during the filter process.
6771
6772 2001-03-24  Jeffrey Stedfast  <fejj@ximian.com>
6773
6774         * camel-sasl-digest-md5.c (digest_response): Do charset conversion
6775         on the username param here if needed.
6776         (parse_server_challenge): Protect against possibly empty-string
6777         charset values.
6778
6779 2001-03-23  Jon Trowbridge  <trow@ximian.com>
6780
6781         * camel-filter-driver.c (camel_filter_driver_filter_message):
6782         Don't call camel_mime_message_set_identity.  (The call is
6783         commented out, left over from some earlier experimentation that I
6784         want to be able to remember later...)
6785
6786         * camel-mime-message.c (camel_mime_message_set_identity): Added.
6787         A function to set the X-Evolution-Identity header.
6788         
6789 2001-03-22  Dan Winship  <danw@ximian.com>
6790
6791         * providers/imap/camel-imap-command.c (imap_read_response): Don't
6792         look at untagged responses other than "* BYE"...
6793         (camel_imap_response_free): ...do it here instead...
6794         (camel_imap_response_free_without_processing): ...but not here.
6795
6796         * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
6797         Remove the "EXISTS" line from the response so
6798         camel_imap_response_free won't try to process it.
6799         (camel_imap_folder_selected): If we get an EXISTS response mixed
6800         in with the FETCH responses, record the new EXISTS value.
6801         Use camel_imap_response_free_without_processing so that an EXISTS
6802         response won't cause a loop.
6803         (imap_rescan): Use camel_imap_response_free_without_processing.
6804         (imap_update_summary): Use
6805         camel_imap_response_free_without_processing. If an EXISTS response
6806         shows up, call imap_update_summary again to get the new messages.
6807         (imap_protocol_get_summary_specifier): Use BODY.PEEK[0], not
6808         RFC822.HEADER for prev IMAP4rev1, since the FETCH parser won't
6809         deal with RFC822.HEADER responses.
6810
6811         * providers/imap/camel-imap-store.c (get_folder_info): Fix an
6812         uninitialized variable
6813
6814 2001-03-21  Dan Winship  <danw@ximian.com>
6815
6816         * camel-provider.h: (CamelProvider) add a "GList *authtypes", so
6817         you can get the list of authtypes used by a provider without
6818         needing to have an actual CamelService object handy. (Will be
6819         needed by the new config druid.)
6820         (CAMEL_PROVIDER_ALLOWS, CAMEL_PROVIDER_NEEDS): New macros to test
6821         the URL part stuff, since the way it works is too complicated and
6822         everyone always does it wrong.
6823
6824         * camel-service.c (camel_service_query_auth_types): Remove the
6825         @connected arg again: if you don't want to connect, you can just
6826         get the list of authtypes off the provider.
6827         (camel_service_free_auth_types): Remove this. All existing
6828         implementations do authtypes the same way, so just say the caller
6829         should "g_list_free" the list. (Oh, look, removing this function
6830         doesn't actually cause the mailer to not build. How 'bout that.)
6831         (construct, get_path): Use the new URL part macros.
6832
6833         * camel-remote-store.c (remote_query_auth_types): Update
6834         (remote_free_auth_types): Nuke
6835         (camel_remote_store_authtype_list): New function for use by
6836         subclasses.
6837
6838         * providers/imap/camel-imap-provider.c:
6839         * providers/pop3/camel-pop3-provider.c:
6840         * providers/smtp/camel-smtp-provider.c: Update CamelProvider
6841         structures.
6842         (camel_provider_module_init): Put all the SSL parts together so
6843         there's only 1 #ifdef. Set up the provider authtypes field using
6844         the SASL, CamelRemoteStore, and standard authtypes, as
6845         appropriate. Copy that from the normal provider to the SSL
6846         provider.
6847
6848         * providers/local/camel-local-provider.c:
6849         * providers/sendmail/camel-sendmail-provider.c:
6850         * camel-session.c: Update CamelProvider structures.
6851
6852         * providers/imap/camel-imap-store.c (query_auth_types):
6853         * providers/pop3/camel-pop3-store.c (query_auth_types): Update
6854
6855         * providers/smtp/camel-smtp-store.c (query_auth_types): Update.
6856         Remove the no_authtype, because that's what "ALLOW_AUTH" rather
6857         than "NEED_AUTH" means.
6858         (free_auth_types): Nuke.
6859
6860 2001-03-21  Jeffrey Stedfast  <fejj@ximian.com>
6861
6862         * camel-filter-driver.c (camel_filter_driver_filter_message):
6863         Return -1 on fail.
6864         (camel_filter_driver_filter_folder): Same.
6865         (camel_filter_driver_filter_mbox): Same.
6866         (camel_filter_driver_filter_folder): Return -1 if an exception was
6867         set as well.
6868
6869 2001-03-19  Jeffrey Stedfast  <fejj@ximian.com>
6870
6871         * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_finalize):
6872         Free the expected host.
6873         (camel_tcp_stream_openssl_new): Now takes a Service and an
6874         expected_host. Set them.
6875
6876 2001-03-20  Dan Winship  <danw@ximian.com>
6877
6878         * providers/imap/camel-imap-store.c
6879         (camel_imap_store_check_online): Function to check if the store is
6880         online and set an exception if not. Currently controlled by an
6881         environment variable, but eventually there will be both a global
6882         (session-level) setting and a per-store setting.
6883         (construct): Set up storage_path and base_url here rather than at
6884         connect-time.
6885         (imap_auth_loop): Split out from imap_connect.
6886         (imap_setup_online): Split out from imap_connect. Do the
6887         post-authentication connection setup, and cache the results to
6888         disk.
6889         (imap_setup_offline): Set up a CamelImapStore with information
6890         saved from a previous imap_setup_online.
6891         (imap_connect): If online, do connect_to_server(),
6892         imap_auth_loop(), and imap_setup_online(). Otherwise, do
6893         imap_setup_offline().
6894         (get_folder, get_folder_info): Add offline support.
6895         (create_folder, subscribe_folder, unsubscribe_folder): Disable
6896         these when offline (for now).
6897
6898         * providers/imap/camel-imap-folder.c (camel_imap_folder_new):
6899         Remove the sync'ing-with-server stuff... it's done by
6900         camel_imap_folder_selected now, which only gets called if the
6901         store is online.
6902         (camel_imap_folder_selected): add the code removed from
6903         camel_imap_folder_new. Besides simplifying the folder_new and
6904         summary_new code, this also means now that we'll DTRT if a
6905         folder's UIDVALIDITY changes while we're connected. Also, when
6906         that happens, clear the message cache explicitly.
6907         (imap_refresh_info, imap_sync): These are no-ops when offline.
6908         (imap_expunge, imap_append_message, imap_copy_message_to,
6909         imap_search_by_expression): These don't yet work offline.
6910         (imap_get_message, camel_imap_folder_fetch_data): Return an error
6911         when trying to fetch a non-cached body part when we're offline.
6912
6913         * providers/imap/camel-imap-summary.c (camel_imap_summary_new):
6914         Rewrite to not check the validity here. (We'll do it from
6915         camel_imap_folder_selected instead.)
6916
6917         * providers/imap/camel-imap-command.c (camel_imap_command): Call
6918         camel_imap_folder_selected even when the selection is all we're
6919         doing, to match the changes in camel-imap-folder.c.
6920
6921         * providers/imap/camel-imap-message-cache.c
6922         (camel_imap_message_cache_clear): New function to clear out a
6923         message cache.
6924
6925 2001-03-19  Christopher James Lahey  <clahey@ximian.com>
6926
6927         * Makefile.am (INCLUDES): Added $(EXTRA_GNOME_CFLAGS)
6928
6929 2001-03-19  Jeffrey Stedfast  <fejj@ximian.com>
6930
6931         * providers/pop3/camel-pop3-store.c (pop3_connect): Set the errbuf
6932         to NULL after freeing it? I don't think this should fix bug #1801
6933         but I guess it can't hurt.
6934
6935 2001-03-18  Jeffrey Stedfast  <fejj@ximian.com>
6936
6937         * camel-remote-store.c (remote_recv_line): Protect against a
6938         possibly NULL exception.
6939
6940         * camel-filter-driver.c (camel_filter_driver_filter_message):
6941         Document and modify to return a boolean value denoting whether or
6942         not errors occured during processing.
6943         (camel_filter_driver_filter_mbox): Same as above and also modified
6944         to check return codes of filter_message rather than relying only
6945         on whether or not the exception was set (as it's possible to pass
6946         in NULL for the exception).
6947         (camel_filter_driver_filter_folder): Same as above.
6948
6949         * camel-mime-utils.c (header_param_list_format_append): Quote the
6950         param value if it contains whitespace as well.
6951
6952 2001-03-17  Jeffrey Stedfast <fejj@ximian.com>
6953
6954         * Makefile.am: Don't include system include dir.
6955
6956         * camel.c: Use quotes around the nss.h include so it doesn't try
6957         to use the systen nss.h file.
6958
6959         * camel-tcp-stream-ssl.c: Same here.
6960
6961 2001-03-17  Not Zed  <NotZed@Ximian.com>
6962
6963         * providers/local/camel-maildir-summary.c (maildir_summary_sync): 
6964         Modified patch from Dan Berger <dberger@ix.netcom.com> to re-check
6965         the maildir directory for new/updated messages at sync time.
6966
6967         * camel-folder.c (camel_folder_ref_message_info): Implemented.
6968         (ref_message_info): And default implementation.
6969
6970         * camel-folder.h: Added ref_message_info virtual method.
6971
6972 2001-03-16  Not Zed  <NotZed@Ximian.com>
6973
6974         * camel-folder-thread.c
6975         (camel_folder_thread_messages_new_summary): New function to create
6976         a thread tree from a supplied summary array.
6977         (camel_folder_thread_messages_destroy): Handle thread trees
6978         generated by the above function properly.
6979
6980 2001-03-16  Jeffrey Stedfast  <fejj@ximian.com>
6981
6982         * camel-private.h: Same.
6983
6984         * camel-remote-store.h: Fixed #include to use <>'s instead of ""'s
6985
6986 2001-03-16  Jeffrey Stedfast  <fejj@ximian.com>
6987
6988         * camel-tcp-stream-ssl.c (ssl_bad_cert): Print info about the
6989         issuer of the certificate.
6990
6991         * providers/smtp/camel-smtp-transport.c (smtp_connect): Use
6992         camel_tcp_stream_get_socket().
6993
6994         * camel-tcp-stream-openssl.c (stream_get_socket): Implemented.
6995
6996         * camel-tcp-stream-ssl.c (stream_get_socket): Implemented.
6997
6998         * camel-tcp-stream-raw.c (stream_get_socket): Implemented.
6999
7000         * camel-tcp-stream.c (camel_tcp_stream_get_socket): New function.
7001
7002 2001-03-16  Kjartan Maraas  <kmaraas@gnome.org>
7003
7004         * providers/pop3/camel-pop3-folder.c: Added #include <config.h>
7005         
7006 2001-03-16  Dan Winship  <danw@ximian.com>
7007
7008         * camel-mime-utils.c (header_msgid_generate): Don't use
7009         getdomainname: it's NIS crap, not DNS.
7010
7011 2001-03-15  Jeffrey Stedfast  <fejj@ximian.com>
7012
7013         * camel.c (camel_init): Don't use the hardcoded cert db directory,
7014         use the one passed in.
7015
7016         * camel-tcp-stream-ssl.c (ssl_get_client_auth): Wrote the default
7017         implementation. Not that we'll use this though, since this is the
7018         default implementation provided by NSS anyway. This more or less
7019         serves as a reference in case we want to change anything.
7020         (ssl_auth_cert): Same.
7021         (ssl_bad_cert): Changed the prompt string and free it when we're
7022         done.
7023
7024 2001-03-15  Dan Winship  <danw@ximian.com>
7025
7026         First batch of disconnected IMAP-related stuff. This adds local
7027         caching of message parts, but NOT any actual disconnected support.
7028         (But it should speed up IMAP use.)
7029
7030         * providers/imap/camel-imap-message-cache.c: New class for caching
7031         message data to disk, and removing it when it's no longer
7032         relevant. Will eventually also support merging message parts
7033         together to save on files. Or maybe using a db instead of files?
7034
7035         * providers/imap/camel-imap-private.h: Add a cache_lock to
7036         CamelImapFolderPrivate. This lock must be recursive, so make both
7037         locks EMutexes rather than GMutex.
7038
7039         * providers/imap/camel-imap-folder.c (parse_fetch_response): "The
7040         only FETCH response parser you need!" Replaces the various
7041         almost-correct bits of code formerly scattered throughout this
7042         file with a single fully-correct function that can handle any
7043         FETCH response at any time, so we don't get confused by seeing a
7044         flags update when we were only expecting a message body, etc.
7045         (camel_imap_folder_fetch_data): FETCH a message body part either
7046         from the cache or the server
7047         (camel_imap_folder_changed): Remove expunged messages from the
7048         message cache.
7049         (camel_imap_folder_new): Change to take a directory instead of a
7050         summary file name. Create a CamelImapMessageCache for the folder.
7051         (imap_finalize): Unref the message cache.
7052         (camel_imap_folder_selected, imap_rescan, get_content,
7053         get_message, imap_get_message, imap_update_summary): Redone a
7054         bunch to use parse_fetch_data, CamelImapMessageCache, etc.
7055
7056         * providers/imap/camel-imap-store.c (get_folder): Pass directory
7057         name to camel_imap_folder_new, not summary filename. Use
7058         e_path_to_physical to generate a path with /subfolders/ inserted
7059         between directory components.
7060
7061         * providers/imap/camel-imap-wrapper.c (camel_imap_wrapper_new):
7062         Call camel_imap_folder_fetch_data (with cache_only TRUE) and if
7063         the data is cached, return an online datawrapper rather than an
7064         offline one.
7065         (write_to_stream): Use camel_imap_folder_fetch_data (with
7066         cache_only FALSE) here too
7067
7068         * providers/imap/camel-imap-utils.c (imap_skip_list): Renamed from
7069         skip_list and made non-static.
7070
7071 2001-03-15  Jeffrey Stedfast  <fejj@ximian.com>
7072
7073         * camel-tcp-stream-ssl.h: Uninclude prnetdb.h since it's not
7074         needed here.
7075
7076         * providers/smtp/camel-smtp-transport.c: #include prnetdb.h here
7077         instead of making camel-tcp-stream-ssl.h include it. Prevents some
7078         header bloat.
7079
7080         * providers/smtp/Makefile.am: Include the NSPR_CFLAGS and
7081         NSS_CFLAGS.
7082
7083 2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>
7084
7085         * providers/smtp/camel-smtp-transport.c (smtp_connect): Update for
7086         using CamelTcpStreams and also for using SSL.
7087
7088         * providers/smtp/libcamelsmtp.urls: defined "ssmtp"
7089
7090         * providers/smtp/camel-smtp-provider.c: Defined the Secure SMTP
7091         provider.
7092         (camel_provider_module_init): Register the Secure SMTP provider.
7093
7094 2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>
7095
7096         * providers/imap/camel-imap-store.c (imap_connect): Check for
7097         "simap" instead of "imaps".
7098
7099         * providers/pop3/camel-pop3-store.c (pop3_connect): Change the
7100         port to be 995 for spop.
7101
7102         * providers/pop3/libcamelpop3.urls: Change to "spop".
7103
7104         * providers/imap/libcamelimap.urls: Change "imaps" to "simap" to
7105         correspond to /etc/services.
7106
7107 2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>
7108
7109         * providers/pop3/camel-pop3-store.c (pop3_connect): Check to see
7110         if we are using "pops" and then set the appropriate SSL settings.
7111
7112         * providers/pop3/libcamelpop3.urls: Add "pops"
7113
7114         * providers/pop3/camel-pop3-provider.c: Defined the pops provider.
7115         (camel_provider_module_init): Register the pops provider.
7116
7117 2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>
7118
7119         * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_new): Ya know what?
7120         Lets not ref the service because otherwise we'll start having the
7121         same problems we had back with vtrash. Besides, since the store
7122         owns the stream, it's not like the store is going anywhere without
7123         the stream anyway.
7124         (camel_tcp_stream_ssl_finalize): No need to unref the service.
7125
7126 2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>
7127
7128         * camel-remote-store.c (remote_connect): Pass the service into the
7129         SSL stream, not the session.
7130
7131         * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_init): Set the
7132         service to NULL.
7133         (camel_tcp_stream_ssl_finalize): Unref the service.
7134         (camel_tcp_stream_ssl_new): Takes a CamelService arg now rather
7135         than a CamelSession arg.
7136
7137 2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>
7138
7139         * camel.c (camel_init): So it turns out that NSS_Init *isn't*
7140         idempotent, so we have to protect against initializing it more
7141         than once(contrary to what their design specs suggest).
7142
7143         * camel-session.c (camel_session_get_service): Use
7144         camel_exception_is_set() - Makes no difference but it's more
7145         consistant with how we normally do it.
7146
7147         * camel-provider.h (CAMEL_URL_ALLOW_SSL): We don't need this.
7148
7149         * providers/imap/camel-imap-provider.c: Define the imaps provider.
7150         (camel_provider_module_init): Register the imaps provider.
7151
7152         * camel-provider.c (camel_provider_init): Only add the protocol to
7153         the hash table if it's non empty. Also, g_strdup() the filename
7154         into the hash table.
7155
7156         * providers/imap/camel-imap-store.c (camel_imap_store_init): Eek!
7157         So the service's URL isn't set until after this is
7158         initialized. This means we can't check for SSL here.
7159         (imap_connect): Set the SSL options here instead.
7160
7161 2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>
7162
7163         * camel-tcp-stream-ssl.c: Numerous fixes to get it to build
7164         correctly with NSS enabled.
7165
7166         * camel-remote-store.c (remote_connect): Pass in the session and
7167         expected host args, oops.
7168
7169         * camel-provider.h (CAMEL_URL_ALLOW_SSL): Defined.
7170
7171         * providers/imap/camel-imap-store.c (camel_imap_store_init): Check
7172         to see if we are supposed to use SSL and set the options
7173         accordingly.
7174         (imap_connect): Return FALSE here instead of NULL.
7175
7176         * providers/imap/camel-imap-provider.c: Add CAMEL_URL_ALLOW_SSL.
7177
7178         * providers/imap/libcamelimap.urls: Add "imaps" which is the
7179         protocol for Secure IMAP.
7180
7181 2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>
7182
7183         * camel-tcp-stream-openssl.[c,h]: Added
7184
7185         * Makefile.am: Added camel-tcp-stream-openssl.[c,h] to the build.
7186
7187         * camel-types.h: Added CamelTcpStreamSSL and CamelTcpStreamOpenSSL
7188
7189 2001-03-14  Not Zed  <NotZed@Ximian.com>
7190
7191         * camel-mime-filter-charset.c (filter, complete): re-constify
7192         inbuf, to remove a warning.
7193
7194         * camel-mime-parser.c (folder_scan_step): When we're out of data,
7195         run the filter_complete.  For some reason the logic that was there
7196         was never being run, always try it now, i think it was to work
7197         around a buggy filter, rather than fix it the right way.
7198
7199         * camel-folder-summary.c (summary_build_content_info): If indexing
7200         html parts, use the html filter to convert it to some indexable
7201         format.
7202         (summary_build_content_info): Reset the filters before adding them
7203         back to the stream, if they get re-used in a given instance
7204         (likely).
7205
7206         * Makefile.am (libcamelinclude_HEADERS): Added
7207         camel-mime-filter-html.[ch].
7208         (INCLUDES): Added xml clags
7209
7210 2001-03-05  Not Zed  <NotZed@Ximian.com>
7211
7212         * camel-folder-search.c (camel_folder_search_class_init): Setup a
7213         new function, "uid" which matches uids.
7214         (search_uid): Implement the "match uid" command.
7215
7216 2001-03-13  Jeffrey Stedfast  <fejj@ximian.com>
7217
7218         * camel-mime-utils.c: Check for a new type of mailing list header.
7219
7220 2001-03-13  Jeffrey Stedfast  <fejj@ximian.com>
7221
7222         * camel-tcp-stream-raw.c (stream_read): Made cancellable.
7223         (stream_write): Same.
7224         (stream_connect): Removed checks for DIVINE_INTERVENTION as the
7225         code worked fine.
7226
7227         * camel-tcp-stream-ssl.c (stream_write): get rid of 'w' as it
7228         wasn't really needed.
7229         (set_errno): New function to set errno based on the NSPR error
7230         code.
7231         (stream_read): If an error occured, call set_errno().
7232         (stream_write): Same.
7233
7234 2001-03-13  Jeffrey Stedfast  <fejj@ximian.com>
7235
7236         * Makefile.am: Added camel-tcp-stream-ssl to the build.
7237
7238         * camel-remote-store.h: Add a use_ssl member to the
7239         CamelRemoteStore object.
7240
7241 2001-03-13  Jeffrey Stedfast  <fejj@ximian.com>
7242
7243         * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_get_type):
7244         Oops. Make this a subclass of CamelTcpStream, not CamelStream.
7245
7246         * camel-types.h: Add the defs for CamelTcpStream and
7247         CamelTcpStreamRaw
7248
7249         * Makefile.am: Add camel-tcp-stream and camel-tcp-stream-raw to
7250         the build.
7251
7252         * camel-remote-store.c (remote_connect): Update to use
7253         CamelTcpStreams.
7254
7255         * camel-tcp-stream-raw.c (stream_connect): Made cancellable by
7256         copying the currently used code in camel-remote-store.c.
7257         (stream_setsockopt): Oops, flags = fcntl (..., GET_FL);
7258         (camel_tcp_stream_raw_get_type): Oops. Make this a subclass of
7259         CamelTcpStream, not CamelStream.
7260
7261 2001-03-13  Jeffrey Stedfast  <fejj@ximian.com>
7262
7263         * camel.c (camel_init): Since all of the Mozilla libs (including
7264         NSPR and NSS) correctly handle reinitializations, we might as well
7265         init both NSPR and NSS in camel_init so we can be sure of that
7266         these libs have been initialized.
7267         (camel_shutdown): New function to call the NSS cleanup stuff.
7268
7269 2001-03-13  Jeffrey Stedfast  <fejj@ximian.com>
7270
7271         * camel-folder.c (camel_folder_copy_message_to): Don't allow the
7272         user to copy a message to or from the vtrash folder. Set an
7273         exception if they try.
7274         (camel_folder_move_message_to): This one is a bit more
7275         complicated: 1) If the user tried to move a message from the
7276         vtrash into the original folder, just undelete the message. 2) If
7277         the user tries to move the message to the vtrash folder, then just
7278         mark the message as deleted. 3) If the user tries to move the
7279         message from the vTrash to a folder other than the original, use
7280         the original folder as the source. As another optimization, I've
7281         made it so that if the user tries to move a message to the same
7282         folder, just no-op.
7283         (move_message_to): Unset the deleted flag before moving (assuming
7284         it's there).
7285         (copy_message_to): Same.
7286
7287         * camel-vee-folder.c (camel_vee_folder_get_message_folder): New
7288         convenience function to get the folder from which the message uid
7289         is derived from.
7290
7291 2001-03-13  Dan Winship  <danw@ximian.com>
7292
7293         * providers/imap/camel-imap-store.c (imap_connect): When trying
7294         again after a failed password attempt, check if the connection got
7295         dropped (which Courier will do) and deal accordingly.
7296
7297         * providers/sendmail/camel-sendmail-transport.c (sendmail_send_to,
7298         sendmail_send): More fixing for exim: It can't deal with "-tif",
7299         you need to say "-t -i -f".
7300
7301 2001-03-12  Jeffrey Stedfast  <fejj@ximian.com>
7302
7303         * camel-store.c (init_trash): Rename the folder to "Trash" and
7304         i18nify it.
7305
7306 2001-03-09  Jeffrey Stedfast  <fejj@ximian.com>
7307
7308         * camel-tcp-stream-ssl.h: Comment out everything unless HAVE_NSS
7309         is defined.
7310
7311         * camel-tcp-stream-ssl.c (stream_read): Don't use errno, use
7312         nspr's error code stuff.
7313         (stream_write): Same.
7314
7315 2001-03-09  Jeffrey Stedfast  <fejj@ximian.com>
7316
7317         * camel-session.c (camel_session_query_authenticator): Created a
7318         new mode (CAMEL_AUTHENTICATOR_ACCEPT) which is a Yes/No prompt to
7319         the user. This will be needed by the SSL/TLS code to come. Also
7320         changed the return value to a gpointer rather than a char* to
7321         allow the returning of TRUE/FALSE values.
7322
7323         * camel.c: Wrap stuff with HAVE_NSS
7324
7325 2001-03-09  Dan Winship  <danw@ximian.com>
7326
7327         * providers/sendmail/camel-sendmail-transport.c (sendmail_send,
7328         sendmail_send_to): Remove the "-U" for now, because it breaks
7329         exim's "sendmail" wrapper. (And it doesn't actually do all that
7330         much to sendmail's behavior, and it was working fine before
7331         anyway.)
7332
7333         * camel-mime-utils.c (header_fold): Fix a bug that could make this
7334         walk off the end of a string. (The bug has been there since
7335         December... maybe this will fix some unreproduceable crashes?)
7336
7337 2001-03-08  Jeffrey Stedfast  <fejj@ximian.com>
7338
7339         * camel-store.c (camel_store_get_folder): Changes so that the
7340         folder gets added to the vtrash reguardless of whether or not the
7341         store is holding it's own folder lookup hash.
7342         (init_trash): Oops, lets try locking the cache before we go and
7343         add all the cached folders to the vtrash.
7344
7345 2001-03-08  Jeffrey Stedfast  <fejj@ximian.com>
7346         These fixes make it so that the CamelStore does not actually hold
7347         a ref on it's vTrash folder. The vTrash folder is now created ONLY
7348         when it is requested. This solves the problem of not being able to
7349         unref a Store and have it disconnect/finalize like we expect it to.
7350
7351         * camel-store.c (init_trash): When we create the vtrash, add all
7352         previously opened folders to it and hook on to the finalize event
7353         so that we can then set the store->vtrash to NULL.
7354         (get_trash): If a vtrash folder for the store doesn't exist,
7355         init_trash() and then try.
7356         (construct): No longer need this.
7357         (camel_store_class_init): Don't override the construct method.
7358         (camel_store_finalize): We no longer hold a ref on the vtrash so
7359         don't unref it.
7360
7361 2001-03-07  Jeffrey Stedfast  <fejj@ximian.com>
7362
7363         * providers/pop3/camel-pop3-store.c (init_trash): Implement.
7364         (get_trash): Implement.
7365         (camel_pop3_store_class_init): Override the default init_trash and
7366         get_trash virtual functions. Hopefully this should fix the problem
7367         of pop3 sotre's not disconnecting after the send&recv code
7368         finishes downloading mail.
7369
7370         Wonder if I should override the default implementation for the
7371         mbox, mh, and maildir too?
7372
7373 2001-03-07  Dan Winship  <danw@ximian.com>
7374
7375         * camel-remote-store.c (camel_remote_store_connected): Return the
7376         return value of camel_service_connect rather than returning
7377         !camel_exception_is_set(), since that will be wrong if ex==NULL...
7378         Fixes a crash in the IMAP keepalive code, but this same problem
7379         probably exists in other places too...
7380         (remote_recv_line): Fix another problem...
7381
7382         * providers/local/camel-mbox-provider.c:
7383         * providers/vee/.cvsignore:
7384         * providers/vee/libcamelvee.urls: Remove some unused stuff
7385         
7386 2001-03-06  Jeffrey Stedfast  <fejj@ximian.com>
7387
7388         * camel-sasl-digest-md5.c (compute_response): Redone so as to save
7389         on memory allocations and speed.
7390
7391 2001-03-05  Jeffrey Stedfast  <fejj@ximian.com>
7392
7393         * camel-sasl-plain.c (plain_challenge): Don't return NULL if the
7394         token is non-NULL. This is why:
7395
7396         sending : AUTH PLAIN
7397         received: 334 ok. go on.                 <-- this is why
7398         sending : ZGZPaQpAZ214Lm5ldBBnb29jYXI=
7399         received: 235 {mp005-rz3} go ahead
7400
7401         * camel-sasl.c (camel_sasl_authtype): Add the PLAIN type here.
7402         (camel_sasl_authtype_list): And here too.
7403
7404         * camel-sasl-plain.c: Initialize the camel_sasl_plain_authtype.
7405
7406         * camel-sasl-plain.h: extern the camel_sasl_plain_authtype.
7407
7408 2001-03-05  Jeffrey Stedfast  <fejj@ximian.com>
7409
7410         * providers/imap/camel-imap-store.c (imap_connect): i18n'd some
7411         strings in here.
7412
7413         * providers/smtp/camel-smtp-transport.c (smtp_connect): Keep
7414         trying to authenticate until either we succeed or until the user
7415         cancels.
7416
7417 2001-03-04  Jeffrey Stedfast  <fejj@ximian.com>
7418
7419         * camel-mime-utils.c: Wrote a new version of header_fold() that
7420         takes a 'force' option and uses another new function called
7421         header_fold_next_space() in place of strchr(inptr, ' ') to get the
7422         next whitespace char. The idea of header_fold_next_space() is to
7423         not treat spaces between a set of quotes as a space - this way it
7424         will be possible to fold (for example) the Content-Type MIME
7425         header without worrying about breaking up a boundary string.
7426         Note: This code is #if 0'd out until Zucchi approves of the patch.
7427         Another Note: We will probably still want to use the "don't fold
7428         this header" hash lookup for headers like the Message-Id and
7429         possibly a few others.
7430
7431 2001-03-04  Jeffrey Stedfast  <fejj@ximian.com>
7432
7433         * camel-internet-address.c
7434         (camel_internet_address_encode_address): Make sure there is a
7435         space between the name and the address tokens.
7436
7437         * camel-mime-utils.c (rfc2047_decode_word): encoded string
7438         segments need to be at least 8 chars (7 doesn't leave room for an
7439         ecoding value. To be more realistic, even 8 chars isn't enough as
7440         this assumes there is no charset nor any encoded text. If the
7441         encoding value is not 'Q' or 'B', then return NULL. This fixes bug
7442         #1689.
7443
7444 2001-03-03  Not Zed  <NotZed@Ximian.com>
7445
7446         * camel-vee-folder.c (vee_folder_remove_folder): New function to
7447         remove a folder from a vfolder.
7448         (camel_vee_folder_remove_folder): New public function to remove a
7449         folder from a vfolder.
7450
7451 2001-03-02  Jeffrey Stedfast  <fejj@ximian.com>
7452
7453         * providers/smtp/camel-smtp-provider.c: Doh! Set the
7454         CAMEL_URL_ALLOW_AUTH flag.
7455
7456         * providers/smtp/camel-smtp-transport.c (get_smtp_error_string):
7457         Updated with the extended AUTH return codes.
7458
7459 2001-03-02  Jeffrey Stedfast  <fejj@ximian.com>
7460         
7461         * providers/imap/camel-imap-store.c (try_auth): Don't forget to
7462         unref the SASL object.
7463
7464         * providers/smtp/camel-smtp-transport.c (query_auth_types):
7465         Implemented.
7466         (smtp_auth): Implemented.
7467         (smtp_helo): Don't bother parsing the authtypes if we already have
7468         them.
7469         (smtp_connect): call smtp_auth() here if we found any authtypes.
7470         (smtp_disconnect): Updated as I now use a hash table for the
7471         supported authtypes rather than a linked list.
7472         (esmtp_get_authtypes): modify to use a hash table instead of a
7473         linked list and also use isspace() rather than == ' '.
7474
7475 2001-03-02  Dan Winship  <danw@ximian.com>
7476
7477         * providers/sendmail/camel-sendmail-transport.c (sendmail_send_to,
7478         sendmail_send): Use "-f" to set the envelope from address so
7479         bounces go to the right place. Also, pass "-U" since the man page
7480         says we're supposed to...
7481
7482 2001-03-01  Jeffrey Stedfast  <fejj@ximian.com>
7483         
7484         * camel-sasl.c: #include "camel-sasl-digest-md5.h"
7485         (camel_sasl_authtype_list): add DIGEST-MD5 stuff here.
7486         (camel_sasl_authtype): And here too.
7487         (camel_sasl_new): And here...
7488
7489         * camel-sasl-digest-md5.[c,h]: new SASL class for DIGEST-MD5 (has
7490         been tested and proven to work).
7491
7492 2001-03-01  Dan Winship  <danw@ximian.com>
7493
7494         * camel-sasl.c (camel_sasl_challenge): Take a GByteArray as input
7495         as well. Comment that you can pass %NULL for @token to get the
7496         initial auth data for mechanisms that are client-initiated.
7497         (camel_sasl_challenge_base64): Convenience function for protocols
7498         that use base64-encoded SASL.
7499         (camel_sasl_authenticated): Implement this... (it was prototyped
7500         already)
7501         (camel_sasl_new): Function to take a service name, a mechanism
7502         name, and a CamelService, and return a CamelSasl for it.
7503         (camel_sasl_authtype, camel_sasl_authtype_list): Functions to
7504         return CamelServiceAuthType information about SASL mechanisms, to
7505         allow providers to deal with them generically.
7506
7507         * camel-sasl-anonymous.c, camel-sasl-plain.c: Update/simplify for
7508         CamelSasl changes. Both of these are single-round
7509         (client-initiated) mechanisms, so they don't need to keep state.
7510         (camel_sasl_plain_new): Removed; use camel_sasl_new instead.
7511         (Can't get rid of camel_sasl_anonymous_new though...)
7512
7513         * camel-sasl-cram-md5.c: Update/simplify for CamelSasl changes.
7514         (camel_sasl_cram_md5_new): Removed; use camel_sasl_new instead.
7515         (cram_md5_challenge): Use md5_get_digest where possible, and
7516         various other minor simplifications. CRAM-MD5 only has a single
7517         round, so there's no need to keep track of state. This code is now
7518         tested (against Cyrus IMAPd) and known to work.
7519
7520         * camel-sasl-kerberos4.h: Update/simplify for CamelSasl changes.
7521         Make only a single #ifdef HAVE_KRB4. Remove stuff from priv that
7522         isn't needed between rounds.
7523         (camel_sasl_kerberos4_new): Removed; use camel_sasl_new instead
7524         (krb4_challenge): Fix up the logic I broke in my previous "at
7525         least make it compile" fixes, update to match other changes, and
7526         remove IMAP-isms that shouldn't be in the generic code. This still
7527         isn't tested, because we're stuck behind a NAT right now...
7528
7529         * providers/imap/camel-imap-store.c: Add an "authtypes" hash table
7530         to CamelImapStore recording the supported authtypes.
7531         (connect_to_server): Record supported authtypes in the authtypes
7532         hash rather than the capabilities bitmask, since now the IMAP code
7533         is no longer responsible for keeping track of which authtypes we
7534         support.
7535         (query_auth_types): Use camel_sasl_authtype_list to get the
7536         SASL-supported authtypes.
7537         (try_auth): New function to try a SASL auth mechanism. Sort of
7538         formerly imap_try_kerberos_v4_auth.
7539         (imap_connect): Get rid of the krb4-specific bits and genericize
7540         them for any SASL authtype.
7541
7542         * providers/imap/Makefile.am: Remove camel-imap-auth.[ch] (moved
7543         into camel-imap-store.c since it's now constant size) and the
7544         KRB4_CFLAGS and KRB4_LDFLAGS references.
7545
7546 2001-03-01  Jeffrey Stedfast  <fejj@ximian.com>
7547
7548         * camel-sasl-anonymous.c (anon_challenge): Don't base64 encode the
7549         data, leave that up to the provider to do if it needs to. Also
7550         save on some memory allocations and stuff.
7551
7552         * camel-sasl-cram-md5.c (cram_md5_challenge): Same here. Also get
7553         rid of the need for the temp buf as we can just write it to the
7554         GByteArray.
7555
7556 2001-03-02  Not Zed  <NotZed@Ximian.com>
7557
7558         * camel-mime-utils.c (rfc2047_encode_word, rfc2047_decode_word):
7559         Reconstify variables to match iconv.
7560
7561         * camel-search-private.c (camel_ustrstrcase): Change some
7562         assertions back into valid returns.
7563
7564 2001-03-01  Dan Winship  <danw@ximian.com>
7565
7566         * Makefile.am (libcamel_la_LIBADD, INCLUDES): camel depends on
7567         krb4 now (where available), for camel-sasl-kerberos4.c
7568
7569         * camel-sasl-kerberos4.[ch]: Make this at least compile. Dunno if
7570         it works yet.
7571
7572 2001-03-01  Peter Williams  <peterw@ximian.com>
7573
7574         * camel-url.c (camel_url_new): Assert url_string != NULL.
7575
7576 2001-02-28  Jeffrey Stedfast  <fejj@ximian.com>
7577
7578         * Makefile.am: Added camel-sasl-anonymous.[c,h] to the build.
7579
7580         * camel-sasl-anonymous.[c,h]: new SASL class for ANONYMOUS
7581
7582         * camel-sasl-plain.c (plain_challenge): Oops, have a state for
7583         setting sasl->authenticated = TRUE;
7584
7585         * camel-sasl-cram-md5.c (cram_md5_challenge): Same here.
7586
7587 2001-02-28  Jeffrey Stedfast  <fejj@ximian.com>
7588
7589         * camel-mime-utils.c (header_decode_date): A fix for broken
7590         mailers that send 2-digit years (ie "Wed, 28 Feb 01
7591         04:59:41"). Fixes bug #1633.
7592
7593         * camel-filter-driver.c (camel_filter_driver_filter_folder): Check
7594         to make sure message isn't NULL.
7595
7596 2001-02-28  Dan Winship  <danw@ximian.com>
7597
7598         * camel-remote-store.c (remote_recv_line): If we get back 0 bytes
7599         from camel_stream_buffer_gets, that means the socket got
7600         disconnected, so set an exception. (Noticed because of a message
7601         that crashes our IMAP server when you try to look at it. :)
7602
7603 2001-02-28  Jeffrey Stedfast  <fejj@ximian.com>
7604
7605         * Makefile.am: Added camel-sasl*.[c,h] to the build.
7606
7607         * camel-sasl.[c,h]: new "abstract" SASL class
7608
7609         * camel-sasl-kerberos4.[c,h]: new SASL class for KERBEROS_V4
7610
7611         * camel-sasl-cram-md5.[c,h]: new SASL class for CRAM-MD5
7612
7613         * camel-sasl-plain.[c,h]: new SASL class for PLAIN
7614
7615         * providers/imap/camel-imap-auth.c: Removed the base64 functions.
7616
7617         * camel-mime-utils.c (base64_encode_simple): Moved here from
7618         camel-imap-auth.c
7619         (base64_decode_simple): Same.
7620
7621 2001-02-26  Dan Winship  <danw@ximian.com>
7622
7623         * providers/imap/camel-imap-folder.c (imap_sync): Group messages
7624         into sets with the same flags and use the IMAP message set
7625         notation rather than doing a separate STORE FLAGS for each one.
7626         This cuts the network traffic down to just a handful of commands
7627         per sync rather than one per changed message. Removed the progress
7628         notification stuff since it's no longer meaningful and should
7629         hopefully be unnecessary.
7630         (imap_copy_message_to): move the former sync_message function
7631         into here, since it's no longer shared with imap_sync.
7632
7633 2001-02-26  Jeffrey Stedfast  <fejj@ximian.com>
7634
7635         * camel-mime-utils.c: Made thread-safe and moved to above the test
7636         code.
7637
7638         * camel-mime-message.c (camel_mime_message_init): Set the
7639         message_id to NULL.
7640         (camel_mime_message_finalize): Free the message_id.
7641         (camel_mime_message_set_message_id): New function to set the
7642         Message-Id.
7643         (camel_mime_message_get_message_id): New function to get the
7644         Message-Id.
7645         (process_header): Decode the message-id.
7646
7647 2001-02-24  Jeffrey Stedfast  <fejj@ximian.com>
7648
7649         * camel-store.c (construct): init the vTrash folder here instead
7650         of in store_init.
7651         (camel_store_class_init): init service_class->construct.
7652         (camel_store_finalize): We only need to unref the vtrash folder.
7653         (init_trash): don't create a vstore since we don't need it.
7654
7655 2001-02-23  Jeffrey Stedfast  <fejj@ximian.com>
7656
7657         * camel-store.c (camel_store_class_init): init get_trash and
7658         init_trash.
7659         (camel_store_init): call the virtual init_trash function.
7660         (camel_store_finalize): unref the vtrash folder/store if present.
7661         (camel_store_get_folder): Add the new folder to the vtrash
7662         vfolder.
7663         (init_trash): default implementation of init_trash.
7664         (get_trash): default implementation of get_trash.
7665
7666         * camel-vee-store.c (vee_init_trash): No-op.
7667         (vee_get_trash): return NULL
7668
7669 2001-02-23  Not Zed  <NotZed@Ximian.com>
7670
7671         * camel-folder-summary.c (camel_message_info_new_from_header):
7672         Doh, cut and paste problem, use mlist not cc.
7673
7674         * camel-folder.c (move_message_to): 
7675         (copy_message_to): If the source folder doesn't support a
7676         summary, dont try and get the message info from it.
7677
7678         * camel-filter-search.c (check_header): Implement a pseudo-header
7679         "x-camel-mlist" which just looks up in the message info for a
7680         match.
7681
7682         * camel-folder-search.c (check_header): Add pseudo-header
7683         "x-camel-mlist" which can be used to match on mailing list.
7684
7685         * providers/imap/camel-imap-folder.c (imap_sync): Add some
7686         internal progress reporting.
7687         (imap_rescan): Do some progress reporting.
7688
7689         * camel-mime-part.c (init_header_name_table): Add the message-id
7690         to the formatted table, so we dont try and wrap it, and break it.
7691
7692 2001-02-22  Jeffrey Stedfast  <fejj@ximian.com>
7693
7694         * camel-folder.h: Remove the 'FIXME: remove because this isn't
7695         required...' comment for copy_message_to since we now need and
7696         cherish its existance in the filter-driver code ;-)
7697
7698         * camel-filter-driver.c (camel_filter_driver_filter_message): Now
7699         takes a UID and CamelFolder arguments (which can be NULL) to allow
7700         for possible optimizations when copying messages between folders
7701         on the same store.
7702         (camel_filter_driver_filter_mbox): Updated (passes NULL for both
7703         since this case can't be optimized anyway).
7704         (camel_filter_driver_filter_folder): Updated to pass in the uid
7705         and folder of the message.
7706
7707 2001-02-22  Dan Winship  <danw@ximian.com>
7708
7709         * providers/imap/camel-imap-summary.h (CAMEL_IMAP_SERVER_FLAGS):
7710         #define this as the set of all IMAP system flags
7711
7712         * providers/imap/camel-imap-folder.c (sync_message): after syncing
7713         flags, set server_flags to (flags & CAMEL_IMAP_SERVER_FLAGS)
7714         rather than just "flags", since any other flags won't have been
7715         synced. Prevents the CAMEL_MESSAGE_ATTACHMENTS flag from getting
7716         lost.
7717
7718 2001-02-22  Not Zed  <NotZed@Ximian.com>
7719
7720         * providers/vee/*: Removed all files.
7721         
7722         * camel-private.h: Move camel-vee-private.h stuff into here.
7723
7724         * camel-session.c: Move the vee_provider here, and initialise it
7725         always as part of a session.  The vfolder provider is always
7726         available.
7727
7728         * providers/Makefile.am: Remove "vee" from the build list, now
7729         built as part of the main library.
7730
7731         * Makefile.am (libcamelinclude_HEADERS): 
7732         (libcamel_la_SOURCES): Added camel-vee-store.[ch],
7733         camel-vee-folder.[ch].
7734
7735         * providers/vee/camel-vee-folder.c (vee_folder_build): Removed,
7736         not used.
7737         (camel_vee_folder_new): Removed call to build_folder.
7738         (vee_get_message): Dont try and free the mi if we didn't get it.
7739
7740         * camel-folder.c (camel_folder_change_info_new): Added a hash
7741         table of what we have in the lists, plus moved private things into
7742         private pointer.
7743         (camel_folder_change_info_add_source): Fixed up private accesses.
7744         (camel_folder_change_info_add_uid): Changed to use a hashtable to
7745         see if we already have the uid, etc.
7746         (camel_folder_change_info_remove_uid): Similar.
7747         (change_info_remove): Likewise.
7748         (camel_folder_change_info_clear): Fixes for privatisations.
7749         (camel_folder_change_info_free): "
7750
7751 2001-02-21  Dan Winship  <danw@ximian.com>
7752
7753         * providers/imap/camel-imap-folder.c (fetch_medium): Fixes for
7754         IMAP4-pre-rev1 from Torsten Schulz.
7755
7756 2001-02-20  Not Zed  <NotZed@Ximian.com>
7757
7758         * camel-mime-utils.c (mail_list_magic): Take the ^Header: part out
7759         of the expression, since we look that up ourselves.
7760         (header_raw_check_mailing_list): When getting the match, get match
7761         1, not match 0, we dont want the full string match.
7762
7763         * camel-folder-summary.c (CAMEL_FOLDER_SUMMARY_VERSION): Bumped
7764         for summary change.
7765         (message_info_new): Extract the mlist info from the headers.
7766         (message_info_load): Load mlist from summary.
7767         (message_info_save): Save mlist to summary.
7768         (message_info_free): Save the mlist entry.
7769         (camel_message_info_new_from_header): Extract mailing list header.
7770         (camel_message_info_dup_to): Copy the mlist entry.
7771         (camel_message_info_free): Free mlist.
7772         (message_info_dump): Dump the mlist.
7773
7774         * camel-folder-summary.h: Add an mlist (mailing list) string to
7775         the summary.
7776
7777 2001-02-19  Not Zed  <NotZed@Ximian.com>
7778
7779         * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Added
7780         flags argument.
7781         (message_changed): Add support for the auto-update flag, in which
7782         case we auto-match the content as it changes.
7783         (camel_vee_folder_init): Remoive "DYNAMIC" optionality
7784         (camel_vee_folder_finalise): "
7785         (vee_expunge): As we expunge folders, re-sync their content by
7786         rerunning the query.
7787
7788         * providers/vee/camel-vee-store.c (vee_get_folder): Pass flags to
7789         folder new.
7790
7791 2001-02-18  Not Zed  <NotZed@Ximian.com>
7792
7793         * providers/vee/Makefile.am (noinst_HEADERS): Added
7794         camel-vee-private.h.
7795
7796         * providers/vee/camel-vee-private.h: New file to add locking stuff
7797         for vee folders.
7798
7799         * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Add
7800         locking around unmatched setup.
7801         (camel_vee_folder_init): Setup lock.
7802         (camel_vee_folder_finalise): Free locks.
7803         (folder_changed): Add locking.
7804         (unmatched_finalise): "
7805         (message_changed): "
7806         (vee_folder_build): "
7807
7808 2001-02-17  Not Zed  <NotZed@Ximian.com>
7809
7810         * providers/vee/camel-vee-folder.c (vee_folder_add): Check uid
7811         doesn't exist before adding it.
7812
7813 2001-02-16  Not Zed  <NotZed@Ximian.com>
7814
7815         * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Create
7816         a new virtual virtual folder UNMATCHED, to store all messages that
7817         dont match other vfolders.
7818         (unmatched_folder_changed): When a vfolder issues a changed event,
7819         use its info to update the unmatched folder info.
7820         (unmatched_finalise): When a vfolder is finalised, remove any uids
7821         it has as if we had a removed event for it.
7822
7823 2001-02-16  Jeffrey Stedfast  <fejj@ximian.com>
7824
7825         * camel-filter-driver.c (camel_filter_driver_finalise): Thaw the
7826         defaultfolder.
7827         (camel_filter_driver_set_default_folder): Thaw the defaultfolder
7828         we're about to replace, and freeze the new defaultfolder.
7829
7830 2001-02-15  Jeffrey Stedfast  <fejj@ximian.com>
7831
7832         * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Emit
7833         the folder_created signal here.
7834
7835         * providers/local/camel-local-folder.c
7836         (camel_local_folder_construct): Emit the folder_created signal.
7837
7838         * providers/local/camel-local-store.c (delete_folder): On error,
7839         free the 'name' string so we don't leak. Also emit the
7840         folder_deleted signal.
7841
7842         * providers/imap/camel-imap-store.c (subscribe_folder): Emit the
7843         folder_created signal.
7844         (unsubscribe_folder): Emit the folder_deleted signal.
7845
7846         * camel-store.c (camel_store_class_init): Added folder_created and
7847         folder_deleted signal defs.
7848
7849 2001-02-15  Dan Winship  <danw@ximian.com>
7850
7851         * camel-folder-thread.c (container_parent_child): Deal with
7852         out-of-order References headers so they don't cause messages to
7853         disappear in threaded view.
7854
7855         * providers/imap/camel-imap-folder.c (fetch_medium): IMAP4
7856         (pre-rev1) doesn't allow BODY.PEEK[], so use RFC822.PEEK instead
7857         in that case.
7858
7859 2001-02-14  Christopher James Lahey  <clahey@ximian.com>
7860
7861         * camel-mime-filter-charset.c (complete, filter),
7862         camel-mime-utils.c (rfc2047_decode_word, rfc2047_encode_word):
7863         Changed this code to match the glibc iconv signature.
7864
7865 2001-02-14  Dan Winship  <danw@ximian.com>
7866
7867         * camel-store.c (camel_store_create_folder): New method to create
7868         a folder when you don't know its full name.
7869
7870         * providers/imap/camel-imap-store.c (create_folder): Implement.
7871         (create_folder): Oops, and fix bug involving namespaces
7872         
7873 2001-02-12  Not Zed  <NotZed@Ximian.com>
7874
7875         * camel-mime-part.c (init_header_name_table): Add address headers
7876         to list that we dont fold when writing.  The are properly
7877         formatted as we build them.
7878         (write_to_stream): DOH, lookup the header name in the formatted
7879         hash table, not the value, that would never have worked.
7880
7881         * camel-internet-address.c
7882         (camel_internet_address_encode_address): Changed to take a
7883         parameter saying how much we've printed so far.  We now fold the
7884         header as we format it.  We dont fold addresses, even if they are
7885         too long, we simply put them on another line by themselves: this
7886         should make the result more parsable by mailers that can't handle
7887         split up addresses (which are legal).
7888         (internet_encode): Fix for changes to above.
7889
7890 2001-02-12  Jeffrey Stedfast  <fejj@ximian.com>
7891
7892         * providers/local/camel-local-provider.c: mbox, mh, and maildir
7893         camel-url's need absolute paths.
7894
7895         * camel-provider.h (CAMEL_URL_PATH_IS_ABSOLUTE): New flaggy flag.
7896
7897 2001-02-08  Dan Winship  <danw@ximian.com>
7898
7899         * camel-store.c: Rewrite a bunch. Replace the existing folder
7900         cache stuff with much simpler code that still handles all the
7901         existing cases. Now the folder hash table is always created by the
7902         base class, using hash and compare functions provided by the class
7903         implementation. (If they are set to NULL, CamelStore won't cache
7904         folders.) lookup_folder, cache_folder, and uncache_folder are no
7905         longer class methods, and get_name is gone completely.
7906
7907         (camel_store_get_inbox): Renamed from
7908         camel_store_get_default_folder, since that wasn't being used, and
7909         this is what we actually need.
7910         (camel_store_get_root_folder): Removed, since it's not needed for
7911         anything given get_folder_info.
7912
7913         * camel-remote-store.c:
7914         * providers/local/camel-local-store.c:
7915         * providers/local/camel-mbox-store.c:
7916         * providers/local/camel-mh-store.c:
7917         * providers/local/camel-maildir-store.c:
7918         * providers/nntp/camel-nntp-store.c:
7919         * providers/pop3/camel-pop3-store.c:
7920         * providers/vee/camel-vee-store.c: Minor updates for CamelStore
7921         changes
7922
7923         * providers/imap/camel-imap-store.c (camel_imap_store_class_init):
7924         Update for CamelStore changes.
7925         (hash_folder_name, compare_folder_name): treat INBOX
7926         case-insensitively, otherwise use g_str_hash and g_str_equal.
7927
7928         * camel-service.c (camel_service_construct): Remove
7929         camel_service_new and create camel_service_construct (as a class
7930         method) in its place.
7931
7932         * camel-session.c (camel_session_get_service): Use
7933         camel_object_new and camel_service_construct to replace
7934         camel_service_new.
7935
7936         * providers/local/camel-local-store.c (construct): Append a '/' to
7937         the URL path if it doesn't end with one
7938
7939 2001-01-31  Jeffrey Stedfast  <fejj@helixcode.com>
7940
7941         * camel-tcp-stream-ssl.c: Oops, include the camel-tcp-stream-ssl
7942         header instead of the raw one.
7943
7944 2001-02-07  Not Zed  <NotZed@Ximian.com>
7945
7946         * camel-operation.c (camel_operation_start): Changed to push the
7947         operation into a status stack.
7948         (camel_operation_progress): Changed to only accept % complete.
7949         (camel_operation_reset): Free status stack as well.
7950
7951         * providers/pop3/camel-pop3-folder.c (pop3_get_message): Get the
7952         octect count from the return line, and pass it to
7953         get_additional_data().
7954         (pop3_refresh_info): Added status stuff.
7955
7956         * providers/pop3/camel-pop3-store.c
7957         (camel_pop3_command_get_additional_data): Added a total bytes
7958         expected argument for progress reporting & fixed callers.
7959         (camel_pop3_command_get_additional_data): Added progress
7960         reporting.
7961
7962         * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
7963         (mbox_summary_sync_quick):
7964         (summary_rebuild): Added progress reporting stuff.
7965
7966 2001-02-07  Jeffrey Stedfast  <fejj@ximian.com>
7967
7968         * camel-search-private.c (CAMEL_SEARCH_COMPARE): Macro for making
7969         comparisons easy.
7970         (camel_ustrcasecmp): Use CAMEL_SEARCH_COMPARE and check for
7971         end-of-string before the utf-8 error check.
7972         (camel_ustrncasecmp): Same.
7973         (camel_search_header_match): Strip leading spaces before doing
7974         anything else. Also use vlen and mlen so as to not need to do 500
7975         strlen()'s.
7976         (camel_ustrcasecmp): Don't get_utf8() for the 2 strings in the
7977         comparison part of the loop because of short-circuit expression
7978         evaluation. (blame JPR if this is the wrong term!)
7979         (camel_ustrncasecmp): Same.
7980
7981 2001-02-06  Jeffrey Stedfast  <fejj@ximian.com>
7982
7983         * camel-search-private.c (utf8_get): Rewrote using unicode_get_utf8().
7984         (camel_ustrcasecmp): Use unicode_char_t
7985         (camel_ustrncasecmp): Same.
7986
7987 2001-02-06  Christopher James Lahey  <clahey@ximian.com>
7988
7989         * camel-mime-filter-charset.c (complete, filter),
7990         camel-mime-utils.c (rfc2047_decode_word, rfc2047_encode_word):
7991         Made these pass char ** as the second parameter to iconv.
7992
7993 2001-02-06  Not Zed  <NotZed@Ximian.com>
7994
7995         * camel-session.c: Removed all the camel_cancel stuff.
7996
7997         * camel-stream-fs.c (stream_read): Change to use camel_operation.       
7998         (stream_write): "
7999
8000         * camel-remote-store.c (socket_connect): Change to use
8001         camel_operation rather than camel_cancel stuff.
8002         Removed gal include, WTF is that doing there anyway?
8003
8004         * Makefile.am (libcamel_la_SOURCES): 
8005         (libcamelinclude_HEADERS): Added camel-operation.[ch], stuff to
8006         handle notification and cancellation.
8007
8008         * camel-search-private.c: Removed unwanted header.  It was never
8009         put in for a reason.  Stop fixing irrelevant warnings.
8010         
8011         (camel_ustrstrcase): Our own strstrcase impl for utf8 strings.
8012         (camel_ustrcasecmp): Ditto for strcasecmp.
8013         (camel_ustrncasecmp): And strncasecmp.
8014         (utf8_get): Simpler interface to utf8 string processing.
8015         (camel_search_header_match): Use the new things.
8016
8017 2001-02-05  Not Zed  <NotZed@Ximian.com>
8018
8019         * camel-folder.c (get_summary): Removed some old variables/a small
8020         memleak.
8021         (free_summary): Removed old variables.
8022
8023         * camel-mime-utils.c (header_raw_check_mailing_list): New utility
8024         function to get the mailing list (if any) that a set of headers
8025         came from.
8026
8027 2001-02-05  Christopher James Lahey  <clahey@helixcode.com>
8028
8029         * camel-stream-fs.c: Added a missing #include.
8030
8031         * camel-search-private.c: Added a missing #include.
8032
8033 2001-02-05  Jeffrey Stedfast  <fejj@ximian.com>
8034
8035         * camel-remote-store.c (remote_query_auth_types): Oops. Change
8036         this too.
8037
8038         * providers/smtp/camel-smtp-transport.c (query_auth_types): Updated.
8039
8040         * providers/nntp/camel-nntp-store.c (nntp_store_query_auth_types):
8041         Updated.
8042
8043         * providers/pop3/camel-pop3-store.c (query_auth_types): Updated.
8044
8045         * providers/imap/camel-imap-store.c (query_auth_types): Updated.
8046
8047         * camel-service.c (camel_service_query_auth_types): Now takes a
8048         boolean value to specify whether or not to connect when
8049         constructing a supported authtype list.
8050
8051 2001-02-05  Not Zed  <NotZed@Ximian.com>
8052
8053         * camel-stream-filter.c (do_write): Revert jeff's earlier change,
8054         the change below is the more-correct fix.  All his was doing was
8055         ignoring the return code & looping actually :)
8056
8057         * camel-stream-fs.c (stream_write): Since we are non-blocking on
8058         the outgoing fd, keep looping if writing out large blocks, so we
8059         can keep checking for cancel, etc.
8060
8061 2001-02-02  Not Zed  <NotZed@Ximian.com>
8062
8063         * camel-folder-thread.c (camel_folder_thread_messages_new): When
8064         we drop a fake node, dont skip checking the next in the list.
8065         (camel_folder_thread_messages_new): Add an assertion check just to
8066         make sure we dont get any pseudo nodes, and spit a warning if we
8067         do.
8068
8069 2001-02-04  Jeffrey Stedfast  <fejj@ximian.com>
8070
8071         * camel-stream-filter.c (do_write): Make do_write loop until the
8072         entire buffer is written.
8073
8074 2001-02-02  Not Zed  <NotZed@Ximian.com>
8075
8076         * camel-stream-fs.c: Add missing header for cancel check stuff.
8077
8078         * camel-session.c (camel_cancel_cancel): Fix a wrong cast.
8079
8080         * camel-mime-part.c (init_header_name_table): Setup a new table
8081         header_formatted_table, that lists headers that we dont want to
8082         fold (they've already been folded).
8083         (write_to_stream): Check for already formatted headers, and dont
8084         try and fold them.  This is a fix for bug #1097.
8085
8086 2001-02-01  Not Zed  <NotZed@Ximian.com>
8087
8088         * camel-mime-utils.c (header_fold): If we are folding, drop the
8089         space at the end of the line.
8090
8091 2001-01-30  Not Zed  <NotZed@Ximian.com>
8092
8093         * camel-remote-store.c (timeout_cb): Remvoe the stream locking
8094         here.  I think this was leading to a deadlock when a keepalive is
8095         being sent, in imap.
8096
8097 2001-01-29  Not Zed  <NotZed@Ximian.com>
8098
8099         * providers/imap/camel-imap-command.c
8100         (imap_command_strdup_vprintf): Include the terminating NUL in the
8101         calculated string length.  This hit memcheck.
8102
8103 2001-01-25  Not Zed  <NotZed@Ximian.com>
8104
8105         * tests/folder/test3.c: Changed the subject search to handle case
8106         sensitive when it is mixed case.
8107
8108         * Makefile.am (libcamel_la_SOURCES): Added camel-ssearch-private.c
8109         (noinst_HEADERS): Added camel-search-private.h
8110
8111         * camel-folder-search.c (check_header): New function to do the
8112         work of the various header checks.
8113         (search_header_matches): 
8114         (search_header_starts_with): 
8115         (search_header_ends_with): 
8116         (search_header_contains): Use check_header to do the work.
8117         (build_match_regex): Removed.
8118
8119         * camel-search-private.c (header_soundex):  New
8120         function to match words to phrases using soundex algorithm.
8121
8122         * camel-filter-search.c (soundexcmp): Removed.
8123         (check_match): Moved to search-private.h
8124
8125 2001-01-24  Not Zed  <NotZed@Ximian.com>
8126
8127         * camel-search-private.c (camel_search_build_match_regex): Added
8128         extra flags, so the same function can be used for
8129         start/end/whole/partial matches.
8130         (camel_search_header_match): Convenience function to check a
8131         single header against all sorts of different matches.
8132
8133         * providers/imap/camel-imap-search.c (imap_body_contains): Fix for
8134         e_sexp api changes.
8135
8136         * camel-folder-search.c: Fix for e_sexp api changes.
8137         (search_header_contains): Free args/quit on unknown header.
8138         (search_header_matches): "
8139         (search_header_starts_with): "
8140         (search_header_ends_with): "
8141         (match_message): Add an exception argument.
8142         (search_body_contains): Free args/quit on fatal error.
8143         (message_body_contains): Removed (moved to
8144         camel-search-private.c), fixed callers.
8145
8146         * camel-filter-search.c: Fix for e_sexp api changes.
8147         (build_match_regex, message_body_contains): Moved into
8148         camel-filter-private.c  Fixed callers.
8149         (check_header): moved guts to camel-search-private, and
8150         changed to use regex's for everything.  Just calls that with the
8151         right args.
8152         (check_header): GEts the header, decodes it, and checks for
8153         failure, and whatnot.
8154         (check_match): Removed.
8155         (header_soundex): Changed significantly.  Now it soundexes each
8156         word in the header separately, and compares it to the first
8157         argument.
8158
8159         * tests/folder/test9.c (main): Fix for api changes.
8160         (main): Added tests to see that invalid match and action
8161         rules are properly detected.
8162
8163         * camel-filter-driver.c (camel_filter_driver_filter_mbox): Remove
8164         the 'finished message' bit.
8165         (camel_filter_driver_filter_message): Remove an accidentally
8166         checked in debug.
8167         (camel_filter_driver_filter_message): Fix for e-sexp api changes.
8168
8169 2001-01-23  Dan Winship  <danw@ximian.com>
8170
8171         * providers/imap/camel-imap-wrapper.c: Add a lock around the
8172         delayed loading, so two threads won't try to do it at the same
8173         time.
8174
8175 2001-01-22  Dan Winship  <danw@ximian.com>
8176
8177         * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Set the
8178         CamelFolder::name to just the base part of the vfolder name (the
8179         non-query part)
8180
8181 2001-01-23  Not Zed  <NotZed@Ximian.com>
8182
8183         * camel-filter-search.c (camel_filter_search_match): Perform error
8184         checking on parsing/execution.
8185
8186         * camel-folder-search.c (camel_folder_search_execute_expression):
8187         Perform error handling on search expression.
8188         (CamelFolderSearchPrivate): Add a camelexception for error
8189         returns.
8190         (camel_folder_search_execute_expression): Setup exception pointer.
8191         (search_match_all): Quit on error.
8192
8193         * providers/imap/camel-imap-summary.c (message_info_load): Removed
8194         some debug 'warnings', as they should now be displayed at the
8195         toplevel loader, and just made the code match similar code
8196         elsewhere.
8197
8198         * providers/local/camel-mbox-summary.c (message_info_load): Error
8199         handling.
8200         (message_info_save): more error handling.
8201
8202         * camel-folder-summary.c (message_info_load): Add error handling
8203         and sanity checking.
8204         (camel_folder_summary_load): Add error checks.
8205         (perform_content_info_load): Error + sanity checks.
8206         (content_info_load): error + sanity checks.
8207
8208         * camel-filter-driver.c (close_folder): avoid /0 by updating after
8209         we've done the sync.
8210         (close_folders): Setup the first progress report to start it off.
8211         (camel_filter_driver_filter_message): Fix a fixme, check errors in
8212         e_sexp parsing, etc.
8213
8214 2001-01-22  Christopher James Lahey  <clahey@helixcode.com>
8215
8216         * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
8217         Initialize the value of the variable exists here.
8218
8219 2001-01-22  Not Zed  <NotZed@Ximian.com>
8220
8221         * .cvsignore */*/.cvsignore: Added profiling temp
8222         files.
8223
8224         * camel-folder-thread.c (camel_folder_thread_messages_new): When
8225         removing phantom nodes, check for the end node too.
8226
8227         * camel-filter-driver.[ch]: Changed status vars to be
8228         CAMEL_FILTER_STATUS_ etc.
8229
8230 2001-01-21  Jeffrey Stedfast  <fejj@ximian.com>
8231
8232         * camel-mime-utils.c (header_param_list_format_append): Make the
8233         output a little prettier. Okay, so I'm anal...
8234
8235 2001-01-21  Not Zed  <NotZed@Ximian.com>
8236
8237         * camel-filter-driver.h: Added an exception to
8238         CamelFilterGetFolderFunc.
8239
8240         * camel-filter-driver.c (camel_filter_driver_filter_message):
8241         Remove source parameter, as it is determined elsewhere now.
8242         (camel_filter_driver_filter_folder): Same here.
8243         (camel_filter_driver_filter_mbox): And here.
8244         (do_move): If we cannot open a folder, quit, rather than ignoring
8245         it.
8246         (do_copy): Here too.
8247         (open_folder): Pass an exception into get_folder callback.
8248         (camel_filter_driver_filter_folder): Report that we're syncing,
8249         when we are.
8250         (camel_filter_driver_filter_mbox): And here too.
8251         (close_folder): And here.
8252
8253 2001-01-19  Jeffrey Stedfast  <fejj@ximian.com>
8254
8255         * camel-filter-driver.c (camel_filter_driver_filter_message): Set
8256         the deleted bit *before* copying to the default folder, this way
8257         if they are importing mail and have a rule to delete it, it
8258         doesn't get copied to the default folder un-deleted.
8259
8260 2001-01-19  Dan Winship  <danw@ximian.com>
8261
8262         * providers/imap/camel-imap-store.c
8263         (get_subscribed_folders_by_hand): If LISTing a subscribed folder
8264         doesn't return a LIST response, just ignore that folder. Yay
8265         RFC2060.
8266         (subscribe_folder): add a missing UNLOCK
8267
8268 2001-01-19  Kjartan Maraas  <kmaraas@gnome.org>
8269
8270         * providers/smtp/camel-smtp-provider.c: Mark strings for translation.
8271         
8272 2001-01-19  Not Zed  <NotZed@Ximian.com>
8273
8274         * camel-filter-driver.c (report_status): Add a percentage complete
8275         indicator to the status thing.
8276         (camel_filter_driver_filter_mbox): Add percentage complete to
8277         reporting.      
8278         (camel_filter_driver_filter_folder): Same.
8279
8280 2001-01-18  Dan Winship  <danw@ximian.com>
8281
8282         * camel-store.c (camel_folder_info_build): More tweaking... skip
8283         separator characters after the namespace character. (Gets rid of
8284         the shell folder registration warning some people have had with
8285         IMAP)
8286
8287         * providers/imap/camel-imap-store.c (imap_connect): I'm sure there
8288         was some clever reason I was storing the flags of the folder in
8289         the hash table rather than just "1", but I don't remember what it
8290         was now. Anyway, since we only ever test NULL/non-NULL, store 1,
8291         since flags is sometimes 0.
8292
8293         * providers/imap/camel-imap-folder.c (imap_update_summary): Oops.
8294         Somewhere in one of the reorgs, the code to add new messages to
8295         the CamelFolderChangeInfo structure got removed. Fix that.
8296
8297 2001-01-17  Jeffrey Stedfast  <fejj@ximian.com>
8298
8299         * providers/imap/camel-imap-summary.c (message_info_load): Add
8300         some g_warnings() to help debug later if I ever get the segfaults
8301         I was getting earlier. Can't seem to reproduce them after my
8302         previous "fix".
8303
8304         * camel-folder-summary.c (camel_folder_summary_load): Undid my
8305         change here, NotZed said it was wrong and that if it gets a NULL
8306         mi then it should abort and not continue.
8307
8308 2001-01-17  Jeffrey Stedfast  <fejj@ximian.com>
8309
8310         * camel-folder-summary.c (camel_folder_summary_load): Make sure
8311         that the message-info is non-null before we go accessing inner
8312         parts of it and/or adding it to the summary array. I may not have
8313         handled the error correctly, but it does seem to work
8314         correctly. If NotZed could double-check this it'd be great.
8315
8316         * providers/smtp/camel-smtp-transport.c (get_smtp_error_string):
8317         New smtp error-code to string mapping function.
8318         (smtp_connect): Use the new error->string function for reporting
8319         useful errors.
8320         (smtp_helo): Same. Also use a case-insensitive strstr for 8BITMIEM
8321         as it seems Exchange sends back lowercase for that one single SMTP
8322         extension. Everything else is uppercase. I'm seeing a lack of love
8323         for that extension by Microsoft dudes...
8324         (smtp_mail): Use get_smtp_error_string.
8325         (smtp_rcpt): Same.
8326         (smtp_data): Same.
8327         (smtp_quit): Same.
8328         (smtp_rset): Same.
8329
8330 2001-01-16  Jeffrey Stedfast  <fejj@ximian.com>
8331
8332         * camel-folder-summary.c (camel_folder_summary_array): Add an int
8333         i so this code will compile. Should I be worried about how well
8334         this code will work? ;-)
8335
8336 2001-01-17  Not Zed  <NotZed@Ximian.com>
8337
8338         * camel-folder.c (free_summary): Call
8339         camel_folder_summary_array_free() to do the work.
8340         (get_summary): Use camel_folder_summary_array() to get the array
8341         atomically.  These fixes allow folder/test8 to work again, and fix
8342         a sort of race where the summary size can change while we were
8343         making a copy of it.
8344
8345         * camel-folder-summary.c (camel_folder_summary_array): Get the
8346         summary array atomically, so it can't contain empty records.
8347         (camel_folder_summary_array_free): And free it.
8348
8349         * tests/lib/camel-test.c (die): If we are verbose & in threads,
8350         then goto sleep so we can debug.
8351
8352         * tests/folder/test8.c (worker): Add a missing pull() for
8353         comnparing content.
8354
8355         * camel-filter-search.c: Fix the symbol table, so match-all is an
8356         immediate function, as it should be.
8357
8358         * tests/folder/test9.c (main): New test, tests some filtering
8359         things.
8360
8361         * tests/message/test3.c (main): Dont use a boundary string with
8362         spaces in it.  Folding can corrupt it.  Maybe the folding isn't
8363         working entirely right, but anyway.
8364
8365         * camel-session.c: Debug out the debug.
8366
8367         * camel-filter-driver.c (camel_filter_driver_filter_folder): Plug
8368         a messageinfo leak.
8369
8370 2001-01-16  Dan Winship  <danw@ximian.com>
8371
8372         Delayed loading of IMAP message parts.
8373
8374         * camel-types.h: typedef CamelMessageInfo and
8375         CamelMessageContentInfo here
8376
8377         * camel-folder-summary.h: Add a "size" field to
8378         CamelMessageContentInfo.
8379
8380         * camel-folder-summary.c (camel_folder_summary_content_info_new,
8381         camel_folder_summary_content_info_free): Renamed and made
8382         non-static for providers that construct their own content info.
8383         (content_info_load, content_info_save): load/save size
8384
8385         * camel-data-wrapper.c (camel_data_wrapper_is_offline): New
8386         function to return if a data wrapper's contents are "offline". (So
8387         that, for example, we don't make thumbnails of images that haven't
8388         been loaded off the IMAP server yet.) Defaults to FALSE.
8389
8390         * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
8391         Fix a bug in re-selecting a folder when messages have been
8392         expunged from it by another client in the meantime.
8393         (imap_get_message): Rewrite. If the message is larger than a
8394         certain size, just create a skeleton message containing
8395         CamelImapWrappers that will read parts as needed. This way, large
8396         attachments only need to be downloaded if the user looks at them,
8397         and multipart/alternative alternatives that aren't used will never
8398         be downloaded at all.
8399         (imap_update_summary): Rewrite this a bunch too to make the
8400         parsing more robust.
8401
8402         * providers/imap/camel-imap-summary.c
8403         (CAMEL_IMAP_SUMMARY_VERSION): bump.
8404         (camel_imap_summary_new): Set build_content to TRUE.
8405         (content_info_load, content_info_save): Only save/load the content
8406         for messages that have it. (The content info gets created as a
8407         side effect of imap_get_message.)
8408
8409         * providers/imap/camel-imap-utils.c (imap_parse_body): New routine
8410         (and helpers) to parse an IMAP 'body' FETCH response and fill in a
8411         CamelMessageContentInfo from it.
8412
8413         * providers/imap/Makefile.am (libcamelimap_la_SOURCES,
8414         libcamelimap_la_HEADERS): add camel-imap-wrapper.
8415
8416 2001-01-16  Dan Winship  <danw@ximian.com>
8417
8418         * camel-tcp-stream-raw.c (stream_getsockopt, stream_setsockopt):
8419         * camel-stream-fs.c (stream_read, stream_write): 
8420         * camel-remote-store.c (socket_connect): fcntl(fd, F_GETFL)
8421         returns the flags as the return value, not via a passed in
8422         pointer. And F_SETFL looks for an int, not a long, and you have to
8423         pass it what it's expecting because it's a va_arg parameter. (Yes,
8424         the man page lies on Linux. But check the UNIX98 spec or the glibc
8425         source.) Also, fix another bug in socket_connect: if we manage to
8426         connect right away, unset O_NONBLOCK so it doesn't mess us up
8427         later.
8428
8429         Fixes a bunch of problems with non-blocking I/O being done in the
8430         allegedly-blocking case and then returning EWOULDBLOCK.
8431
8432 2001-01-16  Chris Toshok  <toshok@ximian.com>
8433
8434         * providers/Makefile.am (NNTP_DIR): set to nntp if ENABLE_NNTP
8435         (SUBDIRS): use $(NNTP_DIR)
8436
8437 2001-01-16  Jeffrey Stedfast  <fejj@ximian.com>
8438
8439         * providers/smtp/camel-smtp-transport.c (smtp_rcpt): Don't check
8440         errno as it's not being set. Fixes bug #1150.
8441
8442 2001-01-16  Jeffrey Stedfast  <fejj@ximian.com>
8443
8444         Ugh, this design is ugly like my butt.
8445
8446         * camel-session.c (camel_session_query_cert_authenticator): New
8447         function which will be useful when we integrate SSL.
8448
8449         * camel-tcp-stream-ssl.c (ssl_auth_cert): Callback to authenticate
8450         a certificate.
8451         (ssl_bad_cert): Callback that gets the reason the certificate is
8452         bad and then calls camel's cert-authenticator callback to notify
8453         the user and to allow the user to override the check.
8454         (stream_connect): Set the URL we expect to connect with and setup
8455         the auth_cert and bad_cert callbacks.
8456         (camel_tcp_stream_ssl_new): Now takes a CamelSession and a
8457         expected_host argument that it will use for certificate
8458         authentication.
8459         (camel_tcp_stream_ssl_finalize): Unref the session and free the
8460         expected_host.
8461
8462 2001-01-16  Not Zed  <NotZed@Ximian.com>
8463
8464         * camel-filter-search.c (header_exists): Changed to support
8465         multiple args (or'd together).
8466         (header_contains): Cleaned up to match the search code.  Why did
8467         fejj change it? I'll never know.
8468         (header_matches): 
8469         (header_starts_with): 
8470         (header_ends_with): Big cleanup of fejj's "i'm the cut & paste
8471         king" code.  Also properly handle or'ing of additional args to
8472         match what the folder-search code should do.
8473         (check_match): New function which does the annoying matching
8474         stuff (for header matches).
8475         (check_header): Similarly, handles or'ing of the matches together.
8476         (header_contains):
8477         (header_matches): 
8478         (header_starts_with): 
8479         (header_ends_with): Call check_header to do the actual work.
8480         (header_soundex): And here too.
8481         (match_all): Yeah like match-all isn't passed expression results,
8482         its passed expression terms.  Fix this so match-all works like it
8483         should, by executing the contained expression.
8484         (message_body_contains): Copied directly from
8485         camel-folder-search.c, a more robust/faster/simpler body search
8486         code.
8487         (mime_part_matches): Removed entirely.
8488         (handle_multipart): Removed entirely.
8489         (build_match_regex): Copied from camel-folder-search.  Builds a
8490         set of simple strings into a regex pattern that matches any of
8491         them (for faster & simpler matching).  Expanded to accept regex
8492         patterns itself, so it can merge them together.
8493         (body_contains): Use build match/match message to match using a
8494         built regex.
8495         (body_regex): Likewise, this time we tell it we're building a
8496         regex though.
8497         (header_full_regex): Use build_match_regex to take the drudgery
8498         out of it, and expand it to handle multiple regex's at once.
8499         (get_full_header): slightly cleaner (well i dunno, the sprintf
8500         stuff just got to me).
8501         (header_regex): Cleaned up to use build_match_Regex too, and to
8502         properly check types.
8503         (filter_message_search): Just allocate 'fms' on the stack.
8504
8505         * camel-filter-driver.c (camel_filter_driver_finalise): 
8506         (camel_filter_driver_init): 
8507         (camel_filter_driver_class_init): 
8508         (camel_filter_driver_get_type): Changed from gtk object to camel
8509         object.
8510         (camel_filter_driver_add_rule): New function to add a rule to be
8511         processed in sexp form.
8512         (camel_filter_driver_init): Init the rules list.
8513         (camel_filter_driver_finalise): Clear the rules/rules list.
8514         (camel_filter_driver_filter_message): Scan rules list directly
8515         rather than creating on the fly.
8516
8517         * Makefile.am (libcamelinclude_HEADERS): Added camel-filter-driver.h
8518         (libcamel_la_SOURCES): Added camel-filter-driver.c, code taken
8519         from filter-driver, which can drive, uh, filters based on sexp's.
8520         (libcamelinclude_HEADERS): 
8521         (libcamel_la_SOURCES): Added camel-filter-search.[ch]
8522
8523         * camel-folder-summary.c (camel_folder_summary_decode_string):
8524         Chganged len back to be unsigned.  And do a simple range check on
8525         the string value to try and detect corrupted summary files.
8526
8527         * providers/imap/camel-imap-command.c (imap_read_untagged): Handle
8528         cancelled stream reads with an appropriate exception.
8529
8530         * providers/imap/camel-imap-private.h: Fix the include-once
8531         macro.  Doh, confliced with camel-private.h.
8532
8533         * providers/imap/camel-imap-store.c (imap_store_refresh_folders):
8534         A copy of camel_remote_store_refresh_folders.  We avoid locking
8535         each folder when we call it though.  This should be removed when i
8536         can work out how to remove the folder lock from this function
8537         easily.
8538
8539         * camel-stream-fs.c (stream_write): Fix n' argument of select.
8540         (stream_read): Likewise.
8541
8542         * camel-remote-store.c (socket_connect): Bump the connect timeout
8543         upto 4 minutes.
8544         (socket_connect): Oops, fix the 'n' argument of select.
8545
8546         * camel-session.c (camel_cancel_cancel): If we are given no
8547         cancellation node, then do it for all active ones.
8548
8549 2001-01-15  Jeffrey Stedfast  <fejj@ximian.com>
8550
8551         * camel-stream-fs.c (stream_close): If the close() is successful,
8552         set the fd to -1.
8553
8554         * camel-tcp-stream-raw.c: Removed the disconnect() method.
8555         (stream_close): If the close() is successful, set the sockfd to
8556         -1.
8557
8558         * camel-tcp-stream-ssl.c: Removed the disconnect() method.
8559         (stream_close): If the close() is successful, set the sockfd to
8560         NULL.
8561
8562         * camel-tcp-stream.c (camel_tcp_stream_disconnect): Removed,
8563         easier to just use the close() method as it did the same thing
8564         anyway.
8565
8566 2001-01-15  Jeffrey Stedfast  <fejj@ximian.com>
8567
8568         * camel-tcp-stream-raw.c (stream_getsockopt): Updated to be able
8569         to get the CAMEL_SOCKOPT_NONBLOCKING socket opt.
8570         (stream_setsockopt): Updated to be able to set the
8571         CAMEL_SOCKOPT_NONBLOCKING socket opt.
8572
8573 2001-01-15  Peter Williams  <peterw@ximian.com>
8574
8575         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Lock
8576         around the imap_rescan, which needs it.
8577
8578 2001-01-15  Not Zed  <NotZed@Ximian.com>
8579
8580         * camel-remote-store.c (socket_connect): A cancellable connection
8581         routine.
8582         (remote_send_string): Return cancelled exception if we were.
8583         (remote_send_stream): "
8584         (remote_recv_line): "
8585
8586         * camel-stream-fs.c (stream_read): First cut at cancellation
8587         stuff.  Its looking a bit ugly.
8588
8589 2001-01-15  Jeffrey Stedfast  <fejj@ximian.com>
8590
8591         * camel-tcp-stream-ssl.c (stream_connect): Uses an SSL socket now
8592         although there's still a few things missing (like certificate
8593         handling and such).
8594
8595         * camel.c (camel_ssl_init): A replacement function for
8596         camel_init() that also initializes SSL.
8597
8598 2001-01-14  Jeffrey Stedfast  <fejj@ximian.com>
8599
8600         * camel-tcp-stream-ssl.c (stream_getsockopt): Implemented.
8601         (stream_setsockopt): Implemented.
8602
8603         * camel-tcp-stream-raw.c (stream_getsockopt): Implemented.
8604         (stream_setsockopt): Implemented.
8605
8606         * camel-tcp-stream.c (camel_tcp_stream_getsockopt): New method.
8607         (camel_tcp_stream_setsockopt): Another new method. I think you get
8608         the idea of what these are for so I won't explain them.
8609
8610 2001-01-14  Jeffrey Stedfast  <fejj@helixcode.com>
8611
8612         * camel-tcp-stream-ssl.[c,h]: New CamelTcpStream class that
8613         implements nspr sockets and eventually will use nss for
8614         SSL/TLS. Currently doesn't do any SSL/TLS but it should still
8615         work. It's functionally equivalent to CamelTcpStreamRaw at the
8616         moment only it uses nspr i/o.
8617
8618         * camel-tcp-stream-raw.[c,h]: New CamelTcpStream class that
8619         implements native sockets. Should be usable but may have some bugs
8620         yet.
8621
8622 2001-01-13  Jeffrey Stedfast  <fejj@ximian.com>
8623
8624         * camel-tcp-stream.[c,h]: New abstract class for TCP streams. The
8625         next step is to write child classes (CamelTcpStreamBSD and
8626         CamelTcpStreamSSL). The BSD stream will use normal BSD sockets
8627         while SSL will use Mozilla's NSPR and NSS libraries to do Secure
8628         Socket Layers which wille ventually replace CamelStreamSSL which I
8629         just commit'd. Oh well.
8630
8631 2001-01-13  Jeffrey Stedfast  <fejj@ximian.com>
8632
8633         * camel-stream-ssl.[c,h]: New stream for handling SSL/TLS
8634         connections.
8635
8636 2001-01-12  Not Zed  <NotZed@Ximian.com>
8637
8638         * camel-folder-thread.c (camel_folder_thread_messages_new):
8639         Perform a final pass, removing any pseudo nodes we added earlier.
8640         Quick patch to test the idea.
8641         (camel_folder_thread_messages_new): Added casts to rmeove some
8642         warnings for the analites out there.
8643
8644 2001-01-11  Dan Winship  <danw@ximian.com>
8645
8646         * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
8647         Fix a bug in previous commit: don't check for deleted messages if
8648         there are no known messages in the folder (because it would end up
8649         sending "FETCH 0 ...").
8650         (imap_copy_message_to): Fix this up: sync flags to the server
8651         before copying so that they end up correct in the remote folder.
8652         And poke the destination folder after doing the copy so it notices
8653         the new message right away.
8654         (imap_move_message_to): Call imap_copy_message_to for most of the
8655         work rather than duplicating the code (since it's much more
8656         complicated now).
8657
8658 2001-01-11  Dan Winship  <danw@ximian.com>
8659
8660         * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
8661         New function to check for added/deleted messages when re-selecting
8662         a folder.
8663         (imap_refresh_info, imap_rescan, imap_update_summary): Various
8664         locking tweaks that turn out to be irrelevant since command_lock
8665         is recursive, but whatever.
8666
8667         * providers/imap/camel-imap-command.c (camel_imap_command): When
8668         selecting a new folder, call camel_imap_folder_selected on it.
8669
8670         * camel-folder.c (camel_folder_copy_message_to): Fix a locking
8671         problem. (One branch of an if statement was returning with the
8672         lock still locked.) Also remove the deprecation comments, to match
8673         move_message_to.
8674
8675 2001-01-10  Jeffrey Stedfast  <fejj@helixcode.com>
8676
8677         * providers/local/camel-local-provider.c: Changed the descriptions
8678         for mh, mbox, and maildir to be more "user-friendly".
8679
8680 2001-01-10  Dan Winship  <danw@helixcode.com>
8681
8682         * providers/imap/camel-imap-types.h: New header to prevent
8683         recursive #include problems
8684
8685         * providers/imap/*.h: Replace some #includes with #include
8686         "camel-imap-types.h", remove typedefs that were moved to
8687         camel-imap-types.h
8688
8689         * providers/imap/*.c: Add #includes to make up for #includes
8690         removed from .h files
8691
8692         * providers/imap/Makefile.am (libcamelimapinclude_HEADERS): Add
8693         camel-imap-types.h
8694
8695 2001-01-10  Dan Winship  <danw@helixcode.com>
8696
8697         * camel-store.c (camel_store_sync): New class function, parallel
8698         to camel_folder_sync. (The default implementation just calls
8699         camel_folder_sync on each cached folder.)
8700
8701         * providers/imap/camel-imap-store.c (get_folder_info): Call
8702         camel_store_sync before doing anything else so that the IMAP
8703         server and Camel are working from the same data. Don't ask the
8704         server for the unread message count of the current folder, since
8705         UW will return often-incorrect cached data, and we can calculate
8706         it without talking to the server anyway.
8707
8708 2001-01-09  Dan Winship  <danw@helixcode.com>
8709
8710         Mostly IMAP changes. Use the NAMESPACE extension (where
8711         available). Deal with servers that don't return LIST flags in
8712         response to LSUB (like UW) to get rid of the "not a selectable
8713         folder" error messages in the UI. Take advantage of the \Marked
8714         and \Unmarked flags to try to speed up the folder scan by not
8715         doing STATUS on unmarked folders. Some further tweaks on the shape
8716         of the resulting folder tree in various situations...
8717
8718         * camel-store.h: Remove the (read) message_count, since nothing
8719         uses it, and we can speed up IMAP a bit this way.
8720
8721         * camel-store.c (camel_folder_info_build): Redo this a bit to make
8722         it more useful for IMAP since that's the only thing that uses it.
8723
8724         * camel-remote-store.c (camel_remote_store_connected): Public
8725         function to check if the store is connected, and try to connect it
8726         if it's not.
8727         (remote_send_string, remote_send_stream, remote_recv_line): Use
8728         that.
8729
8730         * providers/imap/camel-imap-store.c (camel_imap_store_finalize):
8731         fix up for changes.
8732         (camel_imap_store_init): Initialize subscribed_folders to NULL
8733         rather than an empty hash table.
8734         (imap_connect): Get the list of subscribed folders here. If the
8735         server doesn't claim that any of them are either Marked or
8736         Unmarked, then assume that it doesn't do that for LSUB and
8737         remember that for later. If the server supports the NAMESPACE
8738         extension and the user didn't specify a namespace, use the
8739         server-provided one.
8740         (imap_disconnect): Free the list of subscribed folders, and the
8741         namespace.
8742         (get_folder): check camel_remote_store_connected
8743         (get_folder_info): check camel_remote_store_connected. Add a bunch
8744         of new cleverness. If we learned that the server doesn't do LSUB
8745         usefully, do a bunch of LISTs by hand. Then, if we're getting
8746         unread counts, only do it for folders that weren't listed as
8747         Unmarked. Also, deal with namespaces that end with the separator
8748         character, and update for changes to camel_folder_info_build.
8749         (folder_subscribed): Add a g_return_val_if_fail.
8750         (subscribe_folder, unsubscribe_folder): check
8751         camel_remote_store_connected.
8752
8753         * providers/nntp/camel-nntp-store.c (build_folder_info,
8754         build_folder_info_from_grouplist, nntp_store_get_folder_info):
8755         Don't fill in message_count since it doesn't exist any more.
8756
8757 2001-01-09  Dan Winship  <danw@helixcode.com>
8758
8759         Kill off a long-hated Camel kludge: "empty" URLs and
8760         query_auth_types_generic.
8761
8762         * camel-url.c: Remove "empty" from CamelURL.
8763         (camel_url_new): No longer set it.
8764         (camel_url_to_string): Treat "" as equivalent to NULL for
8765         authmech. (Unrelated change, but it simplifies some stuff with the
8766         new config dialog.)
8767
8768         * camel-service.c (camel_service_new): Remove url->empty check: if
8769         the URL isn't valid, we don't create the service.
8770         (camel_service_query_auth_types): No longer need to switch between
8771         generic and connected variants.
8772
8773         * providers/smtp/camel-smtp-transport.c (query_auth_types): 
8774         * providers/pop3/camel-pop3-store.c (query_auth_types): 
8775         * providers/nntp/camel-nntp-store.c (nntp_store_query_auth_types): 
8776         * providers/imap/camel-imap-store.c (query_auth_types): 
8777         * camel-remote-store.c (remote_query_auth_types): Remove generic
8778         version, rename connected version.
8779
8780 2001-01-06  Not Zed  <NotZed@HelixCode.com>
8781
8782         * providers/vee/camel-vee-folder.c (vee_folder_build_folder): Dont
8783         try and unref a messageinfo that wasn't there, and use the right
8784         free function too.  Modified patch from Iain.
8785         (vee_move_message_to): New method, call the real folders'
8786         move_message_to method.
8787
8788 2001-01-04  JP Rosevear  <jpr@helixcode.com>
8789
8790         * tests/lib/Makefile.am: fix includes for compilation
8791
8792         * tests/message/Makefile.am: Build test3 again
8793
8794         * tests/message/test2.c: Kill warnings with header includes
8795
8796         * tests/message/test3.c: ditto
8797
8798         * tests/lib/streams.c: ditto
8799
8800         * tests/lib/camel-test.c: ditto
8801
8802         * tests/lib/messages.c: ditto
8803
8804         * tests/lib/folders.c: ditto
8805
8806 2001-01-04  Dan Winship  <danw@helixcode.com>
8807
8808         * providers/imap/camel-imap-folder.c (imap_rescan): Fix two
8809         problems in figuring out server-expunged messages.
8810
8811 2001-01-04  Not Zed  <NotZed@HelixCode.com>
8812
8813         * camel-folder.c (thaw): If we have a lot of messages changed,
8814         promote it to a folder changed event.
8815
8816 2000-01-03  Jeffrey Stedfast  <fejj@helixcode.com>
8817
8818         * camel-folder-search.c (search_header_matches): Implemented.
8819         (search_header_exists): Implemented.
8820         (search_header_starts_with): Implemented.
8821         (search_header_ends_with): Implemented.
8822
8823 2001-01-03  Christopher James Lahey  <clahey@helixcode.com>
8824
8825         * providers/imap/camel-imap-folder.c (camel_imap_folder_new):
8826         Initialize the exists variable so that we don't do random things
8827         if the imap server misbehaves.
8828
8829 2000-12-29  Not Zed  <NotZed@HelixCode.com>
8830
8831         * camel-folder.c (camel_folder_move_message_to): REmove warning,
8832         this isn't really deprecated, sigh.
8833
8834         * camel-mime-utils.c (header_fold): Comment out some debug.
8835
8836 2001-01-02  Christopher James Lahey  <clahey@helixcode.com>
8837
8838         * providers/maildir/, providers/mbox/, providers/mh/: Removed
8839         these directories since they're unused.
8840
8841 2001-01-02  Dan Winship  <danw@helixcode.com>
8842
8843         IMAP randomness.
8844
8845         * providers/imap/camel-imap-stream.[ch]: Remove. To be replaced.
8846
8847         * providers/imap/Makefile.am (libcamelimapinclude_HEADERS): Remove
8848         camel-imap-stream.h
8849
8850         * providers/imap/camel-imap-utils.c (imap_parse_flag_list): Take a
8851         char ** instead of char *, to return the position at the end of
8852         parsing like the string parsing functions.
8853         (imap_parse_string_generic): New function to parse a string,
8854         nstring, or astring.
8855         (imap_parse_nstring, imap_parse_astring): Now macros
8856         (imap_parse_string): Added
8857
8858         * providers/imap/camel-imap-folder.h: Remove the "exists" field
8859         from CamelImapFolder.
8860
8861         * providers/imap/camel-imap-folder.c: Remove unused include of
8862         camel-imap-stream.h.
8863         (camel_imap_folder_init): Remove no-longer-relevant summary
8864         initialization.
8865         (camel_imap_folder_new): Update for imap_parse_flag_list change,
8866         exists removal, and imap_rescan.
8867         (imap_rescan): New function that does most of the work of the old
8868         imap_refresh_info, but taking "exists" as an argument instead of
8869         getting it from the folder. Also calls camel_imap_folder_changed
8870         to do the summary updating and signalling, rather than duplicating
8871         that code.
8872         (imap_refresh_info): Just call imap_rescan (using the size of the
8873         folder summary as "exists").
8874         (imap_update_summary): Update for imap_parse_flag_list change
8875         (camel_imap_folder_changed): Update for "exists" change.
8876
8877 2001-01-02  Dan Winship  <danw@helixcode.com>
8878
8879         * camel-mime-utils.c (header_content_type_simple): New function to
8880         return just foo/bar with no parameters.
8881
8882         * camel-data-wrapper.c (get_mime_type): Use
8883         header_content_type_simple rather than header_content_type_format.
8884
8885 2000-12-28  Dan Winship  <danw@helixcode.com>
8886
8887         * gmime-content-field.[ch]: Remove this. It was only a thin
8888         wrapper around struct _header_content_type anyway, and didn't
8889         match the naming scheme of anything else.
8890
8891         * Makefile.am: Remove gmime-content-field.[ch]
8892
8893         * camel.h: Remove gmime-content-field.h
8894
8895         * camel-types.h: Add CamelContentType as a typedef for struct
8896         _header_content_type (especially for use outside of camel).
8897
8898         * camel-multipart.c: 
8899         * camel-mime-part.c: 
8900         * camel-mime-message.c: 
8901         * camel-folder-summary.c:
8902         * camel-folder-search.c: 
8903         * camel-data-wrapper.[ch]: Use CamelContentType and
8904         header_content_type_* functions rather than the GMime stuff. 
8905
8906         * camel-mime-part-utils.c: 
8907         * camel-medium.c: Remove unused gmime-content-field.h include.
8908
8909 2000-12-27  Dan Winship  <danw@helixcode.com>
8910
8911         * providers/pop3/camel-pop3-store.c (connect_to_server): Fix the
8912         APOP check to not crash on servers that don't return any
8913         information on the +OK greeting line.
8914
8915 2000-12-24  Not Zed  <NotZed@HelixCode.com>
8916
8917         * providers/imap/camel-imap-search.c (imap_body_contains): Lock
8918         the command channel while searching.
8919         (imap_body_contains): If performing a whole uid search, then add
8920         references to our own summary items, dont look it up in the
8921         folder.  This way they can't vanish unexpectedly.
8922
8923         * providers/imap/camel-imap-folder.h (CamelImapFolder): Added a
8924         private field.
8925         (CamelImapFolder): Removed summary again from here.
8926
8927         * providers/imap/camel-imap-private.h: Added lock for imap
8928         searches.
8929
8930         * Merge from camel-mt-branch.
8931         
8932         * providers/imap/camel-imap-folder.c (imap_update_summary): Merge
8933         fix, use the folder->summary.
8934         (imap_get_message_flags, imap_set_message_flags,
8935         imap_get_message_user_flag, imap_set_message_user_flag): Removed
8936         again.
8937         (camel_imap_folder_init): Setup private data/lock.
8938         (imap_finalize): Free private data/search lock.
8939         (imap_search_free): Lock the search_lock.
8940         (imap_search_by_expression): Lock the search lock when using the
8941         search object.  Also copy/ref hte summary, rather than getting it
8942         directly.
8943         (imap_refresh_info): Free any info lookups.  Use folder->summary
8944         not imap_folder->summary.  And lock around commands.
8945         (camel_imap_folder_changed): Use folder->summary again.
8946         (camel_imap_folder_changed): Make sure we unref the summary lookup.
8947
8948 2000-12-22  Dan Winship  <danw@helixcode.com>
8949
8950         * providers/imap/camel-imap-store.c (get_folder_info): When
8951         getting the top-level folder list, include INBOX even if it's not
8952         subscribed. Don't show subscribed folders outside of the given
8953         namespace. Do a better job of pruning the namespace from the
8954         returned folder tree.
8955
8956 2000-12-21  Dan Winship  <danw@helixcode.com>
8957
8958         * providers/imap/camel-imap-search.c: New CamelFolderSearch
8959         subclass that just reimplements body_contains (using the IMAP
8960         SEARCH command). All other kinds of searching are done against the
8961         local summary.
8962
8963         * providers/imap/camel-imap-folder.c (imap_search_by_expression):
8964         Use a CamelImapSearch to do searching.
8965
8966         * providers/imap/camel-imap-utils.c (imap_translate_sexp, etc): No
8967         longer needed.
8968
8969         * camel-folder-search.h: Add missing CAMEL_FOLDER_SEARCH_TYPE
8970         #define
8971
8972 2000-12-21  Dan Winship  <danw@helixcode.com>
8973
8974         * camel-stream-buffer.c (camel_stream_buffer_gets): Update the
8975         doc comment: since it always NUL-terminates the buffer, it reads
8976         at most @max-1 bytes, not @max.
8977
8978         * camel-remote-store.c (remote_recv_line): Fix the "did
8979         camel_stream_buffer_gets fill the whole buffer" check. Fixes a bug
8980         when reading lines longer than 1024 characters (eg, IMAP SEARCH
8981         responses in very large folders).
8982
8983 2000-12-19  Dan Winship  <danw@helixcode.com>
8984
8985         * providers/imap/camel-imap-folder.c (imap_refresh_info): Oops.
8986         Don't do "FETCH 1:0" when the folder is empty.
8987         (imap_protocol_get_summary_specifier): Request RFC822.SIZE too.
8988         (imap_update_summary): Parse RFC822.SIZE and add it to the
8989         summary.
8990
8991 2000-12-18  Dan Winship  <danw@helixcode.com>
8992
8993         * providers/imap/camel-imap-summary.c: Add "guint32 server_flags"
8994         to CamelImapMessageInfo to keep track of the last known message
8995         flag state on the server.
8996         (message_info_save, message_info_load): Save/load the
8997         server_flags.
8998
8999         * providers/imap/camel-imap-folder.c: Make this use
9000         CamelFolderChangeInfo and emit folder_changed notifications as it
9001         gets them rather than only on refresh_info.
9002         (imap_refresh_info): Notice flags that get cleared on the server
9003         as well as flags that get set.
9004         (imap_update_summary): Remove a comment that never actually
9005         applied to the committed code.
9006
9007 2000-12-15  Dan Winship  <danw@helixcode.com>
9008
9009         * providers/imap/camel-imap-command.c (camel_imap_command): Change
9010         the semantics of fmt: Now %S (capital S) means an IMAP "string",
9011         (which can be sent as either a quoted string or a literal). If
9012         the server supports LITERAL+, these will be sent as extended
9013         literals (which don't require any special escaping). Otherwise
9014         they'll be sent as quoted strings (and it now properly deals with
9015         " or \ in the string).
9016         (imap_command_strdup_vprintf): Utility routine that does the real
9017         work for the functionality mentioned above.
9018
9019         * providers/imap/camel-imap-utils.c (imap_quote_string): Turns a
9020         string into a proper IMAP "quoted string".
9021
9022         * providers/imap/camel-imap-store.c: 
9023         * providers/imap/camel-imap-folder.c: Use %S instead of "%s" where
9024         appropriate.
9025
9026 2000-12-22  Not Zed  <NotZed@HelixCode.com>
9027
9028         * camel-folder-summary.c (GLOBAL_INFO_UNLOCK): Doh, cut and paste
9029         victim again, call unlock instead of lock!
9030         (summary_assign_uid): Unlock around trying to get a new uid, if we
9031         have a clash.
9032
9033 2000-12-21  Not Zed  <NotZed@HelixCode.com>
9034
9035         * tests/folder/Makefile.am (TESTS): reenabled the tests here.
9036
9037         * providers/nntp/camel-nntp-newsrc.c (CamelNNTPNewsrc): Add a
9038         lock.  Made completely mt-safe.  Sigh, this is all so i can
9039         support snooping of the set_flags stuff inside camel-nntp-folder,
9040         since i've removed the global folder lock from all of the other
9041         folder summary operations.
9042         (camel_nntp_newsrc_read_for_server): Setup lock.
9043         (camel_nntp_newsrc_get_highest_article_read): Lock internal access.
9044         (camel_nntp_newsrc_get_num_articles_read): 
9045         (camel_nntp_newsrc_mark_article_read): 
9046         (camel_nntp_newsrc_mark_range_read): 
9047         (camel_nntp_newsrc_article_is_read): 
9048         (camel_nntp_newsrc_group_is_subscribed): 
9049         (camel_nntp_newsrc_unsubscribe_group): 
9050         (camel_nntp_newsrc_subscribe_group): 
9051         (camel_nntp_newsrc_get_subscribed_group_names): 
9052         (camel_nntp_newsrc_get_all_group_names): "
9053         (camel_nntp_newsrc_write_to_file): Lock internal accesses.
9054         (camel_nntp_newsrc_write): Lock around diry stuff.
9055
9056         * providers/local/camel-maildir-summary.c (maildir_summary_check):
9057         Lock around our internal poking of the summary hashtable/array.
9058         (maildir_summary_sync): And the same here too.
9059
9060         * camel-folder-summary.c: Moved the summaryprivate data into
9061         camel-private.h.  Only needed for the locks really.
9062         (camel_folder_summary_init): Setup locks.
9063         (camel_folder_summary_set_filename): Lock.
9064         (camel_folder_summary_index): lock
9065         (camel_folder_summary_uid): Lock
9066         (camel_folder_summary_next_uid): "
9067         (camel_folder_summary_set_uid): "
9068         (camel_folder_summary_load): Lock around whole load.  Hrm,
9069         probably not required.
9070         (camel_folder_summary_save): Lock around whole save, this is
9071         reqwuired, unless we ref/copy the whole list first, and i couldn't
9072         be bothreed.
9073         (camel_folder_summary_add): lock
9074         (summary_assign_uid): Lock around internal accesses.
9075         (camel_folder_summary_info_new_from_parser): Lock around filtr stuff.
9076         (camel_folder_summary_info_ref): Add locking.  Could probably use
9077         its own lock?
9078         (camel_folder_summary_touch): Add locking, likewise.
9079         (camel_folder_summary_clear): Lock.  If the preiovus two are
9080         changed, then so this will need mroe locking.
9081         (camel_folder_summary_info_free): Lock around refcounting.
9082         (camel_folder_summary_remove): Locking.
9083         (camel_folder_summary_remove_uid): Lock ref, unlock, unref.  Also
9084         fixed a bug that would have made this never work, freeing the key,
9085         which isn't allocated.
9086         (camel_folder_summary_remove_index): lock, ref, unlock unref also.
9087         (camel_message_info_ref): Lock using a separate global lock, since
9088         we have no context here.
9089         (camel_message_info_free): Here too.
9090         (content_info_alloc): Use an alocation lock here.  avoids races
9091         with setting up content_info_chunks, etc.
9092         (camel_folder_summary_info_new): And here too.
9093         (camel_folder_summary_load): Changed to use a differnet lock for
9094         loading/saving.
9095         (camel_folder_summary_init): Doh, i do need a reflock afterall,
9096         set one up.
9097         (camel_folder_summary_finalize): Free it.
9098         (camel_folder_summary_index): Add a reflock.
9099         (camel_folder_summary_uid): And here too.
9100         (camel_folder_summary_info_free): Use reflock instead of
9101         summary_lock.
9102         (camel_folder_summary_info_ref): Likewise.
9103         (camel_folder_summary_remove_uid): Add reflocking.
9104         (camel_folder_summary_remove_index): And here too.
9105
9106         * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Setup a
9107         summary object.
9108         (vee_folder_build): Build each item into the real summary object.
9109         (vee_folder_add, vee_folder_add_uid, vee_folder_add_change): New
9110         functions to add a single record to the vfolder summary.
9111         (vee_folder_build_folder): Use a real summary.
9112         (vee_get_uids): Removed, use default impl.
9113         (vee_free_message_info): "
9114         (vee_get_message_info): "
9115         (vee_get_summary): "
9116         (vee_get_unread_message_count): "
9117         (vee_get_message_count): "
9118         (vee_sync): Make vee-folder-sync sync all subordinate folders.
9119         Well i dont think this is right, but enough peopl ehave aksed for
9120         it.
9121         (vee_expunge): Same for expunge.
9122         (vee_set_message_flags): Call parent class, then mirror flags to
9123         subfolder.
9124         (vee_get_message_user_flag): Removed, we just use the default
9125         impl, and our flags should always match.
9126         (vee_set_message_user_flag): Snoop the set and set on subfolder.
9127         (vee_get_message_flags): Removed, jsut use parent impl, assume our
9128         copy matches the real ones.
9129         (get_real_message): Removed.  We sort ofneed to keep the
9130         summaryitem refed while we use it, so this doesn't make as much
9131         sense as it did once.
9132         (camel_vee_folder_finalise): Unhook listening events as we unref
9133         folders.
9134         (camel_vee_folder_new): Set the summary messageinfo data size
9135         properly.
9136         (vfolder_remove_match): Fixed for summary change.
9137         (folder_changed): ditto.  Also stopped changed items from being
9138         re-searched and possibly removed.  Might have to resort to the old
9139         whole-search idea again.
9140         (message_changed): Similarly.  Might be easier just not to bother
9141         with a whole search.
9142
9143         * providers/vee/camel-vee-folder.h: Removes summary
9144         hashtable/array, and use a real summary object.  Sigh, more work.
9145
9146         * providers/nntp/camel-nntp-folder.c (nntp_folder_sync): Move
9147         summary to folder object.
9148         (nntp_folder_get_message_count): Removed, use default impl.
9149         (nntp_folder_set_message_flags): Call parent impl to do the work,
9150         but snoop for newsrc.
9151         (nntp_folder_get_uids): Removed, use default impl.
9152         (nntp_folder_get_summary): "
9153         (nntp_folder_get_message_info): "
9154         (nntp_folder_free_message_info): "
9155         (camel_nntp_folder_new): moved summary to folder class
9156         
9157         * providers/imap/camel-imap-folder.c (camel_imap_folder_init):
9158         Move summary to folder object.
9159         (camel_imap_folder_new): "
9160         (imap_finalize): No longer unref the summary (or infact, do
9161         anything else either).
9162         (imap_refresh_info): move summary to folder object.
9163         (imap_sync): "
9164         (imap_get_message_count): Removed, use default impl.
9165         (imap_get_unread_message_count): "
9166         (imap_get_uids): "
9167         (imap_get_summary): "
9168         (imap_free_summary): "
9169         (imap_get_message_info): "
9170         (imap_free_message_info): "
9171         (imap_get_message_flags): "
9172         (imap_set_message_flags): "
9173         (imap_get_message_user_flag): ", this changes functionality, but
9174         only by providing non-permanent flags.
9175         (imap_set_message_user_flag): "
9176         (imap_update_summary): move summary to folder object, and use
9177         camel_folder_summary_info_new_from_header, instead of calling the
9178         virtual function directly.
9179
9180         * providers/local/camel-maildir-folder.c (maildir_append_message):
9181         move summary to folder object, again.
9182         (maildir_get_message): "
9183
9184         * providers/local/camel-mh-folder.c (mh_append_message): move
9185         summary to folder object.
9186         (mh_get_message): "
9187
9188         * providers/local/camel-mbox-folder.c (mbox_append_message): Move
9189         summary to folder object
9190         (mbox_get_message): "
9191         (mbox_set_message_user_flag): We need our own copy of this, sigh,
9192         so we can track if the xev needs a rewrite (probably, its only a
9193         guide anyway).
9194         (mbox_set_message_user_tag): Same same with this one.
9195         (camel_mbox_folder_class_init): Link in these new virtual functions.
9196
9197         * providers/local/camel-local-folder.h (CamelLocalFolder): removed
9198         summary.
9199
9200         * providers/local/camel-local-folder.c (local_get_message_count): 
9201         (local_get_unread_message_count): 
9202         (local_get_uids): 
9203         (local_get_summary): 
9204         (local_free_summary): 
9205         (local_get_message_info): 
9206         (local_free_message_info): 
9207         (local_get_message_flags): 
9208         (local_set_message_flags): 
9209         (local_get_message_user_flag): 
9210         (local_set_message_user_flag): 
9211         (local_get_message_user_tag): 
9212         (local_set_message_user_tag): Removed, all now use default
9213         implementation.
9214         (camel_local_folder_class_init): Removed overrides.
9215         (local_init): Clear folder->summary.
9216         (local_finalize): move summary to folder.
9217         (camel_local_folder_construct): "
9218         (local_sync): "
9219
9220         * camel-folder.c (free_summary): Provide a real impl.
9221         (get_summary): "
9222         (free_uids): "
9223         (get_uids): "
9224         (free_message_info): "
9225         (get_message_info): "
9226         (set_message_user_tag): "
9227         (get_message_user_tag): "
9228         (set_message_user_flag): "
9229         (get_message_user_flag): "  Sigh, the last so far.
9230         (get_message_flags): Sigh, 1 more afterall.
9231         (get_unread_message_count): And and this.
9232         (get_message_count): and this!
9233         (set_message_flags): Sigh, and this.
9234         (camel_folder_finalize): Unref the summary if we have it.
9235         (camel_folder_free_uids): Remove locking.
9236         (camel_folder_get_message_flags): Remove locks, since the summary
9237         is now mt-safe.
9238         (camel_folder_set_message_flags): "
9239         (camel_folder_get_message_user_flag): "
9240         (camel_folder_set_message_user_flag): "
9241         (camel_folder_get_message_user_tag): "
9242         (camel_folder_set_message_user_tag): "
9243         (camel_folder_get_message_info): "
9244         (camel_folder_free_message_info): "
9245         (camel_folder_get_uids): "
9246         (camel_folder_free_summary): "
9247         (camel_folder_get_unread_message_count): "
9248         (get_unread_message_count): Check we got info, no big deal, but
9249         the summary might change while we're counting, and upset the count
9250         slightly.
9251         (camel_folder_get_message_count): Remove locks.
9252
9253         * camel-folder.h (struct _CamelFolder): Added CamelFolderSummary
9254         to the base folder object.  Sigh, this is going to be a lot of
9255         work ...
9256
9257         * camel-service.c (camel_service_init, finalise): changed
9258         connect_lock to be recursive e_mutex.
9259
9260         * camel-remote-store.c (camel_remote_store_init, finalise): Changed
9261         stream_lock to recursive e_mutex.
9262
9263         * camel-private.h (RemoteStorePrivate, ServicePrivate): Use
9264         recursive mutexes for connect_lock & stream_lock.  Ick.  Because
9265         of the imap code.
9266
9267         * providers/imap/camel-imap-private.h: Change the command_lock to
9268         be an EMutex.
9269
9270         * providers/imap/camel-imap-store.c (connect_to_server): Removed
9271         the command_lock stuff.  If we are just connected again, it should
9272         be safe to assume we have exclusive access at this point without
9273         it (and yes, removes a deadlock).
9274         (imap_create): Remove a lock that wasn't even supposed to be
9275         there.
9276         (camel_imap_store_finalize, init): g_mutex->e_mutex(E_MUTEX_REC).
9277         Use a recursive mutex since the imap code is multiply recursivly
9278         calling some functions (sigh, it would be nice to fix this).
9279
9280 2000-12-20  Not Zed  <NotZed@HelixCode.com>
9281
9282         * camel-folder.c (folder_changed): Change the locks to inside the
9283         if.  Stops a deadloc,k and we dont need a lock to read a value.
9284         (message_changed): Likewise.
9285
9286         * camel.c (camel_init): Blah, comment out g_thread_init, leave it
9287         to the caller, since it can only ever be done once.
9288
9289         * camel-folder-thread.c (camel_folder_thread_messages_new): Ref
9290         and save the folder in the thread return.  Also get the summary
9291         once, and access that for the messageinfo's.  Added bonus that now
9292         threads should come out in a similar order.  We need to do this so
9293         that the messageinfo's dont get unref'd under us, and using the
9294         summary directly simplifies memory management.
9295         (camel_folder_thread_messages_destroy): Free the summary/unref the
9296         folder.
9297
9298         * camel-folder-thread.h: Add a folder to CamelFolderThread struct.
9299
9300 2000-12-19  Not Zed  <NotZed@HelixCode.com>
9301
9302         * providers/imap/camel-imap-utils.c (imap_translate_sexp): Unref
9303         using e_sexp_unref, since it is no longer an object.
9304
9305         * tests/lib/camel-test.c: Added a global lock, and made it
9306         thread-aware.
9307
9308         * camel-exception.c: Add a global lock.  Not sure its really
9309         needed here, but it doesn't really hurt.
9310         (camel_exception_clear): Lock around access.
9311         (camel_exception_set): Same.
9312         (camel_exception_setv): "
9313         (camel_exception_xfer): "
9314
9315         * providers/local/Makefile.am (noinst_HEADERS): Added, for
9316         camel-local-private.h
9317
9318         * camel-folder.c (camel_folder_search_by_expression): Removed
9319         locking here, now upto the implementing class to lock.
9320         (camel_folder_search_free): Removed the folder lock here too, for
9321         consistency really, and the locking probably wasn't needed.
9322
9323         * providers/local/camel-local-folder.c (local_get_summary):
9324         Changed to copy/ref the summary items.
9325         (local_free_summary): Unref the summary items/free the array.
9326         (local_get_unread_message_count): Free info lookups.
9327         (local_search_by_expression): Perform more fine-grained locking,
9328         and dont lock the whole folder while searching, just the search
9329         object.  Dum de dum, it *would* be possible to not even have to
9330         lock the search, by using our own copy of the search object each
9331         time.  Could be investigated.
9332         (local_init): Init priaate data/lock.
9333         (local_finalize): Free private data/lock.
9334         (local_search_free): Also lock around the search object, because
9335         it accesses global data inside.
9336
9337         * README.mt: Some info about the mt code development.
9338
9339         * camel-folder-search.c (match_message): Put in a warning, this
9340         plain deadlocks so far, but i'm going to bed now.
9341         (camel_folder_search_finalize): Use e_sexp_unref() since its no
9342         longer an object.
9343
9344         * camel-session.c (camel_session_init): Init private data/lock.
9345         (camel_session_finalise): Free private data/lock.
9346         (camel_session_register_provider): Lock hash insert.
9347         (service_cache_remove): Lock.
9348         (camel_session_list_providers): "
9349         (camel_session_get_service): Lock the whole function.
9350
9351         * camel-session.h (struct _CamelSession): Added private data.
9352
9353         * providers/imap/camel-imap-store.c (camel_imap_store_init): Setup
9354         private data.
9355         (camel_imap_store_finalize): Free private data.
9356         (connect_to_server): Lock around command calls.  I dont think its
9357         needed, but it shouldn't hurt either.
9358         (imap_connect): Lock around command calls.  Again, I don think it
9359         is needed, but wont hurt.
9360         (imap_disconnect): ditto for this one.
9361         (imap_create): Lock around command.
9362         (get_folder): "
9363         (get_folder_info): "
9364         (subscribe_folder): "
9365         (unsubscribe_folder): "
9366         (imap_keepalive): "
9367
9368         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Lock
9369         around calling a command.
9370         (imap_refresh_info): Likewise.
9371         (imap_sync): "
9372         (imap_append_message): "
9373         (imap_copy_message_to): "
9374         (imap_move_message_to): "
9375         (imap_get_message): "
9376         (imap_update_summary): "
9377         (imap_search_by_expression): ", also minor logic cleanup.
9378         (imap_get_summary): Copy/ref the summary items.
9379         (imap_free_summary): And free it now too.
9380
9381         * providers/imap/camel-imap-auth.c (imap_try_kerberos_v4_auth):
9382         Lock the command stream for the command session.
9383
9384         * providers/imap/camel-imap-private.h: Private (locking info)
9385         stuff for imap provider.
9386         (CAMEL_IMAP_STORE_UNLOCK): Fix to call unlock, rather than lock!
9387
9388         * camel-service.c (camel_service_query_auth_types): Lock also for
9389         the connection here, incase the service needs to connect.
9390
9391         * camel-remote-store.c (camel_remote_store_init): Init private
9392         data/lock.
9393         (camel_remote_store_finalise): Readded, free private data/lock.
9394         (remote_send_stream): Changed to return the number of bytes
9395         written, like a good little stream function should.
9396         (camel_remote_store_send_string): Lock for stream access.
9397         (camel_remote_store_send_stream): Same here.
9398         (camel_remote_store_recv_line): And here.
9399         (camel_remote_store_refresh_folders): Lock the store for cache
9400         access.
9401         (timeout_cb): Lock for stream access.
9402
9403 2000-12-18  Not Zed  <NotZed@HelixCode.com>
9404
9405         * camel-service.c (camel_service_init): Init private data.
9406         (camel_service_finalise): Free private data.
9407         (camel_service_connect): Lock around connection access.
9408         (camel_service_disconnect): "
9409
9410         * camel-service.h (struct _CamelService): Added private field.
9411
9412         * camel-store.c (camel_store_init): Init private data/lock.
9413         (camel_store_finalize): Free private data/lock.
9414         (camel_store_get_folder): Lock internal calls.
9415         (camel_store_delete_folder): "
9416         (camel_store_rename_folder): "
9417         (camel_store_get_root_folder): "
9418         (camel_store_get_default_folder): "
9419         (camel_store_get_folder_info): "
9420         (camel_store_folder_subscribed): "
9421         (camel_store_subscribe_folder): "
9422         (camel_store_unsubscribe_folder): "
9423         (lookup_folder): Lock accesses to the folder cache.
9424         (cache_folder): "
9425         (uncache_folder): And here too.
9426
9427         * camel-store.h (struct _CamelStore): Added a private field.
9428
9429         * Makefile.am (noinst_HEADERS): Add camel-private.h.  There is a
9430         comment in that header as to why it ins't installed.
9431
9432         * camel-private.h: New header for private data, that subclasses
9433         can get to.
9434
9435         * tests/lib/camel-test.c (camel_test_init): If we do have threads
9436         enabled already, dont call g_thread_init().
9437         
9438         * tests/lib/folders.c (test_folder_counts): Add free of info.
9439         (test_folder_message): And here too.
9440
9441         * providers/local/camel-maildir-summary.c (remove_summary): Free
9442         info.
9443         (maildir_summary_check): Free info lookups.
9444
9445         * providers/local/camel-mh-summary.c (message_info_new): Removed,
9446         didn't add value.
9447         (remove_summary): free info after being used.
9448         (mh_summary_check): Free info lookups.
9449         (mh_summary_sync): and here too.
9450
9451         * providers/local/camel-mbox-summary.c (summary_update): Free info
9452         lookups.
9453         (mbox_summary_sync_full): Likewise.
9454         (mbox_summary_sync_quick): And here.
9455         (mbox_summary_sync):  ... and here.
9456
9457         * providers/local/camel-maildir-folder.c (maildir_get_message):
9458         Free messageinfo lookups.
9459
9460         * providers/local/camel-mh-folder.c (mh_get_message): Free
9461         messageinfo lookups.
9462
9463         * providers/local/camel-mbox-folder.c (mbox_get_message): Free
9464         messageinfo lookups.
9465
9466         * providers/local/camel-local-summary.c
9467         (message_info_new_from_message): Removed, since it wasn't doing
9468         anything useful.
9469         (message_info_new_from_parser): Same.  And some other dead code.
9470
9471         * providers/local/camel-local-folder.c (local_get_message_info):
9472         deconstify.
9473         (local_free_message_info):new func to free info.
9474         (local_get_uids): 
9475         (local_get_message_flags): 
9476         (local_set_message_flags): 
9477         (local_get_message_user_flag): 
9478         (local_set_message_user_flag): 
9479         (local_get_message_user_tag): 
9480         (local_set_message_user_tag): Free all info lookups.
9481         (local_expunge): Dont call camel_folder_* functions, to avoid a deadlock.
9482
9483         * providers/nntp/camel-nntp-folder.c
9484         (nntp_folder_get_message_info): deconstify.
9485         (nntp_folder_free_message_info): Free summary item.
9486         (nntp_folder_get_message_flags): Free summary lookup.
9487         (nntp_folder_set_message_flags): and here.
9488         (nntp_folder_get_uids): And here.
9489
9490         * providers/imap/camel-imap-auth.c: Make base64_*_simple optional
9491         with the HAVE_KRB4 flag.
9492
9493         * providers/imap/camel-imap-folder.c (imap_free_message_info):
9494         Added a free of the message info.
9495         (imap_refresh_info): 
9496         (imap_sync): 
9497         (imap_refresh_info): 
9498         (imap_get_unread_message_count): 
9499         (imap_get_uids): 
9500         (imap_get_message_flags): 
9501         (imap_set_message_flags): Free any summary lookups.
9502         (imap_get_message_flags): Get the message info directly from the
9503         summary, not via the folder interface.
9504         (imap_move_message_to): Dont call folder functions directly
9505         (delete_message), as it will deadlock since we already have the
9506         lock.
9507
9508         * providers/vee/camel-vee-folder.c (vee_free_message_info): Free/unref
9509         the messageinfo.
9510         (vee_get_message_info): First ref the internal copy, then return it.
9511         (folder_changed): Free all got message info's.
9512         (message_changed): And here.
9513         (get_real_message): And here.
9514         (vee_folder_build): and here.
9515         (vee_folder_build_folder): ... and here.
9516
9517         * camel-folder-summary.c (camel_folder_summary_info_new):
9518         Initialise the messageinfo refcount to 1.
9519         (camel_folder_summary_info_free): Down the refcount till we need
9520         to free.
9521         (camel_folder_summary_info_ref): New function to up the refcount.
9522         (camel_message_info_dup_to): Sewt the refcount of the dest to 1.
9523         (camel_message_info_new): Set refcount to 1.
9524         (camel_message_info_new_from_header): Dont allocate the mi
9525         ourselves.
9526         (camel_message_info_free): Handle refcounting.
9527         (camel_message_info_ref): New function.
9528         (camel_folder_summary_index): Ref the messageinfo before returning
9529         it.
9530         (camel_folder_summary_uid): Likewise.
9531         (camel_folder_summary_save): Access the messageinfo array
9532         directly, rather than through accessors (saves ref/unref).
9533         (camel_folder_summary_clear): Likewise.
9534         (camel_folder_summary_remove_index): Likewise.
9535         (main): Free lookups.
9536
9537         * camel-folder-summary.h (CamelMessageInfo): Added a refcount
9538         value.
9539
9540         * camel-folder.c (camel_folder_free_message_info): New function to
9541         'free' a message info.
9542         (camel_folder_get_message_info): Deconstify return.
9543         (camel_folder_lock): New (internal) function to thread-lock the
9544         folder.
9545         (camel_folder_unlock): Likewise for unlocking.
9546         (freeze): 
9547         (thaw): Lock around access to folder->frozen/changed_frozen.
9548         (folder_changed): Likewise.
9549         (message_changed): Likewise.
9550         (camel_folder_init): Init private data, locks and moved frozen
9551         info.
9552         (camel_folder_finalize): Free new private data, locks and moved
9553         frozen info.
9554         (copy_message_to): Free the messageinfo after we've used it.
9555         (move_message_to): And here too.
9556         (camel_folder_sync): Lock around virtual method invocation.  Just
9557         locking around any virtual method that is known to need it.  This
9558         is the first cut at locking.
9559         (camel_folder_refresh_info): "
9560         (camel_folder_expunge): "
9561         (camel_folder_get_message_count): "
9562         (camel_folder_get_unread_message_count): "
9563         (camel_folder_append_message): "
9564         (camel_folder_set_message_flags): "
9565         (camel_folder_get_message_flags): "
9566         (camel_folder_get_message_user_flag): "
9567         (camel_folder_set_message_user_flag): "
9568         (camel_folder_get_message_user_tag): "
9569         (camel_folder_set_message_user_tag): "
9570         (camel_folder_get_message): "
9571         (camel_folder_get_uids): "
9572         (camel_folder_free_uids): "
9573         (camel_folder_get_summary): "
9574         (camel_folder_search_by_expression): "
9575         (camel_folder_free_summary): "
9576         (camel_folder_search_free): "
9577         (camel_folder_move_message_to): "
9578         (camel_folder_copy_message_to): "
9579         (copy_message_to): Dont call any of our own folder functions
9580         directly, otherwise we will deadlock.
9581         (move_message_to): Likewise.
9582
9583         * camel-folder.h (CamelFolder): Added free_message_info() function
9584         & deconstify get_message_info()'s return.
9585         (CamelFolder): Add a private field (for locks).
9586         (struct _CamelFolder): Moved changed_changed/frozen into private
9587         data, since it really is private and now needs locked access.
9588
9589 2000-12-15  Jeffrey Stedfast  <fejj@helixcode.com>
9590
9591         * camel-mime-utils.c (header_fold): When checking to see if we
9592         need to fold the header, when we come accross a \n, make sure to
9593         start at p + 1 the next time through the loop or else we get into
9594         an infinite loop.
9595
9596 2000-12-13  Dan Winship  <danw@helixcode.com>
9597
9598         * Namespace cleanup: change a bunch of IS_CAMEL_* macros to
9599         CAMEL_IS_*
9600
9601 2000-12-13  Chris Toshok  <toshok@helixcode.com>
9602
9603         * providers/imap/camel-imap-auth.c: add #include <sys/types.h> for
9604         freebsd.
9605
9606 2000-12-12  Christopher James Lahey  <clahey@helixcode.com>
9607
9608         * camel-folder-summary.c, camel-folder-summary.h: Added #ifndef
9609         NO_WARNINGS around a #warning.  Added (void) to the prototype and
9610         declaration of camel_message_info_new.
9611
9612         * camel-mime-message.h: Added an include for
9613         camel-mime-filter-bestenc.h.  Added a prototype for
9614         camel_mime_message_set_best_encoding.  Reformatted prototypes to
9615         line up.
9616
9617         * camel-mime-parser.c: Added #if d(!)0 around the states string
9618         lookup table since it's only used in debugging output.
9619
9620         * camel-seekable-substream.c (stream_flush): Added a cast.
9621
9622         * providers/imap/camel-imap-auth.c: Added #include <netinet/in.h>.
9623
9624         * providers/imap/camel-imap-folder.c (imap_refresh_info): Made uid
9625         and flags const to fix warnings here.
9626
9627         * providers/imap/camel-imap-store.c (get_folder_info): Made p
9628         const to fix warnings here.
9629
9630 2000-12-12  Dan Winship  <danw@helixcode.com>
9631
9632         * tests/lib/Makefile.am: Add missing .h file. (From campd.)
9633
9634 2000-12-11  Not Zed  <NotZed@HelixCode.com>
9635
9636         * providers/smtp/camel-smtp-transport.c (smtp_data): Remove use of
9637         linewrap filter.  Headers are now wrapped.  encode_8bit already
9638         enforces a 998 octet line limit.
9639         (smtp_data): Also fixed a memleak, we always have to unref our own
9640         copy of the filters.  We also dont need to remove them manually,
9641         so dont bother.  The type's an int too ...
9642
9643         * camel-internet-address.c (internet_unformat): When scanning past
9644         quotes, remove them also.
9645         (camel_internet_address_format_address): If the name contains "'s,
9646         or ','s then strip and quotes and wrap the whole lot in one set of
9647         quotes.
9648         
9649         * Makefile.am (noinst_HEADERS): We dont want to install
9650         camel-charset-map-private.h, ever.  There are probably other
9651         similar files ..?
9652
9653         * camel-mime-part.c (write_to_stream): Fold header lines
9654         appropriately as we're writing them out.
9655
9656         * camel-mime-utils.c (header_fold): Add a new argument, headerlen,
9657         tells it how long the associated header token is.
9658         (header_fold): Also,k check to see if we need to fold first, using
9659         a better algorithm, and also accept already-folded lines, and
9660         re-process accordingly.
9661         (rfc2047_decode_word): Add a little buffer space to iconv output
9662         for shifting overheads?
9663         (rfc2047_decode_word): finish the iconv with a null call, to flush
9664         shift state, etc.
9665         (rfc2047_encode_word): Attempt to break up long words into
9666         appropriately sized, independent, chunks.  See rfc2047, section 2.
9667         (header_decode_mailbox): Dont add in extra spaces into the output
9668         if we are decoding adjacent encoded words.  We can only guess this
9669         case, as some broken mailers put encoded words inside quoted
9670         words.
9671         (header_encode_phrase): Dont merge words if they are going to end
9672         up too long.  Also change back ot only merge consecutive words of
9673         the same type.  e.g. 'foo. blah fum.' -> "foo." blah "fum."  or
9674         'iam an. idiot' -> iam "an." idiot
9675
9676         * camel-medium.c (camel_medium_set_header): Hrm, we actually want
9677         to call set_header, not add_header here, probably explains some
9678         duplicate X-Evolution headers i was trying to track down.  Also
9679         changed the api to handle a NULL value == remove the header.
9680
9681         * providers/local/camel-maildir-summary.c
9682         (maildir_summary_decode_x_evolution): Always return error, we dont
9683         use x-evolution for maildir.
9684         (maildir_summary_encode_x_evolution): Always return a NULL string,
9685         likewise.
9686         (maildir_summary_add): Hook in here, since the _new function
9687         doesn't have access to any flags from the caller.  If we have
9688         flags, then update the filename again.  Not ideal, but should
9689         work.
9690
9691 2000-12-08  JP Rosevear  <jpr@helixcode.com>
9692
9693         * tests/message/Makefile.am: Remove test3 from build until the files
9694         show up
9695         
9696 2000-12-09  Not Zed  <NotZed@HelixCode.com>
9697
9698         * camel-mime-message.c (camel_mime_message_set_date): Change the
9699         sign of the default date offset when none is supplied.
9700         (camel_mime_message_set_date): Also do dst if its dst (forward 1
9701         hour).  Fixes #928 + some.
9702
9703 2000-12-06  Not Zed  <NotZed@HelixCode.com>
9704
9705         * tests/lib/camel-test.h (check): Change line no format so that
9706         emacs can detect it.
9707
9708 2000-12-06  Jeffrey Stedfast  <fejj@helixcode.com>
9709
9710         * providers/imap/camel-imap-folder.c (imap_refresh_info): We want
9711         to bitwise-or the server and cached flags here so that we keep the
9712         flags that we have set locally and set any additional flags that a
9713         parallel connection may have set.
9714
9715 2000-12-05  Jeffrey Stedfast  <fejj@helixcode.com>
9716
9717         * providers/smtp/camel-smtp-transport.c (smtp_data): If the data
9718         wrapper fails to be written to the stream, unref it and the
9719         filters before returning.
9720
9721 2000-12-05  Dan Winship  <danw@helixcode.com>
9722
9723         * providers/imap/camel-imap-folder.c (imap_get_message): use
9724         BODY.PEEK[] rather than RFC822, so the message doesn't get marked
9725         as \Seen.
9726         (imap_refresh_info): Fix a really really really dumb bug.
9727
9728 2000-12-05  Dan Winship  <danw@helixcode.com>
9729
9730         * providers/imap/camel-imap-folder.c (imap_set_message_flags): Fix
9731         the check for "flags aren't actually changing".
9732
9733         * providers/local/camel-local-folder.c (local_set_message_flags,
9734         local_set_message_user_flag, local_set_message_user_tag): Don't
9735         emit message_changed unless the flags actually changed.
9736
9737         * providers/nntp/camel-nntp-folder.c
9738         (nntp_folder_set_message_flags): Don't emit message_changed unless
9739         the flags actually changed. Fix the check for marked as seen.
9740
9741 2000-12-05  Not Zed  <NotZed@HelixCode.com>
9742
9743         * camel-seekable-substream.c (stream_flush): stream_flush does
9744         make sense for a substream afterall (if you have a stream_write).
9745         (stream_write): Implement this.
9746         (stream_seek): Change the STREAM_END behaviour to be more sane.
9747         if bounded go from the end of the bound, if unbounded, go from the
9748         end of the parent stream.
9749
9750         * camel-stream-mem.c (stream_read): Dont return error if reading
9751         past the end of data, just return 0.
9752
9753         * camel-stream-fs.c (camel_stream_fs_init): Initialise the stream
9754         to be unbound.
9755         (stream_seek): Fix the logic when seeking from the end of an
9756         unbounded stream.
9757         (camel_stream_fs_new_with_fd): If the fd is invalid (-1), then
9758         return NULL immediately.
9759         (stream_seek): Range check a SEEK_END so it fits within
9760         bound_start.
9761
9762 2000-12-01  Not Zed  <NotZed@HelixCode.com>
9763
9764         * tests/lib/folders.c (test_folder_basic): New test to perform
9765         basic store operations on folders (taken from folders/test1).
9766         (test_folder_message_ops): Tkane the guts out of folders/test2.
9767
9768 2000-12-04  Jeffrey Stedfast  <fejj@helixcode.com>
9769
9770         * providers/smtp/camel-smtp-transport.c (smtp_connect): i18n-ize
9771         exception strings.
9772         (get_name): And here.
9773         (_send_to): Here too.
9774         (smtp_helo): And here and there...
9775         (smtp_mail): And around the square...
9776         (smtp_rcpt): Saying catch me if you can...
9777         (smtp_data): And here three.
9778         (smtp_rset): And here.
9779         (smtp_quit): And finally here.
9780
9781 2000-12-01  Jeffrey Stedfast  <fejj@helixcode.com>
9782
9783         * camel-folder-search.h: Added system_flag to CamelFolderSearchClass
9784
9785         * camel-folder-summary.c (camel_system_flag_get): Convenience
9786         function to return whether or not a flag is set using a string as
9787         the flag name.
9788         (camel_system_flag): Return the integer value of the flag string.
9789
9790         * camel-folder-search.c (search_system_flag): New ESExp callback
9791         for allowing vfoldering on CamelMessageInfo flags.
9792
9793 2000-12-01  Dan Winship  <danw@helixcode.com>
9794
9795         * camel-service.c (camel_service_disconnect): Don't
9796         g_return_if_fail if the service is already disconnected. Just
9797         return.
9798
9799         * providers/pop3/camel-pop3-store.c (pop3_try_authenticate):
9800         Return FALSE (don't try again) if we get CAMEL_POP3_FAIL.
9801         (pop3_connect): If we don't succeed, disconnect.
9802
9803 2000-11-30  Jeffrey Stedfast  <fejj@helixcode.com>
9804
9805         * providers/imap/camel-imap-store.c
9806         (parse_list_response_as_folder_info): Fix a possible bug where
9807         'name' could be uninitialized.
9808
9809         * camel-folder-summary.c (camel_message_info_new): New convenience
9810         function, doesn't do much but it sure makes code cleaner to read.
9811         (camel_message_info_new_from_header): This one makes my life heaven.
9812
9813 2000-11-30  Jeffrey Stedfast  <fejj@helixcode.com>
9814
9815         * providers/imap/camel-imap-summary.c (camel_imap_summary_new):
9816         Handle the case where the summary failed to load - clear the
9817         summary and then set the dirty bit so that it is sure to save
9818         later. Is this the right fix?
9819
9820 2000-11-30  Dan Winship  <danw@helixcode.com>
9821
9822         * camel-exception.c (camel_exception_setv): Remove unused
9823         variable.
9824
9825 2000-11-30  Not Zed  <NotZed@HelixCode.com>
9826
9827         * providers/local/camel-mbox-folder.c (mbox_get_message): Remove
9828         assertion that content is there, when it no longer can be.
9829
9830         * camel-folder-summary.h: Removed pos/bodypos/endpos from
9831         camelmeessagecontentinfo.
9832         (CamelMessageFlags): Added an attachments flag.
9833
9834         * providers/local/camel-local-summary.h: Added load virtual
9835         function.
9836
9837         * tests/lib/folders.c (test_message_info): Accessors.
9838         (test_folder_message): "
9839
9840         * camel-folder-thread.c (get_root_subject): Fix accessors.
9841         (dump_tree_rec): "
9842
9843         * camel-folder-search.c (camel_folder_search_execute_expression):
9844         Accessors for messageinfo.
9845         (search_match_all): "
9846         (search_header_contains): "
9847         (search_header_contains): "
9848         (search_body_contains): "
9849         (camel_folder_search_execute_expression): Use mepool_strdup.
9850
9851         * providers/local/camel-mbox-summary.c (summary_update): Accessors
9852         for messageinfo.
9853         (mbox_summary_sync_full): "
9854
9855         * providers/local/camel-mh-summary.c (remove_summary): Accessors
9856         for messageinfo.
9857         (mh_summary_check): "
9858         (mh_summary_sync_message): "
9859         (mh_summary_sync): "
9860
9861         * providers/local/camel-mh-folder.c (mh_append_message): Use
9862         accessor for uid.
9863
9864         * providers/local/camel-local-summary.c
9865         (local_summary_decode_x_evolution): Use accessor to uid.
9866         (local_summary_encode_x_evolution): Likewise.
9867         (message_info_new): And here.
9868         (camel_local_summary_load): Call virtual load function.
9869         (local_summary_load): Default load function, load summary.
9870         (camel_local_summary_load): Check file exists before trying to
9871         load.
9872         (camel_local_summary_construct): Turn off building content info!
9873         (CAMEL_LOCAL_SUMMARY_VERSION): Bump, since we dont build content
9874         info anymore.
9875         (camel_local_summary_load): After a successful load/check, do a
9876         save too so we dont have to go through it again randomly.
9877
9878         * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): Use
9879         accessors for messageinfo.
9880
9881         * providers/nntp/camel-nntp-folder.c (nntp_folder_get_uids): Use
9882         accessors for uid.
9883
9884         * providers/imap/camel-imap-folder.c (imap_refresh_info): Use
9885         accessor for uid.
9886         (imap_sync): Likewise.
9887         (imap_get_uids): Likewise.
9888         (imap_update_summary): And here.
9889
9890         * providers/vee/camel-vee-folder.c (vfolder_remove_match): Use
9891         accessor for uid.
9892         (vfolder_add_match): Handle estrv stuff.
9893         (vfolder_change_match): Accessor for uid.
9894         (get_real_message): "
9895         (vee_get_uids): "
9896         (vee_folder_build): " + estrv.
9897         (vee_folder_build_folder): "
9898
9899         * providers/local/camel-maildir-folder.c (maildir_append_message):
9900         Use acccessors for uid's.
9901         (maildir_get_message): Here too.
9902
9903         * providers/local/camel-maildir-summary.c
9904         (camel_maildir_summary_init): Setup the string count for us.
9905         (message_info_new): Access the string array directly.
9906         (message_info_free): No need to free string if using array.
9907         (camel_maildir_summary_info_to_name): Use accessor to get to uid.
9908         (remove_summary): And here.
9909         (maildir_summary_check): Likewise.
9910         (maildir_summary_sync): And here.
9911         (maildir_summary_load): Load up a cache of uid->filename mappings
9912         before loading the actual summary file.  This saves us having to
9913         waste the diskspace storing the filenames in the summary itself,
9914         and also helps us sync the summary better on load.
9915         (message_info_load): If we have the load_map setup, and the uid
9916         exists, then set the filename cache from it, and update the flags
9917         from the name, incase our summary mismatches it.
9918
9919         * camel-folder-summary.c (camel_folder_summary_init): Setup string
9920         count for compressed info record.  An optional compile mode which
9921         stores all strings for a given messageinfo into a packed array,
9922         which should save 36-50 bytes/record.
9923         (camel_folder_summary_info_new): Init the string array.
9924         (message_info_new): Set the string array items, as required.
9925         (message_info_load): And here too.
9926         (message_info_save): Use accessors to get to strings.
9927         (message_info_free): Free strings as one.
9928         (camel_message_info_dup_to): Handle packed array case.
9929         (camel_folder_summary_add): Use accessors.  And pack the strv
9930         before storing it.
9931         (summary_assign_uid): New function to assign a unique uid to a
9932         message, if it doesn't have one.
9933         (camel_folder_summary_add): Call assign_uid instead of doing it
9934         ourselves.
9935         (camel_folder_summary_info_new_from_parser): "
9936         (camel_folder_summary_info_new_from_message): "
9937         (camel_folder_summary_encode_string): constify.
9938         (camel_folder_summary_encode_token): "
9939         (summary_build_content_info_message): Fix accessors to messageinfo.
9940         (CAMEL_FOLDER_SUMMARY_VERSION): Bumped, for removal of
9941         contentinfo->pos data.
9942         (camel_folder_summary_info_new_from_parser): Calculate the size
9943         based on the parser position, not the removed contentinfo stuff.
9944         (camel_folder_summary_info_new_from_message): Remove size stuff.
9945         (camel_folder_summary_offset_content): Removed, no longer means anything.
9946         (content_info_new): 
9947         (content_info_load): 
9948         (content_info_save): 
9949         (summary_build_content_info): Remove stuff for contentinfo->pos*.
9950         (summary_build_content_info): Take a msginfo argument, set
9951         attachments flag if we find any attachments.
9952         (summary_build_content_info_message): set attachments flag if we
9953         find any attachments.
9954         (camel_folder_summary_info_new_from_parser): Always scan the
9955         content info, even if we dont save it.
9956         (camel_folder_summary_info_new_from_message): And here too.
9957         (summary_build_content_info): Only create the contentinfo stuff if
9958         we have it turned on, otherwise just parse and discard.
9959         (summary_build_content_info_message): Likewise.
9960
9961 2000-11-29  Jeffrey Stedfast  <fejj@helixcode.com>
9962
9963         * camel-store.c (camel_store_get_folder): Updated the gtk-doc
9964         comment.
9965
9966 2000-11-29  Dan Winship  <danw@helixcode.com>
9967
9968         * camel-mime-utils.c: 
9969         * camel-mime-filter-charset.c: Use iconv instead of unicode_iconv.
9970
9971         * providers/imap/camel-imap-command.c (imap_read_untagged): Fix
9972         some off-by-one-ness.
9973
9974         * camel-stream-buffer.c (stream_read): Fix another bug found in
9975         previously-unused code here.
9976
9977 2000-11-29  Ettore Perazzoli  <ettore@helixcode.com>
9978
9979         * tests/lib/Makefile.am (INCLUDES): `$(top_srcdir)' for builddir
9980         != srcdir compilation.
9981
9982 2000-11-29  Not Zed  <NotZed@HelixCode.com>
9983
9984         * tests/message/test2.c (main): Add a missed unref.
9985
9986         * camel-stream-mem.c (camel_stream_mem_set_buffer): We must set
9987         ourselves as the owner of the byte-array.
9988         Weird, someone has modified this file (its been reindented), but i
9989         can't see any changelogs ...
9990
9991         * tests/lib/messages.c (content_finalise): Fix memleak in tester,
9992         free byte array when our content object is deleted.
9993
9994         * camel-folder-search.c (camel_folder_search_finalize): Yeah
9995         great, so the sexp is a gtk object, not a camel object.  Isn't
9996         that going to be fun to fix?
9997
9998         * camel-session.c (camel_session_finalise): Free the storage path.
9999
10000         * providers/local/camel-local-store.c (camel_local_store_init): If
10001         store->folders is setup, free it first, then overwrite.  Hmm,
10002         this seems a bit crappy to me.
10003
10004         * camel-store.c (camel_store_init): Dont setup store->folders if
10005         its already setup.
10006
10007         * camel-exception.c (camel_exception_setv): Removed a memleak.  no
10008         need to strdup after a strdup_printf!!!
10009
10010         * camel-address.c (camel_address_finalize): Free the address
10011         ptrarray, once finished.
10012
10013         * providers/local/camel-local-folder.c (local_finalize): Make sure
10014         we dont leave the folder locked on close.
10015         (local_finalize): Free summary/search.
10016
10017         * providers/local/camel-mh-summary.c (mh_summary_next_uid_string):
10018         Small memleak, always free name after using it.
10019
10020         * camel-mime-part.c (set_content_object): Free txt after setting
10021         the header.
10022
10023         * providers/local/camel-maildir-summary.c (maildir_summary_check):
10024         Fix a memleak, close the dir after scanning new.
10025         (message_info_free): Added so we can free the filename cached in
10026         the messageinfo.
10027         (camel_maildir_summary_finalise): Free the hostname.
10028
10029         * tests/folder/test[12].c (main): Clear out camel-test before
10030         starting.
10031
10032         * providers/local/camel-mbox-summary.c (mbox_summary_sync_quick):
10033         Because encode_x_evolution folds the line (sigh, because
10034         encode_param does, unlike every other function in
10035         camel-mime-utils), unfold the encoded result before comparing.
10036         (mbox_summary_sync_quick): Another small memleak, free xevnew once
10037         finished with it.
10038
10039         * camel-mime-utils.c (header_decode_quoted_string): Removed a
10040         redundant check for c=0.
10041         (header_unfold): New function to un-fold headers.
10042
10043         * providers/local/camel-local-summary.c
10044         (local_summary_encode_x_evolution): some problems with encoding
10045         tags, using the wrong output strings.
10046         (local_summary_encode_x_evolution): We dont need to append a ;
10047         either, param_list_format_append() will do it for us.
10048
10049 2000-11-28  JP Rosevear  <jpr@helixcode.com>
10050
10051         * camel-lock.c: No longer hard code the enabled lock types
10052
10053 2000-11-28  Dan Winship  <danw@helixcode.com>
10054
10055         * camel-remote-store.c (remote_recv_line): Don't set exception to
10056         g_strerror (errno) when nread == 0, because it won't have been
10057         set.
10058
10059         * providers/pop3/camel-pop3-folder.c (pop3_finalize): Don't try to
10060         free things if they haven't been set yet.
10061
10062 2000-11-28  Jeffrey Stedfast  <fejj@helixcode.com>
10063
10064         * providers/smtp/camel-smtp-transport.c (smtp_connect): Clear the
10065         exception if EHLO fails before trying HELO in the cases where the
10066         SMTP provider doesn't announce its ESMTPness.
10067
10068 2000-11-28  Not Zed  <NotZed@HelixCode.com>
10069
10070         * providers/local/camel-maildir-summary.c
10071         (camel_maildir_summary_init): Set the info size's properly, oops!
10072
10073         * tests/lib/folders.[ch]: Folder testing helpers.
10074
10075         * tests/folder/test2.c: Test basic message ops on folders.
10076
10077         * tests/folder/test1.c (main): Test basic folder ops on (local)
10078         stores.
10079
10080         * providers/local/camel-local-provider.c
10081         (camel_provider_module_init): Removed some debug.
10082
10083         * providers/local/camel-maildir-folder.c
10084         (camel_maildir_folder_class_init): fix parent class.
10085
10086         * providers/local/camel-mh-folder.c (camel_mh_folder_class_init):
10087         Fix parent class (damn cut & paste).
10088
10089         * providers/local/camel-maildir-store.c (get_folder): Call parent
10090         impl.
10091         (camel_maildir_store_class_init): Fix parent class setup.
10092         (delete_folder): Check the folder exists before trying to delete
10093         it.
10094         (delete_folder): Try and make the delete operation atomic/rollback
10095         failures.  e.g. if one directory isn't empty, then create the
10096         other empty ones back.  Also clear the tmp directory fully first.
10097
10098         * providers/local/camel-mbox-store.c (get_folder): Call parent
10099         impl.
10100         (camel_mbox_store_class_init): parent class is camel_local_store,
10101         not camel_folder, oops.
10102         (delete_folder): Return an error if it doesn't exist, rather than
10103         covering it up.
10104
10105         * providers/local/camel-mh-store.c (get_folder): Call parent impl.
10106         (camel_mh_store_class_init): fix parent class setup.
10107         (delete_folder): Error if it doesn't exist now.
10108
10109         * camel-folder.c (camel_folder_move_message_to):
10110         (camel_folder_copy_message_to): Added warnings as these functions
10111         are going to be removed later.
10112
10113         * camel-store.c (camel_store_get_root_folder): Fix for an early
10114         api change.  We want CAMEL_STORE_FOLDER_CREATE, not TRUE, since
10115         its a flag.
10116         (camel_store_get_default_folder): And here too.
10117
10118         * providers/local/camel-local-store.c (xrename): Handle renaming
10119         folders differently to renaming files.
10120         (get_default_folder_name): local stores dont have a default
10121         folder, so make it so.  Or at least, it doesn't seem to make sense
10122         to have one.
10123         (get_root_folder_name): Same for root.
10124         (get_folder): Added parent implementation, that makes sure the
10125         service path exists, if we are creating a new folder (but doesn't
10126         create the folder).
10127
10128 2000-11-27  Not Zed  <NotZed@HelixCode.com>
10129
10130         * providers/local/camel-local-store.c (xrename): Fixed races.  Use
10131         link/unlink, rather than rename, to properly detect overwriting
10132         another file.  And allow some files to be missing.
10133
10134 2000-11-28  Radek Doulik  <rodo@helixcode.com>
10135
10136         * providers/local/camel-local-summary.c
10137         (local_summary_decode_x_evolution): add scan = scan->next; to
10138         avoid infinite loop
10139
10140 2000-11-27  Dan Winship  <danw@helixcode.com>
10141
10142         * providers/imap/camel-imap-command.c (imap_read_untagged): Make
10143         this gratuitously more complicated. No wait, I mean, fix bugs. Now
10144         fully handles NULs in the data stream (which "can't happen" but
10145         do) and also handles responses containing multiple literals. Also
10146         does less copying than the original code.
10147
10148         * camel-stream-buffer.c (stream_read): Fix a bug that could make
10149         it lose sync and/or overrun buffers.
10150
10151 2000-11-27  JP Rosevear  <jpr@helixcode.com>
10152
10153         * providers/local/.cvsignore: shush
10154
10155 2000-11-27  Not Zed  <NotZed@HelixCode.com>
10156
10157         * providers/Makefile.am: Removed mh, mbox, added local, to the default.
10158
10159 2000-11-24  Not Zed  <NotZed@HelixCode.com>
10160
10161         * tests/data/getaddr.pl: little util to scan mailboxes for any and
10162         every address they contain.
10163
10164         * tests/message/test2.c (main): Added a bunch of stuff to test
10165         decoding/reencoding/etc of internationalised addresses.
10166
10167         * tests/message/lib/address-data.h: Copy of some unicode/other
10168         testing data.  **Beware** of editing this file in emacs, it'll
10169         probably try and convert all the characters to something
10170         unusable.
10171
10172         * tests/lib/camel-test.c (camel_test_break): Add a debugger hook
10173         point.
10174
10175         * camel-mime-utils.c (quoted_encode): Check for space and convert
10176         to _ separately.
10177         (header_decode_mailbox): Fixed the 'check comments for realname'
10178         code, problem was the domain getting code was skipping all
10179         whitespace/comments before we could get a look-in.  This is
10180         approximate but fairly robust.
10181         (header_decode_text): Dont use the c-type isspace func here, we
10182         want a specific whitespace only.
10183         (header_decode_text): If we have decoded words next to each other,
10184         do not insert whitespaces between them, which is what rfc2047 requires.
10185         (header_decode_text): Make c unsigned too.
10186
10187         * tests/README: Added at least some explanation of all this stuff.
10188
10189         * tests/lib/camel-test.h (check_msg): Added a non-gcc version of
10190         the fail command, we dont get the expression that failed, but no
10191         matter.  Should be (more) portable now.
10192         (check, check_msg): Put the file/lineno in the default message.
10193
10194         * Makefile.am (SUBDIRS): Add tests.
10195
10196         * camel-mime-filter-basic.c (filter): Well, I'll add the extra
10197         bytes here too, lathough not strictly needed, might save a
10198         re-malloc when we get to complete().
10199
10200         * camel-mime-filter-charset.c (filter): Make sure we have room if
10201         we only convert very short data.
10202         (complete): and here too.
10203
10204         * tests/Makefile.am: Initial test harness & tests.  Requires gcc
10205         for this.
10206
10207         * camel-internet-address.c (d): Turn off debug.
10208
10209         * camel-charset-map.c (camel_charset_step): Oops, & masks for set
10210         intersection, not | them.  Dunno how this got even close to
10211         working.
10212
10213 2000-11-23  Not Zed  <NotZed@HelixCode.com>
10214
10215         * camel-mime-filter-basic.c (filter): For base64 encoding, the
10216         output size for 0, 1, or 2 bytes of input can exceed input*2, so
10217         make sure we account for that as well.
10218         (complete): And here.
10219         (complete): Similarly for qp encoding, if we have a trailing
10220         space, we need some extra bytes (not needed for 'filter()', as any
10221         such bytes are stored in state/save).
10222
10223         * camel-mime-utils.c (quoted_decode_step): Removed fixme not required.
10224         (quoted_encode_close): Dont append a trailing afterall.  Otherwise
10225         a pass through the encode/decode will grow the message each time.
10226
10227 2000-11-22  Radek Doulik  <rodo@helixcode.com>
10228
10229         * camel-mime-utils.c (header_msgid_generate): check for return
10230         values
10231
10232 2000-11-21  Dan Winship  <danw@helixcode.com>
10233
10234         * camel-lock.c: 
10235         * camel-movemail.c: add #ifdef HAVE_ALLOCA_H
10236
10237 2000-11-21  Not Zed  <NotZed@HelixCode.com>
10238
10239         * providers/local/camel-mh-summary.c (mh_summary_sync_message):
10240         Shite, -1 on error, >=0 on success.  So i've just been truncating
10241         all the messages I touched, good one zed.
10242         (mh_summary_sync_message): Sigh, and write to the right damn fd as
10243         well.
10244         (mh_summary_sync_message): Argh, and we need to compare the length
10245         of the old xev -1 to the new xev, to check if we can optimise it.
10246
10247         * camel-folder.c (camel_folder_change_info_new): Init the pool.
10248         (camel_folder_change_info_add_source): Allocate string in the
10249         pool.
10250         (camel_folder_change_info_add_source_list): 
10251         (camel_folder_change_info_add_update): No longer free the key, as
10252         it cannot be yet.
10253         (change_info_add_uid): Add a new arg, copy, telling it whether to
10254         copy the uid argument or not, and copy using mempool_strdup.
10255         (change_info_cat): Tell add_uid to copy the string.
10256         (camel_folder_change_info_add_update): Call add_uid directly.
10257         (change_info_remove): Call add_uid directly, with no copy, and
10258         dont free the key.
10259         (change_info_free_update): No longer required since we dont malloc
10260         the keys.
10261         (camel_folder_change_info_add_uid): Fix for add_uid change.
10262         (camel_folder_change_info_remove_uid): 
10263         (camel_folder_change_info_change_uid): 
10264         (change_info_clear): No longer needed, just set the size to 0 on
10265         the array directly.
10266         (camel_folder_change_info_clear): Empty the arrays directly, and
10267         flush the mempool too, and also clear uid_source, incase anyone
10268         was silly enough to call us in the wrong order.
10269         (camel_folder_change_info_free): Dont bother clearing the array's
10270         contents, just free the pool and throw away all the indexes.
10271
10272         * camel-folder.h: Added a mempool to CamelFolderChangeInfo to
10273         store the uid's we get.
10274
10275         * camel-folder-search.c (search_match_all): If we are only
10276         matching a single info, just use that/do the search.
10277         (camel_folder_search_match_expression): New function.  Matches a
10278         single message info against an expression.
10279         (camel_folder_search_init): Init a hash table used to map the
10280         returned gptrarrays' to mempools.
10281         (camel_folder_search_execute_expression): Store all of the string
10282         data in a mempool, slightly faster, less wasted space (usually),.
10283         (camel_folder_search_free_result): Check for the mempool that
10284         stores the data for the list, and free that if we have it,
10285         otherwise assume we need to use g_free() (which should only happen
10286         if the list is empty at the moment).
10287         : commented out the debugging prints.  Got sick of 'executing
10288         header search' crap.
10289
10290         * providers/vee/camel-vee-folder.c (camel_vee_folder_init): Init
10291         changes.
10292         (camel_vee_folder_finalise): Free changes.
10293         (vfolder_add_match): Simple helper to add a new matching info
10294         record.
10295         (camel_vee_folder_add_folder): Only trigger a changed event if we
10296         have changes.
10297         (vfolder_change_match): New function, changes our local vfolder
10298         info to match the source.
10299         (vfolder_add_match): Add a new info to the vfolder list.
10300         (vfolder_remove_match): Remove a no-longer matching info from the
10301         vfolder summary.
10302         (message_changed): check if the message still matches, and
10303         remove/etc as required.
10304         (camel_vee_folder_finalise, init): init/free search object.
10305         (vee_folder_build_folder): Build the changes to the folder into
10306         the changes data, as we go.
10307         (folder_changed): If the folder gave us an explicit list of
10308         changes, then process each one separately (unless there's a lot
10309         added/changed).
10310
10311         * providers/vee/camel-vee-folder.h: Added a changes field to the
10312         folder.
10313
10314         * Makefile.am (libcamel_la_SOURCES): Added
10315         camel-folder-thread.[ch].
10316
10317         * camel-folder-thread.c: message-threading algorithm, taken from
10318         evolutions' mail component, as it is generally more useful than
10319         just for evolution itself.  Changed to use e-memchunks as well to
10320         speed it up a little and use less mem.
10321
10322 2000-11-20  Jeffrey Stedfast  <fejj@helixcode.com>
10323
10324         * camel-remote-store.c (remote_recv_line): Fixed to return the
10325         correct bytecount in all cases which is the real fix to
10326         imap_parse_nstring.
10327
10328         * providers/imap/camel-imap-command.c (imap_read_untagged): Again,
10329         don't use strlen for the post-data, use 'n'.
10330
10331         * providers/imap/camel-imap-utils.c (imap_parse_nstring): Undo my
10332         previous temp-fix.
10333
10334 2000-11-20  Not Zed  <NotZed@HelixCode.com>
10335
10336         * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): Fixes for
10337         the summary messageid changes.  Hash the messageid and store it.
10338         (get_XOVER_headers): Use camel_folder_summary_info_new() to create
10339         the summary item before adding it.
10340
10341         * camel-folder-summary.h (CamelMessageInfo): Changed the
10342         messgae-id to be an 8 byte md5 hash, and the references list to be
10343         an array of these.
10344
10345         * providers/local/camel-mh-summary.c (mh_summary_sync_message):
10346         New function, sync out the message info stuff.  Only updates the
10347         X-Ev header if it can get away with it, otherwise writes out a
10348         whole new message.
10349         (mh_summary_sync): Added more functionality.  All summary info is
10350         now written to the X-Ev header, etc, and new messages re-written
10351         if required during the sync process.
10352
10353         * providers/local/camel-local-folder.c
10354         (local_set_message_user_flag): Set the XEVCHANGE flag.
10355         (local_set_message_user_tag): And here too.
10356
10357         * providers/local/camel-local-summary.h: New flag
10358         CAMEL_MESSAGE_FOLDER_XEVCHANGE to indicate the XEV header has
10359         probably changed size and needs to be rewritten in whole.
10360
10361         * camel-folder-summary.c (next_uid_string): Want this static, not
10362         const.
10363         (message_info_new): Store the references and message-id values as
10364         64 bit, binary hashes.
10365         (message_info_load): fix for message-id/references changes.
10366         (message_info_save): Likewise.
10367         (camel_message_info_dup_to): And here.
10368         (camel_message_info_free): And here too.  No longer free
10369         message_id, and simple free for references array.
10370         (CAMEL_FOLDER_SUMMARY_VERSION): Bumped file revision.
10371         (camel_folder_summary_init): Init memchunk allocators to empty.
10372         (camel_folder_summary_finalize): Free memchunk allocators if
10373         there.
10374         (message_info_new): Use the chunk allocator to allocate message
10375         info's. 
10376         (camel_folder_summary_info_new): New helper to allocate the
10377         message info, and setup the memchunk if required.
10378         (content_info_alloc): Likewise for content info's.
10379         (message_info_load): Use summary_info_new_empty.
10380         (content_info_new): Use content_info_alloc.
10381         (content_info_load): "
10382         (content_info_free): Free the content info as a memchunk.
10383         (message_info_free): Free everything directly and the base as a
10384         memchunk, rather than calling camel_message_info_free(), which
10385         assumes a malloc'd array.
10386
10387         * providers/local/camel-local-summary.c: Include ctype.h, kill a
10388         warning.
10389         (local_summary_decode_x_evolution): If we get a NULL message info,
10390         then dont try and set anything, just check for validity.
10391         (camel_local_summary_write_headers): New function to write a set
10392         of headers to an fd.
10393         (camel_local_summary_check): Added some statistic generation
10394         stuff for memory profiling.
10395
10396         * providers/local/camel-mbox-summary.c (header_write): Changed to
10397         use stdoi functions to write out the header to a buffered stream,
10398         instead of using writev, which is apparently slow (and writing
10399         each line separately is slow anyway).
10400         (mbox_summary_sync_full): New implementation.  Does things
10401         differently, doesn't use or require the content info stuff.
10402         (summary_rebuild): Dont return an error if we start scanning at
10403         the end of file.
10404         (mbox_summary_sync_full): If we are not writing out new headers,
10405         make sure we copy the From line as we go, and update frompos
10406         appropriately.
10407         (mbox_summary_sync_full): Always copy the From line from the
10408         existing one, rather than trying to make one up ourselves.
10409         (mbox_summary_sync): If we can get by with a quick-sync, then try
10410         it, if that fails, then try a full sync anyway.
10411         (mbox_summary_sync_quick): Quick sync.  Only update system flags,
10412         etc.
10413         (mbox_summary_sync_full): Use the proper local summary encode_xev
10414         function.
10415         (header_evolution_decode): Removed, no longer needed.
10416         (header_evolution_encode): Same.
10417         (copy_block): No longer needed, removed.
10418         (header_write): Removed, replaced with
10419         camel_local_summary_write_headers.
10420         (mbox_summary_sync_full): Fixed for header_write change.
10421
10422         * camel-mime-parser.c (folder_scan_step): Implement the new
10423         optional parser state HSCAN_PRE_FROM, that returns the (currently
10424         unfiltered) input data.
10425         (folder_scan_drop_step): Do the right thing for the PRE_FROM
10426         state.
10427         (camel_mime_parser_scan_from): Update the doco.
10428         (camel_mime_parser_scan_pre_from): Ok, make this behaviour
10429         optional, it simplifies a lot of loops that dont otherwise need to
10430         know about it.
10431         (folder_scan_step): Made the PRE_FROM state optional.
10432         (struct _header_scan_state): Made the bool vars 1 bit.
10433         (folder_pull_part): Free the from_line buffer if it is there.
10434         (folder_scan_skip_line): Added a new arg, can save the skpped data
10435         to a byte_array, as we go.
10436         (folder_scan_step): Fixed calls to skip_line approrpiately.  Now
10437         we save the from line as we parse it.
10438         (camel_mime_parser_read): New function to read from the mime
10439         parser buffer directly.  Useful if you use the parser to read the
10440         first/some headers, then need to scan the rest of the data,
10441         without needing to use a seek(), or allocate your own buffers.
10442
10443         * camel-mime-parser.h (struct _header_state): Added a new parser state,
10444         pre-from which returns any data found before a from line during
10445         parsing (all other data can be retrieved by the caller except
10446         this).
10447
10448 2000-11-17  Jeffrey Stedfast  <fejj@helixcode.com>
10449
10450         * providers/imap/camel-imap-utils.c (imap_parse_nstring): When
10451         extracting a literal string, capture up until the end of the last
10452         line - this we we don't lose any data if the byte count is off.
10453
10454         * providers/imap/camel-imap-command.c (imap_read_untagged): Use
10455         the byte-read count to decrement the number of bytes left to read
10456         rather than using strlen. Not only does this protect against a DoS
10457         (embedded NUL chars in the literal string would make strlen
10458         inaccurate) but it also improves performace a little.
10459
10460         * camel-remote-store.c (remote_recv_line): *Sigh* Return the
10461         number of bytes read on success rather than 0. Also don't use
10462         camel_stream_buffer_read_line since we can't get an accurate octet
10463         count.
10464
10465 2000-11-17  Not Zed  <NotZed@HelixCode.com>
10466
10467         * providers/local/camel-local-summary.c (local_summary_add): Clear
10468         the NOXEV/FLAGGED bits, since we do have an xev header.  um m,
10469         maybe this is right, this assumes a write is following.  Maybe
10470         this should be done in folder::append() instead ...
10471
10472         * camel-stream-buffer.c (camel_stream_buffer_gets): We should
10473         always terminate the string.  No need to check outptr is in range,
10474         its already been checked.
10475
10476         * providers/local/camel-mbox-summary.c (mbox_summary_sync): When
10477         we update the summary, do it from mbox_summary->folder_size, not
10478         the content info endpos (which isn't any good anymore anyway).
10479
10480         * providers/local/camel-mbox-folder.c (mbox_append_message): Set
10481         the frompos from the current folder size, since summary_add wont
10482         have initialised it to anything useful.
10483
10484 2000-11-16  Not Zed  <NotZed@HelixCode.com>
10485
10486         * providers/local/camel-local-summary.c
10487         (local_summary_encode_x_evolution): Check the uid string is all
10488         digits before trying to write a 'standard' x-ev header.
10489
10490         * providers/local/camel-maildir-summary.c
10491         (camel_maildir_summary_info_to_name): Convert an info into a
10492         maildir name:info filename.
10493         (camel_maildir_summary_name_to_info): Convert a name:info filename
10494         into an info, and tell us if it didn't match it.
10495         (message_info_new): When creating a new filename, gets its info
10496         from the flags field.  Likewise if creating from an existing file,
10497         extract the flags.
10498         (maildir_summary_sync): Remove a small memleak.  Also, if our
10499         flags and that requires a filename change, perform that here.
10500         (message_info_new): Get the received date from the filename.
10501         Also, dont overwirte the uid if we have one.
10502         (maildir_summary_check): Sort the summary in received order before
10503         completion.
10504         (maildir_summary_next_uid_string): Test the name for collusions
10505         before we give it out.  Retry, and if that fails, well, I guess we
10506         collide :(
10507
10508         * providers/local/camel-mbox-folder.c (mbox_lock): Implement mbox
10509         locking.
10510         (mbox_unlock): And unlocking.
10511         (mbox_append_message): Lock the folder for write before doing
10512         anything.
10513         (mbox_get_message): Lock the folder for read before doing
10514         anything.
10515
10516         * providers/local/camel-local-folder.c (camel_local_folder_lock):
10517         Implement something here.  We handle the recursive ability but
10518         pass the locking to the folder itself.
10519         (camel_local_folder_unlock): Likewise for unlocking.
10520         (local_lock): Default - do nothing, return success.
10521         (local_unlock): Same.
10522         (local_sync): Changed slightly for locking api changes, and also,
10523         only lock around the sync process itself.
10524
10525         * camel-lock.c: New file - utility functions for locking using
10526         different strategies and/or for locking folders safely.
10527
10528         * Makefile.am (libcamel_la_SOURCES): Adde camel-lock.[ch]
10529
10530 2000-11-15  Radek Doulik  <rodo@helixcode.com>
10531
10532         * camel-mime-utils.c: mime_guess_type_from_file_name moved back to
10533         composer as it introduced unwanted VFS dependency
10534         removed  #include <libgnomevfs/gnome-vfs.h>
10535
10536 2000-11-15  Not Zed  <NotZed@HelixCode.com>
10537
10538         * providers/Makefile.am: Removed local again, not quite ready.
10539
10540 2000-11-14  Not Zed  <NotZed@HelixCode.com>
10541
10542         * camel-folder-summary.c (message_info_new_from_message): Use
10543         message_info_new to create the summary from headers, instead of
10544         getting directly from the message.
10545         (format_recipients): No longer required.
10546
10547         * providers/Makefile.am (SUBDIRS): Added local.
10548
10549 2000-11-11  Not Zed  <NotZed@HelixCode.com>
10550
10551         * camel-mime-parser.c (folder_push_part): Make sure 'atleast' is
10552         at least 1, always.  This is possibly a temporary fix for a
10553         bad failure mode on bad multipart messages.
10554         (folder_scan_content): Go until inend, not inend+1.  Changed the
10555         continuation and retry logic to be simpler and more robust.  If we
10556         can't find a marker within
10557         the atleast we need, just set it to 1, and try again, rather than
10558         just going to the next smaller limit (boundary check checks the
10559         length anyway).
10560         (header_append): streamline the empty line case.  And strip
10561         trailing \r's if there are any (\n's already stripped).
10562         (folder_scan_header): Reordered and cleaned up a lot.  Check for
10563         continuation only once, and compress lwsp then. Assume the header
10564         buffer already has end of line's stripped, and simplify some things:
10565                 Only check for end of headers once and easier.
10566                 Dont check to remove end of line character
10567         Dont bother testing inptr-start if we get a boundary match - it is
10568         always zero.
10569         (folder_scan_header): Removed the unused part variable, and a few
10570         pointless assignments.
10571         (folder_scan_header): Change the end limit to be 1 higher, to make
10572         sure we get all content.
10573         (folder_scan_content): And here too.
10574         (folder_scan_header): Killed a warning.
10575         (folder_push_part): Removed a bad comment.  Actually
10576         boundarylenfinal can be zero for a new message not in a
10577         multipart.  So we fix that here.
10578
10579 2000-11-09  Not Zed  <NotZed@HelixCode.com>
10580
10581         * camel-mime-utils.c (header_decode_param_list): Renamed from
10582         header_param_list_decode.
10583         (header_param_list_decode): New external function to decode a
10584         parameter list.
10585         (header_param_list_format_append): Made public.
10586         (header_param_list_format): Another new public helper function for
10587         formatting just a param list.
10588
10589         * camel-folder-summary.c (next_uid_string): Default implementation
10590         is the same as before.
10591         (camel_folder_summary_class_init): And set it up.
10592
10593         * camel-folder-summary.h: Make next_uid_string a virtual function.
10594
10595         * camel-folder.c (camel_folder_change_info_changed): New function
10596         to return true if the changeset contains any changes.
10597
10598 2000-11-14  Jeffrey Stedfast  <fejj@helixcode.com>
10599
10600         * camel-stream.c (camel_stream_printf): Don't cast an int to a
10601         ssize_t.
10602
10603 2000-11-10  Dan Winship  <danw@helixcode.com>
10604
10605         * providers/mbox/camel-mbox-summary.c
10606         (camel_mbox_summary_build_from): put a space before a single-digit
10607         day of the month since it seems some mailers are fantastically
10608         picky about this. (bugs.gnome.org #27232)
10609
10610 2000-11-10  Radek Doulik  <rodo@helixcode.com>
10611
10612         * camel-mime-utils.c (header_msgid_generate): fix ids ending with '.'
10613
10614 2000-11-09  Dan Winship  <danw@helixcode.com>
10615
10616         * providers/imap/camel-imap-auth.c (imap_try_kerberos_v4_auth):
10617         Fix error handling. (Only send a "*" to bail out of authentication
10618         if the server hasn't already bailed on us.)
10619
10620 2000-11-08  Radek Doulik  <rodo@helixcode.com>
10621
10622         * camel-mime-utils.c (mime_guess_type_from_file_name): new
10623         function, moved from composer
10624
10625 2000-11-08  Not Zed  <NotZed@HelixCode.com>
10626
10627         * camel-mime-message.c (find_best_encoding): Keep track of the
10628         caller bestenc flags that make sense.
10629         
10630         * camel-mime-filter-bestenc.c (filter): Added code to detect when
10631         we have "^From " lines in the sequence of text.
10632         (camel_mime_filter_bestenc_get_best_encoding): Added a new flag
10633         CAMEL_BESTENC_NO_FROM: if set, it will not allow any lines
10634         matching "^From " to appear in the output - currently forcing
10635         base64 encoding to achieve this.
10636
10637         * camel-mime-parser.c (folder_scan_step): Call
10638         camel_mime-filter_complete() once we're done, rather than
10639         filter_filter().
10640         (folder_scan_content): Some fixes for state changing; so that when
10641         we do find another boundary it is properly flagged.  Since we
10642         strip the last \n off all data, we must take that into account
10643         too.  Sigh.  Fixes a rather nasty set of bugs where multipart
10644         messages could start including following messages as parts, etc.
10645         (struct _header_scan_stack): Added new parameter,
10646         boundarylenfinal, which holds the length of the final boundary, if
10647         it is different (e.g. for From lines, whihc aren't)
10648         (folder_scan_step): Setup teh boundarylenfinal value when creating
10649         a new boundary.
10650         (folder_scan_content): Hmm, if we hit the end-of-buffer sentinal,
10651         reset the scanner back to leave 'atleast' chars in the buffer
10652         still, dump that content, and retry again.  Stops us losing a
10653         check for a boundary on some data we haven't really looked at yet!
10654         (folder_scan_content): Use boundarylenfinal to calculate
10655         'atleast'.
10656         (folder_scan_header): And here too.
10657         (folder_boundary_check): Use the atleast value directly, dont
10658         truncate it.  Use the boundarylen/boundarylenfinal values directly
10659         too.
10660         (struct _header_scan_stack): Add an atleast parameter to cache the
10661         atleast info.
10662         (folder_push_part): Determine/set 'atleast', every time we add a
10663         new part.
10664         (folder_scan_header): Get the cached atleast info from the current
10665         part.
10666         (folder_scan_content): And here too.
10667         (folder_scan_header): Fix a problem where a part starting with
10668         " text" would be interpreted as a followon header wrongly.
10669
10670         * camel-mime-filter-charset.c (complete): Add some assertions to
10671         find a bug.
10672
10673 2000-11-07  Ettore Perazzoli  <ettore@helixcode.com>
10674
10675         * camel-service.c (get_name): Strdup the "???" string you return,
10676         so that the expected semantics for `::get_name()' is respected.
10677
10678 2000-11-07  Dan Winship  <danw@helixcode.com>
10679
10680         * camel-stream-filter.c (d): Kill debugging, as it causes lots of
10681         evolution-mail spewage.
10682
10683 2000-11-07  Not Zed  <NotZed@HelixCode.com>
10684
10685         * camel-mime-filter-bestenc.c (complete): Implement a complete()
10686         function, now we need one.
10687         (filter): Upgraded to match rfrc2045 properly.  Checks also for
10688         length of line and valid CRLF sequences.
10689         (camel_mime_filter_bestenc_get_best_encoding): Do the work of
10690         working out what is the best encoding given what we found about
10691         the stream.
10692
10693         * camel-mime-part.c (camel_mime_part_encoding_to_string): Use a
10694         lookup table to get the encoding naem, and add the binary type.
10695         (camel_mime_part_encoding_from_string): Likewise for the reverse.
10696
10697         * camel-mime-part.h: Added the binary encoding type, see rfc2045.
10698
10699         * camel-mime-utils.c (header_param_list_format_append): Dont put a
10700         space before ;'s in parameter lists, makes them more
10701         readable/consistent.
10702
10703         * camel-mime-message.c (multipart_has_8bit_parts): Cleaned up the
10704         old stuff, well removed it.
10705         (camel_mime_message_set_best_encoding): Added another argument
10706         that lets you select what you want to set the best of.  i.e. for
10707         smtp transport we only need 7 bit, and dont need to optimise the
10708         charset (although of course, we should always).
10709         (find_best_encoding): Implement this feature, if we are not
10710         getting the best charset, use the one we have.
10711         (best_encoding): Set the charset on the part appropriately.  Sigh,
10712         the interfaces for this are nonexistant.
10713         (find_best_encoding): Tell the bestenc filter that lf should be
10714         treated as crlf for the purposes of determining encodings.
10715
10716 2000-11-06  Not Zed  <NotZed@HelixCode.com>
10717
10718         * camel-charset-map.c (camel_charset_init): Init function for an
10719         iterative charset determinator.
10720         (camel_charset_step): Iterate another buffer.
10721         (camel_charset_mask): Removed, since it couldn't have worked.
10722         (camel_charset_best): Use the iterative interface to do the work.
10723         (camel_charset_best_name): Get the best name for a charset so far.
10724
10725         * camel-mime-filter-bestenc.c: New class, a stream
10726         filter that can be used to memory-efficiently determine the best
10727         encoding and/or charset to use for a given stream of bytes.
10728
10729         * Makefile.am (libcamelinclude_HEADERS): Added stream-null*.
10730         (libcamel_la_SOURCES): Added bestenc*
10731
10732         * camel-stream-null.c: New class, a null-stream, that always
10733         succeeds, and never has any contents.
10734
10735         * camel-stream.c: Minor pointless changes.  Was going to do
10736         something else but changed my mind.  Added trivial default
10737         implementations for all callbacks.
10738
10739         * camel-mime-message.h: Cleaned up some old cruft.
10740
10741         * camel-folder-summary.c (camel_folder_summary_format_address):
10742         address_list_format() no longer encodes, so we dont need to decode
10743         it.
10744
10745         * camel-address.c (camel_address_unformat): New function, attempts
10746         to reverse the formatting process on display addresses.
10747         (camel_address_length): New function to get the number of
10748         addresses, without having to peek the structure.
10749
10750         * camel-mime-message.c (camel_mime_message_set_from): Fix a typo.
10751         (camel_mime_message_finalize): Only unref from/reply_to if we have
10752         it.
10753         (camel_mime_message_set_recipients): New function - set the
10754         recipients as a CamelInternetAddress.  This function effectively
10755         deprecates the older recipient setting functions.
10756         (camel_mime_message_add_recipient): What the hell, i'll bite the
10757         bullet.  Terminate this function.  The old api was ambiguious and
10758         inefficient and didn't work right anyway.
10759         (camel_mime_message_remove_recipient_address): And this one.
10760         (camel_mime_message_remove_recipient_name): And this one too.
10761         (camel_mime_message_set_recipients): If we set an empty header,
10762         then remove it from the header list.  Allow a null receipient
10763         object to clear a header.
10764         (camel_mime_message_set_from): Likewise, if setting an empty from
10765         address.
10766         (camel_mime_message_encode_8bit_parts): Eeek!!
10767         camel_stream_mem_new_with_byte_array owns the byte_array we give
10768         it, so make sure we dont free any of it!
10769         (camel_mime_message_encode_8bit_parts):  Infact, i'll just rewrite
10770         the whole lot, its a bit of a mess.  Should really rename it and
10771         make it a little more useful too, lets see ...
10772         (best_encoding): This has a string interface?  Oh boy.
10773         (camel_mime_message_foreach_part): New experimental function to
10774         iterate over all message parts.  Might not remain.
10775         (camel_mime_message_has_8bit_parts): New implementation using
10776         foreach_part.  Fixed a couple of problems.
10777         (find_best_encoding): New function, that finds the best encoding
10778         for a given part (will probably be moved to camel-mime-part), and
10779         also the best charset to use if it is a text part.  Since one
10780         affects the other it is a two pass process, but uses streams and
10781         not memory to achieve this.
10782         (camel_mime_message_set_best_encoding): Uses the function above to
10783         configure an entire message for the best encoding possible given
10784         transport constraints.
10785         (camel_mime_message_encode_8bit_parts): Reimplemented to use the
10786         function above to perform the work.
10787
10788         * camel-internet-address.c
10789         (camel_internet_address_format_address): Dont put <> around a lone
10790         address with no real name.
10791         (camel_internet_address_encode_address): Similarly.
10792         (internet_decode): Actually return the count of decoded addresses.
10793         (internet_unformat): Implement the unformatting routine.
10794
10795 2000-11-05  Not Zed  <NotZed@HelixCode.com>
10796
10797         * providers/smtp/camel-smtp-transport.c (_send_to): Changed to get
10798         the internetaddress directly, rather than having to parse it
10799         itself.
10800
10801         * camel-address.c (camel_address_format): Added a new function
10802         which will format address, suitable for display.
10803         (camel_address_cat): Concatentate 1 camel address onto another.
10804         It is upto the caller to ensure the addresses are of compatible
10805         types.
10806         (camel_address_new_clone): New function to create a new address by
10807         copying an existing one of the same type.
10808         (camel_address_copy): New helper function to copy an address.
10809
10810         * camel-mime-message.h (struct _CamelMimeMessage): Removed cached
10811         copy of date string.
10812         (struct _CamelMimeMessage): Added date_received info.
10813
10814         * camel-mime-message.c (camel_mime_message_get_date_string):
10815         Removed.  Nothing uses it anyway, and it is redundant.
10816         (camel_mime_message_finalize): No more date_str.
10817         (camel_mime_message_init): No more date_str, initialise
10818         date_received*
10819         (write_to_stream): Change the check for a date header.
10820         (process_header): No longer track the date_str.
10821         (camel_mime_message_get_received_date): Removed.  totally invalid
10822         anyway.
10823         (camel_mime_message_get_sent_date): Removed.  Redundant.  The only
10824         'date' is the sent date, the received date is just made up.
10825         (camel_mime_message_get_date): Args changed to be more consistent
10826         with utility functions.
10827         (camel_mime_message_get_date): Dont set the date when we're asked
10828         for it (if its not set by the time its written, it'll be set
10829         then).
10830         (camel_mime_message_get_date_received): Actually do 'the right
10831         thing' here, if we have a received header, use that to determine
10832         the received date.  And return the data in the same format as
10833         get_date.
10834         (camel_mime_message_set_from): Changed the api to better match
10835         what we should be doing.  Pass a camelinternetaddress, etc.
10836         (camel_mime_message_set_reply_to): Cahnged similarly to take an
10837         internetaddress.
10838         (camel_mime_message_get_reply_to): Likewise.
10839         (camel_mime_message_finalize): Unref the from/reply_to objects.
10840         (format_address): Removed, no longer needed.
10841         (process_header): Changed to store the from/reply_to as
10842         internetaddress's.
10843         (write_to_stream): Set the from header directly to empty, if we
10844         dont have one.  Maybe we should just abort, and/or create one
10845         based on the current user.
10846
10847         * camel-mime-utils.c (header_address_list_format): Renamed to
10848         header_address_list_encode, which is what it is actually doing.
10849         (header_address_list_format_append): Similarly.
10850         (encoding_map[]): Removed, no longer used.
10851         (header_address_list_encode_append): Take another arg, do we
10852         encode the address (for internet), or not (for display - utf8
10853         only).
10854         (header_address_list_format): Re-added this function, but now it
10855         generates a display version only.  Surprise surprise, that is all
10856         anythign needs to generate anyway.  Sigh.
10857
10858         * camel-internet-address.c (camel_internet_address_get): Return
10859         false if we get an invalid index only.
10860         (camel_internet_address_encode_address): Helper function to encode
10861         a single address for mailing.
10862         (internet_encode): Use the above function to format it.
10863         (camel_internet_address_format_address): Format a single address
10864         for display.
10865         (internet_format): Implement the display version.
10866         (camel_internet_address_class_init): Init the internet_format
10867         virtual function.
10868         (internet_cat): Implement virtual function to concatenate
10869         addresses.
10870
10871         * camel-folder-summary.c
10872         (camel_folder_summary_info_new_from_header): new function, only
10873         build the summary info, dont add it.
10874         (camel_folder_summary_info_new_from_parser): Likewise, for new
10875         info from parser.
10876         (camel_folder_summary_add_from_parser): Cahnged to call function
10877         above to build info.
10878         (camel_folder_summary_add_from_header): Changed to call function
10879         above, to build info.
10880         (camel_folder_summary_info_free): New function to free the summary
10881         message info.
10882         (camel_folder_summary_clear): Changed to clal above to free info.
10883         (camel_folder_summary_remove): Likewise.
10884         (camel_folder_summary_add): Cleaned up the clashing uid
10885         re-assignment logic a little bit.
10886         (camel_folder_summary_decode_uint32): Fixed a typo, 01 != -1.
10887         (camel_folder_summary_decode_time_t): Return -1 on error.
10888         (camel_folder_summary_encode_off_t): New function to encode an
10889         off_t type.
10890         (camel_folder_summary_decode_off_t): And likewise for the reverse.
10891         (CAMEL_FOLDER_SUMMARY_VERSION): Bumped the summary version, since
10892         we're now encoding time/off_t's right.
10893         (summary_header_save): Use time_t encoder to save the timestamp.
10894         (summary_header_load): Likewise for decoding the timestamp.
10895         (content_info_load): Decode off_t types directly, now we can.
10896         (content_info_save): And likewise for encoding.
10897         (camel_folder_summary_add_from_message): New function, create a
10898         summary item from an existing message and add it.
10899         (camel_folder_summary_info_new_from_message): New function, create
10900         a summary item from an existing message.
10901         (summary_build_content_info_message): New function to do the dirty
10902         work of building the conent info/indexing, from a message source.
10903         (format_recipients): Format an internetaddress suitable for the
10904         summary.
10905         (message_info_new_from_message): Build a new summary item from a
10906         mime message.
10907         (content_info_new_from_message): Build a new conent info from a
10908         mime part.
10909         (camel_folder_summary_class_init): Init the new class functions.
10910         (message_info_new_from_message): Fixed for message api change.
10911
10912         Added documentation to the functions.
10913         
10914 2000-11-03  Radek Doulik  <rodo@helixcode.com>
10915
10916         * camel-mime-utils.c (header_msgid_generate): new function,
10917         generates simple message/content id
10918
10919 2000-11-04  Not Zed  <NotZed@HelixCode.com>
10920
10921         * camel-mime-part-utils.c
10922         (camel_mime_part_construct_content_from_parser): Set the
10923         preface/postface from the parser into the multipart object.
10924
10925         * camel-multipart.c (camel_multipart_set_postface): Function to
10926         set the postface text on a multipart.
10927         (camel_multipart_set_preface): Similarly for preface text.
10928
10929         * camel-mime-parser.c (folder_scan_content): If we scan until a
10930         boundary, then we do not include the \n that starts the boundary
10931         line in the content.
10932         (struct _header_scan_stack): Added a ByteArray to store the
10933         multipart pre/post-text as we're scanning.
10934         (folder_pull_part): Free pre/posttext if they are allocated.
10935         (folder_scan_step): Build into the pre/posttext arrays as we
10936         encounter data.
10937         (camel_mime_parser_preface): REturn the multipart preface text, if
10938         there is any scanned.
10939         (camel_mime_parser_postface): Likewise for postface text.
10940         (byte_array_to_string): helper function for above.
10941
10942         * providers/mbox/camel-mbox-folder.c (mbox_append_message): Change
10943         the from line to be "\nFrom ..." always, so no need to
10944         check/append a \n to messages.
10945         (mbox_append_message): Open the output stream with append mode
10946         [assuming this is more efficient than seeking to the end]
10947         And dont prepend \n  on the From line if its the first in the
10948         mbox.
10949         (mbox_append_message): Pass the offset of the real start of the
10950         "From " line when we perform the update (which may != 'seek')
10951
10952         * camel-mime-filter-charset.c (complete): Removed the terminating
10953         NUL 'fix'.
10954
10955         * camel-stream-filter.c (do_read): Added some debug.
10956         (do_flush): And here.
10957         (do_write): And here too.
10958         (do_write): ARGH!!! ARGH!  Ok, so the filter stream was writing a
10959         different number of bytes than the requester was asking it to
10960         write (because of filtering, of course!).  So instead of returning
10961         the true number of written bytes, we'll return what they asked us
10962         to write - unless there is an error in which case we return -1.
10963
10964         * camel-mime-utils.c (base64_encode_close): Sigh, forgot to make
10965         it unsigned.  I think this is actually a gcc bug as (48 >> 2)
10966         somehow ended up negative, when it obviously should not, even if
10967         the data load was signed.
10968
10969 2000-11-03  Jeffrey Stedfast  <fejj@helixcode.com>
10970
10971         * camel-url.c: Undo my incorrect fix - I misunderstood danw -
10972         sorry!
10973
10974 2000-11-03  Dan Winship  <danw@helixcode.com>
10975
10976         * providers/pop3/camel-pop3-store.c (camel_pop3_store_expunge):
10977         Unbreak this.
10978
10979 2000-11-03  Jeffrey Stedfast  <fejj@helixcode.com>
10980
10981         * camel-url.c (camel_url_to_string): If show_pass, then base64 the
10982         password before writing it to the output string.
10983         (camel_url_new): Assume password has been base64 encoded and
10984         decode accordingly.
10985
10986 2000-11-03  Dan Winship  <danw@helixcode.com>
10987
10988         * camel-provider.h: Add an "url_flags" field to CamelProvider.
10989         Move the CAMEL_SERVICE_URL_* defines here and remove the SERVICE_
10990         part of the name.
10991
10992         * camel-service.h: Remove CAMEL_SERVICE_URL_* flags and
10993         service->url_flags field.
10994
10995         * camel-service.c (check_url, get_path): Get URL flags from
10996         service->provider, update for changed flag names.
10997
10998         * providers/*/camel-*-provider.c: Add URL flags to provider
10999         structures.
11000
11001         * providers/*/camel-*-{store,transport}.c, camel-remote-store.c:
11002         Remove service->url_flags initialization.
11003
11004 2000-11-02  Jeffrey Stedfast  <fejj@helixcode.com>
11005
11006         * providers/imap/camel-imap-store.c (get_folder_info): Quote
11007         foldernames when sending to the IMAP server because the folder
11008         name might contain spaces.
11009
11010 2000-11-02  Not Zed  <NotZed@HelixCode.com>
11011
11012         * Merged in camel-incremental-branch.
11013
11014 2000-11-01  Dan Winship  <danw@helixcode.com>
11015
11016         * providers/imap/camel-imap-store.c (get_folder_info): Remove old
11017         subbed folders from hash table after freeing them.
11018
11019         * providers/imap/camel-imap-folder.c (imap_get_full_name): Deal
11020         correctly with namespace == ""
11021
11022 2000-11-01  Gediminas Paulauskas  <menesis@delfi.lt>
11023
11024         * camel-charset-map.c, camel-charset-map-private.h: synced all charsets
11025         with ones found in libunicode. Just include more "iso/*.h" and rebuild
11026         ...private.h with this.
11027         
11028 2000-10-31  Dan Winship  <danw@helixcode.com>
11029
11030         * camel-service.c (service_disconnect): Add a new argument, clean,
11031         that says whether or not to try to disconnect cleanly.
11032
11033         * camel-remote-store.c (remote_send_string, remote_send_stream,
11034         remote_recv_line): disconnect uncleanly on failure to prevent
11035         infinite loops when providers would normally send commands from
11036         disconnect(). Remove some unneeded CamelException goo.
11037
11038         * providers/smtp/camel-smtp-transport.c (smtp_disconnect): 
11039         * providers/pop3/camel-pop3-store.c (pop3_disconnect): 
11040         * providers/nntp/camel-nntp-store.c (nntp_store_disconnect):
11041         * providers/imap/camel-imap-store.c (imap_disconnect): Don't send
11042         QUIT/LOGOUT if !clean.
11043
11044 2000-10-30  Dan Winship  <danw@helixcode.com>
11045
11046         * providers/imap/camel-imap-auth.c: New file with code for IMAP
11047         authentication mechanisms. (Currently just krb4, and without
11048         integrity/privacy protection).
11049
11050         * providers/imap/Makefile.am: Add camel-imap-auth.[ch] and krb4
11051         CFLAGS/LDFLAGS
11052
11053         * providers/imap/camel-imap-store.c (connect_to_server): Split out
11054         from imap_connect. Just does the basic connect and CAPABILITY
11055         check. Redo the CAPABILITY code more robustly.
11056         (query_auth_types_connected): Do this right rather than punting to
11057         query_auth_types_generic. Check for KERBEROS_V4 if compiled with
11058         krb4 support.
11059         (query_auth_types_generic): Mention KERBEROS_V4 if compiled with
11060         krb4 support.
11061         (imap_connect): Use connect_to_server().
11062
11063         * camel-mime-utils.c (base64_encode_step, base64_encode_close):
11064         Take an additional argument, "break_lines", saying whether or not
11065         to add '\n's to the output.
11066
11067         * camel-multipart.c (set_boundary): 
11068         * camel-mime-filter-basic.c (filter, complete): Update for base64
11069         api change.
11070
11071 2000-10-30  Peter Williams  <peterw@helixcode.com>
11072
11073         * providers/imap/camel-imap-store.c (unsubscribe_folder): Correct
11074         parameters to g_hash_table_lookup_extended.
11075
11076 2000-10-29  Dan Winship  <danw@helixcode.com>
11077
11078         Improved IMAP namespace handling: leave the namespace in the
11079         folder names rather than constantly prepending it and stripping it
11080         off. Also some subscription fixes.
11081
11082         * camel-store.c (camel_folder_info_build): Fix for the case where
11083         @top isn't in @folders.
11084
11085         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Add
11086         a "short_name" argument rather than figuring it out ourselves.
11087         (imap_get_full_name): Implementation of CamelFolder::get_full_name
11088         that strips off namespace so the user doesn't have to see it.
11089         (imap_append_message, imap_copy_message_to, imap_move_message_to):
11090         Use folder->full_name rather than calling
11091         camel_imap_store_get_folder_path.
11092
11093         * providers/imap/camel-imap-utils.c (imap_parse_list_response):
11094         Update this: make @flags a bitmask and @sep a char rather than a
11095         string. Make all of the out arguments optional. Handle literals in
11096         the server response.
11097
11098         * providers/imap/camel-imap-store.c (imap_connect): Do a better
11099         job of getting the correct dir_sep for the namespace we're using.
11100         Construct a base_url here that will be used by get_folder_info.
11101         (camel_imap_store_folder_path): Removed
11102         (imap_folder_exists): Add an argument to return the short name of
11103         the folder (parsed out of the LIST response). Update for
11104         imap_parse_list_response change.
11105         (get_folder): Update for the various other changes.
11106         (get_folder_info): Update for the various other changes. Be more
11107         consistent about the returned layout: put everything underneath
11108         the "namespace" directory, including INBOX, even if it doesn't
11109         belong there. Don't destroy the list of subscribed folders until
11110         we've actually gotten the new list.
11111         (folder_subscribed, subscribe_folder, unsubscribe_folder): Use
11112         folder_name directly rather than camel_imap_store_folder_Path.
11113
11114         * providers/imap/camel-imap-command.c (camel_imap_command): Update
11115         for folder name changes.
11116
11117 2000-10-29  Dan Winship  <danw@helixcode.com>
11118
11119         * camel.h: Remove md5-utils.h include since it's not part of Camel
11120         any more.
11121
11122         * camel-charset-map.c: Kill some warnings.
11123
11124         * providers/nntp/camel-nntp-grouplist.c
11125         (camel_nntp_get_grouplist_from_file, camel_nntp_grouplist_save):
11126         Clean up warnings about time_t casts.
11127
11128         * providers/smtp/camel-smtp-transport.c: Remove unused md5-utils.h
11129         include.
11130
11131         * providers/pop3/camel-pop3-store.c: Undefine the "_" macro
11132         defined by krb4's des.h when compiling with krb support.
11133         Fix md5-utils.h include.
11134
11135 2000-10-27  Dan Winship  <danw@helixcode.com>
11136
11137         * camel-mime-utils.c (header_param_list_format_append): Only quote
11138         Content-type parameters when the quoting is mandatory, and deal
11139         with embedded quotes/backslashes when quoting.
11140
11141 2000-10-27    <jpr@helixcode.com>
11142
11143         * providers/pop3/Makefile.am: Tidy up build
11144
11145         * providers/smtp/Makefile.am: ditto     
11146         
11147         * Makefile.am:  Move md5-utils.[hc] to e-util because the 
11148         addressbook is going to use md5 hashes for pilot syncing.
11149         Maybe the calendar conduits as well because this is a good idea
11150         Chris had.
11151
11152 2000-10-26  Kjartan Maraas  <kmaraas@gnome.org>
11153
11154         * camel-exceptions-list.def: Add newline to kill warnings.
11155         
11156 2000-10-25  Dan Winship  <danw@helixcode.com>
11157
11158         * providers/imap/camel-imap-store.c (get_folder_info): Fix folder
11159         listing code infinite loop.
11160
11161         * camel-store.h: Add a "parent" field to CamelFolderInfo.
11162
11163         * camel-store.c (camel_folder_info_build): Deal with "parent"
11164         (camel_store_folder_subscribed, camel_store_subscribe_folder,
11165         camel_store_unsubscribe_folder): Add g_return_if_fails checking
11166         that the folder supports subscriptions.
11167
11168         * providers/imap/camel-imap-store.c (folder_subscribed,
11169         subscribe_folder, unsubscribe_folder): Remove "+ 1"s since the
11170         mail subscribe UI won't prepend / to the folder names now.
11171         (get_folder_info): Clear the "parent" field of the folderinfos
11172         when removing an empty top level.
11173
11174         * providers/nntp/camel-nntp-store.c (nntp_store_folder_subscribed,
11175         nntp_store_subscribe_folder, nntp_store_unsubscribe_folder):
11176         Remove "+ 1"s since the mail subscribe UI won't prepend / to the
11177         folder names now.
11178
11179 2000-10-24  Chris Toshok  <toshok@helixcode.com>
11180
11181         * providers/imap/camel-imap-store.h: add subscribed_folders.
11182
11183         * providers/imap/camel-imap-store.c (camel_imap_store_class_init):
11184         fill in vtable entries for subscription functions.
11185         (camel_imap_store_finalize): new function, so we can free up our
11186         subscribed_folders hashtable.
11187         (camel_imap_store_init): set CAMEL_STORE_SUBSCRIPTIONS in the
11188         CamelStore flags, and create our subscribed_folders hashtable.
11189         (camel_imap_store_get_type): camel_imap_store_finalize is our
11190         finalize function.
11191         (get_folder_info): if we're looking at subscribed_only, clear out
11192         the subscribed_folders hashtable, use LSUB instead of LIST, and
11193         insert folder paths (prepended by their namespace if there is one)
11194         into subscribed_folders.  INBOX subscription support needs work,
11195         since we always show it, regardless of it's subscribed state.
11196         (folder_subscribed): new function.  just look up the folder_path
11197         in the hashtable.
11198         (subscribe_folder): new function.  use the imap SUBSCRIBE command,
11199         and if successful add it to the hashtable.
11200         (unsubscribe_folder): new function.  use the imap UNSUBSCRIBE
11201         command, and if successful remove it from the hashtable.
11202
11203 2000-10-24  Dan Winship  <danw@helixcode.com>
11204
11205         * providers/imap/camel-imap-store.c (get_folder_info): Fill in the
11206         message_count and unread_message_count flags (if !fast).
11207
11208 2000-10-23  Dan Winship  <danw@helixcode.com>
11209
11210         * camel-object.h: #include gnome-i18n.h (and gnome-defs.h since
11211         the former depends on it.)
11212
11213         * *: Add lots of _() and N_().
11214
11215 2000-10-23  Chris Toshok  <toshok@helixcode.com>
11216
11217         * providers/nntp/Makefile.am (libcamelnntpinclude_HEADERS): add
11218         camel-nntp-types.h.
11219
11220 2000-10-23  Dan Winship  <danw@helixcode.com>
11221
11222         * providers/imap/camel-imap-command.c (imap_read_untagged): Fix a
11223         "how could this have been working before" memory overrun bug
11224         found by Vlad.
11225
11226         * camel-op-queue.[ch], camel-thread-proxy.[ch]: These should have
11227         gone away a long time ago.
11228
11229 2000-10-20  Chris Toshok  <toshok@helixcode.com>
11230
11231         * providers/Makefile.am (SUBDIRS): re-enable the nntp provider.
11232
11233 2000-10-20  Chris Toshok  <toshok@helixcode.com>
11234
11235         * providers/nntp/camel-nntp-store.c (build_folder_info): add
11236         function to build a tree from the nntp group names (using '.' as a
11237         heirarchy separator.)  #ifdefed INFO_AS_TREE only.
11238         (build_folder_info_from_grouplist): if INFO_AS_TREE is selected,
11239         call build_folder_info instead of appending a new CamelFolderInfo
11240         to our list.
11241         (ensure_news_dir_exists): use e_mkdir_hier instead of failing if a
11242         parent directory (~/evolution/news generally) isn't there.
11243
11244 2000-10-19  Chris Toshok  <toshok@helixcode.com>
11245
11246         * camel-folder-search.c: #include <sys/types.h> before <regex.h>
11247
11248 2000-10-19  Dan Winship  <danw@helixcode.com>
11249
11250         * providers/imap/camel-imap-utils.c (imap_parse_list_response):
11251         Fix a bug with "INBOX" (or anything else with NIL hierarchy
11252         separator) as the namespace.
11253
11254         * providers/imap/camel-imap-folder.c (imap_refresh_info): Emit
11255         message_changed and folder_changed as appropriate.
11256
11257 2000-10-19  Dan Winship  <danw@helixcode.com>
11258
11259         * camel-folder.c (camel_folder_refresh_info): Update comment here
11260         so refresh_info isn't just for reconnects any more. Make the
11261         default implementation a no-op rather than an error.
11262
11263         * providers/nntp/camel-nntp-folder.c: Move refresh_info impl into
11264         camel_nntp_folder_new, since it would have leaked memory and not
11265         done anything useful if it was called later.
11266
11267         * providers/mbox/camel-mbox-folder.c: Remove no-longer-necessary
11268         refresh_info impl.
11269
11270         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
11271         Update imap_folder->exists, but don't actually load the new
11272         messages. This is a temporary workaround to deal with the IMAP
11273         provider stealing the message list focus at annoying times.
11274         (imap_copy_message_to, imap_move_message_to): Emit a
11275         folder_changed by hand, for now.
11276
11277 2000-10-19  Ettore Perazzoli  <ettore@helixcode.com>
11278
11279         * providers/imap/Makefile.am (libcamelimapinclude_HEADERS): Add
11280         `camel-imap-stream.h'.
11281
11282         * Makefile.am (libcamelinclude_HEADERS): Add `camel-charset-map.h'
11283         and `camel-charset-map-private.h'.
11284
11285 2000-10-18  Jeffrey Stedfast  <fejj@helixcode.com>
11286
11287         * camel-mime-part.c (camel_mime_part_set_description): The correct
11288         fix this time - the description should be encoded here and not in
11289         the camel-medium layer.
11290
11291 2000-10-30  Not Zed  <NotZed@HelixCode.com>
11292
11293         * camel-folder.c (camel_folder_change_info_add_update): Fixed the
11294         changeset logic, which was completely wrong.
11295
11296 2000-10-27  Not Zed  <NotZed@HelixCode.com>
11297
11298         * camel-mime-utils.c (quoted_encode_step): Removed is_blank() stuff.
11299         (header_decode_init): When we set the 'space' bit, dont clear all
11300         the others.
11301         (quoted_encode): Put back the safemask.  Yes we totally need it,
11302         see rfc 2047 section 5, parts (1) and (3).
11303         (CHARS_PSPECIAL): Remove '=' and '_' from the list of allowed
11304         characters (this is an allowed list, not a not-allowed list, like
11305         the ESPECIAL).
11306         (camel_mime_special_table): Updated for fixes to definitions.
11307         (CHARS_ESPECIAL): Added '_' to list of characters that should be
11308         encoded.
11309
11310 2000-10-26  Not Zed  <NotZed@HelixCode.com>
11311
11312         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_update):
11313         Use the new camel_folder_change_info_* stuff to build the update
11314         diff, rather than doing it ourselves.
11315
11316         * camel-folder.c (camel_folder_change_info_add_source): Add a
11317         'source' list, used to create change lists.
11318         (camel_folder_change_info_add_source_list): Add a list of uid's,
11319         convenience function.
11320         (camel_folder_change_info_add_update): Add a uid to the list of
11321         uid's in the new updated list.
11322         (camel_folder_change_info_add_update_list): Add a bunch of uid's
11323         at once for the same purpose.
11324         (camel_folder_change_info_build_diff): Take the source list, the
11325         update list, and find the differences, building on the added or
11326         removed list as appropriate.
11327
11328 2000-10-20  Not Zed  <NotZed@HelixCode.com>
11329
11330         * providers/mbox/camel-mbox-summary.c (removed_uids): REnamed from
11331         add_uid.
11332         (camel_mbox_summary_update): Oops, fix the reversed logic for
11333         determining the uid changesets.
11334
11335         * camel-folder.c (message_changed): Oops, we want to change the
11336         uid, not add it.
11337
11338 2000-10-19  Not Zed  <NotZed@HelixCode.com>
11339
11340         * providers/mh/camel-mh-summary.c (camel_mh_summary_sync): Added a
11341         change list argument, and add expunged uid's to it.
11342
11343         * providers/mh/camel-mh-folder.c (mh_init): Setup the change list.
11344         (mh_finalize): And free it.
11345         (mh_sync): Track changes, and send a folder_changed signal as
11346         appropriate.
11347         (mh_expunge): Likewise.
11348         (mh_append_message): Add the new uid to the change list and
11349         trigger a folder_changed event.
11350
11351         * providers/mbox/camel-mbox-folder.c (camel_mbox_folder_new):
11352         Setup a mbox list of changes structure.
11353         (mbox_finalize): And free it.
11354         (mbox_expunge): Include the change list with the folder_changed
11355         event, and clear it off.
11356         (mbox_sync): And the same for when we are just syncing the folder.
11357         (mbox_append_message): And do the same here, after we've updated
11358         the folder.
11359
11360         * providers/mbox/camel-mbox-summary.c
11361         (camel_mbox_summary_build_from): Use gmtime_r to get the time
11362         thread-safely.
11363         (camel_mbox_summary_sync): Added a changeinfo argument.  Add any
11364         removed or changed messages to the changelists as appropriate.
11365         (camel_mbox_summary_update): Added a changeinfo argument.
11366         Genereate a list of added/removed uid's based on the difference
11367         before and after rebuilding the summary.
11368
11369         * camel-folder.c (camel_folder_change_info_new):
11370         (camel_folder_change_info_add_uid): 
11371         (change_info_add_uid): 
11372         (camel_folder_change_info_remove_uid): 
11373         (camel_folder_change_info_change_uid): 
11374         (change_info_clear): 
11375         (camel_folder_change_info_clear): 
11376         (camel_folder_change_info_free):
11377         (change_info_cat): 
11378         (camel_folder_change_info_cat):  Bunch of utility functions for
11379         working with change info lists.
11380         (camel_folder_init): Init the change info list.
11381         (camel_folder_finalize): And free it.
11382         (thaw): Changed to pass through a list of changes, or to get the
11383         changed message uids from the camelfolderchangeinfo struct, and
11384         reset it.
11385         (folder_changed): Add the changed lists to the frozen change list
11386         if we are frozen.
11387         (message_changed): Add the message to the changed list if we are
11388         in the frozen state.
11389
11390         * camel-folder.h (CamelFolderChangeInfo): New structure to hold
11391         information for the folder_changed event.
11392
11393 2000-10-18  Ettore Perazzoli  <ettore@helixcode.com>
11394
11395         * camel-mime-filter-charset.c (complete): Put a zero at the start
11396         of the outbuf.
11397
11398 2000-10-18  Not Zed  <NotZed@HelixCode.com>
11399
11400         * camel-mime-part.c (add_header): No, we must not encode the
11401         headers here.  These interfaces ARE raw interfaces as they are
11402         defined in camel_medium.  Also removed a bogus/meaningless FIXME.
11403         (set_header): Likewise here, we must not.
11404         (process_header): Removed another bogus comment.
11405
11406         * camel-object.c (shared_is_of_type): Comment out the spitting of
11407         a big warning when we're trying to determine types from code.
11408
11409         * providers/mbox/camel-mbox-summary.c
11410         (message_info_new_from_parser): Only call ibex funcitons if we
11411         have an index.
11412
11413         * providers/mh/camel-mh-summary.c (camel_mh_summary_add): Only
11414         call ibex functions if we have an index.
11415         (remove_summary): Likewise.
11416         (camel_mh_summary_check): Likewise.
11417
11418         * providers/nntp/camel-nntp-store.c (nntp_store_get_folder):
11419         get_folder -> flags argument.
11420
11421         * providers/vee/camel-vee-store.c (vee_get_folder): create->flags.
11422
11423         * providers/pop3/camel-pop3-store.c (get_folder): Changed create
11424         -> flags.
11425
11426         * providers/imap/camel-imap-store.c (get_folder): Added flags
11427         argument.
11428
11429         * providers/mh/camel-mh-folder.c (camel_mh_folder_new): Added
11430         flags argument, and fixed code appropriately.
11431
11432         * providers/mh/camel-mh-store.c (get_folder): Added flags argument.
11433
11434         * camel-folder-search.c (message_body_contains): Perform a regex
11435         match on the contents of messages.  This wont quite work yet as
11436         message contents are encoded when written to a stream.
11437         (build_match_regex): Converts a number of strings into a regex
11438         matching pattern, escaping special chars.
11439         (match_message): match a single message from a folder, by uid.
11440         Slow.
11441         (search_body_contains): Changed to support matching where no index
11442         is supplied.  Matches are performed by retrieving message
11443         contents, etc.
11444         () WTF?  camel should not be including any widget headers.
11445         
11446         * providers/mbox/camel-mbox-folder.c (camel_mbox_folder_new):
11447         Added flags argument.
11448         (mbox_refresh_info): Changed into a NOP, the refresh info code
11449         moved into the new function.
11450         (camel_mbox_folder_new): If we have an index requested, build one,
11451         otherwise, remove an old one, or just dont do anything.
11452
11453         * providers/mbox/camel-mbox-store.c (get_folder): Changed create
11454         to flags, changed code to suit.
11455
11456         * camel-store.c (camel_store_get_folder): Changed create to flags.
11457         (get_folder_internal): And here.
11458         (get_folder): And here too.
11459
11460         * camel-store.h (camel_store_get_folder): Change the create
11461         argument to be a flags argument.
11462
11463 2000-10-17  Dan Winship  <danw@helixcode.com>
11464
11465         * providers/imap/camel-imap-folder.c (imap_refresh_info): Remove
11466         cached info at the end of the summary when the folder shrinks
11467         between sessions. Also remove an untrue comment.
11468         (camel_imap_folder_new): Move the summary creation to after the
11469         folder selection again, since it depends on the uidvalidity
11470         having been set.
11471
11472         * providers/imap/camel-imap-store.c (get_folder): Fix up
11473         summary_file to not include the namespace twice.
11474
11475 2000-10-17  Jeffrey Stedfast  <fejj@helixcode.com>
11476
11477         * camel-mime-part.c (set_header): Encode the header value.
11478         (add_header): Same.
11479
11480 2000-10-17  Not Zed  <NotZed@HelixCode.com>
11481
11482         * camel-mime-filter.c: Added some malloc check debugging stuff.
11483
11484         * camel-mime-parser.c
11485         (struct _header_scan_state): Removed top_part, top_start, and
11486         pending.  I can't even remember why they were there, and they're
11487         not used anymore.
11488
11489         * camel-mime-filter-basic.c (filter): Forgot to up the space here
11490         too.
11491
11492 2000-10-14  Not Zed  <NotZed@HelixCode.com>
11493
11494         * camel-mime-filter-basic.c (complete): Ok, so we hit a fixme, 3x
11495         just wasn't enough for some sequences.
11496
11497 2000-10-16  Jeffrey Stedfast  <fejj@helixcode.com>
11498
11499         * providers/imap/camel-imap-command.c
11500         (imap_read_response): Don't imap_next_word(respbuf + 2), instead
11501         use imap_next_word(respbuf) or else we'll skip over the second
11502         token.
11503
11504 2000-10-16  Jeffrey Stedfast  <fejj@helixcode.com>
11505
11506         * providers/imap/camel-imap-command.c
11507         (camel_imap_response_extract): Don't free 'resp' as it doesn't
11508         point to the beginning of the allocated data, instead free
11509         response->untagged->pdata[i]. Also, if '*resp' is equal to a space
11510         character, then set resp = imap_next_word (resp) rather than
11511         expecting resp++ to work (there's a list broken IMAP daemons that
11512         like to put extra spaces between tokens).
11513         (imap_read_response): Don't expect 'respbuf+2' to be where the
11514         untagged number response to start (see above fix for an
11515         explanation).
11516
11517 2000-10-16  Chris Toshok  <toshok@helixcode.com>
11518
11519         * camel-service.c (get_path): when using the construct (flags &
11520         CAMEL_SERVICE_URL_NEED_*) make sure to do ((flags &
11521         CAMEL_SERVICE_URL_NEED_*) == CAMEL_SERVICE_URL_NEED_*)
11522         (check_url): same.
11523
11524 2000-10-16  Jeffrey Stedfast  <fejj@helixcode.com>
11525
11526         * providers/imap/camel-imap-store.c (imap_disconnect): Only send
11527         the LOGOUT command if the store is connected.
11528         (imap_connect): Set the 'connected' state to TRUE when we
11529         successfully connect.
11530         (get_folder_info): if (!topfi), 'topfi' was allocated but then
11531         'fi' was set. I think Dan meant to set topfi since fi is an
11532         uninitialized value at this point.
11533
11534         * providers/imap/camel-imap-command.c (imap_read_response): Check
11535         for the untagged BYE response and set the 'connected' state to
11536         FALSE if we receive the BYE response. Return NULL if we get a BYE
11537         response.
11538
11539 2000-10-16  Dan Winship  <danw@helixcode.com>
11540
11541         * providers/imap/camel-imap-store.c (get_folder_info): Deal with
11542         the possibility of not getting a LIST response back for the top
11543         level.
11544
11545 2000-10-12  Dan Winship  <danw@helixcode.com>
11546
11547         * providers/imap/camel-imap-summary.c: Simple subclass of
11548         CamelFolderSummary that also keeps a UIDVALIDITY value (and
11549         doesn't, for the moment, build content info).
11550
11551         * providers/imap/camel-imap-folder.c:
11552         (various): Use a CamelImapSummary to store/fetch summary info.
11553         (camel_imap_folder_new): Take a path to a file to use for the
11554         summary. Set the folder's permanent_flags correctly according to
11555         the server response. Read in the summary (checking the
11556         UIDVALIDITY) and update it if it's out of date.
11557         (imap_refresh_info): Just fetch UIDs and flags. If the UIDs all
11558         match, update the flags as needed and be done with it. Otherwise,
11559         delete messages that have been expunged from the server and fetch
11560         full summary info for any new messages.
11561         (imap_sync): Save the summary to disk.
11562         (imap_update_summary): Renamed from imap_get_summary_internal. Can
11563         now be told to get summary for only a subset of messages. Use
11564         camel-mime-utils functions rather than rolling our own header
11565         parsing.
11566         (imap_get_message_info_internal): Merged into imap_update_summary.
11567         (imap_set_message_flags): Don't marked the message FOLDER_FLAGGED
11568         if we're not actually changing the value of any of the flags.
11569         (camel_imap_folder_changed): Deal with EXISTS rather than RECENT.
11570         
11571         * providers/imap/camel-imap-store.c (imap_connect): Call
11572         camel_session_get_storage_path and save the value.
11573         (get_folder): Create a local directory to store summary
11574         information and pass a summary file name to camel_imap_folder_new.
11575         Don't call camel_folder_refresh_info from here any more since
11576         camel_imap_folder_new does it again.
11577
11578         * providers/imap/camel-imap-command.c (camel_imap_command): Add a
11579         special case to this to make it possible to get the repsonses from
11580         a SELECT and still have store->current_folder be updated
11581         correctly.
11582         (imap_read_response): parse EXISTS rather than RECENT
11583
11584         * camel-session.c (camel_session_get_storage_path): Use
11585         e_mkdir_hier.
11586
11587         * camel-folder-summary.c (camel_folder_summary_remove_index): New
11588         function.
11589
11590         * camel-mime-utils.c (header_raw_append_parse): fix this.
11591         (camel-mime-parser.c doesn't use this code because of the MEMPOOL
11592         optimization, so nothing was ever actually calling it before.)
11593
11594 2000-10-11  Not Zed  <NotZed@HelixCode.com>
11595
11596         * camel-mime-part.h (struct _CamelMimePart): Removed
11597         temp_message_buffer, and content_input_stream fields which seem to
11598         have come from nowhere, and are unused.
11599
11600         * camel-mime-utils.c: Added a note about touching this file.
11601         Nobody is to touch it without asking me first.  That goes for you
11602         too Jeff.
11603         (header_decode_text): In what way is this broken?
11604
11605 2000-10-10  Not Zed  <NotZed@HelixCode.com>
11606
11607         * providers/imap/camel-imap-folder.c (imap_get_summary_internal):
11608         Fix camel_summary_* function rename
11609         (imap_get_message_info_internal): Likewise.
11610
11611         * camel-mime-parser.c (camel_mime_parser_finalise): Fixed a spelling mistake.
11612
11613         * camel-folder-summary.c (camel_summary_format_address): Uh, why
11614         do we encode and then decode here ... sigh.  This is not the way
11615         to fix this.
11616         (camel_folder_summary_format_address): Renamed to a proper name,
11617         this was only supposed to be a private function.
11618         (camel_folder_summary_format_string): Likewise.  Oh i see why it
11619         was made public, code reuse by cut & paste.  Joy.
11620
11621 2000-10-11  Chris Toshok  <toshok@helixcode.com>
11622
11623         * providers/nntp/camel-nntp-store.c (nntp_store_unsubscribe_folder): remove the leading '/'.
11624         (nntp_store_subscribe_folder): same.
11625         (nntp_store_folder_subscribed): same.
11626
11627 2000-10-11  Jeffrey Stedfast  <fejj@helixcode.com>
11628
11629         * providers/imap/camel-imap-folder.c (imap_move_message_to): Quote
11630         the mailbox name as it may contain spaces.
11631         (imap_copy_message_to): Same.
11632
11633 2000-10-10  Chris Toshok  <toshok@helixcode.com>
11634
11635         * providers/nntp/camel-nntp-store.c
11636         (build_folder_info_from_grouplist): fill in message_count and
11637         unread_message_count properly.
11638
11639         * providers/nntp/camel-nntp-newsrc.h: reformat.
11640
11641         * providers/nntp/camel-nntp-grouplist.c
11642         (camel_nntp_get_grouplist_from_file): remove spew.
11643
11644         * providers/nntp/camel-nntp-newsrc.c
11645         (camel_nntp_newsrc_group_get_num_articles_read): new function.
11646         (camel_nntp_newsrc_group_get_highest_article_read): robustification.
11647
11648 2000-10-10  Joe Shaw  <joe@helixcode.com>
11649
11650         * providers/imap/camel-imap-store.c 
11651         (parse_list_response_as_folder_info): Check before dereferencing the
11652         sep pointer.
11653
11654 2000-10-10  Jacob "Ulysses" Berkman  <jacob@helixcode.com>
11655
11656         * camel-*.c: teach camel about "its" vs. "it's"
11657
11658 2000-10-09  Chris Toshok  <toshok@helixcode.com>
11659
11660         * providers/nntp/camel-nntp-store.c (finalize): write out the
11661         newsrc.
11662         (nntp_store_get_name): if @brief, just return host.
11663
11664         * providers/nntp/camel-nntp-newsrc.c: robustification and bug
11665         fixes.
11666
11667 2000-10-06  Jeffrey Stedfast  <fejj@helixcode.com>
11668
11669         * camel-folder-summary.c (camel_summary_format_address): Decode
11670         the resulting string.
11671
11672 2000-10-06  Chris Toshok  <toshok@helixcode.com>
11673
11674         * providers/nntp/camel-nntp-grouplist.c: new file.
11675
11676         * providers/nntp/camel-nntp-grouplist.h: new file.
11677
11678         * providers/nntp/camel-nntp-types.h: new file.
11679
11680 2000-10-06  Jeffrey Stedfast  <fejj@helixcode.com>
11681
11682         * camel-mime-utils.c (quoted_encode): Fix so that we don't encode
11683         every single char in the word. Also, do we need a safemask? I
11684         don't see why we would.
11685         (header_encode_string): Don't strip off the last char!!
11686
11687 2000-10-06  Chris Toshok  <toshok@helixcode.com>
11688
11689         * providers/nntp/Makefile.am (libcamelnntpinclude_HEADERS): add
11690         camel-nntp-grouplist.h
11691         (libcamelnntp_la_SOURCES): add camel-nntp-grouplist.c
11692
11693         * providers/nntp/camel-nntp-provider.c: add our own hash functions
11694         for nntp urls.
11695
11696         * providers/nntp/camel-nntp-newsrc.c
11697         (camel_nntp_newsrc_group_is_subscribed): new function.
11698         (camel_nntp_newsrc_subscribe_group): new function.
11699         (camel_nntp_newsrc_unsubscribe_group): new function.
11700
11701         * providers/nntp/camel-nntp-newsrc.h: add prototypes for
11702         _group_is_subscribed, _subscribe_group, and _unsubscribe_group.
11703
11704         * providers/nntp/camel-nntp-store.c
11705         (build_folder_info_from_grouplist): new function.
11706         (nntp_store_get_folder_info): add subscribed_only_parameter.  if
11707         it's FALSE, load the grouplist and call
11708         build_folder_info_from_grouplist.
11709         (nntp_store_folder_subscribed): implement.
11710         (nntp_store_subscribe_folder): implement.
11711         (nntp_store_unsubscribe_folder): implement.
11712         (camel_nntp_store_init): add CAMEL_STORE_SUBSCRIPTIONS to the
11713         store's flags.
11714
11715         * providers/mh/camel-mh-store.c (get_folder_info): add
11716         subscribed_only parameter.
11717
11718         * providers/mbox/camel-mbox-store.c (get_folder_info): add
11719         subscribed_only parameter.
11720
11721         * providers/imap/camel-imap-store.c (get_folder_info): add
11722         subscribed_only parameter.
11723
11724         * camel-store.c (camel_store_supports_subscriptions): new function.
11725         (camel_store_folder_subscribed): new function.
11726         (camel_store_subscribe_folder): new function.
11727         (camel_store_unsubscribe_folder): new function.
11728
11729         * camel-store.h: add prototypes and virtual functions for the
11730         subscribe implementation.  also, add a subscribed_only argument to
11731         camel_store_get_folder_info.
11732
11733 2000-10-05  Jeffrey Stedfast  <fejj@helixcode.com>
11734
11735         * camel-mime-utils.c (header_address_list_format_append): Encode
11736         the name part of the address and don't quote the name.
11737         (header_decode_text): Rewrote from scratch, the old code was badly
11738         broken.
11739
11740 2000-10-05  Jeffrey Stedfast  <fejj@helixcode.com>
11741
11742         * camel-mime-message.c (camel_mime_message_set_reply_to): Use the
11743         camel_address_encode function again.
11744         (camel_mime_message_set_from): Same.
11745
11746 2000-10-05  Jeffrey Stedfast  <fejj@helixcode.com>
11747
11748         * camel-mime-utils.c (quoted_encode_step): Modified to not encode
11749         space chars in the middle of a line.
11750         (isblank): New macro if we're not on a system with the GNU isblank
11751         extension.
11752
11753         * camel-mime-message.c (camel_mime_message_set_from): Reversed my
11754         changes, don't header_encode_phrase - it generates broken headers.
11755         (camel_mime_message_set_reply_to): Same.
11756
11757 2000-10-04  Chris Toshok  <toshok@helixcode.com>
11758
11759         * providers/nntp/camel-nntp-utils.c (camel_nntp_get_headers):
11760         revert to old method (only use XOVER if OVER is supported.)
11761
11762         * providers/nntp/camel-nntp-store.c
11763         (camel_nntp_store_get_overview_fmt): handle the case where the
11764         OVER extension isn't listed but LIST OVERVIEW.FMT works (again,
11765         INN 2.2).  enable the OVER extension in this case.
11766
11767 2000-10-04  Chris Toshok  <toshok@helixcode.com>
11768
11769         * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): return a
11770         gboolean so we can tell if this command worked.  we can't key off
11771         the OVER extension being present because at least one server (INN
11772         2.2) doesn't report the OVER extension but implements the XOVER
11773         command.  This could of course just be because I'm a loser for
11774         thinking they were related in the first place.
11775         (camel_nntp_get_headers): always try XOVER first, and if it fails
11776         revert to the slow method.
11777
11778 2000-10-04  Dan Winship  <danw@helixcode.com>
11779
11780         * providers/mbox/camel-mbox-store.c (get_folder): Fix a case where
11781         a variable was free'd and then possibly used in an error message.
11782
11783 2000-10-04  Chris Toshok  <toshok@helixcode.com>
11784
11785         * providers/nntp/camel-nntp-provider.c
11786         (camel_provider_module_init): news: -> nntp:.
11787
11788 2000-10-04  Chris Toshok  <toshok@helixcode.com>
11789
11790         * providers/nntp/camel-nntp-store.c (nntp_store_get_folder_info):
11791         use "nntp:" instead of "news:" since "news:" urls aren't supposed
11792         to have host/user/port info in them.  also, if there's a user
11793         defined in the url, put it in the urls for our folders.
11794
11795 2000-10-04  Chris Toshok  <toshok@helixcode.com>
11796
11797         * providers/nntp/camel-nntp-auth.c (camel_nntp_auth_authenticate):
11798         borrow some code from the imap provider to query the user for
11799         their password, and pass the user/passwd to nntp.  be extra
11800         paranoid and zero out the password before freeing it.
11801
11802         * providers/nntp/camel-nntp-store.c (camel_nntp_store_init): add
11803         ALLOW_USER/ALLOW_PASSWORD/ALLOW_AUTH to the url flags.
11804         (nntp_store_query_auth_types_generic): return our list of
11805         auth_types.
11806         (nntp_store_query_auth_types_connected): broken, return same as in
11807         query_auth_types_generic.
11808
11809 2000-10-04  Dan Winship  <danw@helixcode.com>
11810
11811         * providers/imap/camel-imap-store.c (imap_connect): IMAP4
11812         (pre-rev1) doesn't support the 'LIST "" ""' idiom, so don't use
11813         it. Just assume the dir_sep is '/'. Shrug.
11814
11815 2000-10-04  Jeffrey Stedfast  <fejj@helixcode.com>
11816
11817         * camel-mime-message.c (camel_mime_message_set_reply_to): Use
11818         header_encode_phrase instead.
11819         (camel_mime_message_set_from): Same.
11820
11821 2000-10-04  Not Zed  <NotZed@HelixCode.com>
11822
11823         * camel-mime-utils.c (header_content_type_is): Handle the case
11824         where ct != NULL, but type and subtype are, and also match that
11825         against text/plain.
11826
11827         * camel-folder-summary.c: Bump summary file version.
11828         (message_info_save): Save the size from the messageinfo.
11829         (message_info_load): Load the size from the summary file.
11830         (message_info_load): Fixed up the time_t saving/loading.  There
11831         was a reason the warning was left there ... obviously nobody could
11832         read the comment "/* warnings, leave them here */", why do i even
11833         bother.
11834         (camel_folder_summary_decode_time_t): Decode a time_t value from
11835         the summary file.
11836         (camel_folder_summary_encode_time_t): Encode a time_t value to the
11837         summary file.
11838
11839 2000-10-03  Jeffrey Stedfast  <fejj@helixcode.com>
11840
11841         * providers/imap/camel-imap-command.c (camel_imap_command): Quote
11842         the mailbox name when sending a SELECT request otherwise mailboxes
11843         with spaces in their names will cause problems.
11844
11845         * camel-mime-message.c (camel_mime_message_set_reply_to): encode
11846         before setting.
11847         (camel_mime_message_set_from): Same.
11848
11849 2000-10-03  Dan Winship  <danw@helixcode.com>
11850
11851         * providers/imap/camel-imap-command.c: New file containing
11852         camel_imap_command and friends. Major camel_imap_command rewrite
11853         to remove duplicated code, make the parsing of literals be
11854         more safe/correct, deal with RECENT/EXPUNGE responses more
11855         consistently, and make it possible to implement the AUTHENTICATE
11856         command.
11857
11858         * providers/imap/camel-imap-utils.c (imap_parse_nstring): New
11859         function, to parse an IMAP "nstring".
11860
11861         * providers/imap/camel-imap-store.c: Move command stuff to
11862         camel-imap-command.c. Update for camel_imap_command changes.
11863
11864         * providers/imap/camel-imap-folder.c: Update for
11865         camel_imap_command changes.
11866         (imap_append_message): CRLF filter the message before sending it.
11867
11868         * providers/imap/Makefile.am: Add camel-imap-command.[ch], remove
11869         camel-imap-stream.[ch] for now.
11870
11871 2000-10-02  Jeffrey Stedfast  <fejj@helixcode.com>
11872
11873         * camel-mime-message.c (camel_mime_message_has_8bit_parts): New
11874         convenience function to determine if there are any 8bit mime parts
11875         in a mime message.
11876         (camel_mime_message_encode_8bit_parts): New convenience function
11877         to recursively reencode all 8bit mime parts to either
11878         quoted-printable or base64 depending on which would be the best
11879         encoding for that part.
11880
11881         * providers/smtp/camel-smtp-transport.c (smtp_data): If the mime
11882         message contains 8bit parts and the server doesn't support 8bit
11883         transfers, reencode those parts before proceding with the send.
11884         (smtp_mail): If the mime message contains 8bit parts and the
11885         server supports the 8BITMIME extension to SMTP, notify the server
11886         that we'll be sending it 8bit mime parts.
11887         (_send_to): Find out if the message contains 8bit parts.
11888
11889 2000-10-02  Jeffrey Stedfast  <fejj@helixcode.com>
11890
11891         * providers/smtp/camel-smtp-transport.c (_send_to): Use the
11892         CamelInternetAddress parser.
11893         (smtp_get_email_addr_from_text): deprecated.
11894
11895 2000-10-02  Dan Winship  <danw@helixcode.com>
11896
11897         * camel-provider.h: Remove default_ports.
11898
11899         * camel-remote-store.c (remote_connect): Get default_port from
11900         CamelRemoteStore rather than CamelProvider.
11901
11902         * providers/{imap,nntp,pop3}/camel-*-store.c: Initialize
11903         CamelRemoteStore::default_port
11904
11905         * providers/*/camel-*-provider.c: Remove default_ports.
11906
11907 2000-10-02  Dan Winship  <danw@helixcode.com>
11908
11909         * camel-folder.[ch]: Remove
11910         camel_folder_{get,free}_subfolder_info, as we want to be able to
11911         scan the whole subfolder tree without having to open any folders,
11912         so this needs to be in CamelStore. Remove can_hold_folders and
11913         can_hold_messages flags; things that don't hold messages are no
11914         longer considered CamelFolders.
11915
11916         * camel-folder-summary.[ch]: Remove CamelFolderInfo stuff.
11917
11918         * camel-store.[ch]: Add camel_store_{get,free}_folder_info, as
11919         well as camel_store_free_folder_info_full and ..._nop for default
11920         implementations, and camel_folder_info_free and
11921         camel_folder_info_build as convenience functions. Turn
11922         CamelFolderInfo into a tree structure and also add an "url"
11923         member.
11924
11925         * providers/*/camel-*-folder.c: Remove subfolder_info and can_hold
11926         stuff.
11927         * providers/*/camel-*-store.c: Add folder_info stuff.
11928
11929         * providers/imap/camel-imap-folder.c (imap_summary_free): Free the
11930         summary elements with camel_message_info_free, not
11931         camel_folder_info_free. Oops.
11932
11933         * providers/imap/camel-imap-utils.c: const poison
11934
11935 2000-09-28  Jeffrey Stedfast  <fejj@helixcode.com>
11936
11937         * providers/smtp/camel-smtp-transport.c: Fixed some memory leaks.
11938         (camel_smtp_transport_init): Initialize supports_8bit to FALSE.
11939         (smtp_helo): If server supports 8bit, set supports_8bit to TRUE.
11940
11941         * camel-transport.h (struct _CamelTransport): Added variable
11942         gboolean supports_8bit (we'll need this eventually? - see bugzilla
11943         bug #53)
11944
11945         * providers/smtp/camel-smtp-transport.c
11946         (smtp_get_email_addr_from_text): Ugh, no wonder people were
11947         getting illegal seek warnings *sigh*. I guess I can only blame
11948         myself for this one though :-(
11949
11950 2000-09-28  Jeffrey Stedfast  <fejj@helixcode.com>
11951
11952         * providers/smtp/camel-smtp-transport.c (_send_to): Don't send the
11953         recipient data through smtp_get_email_addr_from_text - this is a
11954         complete waste. In fact, we don't want to have to use that
11955         function ever.
11956
11957         * camel-internet-address.c, camel-address.c: Added some gtk-doc
11958         comments.
11959         
11960 2000-09-28  Jeffrey Stedfast  <fejj@helixcode.com>
11961         
11962         * camel-mime-utils.c (header_encode_string): Make sure to add the
11963         space char after an encoded word when the encoding is iso-8859-1.
11964
11965 2000-09-28  Jeffrey Stedfast  <fejj@helixcode.com>
11966
11967         * providers/imap/camel-imap-folder.c (imap_get_message): When
11968         getting a literal string response, don't include the \r\n after
11969         the closing } (as in: "... {798}\r\n...")
11970         
11971         * providers/imap/camel-imap-stream.c (stream_read): Same.
11972
11973 2000-09-28  Not Zed  <NotZed@HelixCode.com>
11974
11975         * camel-mime-utils.c (header_fold): New function to fold headers.
11976
11977 2000-09-27  Not Zed  <NotZed@HelixCode.com>
11978
11979         * camel-mime-parser.c (folder_scan_header): If we had an empty
11980         header, then it must be end of the headers too.
11981         (folder_scan_init): No we dont need to init the outbuf with a nul
11982         terminator.
11983
11984         * camel-folder-summary.c (camel_folder_summary_set_uid): New
11985         function to reset the uid to a higher value.
11986
11987         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
11988         "something failed (yo!)" what sort of crap is this?  Fixed all the
11989         indenting again, what wanker keeps running stuff through indent?
11990         (message_info_new): Check the uid we loaded off the disk, if it
11991         existed already, assign a new one.  If it didn't then make sure
11992         the nextuid is higher.
11993
11994         * camel-charset-map.c: New file, used to build a large unicode
11995         decoding mapping table, and use it to determine what is the
11996         lowest charset a given word can be encoded with.  Uses tables from
11997         libunicode's source.
11998
11999         * camel-internet-address.c (internet_encode): Use
12000         header_phrase_encode to properly encode the fullname, as required.
12001         refixed indenting.  Who keeps doing that?
12002         (camel_internet_address_find_address): Changed fatal return/warnings
12003         into assertions.
12004
12005         * camel-mime-utils.c (header_raw_append_parse): Check : explicitly
12006         (removed from is_fieldname() macro).
12007         (camel_mime_special_table): Changed to short, so we can represent
12008         more bit types.
12009         (quoted_encode): Take a mask of the safe chars for this encoding.
12010         (header_address_decode): Removed a #warning that makes no sense
12011         anymore.
12012         (header_decode_date): Fixed the 'broken date' parser code, if it
12013         ever decoded it it just threw away the result.
12014         (header_encode_string): Use better charset matching for encoding
12015         strings as well.
12016
12017 2000-08-31  Not Zed  <NotZed@HelixCode.com>
12018
12019         * providers/mh/camel-mh-summary.c (camel_mh_summary_sync): Save
12020         the index if we do a sync.
12021         (camel_mh_summary_check): Save the index here too.  Probably.
12022
12023 2000-09-27  Dan Winship  <danw@helixcode.com>
12024
12025         * providers/imap/camel-imap-store.c (camel_imap_command_extended):
12026         Return untagged data in a GPtrArray rather than a string, since it
12027         saves processing time and is much easier to deal with for several
12028         commands. Update for camel_imap_folder_changed change.
12029         (camel_imap_fetch_command): Update for camel_imap_folder_changed
12030         change.
12031         (imap_connect, imap_folder_exists): Update for
12032         camel_imap_command_extended change.
12033
12034         * providers/imap/camel-imap-folder.c
12035         (imap_get_message_count_internal,
12036         imap_get_subfolder_info_internal, imap_search_by_expression):
12037         Update for camel_imap_command_extended change.
12038
12039         (imap_get_summary_internal, imap_get_message_info_internal): Use
12040         camel_imap_fetch_command here now to get around the
12041         camel_imap_command_extended change.
12042
12043         (camel_imap_folder_changed): turn expunged into a GArray of ints
12044         rather than a GPtrArray of strings representing ints.
12045
12046 2000-09-26  Jeffrey Stedfast  <fejj@helixcode.com>
12047
12048         * providers/imap/camel-imap-folder.c
12049         (imap_get_message_count_internal): Quote the folder name as it may
12050         contain spaces.
12051         (imap_get_subfolder_info_internal): Same.
12052
12053         * providers/imap/camel-imap-utils.c (imap_parse_list_response): Do
12054         proper unquoting for folder names.
12055         (func_get_current_date): Implemented.
12056
12057         * providers/imap/camel-imap-store.c
12058         (imap_folder_exists): Quote the folder name as it may have spaces.
12059         (imap_create): Same.
12060         (check_current_folder): Same.
12061
12062 2000-09-22  Dan Winship  <danw@helixcode.com>
12063
12064         * providers/imap/camel-imap-folder.c
12065         (imap_get_subfolder_info_internal): The root folder's name is "",
12066         not the namespace.
12067         (camel_imap_folder_new): constify folder_name.
12068
12069         * providers/imap/camel-imap-store.c (get_folder): Create the
12070         folder with folder_name, not folder_path.
12071         (camel_imap_command_preliminary): Don't free cmdid here.
12072
12073 2000-09-21  Dan Winship  <danw@helixcode.com>
12074
12075         * providers/imap/camel-imap-utils.c (imap_create_flag_list): New
12076         function to convert Camel flags to an IMAP flag_list.
12077         (imap_parse_flag_list): Contrariwise.
12078
12079         * providers/imap/camel-imap-store.c (camel_imap_command_*): Make
12080         the @ret arg actually optional, as (mostly) documented.
12081         (various): Don't pass "&result" to camel_imap_command_* if we're
12082         just going to immediately free it. Don't record status if we're
12083         not going to look at it.
12084
12085         * providers/imap/camel-imap-folder.c: Likewise.
12086         (imap_summary_free): Use camel_folder_info_free.
12087         (imap_sync): Use imap_create_flag_list. Clear
12088         CAMEL_MESSAGE_FOLDER_FLAGGED after syncing so we don't keep
12089         re-syncing.
12090         (imap_append_message): Use imap_create_flag_list. Don't leak the
12091         memstream if the append fails.
12092         (imap_move_message_to): Use camel_folder_delete_message rather
12093         than doing it by hand.
12094         (imap_get_summary_internal, imap_get_message_info_internal): Use
12095         imap_parse_flag_list and header_raw_clear.
12096         (camel_imap_folder_changed): Use camel_message_info_free.
12097
12098 2000-09-21  Dan Winship  <danw@helixcode.com>
12099
12100         * providers/imap/camel-imap-store.c (get_folder_name): INBOX is
12101         case-insensitive.
12102         (get_root_folder_name): Make the root folder "" rather than "/".
12103         (get_folder): Update for root folder name change.
12104         (camel_imap_store_get_toplevel_dir): Removed. (Unused, unneeded.)
12105         (camel_imap_store_folder_path): New function to turn a Camel
12106         folder name into the corresponding namespaced IMAP path.
12107         (imap_folder_exists): Make this take a store and a path rather
12108         than a folder.
12109         (imap_create): Likewise
12110         (get_folder): Update for camel_imap_store_folder_path and other
12111         changes.
12112         (check_current_folder): Likewise.
12113
12114         * providers/imap/camel-imap-folder.c: Change a bunch of CamelStore
12115         variables to CamelImapStore (and add a few more) to prevent excess
12116         gratuitous casting. Use camel_imap_store_folder_path where
12117         appropriate.
12118         (camel_imap_folder_new): Update for root folder name change.
12119
12120 2000-09-19  Jeffrey Stedfast  <fejj@helixcode.com>
12121
12122         * providers/smtp/camel-smtp-transport.c (smtp_data): Use the
12123         linewrap filter to achieve full RFC0821 compliance.
12124
12125         * camel-mime-filter-linewrap.[c,h]: New mime-filter to word-wrap.
12126
12127 2000-09-19  Jeffrey Stedfast  <fejj@helixcode.com>
12128
12129         * camel-internet-address.c (internet_encode): When encoding the
12130         internet address, quote the name as the name may have commas or
12131         any other token which may later confuse our address parser.
12132
12133 2000-09-19  Dan Winship  <danw@helixcode.com>
12134
12135         * providers/imap/camel-imap-folder.c
12136         (imap_get_subfolder_info_internal): Fix the case where INBOX
12137         isn't returned in the folder listing.
12138
12139 2000-09-19  Dan Winship  <danw@helixcode.com>
12140
12141         * camel-folder.c: (init): Removed
12142         (camel_folder_init, camel_folder_construct): New object init
12143         function and public object constructor to replace the old init
12144         method in a more Gtk-like fashion.
12145
12146         (get_parent_folder, camel_folder_get_parent_folder): Removed. No
12147         CamelFolder subclass was ever setting the parent_folder member, no
12148         code has ever needed to look at it, and fixing it would actually
12149         be pretty hard.
12150
12151         (get_subfolder_info, camel_folder_get_subfolder_info): Renamed
12152         from ..._names. Deals in CamelFolderInfo now.
12153         (free_subfolder_info, camel_folder_free_subfolder_info): Likewise.
12154
12155         (get_subfolder, camel_folder_get_subfolder): Removed.
12156         CamelFolderInfo contains the subfolder's full name, so this is
12157         unnecessary now, and removing it lets us get rid of the
12158         CamelFolder separator member, which is needed for the default
12159         implementation of this function, but not otherwise needed for most
12160         providers.
12161
12162         Also, lots of code style fixes.
12163
12164         * providers/*: Update CamelFolder subclasses for changes, although
12165         none of them fill in the message counts in the CamelFolderInfo
12166         yet.
12167
12168 2000-09-18  Christopher James Lahey  <clahey@helixcode.com>
12169
12170         * camel-folder-search.c, camel-folder-search.h,
12171         camel-remote-store.c, providers/imap/camel-imap-folder.c,
12172         providers/imap/camel-imap-store.c: Fixed the #include lines to
12173         deal properly with gal.
12174
12175 2000-09-17  Dan Winship  <danw@helixcode.com>
12176
12177         * camel-folder-summary.h: update CamelFolderInfo
12178         * camel-folder-summary.c (camel_folder_info_free): New function to
12179         free the contents of a CamelFolderInfo
12180
12181 2000-09-15  Dan Winship  <danw@helixcode.com>
12182
12183         * camel.c (camel_init): Set camel_verbose_debug to TRUE if
12184         CAMEL_VERBOSE_DEBUG is set in the environment.
12185
12186         * camel-remote-store.c (remote_send_line, remote_recv_line): only
12187         log if camel_verbose_debug is TRUE.
12188
12189 2000-09-14  Jeffrey Stedfast  <fejj@helixcode.com>
12190
12191         * providers/imap/camel-imap-store.c (get_folder): Don't use
12192         dir_sep as top-level directory, use "/".
12193
12194         * providers/imap/camel-imap-folder.c (imap_expunge): Get rid of
12195         unused variable.
12196
12197 2000-09-13  Dan Winship  <danw@helixcode.com>
12198
12199         * providers/imap/camel-imap-folder.c (imap_expunge): Don't look at
12200         the response of the command. camel_imap_command_extended()
12201         processes EXPUNGE responses itself, so if we do it here too we
12202         remove twice as many summary items as we should.
12203
12204 2000-09-13  Jeffrey Stedfast  <fejj@helixcode.com>
12205
12206         * providers/imap/camel-imap-store.c (imap_folder_exists): Rewrote
12207         to take a third argument (gboolean *selectable) so that we can
12208         find out if the folder is selectable or not as we look to see if
12209         it exists. Also, don't use EXAMINE because that will not work on
12210         non-selectable folders, so use LIST instead.
12211         (get_folder): Check to see if the folder exists even vefore
12212         calling imap_create as this will save time. If the folder does
12213         exist, find out if it's selectable. Moved the call to refresh_info
12214         here.
12215
12216         * providers/imap/camel-imap-folder.c (imap_get_uids): Check for a
12217         NULL summary.
12218         (camel_imap_folder_new): Don't call refresh_info here - call it in
12219         get_folder() because we don't know if this folder even exists on
12220         the server yet! And even if it does, we don't know if it can hold
12221         messages or not yet.
12222
12223 2000-09-12  Jeffrey Stedfast  <fejj@helixcode.com>
12224
12225         * camel-mime-parser.c (folder_scan_step): Make sure *datalength is
12226         > 0 before calling camel_mime_filter_filter otherwise we will get
12227         a segfault if the filter calls iconv().
12228
12229 2000-09-08  Christopher James Lahey  <clahey@helixcode.com>
12230
12231         * providers/nntp/camel-nntp-auth.c,
12232         providers/nntp/camel-nntp-auth.h: Fixed a warning.
12233
12234 2000-09-07  Dan Winship  <danw@helixcode.com>
12235
12236         * camel-session.c (camel_session_get_storage_path): Make this not
12237         leak.
12238         
12239 2000-09-07  Dan Winship  <danw@helixcode.com>
12240
12241         * camel-session.c (camel_session_new): Make this take a path to a
12242         directory that Camel can use for its own nefarious purposes.
12243         (camel_session_get_storage_path): New function to return a path
12244         that a service can use for its own nefarious sub-purposes.
12245
12246         * camel-service.c (camel_service_get_path): New method (and
12247         useful default implementation) to get a (relative) pathname
12248         corresponding to the service.
12249
12250 2000-09-06  Dan Winship  <danw@helixcode.com>
12251
12252         * providers/pop3/camel-pop3-store.c (connect_to_server): Make KPOP
12253         work again.
12254
12255 2000-09-06  Jeffrey Stedfast  <fejj@helixcode.com>
12256
12257         * camel-mime-message.c (camel_mime_message_get_received_date):
12258         Implemented (someone added these to camel-mime-message.h but never
12259         implemented them!!) - though it may not be right.
12260         (camel_mime_message_get_sent_date): Same.
12261
12262 2000-09-05  Dan Winship  <danw@helixcode.com>
12263
12264         * camel-mime-part.c (camel_mime_part_get_filename): If a MIME part
12265         has no Content-Disposition, but does have a "name" on the
12266         Content-Type, return that as the filename.
12267         (process_header): strstrip the Content-Description
12268
12269 2000-09-05  Chris Toshok  <toshok@helixcode.com>
12270
12271         * providers/nntp/camel-nntp-utils.c (get_OVER_headers): care about
12272         response code.
12273         (get_HEAD_headers): same.
12274         (camel_nntp_get_headers): same.
12275
12276         * providers/nntp/camel-nntp-store.h: get rid of
12277         CAMEL_NNTP_OK/ERR/FAIL.
12278
12279         * providers/nntp/camel-nntp-store.c
12280         (camel_nntp_store_get_extensions): take CamelException arg and
12281         pass along to camel_nntp_command.
12282         (camel_nntp_store_get_overview_fmt): same.
12283         (nntp_store_connect): convert to using constants in
12284         camel-nntp-resp-codes.h
12285         (nntp_store_get_folder): make use of camel_nntp_folder_new.
12286         (camel_nntp_command_send_recv): new function to deal with auth
12287         challenge.
12288         (camel_nntp_command): split out most of this function into
12289         camel_nntp_command_send_recv.  also, return the actual response
12290         code instead of CAMEL_NNTP_OK/ERR/FAIL.
12291
12292         * providers/nntp/camel-nntp-resp-codes.h: new file.
12293
12294         * providers/nntp/camel-nntp-folder.h: prototype for
12295         camel_nntp_folder_new.
12296
12297         * providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new): new
12298         convenience function.
12299         (nntp_folder_get_message): care more about the actual response
12300         code.
12301
12302         * providers/nntp/Makefile.am (libcamelnntp_la_SOURCES): add
12303         camel-nntp-auth.c.
12304         (libcamelnntpinclude_HEADERS): add camel-nntp-auth.h.
12305
12306         * providers/nntp/camel-nntp-auth.h: new file.
12307
12308         * providers/nntp/camel-nntp-auth.c: new file.
12309
12310 2000-09-05  Peter Williams  <peterw@helixcode.com>
12311
12312         * providers/imap/camel-imap-store.c (imap_folder_exists): Don't free the
12313         result on error; the exception will have the relevant info.
12314
12315         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Check for
12316         exceptions here.
12317
12318         * providers/imap/camel-imap-store.c (imap_connect): Check the exception
12319         on the refresh_folders call.
12320
12321         * providers/imap/camel-imap-store.h: Clean up some now-unused fields.
12322
12323         * camel.c (camel_init): Call unicode_init again, now that libunicode
12324         will not initialize itself twice.
12325
12326 2000-09-02  Lauris Kaplinski  <lauris@helixcode.com>
12327
12328         * camel-folder-search (search_header_contains): Use e_utf8_strstrcase
12329
12330 2000-09-01  Christopher James Lahey  <clahey@helixcode.com>
12331
12332         * providers/imap/camel-imap-utils.c: Removed some unused
12333         functions.
12334
12335 2000-09-01  Peter Williams  <peterw@helixcode.com>
12336
12337         * providers/nntp/camel-nntp-store.c (camel_nntp_command): Initialize
12338         the statically-allocated CamelException so that it doesn't contain
12339         junk data that camel_exception_set() may try to free.
12340         (camel_nntp_store_get_extensions): Same.
12341         (camel_nntp_store_get_overview_fmt): Same.
12342
12343         * providers/pop3/camel-pop3-store.c (camel_pop3_command): Typo
12344         fix (if (*ret) -> if (ret)).
12345
12346         * providers/pop3/camel-pop3-store.c (pop3_connect): Set the
12347         port # back to what was specified ASAP, so that the hash of
12348         the URL doesn't change (which causes a failure in
12349         service_cache_remove that leads to a segfault).
12350
12351         * providers/imap/camel-imap-store.c (imap_connect): Clear the 
12352         exception after a failed LOGIN so that it doesn't pass through
12353         to the upper level and make mail think that the login failed.
12354
12355         * providers/pop3/camel-pop3-store.c (pop3_connect): As above.
12356
12357 2000-08-31  Peter Williams  <peterw@helixcode.com>
12358
12359         * providers/pop3/camel-pop3-store.c (camel_pop3_store_get_type):
12360         Implement POP3 with the CamelRemoteStore now.
12361         (connect_to_server): Hack this a bit to get KPOP to work. Obey
12362         the new connection semantics of the remote store (implicitly).
12363         (query_auth_types_connected): Clear exceptions after attempts
12364         to connect; the code at the bottom will catch hard errors.
12365         Use camel_service_connect.
12366         (camel_pop3_command): Take a CamelException; now, when an error
12367         occurs, ret is set to NULL and the exception passes back the
12368         appropriate information.
12369         (pop3_get_response): Same as above.
12370         (pop3_try_authenticate): Give camel_pop3_command its exception
12371         and handle it properly.
12372         (pop3_connect): Call the parent classfuncs. Don't disconnect
12373         on error (done for us).
12374
12375         * providers/pop3/camel-pop3-folder.c: Obey the camel_pop3_command
12376         semantics.
12377
12378         * camel-remote-store.c (remote_query_auth_types_connected): Don't
12379         warn; just return NULL.
12380         (remote_query_auth_types_generic): Same.
12381         (remote_send_string): Filter out passwords in debugging output.
12382
12383         * providers/pop3/camel-pop3-store.c (camel_pop3_store_init): Also
12384         set the ALLOW_AUTH flag.
12385
12386         * providers/imap/camel-imap-store.c (camel_imap_store_init): Same.
12387
12388 2000-08-31  Chris Toshok  <toshok@helixcode.com>
12389
12390         * providers/nntp/camel-nntp-store.c (camel_nntp_store_class_init):
12391         remove get_folder_name.
12392         (nntp_store_get_folder_name): remove.
12393
12394 2000-08-31  Lauris Kaplinski  <lauris@helixcode.com>
12395
12396         * camel-mime-part.c (write_to-stream): Use filter only if we have one
12397         
12398 2000-08-31  Chris Toshok  <toshok@helixcode.com>
12399
12400         * providers/nntp/camel-nntp-utils.c (get_OVER_headers): use
12401         camel_remote_store_recv_line.
12402
12403         * providers/nntp/camel-nntp-folder.c (nntp_folder_get_message):
12404         use camel_remote_store_recv_line to build message.  also, free our
12405         buffer so we don't leak like mad.
12406
12407         * providers/nntp/camel-nntp-store.c:
12408         (camel_nntp_store_get_additional_data) remove.
12409         (camel_nntp_store_get_extensions): use
12410         camel_remote_store_recv_line.
12411         (camel_nntp_store_get_overview_fmt): same.  also, don't rely on
12412         _get_additional_data anymore since it's easier to parse without.
12413         (camel_nntp_command): use camel_remote_store_send_string and
12414         camel_remote_store_recv_line.
12415
12416         * providers/nntp/camel-nntp-store.h: CamelRemoteStore is the
12417         parent class now.  remove istream/ostream since CamelRemoteStore
12418         takes care of that for us.  also remove the prototype for
12419         camel_nntp_store_get_additional_data.
12420
12421         * providers/nntp/camel-nntp-newsrc.c (camel_nntp_newsrc_write):
12422         make sure to clear dirty bit.
12423         (camel_nntp_newsrc_read_for_server): don't worry about continually
12424         trying to open the file - if it fails we just return an
12425         unpopulated .newsrc file.
12426
12427 2000-08-31  Chris Toshok  <toshok@helixcode.com>
12428
12429         * providers/nntp/camel-nntp-newsrc.c
12430         (camel_nntp_newsrc_read_for_server): make this a bit more robust.
12431         try to create an empty .newsrc file for the server if we can't
12432         open it for reading.  also, don't allocate everything until we've
12433         opened the file.
12434
12435         * providers/nntp/camel-nntp-utils.c (get_OVER_headers): make use
12436         of our overview field indices.
12437         (camel_nntp_get_headers): only call get_OVER_headers if the
12438         extension is present.  warn if it's not - since get_HEAD_headers
12439         needs work before it works.
12440
12441         * providers/nntp/camel-nntp-store.c
12442         (camel_nntp_store_get_extensions): new function - query the server
12443         for it's extensions.
12444         (camel_nntp_store_get_overview_fmt): new function - query the
12445         server for the overview format and build our table of the indices
12446         we care about.  support the "full" suffix on fields.
12447         (nntp_store_connect): call camel_nntp_store_get_extensions and
12448         camel_nntp_store_get_overview_fmt.
12449
12450         * providers/nntp/camel-nntp-store.h: add codes for extensions
12451         found on news.mozilla.org.  only one that we care about is OVER.
12452         also, add CamelNNTPOverField and an enum of the overview fields
12453         that we care about.
12454
12455 2000-08-31  Jeffrey Stedfast  <fejj@helixcode.com>
12456
12457         * providers/imap/camel-imap-utils.c (imap_translate_sexp):
12458         Reimplemented. It should now work correctly for most possible
12459         VFolder rules.
12460
12461 2000-08-31  Jeffrey Stedfast  <fejj@helixcode.com>
12462
12463         * providers/imap/camel-imap-store.c (camel_imap_command_extended):
12464         Don't save any exceptions caused by camel_imap_folder_changed
12465         (camel_imap_fetch_command): Same.
12466         
12467         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
12468         Using a new way of calculating the first recent message that seems
12469         more accurate. Also added code to make sure we don't accidently
12470         add a duplicate summary.
12471
12472 2000-08-31  Not Zed  <NotZed@HelixCode.com>
12473
12474         * camel-mime-part.c (write_to_stream): Use the proper type
12475         checking function to check for text types.
12476         (write_to_stream): If we have a charset on a text type that
12477         isn't us-ascii or utf-8, then we need to reencode it, so add a
12478         filter to do that too.
12479         (write_to_stream): Fix some warnings/use the right constructor,
12480         oops.
12481         (write_to_stream): Rearrange the logic so it always does charset
12482         conversion, and not just if we have a qp/base64 block.
12483
12484         * camel-mime-utils.c (append_latin1): New function - even though
12485         its broken, we'll assume mailers send latin1 headers instead of
12486         us-ascii.  We just have to encode high chars into utf-8.
12487         (header_decode_text): Call append_latin1 for appending unencoded
12488         text segments.
12489         (append_latin1): Do an additional mask for account for c's
12490         undefined behaviour for sign extension whilst shifting right.
12491
12492 2000-08-30  Jeffrey Stedfast  <fejj@helixcode.com>
12493
12494         * providers/imap/camel-imap-store.c (camel_imap_fetch_command):
12495         Rewrote to ignore strings that look like server responses until it
12496         is sure that it has finished reading the literal string response.
12497
12498 2000-08-30  Jeffrey Stedfast  <fejj@helixcode.com>
12499         
12500         * camel-remote-store.c (remote_send_string): Don't wrap printed
12501         strings in quotes, makes things messy
12502         
12503         * providers/imap/camel-imap-folder.c (imap_get_message): Updated
12504         to use the camel_imap_fetch_command
12505         
12506         * providers/imap/camel-imap-stream.c (stream_read): Updated to use
12507         camel_imap_fetch_command
12508
12509         * providers/imap/camel-imap-store.c (camel_imap_command_extended):
12510         No longer handles FETCH requests so no longer needs to be
12511         concerned with checking to make sure that server responses are
12512         valid (they have to be).
12513         (camel_imap_fetch_command): New convenience function that handles
12514         all FETCH requests
12515
12516 2000-08-30  Peter Williams  <peterw@helixcode.com>
12517
12518         * camel-remote-store.c (remote_connect): Unify with remote_post_connect.
12519         (remote_disconnect): Unify with remote_pre_disconnect.
12520         (camel_remote_store_class_init): Don't use the post_connect and
12521         pre_disconnect classfuncs anymore ; they weren't especially useful.
12522
12523         * providers/imap/camel-imap-store.c (imap_connect): Use this again
12524         instead of implementing post_connect.
12525         (imap_disconnect): Analogous to above.
12526
12527         * camel-session.c (camel_session_get_service_connected): New function.
12528         Like camel_session_get_service() but also connects to the service
12529         if needed. camel_session_get_{store,transport} (defined in the header)
12530         used this now, preventing annoying when-to-connect problems.
12531
12532         * camel-service.c (camel_service_new): Revert to the old behavior
12533         of not connecting until told to do so. Otherwise doing auth
12534         testing correctly is really hard.
12535         (camel_service_connect): Fix behavior here (set the connected
12536         flag).
12537         (camel_service_disconnect): Unset the connected flag.
12538
12539 2000-08-30  Jeffrey Stedfast  <fejj@helixcode.com>
12540
12541         * providers/imap/camel-imap-store.c: General cleanup / moving
12542         stuff around to make things easier to follow.
12543
12544 2000-08-30  Jeffrey Stedfast  <fejj@helixcode.com>
12545         
12546         * camel-remote-store.c: Prevent exceptions from being overwritten
12547
12548         * providers/imap/camel-imap-folder.c (imap_expunge): Beautified
12549         (imap_get_subfolder_names_internal): Removed old code as the
12550         replacement code has now been tested and proven to work
12551
12552 2000-08-29  Jeffrey Stedfast  <fejj@helixcode.com>
12553
12554         * providers/imap/camel-imap-utils.c: Removed old code that will
12555         never be needed again
12556
12557         * providers/imap/camel-imap-store.c: Removed old code for
12558         try_connect - will never need this code
12559         (slurp_response): Update to make sure we aren't falsely detecting
12560         EXPUNGE flags
12561
12562 2000-08-29  Peter Williams  <peterw@helixcode.com>
12563
12564         * camel-service.c (camel_service_connect): Uncomment this.
12565         (camel_service_disconnect): Same.
12566
12567         * camel-remote-store.[ch]: New files. Abstract remote storages
12568         (IMAP, POP3, NNTP) and hides the lower-level networky stuff.
12569         
12570         * camel-service.c (camel_service_new): Take an extra argument, the
12571         provider that created us, cause it's useful.
12572         (camel_service_finalize): Unref our new provider member.
12573
12574         * camel-session.c (camel_session_get_service): Pass the proper number of
12575         arguments to camel_service_new().
12576
12577         * camel-imap-store.c: Massive update: 1) use the CamelRemoteService to
12578         make our life Very Easy (TM). 2) Change the semantics of all 
12579         camel_imap_command* functions to take exceptions, centralize tons of
12580         duplicate code, and use the handy RemoteStore utility functions
12581
12582         * camel-imap-folder.c: Use the new semantics of camel_imap_command*
12583
12584         * camel-imap-stream.c: Same.
12585         
12586 2000-08-29  Jeffrey Stedfast  <fejj@helixcode.com>
12587
12588         * providers/imap/camel-imap-store.c (camel_imap_command_extended):
12589         Updated to check for EXPUNGE notifications
12590
12591         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
12592         Updated to account for messages which have been expunged (now
12593         takes a new arg, a GPtrArray of message id's that have been
12594         expunged)
12595         (imap_expunge): Updated (we may want to just use the code in
12596         folder_changed now instead of doing our own summary
12597         expunging...but that can be fixed later)
12598         (imap_append_message): Updated.
12599         (imap_copy_message_to): Updated.
12600         (imap_move_message_to): Updated.
12601
12602 2000-08-28  Peter Williams  <peterw@helixcode.com>
12603
12604         * camel-folder.c (camel_folder_refresh_info): New member function,
12605         refresh_info, used for rereading folder state after its state has
12606         somehow become unknown. Tries to preserve last-known status of
12607         messages.
12608
12609         * providers/mbox/camel-mbox-folder.c (mbox_refresh_info): Implement
12610         ::refresh_info (split up ::init)
12611
12612         * providers/mbox/camel-mbox-store.c (get_folder): Call ::refresh_info.
12613
12614         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Call
12615         ::refresh_info once initialized.
12616         (imap_refresh_info): New member function; reads the summary from
12617         the server (used to be in camel_imap_folder_new; split out).
12618
12619         * providers/imap/camel-imap-store.c (imap_connect): Set
12620         CamelService::connected a little early so that 
12621         camel_imap_command won't try to connect while already
12622         connnecting.
12623         (camel_imap_command*): Try to connect if not connected already.
12624         
12625         * providers/pop3/camel-pop3-folder.c (pop3_refresh_info): Same as above.
12626
12627         * providers/pop3/camel-pop3-folder.c (camel_pop3_folder_new): Same
12628         as above.
12629
12630         * providers/pop3/camel-pop3-store.c (pop3_connect): Set 
12631         CamelService::connected a little early so that
12632         camel_pop3_command won't try to connect while already
12633         connecting
12634         (connect_to_server): Same.
12635
12636         * providers/nntp/camel-nntp-folder.c (nntp_folder_refresh_info): Same
12637         as above.
12638
12639 2000-08-28  Jeffrey Stedfast  <fejj@helixcode.com>
12640
12641         * providers/imap/camel-imap-folder.c (imap_get_message): Fixed the
12642         hack around quoted string responses - should now handle them
12643         according to the specifications in the RFC
12644         
12645         * providers/imap/camel-imap-stream.c (stream_read): Updated to
12646         match the code currently used in camel-imap-folder.c
12647
12648 2000-08-28  Ettore Perazzoli  <ettore@helixcode.com>
12649
12650         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
12651         Never ever free `tmpname' as it comes from `alloca()'!
12652
12653 2000-08-26  Ettore Perazzoli  <ettore@helixcode.com>
12654
12655         * camel-mime-utils.c (header_decode_text): Use `g_free()', not
12656         `free()', to free `decword'.
12657
12658 2000-08-25  Peter Williams  <peterw@helixcode.com>
12659
12660         * camel.c (camel_init): Don't call unicode_init; code in e-util
12661         will do it, and if unicode_init is called twice, you get an
12662         infinite loop when looking up nonexistant encodings (patch
12663         has been submitted to libunicode's maintainer).
12664         
12665         * camel-provider.h: Add a new field, default_ports, which
12666         helps the configuration code guess about how to make CamelURL's
12667         from providers.
12668         
12669         * providers/*/camel-*-provider.c: Specify default ports.
12670
12671 2000-08-25  Jeffrey Stedfast  <fejj@helixcode.com>
12672
12673         * providers/imap/camel-imap-folder.c
12674         (imap_get_subfolder_names_internal): If the url path is "/" and
12675         the folder path is "/", just LIST "" "*" (this should fix some
12676         cyrus imapd problems). Also, INBOX is case insensitive so use
12677         g_strcasecmp
12678
12679 2000-08-24  Lauris Kaplinski  <lauris@helixcode.com>
12680
12681         * camel-folder-summary.c (summary_build_content_info):
12682         Use UTF-8 as default
12683         * camel-mime-part-utils.c (simple_data_wrapper_construct_from_parser):
12684         Use UTF-8 as default
12685         * camel-mime-utils.c (rfc2047_decode_word): Use UTF-8
12686         
12687 2000-08-17  Not Zed  <NotZed@HelixCode.com>
12688
12689         * providers/mh/camel-mh-folder.c (mh_finalize): And here too.
12690
12691         * providers/mbox/camel-mbox-folder.c (mbox_finalize): Close index
12692         on exit.
12693
12694 2000-08-23  Dan Winship  <danw@helixcode.com>
12695
12696         * camel-mime-utils.c (header_address_list_format_append): put
12697         commas between addresses.
12698
12699 2000-08-22  Dan Winship  <danw@helixcode.com>
12700
12701         * providers/imap/camel-imap-folder.c
12702         (imap_protocol_get_summary_specifier): use BODY.PEEK, not BODY, so
12703         we don't set the message \Seen.
12704
12705 2000-08-22  Christopher James Lahey  <clahey@helixcode.com>
12706
12707         * providers/pop3/camel-pop3-store.c: Fixed a small warning.
12708
12709 2000-08-22  Peter Williams  <peterw@helixcode.com>
12710
12711         * camel-service.c (camel_service_new): Connect automatically if the
12712         URL is not empty.
12713         (finalize): Disconnect automatically if connected.
12714         (camel_service_query_auth_types): Split into two functions; one to
12715         be called if we're connected to an actual server (_connected), one
12716         to be called if we're just gauging the general authtypes supported
12717         (_generic).
12718         (is_connected): Remove.
12719
12720         * camel-store.c (camel_store_get_folder): Don't connect explicitly to
12721         the service.
12722
12723         * providers/nntp/camel-nntp-store.c (query_auth_types_generic): Split
12724         the query_auth_types function. Hook it up in _new.
12725         (finalize): Don't try to disconnect here.
12726         
12727         * providers/pop3/camel-pop3-store.c (query_auth_types_generic): Same.
12728         (finalize): Don't try to disconnect here.
12729
12730         * providers/imap/camel-imap-store.c (query_auth_types_generic): Same.
12731         (finalize): Don't try to disconnect here.
12732
12733         * providers/smtp/camel-smtp-transport.c (query_auth_types_generic): Split
12734         the query_auth_types (dummy, in this case) function. Hook it up in _new.
12735         (finalize): Don't try to disconnect here.
12736
12737 2000-08-21  JP Rosevear  <jpr@helixcode.com>
12738         
12739         * providers/nntp/camel-nntp-folder.c (nntp_folder_get_subfolder_names):
12740         Make sure newsrc is not null
12741         (nntp_folder_get_subfolder_names): ditto
12742
12743         * providers/nntp/camel-nntp-newsrc.c 
12744         (camel_nntp_newsrc_get_subscribed_group_names): Programming check
12745         for newsrc == NULL
12746         (camel_nntp_newsrc_get_all_group_names): ditto
12747         (camel_nntp_newsrc_write_to_file): ditto
12748         (camel_nntp_newsrc_write): ditto
12749
12750 2000-08-21  JP Rosevear  <jpr@helixcode.com>
12751
12752         * providers/nntp/camel-nntp-store.c (camel_nntp_command): 
12753         Make sure respbuffer is not null before manipulating it.
12754         If it is null, return CAMEL_NNTP_FAIL and a decent error
12755         message.
12756         
12757 2000-08-18  Peter Williams  <peterw@helixcode.com>
12758
12759         * camel-internet-address.c (internet_encode): If the name is "" we
12760         weren't outputting anything; output the address at least.
12761
12762 2000-08-16  Peter Williams  <peterw@helixcode.com>
12763
12764         * camel-internet-address.c (internet_encode): Fix a leak when
12765         name = "". It's a single-byte leak, but it's the little things
12766         that count.
12767
12768         * camel-object.c (camel_type_lock_up): Don't leave the type
12769         system locked when a bad unlock happens.
12770
12771         * providers/mbox/camel-mbox-store.c (get_folder): Fix a leak.
12772
12773 2000-08-15  Peter Williams  <peterw@helixcode.com>
12774
12775         * providers/imap/camel-imap-folder.c (imap_copy_message_to): Typo fix.
12776
12777 2000-08-14  Peter Williams  <peterw@helixcode.com>
12778
12779         * camel-folder-search.c (search_get_sent_date): New search function;
12780         returns the time_t when the message was sent.
12781         (search_get_receive_date): Same for when it was received.
12782         (search_get_current_date): Gets the current time for use with the
12783         above two. Is this in the right place?
12784
12785         * camel-folder-search.h: Add the new functions above to the class.
12786
12787 2000-08-13  Dan Winship  <danw@helixcode.com>
12788
12789         * providers/nntp/Makefile.am (libcamelnntpinclude_HEADERS): Add
12790         camel-nntp-utils.h
12791
12792         * providers/imap/camel-imap-folder.c
12793         (imap_get_subfolder_names_internal): do a strcasecmp rather than
12794         just a strcmp when checking if a folder is "INBOX", since it is
12795         a case-insensitive name.
12796
12797 2000-08-12  Dan Winship  <danw@helixcode.com>
12798
12799         * providers/imap/camel-imap-folder.c (imap_get_summary_internal):
12800         Don't assume the FETCH results will come back in the order they
12801         were requested.
12802         (imap_get_subfolder_names_internal): Add "INBOX" to the list as
12803         g_malloc'ed memory, not a static string.
12804
12805 2000-08-12  Jeffrey Stedfast  <fejj@helixcode.com>
12806
12807         * providers/imap/camel-imap-store.c
12808         (camel_imap_command_continuation): Now takes a char * parameter
12809         rather than a stream
12810         (camel_imap_command_continuation_with_stream): Same function as
12811         above but takes a stream parameter instead
12812
12813         * providers/imap/camel-imap-folder.c (imap_append_message): Use
12814         camel_imap_command_continuation_with_stream
12815
12816 2000-08-12  Dan Winship  <danw@helixcode.com>
12817
12818         * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): New
12819         function to do one round of attempted authentication.
12820         (pop3_connect): Move a bunch of code out into
12821         pop3_try_authenticate and fix some bugs in the edge cases.
12822
12823 2000-08-12  Jeffrey Stedfast  <fejj@helixcode.com>
12824
12825         * providers/imap/camel-imap-store.c (query_auth_types): No longer
12826         calls try_connect() to get authtypes
12827
12828 2000-08-11  Jeffrey Stedfast  <fejj@helixcode.com>
12829
12830         * providers/imap/camel-imap-store.c
12831         (camel_imap_command_continuation): Changed param order a bit and
12832         fixed some logic
12833
12834         * providers/imap/camel-imap-folder.c (imap_append_message): Use
12835         the new multi-transactional convenience functions
12836
12837 2000-08-11  Jeffrey Stedfast  <fejj@helixcode.com>
12838         
12839         * providers/imap/camel-imap-store.c
12840         (camel_imap_command_preliminary): New convenience function for
12841         multi-transactional commands (opening request)
12842         (camel_imap_command_continuation): New convenience function for
12843         multi-transactional commands (followup data)
12844
12845 2000-08-11  Christopher James Lahey  <clahey@helixcode.com>
12846
12847         * providers/mh/camel-mh-folder.c: Fixed a warning.
12848
12849 2000-08-11  Chris Toshok  <toshok@helixcode.com>
12850
12851         * providers/nntp/camel-nntp-folder.c
12852         (camel_nntp_folder_class_init): remove get_name and get_full_name
12853         assignments, since the camel-folder.c implementation does what we
12854         need.
12855
12856 2000-08-11  Chris Toshok  <toshok@helixcode.com>
12857
12858         * providers/nntp/camel-nntp-store.c
12859         (camel_nntp_store_get_toplevel_dir): use g_get_home_dir, since
12860         evolution_dir isn't available in the providers.
12861
12862 2000-08-11  Peter Williams  <peterw@helixcode.com>
12863
12864         * camel-folder.c (thaw): Fix a bug where the message_changed
12865         signal wasn't being emitted.
12866
12867 2000-08-11  Not Zed  <NotZed@HelixCode.com>
12868
12869         * providers/mh/camel-mh-folder.c (mh_set_message_user_tag):
12870         Implement.
12871         (mh_get_message_user_tag): Implement.
12872
12873         * providers/mbox/camel-mbox-folder.c (mbox_get_message_user_tag):
12874         (mbox_set_message_user_tag): Implement.
12875
12876         * camel-folder.c (move_message_to): Yay so lets fix an already
12877         fixed fix, again.
12878         (copy_message_to): and here too ... update for api change to append().
12879         And removed another warning.
12880         (camel_folder_set_message_user_tag): Routine to set message tags.
12881         (camel_folder_get_message_user_tag): And accessor.
12882
12883 2000-08-10  Christopher James Lahey  <clahey@helixcode.com>
12884
12885         * camel-folder-search.c, camel-folder-summary.c, camel-medium.c,
12886         camel-mime-filter-charset.c, camel-mime-filter.c,
12887         camel-mime-filter.h, camel-mime-message.c, camel-mime-parser.c,
12888         camel-mime-part-utils.c, camel-mime-part.c, camel-mime-utils.c,
12889         camel-movemail.c, camel-multipart.c, camel-object.c,
12890         camel-stream-mem.c, providers/mbox/camel-mbox-folder.c,
12891         providers/mbox/camel-mbox-summary.c,
12892         providers/mh/camel-mh-folder.c,
12893         providers/smtp/camel-smtp-transport.c: Fixed some warnings.
12894
12895 2000-08-11  Not Zed  <NotZed@HelixCode.com>
12896
12897         * providers/vee/camel-vee-folder.c (vee_folder_build_folder): Free
12898         the search properly.
12899         (vee_folder_build): And here too.
12900
12901 2000-08-10  Jeffrey Stedfast  <fejj@helixcode.com>
12902
12903         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
12904         If we go over the max number of messages, don't keep requesting
12905         new message summaries, just break.
12906
12907 2000-08-11  Not Zed  <NotZed@HelixCode.com>
12908
12909         * camel-mime-parser.c (folder_scan_header): A better way to
12910         compress leading whitespace.  The code is probably invalid anyway,
12911         I dont think it will work across buffer boundaries.
12912
12913         * providers/mbox/camel-mbox-folder.c (mbox_append_message): And
12914         write out proper format From lines here too.
12915
12916         * providers/mbox/camel-mbox-summary.c
12917         (camel_mbox_summary_build_from): New function to build a more
12918         compatible mbox "From " line.
12919         (camel_mbox_summary_sync): Write From lines in the proper format.
12920
12921 2000-08-10  Not Zed  <NotZed@HelixCode.com>
12922
12923         * providers/mh/camel-mh-store.c (get_folder): Remove warnin g.
12924
12925         * providers/mbox/camel-mbox-store.c (xrename): Kill some warnings
12926         with constification.
12927
12928         * providers/imap/camel-imap-folder.c (imap_append_message): Fixed
12929         for append api change.  Eek this routine seriously wastes memory.
12930
12931         * providers/mh/camel-mh-folder.c (mh_search_free): Impelemnt.
12932         (mh_append_message): Fix for api change, and include user flags
12933         and tags in new message.
12934
12935         * providers/vee/camel-vee-folder.c (vee_search_by_expression): Fix
12936         for search api change.
12937
12938         * camel-folder.c (camel_folder_search_free): New function for
12939         freeing search results.
12940         (search_free): Changed my mind, implement a default that actually
12941         does something.  Free as to the old interface.
12942         (camel_folder_append_message): Changed to accept a
12943         camelmessageinfo rather than flags, which just doesn't have enough
12944         info in it.
12945         (copy_message_to): Change for append_message api change.
12946         (move_message_to): Likewise.
12947
12948         * providers/mbox/camel-mbox-folder.c (mbox_search_free):
12949         Implement.
12950         (mbox_append_message): Fix for api change, and also copy user
12951         flags/tags across to new summary.
12952
12953         * camel-folder-search.c (search_user_tag): A search expression
12954         that returns the current use flag by name.
12955         (camel_folder_search_free_result): New function to free the result
12956         of a search.
12957
12958         * camel-folder-summary.c: Bump summary version.
12959         (message_info_new): 
12960         (message_info_load): 
12961         (message_info_save): 
12962         (camel_message_info_dup_to): 
12963         (camel_message_info_free): Added support for arbitrary tag/value
12964         pairs (CamelTag's).
12965         (camel_tag_get): 
12966         (camel_tag_set):
12967         (camel_tag_list_size):
12968         (camel_tag_list_free): Operations for working with CamelTags.
12969
12970 2000-08-09  Peter Williams  <peterw@helixcode.com>
12971
12972         * camel-store.c (camel_store_get_folder): Connect beforehand, if
12973         necessary.
12974
12975         * providers/imap/camel-imap-store.c (camel_imap_store_init): Default
12976         the dir_sep to "/" so that certain functions can safely assume that
12977         dir_sep is valid (at least, nonnull).
12978
12979 2000-08-09  Ettore Perazzoli  <ettore@helixcode.com>
12980
12981         * providers/nntp/camel-nntp-folder.c
12982         (nntp_folder_set_message_flags): Get rid of an unused variable.
12983
12984         * providers/nntp/Makefile.am (INCLUDES): Fix includes so that we
12985         don't use installed headers anymore.  [I copied this over from the
12986         IMAP provider, that does not seem to have this problem.]
12987
12988 2000-08-09  Not Zed  <NotZed@HelixCode.com>
12989
12990         * camel-folder-search.c (camel_folder_search_execute_expression):
12991         Reorder search result in summary order if we searched with a
12992         summary.
12993
12994 2000-08-08  Dan Winship  <danw@helixcode.com>
12995
12996         * camel-uid-cache.c: New code to keep an on-disk cache of what
12997         UIDs have been seen in a folder.
12998
12999         * camel-provider.h: Add new flags CAMEL_PROVIDER_IS_SOURCE (mail
13000         can arrive in it by non-Camel means) and CAMEL_PROVIDER_IS_STORAGE
13001         (you can work with mail directly without needing to copy it local).
13002
13003         * providers/*/camel-*-provider.c: Add flags as needed: imap and
13004         mbox are SOURCE and STORAGE. mh and nntp are just STORAGE, pop3 is
13005         just SOURCE.
13006
13007         * camel-mime-message.c (process_header): Add another subject
13008         g_strstrip that fejj's earlier commit missed.
13009
13010 2000-08-08  Peter Williams  <peterw@helixcode.com>
13011
13012         * camel-provider.h: Remove some GTK stuff that I missed.
13013
13014         * providers/imap/camel-imap-store.c (imap_noop): Turn this
13015         back on with the new timeout interface in CamelSession.
13016
13017         * camel-session.[ch] (camel_session_register_timeout): New
13018         interface for Camel to register timeouts. Basically the
13019         GTK timeout interface is copied. We do this because Camel isn't
13020         allowed to use GTK anymore.
13021         
13022 2000-08-07  Not Zed  <NotZed@HelixCode.com>
13023
13024         * providers/mh/camel-mh-folder.c (mh_append_message): Only retry
13025         another uid if we had a name clash, otherwise fail.
13026
13027 2000-08-07  Jeffrey Stedfast  <fejj@helixcode.com>
13028
13029         * providers/imap/camel-imap-folder.c
13030         (imap_get_subfolder_names_internal): If we are trying to get a
13031         subfolder listing of the root folder, always make sure INBOX is
13032         there...
13033
13034         * providers/imap/camel-imap-utils.c (imap_parse_list_response): 
13035         Check for NIL as a directory separator.
13036
13037 2000-08-07  Peter Williams  <peterw@helixcode.com>
13038
13039         * providers/nntp/Makefile.am: Reorder the INCLUDES to pull
13040         in the camel headers from the local source tree before
13041         the ones in $(includedir). This was causing compile problems
13042         because the installed, Gtk-based camel-object.h was included
13043         before the uninstall Camel-based one.
13044
13045 2000-08-07  Jeffrey Stedfast  <fejj@helixcode.com>
13046
13047         * providers/imap/camel-imap-utils.c (imap_translate_sexp): Strip
13048         all \n's from the expression
13049
13050         * string-utils.c (strip): New convenience function to strip
13051         occurences of a single char from a string
13052
13053         * camel-mime-message.c (camel_mime_message_set_subject): Do a
13054         g_strstrip on the subject so we can stop getting those annoying
13055         leading spaces
13056
13057 2000-08-07  Dan Winship  <danw@helixcode.com>
13058
13059         * camel-folder.c (camel_folder_free_deep): Fix this to not require
13060         NULL-termination of the array.
13061
13062 2000-08-04  Jeffrey Stedfast  <fejj@helixcode.com>
13063
13064         * providers/imap/camel-imap-store.c (imap_connect): If we fail to
13065         get a dir_sep, then supply the default of "/".
13066         (get_folder): Undo changes by Peter
13067
13068 2000-08-04  Peter Williams  <peterw@helixcode.com>
13069
13070         * providers/imap/camel-imap-store.c (get_folder): Prevent a coredump
13071         when get_folder()ing from a store with dir_sep = NULL.
13072
13073 2000-08-04  Peter Williams  <peterw@helixcode.com>
13074
13075         * camel-store.h: Include camel-object.h. Ettore said this wasn't
13076         compiling.
13077
13078 2000-08-04  Not Zed  <NotZed@HelixCode.com>
13079
13080         * camel-url.c (camel_url_set_protocol): 
13081         (camel_url_set_host): 
13082         (camel_url_set_path): 
13083         (camel_url_set_port): Url editing functions.
13084
13085 2000-08-04  Dan Winship  <danw@helixcode.com>
13086
13087         * providers/pop3/camel-pop3-folder.c (pop3_set_message_flags): 
13088         (pop3_sync): Indexes into the flags array are message_number minus
13089         1, not just message_number.
13090
13091         * providers/pop3/camel-pop3-store.c: add a debugging macro for
13092         doing protocol tracing.
13093
13094 2000-08-03  Jeffrey Stedfast  <fejj@helixcode.com>
13095
13096         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Only
13097         call imap_get_summary_internal if the folder can hold messages
13098
13099         * providers/nntp/camel-nntp-provider.c (camel_provider_module_init): 
13100         Initialize the service_cache for the news/nntp providers
13101
13102 2000-08-03  Peter Williams  <peterw@helixcode.com>
13103
13104         * providers/nntp/Makefile.am (INCLUDES): Add -I$(top_srcdir) to
13105         pull in libibex/ibex.h
13106
13107 2000-08-02  Not Zed  <NotZed@HelixCode.com>
13108
13109         * providers/mh/camel-mh-summary.c (camel_mh_summary_sync): Expunge
13110         from the end, so the index isn't messed up when you remove a
13111         message.
13112
13113         * providers/mh/camel-mh-folder.c (mh_append_message): Fix a bug
13114         where it would never open an output file/uid.
13115
13116         * providers/mbox/camel-mbox-store.c (rename_folder):
13117         Implementation for mbox as well.
13118
13119         * camel-store.c (camel_store_rename_folder): New method to rename folders.
13120         (rename_folder): Default implementation.
13121
13122         * providers/mh/camel-mh-store.c (delete_folder): Implement this.
13123         (rename_folder): Implement a rename operation.
13124
13125 2000-08-02  Dan Winship  <danw@helixcode.com>
13126
13127         * providers/MH: Kill this. It doesn't have any code to do anything
13128         the new mh provider doesn't do better.
13129
13130         * providers/Makefile.am: Remove reference to MH subdir, and
13131         promote nntp to fully-supported status, since it does compile and
13132         all.
13133
13134         * camel-mime-message.c (camel_mime_message_set_subject): Trim
13135         trailing space from the subject. I've now seen replies from two
13136         different people that tricked the threading code by (a) not having
13137         References/In-Reply-To, and (b) adding an extra space to the end
13138         of the subject line so the subject-based threading fails too. Who
13139         writes these broken mailers anyway?
13140
13141 2000-08-01  Jeffrey Stedfast  <fejj@helixcode.com>
13142
13143         * providers/smtp/camel-smtp-transport.c (smtp_helo): When forced
13144         to use the IP, place it in square brackets.
13145
13146         * providers/imap/camel-imap-utils.c (imap_translate_sexp): New and
13147         improved sexp parser. An honest try at using e-sexp is wrapped in
13148         a #ifdef at the bottom of the file but is currently not used
13149
13150         * providers/imap/camel-imap-folder.c (imap_search_by_expression):
13151         We want to do a UID SEARCH so we get UIDs back instead of sequence
13152         numbers
13153
13154 2000-08-01  Not Zed  <NotZed@HelixCode.com>
13155
13156         * providers/mh: New mh provider implementation.
13157
13158         * providers/Makefile.am (SUBDIRS): Added mh provider.
13159
13160 2000-07-31  Jeffrey Stedfast  <fejj@helixcode.com>
13161
13162         * providers/imap/camel-imap-folder.c (imap_get_message_info_internal): 
13163         Some IMAP servers don't wrap the UID in ()'s so don't depend on that
13164         (imap_get_summary_internal): Same
13165
13166         * providers/imap/camel-imap-utils.c (free_sexp_node): Oops, forgot to
13167         free node->function - not good.
13168
13169 2000-07-31  Peter Williams  <peterw@helixcode.com>
13170
13171         * providers/vee/camel-vee-folder.c (vee_search_by_expression): Add
13172         a NULL to the matches pointer array so that g_strfreev knows where
13173         the end is.
13174
13175 2000-07-31  Jeffrey Stedfast  <fejj@helixcode.com>
13176
13177         * providers/imap/camel-imap-utils.c (imap_translate_sexp): New
13178         convenience function to translate a Camel sexp into the equivalent
13179         IMAP sexp.
13180
13181         * providers/imap/camel-imap-store.c: More places now use
13182         imap_next_word
13183
13184         * providers/imap/camel-imap-folder.c (imap_search_by_expression):
13185         Implemented initial version (this may or may not work quite right)
13186
13187 2000-07-28  Jeffrey Stedfast  <fejj@helixcode.com>
13188
13189         * providers/imap/camel-imap-folder.c (imap_expunge): Make sure
13190         the third word/token (whatever) is "EXPUNGE" and not something
13191         else like "EXISTS" or "RECENT". When removing the message from
13192         the summary also make sure to free that data to avoid leakage.
13193         Also make sure to subtract 1 from the 'id' since IMAP starts
13194         at 1 and our summary starts at 0 :-)
13195
13196 2000-07-28  Jeffrey Stedfast  <fejj@helixcode.com>
13197         
13198         * providers/imap/camel-imap-store.c (camel_imap_status): Cleaned
13199         up a bit, now uses imap_next_word()
13200         (camel_imap_command_extended): Now uses imap_next_word(). When
13201         checking for RECENT, allow the first digit of the recent-count
13202         be between 0 and 9 inclusive instead of exclusive.
13203
13204         * providers/imap/camel-imap-folder.c (imap_expunge): Optimized.
13205         No longer will it need to reload the summary as it now instead
13206         removes the appropriate message summaries from the cache.
13207         (camel_imap_folder_changed): If recent == 0 then return. If 
13208         recent < 0 then just emit the folder_changed signal, don't reload
13209         summaries.
13210
13211 2000-07-28  Jeffrey Stedfast  <fejj@helixcode.com>
13212
13213         * providers/imap/camel-imap-folder.c
13214         (imap_get_message_count_internal): Get message count when STATUS
13215         is not available.
13216         (imap_init): folder->has_search_capability is required for IMAP so
13217         should always be set to TRUE (is currently being set to FALSE as
13218         I've not yet implemented SEARCH support).
13219         (camel_imap_folder_changed): Seem to have fixed my optimization
13220         hack
13221
13222 2000-07-28  Jon K Hellan  <hellan@acm.org>
13223
13224         * providers/imap/camel-imap-store.h (CamelImapServerLevel): New
13225         enum.
13226         (CamelImapStore): Added server_level and has_status_capability
13227         members.
13228
13229         * providers/imap/camel-imap-store.c (imap_connect): Detect
13230         IMAP4REV1, IMAP4 and STATUS in capability response.
13231
13232         * providers/imap/camel-imap-folder.c
13233         (imap_get_message_count_internal): Use STATUS only if server
13234         supports it. TODO: Get message count when STATUS not supported.
13235         (imap_get_message, imap_get_summary_internal,
13236         imap_get_message_info_internal): Handle IMAP4 as well.
13237         (imap_protocol_get_summary_specifier): New function: Make a data
13238         item specifier for the header lines we need, appropriate to the
13239         server level.
13240
13241 2000-07-27  Peter Williams <peterw@helixcode.com>
13242
13243         * camel-mime-utils.c (header_decode_lwsp): More
13244         checks for end of string.
13245
13246         * providers/imap/camel-imap-store.c:
13247         (imap_command_extended): Free the elements of our
13248         array (huge mem leak)
13249
13250         * providers/imap/camel-imap-folder.c:
13251         (summary_get_internal): Same as above.
13252         
13253
13254 2000-07-27  Jeffrey Stedfast  <fejj@helixcode.com>
13255
13256         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
13257         Fixed my routine to only fetch new headers, my IDs were off by 1
13258         on the high end, so when it would fetch the last newly arrived
13259         message it would fail and end up fetching all of the summaries
13260         because of the corruption.
13261
13262 2000-07-27  Jeffrey Stedfast  <fejj@helixcode.com>
13263
13264         * camel-url.c (camel_url_to_string): If the path doesn't begin
13265         with a / and there is a host, prepend a / to the path.
13266
13267 2000-07-27  Jeffrey Stedfast  <fejj@helixcode.com>
13268         
13269         * providers/imap/Makefile.am: Added camel-imap-utils.[c,h]
13270         
13271         * providers/imap/camel-imap-utils.[c,h]: Utilities for parsing
13272         server responses for use in both camel-imap-store.c and
13273         camel-imap-folder.c
13274         
13275         * providers/imap/camel-imap-folder.c (imap_get_summary_internal):
13276         Free all the pointers in the headers array.
13277         (imap_get_subfolder_names_internal): Updated to use
13278         imap_parse_list_response
13279         (imap_parse_subfolder_list): Removed in favor of
13280         imap_parse_list_response
13281
13282         * providers/imap/camel-imap-store.c (camel_imap_command_extended):
13283         Free all the pointers in the data array.
13284         (imap_connect): Updated to use imap_parse_list_response and fixed
13285         a leak
13286         (folder_is_selectable): Updated.
13287
13288 2000-07-27  Jeffrey Stedfast  <fejj@helixcode.com>
13289         
13290         * providers/imap/camel-imap-folder.c (imap_get_message_info): Now
13291         uses a hash table for looking up message info rather than a linear
13292         search :)
13293
13294 2000-07-27  Peter Williams  <peterw@helixcode.com>
13295
13296         * providers/*/Makefile.am: Don't specify SUBDIRS =
13297         [nothing]. Messes up distcheck.
13298         
13299 2000-07-26  Peter Williams  <peterw@helixcode.com>
13300         
13301         * camel-mime-parser.c (folder_scan_init): Initialize
13302         outbuf to be "" -- it's not guaranteed to be zeroed.
13303         
13304         * camel-mime-utils.c (header_references_decode): Return
13305         if the header is NULL -> or "" <-. Don't do our stupid
13306         mailer trick if we point to \0.
13307         (header_decode_quoted_string): Don't rip past end of 
13308         string!
13309         
13310 2000-07-26  Dan Winship  <danw@helixcode.com>
13311
13312         * camel-movemail.c (movemail_external): routine to call an
13313         external movemail program.
13314         (camel_movemail): Nuke return value, use movemail_external when
13315         available and useful, and don't delete "dest" on errors, since
13316         it might have started non-empty.
13317
13318 2000-07-26  Jeffrey Stedfast  <fejj@helixcode.com>
13319
13320         * camel-url.c (camel_url_to_string): Should now always prepend a '/'
13321         before the path if it doesn't already exist.
13322
13323         * providers/imap/camel-imap-folder.c: Fixed a few compiler warnings
13324
13325 2000-07-25  Jeffrey Stedfast  <fejj@helixcode.com>
13326
13327         * providers/imap/camel-imap-folder.c (imap_summary_free): Fixed the
13328         real problem that Peter was running into.
13329
13330 2000-07-25  Dan Winship  <danw@helixcode.com>
13331
13332         * camel-mime-message.c (write_to_stream): Don't add a Mime-Version
13333         header to a message that already has one.
13334
13335         * camel-internet-address.c (internet_encode): Don't put <>s around
13336         addresses with no name part.
13337
13338 2000-07-25  Peter Williams  <peterw@helixcode.com>
13339
13340         * providers/imap/camel-imap-folder.c (imap_expunge): Set 
13341         imap_folder->summary to NULL after calling imap_summary_free,
13342         so we don't get stuck with a junk summary pointer. Should
13343         we free it at all?
13344
13345 2000-07-25  Jeffrey Stedfast  <fejj@helixcode.com>
13346
13347         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
13348         Optimized to try and get the new message headers without reloading
13349         the entire summary from scratch.
13350         (imap_get_summary_internal): Will now sync() before attempting to
13351         reload the summary so that flags are set in the reloaded summary
13352         as well.
13353
13354 2000-07-24  Jeffrey Stedfast  <fejj@helixcode.com>
13355
13356         * providers/imap/camel-imap-store.c (get_folder): Updated to give
13357         special attention to the root folder.
13358
13359         * providers/imap/camel-imap-folder.c
13360         (imap_get_subfolder_names_internal): Updated to handle the root
13361         folder
13362         (imap_get_message_count_internal): return 0 if folder can't hold
13363         messages
13364         (camel_imap_folder_new): Change so that root folder gets special
13365         attention and always gets can_hold_messages set to FALSE
13366
13367 2000-07-24  Dan Winship  <danw@helixcode.com>
13368
13369         * camel-folder.c: Remove exceptions from a number of methods that
13370         work on what ought to be static data: get_parent_folder,
13371         get_parent_store, get_message_count, get_unread_message_count,
13372         get_permanent_flags, get_message_flags, set_message_flags,
13373         get_message_user_flag, set_message_user_flag, get_uids,
13374         get_summary, get_subfolder_names. Turn camel_folder_delete_message
13375         into a macro. (Mostly a pull-up from the camel-async branch.)
13376
13377         * providers/{imap,mbox,nntp,pop3,vee}: Update for CamelFolder
13378         changes
13379
13380 2000-07-24  Jeffrey Stedfast  <fejj@helixcode.com>
13381
13382         * providers/imap/camel-imap-folder.c (imap_get_message_info): Updated
13383         to port easily to the new Camel API
13384         (imap_init): Don't SELECT INBOX, we don't need to do that
13385
13386 2000-07-24  Jeffrey Stedfast  <fejj@helixcode.com>
13387
13388         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): 
13389         Initialize the summary and subfolder listing.
13390         (imap_summary_free): Now takes a GPtrArray arg rather than a 
13391         CamelImapFolder as it increases it's usefullness for free()'ing
13392         temporary summaries.
13393         (imap_get_message_count_internal): A new convenience function for
13394         getting the actual message count on a server to be used by 
13395         imap_get_summary_internal)
13396         (imap_get_message_count): Since the Camel API is on the move again, 
13397         the future version of this function will not be able to make a
13398         call to the store, it must only access previously fetched data (thus 
13399         the creation of the _internal function)
13400         (imap_get_subfolder_names_internal): Again, because the future version
13401         of imap_get_subfolder_names will not take an exception, we must rename
13402         this function which will be called by camel_imap_folder_new()
13403         (imap_get_subfolder_names): We now return the previously collected
13404         subfolder listing that the _internal function fetched previously
13405         (imap_get_summary_internal): Again, same idea as the previous _internal
13406         functions...
13407         (imap_get_summary): Again... now returns a previously aquired summary
13408
13409         * providers/imap/camel-imap-store.c (imap_noop): This will hopefully
13410         prevent the imap store from disconnecting.
13411         (imap_connect): Modified to add a gtk timeout event that will call
13412         imap_noop() every 10 minutes (we may want to change this time value)
13413         (imap_disconnect): Modified to remove the NOOP timeout event from the
13414         store.
13415         (camel_imap_command_extended): Commented out the code that would try
13416         and detect if the store was disconnected and then reconnect if it was
13417         needed.
13418
13419 2000-07-24  Dan Winship  <danw@helixcode.com>
13420
13421         * camel-folder.[ch]: Remove camel_folder_get_message_uid, which
13422         was not used, and not implemented by any provider.
13423
13424         * providers/nntp/camel-nntp-folder.c: Remove get_message_uid
13425         non-implementation.
13426
13427         * camel-folder-pt-proxy.[ch], camel-arg-collector.c,
13428         camel-marshal-utils.[ch]: Bye bye bye.
13429
13430         * Makefile.am: remove reference to camel-arg-collector.c
13431
13432 2000-07-23  Jeffrey Stedfast  <fejj@helixcode.com>
13433
13434         * providers/imap/camel-imap-store.c (imap_disconnect): Made it a
13435         little more forgiving. Also set current_folder to NULL as there is
13436         no selected folder after a disconnect.
13437         (stream_is_alive): Detects whether or not a socket is "alive"
13438         (camel_imap_command_extended): Use stream_is_alive() to aid in the
13439         detection of a disconnected state.
13440
13441 2000-07-22  Jeffrey Stedfast  <fejj@helixcode.com>
13442
13443         * providers/imap/camel-imap-store.c (get_folder): Clear
13444         CamelExceptions when appropriate (eg when folder is marked as
13445         \NoSelect). Still needs some cleanup and perhaps Dan will have a
13446         better way of doing this as this seems like a messy way of
13447         handling this.
13448
13449         * providers/imap/camel-imap-folder.c (imap_get_uids): Took out
13450         some debug statements as they are no longer needed.
13451
13452 2000-07-21  Jeffrey Stedfast  <fejj@helixcode.com>
13453
13454         * providers/imap/camel-imap-folder.c (imap_get_subfolder_names):
13455         Updated to not strip out subfolders that are marked as \NoSelect
13456         because this will be correctly handled in store->get_folder from
13457         now on.
13458
13459         * providers/imap/camel-imap-store.c (folder_is_selectable): New
13460         convenience function for use in get_folder().
13461         (parse_list_response): Now takes a char **flags argument which is
13462         needed by folder_is_selectable().
13463         (imap_connect): Updated to reflect changes to
13464         parse_list_response().
13465
13466 2000-07-21  Jeffrey Stedfast  <fejj@helixcode.com>
13467         
13468         * providers/imap/camel-imap-stream.c (stream_read): Updated with
13469         some of the same fixes I've made to camel-imap-folder.c like
13470         recalculating message part lengths.
13471
13472         * providers/imap/camel-imap-store.c (camel_imap_command_extended):
13473         Rewrote the code to check for "* %d RECENT". Still needs to be
13474         modified, but should no longer cause an infinite loop by detecting
13475         mis-detecting RECENT messages.
13476
13477 2000-07-20  Jeffrey Stedfast  <fejj@helixcode.com>
13478
13479         * providers/imap/camel-imap-folder.c (imap_get_summary):
13480         (imap_get_message_info): Oops. Fix UID parser to allow 0 and 9 to
13481         be in the range of valid UID chars.
13482
13483 2000-07-20  Peter Williams  <peterw@helixcode.com>
13484
13485         * camel-object.c (camel_object_unref): Add a new global mutex
13486         'refcount' held when refcounting operations occur.
13487
13488 2000-07-19  Peter Williams  <peterw@helixcode.com>
13489
13490         * camel-object.c (camel_type_lock_up): Correct the recursiveness;
13491         the locklevel is stored as a private, so each thread has its own
13492         idea of the locklevel. Thus one thread can relock, but a different
13493         one will think that it's a level 0 and try to lock the type_system
13494         mutex.
13495
13496 2000-07-19  Jeffrey Stedfast  <fejj@helixcode.com>
13497
13498         * providers/imap/camel-imap-folder.c: General cleanup working
13499         towards getting Actions->Expunge working correctly.
13500
13501         * providers/imap/camel-imap-store.c
13502         (cammel_imap_command_extended): Added code to look for "* %d
13503         RECENT" and to emit the folder_changed signal if there are any
13504         recent messages. Note: this is a hack and needs to be rewritten
13505         badly.
13506
13507 2000-07-19  Jeffrey Stedfast  <fejj@helixcode.com>
13508
13509         * providers/imap/camel-imap-folder.c (imap_get_summary): If the
13510         folder's message count is not the same as the number of summaries,
13511         free the old summary and create a new summary.
13512
13513 2000-07-18  Jeffrey Stedfast  <fejj@helixcode.com>
13514
13515         * providers/imap/camel-imap-folder.c
13516         (camel_imap_folder_class_init): Added in
13517         imap_[g,s]et_message_user_flag() methods
13518         (imap_get_message_info): Rewrote to use the more efficient way of
13519         downloading summary information and also added a UID comparison so
13520         that if the UID requested doesn't match the UID received, it
13521         returns NULL.  FIXME: When the mailer gets NULL when it requested
13522         message info, it seems that it displays a row for that message and
13523         when you try and select the blank row, it segfaults.
13524
13525         * providers/imap/camel-imap-store.c (get_folder): Oops, this
13526         should not be checking against "/", it should be checking against
13527         dir_sep.
13528
13529         * providers/imap/camel-imap-folder.c (imap_parse_subfolder_line):
13530         Updated to trim out the leading namespace.
13531         (imap_get_subfolder_names): Let the subfolder parser trim the
13532         namespace off the folder name.
13533
13534 2000-07-17  Peter Williams  <peterw@helixcode.com>
13535
13536         * camel-object.c (camel_type_lock_up): New function; the
13537         Camel type_system lock is now fakey-recursive, being controlled
13538         by a semaphore that goes up and down and is protected by another
13539         lock. Theoretically all we need is the lock on the semaphore,
13540         but this we catch exceptions "better" (by deadlocking).
13541         (camel_type_lock_down): Corresponding to above.
13542         (all functions): s,G_LOCK,camel_type_lock_up, etc.
13543
13544 2000-07-17  Jeffrey Stedfast  <fejj@helixcode.com>
13545
13546         * providers/imap/camel-imap-store.c (imap_disconnect): Send a
13547         "LOGOUT" command.
13548
13549         * providers/imap/camel-imap-folder.c (imap_get_message): Hacks to
13550         get IMAP code to work with CommunigatePro and MS Exchange (and any
13551         other servers that send back a UID at the end of each FETCH inside
13552         of the main body of the message part).
13553         (imap_sync): Un-#if 0 the code that sets the flags on the IMAP
13554         server for messages that have changed. Oops, don't mask with
13555         DELETED to find out if the message has been answered ;-)
13556         (imap_expunge): sync before expunging.
13557
13558 2000-07-16  Jeffrey Stedfast  <fejj@helixcode.com>
13559
13560         * providers/imap/camel-imap-store.c: All SELECT calls now pass
13561         a NULL folder argument to camel_imap_command_extended() since it's
13562         not needed.
13563         (imap_connect): Moved service_class->connect() to the point right
13564         after a connection is established with the server rather than
13565         waiting until the end of the function.
13566         (camel_imap_command): Updated the documentation comment
13567         (camel_imap_command_extended): Before sending a command, first
13568         check to make sure we are connected; if we aren't, then reconnect.
13569         Don't strncmp() command with "SELECT" as it's redundant.
13570
13571         * providers/imap/camel-imap-folder.c: All SELECT calls now pass
13572         a NULL folder argument to camel_imap_command_extended() since it's
13573         not needed. Also s/camel_imap_command/camel_imap_command_extended as
13574         I will probably be doing away with camel_imap_command() or at least
13575         only using it for LOGIN and similar commands where the server won't
13576         notify us of any recent messages.
13577
13578 2000-07-15  Jeffrey Stedfast  <fejj@helixcode.com>
13579
13580         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): 
13581         One last fix to get rid of hard-coded "/" directory separators
13582
13583 2000-07-14  Peter Williams  <peterw@helixcode.com>
13584
13585         * camel-object.c : Implement 'events', which are suspiciously
13586         like signals except without all the marshalling baggage, and
13587         with quasi-thread-safety.
13588         (camel_object_class_declare_event): New func.
13589         (camel_object_hook_event): Ditto.
13590         (camel_object_trigger_event): Ditto.
13591         (obj_class_init): Declare the "finalize" event.
13592         (obj_class_finalize): Free the hashtable of events->preps
13593         (obj_finalize): Free the hashtable of events->hooklists
13594         (camel_object_unref): Trigger the finalize event (ourselves,
13595         to prevent massively unpleasant looping things.)
13596         
13597 2000-07-14  Peter Williams  <peterw@helixcode.com>
13598         
13599         * camel-object.c (make_global_classfuncs): Change to return
13600         a CamelObjectClass. Change parents to a GSList and free it
13601         when done.
13602         (camel_object_new): Don't allocate a classfuncs for every object;
13603         merely give it a reference to the global_classfuncs. Convert
13604         parents to a GSList and free it when done.
13605         (camel_object_unref): Don't free the classfuncs. Free the parents
13606         list, which is changed to a GSList.
13607
13608 2000-07-14  Jeffrey Stedfast  <fejj@helixcode.com>
13609
13610         * string-utils.c (string_unquote): New convenience function
13611         to unquote a string if it's encapsulated by "'s
13612         
13613         * providers/imap/camel-imap-folder.c:
13614         * providers/imap/camel-imap-store.c: Made the necessary changes
13615         to stop using hard coded directory separators.
13616
13617 2000-07-13  Dan Winship  <danw@helixcode.com>
13618
13619         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_load):
13620         If the summary is for a smaller mbox, and rebuilding from the
13621         last-known end position fails, try rebuilding from the beginning.
13622         Deals with the case where the user edits the mbox and makes it
13623         bigger, without adding new messages.
13624
13625 2000-07-13  Peter Williams  <peterw@helixcode.com>
13626
13627         * camel-object.c: Rewritten to not be based on GtkObject,
13628         but a tiny threadsafe ripoff thereof. Objects still cannot
13629         be shared across threads, but ref/unref/destroy/new/etc
13630         will work. Signals are not implemented because doing it
13631         robustly would be a major pain in the butt, but class
13632         functions are. There's a small demonstration that it doesn't
13633         crash in ./temp-test.c: build it with ./make-test.sh.
13634         * camel-stream.c, camel-seekable-stream.c, camel-stream-mem.c:
13635         moved over to CamelObject. Proof of concept: two levels of
13636         subclass and class functions, all working without coredumps.
13637         To port to CamelObject:
13638         - s,GTK_,CAMEL_,g in the cast checks
13639         - s,gtk_type_new,camel_object_new,g
13640         - s,GtkType,CamelType,g
13641         - Change get_type function over to camel_type_declare
13642         - instead of hooking to finalize function, it goes into the
13643           type declaration.
13644         - remove signals.
13645         - instead of GTK_OBJECT(so)->klass, CAMEL_OBJECT_GET_CLASS(so)
13646         - s,gtk_type_class,camel_type_get_global_classfuncs,g
13647         - don't chain finalize handlers; it will be done for you
13648         
13649 2000-07-13  Jeffrey Stedfast  <fejj@helixcode.com>
13650
13651         * providers/imap/camel-imap-folder.c: 
13652         * providers/imap/camel-imap-store.c: If a SELECT fails, set
13653         imap_store->current_folder to NULL so a SELECT is forced before
13654         any message/folder operations are requested. Also, because some
13655         users don't use a namespace, make sure that if the url->path is 
13656         "/" we don't use it when creating the folder_path.
13657         (camel_imap_command[_extended]): Since we allow the passing of
13658         a NULL folder which we can use to bypass a forced SELECT, no need
13659         to check for the individual commands that don't require a folder
13660         to be selected.
13661
13662 2000-07-13  Jeffrey Stedfast  <fejj@helixcode.com>
13663
13664         * providers/imap/camel-imap-folder.c: 
13665         * providers/imap/camel-imap-store.c: Updated to use CAMEL_IMAP_OK, 
13666         CAMEL_IMAP_NO, CAMEL_IMAP_BAD, and CAMEL_IMAP_FAIL rather than the 
13667         ones copied from the POP3 provider. 
13668
13669 2000-07-13  Jeffrey Stedfast  <fejj@helixcode.com>
13670
13671         * providers/imap/camel-imap-folder.c (imap_get_summary): Oops.
13672         If the number of messages in the folder is 0, don't fetch
13673         summaries 1 thru 0, just return an empty summary.
13674         (imap_copy_message_to): Fixed to use message UID and also send
13675         the source folder as an arg to camel_imap_command rather than NULL.
13676         (imap_move_message_to): Same.
13677         (imap_init): If SELECT is successful, we need to set the current
13678         folder to the one selected, this was causing problems with move/copy
13679
13680 2000-07-13  Dan Winship  <danw@helixcode.com>
13681
13682         * camel-service.h: define a set of CAMEL_SERVICE_URL_ALLOW_* flags
13683         parallel to the _NEED_* flags, and make the _NEED_* flags imply
13684         the _ALLOW_* ones.
13685
13686         * providers/imap/camel-imap-store.c (camel_imap_store_init): imap
13687         urls ALLOW_PATH
13688
13689 2000-07-13  Jeffrey Stedfast  <fejj@helixcode.com>
13690
13691         * providers/imap/camel-imap-folder.c (imap_get_summary): New
13692         and improved approach to fetching an entire folder summary
13693         that should be much much faster than the old way as it gets
13694         the entire folder summary in 1 shot rather than requesting
13695         message by message. As with the last update, this version
13696         also only fetches the minimum number of header fields.
13697         (imap_get_summary): Oops, forgot to free the temp 
13698         GPtrArray *headers
13699
13700 2000-07-13  Jeffrey Stedfast  <fejj@helixcode.com>
13701
13702         * providers/imap/camel-imap-folder.c (imap_get_summary): Don't
13703         fetch the entire RFC822 header, just fetch the fields we want.
13704         (imap_get_message_info): Same.
13705
13706 2000-07-13  Not Zed  <NotZed@HelixCode.com>
13707
13708         * camel-mime-filter-basic.c (camel_mime_filter_basic_new_type):
13709         Reset filter on setup.
13710         (reset): When resetting qp encoding, set the state to -1, instead
13711         of 0.
13712
13713         * camel-mime-utils.c (quoted_encode_step): Actually count the
13714         characters output sofar (it never counted any).  Bunch of other
13715         fixes.
13716         (quoted_encode_close): Also flush out final character, if there's
13717         one.
13718
13719 2000-07-12  Jeffrey Stedfast  <fejj@helixcode.com>
13720
13721         Chris forgot to add #include <e-util/e-util.h> to the source files
13722         
13723         * providers/imap/camel-imap-store.c (imap_connect): Fixed Peter's 
13724         fix, we don't want to send a string to a %d.
13725
13726 2000-07-12  Christopher James Lahey  <clahey@helixcode.com>
13727
13728         * camel-folder-search.c, providers/imap/camel-imap-store.c:
13729         Changed from strstrcase to e_strstrcase.
13730
13731         * string-utils.c, string-utils.h: Removed strstrcase (in favor of
13732         e_strstrcase in e-util/e-util.c.)
13733
13734 2000-07-12  Chris Toshok  <toshok@helixcode.com>
13735
13736         * providers/nntp/camel-nntp-folder.c
13737         (nntp_folder_set_message_flags): get the article num out of our
13738         uid and mark it read in the newsrc.
13739         (nntp_folder_get_message): get the message id out of the uid to
13740         fetch the article.
13741
13742         * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): the uid
13743         is now <article-num>,<messageid>
13744         (get_HEAD_headers): same.
13745
13746         * camel-mime-parser.c (folder_scan_step): go to HSCAN_MESSAGE
13747         state when ct->subtype is "news" as well as "rfc822".  this makes
13748         attachments of type "message/news" display properly.
13749
13750 2000-07-12  Dan Winship  <danw@helixcode.com>
13751
13752         * camel-folder.c (camel_folder_free_deep,
13753         camel_folder_free_shallow, camel_folder_free_nop): Useful default
13754         implementations for free_{uids,subfolder_names,summary}.
13755         (free_subfolder_names, free_uids): Make these g_warning-ing
13756         default implementations.
13757
13758         * providers/*/camel-*-folder.c: Use the new functions where
13759         appropriate, remove duplicated code.
13760
13761 2000-07-12  Peter Williams  <peterw@helixcode.com>
13762
13763         * providers/imap/camel-imap-store.c (query_auth_types): Check for
13764         NULL parameters when setting the exception so as to not crash on
13765         Solaris (can't handle a %s passed NULL).
13766         (imap_connect): Same.
13767         
13768 2000-07-12  Jeffrey Stedfast  <fejj@helixcode.com>
13769
13770         * providers/mbox/camel-mbox-folder.c (mbox_delete_message): Use
13771         mbox_set_message_flags () instead of setting the flags by hand. This
13772         fixes the problem of the "message_changed" signal not being emitted
13773         at the correct time.
13774
13775         * providers/imap/camel-imap-folder.c: "folder_changed" signals should
13776         pass a third argument (which is ignored).
13777
13778         * camel-folder.c: Undo gtk signal emits done in set_flags and 
13779         expunge.
13780         (move_message_to): 
13781         (copy_message_to): Create info as a const CamelMessageInfo
13782
13783 2000-07-12  Chris Toshok  <toshok@helixcode.com>
13784
13785         * providers/nntp/Makefile.am: don't add test-newsrc to the build
13786         since it needs libcamel (which isn't built at the time test-newsrc
13787         needs linking.)
13788
13789         * providers/nntp/camel-nntp-utils.c (get_HEAD_headers): fill in
13790         MessageInfo->message_id.
13791         (get_XOVER_headers): same.
13792
13793         * providers/nntp/camel-nntp-folder.c (nntp_folder_init): move
13794         summary loading here.
13795         (nntp_folder_sync): summary/newsrc changes should be stored here.
13796         put a comment to that effect.
13797         (nntp_folder_set_message_flags): don't save the newsrc here.
13798         (nntp_folder_get_uids): use g_ptr_array_index instead of the
13799         cast/addition.
13800         (nntp_folder_get_summary): no need to check if we should generate
13801         the summary here.  already done.
13802         (nntp_folder_get_message_info): implement.
13803
13804         * providers/nntp/camel-nntp-store.c
13805         (camel_nntp_store_get_toplevel_dir): use evolution_dir instead of
13806         computing it ourselves.
13807         (nntp_store_disconnect): call camel_nntp_newsrc_write.
13808         (ensure_news_dir_exists): new function to create the news/<news
13809         server> subdir.
13810         (camel_nntp_store_class_init): hook up connect/disconnect and
13811         finalize.
13812         (nntp_store_connect): if ensure_news_dir_exists fails throw an
13813         exception.
13814
13815 2000-07-12  Peter Williams  <peterw@helixcode.com>
13816
13817         * camel-folder.c (camel_folder_set_message_flags): Emit a message_changed
13818         signal once the flags are set on the message.
13819         (camel_folder_set_user_flag): Ditto.
13820         (camel_folder_expunge): Emit a folder_changed if no exception.
13821
13822 2000-07-12  Jeffrey Stedfast  <fejj@helixcode.com>
13823
13824         * camel-stream.c: Use size_t and ssize_t for read/write methods
13825         
13826         * providers/imap/camel-imap-folder.c (imap_set_message_flags): 
13827         Updated to emit the message_changed signal.
13828         (imap_delete_message): Updated to use imap_set_message_flags ().
13829         (imap_move_message_to): Updated to use imap_set_message_flags ()
13830         and to emit the folder_changed signal on the destination folder.
13831         (imap_copy_message_to): Updated to emit the folder_changed signal 
13832         on the destination folder.
13833         (imap_append_message): Updated to emit the folder_changed signal 
13834         on the destination folder.
13835
13836 2000-07-11  Jeffrey Stedfast  <fejj@helixcode.com>
13837
13838         * camel-folder.c (camel_folder_append_message): Now takes a
13839         flags argument to specify the flags to be set on the message
13840         since we might not necessarily want the flags to be wiped clean.
13841         (move_message_to):
13842         (copy_message_to): Updated to send a flags argument to 
13843         append_message (); currently sends the original message's flags.
13844
13845         * providers/mbox/camel-mbox-folder.c (mbox_append_message): 
13846         * providers/imap/camel-imap-folder.c (imap_append_message): 
13847         Updated.
13848
13849 2000-07-11  Dan Winship  <danw@helixcode.com>
13850
13851         * camel-folder.c: Remove exceptions from a number of methods
13852         that work on what ought to be static data: get_parent_folder,
13853         get_parent_store, get_message_count, get_unread_message_count,
13854         get_permanent_flags, get_message_flags, set_message_flags,
13855         get_message_user_flag, set_message_user_flag, get_message_uid,
13856         get_uids, get_summary, get_subfolder_names. Turn
13857         camel_folder_delete_message into a macro.
13858
13859         * providers/{mbox,pop3,vee}: Update for CamelFolder changes
13860
13861         * providers/Makefile.am: Disable imap and nntp for now
13862
13863 2000-07-11  Jeffrey Stedfast  <fejj@helixcode.com>
13864
13865         * providers/imap/camel-imap-folder.c (imap_search_by_expression): 
13866         This shouldn't return NULL, it should return g_ptr_array_new ()
13867         so the mailer gets what it expects.
13868
13869 2000-07-10  Jeffrey Stedfast  <fejj@helixcode.com>
13870
13871         * camel-folder-summary.c (camel_folder_summary_decode_string): 
13872         Oops, an unsigned integer can never be < 0
13873
13874 2000-07-10  Dan Winship  <danw@helixcode.com>
13875
13876         * providers/vee/camel-vee-folder.c (vee_search_by_expression):
13877         Initialize a variable to make this not crash again. And fix a bug
13878         so it actually does something.
13879
13880 2000-07-10  Jeffrey Stedfast  <fejj@helixcode.com>
13881
13882         * camel-folder-summary.c: Cleaned up a bunch of compile warnings
13883
13884 2000-07-10  Dan Winship  <danw@helixcode.com>
13885
13886         * providers/vee: kill more debugging messages
13887
13888 2000-07-10  Jeffrey Stedfast  <fejj@helixcode.com>
13889
13890         * providers/mbox/camel-mbox-folder.c (mbox_get_unread_message_count): 
13891         * providers/vee/camel-vee-folder.c (vee_get_unread_message_count): 
13892         * providers/imap/camel-imap-folder.c (imap_get_unread_message_count):
13893         Implemented.
13894
13895         * camel-folder.c (camel_folder_get_unread_message_count): New
13896         convenience function to allow the mailer to query the number
13897         of unread messages in a folder (for displaying message stats
13898         in a folder tree?).
13899
13900 2000-07-09  Dan Winship  <danw@helixcode.com>
13901
13902         * camel-mime-utils.c (header_references_dup): New function to copy
13903         a header_references structure.
13904
13905         * camel-folder-summary.c (camel_message_info_dup_to): New function
13906         to (deep) copy the data from one CamelMessageInfo into another.
13907         (camel_message_info_free): And free the data.
13908
13909         * providers/vee/camel-vee-folder.c (vee_sync): Implement. (empty).
13910         (vee_search_by_expression): belatedly update for
13911         camel_folder_search change.
13912         (vee_folder_build): belatedly update for camel_folder_search
13913         change. Use camel_message_info_dup_to and camel_message_info_free
13914         (in particular, so that we get message_id and references info so
13915         vfolders can be threaded).
13916         (vee_folder_build_folder): Ditto.
13917
13918 2000-07-08  Jeffrey Stedfast  <fejj@helixcode.com>
13919
13920         * providers/nntp/camel-nntp-folder.c: 
13921         * providers/nntp/camel-nntp-utils.c: 
13922         * providers/nntp/camel-nntp-store.c: Update to reflect past changes
13923         in the Camel API. Use gtk macro casts wherever possible and use glib's
13924         memory functions instead of standard c's (since they are not 
13925         compatable)
13926
13927         * providers/smtp/camel-smtp-transport.c: 
13928         * providers/imap/camel-imap-store.c: Wrap debug print statements
13929         in a macro
13930
13931         * providers/imap/camel-imap-stream.c (stream_read): Make sure
13932         that we get up to and including the last \n of the mime part.
13933
13934         * providers/imap/camel-imap-folder.c (imap_get_message): Make sure
13935         that we get up to and including the last \n of the mime part.
13936         Wrap debug print statements in a macro.
13937
13938         * providers/imap/camel-imap-stream.c (stream_read): Only cache
13939         the important data (aka the mime part requested and no extra
13940         server response stuff)
13941
13942 2000-07-07  Dan Winship  <danw@helixcode.com>
13943
13944         * camel-mime-utils.c (header_references_decode): Work around
13945         In-Reply-To's with unquoted punctuation. So many broken mailers.
13946
13947         * camel-folder.c (camel_folder_search_by_expression): Make this
13948         return a GPtrArray rather than a GList.
13949
13950         * camel-folder-search.c (camel_folder_search_execute_expression):
13951         * providers/imap/camel-imap-folder.c (imap_search_by_expression):
13952         * providers/mbox/camel-mbox-folder.c (mbox_search_by_expression):
13953         * providers/nntp/camel-nntp-folder.c (nntp_search_by_expression):
13954         Update to return a GPtrArray rather than a GList.
13955
13956 2000-07-07  Jeffrey Stedfast  <fejj@helixcode.com>
13957
13958         * providers/smtp/camel-smtp-transport.c (esmtp_get_authtypes): 
13959         Fixed the parser to actually work
13960
13961 2000-07-06  Dan Winship  <danw@helixcode.com>
13962
13963         * camel-mime-utils.c (header_references_decode): Make this deal
13964         with the full RFC822 References/In-Reply-To format rather than
13965         just the more-nicely-behaved RFC1036 version. (Needed to parse
13966         In-Reply-To headers with extra junk in them.)
13967
13968 2000-07-06  Jeffrey Stedfast  <fejj@helixcode.com>
13969
13970         * providers/imap/camel-imap-folder.c (imap_get_summary): Parse for
13971         more header information to allow message threading in IMAP.
13972         (imap_get_message_info): Same.
13973
13974         * camel-folder-summary.c: Renamed summary_format_* to
13975         camel_summary_format_* and moved them into public scope.
13976
13977         * providers/smtp/camel-smtp-transport.c (smtp_connect): Oops. Don't
13978         pass port # as a string in the error code (if it fails to connect).
13979
13980         * providers/imap/camel-imap-folder.c (imap_append_message): Changed
13981         over to camel_imap_command_extended as that was the source of the
13982         problems - apparently appending replies with more than just 1 line.
13983
13984 2000-07-05  Dan Winship  <danw@helixcode.com>
13985
13986         * camel-folder-search.c (search_header_contains): make header
13987         matching case-insensitive
13988
13989         * camel-folder-summary.c:
13990         * camel-session.c:
13991         * providers/mbox/camel-mbox-folder.c:
13992         * providers/mbox/camel-mbox-summary.c: Remove some non-error case
13993         debugging-type messages.
13994
13995 2000-07-05  Ettore Perazzoli  <ettore@helixcode.com>
13996
13997         * providers/mbox/camel-mbox-summary.c (d): Define to empty so that
13998         we get rid of a ton of debugging messages.
13999
14000 2000-07-05  Jeffrey Stedfast  <fejj@helixcode.com>
14001
14002         * camel-mime-utils.h: Added prototype for uudecode_step
14003
14004         * camel-mime-utils.c (uudecode_step): Cleaned up some junk that
14005         should have been cleaned up when debugging printf's were taken out.
14006
14007 2000-07-05  Ettore Perazzoli  <ettore@helixcode.com>
14008
14009         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
14010         Update the X-Evolution: header even if the in-memory UID and the
14011         saved UID are not the same.  Otherwise mboxes with clashing UIDs
14012         can never be fixed.
14013
14014         * camel-folder-summary.c
14015         (camel_folder_summary_add_from_parser): Add the message to the
14016         summary before doing any ibex stuff.  In fact, this might also
14017         have the side effect of reassigning the UID so it needs to be done
14018         before we start using the UID.
14019
14020         * providers/mbox/camel-mbox-folder.c (mbox_append_message): Add
14021         debugging message to keep track of the UIDs we add.
14022
14023 2000-07-05  Dan Winship  <danw@helixcode.com>
14024
14025         * camel-folder-summary.c: Add "Cc" to summary and bump summary
14026         version number.
14027
14028         * camel-folder-search.c (search_header_contains): make "Cc" a
14029         searchable header.
14030
14031 2000-07-03  Ettore Perazzoli  <ettore@helixcode.com>
14032
14033         * camel-folder-summary.c (camel_folder_summary_next_uid_string):
14034         New.
14035         (camel_folder_summary_add): Use
14036         `camel_folder_summary_next_uid_string()' instead of recomputing
14037         the UID manually here.
14038         (camel_folder_summary_add_from_parser): Likewise.
14039
14040 2000-07-03  Ettore Perazzoli  <ettore@helixcode.com>
14041
14042         * camel-folder-summary.c (camel_folder_summary_set_uid): Removed.
14043
14044 2000-07-03  Dan Winship  <danw@helixcode.com>
14045
14046         * camel-folder-summary.c (message_info_new): Parse In-Reply-To
14047         with header_references_decode, not header_msgid_decode.
14048
14049         * camel-mime-message.c (camel_mime_message_class_init): message
14050         headers are case-insensitive.
14051
14052         * providers/pop3/camel-pop3-store.c (camel_pop3_command): Fix a
14053         bug in error-setting code.
14054         (pop3_connect): Don't re-prompt for password in the KPOP case.
14055         (pop3_get_response): New function, split out from
14056         camel_pop3_command.
14057         (connect_to_server): Use pop3_get_response to parse the greeting
14058         message, and error out appropriately if it's -ERR.
14059
14060 2000-07-02  Dan Winship  <danw@helixcode.com>
14061
14062         * camel-folder.c (camel_folder_freeze, camel_folder_thaw): New
14063         functions to freeze and thaw a folder (to prevent message/folder
14064         changed signals in the middle of a long series of operations).
14065         (camel_folder_class_init): Change signals to GTK_RUN_FIRST.
14066         (message_changed, folder_changed): Add default implementations
14067         that stop the emission and record info for later if the folder is
14068         frozen.
14069
14070         * providers/mbox/camel-mbox-folder.c (mbox_sync): leftover fixes
14071         from the close->sync change: don't destroy the ibex, summary, and
14072         search when syncing.
14073         (append_message): emit "folder_changed" on a successful append.
14074
14075 2000-07-02  Jeffrey Stedfast  <fejj@helixcode.com>
14076
14077         * camel-mime-utils.c (uudecode_step): A rather complex uudecoder
14078         written in the spirit of Zucchi-ness, is it up to par? Only the 
14079         Z-man can tell us :-)
14080
14081 2000-07-01  Dan Winship  <danw@helixcode.com>
14082
14083         * camel-service.c (camel_service_get_name): New method, to return
14084         an end-user-friendly name corresponding to a service. (eg, "POP
14085         service for danw on trna.helixcode.com").
14086
14087         * providers/imap/camel-imap-store.c,
14088         providers/mbox/camel-mbox-store.c,
14089         providers/nntp/camel-nntp-store.c,
14090         providers/pop3/camel-pop3-store.c,
14091         providers/sendmail/camel-sendmail-transport.c,
14092         providers/smtp/camel-smtp-transport.c: Implement.
14093
14094         * providers/imap/Makefile.am: remove unneeded
14095         libcamelimap_la_LDADD.
14096
14097         * providers/pop3/camel-pop3-store.c (connect_to_server): fix the
14098         CAPA-parsing code to not get into an infinite loop.
14099
14100 2000-07-01  Jeffrey Stedfast  <fejj@helixcode.com>
14101
14102         * providers/imap/camel-imap-folder.c (imap_get_message): Fixed
14103         the bug that would sometimes leave part of the server response
14104         tacked on to the end of the message.
14105
14106         * camel-folder.c: Renamed _by_uid methods. Since we no longer
14107         have get-by-number methods, no need to have the _by_uid 
14108         extensions. 
14109         (get_message_by_uid): Renamed to get_message
14110         (delete_message_by_uid): Renamed to delete_message
14111         (summary_get_by_uid): Renamed to get_message_info
14112
14113         * providers/mbox/camel-mbox-folder.c: 
14114         * providers/pop3/camel-pop3-folder.c:
14115         * providers/imap/camel-imap-folder.c:
14116         * providers/vee/camel-vee-folder.c: Updated to reflect
14117         camel-folder changes.
14118
14119 2000-06-30  Jeffrey Stedfast  <fejj@helixcode.com>
14120
14121         * camel-folder.c (camel_folder_copy_message_to): New function, to
14122         copy a message from one folder to another. The default
14123         implementation just uses append_message, but providers can 
14124         implement more efficient versions for use when both folders are on 
14125         the same store.
14126
14127         * broken-date-parser.[c,h]: Utilities for parsing broken
14128         date strings.
14129         
14130         * providers/imap/camel-imap-folder.c (imap_move_message_to): 
14131         (imap_copy_message_to): Implemented.
14132
14133         * camel-mime-utils.c (header_decode_date): Wrote some code to try
14134         and un-mangle broken date formats and then parse that new string 
14135         instead.
14136
14137 2000-06-30  Dan Winship  <danw@helixcode.com>
14138
14139         * camel-folder.c (camel_folder_move_message_to): New function, to
14140         move a message from one folder to another. The default
14141         implementation just uses append_message and delete_message, but
14142         providers can implement more efficient versions for use when both
14143         folders are on the same store.
14144
14145 2000-06-29  Jeffrey Stedfast  <fejj@helixcode.com>
14146
14147         * providers/imap/camel-imap-folder.c (imap_expunge): Should now
14148         print a meaningful error message when it doesn't succeed
14149
14150 2000-06-28  Jeffrey Stedfast  <fejj@helixcode.com>
14151
14152         * providers/imap/camel-imap-store.c (imap_connect): Changed to
14153         keep prompting user for a valid password until it either
14154         authenticates or until Canceled by the user.
14155         (camel_imap_command_extended): Improved speed (replaced the
14156         g_strjoinv call with a faster implementation)
14157
14158         * providers/pop3/camel-pop3-store.c 
14159         (camel_pop3_command_get_additional_data): Fixed.
14160         (pop3_connect): Changed to keep prompting the user for a
14161         password until it either works or until Canceled by the user.
14162
14163         * providers/mbox/camel-mbox-summary.c: General cleanup
14164         (camel_mbox_summary_sync): Fixed a memory leak and added
14165         CamelException handling.
14166
14167         * providers/mbox/camel-mbox-store.c (delete_folder): Fixed a 
14168         memory leak
14169
14170         * providers/mbox/camel-mbox-folder.c (mbox_append_message): 
14171         Default 'off_t seek' to -1 so as to make sure it's initialized
14172         before it's used in the case of a bad stat() call.
14173         (mbox_sync): Updated
14174         (mbox_expunge): Updated
14175
14176 2000-06-27  Jeffrey Stedfast  <fejj@helixcode.com>
14177
14178         * providers/imap/camel-imap-store.c (imap_connect): Move the 
14179         CAPABILITY command here so we don't have to keep checking
14180         each time we open a folder.
14181         (camel_imap_command_extended): If we are doing an EXAMINE,
14182         don't bother doing a SELECT first.
14183
14184         * providers/imap/camel-imap-folder.c (imap_init): Update so
14185         folder->has_search_capability depends on the parent IMAP store
14186         (since this is really dependant on the IMAP implementation and
14187         not the folder)
14188
14189 2000-06-27  Christopher James Lahey  <clahey@helixcode.com>
14190
14191         * providers/smtp/camel-smtp-transport.c: Don't close the filter
14192         stream when done with it (this causes the source stream to close);
14193         Instead, just flush it when done.
14194
14195 2000-06-27  Michael Zucchi  <zucchi@zedzone.mmc.com.au>
14196
14197         * camel-folder-search.c (search_header_contains): Make header
14198         search 'to' match 'to', and not 'from', small typo, fixes #317.
14199
14200 2000-06-26  Christopher James Lahey  <clahey@helixcode.com>
14201
14202         * providers/mbox/camel-mbox-summary.c: Added debugging
14203         information.
14204
14205 2000-06-23  Jeffrey Stedfast  <fejj@helixcode.com>
14206
14207         * providers/imap/camel-imap-store.c: 
14208         * providers/imap/camel-imap-folder.c: Improved folder parsing.
14209         Not specifying a namespace should no longer list the entire
14210         filesystem.
14211
14212 2000-06-22  Chris Toshok  <toshok@helixcode.com>
14213
14214         * providers/nntp/.cvsignore: ignore test-newsrc
14215
14216         * providers/nntp/camel-nntp-store.c,
14217         providers/nntp/camel-nntp-store.h,
14218         providers/nntp/camel-nntp-folder.c,
14219         providers/nntp/camel-nntp-folder.h,
14220         providers/nntp/camel-nntp-utils.c: Bring the nntp provider up to a
14221         state where it builds and is usable with the current camel.  there
14222         are still warts (semi-broken .newsrc file handling, and a lack of
14223         a subscribe ui -- in fact no way to add a new server, really), but
14224         it'll display news messages.
14225
14226         * providers/nntp/Makefile.am (libcamelnntp_la_SOURCES): add
14227         camel-nntp-newsrc.c
14228         (libcamelnntpinclude_HEADERS): add camel-nntp-newsrc.h
14229         also, add test-newsrc stuff.
14230         
14231         * providers/nntp/test-newsrc.c: new file that tests the newsrc
14232         stuff by parsing and regurgitating a .newsrc file for a particular
14233         server.
14234
14235         * providers/nntp/camel-nntp-newsrc.c,
14236         providers/nntp/camel-nntp-newsrc.h: new files, initial support for .newsrc files.
14237
14238 2000-06-22  Jeffrey Stedfast  <fejj@helixcode.com>
14239
14240         * providers/imap/camel-imap-folder.c (imap_get_message_count): 
14241         Oops. Now appends the namespace to the folder before querying
14242         for the number of messages.
14243
14244         * providers/imap/camel-imap-store.c (imap_folder_exists): New
14245         convenience function for use by imap_create().
14246         (get_folder): If folder is specified as "/", we really want
14247         "INBOX".
14248
14249         * providers/sendmail/camel-sendmail-provider.c:
14250         * providers/vee/camel-vee-provider.c:
14251         * providers/smtp/camel-smtp-provider.c:
14252         * providers/mbox/camel-mbox-provider.c:
14253         * providers/pop3/camel-pop3-provider.c:
14254         * providers/imap/camel-imap-provider.c: Updated
14255         
14256         * camel-session.c: Moved service_cache hash table into the
14257         providers.
14258         (service_cache_remove): Updated.
14259         (camel_session_get_service): Updated.
14260
14261         * camel-url.c (camel_url_hash): Took out the hashing of
14262         url->passwd. We don't want this anymore.
14263
14264         * providers/imap/camel-imap-folder.c (imap_init): Took out
14265         references to 'namespace'
14266         (camel_imap_folder_init): Same
14267
14268         * providers/imap/camel-imap-folder.h: No more namespace. We are
14269         instead going to use url->path as the namespace.
14270
14271 2000-06-21  Jeffrey Stedfast  <fejj@helixcode.com>
14272
14273         * providers/imap/camel-imap-store.c (imap_create): Modified to
14274         use the "namespace" (url->path) if it exists.
14275
14276         * providers/imap/camel-imap-folder.c (imap_delete_message_by_uid):
14277         Now just sets the deleted flag on the summary rather than speaking 
14278         directly to the IMAP server. This is both faster and cleaner.
14279
14280 2000-06-21  Dan Winship  <danw@helixcode.com>
14281
14282         * providers/pop3/camel-pop3-store.c (query_auth_types): Fix dumb
14283         bug.
14284
14285 2000-06-21  Jeffrey Stedfast  <fejj@helixcode.com>
14286
14287         * providers/imap/camel-imap-folder.c (imap_get_message_by_uid): 
14288         We are getting mail in IMAP now!! whoo-hoo!. Stripped out the 
14289         filtering so messages may have some dot-stuffing, but the 
14290         filtering can always be added back in later when we know it 
14291         works and isn't the problem.
14292
14293 2000-06-21  Peter Williams  <peterw@curious-george.helixcode.com>
14294
14295         * providers/mbox/camel-mbox-folder.c (mbox_init): Use the basename
14296         of the mailbox so we don't get pathnames like ~/evolution/inbox///movemail.ibex
14297
14298 2000-06-21  Dan Winship  <danw@helixcode.com>
14299
14300         * camel-folder-summary.c (message_info_new): Set date_received
14301         based on the first (most recent) "Received" header.
14302
14303 2000-06-20  Dan Winship  <danw@helixcode.com>
14304
14305         * camel-mime-part.c (write_to_stream): flush the filter stream
14306         before unreffing it, so it will camel_mime_filter_complete.
14307
14308         * camel-stream-filter.c (camel_stream_filter_class_init): Fix a
14309         braino so camel_stream_flush works here.
14310
14311         * camel-stream-mem.c (stream_seek): Fix a bug that resulted in
14312         large attachments being silently dropped.
14313
14314         * providers/pop3/camel-pop3-store.c
14315         (camel_pop3_command_get_additional_data): Don't use g_strjoinv
14316         here, since it is O(n^2) on the length of the output string, and
14317         we can do O(n).
14318
14319         * camel-mime-part-utils.c
14320         (simple_data_wrapper_construct_from_parser): add a CRLF decoder
14321         after the QP/B64 decoder if it's text.
14322
14323 2000-06-20  Jeffrey Stedfast  <fejj@helixcode.com>
14324
14325         * providers/imap/camel-imap-folder.c (imap_get_summary): Only
14326         fetch the summary if the folder summary doesn't already exist.
14327         When the summary *does* exist, start fetching from 1, not 0.
14328         (imap_free_summary): Don't do anything here.
14329         (imap_finalize): Free the summary here instead of in
14330         imap_free_summary().
14331         (imap_set_message_flags): Implemented
14332         (imap_sync): Added code to set flags on messages that have had
14333         their flags changed (however I #if'd it out until we are more
14334         confidant in the IMAP code :)
14335         (imap_summary_get_by_uid): Now parese flags correctly.
14336         (imap_get_summary): Now parese flags correctly. Also correctly
14337         parses the UID correctly.
14338
14339         * camel-url.c (check_equal): No need to check s1 if s2 is NULL
14340         (camel_url_equal): Don't check the passwd component of the url.
14341
14342 2000-06-20  Dan Winship  <danw@helixcode.com>
14343
14344         * camel-folder-summary.c (camel_folder_summary_add): mark the
14345         message info with CAMEL_MESSAGE_FOLDER_FLAGGED if we change the
14346         uid, so the folder will know that it's dirty.
14347
14348 2000-06-20  Jeffrey Stedfast  <fejj@helixcode.com>
14349
14350         * providers/imap/camel-imap-store.c (camel_imap_command_extended): 
14351         Now returns the last line of data that the server sends back as
14352         well. This is needed for commands like SELECT (like Peter pointed
14353         out).
14354         (camel_imap_command): No longer checks for SELECT (no need)
14355
14356         * providers/imap/camel-imap-folder.c: Added namespace stuff
14357         which we will need later on...
14358         (imap_parse_subfolder_line): Convenience function for use in
14359         get_subfolder_names()
14360         (imap_get_subfolder_names): Updated. Also changed it to use LIST
14361         instead of LSUB (temporary change).
14362
14363 2000-06-19  Jeffrey Stedfast  <fejj@helixcode.com>
14364
14365         * providers/imap/camel-imap-folder.c (camel_imap_folder_init): Set
14366         summary equal to NULL.
14367         (imap_get_summary): Store the summary in the ImapFolder
14368         (imap_summary_get_by_uid): If we have a summary cache in the
14369         ImapFolder, first check to see if that message info is in the
14370         cached summary first, if not fetch it directly from the IMAP
14371         server and append it to the summary cache.
14372         (imap_get_message_flags): Don't free the message info that we get
14373         back from summary_get_by_uid as we don't want to be corrupting our
14374         cached summary.
14375
14376 2000-06-19  Peter Williams  <peterw@curious-george.helixcode.com>
14377
14378         * providers/imap/camel-imap-store.c (camel_imap_command{,_extended}): When
14379         SELECT'ing a folder for an IMAP command, use _extended to grab the entire
14380         response (before we just used camel_imap_command and missed the OK codes)
14381
14382 2000-06-18  Jeffrey Stedfast  <fejj@helixcode.com>
14383
14384         * providers/imap/camel-imap-folder.c (imap_summary_get_by_uid): 
14385         Now gets the message flags as it should.
14386         (imap_get_summary): Same as imap_summary_get_by_uid
14387         (imap_get_permanent_flags): Return the permanent flags stored
14388         on the folder.
14389         (imap_get_message_flags): Return message flags associated with
14390         given uid. Note: we may want to somehow cache summary info so
14391         that we don't have to keep querying the IMAP provider in
14392         imap_summary_get_by_uid().
14393
14394 2000-06-17  Jeffrey Stedfast  <fejj@helixcode.com>
14395
14396         * providers/imap/camel-imap-folder.c (imap_free_summary): We were
14397         leaking memory - but not anymore!
14398         (imap_get_summary): We now get the UIDs and the beginnings of the
14399         code to get the message flags as well.
14400
14401 2000-06-17  Dan Winship  <danw@helixcode.com>
14402
14403         * camel-mime-parser.c (folder_scan_header): Don't copy newlines
14404         into the parsed header text, and turn any number of tabs and
14405         spaces after a newline into a single space.
14406
14407 2000-06-17  Jeffrey Stedfast  <fejj@helixcode.com>
14408
14409         * providers/imap/camel-imap-folder.c (imap_init): Should now
14410         correctly do CAPABILITY.
14411
14412 2000-06-17  Dan Winship  <danw@helixcode.com>
14413
14414         * providers/mbox/camel-mbox-summary.c: Add some debugging printfs
14415         when rebulding summary to help figure out why people's summaries
14416         are always being rebuilt.
14417
14418 2000-06-17  Jeffrey Stedfast  <fejj@helixcode.com>
14419
14420         * providers/imap/camel-imap-folder.c (imap_search_by_expression):
14421         Began to implement, need to get information on how to
14422         deconstruct @expression into an IMAP search expression and
14423         parse the results.
14424         (imap_init): Now queries the IMAP provider for CAPABILITY to
14425         determine if SEARCH is implemented or not.
14426
14427         * providers/imap/imap.c: Removed - no longer a need to have
14428         this as an example for anyone interesting to help mecode IMAP
14429         support.
14430         
14431 2000-06-16  Jeffrey Stedfast  <fejj@helixcode.com>
14432
14433         * providers/imap/camel-imap-folder.c (imap_sync): Added code
14434         to expunge if called for (still need to finish coding this).
14435         (imap_get_uids): Implemented.
14436         (imap_get_summary): Found a way to get the date
14437         (imap_summary_get_by_uid): Same.
14438         (imap_free_summary): Implemented.
14439
14440         * string-utils.c (strstrcase): Fixed a compile warning
14441
14442         * providers/imap/camel-imap-summary.c: Removed - we don't
14443         need a CamelImapSummary structure.
14444
14445 2000-06-16  Dan Winship  <danw@helixcode.com>
14446
14447         Move flag handling from CamelMimeMessage to CamelFolder. This
14448         simplifies several flag-handling pieces of code in the mailer, and
14449         lets you change a message's flags without having to fetch the
14450         message body. It also means that fully-constructed
14451         CamelMimeMessages are now essentially constant, which will help
14452         simplify locking issues later since it means two threads
14453         interested in the same message can just work with separate copies
14454         of it.
14455
14456         * camel-mime-message.h (struct _CamelMimeMessage): Removed flags
14457         and user_flags (moved to summary). Removed expunged and
14458         message_number which were unused. Removed message_uid and folder
14459         which are no longer needed in the new scheme.
14460         (struct CamelMimeMessageClass): Removed message_changed signal and
14461         get/set_message_number methods.
14462
14463         * camel-mime-message.c: Updates for CamelMimeMessage changes.
14464         (camel_mime_message_get/set_flags,
14465         camel_mime_message_get/set_user_flag): Replaced with methods in
14466         CamelFolder.
14467         (camel_flag_get, camel_flag_set, camel_flag_list_size,
14468         camel_flag_list_free): Moved verbatim to camel-folder-summary.c
14469         
14470         * camel-folder.c (camel_folder_get/set_message_flags,
14471         camel_folder_get/set_message_user_flag): New methods (and
14472         corresponding useless default implementations)
14473         (camel_folder_class_init): add a message_changed signal
14474
14475         * camel-folder-summary.c (camel_flag_get, camel_flag_set,
14476         camel_flag_list_size, camel_flag_list_free): Moved here from
14477         camel-mime-message.c
14478
14479         * providers/mbox/camel-mbox-folder.c (message_changed): Removed.
14480         (mbox_get_message_flags, mbox_set_message_flags,
14481         mbox_get_message_user_flag, mbox_set_message_user_flag): Tweak
14482         summary bits as appropriate. (Functionality moved here from
14483         message_changed.)
14484         (mbox_get_message_by_uid): Update for CamelMimeMessage changes
14485         (less stuff to initialize).
14486
14487         * providers/imap/camel-imap-folder.c (message_changed): Remove
14488         this. It was just copied from the mbox provider and doesn't deal
14489         with the real IMAP flag stuff anyway. (So there's currently no
14490         flag support in the IMAP provider.)
14491         (imap_get_message_by_uid): Update for CamelMimeMessage changes.
14492
14493         * providers/vee/camel-vee-folder.c: (message_changed): Remove old
14494         one. Add a new one to listen for message_changed on each folder
14495         and re-emit message_changed signals that correspond to messages in
14496         the vfolder.
14497         (vee_get/set_message_flags, vee_get/set_message_user_flag): Proxy
14498         flag setting to the underlying real messages.
14499         (vee_append_message): Removed for now; there's no way to translate
14500         this into the new CamelMimeMessage/CamelFolder scheme, but (a)
14501         there's also no code which would ever call it and (b) we're
14502         probably going want a better interface than append_message for
14503         message drag and drop to work anyway. To be revisited.
14504
14505 2000-06-16  Dan Winship  <danw@helixcode.com>
14506
14507         * camel-mime-utils.c (rfc2047_decode_word): 
14508         * camel-mime-part-utils.c (simple_data_wrapper_construct_from_parser): 
14509         * camel-folder-summary.c (summary_build_content_info): 
14510         KLUDGE! Since neither ETable nor GtkHTML supports UTF-8 yet,
14511         output ISO-8859-1 instead, so Ettore can read his Italian mail. :)
14512         This will be reverted later.
14513
14514 2000-06-15  Jeffrey Stedfast  <fejj@helixcode.com>
14515
14516         * providers/imap/camel-imap-folder.c (imap_get_summary): Started to 
14517         implement - may want to use ENVELOPE instead of BODY.PEEK[HEADER]
14518         (imap_summary_get_by_uid): Started to code, I've got to find a way to 
14519         get the date in time_t format and also get the flags
14520
14521         * string-utils.c (strstrcase): Added this convenience function - I
14522         know about strcasestr() but it's not portable.
14523
14524 2000-06-15  Dan Winship  <danw@helixcode.com>
14525
14526         * camel-service.c: Remove camel_service_connect_with_url. (URLs
14527         must be specified when the service is requested from the session,
14528         so that there can only ever be one service for any URL.)
14529
14530         * camel-folder.c: (camel_folder_open, camel_folder_is_open,
14531         camel_folder_get_mode): Kill. Folders are now always open, and
14532         handle "closing" sorts of operations at sync or finalize time.
14533         (camel_folder_sync): renamed from camel_folder_close. Syncs state
14534         to the store but doesn't necessarily close/disconnect.
14535
14536         * providers/*/camel-*-folder.c: Merge "open" methods into "init"
14537         methods. Rename close to sync and update appropriately.
14538
14539         * providers/imap/camel-imap-store.c: Remove camel_imap_store_open
14540         and camel_imap_store_close, which should not have been copied from
14541         the POP provider (where the exist to work around limitations of
14542         the POP protocol).
14543
14544         * providers/mbox/camel-mbox-summary.c: fix a bug. (don't expunge
14545         deleted messages if called with expunge == FALSE)
14546         
14547         * providers/pop3/camel-pop3-store.c (connect_to_server): Check
14548         server for various interesting extensions.
14549
14550         * providers/pop3/camel-pop3-folder.c (get_uids): If the server
14551         supports UIDL, use real UIDs rather than fake ones.
14552         (etc): Map uids back to numbers appropriately
14553
14554         * providers/mbox/camel-mbox-folder.c (mbox_append_message): Fix to
14555         previous change: make sure the "seek" variable ends up with the
14556         value it should.
14557
14558         * providers/mbox/camel-mbox-summary.c (summary_rebuild): Update
14559         summary mtime as well as size.
14560
14561 2000-06-14  Dan Winship  <danw@helixcode.com>
14562
14563         * providers/mbox/camel-mbox-folder.c (mbox_append_message): if the
14564         mbox doesn't end with a '\n', write one before appending the new
14565         message.
14566
14567 2000-06-14  Jeffrey Stedfast  <fejj@helixcode.com>
14568
14569         * camel-mime-filter-crlf.c (filter): Updated the encoder to allocate 
14570         more memory (since we are also now adding dots). Also updated the
14571         decoder as we have found that it sometimes passes the end of the 
14572         buffer.
14573
14574         * providers/pop3/camel-pop3-folder.c (get_message_by_uid): Took out the
14575         filter code (we already filter in 
14576         camel_pop3_command_get_additional_data)
14577
14578         * camel-folder.c (init): Updated: a separator is now a char* rather 
14579         than a single char because IMAP can have a string for a directory 
14580         separator. Also, since IMAP does not begin with a directory separator,
14581         there is a new argument (path_begins_with_sep) which decides if a 
14582         directory should begin with a directory separator.
14583
14584         * providers/imap/camel-imap-store.c (imap_create): Since, on connect,
14585         Camel tries to create INBOX (which already exists on every IMAP 
14586         provider) we can return TRUE when the folder name is "INBOX".
14587
14588         * providers/vee/camel-vee-folder.c (vee_init): Updated.
14589
14590         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Updated.
14591
14592         * providers/mbox/camel-mbox-store.c (get_folder): Updated.
14593
14594         * providers/mbox/camel-mbox-folder.c (mbox_init): Updated.
14595
14596         * providers/pop3/camel-pop3-folder.c (camel_pop3_folder_new): Updated.
14597
14598 2000-06-14  Dan Winship  <danw@helixcode.com>
14599
14600         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
14601         Renamed from camel_mbox_summary_expunge. Takes a gboolean saying
14602         whether to expunge or just sync the mbox file. Change some
14603         g_errors to g_warning so we don't abort. Make the quick
14604         X-Evolution updating code lseek around correctly. Update the
14605         mbox mtime in the summary file even in the quick case.
14606
14607         * providers/mbox/camel-mbox-summary.h: make
14608         CAMEL_MESSAGE_FOLDER_NOXEV not conflict with
14609         CAMEL_MESSAGE_FOLDER_FLAGGED defined in camel-mime-message.h
14610
14611         * providers/mbox/camel-mbox-folder.c (mbox_close): call
14612         camel_mbox_summary_sync to save flag state if not expunging.
14613         (mbox_expunge): Update for camel_mbox_summary_expunge rename.
14614
14615 2000-06-13  Jeffrey Stedfast  <fejj@helixcode.com>
14616
14617         * providers/imap/camel-imap-store.c (camel_imap_store_open): 
14618         (camel_imap_store_close): Added.
14619         (camel_imap_command_extended): Fixed a segfault and updated
14620         to use camel_imap_status()
14621         (camel_imap_command): Updated to use camel_imap_status()
14622         (camel_imap_status): New convenience function for parsing
14623         the return status of an IMAP command
14624
14625 2000-06-12  Jeffrey Stedfast  <fejj@helixcode.com>
14626
14627         * providers/imap/camel-imap-folder.c (imap_get_message_by_uid): 
14628         Works like the POP fetch code, should work temporarily until
14629         we get around to coding it the way it "Should Be".
14630
14631         * providers/pop3/camel-pop3-folder.c (get_message_by_uid): Now uses
14632         the camel-mime-filter-crlf decoder when retrieving messages.
14633
14634         * camel-mime-filter-smtp.c: Deprecated.
14635
14636         * providers/smtp/camel-smtp-transport.c (smtp_data): Updated to use
14637         camel-mime-filter-crlf with my 'dot' extension in place of
14638         camel-mime-filter-smtp
14639
14640         * camel-mime-part.c (write_to_stream): Updated to reflect changes
14641         made to camel-mime-filter-crlf.c
14642
14643         * camel-mime-filter-crlf.c (filter): Modified to be able to
14644         encode/decode dots ("\n.\n"<->"\n..\n"). Also fixed the decoder
14645         so that it should no longer get caught in an infinite loop.
14646
14647 2000-06-12  Dan Winship  <danw@helixcode.com>
14648
14649         * providers/*/Makefile.am: don't pass a second (incorrect) -rpath
14650         in addition to the (correct) one automatically provided by
14651         automake.
14652
14653         * camel-mime-filter-crlf.c: New filter to do CRLF<->LF conversion.
14654         (Currently only tested in the LF->CRLF direction.)
14655
14656         * camel-mime-part.c (write_to_stream): if content-type is text,
14657         and it's QP or B64 encoded, pass through the CRLF filter before
14658         the other filter to satisfy the "canonical encoding" rules in the
14659         MIME spec.
14660
14661 2000-06-09  Dan Winship  <danw@helixcode.com>
14662
14663         * camel-session.c (camel_session_query_authenticator): Add another
14664         argument, "mode", which can be CAMEL_AUTHENTICATOR_ASK or
14665         CAMEL_AUTHENTICATOR_TELL, so callers can get the app to un-cache
14666         bad info.
14667
14668         * providers/pop3/camel-pop3-store.c (pop3_connect): uncache the
14669         password if it doesn't work.
14670
14671 2000-06-09  Jeffrey Stedfast  <fejj@helixcode.com>
14672
14673         * providers/imap/camel-imap-stream.c (stream_read): Updated to reflect
14674         changes made in camel-imap-store.c
14675
14676         * providers/imap/camel-imap-store.c (imap_create): No longer checks to
14677         make sure a folder doesn't already exists (as this is no longer needed)
14678         (camel_imap_command): Now takes a CamelFolder argument so it can detect
14679         whether or not it needs to SELECT a folder or not
14680         (camel_imap_command_extended): Same.
14681
14682         * providers/smtp/camel-smtp-transport.c (smtp_connect): Will now always
14683         send EHLO first, if that fails it will fall back on HELO.
14684         (esmtp_get_authtypes): Should now correctly parse authtypes.
14685
14686 2000-06-07  Jeffrey Stedfast  <fejj@helixcode.com>
14687
14688         * providers/imap/camel-imap-summary.c: Now builds (not that it's worth
14689         much yet).
14690         
14691         * providers/imap/camel-imap-folder.c (imap_get_uids): Now uses the 
14692         correct cast to a CamelImapMessageInfo structure (should get rid of 
14693         compile warnings).
14694
14695         * providers/imap/Makefile.am: Added rules to build 
14696         camel-imap-stream
14697         
14698         * providers/imap/camel-imap-store.c (get_folder): Update.
14699         Moved imap_create here.
14700
14701         * providers/imap/camel-imap-folder.c (delete_messages): Remove.
14702         (imap_create): Removed.
14703         (imap_delete): Removed.
14704         (imap_exists): Removed.
14705
14706         * providers/imap/camel-imap-stream.h: Added typedef's for the stream
14707
14708         * providers/imap/camel-imap-stream.c: Modified to build cleanly
14709
14710 2000-06-07  Not Zed  <NotZed@HelixCode.com>
14711
14712         * camel-mime-utils.c (header_msgid_decode_internal): Properly
14713         dereference warning/debug messages.
14714         (header_references_decode): Check we actually have msgid stuff
14715         before trying to decode it ...
14716
14717 2000-06-06  Jeffrey Stedfast  <fejj@helixcode.com>
14718
14719         * camel-imap-stream.[c,h]: Removed
14720
14721         * providers/imap/camel-imap-stream.[c,h]: Relocated to this
14722         location
14723
14724         * providers/imap/camel-imap-summary.c: Added
14725
14726 2000-06-06  Dan Winship  <danw@helixcode.com>
14727
14728         * camel-folder.c: Remove exists, create, delete. A CamelFolder
14729         now always references an existing folder. Remove delete_messages
14730         too since it wasn't being used. Add a "create" flag to
14731         get_subfolder saying whether or not to create the subfolder if it
14732         doesn't yet exist.
14733
14734         * camel-store.c (camel_store_get_folder): Add a "create" flag to
14735         say whether or not to create the folder if it doesn't yet exist.
14736         (camel_store_delete_folder): New method, moved from CamelFolder.
14737         (cache_folder, uncache_folder): Fix up a bit.
14738         (get_folder_name): Explain what this is for.
14739
14740         * providers/mbox/camel-mbox-folder.c: 
14741         * providers/mbox/camel-mbox-store.c: Update. Remove support for
14742         hierarchical folders to simplify this for now, since we're not
14743         using it, and it's not completely clear how they should work in an
14744         ELocalStorage world. Needs to be revisited.
14745
14746         * providers/pop3/camel-pop3-folder.c (delete_messages): Remove.
14747         * providers/pop3/camel-pop3-store.c (get_folder): Update.
14748
14749         * providers/vee/camel-vee-folder.c (exists): Remove.
14750         * providers/vee/camel-vee-store.c (vee_get_folder): Update.
14751
14752 2000-06-06  Jeffrey Stedfast  <fejj@helixcode.com>
14753
14754         * providers/imap/camel-imap-*.[c,h]: Started on getting 
14755         imap to build cleanly (tho some work has not been completed
14756         so it still won't build until camel-imap-summary is finished
14757         along with a few methods in camel-imap-folder)
14758
14759         * camel-stream.[c,h]: Changed the read and write method prototypes
14760         to return an ssize_t type rather than an int and also changed
14761         the 'number of bytes' to read or write to a size_t type
14762
14763         * camel-stream-fs.c: same as above
14764
14765         * camel-stream-mem.c: again, same as above
14766
14767         * camel-stream-buffer.c: same
14768
14769         * camel-imap-stream.[c,h]: Added this new stream, cache's previously 
14770         read data so each successive call will instead read from the cache
14771         
14772 2000-06-05  Dan Winship  <danw@helixcode.com>
14773
14774         * camel-mime-part.c (camel_mime_part_set_disposition): fix
14775         typo/braino (set "Content-Disposition", not "Content-Description")
14776         (camel_mime_part_set_filename): const poison
14777
14778 2000-06-02  Not Zed  <NotZed@HelixCode.com>
14779
14780         * camel-mime-utils.c (base64_encode_step): Ick, damn signs!  Fix a
14781         bug with sign extended bytes.
14782
14783         * camel-mime-filter-smtp.c (filter): Changed layout/logic slightly
14784         (to match From filter)
14785
14786 2000-06-02  Jeffrey Stedfast  <fejj@helixcode.com>
14787
14788         * camel-mime-filter-smtp.c (filter): Fixed the filter so that it 
14789         wouldn't insert garbage under certain conditions.
14790
14791 2000-06-02  Christopher James Lahey  <clahey@helixcode.com>
14792
14793         * camel-session.c: Don't ref the services in the cache.
14794
14795 2000-06-02  Jeffrey Stedfast  <fejj@helixcode.com>
14796
14797         * providers/smtp/camel-smtp-transport.c: Rearanged where debug
14798         fprintf statements we placed so that any data the server sends 
14799         back is printed out before an exception is set and the function
14800         returns.
14801
14802 2000-06-02  Not Zed  <NotZed@HelixCode.com>
14803
14804         * camel-mime-utils.c (header_decode_date): If we get a funny
14805         result, just throw it out.  Basically a fix for the one true
14806         broken TradeClient.
14807
14808 2000-06-01  Not Zed  <NotZed@HelixCode.com>
14809
14810         * camel-folder-summary.c (message_info_free): Free
14811         references/messsage id.
14812         (message_info_save): Save them.
14813         (message_info_load): Load them.
14814         (message_info_new): And get them from the new message.
14815         (CAMEL_FOLDER_SUMMARY_VERSION): Bumped for new changes.
14816
14817         * camel-folder-summary.h: Added references and messageid to
14818         summary.
14819
14820 2000-06-02  Christopher James Lahey  <clahey@helixcode.com>
14821
14822         * camel-session.c: Ref and unref objects in the service cache
14823         properly.
14824
14825         * camel-store.c: Ref the folder when returning it using
14826         lookup_folder.  Used the folder's full name for the key for the
14827         folder cache since that's used to uncache it.
14828
14829 2000-06-02  Dan Winship  <danw@helixcode.com>
14830
14831         Fun with purify.
14832
14833         * providers/pop3/camel-pop3-store.c (pop3_connect): free msg on
14834         success as well as failure.
14835         (camel_pop3_command_get_additional_data): free buf after reading
14836         the last line (".").
14837
14838         * providers/pop3/camel-pop3-folder.c (get_message_by_uid): free
14839         body data after creating the memstream from it (which will copy
14840         the data).
14841
14842         * providers/mbox/camel-mbox-folder.c (mbox_finalize): free summary
14843         and index paths.
14844
14845         * camel-data-wrapper.c (finalize): unref the stream, if it exists.
14846
14847 2000-06-01  Not Zed  <NotZed@HelixCode.com>
14848
14849         * camel-mime-part.c (construct_from_parser): For a message part,
14850         set the default content-type to message/rfc822.  Maybe needs to be
14851         done for multiparts too?
14852
14853 2000-05-31  Not Zed  <NotZed@HelixCode.com>
14854
14855         * camel-mime-message.c (construct_from_parser): Typo in assersion.
14856
14857         * camel-mime-parser.c (folder_scan_step): Use a default type of
14858         message/rfc822 for multipart/digest.  Bug Z192.
14859         (folder_scan_drop_step): Remove warning.
14860
14861 2000-05-30  Not Zed  <NotZed@HelixCode.com>
14862
14863         * providers/mbox/camel-mbox-folder.c (mbox_append_message): Init
14864         filter_from to NULL, for exception case.
14865         (mbox_get_message_by_uid): Cast off_t to long int for diagnostics.
14866
14867         * camel-url.c (camel_url_hash): Hash funciton for using camel
14868         url's as hash keys.
14869         (camel_url_equal): equal function for same.
14870
14871         * camel-session.c (camel_session_finalise): Free cached services.
14872         (camel_session_init): Init service cache.
14873         (service_cache_remove): destroy callback to remove a service from
14874         the cache.
14875
14876         * camel-store.c (get_folder_internal): Remove the extra ref of the
14877         folder.  That seems the right behaviour ...?
14878         (camel_store_get_type): Doh, actually call store init, so the
14879         cache works.
14880         (cache_folder): strdup the folder name!  no wonder it never found
14881         it again.
14882
14883 2000-05-30  Jeffrey Stedfast  <fejj@helixcode.com>
14884
14885         * providers/imap/camel-imap-folder.c: Implemented a few more
14886         methods like imap_append and 1 or 2 others
14887
14888 2000-05-29  Not Zed  <NotZed@HelixCode.com>
14889
14890         * camel-store.c (camel_store_init): Move it to here.  If this
14891         level is going to maintain it, it should set it up.  Lets see what
14892         caching folders breaks :(
14893
14894         * providers/pop3/camel-pop3-store.c (camel_pop3_store_init): Dont
14895         init folder cache here.
14896
14897         * providers/mbox/camel-mbox-summary.c
14898         (camel_mbox_summary_expunge): Make sure we copy messages which are
14899         still intact to the new folder.
14900         (camel_mbox_summary_expunge): Update the frompos as well when
14901         moving the content.
14902         (camel_mbox_summary_expunge): Remove some debug, and dont offset
14903         frompos?
14904
14905         * providers/vee/camel-vee-folder.c (vee_folder_build): Check the
14906         searched folder is open before trying to search it.
14907         (message_changed): Track changes to the source message in the
14908         summary.
14909         (folder_changed): Track folder changes, re-query the folder that
14910         changed, and cascade the changed event as well.
14911         (camel_vee_folder_finalise): Free subfolder and subfolder summary.
14912
14913 2000-05-29  Dan Winship  <danw@helixcode.com>
14914
14915         * camel-service.c (camel_service_new): Fix up some glib
14916         precondition stuff. Try to set the URL in camel_service_new before
14917         checking whether or not it's "empty" so that you can successfully
14918         set "sendmail:" as a URL.
14919
14920 2000-05-28  Dan Winship  <danw@helixcode.com>
14921
14922         * camel-provider.h: Add a domain field to CamelProvider, to say
14923         what kind of data it provides.
14924
14925         * providers/imap/camel-imap-provider.c: 
14926         * providers/mbox/camel-mbox-provider.c: 
14927         * providers/pop3/camel-pop3-provider.c: 
14928         * providers/sendmail/camel-sendmail-provider.c: 
14929         * providers/smtp/camel-smtp-provider.c: Set domain to "mail".
14930
14931         * providers/nntp/camel-nntp-provider.c: Set domain to "news".
14932
14933         * providers/vee/camel-vee-provider.c: Set domain to "vfolder". (So
14934         it doesn't end up being listed as a potential mail source in the
14935         mail config wizard.)
14936
14937         * providers/pop3/camel-pop3-store.c: Split apart password and APOP
14938         auth, since some servers seem to do both, but don't really.
14939         (connect_to_server): Renamed from try_connect. Now actually does
14940         the connection up to the point of checking the greeting for APOP
14941         support.
14942         (query_auth_types): Return APOP, if appropriate. Call
14943         pop3_disconnect after connect_to_server since we don't really want
14944         to be connected.
14945         (pop3_connect): Use connect_to_server rather than duplicating
14946         code. Fix a one-byte buffer overrun in the APOP code.
14947         (pop3_disconnect): Make this able to clean up after a partial
14948         connect.
14949         (connect_to_server): Remove port number from error message since
14950         it's not terribly useful and we were getting it from the wrong
14951         place anyway.
14952
14953         * camel-mime-utils.c (header_address_list_format_append): Use
14954         `foo@bar' rather than `"" <foo@bar>' for email addresses with no
14955         name component.
14956
14957 2000-05-27  Jeffrey Stedfast  <fejj@helixcode.com>
14958
14959         * providers/imap/camel-imap-store.c: Removed 
14960         camel_imap_command_get_additional_data() as it was
14961         completely useless, replaced with 
14962         camel_imap_command_extended() which may eventually replace
14963         camel_imap_command() as well.
14964
14965         * providers/imap/camel-imap-store.h: Modified to reflect
14966         changes made to camel-imap-store.c
14967
14968         * providers/imap/camel-imap-folder.c: Wrote the first of many
14969         methods: camel_imap_init(), imap_open(), imap_expunge(), 
14970         imap_get_message_count(), and imap_get_subfolder_names()
14971
14972 2000-05-26  Dan Winship  <danw@helixcode.com>
14973
14974         * camel-multipart.c (camel_multipart_init): Don't set a default
14975         boundary. Require the caller to do that.
14976         (set_boundary): if boundary is NULL, generate a "random" boundary.
14977
14978         * camel-mime-part-utils.c
14979         (camel_mime_part_construct_content_from_parser): Add a call to
14980         camel_multipart_set_boundary after creating a new multipart.
14981
14982 2000-05-25  Jeffrey Stedfast  <fejj@helixcode.com>
14983
14984         * providers/imap/camel-imap-store.c (try_connect): Removed
14985         Exception code - Pop doesn't seem to set exceptions
14986
14987         * providers/imap/camel-imap-folder.c: Initial code, mostly
14988         just a template for future code
14989
14990         * providers/imap/imap.[c,h]: Source code from my personal
14991         mailer - for reference only!
14992
14993 2000-05-25  NotZed  <NotZed@HelixCode.com>
14994
14995         * camel-mime-part-utils.c
14996         (camel_mime_part_construct_content_from_parser): Replace simple
14997         data wrapper here too, oops.
14998
14999         * Makefile.am (libcamel_la_SOURCES): Removed
15000         camel-simple-data-wrapper again.  Less code to maintain == better
15001         code.
15002         
15003         * camel-data-wrapper.c (construct_from_stream): Fixes for bug
15004         where text attachments dont work.  Made data-wrapper concrete for
15005         the second time.
15006
15007 2000-05-23  NotZed  <NotZed@HelixCode.com>
15008
15009         * providers/vee/camel-vee-folder.c (vee_folder_build_folder):
15010         Update the vfolder details for a single folder.
15011
15012 2000-05-25  Jeffrey Stedfast  <fejj@helixcode.com>
15013
15014         * providers/smtp/camel-smtp-transport.c (_send_to): Took out code
15015         that had been there to reconnect to the server if it was not
15016         already connected - Mailer code was fixed so that this should not
15017         be needed.
15018
15019         * providers/imap/camel-imap-store.[c,h]: Initial code.
15020
15021 2000-05-24  Dan Winship  <danw@helixcode.com>
15022
15023         * camel.h: Re-add camel-simple-data-wrapper.h, which was removed
15024         for some reason.
15025
15026 2000-05-24  Jeffrey Stedfast  <fejj@helixcode.com>
15027
15028         * providers/smtp/camel-smtp-transport.[c,h]: Moved global
15029         variables into struct CamelSmtpTransport to make SMTP
15030         thread-safe
15031
15032         * providers/imap/camel-imap-*.h: Stolen from Mbox. Rough structure
15033         for Imap.
15034         
15035 2000-05-23  Jeffrey Stedfast  <fejj@helixcode.com>
15036
15037         * providers/imap: Added some initial code to the camel tree
15038         for IMAPv4
15039
15040         * providers/imap/.cvsignore: Added to repository
15041
15042         * providers/smtp/camel-smtp-transport.c: Added debug fprintf's
15043         so that testers can provide more information. Tested with simple
15044         messages and a reply to the hello@helixcode.com default message
15045         but should really be tested more.
15046         (smtp_data): Fixed to use data_wrapper_write_to_stream.
15047
15048         * camel-mime-filter-smtp.c (filter): Modified to escape all lines
15049         beginning with a '.' and to place a \r before each \n if one did
15050         not previously exist. Removed code to escape "From " as it was
15051         found to not be needed for SMTP.
15052
15053 2000-05-22  Jeffrey Stedfast  <fejj@helixcode.com>
15054
15055         * providers/smtp/camel-smtp-transport.c (smtp_data): Fixed the 
15056         filtered stream. Fixes for stream changes, updated to use 
15057         camel-mime-filter-smtp.
15058
15059         * Makefile.am: Added camel-mime-filter-smtp.c
15060         
15061         * camel-mime-filter-smtp.[c,h]: Added to camel tree
15062         Smtp filter used to change \n into \r\n, escape lone dots,
15063         and escape "From "'s.
15064
15065 2000-05-19  NotZed  <NotZed@HelixCode.com>
15066
15067         * camel-simple-data-wrapper.c (construct_from_stream): If we
15068         already have been constructed, unref our content.
15069         (write_to_stream): Check we've been constructued, and change for
15070         stream api changes.
15071
15072         * camel-mime-parser.c: Removed exception stuff.
15073
15074         * md5-utils.c (md5_get_digest_from_stream): repaired.
15075
15076         * camel-mime-message.c: Remove exception from write_to_stream, and
15077         fix, and fix formatting.
15078
15079         * providers/sendmail/camel-sendmail-transport.c (_send_internal):
15080         Fix for stream changes.
15081
15082         * providers/pop3/camel-pop3-store.c (camel_pop3_command): Fixes
15083         for stream changes.
15084
15085         * providers/mbox/camel-mbox-folder.c, and elsewhere, fix all
15086         stream api changes.
15087         (mbox_append_message): Use stream_close() now its back.
15088         (mbox_append_message): unref the from filter.
15089
15090         * camel-stream-mem.c: And here.
15091
15092         * camel-stream-fs.[ch]: Here too.
15093
15094         * camel-stream-filter.c: Likewise.  This is getting tedious.
15095
15096         * camel-stream-buffer.c (stream_write): Fix a few little problems.
15097         (stream_close): Reimplement.
15098         (camel_stream_buffer_read_line): Slightly more efficient version,
15099         that also only allocates the right amount of memory for strings.
15100
15101         * camel-seekable-substream.c: Likewise.
15102
15103         * camel-seekable-stream.[ch]: Remove exceptions, fix formatting,
15104         changes for stream (re)fixes.  set_bounds returns an error.
15105
15106         * camel-stream.[ch]: Remove exceptions.  Make flush and reset return
15107         an error code, repair all the screwed up formatting, and put back
15108         close.
15109
15110         * camel-mime-part-utils.c
15111         (camel_mime_part_construct_content_from_parser): And here.
15112
15113         * camel-mime-part.c (camel_mime_part_set_content): And this too.
15114         (write_to_stream): Fixed for stream changes.
15115
15116         * camel.h: Fixed.
15117
15118         * providers/vee/camel-vee-folder.c (vee_search_by_expression):
15119         Implement.  Performs an intersection of the two searches.
15120         (camel_vee_folder_finalise): Unref search folders.
15121         (vee_append_message): Implement append.
15122
15123 2000-05-18  Dan Winship  <danw@helixcode.com>
15124
15125         * camel-folder.c: remove message_number_capability and require uid
15126         capatibility.
15127         (camel_folder_list_subfolders, camel_folder_get_uid_list,
15128         camel_folder_get_subfolder_info, camel_folder_get_message_info):
15129         removed
15130         (camel_folder_get_subfolder_names,
15131         camel_folder_free_subfolder_names): new subfolder interfaces.
15132         (camel_folder_get_uids, camel_folder_free_uids): new uid
15133         interfaces
15134         (camel_folder_get_summary, camel_folder_free_summary): new summary
15135         interfaces
15136
15137         * providers/mbox/camel-mbox-folder.c,
15138         * providers/nntp/camel-nntp-folder.c:
15139         * providers/vee/camel-vee-folder.c: Update for changes
15140
15141         * providers/pop3/camel-pop3-folder.c: Implement get_uids, update
15142         for other changes.
15143
15144 2000-05-18  NotZed  <NotZed@HelixCode.com>
15145
15146         * providers/vee/camel-vee-folder.c: Guess!
15147
15148         * camel-folder-search.c (search_user_flag): Implement user_flag
15149         search term.
15150
15151         * camel-folder-search.h: Added user_flag search capability
15152         (user-flag "blah")
15153
15154         * providers/mbox/camel-mbox-folder.c (mbox_init): Set USER flag in
15155         permanent flags for the folder.
15156
15157 2000-05-17  Dan Winship  <danw@helixcode.com>
15158
15159         * camel-folder.c: Remove unused async open/close and
15160         copy_message_to functions.
15161         Rename functions without initial _. Fix glib preconditions and
15162         gtk-doc comments.
15163
15164 2000-05-17  Dan Winship  <danw@helixcode.com>
15165
15166         * camel-data-wrapper.c: remove get/set_output_stream operations.
15167         They're redundant with write_to_stream, and CamelMimePart and
15168         CamelMimeMessage only implement the latter, meaning that trying to
15169         get_output_stream on a CamelMimeMessage that was built from pieces
15170         rather than being parsed from a stream doesn't work. Anything that
15171         uses get_output_stream can be rewritten to use write_to_stream, so
15172         we'll standardize on that.
15173         (camel_data_wrapper_new): remove this: CamelDataWrapper is
15174         supposed to be an abstract class.
15175         (write_to_stream): remove default implementation. (Moved to
15176         CamelSimpleDataWrapper)
15177         
15178         * camel-simple-data-wrapper.c: resurrect, although it's not really
15179         the same thing it was before. A simple data wrapper, which is
15180         backed by a CamelStream.
15181
15182         * camel-mime-part-utils.c
15183         (simple_data_wrapper_construct_from_parser): Use
15184         construct_from_stream rather than set_output_stream.
15185         (camel_mime_part_construct_content_from_parser): Change
15186         camel_data_wrapper_new to camel_simple_data_wrapper_new.
15187
15188         * camel-mime-part.c (camel_mime_part_set_content): Change
15189         camel_data_wrapper_new to camel_simple_data_wrapper_new.
15190         
15191
15192 2000-05-17  Darin Adler  <darin@eazel.com>
15193
15194         * camel-folder-summary.c: (message_info_load):
15195         Quick fix to get it to compile. I hope I don't get into trouble.
15196
15197 2000-05-17  Dan Winship  <danw@helixcode.com>
15198
15199         * camel.h: Don't include the no-longer-distributed
15200         possibly-to-be-removed headers.
15201
15202         * providers/smtp/camel-smtp-transport.c
15203         (smtp_get_email_addr_from_text): fix an off-by-one error in
15204         address parsing
15205         (smtp_data): use camel_data_wrapper_get_output_stream rather than
15206         data_wrapper->output_stream
15207
15208 2000-05-17  NotZed  <NotZed@HelixCode.com>
15209
15210         * providers/mbox/camel-mbox-folder.c (message_changed): Snoop
15211         changes to user flags on the message into the summary as well.
15212
15213         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_init):
15214         Changed version init to include the parent class version info
15215         (i.e. add it not overwrite it).
15216
15217         * camel-folder-summary.c (message_info_new): Initialise user_flags
15218         to empty.
15219         (message_info_load): And load user flags.
15220         (message_info_save): And save user flags.
15221         (message_info_free): And free them.
15222         (CAMEL_FOLDER_SUMMARY_VERSION): Bumped file revision.
15223
15224         * camel-folder-summary.h: Added user-flags to summary.
15225
15226         * camel-mime-message.c (camel_mime_message_set_user_flag): Dont
15227         use a hashtable for user flags.
15228         (camel_mime_message_get_user_flag): And changed here too.
15229         (camel_flag_get): New interface to get a flag from a flag
15230         list.  Flag lists are easier to work with than hash tables, and
15231         save memory too.
15232         (camel_flag_set): And set.
15233         (camel_flag_list_free): And free.
15234         (free_key_only): Discard.
15235         (finalize): Remove the flag list.
15236
15237 2000-05-17  Jeffrey Stedfast  <fejj@stampede.org>
15238
15239         * providers/smtp/camel-smtp-transport.c: (smtp_helo): Error
15240         checking on gethostbyaddr() eliminating a possible segfault.
15241
15242 2000-05-16  NotZed  <NotZed@HelixCode.com>
15243
15244         * providers/mbox/camel-mbox-folder.c (mbox_delete_message_by_uid):
15245         Implement.
15246
15247 2000-05-12  NotZed  <NotZed@HelixCode.com>
15248
15249         * camel-movemail.c (camel_movemail): Open the destination with
15250         O_APPEND, so we dont blow away a partially transferred mbox.
15251         (camel_movemail): Loop if we get errno=INTR, and not fail.
15252
15253 2000-05-11  NotZed  <NotZed@HelixCode.com>
15254
15255         * providers/mbox/camel-mbox-summary.c (summary_rebuild): Update
15256         the summarised file size, if everything went ok.
15257         (camel_mbox_summary_expunge): Clear header flags after updating.
15258
15259 2000-05-16  Chris Toshok  <toshok@helixcode.com>
15260
15261         * providers/nntp/camel-nntp-folder.c:
15262         * providers/nntp/camel-nntp-folder.h:
15263         * providers/nntp/camel-nntp-provider.c: 
15264         * providers/nntp/camel-nntp-store.c: 
15265         * providers/nntp/camel-nntp-utils.c: 
15266         * providers/nntp/camel-nntp-utils.h: 
15267         get things working with new camel summary stuff.
15268
15269         * providers/nntp/camel-nntp-summary.c: 
15270         * providers/nntp/camel-nntp-summary.h: 
15271         removed files since camel-folder-summary does all we need.
15272
15273 2000-05-15  Jeffrey Stedfast  <fejj@stampede.org>
15274
15275         * providers/smtp/camel-smtp-transport.c: Added some preliminary
15276         AUTH support.
15277
15278 2000-05-15  Dan Winship  <danw@helixcode.com>
15279
15280         * camel-folder.h: Remove camel_folder_get_summary, which no longer
15281         exists.
15282
15283 2000-05-11  Dan Winship  <danw@helixcode.com>
15284
15285         * Makefile.am: remove some cruft that we're not currently using.
15286
15287         * camel-stream-mem.c (camel_stream_mem_new_with_buffer): Change
15288         to match prototype (size_t vs unsigned int) so it works on 64-bit
15289         machines. Noted by msw.
15290
15291 2000-05-11  NotZed  <NotZed@HelixCode.com>
15292
15293         * providers/mbox/camel-mbox-folder.c (message_changed): Indicate
15294         the summary changed also.
15295
15296 2000-05-11  Jeffrey Stedfast  <fejj@stampede.org>
15297
15298         * providers/smtp/camel-smtp-transport.c: (smtp_helo): 
15299         Updated to more closely comply with RFC 821 standards
15300
15301 2000-05-11  NotZed  <NotZed@HelixCode.com>
15302
15303         * camel-mime-part.c (write_to_stream): Unref the filter after
15304         adding it to the filtering stream.
15305
15306         * providers/mbox/camel-mbox-summary.c
15307         (camel_mbox_summary_finalise): Free the folder path.
15308         (camel_mbox_summary_update): Also save summary when done.
15309         (camel_mbox_summary_expunge): Unindex items when deleting them.
15310         (camel_mbox_summary_expunge): Save the index as well as the
15311         summary.
15312
15313         * camel-folder-summary.c (camel_folder_summary_finalise): Free the
15314         summary path.
15315         (camel_folder_summary_touch): New function, indicate the summary
15316         info changed.
15317         (camel_folder_summary_remove): Dirty here.
15318
15319         * camel-internet-address.c (internet_decode): Free multiple entry
15320         addresses properly.
15321
15322         * camel-mime-utils.c (header_decode_mailbox): Plugged another
15323         memleak, free text after converting it.
15324         (header_decode_addrspec): More leaks plugged.
15325
15326         * camel-mime-message.c (finalize): Free message_uid.
15327         (finalize): Free the recipients hashtable.
15328
15329 2000-05-11    <notzed@helixcode.com>
15330
15331         * camel-folder-summary.c (camel_folder_summary_finalise): Free
15332         summary items and charset filters.
15333
15334 2000-05-10    <notzed@helixcode.com>
15335
15336         * camel-folder-summary.c (camel_folder_summary_finalise): Don't
15337         free stuff in p, after we've free'd p.
15338
15339         * providers/mbox/camel-mbox-folder.c (mbox_append_message): Unref
15340         the stream we created for appending.
15341
15342 2000-05-10  Jeffrey Stedfast  <fejj@stampede.org>
15343
15344         * providers/smtp/camel-smtp-transport.c: (camel_smtp_transport_class_init):
15345         Added initialization for service_class
15346
15347 2000-05-10  Dan Winship  <danw@helixcode.com>
15348
15349         * camel-multipart.c (write_to_stream): fix a stupid typo. Thank
15350         you, C.
15351
15352         * camel-mime-part.c (write_to_stream): don't ref the stream before
15353         wrapper a filter around it, since nothing will ever unref it.
15354
15355 2000-05-10  Christopher James Lahey  <clahey@helixcode.com>
15356
15357         * Makefile.am: Added camel-types.h, camel-folder-pt-proxy.h, and
15358         camel-thread-proxy.h.
15359
15360 2000-05-09  Dan Winship  <danw@helixcode.com>
15361
15362         * providers/sendmail/camel-sendmail-transport.c (_send_internal):
15363         Bleah. Can't fsync a pipe. As a quick kludge, just don't
15364         stream_flush it. The right fix will require bringing back
15365         stream_close though.
15366
15367 2000-05-09  Jeffrey Stedfast  <fejj@stampede.org>
15368         * camel-internet-address.[c,h]: Undid my changes (moved
15369         struct _address back into came-internet-address.c)
15370         * providers/smtp/camel-smtp-transport.c: (_send): changed
15371         from using it's own address manipulation (using struct _address)
15372         to using camel_internet_address_get(). Also some format changes
15373         to keep consistant with the rest of Camel
15374
15375 2000-05-09  Jeffrey Stedfast  <fejj@stampede.org>
15376
15377         * camel-internet-address.[c,h]: Moved struct _address from
15378         camel-internet-address.c to camel-internet-address.h
15379         (hopefully this doesn't break anything...)
15380         * providers/smtp/camel-smtp-transport.c: (_send): now
15381         populates the recipient list with To, Cc, and Bcc addresses.
15382         Should now be able to use this module.
15383
15384 2000-05-09  Dan Winship  <danw@helixcode.com>
15385
15386         * providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid):
15387         one more refcounting fix I missed before.
15388
15389 2000-05-08  Jeffrey Stedfast  <fejj@stampede.org>
15390
15391         * providers/smtp/camel-smtp-transport.c: no longer frees memory it
15392         shouldn't, updated to reflect camel-stream changes involving
15393         CamelException (perhaps it should use a different CamelException
15394         variable than is passed to the camel smtp module?)
15395
15396 2000-05-08  Dan Winship  <danw@helixcode.com>
15397
15398         * camel-stream.c (camel_stream_read, camel_stream_write,
15399         camel_stream_flush, camel_stream_reset, camel_stream_printf,
15400         camel_stream_write_to_stream): Use CamelException to signal
15401         failure.
15402         (camel_stream_write_strings): Remove. camel_stream_printf is more
15403         useful in most of the places that used this.
15404         (camel_stream_write_string): Change from macro to function to
15405         prevent problems with double-evaluation.
15406
15407         * camel-seekable-stream.c (camel_seekable_stream_seek,
15408         camel_seekable_stream_set_bounds): Use CamelException.
15409         (reset): Update.
15410
15411         * camel-seekable-substream.c, camel-stream-buffer.c,
15412         camel-stream-filter.c, camel-stream-fs.c, camel-stream-mem.c:
15413         Update.
15414
15415         * camel-stream-fs.c: Remove the virtual init functions and move
15416         the code into the creator functions. Add CamelExceptions to
15417         creation functions that could fail.
15418
15419         * camel-data-wrapper.c (camel_data_wrapper_write_to_stream): Use
15420         CamelException.
15421         * camel-mime-message.c, camel-mime-part.c, camel-multipart.c
15422         (write_to_stream): Update.
15423
15424         * camel-mime-parser.c: add an exception to the mime parser private
15425         data and pass that to stream functions as needed.
15426         
15427         * gmime-content-field.c, md5-utils.c: Update (badly) for stream
15428         changes.
15429         
15430         * camel-exception.h (camel_exception_is_set): convenience macro.
15431
15432         * providers/Makefile.am: disable SMTP for now
15433
15434         * providers/mbox/camel-mbox-folder.c (mbox_append_message): Pass
15435         CamelException to the functions that now need it. Check the
15436         exception after calling camel_stream_flush, and fail if it fails.
15437         (mbox_get_message_by_uid): More updates.
15438
15439         * providers/pop/camel-pop3-folder.c,
15440         providers/pop/camel-pop3-store.c,
15441         providers/sendmail/camel-sendmail/transport.c: Update.
15442
15443
15444 2000-05-08  NotZed  <NotZed@HelixCode.com>
15445
15446         * camel-mime-message.c (process_header): Format From and Reply-To
15447         to at least a decoded string.  Should probably store them as an
15448         camelinternetaddress.
15449
15450         * Merged NEW_SUMMARY branch back to trunk, and resolved conflicts.
15451         
15452         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_update):
15453         Return status.
15454         (camel_mbox_summary_expunge): Force an update of the summary
15455         before we do anything.
15456         (camel_mbox_summary_expunge): Build new xev line in xevnew, and
15457         free that, and consify xev.
15458         (camel_mbox_summary_load): If we are rebuilding from scratch, make
15459         sure we clear the summary content.
15460
15461         * camel-stream-filter.c (do_close): We NEED a stream close.
15462
15463 2000-05-07  Dan Winship  <danw@helixcode.com>
15464
15465         Make camel not leak like a sieve.
15466
15467         * camel-object.c: New subclass of GtkObject which is now the base
15468         of the Camel object hierarchy. Currently the only difference
15469         between CamelObject and GtkObject is that CamelObjects don't start
15470         out floating.
15471
15472         * *.h: Move a bunch of typedefs to camel-types.h. Standardize on
15473         using <camel/foo.h> in header files rather than <foo.h>, "foo.h",
15474         or "camel/foo.h". Remove some unneeded includes.
15475
15476         * camel-address.c, camel-data-wrapper.c, camel-folder-search.c,
15477         camel-folder-summary.c, camel-folder.c, camel-mime-filter.c,
15478         camel-mime-parser.c, camel-service.c, camel-session.c,
15479         camel-stream.c: These are now subclasses of CamelObject.
15480
15481         * camel-data-wrapper.c (set_output_stream):
15482         * camel-medium.c (set_content_object):
15483         * camel-seekable-substream.c
15484         (init_with_seekable_stream_and_bounds):
15485         * providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid): 
15486         remove gtk_object_sink calls.
15487
15488         * camel-stream-buffer.c (init_vbuf): 
15489         * camel-stream-filter.c (camel_stream_filter_new_with_stream):
15490         ref the original stream.
15491
15492         * camel-folder-summary.c (camel_folder_summary_finalise): unref
15493         the filters when finalizing.
15494
15495         * camel-mime-part-utils.c
15496         (simple_data_wrapper_construct_from_parser,
15497         camel_mime_part_construct_content_from_parser):
15498         * camel-mime-part.c (camel_mime_part_set_content): Unref objects
15499         that are created only to be handed off to other objects. If
15500         they're going to be needed later, they will have been additionally
15501         ref'ed by the object that needs them.
15502
15503         * providers/pop3/camel-pop3-folder.c (get_message_by_number):
15504         unref the message stream after creating the data from it.
15505
15506         * camel-stream.c, camel-stream-buffer.c, camel-stream-filter.c,
15507         camel-stream-fs.c, camel-stream-mem.c: Remove camel_stream_close,
15508         since its semantics are dubious (what happens when you close a
15509         stream other people still have references on?).
15510
15511         * providers/nntp/camel-nntp-store.c:
15512         * providers/smtp/camel-smtp-transport.c:
15513         * providers/pop3/camel-pop3-store.c:
15514         replace camel_stream_close calls with gtk_object_unref.
15515
15516         * providers/mbox/camel-mbox-folder.c:
15517         * providers/nntp/camel-nntp-folder.c:
15518         * providers/sendmail/camel-sendmail-transport.c:
15519         replace camel_stream_close with camel_stream_flush +
15520         gtk_object_unref
15521
15522 2000-05-06  Dan Winship  <danw@helixcode.com>
15523
15524         * providers/pop3/camel-pop3-store.c (query_auth_types): A machine
15525         which serves neither POP nor KPOP is not a POP server.
15526
15527         * providers/smtp/camel-smtp-provider.c: Note in the description
15528         that this provider is not yet tested.
15529
15530 2000-05-08    <notzed@helixcode.com>
15531
15532         * camel-mime-part.c (write_to_stream): Free the filter stream when
15533         done.
15534
15535         * camel-mime-parser.c (folder_seek): Make sure we add the \n
15536         terminal when we seek as well (frob!).
15537
15538         * camel-mime-utils.c (header_decode_addrspec): Plug minor memleak.
15539
15540         * camel-mime-part.c (finalize): Free header tables once finished.
15541
15542         * camel-folder-summary.c (camel_folder_summary_remove): Dont try
15543         to access info after its free'd.
15544
15545 2000-05-07  NotZed  <NotZed@HelixCode.com>
15546
15547         * camel-mime-part.c (write_to_stream): Apply encoding to content
15548         part, when writing to a stream *sigh*.
15549
15550         * camel-stream-filter.c (do_write): implement write for the
15551         filtering stream.  Writes shouldn't be mixed with reads.
15552         (do_flush): Implemented flush.  Again write/flush shouldn't be
15553         mixed with reads.  Only flushes if the last op was write.
15554         (do_close): Force flush on close.
15555
15556         * camel-mime-filter.c (filter_run): Oops, make sure we include the
15557         backlen in the total length before passing onto the filter.
15558
15559         * camel-mime-filter-from.c: New filter, munges 'From ' lines into
15560         '>From ', for mbox.
15561
15562         * camel-mime-parser.c (camel_mime_parser_header_remove): New
15563         function to remove the parser's raw header, rather than
15564         manipulating the header directly (wich doesn't work with
15565         mempools).
15566
15567         * camel-mime-utils.c (header_address_list_clear): Fixed some
15568         broken(tm) logic, which would leak entries on multivalued lists.
15569
15570         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_load):
15571         Use ibex_save() to save the ibex.  Makes a big difference to
15572         startup times for very large mailboxes.
15573         (camel_mbox_summary_expunge): Dum de dum, reimplemented.  Designed
15574         to be much more robust, and to stop immediately if anything awry
15575         happens.
15576         (copy_block): Utility function to copy n bytes from one fd to
15577         another.
15578         (header_write): Utility function to write out raw headers to an
15579         fd.
15580         (camel_mbox_summary_update): Incremental summary updater.
15581
15582         * providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid):
15583         Dont unref the stream, because of the broken(tm) ref model of gtk
15584         widget that for some odd reason is being perpetuated in camel.  
15585         (mbox_expunge): Reenable expunge again.
15586         (mbox_append_message): Removed the optimised mbox append.  If its
15587         an issue, it can go back later.  Cleaned up a lot, checks error
15588         returns, and automagically translates 'From ' into '>From' as
15589         necessary.
15590
15591 2000-05-07    <notzed@helixcode.com>
15592
15593         * camel-mime-filter.c (filter_run): Oops, forgot to add the
15594         backlen to the pre-buffer (*poof*).
15595
15596 2000-05-07  NotZed  <NotZed@HelixCode.com>
15597
15598         * camel-mime-message.c (construct_from_parser): Allow
15599         HSCAN_FROM_END to terminate the processing of a message.
15600
15601         * camel-folder-summary.c (perform_content_info_load): Ick, dont
15602         try and append a node onto its own list.
15603         (camel_folder_summary_clear): Actually clear the indexes after
15604         we've removed the messages.
15605         (camel_folder_summary_clear): Set dirty if it changes.
15606         (camel_folder_summary_load): Clear dirty.
15607         (camel_folder_summary_save): Only save if dirty.
15608
15609         * providers/mbox/camel-mbox-summary.c (summary_header_load): Oops,
15610         remember to call that parent class first ...
15611         (summary_header_save): Here too.
15612         (camel_mbox_summary_load): Do more checking to verify the index
15613         contents as well as teh summary contents, against the mbox
15614         contents.
15615         (camel_mbox_summary_load): Removed some fo that checking, it needs
15616         more code to work reliably.
15617
15618 2000-05-07    <notzed@helixcode.com>
15619
15620         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_load):
15621         Set the size and mtime of the mbox we indexed once done.
15622
15623         * camel-folder-summary.c (camel_folder_summary_set_index): Dont
15624         write the index if it changes - let the claler fix it (uh, kind of
15625         impacts performance).
15626         (camel_folder_summary_load): close in.
15627
15628         * camel-folder-summary.c (summary_format_string): Check header
15629         exists before trying to strip its leading spaces.
15630
15631 2000-05-06  NotZed  <NotZed@HelixCode.com>
15632
15633         * camel-folder.h: Removed summary info from here, and include
15634         camel-folder-summary.h as well.
15635         
15636         * camel-mime-parser.c (camel_mime_parser_step): Allow it to accept
15637         a NULL databuffer.
15638
15639         * providers/mbox/camel-mbox-summary.c: Totally new file, now
15640         subclasses camel-folder-summary.
15641
15642         * camel-folder-summary.c (message_info_load): Load the uid as a
15643         string.
15644         (message_info_save): And save too.
15645         (camel_folder_summary_clear): New function, clears the contents of
15646         the summary.
15647
15648         * providers/mbox/camel-mbox-folder.c: Fixes for summary changes.
15649         (mbox_get_message_by_uid): Completely redone.  Now cross-checks
15650         the summary information to make sure we get a real message.
15651         (mbox_append_message): Disabled the copy version of append for
15652         now.
15653         (mbox_expunge): Temporarily disabled the expunge function, until
15654         it is put back in camel-mbox-summary.c
15655
15656 2000-05-05  NotZed  <NotZed@HelixCode.com>
15657
15658         * camel-folder-summary.c: And same here ...
15659         (camel_folder_summary_encode_fixed_int32): Ugh, fwrite doesn't
15660         return -1 on error ..
15661         (camel_folder_summary_decode_fixed_int32): Neither deos fread.
15662         (camel_folder_summary_encode_token): Fix here too.
15663         (summary_build_content_info): Use start-headers to get the pos of
15664         the message, not parser_tell(), which might not be what we
15665         expected because of parser_unstep().
15666         (camel_folder_summary_encode_token): Use bserch() to tokenise the
15667         values, rather than a linear search.
15668
15669         * camel-mime-utils.c: Defined out some memory profiling stuff I
15670         left there by mistake.
15671         (header_decode_mailbox): Dont try to append the word part of a
15672         local address if we ran out of words.
15673
15674         * camel-mime-parser.c (folder_scan_content): Apply the fix from
15675         the header scanner to here too.
15676         (folder_scan_header): Only check for end of header if we have
15677         space for it (didn't end the read with a newline)
15678         (folder_scan_header): inptr is the only real thing we need
15679         registerised for performance.  Try to help the compiler be smart
15680         about it ..
15681         (folder_scan_header): Simplified the save header case a tad.
15682
15683         Commented out some memory profiling stuff.
15684
15685 2000-05-05    <notzed@helixcode.com>
15686
15687         * camel-mime-utils.c (header_decode_mailbox): Plug a memory leak.
15688         (header_decode_text): Fixed memory leaks with g_string_append().
15689         (header_encode_string): And here too, and a few other places.  The
15690         glib api is so awful ...
15691         (header_content_type_decode): More memory leaks.
15692
15693 2000-05-05    <notzed@helixcode.com>
15694
15695         * camel-mime-parser.c (folder_scan_init_with_fd): Make sure we
15696         init the end of buffer sentinal!
15697         (folder_scan_init_with_stream): And here too ...
15698
15699 2000-05-04  NotZed  <NotZed@HelixCode.com>
15700
15701         * providers/mbox/camel-mbox-folder.c (summary_get_message_info):
15702         Maxcount is minimum of the max and the requested count, not the
15703         maximum :)
15704
15705         * camel-mime-parser.c (folder_scan_content): Properly set midline,
15706         so we dont falsely catch offset boundary markers (i.e. From inside
15707         content).
15708         (folder_read): Set a sentinal on the end of the read data (\n) so
15709         we dont have to check the buffer boundary in the inner loop.
15710         (mempool_*): New experimental memory management routines, speed
15711         up simple structure parsing by about 25% ... not compiled in by
15712         default.  Something similar may be needed for camel-mime-utils to
15713         address performance issues with g_malloc and friends.
15714
15715         * camel-mime-utils.c: Added a macro w(x) used to wrap all warnings
15716         about mime/rfc violations, so they can be turned off.
15717
15718         * camel-folder-summary.c (summary_build_content_info): Step after
15719         the end of a message ...
15720         Turn into a stand-alone program for testing and profiling.
15721
15722 2000-05-04  Dan Winship  <danw@helixcode.com>
15723
15724         * providers/pop3/camel-pop3-store.c (pop3_connect): Don't fall
15725         back to plaintext passwords if APOP fails, since it should also
15726         fail.
15727
15728 2000-05-04  Dan Winship  <danw@helixcode.com>
15729
15730         * camel-session.c (camel_session_list_providers): New function to
15731         replace camel_provider_scan. Returns a list of either (a) all
15732         currently-loaded providers, or (b) all available providers.
15733
15734         * camel-url.[ch]: Add an "empty" flag to CamelURL (indicating that
15735         it contains only a protocol).
15736
15737         * camel-service.c (camel_service_query_auth_types): Make this take
15738         a CamelException (since it may have to try to connect to the
15739         server, and it might not able to.)
15740
15741         * providers/pop3/camel-pop3-store.c: add KPOP (Kerberized POP)
15742         support. This is mostly so I have two kinds of authmech to play
15743         with instead of just one. (But it does actually work.)
15744
15745         * providers/smtp/camel-smtp-transport.c (query_auth_types): update
15746         for prototype change, but disable the functionality, since it
15747         doesn't really support any auth types yet.
15748         (camel_smtp_transport_get_type): add an object init function to
15749         set the service url_flags.
15750
15751 2000-05-04  NotZed  <NotZed@HelixCode.com>
15752
15753         * providers/mbox/camel-mbox-summary.c: Yes, and anotherone.
15754
15755         * camel-mime-utils.c: And another one.
15756
15757         * camel-mime-part.c: And another one.
15758
15759         * camel-mime-part-utils.c: And another one.
15760
15761         * camel-folder-search.c: And another one.
15762
15763         * camel-mime-parser.c: Reverted a change wihtout a ChangeLog entry.
15764
15765 2000-05-04  NotZed  <NotZed@HelixCode.com>
15766
15767         * camel-folder-summary.[hc]: Yes, CamelFolderSummary is back ...
15768         ... re-usable class to summarise and index any stream or message
15769         and to manage/load/save the created summaries.
15770         
15771         * camel-folder.c: Include string.h to kill a warning.
15772
15773 2000-05-03  Jason Leach  <leach@wam.umd.edu>
15774
15775         * Makefile.am (INCLUDES): add $(UNICODE_CFLAGS) to the INCLUDES,
15776         people who installed libunicde in non-standard include paths need
15777         this.
15778
15779 2000-05-03  NotZed  <NotZed@HelixCode.com>
15780
15781         * camel-folder.h: Added pos/bodypos/endpos to the basic message
15782         content info object.  Size to be removed?  Moved the
15783         messageconentinfo and messageinfo back to camel-folder-summary.h.
15784
15785         * camel-mime-filter-index.c (camel_mime_filter_index_set_ibex):
15786         New function to (re)set the index to use on a filter.
15787
15788         * camel-mime-parser.c (camel_mime_parser_scan_from): Whole bunch
15789         of inline docs.
15790         (camel_mime_parser_drop_step): New function to drop a state from
15791         the parser.  Needs more testing.
15792
15793         * camel-mime-utils.c (rfc2047_decode_word): If the iconv handle is
15794         -1, then dont try and convert (crashes unicode_iconv?).
15795         (rfc2047_decode_word): Use alloca for variables instead of
15796         g_malloc - by the rfc they should always be short.
15797         (rfc2047_decode_word): If we can't do the charset conversion, undo
15798         the quoted-printable/base64 at least?  Should probably convert
15799         unknown characters to the utf-8 unknown character.
15800
15801 2000-05-02  Larry Ewing  <lewing@helixcode.com>
15802
15803         * camel-mime-utils.c (header_decode_date): fix typo when
15804         dereferencing saveoffset.
15805
15806 2000-05-02  NotZed  <NotZed@HelixCode.com>
15807
15808         * camel-folder-search.c: Added some header doco.
15809
15810         * camel.h: REmove gmime-utils.h from here.
15811
15812         * providers/mbox/camel-mbox-search.[ch]: Removed.  Functionally
15813         redundant.
15814
15815         * providers/mbox/camel-mbox-folder.c (mbox_search_by_expression):
15816         Use the new CamelFolderSearch class to do the actual searching,
15817         just setup the search here.
15818
15819         * camel-folder-search.[ch]: A helper class that providers may
15820         subclass to provide their own search functionality, or they can
15821         simply use as is, it supports body searches if an ibex is
15822         supplied, and header searches if a summary is supplied.
15823
15824 2000-05-02  Matt Loper  <matt@helixcode.com>
15825
15826         * Makefile.am: set G_LOG_DOMAIN.
15827         * providers/MH/Makefile.am: same.
15828         * providers/maildir/Makefile.am: same.
15829         * providers/mbox/Makefile.am: same.
15830         * providers/nntp/Makefile.am: same.
15831         * providers/pop3/Makefile.am: same.
15832         * providers/sendmail/Makefile.am: same. 
15833         * providers/smtp/Makefile.am: same.             
15834
15835 2000-05-02  NotZed  <NotZed@HelixCode.com>
15836
15837         * providers/mbox/camel-mbox-search.c
15838         (camel_mbox_folder_search_by_expression): Dont store/remove
15839         current search from the search list.
15840         
15841         * providers/mbox/camel-mbox-folder.h: Removed searches list,
15842         searches are all sync now.
15843
15844         * gmime-utils.[ch]: What the hell, remove it.  This will break the
15845         nntp provider.  The mime parser can be used instead though.
15846         Removed from all code including it (but none were using it).
15847
15848         * gmime-utils.c (_store_header_pair_from_string): Removed bizarre
15849         string_dichotomy version of this.  This code is somewhat redundant
15850         now, and is headed for death anyway.
15851
15852         * gstring-util.c (g_string_dichotomy): Same with this one.
15853         (g_string_clone): Removed a memory leak, g_string_new() allocates
15854         its own memory.
15855         (g_string_append_g_string): Allow to append an empty gstring onto
15856         another gstring, dont abort()!
15857
15858         * string-utils.c (string_dichotomy): Removed this incredibly weird
15859         function.
15860
15861         * camel-folder.c (_create): Replaced the rather obtuse use of
15862         "string_dichotomy" function with a simple strrchr().  Still not
15863         sure it'll work.
15864
15865         * camel-folder-summary.c: cvs removed a long-removed file.
15866
15867         * camel-mime-parser.c (folder_scan_header): Fix the previous
15868         overflow problem properly (can happen in 2 places).
15869         (header_append): A new macro to include the code changed above, so
15870         it only appears in one place.
15871         (folder_scan_step): Change the content type to text/plain if the
15872         multipart is broken.  Doesn't actually change the header though.
15873         (header_append): Also move the header-start tracking stuff here.
15874         Could be a static function to save code.
15875
15876 2000-05-02    <notzed@helixcode.com>
15877
15878         * camel-mime-part-utils.c
15879         (simple_data_wrapper_construct_from_parser): Dont use autofill on
15880         these fucking long function anmes!!!!!!
15881
15882 2000-05-02  NotZed  <NotZed@HelixCode.com>
15883
15884         * providers/mbox/camel-mbox-summary.c
15885         (camel_mbox_summary_expunge): Fix the offset for the summary when
15886         an item is expunged to take account of the From line.
15887
15888 2000-05-01  NotZed  <NotZed@HelixCode.com>
15889
15890         * providers/mbox/camel-mbox-folder.h (CamelMboxFolder): Removed
15891         search_id.
15892
15893         * providers/mbox/camel-mbox-search.c
15894         (camel_mbox_folder_search_cancel): Remove.d
15895         (camel_mbox_folder_search_complete): Removed.
15896         (camel_mbox_folder_search_by_expression): Changed back to sync
15897         api.
15898         (struct _searchcontext): Removed cancelled flag.
15899         (find_context): Removed.
15900         (func_header_contains): Debug out some search stuff.
15901
15902         * providers/mbox/camel-mbox-search.h
15903         (camel_mbox_folder_search_by_expression): Moved back to sync api.
15904
15905         * providers/mbox/camel-mbox-summary.c
15906         (camel_mbox_summary_set_flags_by_uid): New function to update the
15907         flags in the summary.
15908         (camel_mbox_summary_expunge): Expunge messages from a folder.
15909         (offset_content): Re-align offsets of summary when messages
15910         added/removed to an existing summary.
15911         (camel_mbox_summary_remove_uid): Remove a message summary entry by
15912         uid.
15913         (index_folder): Restore flags from X-Evolution header, if they are set.
15914         (index_folder): Make sure we index using a decimal uid, since
15915         thats what everything else indexes off (oops).
15916         Upped SUMMARY_VERSION as a result.
15917         (camel_mbox_summary_expunge): Oops, my wrong, use the string uid
15918         to unindex on.
15919
15920         * providers/mbox/camel-mbox-folder.c (_get_message_by_uid):
15921         Connect to the message_changed signal.
15922         (_init): Set permanent flags to something reasonable.  No user
15923         flags yet ...
15924         (message_changed): If the flags of the message change, update the
15925         flags in the summary.
15926         (mbox_expunge): Implement the expunge.
15927         (camel_mbox_folder_class_init): Renamed all leading _'s to mbox_'s
15928         (mbox_expunge): Emit a folder_changed signal on expunge (uh, even
15929         if it didn't ...)
15930
15931         * camel-folder.c (_finalize): Uh, dont free permanent_flags
15932         anymore (this wouldn't failed anyway, it was a GList !!!)
15933         (camel_folder_search_complete): Removed.
15934         (camel_folder_search_cancel): Removed.
15935         (camel_folder_expunge): Changed to only allow expunge on an open
15936         folder.  It doesn't make sense for mbox, otherwise (?)
15937         (camel_folder_class_init): Added a folder_changed signal.
15938
15939         * camel-folder.h (struct _CamelFolder): Change permanent_flags to
15940         a bitfield.
15941         (list_permanent_flags): Renamed to get_permanent_flags, and
15942         returns a bitfield.
15943         (camel_folder_expunge): Changed expunge to a void type.  The
15944         messages would no longer be useful after they have been removed
15945         ...
15946         (CamelFolderClass): New function summary_get_by_uid() to get a single
15947         summary.
15948         (*search*): Moved back to synchronous search api ... *sigh*
15949         
15950         * camel-folder.h: Removed CamelSearchFunc.
15951
15952         * camel-mime-message.c (set_flag): Removed.
15953         (camel_mime_message_set_flag): Removed.
15954         (get_flag): Removed.
15955         (camel_mime_message_get_flag): Removed.
15956         (add_flag_to_list): Removed.
15957         (get_flag_list): Removed.
15958         (camel_mime_message_get_flag_list): Removed.
15959         (camel_mime_message_get_flags): New interface to get system flags.
15960         (camel_mime_message_set_flags):  " to set ".
15961         (camel_mime_message_get_user_flag): To get a user flag.
15962         (camel_mime_message_set_user_flag): To set a user flag.
15963         (finalize): Hmm, the old one free'd the key and data, not good
15964         when the data is a boolean ...
15965
15966 2000-04-30  Dan Winship  <danw@helixcode.com>
15967
15968         * camel-provider.h: Tweak the definition of CamelProvider. Among
15969         other things, a provider may now be both a store and a transport.
15970
15971         * camel-provider.c: Remove a lot of code we had no intention of
15972         using. This now only contains two functions: camel_provider_init
15973         to read the installed .urls files, and camel_provider_load to
15974         load and register a new provider.
15975
15976         * camel-session.c: Remove more unused code and simplify some of
15977         the remaining code. The list of available provider modules is now
15978         stored in the session, and it handles calling camel_provider_load
15979         to load them as needed. Provider registration is now done by
15980         calling back from the module init routine, which allows a single
15981         module to register providers for multiple URL types.
15982
15983         * providers/*: Update provider structures and init routines for
15984         the new stuff. Add a .urls file to each provider specifying what
15985         urls it handles, and install that with the library.
15986
15987         * providers/nntp/camel-nntp-provider.c: Add hints towards
15988         supporting both news: and nntp: URLs, and using nntp as both a
15989         store and a transport.
15990
15991 2000-04-29  Dan Winship  <danw@helixcode.com>
15992
15993         * camel-internet-address.c (camel_internet_address_get): const
15994         poison
15995
15996         * camel-mime-part-utils.c
15997         (simple_data_wrapper_construct_from_parser):
15998         camel_mime_parser_tell() returns an offset from where it started
15999         parsing, not necessarily from the start of data. Since we're
16000         parsing a bounded seekable_stream, we need to add the stream's
16001         starting bound to camel_mime_parser_tell's return value to
16002         create the substream in the right place.
16003
16004         * camel-seekable-substream.c
16005         (camel_seekable_substream_new_with_seekable_stream_and_bounds):
16006         say CAMEL_STREAM_UNBOUND rather than -1 in doc.
16007
16008         * camel-seekable-stream.c (camel_seekable_stream_seek): Add more
16009         info to docs.
16010
16011 2000-04-28  Dan Winship  <danw@helixcode.com>
16012
16013         * camel-mime-parser.c (folder_scan_header): fix a bug that would
16014         cause corruption with very long headers.
16015
16016 2000-04-27  Ettore Perazzoli  <ettore@helixcode.com>
16017
16018         * providers/pop3/Makefile.am (INCLUDES): Add `-I$(srcdir)/../../..'
16019         to pick the Camel includes.
16020         * providers/sendmail/Makefile.am (INCLUDES): Likewise.
16021
16022         * camel.h: Don't #include <camel/data-wrapper-repository.h> anymore.
16023
16024 2000-04-27  NotZed  <NotZed@HelixCode.com>
16025
16026         * camel-mime-utils.c (check_header): Dont try and check a NULL
16027         header.
16028
16029         * camel-recipient.[ch]: Dead.  Its not pining.
16030
16031         * camel-mime-message.h: Dont include recipients.h anymore.
16032
16033         * camel-mime-message.c (camel_mime_message_add_recipient): Accept
16034         name/address separately, and store in an CamelInternetAddress.
16035         (add_recipient): Removed.
16036         (remove_recipient): Removed.
16037         (remove_recipient_address): Renamed from remove_receipient, works
16038         via address.
16039         (camel_mime_message_remove_recipient_name): New function to remove
16040         by name.
16041         (get_recipients): Removed.
16042         (camel_mime_message_get_recipients): Return a camel-internet-address.
16043         (write_to_stream): No longer write receipients directly.
16044         (write_recipients_to_stream): Removed.
16045         (write_one_recipient_to_stream): Removed.
16046         (camel_mime_message_init): Setup recipients hashtable, rather than
16047         usign the recipients stuff.
16048         (set_recipient_list_from_string): Killed, a violent and lengthy
16049         death.
16050         (process_header): Simplified recipient handling code a lot.
16051         (received_date_str, sent_date_str, reply_to_str, subject_str,
16052         from_str): Removed some oddly-defined global statics.
16053         (camel_mime_message_class_init): Dont initialise above variables
16054         anymore.
16055         (init_header_name_table): Removed, use a table to init this, and
16056         do it in class init (2 lines of code ...).
16057
16058         * camel-news-address.c: Class to represent news addresses -
16059         currently empty, and not built.
16060
16061         * camel-internet-address.h: Class to represent internet (email)
16062         addresses.
16063
16064         * camel-address.h: Abstract class to represent (lists of)
16065         addresses.
16066
16067 2000-04-27  Dan Winship  <danw@helixcode.com>
16068
16069         * camel-mime-part.c (write_to_stream): Revert previous change. I
16070         was confused.
16071
16072         * camel-url.[ch] (camel_url_encode, camel_url_decode): expose
16073         these routines.
16074
16075 2000-04-26  Dan Winship  <danw@helixcode.com>
16076
16077         * camel-mime-part.c (write_to_stream): Only write a newline
16078         between the headers and the content object if the content object
16079         is not a CamelMedium. (If the content is a medium, it may have its
16080         own headers, which then need to go before the blank line.)
16081
16082         * camel-mime-body-part.[ch]: Remove. We weren't using the fields
16083         that made this different from camel-mime-part, so it basically
16084         just forced us to do lots of gratuitous typecasting.
16085
16086         * camel-multipart.[ch]: Use CamelMimePart. Remove the multipart
16087         parent stuff, since we weren't using that either.
16088
16089         * etc: update for CamelMimeBodyPart -> CamelMimePart
16090
16091 2000-04-26  Dan Winship  <danw@helixcode.com>
16092
16093         * camel-medium.c (set_content_object): sink the content object
16094         after referencing it.
16095
16096         * camel-mime-part.c: fix various little things in the handling
16097         of CamelMedium methods. Change camel_mime_part_set_text to the
16098         more generic camel_mime_part_set_content.
16099
16100         * camel.h: sync to current reality
16101
16102         * camel-folder-utils.[ch]: removed
16103
16104         * camel-mime-utils.c (header_format_date): fix format specifier
16105         for time zone. Fix typo in month names array.
16106
16107 2000-04-26  NotZed  <NotZed@HelixCode.com>
16108
16109         * camel-seekable-substream.c (stream_seek): Changed to have
16110         absolute seek semantics, not relative to the bounds.
16111
16112         * camel-seekable-stream.c (reset): When we reset, seek to the
16113         start of the bound, if there is one.
16114         (stream_tell): Make tell virtual.
16115
16116         * camel-stream-filter.c (do_available): Removed.
16117
16118         * camel-stream-buffer.c: Remove leading _'s from static functions.
16119         (stream_read): Renamed from read().  Fancy that conflicting!  (my
16120         boo!)  Others too.
16121
16122         * providers/pop3/camel-pop3-folder.c (get_message_by_number):
16123         Changed to stream_mem interface.
16124
16125         * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): Fixed
16126         for streamfs interface changes, and implement a failure case.
16127         (_append_message): Changed for fs stream interface change.
16128
16129         * camel-multipart.c (print_part): Iterate rahter than callback.  I
16130         hate glists's interface (hence, move this to write_to_stream).
16131         (write_to_stream): Return an error (yuck, this is a royal PITA to
16132         do with the stream write interface).
16133
16134         * camel-mime-message.c: Removed leading _ from static names.
16135
16136         * camel-mime-part.h: construct_from_parser() now returns an error
16137         code.
16138
16139         * camel-mime-part-utils.c
16140         (camel_mime_part_construct_content_from_parser): Changed to use a
16141         camel-data-wrapper instead of a camel-simple-data-wrapper (no
16142         change needed elsewhere?).
16143         (simple_data_wrapper_construct_from_parser): Fixes for stream-mem
16144         interface changes.
16145
16146         * camel-simple-data-wrapper.[ch],
16147         camel-simple-data-wrapper-stream.[ch],
16148         camel-stream-data-wrapper.[ch], removed.  Fixed including of these
16149         files.
16150         
16151         * camel-mime-part.c (camel_mime_part_set_text): Remove the use of
16152         the camel-simple-data-wrapper-stream, just use a mem stream.
16153         (write_to_stream): Renamed from my_*
16154         (construct_from_stream): Return an error on error.
16155
16156         * camel-stream-mem.c (camel_stream_mem_new*): Remove mode
16157         parameter.
16158
16159         * camel-stream-mem.h (enum CamelStreamMemMode): Removed.  It
16160         wasn't used at all.
16161
16162         * camel-data-wrapper.h: Add camel_data_wrapper_new() to create
16163         these.
16164         (write_to_stream, construct_from_stream): Return an error
16165         indicator for success.  Fixed all methods to match (ICK).
16166
16167         * Makefile.am (libcamel_la_SOURCES): Remove
16168         camel-simple-data-wrapper.c, camel-simple-data-wrapper-stream.c,
16169         camel-stream-data-wrapper.c.  Obsoleted by code re-use!
16170
16171         * camel-data-wrapper.c (construct_from_stream): Change the default
16172         implementation to just set the output stream == construction
16173         stream.  Well, this lets me get rid of both simple-data-wrapper
16174         and stream-data-wrapper (unused anyway), and
16175         simple-data-wrapper-stream in one hit.  CamelDataWrapper is now
16176         also a concrete class.
16177         (write_to_stream): Use camel_stream_write_to_stream() to
16178         calculate/return values (and save code).
16179         Include <errno.h> for obvious reasons.
16180
16181         * camel-stream.c (eos): Provide a default implementation of .eos().
16182         (camel_stream_write_to_stream): Make it return an error code on
16183         error.
16184         (camel_stream_printf): Changed to return the number of bytes
16185         written/error.
16186         (camel_stream_available): Removed.
16187
16188         * camel-stream-fs.h (enum CamelStreamFsMode): Removed.  Changed to
16189         use unix modes and so forth (wasn't used for anything but new file
16190         creation and didn't work well either).
16191
16192         * camel-stream-fs.c: Removed leading _'s for names.  And removed
16193         some virtual method 'documentation'.
16194         (destroy): Dont try and close a closed/error fd.  Only report
16195         error if close returns -1.  Moved all the code to finalise(), and
16196         killed this function.
16197         (init_with_fd): Properly setup the seek offset, if it is a
16198         valid and seekable file descriptor.
16199         (init_with_fd_and_bounds): Use off_t for bounds, set bounds on the
16200         seekable stream.
16201         (init_with_name): Return error codes.
16202         (init_with_name_and_bounds): Ditto.
16203         (camel_stream_fs_new_with_name): REturn NULL object if it failed.
16204         (camel_stream_fs_new_with_name_and_bounds): Return NULL object on
16205         failure.  Changed with_name* api's to take unix open style args
16206         and flags.
16207         (read): The bounded stream bounds checking seemed off, simplified
16208         code a bit.
16209         (write): Implement bounds checking for writing, the comment was
16210         wrong, it could make sense to bound writing.  Cleaned up a little.
16211         (available): Gone.
16212         (eos): Removed.  Use CamelStream's implementation now.
16213         (close): Reset the fd to -1, provide a warning for bad usage.
16214         (seek): Cleaned up.  Changed the behaviour a little, the returned
16215         offset is the absolute position in the file, even in bounded
16216         streams.        
16217         (seek): Seek from end mirrors lseek() behaviour (reverse seeking).
16218
16219 2000-04-25  NotZed  <NotZed@HelixCode.com>
16220
16221         * camel-stream-fs.h (struct _CamelStreamFs): Moved bounds and eof
16222         indicator to other parent classes.
16223
16224         * camel-stream.c (camel_stream_printf): New utility
16225         function.  Obvious use.
16226
16227         * camel-stream-mem.c: Removed leading _'s from static func's.
16228         (camel_stream_mem_new_with_byte_array): Fixed for api changes, set
16229         the owner for the byte array to us.
16230         : Removed A bunch of gtk doc stuff for static (implementation) functions.
16231         (available): Removed.
16232         (write): Fixed the write implementation so that seek() works on a
16233         seekable memory stream, as expected.  Seeking past the end of the
16234         buffer has unix semantics (filling with 0).
16235         (available): Removed.
16236         (write): Implement seekable stream bounded stream.
16237         (read): Implement seekable stream bounded stream.
16238         (close): Dont free the stream_mem if we're not the owner.
16239         (seek): Allow to seek beyond the end of memory area,
16240         implement bounds checking.
16241         (seek): Set errno on bad policy.
16242
16243         * camel-stream-mem.h (struct _CamelStreamMem): Changed position to off_t.
16244         (new_with_buffer): Changed len to be a size_t.
16245         (set_buffer, set_byte_array): New interface functions.
16246         (struct _CamelStreamMem): Removed position, it is stored in the
16247         superclass.
16248
16249         * camel-stream.h: Removed some of the seemingly random
16250         whitespace.  Removed the available method (its not
16251         impelemented/useful enough).
16252
16253         * camel-seekable-substream.c
16254         (init_with_seekable_stream_and_bounds): Remove the data_available
16255         stuff, it hasn't been properly implemented/finished, and may never
16256         work (unfortunately *sigh).
16257         (reemit_parent_signal): Removed part of the above change.
16258         (set_bounds): Removed (moved to seekable-stream).
16259         : Fixed up some of the generally unreadable indenting (sorry,
16260         wrapping at 80 characters with
16261         camels_really_long_function_names()
16262         just_doesnt_work_very_well_does_it().
16263         (available): Removed.
16264         (stream_seek): Fixup for object changes.  Make sure we return -1
16265         if the parent stream can't seek.
16266
16267         * camel-seekable-stream.c (ccamel_seekable_stream_set_bounds): New
16268         function to bound any seekable stream.
16269         : Removed _'s.
16270         (camel_seekable_stream_class_init): Implement an init function, to
16271         setup the stream bounds to unbound.
16272
16273         * camel-seekable-stream.h (CamelSeekableStreamClass): New virtual
16274         method set_bounds for seekable streams.
16275         (CAMEL_STREAM_UNBOUND): New define for no bound.
16276
16277         * camel-seekable-substream.h (struct _CamelSeekableSubstream):
16278         Removed sup_bound and inf_bound, moved to CamelSeekableStream (and
16279         renamed, and changed to off_t's).
16280         (new_with_seekable_stream_and_bounds): Use off_t as the bounds.
16281         (CamelSeekableSubstreamClass): Uh, why was the intialiser virtual?
16282         Removed.
16283
16284         * camel-seekable-stream.[ch] (CamelSeekableStreamClass): Changed seek
16285         to accept an off_t as the offset.
16286         (struct _CamelSeekableStream): Renamed cur_pos to position and
16287         changed it to an off_t type.
16288         (enum CamelStreamSeekPolicy): Set to match the SEEK_* constants
16289         from lseek().
16290         (get_current_position): Renamed to tell().
16291
16292         * camel-stream-buffer.h: Commented out set_vbuf - never implemented.
16293
16294 2000-04-25  Dan Winship  <danw@helixcode.com>
16295
16296         * camel-stream-buffer.c (_eos): only return TRUE if the parent is
16297         at eos AND the buffer has been exhausted
16298
16299         * camel-mime-message.c: fix some incorrect macro usage that
16300         resulted in bogus casts
16301
16302 2000-04-24  Dan Winship  <danw@helixcode.com>
16303
16304         * camel-mime-part-utils.c
16305         (simple_data_wrapper_construct_from_parser): fix a cut-and-pasto.
16306
16307         * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): ref
16308         (and sink) the message stream if we're going to unref it later.
16309         Otherwise it could get destroyed while there are still substreams
16310         attached to it. This needs a cleaner solution.
16311
16312         * camel.h: remove data-wrapper-repository.h include(s)
16313
16314 2000-04-24  NotZed  <NotZed@HelixCode.com>
16315
16316         * camel-mime-message.c (construct_from_parser): Allow MESSAGE_END
16317         _or_ EOF as valid termination conditions.
16318
16319         * providers/mbox/camel-mbox-summary.c (message_struct_new): Decode
16320         and then re-encode the addresses, so they are consistently
16321         formatted.
16322
16323         * camel-mime-utils.c (header_decode_mailbox): Store the address in
16324         a _header_address.  And try to get a comment-stored name if there
16325         is one.
16326         (header_decode_address): Actually return an address.
16327         (header_to_decode): Renamed to header_address_decode()
16328         (header_mailbox_decode): New function to get a single mailbox.
16329         (header_mime_decode): Return the major/minor value, as
16330         appropriate.
16331         (header_address_new, and friends): Whole bunch of utility
16332         functions for working with the address thingies.
16333         (header_decode_domain): Free the string header, and dont expand
16334         '.' into ' . '.
16335
16336         * camel.c (camel_init): No longer call
16337         data_wrapper_repository_init.
16338
16339         * camel-medium.c (write_to_stream): Moved (back) to
16340         camel-mime-part.
16341         (add_header):
16342         (set_header):
16343         (remove_header): 
16344         (get_header): Make all these abstract, and spit warnings if
16345         called.  I guess it could manage the list, but well, it doesn't.
16346
16347         * camel-medium.h (struct _CamelMedium): Dont store headers here,
16348         the implementor is the only one who knows their format.
16349         (CamelMediumClass): Changed header values to be void *'s.  They
16350         need not be strings?
16351
16352         * camel-simple-data-wrapper.c (construct_from_stream): And we're
16353         back.  Set the output stream.
16354         (construct_from_parser): Moved to camel-mime-part-utils.
16355
16356         * camel-mime-part-utils.c
16357         (camel_mime_part_construct_content_from_parser): Create the
16358         contents of multipart and simple messages.
16359         (camel_mime_part_construct_content_from_parser): Oops, this was
16360         totally screwed up, try creating the right cotnent on the right
16361         object.
16362
16363         * camel-multipart.c (construct_from_parser): Moved to
16364         camel-mime-part-utils.
16365         (separate_part): Removed.
16366
16367         * camel-mime-part.c (construct_from_stream): Back again!  This now
16368         switches over to using a mime parser for any mime parts, only.
16369         (my_write_to_stream): Write our headers and so forth here.
16370         (add_header): Add header directly, parent class is abstract.
16371         (remove_header): Ditto.
16372         (set_header): Ditto.
16373
16374         * camel-data-wrapper.c (camel_data_wrapper_construct_from_stream):
16375         Remade abstract.
16376         (camel_data_wrapper_construct_from_parser): Moved to
16377         camel_mime_part.
16378
16379         * camel-data-wrapper.h: Put back construct_from_stream.
16380
16381         * camel-mime-part.h: Put construct_from_parser in here, the
16382         data-wrapper shouldn't know about mime.  Ok, so now to undo half
16383         of the last hours changes ... duh.
16384         
16385 2000-04-23  Dan Winship  <danw@helixcode.com>
16386
16387         * camel-mime-utils.c (header_to_decode, header_mime_decode): fix
16388         some obvious minor bugs noted by -Wall.
16389
16390 2000-04-23  NotZed  <NotZed@HelixCode.com>
16391
16392         * providers/pop3/camel-pop3-folder.c (get_message_by_number): Use
16393         construct_from_stream instead of set_input_stream().
16394
16395         * camel-simple-data-wrapper-stream.c
16396         (camel_simple_data_wrapper_stream_construct): REmoved the destroy
16397         callback code.
16398         (wrapper_destroy_cb): Removed.
16399
16400         * camel-simple-data-wrapper.h: Add prototype for _construct()
16401         method.
16402
16403         * camel.c: Include unicode.h to kill a warning.
16404
16405         * camel-data-wrapper.h (CameldataWrapperClass): Removed
16406         construct_from_stream virtual method.
16407         Removed get/set input stream.
16408
16409         * data-wrapper-repository.[ch]: Removed&from build.  Obsoleted?
16410         The justification as is follows: It is mixing storage
16411         protocol/format with message architecture.  It really just doesn't
16412         serve any purpose, as each medium implementor will have to have its
16413         own type->handler mapping, and the only current implementor,
16414         mimepart has a very simple structure and no need for this.
16415
16416         * camel-medium.c (write_to_stream): Moved here from most of the
16417         stuff in camel-mime-part.  Well, the MEDIUM is the one that knows
16418         what the headers are, and the content is, let it write it out.
16419
16420         * camel-mime-part-utils.c (camel_mime_part_construct_content):
16421         Copied from camel-mime-part.c, removed handling of message
16422         followon state (moved to camel-mime-message).
16423         (camel_mime_part_construct_content_from_parser): Renamed from
16424         construct_content.
16425         (camel_mime_part_construct_headers_from_stream):
16426         (camel_mime_part_construct_content_from_stream):
16427         (camel_mime_part_store_stream_in_buffer): Removed.  Replaced by
16428         the new construct from parser stuff.
16429
16430         * camel-mime-message.c (construct_from_parser): Do
16431         construct_from_parser for mime-message.
16432         (_write_to_stream): Set the mime-version header for medium to
16433         write out, rather than writing it out ourselves.
16434
16435         * camel-data-wrapper.c (set_mime_type_field): Ref the
16436         content_field when we get it?
16437         (construct_from_stream): Removed.
16438         (camel_data_wrapper_construct_from_stream): Changed to a helper
16439         function, creates a mime_parser, and constructs from that.
16440         (set_input_stream): Removed.
16441         (camel_data_wrapper_set_input_stream): Removed.
16442         (get_input_stream): Removed.
16443         (camel_data_wrapper_get_input_stream): Removed.
16444
16445         * camel-mime-parser.c (camel_mime_parser_unstep): New function.
16446         Cause a subsequent call to mime_parser_step() to return the same
16447         state over again.
16448
16449         * providers/mbox/camel-mbox-folder.c (_get_message_by_uid):
16450         Initial test code using the mime parser to construct the message.
16451         (_get_message_by_uid): Use construct_from_stream() instead of
16452         creating our own parser.
16453
16454         * camel-mime-part.c (construct_from_parser): part constructor.
16455         (camel_mime_part_construct_content): Basically a simpler
16456         replacement for the datawrapper repository.
16457         (camel_mime_part_init): Set the default type to text/plain.
16458         (camel_mime_part_construct_content): Removed to
16459         camel-mime-part-utils.c
16460         (my_get_output_stream): Removed.  The streeam is in the
16461         data-wrapper.
16462         (my_get_content_object): Removed.  The content object is stored in
16463         the medium.  If none is there, the object wasn't created properly.
16464         (my_write_content_to_stream): Removed.  The content object is the
16465         one that knows how to write itself out!!!!!!!!
16466         (my_write_to_stream): Remove the base header writing stuff - has
16467         been moved to camel-medium, where it belongs.  This can just be
16468         used to check for mandatory headers.
16469         (my_construct_from_stream): Removed.
16470         (my_set_input_stream): What the hell, i'll remove this too.
16471         Nobody seems to understand how it differs from create from stream,
16472         and they both seem to serve the same purpose ...
16473
16474         * camel-simple-data-wrapper.c (construct_from_parser): Initial
16475         implementation of a content constructor.
16476         (construct_from_stream): Removed!  Job taken over by
16477         construct_from_parser.
16478
16479         * camel-multipart.c (construct_from_parser): Multipart
16480         construction routine.
16481         (camel_multipart_init): Set the default multipart type to
16482         multipart/mixed.  Duh, no subtype is not allowed anyway.
16483         (set_input_stream): REmoved.  Replaced by construct_from_parser.
16484
16485 2000-04-22  Dan Winship  <danw@helixcode.com>
16486
16487         * camel-multipart.[ch]: clean, document, etc.
16488         (camel_multipart_init): pick a prettier default boundary. Still
16489         need to deal with the larger problem
16490
16491 2000-04-22  NotZed  <NotZed@HelixCode.com>
16492
16493         * camel-mime-message.h (struct _CamelMimeMessage): Removed
16494         send_date, and received_date, and replaced it with a time_t
16495         'date' (this is what the header is called), and date_offset to
16496         store the GMT offset of the date.
16497
16498         * camel-mime-message.c (camel_mime_message_set_from): Update raw
16499         header as we go.
16500         (_set_from): Removed.
16501         (_get_from): Removed.
16502         (camel_mime_message_get_from): Moved implementation here.
16503         (camel_mime_message_get_subject): Move implementation here.
16504         (_get_subject): Nuked.
16505         (camel_mime_message_set_subject): Handle utf-8 input, and also
16506         update raw header when changed.
16507         (_set_subject): Removed.
16508         (_set_received_date): Removed.
16509         (camel_mime_message_set_received_date): Removed.
16510         (_get_received_date): Removed.
16511         (camel_mime_message_get_received_date): Removed.
16512         (_get_sent_date): Removed.
16513         (camel_mime_message_get_sent_date): Removed.
16514         (camel_mime_message_get_date): New function to get the date as a
16515         time_t/offset.
16516         (camel_mime_message_set_date): Set the date as a time_t/offset.
16517         (camel_mime_message_get_date_string): Get the date as a string.
16518         (camel_mime_message_init): Initialise the current date as
16519         'CMAEL_MESSAGE_DATE_CURRENT'.
16520         (_set_reply_to): Removed.
16521         (camel_mime_message_set_reply_to): Moved implementation here.
16522         This is still broken, reply-to can have multiple addresses.
16523         (_get_reply_to): Removed.
16524         (_set_field): Removed, no longer used anywhere.
16525         (_get_field): Also removed.
16526         (_init_header_name_table): Add the Date header.
16527         (process_header): Also handle snooping of Date header here.
16528
16529         * camel-stream-filter.c (finalise): Unref the source stream on
16530         finalise, and also call the parent class (oops).
16531
16532         * camel-mime-parser.c (camel_mime_parser_state): New function to
16533         get the current parser state.
16534         (camel_mime_parser_stream): Allow you to get the stream back from
16535         the mime_parser.
16536         (camel_mime_parser_fd): Alternative to allow you to get the fd
16537         back from the mime_parser.
16538         (folder_scan_init_with_stream): Properly ref/unref the stream.
16539         (folder_scan_close): Properly unref the stream/close the fd on
16540         exit.
16541         (folder_scan_init_with_fd): Close the old fd if there is one.
16542
16543         * camel-data-wrapper.c (camel_data_wrapper_construct_from_parser):
16544         New method, construct a data wrapper from an initialised parser.
16545         (construct_from_parser): Empty implementation.
16546         
16547         * providers/mbox/camel-mbox-summary.c (message_struct_new):
16548         Convert subject line to unicode, before storing in the summary.
16549         (strdup_trim): Removed, no longer needed.
16550
16551         * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): Ref
16552         the folder after setting it in the new message.
16553
16554         * camel-mime-part.c (my_set_content_object): Have the headers
16555         follow the content-type change here too.
16556         (my_write_to_stream): Dont write content-type here, automatically
16557         stored in the headers ...
16558         (my_write_to_stream): Use header_disposition_format() to format
16559         the content-disposition header.
16560         (my_write_to_stream): Removed old code, all headers are now stored
16561         in the camel-medium level, always.  Need to do the same with
16562         camel-mime-message i suppose ...
16563         (my_write_to_stream): Write the content using the parent class,
16564         not some weird function.
16565         (camel_mime_part_class_init): Dont override get_output_stream.
16566         (camel_mime_part_encoding_from_string): Bleh, make it
16567         case-insensitive.
16568
16569         * camel-mime-utils.c (header_content_type_is): Handle empty types.
16570         (header_encode_string): Start of an implementation of the rfc2047
16571         encoder.  It does iso-8859-1, and us-ascii, and utf-8 (others get
16572         tricky *sigh*)
16573         (rfc2047_encode_word): Convert a single word/string into rfc2047
16574         encoding.
16575         (quoted_encode): Different quoted-printable encoding for rfc2047
16576         encoding of headers.
16577
16578         * gmime-content-field.c (gmime_content_field_write_to_stream): Use
16579         header_content_type_format() to format it.
16580
16581 2000-04-21  NotZed  <NotZed@HelixCode.com>
16582
16583         * camel-mime-utils.h: Add prototype for header_param_list_free.
16584
16585         * camel-recipient.c: New function to remove all the types of a
16586         recipient list.  I think this whole object needs a major review.
16587
16588         * camel-mime-message.c (camel_mime_message_class_init): Removed
16589         parse_header_pair override, override add_header instead.
16590         (_parse_header_pair): Renamed to add_header.
16591         (remove_header): Add this method, to make sure we keep upto date
16592         with removed headers too.
16593         (_set_field): If given a NULL value, clear it out.
16594         (_set_recipient_list_from_string): Constify.
16595         (set_header): Override set_header from camel_medium.
16596         (process_header): Local function to handle set/add/remove of each
16597         header we know about.
16598
16599         * camel-mime-part.c (camel_mime_part_class_init): Removed
16600         parse_header_pair setup.
16601         (my_parse_header_pair): Moved into add_header(), removed.
16602         (my_set_disposition): Allow a NULL disposition to clear it.
16603         (my_set_content_id): Allow NULL content id to clear it.
16604         (remove_header): Track removed headers.
16605         (my_set_description): Allow NULL description to clear it.
16606         (my_set_content_MD5): Make sure we copy the md5 value, and allow a
16607         NULL value to reset it.
16608         (my_set_filename): Copy the filename.
16609         (my_set_header_lines): Removed.  Nothing uses it, it doesn't
16610         actually serve any purpose.
16611         (camel_mime_part_set_header_lines): Ditto.
16612         (my_get_header_lines): Ditto.
16613         (camel_mime_part_get_header_lines): Ditto.
16614         (camel_mime_part_class_init): Remove *_header_lines setup.
16615         (camel_mime_part_init): Remove header_lines init.
16616         (my_finalize): Remove header_lines finalise.
16617         (my_write_to_stream): Write the headers here.  This is just WRONG,
16618         camel_medium should be doing this.
16619         (my_get_output_stream): Kill a warning.
16620         (camel_mime_part_encoding_to_string): Ditto.
16621         (camel_mime_part_set_description): Unvirtualiase, use add_header()
16622         to do the processing.
16623         (my_set_description): Removed.
16624         (set_disposition): Renamed from my_set_disposition.
16625         (camel_mime_part_get_description): Get the descriptionf rom the
16626         get_header method.
16627         (my_get_description): Removed.
16628         (my_set_filename): Removed.
16629         (camel_mime_part_get_filename): Get the parameter from the
16630         disposition.
16631         (camel_mime_part_encoding_from_string): Handle NULL string.
16632         (camel_mime_part_init): Remove reference to filename.
16633         (my_finalize): Dont free filename.
16634
16635         * camel-mime-part.h (CamelMimePartClass): Removed
16636         parse_header_pair() method, it doesn't add anything that
16637         add_header() can't be used for.
16638         (CamelMimePartClass): Remove *_header_lines methods.
16639         (struct _CamelMimePart): Remove header_lines list.
16640         (struct _CamelMimePart): Removed filename attribute.
16641
16642         * camel-medium.c (camel_medium_init): Init headers to null, not a
16643         hashtable.
16644         (add_header): Append the headers as a list.
16645         (remove_header): Remove headers as a list.
16646         (get_header): Likewise for lookup.
16647         (free_header): Removed, no longer needed.
16648         (finalize): Free headers using header_raw_clear().
16649         (camel_medium_set_header): New function, to reset and override all
16650         values of a header with a new value.
16651
16652         * camel-medium.h (struct _CamelMedium): Changed to use a
16653         header_raw struct rather than a hash table, to store headers
16654         (many headers can occur multiple times).
16655
16656         * camel-mime-utils.c (header_raw_find_next): New function, allows
16657         you to find multi-valued header fields.
16658         (header_disposition_format): New function to format/create
16659         content-disposition header string.
16660         (header_param_list_format_append): Function to format parameter
16661         lists into a GString.
16662         (header_content_type_format): Function to format content-type into
16663         a usable format.
16664         (header_set_param): allow NULL value to remove the parameter.
16665         (decode_token): Renamed from header_decode_token.
16666         (header_decode_token): New interface for external use.
16667         (quoted_decode): Made static to kill annoying warnings.
16668         (g_strdup_len): Killed, replaced with calls to g_strndup().
16669         (rfc2047_decode_word): Made static to kill warnings.
16670         (decode_coded_string): Terminated.
16671         (g_string_append_len): Made static to kill warnings.
16672         (header_decode_text): Made static to kill warnings.
16673         (header_decode_text): Constify.
16674         (rfc2047_decode_word): Constify.
16675         (header_param): Constify.
16676         (header_content_type_new): Copy the type/subtype strings.
16677         (header_param_list_decode): Made static.
16678         (header_param_list_format_append): Made static.
16679         (quoted_decode): Constify.
16680         (g_string_append_len): Constify.
16681         (header_token_decode): New function to decode a single token.
16682
16683         * providers/mbox/camel-mbox-summary.c (header_write): Append a
16684         trailing \n when writing headers.
16685         (strdup_trim): Killed a warning.
16686         (camel_mbox_summary_set_uid): Make sure the next uid is at least 1
16687         higher than any existing one.
16688         (header_evolution_decode): Use header_token_decode to get the
16689         token.
16690
16691         * camel-mime-parser.c (folder_scan_header): Strip the trailing \n
16692         of the end of all header lines.
16693
16694 2000-04-20  NotZed  <NotZed@HelixCode.com>
16695
16696         * providers/mbox/camel-mbox-utils.[ch]: Removed.
16697
16698         * providers/mbox/camel-mbox-parser.[ch]: Removed.  Removed
16699         references to it.
16700
16701 2000-04-20  Dan Winship  <danw@helixcode.com>
16702
16703         * camel-mime-utils.c (rfc2047_decode_word): use libunicode iconv
16704         functions rather than libc ones (since libc might not have them).
16705         (header_decode_date): add autoconfiscation on timezone code
16706
16707         * camel.c (camel_init): call unicode_init ()
16708
16709 2000-04-20  NotZed  <NotZed@HelixCode.com>
16710
16711         * providers/mbox/camel-mbox-summary.c (message_struct_new): Trim
16712         leading/trailing spaces off the raw headers.
16713
16714         * MERGE NEW_PARSER branch into HEAD, fixed conflicts.
16715         
16716         * gmime-content-field.c (_print_parameter): Duh, removed again
16717         (@@#$@ cvs merge).
16718
16719         * camel-mime-utils.c (header_content_type_is): Constify.
16720         (header_content_type_unref): Killed a couple warnings.
16721
16722         * camel-folder.c (_init): Removed more log crap.
16723
16724         * providers/Makefile.am (SUBDIRS): Removed nntp, pending fixes for
16725         summary changes.
16726
16727         * providers/mbox/camel-mbox-folder.c (_get_message_by_number):
16728         Fixed for new summary interface.  Added a warning for using this
16729         broken api.
16730         (_get_message_by_uid): Fixed for message new with session
16731         vanishing.
16732
16733 2000-04-19  Dan Winship  <danw@helixcode.com>
16734
16735         * camel-simple-data-wrapper-stream.c
16736         (camel_simple_data_wrapper_stream_get_type): This is a subtype of
16737         CamelSeekableStream, not CamelStream.
16738
16739         * camel-seekable-substream.c: clean up a lot.
16740         (eos): When testing for end-of-stream, reset the parent position
16741         before testing if it is at end-of-stream, since either (a) it may
16742         have been seek'ed to eos by someone else, or (b) we may have been
16743         seek'ed away from eos and it hasn't been synced yet.
16744
16745         * camel-medium.[ch] (camel_medium_add_header): const poison.
16746         (Belatedly goes with my change of 2000-02-23.)
16747         (camel_medium_init): Use g_strcase_{hash,equal} on the header
16748         array.
16749         
16750 2000-04-18  Dan Winship  <danw@helixcode.com>
16751
16752         * camel-mime-part.c (my_set_input_stream): 
16753         * camel-data-wrapper.c (set_input_stream, set_output_stream): do
16754         better reference counting of streams so they actually go away
16755         when they should.
16756
16757         * camel-log.[ch], *: Nuke camel log stuff. Replace calls to
16758         CAMEL_LOG_WARNING with calls to g_warning.
16759
16760         * camel-data-wrapper.[ch]:
16761         * camel-simple-data-wrapper.[ch]:
16762         * camel-medium.[ch]: Clean, polish, document. Most of the gtk-doc
16763         comments added to camel-data-wrapper.c note serious problems that
16764         need to be fixed.
16765
16766 2000-04-17  Dan Winship  <danw@helixcode.com>
16767
16768         * camel-mime-message.[ch]: Remove the "session" field from
16769         CamelMimeMessage. Nothing uses it, about half of the existing
16770         calls to camel_mime_message_new_with_session pass NULL, and
16771         there's no obvious reason for it to be there.
16772
16773         * providers/MH/camel-mh-folder.c:
16774         * providers/maildir/camel-maildir-folder.c:
16775         * providers/mbox/camel-mbox-folder.c:
16776         * providers/mbox/camel-mbox-utils.c:
16777         * providers/nntp/camel-nntp-folder.c:
16778         * providers/pop3/camel-pop3-folder.c: Use camel_mime_message_new
16779         instead of camel_mime_message_new_with_session.
16780
16781         * camel-session.c (get_store_for_protocol_with_url): Set the
16782         exception if no provider is found.
16783
16784         * camel-url.c: Add code to encode and decode %-escapes in URLs,
16785         and do some additional correctness-checking on URL syntax. From
16786         Tiago Antào with modifications by me.
16787
16788 2000-04-14  Chris Toshok  <toshok@helixcode.com>
16789
16790         * providers/Makefile.am (SUBDIRS): add nntp
16791
16792 2000-04-14  Christopher James Lahey  <clahey@helixcode.com>
16793
16794         * providers/mbox/camel-mbox-folder.c: Fix switch statement.
16795
16796 2000-04-14  Chris Toshok  <toshok@helixcode.com>
16797
16798         * providers/nntp/camel-nntp-folder.c (_exists): always return TRUE
16799         for now.  we need to check the server response to make sure the
16800         group exists.
16801         (_get_message_by_uid): make sure to account for the \n we add to
16802         the string after every line.
16803
16804         * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): function
16805         to get the headers using the XOVER command.
16806         (get_HEAD_headers): function to get the headers using the HEAD
16807         command on each message. slooooooow.
16808         (camel_nntp_get_headers): make this function use either XOVER or HEAD
16809         versions depending on whether or not the server extension is present.
16810
16811 2000-04-14  Dan Winship  <danw@helixcode.com>
16812
16813         * camel-formatter.[ch]: This didn't belong in Camel. Move to mail/
16814
16815         * Makefile.am, camel-types.h: remove references to
16816         camel-formatter.
16817
16818 2000-04-12  Matt Loper  <matt@helixcode.com>
16819
16820         * camel-folder-pt-proxy.c (_folder_open_cb): Print warning message
16821         for broken function.
16822         (_folder_close_cb): Same.
16823
16824 2000-04-12  Miguel de Icaza  <miguel@gnu.org>
16825
16826         * Makefile.am (pthread_SRC): Use correct names for the pthread
16827         source variables.
16828
16829 2000-04-10  Dan Winship  <danw@helixcode.com>
16830
16831         * providers/pop3/camel-pop3-store.c (pop3_connect): fix various
16832         bugs in APOP code (still untested) and some of the error cases.
16833
16834         * camel-provider.h: Clarify what provider.protocol, provider.name,
16835         and provider.description should be.
16836
16837         * providers/mbox/camel-mbox-provider.c: 
16838         * providers/pop3/camel-pop3-provider.c: 
16839         * providers/sendmail/camel-sendmail-provider.c: 
16840         * providers/smtp/camel-smtp-provider.c: update protocols, names,
16841         and descriptions
16842
16843         * providers/mbox/camel-mbox-folder.c (_get_message_by_number):
16844         implement get_message_by_number for the mail fetch code.
16845
16846 2000-04-09  Jeffrey Stedfast  <fejj@stampede.org>
16847
16848         * providers/smtp/camel-smtp-transport.c: reformatted to fit
16849         the standard indent format used by helix code
16850
16851 2000-04-09  Dan Winship  <danw@helixcode.com>
16852
16853         * camel-movemail.c: New file with new function to dot-lock an mbox
16854         file and copy it to a safe private directory.
16855
16856 2000-04-08  Christopher James Lahey  <clahey@helixcode.com>
16857
16858         * providers/smtp/.cvsignore: Added a .cvsignore file.
16859
16860 2000-04-08  Dan Winship  <danw@helixcode.com>
16861
16862         * providers/sendmail/camel-sendmail-transport.c (_send_internal):
16863         actually record the pid returned by fork(). Noticed by clahey.
16864
16865         * providers/smtp/camel-smtp-transport.c: #include <sys/param.h>
16866         for MAXHOSTNAMELEN. (This is a stopgap: some of the uses of
16867         MAXHOSTNAMELEN are wrong anyway...)
16868
16869 2000-04-07  Jeffrey Stedfast  <fejj@stampede.org>
16870
16871         * providers/smtp/camel-smtp-transport.c: fixes to numerous bugs;
16872         should now build fine.
16873         * providers/Makefile.am: Readded smtp now that smtp builds without
16874         error.
16875
16876 2000-04-20  NotZed  <NotZed@HelixCode.com>
16877
16878         * providers/mbox/camel-mbox-summary.c
16879         (camel_mbox_summary_next_uid): Public function to get the next
16880         uid, makes sure its saved to disk too.
16881
16882         * camel-mime-part.c (my_finalize): Fix disposition crap with a
16883         real disposition.
16884         (my_set_disposition): Likewise.
16885         (my_get_disposition): And here.
16886         (my_write_to_stream): And here, needs more cleanup.
16887
16888         * providers/mbox/camel-mbox-folder.c (_append_message): Assign a
16889         new uid at this point.
16890
16891         * gmime-content-field.c (gmime_content_field_write_to_stream):
16892         Make something up if we have an invalid/missing content type
16893         (i.e. text/plain).
16894
16895 2000-04-19  NotZed  <NotZed@HelixCode.com>
16896
16897         * providers/mbox/camel-mbox-folder.c (_delete): Fixed completely
16898         broken switch() syntax, only compiled because errno is a macro on
16899         some systems.
16900         (_list_subfolders): Likewise.
16901
16902 2000-04-18  NotZed  <NotZed@HelixCode.com>
16903
16904         * camel-mime-parser.c (folder_scan_init): init stream to null.
16905
16906         * providers/mbox/camel-mbox-summary.c
16907         (CAMEL_MBOX_SUMMARY_VERSION): Moved to .c file, incremented.
16908         (index_folder): Changed to have index passed via the summary.
16909         (decode_string): Do a sanity check on the string size, so we dont
16910         visit g_malloc()'s friendly abort().
16911
16912         * camel-folder-pt-proxy.c (camel_folder_pt_proxy_class_init):
16913         Removed reference to set_name.
16914         (_set_name): Removed.
16915
16916         * providers/mbox/camel-mbox-utils.c
16917         (parsed_information_to_mbox_summary): Removed.  Most of this file
16918         is about to be binned.
16919
16920         * providers/mbox/camel-mbox-search.c (func_header_contains): Fixes
16921         for changes to summary interface.
16922         (struct _searchcontext): Remove pointer to message info, get it
16923         straight from the mboxsummary.
16924         (camel_mbox_folder_search_by_expression): New summary interface.
16925         (camel_mbox_folder_search_by_expression): Uh, the summary is not
16926         an object anymore (well not yet).
16927
16928         * providers/mbox/camel-mbox-folder.c
16929         (camel_mbox_folder_class_init): Removed set_name init.
16930         (_set_name): Removed.
16931         (_open): Call new summary interface.
16932         (_close): Use new summary interface.
16933         (_create): Removed a summary object leak.
16934         (_get_message_count): New summary interface.
16935         (_get_uid_list): Use new summary interface. FIXME: this is leaky.
16936         (_get_message_by_uid): Use the new summary interface, some
16937         cleanup.
16938         (_append_message): Totally changed, basically just appends the
16939         message directly, ignores the summary (for now), the summary will
16940         fix itself up if it needs to.
16941         (_check_get_or_maybe_generate_summary_file): Bye bye old code.
16942         (summary_get_message_info): Implement get_message_info again, for
16943         folder.
16944
16945         * camel-folder.c (camel_folder_class_init): Removed set_name
16946         setup.
16947         (_set_name): Moved contents into _init.
16948         (_init): Perform the old functions of set_name here.
16949
16950         * camel-folder.h: Removed the set_name internal interface.
16951
16952 2000-04-14  NotZed  <NotZed@HelixCode.com>
16953
16954         * providers/mbox/camel-mbox-summary.[ch]: Completely replaced with
16955         new code.
16956
16957         * Makefile.am (libcamel_la_SOURCES): Removed
16958         camel-folder-summary.[ch].
16959
16960         * camel-folder.h (struct _CamelFolder): Removed summary.
16961         (struct _CamelFolder): Changed flags to be 1 bit bitfields.
16962
16963         * camel-folder-summary.[ch]: Class removed entirely.
16964
16965         * camel-folder.c (camel_folder_get_summary): Removed.
16966         (camel_folder_summary_get_message_info): Moved from
16967         camel-folder-summary.c
16968         (camel_folder_summary_get_subfolder_info): Moved from
16969         camel-folder-summary.c
16970
16971         * camel-mime-parser.c (folder_scan_step): Store the start of
16972         headers and start of from in the scan state.
16973         (camel_mime_parser_tell_start_headers): Query the start of the
16974         headers.
16975         (camel_mime_parser_tell_start_from): Query the cached start of
16976         from marker.
16977
16978 2000-04-13  NotZed  <NotZed@HelixCode.com>
16979
16980         * gmime-content-field.c (gmime_content_field_free): Removed this
16981         function.  If its too dangerous to use, it shouldn't be here.
16982         (gmime_content_field_ref): Also ref the embedded content-type.
16983         (gmime_content_field_unref): Ditto to unref it.
16984
16985         * camel-mime-utils.h: Add a refcount for content-type header.
16986
16987         * camel-mime-utils.c (header_content_type_unref): Implement unref
16988         for content-type.
16989         (header_content_type_ref): Implement ref for header content type.
16990
16991 2000-04-12  NotZed  <NotZed@HelixCode.com>
16992
16993         * gmime-content-field.h: Changed to use a _header_content_type.
16994         Added type/subtype back for compatability with clients.
16995         
16996         * gmime-content-field.c: Basically a total rewrite, and now just a
16997         thin wrapper ontop of header_content_type.
16998         (_free_parameter): Got rid of it.
16999         (gmime_content_field_new): Use header_content_type_* functions.
17000         (gmime_content_field_set_parameter): Likewise.
17001         (_print_parameter): Blow away.
17002         (gmime_content_field_write_to_stream): Get details from the
17003         content_type field.  Should check if it needs to escape chars in
17004         the paramter value.
17005         (gmime_content_field_get_mime_type): Likewise.
17006         (___debug_print_parameter): Get rid of this rather annoyingly
17007         named function.
17008         (gmime_content_field_get_parameter): Simplified function.
17009         (gmime_content_field_construct_from_string): Fixed this to use a
17010         real parser.
17011         (gmime_content_field_is_type): New function to test if a type matches.
17012         (gmime_content_field_construct_from_string): Track type/subtype
17013         from subordinate content_type header struct.
17014
17015         * gmime-rfc2047.[ch]: Removed.  Unused.
17016
17017         * camel-stream-b64.[ch]: Blown away more duplicated code.
17018
17019         * Makefile.am: Removed camel-stream-b64.[ch], and
17020         gmime-base64.[ch].
17021
17022         * camel-mime-part.c (my_get_content_object): Replaced
17023         camel-stream-b64 with camel-stream-filter/camel-mime-filter-basic.
17024         (my_write_content_to_stream): Replaced camel-stream-b64 with the
17025         camel-stream-filter with an encoder.
17026         (my_get_content_object): Also implement quoted-printable decoding.
17027         (my_write_content_to_stream): Also implement quoted-printable
17028         encoding.
17029         (my_get_output_stream): Took out stream-b64 code (nothing's being
17030         executed yet anyway).
17031
17032         * gmime-base64.[ch]: Blown away.  Not used, dont need it.
17033
17034         * camel-mime-utils.h: Added offset for this header.  Records where
17035         it is in the source.
17036
17037         * camel-mime-utils.c (header_raw_append_parse): Add offset
17038         parameter, to store where the header is stored in the stream.
17039         (header_raw_append): Added offset param.
17040         (header_raw_find): Return offset, if a pointer supplied for it.
17041         (header_raw_replace): Add offset param.
17042         (header_content_type_new): New function, to create an empty
17043         content type.
17044         (header_content_type_set_param): Set a parameter in the
17045         content-type.
17046         (header_set_param): Generic header parameter setting function.
17047         (header_decode_string): Handle NULL input.
17048
17049         * camel-mime-parser.c (camel_mime_parser_headers_raw): New
17050         function to get access to all the raw headers.
17051         (folder_scan_header): Keep track of the header start position, and
17052         store it when saving the header.
17053
17054 2000-04-11  NotZed  <NotZed@HelixCode.com>
17055
17056         * camel-mime-utils.c: Moved a bunch of printf's to debug.
17057
17058         * camel-mime-parser.c: Moved a bunch of printf's to debug.
17059         (folder_scan_header): Detect end of each header line using the
17060         last scanned char, and not the last scanned position.
17061
17062         * camel-mime-filter-index.[ch]: Indexing filter.  Indexes unicode
17063         sequences into ibex files.
17064
17065 2000-04-09  NotZed  <NotZed@HelixCode.com>
17066
17067         * camel-mime-part.c: Dont include gmime-base64.h
17068
17069         * camel-mime-filter-charset.c (complete): Implement the completion
17070         function.
17071
17072         * camel-mime-parser.c (folder_scan_step): If we get to the end of
17073         the body data, check any filters for outstanding completion data.
17074         (camel_mime_parser_scan_from): Set whether we scan for "From "
17075         headers or not.
17076
17077         * camel-stream-filter.c (do_read): If we get to end of stream on
17078         the source, then call the filtering completion function to see if
17079         we have any more data to return.
17080
17081         * camel-mime-filter-basic.c (filter): Implement quoted printable
17082         encoding and decoding filters.
17083         (complete): And the complete function as well.
17084
17085         * camel-mime-utils.c (base64_encode_close): Also take an input
17086         buffer, allow closing of filters.
17087         (quoted_encode_step): First cut, simple quoted-printable encoder.
17088         Doesn't handle trailing spaces/tabs on end of line properly yet.
17089         (quoted_encode_close): Complete a quoted-encoding.
17090         (is_qpsafe): New type check, for quoted-printable safe characters
17091         (that do not need encoding).  Thats all bits used in the type
17092         table!  Rebuilt the types table.
17093         (header_content_type_is): Checks a content type against at
17094         type/subtype match.
17095         (header_content_type_param): Handle NULL content type pointer.
17096
17097 2000-04-08  NotZed  <NotZed@HelixCode.com>
17098
17099         * camel-mime-filter-basic.c (filter): Implement the base64
17100         encoder.  Problem is, there is no way to know when to close it.
17101         Close/Reset will have to provide the same args as filter, so it can
17102         flush remaining data *sigh*
17103
17104         * camel-mime-utils.c (base64_encode_step): A rather complex base64
17105         encoder, fast?
17106         (base64_step_close): Companion function to finish off the base64
17107         sequence.
17108
17109         * camel-mime-part.c (my_write_content_to_stream): Changed to use
17110         camel_stream_write_to_stream().
17111
17112         * camel-stream.[ch] (camel_stream_write_to_stream): From
17113         camel_stream_b64_write_to_stream().  Fixed some infinite loop
17114         bugs with error conditions.
17115
17116         * camel-stream-b64.[ch] (camel_stream_b64_write_to_stream): Removed.
17117         This has nothing to do with stream-b64, so i've moved it to
17118         CamelStream.
17119
17120         * camel-mime-utils.h: Add a comment about refcounting
17121         header_content_type struct.
17122
17123         * Makefile.am: Added camel-stream-filter*.[ch].
17124
17125         * camel-stream-filter.[ch]: Class to implement a generic
17126         (multipass) filter ontop of a stream.  Only implements a read-only
17127         stream.
17128
17129         * camel-mime-parser.c (camel_mime_parser_filter_add): Ref the
17130         filter we just added.
17131
17132         * Makefile.am: Added camel-mime-filter*.[ch].
17133
17134         * camel-mime-filter-charset.[ch]: A filter to preform character set
17135         conversion (uses unicode_iconv).
17136
17137         * camel-mime-filter-save.[ch]: A simple filter which will save all
17138         data directly to a file or file descriptor.
17139
17140         * camel-mime-filter-basic.[ch]: Implements the basic mime filters,
17141         base64 and quoted-printable decoding (encoding not implemented yet).
17142
17143         * camel-mime-filter.[ch]: A filtering class, which can filter streams
17144         of data without having to copy them.  Simpler than stream classes,
17145         and can be plugged into a single stream class (when i write it).
17146
17147 2000-04-07  Dan Winship  <danw@helixcode.com>
17148
17149         * providers/pop3/camel-pop3-store.c (pop3_connect): Clarify error
17150         messages.
17151         (finalize): fix a bug in camel_exception usage
17152         (pop3_connect): Remember the password after asking for it the
17153         first time.
17154
17155 2000-04-07  NotZed  <NotZed@HelixCode.com>
17156
17157         * Makefile.am: Added camel-mime-parser/camel-mime-utils.
17158
17159         * camel-mime-parser.c: Fast mime parser.
17160
17161         * camel-mime-utils.c: Mime utility functions, and email header
17162         parsers.
17163
17164 2000-04-07  NotZed  <NotZed@HelixCode.com>
17165
17166         * providers/Makefile.am: Removed smtp for now, its a long way from
17167         building.
17168         * providers/smtp/Makefile.in: Removed file that shouldn't have been
17169         checked in.
17170
17171 2000-04-06  Matt Loper  <matt@helixcode.com>
17172
17173         * camel-folder-pt-proxy.c (_get_full_name): Remove exception param
17174         from get_full_name() called, since get_full_name() was changed to
17175         not have an exception in the last param (see dan's notes below).
17176         (_get_name): same.
17177
17178 2000-04-06  Dan Winship  <danw@helixcode.com>
17179
17180         * camel-store.[ch]: Reorganize the folder-fetching methods and
17181         implement a folder cache so that multiple requests for the same
17182         folder will yield the same CamelFolder object (as long as it
17183         remains active). Includes some code to remove no-longer-active
17184         folders from the cache, but it doesn't get used since nothing is
17185         ever unref'ed in Camel right now...
17186         
17187         * providers/mbox/camel-mbox-store.c:
17188         * providers/pop3/camel-pop3-store.c: update for CamelStore
17189         changes.
17190
17191         * camel-folder.[ch]: Remove the (unused) CamelException argument
17192         from camel_folder_get_name and camel_folder_get_full_name.
17193         (camel_folder_set_name): make this go away since changing a
17194         folder's name after it has been created could result in it
17195         conflicting with a separately-issued folder.
17196         
17197 2000-04-05  Dan Winship  <danw@helixcode.com>
17198
17199         * g_url_new really wanted to take a CamelException. So, rename
17200         Gurl to CamelURL, g_url_* to camel_url_* (with camel_url_new
17201         taking an exception), and url-util.[ch] to camel-url.[ch]. Also
17202         force url->port to be numeric and remove camel_service_getport. (I
17203         was confused before: the URL RFC says the port must be numeric, so
17204         we don't want to do getportbyname.)
17205
17206 2000-04-01  Dan Winship  <danw@helixcode.com>
17207
17208         * providers/mbox/camel-mbox-folder.c
17209         (_check_get_or_maybe_generate_summary_file): Compare
17210         mbox_file_size and mbox_modtime to the results of stat()ing the
17211         mbox file, not the summary file. Duh.
17212         (_close): Update the summary's mbox_file_size and mbox_modtime
17213         before writing it to disk.
17214
17215         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_save,
17216         camel_mbox_summary_load): Wow. I must have been tired when I wrote
17217         this code. First, the comparison bug above. Second, it was using
17218         ntohs and htons instead of ntohl and htonl. Third, I was reading
17219         the status flag byte in two different places and thus getting out
17220         of sync. Fourth, it was writing out field_length bytes of each
17221         header field after having converted field_length to network byte
17222         order, resulting in lots of random crap being appended, and the
17223         summary files being huge. (Fortunately, since the size/modtime
17224         comparison was biffed, the garbage summary read from disk was
17225         always immediately discarded.)
17226
17227         * providers/mbox/camel-mbox-parser.c (camel_mbox_parse_file): fix
17228         an off-by-one error that caused the last-used UID to be reused if
17229         the summary file was regenerated. (That one wasn't my fault. :-)
17230
17231 2000-03-31  Dan Winship  <danw@helixcode.com>
17232
17233         * camel-stream-mem.c: implement unimplemented methods
17234
17235         * gmime-content-field.c
17236         (gmime_content_field_construct_from_string):
17237         * data-wrapper-repository.c
17238         (data_wrapper_repository_get_data_wrapper_type):
17239         * camel-simple-data-wrapper.c (my_write_to_stream):
17240         * camel-mime-part.c (my_set_input_stream):
17241         remove debugging printf()s that no longer seem useful.
17242
17243 2000-03-31  Matt Loper  <matt@helixcode.com>
17244
17245         * camel-formatter.c (text_to_html): Added "convert_newlines_to_br"
17246         boolean param, to give the option of not converting '\n's to <br>
17247         tags. This way, when we stick stuff in a <pre> tag, newlines stay
17248         newlines.
17249
17250 2000-03-30  Matt Loper  <matt@helixcode.com>
17251
17252         * camel-formatter.c (handle_text_plain): Use <pre> tag to force
17253         the use of monospaced fonts.
17254
17255 2000-03-30  Dan Winship  <danw@helixcode.com>
17256
17257         * camel-service.c (camel_service_getport): Add a htons in the
17258         default_number case, and document the fact that the function
17259         returns the port in network byte order.
17260
17261         * providers/pop3/camel-pop3-store.c (pop3_connect): Revert
17262         Miguel's change. The port number bug was actually somewhere
17263         else, and the IP address copying code was fine already.
17264         
17265 2000-03-29  Miguel de Icaza  <miguel@gnu.org>
17266
17267         * providers/pop3/camel-pop3-store.c (pop3_connect): Add htons
17268         (port), and only copy 4 bytes for the IP address to prevent a DNS
17269         attack. 
17270
17271 2000-03-28  Dan Winship  <danw@helixcode.com>
17272
17273         * camel-seekable-substream.c
17274         (camel_seekable_substream_new_with_seekable_stream_and_bounds):
17275         make this return a CamelStream rather than a
17276         CamelSeekableSubstream, because that's the way Gtk objects tend to
17277         work.
17278
17279         * camel-service.c (camel_service_gethost,
17280         camel_service_getport): convenience functions to canonicalize
17281         the host and port values of a service's URL.
17282         * providers/pop3/camel-pop3-store.c: use them
17283
17284         * providers/mbox/camel-mbox-folder.c
17285         (_check_get_or_maybe_generate_summary_file): Make this work when
17286         the inbox file doesn't yet exist.
17287
17288 2000-03-27  Dan Winship  <danw@helixcode.com>
17289
17290         * providers/mbox/camel-mbox-folder.c (_append_message): uncomment
17291         the call to unlink the temp file: there's no way to tell
17292         camel_stream_fs to truncate a file, so reusing the same file was
17293         resulting in junk at the ends of messages.
17294
17295         * camel-folder.[ch]: add delete_message_by_{number,uid}.
17296
17297         * providers/pop3/camel-pop3-folder.[ch]: implement
17298         delete_message_by_uid. Add a close method to do expunging
17299         of deleted messages if requested.
17300
17301         * providers/pop3/camel-pop3-store.[ch]: support for
17302         CamelPop3Folder::close. (You have to close the connection
17303         in order to expunge the folder, thus the store may be
17304         connected in the CamelService::is_connected sense when it
17305         is not actually connected to the server.) Also some bugfixes.
17306
17307 2000-03-27  NotZed  <NotZed@HelixCode.com>
17308
17309         * providers/mbox/camel-mbox-folder.c (_append_message): Unref the
17310         output_stream when done, close doesn't do it.
17311         (_append_message): Clear all uid's from the appending messages, so
17312         they are reassigned proper unique id's.
17313
17314         * gmime-utils.c (get_header_array_from_stream): Actually free the
17315         header, it is copied elsewhere.
17316
17317 2000-03-26  NotZed  <NotZed@HelixCode.com>
17318
17319         * providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev): Added
17320         folder parameter to function.  Fixed callers.
17321         (index_message): Index a message as it is assigned a unique id.
17322
17323         * camel-mime-part.c (my_set_content_id): Make sure we malloc and
17324         copy the content_id, otherwise *poof*
17325
17326 2000-03-25  NotZed  <NotZed@HelixCode.com>
17327
17328         * camel-medium.c (_finalize): Another leak, unref the content if
17329         finished with it.
17330
17331         * camel-recipient.c (camel_recipient_table_free): Plug another
17332         memory leak - actually free the recipient table.
17333
17334         * camel-mime-message.c (_finalize): Plugged a memory leak with the
17335         flags table.
17336
17337         * gmime-utils.c (_store_header_pair_from_string): A simpler, more
17338         debuggable and functionally identical header extraction function.
17339
17340 2000-03-24  NotZed  <NotZed@HelixCode.com>
17341
17342         * gmime-content-field.c (gmime_content_field_set_parameter):
17343         Remove the hash table entry before freeing its key and data.
17344
17345 2000-03-27  Dan Winship  <danw@helixcode.com>
17346
17347         * providers/Makefile.am (SUBDIRS): Add pop3.
17348
17349         * providers/pop3/camel-pop3-store.c: keep separate input and
17350         output streams so the output doesn't end up being buffered.
17351
17352         * providers/pop3/camel-pop3-folder.c (get_message_by_number):
17353         finish implementing this.
17354
17355 2000-03-27  Michael Meeks  <michael@helixcode.com>
17356
17357         * camel-mime-part.c (my_set_disposition): fix so less broken.
17358         (my_finalize): remove dodgy disposition free.
17359
17360         * camel-data-wrapper.c (my_set_mime_type_field): unref instead of
17361         free on mime_type.
17362
17363 2000-03-27  Dan Winship  <danw@helixcode.com>
17364
17365         * camel-service.c (camel_service_free_auth_types): new routine to
17366         free the data allocated by camel_service_query_auth_types.
17367
17368         * providers/pop3/camel-pop3-store.c (free_auth_types): implement
17369
17370         * camel-stream-mem.c (camel_stream_mem_new_with_buffer): rename
17371         camel_stream_mem_new_with_buffer to ..._with_byte_array and add a
17372         new ..._with_buffer that takes a char * rather than a GByteArray.
17373
17374         * Remove CamelStreamBufferedFs, since CamelStreamBuffer makes it
17375         redundant.
17376
17377 2000-03-25  Dan Winship  <danw@helixcode.com>
17378
17379         * camel-folder-summary.[ch]: change the CamelFolderSummary
17380         interfaces to allow partial summary queries (for dealing
17381         with very large folders). Remove the "extended_fields" from
17382         CamelFolderInfo and CamelMessageInfo: this is better dealt
17383         with by subtyping.
17384
17385         * providers/mbox/camel-mbox-summary.[ch]: Make CamelMboxSummary a
17386         subclass of CamelFolderSummary. Update interfaces for that. Remove
17387         the internal/external summary distinction. Remove the (unused) md5
17388         checksum in the folder summary. Change the summary file format
17389         (primarily to make it no longer byte-order dependent) and add a
17390         version number to it so it will be easier to change in the future.
17391         
17392         * providers/mbox/camel-mbox-folder.[ch]
17393         * providers/mbox/camel-mbox-search.c
17394         * providers/mbox/camel-mbox-utils.c: update for summary changes
17395
17396         * camel-exception-list.def: add
17397         CAMEL_EXCEPTION_FOLDER_SUMMARY_INVALID
17398         
17399 2000-03-23  NotZed  <NotZed@HelixCode.com>
17400
17401         * providers/mbox/camel-mbox-provider.c: Added flag to provider
17402         initialisation, to match changed structure.
17403
17404 2000-03-22  NotZed  <NotZed@HelixCode.com>
17405
17406         * camel-folder.[ch]: Added async search api.
17407
17408         * providers/mbox/camel-mbox-search.c
17409         (camel_mbox_folder_search_by_expression): Changed to use an
17410         asynchronous interface.
17411         (camel_mbox_folder_search_cancel): Cancel function for async
17412         interface.
17413
17414 2000-03-23  Dan Winship  <danw@helixcode.com>
17415
17416         * camel-stream-buffer.c (camel_stream_buffer_read_line): Function
17417         to read one line of any size from a stream and return it in
17418         allocated memory.
17419
17420 2000-03-22  Dan Winship  <danw@helixcode.com>
17421
17422         * camel-service.c (camel_service_query_auth_types): New function
17423         to query a service for the authentication protocols it supports.
17424         * providers/pop3/camel-pop3-store.c (query_auth_types): implement
17425
17426         * camel-provider.c (camel_provider_scan): New function to
17427         scan the provider dir and return a list of all providers.
17428
17429         * providers/pop3/camel-pop3-folder.c: fill this in partially
17430         * providers/pop3/camel-pop3-store.c: make camel_pop3_command
17431         return the text after "+OK"/"-ERR" and add a separate
17432         camel_pop3_get_additional_data to get the message body or
17433         whatever. Also make them take a CamelPop3Store rather than
17434         a CamelStreamBuffer.
17435
17436 2000-03-22  Matt Loper  <matt@helixcode.com>
17437
17438         * camel-formatter.c (debug): Disabled some useless debug
17439         messaging.
17440
17441 2000-03-21  Dan Winship  <danw@helixcode.com>
17442
17443         * providers/pop3: some initial bits of the POP3 provider, to
17444         make Matt happy. Incomplete, untested, etc.
17445
17446 2000-03-21  bertrand  <bertrand@helixcode.com>
17447
17448         * providers/mbox/camel-mbox-summary.c 
17449         (camel_mbox_summary_append_internal_to_external): copy the size field
17450
17451         * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): initialize 
17452         message_info to NULL
17453
17454         * camel-folder-summary.h: added the size field.
17455
17456         * providers/mbox/camel-mbox-summary.h: 
17457         added the received_date field.
17458
17459         * providers/mbox/camel-mbox-summary.c:
17460         documented all functions.
17461
17462         * camel-folder-summary.h: name change and 
17463         new fields.
17464
17465         * providers/mbox/camel-mbox-search.c: update to 
17466         conform to name change in the summary fields.
17467
17468 2000-03-10  bertrand  <bertrand@helixcode.com>
17469
17470         * camel-service.h: cosmetic changes.
17471
17472 2000-03-09  Dan Winship  <danw@helixcode.com>
17473
17474         * s/HelixCode/Helix Code, Inc./ in the copyrights
17475
17476 2000-03-07  bertrand  <bertrand@helixcode.com>
17477
17478         * camel-formatter.c (handle_mime_part): 
17479         plug mem leaks due to bad documentation
17480         of camel_content_field_get_mime_type
17481         (print_camel_body_part): idem
17482         (handle_multipart_alternative): idem
17483
17484         * gmime-content-field.c (gmime_content_field_get_mime_type): 
17485         documentation fix.
17486
17487
17488         * camel-mime-part.c (my_finalize): unref the 
17489         content_input_stream if any. 
17490
17491 2000-03-06  bertrand  <bertrand@helixcode.com>
17492
17493         * camel-stream-fs.c (_seek): fix a bogus calculation
17494         in the return position.
17495
17496 2000-03-05  bertrand  <bertrand@helixcode.com>
17497
17498         * camel-session.h: cosmetic fixes.
17499
17500         * camel-stream-fs.c (_read): 
17501         (_seek): fixed the current position so that it refers
17502         to the current position in the stream, not in its parent.
17503
17504 2000-03-04  NotZed  <NotZed@HelixCode.com>
17505
17506         * providers/mbox/camel-mbox-search.c
17507         (camel_mbox_folder_search_by_expression): Ref the summary
17508         after we have got it.
17509
17510 2000-03-04  bertrand  <bertrand@helixcode.com>
17511
17512         * camel-mime-part.c (my_write_content_to_stream): 
17513         stream the raw content instead of nothing if the encoding
17514         is not supported.
17515
17516         * camel-stream-fs.c (_seek): handle eos more
17517         properly.
17518
17519         * camel-formatter.c (get_bonobo_tag_for_object): 
17520         bonobo-goad-id is the good key to look for. 
17521         (get_bonobo_tag_for_object): close the <object> tag.
17522         (get_bonobo_tag_for_object): the correct syntax for the
17523         to set a parameter inside an <object> tag is :
17524         <object classid="..."> <param name="uid" value="..."> <param ...>
17525         </object>
17526
17527 2000-03-03  bertrand  <bertrand@helixcode.com>
17528
17529         * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): 
17530         use set_input_stream instead of construct_from_stream
17531         to feed the message object. 
17532
17533         * camel-data-wrapper.c (my_write_to_stream): reset output stream.
17534         (my_set_input_stream): unref the previous input stream.
17535         use the set_output_stream for default behaviour.
17536         (my_set_output_stream): unref previous output stream.
17537
17538         * camel-mime-part.c (my_write_content_to_stream): reset content
17539         object output stream.
17540
17541 2000-03-03  NotZed  <NotZed@HelixCode.com>
17542
17543         * providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev): Make
17544         sure we open with create with a creation mask.
17545
17546 2000-03-01  NotZed  <NotZed@HelixCode.com>
17547
17548         * camel-mime-part-utils.c
17549         (camel_mime_part_construct_content_from_stream): DO NOT assert on
17550         content type, we have fallback code 4 lines below it ... *sigh*
17551
17552 2000-02-29  NotZed  <NotZed@HelixCode.com>
17553
17554         * Makefile.am (libcamelinclude_HEADERS): Added camel-stream-buffer
17555         to build.
17556
17557         * camel-stream-buffer.[ch]: Generic buffer which can be applied to
17558         any stream.
17559
17560 2000-03-03  bertrand  <bertrand@helixcode.com>
17561
17562         * camel-formatter.c (handle_image): in the case
17563         of images, put the content object output stream
17564         in the url. This allows the message browser
17565         to show inline images.
17566
17567         * camel-stream-b64.c (my_read_encode): fixed state
17568         0 keep value. 
17569
17570 2000-03-02  bertrand  <bertrand@helixcode.com>
17571
17572         * camel-stream-b64.c (my_read_encode): don't forget to 
17573         set the state to 0 after 3.
17574         (my_read_encode): don't forget to encode, even in state 3.
17575
17576         * camel-simple-data-wrapper.c: static functions are prefixed 
17577         with my_ instead of _
17578         * camel-multipart.c: static functions are prefixed 
17579         with my_ instead of _
17580         (my_write_to_stream): commented.
17581         (my_write_to_stream): warning in case the boudary is set
17582         but is a zero length string.
17583
17584         * camel-mime-part.c (camel_mime_part_encoding_from_string): 
17585         remove debug trace. 
17586         
17587         * camel-mime-part.c: Replaced all static functions
17588         with name begining with _ by the same name begining
17589         with "my_" to prevent the possible conflicts 
17590         with system symbols Dan warned us about. 
17591         
17592         * camel-stream-b64.c (camel_stream_b64_write_to_stream): 
17593         use CamelStreamB64 type for the input stream.
17594
17595         * camel-mime-part.c (_get_content_object): remove 
17596         debugging trace
17597         (_write_content_to_stream): implement the b64 
17598         encoding the new way (that is using camel_stream_b64)
17599
17600         * camel-data-wrapper.c (my_write_to_stream): 
17601         fix implementation so that it writes properly
17602         to the output stream even.
17603
17604         * camel-stream-b64.c (camel_stream_b64_write_to_stream): 
17605         fix implementation. 
17606
17607 2000-02-29  bertrand  <bertrand@helixcode.com>
17608
17609         * camel-stream-b64.c (camel_stream_b64_write_to_stream): new
17610         utility function. 
17611
17612         * camel-data-wrapper.c (_write_to_stream): default
17613         implementation. 
17614
17615         * gmime-utils.c (_store_header_pair_from_string): 
17616         revert strange changes. 
17617
17618         * camel-stream-b64.c (my_read_decode): set eos to true when we
17619         have read the whole input stream. 
17620         (my_reset): set eos to FALSE.
17621
17622 2000-02-28  NotZed  <NotZed@HelixCode.com>
17623
17624         * camel-mime-part.c (_parse_header_pair): Dont free this either.
17625
17626         * camel-medium.c (_remove_header): Ugh, dont free the header
17627         before we actually remove it.
17628         (_add_header): Ugh, dont free hashtable entries which may be
17629         duplicated (hash_insert _will_ reference that memory).
17630
17631         * string-utils.c (string_trim): Trimming a 0-length string is not
17632         an error.
17633
17634         * camel-mime-message.c (_parse_header_pair): Fixed very broken
17635         memory handling of header_name/value.
17636
17637         * providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev):
17638         Initialise end_of_last_message always.
17639         (camel_mbox_copy_file_chunk): Stop trying to read if we run out of
17640         data, rather than looping forever.
17641         (camel_mbox_write_xev): Use an open flag when opening with create.
17642
17643         * camel-folder.c (camel_folder_search_by_expression): No, its not
17644         a fatal error to search on a non-searchable folder, you just dont
17645         get any matches.
17646         (_open): Dont open an opened folder (i dont see why this is really
17647         a bug, but what the hell ...)
17648
17649         * providers/mbox/camel-mbox-folder.c (_init): Set search cap on.
17650         (_open): Call parent class to perform open.  Remove folder-open
17651         check to parent instead.
17652         (_create): open takes a creation mask, dont use umask to try and
17653         set the open mode.
17654         (_delete): Dont bother checking folder==NULL, its already been
17655         checked on the external interface (changed to an assertion, this
17656         would have to be a camel bug).
17657         (_delete_messages): Likewise.
17658         (_create): Ditto.
17659         (_init): Dont go and clear all the paths and shit that the parent
17660         open just setup for us.
17661         (_delete_messages): Get rid of more umask stuff.
17662         (_append_message): Make sure we pass file mode to open with create.
17663         (_append_message): Cleaned up some indenting to make it readable.
17664
17665         * camel-stream-b64.c (my_read_encode): Fixed a typo.
17666
17667         * providers/mbox/camel-mbox-search.c: Changed to use e-sexp,
17668         rather than filter-sexp.
17669
17670 2000-02-28  bertrand  <bertrand@helixcode.com>
17671
17672         * camel-stream-b64.c (my_read_encode): encoding
17673         filter.
17674
17675 2000-02-23  bertrand  <Bertrand.Guiheneuf@aful.org>
17676
17677         * camel-stream-b64.c: changed the __static 
17678         suffix into a my_ prefix. 
17679         (camel_stream_b64_set_mode): reset the persistent
17680         status. 
17681         (my_read_decode): remove superfluous %
17682         
17683         * providers/mbox/camel-mbox-utils.c (camel_mbox_copy_file_chunk): 
17684         fix exception description message.
17685
17686 2000-02-24  Dan Winship  <danw@helixcode.com>
17687
17688         * camel-session.c: Add camel_session_get_transport_for_protocol.
17689
17690         * camel-transport.h:
17691         * camel-transport.c: Add an abstract CamelTransport class.
17692
17693         * providers/sendmail/*: A CamelTransport that uses sendmail
17694         to deliver mail.
17695
17696 2000-02-24  Dan Winship  <danw@helixcode.com>
17697
17698         * camel-folder.c: use CamelExceptions for run-time errors, not
17699         incorrect code. Don't bother validating that an object exists from
17700         inside one of its methods, since you couldn't have gotten there if
17701         it didn't. Fix some code style bugs.
17702
17703         (_init): Rename init_with_store to init and add parent_folder,
17704         separator, and name arguments.
17705         (_set_name): Get separator from self, not parent_store now.
17706
17707         * camel-store.h:
17708         * camel-store.c: Remove get/set_separator.
17709
17710         * providers/mbox/: Update for above.
17711
17712 2000-02-23  Dan Winship  <danw@helixcode.com>
17713
17714         * camel-medium.c (_finalize): Free the data in the headers hash
17715         table.
17716         (_add_header): g_strdup the header name and value when adding it.
17717
17718         * camel-mime-part-utils.c
17719         (camel_mime_part_construct_headers_from_stream): Free the header
17720         data after calling camel_medium_add_header, since it will have
17721         g_strdup()ed it itself.
17722
17723 2000-02-22  NotZed  <NotZed@HelixCode.com>
17724
17725         * providers/mbox/camel-mbox-search.c: Dont compile by default.
17726
17727         * providers/mbox/Makefile.am: Fuck off the filter code.
17728
17729 2000-02-22  bertrand  <Bertrand.Guiheneuf@aful.org>
17730
17731         * camel-stream-b64.c (read_decode__static): 
17732         don't read the char if we reached the length
17733         of the output buffer. Hours lost on this
17734         %$!@# bug : 3.5
17735
17736         * camel-folder.c (camel_folder_get_subfolder): 
17737         (camel_folder_create): 
17738         (camel_folder_delete): 
17739         (camel_folder_delete_messages): 
17740         (camel_folder_list_subfolders): 
17741         (camel_folder_expunge): 
17742         (camel_folder_get_message_by_number): 
17743         (camel_folder_get_message_count): 
17744         (camel_folder_append_message): 
17745         (camel_folder_copy_message_to): 
17746         (camel_folder_get_summary): 
17747         (camel_folder_get_message_uid): 
17748         (camel_folder_get_message_by_uid): 
17749         (camel_folder_get_uid_list): 
17750         Check folder state (open/close) and raise an
17751         exception if it is not ok. 
17752         
17753         * providers/mbox/camel-mbox-folder.c (_create): 
17754         create the file and the path with two different
17755         names.
17756
17757         * camel-folder.c (_create): handle the case 
17758         when the folder name starts with '/'
17759
17760         * camel-exception.c (camel_exception_new): use 
17761         (void) instead of () in decl.
17762
17763         * camel-exception.h: cosmetic fixes.
17764
17765         * camel-exception.c (camel_exception_init): new routine.
17766         Fix a bug in mail/message-list.c
17767         
17768
17769         * camel-folder.h: cosmetic changes.
17770
17771         * camel-stream-b64.c (reset__static): added a
17772         reset method. Thanks message-browser to find
17773         so much bugs :)
17774
17775         * providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): readd
17776         Unicode libs.
17777
17778 2000-02-21  bertrand  <Bertrand.Guiheneuf@aful.org>
17779
17780         * camel-formatter.c (lookup_unique_id): 
17781         awful hack to test get_output_stream.
17782         * camel-stream-b64.[ch] :
17783         b64 encoding/decoding is now implemented as
17784         a stream. 
17785         
17786
17787 2000-02-21  bertrand  <Bertrand.Guiheneuf@aful.org>
17788
17789         * camel-seekable-substream.c (_reemit_parent_signal): 
17790         emit "data_available" when parent stream emits it. 
17791
17792
17793 2000-02-21  NotZed  <NotZed@HelixCode.com>
17794
17795         * providers/mbox/Makefile.am: Uh, fixed LIBADD again.  What was
17796         there was never ever going to work, wasn't it tested?
17797
17798
17799 2000-02-21  Dan Winship  <danw@helixcode.com>
17800
17801         * camel-session.h: (struct _CamelSession): Add authenticator.
17802
17803         * camel-session.c (camel_session_new): Add authenticator.
17804         (camel_session_query_authenticator): New function to query the
17805         session authenticator for password, etc, information.
17806
17807 2000-02-21  Dan Winship  <danw@helixcode.com>
17808
17809         * camel-session.c: add CamelExceptions to several functions. Use
17810         camel_session_new to initialize the session and URL fields of
17811         created CamelStores as appropriate.
17812
17813         * camel-store.h:
17814         * camel-store.c
17815         * camel-service.h:
17816         * camel-service.c: Move the session and url (and associated
17817         functions) from CamelStore to CamelService. Add url_flags to
17818         CamelService so subclasses can specify which URL components
17819         are mandatory for them. Add camel_session_new for
17820         camel_session_get_store* to use.
17821
17822         * providers/mbox/camel-mbox-folder.c:
17823         * providers/mbox/camel-mbox-store.c:
17824         * providers/mbox/camel-mbox-store.h: Update for above changes.
17825
17826         * camel-exception-list.def: Once camel is being used for real,
17827         exceptions won't be renumberable. So renumber them now to make
17828         more room to add exceptions to the various categories later, and
17829         add a big warning message.
17830
17831 2000-02-20  Dan Winship  <danw@helixcode.com>
17832
17833         * providers/mbox/Makefile.am: add libibex back to
17834         libcamelmbox_la_LIBADD
17835
17836 2000-02-18  NotZed  <NotZed@HelixCode.com>
17837
17838         * providers/mbox/camel-mbox-search.h
17839         (camel_mbox_folder_search_by_expression): Added exception to call,
17840         and fixed caller.
17841
17842         * providers/mbox/camel-mbox-search.c
17843         (camel_mbox_folder_search_by_expression): Major changes, to use
17844         the sexp evaluator from filter/filter-sexp.c to implement the
17845         searching.
17846         (func_body_contains): Changed to support multiple strings in 1
17847         command (results or'd together)
17848
17849         * url-util.c (g_url_new): Fixed a typo (colon == 0 isn't right),
17850         and made it so full url's are absolute pathed (Dan, this is how it
17851         has to work!).  Also, always include a path part, even if it is an
17852         empty string.
17853
17854 2000-02-18  Dan Winship  <danw@helixcode.com>
17855
17856         * camel/camel-types.h: New header with the typedefs for all camel
17857         classes. Now the class headers can just include this and the
17858         header for the parent type. This makes it possible for
17859         CamelService to include a CamelSession without creating an
17860         #include loop.
17861
17862         * camel/*:      
17863         * composer/e-msg-composer-attachment-bar.h:
17864         * mail/folder-browser.c:
17865         * mail/message-list.c: frob #includes to match the new reality
17866
17867 2000-02-17  Dan Winship  <danw@helixcode.com>
17868
17869         * camel/camel-service.h:
17870         * camel/camel-service.c: Make camel-service us a Gurl internally.
17871         Remove the login/password interfaces and instead provide
17872         camel_service_connect_with_url. Add CamelExceptions
17873
17874 2000-02-17  bertrand  <Bertrand.Guiheneuf@aful.org>
17875
17876         * camel/camel-formatter.c (handle_text_plain): 
17877         (handle_text_html): use camel_stream_reset instead
17878         of seek. The formatter should be able to work 
17879         with all streams, not only seekable streams. 
17880         In the case where some provider implementation
17881         would not be able to provide a reset method 
17882         to their stream, implementors would have
17883         to find a workaround.
17884
17885         * camel/camel-session.c (camel_session_new): use
17886         (void) instean of () in function decl.
17887
17888         * camel/camel-folder.c: ifdef async operation 
17889         related code. 
17890
17891         * camel/camel-seekable-stream.c (_seek): added a warning.
17892         (_reset): default implementation of reset for seekable
17893         stream.
17894
17895         * camel/camel-mime-message.h: set_received_date declaration fix.
17896         cosmetic changes.
17897
17898         * camel/providers/mbox/camel-mbox-provider.c (camel_provider_module_init): 
17899         use (void) instead of ().
17900
17901         * camel/camel-stream.c (camel_stream_reset): 
17902         new method for CamelStream.
17903
17904 2000-02-17  Dan Winship  <danw@helixcode.com>
17905
17906         * camel/url-util.c (g_url_to_string): New function to convert
17907         a Gurl back into a char *.
17908
17909 2000-02-17  bertrand  <Bertrand.Guiheneuf@aful.org>
17910
17911         * camel/camel-formatter.c (handle_text_plain): 
17912         revamped so that it uses the output stream
17913         of the data wrapper
17914         (handle_text_html): ditto.
17915         
17916         
17917         * camel/camel-simple-data-wrapper.h: 
17918         * camel/camel-simple-data-wrapper.c (camel_simple_data_wrapper_new): 
17919         use (void) instead of ().
17920         (_get_output_stream): simple implementation. 
17921
17922 2000-02-16  bertrand  <Bertrand.Guiheneuf@aful.org>
17923
17924         * camel/camel-data-wrapper.c (_set_input_stream): ref input stream
17925         (_set_output_stream): ref output stream
17926         (_finalize): unref input and output streams
17927
17928         * camel/camel-seekable-substream.c (_set_bounds): don't
17929         seek the begining of the substream.
17930         (_eos): fix eos condition testing. 
17931         (_finalize): unref parent stream
17932         (_init_with_seekable_stream_and_bounds): ref parent stream
17933
17934         * camel/gstring-util.c (g_string_equal_for_hash): 
17935         (g_string_equal_for_glist): return type is int.
17936
17937         * camel/camel.h: 
17938         * camel/camel.c (camel_init): use (void) 
17939         instead of ().
17940         
17941 2000-02-16  NotZed  <NotZed@HelixCode.com>
17942
17943         * providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): Added
17944         libfilter to link line (temporarily?).  Required for
17945         filter-sexp.
17946
17947 2000-02-15  bertrand  <bertrand@helixcode.com>
17948
17949         * camel/camel-multipart.c (_localize_part): 
17950         this routine replaces the _read_part routine
17951         and does not store the part in a buffer. 
17952         (_set_input_stream): use the set_input_stream
17953         instead of the construct_from_stream.
17954         each bodypart is given an input stream. 
17955
17956         * camel/camel-mime-part-utils.c: 
17957         include the data-wrapper-repository header. 
17958         (camel_mime_part_construct_content_from_stream): 
17959         use the set_input_stream instead of the 
17960         construct_from_stream method. 
17961
17962         * camel/camel-seekable-substream.c (_set_bounds): 
17963         cur position is set to 0 not to inf_bound.
17964
17965 2000-02-15  bertrand  <Bertrand.Guiheneuf@aful.org>
17966
17967         * camel/camel-mime-part.c: include gmime-base64.h
17968         various compilation and runtime fixes.
17969         (_set_input_stream): store the input substream 
17970         for the content object.
17971
17972         * camel/camel-data-wrapper.h: declare the 
17973         set/get function on input/output stream.
17974
17975         * camel/camel-mime-part.c (_get_content_object): 
17976         don't use a temporary mem stream.       
17977
17978         * camel/camel-seekable-substream.c (_seek): 
17979         (_eos): 
17980         (_read): the substream can be unlimited in length
17981
17982         * camel/camel-data-wrapper.c (camel_data_wrapper_class_init): 
17983         set the get/set_input/output_stream methods.    
17984
17985         * camel/camel-multipart.c (_construct_from_stream): 
17986         camel_stream_seek -> camel_seekable_stream_seek
17987
17988 2000-02-14  Miguel de Icaza  <miguel@gnu.org>
17989
17990         * camel/providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): Add
17991         the unicode libraries as well.
17992
17993         * camel/camel-provider.c (camel_provider_register_as_module): Add
17994         error reporting here.  Desire to use Solaris increases.  Hair loss
17995         in the last two hours: 5,400.
17996
17997         * camel/providers/mbox/camel-mbox-provider.c
17998         (camel_mbox_get_provider): Renamed function.
17999
18000         * camel/camel.h: All include files use camel/ now here.
18001
18002         * camel/providers/mbox/Makefile.am: Drop all the dynamism from
18003         Camel, and make this a standard library.
18004
18005 2000-02-14  bertrand  <Bertrand.Guiheneuf@aful.org>
18006
18007         * camel/gmime-utils.c (get_header_array_from_stream): use the 
18008         eos stream method. 
18009         (gmime_read_line_from_stream): ditto.
18010
18011         * camel/camel-stream-fs.h (struct ): add the eof field
18012         cosmetics changes. 
18013
18014         * camel/camel-stream-fs.c (camel_stream_fs_init): set eof.
18015         (_read): set eof on end of file.
18016         (_eos): implemented.
18017
18018         * camel/gmime-utils.c (get_header_array_from_stream): 
18019         make a blocking version of the header parser. 
18020         When the fs stream uses gnome-vfs, this should
18021         be changed. 
18022         (gmime_read_line_from_stream): ditto. 
18023
18024 2000-02-11  bertrand  <Bertrand.Guiheneuf@aful.org>
18025
18026         * camel/camel-stream-fs.c: 
18027         everywhere, when using the cur_pos field, do it
18028         on the CamelSeekableStream object.
18029         (_seek): small fix. 
18030
18031         * camel/camel-seekable-stream.c (camel_seekable_stream_seek): 
18032         s/camel_stream_seek/camel_seekable_stream_seek/g
18033
18034         * camel/camel-seekable-stream.h: 
18035         (struct ): added a field to store the
18036         current position.
18037
18038         * camel/camel-seekable-stream.c (camel_seekable_stream_get_current_position): 
18039         New function. Allows to get the current position 
18040         of a seekable stream.
18041         
18042
18043 2000-02-13  NotZed  <notzed@zedzone.helixcode.com>
18044
18045         * providers/mbox/camel-mbox-search.c: New file, implements the
18046         search api for mbox folders.
18047
18048         * providers/mbox/Makefile.am: Link with ibex.
18049
18050         * camel-folder.c (camel_folder_has_search_capability): Api
18051         additions.
18052         (camel_folder_search_by_expression): Ditto.
18053
18054 2000-02-12  NotZed  <notzed@zedzone.helixcode.com>
18055
18056         * providers/mbox/camel-mbox-folder.c (_set_name): Setup index
18057         filename as well.
18058         (_init_with_store): Init index filename.  Hmm, none of these
18059         names ever seem to get free'd (FIXME?)
18060
18061         * providers/mbox/camel-mbox-folder.h: Add index file name.
18062
18063 2000-02-12  NotZed  <notzed@helixcode.com>
18064
18065         * camel-folder.h: Add folder search functions.
18066
18067         ** Created ChangeLog just for camel **
18068          - refer to ../ChangeLog for changes prior to this date.